Files
xueguang_web_dist/assets/index-D4mISQVM.js
zhutao abc955d3bc 1
2025-11-28 15:25:17 +08:00

8494 lines
6.8 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jspdf.es.min-B0xhe8Uc.js","assets/index-BbYcdrlh.js","assets/index-D6m9WDyY.css","assets/appliance-plugin-BKualpMO.js","assets/eventemitter2-BZbyr5yF.js","assets/app-in-mainview-plugin-sbukcpr0.js"])))=>i.map(i=>d[i]);
import{_ as __vitePreload,d as defineComponent,c as createElementBlock,u as useRoute,o as openBlock,a as _export_sfc}from"./index-BbYcdrlh.js";var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport$1="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(et,_e){return et.concat([_e+"-"+start,_e+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(et,_e){return et.concat([_e,_e+"-"+start,_e+"-"+end])},[]),beforeRead="beforeRead",read$1="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write$1="write",afterWrite$1="afterWrite",modifierPhases=[beforeRead,read$1,afterRead,beforeMain,main,afterMain,beforeWrite,write$1,afterWrite$1];function getNodeName(et){return et?(et.nodeName||"").toLowerCase():null}function getWindow(et){if(et==null)return window;if(et.toString()!=="[object Window]"){var _e=et.ownerDocument;return _e&&_e.defaultView||window}return et}function isElement$3(et){var _e=getWindow(et).Element;return et instanceof _e||et instanceof Element}function isHTMLElement$1(et){var _e=getWindow(et).HTMLElement;return et instanceof _e||et instanceof HTMLElement}function isShadowRoot(et){if(typeof ShadowRoot>"u")return!1;var _e=getWindow(et).ShadowRoot;return et instanceof _e||et instanceof ShadowRoot}function applyStyles(et){var _e=et.state;Object.keys(_e.elements).forEach(function(tt){var rt=_e.styles[tt]||{},nt=_e.attributes[tt]||{},st=_e.elements[tt];!isHTMLElement$1(st)||!getNodeName(st)||(Object.assign(st.style,rt),Object.keys(nt).forEach(function(dt){var ft=nt[dt];ft===!1?st.removeAttribute(dt):st.setAttribute(dt,ft===!0?"":ft)}))})}function effect$2(et){var _e=et.state,tt={popper:{position:_e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(_e.elements.popper.style,tt.popper),_e.styles=tt,_e.elements.arrow&&Object.assign(_e.elements.arrow.style,tt.arrow),function(){Object.keys(_e.elements).forEach(function(rt){var nt=_e.elements[rt],st=_e.attributes[rt]||{},dt=Object.keys(_e.styles.hasOwnProperty(rt)?_e.styles[rt]:tt[rt]),ft=dt.reduce(function(ht,mt){return ht[mt]="",ht},{});!isHTMLElement$1(nt)||!getNodeName(nt)||(Object.assign(nt.style,ft),Object.keys(st).forEach(function(ht){nt.removeAttribute(ht)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement$1(et){return et.split("-")[0]}var max$2=Math.max,min$2=Math.min,round$2=Math.round;function getUAString(){var et=navigator.userAgentData;return et!=null&&et.brands&&Array.isArray(et.brands)?et.brands.map(function(_e){return _e.brand+"/"+_e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect$1(et,_e,tt){_e===void 0&&(_e=!1),tt===void 0&&(tt=!1);var rt=et.getBoundingClientRect(),nt=1,st=1;_e&&isHTMLElement$1(et)&&(nt=et.offsetWidth>0&&round$2(rt.width)/et.offsetWidth||1,st=et.offsetHeight>0&&round$2(rt.height)/et.offsetHeight||1);var dt=isElement$3(et)?getWindow(et):window,ft=dt.visualViewport,ht=!isLayoutViewport()&&tt,mt=(rt.left+(ht&&ft?ft.offsetLeft:0))/nt,bt=(rt.top+(ht&&ft?ft.offsetTop:0))/st,St=rt.width/nt,Et=rt.height/st;return{width:St,height:Et,top:bt,right:mt+St,bottom:bt+Et,left:mt,x:mt,y:bt}}function getLayoutRect(et){var _e=getBoundingClientRect$1(et),tt=et.offsetWidth,rt=et.offsetHeight;return Math.abs(_e.width-tt)<=1&&(tt=_e.width),Math.abs(_e.height-rt)<=1&&(rt=_e.height),{x:et.offsetLeft,y:et.offsetTop,width:tt,height:rt}}function contains(et,_e){var tt=_e.getRootNode&&_e.getRootNode();if(et.contains(_e))return!0;if(tt&&isShadowRoot(tt)){var rt=_e;do{if(rt&&et.isSameNode(rt))return!0;rt=rt.parentNode||rt.host}while(rt)}return!1}function getComputedStyle$1(et){return getWindow(et).getComputedStyle(et)}function isTableElement(et){return["table","td","th"].indexOf(getNodeName(et))>=0}function getDocumentElement(et){return((isElement$3(et)?et.ownerDocument:et.document)||window.document).documentElement}function getParentNode(et){return getNodeName(et)==="html"?et:et.assignedSlot||et.parentNode||(isShadowRoot(et)?et.host:null)||getDocumentElement(et)}function getTrueOffsetParent(et){return!isHTMLElement$1(et)||getComputedStyle$1(et).position==="fixed"?null:et.offsetParent}function getContainingBlock(et){var _e=/firefox/i.test(getUAString()),tt=/Trident/i.test(getUAString());if(tt&&isHTMLElement$1(et)){var rt=getComputedStyle$1(et);if(rt.position==="fixed")return null}var nt=getParentNode(et);for(isShadowRoot(nt)&&(nt=nt.host);isHTMLElement$1(nt)&&["html","body"].indexOf(getNodeName(nt))<0;){var st=getComputedStyle$1(nt);if(st.transform!=="none"||st.perspective!=="none"||st.contain==="paint"||["transform","perspective"].indexOf(st.willChange)!==-1||_e&&st.willChange==="filter"||_e&&st.filter&&st.filter!=="none")return nt;nt=nt.parentNode}return null}function getOffsetParent(et){for(var _e=getWindow(et),tt=getTrueOffsetParent(et);tt&&isTableElement(tt)&&getComputedStyle$1(tt).position==="static";)tt=getTrueOffsetParent(tt);return tt&&(getNodeName(tt)==="html"||getNodeName(tt)==="body"&&getComputedStyle$1(tt).position==="static")?_e:tt||getContainingBlock(et)||_e}function getMainAxisFromPlacement(et){return["top","bottom"].indexOf(et)>=0?"x":"y"}function within(et,_e,tt){return max$2(et,min$2(_e,tt))}function withinMaxClamp(et,_e,tt){var rt=within(et,_e,tt);return rt>tt?tt:rt}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(et){return Object.assign({},getFreshSideObject(),et)}function expandToHashMap(et,_e){return _e.reduce(function(tt,rt){return tt[rt]=et,tt},{})}var toPaddingObject=function(_e,tt){return _e=typeof _e=="function"?_e(Object.assign({},tt.rects,{placement:tt.placement})):_e,mergePaddingObject(typeof _e!="number"?_e:expandToHashMap(_e,basePlacements))};function arrow(et){var _e,tt=et.state,rt=et.name,nt=et.options,st=tt.elements.arrow,dt=tt.modifiersData.popperOffsets,ft=getBasePlacement$1(tt.placement),ht=getMainAxisFromPlacement(ft),mt=[left,right].indexOf(ft)>=0,bt=mt?"height":"width";if(!(!st||!dt)){var St=toPaddingObject(nt.padding,tt),Et=getLayoutRect(st),Ct=ht==="y"?top:left,Rt=ht==="y"?bottom:right,Tt=tt.rects.reference[bt]+tt.rects.reference[ht]-dt[ht]-tt.rects.popper[bt],wt=dt[ht]-tt.rects.reference[ht],At=getOffsetParent(st),Nt=At?ht==="y"?At.clientHeight||0:At.clientWidth||0:0,Pt=Tt/2-wt/2,It=St[Ct],Ft=Nt-Et[bt]-St[Rt],qt=Nt/2-Et[bt]/2+Pt,Vt=within(It,qt,Ft),Kt=ht;tt.modifiersData[rt]=(_e={},_e[Kt]=Vt,_e.centerOffset=Vt-qt,_e)}}function effect$1(et){var _e=et.state,tt=et.options,rt=tt.element,nt=rt===void 0?"[data-popper-arrow]":rt;nt!=null&&(typeof nt=="string"&&(nt=_e.elements.popper.querySelector(nt),!nt)||contains(_e.elements.popper,nt)&&(_e.elements.arrow=nt))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(et){return et.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(et,_e){var tt=et.x,rt=et.y,nt=_e.devicePixelRatio||1;return{x:round$2(tt*nt)/nt||0,y:round$2(rt*nt)/nt||0}}function mapToStyles(et){var _e,tt=et.popper,rt=et.popperRect,nt=et.placement,st=et.variation,dt=et.offsets,ft=et.position,ht=et.gpuAcceleration,mt=et.adaptive,bt=et.roundOffsets,St=et.isFixed,Et=dt.x,Ct=Et===void 0?0:Et,Rt=dt.y,Tt=Rt===void 0?0:Rt,wt=typeof bt=="function"?bt({x:Ct,y:Tt}):{x:Ct,y:Tt};Ct=wt.x,Tt=wt.y;var At=dt.hasOwnProperty("x"),Nt=dt.hasOwnProperty("y"),Pt=left,It=top,Ft=window;if(mt){var qt=getOffsetParent(tt),Vt="clientHeight",Kt="clientWidth";if(qt===getWindow(tt)&&(qt=getDocumentElement(tt),getComputedStyle$1(qt).position!=="static"&&ft==="absolute"&&(Vt="scrollHeight",Kt="scrollWidth")),qt=qt,nt===top||(nt===left||nt===right)&&st===end){It=bottom;var jt=St&&qt===Ft&&Ft.visualViewport?Ft.visualViewport.height:qt[Vt];Tt-=jt-rt.height,Tt*=ht?1:-1}if(nt===left||(nt===top||nt===bottom)&&st===end){Pt=right;var Ut=St&&qt===Ft&&Ft.visualViewport?Ft.visualViewport.width:qt[Kt];Ct-=Ut-rt.width,Ct*=ht?1:-1}}var Ot=Object.assign({position:ft},mt&&unsetSides),Wt=bt===!0?roundOffsetsByDPR({x:Ct,y:Tt},getWindow(tt)):{x:Ct,y:Tt};if(Ct=Wt.x,Tt=Wt.y,ht){var Bt;return Object.assign({},Ot,(Bt={},Bt[It]=Nt?"0":"",Bt[Pt]=At?"0":"",Bt.transform=(Ft.devicePixelRatio||1)<=1?"translate("+Ct+"px, "+Tt+"px)":"translate3d("+Ct+"px, "+Tt+"px, 0)",Bt))}return Object.assign({},Ot,(_e={},_e[It]=Nt?Tt+"px":"",_e[Pt]=At?Ct+"px":"",_e.transform="",_e))}function computeStyles(et){var _e=et.state,tt=et.options,rt=tt.gpuAcceleration,nt=rt===void 0?!0:rt,st=tt.adaptive,dt=st===void 0?!0:st,ft=tt.roundOffsets,ht=ft===void 0?!0:ft,mt={placement:getBasePlacement$1(_e.placement),variation:getVariation(_e.placement),popper:_e.elements.popper,popperRect:_e.rects.popper,gpuAcceleration:nt,isFixed:_e.options.strategy==="fixed"};_e.modifiersData.popperOffsets!=null&&(_e.styles.popper=Object.assign({},_e.styles.popper,mapToStyles(Object.assign({},mt,{offsets:_e.modifiersData.popperOffsets,position:_e.options.strategy,adaptive:dt,roundOffsets:ht})))),_e.modifiersData.arrow!=null&&(_e.styles.arrow=Object.assign({},_e.styles.arrow,mapToStyles(Object.assign({},mt,{offsets:_e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ht})))),_e.attributes.popper=Object.assign({},_e.attributes.popper,{"data-popper-placement":_e.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(et){var _e=et.state,tt=et.instance,rt=et.options,nt=rt.scroll,st=nt===void 0?!0:nt,dt=rt.resize,ft=dt===void 0?!0:dt,ht=getWindow(_e.elements.popper),mt=[].concat(_e.scrollParents.reference,_e.scrollParents.popper);return st&&mt.forEach(function(bt){bt.addEventListener("scroll",tt.update,passive)}),ft&&ht.addEventListener("resize",tt.update,passive),function(){st&&mt.forEach(function(bt){bt.removeEventListener("scroll",tt.update,passive)}),ft&&ht.removeEventListener("resize",tt.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(et){return et.replace(/left|right|bottom|top/g,function(_e){return hash$1[_e]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(et){return et.replace(/start|end/g,function(_e){return hash[_e]})}function getWindowScroll(et){var _e=getWindow(et),tt=_e.pageXOffset,rt=_e.pageYOffset;return{scrollLeft:tt,scrollTop:rt}}function getWindowScrollBarX(et){return getBoundingClientRect$1(getDocumentElement(et)).left+getWindowScroll(et).scrollLeft}function getViewportRect(et,_e){var tt=getWindow(et),rt=getDocumentElement(et),nt=tt.visualViewport,st=rt.clientWidth,dt=rt.clientHeight,ft=0,ht=0;if(nt){st=nt.width,dt=nt.height;var mt=isLayoutViewport();(mt||!mt&&_e==="fixed")&&(ft=nt.offsetLeft,ht=nt.offsetTop)}return{width:st,height:dt,x:ft+getWindowScrollBarX(et),y:ht}}function getDocumentRect(et){var _e,tt=getDocumentElement(et),rt=getWindowScroll(et),nt=(_e=et.ownerDocument)==null?void 0:_e.body,st=max$2(tt.scrollWidth,tt.clientWidth,nt?nt.scrollWidth:0,nt?nt.clientWidth:0),dt=max$2(tt.scrollHeight,tt.clientHeight,nt?nt.scrollHeight:0,nt?nt.clientHeight:0),ft=-rt.scrollLeft+getWindowScrollBarX(et),ht=-rt.scrollTop;return getComputedStyle$1(nt||tt).direction==="rtl"&&(ft+=max$2(tt.clientWidth,nt?nt.clientWidth:0)-st),{width:st,height:dt,x:ft,y:ht}}function isScrollParent(et){var _e=getComputedStyle$1(et),tt=_e.overflow,rt=_e.overflowX,nt=_e.overflowY;return/auto|scroll|overlay|hidden/.test(tt+nt+rt)}function getScrollParent(et){return["html","body","#document"].indexOf(getNodeName(et))>=0?et.ownerDocument.body:isHTMLElement$1(et)&&isScrollParent(et)?et:getScrollParent(getParentNode(et))}function listScrollParents(et,_e){var tt;_e===void 0&&(_e=[]);var rt=getScrollParent(et),nt=rt===((tt=et.ownerDocument)==null?void 0:tt.body),st=getWindow(rt),dt=nt?[st].concat(st.visualViewport||[],isScrollParent(rt)?rt:[]):rt,ft=_e.concat(dt);return nt?ft:ft.concat(listScrollParents(getParentNode(dt)))}function rectToClientRect(et){return Object.assign({},et,{left:et.x,top:et.y,right:et.x+et.width,bottom:et.y+et.height})}function getInnerBoundingClientRect(et,_e){var tt=getBoundingClientRect$1(et,!1,_e==="fixed");return tt.top=tt.top+et.clientTop,tt.left=tt.left+et.clientLeft,tt.bottom=tt.top+et.clientHeight,tt.right=tt.left+et.clientWidth,tt.width=et.clientWidth,tt.height=et.clientHeight,tt.x=tt.left,tt.y=tt.top,tt}function getClientRectFromMixedType(et,_e,tt){return _e===viewport$1?rectToClientRect(getViewportRect(et,tt)):isElement$3(_e)?getInnerBoundingClientRect(_e,tt):rectToClientRect(getDocumentRect(getDocumentElement(et)))}function getClippingParents(et){var _e=listScrollParents(getParentNode(et)),tt=["absolute","fixed"].indexOf(getComputedStyle$1(et).position)>=0,rt=tt&&isHTMLElement$1(et)?getOffsetParent(et):et;return isElement$3(rt)?_e.filter(function(nt){return isElement$3(nt)&&contains(nt,rt)&&getNodeName(nt)!=="body"}):[]}function getClippingRect(et,_e,tt,rt){var nt=_e==="clippingParents"?getClippingParents(et):[].concat(_e),st=[].concat(nt,[tt]),dt=st[0],ft=st.reduce(function(ht,mt){var bt=getClientRectFromMixedType(et,mt,rt);return ht.top=max$2(bt.top,ht.top),ht.right=min$2(bt.right,ht.right),ht.bottom=min$2(bt.bottom,ht.bottom),ht.left=max$2(bt.left,ht.left),ht},getClientRectFromMixedType(et,dt,rt));return ft.width=ft.right-ft.left,ft.height=ft.bottom-ft.top,ft.x=ft.left,ft.y=ft.top,ft}function computeOffsets(et){var _e=et.reference,tt=et.element,rt=et.placement,nt=rt?getBasePlacement$1(rt):null,st=rt?getVariation(rt):null,dt=_e.x+_e.width/2-tt.width/2,ft=_e.y+_e.height/2-tt.height/2,ht;switch(nt){case top:ht={x:dt,y:_e.y-tt.height};break;case bottom:ht={x:dt,y:_e.y+_e.height};break;case right:ht={x:_e.x+_e.width,y:ft};break;case left:ht={x:_e.x-tt.width,y:ft};break;default:ht={x:_e.x,y:_e.y}}var mt=nt?getMainAxisFromPlacement(nt):null;if(mt!=null){var bt=mt==="y"?"height":"width";switch(st){case start:ht[mt]=ht[mt]-(_e[bt]/2-tt[bt]/2);break;case end:ht[mt]=ht[mt]+(_e[bt]/2-tt[bt]/2);break}}return ht}function detectOverflow(et,_e){_e===void 0&&(_e={});var tt=_e,rt=tt.placement,nt=rt===void 0?et.placement:rt,st=tt.strategy,dt=st===void 0?et.strategy:st,ft=tt.boundary,ht=ft===void 0?clippingParents:ft,mt=tt.rootBoundary,bt=mt===void 0?viewport$1:mt,St=tt.elementContext,Et=St===void 0?popper:St,Ct=tt.altBoundary,Rt=Ct===void 0?!1:Ct,Tt=tt.padding,wt=Tt===void 0?0:Tt,At=mergePaddingObject(typeof wt!="number"?wt:expandToHashMap(wt,basePlacements)),Nt=Et===popper?reference:popper,Pt=et.rects.popper,It=et.elements[Rt?Nt:Et],Ft=getClippingRect(isElement$3(It)?It:It.contextElement||getDocumentElement(et.elements.popper),ht,bt,dt),qt=getBoundingClientRect$1(et.elements.reference),Vt=computeOffsets({reference:qt,element:Pt,placement:nt}),Kt=rectToClientRect(Object.assign({},Pt,Vt)),jt=Et===popper?Kt:qt,Ut={top:Ft.top-jt.top+At.top,bottom:jt.bottom-Ft.bottom+At.bottom,left:Ft.left-jt.left+At.left,right:jt.right-Ft.right+At.right},Ot=et.modifiersData.offset;if(Et===popper&&Ot){var Wt=Ot[nt];Object.keys(Ut).forEach(function(Bt){var tr=[right,bottom].indexOf(Bt)>=0?1:-1,Jt=[top,bottom].indexOf(Bt)>=0?"y":"x";Ut[Bt]+=Wt[Jt]*tr})}return Ut}function computeAutoPlacement(et,_e){_e===void 0&&(_e={});var tt=_e,rt=tt.placement,nt=tt.boundary,st=tt.rootBoundary,dt=tt.padding,ft=tt.flipVariations,ht=tt.allowedAutoPlacements,mt=ht===void 0?placements:ht,bt=getVariation(rt),St=bt?ft?variationPlacements:variationPlacements.filter(function(Rt){return getVariation(Rt)===bt}):basePlacements,Et=St.filter(function(Rt){return mt.indexOf(Rt)>=0});Et.length===0&&(Et=St);var Ct=Et.reduce(function(Rt,Tt){return Rt[Tt]=detectOverflow(et,{placement:Tt,boundary:nt,rootBoundary:st,padding:dt})[getBasePlacement$1(Tt)],Rt},{});return Object.keys(Ct).sort(function(Rt,Tt){return Ct[Rt]-Ct[Tt]})}function getExpandedFallbackPlacements(et){if(getBasePlacement$1(et)===auto)return[];var _e=getOppositePlacement(et);return[getOppositeVariationPlacement(et),_e,getOppositeVariationPlacement(_e)]}function flip(et){var _e=et.state,tt=et.options,rt=et.name;if(!_e.modifiersData[rt]._skip){for(var nt=tt.mainAxis,st=nt===void 0?!0:nt,dt=tt.altAxis,ft=dt===void 0?!0:dt,ht=tt.fallbackPlacements,mt=tt.padding,bt=tt.boundary,St=tt.rootBoundary,Et=tt.altBoundary,Ct=tt.flipVariations,Rt=Ct===void 0?!0:Ct,Tt=tt.allowedAutoPlacements,wt=_e.options.placement,At=getBasePlacement$1(wt),Nt=At===wt,Pt=ht||(Nt||!Rt?[getOppositePlacement(wt)]:getExpandedFallbackPlacements(wt)),It=[wt].concat(Pt).reduce(function(Mr,Nr){return Mr.concat(getBasePlacement$1(Nr)===auto?computeAutoPlacement(_e,{placement:Nr,boundary:bt,rootBoundary:St,padding:mt,flipVariations:Rt,allowedAutoPlacements:Tt}):Nr)},[]),Ft=_e.rects.reference,qt=_e.rects.popper,Vt=new Map,Kt=!0,jt=It[0],Ut=0;Ut<It.length;Ut++){var Ot=It[Ut],Wt=getBasePlacement$1(Ot),Bt=getVariation(Ot)===start,tr=[top,bottom].indexOf(Wt)>=0,Jt=tr?"width":"height",ar=detectOverflow(_e,{placement:Ot,boundary:bt,rootBoundary:St,altBoundary:Et,padding:mt}),pr=tr?Bt?right:left:Bt?bottom:top;Ft[Jt]>qt[Jt]&&(pr=getOppositePlacement(pr));var cr=getOppositePlacement(pr),gr=[];if(st&&gr.push(ar[Wt]<=0),ft&&gr.push(ar[pr]<=0,ar[cr]<=0),gr.every(function(Mr){return Mr})){jt=Ot,Kt=!1;break}Vt.set(Ot,gr)}if(Kt)for(var Sr=Rt?3:1,Er=function(Nr){var Yr=It.find(function(Or){var Ar=Vt.get(Or);if(Ar)return Ar.slice(0,Nr).every(function(Qr){return Qr})});if(Yr)return jt=Yr,"break"},Vr=Sr;Vr>0;Vr--){var Wr=Er(Vr);if(Wr==="break")break}_e.placement!==jt&&(_e.modifiersData[rt]._skip=!0,_e.placement=jt,_e.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(et,_e,tt){return tt===void 0&&(tt={x:0,y:0}),{top:et.top-_e.height-tt.y,right:et.right-_e.width+tt.x,bottom:et.bottom-_e.height+tt.y,left:et.left-_e.width-tt.x}}function isAnySideFullyClipped(et){return[top,right,bottom,left].some(function(_e){return et[_e]>=0})}function hide(et){var _e=et.state,tt=et.name,rt=_e.rects.reference,nt=_e.rects.popper,st=_e.modifiersData.preventOverflow,dt=detectOverflow(_e,{elementContext:"reference"}),ft=detectOverflow(_e,{altBoundary:!0}),ht=getSideOffsets(dt,rt),mt=getSideOffsets(ft,nt,st),bt=isAnySideFullyClipped(ht),St=isAnySideFullyClipped(mt);_e.modifiersData[tt]={referenceClippingOffsets:ht,popperEscapeOffsets:mt,isReferenceHidden:bt,hasPopperEscaped:St},_e.attributes.popper=Object.assign({},_e.attributes.popper,{"data-popper-reference-hidden":bt,"data-popper-escaped":St})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(et,_e,tt){var rt=getBasePlacement$1(et),nt=[left,top].indexOf(rt)>=0?-1:1,st=typeof tt=="function"?tt(Object.assign({},_e,{placement:et})):tt,dt=st[0],ft=st[1];return dt=dt||0,ft=(ft||0)*nt,[left,right].indexOf(rt)>=0?{x:ft,y:dt}:{x:dt,y:ft}}function offset(et){var _e=et.state,tt=et.options,rt=et.name,nt=tt.offset,st=nt===void 0?[0,0]:nt,dt=placements.reduce(function(bt,St){return bt[St]=distanceAndSkiddingToXY(St,_e.rects,st),bt},{}),ft=dt[_e.placement],ht=ft.x,mt=ft.y;_e.modifiersData.popperOffsets!=null&&(_e.modifiersData.popperOffsets.x+=ht,_e.modifiersData.popperOffsets.y+=mt),_e.modifiersData[rt]=dt}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(et){var _e=et.state,tt=et.name;_e.modifiersData[tt]=computeOffsets({reference:_e.rects.reference,element:_e.rects.popper,placement:_e.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(et){return et==="x"?"y":"x"}function preventOverflow(et){var _e=et.state,tt=et.options,rt=et.name,nt=tt.mainAxis,st=nt===void 0?!0:nt,dt=tt.altAxis,ft=dt===void 0?!1:dt,ht=tt.boundary,mt=tt.rootBoundary,bt=tt.altBoundary,St=tt.padding,Et=tt.tether,Ct=Et===void 0?!0:Et,Rt=tt.tetherOffset,Tt=Rt===void 0?0:Rt,wt=detectOverflow(_e,{boundary:ht,rootBoundary:mt,padding:St,altBoundary:bt}),At=getBasePlacement$1(_e.placement),Nt=getVariation(_e.placement),Pt=!Nt,It=getMainAxisFromPlacement(At),Ft=getAltAxis(It),qt=_e.modifiersData.popperOffsets,Vt=_e.rects.reference,Kt=_e.rects.popper,jt=typeof Tt=="function"?Tt(Object.assign({},_e.rects,{placement:_e.placement})):Tt,Ut=typeof jt=="number"?{mainAxis:jt,altAxis:jt}:Object.assign({mainAxis:0,altAxis:0},jt),Ot=_e.modifiersData.offset?_e.modifiersData.offset[_e.placement]:null,Wt={x:0,y:0};if(qt){if(st){var Bt,tr=It==="y"?top:left,Jt=It==="y"?bottom:right,ar=It==="y"?"height":"width",pr=qt[It],cr=pr+wt[tr],gr=pr-wt[Jt],Sr=Ct?-Kt[ar]/2:0,Er=Nt===start?Vt[ar]:Kt[ar],Vr=Nt===start?-Kt[ar]:-Vt[ar],Wr=_e.elements.arrow,Mr=Ct&&Wr?getLayoutRect(Wr):{width:0,height:0},Nr=_e.modifiersData["arrow#persistent"]?_e.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Yr=Nr[tr],Or=Nr[Jt],Ar=within(0,Vt[ar],Mr[ar]),Qr=Pt?Vt[ar]/2-Sr-Ar-Yr-Ut.mainAxis:Er-Ar-Yr-Ut.mainAxis,hn=Pt?-Vt[ar]/2+Sr+Ar+Or+Ut.mainAxis:Vr+Ar+Or+Ut.mainAxis,Sn=_e.elements.arrow&&getOffsetParent(_e.elements.arrow),Kr=Sn?It==="y"?Sn.clientTop||0:Sn.clientLeft||0:0,Hn=(Bt=Ot?.[It])!=null?Bt:0,ln=pr+Qr-Hn-Kr,kn=pr+hn-Hn,xn=within(Ct?min$2(cr,ln):cr,pr,Ct?max$2(gr,kn):gr);qt[It]=xn,Wt[It]=xn-pr}if(ft){var An,rs=It==="x"?top:left,qs=It==="x"?bottom:right,Ln=qt[Ft],Cn=Ft==="y"?"height":"width",Nn=Ln+wt[rs],Gr=Ln-wt[qs],tn=[top,left].indexOf(At)!==-1,dn=(An=Ot?.[Ft])!=null?An:0,Rn=tn?Nn:Ln-Vt[Cn]-Kt[Cn]-dn+Ut.altAxis,wn=tn?Ln+Vt[Cn]+Kt[Cn]-dn-Ut.altAxis:Gr,Un=Ct&&tn?withinMaxClamp(Rn,Ln,wn):within(Ct?Rn:Nn,Ln,Ct?wn:Gr);qt[Ft]=Un,Wt[Ft]=Un-Ln}_e.modifiersData[rt]=Wt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(et){return{scrollLeft:et.scrollLeft,scrollTop:et.scrollTop}}function getNodeScroll(et){return et===getWindow(et)||!isHTMLElement$1(et)?getWindowScroll(et):getHTMLElementScroll(et)}function isElementScaled(et){var _e=et.getBoundingClientRect(),tt=round$2(_e.width)/et.offsetWidth||1,rt=round$2(_e.height)/et.offsetHeight||1;return tt!==1||rt!==1}function getCompositeRect(et,_e,tt){tt===void 0&&(tt=!1);var rt=isHTMLElement$1(_e),nt=isHTMLElement$1(_e)&&isElementScaled(_e),st=getDocumentElement(_e),dt=getBoundingClientRect$1(et,nt,tt),ft={scrollLeft:0,scrollTop:0},ht={x:0,y:0};return(rt||!rt&&!tt)&&((getNodeName(_e)!=="body"||isScrollParent(st))&&(ft=getNodeScroll(_e)),isHTMLElement$1(_e)?(ht=getBoundingClientRect$1(_e,!0),ht.x+=_e.clientLeft,ht.y+=_e.clientTop):st&&(ht.x=getWindowScrollBarX(st))),{x:dt.left+ft.scrollLeft-ht.x,y:dt.top+ft.scrollTop-ht.y,width:dt.width,height:dt.height}}function order$1(et){var _e=new Map,tt=new Set,rt=[];et.forEach(function(st){_e.set(st.name,st)});function nt(st){tt.add(st.name);var dt=[].concat(st.requires||[],st.requiresIfExists||[]);dt.forEach(function(ft){if(!tt.has(ft)){var ht=_e.get(ft);ht&&nt(ht)}}),rt.push(st)}return et.forEach(function(st){tt.has(st.name)||nt(st)}),rt}function orderModifiers(et){var _e=order$1(et);return modifierPhases.reduce(function(tt,rt){return tt.concat(_e.filter(function(nt){return nt.phase===rt}))},[])}function debounce$3(et){var _e;return function(){return _e||(_e=new Promise(function(tt){Promise.resolve().then(function(){_e=void 0,tt(et())})})),_e}}function mergeByName(et){var _e=et.reduce(function(tt,rt){var nt=tt[rt.name];return tt[rt.name]=nt?Object.assign({},nt,rt,{options:Object.assign({},nt.options,rt.options),data:Object.assign({},nt.data,rt.data)}):rt,tt},{});return Object.keys(_e).map(function(tt){return _e[tt]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var et=arguments.length,_e=new Array(et),tt=0;tt<et;tt++)_e[tt]=arguments[tt];return!_e.some(function(rt){return!(rt&&typeof rt.getBoundingClientRect=="function")})}function popperGenerator(et){et===void 0&&(et={});var _e=et,tt=_e.defaultModifiers,rt=tt===void 0?[]:tt,nt=_e.defaultOptions,st=nt===void 0?DEFAULT_OPTIONS:nt;return function(ft,ht,mt){mt===void 0&&(mt=st);var bt={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,st),modifiersData:{},elements:{reference:ft,popper:ht},attributes:{},styles:{}},St=[],Et=!1,Ct={state:bt,setOptions:function(At){var Nt=typeof At=="function"?At(bt.options):At;Tt(),bt.options=Object.assign({},st,bt.options,Nt),bt.scrollParents={reference:isElement$3(ft)?listScrollParents(ft):ft.contextElement?listScrollParents(ft.contextElement):[],popper:listScrollParents(ht)};var Pt=orderModifiers(mergeByName([].concat(rt,bt.options.modifiers)));return bt.orderedModifiers=Pt.filter(function(It){return It.enabled}),Rt(),Ct.update()},forceUpdate:function(){if(!Et){var At=bt.elements,Nt=At.reference,Pt=At.popper;if(areValidElements(Nt,Pt)){bt.rects={reference:getCompositeRect(Nt,getOffsetParent(Pt),bt.options.strategy==="fixed"),popper:getLayoutRect(Pt)},bt.reset=!1,bt.placement=bt.options.placement,bt.orderedModifiers.forEach(function(Ut){return bt.modifiersData[Ut.name]=Object.assign({},Ut.data)});for(var It=0;It<bt.orderedModifiers.length;It++){if(bt.reset===!0){bt.reset=!1,It=-1;continue}var Ft=bt.orderedModifiers[It],qt=Ft.fn,Vt=Ft.options,Kt=Vt===void 0?{}:Vt,jt=Ft.name;typeof qt=="function"&&(bt=qt({state:bt,options:Kt,name:jt,instance:Ct})||bt)}}}},update:debounce$3(function(){return new Promise(function(wt){Ct.forceUpdate(),wt(bt)})}),destroy:function(){Tt(),Et=!0}};if(!areValidElements(ft,ht))return Ct;Ct.setOptions(mt).then(function(wt){!Et&&mt.onFirstUpdate&&mt.onFirstUpdate(wt)});function Rt(){bt.orderedModifiers.forEach(function(wt){var At=wt.name,Nt=wt.options,Pt=Nt===void 0?{}:Nt,It=wt.effect;if(typeof It=="function"){var Ft=It({state:bt,name:At,instance:Ct,options:Pt}),qt=function(){};St.push(Ft||qt)}})}function Tt(){St.forEach(function(wt){return wt()}),St=[]}return Ct}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers}),BOX_CLASS="tippy-box",CONTENT_CLASS="tippy-content",BACKDROP_CLASS="tippy-backdrop",ARROW_CLASS="tippy-arrow",SVG_ARROW_CLASS="tippy-svg-arrow",TOUCH_OPTIONS={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function getValueAtIndexOrReturn(et,_e,tt){if(Array.isArray(et)){var rt=et[_e];return rt??(Array.isArray(tt)?tt[_e]:tt)}return et}function isType(et,_e){var tt={}.toString.call(et);return tt.indexOf("[object")===0&&tt.indexOf(_e+"]")>-1}function invokeWithArgsOrReturn(et,_e){return typeof et=="function"?et.apply(void 0,_e):et}function debounce$2(et,_e){if(_e===0)return et;var tt;return function(rt){clearTimeout(tt),tt=setTimeout(function(){et(rt)},_e)}}function splitBySpaces(et){return et.split(/\s+/).filter(Boolean)}function normalizeToArray(et){return[].concat(et)}function pushIfUnique(et,_e){et.indexOf(_e)===-1&&et.push(_e)}function unique$1(et){return et.filter(function(_e,tt){return et.indexOf(_e)===tt})}function getBasePlacement(et){return et.split("-")[0]}function arrayFrom$1(et){return[].slice.call(et)}function removeUndefinedProps(et){return Object.keys(et).reduce(function(_e,tt){return et[tt]!==void 0&&(_e[tt]=et[tt]),_e},{})}function div(){return document.createElement("div")}function isElement$2(et){return["Element","Fragment"].some(function(_e){return isType(et,_e)})}function isNodeList(et){return isType(et,"NodeList")}function isMouseEvent(et){return isType(et,"MouseEvent")}function isReferenceElement(et){return!!(et&&et._tippy&&et._tippy.reference===et)}function getArrayOfElements(et){return isElement$2(et)?[et]:isNodeList(et)?arrayFrom$1(et):Array.isArray(et)?et:arrayFrom$1(document.querySelectorAll(et))}function setTransitionDuration(et,_e){et.forEach(function(tt){tt&&(tt.style.transitionDuration=_e+"ms")})}function setVisibilityState(et,_e){et.forEach(function(tt){tt&&tt.setAttribute("data-state",_e)})}function getOwnerDocument(et){var _e,tt=normalizeToArray(et),rt=tt[0];return rt!=null&&(_e=rt.ownerDocument)!=null&&_e.body?rt.ownerDocument:document}function isCursorOutsideInteractiveBorder(et,_e){var tt=_e.clientX,rt=_e.clientY;return et.every(function(nt){var st=nt.popperRect,dt=nt.popperState,ft=nt.props,ht=ft.interactiveBorder,mt=getBasePlacement(dt.placement),bt=dt.modifiersData.offset;if(!bt)return!0;var St=mt==="bottom"?bt.top.y:0,Et=mt==="top"?bt.bottom.y:0,Ct=mt==="right"?bt.left.x:0,Rt=mt==="left"?bt.right.x:0,Tt=st.top-rt+St>ht,wt=rt-st.bottom-Et>ht,At=st.left-tt+Ct>ht,Nt=tt-st.right-Rt>ht;return Tt||wt||At||Nt})}function updateTransitionEndListener(et,_e,tt){var rt=_e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(nt){et[rt](nt,tt)})}function actualContains(et,_e){for(var tt=_e;tt;){var rt;if(et.contains(tt))return!0;tt=tt.getRootNode==null||(rt=tt.getRootNode())==null?void 0:rt.host}return!1}var currentInput={isTouch:!1},lastMouseMoveTime=0;function onDocumentTouchStart(){currentInput.isTouch||(currentInput.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var et=performance.now();et-lastMouseMoveTime<20&&(currentInput.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),lastMouseMoveTime=et}function onWindowBlur(){var et=document.activeElement;if(isReferenceElement(et)){var _e=et._tippy;et.blur&&!_e.state.isVisible&&et.blur()}}function bindGlobalEventListeners(){document.addEventListener("touchstart",onDocumentTouchStart,TOUCH_OPTIONS),window.addEventListener("blur",onWindowBlur)}var isBrowser$1=typeof window<"u"&&typeof document<"u",isIE11=isBrowser$1?!!window.msCrypto:!1,pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function(_e){var tt=Object.keys(_e);tt.forEach(function(rt){defaultProps[rt]=_e[rt]})};function getExtendedPassedProps(et){var _e=et.plugins||[],tt=_e.reduce(function(rt,nt){var st=nt.name,dt=nt.defaultValue;if(st){var ft;rt[st]=et[st]!==void 0?et[st]:(ft=defaultProps[st])!=null?ft:dt}return rt},{});return Object.assign({},et,tt)}function getDataAttributeProps(et,_e){var tt=_e?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins:_e}))):defaultKeys,rt=tt.reduce(function(nt,st){var dt=(et.getAttribute("data-tippy-"+st)||"").trim();if(!dt)return nt;if(st==="content")nt[st]=dt;else try{nt[st]=JSON.parse(dt)}catch{nt[st]=dt}return nt},{});return rt}function evaluateProps(et,_e){var tt=Object.assign({},_e,{content:invokeWithArgsOrReturn(_e.content,[et])},_e.ignoreAttributes?{}:getDataAttributeProps(et,_e.plugins));return tt.aria=Object.assign({},defaultProps.aria,tt.aria),tt.aria={expanded:tt.aria.expanded==="auto"?_e.interactive:tt.aria.expanded,content:tt.aria.content==="auto"?_e.interactive?null:"describedby":tt.aria.content},tt}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(et,_e){et[innerHTML()]=_e}function createArrowElement(et){var _e=div();return et===!0?_e.className=ARROW_CLASS:(_e.className=SVG_ARROW_CLASS,isElement$2(et)?_e.appendChild(et):dangerouslySetInnerHTML(_e,et)),_e}function setContent(et,_e){isElement$2(_e.content)?(dangerouslySetInnerHTML(et,""),et.appendChild(_e.content)):typeof _e.content!="function"&&(_e.allowHTML?dangerouslySetInnerHTML(et,_e.content):et.textContent=_e.content)}function getChildren(et){var _e=et.firstElementChild,tt=arrayFrom$1(_e.children);return{box:_e,content:tt.find(function(rt){return rt.classList.contains(CONTENT_CLASS)}),arrow:tt.find(function(rt){return rt.classList.contains(ARROW_CLASS)||rt.classList.contains(SVG_ARROW_CLASS)}),backdrop:tt.find(function(rt){return rt.classList.contains(BACKDROP_CLASS)})}}function render(et){var _e=div(),tt=div();tt.className=BOX_CLASS,tt.setAttribute("data-state","hidden"),tt.setAttribute("tabindex","-1");var rt=div();rt.className=CONTENT_CLASS,rt.setAttribute("data-state","hidden"),setContent(rt,et.props),_e.appendChild(tt),tt.appendChild(rt),nt(et.props,et.props);function nt(st,dt){var ft=getChildren(_e),ht=ft.box,mt=ft.content,bt=ft.arrow;dt.theme?ht.setAttribute("data-theme",dt.theme):ht.removeAttribute("data-theme"),typeof dt.animation=="string"?ht.setAttribute("data-animation",dt.animation):ht.removeAttribute("data-animation"),dt.inertia?ht.setAttribute("data-inertia",""):ht.removeAttribute("data-inertia"),ht.style.maxWidth=typeof dt.maxWidth=="number"?dt.maxWidth+"px":dt.maxWidth,dt.role?ht.setAttribute("role",dt.role):ht.removeAttribute("role"),(st.content!==dt.content||st.allowHTML!==dt.allowHTML)&&setContent(mt,et.props),dt.arrow?bt?st.arrow!==dt.arrow&&(ht.removeChild(bt),ht.appendChild(createArrowElement(dt.arrow))):ht.appendChild(createArrowElement(dt.arrow)):bt&&ht.removeChild(bt)}return{popper:_e,onUpdate:nt}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(et,_e){var tt=evaluateProps(et,Object.assign({},defaultProps,getExtendedPassedProps(removeUndefinedProps(_e)))),rt,nt,st,dt=!1,ft=!1,ht=!1,mt=!1,bt,St,Et,Ct=[],Rt=debounce$2(ln,tt.interactiveDebounce),Tt,wt=idCounter++,At=null,Nt=unique$1(tt.plugins),Pt={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},It={id:wt,reference:et,popper:div(),popperInstance:At,props:tt,state:Pt,plugins:Nt,clearDelayTimeouts:Rn,setProps:wn,setContent:Un,show:Zn,hide:pn,hideWithInteractivity:Dn,enable:tn,disable:dn,unmount:qn,destroy:_a};if(!tt.render)return It;var Ft=tt.render(It),qt=Ft.popper,Vt=Ft.onUpdate;qt.setAttribute("data-tippy-root",""),qt.id="tippy-"+It.id,It.popper=qt,et._tippy=It,qt._tippy=It;var Kt=Nt.map(function(Vn){return Vn.fn(It)}),jt=et.hasAttribute("aria-expanded");return Sn(),Sr(),pr(),cr("onCreate",[It]),tt.showOnCreate&&Nn(),qt.addEventListener("mouseenter",function(){It.props.interactive&&It.state.isVisible&&It.clearDelayTimeouts()}),qt.addEventListener("mouseleave",function(){It.props.interactive&&It.props.trigger.indexOf("mouseenter")>=0&&tr().addEventListener("mousemove",Rt)}),It;function Ut(){var Vn=It.props.touch;return Array.isArray(Vn)?Vn:[Vn,0]}function Ot(){return Ut()[0]==="hold"}function Wt(){var Vn;return!!((Vn=It.props.render)!=null&&Vn.$$tippy)}function Bt(){return Tt||et}function tr(){var Vn=Bt().parentNode;return Vn?getOwnerDocument(Vn):document}function Jt(){return getChildren(qt)}function ar(Vn){return It.state.isMounted&&!It.state.isVisible||currentInput.isTouch||bt&&bt.type==="focus"?0:getValueAtIndexOrReturn(It.props.delay,Vn?0:1,defaultProps.delay)}function pr(Vn){Vn===void 0&&(Vn=!1),qt.style.pointerEvents=It.props.interactive&&!Vn?"":"none",qt.style.zIndex=""+It.props.zIndex}function cr(Vn,bs,Is){if(Is===void 0&&(Is=!0),Kt.forEach(function(Rs){Rs[Vn]&&Rs[Vn].apply(Rs,bs)}),Is){var uo;(uo=It.props)[Vn].apply(uo,bs)}}function gr(){var Vn=It.props.aria;if(Vn.content){var bs="aria-"+Vn.content,Is=qt.id,uo=normalizeToArray(It.props.triggerTarget||et);uo.forEach(function(Rs){var io=Rs.getAttribute(bs);if(It.state.isVisible)Rs.setAttribute(bs,io?io+" "+Is:Is);else{var vo=io&&io.replace(Is,"").trim();vo?Rs.setAttribute(bs,vo):Rs.removeAttribute(bs)}})}}function Sr(){if(!(jt||!It.props.aria.expanded)){var Vn=normalizeToArray(It.props.triggerTarget||et);Vn.forEach(function(bs){It.props.interactive?bs.setAttribute("aria-expanded",It.state.isVisible&&bs===Bt()?"true":"false"):bs.removeAttribute("aria-expanded")})}}function Er(){tr().removeEventListener("mousemove",Rt),mouseMoveListeners=mouseMoveListeners.filter(function(Vn){return Vn!==Rt})}function Vr(Vn){if(!(currentInput.isTouch&&(ht||Vn.type==="mousedown"))){var bs=Vn.composedPath&&Vn.composedPath()[0]||Vn.target;if(!(It.props.interactive&&actualContains(qt,bs))){if(normalizeToArray(It.props.triggerTarget||et).some(function(Is){return actualContains(Is,bs)})){if(currentInput.isTouch||It.state.isVisible&&It.props.trigger.indexOf("click")>=0)return}else cr("onClickOutside",[It,Vn]);It.props.hideOnClick===!0&&(It.clearDelayTimeouts(),It.hide(),ft=!0,setTimeout(function(){ft=!1}),It.state.isMounted||Yr())}}}function Wr(){ht=!0}function Mr(){ht=!1}function Nr(){var Vn=tr();Vn.addEventListener("mousedown",Vr,!0),Vn.addEventListener("touchend",Vr,TOUCH_OPTIONS),Vn.addEventListener("touchstart",Mr,TOUCH_OPTIONS),Vn.addEventListener("touchmove",Wr,TOUCH_OPTIONS)}function Yr(){var Vn=tr();Vn.removeEventListener("mousedown",Vr,!0),Vn.removeEventListener("touchend",Vr,TOUCH_OPTIONS),Vn.removeEventListener("touchstart",Mr,TOUCH_OPTIONS),Vn.removeEventListener("touchmove",Wr,TOUCH_OPTIONS)}function Or(Vn,bs){Qr(Vn,function(){!It.state.isVisible&&qt.parentNode&&qt.parentNode.contains(qt)&&bs()})}function Ar(Vn,bs){Qr(Vn,bs)}function Qr(Vn,bs){var Is=Jt().box;function uo(Rs){Rs.target===Is&&(updateTransitionEndListener(Is,"remove",uo),bs())}if(Vn===0)return bs();updateTransitionEndListener(Is,"remove",St),updateTransitionEndListener(Is,"add",uo),St=uo}function hn(Vn,bs,Is){Is===void 0&&(Is=!1);var uo=normalizeToArray(It.props.triggerTarget||et);uo.forEach(function(Rs){Rs.addEventListener(Vn,bs,Is),Ct.push({node:Rs,eventType:Vn,handler:bs,options:Is})})}function Sn(){Ot()&&(hn("touchstart",Hn,{passive:!0}),hn("touchend",kn,{passive:!0})),splitBySpaces(It.props.trigger).forEach(function(Vn){if(Vn!=="manual")switch(hn(Vn,Hn),Vn){case"mouseenter":hn("mouseleave",kn);break;case"focus":hn(isIE11?"focusout":"blur",xn);break;case"focusin":hn("focusout",xn);break}})}function Kr(){Ct.forEach(function(Vn){var bs=Vn.node,Is=Vn.eventType,uo=Vn.handler,Rs=Vn.options;bs.removeEventListener(Is,uo,Rs)}),Ct=[]}function Hn(Vn){var bs,Is=!1;if(!(!It.state.isEnabled||An(Vn)||ft)){var uo=((bs=bt)==null?void 0:bs.type)==="focus";bt=Vn,Tt=Vn.currentTarget,Sr(),!It.state.isVisible&&isMouseEvent(Vn)&&mouseMoveListeners.forEach(function(Rs){return Rs(Vn)}),Vn.type==="click"&&(It.props.trigger.indexOf("mouseenter")<0||dt)&&It.props.hideOnClick!==!1&&It.state.isVisible?Is=!0:Nn(Vn),Vn.type==="click"&&(dt=!Is),Is&&!uo&&Gr(Vn)}}function ln(Vn){var bs=Vn.target,Is=Bt().contains(bs)||qt.contains(bs);if(!(Vn.type==="mousemove"&&Is)){var uo=Cn().concat(qt).map(function(Rs){var io,vo=Rs._tippy,Bo=(io=vo.popperInstance)==null?void 0:io.state;return Bo?{popperRect:Rs.getBoundingClientRect(),popperState:Bo,props:tt}:null}).filter(Boolean);isCursorOutsideInteractiveBorder(uo,Vn)&&(Er(),Gr(Vn))}}function kn(Vn){var bs=An(Vn)||It.props.trigger.indexOf("click")>=0&&dt;if(!bs){if(It.props.interactive){It.hideWithInteractivity(Vn);return}Gr(Vn)}}function xn(Vn){It.props.trigger.indexOf("focusin")<0&&Vn.target!==Bt()||It.props.interactive&&Vn.relatedTarget&&qt.contains(Vn.relatedTarget)||Gr(Vn)}function An(Vn){return currentInput.isTouch?Ot()!==Vn.type.indexOf("touch")>=0:!1}function rs(){qs();var Vn=It.props,bs=Vn.popperOptions,Is=Vn.placement,uo=Vn.offset,Rs=Vn.getReferenceClientRect,io=Vn.moveTransition,vo=Wt()?getChildren(qt).arrow:null,Bo=Rs?{getBoundingClientRect:Rs,contextElement:Rs.contextElement||Bt()}:et,En={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ps){var yo=Ps.state;if(Wt()){var rn=Jt(),es=rn.box;["placement","reference-hidden","escaped"].forEach(function(Gs){Gs==="placement"?es.setAttribute("data-placement",yo.placement):yo.attributes.popper["data-popper-"+Gs]?es.setAttribute("data-"+Gs,""):es.removeAttribute("data-"+Gs)}),yo.attributes.popper={}}}},In=[{name:"offset",options:{offset:uo}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!io}},En];Wt()&&vo&&In.push({name:"arrow",options:{element:vo,padding:3}}),In.push.apply(In,bs?.modifiers||[]),It.popperInstance=createPopper(Bo,qt,Object.assign({},bs,{placement:Is,onFirstUpdate:Et,modifiers:In}))}function qs(){It.popperInstance&&(It.popperInstance.destroy(),It.popperInstance=null)}function Ln(){var Vn=It.props.appendTo,bs,Is=Bt();It.props.interactive&&Vn===TIPPY_DEFAULT_APPEND_TO||Vn==="parent"?bs=Is.parentNode:bs=invokeWithArgsOrReturn(Vn,[Is]),bs.contains(qt)||bs.appendChild(qt),It.state.isMounted=!0,rs()}function Cn(){return arrayFrom$1(qt.querySelectorAll("[data-tippy-root]"))}function Nn(Vn){It.clearDelayTimeouts(),Vn&&cr("onTrigger",[It,Vn]),Nr();var bs=ar(!0),Is=Ut(),uo=Is[0],Rs=Is[1];currentInput.isTouch&&uo==="hold"&&Rs&&(bs=Rs),bs?rt=setTimeout(function(){It.show()},bs):It.show()}function Gr(Vn){if(It.clearDelayTimeouts(),cr("onUntrigger",[It,Vn]),!It.state.isVisible){Yr();return}if(!(It.props.trigger.indexOf("mouseenter")>=0&&It.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Vn.type)>=0&&dt)){var bs=ar(!1);bs?nt=setTimeout(function(){It.state.isVisible&&It.hide()},bs):st=requestAnimationFrame(function(){It.hide()})}}function tn(){It.state.isEnabled=!0}function dn(){It.hide(),It.state.isEnabled=!1}function Rn(){clearTimeout(rt),clearTimeout(nt),cancelAnimationFrame(st)}function wn(Vn){if(!It.state.isDestroyed){cr("onBeforeUpdate",[It,Vn]),Kr();var bs=It.props,Is=evaluateProps(et,Object.assign({},bs,removeUndefinedProps(Vn),{ignoreAttributes:!0}));It.props=Is,Sn(),bs.interactiveDebounce!==Is.interactiveDebounce&&(Er(),Rt=debounce$2(ln,Is.interactiveDebounce)),bs.triggerTarget&&!Is.triggerTarget?normalizeToArray(bs.triggerTarget).forEach(function(uo){uo.removeAttribute("aria-expanded")}):Is.triggerTarget&&et.removeAttribute("aria-expanded"),Sr(),pr(),Vt&&Vt(bs,Is),It.popperInstance&&(rs(),Cn().forEach(function(uo){requestAnimationFrame(uo._tippy.popperInstance.forceUpdate)})),cr("onAfterUpdate",[It,Vn])}}function Un(Vn){It.setProps({content:Vn})}function Zn(){var Vn=It.state.isVisible,bs=It.state.isDestroyed,Is=!It.state.isEnabled,uo=currentInput.isTouch&&!It.props.touch,Rs=getValueAtIndexOrReturn(It.props.duration,0,defaultProps.duration);if(!(Vn||bs||Is||uo)&&!Bt().hasAttribute("disabled")&&(cr("onShow",[It],!1),It.props.onShow(It)!==!1)){if(It.state.isVisible=!0,Wt()&&(qt.style.visibility="visible"),pr(),Nr(),It.state.isMounted||(qt.style.transition="none"),Wt()){var io=Jt(),vo=io.box,Bo=io.content;setTransitionDuration([vo,Bo],0)}Et=function(){var In;if(!(!It.state.isVisible||mt)){if(mt=!0,qt.offsetHeight,qt.style.transition=It.props.moveTransition,Wt()&&It.props.animation){var ds=Jt(),Ps=ds.box,yo=ds.content;setTransitionDuration([Ps,yo],Rs),setVisibilityState([Ps,yo],"visible")}gr(),Sr(),pushIfUnique(mountedInstances,It),(In=It.popperInstance)==null||In.forceUpdate(),cr("onMount",[It]),It.props.animation&&Wt()&&Ar(Rs,function(){It.state.isShown=!0,cr("onShown",[It])})}},Ln()}}function pn(){var Vn=!It.state.isVisible,bs=It.state.isDestroyed,Is=!It.state.isEnabled,uo=getValueAtIndexOrReturn(It.props.duration,1,defaultProps.duration);if(!(Vn||bs||Is)&&(cr("onHide",[It],!1),It.props.onHide(It)!==!1)){if(It.state.isVisible=!1,It.state.isShown=!1,mt=!1,dt=!1,Wt()&&(qt.style.visibility="hidden"),Er(),Yr(),pr(!0),Wt()){var Rs=Jt(),io=Rs.box,vo=Rs.content;It.props.animation&&(setTransitionDuration([io,vo],uo),setVisibilityState([io,vo],"hidden"))}gr(),Sr(),It.props.animation?Wt()&&Or(uo,It.unmount):It.unmount()}}function Dn(Vn){tr().addEventListener("mousemove",Rt),pushIfUnique(mouseMoveListeners,Rt),Rt(Vn)}function qn(){It.state.isVisible&&It.hide(),It.state.isMounted&&(qs(),Cn().forEach(function(Vn){Vn._tippy.unmount()}),qt.parentNode&&qt.parentNode.removeChild(qt),mountedInstances=mountedInstances.filter(function(Vn){return Vn!==It}),It.state.isMounted=!1,cr("onHidden",[It]))}function _a(){It.state.isDestroyed||(It.clearDelayTimeouts(),It.unmount(),Kr(),delete et._tippy,It.state.isDestroyed=!0,cr("onDestroy",[It]))}}function tippy$1(et,_e){_e===void 0&&(_e={});var tt=defaultProps.plugins.concat(_e.plugins||[]);bindGlobalEventListeners();var rt=Object.assign({},_e,{plugins:tt}),nt=getArrayOfElements(et),st=nt.reduce(function(dt,ft){var ht=ft&&createTippy(ft,rt);return ht&&dt.push(ht),dt},[]);return isElement$2(et)?st[0]:st}tippy$1.defaultProps=defaultProps;tippy$1.setDefaultProps=setDefaultProps;tippy$1.currentInput=currentInput;Object.assign({},applyStyles$1,{effect:function(_e){var tt=_e.state,rt={popper:{position:tt.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(tt.elements.popper.style,rt.popper),tt.styles=rt,tt.elements.arrow&&Object.assign(tt.elements.arrow.style,rt.arrow)}});tippy$1.setDefaultProps({render});var __defProp$2=Object.defineProperty,__defProps$1=Object.defineProperties,__getOwnPropDescs$1=Object.getOwnPropertyDescriptors,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$2=(et,_e,tt)=>_e in et?__defProp$2(et,_e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):et[_e]=tt,__spreadValues$1=(et,_e)=>{for(var tt in _e||(_e={}))__hasOwnProp$1.call(_e,tt)&&__defNormalProp$2(et,tt,_e[tt]);if(__getOwnPropSymbols$1)for(var tt of __getOwnPropSymbols$1(_e))__propIsEnum$1.call(_e,tt)&&__defNormalProp$2(et,tt,_e[tt]);return et},__spreadProps$1=(et,_e)=>__defProps$1(et,__getOwnPropDescs$1(_e)),__publicField$2=(et,_e,tt)=>(__defNormalProp$2(et,_e+"",tt),tt);function injectStyle$1(et){if(typeof document<"u"){var _e=document.createElement("style"),tt=document.createTextNode(et);_e.appendChild(tt),document.head.appendChild(_e)}}var style_default$1='.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.fastboard-icon.light .fastboard-icon-stroke-color{stroke:var(--fastboard-color, #5d6066)}.fastboard-icon.light .fastboard-icon-fill-color{fill:var(--fastboard-color, #5d6066)}.fastboard-icon.light.is-active .fastboard-icon-stroke-color{stroke:var(--fastboard-active-color, #3381ff)}.fastboard-icon.light.is-active .fastboard-icon-fill-color{fill:var(--fastboard-active-color, #3381ff)}.fastboard-icon.dark .fastboard-icon-stroke-color{stroke:var(--fastboard-color, #7b7e84)}.fastboard-icon.dark .fastboard-icon-fill-color{fill:var(--fastboard-color, #7b7e84)}.fastboard-icon.dark.is-active .fastboard-icon-stroke-color{stroke:var(--fastboard-active-color, #2867cc)}.fastboard-icon.dark.is-active .fastboard-icon-fill-color{fill:var(--fastboard-active-color, #2867cc)}.fastboard-redo-undo{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid;border-radius:4px;font-size:14px;font-family:system-ui;pointer-events:auto;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.fastboard-redo-undo *{box-sizing:inherit}.fastboard-redo-undo.light{color:var(--fastboard-color, #5d6066);background-color:var(--fastboard-bg-color, rgba(255, 255, 255, .9));border-color:var(--fastboard-border-color, #e5e8f0)}.fastboard-redo-undo.dark{color:var(--fastboard-color, #7b7e84);background-color:var(--fastboard-bg-color, rgba(20, 24, 30, .9));border-color:var(--fastboard-border-color, #383b42)}.fastboard-redo-undo-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:#0000;border-radius:4px;font-size:0;line-height:1;flex-shrink:0}.fastboard-redo-undo-btn svg,.fastboard-redo-undo-btn img{width:100%;height:100%;pointer-events:none}.fastboard-redo-undo-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-redo-undo-btn.light:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-redo-undo-btn.dark:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-zoom-control{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid;border-radius:4px;font-size:14px;font-family:system-ui;pointer-events:auto;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.fastboard-zoom-control *{box-sizing:inherit}.fastboard-zoom-control.light{color:var(--fastboard-color, #5d6066);background-color:var(--fastboard-bg-color, rgba(255, 255, 255, .9));border-color:var(--fastboard-border-color, #e5e8f0)}.fastboard-zoom-control.dark{color:var(--fastboard-color, #7b7e84);background-color:var(--fastboard-bg-color, rgba(20, 24, 30, .9));border-color:var(--fastboard-border-color, #383b42)}.fastboard-zoom-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:#0000;border-radius:4px;font-size:0;line-height:1;flex-shrink:0}.fastboard-zoom-control-btn svg,.fastboard-zoom-control-btn img{width:100%;height:100%;pointer-events:none}.fastboard-zoom-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-zoom-control-btn.light:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-zoom-control-btn.dark:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-zoom-control-text{font-variant-numeric:tabular-nums}.fastboard-page-control{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid;border-radius:4px;font-size:14px;font-family:system-ui;pointer-events:auto;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.fastboard-page-control *{box-sizing:inherit}.fastboard-page-control.light{color:var(--fastboard-color, #5d6066);background-color:var(--fastboard-bg-color, rgba(255, 255, 255, .9));border-color:var(--fastboard-border-color, #e5e8f0)}.fastboard-page-control.dark{color:var(--fastboard-color, #7b7e84);background-color:var(--fastboard-bg-color, rgba(20, 24, 30, .9));border-color:var(--fastboard-border-color, #383b42)}.fastboard-page-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:#0000;border-radius:4px;font-size:0;line-height:1;flex-shrink:0}.fastboard-page-control-btn svg,.fastboard-page-control-btn img{width:100%;height:100%;pointer-events:none}.fastboard-page-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-page-control-btn.light:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-page-control-btn.dark:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-page-control-text{font-variant-numeric:tabular-nums}.fastboard-player-control{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid;border-radius:4px;font-size:14px;font-family:system-ui;pointer-events:auto;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);width:100%}.fastboard-player-control *{box-sizing:inherit}.fastboard-player-control.light{color:var(--fastboard-color, #5d6066);background-color:var(--fastboard-bg-color, rgba(255, 255, 255, .9));border-color:var(--fastboard-border-color, #e5e8f0)}.fastboard-player-control.dark{color:var(--fastboard-color, #7b7e84);background-color:var(--fastboard-bg-color, rgba(20, 24, 30, .9));border-color:var(--fastboard-border-color, #383b42)}.fastboard-player-control-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:0;width:24px;height:24px;background-color:#0000;border-radius:4px;font-size:0;line-height:1;flex-shrink:0;display:inline}.fastboard-player-control-btn svg,.fastboard-player-control-btn img{width:100%;height:100%;pointer-events:none}.fastboard-player-control-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-player-control-btn.light:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-player-control-btn.dark:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-player-control-btn.loading svg,.fastboard-player-control-btn.loading img{animation:fastboard-player-control-rotate .5s linear infinite}@keyframes fastboard-player-control-rotate{to{transform:rotate(360deg)}}.fastboard-player-control-btn.speed{width:auto;padding:4px;text-align:right;font-size:14px;font-variant-numeric:tabular-nums}.fastboard-player-control-btn.is-active.light{color:var(--fastboard-active-color, #3381ff)}.fastboard-player-control-btn.is-active.dark{color:var(--fastboard-active-color, #2867cc)}.fastboard-player-control-speed-text,.fastboard-player-control-progress{font-size:14px;font-variant-numeric:tabular-nums;line-height:16px}.fastboard-player-control-progress{display:inline-flex;align-items:center}.fastboard-player-control-panel.speed{display:flex;flex-direction:column}.fastboard-toolbar{height:100%;display:flex;align-items:center;position:relative;transform:translate(0);transition:transform .5s cubic-bezier(.34,1.56,.64,1);pointer-events:none}.fastboard-toolbar.collapsed{transform:translate(-100%)}.fastboard-toolbar-handler{position:absolute;left:100%;width:17px;font-size:0;border-radius:3px;cursor:pointer;pointer-events:auto}.fastboard-toolbar-handler:focus-visible{outline:2px solid -webkit-focus-ring-color}.fastboard-toolbar-handler input[type=checkbox]{position:absolute;top:0;left:0;appearance:none;margin:0;width:100%;height:100%;cursor:pointer;opacity:0;z-index:-1}.fastboard-toolbar-handler svg{opacity:0;transition:opacity .5s 1s;pointer-events:none}.fastboard-toolbar-handler.light .fastboard-toolbar-handler-bg-color{fill:var(--fastboard-bg-color, rgba(255, 255, 255, .9))}.fastboard-toolbar-handler.light .fastboard-toolbar-handler-border-color{stroke:var(--fastboard-border-color, #e5e8f0)}.fastboard-toolbar-handler.light .fastboard-toolbar-handler-image-stroke-color{stroke:var(--fastboard-color, #5d6066)}.fastboard-toolbar-handler.light .fastboard-toolbar-handler-image-fill-color{fill:var(--fastboard-color, #5d6066)}.fastboard-toolbar-handler.dark .fastboard-toolbar-handler-bg-color{fill:var(--fastboard-bg-color, rgba(20, 24, 30, .9))}.fastboard-toolbar-handler.dark .fastboard-toolbar-handler-border-color{stroke:var(--fastboard-border-color, #383b42)}.fastboard-toolbar-handler.dark .fastboard-toolbar-handler-image-stroke-color{stroke:var(--fastboard-color, #7b7e84)}.fastboard-toolbar-handler.dark .fastboard-toolbar-handler-image-fill-color{fill:var(--fastboard-color, #7b7e84)}.fastboard-toolbar:hover .fastboard-toolbar-handler svg,.fastboard-toolbar.collapsed .fastboard-toolbar-handler svg{opacity:1;transition:opacity .2s}.fastboard-toolbar-btn{appearance:none;cursor:pointer;margin:0;border:0;padding:4px;width:32px;height:32px;background-color:#0000;border-radius:4px;font-size:0;line-height:1;flex-shrink:0}.fastboard-toolbar-btn svg,.fastboard-toolbar-btn img{width:100%;height:100%;pointer-events:none}.fastboard-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}.fastboard-toolbar-btn.light:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-toolbar-btn.dark:not(:disabled):hover{background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-slider{box-sizing:border-box;position:relative;width:100%;height:100%;display:flex;align-items:center}.fastboard-slider *{box-sizing:inherit}.fastboard-slider-track{appearance:none;background:rgba(0,0,0,0);border:0;border-radius:26px;flex:1;display:block;height:19px;margin:0;width:0;min-width:0;padding:0;transition:box-shadow .3s ease;cursor:pointer;touch-action:manipulation}.fastboard-slider-track::-webkit-slider-runnable-track{border:0;border-radius:2.5px;height:5px;transition:box-shadow .3s ease;user-select:none;background-color:#80808040;-webkit-user-select:none;background-image:linear-gradient(to right,currentColor var(--value, 0%),transparent var(--value, 0%))}.fastboard-slider-track::-webkit-slider-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px #23292f26,0 0 0 1px #23292f33;width:13px;height:13px;position:relative;transition:all .2s ease;cursor:grab;appearance:none;margin-top:-4px}.fastboard-slider-track::-moz-range-track{border:0;border-radius:2.5px;height:5px;transition:box-shadow .3s ease;user-select:none;background-color:#80808040;-webkit-user-select:none}.fastboard-slider-track::-moz-range-thumb{appearance:none;background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px #23292f26,0 0 0 1px #23292f33;width:13px;height:13px;position:relative;transition:all .2s ease;cursor:grab}.fastboard-slider-track::-moz-range-progress{background:currentColor;border-radius:2.5px;height:5px}.fastboard-slider-track::-ms-track{border:0;border-radius:2.5px;height:5px;transition:box-shadow .3s ease;user-select:none;background-color:#80808040;-webkit-user-select:none;color:#0000}.fastboard-slider-track::-ms-thumb{appearance:none;background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px #23292f26,0 0 0 1px #23292f33;width:13px;height:13px;position:relative;transition:all .2s ease;cursor:grab;margin-top:0}.fastboard-slider-track::-ms-tooltip{display:none}.fastboard-slider-track::-moz-focus-outer{border:0}.fastboard-slider-track.grabbing::-webkit-slider-thumb{cursor:grabbing}.fastboard-slider-track.light{color:var(--fastboard-active-color, #3381ff)}.fastboard-slider-track.dark{color:var(--fastboard-active-color, #2867cc)}.fastboard-toolbar-contents{box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;border:1px solid;border-radius:4px;font-size:14px;font-family:system-ui;pointer-events:auto;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);padding:2px 0;gap:0;flex-direction:column}.fastboard-toolbar-contents *{box-sizing:inherit}.fastboard-toolbar-contents.light{color:var(--fastboard-color, #5d6066);background-color:var(--fastboard-bg-color, rgba(255, 255, 255, .9));border-color:var(--fastboard-border-color, #e5e8f0)}.fastboard-toolbar-contents.dark{color:var(--fastboard-color, #7b7e84);background-color:var(--fastboard-bg-color, rgba(20, 24, 30, .9));border-color:var(--fastboard-border-color, #383b42)}.fastboard-toolbar-contents>.fastboard-toolbar-btn{margin:2px 4px}.fastboard-toolbar-btn-interactive{position:relative}.fastboard-toolbar-triangle{width:0px;height:0px;border-bottom:4px solid;border-left:4px solid rgba(0,0,0,0);position:absolute;bottom:0;right:0}.fastboard-toolbar-btn:focus+.fastboard-toolbar-triangle{opacity:0}.fastboard-toolbar-scrollable{padding:2px 4px;overflow:hidden;display:flex;flex-direction:column;gap:4px}.fastboard-toolbar-tooltip{display:inline-flex;align-items:center;gap:4px}.fastboard-toolbar-hotkey{display:inline-flex;margin-right:-4px;width:24px;height:24px;align-items:center;justify-content:center;background-color:#ffffff1a;border-radius:4px}.fastboard-toolbar-panel-wrapper{display:none}.fastboard-toolbar-panel-switch-pencil{display:flex}.fastboard-toolbar-panel-switch-btn{width:24px;height:24px}.fastboard-toolbar-panel{display:flex;flex-direction:column}.fastboard-toolbar-panel-divider{height:.5px;width:100%;margin:4px 0;background-color:#ffffff26}.fastboard-toolbar-colors,.fastboard-toolbar-shapes{display:grid;align-self:center;grid-template:repeat(2,1fr)/repeat(4,1fr);align-items:center;justify-items:center;gap:4px}.fastboard-toolbar-shape-btn,.fastboard-toolbar-color-btn{width:24px;height:24px;padding:0;display:inline-flex;align-items:center;justify-content:center}.fastboard-toolbar-color-btn{border:1px solid rgba(0,0,0,0)}.fastboard-toolbar-color-btn.light.is-active{border-color:var(--fastboard-active-color, #3381ff)}.fastboard-toolbar-color-btn.dark.is-active{border-color:var(--fastboard-active-color, #2867cc)}.fastboard-toolbar-color-item{display:inline-block;width:16px;height:16px;border-radius:4px;pointer-events:none}.fastboard-toolbar-panel.apps{display:grid;grid-template-columns:repeat(min(var(--n, 3),3),minmax(max-content,1fr));gap:4px}.fastboard-toolbar-app-btn{margin:0;border:0;border-radius:2px;padding:4px 6px;background-color:#0000;display:inline-flex;flex-direction:column;align-items:center;gap:4px;font-size:0}.fastboard-toolbar-app-btn:disabled{opacity:.8}.fastboard-toolbar-app-btn-icon{width:32px;height:32px;pointer-events:none}.fastboard-toolbar-app-btn-text{font-size:14px;line-height:1;max-width:100%;overflow:hidden;text-overflow:ellipsis}.fastboard-toolbar-app-btn.is-loading{cursor:progress}.fastboard-toolbar-app-btn.is-failed{cursor:not-allowed;opacity:.5}.fastboard-toolbar-app-btn:not(:disabled,.is-loading,.is-failed):hover.light{cursor:pointer;background-color:var(--fastboard-hover-bg-color, #ebf2ff)}.fastboard-toolbar-app-btn-text.light{color:var(--fastboard-color, #5d6066)}.fastboard-toolbar-app-btn:not(:disabled,.is-loading,.is-failed):hover.dark{cursor:pointer;background-color:var(--fastboard-hover-bg-color, #383b42)}.fastboard-toolbar-app-btn-text.dark{color:var(--fastboard-color, #7b7e84)}.fastboard-right .fastboard-toolbar-triangle{right:auto;left:0;border-left:0;border-right:4px solid rgba(0,0,0,0)}.fastboard-right .fastboard-toolbar.collapsed{transform:translate(100%)}.fastboard-right .fastboard-toolbar-handler{left:auto;right:100%;transform:rotate(180deg)}.fastboard-root{position:relative;width:100%;height:100%;overflow:hidden}.fastboard-view{position:absolute;top:0;left:0;width:100%;height:100%}.fastboard-left,.fastboard-right{display:flex;align-items:center;position:absolute;bottom:62px;top:8px;left:0;z-index:200;pointer-events:none}.fastboard-left .fastboard-toolbar,.fastboard-right .fastboard-toolbar{padding-left:16px}.fastboard-right{left:auto;right:0}.fastboard-right .fastboard-toolbar{padding-left:0;padding-right:16px}.fastboard-bottom-left,.fastboard-bottom,.fastboard-bottom-right{display:flex;gap:10px;position:absolute;bottom:8px;left:8px;padding:8px;z-index:200;pointer-events:none}.fastboard-bottom-right{left:auto;right:8px}.fastboard-bottom{right:8px}.fastboard-left.hidden *,.hidden.fastboard-right *,.fastboard-bottom.hidden *,.fastboard-bottom-left.hidden *,.fastboard-bottom-right.hidden *{opacity:0;pointer-events:none}.fastboard-tip{font-family:inherit;color:#d5d9e0;background-color:#03060d}.fastboard-tip[data-placement^=right]>.tippy-arrow:before{top:4px;border-width:4px;border-right-color:#03060d}.fastboard-tip[data-placement^=top]>.tippy-arrow:before{left:4px;border-width:4px;border-top-color:#03060d}.fastboard-panel .tippy-content{padding:8px}.netless-whiteboard:focus-visible{outline:none}';injectStyle$1(style_default$1);function noop$8(){}function assign$2(et,_e){for(const tt in _e)et[tt]=_e[tt];return et}function run$2(et){return et()}function blank_object$1(){return Object.create(null)}function run_all$1(et){et.forEach(run$2)}function is_function$1(et){return typeof et=="function"}function safe_not_equal$2(et,_e){return et!=et?_e==_e:et!==_e||et&&typeof et=="object"||typeof et=="function"}var src_url_equal_anchor$1;function src_url_equal$1(et,_e){return src_url_equal_anchor$1||(src_url_equal_anchor$1=document.createElement("a")),src_url_equal_anchor$1.href=_e,et===src_url_equal_anchor$1.href}function not_equal(et,_e){return et!=et?_e==_e:et!==_e}function is_empty$1(et){return Object.keys(et).length===0}function subscribe$1(et,..._e){if(et==null)return noop$8;const tt=et.subscribe(..._e);return tt.unsubscribe?()=>tt.unsubscribe():tt}function component_subscribe(et,_e,tt){et.$$.on_destroy.push(subscribe$1(_e,tt))}function create_slot(et,_e,tt,rt){if(et){const nt=get_slot_context(et,_e,tt,rt);return et[0](nt)}}function get_slot_context(et,_e,tt,rt){return et[1]&&rt?assign$2(tt.ctx.slice(),et[1](rt(_e))):tt.ctx}function get_slot_changes(et,_e,tt,rt){return et[2],_e.dirty}function update_slot_base(et,_e,tt,rt,nt,st){if(nt){const dt=get_slot_context(_e,tt,rt,st);et.p(dt,nt)}}function get_all_dirty_from_scope(et){if(et.ctx.length>32){const _e=[],tt=et.ctx.length/32;for(let rt=0;rt<tt;rt++)_e[rt]=-1;return _e}return-1}function set_store_value(et,_e,tt){return et.set(tt),_e}function action_destroyer(et){return et&&is_function$1(et.destroy)?et.destroy:noop$8}function append$1(et,_e){et.appendChild(_e)}function insert$1(et,_e,tt){et.insertBefore(_e,tt||null)}function detach$1(et){et.parentNode&&et.parentNode.removeChild(et)}function destroy_each(et,_e){for(let tt=0;tt<et.length;tt+=1)et[tt]&&et[tt].d(_e)}function element$1(et){return document.createElement(et)}function svg_element(et){return document.createElementNS("http://www.w3.org/2000/svg",et)}function text$2(et){return document.createTextNode(et)}function space$1(){return text$2(" ")}function empty(){return text$2("")}function listen$1(et,_e,tt,rt){return et.addEventListener(_e,tt,rt),()=>et.removeEventListener(_e,tt,rt)}function attr$1(et,_e,tt){tt==null?et.removeAttribute(_e):et.getAttribute(_e)!==tt&&et.setAttribute(_e,tt)}function to_number(et){return et===""?null:+et}function children$1(et){return Array.from(et.childNodes)}function set_data$1(et,_e){_e=""+_e,et.data!==_e&&(et.data=_e)}function set_input_value(et,_e){et.value=_e??""}function set_style$1(et,_e,tt,rt){tt==null?et.style.removeProperty(_e):et.style.setProperty(_e,tt,"")}function toggle_class(et,_e,tt){et.classList[tt?"add":"remove"](_e)}function custom_event(et,_e,{bubbles:tt=!1,cancelable:rt=!1}={}){const nt=document.createEvent("CustomEvent");return nt.initCustomEvent(et,tt,rt,_e),nt}function construct_svelte_component(et,_e){return new et(_e)}var current_component$1;function set_current_component$1(et){current_component$1=et}function get_current_component(){if(!current_component$1)throw new Error("Function called outside component initialization");return current_component$1}function onMount(et){get_current_component().$$.on_mount.push(et)}function createEventDispatcher(){const et=get_current_component();return(_e,tt,{cancelable:rt=!1}={})=>{const nt=et.$$.callbacks[_e];if(nt){const st=custom_event(_e,tt,{cancelable:rt});return nt.slice().forEach(dt=>{dt.call(et,st)}),!st.defaultPrevented}return!0}}function bubble(et,_e){const tt=et.$$.callbacks[_e.type];tt&&tt.slice().forEach(rt=>rt.call(this,_e))}var dirty_components$1=[],binding_callbacks$1=[],render_callbacks$1=[],flush_callbacks$1=[],resolved_promise$1=Promise.resolve(),update_scheduled$1=!1;function schedule_update$1(){update_scheduled$1||(update_scheduled$1=!0,resolved_promise$1.then(flush$2))}function add_render_callback$1(et){render_callbacks$1.push(et)}var seen_callbacks$1=new Set,flushidx$1=0;function flush$2(){if(flushidx$1!==0)return;const et=current_component$1;do{try{for(;flushidx$1<dirty_components$1.length;){const _e=dirty_components$1[flushidx$1];flushidx$1++,set_current_component$1(_e),update$1(_e.$$)}}catch(_e){throw dirty_components$1.length=0,flushidx$1=0,_e}for(set_current_component$1(null),dirty_components$1.length=0,flushidx$1=0;binding_callbacks$1.length;)binding_callbacks$1.pop()();for(let _e=0;_e<render_callbacks$1.length;_e+=1){const tt=render_callbacks$1[_e];seen_callbacks$1.has(tt)||(seen_callbacks$1.add(tt),tt())}render_callbacks$1.length=0}while(dirty_components$1.length);for(;flush_callbacks$1.length;)flush_callbacks$1.pop()();update_scheduled$1=!1,seen_callbacks$1.clear(),set_current_component$1(et)}function update$1(et){if(et.fragment!==null){et.update(),run_all$1(et.before_update);const _e=et.dirty;et.dirty=[-1],et.fragment&&et.fragment.p(et.ctx,_e),et.after_update.forEach(add_render_callback$1)}}function flush_render_callbacks$1(et){const _e=[],tt=[];render_callbacks$1.forEach(rt=>et.indexOf(rt)===-1?_e.push(rt):tt.push(rt)),tt.forEach(rt=>rt()),render_callbacks$1=_e}var outroing$1=new Set,outros;function group_outros(){outros={r:0,c:[],p:outros}}function check_outros(){outros.r||run_all$1(outros.c),outros=outros.p}function transition_in$1(et,_e){et&&et.i&&(outroing$1.delete(et),et.i(_e))}function transition_out(et,_e,tt,rt){if(et&&et.o){if(outroing$1.has(et))return;outroing$1.add(et),outros.c.push(()=>{outroing$1.delete(et),rt&&(tt&&et.d(1),rt())}),et.o(_e)}else rt&&rt()}function outro_and_destroy_block(et,_e){transition_out(et,1,1,()=>{_e.delete(et.key)})}function update_keyed_each(et,_e,tt,rt,nt,st,dt,ft,ht,mt,bt,St){let Et=et.length,Ct=st.length,Rt=Et;const Tt={};for(;Rt--;)Tt[et[Rt].key]=Rt;const wt=[],At=new Map,Nt=new Map,Pt=[];for(Rt=Ct;Rt--;){const Vt=St(nt,st,Rt),Kt=tt(Vt);let jt=dt.get(Kt);jt?Pt.push(()=>jt.p(Vt,_e)):(jt=mt(Kt,Vt),jt.c()),At.set(Kt,wt[Rt]=jt),Kt in Tt&&Nt.set(Kt,Math.abs(Rt-Tt[Kt]))}const It=new Set,Ft=new Set;function qt(Vt){transition_in$1(Vt,1),Vt.m(ft,bt),dt.set(Vt.key,Vt),bt=Vt.first,Ct--}for(;Et&&Ct;){const Vt=wt[Ct-1],Kt=et[Et-1],jt=Vt.key,Ut=Kt.key;Vt===Kt?(bt=Vt.first,Et--,Ct--):At.has(Ut)?!dt.has(jt)||It.has(jt)?qt(Vt):Ft.has(Ut)?Et--:Nt.get(jt)>Nt.get(Ut)?(Ft.add(jt),qt(Vt)):(It.add(Ut),Et--):(ht(Kt,dt),Et--)}for(;Et--;){const Vt=et[Et];At.has(Vt.key)||ht(Vt,dt)}for(;Ct;)qt(wt[Ct-1]);return run_all$1(Pt),wt}function get_spread_update(et,_e){const tt={},rt={},nt={$$scope:1};let st=et.length;for(;st--;){const dt=et[st],ft=_e[st];if(ft){for(const ht in dt)ht in ft||(rt[ht]=1);for(const ht in ft)nt[ht]||(tt[ht]=ft[ht],nt[ht]=1);et[st]=ft}else for(const ht in dt)nt[ht]=1}for(const dt in rt)dt in tt||(tt[dt]=void 0);return tt}function get_spread_object(et){return typeof et=="object"&&et!==null?et:{}}function create_component(et){et&&et.c()}function mount_component$1(et,_e,tt,rt){const{fragment:nt,after_update:st}=et.$$;nt&&nt.m(_e,tt),rt||add_render_callback$1(()=>{const dt=et.$$.on_mount.map(run$2).filter(is_function$1);et.$$.on_destroy?et.$$.on_destroy.push(...dt):run_all$1(dt),et.$$.on_mount=[]}),st.forEach(add_render_callback$1)}function destroy_component$1(et,_e){const tt=et.$$;tt.fragment!==null&&(flush_render_callbacks$1(tt.after_update),run_all$1(tt.on_destroy),tt.fragment&&tt.fragment.d(_e),tt.on_destroy=tt.fragment=null,tt.ctx=[])}function make_dirty$1(et,_e){et.$$.dirty[0]===-1&&(dirty_components$1.push(et),schedule_update$1(),et.$$.dirty.fill(0)),et.$$.dirty[_e/31|0]|=1<<_e%31}function init$2(et,_e,tt,rt,nt,st,dt,ft=[-1]){const ht=current_component$1;set_current_component$1(et);const mt=et.$$={fragment:null,ctx:[],props:st,update:noop$8,not_equal:nt,bound:blank_object$1(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(_e.context||(ht?ht.$$.context:[])),callbacks:blank_object$1(),dirty:ft,skip_bound:!1,root:_e.target||ht.$$.root};dt&&dt(mt.root);let bt=!1;if(mt.ctx=tt?tt(et,_e.props||{},(St,Et,...Ct)=>{const Rt=Ct.length?Ct[0]:Et;return mt.ctx&&nt(mt.ctx[St],mt.ctx[St]=Rt)&&(!mt.skip_bound&&mt.bound[St]&&mt.bound[St](Rt),bt&&make_dirty$1(et,St)),Et}):[],mt.update(),bt=!0,run_all$1(mt.before_update),mt.fragment=rt?rt(mt.ctx):!1,_e.target){if(_e.hydrate){const St=children$1(_e.target);mt.fragment&&mt.fragment.l(St),St.forEach(detach$1)}else mt.fragment&&mt.fragment.c();_e.intro&&transition_in$1(et.$$.fragment),mount_component$1(et,_e.target,_e.anchor,_e.customElement),flush$2()}set_current_component$1(ht)}var SvelteComponent$1=class{$destroy(){destroy_component$1(this,1),this.$destroy=noop$8}$on(_e,tt){if(!is_function$1(tt))return noop$8;const rt=this.$$.callbacks[_e]||(this.$$.callbacks[_e]=[]);return rt.push(tt),()=>{const nt=rt.indexOf(tt);nt!==-1&&rt.splice(nt,1)}}$set(_e){this.$$set&&!is_empty$1(_e)&&(this.$$.skip_bound=!0,this.$$set(_e),this.$$.skip_bound=!1)}};function create_else_block(et){let _e;const tt=et[4].default,rt=create_slot(tt,et,et[3],null);return{c(){rt&&rt.c()},m(nt,st){rt&&rt.m(nt,st),_e=!0},p(nt,st){rt&&rt.p&&(!_e||st&8)&&update_slot_base(rt,tt,nt,nt[3],_e?get_slot_changes(tt,nt[3],st,null):get_all_dirty_from_scope(nt[3]),null)},i(nt){_e||(transition_in$1(rt,nt),_e=!0)},o(nt){transition_out(rt,nt),_e=!1},d(nt){rt&&rt.d(nt)}}}function create_if_block$1(et){let _e,tt,rt;return{c(){_e=element$1("img"),src_url_equal$1(_e.src,tt=et[0])||attr$1(_e,"src",tt),attr$1(_e,"alt",et[1]),attr$1(_e,"title",rt=et[2]||et[1])},m(nt,st){insert$1(nt,_e,st)},p(nt,st){st&1&&!src_url_equal$1(_e.src,tt=nt[0])&&attr$1(_e,"src",tt),st&2&&attr$1(_e,"alt",nt[1]),st&6&&rt!==(rt=nt[2]||nt[1])&&attr$1(_e,"title",rt)},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function create_fragment$1(et){let _e,tt,rt,nt;const st=[create_if_block$1,create_else_block],dt=[];function ft(ht,mt){return ht[0]?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,[mt]){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function instance$1(et,_e,tt){let{$$slots:rt={},$$scope:nt}=_e,{src:st=""}=_e,{alt:dt=""}=_e,{title:ft=""}=_e;return et.$$set=ht=>{"src"in ht&&tt(0,st=ht.src),"alt"in ht&&tt(1,dt=ht.alt),"title"in ht&&tt(2,ft=ht.title),"$$scope"in ht&&tt(3,nt=ht.$$scope)},[st,dt,ft,nt,rt]}var Icon=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance$1,create_fragment$1,safe_not_equal$2,{src:0,alt:1,title:2})}},Icon_default=Icon;function create_fragment2(et){let _e,tt,rt,nt,st,dt;return{c(){_e=svg_element("svg"),tt=svg_element("rect"),rt=svg_element("rect"),nt=svg_element("rect"),st=svg_element("rect"),attr$1(tt,"x","5"),attr$1(tt,"y","5"),attr$1(tt,"width","6"),attr$1(tt,"height","6"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"x","13"),attr$1(rt,"y","5"),attr$1(rt,"width","6"),attr$1(rt,"height","6"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(nt,"x","5"),attr$1(nt,"y","13"),attr$1(nt,"width","6"),attr$1(nt,"height","6"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-width","1.25"),attr$1(nt,"stroke-linejoin","round"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(st,"x","13"),attr$1(st,"y","13"),attr$1(st,"width","6"),attr$1(st,"height","6"),attr$1(st,"stroke","#5D6066"),attr$1(st,"stroke-width","1.25"),attr$1(st,"stroke-linejoin","round"),attr$1(st,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",dt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(ft,ht){insert$1(ft,_e,ht),append$1(_e,tt),append$1(_e,rt),append$1(_e,nt),append$1(_e,st)},p(ft,[ht]){ht&1&&dt!==(dt="fastboard-icon "+ft[0])&&attr$1(_e,"class",dt),ht&3&&toggle_class(_e,"is-active",ft[1])},i:noop$8,o:noop$8,d(ft){ft&&detach$1(_e)}}}function instance2(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Apps=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance2,create_fragment2,safe_not_equal$2,{theme:0,active:1})}},Apps_default=Apps;function create_fragment3(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M5 19 15.5 8.5M17 12l2-7-7 2 3.5 1.5L17 12Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance3(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Arrow=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance3,create_fragment3,safe_not_equal$2,{theme:0,active:1})}},Arrow_default=Arrow;function create_fragment4(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","M5 19 15.5 8.5"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","m17 12 2-7-7 2 3.5 1.5L17 12Z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance4(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var ArrowBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance4,create_fragment4,safe_not_equal$2,{theme:0,active:1})}},ArrowBolded_default=ArrowBolded;function create_fragment5(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M19 7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2v3l2.414-2.414A2 2 0 0 1 12.828 16H17a2 2 0 0 0 2-2V7Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance5(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Balloon=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance5,create_fragment5,safe_not_equal$2,{theme:0,active:1})}},Balloon_default=Balloon;function create_fragment6(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","M19 7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2v3l2.414-2.414A2 2 0 0 1 12.828 16H17a2 2 0 0 0 2-2V7Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance6(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var BalloonBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance6,create_fragment6,safe_not_equal$2,{theme:0,active:1})}},BalloonBolded_default=BalloonBolded;function create_fragment7(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("rect"),attr$1(tt,"width","16"),attr$1(tt,"height","16"),attr$1(tt,"x","4"),attr$1(tt,"y","4"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"rx","8"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance7(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Circle=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance7,create_fragment7,safe_not_equal$2,{theme:0,active:1})}},Circle_default=Circle;function create_fragment8(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("rect"),attr$1(tt,"width","16"),attr$1(tt,"height","16"),attr$1(tt,"x","4"),attr$1(tt,"y","4"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"rx","8"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance8(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var CircleBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance8,create_fragment8,safe_not_equal$2,{theme:0,active:1})}},CircleBolded_default=CircleBolded;function create_fragment9(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),nt=svg_element("path"),attr$1(tt,"d","M19.6567 4.34323L13.9999 10.0001"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"d","M8.34296 10.0001C9.90506 8.43799 12.4377 8.43799 13.9998 10.0001V10.0001C15.5619 11.5622 15.5619 14.0948 13.9998 15.6569V15.6569L8.34296 10.0001V10.0001Z"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(nt,"d","M8.34292 10.0001L13.9998 15.6569L11.5856 19.8996L4.10028 11.4143L8.34292 10.0001Z"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-width","1.25"),attr$1(nt,"stroke-linejoin","round"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt),append$1(_e,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance9(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Clear=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance9,create_fragment9,safe_not_equal$2,{theme:0,active:1})}},Clear_default=Clear;function create_fragment10(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M10 18 6 6l12 4-6 2-2 6Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance10(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Click=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance10,create_fragment10,safe_not_equal$2,{theme:0,active:1})}},Click_default=Click;function create_fragment11(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"d","M10 18 6 6l12 4-6 2-2 6Z"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance11(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var ClickFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance11,create_fragment11,safe_not_equal$2,{theme:0,active:1})}},ClickFilled_default=ClickFilled;function create_fragment13(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(tt,"d","m16 10-2 2-2 2-2-2-2-2"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance13(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Down=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance13,create_fragment13,safe_not_equal$2,{theme:0,active:1})}},Down_default=Down;function create_fragment14(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","M17.143 8.143v2.571h-3.857V6.857h2.571L12 3 8.143 6.857h2.571v3.857H6.857V8.143L3 12l1.286 1.286 2.571 2.571v-2.571h3.857v3.857H8.143L12 21l1.286-1.286 2.571-2.571h-2.571v-3.857h3.857v2.571L21 12l-3.857-3.857Z"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance14(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Drag=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance14,create_fragment14,safe_not_equal$2,{theme:0,active:1})}},Drag_default=Drag;function create_fragment15(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","M17.143 8.143v2.571h-3.857V6.857h2.571L12 3 8.143 6.857h2.571v3.857H6.857V8.143L3 12l1.286 1.286 2.571 2.571v-2.571h3.857v3.857H8.143L12 21l1.286-1.286 2.571-2.571h-2.571v-3.857h3.857v2.571L21 12l-3.857-3.857Z"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance15(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var DragFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance15,create_fragment15,safe_not_equal$2,{theme:0,active:1})}},DragFilled_default=DragFilled;function create_fragment16(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M13.414 4.929a2 2 0 0 1 2.829 0l2.828 2.828a2 2 0 0 1 0 2.829L12 17.656a4 4 0 0 1-5.657 0L4.93 16.244a2 2 0 0 1 0-2.829l8.485-8.485ZM12 6.343 17.657 12m-1.414-7.071-2.829 2.828m4.243-1.414-2.829 2.829m4.243-1.415-2.828 2.829"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance16(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Eraser=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance16,create_fragment16,safe_not_equal$2,{theme:0,active:1})}},Eraser_default=Eraser;function create_fragment17(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"fill-rule","evenodd"),attr$1(tt,"d","M16.242 4.929a2 2 0 0 0-2.828 0L4.93 13.414a2 2 0 0 0 0 2.829l1.414 1.414a4 4 0 0 0 5.657 0l5.215-5.215-5.657-5.657.884-.884 5.657 5.657.972-.972a2 2 0 0 0 0-2.829l-2.83-2.827Z"),attr$1(tt,"clip-rule","evenodd"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance17(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var EraserFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance17,create_fragment17,safe_not_equal$2,{theme:0,active:1})}},EraserFilled_default=EraserFilled;function create_fragment18(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"d","m11.48 10.033 2.695 2.696m-2.695-2.696-7.375 7.379a.364.364 0 0 0 0 .515l2.18 2.182a.361.361 0 0 0 .514 0l7.376-7.38m-2.695-2.696 2.438-2.438a.363.363 0 0 1 .514 0l2.18 2.182v-.001a.363.363 0 0 1 0 .514l-2.437 2.439"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"d","M10.895 6.652a.363.363 0 0 0-.13-.182c-.348-.399-.338-1.264.032-1.634a.362.362 0 1 0-.513-.514c-.18.18-.491.286-.834.286-.343 0-.654-.107-.833-.286a.363.363 0 1 0-.514.514c.38.382.38 1.286 0 1.667a.364.364 0 0 0 .514.515c.179-.18.49-.287.833-.287.343 0 .654.107.834.287a.362.362 0 0 0 .256.106h.008a.363.363 0 0 0 .347-.472Zm6.294-.149a.366.366 0 0 0 .118.594.363.363 0 0 0 .396-.079c.18-.18.49-.287.834-.287.343 0 .654.107.832.287a.362.362 0 0 0 .258.106h.007a.363.363 0 0 0 .218-.654c-.35-.399-.338-1.264.032-1.634a.363.363 0 1 0-.515-.514c-.178.18-.49.286-.832.286-.343 0-.654-.107-.834-.286a.364.364 0 0 0-.514.514c.382.382.382 1.286 0 1.667Zm2.794 9.239a.363.363 0 0 0-.13-.182c-.35-.398-.34-1.263.03-1.633a.363.363 0 1 0-.514-.515c-.178.18-.49.287-.832.287-.343 0-.654-.107-.834-.287a.365.365 0 0 0-.514.515c.382.38.382 1.285 0 1.667a.364.364 0 0 0 .514.514c.18-.18.49-.286.834-.286.343 0 .654.107.832.286a.363.363 0 0 0 .258.107h.007a.363.363 0 0 0 .349-.473Z"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance18(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Laser=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance18,create_fragment18,safe_not_equal$2,{theme:0,active:1})}},Laser_default=Laser;function create_fragment19(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","m11.48 10.033 2.695 2.696-7.376 7.38a.361.361 0 0 1-.514 0l-2.18-2.182a.362.362 0 0 1 0-.515l7.375-7.379Zm5.133-.257a.363.363 0 0 1 0 .514l-1.925 1.925-2.694-2.696 1.924-1.924a.363.363 0 0 1 .514 0l2.18 2.182v-.001Zm-5.718-3.124a.363.363 0 0 0-.13-.182c-.348-.399-.338-1.264.032-1.634a.362.362 0 1 0-.513-.514c-.18.18-.491.286-.834.286-.343 0-.654-.107-.833-.286a.363.363 0 1 0-.514.514c.38.382.38 1.286 0 1.667a.364.364 0 0 0 .514.515c.179-.18.49-.287.833-.287.343 0 .654.107.834.287a.362.362 0 0 0 .256.106h.008a.363.363 0 0 0 .347-.472Zm6.294-.149a.366.366 0 0 0 .118.594.363.363 0 0 0 .396-.079c.18-.18.49-.287.834-.287.343 0 .654.107.832.287a.362.362 0 0 0 .258.106h.007a.363.363 0 0 0 .218-.654c-.35-.399-.338-1.264.032-1.634a.363.363 0 1 0-.515-.514c-.178.18-.49.286-.832.286-.343 0-.654-.107-.834-.286a.364.364 0 0 0-.514.514c.382.382.382 1.286 0 1.667Zm2.794 9.239a.363.363 0 0 0-.13-.182c-.35-.398-.34-1.263.03-1.633a.363.363 0 1 0-.514-.515c-.178.18-.49.287-.832.287-.343 0-.654-.107-.834-.287a.365.365 0 0 0-.514.515c.382.38.382 1.285 0 1.667a.364.364 0 0 0 .514.514c.18-.18.49-.286.834-.286.343 0 .654.107.832.286a.363.363 0 0 0 .258.107h.007a.363.363 0 0 0 .349-.473Z"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance19(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var LaserFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance19,create_fragment19,safe_not_equal$2,{theme:0,active:1})}},LaserFilled_default=LaserFilled;function create_fragment20(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","m14 8-2 2-2 2 2 2 2 2"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance20(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Left=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance20,create_fragment20,safe_not_equal$2,{theme:0,active:1})}},Left_default=Left;function create_fragment21(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M5 19 19 5"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance21(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Line=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance21,create_fragment21,safe_not_equal$2,{theme:0,active:1})}},Line_default=Line;function create_fragment22(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","M5 19 19 5"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance22(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var LineBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance22,create_fragment22,safe_not_equal$2,{theme:0,active:1})}},LineBolded_default=LineBolded;function create_fragment23(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","M5 12h14"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance23(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Minus=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance23,create_fragment23,safe_not_equal$2,{theme:0,active:1})}},Minus_default=Minus;function create_fragment24(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),nt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M15.536 4.222a2 2 0 0 1 2.828 0l1.414 1.414a2 2 0 0 1 0 2.828l-9.9 9.9-4.95.707.708-4.95 9.9-9.9Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"d","m14.121 5.636 4.243 4.243"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-linejoin","round"),attr$1(nt,"stroke-width","1.25"),attr$1(nt,"d","m16.243 7.757-5.657 5.657m-3.536.707v1.415h1.415v1.414h1.414"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt),append$1(_e,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance24(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Pencil=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance24,create_fragment24,safe_not_equal$2,{theme:0,active:1})}},Pencil_default=Pencil;function create_fragment25(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"fill-rule","evenodd"),attr$1(tt,"d","M18.364 4.222a2 2 0 0 0-2.828 0l-9.9 9.9-.707 4.95 4.95-.708 8.132-8.132-.008-.007-.008-.008-.007-.008-.008-.007-.008-.008-.008-.008-.007-.008-.008-.008-.008-.007-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.009-.009-.008-.008-.008-.008-.008-.008-.008-.009-.009-.008-.008-.008-.009-.009-.008-.008-.008-.009-.009-.008-.008-.008-.009-.009-.008-.008-.009-.009-.008-.009-.009-.008-.009-.009-.008-.008-.009-.01-.009-.008-.008-.009-.01-.008-.008-.01-.009-.008-.008-.009-.01-.009-.008-.008-.01-.01-.008-.008-.009-.01-.009-.008-.009-.01-.009-.008-.009-.01-.009-.008-.009-.01-.01-.008-.008-.01-.01-.009-.009-.009-.009-.009-.009-.01-.01-.008-.008-.01-.01-.009-.009-.01-.01-.009-.009-.009-.009-.01-.01-.009-.009-.009-.01-.01-.008-.009-.01-.01-.01-.009-.009-.01-.01-.009-.009-.01-.01-.009-.009-.01-.01-.009-.01-.01-.009-.009-.01-.01-.009-.01-.01-.009-.01-.01-.01-.01-.009-.009-.01-.01-.01-.01-.009-.01-.01-.009-.01-.01-.01-.01-.01-.01-.009-.01-.01-.01-.01-.009-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.011-.01-.01-.011-.01-.01-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.01-.01-.01-.01-.011-.011-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.011-.01-.01-.011-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.01-.009-.01-.01-.009-.01-.01-.01-.01-.009-.01-.01-.009-.01-.01-.01-.01-.009-.009-.01-.01-.01-.01-.009-.009-.01-.01-.009-.01-.01-.009-.009-.01-.01-.009-.009-.01-.01-.009-.009-.01-.01-.009-.009-.01-.01-.009-.009-.009-.009-.01-.01-.009-.009-.009-.009-.01-.01-.009-.009-.009-.009-.01-.01-.008-.008-.01-.01-.009-.009-.009-.009-.01-.009-.008-.01-.01-.008-.008-.01-.01-.008-.009-.01-.009-.008-.009-.01-.009-.008-.008-.01-.01-.008-.008-.009-.01-.009-.008-.009-.009-.008-.009-.01-.008-.008-.01L14.777 7l-.008-.009-.01-.008-.008-.01-.008-.008-.01-.008-.008-.009-.008-.008-.009-.009-.008-.009-.009-.008-.008-.008-.009-.009-.008-.008-.008-.009-.009-.008-.008-.008-.008-.009-.009-.008-.008-.008-.008-.008-.008-.009-.008-.008-.009-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.008-.007-.008-.008-.007-.008-.008-.008-.008-.007-.008-.008-.007-.008-.008-.007-.008-.008-.007-.008-.008-.007-.007-.008-.008-.007-.007-.008-.008-.007-.007-.007-.008-.008-.007-.007-.007-.007-.007-.008-.008-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.007-.006-.007-.007-.007-.007-.006-.007-.007-.006-.007-.007-.006-.007-.007-.006-.006-.007-.007-.006-.006-.007-.007-.006-.006-.006-.007-.007-.006-.006-.006-.006-.006-.006-.007-.007-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.006-.005-.006-.006-.005-.006-.006-.006-.006-.005-.006-.006-.005-.005-.006-.006-.005-.006-.006-.005-.005-.005-.006-.006-.005-.005-.005-.005-.006-.006-.005-.005-.005-.005-.005-.005-.005-.005-.005-.005-.006-.005-.005-.005-.004-.005-.005-.005-.005-.005-.005-.005-.005-.004-.005-.005-.004-.005-.005-.004-.005-.005-.004-.004-.005-.005-.004-.004-.004-.005-.005-.004-.004-.004-.004-.005-.005-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.004-.003-.004-.004-.003-.004-.004-.003-.004-.004-.003-.004-.004-.003-.003-.003-.004-.004-.003-.003-.003-.003-.004-.004-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.003-.002-.003-.003-.002-.003-.003-.002-.002-.003-.003-.002-.003-.003-.002-.002-.002-.002-.003-.003-.002-.002-.002-.002-.002-.002-.002-.002-.002L13.779 6l-.002-.002-.002-.002-.002-.002-.002-.002-.002-.002-.001-.001.707-.708.002.002.001.002.002.002.002.002.002.001.002.002.002.002.002.002.002.003.002.002.002.002.003.002.002.003.002.002.003.002.002.003.003.002.002.003.003.003.003.002.002.003.003.003.003.003.003.003.003.003.003.002.003.004.003.003.003.003.003.003.004.003.003.003.003.004.004.003.003.004.004.003.003.004.004.003.003.004.004.004.004.003.004.004.003.004.004.004.004.004.004.004.004.004.004.004.004.004.004.004.005.004.004.004.004.005.005.004.004.004.004.005.005.004.004.005.005.004.004.005.005.005.005.004.005.005.004.005.005.005.005.005.005.004.005.005.005.005.005.005.005.005.005.006.005.005.005.005.006.005.005.006.005.005.006.005.005.006.006.005.005.006.006.005.005.006.006.005.006.006.005.006.006.005.006.006.006.006.005.006.006.006.006.006.006.006.006.006.006.006.006.006.007.006.006.006.006.006.006.007.007.006.006.006.006.007.007.006.006.007.007.006.006.007.007.006.006.007.007.006.006.007.007.007.007.006.007.007.006.007.007.007.007.007.007.007.007.006.007.007.007.007.007.007.007.008.007.007.007.007.007.007.008.007.007.007.007.008.007.007.008.007.007.008.008.007.007.008.008.007.007.008.008.007.007.008.008.007.007.008.008.008.008.007.007.008.008.008.008.007.008.008.008.008.008.008.007.008.008.008.008.008.008.008.008.008.008.008.008.008.008.008.009.008.008.008.008.008.008.009.008.008.009.008.008.009.008.008.009.008.008.009.009.008.008.008.008.009.009.008.008.009.009.008.008.009.01.009.008.008.008.009.009.009.009.008.008.009.01.009.008.008.009.01.009.008.008.009.01.009.008.009.009.008.009.01.009.008.009.01.009.008.009.01.009.008.009.01.009.009.01.009.008.009.01.009.009.01.009.008.009.01.01.009.008.009.01.01.01.009.008.009.01.01.01.009.008.009.01.01.01.009.009.01.01.009.009.01.01.009.009.01.01.009.009.01.01.009.009.01.01.009.01.01.009.01.01.009.009.01.01.01.01.009.01.01.009.01.01.01.01.009.01.01.009.01.01.01.01.01.01.009.01.01.01.01.009.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.011.01.01.01.01.011.01.01.01.01.011.01.01.01.01.011.01.01.011.01.01.011.01.01.011.01.01.01.01.011.01.01.011.01.01.011.011.01.01.01.01.011.011.01.01.01.01.011.011.01.01.011.011.01.01.01.01.011.011.01.01.011.011.01.01.011.01.01.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.011.01.01.011.01.01.011.01.01.011.011.01.01.011.011.01.01.011.01.01.011.01.01.011.011.01.01.01.01.011.011.01.01.011.01.01.011.01.01.011.01.01.011.01.01.011.01.01.011.01.01.01.01.011.01.01.011.01.01.01.01.011.01.01.011.01.01.01.01.01.01.011.01.01.01.01.011.01.01.01.01.01.01.011.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.009.01.01.009.01.01.01.01.009.009.01.01.01.01.009.01.01.009.01.01.009.009.01.01.01.01.009.009.01.01.009.009.01.01.009.009.01.01.009.009.01.009.009.01.009.009.01.01.009.008.009.01.01.01.009.008.009.01.01.009.008.01.01.008.009.01.01.009.008.009.01.009.008.01.01.008.009.01.009.008.009.01.009.008.009.01.009.008.009.009.009.009.008.009.01.009.008.008.009.01.009.008.009.009.008.008.01.01.008.008.008.008.01.01.008.008.008.008.009.009.008.008.009.009.008.008.009.009.008.008.009.009.008.008.009.008.008.009.008.008.008.008.009.008.008.009.008.008.008.008.008.008.009.008.008.008.008.008.008.008.008.008.008.008.008.008.008.008.008.008.007.008.008.008.008.007.008.008.007.008.008.007.008.008.008.008.007 1.06-1.06a2 2 0 0 0 0-2.829l-1.414-1.414Zm-9.9 10.689c.346 0 .626.28.626.625v.789h.789v1.25H8.465a.625.625 0 0 1-.625-.625v-.79h-.79a.625.625 0 0 1-.625-.624V14.12h1.25v.79h.79Z"),attr$1(tt,"clip-rule","evenodd"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance25(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var PencilFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance25,create_fragment25,safe_not_equal$2,{theme:0,active:1})}},PencilFilled_default=PencilFilled;function create_fragment26(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","M5 12h14m-7-7v14"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance26(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Plus=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance26,create_fragment26,safe_not_equal$2,{theme:0,active:1})}},Plus_default=Plus;function create_fragment27(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M5 5h14v14H5z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance27(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Rectangle=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance27,create_fragment27,safe_not_equal$2,{theme:0,active:1})}},Rectangle_default=Rectangle;function create_fragment28(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","M5 5h14v14H5z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance28(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var RectangleBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance28,create_fragment28,safe_not_equal$2,{theme:0,active:1})}},RectangleBolded_default=RectangleBolded;function create_fragment29(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"d","m14 5 6 4-6 4 2-4-2-4Z"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","M8 8.375h8v1.25H8v-1.25Zm0 8h12v1.25H8v-1.25ZM3.375 13A4.625 4.625 0 0 1 8 8.375v1.25A3.375 3.375 0 0 0 4.625 13h-1.25Zm1.25 0A3.375 3.375 0 0 0 8 16.375v1.25A4.625 4.625 0 0 1 3.375 13h1.25Z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance29(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Redo=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance29,create_fragment29,safe_not_equal$2,{theme:0,active:1})}},Redo_default=Redo;function create_fragment30(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("circle"),rt=svg_element("path"),nt=svg_element("circle"),attr$1(tt,"cx","12"),attr$1(tt,"cy","12"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"r","2"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(rt,"d","M12 3v4m0 10v4m9-9h-4M7 12H3"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(nt,"cx","12"),attr$1(nt,"cy","12"),attr$1(nt,"r","7"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-linejoin","round"),attr$1(nt,"stroke-width","1.25"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt),append$1(_e,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance30(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Reset=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance30,create_fragment30,safe_not_equal$2,{theme:0,active:1})}},Reset_default=Reset;function create_fragment31(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M3.515 12 12 3.514 20.485 12 12 20.485z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance31(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Rhombus=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance31,create_fragment31,safe_not_equal$2,{theme:0,active:1})}},Rhombus_default=Rhombus;function create_fragment32(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","M3.515 12 12 3.514 20.485 12 12 20.485z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance32(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var RhombusBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance32,create_fragment32,safe_not_equal$2,{theme:0,active:1})}},RhombusBolded_default=RhombusBolded;function create_fragment33(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","m10 8 2 2 2 2-2 2-2 2"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance33(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Right=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance33,create_fragment33,safe_not_equal$2,{theme:0,active:1})}},Right_default=Right;function create_fragment34(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-dasharray","1.25 1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M18 11V4H4v14h7"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"d","m15 20-2-7 7 2-3.5 1.5L15 20Z"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance34(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Selector=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance34,create_fragment34,safe_not_equal$2,{theme:0,active:1})}},Selector_default=Selector;function create_fragment35(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-dasharray","1.25 1.25"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M18 11V4H4v14h7"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","m15 20-2-7 7 2-3.5 1.5L15 20Z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance35(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var SelectorFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance35,create_fragment35,safe_not_equal$2,{theme:0,active:1})}},SelectorFilled_default=SelectorFilled;function create_fragment37(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","m12 4 1.88 5.411 5.728.117-4.565 3.46 1.66 5.484L12 15.2l-4.702 3.272 1.659-5.483-4.565-3.461 5.727-.117L12 4Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance37(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Star=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance37,create_fragment37,safe_not_equal$2,{theme:0,active:1})}},Star_default=Star;function create_fragment38(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","m12 4 1.88 5.411 5.728.117-4.565 3.46 1.66 5.484L12 15.2l-4.702 3.272 1.659-5.483-4.565-3.461 5.727-.117L12 4Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance38(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var StarBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance38,create_fragment38,safe_not_equal$2,{theme:0,active:1})}},StarBolded_default=StarBolded;function create_fragment39(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance39(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Text=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance39,create_fragment39,safe_not_equal$2,{theme:0,active:1})}},Text_default=Text;function create_fragment40(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"fill","#3381FF"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"d","M11.5 5.5h1v13h-1z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"d","M6 7V5h5m7 2V5h-5M8 19h3m5 0h-3m-2 0V5m0 14h2M11 5h2m0 0v14"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance40(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var TextFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance40,create_fragment40,safe_not_equal$2,{theme:0,active:1})}},TextFilled_default=TextFilled;function create_fragment41(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"d","m12 5 8 14H4l8-14Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance41(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Triangle=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance41,create_fragment41,safe_not_equal$2,{theme:0,active:1})}},Triangle_default=Triangle;function create_fragment42(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.75"),attr$1(tt,"d","m12 5 8 14H4l8-14Z"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance42(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var TriangleBolded=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance42,create_fragment42,safe_not_equal$2,{theme:0,active:1})}},TriangleBolded_default=TriangleBolded;function create_fragment43(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("path"),attr$1(tt,"fill","#5D6066"),attr$1(tt,"d","M10 5 4 9l6 4-2-4 2-4Z"),attr$1(tt,"class","fastboard-icon-fill-color"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","M16 8.375H8v1.25h8v-1.25Zm0 8H4v1.25h12v-1.25ZM20.625 13A4.625 4.625 0 0 0 16 8.375v1.25A3.375 3.375 0 0 1 19.375 13h1.25Zm-1.25 0A3.375 3.375 0 0 1 16 16.375v1.25A4.625 4.625 0 0 0 20.625 13h-1.25Z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(_e,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance43(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Undo=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance43,create_fragment43,safe_not_equal$2,{theme:0,active:1})}},Undo_default=Undo;function create_fragment44(et){let _e,tt,rt;return{c(){_e=svg_element("svg"),tt=svg_element("path"),attr$1(tt,"d","m16 14-2-2-2-2-2 2-2 2"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",rt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(nt,st){insert$1(nt,_e,st),append$1(_e,tt)},p(nt,[st]){st&1&&rt!==(rt="fastboard-icon "+nt[0])&&attr$1(_e,"class",rt),st&3&&toggle_class(_e,"is-active",nt[1])},i:noop$8,o:noop$8,d(nt){nt&&detach$1(_e)}}}function instance44(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var Up=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance44,create_fragment44,safe_not_equal$2,{theme:0,active:1})}},Up_default=Up;function create_fragment45(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("path"),rt=svg_element("rect"),nt=svg_element("path"),attr$1(tt,"d","M4 20h16M4 6h16"),attr$1(tt,"stroke","#5D6066"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"class","fastboard-icon-stroke-color"),attr$1(rt,"height","10"),attr$1(rt,"rx","1"),attr$1(rt,"stroke","#5D6066"),attr$1(rt,"stroke-linejoin","round"),attr$1(rt,"stroke-width","1.25"),attr$1(rt,"width","14"),attr$1(rt,"x","5"),attr$1(rt,"y","8"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(nt,"d","M12 4v2m-3 7h6m-3-3v6"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-linejoin","round"),attr$1(nt,"stroke-width","1.25"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt),append$1(_e,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance45(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var WhiteboardAdd=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance45,create_fragment45,safe_not_equal$2,{theme:0,active:1})}},WhiteboardAdd_default=WhiteboardAdd;function create_fragment49(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),nt=svg_element("path"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(rt,"clip-rule","evenodd"),attr$1(rt,"d","m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(nt,"d","m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linecap","round"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"transform","rotate(0 10 10)"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(tt,rt),append$1(tt,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance49(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var LaserPen=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance49,create_fragment49,safe_not_equal$2,{theme:0,active:1})}},LaserPen_default=LaserPen;function create_fragment50(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),nt=svg_element("path"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(rt,"clip-rule","evenodd"),attr$1(rt,"d","m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(nt,"d","m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"),attr$1(tt,"stroke-width","1.25"),attr$1(tt,"stroke-linecap","round"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"transform","rotate(0 10 10)"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(tt,rt),append$1(tt,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance50(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var LaserPenFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance50,create_fragment50,safe_not_equal$2,{theme:0,active:1})}},LaserPenFilled_default=LaserPenFilled;function create_fragment51(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),attr$1(rt,"class","fastboard-icon-stroke-color"),attr$1(rt,"d","m15.95 2.39l5.657 5.657a1 1 0 0 1 0 1.414l-7.778 7.778l-2.122.707l-1.414 1.415a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414L6.05 12.29l.707-2.122l7.779-7.778a1 1 0 0 1 1.414 0m.707 3.536l-6.364 6.364l1.414 1.414l6.364-6.364zM4.283 16.886l2.828 2.828l-1.414 1.415l-4.243-1.415z"),attr$1(tt,"stroke-width","1"),attr$1(tt,"stroke-linecap","round"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"transform","scale(0.85 0.9) translate(2, 0)"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(tt,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance51(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var MarkPen=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance51,create_fragment51,safe_not_equal$2,{theme:0,active:1})}},MarkPen_default=MarkPen;function create_fragment52(et){let _e,tt,rt,nt;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(rt,"d","m15.95 2.39l5.657 5.657a1 1 0 0 1 0 1.414l-7.778 7.778l-2.122.707l-1.414 1.415a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414L6.05 12.29l.707-2.122l7.779-7.778a1 1 0 0 1 1.414 0m.707 3.536l-6.364 6.364l1.414 1.414l6.364-6.364zM4.283 16.886l2.828 2.828l-1.414 1.415l-4.243-1.415z"),attr$1(tt,"stroke-width","1"),attr$1(tt,"stroke-linecap","round"),attr$1(tt,"stroke-linejoin","round"),attr$1(tt,"transform","scale(0.85 0.9) translate(2, 0)"),attr$1(_e,"fill","none"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",nt="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(st,dt){insert$1(st,_e,dt),append$1(_e,tt),append$1(tt,rt)},p(st,[dt]){dt&1&&nt!==(nt="fastboard-icon "+st[0])&&attr$1(_e,"class",nt),dt&3&&toggle_class(_e,"is-active",st[1])},i:noop$8,o:noop$8,d(st){st&&detach$1(_e)}}}function instance52(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var MarkPenFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance52,create_fragment52,safe_not_equal$2,{theme:0,active:1})}},MarkPenFilled_default=MarkPenFilled;function create_fragment53(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),nt=svg_element("path"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","m5.505 11.41l.53.53zM3 14.952h-.75zM9.048 21v.75zM11.41 5.505l-.53-.53zm1.831 12.34a.75.75 0 0 0 1.06-1.061zM7.216 9.697a.75.75 0 1 0-1.06 1.061zm10.749 2.362l-5.905 5.905l1.06 1.06l5.905-5.904zm-11.93-.12l5.905-5.905l-1.06-1.06l-5.905 5.904zm0 6.025c-.85-.85-1.433-1.436-1.812-1.933c-.367-.481-.473-.79-.473-1.08h-1.5c0 .749.312 1.375.78 1.99c.455.596 1.125 1.263 1.945 2.083zm-1.06-7.086c-.82.82-1.49 1.488-1.945 2.084c-.468.614-.78 1.24-.78 1.99h1.5c0-.29.106-.6.473-1.08c.38-.498.962-1.083 1.812-1.933zm7.085 7.086c-.85.85-1.435 1.433-1.933 1.813c-.48.366-.79.472-1.08.472v1.5c.75 0 1.376-.312 1.99-.78c.596-.455 1.264-1.125 2.084-1.945zm-7.085 1.06c.82.82 1.487 1.49 2.084 1.945c.614.468 1.24.78 1.989.78v-1.5c-.29 0-.599-.106-1.08-.473c-.497-.38-1.083-.962-1.933-1.812zm12.99-12.99c.85.85 1.433 1.436 1.813 1.933c.366.481.472.79.472 1.08h1.5c0-.749-.312-1.375-.78-1.99c-.455-.596-1.125-1.263-1.945-2.083zm1.06 7.086c.82-.82 1.49-1.488 1.945-2.084c.468-.614.78-1.24.78-1.99h-1.5c0 .29-.106.6-.473 1.08c-.38.498-.962 1.083-1.812 1.933zm0-8.146c-.82-.82-1.487-1.49-2.084-1.945c-.614-.468-1.24-.78-1.989-.78v1.5c.29 0 .599.106 1.08.473c.497.38 1.083.962 1.933 1.812zm-7.085 1.06c.85-.85 1.435-1.433 1.933-1.812c.48-.367.79-.473 1.08-.473v-1.5c-.75 0-1.376.312-1.99.78c-.596.455-1.264 1.125-2.084 1.945zm2.362 10.749L7.216 9.698l-1.06 1.061l7.085 7.085z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-linecap","round"),attr$1(nt,"stroke-width","1.5"),attr$1(nt,"d","M9 21h12"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(tt,"fill","none"),attr$1(_e,"width","24"),attr$1(_e,"height","24"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(tt,rt),append$1(tt,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance53(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var EraserBitmap=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance53,create_fragment53,safe_not_equal$2,{theme:0,active:1})}},EraserBitmap_default=EraserBitmap;function create_fragment54(et){let _e,tt,rt,nt,st;return{c(){_e=svg_element("svg"),tt=svg_element("g"),rt=svg_element("path"),nt=svg_element("path"),attr$1(rt,"fill","#5D6066"),attr$1(rt,"d","m5.505 11.41l.53.53zM3 14.952h-.75zM9.048 21v.75zM11.41 5.505l-.53-.53zm1.831 12.34a.75.75 0 0 0 1.06-1.061zM7.216 9.697a.75.75 0 1 0-1.06 1.061zm10.749 2.362l-5.905 5.905l1.06 1.06l5.905-5.904zm-11.93-.12l5.905-5.905l-1.06-1.06l-5.905 5.904zm0 6.025c-.85-.85-1.433-1.436-1.812-1.933c-.367-.481-.473-.79-.473-1.08h-1.5c0 .749.312 1.375.78 1.99c.455.596 1.125 1.263 1.945 2.083zm-1.06-7.086c-.82.82-1.49 1.488-1.945 2.084c-.468.614-.78 1.24-.78 1.99h1.5c0-.29.106-.6.473-1.08c.38-.498.962-1.083 1.812-1.933zm7.085 7.086c-.85.85-1.435 1.433-1.933 1.813c-.48.366-.79.472-1.08.472v1.5c.75 0 1.376-.312 1.99-.78c.596-.455 1.264-1.125 2.084-1.945zm-7.085 1.06c.82.82 1.487 1.49 2.084 1.945c.614.468 1.24.78 1.989.78v-1.5c-.29 0-.599-.106-1.08-.473c-.497-.38-1.083-.962-1.933-1.812zm12.99-12.99c.85.85 1.433 1.436 1.813 1.933c.366.481.472.79.472 1.08h1.5c0-.749-.312-1.375-.78-1.99c-.455-.596-1.125-1.263-1.945-2.083zm1.06 7.086c.82-.82 1.49-1.488 1.945-2.084c.468-.614.78-1.24.78-1.99h-1.5c0 .29-.106.6-.473 1.08c-.38.498-.962 1.083-1.812 1.933zm0-8.146c-.82-.82-1.487-1.49-2.084-1.945c-.614-.468-1.24-.78-1.989-.78v1.5c.29 0 .599.106 1.08.473c.497.38 1.083.962 1.933 1.812zm-7.085 1.06c.85-.85 1.435-1.433 1.933-1.812c.48-.367.79-.473 1.08-.473v-1.5c-.75 0-1.376.312-1.99.78c-.596.455-1.264 1.125-2.084 1.945zm2.362 10.749L7.216 9.698l-1.06 1.061l7.085 7.085z"),attr$1(rt,"class","fastboard-icon-fill-color"),attr$1(nt,"stroke","#5D6066"),attr$1(nt,"stroke-linecap","round"),attr$1(nt,"stroke-width","1.5"),attr$1(nt,"d","M9 21h12"),attr$1(nt,"class","fastboard-icon-stroke-color"),attr$1(tt,"fill","none"),attr$1(_e,"width","24"),attr$1(_e,"height","24"),attr$1(_e,"viewBox","0 0 24 24"),attr$1(_e,"class",st="fastboard-icon "+et[0]),toggle_class(_e,"is-active",et[1])},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(tt,rt),append$1(tt,nt)},p(dt,[ft]){ft&1&&st!==(st="fastboard-icon "+dt[0])&&attr$1(_e,"class",st),ft&3&&toggle_class(_e,"is-active",dt[1])},i:noop$8,o:noop$8,d(dt){dt&&detach$1(_e)}}}function instance54(et,_e,tt){let{theme:rt="light"}=_e,{active:nt=!1}=_e;return et.$$set=st=>{"theme"in st&&tt(0,rt=st.theme),"active"in st&&tt(1,nt=st.active)},[rt,nt]}var EraserBitmapFilled=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance54,create_fragment54,safe_not_equal$2,{theme:0,active:1})}},EraserBitmapFilled_default=EraserBitmapFilled,Icons={Apps:Apps_default,Arrow:Arrow_default,ArrowBolded:ArrowBolded_default,Balloon:Balloon_default,BalloonBolded:BalloonBolded_default,Circle:Circle_default,CircleBolded:CircleBolded_default,Clear:Clear_default,Click:Click_default,ClickFilled:ClickFilled_default,Down:Down_default,Drag:Drag_default,DragFilled:DragFilled_default,Eraser:Eraser_default,EraserFilled:EraserFilled_default,Laser:Laser_default,LaserFilled:LaserFilled_default,Left:Left_default,Line:Line_default,LineBolded:LineBolded_default,Minus:Minus_default,Pencil:Pencil_default,PencilFilled:PencilFilled_default,Plus:Plus_default,Rectangle:Rectangle_default,RectangleBolded:RectangleBolded_default,Redo:Redo_default,Reset:Reset_default,Rhombus:Rhombus_default,RhombusBolded:RhombusBolded_default,Right:Right_default,Selector:Selector_default,SelectorFilled:SelectorFilled_default,Star:Star_default,StarBolded:StarBolded_default,Text:Text_default,TextFilled:TextFilled_default,Triangle:Triangle_default,TriangleBolded:TriangleBolded_default,Undo:Undo_default,Up:Up_default,WhiteboardAdd:WhiteboardAdd_default,LaserPen:LaserPen_default,LaserPenFilled:LaserPenFilled_default,MarkPen:MarkPen_default,MarkPenFilled:MarkPenFilled_default,EraserBitmap:EraserBitmap_default,EraserBitmapFilled:EraserBitmapFilled_default},Icons_default=Icons;typeof window<"u"&&tippy$1.setDefaultProps({delay:[1e3,400],duration:300,offset:[0,11],theme:"dark",plugins:[{name:"className",defaultValue:"",fn(et){function _e(){const rt=et.popper.firstElementChild;if(rt){rt.classList.add("fastboard-tip");const nt=(et.props.className||"").trim();nt&&rt.classList.add(nt)}}function tt(){var rt;(rt=et.popper.firstElementChild)==null||rt.classList.remove("fastboard-tip")}return{onCreate:_e,onBeforeUpdate:tt,onAfterUpdate:_e}}}]});var tippy=function(et,_e){const tt=tippy$1(et,_e);return{update(rt){tt.setProps(rt)},destroy(){tt.destroy()}}};function tippy_hide_all(){document.querySelectorAll("[data-tippy-root]").forEach(et=>{const _e=et._tippy;_e&&_e.hide()})}var tippy_menu={delay:0,duration:[50,300],placement:"right-start",interactive:!0,trigger:"click"};function create_else_block_1(et){let _e,tt,rt,nt,st;const dt=et[9].default,ft=create_slot(dt,et,et[8],null);return{c(){_e=element$1("button"),ft&&ft.c(),attr$1(_e,"class",tt=et[1]+"-btn "+et[0]+" "+et[2]),_e.disabled=et[3]},m(ht,mt){insert$1(ht,_e,mt),ft&&ft.m(_e,null),rt=!0,nt||(st=listen$1(_e,"click",et[12]),nt=!0)},p(ht,mt){ft&&ft.p&&(!rt||mt&256)&&update_slot_base(ft,dt,ht,ht[8],rt?get_slot_changes(dt,ht[8],mt,null):get_all_dirty_from_scope(ht[8]),null),(!rt||mt&7&&tt!==(tt=ht[1]+"-btn "+ht[0]+" "+ht[2]))&&attr$1(_e,"class",tt),(!rt||mt&8)&&(_e.disabled=ht[3])},i(ht){rt||(transition_in$1(ft,ht),rt=!0)},o(ht){transition_out(ft,ht),rt=!1},d(ht){ht&&detach$1(_e),ft&&ft.d(ht),nt=!1,st()}}}function create_if_block2(et){let _e,tt,rt,nt;const st=[create_if_block_1$1,create_else_block2],dt=[];function ft(ht,mt){return ht[6]?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_else_block2(et){let _e,tt,rt,nt,st,dt;const ft=et[9].default,ht=create_slot(ft,et,et[8],null);return{c(){_e=element$1("button"),ht&&ht.c(),attr$1(_e,"class",tt=et[1]+"-btn "+et[0]+" "+et[2]),_e.disabled=et[3]},m(mt,bt){insert$1(mt,_e,bt),ht&&ht.m(_e,null),nt=!0,st||(dt=[listen$1(_e,"click",et[11]),action_destroyer(rt=tippy.call(null,_e,{content:et[4],placement:et[5],className:et[0]}))],st=!0)},p(mt,bt){ht&&ht.p&&(!nt||bt&256)&&update_slot_base(ht,ft,mt,mt[8],nt?get_slot_changes(ft,mt[8],bt,null):get_all_dirty_from_scope(mt[8]),null),(!nt||bt&7&&tt!==(tt=mt[1]+"-btn "+mt[0]+" "+mt[2]))&&attr$1(_e,"class",tt),(!nt||bt&8)&&(_e.disabled=mt[3]),rt&&is_function$1(rt.update)&&bt&49&&rt.update.call(null,{content:mt[4],placement:mt[5],className:mt[0]})},i(mt){nt||(transition_in$1(ht,mt),nt=!0)},o(mt){transition_out(ht,mt),nt=!1},d(mt){mt&&detach$1(_e),ht&&ht.d(mt),st=!1,run_all$1(dt)}}}function create_if_block_1$1(et){let _e,tt,rt,nt,st,dt,ft,ht,mt,bt,St,Et;const Ct=et[9].default,Rt=create_slot(Ct,et,et[8],null);return{c(){_e=element$1("span"),tt=element$1("button"),Rt&&Rt.c(),st=space$1(),dt=element$1("span"),attr$1(tt,"class",rt=et[1]+"-btn "+et[0]+" "+et[2]),tt.disabled=et[3],attr$1(dt,"class",ft=et[1]+"-triangle"),attr$1(_e,"class",ht=et[1]+"-btn-interactive "+et[2])},m(Tt,wt){insert$1(Tt,_e,wt),append$1(_e,tt),Rt&&Rt.m(tt,null),append$1(_e,st),append$1(_e,dt),bt=!0,St||(Et=[listen$1(tt,"click",et[10]),action_destroyer(nt=tippy.call(null,tt,__spreadProps$1(__spreadValues$1({content:et[6]},tippy_menu),{placement:et[7],appendTo:document.body,theme:et[2],className:"fastboard-panel"}))),action_destroyer(mt=tippy.call(null,_e,{content:et[4],placement:et[5],className:et[0]}))],St=!0)},p(Tt,wt){Rt&&Rt.p&&(!bt||wt&256)&&update_slot_base(Rt,Ct,Tt,Tt[8],bt?get_slot_changes(Ct,Tt[8],wt,null):get_all_dirty_from_scope(Tt[8]),null),(!bt||wt&7&&rt!==(rt=Tt[1]+"-btn "+Tt[0]+" "+Tt[2]))&&attr$1(tt,"class",rt),(!bt||wt&8)&&(tt.disabled=Tt[3]),nt&&is_function$1(nt.update)&&wt&196&&nt.update.call(null,__spreadProps$1(__spreadValues$1({content:Tt[6]},tippy_menu),{placement:Tt[7],appendTo:document.body,theme:Tt[2],className:"fastboard-panel"})),(!bt||wt&2&&ft!==(ft=Tt[1]+"-triangle"))&&attr$1(dt,"class",ft),(!bt||wt&6&&ht!==(ht=Tt[1]+"-btn-interactive "+Tt[2]))&&attr$1(_e,"class",ht),mt&&is_function$1(mt.update)&&wt&49&&mt.update.call(null,{content:Tt[4],placement:Tt[5],className:Tt[0]})},i(Tt){bt||(transition_in$1(Rt,Tt),bt=!0)},o(Tt){transition_out(Rt,Tt),bt=!1},d(Tt){Tt&&detach$1(_e),Rt&&Rt.d(Tt),St=!1,run_all$1(Et)}}}function create_fragment55(et){let _e,tt,rt,nt;const st=[create_if_block2,create_else_block_1],dt=[];function ft(ht,mt){return ht[4]?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,[mt]){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function instance55(et,_e,tt){let{$$slots:rt={},$$scope:nt}=_e,{class:st=""}=_e,{name:dt="fastboard-ui"}=_e,{theme:ft="light"}=_e,{disabled:ht=!1}=_e,{content:mt=""}=_e,{placement:bt="top"}=_e,{menu:St=""}=_e,{menu_placement:Et="right-start"}=_e;function Ct(wt){bubble.call(this,et,wt)}function Rt(wt){bubble.call(this,et,wt)}function Tt(wt){bubble.call(this,et,wt)}return et.$$set=wt=>{"class"in wt&&tt(0,st=wt.class),"name"in wt&&tt(1,dt=wt.name),"theme"in wt&&tt(2,ft=wt.theme),"disabled"in wt&&tt(3,ht=wt.disabled),"content"in wt&&tt(4,mt=wt.content),"placement"in wt&&tt(5,bt=wt.placement),"menu"in wt&&tt(6,St=wt.menu),"menu_placement"in wt&&tt(7,Et=wt.menu_placement),"$$scope"in wt&&tt(8,nt=wt.$$scope)},[st,dt,ft,ht,mt,bt,St,Et,nt,rt,Ct,Rt,Tt]}var Button$1=class extends SvelteComponent$1{constructor(_e){super(),init$2(this,_e,instance55,create_fragment55,safe_not_equal$2,{class:0,name:1,theme:2,disabled:3,content:4,placement:5,menu:6,menu_placement:7})}},Button_default=Button$1;function create_default_slot_3(et){let _e,tt;return _e=new Icons_default.Undo({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_2(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.undo[et[2]],alt:"[undo]",$$slots:{default:[create_default_slot_3]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&6&&(ft.src=(dt=nt[1])==null?void 0:dt.undo[nt[2]]),st&524289&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_default_slot_1(et){let _e,tt;return _e=new Icons_default.Redo({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.redo[et[2]],alt:"[redo]",$$slots:{default:[create_default_slot_1]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&6&&(ft.src=(dt=nt[1])==null?void 0:dt.redo[nt[2]]),st&524289&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_fragment56(et){let _e,tt,rt,nt,st,dt;return tt=new Button_default({props:{class:"undo",name:name$1,theme:et[0],disabled:et[4],content:et[7].undo,$$slots:{default:[create_default_slot_2]},$$scope:{ctx:et}}}),tt.$on("click",et[10]),nt=new Button_default({props:{class:"redo",name:name$1,theme:et[0],disabled:et[3],content:et[7].redo,$$slots:{default:[create_default_slot]},$$scope:{ctx:et}}}),nt.$on("click",et[11]),{c(){_e=element$1("div"),create_component(tt.$$.fragment),rt=space$1(),create_component(nt.$$.fragment),attr$1(_e,"class",st=name$1+" "+et[0])},m(ft,ht){insert$1(ft,_e,ht),mount_component$1(tt,_e,null),append$1(_e,rt),mount_component$1(nt,_e,null),dt=!0},p(ft,[ht]){const mt={};ht&1&&(mt.theme=ft[0]),ht&16&&(mt.disabled=ft[4]),ht&128&&(mt.content=ft[7].undo),ht&524295&&(mt.$$scope={dirty:ht,ctx:ft}),tt.$set(mt);const bt={};ht&1&&(bt.theme=ft[0]),ht&8&&(bt.disabled=ft[3]),ht&128&&(bt.content=ft[7].redo),ht&524295&&(bt.$$scope={dirty:ht,ctx:ft}),nt.$set(bt),(!dt||ht&1&&st!==(st=name$1+" "+ft[0]))&&attr$1(_e,"class",st)},i(ft){dt||(transition_in$1(tt.$$.fragment,ft),transition_in$1(nt.$$.fragment,ft),dt=!0)},o(ft){transition_out(tt.$$.fragment,ft),transition_out(nt.$$.fragment,ft),dt=!1},d(ft){ft&&detach$1(_e),destroy_component$1(tt),destroy_component$1(nt)}}}var i18n={en:{redo:"Redo",undo:"Undo"},"zh-CN":{redo:"重做",undo:"撤销"}},name$1="fastboard-redo-undo";function instance56(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,St,Et=noop$8,Ct=()=>(Et(),Et=subscribe$1(ht,tr=>tt(15,St=tr)),ht),Rt,Tt=noop$8,wt=()=>(Tt(),Tt=subscribe$1(ft,tr=>tt(16,Rt=tr)),ft),At,Nt=noop$8,Pt=()=>(Nt(),Nt=subscribe$1(nt,tr=>tt(17,At=tr)),nt),It,Ft=noop$8,qt=()=>(Ft(),Ft=subscribe$1(rt,tr=>tt(18,It=tr)),rt);et.$$.on_destroy.push(()=>Et()),et.$$.on_destroy.push(()=>Tt()),et.$$.on_destroy.push(()=>Nt()),et.$$.on_destroy.push(()=>Ft());let{app:Vt=null}=_e,{theme:Kt="light"}=_e,{language:jt="en"}=_e,{icons:Ut=void 0}=_e,Ot;function Wt(){Vt?.undo()}function Bt(){Vt?.redo()}return et.$$set=tr=>{"app"in tr&&tt(12,Vt=tr.app),"theme"in tr&&tt(0,Kt=tr.theme),"language"in tr&&tt(13,jt=tr.language),"icons"in tr&&tt(1,Ut=tr.icons)},et.$$.update=()=>{et.$$.dirty&4096&&qt(tt(9,rt=Vt?.writable)),et.$$.dirty&4096&&Pt(tt(8,nt=Vt?.phase)),et.$$.dirty&393216&&tt(14,st=!(It&&At==="connected")),et.$$.dirty&8192&&tt(7,dt=i18n[jt]),et.$$.dirty&16384&&tt(2,Ot=st?"disable":"normal"),et.$$.dirty&4096&&wt(tt(6,ft=Vt?.canUndoSteps)),et.$$.dirty&4096&&Ct(tt(5,ht=Vt?.canRedoSteps)),et.$$.dirty&81920&&tt(4,mt=st||!Rt),et.$$.dirty&49152&&tt(3,bt=st||!St)},[Kt,Ut,Ot,bt,mt,ht,ft,dt,nt,rt,Wt,Bt,Vt,jt,st,St,Rt,At,It]}var RedoUndo$1=class extends SvelteComponent$1{constructor(_e){super(),init$2(this,_e,instance56,create_fragment56,safe_not_equal$2,{app:12,theme:0,language:13,icons:1})}},RedoUndo_default=RedoUndo$1;function create_default_slot_5(et){let _e,tt;return _e=new Icons_default.Left({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_4(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.prev[et[5]],alt:"[prev]",$$slots:{default:[create_default_slot_5]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.prev[nt[5]]),st&1048577&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_else_block3(et){let _e=et[4]+1+"",tt,rt,nt;return{c(){tt=text$2(_e),rt=text$2("/"),nt=text$2(et[3])},m(st,dt){insert$1(st,tt,dt),insert$1(st,rt,dt),insert$1(st,nt,dt)},p(st,dt){dt&16&&_e!==(_e=st[4]+1+"")&&set_data$1(tt,_e),dt&8&&set_data$1(nt,st[3])},d(st){st&&detach$1(tt),st&&detach$1(rt),st&&detach$1(nt)}}}function create_if_block3(et){let _e;return{c(){_e=text$2("…")},m(tt,rt){insert$1(tt,_e,rt)},p:noop$8,d(tt){tt&&detach$1(_e)}}}function create_default_slot_32(et){let _e,tt;return _e=new Icons_default.Right({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_22(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.next[et[5]],alt:"[next]",$$slots:{default:[create_default_slot_32]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.next[nt[5]]),st&1048577&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_default_slot_12(et){let _e,tt;return _e=new Icons_default.WhiteboardAdd({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot2(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.add[et[5]],alt:"[add]",$$slots:{default:[create_default_slot_12]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.add[nt[5]]),st&1048577&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_fragment57(et){let _e,tt,rt,nt,st,dt,ft,ht,mt,bt,St;tt=new Button_default({props:{class:"prev",name:name2,theme:et[0],disabled:et[7],content:et[10].prev,$$slots:{default:[create_default_slot_4]},$$scope:{ctx:et}}}),tt.$on("click",et[13]);function Et(Tt,wt){return Tt[4]==null||Tt[3]==null?create_if_block3:create_else_block3}let Ct=Et(et),Rt=Ct(et);return ft=new Button_default({props:{class:"next",name:name2,theme:et[0],disabled:et[6],content:et[10].next,$$slots:{default:[create_default_slot_22]},$$scope:{ctx:et}}}),ft.$on("click",et[14]),mt=new Button_default({props:{class:"add",name:name2,theme:et[0],disabled:et[2],content:et[10].add,$$slots:{default:[create_default_slot2]},$$scope:{ctx:et}}}),mt.$on("click",et[15]),{c(){_e=element$1("div"),create_component(tt.$$.fragment),rt=space$1(),nt=element$1("span"),Rt.c(),dt=space$1(),create_component(ft.$$.fragment),ht=space$1(),create_component(mt.$$.fragment),attr$1(nt,"class",st=name2+"-text "+et[0]),attr$1(_e,"class",bt=name2+" "+et[0])},m(Tt,wt){insert$1(Tt,_e,wt),mount_component$1(tt,_e,null),append$1(_e,rt),append$1(_e,nt),Rt.m(nt,null),append$1(_e,dt),mount_component$1(ft,_e,null),append$1(_e,ht),mount_component$1(mt,_e,null),St=!0},p(Tt,[wt]){const At={};wt&1&&(At.theme=Tt[0]),wt&128&&(At.disabled=Tt[7]),wt&1024&&(At.content=Tt[10].prev),wt&1048611&&(At.$$scope={dirty:wt,ctx:Tt}),tt.$set(At),Ct===(Ct=Et(Tt))&&Rt?Rt.p(Tt,wt):(Rt.d(1),Rt=Ct(Tt),Rt&&(Rt.c(),Rt.m(nt,null))),(!St||wt&1&&st!==(st=name2+"-text "+Tt[0]))&&attr$1(nt,"class",st);const Nt={};wt&1&&(Nt.theme=Tt[0]),wt&64&&(Nt.disabled=Tt[6]),wt&1024&&(Nt.content=Tt[10].next),wt&1048611&&(Nt.$$scope={dirty:wt,ctx:Tt}),ft.$set(Nt);const Pt={};wt&1&&(Pt.theme=Tt[0]),wt&4&&(Pt.disabled=Tt[2]),wt&1024&&(Pt.content=Tt[10].add),wt&1048611&&(Pt.$$scope={dirty:wt,ctx:Tt}),mt.$set(Pt),(!St||wt&1&&bt!==(bt=name2+" "+Tt[0]))&&attr$1(_e,"class",bt)},i(Tt){St||(transition_in$1(tt.$$.fragment,Tt),transition_in$1(ft.$$.fragment,Tt),transition_in$1(mt.$$.fragment,Tt),St=!0)},o(Tt){transition_out(tt.$$.fragment,Tt),transition_out(ft.$$.fragment,Tt),transition_out(mt.$$.fragment,Tt),St=!1},d(Tt){Tt&&detach$1(_e),destroy_component$1(tt),Rt.d(),destroy_component$1(ft),destroy_component$1(mt)}}}var i18n2={en:{prev:"Prev Page",next:"Next Page",add:"Add Page"},"zh-CN":{prev:"上一页",next:"下一页",add:"添加页面"}},name2="fastboard-page-control";function instance57(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,St,Et=noop$8,Ct=()=>(Et(),Et=subscribe$1(ht,Jt=>tt(3,St=Jt)),ht),Rt,Tt=noop$8,wt=()=>(Tt(),Tt=subscribe$1(ft,Jt=>tt(4,Rt=Jt)),ft),At,Nt=noop$8,Pt=()=>(Nt(),Nt=subscribe$1(nt,Jt=>tt(18,At=Jt)),nt),It,Ft=noop$8,qt=()=>(Ft(),Ft=subscribe$1(rt,Jt=>tt(19,It=Jt)),rt);et.$$.on_destroy.push(()=>Et()),et.$$.on_destroy.push(()=>Tt()),et.$$.on_destroy.push(()=>Nt()),et.$$.on_destroy.push(()=>Ft());let{app:Vt=null}=_e,{theme:Kt="light"}=_e,{language:jt="en"}=_e,{icons:Ut=void 0}=_e,Ot;function Wt(){Vt?.prevPage()}function Bt(){Vt?.nextPage()}function tr(){Vt?.addPage({after:!0}),Vt?.nextPage()}return et.$$set=Jt=>{"app"in Jt&&tt(16,Vt=Jt.app),"theme"in Jt&&tt(0,Kt=Jt.theme),"language"in Jt&&tt(17,jt=Jt.language),"icons"in Jt&&tt(1,Ut=Jt.icons)},et.$$.update=()=>{et.$$.dirty&65536&&qt(tt(12,rt=Vt?.writable)),et.$$.dirty&65536&&Pt(tt(11,nt=Vt?.phase)),et.$$.dirty&786432&&tt(2,st=!(It&&At==="connected")),et.$$.dirty&131072&&tt(10,dt=i18n2[jt]),et.$$.dirty&4&&tt(5,Ot=st?"disable":"normal"),et.$$.dirty&65536&&wt(tt(9,ft=Vt?.sceneIndex)),et.$$.dirty&65536&&Ct(tt(8,ht=Vt?.sceneLength)),et.$$.dirty&20&&tt(7,mt=st||!Rt),et.$$.dirty&28&&tt(6,bt=st||St==null||Rt===St-1)},[Kt,Ut,st,St,Rt,Ot,bt,mt,ht,ft,dt,nt,rt,Wt,Bt,tr,Vt,jt,At,It]}var PageControl=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance57,create_fragment57,safe_not_equal$2,{app:16,theme:0,language:17,icons:1})}},PageControl_default=PageControl;function clamp$5(et,_e,tt){return et<_e?_e:et>tt?tt:et}function create_default_slot_52(et){let _e,tt;return _e=new Icons_default.Plus({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_42(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.plus[et[5]],alt:"[plus]",$$slots:{default:[create_default_slot_52]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.plus[nt[5]]),st&524289&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_else_block4(et){let _e=Math.ceil(et[2]*100)+"",tt,rt;return{c(){tt=text$2(_e),rt=text$2("%")},m(nt,st){insert$1(nt,tt,st),insert$1(nt,rt,st)},p(nt,st){st&4&&_e!==(_e=Math.ceil(nt[2]*100)+"")&&set_data$1(tt,_e)},d(nt){nt&&detach$1(tt),nt&&detach$1(rt)}}}function create_if_block4(et){let _e;return{c(){_e=text$2("…")},m(tt,rt){insert$1(tt,_e,rt)},p:noop$8,d(tt){tt&&detach$1(_e)}}}function create_default_slot_33(et){let _e,tt;return _e=new Icons_default.Minus({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_23(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.minus[et[5]],alt:"[minus]",$$slots:{default:[create_default_slot_33]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.minus[nt[5]]),st&524289&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_default_slot_13(et){let _e,tt;return _e=new Icons_default.Reset({props:{theme:et[0]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.theme=rt[0]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot3(et){var _e;let tt,rt;return tt=new Icon_default({props:{src:(_e=et[1])==null?void 0:_e.reset[et[5]],alt:"[reset]",$$slots:{default:[create_default_slot_13]},$$scope:{ctx:et}}}),{c(){create_component(tt.$$.fragment)},m(nt,st){mount_component$1(tt,nt,st),rt=!0},p(nt,st){var dt;const ft={};st&34&&(ft.src=(dt=nt[1])==null?void 0:dt.reset[nt[5]]),st&524289&&(ft.$$scope={dirty:st,ctx:nt}),tt.$set(ft)},i(nt){rt||(transition_in$1(tt.$$.fragment,nt),rt=!0)},o(nt){transition_out(tt.$$.fragment,nt),rt=!1},d(nt){destroy_component$1(tt,nt)}}}function create_fragment58(et){let _e,tt,rt,nt,st,dt,ft,ht,mt,bt,St;tt=new Button_default({props:{class:"plus",name:name3,theme:et[0],disabled:et[7],content:et[9].plus,$$slots:{default:[create_default_slot_42]},$$scope:{ctx:et}}}),tt.$on("click",et[12]);function Et(Tt,wt){return Tt[4]==null?create_if_block4:create_else_block4}let Ct=Et(et),Rt=Ct(et);return ft=new Button_default({props:{class:"minus",name:name3,theme:et[0],disabled:et[6],content:et[9].minus,$$slots:{default:[create_default_slot_23]},$$scope:{ctx:et}}}),ft.$on("click",et[13]),mt=new Button_default({props:{class:"reset",name:name3,theme:et[0],disabled:et[3],content:et[9].reset,$$slots:{default:[create_default_slot3]},$$scope:{ctx:et}}}),mt.$on("click",et[14]),{c(){_e=element$1("div"),create_component(tt.$$.fragment),rt=space$1(),nt=element$1("span"),Rt.c(),dt=space$1(),create_component(ft.$$.fragment),ht=space$1(),create_component(mt.$$.fragment),attr$1(nt,"class",st=name3+"-text "+et[0]),attr$1(_e,"class",bt=name3+" "+et[0])},m(Tt,wt){insert$1(Tt,_e,wt),mount_component$1(tt,_e,null),append$1(_e,rt),append$1(_e,nt),Rt.m(nt,null),append$1(_e,dt),mount_component$1(ft,_e,null),append$1(_e,ht),mount_component$1(mt,_e,null),St=!0},p(Tt,[wt]){const At={};wt&1&&(At.theme=Tt[0]),wt&128&&(At.disabled=Tt[7]),wt&512&&(At.content=Tt[9].plus),wt&524323&&(At.$$scope={dirty:wt,ctx:Tt}),tt.$set(At),Ct===(Ct=Et(Tt))&&Rt?Rt.p(Tt,wt):(Rt.d(1),Rt=Ct(Tt),Rt&&(Rt.c(),Rt.m(nt,null))),(!St||wt&1&&st!==(st=name3+"-text "+Tt[0]))&&attr$1(nt,"class",st);const Nt={};wt&1&&(Nt.theme=Tt[0]),wt&64&&(Nt.disabled=Tt[6]),wt&512&&(Nt.content=Tt[9].minus),wt&524323&&(Nt.$$scope={dirty:wt,ctx:Tt}),ft.$set(Nt);const Pt={};wt&1&&(Pt.theme=Tt[0]),wt&8&&(Pt.disabled=Tt[3]),wt&512&&(Pt.content=Tt[9].reset),wt&524323&&(Pt.$$scope={dirty:wt,ctx:Tt}),mt.$set(Pt),(!St||wt&1&&bt!==(bt=name3+" "+Tt[0]))&&attr$1(_e,"class",bt)},i(Tt){St||(transition_in$1(tt.$$.fragment,Tt),transition_in$1(ft.$$.fragment,Tt),transition_in$1(mt.$$.fragment,Tt),St=!0)},o(Tt){transition_out(tt.$$.fragment,Tt),transition_out(ft.$$.fragment,Tt),transition_out(mt.$$.fragment,Tt),St=!1},d(Tt){Tt&&detach$1(_e),destroy_component$1(tt),Rt.d(),destroy_component$1(ft),destroy_component$1(mt)}}}var i18n3={en:{plus:"Zoom In",minus:"Zoom Out",reset:"Reset"},"zh-CN":{plus:"放大",minus:"缩小",reset:"重置"}},scales=[.3,.4096000000000002,.5120000000000001,.6400000000000001,.8,1,1.26,1.5876000000000001,2.000376,2.5204737600000002,3];function next_scale(et,_e){const{length:tt}=scales,rt=tt-1;if(et<scales[0])return scales[0];if(et>scales[rt])return scales[rt];for(let nt=0;nt<tt;++nt){const st=scales[nt],dt=nt===0?-1/0:(scales[nt-1]+st)/2,ft=nt===rt?1/0:(scales[nt+1]+st)/2;if(dt<=et&&et<=ft)return scales[clamp$5(nt+_e,0,rt)]}return 1}var name3="fastboard-zoom-control";function instance58(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,St,Et=noop$8,Ct=()=>(Et(),Et=subscribe$1(ft,Wt=>tt(4,St=Wt)),ft),Rt,Tt=noop$8,wt=()=>(Tt(),Tt=subscribe$1(nt,Wt=>tt(17,Rt=Wt)),nt),At,Nt=noop$8,Pt=()=>(Nt(),Nt=subscribe$1(rt,Wt=>tt(18,At=Wt)),rt);et.$$.on_destroy.push(()=>Et()),et.$$.on_destroy.push(()=>Tt()),et.$$.on_destroy.push(()=>Nt());let{app:It=null}=_e,{theme:Ft="light"}=_e,{language:qt="en"}=_e,{icons:Vt=void 0}=_e,Kt;function jt(){It?.moveCamera({scale:next_scale(ht,1),centerX:0,centerY:0})}function Ut(){It?.moveCamera({scale:next_scale(ht,-1),centerX:0,centerY:0})}function Ot(){It?.moveCamera({scale:1,centerX:0,centerY:0})}return et.$$set=Wt=>{"app"in Wt&&tt(15,It=Wt.app),"theme"in Wt&&tt(0,Ft=Wt.theme),"language"in Wt&&tt(16,qt=Wt.language),"icons"in Wt&&tt(1,Vt=Wt.icons)},et.$$.update=()=>{var Wt;et.$$.dirty&32768&&Pt(tt(11,rt=It?.writable)),et.$$.dirty&32768&&wt(tt(10,nt=It?.phase)),et.$$.dirty&393216&&tt(3,st=!(At&&Rt==="connected")),et.$$.dirty&65536&&tt(9,dt=i18n3[qt]),et.$$.dirty&8&&tt(5,Kt=st?"disable":"normal"),et.$$.dirty&32768&&Ct(tt(8,ft=It?.camera)),et.$$.dirty&16&&tt(2,ht=(Wt=St?.scale)!=null?Wt:1),et.$$.dirty&12&&tt(7,mt=st||next_scale(ht,1)===ht),et.$$.dirty&12&&tt(6,bt=st||next_scale(ht,-1)===ht)},[Ft,Vt,ht,st,St,Kt,bt,mt,ft,dt,nt,rt,jt,Ut,Ot,It,qt,Rt,At]}var ZoomControl=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance58,create_fragment58,safe_not_equal$2,{app:15,theme:0,language:16,icons:1})}},ZoomControl_default=ZoomControl,subscriber_queue=[];function writable$1(et,_e=noop$8){let tt;const rt=new Set;function nt(ft){if(safe_not_equal$2(et,ft)&&(et=ft,tt)){const ht=!subscriber_queue.length;for(const mt of rt)mt[1](),subscriber_queue.push(mt,et);if(ht){for(let mt=0;mt<subscriber_queue.length;mt+=2)subscriber_queue[mt][0](subscriber_queue[mt+1]);subscriber_queue.length=0}}}function st(ft){nt(ft(et))}function dt(ft,ht=noop$8){const mt=[ft,ht];return rt.add(mt),rt.size===1&&(tt=_e(nt)||noop$8),ft(et),()=>{rt.delete(mt),rt.size===0&&tt&&(tt(),tt=null)}}return{set:nt,update:st,subscribe:dt}}var height=function(et,_e){const tt=getComputedStyle(et),rt=(parseInt(tt.paddingTop)||0)+(parseInt(tt.paddingBottom)||0)+(parseInt(tt.borderTopWidth)||0)+(parseInt(tt.borderBottomWidth)||0),nt=new ResizeObserver(()=>{_e.set(et.getBoundingClientRect().height-rt)});return nt.observe(et),{update(st){_e=st},destroy(){nt.disconnect()}}},scrollHeight=function(et,_e){const tt=new ResizeObserver(()=>{_e.set(et.scrollHeight)});return tt.observe(et),{update(rt){_e=rt},destroy(){tt.disconnect()}}},default_items=["clicker","selector","pencil","text","shapes","eraser","clear"],colors={"#E02020":[224,32,32],"#F7B500":[247,181,0],"#6DD400":[109,212,0],"#32C5FF":[50,197,255],"#0091FF":[0,145,255],"#6236FF":[98,54,255],"#B620E0":[182,32,224],"#6D7278":[109,114,120]},default_colors=Object.values(colors),shapes=["rectangle","ellipse","straight","arrow","pentagram","rhombus","triangle","speechBalloon"],applianceShapes=shapes.slice(0,4),shapesIcon={rectangle:Icons_default.Rectangle,ellipse:Icons_default.Circle,straight:Icons_default.Line,arrow:Icons_default.Arrow,pentagram:Icons_default.Star,rhombus:Icons_default.Rhombus,triangle:Icons_default.Triangle,speechBalloon:Icons_default.Balloon},shapesIconActive={rectangle:Icons_default.RectangleBolded,ellipse:Icons_default.CircleBolded,straight:Icons_default.LineBolded,arrow:Icons_default.ArrowBolded,pentagram:Icons_default.StarBolded,rhombus:Icons_default.RhombusBolded,triangle:Icons_default.TriangleBolded,speechBalloon:Icons_default.BalloonBolded},i18n4={en:{clicker:"clicker",selector:"selector",pencil:"pencil",eraser:"eraser",text:"text",shapes:"shapes",clear:"clear",apps:"apps",hand:"hand",laserPointer:"laser pointer"},"zh-CN":{clicker:"点击",selector:"选择",pencil:"铅笔",eraser:"橡皮",text:"文字",shapes:"形状",clear:"清屏",apps:"Apps",hand:"抓手",laserPointer:"激光笔"}},scrollTop=function(et,_e){const tt=dt=>{et.scrollTo({top:dt,behavior:"smooth"})};let rt=0;function nt(){clearTimeout(rt),rt=window.setTimeout(()=>_e.set(et.scrollTop),200)}et.addEventListener("scroll",nt);let st=_e.subscribe(tt);return{update(dt){st(),st=(_e=dt).subscribe(tt)},destroy(){clearTimeout(rt),et.removeEventListener("scroll",nt),st()}}},visual_studio_code_default='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1.01em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 254" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><defs><linearGradient id="IconifyId-17f872155be-cc766e-5439" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0%" stop-color="%23FFF"/><stop offset="100%" stop-color="%23FFF" stop-opacity="0"/></linearGradient><path id="IconifyId-17f872155be-cc766e-5440" d="M180.828 252.605a15.872 15.872 0 0 0 12.65-.486l52.501-25.262a15.94 15.94 0 0 0 9.025-14.364V41.197a15.939 15.939 0 0 0-9.025-14.363l-52.5-25.263a15.877 15.877 0 0 0-18.115 3.084L74.857 96.35l-43.78-33.232a10.614 10.614 0 0 0-13.56.603L3.476 76.494c-4.63 4.211-4.635 11.495-.012 15.713l37.967 34.638l-37.967 34.637c-4.623 4.219-4.618 11.502.012 15.714l14.041 12.772a10.614 10.614 0 0 0 13.56.604l43.78-33.233l100.507 91.695a15.853 15.853 0 0 0 5.464 3.571Zm10.464-183.649l-76.262 57.889l76.262 57.888V68.956Z"/></defs><mask id="IconifyId-17f872155be-cc766e-5441" fill="%23fff"><use href="%23IconifyId-17f872155be-cc766e-5440"/></mask><path fill="%230065A9" d="M246.135 26.873L193.593 1.575a15.885 15.885 0 0 0-18.123 3.08L3.466 161.482c-4.626 4.219-4.62 11.502.012 15.714l14.05 12.772a10.625 10.625 0 0 0 13.569.604L238.229 33.436c6.949-5.271 16.93-.315 16.93 8.407v-.61a15.938 15.938 0 0 0-9.024-14.36Z" mask="url(%23IconifyId-17f872155be-cc766e-5441)"/><path fill="%23007ACC" d="m246.135 226.816l-52.542 25.298a15.887 15.887 0 0 1-18.123-3.08L3.466 92.207c-4.626-4.218-4.62-11.502.012-15.713l14.05-12.773a10.625 10.625 0 0 1 13.569-.603l207.132 157.135c6.949 5.271 16.93.315 16.93-8.408v.611a15.939 15.939 0 0 1-9.024 14.36Z" mask="url(%23IconifyId-17f872155be-cc766e-5441)"/><path fill="%231F9CF0" d="M193.428 252.134a15.892 15.892 0 0 1-18.125-3.083c5.881 5.88 15.938 1.715 15.938-6.603V11.273c0-8.318-10.057-12.483-15.938-6.602a15.892 15.892 0 0 1 18.125-3.084l52.533 25.263a15.937 15.937 0 0 1 9.03 14.363V212.51c0 6.125-3.51 11.709-9.03 14.363l-52.533 25.262Z" mask="url(%23IconifyId-17f872155be-cc766e-5441)"/><path fill="url(%23IconifyId-17f872155be-cc766e-5439)" fill-opacity=".25" d="M180.828 252.605a15.874 15.874 0 0 0 12.65-.486l52.5-25.263a15.938 15.938 0 0 0 9.026-14.363V41.197a15.939 15.939 0 0 0-9.025-14.363L193.477 1.57a15.877 15.877 0 0 0-18.114 3.084L74.857 96.35l-43.78-33.232a10.614 10.614 0 0 0-13.56.603L3.476 76.494c-4.63 4.211-4.635 11.495-.012 15.713l37.967 34.638l-37.967 34.637c-4.623 4.219-4.618 11.502.012 15.714l14.041 12.772a10.614 10.614 0 0 0 13.56.604l43.78-33.233l100.506 91.695a15.857 15.857 0 0 0 5.465 3.571Zm10.464-183.65l-76.262 57.89l76.262 57.888V68.956Z" mask="url(%23IconifyId-17f872155be-cc766e-5441)"/></svg>',geogebra_default='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--arcticons" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 48 48"><path fill="none" stroke="%236557d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M24 3a4.77 4.77 0 1 0 4.77 4.77A4.78 4.78 0 0 0 24 3ZM7.69 14.86a4.77 4.77 0 1 0 4.76 4.77a4.76 4.76 0 0 0-4.76-4.77Zm32.64 0a4.77 4.77 0 1 0 4.77 4.77a4.77 4.77 0 0 0-4.77-4.77ZM13.92 34.05a4.77 4.77 0 1 0 4.77 4.77a4.76 4.76 0 0 0-4.77-4.77Zm20.18 0a4.77 4.77 0 1 0 4.76 4.77a4.76 4.76 0 0 0-4.76-4.77Z"></path><path fill="none" stroke="%236557d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M19.27 8.35a17.24 17.24 0 0 0-9.73 6.87m28.51.22a17.28 17.28 0 0 0-9.34-6.94m8.7 26.89A17.09 17.09 0 0 0 40.93 25v-.61M18 41.22a17.23 17.23 0 0 0 5.68 1a17 17 0 0 0 6.2-1.22M6.53 24.25v.72a17.16 17.16 0 0 0 3.77 10.76"></path></svg>',countdown_default='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--radix-icons" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 15 15"><path fill="grey" fill-rule="evenodd" d="M13.15 7.5c0-2.835-2.21-5.65-5.65-5.65c-2.778 0-4.151 2.056-4.737 3.15H4.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 1 0v1.813C2.705 3.071 4.334.85 7.5.85c4.063 0 6.65 3.335 6.65 6.65c0 3.315-2.587 6.65-6.65 6.65c-1.944 0-3.562-.77-4.715-1.942a6.772 6.772 0 0 1-1.427-2.167a.5.5 0 1 1 .925-.38c.28.681.692 1.314 1.216 1.846c.972.99 2.336 1.643 4.001 1.643c3.44 0 5.65-2.815 5.65-5.65ZM7 10V5h1v5H7Z" clip-rule="evenodd"></path></svg>',AppsInToolbar=class{constructor(et){this._data=et,__publicField$2(this,"_listeners",[])}get data(){return this._data}get length(){return this._data.length}subscribe(et){return this._listeners.push(et),et(this._data),()=>{this._listeners=this._listeners.filter(_e=>_e!==et)}}push(...et){this._data.push(...et),this._listeners.forEach(_e=>_e(this._data))}insert(et,_e){this._data.splice(_e,0,et),this._listeners.forEach(tt=>tt(this._data))}delete(et){this._data=this._data.filter(_e=>!et(_e)),this._listeners.forEach(_e=>_e(this._data))}clear(){this._data.length=0,this._listeners.forEach(et=>et(this._data))}},apps$1=new AppsInToolbar([{kind:"Monaco",icon:visual_studio_code_default,label:"Code Editor",onClick(et){et.manager.addApp({kind:"Monaco",options:{title:"Code Editor"}})}},{kind:"GeoGebra",icon:geogebra_default,label:"GeoGebra",onClick(et){et.manager.addApp({kind:"GeoGebra",options:{title:"GeoGebra"}})}},{kind:"Countdown",icon:countdown_default,label:"Countdown",onClick(et){et.manager.addApp({kind:"Countdown",options:{title:"Countdown"}})}}]);function tooltip(et,_e){if(!_e||typeof _e!="string")return et;const tt=element$1("span"),rt=element$1("span");rt.textContent=et;const nt=element$1("span");return nt.textContent=_e.toUpperCase(),attr$1(tt,"class","fastboard-toolbar-tooltip"),attr$1(nt,"class","fastboard-toolbar-hotkey"),append$1(tt,rt),append$1(tt,nt),tt}function rgbToHex(et,_e,tt){return"#"+((et<<16)+(_e<<8)+tt).toString(16).padStart(6,"0")}function hexToRgb(et){if(et=et.replace(/^#/,""),et.length!==6)throw new Error("Invalid hex color");const _e=parseInt(et.slice(0,2),16),tt=parseInt(et.slice(2,4),16),rt=parseInt(et.slice(4,6),16);return[_e,tt,rt]}function create_fragment59(et){let _e,tt,rt,nt,st,dt;return{c(){_e=element$1("div"),tt=element$1("input"),attr$1(tt,"class",rt=name4+"-track "+et[2]),attr$1(tt,"type","range"),tt.disabled=et[6],attr$1(tt,"min",et[3]),attr$1(tt,"max",et[4]),attr$1(tt,"step",et[5]),attr$1(tt,"aria-valuemin",et[3]),attr$1(tt,"aria-valuemax",et[4]),attr$1(tt,"aria-valuenow",et[0]),toggle_class(tt,"grabbing",et[8]),attr$1(_e,"class",nt=name4+" "+et[1]+" "+et[2]),set_style$1(_e,"--value",et[9]+"%")},m(ft,ht){insert$1(ft,_e,ht),append$1(_e,tt),set_input_value(tt,et[7]),st||(dt=[listen$1(tt,"change",et[12]),listen$1(tt,"input",et[12]),listen$1(tt,"pointerdown",et[10]),listen$1(tt,"change",et[11])],st=!0)},p(ft,[ht]){ht&4&&rt!==(rt=name4+"-track "+ft[2])&&attr$1(tt,"class",rt),ht&64&&(tt.disabled=ft[6]),ht&8&&attr$1(tt,"min",ft[3]),ht&16&&attr$1(tt,"max",ft[4]),ht&32&&attr$1(tt,"step",ft[5]),ht&8&&attr$1(tt,"aria-valuemin",ft[3]),ht&16&&attr$1(tt,"aria-valuemax",ft[4]),ht&1&&attr$1(tt,"aria-valuenow",ft[0]),ht&128&&set_input_value(tt,ft[7]),ht&260&&toggle_class(tt,"grabbing",ft[8]),ht&6&&nt!==(nt=name4+" "+ft[1]+" "+ft[2])&&attr$1(_e,"class",nt),ht&512&&set_style$1(_e,"--value",ft[9]+"%")},i:noop$8,o:noop$8,d(ft){ft&&detach$1(_e),st=!1,run_all$1(dt)}}}var name4="fastboard-slider";function instance59(et,_e,tt){let rt;const nt=createEventDispatcher();let{class:st=""}=_e,{theme:dt="light"}=_e,{min:ft=0}=_e,{max:ht=100}=_e,{step:mt=.01}=_e,{value:bt=30}=_e,{disabled:St=!1}=_e,Et=bt,Ct=!1;function Rt(){tt(8,Ct=!0)}function Tt(){tt(8,Ct=!1),tt(0,bt=Et),nt("change",bt)}function wt(){Et=to_number(this.value),tt(7,Et),tt(0,bt),tt(8,Ct)}return et.$$set=At=>{"class"in At&&tt(1,st=At.class),"theme"in At&&tt(2,dt=At.theme),"min"in At&&tt(3,ft=At.min),"max"in At&&tt(4,ht=At.max),"step"in At&&tt(5,mt=At.step),"value"in At&&tt(0,bt=At.value),"disabled"in At&&tt(6,St=At.disabled)},et.$$.update=()=>{et.$$.dirty&385&&bt!==Et&&!Ct&&tt(7,Et=bt),et.$$.dirty&152&&tt(9,rt=100*(Et-ft)/(ht-ft))},[bt,st,dt,ft,ht,mt,St,Et,Ct,rt,Rt,Tt,wt]}var Slider$1=class extends SvelteComponent$1{constructor(_e){super(),init$2(this,_e,instance59,create_fragment59,safe_not_equal$2,{class:1,theme:2,min:3,max:4,step:5,value:0,disabled:6})}},Slider_default=Slider$1;function create_fragment60(et){let _e,tt;const rt=[{class:"fastboard-toolbar-slider"},et[0],{min:1},{max:32}];let nt={};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Slider_default({props:nt}),_e.$on("change",et[2]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&1?get_spread_update(rt,[rt[0],get_spread_object(st[0]),rt[2],rt[3]]):{};_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance60(et,_e,tt){let rt,nt,st,dt,ft=noop$8,ht=()=>(ft(),ft=subscribe$1(rt,Ct=>tt(7,dt=Ct)),rt);et.$$.on_destroy.push(()=>ft());let{app:mt=null}=_e,{theme:bt="light"}=_e,{disabled:St=!1}=_e;function Et({detail:Ct}){mt?.setStrokeWidth(Ct)}return et.$$set=Ct=>{"app"in Ct&&tt(3,mt=Ct.app),"theme"in Ct&&tt(4,bt=Ct.theme),"disabled"in Ct&&tt(5,St=Ct.disabled)},et.$$.update=()=>{var Ct;et.$$.dirty&8&&ht(tt(1,rt=mt?.memberState)),et.$$.dirty&128&&tt(6,nt=(Ct=dt?.strokeWidth)!=null?Ct:1),et.$$.dirty&112&&tt(0,st={value:nt,theme:bt,disabled:St})},[st,rt,Et,mt,bt,St,nt,dt]}var StrokeWidth=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance60,create_fragment60,safe_not_equal$2,{app:3,theme:4,disabled:5})}},StrokeWidth_default=StrokeWidth;function get_each_context(et,_e,tt){const rt=et.slice();return rt[8]=_e[tt],rt}function create_each_block(et){let _e,tt,rt,nt,st;return{c(){_e=element$1("button"),tt=element$1("span"),rt=space$1(),attr$1(tt,"class","fastboard-toolbar-color-item"),set_style$1(tt,"background-color",rgbToHex(et[8][0],et[8][1],et[8][2])),attr$1(_e,"class",nt="fastboard-toolbar-btn fastboard-toolbar-color-btn "+et[0]),attr$1(_e,"data-color-key",st=rgbToHex(et[8][0],et[8][1],et[8][2])),_e.disabled=et[1],toggle_class(_e,"is-active",is_equal_color(et[3],et[8]))},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt)},p(dt,ft){ft&4&&set_style$1(tt,"background-color",rgbToHex(dt[8][0],dt[8][1],dt[8][2])),ft&1&&nt!==(nt="fastboard-toolbar-btn fastboard-toolbar-color-btn "+dt[0])&&attr$1(_e,"class",nt),ft&4&&st!==(st=rgbToHex(dt[8][0],dt[8][1],dt[8][2]))&&attr$1(_e,"data-color-key",st),ft&2&&(_e.disabled=dt[1]),ft&13&&toggle_class(_e,"is-active",is_equal_color(dt[3],dt[8]))},d(dt){dt&&detach$1(_e)}}}function create_fragment61(et){let _e,tt,rt,nt,st=et[2],dt=[];for(let ft=0;ft<st.length;ft+=1)dt[ft]=create_each_block(get_each_context(et,st,ft));return{c(){_e=element$1("div");for(let ft=0;ft<dt.length;ft+=1)dt[ft].c();attr$1(_e,"class",tt="fastboard-toolbar-colors "+et[0])},m(ft,ht){insert$1(ft,_e,ht);for(let mt=0;mt<dt.length;mt+=1)dt[mt]&&dt[mt].m(_e,null);rt||(nt=listen$1(_e,"click",et[5]),rt=!0)},p(ft,[ht]){if(ht&15){st=ft[2];let mt;for(mt=0;mt<st.length;mt+=1){const bt=get_each_context(ft,st,mt);dt[mt]?dt[mt].p(bt,ht):(dt[mt]=create_each_block(bt),dt[mt].c(),dt[mt].m(_e,null))}for(;mt<dt.length;mt+=1)dt[mt].d(1);dt.length=st.length}ht&1&&tt!==(tt="fastboard-toolbar-colors "+ft[0])&&attr$1(_e,"class",tt)},i:noop$8,o:noop$8,d(ft){ft&&detach$1(_e),destroy_each(dt,ft),rt=!1,nt()}}}function is_equal_color(et,_e){return et&&_e&&et.every((tt,rt)=>tt===_e[rt])}function instance61(et,_e,tt){let rt,nt,st,dt=noop$8,ft=()=>(dt(),dt=subscribe$1(rt,Ct=>tt(7,st=Ct)),rt);et.$$.on_destroy.push(()=>dt());let{app:ht=null}=_e,{theme:mt="light"}=_e,{disabled:bt=!1}=_e,{colors:St=default_colors}=_e;function Et(Ct){let Rt=Ct.target;if(Rt&&Rt.dataset.colorKey){let Tt=Rt.dataset.colorKey;Tt&&ht&&ht.setStrokeColor(hexToRgb(Tt))}}return et.$$set=Ct=>{"app"in Ct&&tt(6,ht=Ct.app),"theme"in Ct&&tt(0,mt=Ct.theme),"disabled"in Ct&&tt(1,bt=Ct.disabled),"colors"in Ct&&tt(2,St=Ct.colors)},et.$$.update=()=>{et.$$.dirty&64&&ft(tt(4,rt=ht?.memberState)),et.$$.dirty&128&&tt(3,nt=st?.strokeColor)},[mt,bt,St,nt,rt,Et,ht,st]}var StrokeColor=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance61,create_fragment61,safe_not_equal$2,{app:6,theme:0,disabled:1,colors:2})}},StrokeColor_default=StrokeColor;function get_each_context2(et,_e,tt){const rt=et.slice();return rt[8]=_e[tt],rt}function create_each_block2(et){let _e,tt,rt,nt,st;return{c(){_e=element$1("button"),tt=element$1("span"),rt=space$1(),attr$1(tt,"class","fastboard-toolbar-color-item"),set_style$1(tt,"background-color",rgbToHex(et[8][0],et[8][1],et[8][2])),attr$1(_e,"class",nt="fastboard-toolbar-btn fastboard-toolbar-color-btn "+et[0]),attr$1(_e,"data-color-key",st=rgbToHex(et[8][0],et[8][1],et[8][2])),_e.disabled=et[1],toggle_class(_e,"is-active",is_equal_color2(et[3],et[8]))},m(dt,ft){insert$1(dt,_e,ft),append$1(_e,tt),append$1(_e,rt)},p(dt,ft){ft&4&&set_style$1(tt,"background-color",rgbToHex(dt[8][0],dt[8][1],dt[8][2])),ft&1&&nt!==(nt="fastboard-toolbar-btn fastboard-toolbar-color-btn "+dt[0])&&attr$1(_e,"class",nt),ft&4&&st!==(st=rgbToHex(dt[8][0],dt[8][1],dt[8][2]))&&attr$1(_e,"data-color-key",st),ft&2&&(_e.disabled=dt[1]),ft&13&&toggle_class(_e,"is-active",is_equal_color2(dt[3],dt[8]))},d(dt){dt&&detach$1(_e)}}}function create_fragment62(et){let _e,tt,rt,nt,st=et[2],dt=[];for(let ft=0;ft<st.length;ft+=1)dt[ft]=create_each_block2(get_each_context2(et,st,ft));return{c(){_e=element$1("div");for(let ft=0;ft<dt.length;ft+=1)dt[ft].c();attr$1(_e,"class",tt="fastboard-toolbar-colors "+et[0])},m(ft,ht){insert$1(ft,_e,ht);for(let mt=0;mt<dt.length;mt+=1)dt[mt]&&dt[mt].m(_e,null);rt||(nt=listen$1(_e,"click",et[5]),rt=!0)},p(ft,[ht]){if(ht&15){st=ft[2];let mt;for(mt=0;mt<st.length;mt+=1){const bt=get_each_context2(ft,st,mt);dt[mt]?dt[mt].p(bt,ht):(dt[mt]=create_each_block2(bt),dt[mt].c(),dt[mt].m(_e,null))}for(;mt<dt.length;mt+=1)dt[mt].d(1);dt.length=st.length}ht&1&&tt!==(tt="fastboard-toolbar-colors "+ft[0])&&attr$1(_e,"class",tt)},i:noop$8,o:noop$8,d(ft){ft&&detach$1(_e),destroy_each(dt,ft),rt=!1,nt()}}}function is_equal_color2(et,_e){return et&&_e&&et.every((tt,rt)=>tt===_e[rt])}function instance62(et,_e,tt){let rt,nt,st,dt=noop$8,ft=()=>(dt(),dt=subscribe$1(rt,Ct=>tt(7,st=Ct)),rt);et.$$.on_destroy.push(()=>dt());let{app:ht=null}=_e,{theme:mt="light"}=_e,{disabled:bt=!1}=_e,{colors:St=default_colors}=_e;function Et(Ct){let Rt=Ct.target;if(Rt&&Rt.dataset.colorKey){let Tt=Rt.dataset.colorKey;Tt&&ht&&ht.setTextColor(hexToRgb(Tt))}}return et.$$set=Ct=>{"app"in Ct&&tt(6,ht=Ct.app),"theme"in Ct&&tt(0,mt=Ct.theme),"disabled"in Ct&&tt(1,bt=Ct.disabled),"colors"in Ct&&tt(2,St=Ct.colors)},et.$$.update=()=>{et.$$.dirty&64&&ft(tt(4,rt=ht?.memberState)),et.$$.dirty&128&&tt(3,nt=st?.textColor)},[mt,bt,St,nt,rt,Et,ht,st]}var TextColor=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance62,create_fragment62,safe_not_equal$2,{app:6,theme:0,disabled:1,colors:2})}},TextColor_default=TextColor;function get_each_context3(et,_e,tt){const rt=et.slice();rt[12]=_e[tt];const nt=rt[4]==="shape"?rt[3]===rt[12]:rt[4]===rt[12];return rt[13]=nt,rt}function create_else_block5(et){let _e,tt,rt;var nt=shapesIcon[et[12]];function st(dt){return{props:{theme:dt[0]}}}return nt&&(_e=construct_svelte_component(nt,st(et))),{c(){_e&&create_component(_e.$$.fragment),tt=empty()},m(dt,ft){_e&&mount_component$1(_e,dt,ft),insert$1(dt,tt,ft),rt=!0},p(dt,ft){const ht={};if(ft&1&&(ht.theme=dt[0]),nt!==(nt=shapesIcon[dt[12]])){if(_e){group_outros();const mt=_e;transition_out(mt.$$.fragment,1,0,()=>{destroy_component$1(mt,1)}),check_outros()}nt?(_e=construct_svelte_component(nt,st(dt)),create_component(_e.$$.fragment),transition_in$1(_e.$$.fragment,1),mount_component$1(_e,tt.parentNode,tt)):_e=null}else nt&&_e.$set(ht)},i(dt){rt||(_e&&transition_in$1(_e.$$.fragment,dt),rt=!0)},o(dt){_e&&transition_out(_e.$$.fragment,dt),rt=!1},d(dt){dt&&detach$1(tt),_e&&destroy_component$1(_e,dt)}}}function create_if_block5(et){let _e,tt,rt;var nt=shapesIconActive[et[12]];function st(dt){return{props:{theme:dt[0],active:!0}}}return nt&&(_e=construct_svelte_component(nt,st(et))),{c(){_e&&create_component(_e.$$.fragment),tt=empty()},m(dt,ft){_e&&mount_component$1(_e,dt,ft),insert$1(dt,tt,ft),rt=!0},p(dt,ft){const ht={};if(ft&1&&(ht.theme=dt[0]),nt!==(nt=shapesIconActive[dt[12]])){if(_e){group_outros();const mt=_e;transition_out(mt.$$.fragment,1,0,()=>{destroy_component$1(mt,1)}),check_outros()}nt?(_e=construct_svelte_component(nt,st(dt)),create_component(_e.$$.fragment),transition_in$1(_e.$$.fragment,1),mount_component$1(_e,tt.parentNode,tt)):_e=null}else nt&&_e.$set(ht)},i(dt){rt||(_e&&transition_in$1(_e.$$.fragment,dt),rt=!0)},o(dt){_e&&transition_out(_e.$$.fragment,dt),rt=!1},d(dt){dt&&detach$1(tt),_e&&destroy_component$1(_e,dt)}}}function create_each_block3(et,_e){let tt,rt,nt,st,dt,ft,ht,mt,bt;const St=[create_if_block5,create_else_block5],Et=[];function Ct(Rt,Tt){return Rt[13]?0:1}return rt=Ct(_e),nt=Et[rt]=St[rt](_e),{key:et,first:null,c(){tt=element$1("button"),nt.c(),st=space$1(),attr$1(tt,"class",dt="fastboard-toolbar-btn fastboard-toolbar-shape-btn "+_e[0]+" "+_e[12]),attr$1(tt,"data-shape-key",_e[12]),tt.disabled=_e[1],toggle_class(tt,"is-active",_e[13]),this.first=tt},m(Rt,Tt){insert$1(Rt,tt,Tt),Et[rt].m(tt,null),append$1(tt,st),ht=!0,mt||(bt=action_destroyer(ft=tippy.call(null,tt,{content:tooltip(_e[6][_e[12]],_e[2][_e[12]]),placement:"top"})),mt=!0)},p(Rt,Tt){_e=Rt;let wt=rt;rt=Ct(_e),rt===wt?Et[rt].p(_e,Tt):(group_outros(),transition_out(Et[wt],1,1,()=>{Et[wt]=null}),check_outros(),nt=Et[rt],nt?nt.p(_e,Tt):(nt=Et[rt]=St[rt](_e),nt.c()),transition_in$1(nt,1),nt.m(tt,st)),(!ht||Tt&1&&dt!==(dt="fastboard-toolbar-btn fastboard-toolbar-shape-btn "+_e[0]+" "+_e[12]))&&attr$1(tt,"class",dt),(!ht||Tt&2)&&(tt.disabled=_e[1]),ft&&is_function$1(ft.update)&&Tt&68&&ft.update.call(null,{content:tooltip(_e[6][_e[12]],_e[2][_e[12]]),placement:"top"}),(!ht||Tt&25)&&toggle_class(tt,"is-active",_e[13])},i(Rt){ht||(transition_in$1(nt),ht=!0)},o(Rt){transition_out(nt),ht=!1},d(Rt){Rt&&detach$1(tt),Et[rt].d(),mt=!1,bt()}}}function create_fragment63(et){let _e,tt=[],rt=new Map,nt,st,dt,ft,ht=shapes;const mt=bt=>bt[12];for(let bt=0;bt<ht.length;bt+=1){let St=get_each_context3(et,ht,bt),Et=mt(St);rt.set(Et,tt[bt]=create_each_block3(Et,St))}return{c(){_e=element$1("div");for(let bt=0;bt<tt.length;bt+=1)tt[bt].c();attr$1(_e,"class",nt="fastboard-toolbar-shapes "+et[0])},m(bt,St){insert$1(bt,_e,St);for(let Et=0;Et<tt.length;Et+=1)tt[Et]&&tt[Et].m(_e,null);st=!0,dt||(ft=listen$1(_e,"click",et[7]),dt=!0)},p(bt,[St]){St&95&&(ht=shapes,group_outros(),tt=update_keyed_each(tt,St,mt,1,bt,ht,rt,_e,outro_and_destroy_block,create_each_block3,null,get_each_context3),check_outros()),(!st||St&1&&nt!==(nt="fastboard-toolbar-shapes "+bt[0]))&&attr$1(_e,"class",nt)},i(bt){if(!st){for(let St=0;St<ht.length;St+=1)transition_in$1(tt[St]);st=!0}},o(bt){for(let St=0;St<tt.length;St+=1)transition_out(tt[St]);st=!1},d(bt){bt&&detach$1(_e);for(let St=0;St<tt.length;St+=1)tt[St].d();dt=!1,ft()}}}var i18n5={en:{rectangle:"Rectangle",ellipse:"Ellipse",straight:"Line",arrow:"Arrow",pentagram:"Star",rhombus:"Diamond",triangle:"Triangle",speechBalloon:"Balloon"},"zh-CN":{rectangle:"矩形",ellipse:"椭圆",straight:"直线",arrow:"箭头",pentagram:"五角星",rhombus:"菱形",triangle:"三角形",speechBalloon:"气泡"}};function instance63(et,_e,tt){let rt,nt,st,dt,ft,ht,mt=noop$8,bt=()=>(mt(),mt=subscribe$1(nt,At=>tt(11,ht=At)),nt);et.$$.on_destroy.push(()=>mt());let{app:St=null}=_e,{theme:Et="light"}=_e,{language:Ct="en"}=_e,{disabled:Rt=!1}=_e,Tt;function wt(At){let Nt=At.target;if(Nt&&Nt.dataset.shapeKey){let Pt=Nt.dataset.shapeKey;Pt&&St&&(applianceShapes.includes(Pt)?St.setAppliance(Pt):St.setAppliance("shape",Pt))}}return et.$$set=At=>{"app"in At&&tt(8,St=At.app),"theme"in At&&tt(0,Et=At.theme),"language"in At&&tt(9,Ct=At.language),"disabled"in At&&tt(1,Rt=At.disabled)},et.$$.update=()=>{et.$$.dirty&512&&tt(6,rt=i18n5[Ct]),et.$$.dirty&256&&bt(tt(5,nt=St?.memberState)),et.$$.dirty&2048&&tt(4,st=ht?.currentApplianceName),et.$$.dirty&2048&&tt(3,dt=ht?.shapeType),et.$$.dirty&256&&tt(10,ft=St?.hotKeys),et.$$.dirty&1024&&tt(2,Tt={rectangle:ft?.changeToRectangle,ellipse:ft?.changeToEllipse,straight:ft?.changeToStraight,arrow:ft?.changeToArrow})},[Et,Rt,Tt,dt,st,nt,rt,wt,St,Ct,ft,ht]}var SelectShapes=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance63,create_fragment63,safe_not_equal$2,{app:8,theme:0,language:9,disabled:1})}},SelectShapes_default=SelectShapes;function create_else_block6(et){let _e,tt;return _e=new Icons_default.Click({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block6(et){let _e,tt;return _e=new Icons_default.ClickFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot4(et){let _e,tt,rt,nt;const st=[create_if_block6,create_else_block6],dt=[];function ft(ht,mt){return ht[2]==="clicker"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment64(et){let _e,tt;const rt=[{class:"clicker"},et[0],{content:et[1]}];let nt={$$slots:{default:[create_default_slot4]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[4]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&3?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]}]):{};dt&44&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance64(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{appliance:st}=_e,{theme:dt="light"}=_e;function ft(ht){bubble.call(this,et,ht)}return et.$$set=ht=>{"btn_props"in ht&&tt(0,rt=ht.btn_props),"content"in ht&&tt(1,nt=ht.content),"appliance"in ht&&tt(2,st=ht.appliance),"theme"in ht&&tt(3,dt=ht.theme)},[rt,nt,st,dt,ft]}var Clicker=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance64,create_fragment64,safe_not_equal$2,{btn_props:0,content:1,appliance:2,theme:3})}},Clicker_default=Clicker;function create_else_block7(et){let _e,tt;return _e=new Icons_default.Selector({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block7(et){let _e,tt;return _e=new Icons_default.SelectorFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot5(et){let _e,tt,rt,nt;const st=[create_if_block7,create_else_block7],dt=[];function ft(ht,mt){return ht[2]==="selector"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment65(et){let _e,tt;const rt=[{class:"selector"},et[0],{content:et[1]}];let nt={$$slots:{default:[create_default_slot5]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[4]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&3?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]}]):{};dt&44&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance65(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{appliance:st}=_e,{theme:dt="light"}=_e;function ft(ht){bubble.call(this,et,ht)}return et.$$set=ht=>{"btn_props"in ht&&tt(0,rt=ht.btn_props),"content"in ht&&tt(1,nt=ht.content),"appliance"in ht&&tt(2,st=ht.appliance),"theme"in ht&&tt(3,dt=ht.theme)},[rt,nt,st,dt,ft]}var Selector2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance65,create_fragment65,safe_not_equal$2,{btn_props:0,content:1,appliance:2,theme:3})}},Selector_default2=Selector2;function create_if_block_4(et){let _e,tt,rt,nt;const st=[create_if_block_5,create_else_block_2],dt=[];function ft(ht,mt){return ht[3]==="pencil"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_if_block_2$1(et){let _e,tt,rt,nt;const st=[create_if_block_3,create_else_block_12],dt=[];function ft(ht,mt){return ht[3]==="pencil"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_if_block8(et){let _e,tt,rt,nt;const st=[create_if_block_12,create_else_block8],dt=[];function ft(ht,mt){return ht[3]==="pencil"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_else_block_2(et){let _e,tt;return _e=new Icons_default.Pencil({props:{theme:et[4]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_5(et){let _e,tt;return _e=new Icons_default.PencilFilled({props:{theme:et[4],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_else_block_12(et){let _e,tt;return _e=new Icons_default.LaserPen({props:{theme:et[4]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_3(et){let _e,tt;return _e=new Icons_default.LaserPenFilled({props:{theme:et[4],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_else_block8(et){let _e,tt;return _e=new Icons_default.MarkPen({props:{theme:et[4]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_12(et){let _e,tt;return _e=new Icons_default.MarkPenFilled({props:{theme:et[4],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot6(et){let _e,tt,rt,nt;const st=[create_if_block8,create_if_block_2$1,create_if_block_4],dt=[];function ft(ht,mt){return ht[5]==="mark"?0:ht[5]==="laser"?1:ht[5]==="pencil"?2:-1}return~(_e=ft(et))&&(tt=dt[_e]=st[_e](et)),{c(){tt&&tt.c(),rt=empty()},m(ht,mt){~_e&&dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?~_e&&dt[_e].p(ht,mt):(tt&&(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros()),~_e?(tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt)):tt=null)},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){~_e&&dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment66(et){let _e,tt;const rt=[{class:"pencil"},et[0],{content:et[1]},{menu:et[2]}];let nt={$$slots:{default:[create_default_slot6]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[6]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&7?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]},dt&4&&{menu:st[2]}]):{};dt&184&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance66(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{menu:st}=_e,{appliance:dt}=_e,{theme:ft="light"}=_e,{pencilType:ht="pencil"}=_e;function mt(bt){bubble.call(this,et,bt)}return et.$$set=bt=>{"btn_props"in bt&&tt(0,rt=bt.btn_props),"content"in bt&&tt(1,nt=bt.content),"menu"in bt&&tt(2,st=bt.menu),"appliance"in bt&&tt(3,dt=bt.appliance),"theme"in bt&&tt(4,ft=bt.theme),"pencilType"in bt&&tt(5,ht=bt.pencilType)},[rt,nt,st,dt,ft,ht,mt]}var Pencil2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance66,create_fragment66,safe_not_equal$2,{btn_props:0,content:1,menu:2,appliance:3,theme:4,pencilType:5})}},Pencil_default2=Pencil2;function create_else_block9(et){let _e,tt;return _e=new Icons_default.Text({props:{theme:et[4]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block9(et){let _e,tt;return _e=new Icons_default.TextFilled({props:{theme:et[4],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&16&&(st.theme=rt[4]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot7(et){let _e,tt,rt,nt;const st=[create_if_block9,create_else_block9],dt=[];function ft(ht,mt){return ht[3]==="text"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment67(et){let _e,tt;const rt=[{class:"text"},et[0],{content:et[1]},{menu:et[2]}];let nt={$$slots:{default:[create_default_slot7]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[5]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&7?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]},dt&4&&{menu:st[2]}]):{};dt&88&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance67(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{menu:st}=_e,{appliance:dt}=_e,{theme:ft="light"}=_e;function ht(mt){bubble.call(this,et,mt)}return et.$$set=mt=>{"btn_props"in mt&&tt(0,rt=mt.btn_props),"content"in mt&&tt(1,nt=mt.content),"menu"in mt&&tt(2,st=mt.menu),"appliance"in mt&&tt(3,dt=mt.appliance),"theme"in mt&&tt(4,ft=mt.theme)},[rt,nt,st,dt,ft,ht]}var Text2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance67,create_fragment67,safe_not_equal$2,{btn_props:0,content:1,menu:2,appliance:3,theme:4})}},Text_default2=Text2;function create_else_block10(et){let _e,tt,rt;var nt=shapesIcon[et[6]];function st(dt){return{props:{theme:dt[4]}}}return nt&&(_e=construct_svelte_component(nt,st(et))),{c(){_e&&create_component(_e.$$.fragment),tt=empty()},m(dt,ft){_e&&mount_component$1(_e,dt,ft),insert$1(dt,tt,ft),rt=!0},p(dt,ft){const ht={};if(ft&16&&(ht.theme=dt[4]),ft&64&&nt!==(nt=shapesIcon[dt[6]])){if(_e){group_outros();const mt=_e;transition_out(mt.$$.fragment,1,0,()=>{destroy_component$1(mt,1)}),check_outros()}nt?(_e=construct_svelte_component(nt,st(dt)),create_component(_e.$$.fragment),transition_in$1(_e.$$.fragment,1),mount_component$1(_e,tt.parentNode,tt)):_e=null}else nt&&_e.$set(ht)},i(dt){rt||(_e&&transition_in$1(_e.$$.fragment,dt),rt=!0)},o(dt){_e&&transition_out(_e.$$.fragment,dt),rt=!1},d(dt){dt&&detach$1(tt),_e&&destroy_component$1(_e,dt)}}}function create_if_block10(et){let _e,tt,rt;var nt=shapesIconActive[et[6]];function st(dt){return{props:{theme:dt[4],active:!0}}}return nt&&(_e=construct_svelte_component(nt,st(et))),{c(){_e&&create_component(_e.$$.fragment),tt=empty()},m(dt,ft){_e&&mount_component$1(_e,dt,ft),insert$1(dt,tt,ft),rt=!0},p(dt,ft){const ht={};if(ft&16&&(ht.theme=dt[4]),ft&64&&nt!==(nt=shapesIconActive[dt[6]])){if(_e){group_outros();const mt=_e;transition_out(mt.$$.fragment,1,0,()=>{destroy_component$1(mt,1)}),check_outros()}nt?(_e=construct_svelte_component(nt,st(dt)),create_component(_e.$$.fragment),transition_in$1(_e.$$.fragment,1),mount_component$1(_e,tt.parentNode,tt)):_e=null}else nt&&_e.$set(ht)},i(dt){rt||(_e&&transition_in$1(_e.$$.fragment,dt),rt=!0)},o(dt){_e&&transition_out(_e.$$.fragment,dt),rt=!1},d(dt){dt&&detach$1(tt),_e&&destroy_component$1(_e,dt)}}}function create_default_slot8(et){let _e,tt,rt,nt;const st=[create_if_block10,create_else_block10],dt=[];function ft(ht,mt){return ht[0]===ht[6]||ht[0]==="shape"&&ht[5]===ht[6]?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment68(et){let _e,tt;const rt=[{class:"shapes"},et[1],{content:et[2]},{menu:et[3]}];let nt={$$slots:{default:[create_default_slot8]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[8]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&14?get_spread_update(rt,[rt[0],dt&2&&get_spread_object(st[1]),dt&4&&{content:st[2]},dt&8&&{menu:st[3]}]):{};dt&2161&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance68(et,_e,tt){let rt,nt,st,dt=noop$8,ft=()=>(dt(),dt=subscribe$1(rt,wt=>tt(10,st=wt)),rt);et.$$.on_destroy.push(()=>dt());let{app:ht=null}=_e,{btn_props:mt={}}=_e,{content:bt}=_e,{menu:St}=_e,{appliance:Et}=_e,{theme:Ct="light"}=_e,Rt="rectangle";function Tt(){applianceShapes.includes(Rt)?ht?.setAppliance(Rt):ht?.setAppliance("shape",Rt)}return et.$$set=wt=>{"app"in wt&&tt(9,ht=wt.app),"btn_props"in wt&&tt(1,mt=wt.btn_props),"content"in wt&&tt(2,bt=wt.content),"menu"in wt&&tt(3,St=wt.menu),"appliance"in wt&&tt(0,Et=wt.appliance),"theme"in wt&&tt(4,Ct=wt.theme)},et.$$.update=()=>{et.$$.dirty&512&&ft(tt(7,rt=ht?.memberState)),et.$$.dirty&1024&&tt(0,Et=st?.currentApplianceName),et.$$.dirty&1024&&tt(5,nt=st?.shapeType),et.$$.dirty&33&&(applianceShapes.includes(Et)?tt(6,Rt=Et):nt&&tt(6,Rt=nt))},[Et,mt,bt,St,Ct,nt,Rt,rt,Tt,ht,st]}var Shapes=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance68,create_fragment68,safe_not_equal$2,{app:9,btn_props:1,content:2,menu:3,appliance:0,theme:4})}},Shapes_default=Shapes;function create_if_block_22(et){let _e,tt,rt,nt;const st=[create_if_block_32,create_else_block_13],dt=[];function ft(ht,mt){return ht[2]==="pencilEraser"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_if_block11(et){let _e,tt,rt,nt;const st=[create_if_block_13,create_else_block11],dt=[];function ft(ht,mt){return ht[2]==="eraser"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_else_block_13(et){let _e,tt;return _e=new Icons_default.EraserBitmap({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_32(et){let _e,tt;return _e=new Icons_default.EraserBitmapFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_else_block11(et){let _e,tt;return _e=new Icons_default.Eraser({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_13(et){let _e,tt;return _e=new Icons_default.EraserFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot9(et){let _e,tt,rt,nt;const st=[create_if_block11,create_if_block_22],dt=[];function ft(ht,mt){return ht[5]==="eraser"?0:ht[5]==="pencilEraser"?1:-1}return~(_e=ft(et))&&(tt=dt[_e]=st[_e](et)),{c(){tt&&tt.c(),rt=empty()},m(ht,mt){~_e&&dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?~_e&&dt[_e].p(ht,mt):(tt&&(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros()),~_e?(tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt)):tt=null)},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){~_e&&dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment69(et){let _e,tt;const rt=[{class:"eraser"},et[0],{content:et[1]},{menu:et[4]}];let nt={$$slots:{default:[create_default_slot9]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[6]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&19?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]},dt&16&&{menu:st[4]}]):{};dt&172&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance69(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{appliance:st}=_e,{theme:dt="light"}=_e,{menu:ft}=_e,{eraserType:ht="eraser"}=_e;function mt(bt){bubble.call(this,et,bt)}return et.$$set=bt=>{"btn_props"in bt&&tt(0,rt=bt.btn_props),"content"in bt&&tt(1,nt=bt.content),"appliance"in bt&&tt(2,st=bt.appliance),"theme"in bt&&tt(3,dt=bt.theme),"menu"in bt&&tt(4,ft=bt.menu),"eraserType"in bt&&tt(5,ht=bt.eraserType)},[rt,nt,st,dt,ft,ht,mt]}var Eraser2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance69,create_fragment69,safe_not_equal$2,{btn_props:0,content:1,appliance:2,theme:3,menu:4,eraserType:5})}},Eraser_default2=Eraser2;function create_default_slot10(et){let _e,tt;return _e=new Icons_default.Clear({props:{theme:et[2]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&4&&(st.theme=rt[2]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_fragment70(et){let _e,tt;const rt=[{class:"clear"},et[0],{content:et[1]}];let nt={$$slots:{default:[create_default_slot10]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[3]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&3?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]}]):{};dt&20&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance70(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{theme:st="light"}=_e;function dt(ft){bubble.call(this,et,ft)}return et.$$set=ft=>{"btn_props"in ft&&tt(0,rt=ft.btn_props),"content"in ft&&tt(1,nt=ft.content),"theme"in ft&&tt(2,st=ft.theme)},[rt,nt,st,dt]}var Clear2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance70,create_fragment70,safe_not_equal$2,{btn_props:0,content:1,theme:2})}},Clear_default2=Clear2;function create_else_block12(et){let _e,tt;return _e=new Icons_default.Drag({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block12(et){let _e,tt;return _e=new Icons_default.DragFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot11(et){let _e,tt,rt,nt;const st=[create_if_block12,create_else_block12],dt=[];function ft(ht,mt){return ht[2]==="hand"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment71(et){let _e,tt;const rt=[{class:"hand"},et[0],{content:et[1]}];let nt={$$slots:{default:[create_default_slot11]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[4]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&3?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]}]):{};dt&44&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance71(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{appliance:st}=_e,{theme:dt="light"}=_e;function ft(ht){bubble.call(this,et,ht)}return et.$$set=ht=>{"btn_props"in ht&&tt(0,rt=ht.btn_props),"content"in ht&&tt(1,nt=ht.content),"appliance"in ht&&tt(2,st=ht.appliance),"theme"in ht&&tt(3,dt=ht.theme)},[rt,nt,st,dt,ft]}var Hand=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance71,create_fragment71,safe_not_equal$2,{btn_props:0,content:1,appliance:2,theme:3})}},Hand_default=Hand;function create_else_block13(et){let _e,tt;return _e=new Icons_default.Laser({props:{theme:et[3]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block13(et){let _e,tt;return _e=new Icons_default.LaserFilled({props:{theme:et[3],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&8&&(st.theme=rt[3]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot12(et){let _e,tt,rt,nt;const st=[create_if_block13,create_else_block13],dt=[];function ft(ht,mt){return ht[2]==="laserPointer"?0:1}return _e=ft(et),tt=dt[_e]=st[_e](et),{c(){tt.c(),rt=empty()},m(ht,mt){dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?dt[_e].p(ht,mt):(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros(),tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt))},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){dt[_e].d(ht),ht&&detach$1(rt)}}}function create_fragment72(et){let _e,tt;const rt=[{class:"laserPointer"},et[0],{content:et[1]}];let nt={$$slots:{default:[create_default_slot12]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[4]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&3?get_spread_update(rt,[rt[0],dt&1&&get_spread_object(st[0]),dt&2&&{content:st[1]}]):{};dt&44&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance72(et,_e,tt){let{btn_props:rt={}}=_e,{content:nt}=_e,{appliance:st}=_e,{theme:dt="light"}=_e;function ft(ht){bubble.call(this,et,ht)}return et.$$set=ht=>{"btn_props"in ht&&tt(0,rt=ht.btn_props),"content"in ht&&tt(1,nt=ht.content),"appliance"in ht&&tt(2,st=ht.appliance),"theme"in ht&&tt(3,dt=ht.theme)},[rt,nt,st,dt,ft]}var Laser2=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance72,create_fragment72,safe_not_equal$2,{btn_props:0,content:1,appliance:2,theme:3})}},Laser_default2=Laser2;function create_fragment73(et){let _e,tt;const rt=[{class:"fastboard-toolbar-slider"},et[0],{min:1},{max:4}];let nt={};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Slider_default({props:nt}),_e.$on("change",et[2]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,[dt]){const ft=dt&1?get_spread_update(rt,[rt[0],get_spread_object(st[0]),rt[2],rt[3]]):{};_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function instance73(et,_e,tt){let rt,nt,st,dt,ft=noop$8,ht=()=>(ft(),ft=subscribe$1(rt,Ct=>tt(7,dt=Ct)),rt);et.$$.on_destroy.push(()=>ft());let{app:mt=null}=_e,{theme:bt="light"}=_e,{disabled:St=!1}=_e;function Et({detail:Ct}){var Rt;(Rt=mt?.appliancePlugin)==null||Rt.setMemberState({pencilEraserSize:Ct})}return et.$$set=Ct=>{"app"in Ct&&tt(3,mt=Ct.app),"theme"in Ct&&tt(4,bt=Ct.theme),"disabled"in Ct&&tt(5,St=Ct.disabled)},et.$$.update=()=>{var Ct;et.$$.dirty&8&&ht(tt(1,rt=mt?.memberState)),et.$$.dirty&128&&tt(6,nt=(Ct=dt?.pencilEraserSize)!=null?Ct:1),et.$$.dirty&112&&tt(0,st={value:nt,theme:bt,disabled:St})},[st,rt,Et,mt,bt,St,nt,dt]}var EraserSize=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance73,create_fragment73,safe_not_equal$2,{app:3,theme:4,disabled:5})}},EraserSize_default=EraserSize;function get_each_context4(et,_e,tt){const rt=et.slice();rt[57]=_e[tt];const nt=rt[57];rt[58]=nt.icon,rt[59]=nt.label,rt[60]=nt.kind,rt[61]=nt.onClick;const st=rt[25]&&rt[25][rt[60]];rt[62]=st;const dt=function(){return et[53](rt[61])};return rt[63]=dt,rt}function get_each_context_1(et,_e,tt){const rt=et.slice();return rt[66]=_e[tt],rt}function create_if_block_23(et){let _e,tt;const rt=[{class:"scroll-up"},et[17]];let nt={$$slots:{default:[create_default_slot_122]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[27]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[rt[0],get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_122(et){let _e,tt;return _e=new Icons_default.Up({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_222(et){let _e,tt;return _e=new Laser_default2({props:{appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].laserPointer}}),_e.$on("click",et[35]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].laserPointer),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_21(et){let _e,tt;return _e=new Hand_default({props:{appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].hand}}),_e.$on("click",et[34]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].hand),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_20(et){let _e,tt;return _e=new Clear_default2({props:{theme:et[1],btn_props:et[17],content:et[11].clear}}),_e.$on("click",et[36]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&2048&&(st.content=rt[11].clear),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_19(et){let _e,tt;return _e=new Eraser_default2({props:{eraserType:et[18],appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].eraser,menu:et[10]?et[16]:void 0}}),_e.$on("click",et[33]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&262144&&(st.eraserType=rt[18]),nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].eraser),nt[0]&66560&&(st.menu=rt[10]?rt[16]:void 0),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_18(et){let _e,tt;return _e=new Shapes_default({props:{app:et[0],appliance:et[19],theme:et[1],btn_props:et[17],content:et[11].shapes,menu:et[14]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&1&&(st.app=rt[0]),nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&2048&&(st.content=rt[11].shapes),nt[0]&16384&&(st.menu=rt[14]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_17(et){let _e,tt;return _e=new Text_default2({props:{appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].text,menu:et[13]}}),_e.$on("click",et[32]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].text),nt[0]&8192&&(st.menu=rt[13]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_16(et){let _e,tt;return _e=new Pencil_default2({props:{pencilType:et[20],appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].pencil,menu:et[12]}}),_e.$on("click",et[31]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&1048576&&(st.pencilType=rt[20]),nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].pencil),nt[0]&4096&&(st.menu=rt[12]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_15(et){let _e,tt;return _e=new Selector_default2({props:{appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].selector}}),_e.$on("click",et[30]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].selector),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_14(et){let _e,tt;return _e=new Clicker_default({props:{appliance:et[19],theme:et[1],btn_props:et[17],content:et[23].clicker}}),_e.$on("click",et[29]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&524288&&(st.appliance=rt[19]),nt[0]&2&&(st.theme=rt[1]),nt[0]&131072&&(st.btn_props=rt[17]),nt[0]&8388608&&(st.content=rt[23].clicker),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_each_block_1(et){let _e,tt,rt,nt;const st=[create_if_block_14,create_if_block_15,create_if_block_16,create_if_block_17,create_if_block_18,create_if_block_19,create_if_block_20,create_if_block_21,create_if_block_222],dt=[];function ft(ht,mt){return ht[66]==="clicker"?0:ht[66]==="selector"?1:ht[66]==="pencil"?2:ht[66]==="text"?3:ht[66]==="shapes"?4:ht[66]==="eraser"?5:ht[66]==="clear"?6:ht[66]==="hand"?7:ht[66]==="laserPointer"?8:-1}return~(_e=ft(et))&&(tt=dt[_e]=st[_e](et)),{c(){tt&&tt.c(),rt=empty()},m(ht,mt){~_e&&dt[_e].m(ht,mt),insert$1(ht,rt,mt),nt=!0},p(ht,mt){let bt=_e;_e=ft(ht),_e===bt?~_e&&dt[_e].p(ht,mt):(tt&&(group_outros(),transition_out(dt[bt],1,1,()=>{dt[bt]=null}),check_outros()),~_e?(tt=dt[_e],tt?tt.p(ht,mt):(tt=dt[_e]=st[_e](ht),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt)):tt=null)},i(ht){nt||(transition_in$1(tt),nt=!0)},o(ht){transition_out(tt),nt=!1},d(ht){~_e&&dt[_e].d(ht),ht&&detach$1(rt)}}}function create_if_block_132(et){let _e,tt;const rt=[{class:"apps"},et[17],{content:et[11].apps},{menu:et[15]},{menu_placement:et[6]==="left"?"right-end":"left-end"}];let nt={$$slots:{default:[create_default_slot_11]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&165952?get_spread_update(rt,[rt[0],dt[0]&131072&&get_spread_object(st[17]),dt[0]&2048&&{content:st[11].apps},dt[0]&32768&&{menu:st[15]},dt[0]&64&&{menu_placement:st[6]==="left"?"right-end":"left-end"}]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_11(et){let _e,tt;return _e=new Icons_default.Apps({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_122(et){let _e,tt;return _e=new Button_default({props:{class:"scroll-down",name:name5,theme:et[1],disabled:et[3],$$slots:{default:[create_default_slot_10]},$$scope:{ctx:et}}}),_e.$on("click",et[28]),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),nt[0]&8&&(st.disabled=rt[3]),nt[0]&2|nt[2]&128&&(st.$$scope={dirty:nt,ctx:rt}),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_10(et){let _e,tt;return _e=new Icons_default.Down({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_52(et){let _e,tt,rt,nt,st,dt,ft,ht,mt,bt;const St=[create_if_block_10,create_if_block_11],Et=[];function Ct(It,Ft){return It[20]!=="pencil"?0:It[20]==="pencil"?1:-1}~(_e=Ct(et))&&(tt=Et[_e]=St[_e](et));const Rt=[create_if_block_8,create_if_block_9],Tt=[];function wt(It,Ft){return It[20]==="laser"?0:It[20]!=="laser"?1:-1}~(nt=wt(et))&&(st=Tt[nt]=Rt[nt](et));const At=[create_if_block_6,create_if_block_7],Nt=[];function Pt(It,Ft){return It[20]==="mark"?0:It[20]!=="mark"?1:-1}return~(ft=Pt(et))&&(ht=Nt[ft]=At[ft](et)),{c(){tt&&tt.c(),rt=space$1(),st&&st.c(),dt=space$1(),ht&&ht.c(),mt=empty()},m(It,Ft){~_e&&Et[_e].m(It,Ft),insert$1(It,rt,Ft),~nt&&Tt[nt].m(It,Ft),insert$1(It,dt,Ft),~ft&&Nt[ft].m(It,Ft),insert$1(It,mt,Ft),bt=!0},p(It,Ft){let qt=_e;_e=Ct(It),_e===qt?~_e&&Et[_e].p(It,Ft):(tt&&(group_outros(),transition_out(Et[qt],1,1,()=>{Et[qt]=null}),check_outros()),~_e?(tt=Et[_e],tt?tt.p(It,Ft):(tt=Et[_e]=St[_e](It),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt)):tt=null);let Vt=nt;nt=wt(It),nt===Vt?~nt&&Tt[nt].p(It,Ft):(st&&(group_outros(),transition_out(Tt[Vt],1,1,()=>{Tt[Vt]=null}),check_outros()),~nt?(st=Tt[nt],st?st.p(It,Ft):(st=Tt[nt]=Rt[nt](It),st.c()),transition_in$1(st,1),st.m(dt.parentNode,dt)):st=null);let Kt=ft;ft=Pt(It),ft===Kt?~ft&&Nt[ft].p(It,Ft):(ht&&(group_outros(),transition_out(Nt[Kt],1,1,()=>{Nt[Kt]=null}),check_outros()),~ft?(ht=Nt[ft],ht?ht.p(It,Ft):(ht=Nt[ft]=At[ft](It),ht.c()),transition_in$1(ht,1),ht.m(mt.parentNode,mt)):ht=null)},i(It){bt||(transition_in$1(tt),transition_in$1(st),transition_in$1(ht),bt=!0)},o(It){transition_out(tt),transition_out(st),transition_out(ht),bt=!1},d(It){~_e&&Et[_e].d(It),It&&detach$1(rt),~nt&&Tt[nt].d(It),It&&detach$1(dt),~ft&&Nt[ft].d(It),It&&detach$1(mt)}}}function create_if_block_11(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_9]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_if_block_10(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_8]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[37]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_9(et){let _e,tt;return _e=new Icons_default.PencilFilled({props:{theme:et[1],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_8(et){let _e,tt;return _e=new Icons_default.Pencil({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_9(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_7]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[38]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_if_block_8(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_6]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_7(et){let _e,tt;return _e=new Icons_default.LaserPen({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_6(et){let _e,tt;return _e=new Icons_default.LaserPenFilled({props:{theme:et[1],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_7(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_53]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[39]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_if_block_6(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_43]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_53(et){let _e,tt;return _e=new Icons_default.MarkPen({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_43(et){let _e,tt;return _e=new Icons_default.MarkPenFilled({props:{theme:et[1],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block14(et){let _e,tt,rt,nt,st,dt,ft;const ht=[create_if_block_33,create_if_block_42],mt=[];function bt(Rt,Tt){return Rt[18]!=="eraser"?0:Rt[18]==="eraser"?1:-1}~(_e=bt(et))&&(tt=mt[_e]=ht[_e](et));const St=[create_if_block_110,create_if_block_24],Et=[];function Ct(Rt,Tt){return Rt[18]==="pencilEraser"?0:Rt[18]!=="pencilEraser"?1:-1}return~(nt=Ct(et))&&(st=Et[nt]=St[nt](et)),{c(){tt&&tt.c(),rt=space$1(),st&&st.c(),dt=empty()},m(Rt,Tt){~_e&&mt[_e].m(Rt,Tt),insert$1(Rt,rt,Tt),~nt&&Et[nt].m(Rt,Tt),insert$1(Rt,dt,Tt),ft=!0},p(Rt,Tt){let wt=_e;_e=bt(Rt),_e===wt?~_e&&mt[_e].p(Rt,Tt):(tt&&(group_outros(),transition_out(mt[wt],1,1,()=>{mt[wt]=null}),check_outros()),~_e?(tt=mt[_e],tt?tt.p(Rt,Tt):(tt=mt[_e]=ht[_e](Rt),tt.c()),transition_in$1(tt,1),tt.m(rt.parentNode,rt)):tt=null);let At=nt;nt=Ct(Rt),nt===At?~nt&&Et[nt].p(Rt,Tt):(st&&(group_outros(),transition_out(Et[At],1,1,()=>{Et[At]=null}),check_outros()),~nt?(st=Et[nt],st?st.p(Rt,Tt):(st=Et[nt]=St[nt](Rt),st.c()),transition_in$1(st,1),st.m(dt.parentNode,dt)):st=null)},i(Rt){ft||(transition_in$1(tt),transition_in$1(st),ft=!0)},o(Rt){transition_out(tt),transition_out(st),ft=!1},d(Rt){~_e&&mt[_e].d(Rt),Rt&&detach$1(rt),~nt&&Et[nt].d(Rt),Rt&&detach$1(dt)}}}function create_if_block_42(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_34]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_if_block_33(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_24]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[40]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_34(et){let _e,tt;return _e=new Icons_default.EraserFilled({props:{theme:et[1],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot_24(et){let _e,tt;return _e=new Icons_default.Eraser({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_24(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot_14]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),_e.$on("click",et[41]),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_if_block_110(et){let _e,tt;const rt=[{class:name5+"-panel-switch-btn"},et[17]];let nt={$$slots:{default:[create_default_slot13]},$$scope:{ctx:et}};for(let st=0;st<rt.length;st+=1)nt=assign$2(nt,rt[st]);return _e=new Button_default({props:nt}),{c(){create_component(_e.$$.fragment)},m(st,dt){mount_component$1(_e,st,dt),tt=!0},p(st,dt){const ft=dt[0]&131072?get_spread_update(rt,[dt&0&&{class:name5+"-panel-switch-btn"},dt[0]&131072&&get_spread_object(st[17])]):{};dt[0]&2|dt[2]&128&&(ft.$$scope={dirty:dt,ctx:st}),_e.$set(ft)},i(st){tt||(transition_in$1(_e.$$.fragment,st),tt=!0)},o(st){transition_out(_e.$$.fragment,st),tt=!1},d(st){destroy_component$1(_e,st)}}}function create_default_slot_14(et){let _e,tt;return _e=new Icons_default.EraserBitmapFilled({props:{theme:et[1]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_default_slot13(et){let _e,tt;return _e=new Icons_default.EraserBitmap({props:{theme:et[1],active:!0}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt[0]&2&&(st.theme=rt[1]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_each_block4(et){let _e,tt,rt,nt,st,dt,ft,ht,mt=et[59]+"",bt,St,Et,Ct,Rt,Tt,wt,At,Nt;return{c(){_e=element$1("button"),tt=element$1("img"),ft=space$1(),ht=element$1("span"),bt=text$2(mt),Et=space$1(),attr$1(tt,"class",rt=name5+"-app-btn-icon "+et[1]),src_url_equal$1(tt.src,nt=et[58])||attr$1(tt,"src",nt),attr$1(tt,"alt",st=et[60]),attr$1(tt,"title",dt=et[59]),attr$1(ht,"class",St=name5+"-app-btn-text "+et[1]),attr$1(_e,"class",Ct=name5+"-app-btn "+et[60]+" "+et[1]),attr$1(_e,"title",Rt=et[59]+(et[62]&&et[62].reason?": "+et[62].reason:"")),attr$1(_e,"data-app-kind",Tt=et[57].kind),_e.disabled=wt=et[62]&&et[62].status!=="idle",toggle_class(_e,"is-loading",et[62]&&et[62].status==="loading"),toggle_class(_e,"is-failed",et[62]&&et[62].status==="failed")},m(Pt,It){insert$1(Pt,_e,It),append$1(_e,tt),append$1(_e,ft),append$1(_e,ht),append$1(ht,bt),append$1(_e,Et),At||(Nt=listen$1(_e,"click",function(){is_function$1(et[63])&&et[63].apply(this,arguments)}),At=!0)},p(Pt,It){et=Pt,It[0]&2&&rt!==(rt=name5+"-app-btn-icon "+et[1])&&attr$1(tt,"class",rt),It[0]&16777216&&!src_url_equal$1(tt.src,nt=et[58])&&attr$1(tt,"src",nt),It[0]&16777216&&st!==(st=et[60])&&attr$1(tt,"alt",st),It[0]&16777216&&dt!==(dt=et[59])&&attr$1(tt,"title",dt),It[0]&16777216&&mt!==(mt=et[59]+"")&&set_data$1(bt,mt),It[0]&2&&St!==(St=name5+"-app-btn-text "+et[1])&&attr$1(ht,"class",St),It[0]&16777218&&Ct!==(Ct=name5+"-app-btn "+et[60]+" "+et[1])&&attr$1(_e,"class",Ct),It[0]&50331648&&Rt!==(Rt=et[59]+(et[62]&&et[62].reason?": "+et[62].reason:""))&&attr$1(_e,"title",Rt),It[0]&16777216&&Tt!==(Tt=et[57].kind)&&attr$1(_e,"data-app-kind",Tt),It[0]&50331648&&wt!==(wt=et[62]&&et[62].status!=="idle")&&(_e.disabled=wt),It[0]&50331650&&toggle_class(_e,"is-loading",et[62]&&et[62].status==="loading"),It[0]&50331650&&toggle_class(_e,"is-failed",et[62]&&et[62].status==="failed")},d(Pt){Pt&&detach$1(_e),At=!1,Nt()}}}function create_fragment74(et){var _e,tt;let rt,nt,st,dt,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt,Pt,It,Ft,qt,Vt,Kt,jt,Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr,Mr,Nr,Yr=et[5]&&create_if_block_23(et),Or=et[7],Ar=[];for(let xn=0;xn<Or.length;xn+=1)Ar[xn]=create_each_block_1(get_each_context_1(et,Or,xn));const Qr=xn=>transition_out(Ar[xn],1,1,()=>{Ar[xn]=null});let hn=!et[8]&&create_if_block_132(et),Sn=et[5]&&create_if_block_122(et),Kr=!!((_e=et[0])!=null&&_e.appliancePlugin)&&create_if_block_52(et);Ct=new StrokeWidth_default({props:{app:et[0],theme:et[1],disabled:et[3]}}),At=new StrokeColor_default({props:{app:et[0],theme:et[1],disabled:et[3],colors:et[9]}}),It=new TextColor_default({props:{app:et[0],theme:et[1],disabled:et[3],colors:et[9]}}),Vt=new SelectShapes_default({props:{app:et[0],theme:et[1],language:et[2],disabled:et[3]}}),Ot=new StrokeWidth_default({props:{app:et[0],theme:et[1],disabled:et[3]}}),Jt=new StrokeColor_default({props:{app:et[0],theme:et[1],disabled:et[3],colors:et[9]}});let Hn=!!((tt=et[0])!=null&&tt.appliancePlugin)&&create_if_block14(et);Sr=new EraserSize_default({props:{app:et[0],theme:et[1],disabled:et[3]}});let ln=et[24],kn=[];for(let xn=0;xn<ln.length;xn+=1)kn[xn]=create_each_block4(get_each_context4(et,ln,xn));return{c(){Yr&&Yr.c(),rt=space$1(),nt=element$1("div");for(let xn=0;xn<Ar.length;xn+=1)Ar[xn].c();st=space$1(),hn&&hn.c(),ft=space$1(),Sn&&Sn.c(),ht=space$1(),mt=element$1("div"),bt=element$1("div"),St=element$1("div"),Kr&&Kr.c(),Et=space$1(),create_component(Ct.$$.fragment),Rt=space$1(),Tt=element$1("div"),wt=space$1(),create_component(At.$$.fragment),Nt=space$1(),Pt=element$1("div"),create_component(It.$$.fragment),Ft=space$1(),qt=element$1("div"),create_component(Vt.$$.fragment),Kt=space$1(),jt=element$1("div"),Ut=space$1(),create_component(Ot.$$.fragment),Wt=space$1(),Bt=element$1("div"),tr=space$1(),create_component(Jt.$$.fragment),ar=space$1(),pr=element$1("div"),cr=element$1("div"),Hn&&Hn.c(),gr=space$1(),create_component(Sr.$$.fragment),Er=space$1(),Vr=element$1("div");for(let xn=0;xn<kn.length;xn+=1)kn[xn].c();attr$1(nt,"class",name5+"-scrollable"),toggle_class(nt,"scrollable",et[5]),attr$1(St,"class",name5+"-panel-switch-pencil"),attr$1(Tt,"class",name5+"-panel-divider"),attr$1(bt,"class",name5+"-panel pencil"),attr$1(Pt,"class",name5+"-panel text"),attr$1(jt,"class",name5+"-panel-divider"),attr$1(Bt,"class",name5+"-panel-divider"),attr$1(qt,"class",name5+"-panel shapes"),attr$1(cr,"class",name5+"-panel-switch-earser"),attr$1(pr,"class",name5+"-panel earser"),attr$1(Vr,"class",name5+"-panel apps"),set_style$1(Vr,"--n",et[24].length),attr$1(mt,"class",name5+"-panel-wrapper"),set_style$1(mt,"display","none")},m(xn,An){Yr&&Yr.m(xn,An),insert$1(xn,rt,An),insert$1(xn,nt,An);for(let rs=0;rs<Ar.length;rs+=1)Ar[rs]&&Ar[rs].m(nt,null);append$1(nt,st),hn&&hn.m(nt,null),insert$1(xn,ft,An),Sn&&Sn.m(xn,An),insert$1(xn,ht,An),insert$1(xn,mt,An),append$1(mt,bt),append$1(bt,St),Kr&&Kr.m(St,null),append$1(bt,Et),mount_component$1(Ct,bt,null),append$1(bt,Rt),append$1(bt,Tt),append$1(bt,wt),mount_component$1(At,bt,null),et[49](bt),append$1(mt,Nt),append$1(mt,Pt),mount_component$1(It,Pt,null),et[50](Pt),append$1(mt,Ft),append$1(mt,qt),mount_component$1(Vt,qt,null),append$1(qt,Kt),append$1(qt,jt),append$1(qt,Ut),mount_component$1(Ot,qt,null),append$1(qt,Wt),append$1(qt,Bt),append$1(qt,tr),mount_component$1(Jt,qt,null),et[51](qt),append$1(mt,ar),append$1(mt,pr),append$1(pr,cr),Hn&&Hn.m(cr,null),append$1(pr,gr),mount_component$1(Sr,pr,null),et[52](pr),append$1(mt,Er),append$1(mt,Vr);for(let rs=0;rs<kn.length;rs+=1)kn[rs]&&kn[rs].m(Vr,null);et[54](Vr),Wr=!0,Mr||(Nr=[action_destroyer(dt=scrollHeight.call(null,nt,et[4])),action_destroyer(scrollTop.call(null,nt,et[26]))],Mr=!0)},p(xn,An){var rs,qs;if(xn[5]?Yr?(Yr.p(xn,An),An[0]&32&&transition_in$1(Yr,1)):(Yr=create_if_block_23(xn),Yr.c(),transition_in$1(Yr,1),Yr.m(rt.parentNode,rt)):Yr&&(group_outros(),transition_out(Yr,1,1,()=>{Yr=null}),check_outros()),An[0]&1621064835|An[1]&63){Or=xn[7];let wn;for(wn=0;wn<Or.length;wn+=1){const Un=get_each_context_1(xn,Or,wn);Ar[wn]?(Ar[wn].p(Un,An),transition_in$1(Ar[wn],1)):(Ar[wn]=create_each_block_1(Un),Ar[wn].c(),transition_in$1(Ar[wn],1),Ar[wn].m(nt,st))}for(group_outros(),wn=Or.length;wn<Ar.length;wn+=1)Qr(wn);check_outros()}xn[8]?hn&&(group_outros(),transition_out(hn,1,1,()=>{hn=null}),check_outros()):hn?(hn.p(xn,An),An[0]&256&&transition_in$1(hn,1)):(hn=create_if_block_132(xn),hn.c(),transition_in$1(hn,1),hn.m(nt,null)),dt&&is_function$1(dt.update)&&An[0]&16&&dt.update.call(null,xn[4]),(!Wr||An[0]&32)&&toggle_class(nt,"scrollable",xn[5]),xn[5]?Sn?(Sn.p(xn,An),An[0]&32&&transition_in$1(Sn,1)):(Sn=create_if_block_122(xn),Sn.c(),transition_in$1(Sn,1),Sn.m(ht.parentNode,ht)):Sn&&(group_outros(),transition_out(Sn,1,1,()=>{Sn=null}),check_outros()),(rs=xn[0])!=null&&rs.appliancePlugin?Kr?(Kr.p(xn,An),An[0]&1&&transition_in$1(Kr,1)):(Kr=create_if_block_52(xn),Kr.c(),transition_in$1(Kr,1),Kr.m(St,null)):Kr&&(group_outros(),transition_out(Kr,1,1,()=>{Kr=null}),check_outros());const Ln={};An[0]&1&&(Ln.app=xn[0]),An[0]&2&&(Ln.theme=xn[1]),An[0]&8&&(Ln.disabled=xn[3]),Ct.$set(Ln);const Cn={};An[0]&1&&(Cn.app=xn[0]),An[0]&2&&(Cn.theme=xn[1]),An[0]&8&&(Cn.disabled=xn[3]),An[0]&512&&(Cn.colors=xn[9]),At.$set(Cn);const Nn={};An[0]&1&&(Nn.app=xn[0]),An[0]&2&&(Nn.theme=xn[1]),An[0]&8&&(Nn.disabled=xn[3]),An[0]&512&&(Nn.colors=xn[9]),It.$set(Nn);const Gr={};An[0]&1&&(Gr.app=xn[0]),An[0]&2&&(Gr.theme=xn[1]),An[0]&4&&(Gr.language=xn[2]),An[0]&8&&(Gr.disabled=xn[3]),Vt.$set(Gr);const tn={};An[0]&1&&(tn.app=xn[0]),An[0]&2&&(tn.theme=xn[1]),An[0]&8&&(tn.disabled=xn[3]),Ot.$set(tn);const dn={};An[0]&1&&(dn.app=xn[0]),An[0]&2&&(dn.theme=xn[1]),An[0]&8&&(dn.disabled=xn[3]),An[0]&512&&(dn.colors=xn[9]),Jt.$set(dn),(qs=xn[0])!=null&&qs.appliancePlugin?Hn?(Hn.p(xn,An),An[0]&1&&transition_in$1(Hn,1)):(Hn=create_if_block14(xn),Hn.c(),transition_in$1(Hn,1),Hn.m(cr,null)):Hn&&(group_outros(),transition_out(Hn,1,1,()=>{Hn=null}),check_outros());const Rn={};if(An[0]&1&&(Rn.app=xn[0]),An[0]&2&&(Rn.theme=xn[1]),An[0]&8&&(Rn.disabled=xn[3]),Sr.$set(Rn),An[0]&50331651){ln=xn[24];let wn;for(wn=0;wn<ln.length;wn+=1){const Un=get_each_context4(xn,ln,wn);kn[wn]?kn[wn].p(Un,An):(kn[wn]=create_each_block4(Un),kn[wn].c(),kn[wn].m(Vr,null))}for(;wn<kn.length;wn+=1)kn[wn].d(1);kn.length=ln.length}(!Wr||An[0]&16777216)&&set_style$1(Vr,"--n",xn[24].length)},i(xn){if(!Wr){transition_in$1(Yr);for(let An=0;An<Or.length;An+=1)transition_in$1(Ar[An]);transition_in$1(hn),transition_in$1(Sn),transition_in$1(Kr),transition_in$1(Ct.$$.fragment,xn),transition_in$1(At.$$.fragment,xn),transition_in$1(It.$$.fragment,xn),transition_in$1(Vt.$$.fragment,xn),transition_in$1(Ot.$$.fragment,xn),transition_in$1(Jt.$$.fragment,xn),transition_in$1(Hn),transition_in$1(Sr.$$.fragment,xn),Wr=!0}},o(xn){transition_out(Yr),Ar=Ar.filter(Boolean);for(let An=0;An<Ar.length;An+=1)transition_out(Ar[An]);transition_out(hn),transition_out(Sn),transition_out(Kr),transition_out(Ct.$$.fragment,xn),transition_out(At.$$.fragment,xn),transition_out(It.$$.fragment,xn),transition_out(Vt.$$.fragment,xn),transition_out(Ot.$$.fragment,xn),transition_out(Jt.$$.fragment,xn),transition_out(Hn),transition_out(Sr.$$.fragment,xn),Wr=!1},d(xn){Yr&&Yr.d(xn),xn&&detach$1(rt),xn&&detach$1(nt),destroy_each(Ar,xn),hn&&hn.d(),xn&&detach$1(ft),Sn&&Sn.d(xn),xn&&detach$1(ht),xn&&detach$1(mt),Kr&&Kr.d(),destroy_component$1(Ct),destroy_component$1(At),et[49](null),destroy_component$1(It),et[50](null),destroy_component$1(Vt),destroy_component$1(Ot),destroy_component$1(Jt),et[51](null),Hn&&Hn.d(),destroy_component$1(Sr),et[52](null),destroy_each(kn,xn),et[54](null),Mr=!1,run_all$1(Nr)}}}var name5="fastboard-toolbar";function instance74(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt=noop$8,Pt=()=>(Nt(),Nt=subscribe$1(dt,pn=>tt(47,At=pn)),dt),It,Ft=noop$8,qt=()=>(Ft(),Ft=subscribe$1(Jt,pn=>tt(48,It=pn)),Jt),Vt,Kt,jt=noop$8,Ut=()=>(jt(),jt=subscribe$1(ht,pn=>tt(25,Kt=pn)),ht);component_subscribe(et,apps$1,pn=>tt(24,Vt=pn)),et.$$.on_destroy.push(()=>Nt()),et.$$.on_destroy.push(()=>Ft()),et.$$.on_destroy.push(()=>jt());let{app:Ot=null}=_e,{theme:Wt="light"}=_e,{language:Bt="en"}=_e,{disabled:tr=!1}=_e,{scroll_height:Jt}=_e;qt();let{computed_height:ar=0}=_e,{scrollable:pr=!1}=_e,{placement:cr="left"}=_e,{items:gr=default_items}=_e,{hide_apps:Sr=!1}=_e,{colors:Er=default_colors}=_e,Vr,Wr,Mr,Nr,Yr,Or,Ar=writable$1(0);component_subscribe(et,Ar,pn=>tt(56,wt=pn));function Qr(){set_store_value(Ar,wt=clamp$5(wt-32-4,0,mt),wt)}function hn(){set_store_value(Ar,wt=clamp$5(wt+32+4,0,mt),wt)}function Sn(){Ot?.setAppliance("clicker")}function Kr(){Ot?.setAppliance("selector")}function Hn(){bt?ft!=="pencil"&&(Ct==="mark"?Cn():Ct==="laser"?Ln():qs()):qs()}function ln(){Ot?.setAppliance("text")}function kn(){bt?ft!=="eraser"&&(Tt==="pencilEraser"?Gr():Nn()):Nn()}function xn(){Ot?.setAppliance("hand")}function An(){Ot?.setAppliance("laserPointer")}function rs(){Ot?.cleanCurrentScene()}function qs(){var pn;bt?(pn=Ot?.appliancePlugin)==null||pn.setMemberState({currentApplianceName:"pencil",useLaserPen:!1,strokeOpacity:1}):Ot?.setAppliance("pencil")}function Ln(){var pn;(pn=Ot?.appliancePlugin)==null||pn.setMemberState({currentApplianceName:"laserPen",useLaserPen:!0,strokeOpacity:1})}function Cn(){var pn;(pn=Ot?.appliancePlugin)==null||pn.setMemberState({currentApplianceName:"pencil",useLaserPen:!1,strokeOpacity:.5})}function Nn(){var pn;bt?(pn=Ot?.appliancePlugin)==null||pn.setMemberState({currentApplianceName:"eraser",isLine:!0}):Ot?.setAppliance("eraser")}function Gr(){var pn;(pn=Ot?.appliancePlugin)==null||pn.setMemberState({currentApplianceName:"pencilEraser",isLine:!1})}function tn(pn){binding_callbacks$1[pn?"unshift":"push"](()=>{Vr=pn,tt(12,Vr)})}function dn(pn){binding_callbacks$1[pn?"unshift":"push"](()=>{Wr=pn,tt(13,Wr)})}function Rn(pn){binding_callbacks$1[pn?"unshift":"push"](()=>{Mr=pn,tt(14,Mr)})}function wn(pn){binding_callbacks$1[pn?"unshift":"push"](()=>{Yr=pn,tt(16,Yr)})}const Un=pn=>{Ot&&pn(Ot),tippy_hide_all()};function Zn(pn){binding_callbacks$1[pn?"unshift":"push"](()=>{Nr=pn,tt(15,Nr)})}return et.$$set=pn=>{"app"in pn&&tt(0,Ot=pn.app),"theme"in pn&&tt(1,Wt=pn.theme),"language"in pn&&tt(2,Bt=pn.language),"disabled"in pn&&tt(3,tr=pn.disabled),"scroll_height"in pn&&qt(tt(4,Jt=pn.scroll_height)),"computed_height"in pn&&tt(42,ar=pn.computed_height),"scrollable"in pn&&tt(5,pr=pn.scrollable),"placement"in pn&&tt(6,cr=pn.placement),"items"in pn&&tt(7,gr=pn.items),"hide_apps"in pn&&tt(8,Sr=pn.hide_apps),"colors"in pn&&tt(9,Er=pn.colors)},et.$$.update=()=>{et.$$.dirty[0]&74&&tt(17,Or={name:name5,theme:Wt,disabled:tr,placement:cr==="left"?"right":"left",menu_placement:cr==="left"?"right-start":"left-start"}),et.$$.dirty[0]&4&&tt(11,rt=i18n4[Bt]),et.$$.dirty[0]&1&&tt(46,nt=Ot?.hotKeys),et.$$.dirty[0]&2048|et.$$.dirty[1]&32768&&tt(23,st={clicker:tooltip(rt.clicker,nt?.changeToClick),selector:tooltip(rt.selector,nt?.changeToSelector),pencil:tooltip(rt.pencil,nt?.changeToPencil),eraser:tooltip(rt.eraser,nt?.changeToEraser),text:tooltip(rt.text,nt?.changeToText),hand:tooltip(rt.hand,nt?.changeToHand),laserPointer:tooltip(rt.laserPointer,nt?.changeToLaserPointer)}),et.$$.dirty[0]&1&&Pt(tt(22,dt=Ot?.memberState)),et.$$.dirty[1]&65536&&tt(19,ft=At?.currentApplianceName),et.$$.dirty[0]&1&&Ut(tt(21,ht=Ot?.appsStatus)),et.$$.dirty[0]&32|et.$$.dirty[1]&133120&&(mt=pr?It+80-ar:0),et.$$.dirty[0]&1&&tt(10,bt=!!Ot?.appliancePlugin),et.$$.dirty[0]&1024|et.$$.dirty[1]&65536&&tt(45,St=bt&&At?.useLaserPen||!1),et.$$.dirty[0]&1024|et.$$.dirty[1]&65536&&tt(44,Et=bt&&At?.strokeOpacity===.5||!1),et.$$.dirty[1]&24576&&tt(20,Ct=St?"laser":Et?"mark":"pencil"),et.$$.dirty[0]&1024|et.$$.dirty[1]&65536&&tt(43,Rt=bt&&At?.isLine===!1),et.$$.dirty[1]&4096&&tt(18,Tt=Rt?"pencilEraser":"eraser")},[Ot,Wt,Bt,tr,Jt,pr,cr,gr,Sr,Er,bt,rt,Vr,Wr,Mr,Nr,Yr,Or,Tt,ft,Ct,ht,dt,st,Vt,Kt,Ar,Qr,hn,Sn,Kr,Hn,ln,kn,xn,An,rs,qs,Ln,Cn,Nn,Gr,ar,Rt,Et,St,nt,At,It,tn,dn,Rn,wn,Un,Zn]}var Contents=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance74,create_fragment74,safe_not_equal$2,{app:0,theme:1,language:2,disabled:3,scroll_height:4,computed_height:42,scrollable:5,placement:6,items:7,hide_apps:8,colors:9},null,[-1,-1,-1])}},Contents_default=Contents;function create_else_block14(et){let _e,tt;return{c(){_e=svg_element("path"),tt=svg_element("path"),attr$1(_e,"stroke","#000"),attr$1(_e,"d","M20 52v16"),attr$1(_e,"class",name6+"-handler-image-stroke-color"),attr$1(tt,"fill","#000"),attr$1(tt,"stroke","none"),attr$1(tt,"d","M16 52v16l-8-8z"),attr$1(tt,"class",name6+"-handler-image-fill-color")},m(rt,nt){insert$1(rt,_e,nt),insert$1(rt,tt,nt)},p:noop$8,d(rt){rt&&detach$1(_e),rt&&detach$1(tt)}}}function create_if_block15(et){let _e,tt;return{c(){_e=svg_element("path"),tt=svg_element("path"),attr$1(_e,"stroke","#000"),attr$1(_e,"d","M10 52v16"),attr$1(_e,"class",name6+"-handler-image-stroke-color"),attr$1(tt,"fill","#000"),attr$1(tt,"stroke","none"),attr$1(tt,"d","M14 52v16l8-8z"),attr$1(tt,"class",name6+"-handler-image-fill-color")},m(rt,nt){insert$1(rt,_e,nt),insert$1(rt,tt,nt)},p:noop$8,d(rt){rt&&detach$1(_e),rt&&detach$1(tt)}}}function create_fragment75(et){let _e,tt,rt,nt,st,dt,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt;rt=new Contents_default({props:{app:et[1],theme:et[2],language:et[3],disabled:et[10],scroll_height:et[14],computed_height:et[9],scrollable:et[8],placement:et[7],items:et[6],hide_apps:et[5],colors:et[0]}});function At(It,Ft){return It[4]?create_if_block15:create_else_block14}let Nt=At(et),Pt=Nt(et);return{c(){_e=element$1("div"),tt=element$1("div"),create_component(rt.$$.fragment),st=space$1(),dt=element$1("label"),ft=element$1("input"),ht=space$1(),mt=svg_element("svg"),bt=svg_element("path"),St=svg_element("path"),Pt.c(),attr$1(tt,"class",nt=name6+"-contents "+et[2]),set_style$1(tt,"height",et[8]?et[9]+"px":"auto"),attr$1(ft,"type","checkbox"),attr$1(bt,"fill","#fff"),attr$1(bt,"stroke","none"),attr$1(bt,"d","m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120"),attr$1(bt,"class",name6+"-handler-bg-color"),attr$1(St,"stroke","#000"),attr$1(St,"d","m0 0 24 16q6 4 6 14v60q0 10-6 14L0 120"),attr$1(St,"class",name6+"-handler-border-color"),attr$1(mt,"fill","none"),attr$1(mt,"stroke-width","2"),attr$1(mt,"viewBox","0 0 32 120"),attr$1(dt,"class",Et=name6+"-handler "+et[2]),attr$1(_e,"class",Ct=name6+" "+et[2]),toggle_class(_e,"collapsed",et[4])},m(It,Ft){insert$1(It,_e,Ft),append$1(_e,tt),mount_component$1(rt,tt,null),append$1(_e,st),append$1(_e,dt),append$1(dt,ft),ft.checked=et[4],append$1(dt,ht),append$1(dt,mt),append$1(mt,bt),append$1(mt,St),Pt.m(mt,null),Rt=!0,Tt||(wt=[listen$1(ft,"change",et[20]),action_destroyer(height.call(null,_e,et[13]))],Tt=!0)},p(It,[Ft]){const qt={};Ft&2&&(qt.app=It[1]),Ft&4&&(qt.theme=It[2]),Ft&8&&(qt.language=It[3]),Ft&1024&&(qt.disabled=It[10]),Ft&512&&(qt.computed_height=It[9]),Ft&256&&(qt.scrollable=It[8]),Ft&128&&(qt.placement=It[7]),Ft&64&&(qt.items=It[6]),Ft&32&&(qt.hide_apps=It[5]),Ft&1&&(qt.colors=It[0]),rt.$set(qt),(!Rt||Ft&4&&nt!==(nt=name6+"-contents "+It[2]))&&attr$1(tt,"class",nt),Ft&768&&set_style$1(tt,"height",It[8]?It[9]+"px":"auto"),Ft&16&&(ft.checked=It[4]),Nt===(Nt=At(It))&&Pt?Pt.p(It,Ft):(Pt.d(1),Pt=Nt(It),Pt&&(Pt.c(),Pt.m(mt,null))),(!Rt||Ft&4&&Et!==(Et=name6+"-handler "+It[2]))&&attr$1(dt,"class",Et),(!Rt||Ft&4&&Ct!==(Ct=name6+" "+It[2]))&&attr$1(_e,"class",Ct),(!Rt||Ft&20)&&toggle_class(_e,"collapsed",It[4])},i(It){Rt||(transition_in$1(rt.$$.fragment,It),Rt=!0)},o(It){transition_out(rt.$$.fragment,It),Rt=!1},d(It){It&&detach$1(_e),destroy_component$1(rt),Pt.d(),Tt=!1,run_all$1(wt)}}}var name6="fastboard-toolbar";function instance75(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,St,Et,Ct,Rt=noop$8,Tt=()=>(Rt(),Rt=subscribe$1(nt,Bt=>tt(18,Ct=Bt)),nt),wt,At=noop$8,Nt=()=>(At(),At=subscribe$1(rt,Bt=>tt(19,wt=Bt)),rt);et.$$.on_destroy.push(()=>Rt()),et.$$.on_destroy.push(()=>At());let{app:Pt=null}=_e,{theme:It="light"}=_e,{language:Ft="en"}=_e,{config:qt={}}=_e,{colors:Vt=void 0}=_e;const Kt=80;let jt=qt.collapsed,Ut=writable$1(0);component_subscribe(et,Ut,Bt=>tt(16,St=Bt));let Ot=writable$1(0);component_subscribe(et,Ot,Bt=>tt(17,Et=Bt));function Wt(){jt=this.checked,tt(4,jt)}return et.$$set=Bt=>{"app"in Bt&&tt(1,Pt=Bt.app),"theme"in Bt&&tt(2,It=Bt.theme),"language"in Bt&&tt(3,Ft=Bt.language),"config"in Bt&&tt(15,qt=Bt.config),"colors"in Bt&&tt(0,Vt=Bt.colors)},et.$$.update=()=>{var Bt,tr;if(et.$$.dirty&2&&Nt(tt(12,rt=Pt?.writable)),et.$$.dirty&2&&Tt(tt(11,nt=Pt?.phase)),et.$$.dirty&786432&&tt(10,st=!(wt&&Ct==="connected")),et.$$.dirty&196608&&tt(9,dt=clamp$5(St,Kt,Et+Kt)),et.$$.dirty&196608&&tt(8,ft=Et+Kt>St),et.$$.dirty&32768&&tt(7,ht=qt.placement||"left"),et.$$.dirty&32768&&tt(6,mt=qt.items||default_items),et.$$.dirty&32768&&tt(5,bt=((Bt=qt.apps)==null?void 0:Bt.enable)===!1),et.$$.dirty&32771)if(Pt?.manager&&Pt?.manager.room)if(Vt&&!((tr=qt.colors)!=null&&tr.length)){const Jt=Pt?.manager.room.floatBarOptions;Jt?.colors&&tt(0,Vt=Jt.colors)}else tt(0,Vt=qt.colors);else tt(0,Vt=default_colors)},[Vt,Pt,It,Ft,jt,bt,mt,ht,ft,dt,st,nt,rt,Ut,Ot,qt,St,Et,Ct,wt,Wt]}var Toolbar=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance75,create_fragment75,safe_not_equal$2,{app:1,theme:2,language:3,config:15,colors:0})}},Toolbar_default=Toolbar;function create_if_block_34(et){let _e,tt;return _e=new Toolbar_default({props:{app:et[0],theme:et[1],language:et[2],config:et[3].toolbar||{}}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.app=rt[0]),nt&2&&(st.theme=rt[1]),nt&4&&(st.language=rt[2]),nt&8&&(st.config=rt[3].toolbar||{}),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_26(et){let _e,tt;return _e=new RedoUndo_default({props:{app:et[0],theme:et[1],language:et[2]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.app=rt[0]),nt&2&&(st.theme=rt[1]),nt&4&&(st.language=rt[2]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block_112(et){let _e,tt;return _e=new ZoomControl_default({props:{app:et[0],theme:et[1],language:et[2]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.app=rt[0]),nt&2&&(st.theme=rt[1]),nt&4&&(st.language=rt[2]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_if_block18(et){let _e,tt;return _e=new PageControl_default({props:{app:et[0],theme:et[1],language:et[2]}}),{c(){create_component(_e.$$.fragment)},m(rt,nt){mount_component$1(_e,rt,nt),tt=!0},p(rt,nt){const st={};nt&1&&(st.app=rt[0]),nt&2&&(st.theme=rt[1]),nt&4&&(st.language=rt[2]),_e.$set(st)},i(rt){tt||(transition_in$1(_e.$$.fragment,rt),tt=!0)},o(rt){transition_out(_e.$$.fragment,rt),tt=!1},d(rt){destroy_component$1(_e,rt)}}}function create_fragment78(et){var _e,tt,rt,nt;let st,dt,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt=((_e=et[3].toolbar)==null?void 0:_e.enable)!==!1&&create_if_block_34(et),Pt=((tt=et[3].redo_undo)==null?void 0:tt.enable)!==!1&&!et[6]&&create_if_block_26(et),It=((rt=et[3].zoom_control)==null?void 0:rt.enable)!==!1&&!et[7]&&create_if_block_112(et),Ft=((nt=et[3].page_control)==null?void 0:nt.enable)!==!1&&create_if_block18(et);return{c(){var qt;st=element$1("div"),dt=element$1("div"),ft=space$1(),ht=element$1("div"),Nt&&Nt.c(),bt=space$1(),St=element$1("div"),Pt&&Pt.c(),Et=space$1(),It&&It.c(),Ct=space$1(),Rt=element$1("div"),Ft&&Ft.c(),attr$1(dt,"class",name9+"-view"),attr$1(ht,"class",mt=name9+"-"+(((qt=et[3].toolbar)==null?void 0:qt.placement)||"left")),toggle_class(ht,"hidden",et[5]),attr$1(St,"class",name9+"-bottom-left"),toggle_class(St,"hidden",et[5]&&et[6]),attr$1(Rt,"class",name9+"-bottom-right"),toggle_class(Rt,"hidden",et[8]),attr$1(st,"class",name9+"-root"),toggle_class(st,"loading",!et[0])},m(qt,Vt){insert$1(qt,st,Vt),append$1(st,dt),et[26](dt),append$1(st,ft),append$1(st,ht),Nt&&Nt.m(ht,null),append$1(st,bt),append$1(st,St),Pt&&Pt.m(St,null),append$1(St,Et),It&&It.m(St,null),append$1(st,Ct),append$1(st,Rt),Ft&&Ft.m(Rt,null),Tt=!0,wt||(At=listen$1(dt,"touchstart",et[13],{passive:!0,capture:!0}),wt=!0)},p(qt,[Vt]){var Kt,jt,Ut,Ot,Wt;((Kt=qt[3].toolbar)==null?void 0:Kt.enable)!==!1?Nt?(Nt.p(qt,Vt),Vt&8&&transition_in$1(Nt,1)):(Nt=create_if_block_34(qt),Nt.c(),transition_in$1(Nt,1),Nt.m(ht,null)):Nt&&(group_outros(),transition_out(Nt,1,1,()=>{Nt=null}),check_outros()),(!Tt||Vt&8&&mt!==(mt=name9+"-"+(((jt=qt[3].toolbar)==null?void 0:jt.placement)||"left")))&&attr$1(ht,"class",mt),(!Tt||Vt&40)&&toggle_class(ht,"hidden",qt[5]),((Ut=qt[3].redo_undo)==null?void 0:Ut.enable)!==!1&&!qt[6]?Pt?(Pt.p(qt,Vt),Vt&72&&transition_in$1(Pt,1)):(Pt=create_if_block_26(qt),Pt.c(),transition_in$1(Pt,1),Pt.m(St,Et)):Pt&&(group_outros(),transition_out(Pt,1,1,()=>{Pt=null}),check_outros()),((Ot=qt[3].zoom_control)==null?void 0:Ot.enable)!==!1&&!qt[7]?It?(It.p(qt,Vt),Vt&136&&transition_in$1(It,1)):(It=create_if_block_112(qt),It.c(),transition_in$1(It,1),It.m(St,null)):It&&(group_outros(),transition_out(It,1,1,()=>{It=null}),check_outros()),(!Tt||Vt&96)&&toggle_class(St,"hidden",qt[5]&&qt[6]),((Wt=qt[3].page_control)==null?void 0:Wt.enable)!==!1?Ft?(Ft.p(qt,Vt),Vt&8&&transition_in$1(Ft,1)):(Ft=create_if_block18(qt),Ft.c(),transition_in$1(Ft,1),Ft.m(Rt,null)):Ft&&(group_outros(),transition_out(Ft,1,1,()=>{Ft=null}),check_outros()),(!Tt||Vt&256)&&toggle_class(Rt,"hidden",qt[8]),(!Tt||Vt&1)&&toggle_class(st,"loading",!qt[0])},i(qt){Tt||(transition_in$1(Nt),transition_in$1(Pt),transition_in$1(It),transition_in$1(Ft),Tt=!0)},o(qt){transition_out(Nt),transition_out(Pt),transition_out(It),transition_out(Ft),Tt=!1},d(qt){qt&&detach$1(st),et[26](null),Nt&&Nt.d(),Pt&&Pt.d(),It&&It.d(),Ft&&Ft.d(),wt=!1,At()}}}var name9="fastboard";function instance78(et,_e,tt){let rt,nt,st,dt,ft,ht,mt=noop$8,bt=()=>(mt(),mt=subscribe$1(st,Wr=>tt(22,ht=Wr)),st),St,Et=noop$8,Ct=()=>(Et(),Et=subscribe$1(nt,Wr=>tt(23,St=Wr)),nt),Rt,Tt=noop$8,wt=()=>(Tt(),Tt=subscribe$1(dt,Wr=>tt(24,Rt=Wr)),dt),At,Nt=noop$8,Pt=()=>(Nt(),Nt=subscribe$1(rt,Wr=>tt(25,At=Wr)),rt);et.$$.on_destroy.push(()=>mt()),et.$$.on_destroy.push(()=>Et()),et.$$.on_destroy.push(()=>Tt()),et.$$.on_destroy.push(()=>Nt());let{app:It=null}=_e,{theme:Ft="light"}=_e,{language:qt="en"}=_e,{containerRef:Vt=void 0}=_e,{config:Kt={}}=_e,{force_show_toolbar:jt=void 0}=_e,{force_show_redo_undo:Ut=void 0}=_e,{force_show_zoom_control:Ot=void 0}=_e,{force_show_page_control:Wt=void 0}=_e;const Bt=["DocsViewer","Slide","PDFjs"];let tr,Jt="hidden",ar=!1,pr=!1,cr=!1,gr=!1,Sr=!1;onMount(()=>{if(Vt)return Vt(tr),()=>{Vt&&Vt(null)}});function Er(){tippy_hide_all();let Wr=document.activeElement;Wr&&Wr.blur&&Wr.blur()}function Vr(Wr){binding_callbacks$1[Wr?"unshift":"push"](()=>{tr=Wr,tt(4,tr)})}return et.$$set=Wr=>{"app"in Wr&&tt(0,It=Wr.app),"theme"in Wr&&tt(1,Ft=Wr.theme),"language"in Wr&&tt(2,qt=Wr.language),"containerRef"in Wr&&tt(14,Vt=Wr.containerRef),"config"in Wr&&tt(3,Kt=Wr.config),"force_show_toolbar"in Wr&&tt(15,jt=Wr.force_show_toolbar),"force_show_redo_undo"in Wr&&tt(16,Ut=Wr.force_show_redo_undo),"force_show_zoom_control"in Wr&&tt(17,Ot=Wr.force_show_zoom_control),"force_show_page_control"in Wr&&tt(18,Wt=Wr.force_show_page_control)},et.$$.update=()=>{if(et.$$.dirty&1&&Pt(tt(12,rt=It?.writable)),et.$$.dirty&1&&Ct(tt(11,nt=It?.boxState)),et.$$.dirty&1&&bt(tt(10,st=It?.focusedApp)),et.$$.dirty&1&&wt(tt(9,dt=It?.visibleApps)),et.$$.dirty&62914561&&(At?It?.appInMainViewPlugin?Rt&&Rt.size>0&&St==="maximized"?Bt.some(Wr=>(ht||"").includes(Wr))?tt(19,Jt="toolbar-only"):tt(19,Jt="hidden"):tt(19,Jt="visible"):St==="maximized"?ht&&Bt.some(Wr=>(ht||"").includes(Wr))?tt(19,Jt="toolbar-only"):tt(19,Jt="hidden"):tt(19,Jt="visible"):tt(19,Jt="hidden")),et.$$.dirty&8&&tt(21,ft=!Kt.toolbar||!Kt.toolbar.items||!Kt.toolbar.apps||Kt.toolbar.items.length>0||Kt.toolbar.apps.enable!==!1),et.$$.dirty&17)try{It&&tr&&(It.bindContainer(tr),tt(20,ar=!0))}catch(Wr){console.error("[fastboard] An error occurred while binding container"),console.error(Wr)}et.$$.dirty&1048579&&It&&Ft&&ar&&It.manager.setPrefersColorScheme(Ft),et.$$.dirty&2654208&&(jt===!1?tt(5,pr=!0):jt===!0?tt(5,pr=!1):tt(5,pr=!ft||!(Jt==="visible"||Jt==="toolbar-only"))),et.$$.dirty&589824&&(Ut===!1?tt(6,cr=!0):Ut===!0?tt(6,cr=!1):tt(6,cr=Jt!=="visible")),et.$$.dirty&655360&&(Ot===!1?tt(7,gr=!0):Ot===!0?tt(7,gr=!1):tt(7,gr=Jt!=="visible")),et.$$.dirty&786432&&(Wt===!1?tt(8,Sr=!0):Wt===!0?tt(8,Sr=!1):tt(8,Sr=Jt!=="visible"))},[It,Ft,qt,Kt,tr,pr,cr,gr,Sr,dt,st,nt,rt,Er,Vt,jt,Ut,Ot,Wt,Jt,ar,ft,ht,St,Rt,At,Vr]}var Fastboard=class extends SvelteComponent$1{constructor(et){super(),init$2(this,et,instance78,create_fragment78,not_equal,{app:0,theme:1,language:2,containerRef:14,config:3,force_show_toolbar:15,force_show_redo_undo:16,force_show_zoom_control:17,force_show_page_control:18})}},Fastboard_default=Fastboard;function createUI(et,_e){let tt,rt;if(et?.manager&&et.manager.room){const st=et.manager.room.floatBarOptions;st?.colors&&(rt=st.colors)}const nt={mount(st,dt){var ft;return tt&&tt.$destroy(),rt&&dt?.config&&!((ft=dt.config.toolbar)!=null&&ft.colors)&&(dt?.config.toolbar||(dt.config.toolbar={}),dt.config.toolbar.colors=rt),tt=new Fastboard_default({target:st,props:__spreadValues$1({app:et},dt)}),nt},update(st){var dt;tt&&st&&(rt&&st?.config&&!((dt=st.config.toolbar)!=null&&dt.colors)&&(st?.config.toolbar||(st.config.toolbar={}),st.config.toolbar.colors=rt),tt.$set(st))},destroy(){tt&&tt.$destroy(),tt=void 0},forceShowToolbar(){tt&&tt.$set({force_show_toolbar:!0})},forceHideToolbar(){tt&&tt.$set({force_show_toolbar:!1})},recoverToolbar(){tt&&tt.$set({force_show_toolbar:void 0})},forceShowPageControl(){tt&&tt.$set({force_show_page_control:!0})},forceHidePageControl(){tt&&tt.$set({force_show_page_control:!1})},recoverPageControl(){tt&&tt.$set({force_show_page_control:void 0})},forceShowRedoUndo(){tt&&tt.$set({force_show_redo_undo:!0})},forceHideRedoUndo(){tt&&tt.$set({force_show_redo_undo:!1})},recoverRedoUndo(){tt&&tt.$set({force_show_redo_undo:void 0})},forceShowZoomControl(){tt&&tt.$set({force_show_zoom_control:!0})},forceHideZoomControl(){tt&&tt.$set({force_show_zoom_control:!1})},recoverZoomControl(){tt&&tt.$set({force_show_zoom_control:void 0})}};return _e&&nt.mount(_e,{app:et}),nt}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(et){return et&&et.__esModule&&Object.prototype.hasOwnProperty.call(et,"default")?et.default:et}function getAugmentedNamespace$1(et){if(Object.prototype.hasOwnProperty.call(et,"__esModule"))return et;var _e=et.default;if(typeof _e=="function"){var tt=function rt(){var nt=!1;try{nt=this instanceof rt}catch{}return nt?Reflect.construct(_e,arguments,this.constructor):_e.apply(this,arguments)};tt.prototype=_e.prototype}else tt={};return Object.defineProperty(tt,"__esModule",{value:!0}),Object.keys(et).forEach(function(rt){var nt=Object.getOwnPropertyDescriptor(et,rt);Object.defineProperty(tt,rt,nt.get?nt:{enumerable:!0,get:function(){return et[rt]}})}),tt}var whiteWebSdk={},es_reflect_construct={},globalThis_1,hasRequiredGlobalThis;function requireGlobalThis(){if(hasRequiredGlobalThis)return globalThis_1;hasRequiredGlobalThis=1;var et=function(_e){return _e&&_e.Math===Math&&_e};return globalThis_1=et(typeof globalThis=="object"&&globalThis)||et(typeof window=="object"&&window)||et(typeof self=="object"&&self)||et(typeof commonjsGlobal=="object"&&commonjsGlobal)||et(typeof globalThis_1=="object"&&globalThis_1)||(function(){return this})()||Function("return this")(),globalThis_1}var objectGetOwnPropertyDescriptor={},fails,hasRequiredFails;function requireFails(){return hasRequiredFails||(hasRequiredFails=1,fails=function(et){try{return!!et()}catch{return!0}}),fails}var descriptors,hasRequiredDescriptors;function requireDescriptors(){if(hasRequiredDescriptors)return descriptors;hasRequiredDescriptors=1;var et=requireFails();return descriptors=!et(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),descriptors}var functionBindNative,hasRequiredFunctionBindNative;function requireFunctionBindNative(){if(hasRequiredFunctionBindNative)return functionBindNative;hasRequiredFunctionBindNative=1;var et=requireFails();return functionBindNative=!et(function(){var _e=(function(){}).bind();return typeof _e!="function"||_e.hasOwnProperty("prototype")}),functionBindNative}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){if(hasRequiredFunctionCall)return functionCall;hasRequiredFunctionCall=1;var et=requireFunctionBindNative(),_e=Function.prototype.call;return functionCall=et?_e.bind(_e):function(){return _e.apply(_e,arguments)},functionCall}var objectPropertyIsEnumerable={},hasRequiredObjectPropertyIsEnumerable;function requireObjectPropertyIsEnumerable(){if(hasRequiredObjectPropertyIsEnumerable)return objectPropertyIsEnumerable;hasRequiredObjectPropertyIsEnumerable=1;var et={}.propertyIsEnumerable,_e=Object.getOwnPropertyDescriptor,tt=_e&&!et.call({1:2},1);return objectPropertyIsEnumerable.f=tt?function(nt){var st=_e(this,nt);return!!st&&st.enumerable}:et,objectPropertyIsEnumerable}var createPropertyDescriptor,hasRequiredCreatePropertyDescriptor;function requireCreatePropertyDescriptor(){return hasRequiredCreatePropertyDescriptor||(hasRequiredCreatePropertyDescriptor=1,createPropertyDescriptor=function(et,_e){return{enumerable:!(et&1),configurable:!(et&2),writable:!(et&4),value:_e}}),createPropertyDescriptor}var functionUncurryThis,hasRequiredFunctionUncurryThis;function requireFunctionUncurryThis(){if(hasRequiredFunctionUncurryThis)return functionUncurryThis;hasRequiredFunctionUncurryThis=1;var et=requireFunctionBindNative(),_e=Function.prototype,tt=_e.call,rt=et&&_e.bind.bind(tt,tt);return functionUncurryThis=et?rt:function(nt){return function(){return tt.apply(nt,arguments)}},functionUncurryThis}var classofRaw,hasRequiredClassofRaw;function requireClassofRaw(){if(hasRequiredClassofRaw)return classofRaw;hasRequiredClassofRaw=1;var et=requireFunctionUncurryThis(),_e=et({}.toString),tt=et("".slice);return classofRaw=function(rt){return tt(_e(rt),8,-1)},classofRaw}var indexedObject,hasRequiredIndexedObject;function requireIndexedObject(){if(hasRequiredIndexedObject)return indexedObject;hasRequiredIndexedObject=1;var et=requireFunctionUncurryThis(),_e=requireFails(),tt=requireClassofRaw(),rt=Object,nt=et("".split);return indexedObject=_e(function(){return!rt("z").propertyIsEnumerable(0)})?function(st){return tt(st)==="String"?nt(st,""):rt(st)}:rt,indexedObject}var isNullOrUndefined,hasRequiredIsNullOrUndefined;function requireIsNullOrUndefined(){return hasRequiredIsNullOrUndefined||(hasRequiredIsNullOrUndefined=1,isNullOrUndefined=function(et){return et==null}),isNullOrUndefined}var requireObjectCoercible,hasRequiredRequireObjectCoercible;function requireRequireObjectCoercible(){if(hasRequiredRequireObjectCoercible)return requireObjectCoercible;hasRequiredRequireObjectCoercible=1;var et=requireIsNullOrUndefined(),_e=TypeError;return requireObjectCoercible=function(tt){if(et(tt))throw new _e("Can't call method on "+tt);return tt},requireObjectCoercible}var toIndexedObject,hasRequiredToIndexedObject;function requireToIndexedObject(){if(hasRequiredToIndexedObject)return toIndexedObject;hasRequiredToIndexedObject=1;var et=requireIndexedObject(),_e=requireRequireObjectCoercible();return toIndexedObject=function(tt){return et(_e(tt))},toIndexedObject}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var et=typeof document=="object"&&document.all;return isCallable=typeof et>"u"&&et!==void 0?function(_e){return typeof _e=="function"||_e===et}:function(_e){return typeof _e=="function"},isCallable}var isObject$5,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$5;hasRequiredIsObject=1;var et=requireIsCallable();return isObject$5=function(_e){return typeof _e=="object"?_e!==null:et(_e)},isObject$5}var getBuiltIn,hasRequiredGetBuiltIn;function requireGetBuiltIn(){if(hasRequiredGetBuiltIn)return getBuiltIn;hasRequiredGetBuiltIn=1;var et=requireGlobalThis(),_e=requireIsCallable(),tt=function(rt){return _e(rt)?rt:void 0};return getBuiltIn=function(rt,nt){return arguments.length<2?tt(et[rt]):et[rt]&&et[rt][nt]},getBuiltIn}var objectIsPrototypeOf,hasRequiredObjectIsPrototypeOf;function requireObjectIsPrototypeOf(){if(hasRequiredObjectIsPrototypeOf)return objectIsPrototypeOf;hasRequiredObjectIsPrototypeOf=1;var et=requireFunctionUncurryThis();return objectIsPrototypeOf=et({}.isPrototypeOf),objectIsPrototypeOf}var environmentUserAgent,hasRequiredEnvironmentUserAgent;function requireEnvironmentUserAgent(){if(hasRequiredEnvironmentUserAgent)return environmentUserAgent;hasRequiredEnvironmentUserAgent=1;var et=requireGlobalThis(),_e=et.navigator,tt=_e&&_e.userAgent;return environmentUserAgent=tt?String(tt):"",environmentUserAgent}var environmentV8Version,hasRequiredEnvironmentV8Version;function requireEnvironmentV8Version(){if(hasRequiredEnvironmentV8Version)return environmentV8Version;hasRequiredEnvironmentV8Version=1;var et=requireGlobalThis(),_e=requireEnvironmentUserAgent(),tt=et.process,rt=et.Deno,nt=tt&&tt.versions||rt&&rt.version,st=nt&&nt.v8,dt,ft;return st&&(dt=st.split("."),ft=dt[0]>0&&dt[0]<4?1:+(dt[0]+dt[1])),!ft&&_e&&(dt=_e.match(/Edge\/(\d+)/),(!dt||dt[1]>=74)&&(dt=_e.match(/Chrome\/(\d+)/),dt&&(ft=+dt[1]))),environmentV8Version=ft,environmentV8Version}var symbolConstructorDetection,hasRequiredSymbolConstructorDetection;function requireSymbolConstructorDetection(){if(hasRequiredSymbolConstructorDetection)return symbolConstructorDetection;hasRequiredSymbolConstructorDetection=1;var et=requireEnvironmentV8Version(),_e=requireFails(),tt=requireGlobalThis(),rt=tt.String;return symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!_e(function(){var nt=Symbol("symbol detection");return!rt(nt)||!(Object(nt)instanceof Symbol)||!Symbol.sham&&et&&et<41}),symbolConstructorDetection}var useSymbolAsUid,hasRequiredUseSymbolAsUid;function requireUseSymbolAsUid(){if(hasRequiredUseSymbolAsUid)return useSymbolAsUid;hasRequiredUseSymbolAsUid=1;var et=requireSymbolConstructorDetection();return useSymbolAsUid=et&&!Symbol.sham&&typeof Symbol.iterator=="symbol",useSymbolAsUid}var isSymbol,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol;hasRequiredIsSymbol=1;var et=requireGetBuiltIn(),_e=requireIsCallable(),tt=requireObjectIsPrototypeOf(),rt=requireUseSymbolAsUid(),nt=Object;return isSymbol=rt?function(st){return typeof st=="symbol"}:function(st){var dt=et("Symbol");return _e(dt)&&tt(dt.prototype,nt(st))},isSymbol}var tryToString,hasRequiredTryToString;function requireTryToString(){if(hasRequiredTryToString)return tryToString;hasRequiredTryToString=1;var et=String;return tryToString=function(_e){try{return et(_e)}catch{return"Object"}},tryToString}var aCallable,hasRequiredACallable;function requireACallable(){if(hasRequiredACallable)return aCallable;hasRequiredACallable=1;var et=requireIsCallable(),_e=requireTryToString(),tt=TypeError;return aCallable=function(rt){if(et(rt))return rt;throw new tt(_e(rt)+" is not a function")},aCallable}var getMethod,hasRequiredGetMethod;function requireGetMethod(){if(hasRequiredGetMethod)return getMethod;hasRequiredGetMethod=1;var et=requireACallable(),_e=requireIsNullOrUndefined();return getMethod=function(tt,rt){var nt=tt[rt];return _e(nt)?void 0:et(nt)},getMethod}var ordinaryToPrimitive,hasRequiredOrdinaryToPrimitive;function requireOrdinaryToPrimitive(){if(hasRequiredOrdinaryToPrimitive)return ordinaryToPrimitive;hasRequiredOrdinaryToPrimitive=1;var et=requireFunctionCall(),_e=requireIsCallable(),tt=requireIsObject(),rt=TypeError;return ordinaryToPrimitive=function(nt,st){var dt,ft;if(st==="string"&&_e(dt=nt.toString)&&!tt(ft=et(dt,nt))||_e(dt=nt.valueOf)&&!tt(ft=et(dt,nt))||st!=="string"&&_e(dt=nt.toString)&&!tt(ft=et(dt,nt)))return ft;throw new rt("Can't convert object to primitive value")},ordinaryToPrimitive}var sharedStore={exports:{}},isPure,hasRequiredIsPure;function requireIsPure(){return hasRequiredIsPure||(hasRequiredIsPure=1,isPure=!1),isPure}var defineGlobalProperty,hasRequiredDefineGlobalProperty;function requireDefineGlobalProperty(){if(hasRequiredDefineGlobalProperty)return defineGlobalProperty;hasRequiredDefineGlobalProperty=1;var et=requireGlobalThis(),_e=Object.defineProperty;return defineGlobalProperty=function(tt,rt){try{_e(et,tt,{value:rt,configurable:!0,writable:!0})}catch{et[tt]=rt}return rt},defineGlobalProperty}var hasRequiredSharedStore;function requireSharedStore(){if(hasRequiredSharedStore)return sharedStore.exports;hasRequiredSharedStore=1;var et=requireIsPure(),_e=requireGlobalThis(),tt=requireDefineGlobalProperty(),rt="__core-js_shared__",nt=sharedStore.exports=_e[rt]||tt(rt,{});return(nt.versions||(nt.versions=[])).push({version:"3.46.0",mode:et?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports}var shared,hasRequiredShared;function requireShared(){if(hasRequiredShared)return shared;hasRequiredShared=1;var et=requireSharedStore();return shared=function(_e,tt){return et[_e]||(et[_e]=tt||{})},shared}var toObject$1,hasRequiredToObject;function requireToObject(){if(hasRequiredToObject)return toObject$1;hasRequiredToObject=1;var et=requireRequireObjectCoercible(),_e=Object;return toObject$1=function(tt){return _e(et(tt))},toObject$1}var hasOwnProperty_1,hasRequiredHasOwnProperty;function requireHasOwnProperty(){if(hasRequiredHasOwnProperty)return hasOwnProperty_1;hasRequiredHasOwnProperty=1;var et=requireFunctionUncurryThis(),_e=requireToObject(),tt=et({}.hasOwnProperty);return hasOwnProperty_1=Object.hasOwn||function(nt,st){return tt(_e(nt),st)},hasOwnProperty_1}var uid,hasRequiredUid;function requireUid(){if(hasRequiredUid)return uid;hasRequiredUid=1;var et=requireFunctionUncurryThis(),_e=0,tt=Math.random(),rt=et(1.1.toString);return uid=function(nt){return"Symbol("+(nt===void 0?"":nt)+")_"+rt(++_e+tt,36)},uid}var wellKnownSymbol,hasRequiredWellKnownSymbol;function requireWellKnownSymbol(){if(hasRequiredWellKnownSymbol)return wellKnownSymbol;hasRequiredWellKnownSymbol=1;var et=requireGlobalThis(),_e=requireShared(),tt=requireHasOwnProperty(),rt=requireUid(),nt=requireSymbolConstructorDetection(),st=requireUseSymbolAsUid(),dt=et.Symbol,ft=_e("wks"),ht=st?dt.for||dt:dt&&dt.withoutSetter||rt;return wellKnownSymbol=function(mt){return tt(ft,mt)||(ft[mt]=nt&&tt(dt,mt)?dt[mt]:ht("Symbol."+mt)),ft[mt]},wellKnownSymbol}var toPrimitive$2,hasRequiredToPrimitive$1;function requireToPrimitive$1(){if(hasRequiredToPrimitive$1)return toPrimitive$2;hasRequiredToPrimitive$1=1;var et=requireFunctionCall(),_e=requireIsObject(),tt=requireIsSymbol(),rt=requireGetMethod(),nt=requireOrdinaryToPrimitive(),st=requireWellKnownSymbol(),dt=TypeError,ft=st("toPrimitive");return toPrimitive$2=function(ht,mt){if(!_e(ht)||tt(ht))return ht;var bt=rt(ht,ft),St;if(bt){if(mt===void 0&&(mt="default"),St=et(bt,ht,mt),!_e(St)||tt(St))return St;throw new dt("Can't convert object to primitive value")}return mt===void 0&&(mt="number"),nt(ht,mt)},toPrimitive$2}var toPropertyKey$1,hasRequiredToPropertyKey$1;function requireToPropertyKey$1(){if(hasRequiredToPropertyKey$1)return toPropertyKey$1;hasRequiredToPropertyKey$1=1;var et=requireToPrimitive$1(),_e=requireIsSymbol();return toPropertyKey$1=function(tt){var rt=et(tt,"string");return _e(rt)?rt:rt+""},toPropertyKey$1}var documentCreateElement,hasRequiredDocumentCreateElement;function requireDocumentCreateElement(){if(hasRequiredDocumentCreateElement)return documentCreateElement;hasRequiredDocumentCreateElement=1;var et=requireGlobalThis(),_e=requireIsObject(),tt=et.document,rt=_e(tt)&&_e(tt.createElement);return documentCreateElement=function(nt){return rt?tt.createElement(nt):{}},documentCreateElement}var ie8DomDefine,hasRequiredIe8DomDefine;function requireIe8DomDefine(){if(hasRequiredIe8DomDefine)return ie8DomDefine;hasRequiredIe8DomDefine=1;var et=requireDescriptors(),_e=requireFails(),tt=requireDocumentCreateElement();return ie8DomDefine=!et&&!_e(function(){return Object.defineProperty(tt("div"),"a",{get:function(){return 7}}).a!==7}),ie8DomDefine}var hasRequiredObjectGetOwnPropertyDescriptor;function requireObjectGetOwnPropertyDescriptor(){if(hasRequiredObjectGetOwnPropertyDescriptor)return objectGetOwnPropertyDescriptor;hasRequiredObjectGetOwnPropertyDescriptor=1;var et=requireDescriptors(),_e=requireFunctionCall(),tt=requireObjectPropertyIsEnumerable(),rt=requireCreatePropertyDescriptor(),nt=requireToIndexedObject(),st=requireToPropertyKey$1(),dt=requireHasOwnProperty(),ft=requireIe8DomDefine(),ht=Object.getOwnPropertyDescriptor;return objectGetOwnPropertyDescriptor.f=et?ht:function(bt,St){if(bt=nt(bt),St=st(St),ft)try{return ht(bt,St)}catch{}if(dt(bt,St))return rt(!_e(tt.f,bt,St),bt[St])},objectGetOwnPropertyDescriptor}var objectDefineProperty={},v8PrototypeDefineBug,hasRequiredV8PrototypeDefineBug;function requireV8PrototypeDefineBug(){if(hasRequiredV8PrototypeDefineBug)return v8PrototypeDefineBug;hasRequiredV8PrototypeDefineBug=1;var et=requireDescriptors(),_e=requireFails();return v8PrototypeDefineBug=et&&_e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v8PrototypeDefineBug}var anObject,hasRequiredAnObject;function requireAnObject(){if(hasRequiredAnObject)return anObject;hasRequiredAnObject=1;var et=requireIsObject(),_e=String,tt=TypeError;return anObject=function(rt){if(et(rt))return rt;throw new tt(_e(rt)+" is not an object")},anObject}var hasRequiredObjectDefineProperty;function requireObjectDefineProperty(){if(hasRequiredObjectDefineProperty)return objectDefineProperty;hasRequiredObjectDefineProperty=1;var et=requireDescriptors(),_e=requireIe8DomDefine(),tt=requireV8PrototypeDefineBug(),rt=requireAnObject(),nt=requireToPropertyKey$1(),st=TypeError,dt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,ht="enumerable",mt="configurable",bt="writable";return objectDefineProperty.f=et?tt?function(Et,Ct,Rt){if(rt(Et),Ct=nt(Ct),rt(Rt),typeof Et=="function"&&Ct==="prototype"&&"value"in Rt&&bt in Rt&&!Rt[bt]){var Tt=ft(Et,Ct);Tt&&Tt[bt]&&(Et[Ct]=Rt.value,Rt={configurable:mt in Rt?Rt[mt]:Tt[mt],enumerable:ht in Rt?Rt[ht]:Tt[ht],writable:!1})}return dt(Et,Ct,Rt)}:dt:function(Et,Ct,Rt){if(rt(Et),Ct=nt(Ct),rt(Rt),_e)try{return dt(Et,Ct,Rt)}catch{}if("get"in Rt||"set"in Rt)throw new st("Accessors not supported");return"value"in Rt&&(Et[Ct]=Rt.value),Et},objectDefineProperty}var createNonEnumerableProperty,hasRequiredCreateNonEnumerableProperty;function requireCreateNonEnumerableProperty(){if(hasRequiredCreateNonEnumerableProperty)return createNonEnumerableProperty;hasRequiredCreateNonEnumerableProperty=1;var et=requireDescriptors(),_e=requireObjectDefineProperty(),tt=requireCreatePropertyDescriptor();return createNonEnumerableProperty=et?function(rt,nt,st){return _e.f(rt,nt,tt(1,st))}:function(rt,nt,st){return rt[nt]=st,rt},createNonEnumerableProperty}var makeBuiltIn={exports:{}},functionName,hasRequiredFunctionName;function requireFunctionName(){if(hasRequiredFunctionName)return functionName;hasRequiredFunctionName=1;var et=requireDescriptors(),_e=requireHasOwnProperty(),tt=Function.prototype,rt=et&&Object.getOwnPropertyDescriptor,nt=_e(tt,"name"),st=nt&&(function(){}).name==="something",dt=nt&&(!et||et&&rt(tt,"name").configurable);return functionName={EXISTS:nt,PROPER:st,CONFIGURABLE:dt},functionName}var inspectSource,hasRequiredInspectSource;function requireInspectSource(){if(hasRequiredInspectSource)return inspectSource;hasRequiredInspectSource=1;var et=requireFunctionUncurryThis(),_e=requireIsCallable(),tt=requireSharedStore(),rt=et(Function.toString);return _e(tt.inspectSource)||(tt.inspectSource=function(nt){return rt(nt)}),inspectSource=tt.inspectSource,inspectSource}var weakMapBasicDetection,hasRequiredWeakMapBasicDetection;function requireWeakMapBasicDetection(){if(hasRequiredWeakMapBasicDetection)return weakMapBasicDetection;hasRequiredWeakMapBasicDetection=1;var et=requireGlobalThis(),_e=requireIsCallable(),tt=et.WeakMap;return weakMapBasicDetection=_e(tt)&&/native code/.test(String(tt)),weakMapBasicDetection}var sharedKey,hasRequiredSharedKey;function requireSharedKey(){if(hasRequiredSharedKey)return sharedKey;hasRequiredSharedKey=1;var et=requireShared(),_e=requireUid(),tt=et("keys");return sharedKey=function(rt){return tt[rt]||(tt[rt]=_e(rt))},sharedKey}var hiddenKeys,hasRequiredHiddenKeys;function requireHiddenKeys(){return hasRequiredHiddenKeys||(hasRequiredHiddenKeys=1,hiddenKeys={}),hiddenKeys}var internalState,hasRequiredInternalState;function requireInternalState(){if(hasRequiredInternalState)return internalState;hasRequiredInternalState=1;var et=requireWeakMapBasicDetection(),_e=requireGlobalThis(),tt=requireIsObject(),rt=requireCreateNonEnumerableProperty(),nt=requireHasOwnProperty(),st=requireSharedStore(),dt=requireSharedKey(),ft=requireHiddenKeys(),ht="Object already initialized",mt=_e.TypeError,bt=_e.WeakMap,St,Et,Ct,Rt=function(Nt){return Ct(Nt)?Et(Nt):St(Nt,{})},Tt=function(Nt){return function(Pt){var It;if(!tt(Pt)||(It=Et(Pt)).type!==Nt)throw new mt("Incompatible receiver, "+Nt+" required");return It}};if(et||st.state){var wt=st.state||(st.state=new bt);wt.get=wt.get,wt.has=wt.has,wt.set=wt.set,St=function(Nt,Pt){if(wt.has(Nt))throw new mt(ht);return Pt.facade=Nt,wt.set(Nt,Pt),Pt},Et=function(Nt){return wt.get(Nt)||{}},Ct=function(Nt){return wt.has(Nt)}}else{var At=dt("state");ft[At]=!0,St=function(Nt,Pt){if(nt(Nt,At))throw new mt(ht);return Pt.facade=Nt,rt(Nt,At,Pt),Pt},Et=function(Nt){return nt(Nt,At)?Nt[At]:{}},Ct=function(Nt){return nt(Nt,At)}}return internalState={set:St,get:Et,has:Ct,enforce:Rt,getterFor:Tt},internalState}var hasRequiredMakeBuiltIn;function requireMakeBuiltIn(){if(hasRequiredMakeBuiltIn)return makeBuiltIn.exports;hasRequiredMakeBuiltIn=1;var et=requireFunctionUncurryThis(),_e=requireFails(),tt=requireIsCallable(),rt=requireHasOwnProperty(),nt=requireDescriptors(),st=requireFunctionName().CONFIGURABLE,dt=requireInspectSource(),ft=requireInternalState(),ht=ft.enforce,mt=ft.get,bt=String,St=Object.defineProperty,Et=et("".slice),Ct=et("".replace),Rt=et([].join),Tt=nt&&!_e(function(){return St(function(){},"length",{value:8}).length!==8}),wt=String(String).split("String"),At=makeBuiltIn.exports=function(Nt,Pt,It){Et(bt(Pt),0,7)==="Symbol("&&(Pt="["+Ct(bt(Pt),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),It&&It.getter&&(Pt="get "+Pt),It&&It.setter&&(Pt="set "+Pt),(!rt(Nt,"name")||st&&Nt.name!==Pt)&&(nt?St(Nt,"name",{value:Pt,configurable:!0}):Nt.name=Pt),Tt&&It&&rt(It,"arity")&&Nt.length!==It.arity&&St(Nt,"length",{value:It.arity});try{It&&rt(It,"constructor")&&It.constructor?nt&&St(Nt,"prototype",{writable:!1}):Nt.prototype&&(Nt.prototype=void 0)}catch{}var Ft=ht(Nt);return rt(Ft,"source")||(Ft.source=Rt(wt,typeof Pt=="string"?Pt:"")),Nt};return Function.prototype.toString=At(function(){return tt(this)&&mt(this).source||dt(this)},"toString"),makeBuiltIn.exports}var defineBuiltIn,hasRequiredDefineBuiltIn;function requireDefineBuiltIn(){if(hasRequiredDefineBuiltIn)return defineBuiltIn;hasRequiredDefineBuiltIn=1;var et=requireIsCallable(),_e=requireObjectDefineProperty(),tt=requireMakeBuiltIn(),rt=requireDefineGlobalProperty();return defineBuiltIn=function(nt,st,dt,ft){ft||(ft={});var ht=ft.enumerable,mt=ft.name!==void 0?ft.name:st;if(et(dt)&&tt(dt,mt,ft),ft.global)ht?nt[st]=dt:rt(st,dt);else{try{ft.unsafe?nt[st]&&(ht=!0):delete nt[st]}catch{}ht?nt[st]=dt:_e.f(nt,st,{value:dt,enumerable:!1,configurable:!ft.nonConfigurable,writable:!ft.nonWritable})}return nt},defineBuiltIn}var objectGetOwnPropertyNames={},mathTrunc,hasRequiredMathTrunc;function requireMathTrunc(){if(hasRequiredMathTrunc)return mathTrunc;hasRequiredMathTrunc=1;var et=Math.ceil,_e=Math.floor;return mathTrunc=Math.trunc||function(rt){var nt=+rt;return(nt>0?_e:et)(nt)},mathTrunc}var toIntegerOrInfinity,hasRequiredToIntegerOrInfinity;function requireToIntegerOrInfinity(){if(hasRequiredToIntegerOrInfinity)return toIntegerOrInfinity;hasRequiredToIntegerOrInfinity=1;var et=requireMathTrunc();return toIntegerOrInfinity=function(_e){var tt=+_e;return tt!==tt||tt===0?0:et(tt)},toIntegerOrInfinity}var toAbsoluteIndex,hasRequiredToAbsoluteIndex;function requireToAbsoluteIndex(){if(hasRequiredToAbsoluteIndex)return toAbsoluteIndex;hasRequiredToAbsoluteIndex=1;var et=requireToIntegerOrInfinity(),_e=Math.max,tt=Math.min;return toAbsoluteIndex=function(rt,nt){var st=et(rt);return st<0?_e(st+nt,0):tt(st,nt)},toAbsoluteIndex}var toLength,hasRequiredToLength;function requireToLength(){if(hasRequiredToLength)return toLength;hasRequiredToLength=1;var et=requireToIntegerOrInfinity(),_e=Math.min;return toLength=function(tt){var rt=et(tt);return rt>0?_e(rt,9007199254740991):0},toLength}var lengthOfArrayLike,hasRequiredLengthOfArrayLike;function requireLengthOfArrayLike(){if(hasRequiredLengthOfArrayLike)return lengthOfArrayLike;hasRequiredLengthOfArrayLike=1;var et=requireToLength();return lengthOfArrayLike=function(_e){return et(_e.length)},lengthOfArrayLike}var arrayIncludes,hasRequiredArrayIncludes;function requireArrayIncludes(){if(hasRequiredArrayIncludes)return arrayIncludes;hasRequiredArrayIncludes=1;var et=requireToIndexedObject(),_e=requireToAbsoluteIndex(),tt=requireLengthOfArrayLike(),rt=function(nt){return function(st,dt,ft){var ht=et(st),mt=tt(ht);if(mt===0)return!nt&&-1;var bt=_e(ft,mt),St;if(nt&&dt!==dt){for(;mt>bt;)if(St=ht[bt++],St!==St)return!0}else for(;mt>bt;bt++)if((nt||bt in ht)&&ht[bt]===dt)return nt||bt||0;return!nt&&-1}};return arrayIncludes={includes:rt(!0),indexOf:rt(!1)},arrayIncludes}var objectKeysInternal,hasRequiredObjectKeysInternal;function requireObjectKeysInternal(){if(hasRequiredObjectKeysInternal)return objectKeysInternal;hasRequiredObjectKeysInternal=1;var et=requireFunctionUncurryThis(),_e=requireHasOwnProperty(),tt=requireToIndexedObject(),rt=requireArrayIncludes().indexOf,nt=requireHiddenKeys(),st=et([].push);return objectKeysInternal=function(dt,ft){var ht=tt(dt),mt=0,bt=[],St;for(St in ht)!_e(nt,St)&&_e(ht,St)&&st(bt,St);for(;ft.length>mt;)_e(ht,St=ft[mt++])&&(~rt(bt,St)||st(bt,St));return bt},objectKeysInternal}var enumBugKeys,hasRequiredEnumBugKeys;function requireEnumBugKeys(){return hasRequiredEnumBugKeys||(hasRequiredEnumBugKeys=1,enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),enumBugKeys}var hasRequiredObjectGetOwnPropertyNames;function requireObjectGetOwnPropertyNames(){if(hasRequiredObjectGetOwnPropertyNames)return objectGetOwnPropertyNames;hasRequiredObjectGetOwnPropertyNames=1;var et=requireObjectKeysInternal(),_e=requireEnumBugKeys(),tt=_e.concat("length","prototype");return objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(nt){return et(nt,tt)},objectGetOwnPropertyNames}var objectGetOwnPropertySymbols={},hasRequiredObjectGetOwnPropertySymbols;function requireObjectGetOwnPropertySymbols(){return hasRequiredObjectGetOwnPropertySymbols||(hasRequiredObjectGetOwnPropertySymbols=1,objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols),objectGetOwnPropertySymbols}var ownKeys$1,hasRequiredOwnKeys;function requireOwnKeys(){if(hasRequiredOwnKeys)return ownKeys$1;hasRequiredOwnKeys=1;var et=requireGetBuiltIn(),_e=requireFunctionUncurryThis(),tt=requireObjectGetOwnPropertyNames(),rt=requireObjectGetOwnPropertySymbols(),nt=requireAnObject(),st=_e([].concat);return ownKeys$1=et("Reflect","ownKeys")||function(ft){var ht=tt.f(nt(ft)),mt=rt.f;return mt?st(ht,mt(ft)):ht},ownKeys$1}var copyConstructorProperties,hasRequiredCopyConstructorProperties;function requireCopyConstructorProperties(){if(hasRequiredCopyConstructorProperties)return copyConstructorProperties;hasRequiredCopyConstructorProperties=1;var et=requireHasOwnProperty(),_e=requireOwnKeys(),tt=requireObjectGetOwnPropertyDescriptor(),rt=requireObjectDefineProperty();return copyConstructorProperties=function(nt,st,dt){for(var ft=_e(st),ht=rt.f,mt=tt.f,bt=0;bt<ft.length;bt++){var St=ft[bt];!et(nt,St)&&!(dt&&et(dt,St))&&ht(nt,St,mt(st,St))}},copyConstructorProperties}var isForced_1,hasRequiredIsForced;function requireIsForced(){if(hasRequiredIsForced)return isForced_1;hasRequiredIsForced=1;var et=requireFails(),_e=requireIsCallable(),tt=/#|\.prototype\./,rt=function(ht,mt){var bt=st[nt(ht)];return bt===ft?!0:bt===dt?!1:_e(mt)?et(mt):!!mt},nt=rt.normalize=function(ht){return String(ht).replace(tt,".").toLowerCase()},st=rt.data={},dt=rt.NATIVE="N",ft=rt.POLYFILL="P";return isForced_1=rt,isForced_1}var _export,hasRequired_export;function require_export(){if(hasRequired_export)return _export;hasRequired_export=1;var et=requireGlobalThis(),_e=requireObjectGetOwnPropertyDescriptor().f,tt=requireCreateNonEnumerableProperty(),rt=requireDefineBuiltIn(),nt=requireDefineGlobalProperty(),st=requireCopyConstructorProperties(),dt=requireIsForced();return _export=function(ft,ht){var mt=ft.target,bt=ft.global,St=ft.stat,Et,Ct,Rt,Tt,wt,At;if(bt?Ct=et:St?Ct=et[mt]||nt(mt,{}):Ct=et[mt]&&et[mt].prototype,Ct)for(Rt in ht){if(wt=ht[Rt],ft.dontCallGetSet?(At=_e(Ct,Rt),Tt=At&&At.value):Tt=Ct[Rt],Et=dt(bt?Rt:mt+(St?".":"#")+Rt,ft.forced),!Et&&Tt!==void 0){if(typeof wt==typeof Tt)continue;st(wt,Tt)}(ft.sham||Tt&&Tt.sham)&&tt(wt,"sham",!0),rt(Ct,Rt,wt,ft)}},_export}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){if(hasRequiredFunctionApply)return functionApply;hasRequiredFunctionApply=1;var et=requireFunctionBindNative(),_e=Function.prototype,tt=_e.apply,rt=_e.call;return functionApply=typeof Reflect=="object"&&Reflect.apply||(et?rt.bind(tt):function(){return rt.apply(tt,arguments)}),functionApply}var arraySlice,hasRequiredArraySlice;function requireArraySlice(){if(hasRequiredArraySlice)return arraySlice;hasRequiredArraySlice=1;var et=requireFunctionUncurryThis();return arraySlice=et([].slice),arraySlice}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var et=requireFunctionUncurryThis(),_e=requireACallable(),tt=requireIsObject(),rt=requireHasOwnProperty(),nt=requireArraySlice(),st=requireFunctionBindNative(),dt=Function,ft=et([].concat),ht=et([].join),mt={},bt=function(St,Et,Ct){if(!rt(mt,Et)){for(var Rt=[],Tt=0;Tt<Et;Tt++)Rt[Tt]="a["+Tt+"]";mt[Et]=dt("C,a","return new C("+ht(Rt,",")+")")}return mt[Et](St,Ct)};return functionBind=st?dt.bind:function(Et){var Ct=_e(this),Rt=Ct.prototype,Tt=nt(arguments,1),wt=function(){var Nt=ft(Tt,nt(arguments));return this instanceof wt?bt(Ct,Nt.length,Nt):Ct.apply(Et,Nt)};return tt(Rt)&&(wt.prototype=Rt),wt},functionBind}var toStringTagSupport,hasRequiredToStringTagSupport;function requireToStringTagSupport(){if(hasRequiredToStringTagSupport)return toStringTagSupport;hasRequiredToStringTagSupport=1;var et=requireWellKnownSymbol(),_e=et("toStringTag"),tt={};return tt[_e]="z",toStringTagSupport=String(tt)==="[object z]",toStringTagSupport}var classof,hasRequiredClassof;function requireClassof(){if(hasRequiredClassof)return classof;hasRequiredClassof=1;var et=requireToStringTagSupport(),_e=requireIsCallable(),tt=requireClassofRaw(),rt=requireWellKnownSymbol(),nt=rt("toStringTag"),st=Object,dt=tt((function(){return arguments})())==="Arguments",ft=function(ht,mt){try{return ht[mt]}catch{}};return classof=et?tt:function(ht){var mt,bt,St;return ht===void 0?"Undefined":ht===null?"Null":typeof(bt=ft(mt=st(ht),nt))=="string"?bt:dt?tt(mt):(St=tt(mt))==="Object"&&_e(mt.callee)?"Arguments":St},classof}var isConstructor,hasRequiredIsConstructor;function requireIsConstructor(){if(hasRequiredIsConstructor)return isConstructor;hasRequiredIsConstructor=1;var et=requireFunctionUncurryThis(),_e=requireFails(),tt=requireIsCallable(),rt=requireClassof(),nt=requireGetBuiltIn(),st=requireInspectSource(),dt=function(){},ft=nt("Reflect","construct"),ht=/^\s*(?:class|function)\b/,mt=et(ht.exec),bt=!ht.test(dt),St=function(Rt){if(!tt(Rt))return!1;try{return ft(dt,[],Rt),!0}catch{return!1}},Et=function(Rt){if(!tt(Rt))return!1;switch(rt(Rt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bt||!!mt(ht,st(Rt))}catch{return!0}};return Et.sham=!0,isConstructor=!ft||_e(function(){var Ct;return St(St.call)||!St(Object)||!St(function(){Ct=!0})||Ct})?Et:St,isConstructor}var aConstructor,hasRequiredAConstructor;function requireAConstructor(){if(hasRequiredAConstructor)return aConstructor;hasRequiredAConstructor=1;var et=requireIsConstructor(),_e=requireTryToString(),tt=TypeError;return aConstructor=function(rt){if(et(rt))return rt;throw new tt(_e(rt)+" is not a constructor")},aConstructor}var objectDefineProperties={},objectKeys,hasRequiredObjectKeys;function requireObjectKeys(){if(hasRequiredObjectKeys)return objectKeys;hasRequiredObjectKeys=1;var et=requireObjectKeysInternal(),_e=requireEnumBugKeys();return objectKeys=Object.keys||function(rt){return et(rt,_e)},objectKeys}var hasRequiredObjectDefineProperties;function requireObjectDefineProperties(){if(hasRequiredObjectDefineProperties)return objectDefineProperties;hasRequiredObjectDefineProperties=1;var et=requireDescriptors(),_e=requireV8PrototypeDefineBug(),tt=requireObjectDefineProperty(),rt=requireAnObject(),nt=requireToIndexedObject(),st=requireObjectKeys();return objectDefineProperties.f=et&&!_e?Object.defineProperties:function(ft,ht){rt(ft);for(var mt=nt(ht),bt=st(ht),St=bt.length,Et=0,Ct;St>Et;)tt.f(ft,Ct=bt[Et++],mt[Ct]);return ft},objectDefineProperties}var html,hasRequiredHtml;function requireHtml(){if(hasRequiredHtml)return html;hasRequiredHtml=1;var et=requireGetBuiltIn();return html=et("document","documentElement"),html}var objectCreate,hasRequiredObjectCreate;function requireObjectCreate(){if(hasRequiredObjectCreate)return objectCreate;hasRequiredObjectCreate=1;var et=requireAnObject(),_e=requireObjectDefineProperties(),tt=requireEnumBugKeys(),rt=requireHiddenKeys(),nt=requireHtml(),st=requireDocumentCreateElement(),dt=requireSharedKey(),ft=">",ht="<",mt="prototype",bt="script",St=dt("IE_PROTO"),Et=function(){},Ct=function(Nt){return ht+bt+ft+Nt+ht+"/"+bt+ft},Rt=function(Nt){Nt.write(Ct("")),Nt.close();var Pt=Nt.parentWindow.Object;return Nt=null,Pt},Tt=function(){var Nt=st("iframe"),Pt="java"+bt+":",It;return Nt.style.display="none",nt.appendChild(Nt),Nt.src=String(Pt),It=Nt.contentWindow.document,It.open(),It.write(Ct("document.F=Object")),It.close(),It.F},wt,At=function(){try{wt=new ActiveXObject("htmlfile")}catch{}At=typeof document<"u"?document.domain&&wt?Rt(wt):Tt():Rt(wt);for(var Nt=tt.length;Nt--;)delete At[mt][tt[Nt]];return At()};return rt[St]=!0,objectCreate=Object.create||function(Pt,It){var Ft;return Pt!==null?(Et[mt]=et(Pt),Ft=new Et,Et[mt]=null,Ft[St]=Pt):Ft=At(),It===void 0?Ft:_e.f(Ft,It)},objectCreate}var hasRequiredEs_reflect_construct;function requireEs_reflect_construct(){if(hasRequiredEs_reflect_construct)return es_reflect_construct;hasRequiredEs_reflect_construct=1;var et=require_export(),_e=requireGetBuiltIn(),tt=requireFunctionApply(),rt=requireFunctionBind(),nt=requireAConstructor(),st=requireAnObject(),dt=requireIsObject(),ft=requireObjectCreate(),ht=requireFails(),mt=_e("Reflect","construct"),bt=Object.prototype,St=[].push,Et=ht(function(){function Tt(){}return!(mt(function(){},[],Tt)instanceof Tt)}),Ct=!ht(function(){mt(function(){})}),Rt=Et||Ct;return et({target:"Reflect",stat:!0,forced:Rt,sham:Rt},{construct:function(wt,At){nt(wt),st(At);var Nt=arguments.length<3?wt:nt(arguments[2]);if(Ct&&!Et)return mt(wt,At,Nt);if(wt===Nt){switch(At.length){case 0:return new wt;case 1:return new wt(At[0]);case 2:return new wt(At[0],At[1]);case 3:return new wt(At[0],At[1],At[2]);case 4:return new wt(At[0],At[1],At[2],At[3])}var Pt=[null];return tt(St,Pt,At),new(tt(rt,wt,Pt))}var It=Nt.prototype,Ft=ft(dt(It)?It:bt),qt=tt(wt,Ft,At);return dt(qt)?qt:Ft}}),es_reflect_construct}var es_reflect_get={},isDataDescriptor,hasRequiredIsDataDescriptor;function requireIsDataDescriptor(){if(hasRequiredIsDataDescriptor)return isDataDescriptor;hasRequiredIsDataDescriptor=1;var et=requireHasOwnProperty();return isDataDescriptor=function(_e){return _e!==void 0&&(et(_e,"value")||et(_e,"writable"))},isDataDescriptor}var correctPrototypeGetter,hasRequiredCorrectPrototypeGetter;function requireCorrectPrototypeGetter(){if(hasRequiredCorrectPrototypeGetter)return correctPrototypeGetter;hasRequiredCorrectPrototypeGetter=1;var et=requireFails();return correctPrototypeGetter=!et(function(){function _e(){}return _e.prototype.constructor=null,Object.getPrototypeOf(new _e)!==_e.prototype}),correctPrototypeGetter}var objectGetPrototypeOf,hasRequiredObjectGetPrototypeOf;function requireObjectGetPrototypeOf(){if(hasRequiredObjectGetPrototypeOf)return objectGetPrototypeOf;hasRequiredObjectGetPrototypeOf=1;var et=requireHasOwnProperty(),_e=requireIsCallable(),tt=requireToObject(),rt=requireSharedKey(),nt=requireCorrectPrototypeGetter(),st=rt("IE_PROTO"),dt=Object,ft=dt.prototype;return objectGetPrototypeOf=nt?dt.getPrototypeOf:function(ht){var mt=tt(ht);if(et(mt,st))return mt[st];var bt=mt.constructor;return _e(bt)&&mt instanceof bt?bt.prototype:mt instanceof dt?ft:null},objectGetPrototypeOf}var hasRequiredEs_reflect_get;function requireEs_reflect_get(){if(hasRequiredEs_reflect_get)return es_reflect_get;hasRequiredEs_reflect_get=1;var et=require_export(),_e=requireFunctionCall(),tt=requireIsObject(),rt=requireAnObject(),nt=requireIsDataDescriptor(),st=requireObjectGetOwnPropertyDescriptor(),dt=requireObjectGetPrototypeOf();function ft(ht,mt){var bt=arguments.length<3?ht:arguments[2],St,Et;if(rt(ht)===bt)return ht[mt];if(St=st.f(ht,mt),St)return nt(St)?St.value:St.get===void 0?void 0:_e(St.get,bt);if(tt(Et=dt(ht)))return ft(Et,mt,bt)}return et({target:"Reflect",stat:!0},{get:ft}),es_reflect_get}var runtime={exports:{}},hasRequiredRuntime;function requireRuntime(){return hasRequiredRuntime||(hasRequiredRuntime=1,(function(et){var _e=(function(tt){var rt=Object.prototype,nt=rt.hasOwnProperty,st=Object.defineProperty||function(gr,Sr,Er){gr[Sr]=Er.value},dt,ft=typeof Symbol=="function"?Symbol:{},ht=ft.iterator||"@@iterator",mt=ft.asyncIterator||"@@asyncIterator",bt=ft.toStringTag||"@@toStringTag";function St(gr,Sr,Er){return Object.defineProperty(gr,Sr,{value:Er,enumerable:!0,configurable:!0,writable:!0}),gr[Sr]}try{St({},"")}catch{St=function(Sr,Er,Vr){return Sr[Er]=Vr}}function Et(gr,Sr,Er,Vr){var Wr=Sr&&Sr.prototype instanceof Pt?Sr:Pt,Mr=Object.create(Wr.prototype),Nr=new ar(Vr||[]);return st(Mr,"_invoke",{value:Wt(gr,Er,Nr)}),Mr}tt.wrap=Et;function Ct(gr,Sr,Er){try{return{type:"normal",arg:gr.call(Sr,Er)}}catch(Vr){return{type:"throw",arg:Vr}}}var Rt="suspendedStart",Tt="suspendedYield",wt="executing",At="completed",Nt={};function Pt(){}function It(){}function Ft(){}var qt={};St(qt,ht,function(){return this});var Vt=Object.getPrototypeOf,Kt=Vt&&Vt(Vt(pr([])));Kt&&Kt!==rt&&nt.call(Kt,ht)&&(qt=Kt);var jt=Ft.prototype=Pt.prototype=Object.create(qt);It.prototype=Ft,st(jt,"constructor",{value:Ft,configurable:!0}),st(Ft,"constructor",{value:It,configurable:!0}),It.displayName=St(Ft,bt,"GeneratorFunction");function Ut(gr){["next","throw","return"].forEach(function(Sr){St(gr,Sr,function(Er){return this._invoke(Sr,Er)})})}tt.isGeneratorFunction=function(gr){var Sr=typeof gr=="function"&&gr.constructor;return Sr?Sr===It||(Sr.displayName||Sr.name)==="GeneratorFunction":!1},tt.mark=function(gr){return Object.setPrototypeOf?Object.setPrototypeOf(gr,Ft):(gr.__proto__=Ft,St(gr,bt,"GeneratorFunction")),gr.prototype=Object.create(jt),gr},tt.awrap=function(gr){return{__await:gr}};function Ot(gr,Sr){function Er(Mr,Nr,Yr,Or){var Ar=Ct(gr[Mr],gr,Nr);if(Ar.type==="throw")Or(Ar.arg);else{var Qr=Ar.arg,hn=Qr.value;return hn&&typeof hn=="object"&&nt.call(hn,"__await")?Sr.resolve(hn.__await).then(function(Sn){Er("next",Sn,Yr,Or)},function(Sn){Er("throw",Sn,Yr,Or)}):Sr.resolve(hn).then(function(Sn){Qr.value=Sn,Yr(Qr)},function(Sn){return Er("throw",Sn,Yr,Or)})}}var Vr;function Wr(Mr,Nr){function Yr(){return new Sr(function(Or,Ar){Er(Mr,Nr,Or,Ar)})}return Vr=Vr?Vr.then(Yr,Yr):Yr()}st(this,"_invoke",{value:Wr})}Ut(Ot.prototype),St(Ot.prototype,mt,function(){return this}),tt.AsyncIterator=Ot,tt.async=function(gr,Sr,Er,Vr,Wr){Wr===void 0&&(Wr=Promise);var Mr=new Ot(Et(gr,Sr,Er,Vr),Wr);return tt.isGeneratorFunction(Sr)?Mr:Mr.next().then(function(Nr){return Nr.done?Nr.value:Mr.next()})};function Wt(gr,Sr,Er){var Vr=Rt;return function(Mr,Nr){if(Vr===wt)throw new Error("Generator is already running");if(Vr===At){if(Mr==="throw")throw Nr;return cr()}for(Er.method=Mr,Er.arg=Nr;;){var Yr=Er.delegate;if(Yr){var Or=Bt(Yr,Er);if(Or){if(Or===Nt)continue;return Or}}if(Er.method==="next")Er.sent=Er._sent=Er.arg;else if(Er.method==="throw"){if(Vr===Rt)throw Vr=At,Er.arg;Er.dispatchException(Er.arg)}else Er.method==="return"&&Er.abrupt("return",Er.arg);Vr=wt;var Ar=Ct(gr,Sr,Er);if(Ar.type==="normal"){if(Vr=Er.done?At:Tt,Ar.arg===Nt)continue;return{value:Ar.arg,done:Er.done}}else Ar.type==="throw"&&(Vr=At,Er.method="throw",Er.arg=Ar.arg)}}}function Bt(gr,Sr){var Er=Sr.method,Vr=gr.iterator[Er];if(Vr===dt)return Sr.delegate=null,Er==="throw"&&gr.iterator.return&&(Sr.method="return",Sr.arg=dt,Bt(gr,Sr),Sr.method==="throw")||Er!=="return"&&(Sr.method="throw",Sr.arg=new TypeError("The iterator does not provide a '"+Er+"' method")),Nt;var Wr=Ct(Vr,gr.iterator,Sr.arg);if(Wr.type==="throw")return Sr.method="throw",Sr.arg=Wr.arg,Sr.delegate=null,Nt;var Mr=Wr.arg;if(!Mr)return Sr.method="throw",Sr.arg=new TypeError("iterator result is not an object"),Sr.delegate=null,Nt;if(Mr.done)Sr[gr.resultName]=Mr.value,Sr.next=gr.nextLoc,Sr.method!=="return"&&(Sr.method="next",Sr.arg=dt);else return Mr;return Sr.delegate=null,Nt}Ut(jt),St(jt,bt,"Generator"),St(jt,ht,function(){return this}),St(jt,"toString",function(){return"[object Generator]"});function tr(gr){var Sr={tryLoc:gr[0]};1 in gr&&(Sr.catchLoc=gr[1]),2 in gr&&(Sr.finallyLoc=gr[2],Sr.afterLoc=gr[3]),this.tryEntries.push(Sr)}function Jt(gr){var Sr=gr.completion||{};Sr.type="normal",delete Sr.arg,gr.completion=Sr}function ar(gr){this.tryEntries=[{tryLoc:"root"}],gr.forEach(tr,this),this.reset(!0)}tt.keys=function(gr){var Sr=Object(gr),Er=[];for(var Vr in Sr)Er.push(Vr);return Er.reverse(),function Wr(){for(;Er.length;){var Mr=Er.pop();if(Mr in Sr)return Wr.value=Mr,Wr.done=!1,Wr}return Wr.done=!0,Wr}};function pr(gr){if(gr){var Sr=gr[ht];if(Sr)return Sr.call(gr);if(typeof gr.next=="function")return gr;if(!isNaN(gr.length)){var Er=-1,Vr=function Wr(){for(;++Er<gr.length;)if(nt.call(gr,Er))return Wr.value=gr[Er],Wr.done=!1,Wr;return Wr.value=dt,Wr.done=!0,Wr};return Vr.next=Vr}}return{next:cr}}tt.values=pr;function cr(){return{value:dt,done:!0}}return ar.prototype={constructor:ar,reset:function(gr){if(this.prev=0,this.next=0,this.sent=this._sent=dt,this.done=!1,this.delegate=null,this.method="next",this.arg=dt,this.tryEntries.forEach(Jt),!gr)for(var Sr in this)Sr.charAt(0)==="t"&&nt.call(this,Sr)&&!isNaN(+Sr.slice(1))&&(this[Sr]=dt)},stop:function(){this.done=!0;var gr=this.tryEntries[0],Sr=gr.completion;if(Sr.type==="throw")throw Sr.arg;return this.rval},dispatchException:function(gr){if(this.done)throw gr;var Sr=this;function Er(Or,Ar){return Mr.type="throw",Mr.arg=gr,Sr.next=Or,Ar&&(Sr.method="next",Sr.arg=dt),!!Ar}for(var Vr=this.tryEntries.length-1;Vr>=0;--Vr){var Wr=this.tryEntries[Vr],Mr=Wr.completion;if(Wr.tryLoc==="root")return Er("end");if(Wr.tryLoc<=this.prev){var Nr=nt.call(Wr,"catchLoc"),Yr=nt.call(Wr,"finallyLoc");if(Nr&&Yr){if(this.prev<Wr.catchLoc)return Er(Wr.catchLoc,!0);if(this.prev<Wr.finallyLoc)return Er(Wr.finallyLoc)}else if(Nr){if(this.prev<Wr.catchLoc)return Er(Wr.catchLoc,!0)}else if(Yr){if(this.prev<Wr.finallyLoc)return Er(Wr.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(gr,Sr){for(var Er=this.tryEntries.length-1;Er>=0;--Er){var Vr=this.tryEntries[Er];if(Vr.tryLoc<=this.prev&&nt.call(Vr,"finallyLoc")&&this.prev<Vr.finallyLoc){var Wr=Vr;break}}Wr&&(gr==="break"||gr==="continue")&&Wr.tryLoc<=Sr&&Sr<=Wr.finallyLoc&&(Wr=null);var Mr=Wr?Wr.completion:{};return Mr.type=gr,Mr.arg=Sr,Wr?(this.method="next",this.next=Wr.finallyLoc,Nt):this.complete(Mr)},complete:function(gr,Sr){if(gr.type==="throw")throw gr.arg;return gr.type==="break"||gr.type==="continue"?this.next=gr.arg:gr.type==="return"?(this.rval=this.arg=gr.arg,this.method="return",this.next="end"):gr.type==="normal"&&Sr&&(this.next=Sr),Nt},finish:function(gr){for(var Sr=this.tryEntries.length-1;Sr>=0;--Sr){var Er=this.tryEntries[Sr];if(Er.finallyLoc===gr)return this.complete(Er.completion,Er.afterLoc),Jt(Er),Nt}},catch:function(gr){for(var Sr=this.tryEntries.length-1;Sr>=0;--Sr){var Er=this.tryEntries[Sr];if(Er.tryLoc===gr){var Vr=Er.completion;if(Vr.type==="throw"){var Wr=Vr.arg;Jt(Er)}return Wr}}throw new Error("illegal catch attempt")},delegateYield:function(gr,Sr,Er){return this.delegate={iterator:pr(gr),resultName:Sr,nextLoc:Er},this.method==="next"&&(this.arg=dt),Nt}},tt})(et.exports);try{regeneratorRuntime=_e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=_e:Function("r","regeneratorRuntime = r")(_e)}})(runtime)),runtime.exports}var es_object_create={},hasRequiredEs_object_create;function requireEs_object_create(){if(hasRequiredEs_object_create)return es_object_create;hasRequiredEs_object_create=1;var et=require_export(),_e=requireDescriptors(),tt=requireObjectCreate();return et({target:"Object",stat:!0,sham:!_e},{create:tt}),es_object_create}var es_object_defineProperty={},hasRequiredEs_object_defineProperty;function requireEs_object_defineProperty(){if(hasRequiredEs_object_defineProperty)return es_object_defineProperty;hasRequiredEs_object_defineProperty=1;var et=require_export(),_e=requireDescriptors(),tt=requireObjectDefineProperty().f;return et({target:"Object",stat:!0,forced:Object.defineProperty!==tt,sham:!_e},{defineProperty:tt}),es_object_defineProperty}var es_object_defineProperties={},hasRequiredEs_object_defineProperties;function requireEs_object_defineProperties(){if(hasRequiredEs_object_defineProperties)return es_object_defineProperties;hasRequiredEs_object_defineProperties=1;var et=require_export(),_e=requireDescriptors(),tt=requireObjectDefineProperties().f;return et({target:"Object",stat:!0,forced:Object.defineProperties!==tt,sham:!_e},{defineProperties:tt}),es_object_defineProperties}var es_object_getOwnPropertyDescriptor={},hasRequiredEs_object_getOwnPropertyDescriptor;function requireEs_object_getOwnPropertyDescriptor(){if(hasRequiredEs_object_getOwnPropertyDescriptor)return es_object_getOwnPropertyDescriptor;hasRequiredEs_object_getOwnPropertyDescriptor=1;var et=require_export(),_e=requireFails(),tt=requireToIndexedObject(),rt=requireObjectGetOwnPropertyDescriptor().f,nt=requireDescriptors(),st=!nt||_e(function(){rt(1)});return et({target:"Object",stat:!0,forced:st,sham:!nt},{getOwnPropertyDescriptor:function(ft,ht){return rt(tt(ft),ht)}}),es_object_getOwnPropertyDescriptor}var es_object_getOwnPropertyDescriptors={},createProperty,hasRequiredCreateProperty;function requireCreateProperty(){if(hasRequiredCreateProperty)return createProperty;hasRequiredCreateProperty=1;var et=requireDescriptors(),_e=requireObjectDefineProperty(),tt=requireCreatePropertyDescriptor();return createProperty=function(rt,nt,st){et?_e.f(rt,nt,tt(0,st)):rt[nt]=st},createProperty}var hasRequiredEs_object_getOwnPropertyDescriptors;function requireEs_object_getOwnPropertyDescriptors(){if(hasRequiredEs_object_getOwnPropertyDescriptors)return es_object_getOwnPropertyDescriptors;hasRequiredEs_object_getOwnPropertyDescriptors=1;var et=require_export(),_e=requireDescriptors(),tt=requireOwnKeys(),rt=requireToIndexedObject(),nt=requireObjectGetOwnPropertyDescriptor(),st=requireCreateProperty();return et({target:"Object",stat:!0,sham:!_e},{getOwnPropertyDescriptors:function(ft){for(var ht=rt(ft),mt=nt.f,bt=tt(ht),St={},Et=0,Ct,Rt;bt.length>Et;)Rt=mt(ht,Ct=bt[Et++]),Rt!==void 0&&st(St,Ct,Rt);return St}}),es_object_getOwnPropertyDescriptors}var es_object_getOwnPropertyNames={},objectGetOwnPropertyNamesExternal={},hasRequiredObjectGetOwnPropertyNamesExternal;function requireObjectGetOwnPropertyNamesExternal(){if(hasRequiredObjectGetOwnPropertyNamesExternal)return objectGetOwnPropertyNamesExternal;hasRequiredObjectGetOwnPropertyNamesExternal=1;var et=requireClassofRaw(),_e=requireToIndexedObject(),tt=requireObjectGetOwnPropertyNames().f,rt=requireArraySlice(),nt=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],st=function(dt){try{return tt(dt)}catch{return rt(nt)}};return objectGetOwnPropertyNamesExternal.f=function(ft){return nt&&et(ft)==="Window"?st(ft):tt(_e(ft))},objectGetOwnPropertyNamesExternal}var hasRequiredEs_object_getOwnPropertyNames;function requireEs_object_getOwnPropertyNames(){if(hasRequiredEs_object_getOwnPropertyNames)return es_object_getOwnPropertyNames;hasRequiredEs_object_getOwnPropertyNames=1;var et=require_export(),_e=requireFails(),tt=requireObjectGetOwnPropertyNamesExternal().f,rt=_e(function(){return!Object.getOwnPropertyNames(1)});return et({target:"Object",stat:!0,forced:rt},{getOwnPropertyNames:tt}),es_object_getOwnPropertyNames}var es_symbol={},es_symbol_constructor={},toString$3,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString$3;hasRequiredToString=1;var et=requireClassof(),_e=String;return toString$3=function(tt){if(et(tt)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return _e(tt)},toString$3}var defineBuiltInAccessor,hasRequiredDefineBuiltInAccessor;function requireDefineBuiltInAccessor(){if(hasRequiredDefineBuiltInAccessor)return defineBuiltInAccessor;hasRequiredDefineBuiltInAccessor=1;var et=requireMakeBuiltIn(),_e=requireObjectDefineProperty();return defineBuiltInAccessor=function(tt,rt,nt){return nt.get&&et(nt.get,rt,{getter:!0}),nt.set&&et(nt.set,rt,{setter:!0}),_e.f(tt,rt,nt)},defineBuiltInAccessor}var wellKnownSymbolWrapped={},hasRequiredWellKnownSymbolWrapped;function requireWellKnownSymbolWrapped(){if(hasRequiredWellKnownSymbolWrapped)return wellKnownSymbolWrapped;hasRequiredWellKnownSymbolWrapped=1;var et=requireWellKnownSymbol();return wellKnownSymbolWrapped.f=et,wellKnownSymbolWrapped}var path,hasRequiredPath;function requirePath(){if(hasRequiredPath)return path;hasRequiredPath=1;var et=requireGlobalThis();return path=et,path}var wellKnownSymbolDefine,hasRequiredWellKnownSymbolDefine;function requireWellKnownSymbolDefine(){if(hasRequiredWellKnownSymbolDefine)return wellKnownSymbolDefine;hasRequiredWellKnownSymbolDefine=1;var et=requirePath(),_e=requireHasOwnProperty(),tt=requireWellKnownSymbolWrapped(),rt=requireObjectDefineProperty().f;return wellKnownSymbolDefine=function(nt){var st=et.Symbol||(et.Symbol={});_e(st,nt)||rt(st,nt,{value:tt.f(nt)})},wellKnownSymbolDefine}var symbolDefineToPrimitive,hasRequiredSymbolDefineToPrimitive;function requireSymbolDefineToPrimitive(){if(hasRequiredSymbolDefineToPrimitive)return symbolDefineToPrimitive;hasRequiredSymbolDefineToPrimitive=1;var et=requireFunctionCall(),_e=requireGetBuiltIn(),tt=requireWellKnownSymbol(),rt=requireDefineBuiltIn();return symbolDefineToPrimitive=function(){var nt=_e("Symbol"),st=nt&&nt.prototype,dt=st&&st.valueOf,ft=tt("toPrimitive");st&&!st[ft]&&rt(st,ft,function(ht){return et(dt,this)},{arity:1})},symbolDefineToPrimitive}var setToStringTag,hasRequiredSetToStringTag;function requireSetToStringTag(){if(hasRequiredSetToStringTag)return setToStringTag;hasRequiredSetToStringTag=1;var et=requireObjectDefineProperty().f,_e=requireHasOwnProperty(),tt=requireWellKnownSymbol(),rt=tt("toStringTag");return setToStringTag=function(nt,st,dt){nt&&!dt&&(nt=nt.prototype),nt&&!_e(nt,rt)&&et(nt,rt,{configurable:!0,value:st})},setToStringTag}var functionUncurryThisClause,hasRequiredFunctionUncurryThisClause;function requireFunctionUncurryThisClause(){if(hasRequiredFunctionUncurryThisClause)return functionUncurryThisClause;hasRequiredFunctionUncurryThisClause=1;var et=requireClassofRaw(),_e=requireFunctionUncurryThis();return functionUncurryThisClause=function(tt){if(et(tt)==="Function")return _e(tt)},functionUncurryThisClause}var functionBindContext,hasRequiredFunctionBindContext;function requireFunctionBindContext(){if(hasRequiredFunctionBindContext)return functionBindContext;hasRequiredFunctionBindContext=1;var et=requireFunctionUncurryThisClause(),_e=requireACallable(),tt=requireFunctionBindNative(),rt=et(et.bind);return functionBindContext=function(nt,st){return _e(nt),st===void 0?nt:tt?rt(nt,st):function(){return nt.apply(st,arguments)}},functionBindContext}var isArray$5,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray$5;hasRequiredIsArray=1;var et=requireClassofRaw();return isArray$5=Array.isArray||function(tt){return et(tt)==="Array"},isArray$5}var arraySpeciesConstructor,hasRequiredArraySpeciesConstructor;function requireArraySpeciesConstructor(){if(hasRequiredArraySpeciesConstructor)return arraySpeciesConstructor;hasRequiredArraySpeciesConstructor=1;var et=requireIsArray(),_e=requireIsConstructor(),tt=requireIsObject(),rt=requireWellKnownSymbol(),nt=rt("species"),st=Array;return arraySpeciesConstructor=function(dt){var ft;return et(dt)&&(ft=dt.constructor,_e(ft)&&(ft===st||et(ft.prototype))?ft=void 0:tt(ft)&&(ft=ft[nt],ft===null&&(ft=void 0))),ft===void 0?st:ft},arraySpeciesConstructor}var arraySpeciesCreate,hasRequiredArraySpeciesCreate;function requireArraySpeciesCreate(){if(hasRequiredArraySpeciesCreate)return arraySpeciesCreate;hasRequiredArraySpeciesCreate=1;var et=requireArraySpeciesConstructor();return arraySpeciesCreate=function(_e,tt){return new(et(_e))(tt===0?0:tt)},arraySpeciesCreate}var arrayIteration,hasRequiredArrayIteration;function requireArrayIteration(){if(hasRequiredArrayIteration)return arrayIteration;hasRequiredArrayIteration=1;var et=requireFunctionBindContext(),_e=requireFunctionUncurryThis(),tt=requireIndexedObject(),rt=requireToObject(),nt=requireLengthOfArrayLike(),st=requireArraySpeciesCreate(),dt=_e([].push),ft=function(ht){var mt=ht===1,bt=ht===2,St=ht===3,Et=ht===4,Ct=ht===6,Rt=ht===7,Tt=ht===5||Ct;return function(wt,At,Nt,Pt){for(var It=rt(wt),Ft=tt(It),qt=nt(Ft),Vt=et(At,Nt),Kt=0,jt=Pt||st,Ut=mt?jt(wt,qt):bt||Rt?jt(wt,0):void 0,Ot,Wt;qt>Kt;Kt++)if((Tt||Kt in Ft)&&(Ot=Ft[Kt],Wt=Vt(Ot,Kt,It),ht))if(mt)Ut[Kt]=Wt;else if(Wt)switch(ht){case 3:return!0;case 5:return Ot;case 6:return Kt;case 2:dt(Ut,Ot)}else switch(ht){case 4:return!1;case 7:dt(Ut,Ot)}return Ct?-1:St||Et?Et:Ut}};return arrayIteration={forEach:ft(0),map:ft(1),filter:ft(2),some:ft(3),every:ft(4),find:ft(5),findIndex:ft(6),filterReject:ft(7)},arrayIteration}var hasRequiredEs_symbol_constructor;function requireEs_symbol_constructor(){if(hasRequiredEs_symbol_constructor)return es_symbol_constructor;hasRequiredEs_symbol_constructor=1;var et=require_export(),_e=requireGlobalThis(),tt=requireFunctionCall(),rt=requireFunctionUncurryThis(),nt=requireIsPure(),st=requireDescriptors(),dt=requireSymbolConstructorDetection(),ft=requireFails(),ht=requireHasOwnProperty(),mt=requireObjectIsPrototypeOf(),bt=requireAnObject(),St=requireToIndexedObject(),Et=requireToPropertyKey$1(),Ct=requireToString(),Rt=requireCreatePropertyDescriptor(),Tt=requireObjectCreate(),wt=requireObjectKeys(),At=requireObjectGetOwnPropertyNames(),Nt=requireObjectGetOwnPropertyNamesExternal(),Pt=requireObjectGetOwnPropertySymbols(),It=requireObjectGetOwnPropertyDescriptor(),Ft=requireObjectDefineProperty(),qt=requireObjectDefineProperties(),Vt=requireObjectPropertyIsEnumerable(),Kt=requireDefineBuiltIn(),jt=requireDefineBuiltInAccessor(),Ut=requireShared(),Ot=requireSharedKey(),Wt=requireHiddenKeys(),Bt=requireUid(),tr=requireWellKnownSymbol(),Jt=requireWellKnownSymbolWrapped(),ar=requireWellKnownSymbolDefine(),pr=requireSymbolDefineToPrimitive(),cr=requireSetToStringTag(),gr=requireInternalState(),Sr=requireArrayIteration().forEach,Er=Ot("hidden"),Vr="Symbol",Wr="prototype",Mr=gr.set,Nr=gr.getterFor(Vr),Yr=Object[Wr],Or=_e.Symbol,Ar=Or&&Or[Wr],Qr=_e.RangeError,hn=_e.TypeError,Sn=_e.QObject,Kr=It.f,Hn=Ft.f,ln=Nt.f,kn=Vt.f,xn=rt([].push),An=Ut("symbols"),rs=Ut("op-symbols"),qs=Ut("wks"),Ln=!Sn||!Sn[Wr]||!Sn[Wr].findChild,Cn=function(Dn,qn,_a){var Vn=Kr(Yr,qn);Vn&&delete Yr[qn],Hn(Dn,qn,_a),Vn&&Dn!==Yr&&Hn(Yr,qn,Vn)},Nn=st&&ft(function(){return Tt(Hn({},"a",{get:function(){return Hn(this,"a",{value:7}).a}})).a!==7})?Cn:Hn,Gr=function(Dn,qn){var _a=An[Dn]=Tt(Ar);return Mr(_a,{type:Vr,tag:Dn,description:qn}),st||(_a.description=qn),_a},tn=function(qn,_a,Vn){qn===Yr&&tn(rs,_a,Vn),bt(qn);var bs=Et(_a);return bt(Vn),ht(An,bs)?(Vn.enumerable?(ht(qn,Er)&&qn[Er][bs]&&(qn[Er][bs]=!1),Vn=Tt(Vn,{enumerable:Rt(0,!1)})):(ht(qn,Er)||Hn(qn,Er,Rt(1,Tt(null))),qn[Er][bs]=!0),Nn(qn,bs,Vn)):Hn(qn,bs,Vn)},dn=function(qn,_a){bt(qn);var Vn=St(_a),bs=wt(Vn).concat(pn(Vn));return Sr(bs,function(Is){(!st||tt(wn,Vn,Is))&&tn(qn,Is,Vn[Is])}),qn},Rn=function(qn,_a){return _a===void 0?Tt(qn):dn(Tt(qn),_a)},wn=function(qn){var _a=Et(qn),Vn=tt(kn,this,_a);return this===Yr&&ht(An,_a)&&!ht(rs,_a)?!1:Vn||!ht(this,_a)||!ht(An,_a)||ht(this,Er)&&this[Er][_a]?Vn:!0},Un=function(qn,_a){var Vn=St(qn),bs=Et(_a);if(!(Vn===Yr&&ht(An,bs)&&!ht(rs,bs))){var Is=Kr(Vn,bs);return Is&&ht(An,bs)&&!(ht(Vn,Er)&&Vn[Er][bs])&&(Is.enumerable=!0),Is}},Zn=function(qn){var _a=ln(St(qn)),Vn=[];return Sr(_a,function(bs){!ht(An,bs)&&!ht(Wt,bs)&&xn(Vn,bs)}),Vn},pn=function(Dn){var qn=Dn===Yr,_a=ln(qn?rs:St(Dn)),Vn=[];return Sr(_a,function(bs){ht(An,bs)&&(!qn||ht(Yr,bs))&&xn(Vn,An[bs])}),Vn};return dt||(Or=function(){if(mt(Ar,this))throw new hn("Symbol is not a constructor");var qn=!arguments.length||arguments[0]===void 0?void 0:Ct(arguments[0]),_a=Bt(qn),Vn=function(bs){var Is=this===void 0?_e:this;Is===Yr&&tt(Vn,rs,bs),ht(Is,Er)&&ht(Is[Er],_a)&&(Is[Er][_a]=!1);var uo=Rt(1,bs);try{Nn(Is,_a,uo)}catch(Rs){if(!(Rs instanceof Qr))throw Rs;Cn(Is,_a,uo)}};return st&&Ln&&Nn(Yr,_a,{configurable:!0,set:Vn}),Gr(_a,qn)},Ar=Or[Wr],Kt(Ar,"toString",function(){return Nr(this).tag}),Kt(Or,"withoutSetter",function(Dn){return Gr(Bt(Dn),Dn)}),Vt.f=wn,Ft.f=tn,qt.f=dn,It.f=Un,At.f=Nt.f=Zn,Pt.f=pn,Jt.f=function(Dn){return Gr(tr(Dn),Dn)},st&&(jt(Ar,"description",{configurable:!0,get:function(){return Nr(this).description}}),nt||Kt(Yr,"propertyIsEnumerable",wn,{unsafe:!0}))),et({global:!0,constructor:!0,wrap:!0,forced:!dt,sham:!dt},{Symbol:Or}),Sr(wt(qs),function(Dn){ar(Dn)}),et({target:Vr,stat:!0,forced:!dt},{useSetter:function(){Ln=!0},useSimple:function(){Ln=!1}}),et({target:"Object",stat:!0,forced:!dt,sham:!st},{create:Rn,defineProperty:tn,defineProperties:dn,getOwnPropertyDescriptor:Un}),et({target:"Object",stat:!0,forced:!dt},{getOwnPropertyNames:Zn}),pr(),cr(Or,Vr),Wt[Er]=!0,es_symbol_constructor}var es_symbol_for={},symbolRegistryDetection,hasRequiredSymbolRegistryDetection;function requireSymbolRegistryDetection(){if(hasRequiredSymbolRegistryDetection)return symbolRegistryDetection;hasRequiredSymbolRegistryDetection=1;var et=requireSymbolConstructorDetection();return symbolRegistryDetection=et&&!!Symbol.for&&!!Symbol.keyFor,symbolRegistryDetection}var hasRequiredEs_symbol_for;function requireEs_symbol_for(){if(hasRequiredEs_symbol_for)return es_symbol_for;hasRequiredEs_symbol_for=1;var et=require_export(),_e=requireGetBuiltIn(),tt=requireHasOwnProperty(),rt=requireToString(),nt=requireShared(),st=requireSymbolRegistryDetection(),dt=nt("string-to-symbol-registry"),ft=nt("symbol-to-string-registry");return et({target:"Symbol",stat:!0,forced:!st},{for:function(ht){var mt=rt(ht);if(tt(dt,mt))return dt[mt];var bt=_e("Symbol")(mt);return dt[mt]=bt,ft[bt]=mt,bt}}),es_symbol_for}var es_symbol_keyFor={},hasRequiredEs_symbol_keyFor;function requireEs_symbol_keyFor(){if(hasRequiredEs_symbol_keyFor)return es_symbol_keyFor;hasRequiredEs_symbol_keyFor=1;var et=require_export(),_e=requireHasOwnProperty(),tt=requireIsSymbol(),rt=requireTryToString(),nt=requireShared(),st=requireSymbolRegistryDetection(),dt=nt("symbol-to-string-registry");return et({target:"Symbol",stat:!0,forced:!st},{keyFor:function(ht){if(!tt(ht))throw new TypeError(rt(ht)+" is not a symbol");if(_e(dt,ht))return dt[ht]}}),es_symbol_keyFor}var es_json_stringify={},getJsonReplacerFunction,hasRequiredGetJsonReplacerFunction;function requireGetJsonReplacerFunction(){if(hasRequiredGetJsonReplacerFunction)return getJsonReplacerFunction;hasRequiredGetJsonReplacerFunction=1;var et=requireFunctionUncurryThis(),_e=requireIsArray(),tt=requireIsCallable(),rt=requireClassofRaw(),nt=requireToString(),st=et([].push);return getJsonReplacerFunction=function(dt){if(tt(dt))return dt;if(_e(dt)){for(var ft=dt.length,ht=[],mt=0;mt<ft;mt++){var bt=dt[mt];typeof bt=="string"?st(ht,bt):(typeof bt=="number"||rt(bt)==="Number"||rt(bt)==="String")&&st(ht,nt(bt))}var St=ht.length,Et=!0;return function(Ct,Rt){if(Et)return Et=!1,Rt;if(_e(this))return Rt;for(var Tt=0;Tt<St;Tt++)if(ht[Tt]===Ct)return Rt}}},getJsonReplacerFunction}var hasRequiredEs_json_stringify;function requireEs_json_stringify(){if(hasRequiredEs_json_stringify)return es_json_stringify;hasRequiredEs_json_stringify=1;var et=require_export(),_e=requireGetBuiltIn(),tt=requireFunctionApply(),rt=requireFunctionCall(),nt=requireFunctionUncurryThis(),st=requireFails(),dt=requireIsCallable(),ft=requireIsSymbol(),ht=requireArraySlice(),mt=requireGetJsonReplacerFunction(),bt=requireSymbolConstructorDetection(),St=String,Et=_e("JSON","stringify"),Ct=nt(/./.exec),Rt=nt("".charAt),Tt=nt("".charCodeAt),wt=nt("".replace),At=nt(1.1.toString),Nt=/[\uD800-\uDFFF]/g,Pt=/^[\uD800-\uDBFF]$/,It=/^[\uDC00-\uDFFF]$/,Ft=!bt||st(function(){var jt=_e("Symbol")("stringify detection");return Et([jt])!=="[null]"||Et({a:jt})!=="{}"||Et(Object(jt))!=="{}"}),qt=st(function(){return Et("\uDF06\uD834")!=='"\\udf06\\ud834"'||Et("\uDEAD")!=='"\\udead"'}),Vt=function(jt,Ut){var Ot=ht(arguments),Wt=mt(Ut);if(!(!dt(Wt)&&(jt===void 0||ft(jt))))return Ot[1]=function(Bt,tr){if(dt(Wt)&&(tr=rt(Wt,this,St(Bt),tr)),!ft(tr))return tr},tt(Et,null,Ot)},Kt=function(jt,Ut,Ot){var Wt=Rt(Ot,Ut-1),Bt=Rt(Ot,Ut+1);return Ct(Pt,jt)&&!Ct(It,Bt)||Ct(It,jt)&&!Ct(Pt,Wt)?"\\u"+At(Tt(jt,0),16):jt};return Et&&et({target:"JSON",stat:!0,arity:3,forced:Ft||qt},{stringify:function(Ut,Ot,Wt){var Bt=ht(arguments),tr=tt(Ft?Vt:Et,null,Bt);return qt&&typeof tr=="string"?wt(tr,Nt,Kt):tr}}),es_json_stringify}var es_object_getOwnPropertySymbols={},hasRequiredEs_object_getOwnPropertySymbols;function requireEs_object_getOwnPropertySymbols(){if(hasRequiredEs_object_getOwnPropertySymbols)return es_object_getOwnPropertySymbols;hasRequiredEs_object_getOwnPropertySymbols=1;var et=require_export(),_e=requireSymbolConstructorDetection(),tt=requireFails(),rt=requireObjectGetOwnPropertySymbols(),nt=requireToObject(),st=!_e||tt(function(){rt.f(1)});return et({target:"Object",stat:!0,forced:st},{getOwnPropertySymbols:function(ft){var ht=rt.f;return ht?ht(nt(ft)):[]}}),es_object_getOwnPropertySymbols}var hasRequiredEs_symbol;function requireEs_symbol(){return hasRequiredEs_symbol||(hasRequiredEs_symbol=1,requireEs_symbol_constructor(),requireEs_symbol_for(),requireEs_symbol_keyFor(),requireEs_json_stringify(),requireEs_object_getOwnPropertySymbols()),es_symbol}var es_object_getPrototypeOf={},hasRequiredEs_object_getPrototypeOf;function requireEs_object_getPrototypeOf(){if(hasRequiredEs_object_getPrototypeOf)return es_object_getPrototypeOf;hasRequiredEs_object_getPrototypeOf=1;var et=require_export(),_e=requireFails(),tt=requireToObject(),rt=requireObjectGetPrototypeOf(),nt=requireCorrectPrototypeGetter(),st=_e(function(){rt(1)});return et({target:"Object",stat:!0,forced:st,sham:!nt},{getPrototypeOf:function(ft){return rt(tt(ft))}}),es_object_getPrototypeOf}var es_date_toString={},hasRequiredEs_date_toString;function requireEs_date_toString(){if(hasRequiredEs_date_toString)return es_date_toString;hasRequiredEs_date_toString=1;var et=requireFunctionUncurryThis(),_e=requireDefineBuiltIn(),tt=Date.prototype,rt="Invalid Date",nt="toString",st=et(tt[nt]),dt=et(tt.getTime);return String(new Date(NaN))!==rt&&_e(tt,nt,function(){var ht=dt(this);return ht===ht?st(this):rt}),es_date_toString}var es_object_toString={},objectToString$1,hasRequiredObjectToString;function requireObjectToString(){if(hasRequiredObjectToString)return objectToString$1;hasRequiredObjectToString=1;var et=requireToStringTagSupport(),_e=requireClassof();return objectToString$1=et?{}.toString:function(){return"[object "+_e(this)+"]"},objectToString$1}var hasRequiredEs_object_toString;function requireEs_object_toString(){if(hasRequiredEs_object_toString)return es_object_toString;hasRequiredEs_object_toString=1;var et=requireToStringTagSupport(),_e=requireDefineBuiltIn(),tt=requireObjectToString();return et||_e(Object.prototype,"toString",tt,{unsafe:!0}),es_object_toString}var es_regexp_toString={},regexpFlagsDetection,hasRequiredRegexpFlagsDetection;function requireRegexpFlagsDetection(){if(hasRequiredRegexpFlagsDetection)return regexpFlagsDetection;hasRequiredRegexpFlagsDetection=1;var et=requireGlobalThis(),_e=requireFails(),tt=et.RegExp,rt=!_e(function(){var nt=!0;try{tt(".","d")}catch{nt=!1}var st={},dt="",ft=nt?"dgimsy":"gimsy",ht=function(Et,Ct){Object.defineProperty(st,Et,{get:function(){return dt+=Ct,!0}})},mt={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};nt&&(mt.hasIndices="d");for(var bt in mt)ht(bt,mt[bt]);var St=Object.getOwnPropertyDescriptor(tt.prototype,"flags").get.call(st);return St!==ft||dt!==ft});return regexpFlagsDetection={correct:rt},regexpFlagsDetection}var regexpFlags,hasRequiredRegexpFlags;function requireRegexpFlags(){if(hasRequiredRegexpFlags)return regexpFlags;hasRequiredRegexpFlags=1;var et=requireAnObject();return regexpFlags=function(){var _e=et(this),tt="";return _e.hasIndices&&(tt+="d"),_e.global&&(tt+="g"),_e.ignoreCase&&(tt+="i"),_e.multiline&&(tt+="m"),_e.dotAll&&(tt+="s"),_e.unicode&&(tt+="u"),_e.unicodeSets&&(tt+="v"),_e.sticky&&(tt+="y"),tt},regexpFlags}var regexpGetFlags,hasRequiredRegexpGetFlags;function requireRegexpGetFlags(){if(hasRequiredRegexpGetFlags)return regexpGetFlags;hasRequiredRegexpGetFlags=1;var et=requireFunctionCall(),_e=requireHasOwnProperty(),tt=requireObjectIsPrototypeOf(),rt=requireRegexpFlagsDetection(),nt=requireRegexpFlags(),st=RegExp.prototype;return regexpGetFlags=rt.correct?function(dt){return dt.flags}:function(dt){return!rt.correct&&tt(st,dt)&&!_e(dt,"flags")?et(nt,dt):dt.flags},regexpGetFlags}var hasRequiredEs_regexp_toString;function requireEs_regexp_toString(){if(hasRequiredEs_regexp_toString)return es_regexp_toString;hasRequiredEs_regexp_toString=1;var et=requireFunctionName().PROPER,_e=requireDefineBuiltIn(),tt=requireAnObject(),rt=requireToString(),nt=requireFails(),st=requireRegexpGetFlags(),dt="toString",ft=RegExp.prototype,ht=ft[dt],mt=nt(function(){return ht.call({source:"a",flags:"b"})!=="/a/b"}),bt=et&&ht.name!==dt;return(mt||bt)&&_e(ft,dt,function(){var Et=tt(this),Ct=rt(Et.source),Rt=rt(st(Et));return"/"+Ct+"/"+Rt},{unsafe:!0}),es_regexp_toString}var es_number_constructor={},functionUncurryThisAccessor,hasRequiredFunctionUncurryThisAccessor;function requireFunctionUncurryThisAccessor(){if(hasRequiredFunctionUncurryThisAccessor)return functionUncurryThisAccessor;hasRequiredFunctionUncurryThisAccessor=1;var et=requireFunctionUncurryThis(),_e=requireACallable();return functionUncurryThisAccessor=function(tt,rt,nt){try{return et(_e(Object.getOwnPropertyDescriptor(tt,rt)[nt]))}catch{}},functionUncurryThisAccessor}var isPossiblePrototype,hasRequiredIsPossiblePrototype;function requireIsPossiblePrototype(){if(hasRequiredIsPossiblePrototype)return isPossiblePrototype;hasRequiredIsPossiblePrototype=1;var et=requireIsObject();return isPossiblePrototype=function(_e){return et(_e)||_e===null},isPossiblePrototype}var aPossiblePrototype,hasRequiredAPossiblePrototype;function requireAPossiblePrototype(){if(hasRequiredAPossiblePrototype)return aPossiblePrototype;hasRequiredAPossiblePrototype=1;var et=requireIsPossiblePrototype(),_e=String,tt=TypeError;return aPossiblePrototype=function(rt){if(et(rt))return rt;throw new tt("Can't set "+_e(rt)+" as a prototype")},aPossiblePrototype}var objectSetPrototypeOf,hasRequiredObjectSetPrototypeOf;function requireObjectSetPrototypeOf(){if(hasRequiredObjectSetPrototypeOf)return objectSetPrototypeOf;hasRequiredObjectSetPrototypeOf=1;var et=requireFunctionUncurryThisAccessor(),_e=requireIsObject(),tt=requireRequireObjectCoercible(),rt=requireAPossiblePrototype();return objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?(function(){var nt=!1,st={},dt;try{dt=et(Object.prototype,"__proto__","set"),dt(st,[]),nt=st instanceof Array}catch{}return function(ht,mt){return tt(ht),rt(mt),_e(ht)&&(nt?dt(ht,mt):ht.__proto__=mt),ht}})():void 0),objectSetPrototypeOf}var inheritIfRequired,hasRequiredInheritIfRequired;function requireInheritIfRequired(){if(hasRequiredInheritIfRequired)return inheritIfRequired;hasRequiredInheritIfRequired=1;var et=requireIsCallable(),_e=requireIsObject(),tt=requireObjectSetPrototypeOf();return inheritIfRequired=function(rt,nt,st){var dt,ft;return tt&&et(dt=nt.constructor)&&dt!==st&&_e(ft=dt.prototype)&&ft!==st.prototype&&tt(rt,ft),rt},inheritIfRequired}var thisNumberValue,hasRequiredThisNumberValue;function requireThisNumberValue(){if(hasRequiredThisNumberValue)return thisNumberValue;hasRequiredThisNumberValue=1;var et=requireFunctionUncurryThis();return thisNumberValue=et(1.1.valueOf),thisNumberValue}var whitespaces,hasRequiredWhitespaces;function requireWhitespaces(){return hasRequiredWhitespaces||(hasRequiredWhitespaces=1,whitespaces=`
\v\f\r    \u2028\u2029\uFEFF`),whitespaces}var stringTrim,hasRequiredStringTrim;function requireStringTrim(){if(hasRequiredStringTrim)return stringTrim;hasRequiredStringTrim=1;var et=requireFunctionUncurryThis(),_e=requireRequireObjectCoercible(),tt=requireToString(),rt=requireWhitespaces(),nt=et("".replace),st=RegExp("^["+rt+"]+"),dt=RegExp("(^|[^"+rt+"])["+rt+"]+$"),ft=function(ht){return function(mt){var bt=tt(_e(mt));return ht&1&&(bt=nt(bt,st,"")),ht&2&&(bt=nt(bt,dt,"$1")),bt}};return stringTrim={start:ft(1),end:ft(2),trim:ft(3)},stringTrim}var hasRequiredEs_number_constructor;function requireEs_number_constructor(){if(hasRequiredEs_number_constructor)return es_number_constructor;hasRequiredEs_number_constructor=1;var et=require_export(),_e=requireIsPure(),tt=requireDescriptors(),rt=requireGlobalThis(),nt=requirePath(),st=requireFunctionUncurryThis(),dt=requireIsForced(),ft=requireHasOwnProperty(),ht=requireInheritIfRequired(),mt=requireObjectIsPrototypeOf(),bt=requireIsSymbol(),St=requireToPrimitive$1(),Et=requireFails(),Ct=requireObjectGetOwnPropertyNames().f,Rt=requireObjectGetOwnPropertyDescriptor().f,Tt=requireObjectDefineProperty().f,wt=requireThisNumberValue(),At=requireStringTrim().trim,Nt="Number",Pt=rt[Nt],It=nt[Nt],Ft=Pt.prototype,qt=rt.TypeError,Vt=st("".slice),Kt=st("".charCodeAt),jt=function(Jt){var ar=St(Jt,"number");return typeof ar=="bigint"?ar:Ut(ar)},Ut=function(Jt){var ar=St(Jt,"number"),pr,cr,gr,Sr,Er,Vr,Wr,Mr;if(bt(ar))throw new qt("Cannot convert a Symbol value to a number");if(typeof ar=="string"&&ar.length>2){if(ar=At(ar),pr=Kt(ar,0),pr===43||pr===45){if(cr=Kt(ar,2),cr===88||cr===120)return NaN}else if(pr===48){switch(Kt(ar,1)){case 66:case 98:gr=2,Sr=49;break;case 79:case 111:gr=8,Sr=55;break;default:return+ar}for(Er=Vt(ar,2),Vr=Er.length,Wr=0;Wr<Vr;Wr++)if(Mr=Kt(Er,Wr),Mr<48||Mr>Sr)return NaN;return parseInt(Er,gr)}}return+ar},Ot=dt(Nt,!Pt(" 0o1")||!Pt("0b1")||Pt("+0x1")),Wt=function(Jt){return mt(Ft,Jt)&&Et(function(){wt(Jt)})},Bt=function(ar){var pr=arguments.length<1?0:Pt(jt(ar));return Wt(this)?ht(Object(pr),this,Bt):pr};Bt.prototype=Ft,Ot&&!_e&&(Ft.constructor=Bt),et({global:!0,constructor:!0,wrap:!0,forced:Ot},{Number:Bt});var tr=function(Jt,ar){for(var pr=tt?Ct(ar):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),cr=0,gr;pr.length>cr;cr++)ft(ar,gr=pr[cr])&&!ft(Jt,gr)&&Tt(Jt,gr,Rt(ar,gr))};return _e&&It&&tr(nt[Nt],It),(Ot||_e)&&tr(nt[Nt],Pt),es_number_constructor}var es_parseInt={},numberParseInt,hasRequiredNumberParseInt;function requireNumberParseInt(){if(hasRequiredNumberParseInt)return numberParseInt;hasRequiredNumberParseInt=1;var et=requireGlobalThis(),_e=requireFails(),tt=requireFunctionUncurryThis(),rt=requireToString(),nt=requireStringTrim().trim,st=requireWhitespaces(),dt=et.parseInt,ft=et.Symbol,ht=ft&&ft.iterator,mt=/^[+-]?0x/i,bt=tt(mt.exec),St=dt(st+"08")!==8||dt(st+"0x16")!==22||ht&&!_e(function(){dt(Object(ht))});return numberParseInt=St?function(Ct,Rt){var Tt=nt(rt(Ct));return dt(Tt,Rt>>>0||(bt(mt,Tt)?16:10))}:dt,numberParseInt}var hasRequiredEs_parseInt;function requireEs_parseInt(){if(hasRequiredEs_parseInt)return es_parseInt;hasRequiredEs_parseInt=1;var et=require_export(),_e=requireNumberParseInt();return et({global:!0,forced:parseInt!==_e},{parseInt:_e}),es_parseInt}var es_object_freeze={},freezing,hasRequiredFreezing;function requireFreezing(){if(hasRequiredFreezing)return freezing;hasRequiredFreezing=1;var et=requireFails();return freezing=!et(function(){return Object.isExtensible(Object.preventExtensions({}))}),freezing}var internalMetadata={exports:{}},arrayBufferNonExtensible,hasRequiredArrayBufferNonExtensible;function requireArrayBufferNonExtensible(){if(hasRequiredArrayBufferNonExtensible)return arrayBufferNonExtensible;hasRequiredArrayBufferNonExtensible=1;var et=requireFails();return arrayBufferNonExtensible=et(function(){if(typeof ArrayBuffer=="function"){var _e=new ArrayBuffer(8);Object.isExtensible(_e)&&Object.defineProperty(_e,"a",{value:8})}}),arrayBufferNonExtensible}var objectIsExtensible,hasRequiredObjectIsExtensible;function requireObjectIsExtensible(){if(hasRequiredObjectIsExtensible)return objectIsExtensible;hasRequiredObjectIsExtensible=1;var et=requireFails(),_e=requireIsObject(),tt=requireClassofRaw(),rt=requireArrayBufferNonExtensible(),nt=Object.isExtensible,st=et(function(){});return objectIsExtensible=st||rt?function(ft){return!_e(ft)||rt&&tt(ft)==="ArrayBuffer"?!1:nt?nt(ft):!0}:nt,objectIsExtensible}var hasRequiredInternalMetadata;function requireInternalMetadata(){if(hasRequiredInternalMetadata)return internalMetadata.exports;hasRequiredInternalMetadata=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireHiddenKeys(),rt=requireIsObject(),nt=requireHasOwnProperty(),st=requireObjectDefineProperty().f,dt=requireObjectGetOwnPropertyNames(),ft=requireObjectGetOwnPropertyNamesExternal(),ht=requireObjectIsExtensible(),mt=requireUid(),bt=requireFreezing(),St=!1,Et=mt("meta"),Ct=0,Rt=function(It){st(It,Et,{value:{objectID:"O"+Ct++,weakData:{}}})},Tt=function(It,Ft){if(!rt(It))return typeof It=="symbol"?It:(typeof It=="string"?"S":"P")+It;if(!nt(It,Et)){if(!ht(It))return"F";if(!Ft)return"E";Rt(It)}return It[Et].objectID},wt=function(It,Ft){if(!nt(It,Et)){if(!ht(It))return!0;if(!Ft)return!1;Rt(It)}return It[Et].weakData},At=function(It){return bt&&St&&ht(It)&&!nt(It,Et)&&Rt(It),It},Nt=function(){Pt.enable=function(){},St=!0;var It=dt.f,Ft=_e([].splice),qt={};qt[Et]=1,It(qt).length&&(dt.f=function(Vt){for(var Kt=It(Vt),jt=0,Ut=Kt.length;jt<Ut;jt++)if(Kt[jt]===Et){Ft(Kt,jt,1);break}return Kt},et({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ft.f}))},Pt=internalMetadata.exports={enable:Nt,fastKey:Tt,getWeakData:wt,onFreeze:At};return tt[Et]=!0,internalMetadata.exports}var hasRequiredEs_object_freeze;function requireEs_object_freeze(){if(hasRequiredEs_object_freeze)return es_object_freeze;hasRequiredEs_object_freeze=1;var et=require_export(),_e=requireFreezing(),tt=requireFails(),rt=requireIsObject(),nt=requireInternalMetadata().onFreeze,st=Object.freeze,dt=tt(function(){st(1)});return et({target:"Object",stat:!0,forced:dt,sham:!_e},{freeze:function(ht){return st&&rt(ht)?st(nt(ht)):ht}}),es_object_freeze}var es_object_setPrototypeOf={},hasRequiredEs_object_setPrototypeOf;function requireEs_object_setPrototypeOf(){if(hasRequiredEs_object_setPrototypeOf)return es_object_setPrototypeOf;hasRequiredEs_object_setPrototypeOf=1;var et=require_export(),_e=requireObjectSetPrototypeOf();return et({target:"Object",stat:!0},{setPrototypeOf:_e}),es_object_setPrototypeOf}var es_arrayBuffer_constructor={},arrayBufferBasicDetection,hasRequiredArrayBufferBasicDetection;function requireArrayBufferBasicDetection(){return hasRequiredArrayBufferBasicDetection||(hasRequiredArrayBufferBasicDetection=1,arrayBufferBasicDetection=typeof ArrayBuffer<"u"&&typeof DataView<"u"),arrayBufferBasicDetection}var defineBuiltIns,hasRequiredDefineBuiltIns;function requireDefineBuiltIns(){if(hasRequiredDefineBuiltIns)return defineBuiltIns;hasRequiredDefineBuiltIns=1;var et=requireDefineBuiltIn();return defineBuiltIns=function(_e,tt,rt){for(var nt in tt)et(_e,nt,tt[nt],rt);return _e},defineBuiltIns}var anInstance,hasRequiredAnInstance;function requireAnInstance(){if(hasRequiredAnInstance)return anInstance;hasRequiredAnInstance=1;var et=requireObjectIsPrototypeOf(),_e=TypeError;return anInstance=function(tt,rt){if(et(rt,tt))return tt;throw new _e("Incorrect invocation")},anInstance}var toIndex,hasRequiredToIndex;function requireToIndex(){if(hasRequiredToIndex)return toIndex;hasRequiredToIndex=1;var et=requireToIntegerOrInfinity(),_e=requireToLength(),tt=RangeError;return toIndex=function(rt){if(rt===void 0)return 0;var nt=et(rt),st=_e(nt);if(nt!==st)throw new tt("Wrong length or index");return st},toIndex}var mathSign,hasRequiredMathSign;function requireMathSign(){return hasRequiredMathSign||(hasRequiredMathSign=1,mathSign=Math.sign||function(_e){var tt=+_e;return tt===0||tt!==tt?tt:tt<0?-1:1}),mathSign}var mathRoundTiesToEven,hasRequiredMathRoundTiesToEven;function requireMathRoundTiesToEven(){if(hasRequiredMathRoundTiesToEven)return mathRoundTiesToEven;hasRequiredMathRoundTiesToEven=1;var et=2220446049250313e-31,_e=1/et;return mathRoundTiesToEven=function(tt){return tt+_e-_e},mathRoundTiesToEven}var mathFloatRound,hasRequiredMathFloatRound;function requireMathFloatRound(){if(hasRequiredMathFloatRound)return mathFloatRound;hasRequiredMathFloatRound=1;var et=requireMathSign(),_e=requireMathRoundTiesToEven(),tt=Math.abs,rt=2220446049250313e-31;return mathFloatRound=function(nt,st,dt,ft){var ht=+nt,mt=tt(ht),bt=et(ht);if(mt<ft)return bt*_e(mt/ft/st)*ft*st;var St=(1+st/rt)*mt,Et=St-(St-mt);return Et>dt||Et!==Et?bt*(1/0):bt*Et},mathFloatRound}var mathFround,hasRequiredMathFround;function requireMathFround(){if(hasRequiredMathFround)return mathFround;hasRequiredMathFround=1;var et=requireMathFloatRound(),_e=11920928955078125e-23,tt=34028234663852886e22,rt=11754943508222875e-54;return mathFround=Math.fround||function(st){return et(st,_e,tt,rt)},mathFround}var ieee754,hasRequiredIeee754;function requireIeee754(){if(hasRequiredIeee754)return ieee754;hasRequiredIeee754=1;var et=Array,_e=Math.abs,tt=Math.pow,rt=Math.floor,nt=Math.log,st=Math.LN2,dt=function(ht,mt,bt){var St=et(bt),Et=bt*8-mt-1,Ct=(1<<Et)-1,Rt=Ct>>1,Tt=mt===23?tt(2,-24)-tt(2,-77):0,wt=ht<0||ht===0&&1/ht<0?1:0,At=0,Nt,Pt,It;for(ht=_e(ht),ht!==ht||ht===1/0?(Pt=ht!==ht?1:0,Nt=Ct):(Nt=rt(nt(ht)/st),It=tt(2,-Nt),ht*It<1&&(Nt--,It*=2),Nt+Rt>=1?ht+=Tt/It:ht+=Tt*tt(2,1-Rt),ht*It>=2&&(Nt++,It/=2),Nt+Rt>=Ct?(Pt=0,Nt=Ct):Nt+Rt>=1?(Pt=(ht*It-1)*tt(2,mt),Nt+=Rt):(Pt=ht*tt(2,Rt-1)*tt(2,mt),Nt=0));mt>=8;)St[At++]=Pt&255,Pt/=256,mt-=8;for(Nt=Nt<<mt|Pt,Et+=mt;Et>0;)St[At++]=Nt&255,Nt/=256,Et-=8;return St[At-1]|=wt*128,St},ft=function(ht,mt){var bt=ht.length,St=bt*8-mt-1,Et=(1<<St)-1,Ct=Et>>1,Rt=St-7,Tt=bt-1,wt=ht[Tt--],At=wt&127,Nt;for(wt>>=7;Rt>0;)At=At*256+ht[Tt--],Rt-=8;for(Nt=At&(1<<-Rt)-1,At>>=-Rt,Rt+=mt;Rt>0;)Nt=Nt*256+ht[Tt--],Rt-=8;if(At===0)At=1-Ct;else{if(At===Et)return Nt?NaN:wt?-1/0:1/0;Nt+=tt(2,mt),At-=Ct}return(wt?-1:1)*Nt*tt(2,At-mt)};return ieee754={pack:dt,unpack:ft},ieee754}var arrayFill,hasRequiredArrayFill;function requireArrayFill(){if(hasRequiredArrayFill)return arrayFill;hasRequiredArrayFill=1;var et=requireToObject(),_e=requireToAbsoluteIndex(),tt=requireLengthOfArrayLike();return arrayFill=function(nt){for(var st=et(this),dt=tt(st),ft=arguments.length,ht=_e(ft>1?arguments[1]:void 0,dt),mt=ft>2?arguments[2]:void 0,bt=mt===void 0?dt:_e(mt,dt);bt>ht;)st[ht++]=nt;return st},arrayFill}var arrayBuffer,hasRequiredArrayBuffer;function requireArrayBuffer(){if(hasRequiredArrayBuffer)return arrayBuffer;hasRequiredArrayBuffer=1;var et=requireGlobalThis(),_e=requireFunctionUncurryThis(),tt=requireDescriptors(),rt=requireArrayBufferBasicDetection(),nt=requireFunctionName(),st=requireCreateNonEnumerableProperty(),dt=requireDefineBuiltInAccessor(),ft=requireDefineBuiltIns(),ht=requireFails(),mt=requireAnInstance(),bt=requireToIntegerOrInfinity(),St=requireToLength(),Et=requireToIndex(),Ct=requireMathFround(),Rt=requireIeee754(),Tt=requireObjectGetPrototypeOf(),wt=requireObjectSetPrototypeOf(),At=requireArrayFill(),Nt=requireArraySlice(),Pt=requireInheritIfRequired(),It=requireCopyConstructorProperties(),Ft=requireSetToStringTag(),qt=requireInternalState(),Vt=nt.PROPER,Kt=nt.CONFIGURABLE,jt="ArrayBuffer",Ut="DataView",Ot="prototype",Wt="Wrong length",Bt="Wrong index",tr=qt.getterFor(jt),Jt=qt.getterFor(Ut),ar=qt.set,pr=et[jt],cr=pr,gr=cr&&cr[Ot],Sr=et[Ut],Er=Sr&&Sr[Ot],Vr=Object.prototype,Wr=et.Array,Mr=et.RangeError,Nr=_e(At),Yr=_e([].reverse),Or=Rt.pack,Ar=Rt.unpack,Qr=function(Cn){return[Cn&255]},hn=function(Cn){return[Cn&255,Cn>>8&255]},Sn=function(Cn){return[Cn&255,Cn>>8&255,Cn>>16&255,Cn>>24&255]},Kr=function(Cn){return Cn[3]<<24|Cn[2]<<16|Cn[1]<<8|Cn[0]},Hn=function(Cn){return Or(Ct(Cn),23,4)},ln=function(Cn){return Or(Cn,52,8)},kn=function(Cn,Nn,Gr){dt(Cn[Ot],Nn,{configurable:!0,get:function(){return Gr(this)[Nn]}})},xn=function(Cn,Nn,Gr,tn){var dn=Jt(Cn),Rn=Et(Gr),wn=!!tn;if(Rn+Nn>dn.byteLength)throw new Mr(Bt);var Un=dn.bytes,Zn=Rn+dn.byteOffset,pn=Nt(Un,Zn,Zn+Nn);return wn?pn:Yr(pn)},An=function(Cn,Nn,Gr,tn,dn,Rn){var wn=Jt(Cn),Un=Et(Gr),Zn=tn(+dn),pn=!!Rn;if(Un+Nn>wn.byteLength)throw new Mr(Bt);for(var Dn=wn.bytes,qn=Un+wn.byteOffset,_a=0;_a<Nn;_a++)Dn[qn+_a]=Zn[pn?_a:Nn-_a-1]};if(!rt)cr=function(Nn){mt(this,gr);var Gr=Et(Nn);ar(this,{type:jt,bytes:Nr(Wr(Gr),0),byteLength:Gr}),tt||(this.byteLength=Gr,this.detached=!1)},gr=cr[Ot],Sr=function(Nn,Gr,tn){mt(this,Er),mt(Nn,gr);var dn=tr(Nn),Rn=dn.byteLength,wn=bt(Gr);if(wn<0||wn>Rn)throw new Mr("Wrong offset");if(tn=tn===void 0?Rn-wn:St(tn),wn+tn>Rn)throw new Mr(Wt);ar(this,{type:Ut,buffer:Nn,byteLength:tn,byteOffset:wn,bytes:dn.bytes}),tt||(this.buffer=Nn,this.byteLength=tn,this.byteOffset=wn)},Er=Sr[Ot],tt&&(kn(cr,"byteLength",tr),kn(Sr,"buffer",Jt),kn(Sr,"byteLength",Jt),kn(Sr,"byteOffset",Jt)),ft(Er,{getInt8:function(Nn){return xn(this,1,Nn)[0]<<24>>24},getUint8:function(Nn){return xn(this,1,Nn)[0]},getInt16:function(Nn){var Gr=xn(this,2,Nn,arguments.length>1?arguments[1]:!1);return(Gr[1]<<8|Gr[0])<<16>>16},getUint16:function(Nn){var Gr=xn(this,2,Nn,arguments.length>1?arguments[1]:!1);return Gr[1]<<8|Gr[0]},getInt32:function(Nn){return Kr(xn(this,4,Nn,arguments.length>1?arguments[1]:!1))},getUint32:function(Nn){return Kr(xn(this,4,Nn,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(Nn){return Ar(xn(this,4,Nn,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(Nn){return Ar(xn(this,8,Nn,arguments.length>1?arguments[1]:!1),52)},setInt8:function(Nn,Gr){An(this,1,Nn,Qr,Gr)},setUint8:function(Nn,Gr){An(this,1,Nn,Qr,Gr)},setInt16:function(Nn,Gr){An(this,2,Nn,hn,Gr,arguments.length>2?arguments[2]:!1)},setUint16:function(Nn,Gr){An(this,2,Nn,hn,Gr,arguments.length>2?arguments[2]:!1)},setInt32:function(Nn,Gr){An(this,4,Nn,Sn,Gr,arguments.length>2?arguments[2]:!1)},setUint32:function(Nn,Gr){An(this,4,Nn,Sn,Gr,arguments.length>2?arguments[2]:!1)},setFloat32:function(Nn,Gr){An(this,4,Nn,Hn,Gr,arguments.length>2?arguments[2]:!1)},setFloat64:function(Nn,Gr){An(this,8,Nn,ln,Gr,arguments.length>2?arguments[2]:!1)}});else{var rs=Vt&&pr.name!==jt;!ht(function(){pr(1)})||!ht(function(){new pr(-1)})||ht(function(){return new pr,new pr(1.5),new pr(NaN),pr.length!==1||rs&&!Kt})?(cr=function(Nn){return mt(this,gr),Pt(new pr(Et(Nn)),this,cr)},cr[Ot]=gr,gr.constructor=cr,It(cr,pr)):rs&&Kt&&st(pr,"name",jt),wt&&Tt(Er)!==Vr&&wt(Er,Vr);var qs=new Sr(new cr(2)),Ln=_e(Er.setInt8);qs.setInt8(0,2147483648),qs.setInt8(1,2147483649),(qs.getInt8(0)||!qs.getInt8(1))&&ft(Er,{setInt8:function(Nn,Gr){Ln(this,Nn,Gr<<24>>24)},setUint8:function(Nn,Gr){Ln(this,Nn,Gr<<24>>24)}},{unsafe:!0})}return Ft(cr,jt),Ft(Sr,Ut),arrayBuffer={ArrayBuffer:cr,DataView:Sr},arrayBuffer}var setSpecies,hasRequiredSetSpecies;function requireSetSpecies(){if(hasRequiredSetSpecies)return setSpecies;hasRequiredSetSpecies=1;var et=requireGetBuiltIn(),_e=requireDefineBuiltInAccessor(),tt=requireWellKnownSymbol(),rt=requireDescriptors(),nt=tt("species");return setSpecies=function(st){var dt=et(st);rt&&dt&&!dt[nt]&&_e(dt,nt,{configurable:!0,get:function(){return this}})},setSpecies}var hasRequiredEs_arrayBuffer_constructor;function requireEs_arrayBuffer_constructor(){if(hasRequiredEs_arrayBuffer_constructor)return es_arrayBuffer_constructor;hasRequiredEs_arrayBuffer_constructor=1;var et=require_export(),_e=requireGlobalThis(),tt=requireArrayBuffer(),rt=requireSetSpecies(),nt="ArrayBuffer",st=tt[nt],dt=_e[nt];return et({global:!0,constructor:!0,forced:dt!==st},{ArrayBuffer:st}),rt(nt),es_arrayBuffer_constructor}var es_arrayBuffer_slice={},hasRequiredEs_arrayBuffer_slice;function requireEs_arrayBuffer_slice(){if(hasRequiredEs_arrayBuffer_slice)return es_arrayBuffer_slice;hasRequiredEs_arrayBuffer_slice=1;var et=require_export(),_e=requireFunctionUncurryThisClause(),tt=requireFails(),rt=requireArrayBuffer(),nt=requireAnObject(),st=requireToAbsoluteIndex(),dt=requireToLength(),ft=rt.ArrayBuffer,ht=rt.DataView,mt=ht.prototype,bt=_e(ft.prototype.slice),St=_e(mt.getUint8),Et=_e(mt.setUint8),Ct=tt(function(){return!new ft(2).slice(1,void 0).byteLength});return et({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Ct},{slice:function(Tt,wt){if(bt&&wt===void 0)return bt(nt(this),Tt);for(var At=nt(this).byteLength,Nt=st(Tt,At),Pt=st(wt===void 0?At:wt,At),It=new ft(dt(Pt-Nt)),Ft=new ht(this),qt=new ht(It),Vt=0;Nt<Pt;)Et(qt,Vt++,St(Ft,Nt++));return It}}),es_arrayBuffer_slice}var es_dataView={},es_dataView_constructor={},hasRequiredEs_dataView_constructor;function requireEs_dataView_constructor(){if(hasRequiredEs_dataView_constructor)return es_dataView_constructor;hasRequiredEs_dataView_constructor=1;var et=require_export(),_e=requireArrayBuffer(),tt=requireArrayBufferBasicDetection();return et({global:!0,constructor:!0,forced:!tt},{DataView:_e.DataView}),es_dataView_constructor}var hasRequiredEs_dataView;function requireEs_dataView(){return hasRequiredEs_dataView||(hasRequiredEs_dataView=1,requireEs_dataView_constructor()),es_dataView}var es_number_maxSafeInteger={},hasRequiredEs_number_maxSafeInteger;function requireEs_number_maxSafeInteger(){if(hasRequiredEs_number_maxSafeInteger)return es_number_maxSafeInteger;hasRequiredEs_number_maxSafeInteger=1;var et=require_export();return et({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),es_number_maxSafeInteger}var es_function_bind={},hasRequiredEs_function_bind;function requireEs_function_bind(){if(hasRequiredEs_function_bind)return es_function_bind;hasRequiredEs_function_bind=1;var et=require_export(),_e=requireFunctionBind();return et({target:"Function",proto:!0,forced:Function.bind!==_e},{bind:_e}),es_function_bind}var es_function_name={},hasRequiredEs_function_name;function requireEs_function_name(){if(hasRequiredEs_function_name)return es_function_name;hasRequiredEs_function_name=1;var et=requireDescriptors(),_e=requireFunctionName().EXISTS,tt=requireFunctionUncurryThis(),rt=requireDefineBuiltInAccessor(),nt=Function.prototype,st=tt(nt.toString),dt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ft=tt(dt.exec),ht="name";return et&&!_e&&rt(nt,ht,{configurable:!0,get:function(){try{return ft(dt,st(this))[1]}catch{return""}}}),es_function_name}var es_array_forEach={},arrayMethodIsStrict,hasRequiredArrayMethodIsStrict;function requireArrayMethodIsStrict(){if(hasRequiredArrayMethodIsStrict)return arrayMethodIsStrict;hasRequiredArrayMethodIsStrict=1;var et=requireFails();return arrayMethodIsStrict=function(_e,tt){var rt=[][_e];return!!rt&&et(function(){rt.call(null,tt||function(){return 1},1)})},arrayMethodIsStrict}var arrayForEach,hasRequiredArrayForEach;function requireArrayForEach(){if(hasRequiredArrayForEach)return arrayForEach;hasRequiredArrayForEach=1;var et=requireArrayIteration().forEach,_e=requireArrayMethodIsStrict(),tt=_e("forEach");return arrayForEach=tt?[].forEach:function(nt){return et(this,nt,arguments.length>1?arguments[1]:void 0)},arrayForEach}var hasRequiredEs_array_forEach;function requireEs_array_forEach(){if(hasRequiredEs_array_forEach)return es_array_forEach;hasRequiredEs_array_forEach=1;var et=require_export(),_e=requireArrayForEach();return et({target:"Array",proto:!0,forced:[].forEach!==_e},{forEach:_e}),es_array_forEach}var web_domCollections_forEach={},domIterables,hasRequiredDomIterables;function requireDomIterables(){return hasRequiredDomIterables||(hasRequiredDomIterables=1,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),domIterables}var domTokenListPrototype,hasRequiredDomTokenListPrototype;function requireDomTokenListPrototype(){if(hasRequiredDomTokenListPrototype)return domTokenListPrototype;hasRequiredDomTokenListPrototype=1;var et=requireDocumentCreateElement(),_e=et("span").classList,tt=_e&&_e.constructor&&_e.constructor.prototype;return domTokenListPrototype=tt===Object.prototype?void 0:tt,domTokenListPrototype}var hasRequiredWeb_domCollections_forEach;function requireWeb_domCollections_forEach(){if(hasRequiredWeb_domCollections_forEach)return web_domCollections_forEach;hasRequiredWeb_domCollections_forEach=1;var et=requireGlobalThis(),_e=requireDomIterables(),tt=requireDomTokenListPrototype(),rt=requireArrayForEach(),nt=requireCreateNonEnumerableProperty(),st=function(ft){if(ft&&ft.forEach!==rt)try{nt(ft,"forEach",rt)}catch{ft.forEach=rt}};for(var dt in _e)_e[dt]&&st(et[dt]&&et[dt].prototype);return st(tt),web_domCollections_forEach}var es_array_map={},arrayMethodHasSpeciesSupport,hasRequiredArrayMethodHasSpeciesSupport;function requireArrayMethodHasSpeciesSupport(){if(hasRequiredArrayMethodHasSpeciesSupport)return arrayMethodHasSpeciesSupport;hasRequiredArrayMethodHasSpeciesSupport=1;var et=requireFails(),_e=requireWellKnownSymbol(),tt=requireEnvironmentV8Version(),rt=_e("species");return arrayMethodHasSpeciesSupport=function(nt){return tt>=51||!et(function(){var st=[],dt=st.constructor={};return dt[rt]=function(){return{foo:1}},st[nt](Boolean).foo!==1})},arrayMethodHasSpeciesSupport}var hasRequiredEs_array_map;function requireEs_array_map(){if(hasRequiredEs_array_map)return es_array_map;hasRequiredEs_array_map=1;var et=require_export(),_e=requireArrayIteration().map,tt=requireArrayMethodHasSpeciesSupport(),rt=tt("map");return et({target:"Array",proto:!0,forced:!rt},{map:function(st){return _e(this,st,arguments.length>1?arguments[1]:void 0)}}),es_array_map}var es_array_join={},hasRequiredEs_array_join;function requireEs_array_join(){if(hasRequiredEs_array_join)return es_array_join;hasRequiredEs_array_join=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireIndexedObject(),rt=requireToIndexedObject(),nt=requireArrayMethodIsStrict(),st=_e([].join),dt=tt!==Object,ft=dt||!nt("join",",");return et({target:"Array",proto:!0,forced:ft},{join:function(mt){return st(rt(this),mt===void 0?",":mt)}}),es_array_join}var es_regexp_exec={},regexpStickyHelpers,hasRequiredRegexpStickyHelpers;function requireRegexpStickyHelpers(){if(hasRequiredRegexpStickyHelpers)return regexpStickyHelpers;hasRequiredRegexpStickyHelpers=1;var et=requireFails(),_e=requireGlobalThis(),tt=_e.RegExp,rt=et(function(){var dt=tt("a","y");return dt.lastIndex=2,dt.exec("abcd")!==null}),nt=rt||et(function(){return!tt("a","y").sticky}),st=rt||et(function(){var dt=tt("^r","gy");return dt.lastIndex=2,dt.exec("str")!==null});return regexpStickyHelpers={BROKEN_CARET:st,MISSED_STICKY:nt,UNSUPPORTED_Y:rt},regexpStickyHelpers}var regexpUnsupportedDotAll,hasRequiredRegexpUnsupportedDotAll;function requireRegexpUnsupportedDotAll(){if(hasRequiredRegexpUnsupportedDotAll)return regexpUnsupportedDotAll;hasRequiredRegexpUnsupportedDotAll=1;var et=requireFails(),_e=requireGlobalThis(),tt=_e.RegExp;return regexpUnsupportedDotAll=et(function(){var rt=tt(".","s");return!(rt.dotAll&&rt.test(`
`)&&rt.flags==="s")}),regexpUnsupportedDotAll}var regexpUnsupportedNcg,hasRequiredRegexpUnsupportedNcg;function requireRegexpUnsupportedNcg(){if(hasRequiredRegexpUnsupportedNcg)return regexpUnsupportedNcg;hasRequiredRegexpUnsupportedNcg=1;var et=requireFails(),_e=requireGlobalThis(),tt=_e.RegExp;return regexpUnsupportedNcg=et(function(){var rt=tt("(?<a>b)","g");return rt.exec("b").groups.a!=="b"||"b".replace(rt,"$<a>c")!=="bc"}),regexpUnsupportedNcg}var regexpExec,hasRequiredRegexpExec;function requireRegexpExec(){if(hasRequiredRegexpExec)return regexpExec;hasRequiredRegexpExec=1;var et=requireFunctionCall(),_e=requireFunctionUncurryThis(),tt=requireToString(),rt=requireRegexpFlags(),nt=requireRegexpStickyHelpers(),st=requireShared(),dt=requireObjectCreate(),ft=requireInternalState().get,ht=requireRegexpUnsupportedDotAll(),mt=requireRegexpUnsupportedNcg(),bt=st("native-string-replace",String.prototype.replace),St=RegExp.prototype.exec,Et=St,Ct=_e("".charAt),Rt=_e("".indexOf),Tt=_e("".replace),wt=_e("".slice),At=(function(){var Ft=/a/,qt=/b*/g;return et(St,Ft,"a"),et(St,qt,"a"),Ft.lastIndex!==0||qt.lastIndex!==0})(),Nt=nt.BROKEN_CARET,Pt=/()??/.exec("")[1]!==void 0,It=At||Pt||Nt||ht||mt;return It&&(Et=function(qt){var Vt=this,Kt=ft(Vt),jt=tt(qt),Ut=Kt.raw,Ot,Wt,Bt,tr,Jt,ar,pr;if(Ut)return Ut.lastIndex=Vt.lastIndex,Ot=et(Et,Ut,jt),Vt.lastIndex=Ut.lastIndex,Ot;var cr=Kt.groups,gr=Nt&&Vt.sticky,Sr=et(rt,Vt),Er=Vt.source,Vr=0,Wr=jt;if(gr&&(Sr=Tt(Sr,"y",""),Rt(Sr,"g")===-1&&(Sr+="g"),Wr=wt(jt,Vt.lastIndex),Vt.lastIndex>0&&(!Vt.multiline||Vt.multiline&&Ct(jt,Vt.lastIndex-1)!==`
`)&&(Er="(?: "+Er+")",Wr=" "+Wr,Vr++),Wt=new RegExp("^(?:"+Er+")",Sr)),Pt&&(Wt=new RegExp("^"+Er+"$(?!\\s)",Sr)),At&&(Bt=Vt.lastIndex),tr=et(St,gr?Wt:Vt,Wr),gr?tr?(tr.input=wt(tr.input,Vr),tr[0]=wt(tr[0],Vr),tr.index=Vt.lastIndex,Vt.lastIndex+=tr[0].length):Vt.lastIndex=0:At&&tr&&(Vt.lastIndex=Vt.global?tr.index+tr[0].length:Bt),Pt&&tr&&tr.length>1&&et(bt,tr[0],Wt,function(){for(Jt=1;Jt<arguments.length-2;Jt++)arguments[Jt]===void 0&&(tr[Jt]=void 0)}),tr&&cr)for(tr.groups=ar=dt(null),Jt=0;Jt<cr.length;Jt++)pr=cr[Jt],ar[pr[0]]=tr[pr[1]];return tr}),regexpExec=Et,regexpExec}var hasRequiredEs_regexp_exec;function requireEs_regexp_exec(){if(hasRequiredEs_regexp_exec)return es_regexp_exec;hasRequiredEs_regexp_exec=1;var et=require_export(),_e=requireRegexpExec();return et({target:"RegExp",proto:!0,forced:/./.exec!==_e},{exec:_e}),es_regexp_exec}var es_string_split={},fixRegexpWellKnownSymbolLogic,hasRequiredFixRegexpWellKnownSymbolLogic;function requireFixRegexpWellKnownSymbolLogic(){if(hasRequiredFixRegexpWellKnownSymbolLogic)return fixRegexpWellKnownSymbolLogic;hasRequiredFixRegexpWellKnownSymbolLogic=1,requireEs_regexp_exec();var et=requireFunctionCall(),_e=requireDefineBuiltIn(),tt=requireRegexpExec(),rt=requireFails(),nt=requireWellKnownSymbol(),st=requireCreateNonEnumerableProperty(),dt=nt("species"),ft=RegExp.prototype;return fixRegexpWellKnownSymbolLogic=function(ht,mt,bt,St){var Et=nt(ht),Ct=!rt(function(){var At={};return At[Et]=function(){return 7},""[ht](At)!==7}),Rt=Ct&&!rt(function(){var At=!1,Nt=/a/;return ht==="split"&&(Nt={},Nt.constructor={},Nt.constructor[dt]=function(){return Nt},Nt.flags="",Nt[Et]=/./[Et]),Nt.exec=function(){return At=!0,null},Nt[Et](""),!At});if(!Ct||!Rt||bt){var Tt=/./[Et],wt=mt(Et,""[ht],function(At,Nt,Pt,It,Ft){var qt=Nt.exec;return qt===tt||qt===ft.exec?Ct&&!Ft?{done:!0,value:et(Tt,Nt,Pt,It)}:{done:!0,value:et(At,Pt,Nt,It)}:{done:!1}});_e(String.prototype,ht,wt[0]),_e(ft,Et,wt[1])}St&&st(ft[Et],"sham",!0)},fixRegexpWellKnownSymbolLogic}var speciesConstructor,hasRequiredSpeciesConstructor;function requireSpeciesConstructor(){if(hasRequiredSpeciesConstructor)return speciesConstructor;hasRequiredSpeciesConstructor=1;var et=requireAnObject(),_e=requireAConstructor(),tt=requireIsNullOrUndefined(),rt=requireWellKnownSymbol(),nt=rt("species");return speciesConstructor=function(st,dt){var ft=et(st).constructor,ht;return ft===void 0||tt(ht=et(ft)[nt])?dt:_e(ht)},speciesConstructor}var stringMultibyte,hasRequiredStringMultibyte;function requireStringMultibyte(){if(hasRequiredStringMultibyte)return stringMultibyte;hasRequiredStringMultibyte=1;var et=requireFunctionUncurryThis(),_e=requireToIntegerOrInfinity(),tt=requireToString(),rt=requireRequireObjectCoercible(),nt=et("".charAt),st=et("".charCodeAt),dt=et("".slice),ft=function(ht){return function(mt,bt){var St=tt(rt(mt)),Et=_e(bt),Ct=St.length,Rt,Tt;return Et<0||Et>=Ct?ht?"":void 0:(Rt=st(St,Et),Rt<55296||Rt>56319||Et+1===Ct||(Tt=st(St,Et+1))<56320||Tt>57343?ht?nt(St,Et):Rt:ht?dt(St,Et,Et+2):(Rt-55296<<10)+(Tt-56320)+65536)}};return stringMultibyte={codeAt:ft(!1),charAt:ft(!0)},stringMultibyte}var advanceStringIndex,hasRequiredAdvanceStringIndex;function requireAdvanceStringIndex(){if(hasRequiredAdvanceStringIndex)return advanceStringIndex;hasRequiredAdvanceStringIndex=1;var et=requireStringMultibyte().charAt;return advanceStringIndex=function(_e,tt,rt){return tt+(rt?et(_e,tt).length:1)},advanceStringIndex}var regexpExecAbstract,hasRequiredRegexpExecAbstract;function requireRegexpExecAbstract(){if(hasRequiredRegexpExecAbstract)return regexpExecAbstract;hasRequiredRegexpExecAbstract=1;var et=requireFunctionCall(),_e=requireAnObject(),tt=requireIsCallable(),rt=requireClassofRaw(),nt=requireRegexpExec(),st=TypeError;return regexpExecAbstract=function(dt,ft){var ht=dt.exec;if(tt(ht)){var mt=et(ht,dt,ft);return mt!==null&&_e(mt),mt}if(rt(dt)==="RegExp")return et(nt,dt,ft);throw new st("RegExp#exec called on incompatible receiver")},regexpExecAbstract}var hasRequiredEs_string_split;function requireEs_string_split(){if(hasRequiredEs_string_split)return es_string_split;hasRequiredEs_string_split=1;var et=requireFunctionCall(),_e=requireFunctionUncurryThis(),tt=requireFixRegexpWellKnownSymbolLogic(),rt=requireAnObject(),nt=requireIsObject(),st=requireRequireObjectCoercible(),dt=requireSpeciesConstructor(),ft=requireAdvanceStringIndex(),ht=requireToLength(),mt=requireToString(),bt=requireGetMethod(),St=requireRegexpExecAbstract(),Et=requireRegexpStickyHelpers(),Ct=requireFails(),Rt=Et.UNSUPPORTED_Y,Tt=4294967295,wt=Math.min,At=_e([].push),Nt=_e("".slice),Pt=!Ct(function(){var Ft=/(?:)/,qt=Ft.exec;Ft.exec=function(){return qt.apply(this,arguments)};var Vt="ab".split(Ft);return Vt.length!==2||Vt[0]!=="a"||Vt[1]!=="b"}),It="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return tt("split",function(Ft,qt,Vt){var Kt="0".split(void 0,0).length?function(jt,Ut){return jt===void 0&&Ut===0?[]:et(qt,this,jt,Ut)}:qt;return[function(Ut,Ot){var Wt=st(this),Bt=nt(Ut)?bt(Ut,Ft):void 0;return Bt?et(Bt,Ut,Wt,Ot):et(Kt,mt(Wt),Ut,Ot)},function(jt,Ut){var Ot=rt(this),Wt=mt(jt);if(!It){var Bt=Vt(Kt,Ot,Wt,Ut,Kt!==qt);if(Bt.done)return Bt.value}var tr=dt(Ot,RegExp),Jt=Ot.unicode,ar=(Ot.ignoreCase?"i":"")+(Ot.multiline?"m":"")+(Ot.unicode?"u":"")+(Rt?"g":"y"),pr=new tr(Rt?"^(?:"+Ot.source+")":Ot,ar),cr=Ut===void 0?Tt:Ut>>>0;if(cr===0)return[];if(Wt.length===0)return St(pr,Wt)===null?[Wt]:[];for(var gr=0,Sr=0,Er=[];Sr<Wt.length;){pr.lastIndex=Rt?0:Sr;var Vr=St(pr,Rt?Nt(Wt,Sr):Wt),Wr;if(Vr===null||(Wr=wt(ht(pr.lastIndex+(Rt?Sr:0)),Wt.length))===gr)Sr=ft(Wt,Sr,Jt);else{if(At(Er,Nt(Wt,gr,Sr)),Er.length===cr)return Er;for(var Mr=1;Mr<=Vr.length-1;Mr++)if(At(Er,Vr[Mr]),Er.length===cr)return Er;Sr=gr=Wr}}return At(Er,Nt(Wt,gr)),Er}]},It||!Pt,Rt),es_string_split}var es_array_concat={},doesNotExceedSafeInteger,hasRequiredDoesNotExceedSafeInteger;function requireDoesNotExceedSafeInteger(){if(hasRequiredDoesNotExceedSafeInteger)return doesNotExceedSafeInteger;hasRequiredDoesNotExceedSafeInteger=1;var et=TypeError,_e=9007199254740991;return doesNotExceedSafeInteger=function(tt){if(tt>_e)throw et("Maximum allowed index exceeded");return tt},doesNotExceedSafeInteger}var hasRequiredEs_array_concat;function requireEs_array_concat(){if(hasRequiredEs_array_concat)return es_array_concat;hasRequiredEs_array_concat=1;var et=require_export(),_e=requireFails(),tt=requireIsArray(),rt=requireIsObject(),nt=requireToObject(),st=requireLengthOfArrayLike(),dt=requireDoesNotExceedSafeInteger(),ft=requireCreateProperty(),ht=requireArraySpeciesCreate(),mt=requireArrayMethodHasSpeciesSupport(),bt=requireWellKnownSymbol(),St=requireEnvironmentV8Version(),Et=bt("isConcatSpreadable"),Ct=St>=51||!_e(function(){var wt=[];return wt[Et]=!1,wt.concat()[0]!==wt}),Rt=function(wt){if(!rt(wt))return!1;var At=wt[Et];return At!==void 0?!!At:tt(wt)},Tt=!Ct||!mt("concat");return et({target:"Array",proto:!0,arity:1,forced:Tt},{concat:function(At){var Nt=nt(this),Pt=ht(Nt,0),It=0,Ft,qt,Vt,Kt,jt;for(Ft=-1,Vt=arguments.length;Ft<Vt;Ft++)if(jt=Ft===-1?Nt:arguments[Ft],Rt(jt))for(Kt=st(jt),dt(It+Kt),qt=0;qt<Kt;qt++,It++)qt in jt&&ft(Pt,It,jt[qt]);else dt(It+1),ft(Pt,It++,jt);return Pt.length=It,Pt}}),es_array_concat}var es_date_now={},hasRequiredEs_date_now;function requireEs_date_now(){if(hasRequiredEs_date_now)return es_date_now;hasRequiredEs_date_now=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=Date,rt=_e(tt.prototype.getTime);return et({target:"Date",stat:!0},{now:function(){return rt(new tt)}}),es_date_now}var web_timers={},web_setInterval={},environment,hasRequiredEnvironment;function requireEnvironment(){if(hasRequiredEnvironment)return environment;hasRequiredEnvironment=1;var et=requireGlobalThis(),_e=requireEnvironmentUserAgent(),tt=requireClassofRaw(),rt=function(nt){return _e.slice(0,nt.length)===nt};return environment=(function(){return rt("Bun/")?"BUN":rt("Cloudflare-Workers")?"CLOUDFLARE":rt("Deno/")?"DENO":rt("Node.js/")?"NODE":et.Bun&&typeof Bun.version=="string"?"BUN":et.Deno&&typeof Deno.version=="object"?"DENO":tt(et.process)==="process"?"NODE":et.window&&et.document?"BROWSER":"REST"})(),environment}var validateArgumentsLength,hasRequiredValidateArgumentsLength;function requireValidateArgumentsLength(){if(hasRequiredValidateArgumentsLength)return validateArgumentsLength;hasRequiredValidateArgumentsLength=1;var et=TypeError;return validateArgumentsLength=function(_e,tt){if(_e<tt)throw new et("Not enough arguments");return _e},validateArgumentsLength}var schedulersFix,hasRequiredSchedulersFix;function requireSchedulersFix(){if(hasRequiredSchedulersFix)return schedulersFix;hasRequiredSchedulersFix=1;var et=requireGlobalThis(),_e=requireFunctionApply(),tt=requireIsCallable(),rt=requireEnvironment(),nt=requireEnvironmentUserAgent(),st=requireArraySlice(),dt=requireValidateArgumentsLength(),ft=et.Function,ht=/MSIE .\./.test(nt)||rt==="BUN"&&(function(){var mt=et.Bun.version.split(".");return mt.length<3||mt[0]==="0"&&(mt[1]<3||mt[1]==="3"&&mt[2]==="0")})();return schedulersFix=function(mt,bt){var St=bt?2:1;return ht?function(Et,Ct){var Rt=dt(arguments.length,1)>St,Tt=tt(Et)?Et:ft(Et),wt=Rt?st(arguments,St):[],At=Rt?function(){_e(Tt,this,wt)}:Tt;return bt?mt(At,Ct):mt(At)}:mt},schedulersFix}var hasRequiredWeb_setInterval;function requireWeb_setInterval(){if(hasRequiredWeb_setInterval)return web_setInterval;hasRequiredWeb_setInterval=1;var et=require_export(),_e=requireGlobalThis(),tt=requireSchedulersFix(),rt=tt(_e.setInterval,!0);return et({global:!0,bind:!0,forced:_e.setInterval!==rt},{setInterval:rt}),web_setInterval}var web_setTimeout={},hasRequiredWeb_setTimeout;function requireWeb_setTimeout(){if(hasRequiredWeb_setTimeout)return web_setTimeout;hasRequiredWeb_setTimeout=1;var et=require_export(),_e=requireGlobalThis(),tt=requireSchedulersFix(),rt=tt(_e.setTimeout,!0);return et({global:!0,bind:!0,forced:_e.setTimeout!==rt},{setTimeout:rt}),web_setTimeout}var hasRequiredWeb_timers;function requireWeb_timers(){return hasRequiredWeb_timers||(hasRequiredWeb_timers=1,requireWeb_setInterval(),requireWeb_setTimeout()),web_timers}var es_promise={},es_promise_constructor={},environmentIsNode,hasRequiredEnvironmentIsNode;function requireEnvironmentIsNode(){if(hasRequiredEnvironmentIsNode)return environmentIsNode;hasRequiredEnvironmentIsNode=1;var et=requireEnvironment();return environmentIsNode=et==="NODE",environmentIsNode}var environmentIsIos,hasRequiredEnvironmentIsIos;function requireEnvironmentIsIos(){if(hasRequiredEnvironmentIsIos)return environmentIsIos;hasRequiredEnvironmentIsIos=1;var et=requireEnvironmentUserAgent();return environmentIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(et),environmentIsIos}var task,hasRequiredTask;function requireTask(){if(hasRequiredTask)return task;hasRequiredTask=1;var et=requireGlobalThis(),_e=requireFunctionApply(),tt=requireFunctionBindContext(),rt=requireIsCallable(),nt=requireHasOwnProperty(),st=requireFails(),dt=requireHtml(),ft=requireArraySlice(),ht=requireDocumentCreateElement(),mt=requireValidateArgumentsLength(),bt=requireEnvironmentIsIos(),St=requireEnvironmentIsNode(),Et=et.setImmediate,Ct=et.clearImmediate,Rt=et.process,Tt=et.Dispatch,wt=et.Function,At=et.MessageChannel,Nt=et.String,Pt=0,It={},Ft="onreadystatechange",qt,Vt,Kt,jt;st(function(){qt=et.location});var Ut=function(tr){if(nt(It,tr)){var Jt=It[tr];delete It[tr],Jt()}},Ot=function(tr){return function(){Ut(tr)}},Wt=function(tr){Ut(tr.data)},Bt=function(tr){et.postMessage(Nt(tr),qt.protocol+"//"+qt.host)};return(!Et||!Ct)&&(Et=function(Jt){mt(arguments.length,1);var ar=rt(Jt)?Jt:wt(Jt),pr=ft(arguments,1);return It[++Pt]=function(){_e(ar,void 0,pr)},Vt(Pt),Pt},Ct=function(Jt){delete It[Jt]},St?Vt=function(tr){Rt.nextTick(Ot(tr))}:Tt&&Tt.now?Vt=function(tr){Tt.now(Ot(tr))}:At&&!bt?(Kt=new At,jt=Kt.port2,Kt.port1.onmessage=Wt,Vt=tt(jt.postMessage,jt)):et.addEventListener&&rt(et.postMessage)&&!et.importScripts&&qt&&qt.protocol!=="file:"&&!st(Bt)?(Vt=Bt,et.addEventListener("message",Wt,!1)):Ft in ht("script")?Vt=function(tr){dt.appendChild(ht("script"))[Ft]=function(){dt.removeChild(this),Ut(tr)}}:Vt=function(tr){setTimeout(Ot(tr),0)}),task={set:Et,clear:Ct},task}var safeGetBuiltIn,hasRequiredSafeGetBuiltIn;function requireSafeGetBuiltIn(){if(hasRequiredSafeGetBuiltIn)return safeGetBuiltIn;hasRequiredSafeGetBuiltIn=1;var et=requireGlobalThis(),_e=requireDescriptors(),tt=Object.getOwnPropertyDescriptor;return safeGetBuiltIn=function(rt){if(!_e)return et[rt];var nt=tt(et,rt);return nt&&nt.value},safeGetBuiltIn}var queue$1,hasRequiredQueue;function requireQueue(){if(hasRequiredQueue)return queue$1;hasRequiredQueue=1;var et=function(){this.head=null,this.tail=null};return et.prototype={add:function(_e){var tt={item:_e,next:null},rt=this.tail;rt?rt.next=tt:this.head=tt,this.tail=tt},get:function(){var _e=this.head;if(_e){var tt=this.head=_e.next;return tt===null&&(this.tail=null),_e.item}}},queue$1=et,queue$1}var environmentIsIosPebble,hasRequiredEnvironmentIsIosPebble;function requireEnvironmentIsIosPebble(){if(hasRequiredEnvironmentIsIosPebble)return environmentIsIosPebble;hasRequiredEnvironmentIsIosPebble=1;var et=requireEnvironmentUserAgent();return environmentIsIosPebble=/ipad|iphone|ipod/i.test(et)&&typeof Pebble<"u",environmentIsIosPebble}var environmentIsWebosWebkit,hasRequiredEnvironmentIsWebosWebkit;function requireEnvironmentIsWebosWebkit(){if(hasRequiredEnvironmentIsWebosWebkit)return environmentIsWebosWebkit;hasRequiredEnvironmentIsWebosWebkit=1;var et=requireEnvironmentUserAgent();return environmentIsWebosWebkit=/web0s(?!.*chrome)/i.test(et),environmentIsWebosWebkit}var microtask_1,hasRequiredMicrotask;function requireMicrotask(){if(hasRequiredMicrotask)return microtask_1;hasRequiredMicrotask=1;var et=requireGlobalThis(),_e=requireSafeGetBuiltIn(),tt=requireFunctionBindContext(),rt=requireTask().set,nt=requireQueue(),st=requireEnvironmentIsIos(),dt=requireEnvironmentIsIosPebble(),ft=requireEnvironmentIsWebosWebkit(),ht=requireEnvironmentIsNode(),mt=et.MutationObserver||et.WebKitMutationObserver,bt=et.document,St=et.process,Et=et.Promise,Ct=_e("queueMicrotask"),Rt,Tt,wt,At,Nt;if(!Ct){var Pt=new nt,It=function(){var Ft,qt;for(ht&&(Ft=St.domain)&&Ft.exit();qt=Pt.get();)try{qt()}catch(Vt){throw Pt.head&&Rt(),Vt}Ft&&Ft.enter()};!st&&!ht&&!ft&&mt&&bt?(Tt=!0,wt=bt.createTextNode(""),new mt(It).observe(wt,{characterData:!0}),Rt=function(){wt.data=Tt=!Tt}):!dt&&Et&&Et.resolve?(At=Et.resolve(void 0),At.constructor=Et,Nt=tt(At.then,At),Rt=function(){Nt(It)}):ht?Rt=function(){St.nextTick(It)}:(rt=tt(rt,et),Rt=function(){rt(It)}),Ct=function(Ft){Pt.head||Rt(),Pt.add(Ft)}}return microtask_1=Ct,microtask_1}var hostReportErrors,hasRequiredHostReportErrors;function requireHostReportErrors(){return hasRequiredHostReportErrors||(hasRequiredHostReportErrors=1,hostReportErrors=function(et,_e){try{arguments.length===1?console.error(et):console.error(et,_e)}catch{}}),hostReportErrors}var perform,hasRequiredPerform;function requirePerform(){return hasRequiredPerform||(hasRequiredPerform=1,perform=function(et){try{return{error:!1,value:et()}}catch(_e){return{error:!0,value:_e}}}),perform}var promiseNativeConstructor,hasRequiredPromiseNativeConstructor;function requirePromiseNativeConstructor(){if(hasRequiredPromiseNativeConstructor)return promiseNativeConstructor;hasRequiredPromiseNativeConstructor=1;var et=requireGlobalThis();return promiseNativeConstructor=et.Promise,promiseNativeConstructor}var promiseConstructorDetection,hasRequiredPromiseConstructorDetection;function requirePromiseConstructorDetection(){if(hasRequiredPromiseConstructorDetection)return promiseConstructorDetection;hasRequiredPromiseConstructorDetection=1;var et=requireGlobalThis(),_e=requirePromiseNativeConstructor(),tt=requireIsCallable(),rt=requireIsForced(),nt=requireInspectSource(),st=requireWellKnownSymbol(),dt=requireEnvironment(),ft=requireIsPure(),ht=requireEnvironmentV8Version(),mt=_e&&_e.prototype,bt=st("species"),St=!1,Et=tt(et.PromiseRejectionEvent),Ct=rt("Promise",function(){var Rt=nt(_e),Tt=Rt!==String(_e);if(!Tt&&ht===66||ft&&!(mt.catch&&mt.finally))return!0;if(!ht||ht<51||!/native code/.test(Rt)){var wt=new _e(function(Pt){Pt(1)}),At=function(Pt){Pt(function(){},function(){})},Nt=wt.constructor={};if(Nt[bt]=At,St=wt.then(function(){})instanceof At,!St)return!0}return!Tt&&(dt==="BROWSER"||dt==="DENO")&&!Et});return promiseConstructorDetection={CONSTRUCTOR:Ct,REJECTION_EVENT:Et,SUBCLASSING:St},promiseConstructorDetection}var newPromiseCapability={},hasRequiredNewPromiseCapability;function requireNewPromiseCapability(){if(hasRequiredNewPromiseCapability)return newPromiseCapability;hasRequiredNewPromiseCapability=1;var et=requireACallable(),_e=TypeError,tt=function(rt){var nt,st;this.promise=new rt(function(dt,ft){if(nt!==void 0||st!==void 0)throw new _e("Bad Promise constructor");nt=dt,st=ft}),this.resolve=et(nt),this.reject=et(st)};return newPromiseCapability.f=function(rt){return new tt(rt)},newPromiseCapability}var hasRequiredEs_promise_constructor;function requireEs_promise_constructor(){if(hasRequiredEs_promise_constructor)return es_promise_constructor;hasRequiredEs_promise_constructor=1;var et=require_export(),_e=requireIsPure(),tt=requireEnvironmentIsNode(),rt=requireGlobalThis(),nt=requirePath(),st=requireFunctionCall(),dt=requireDefineBuiltIn(),ft=requireObjectSetPrototypeOf(),ht=requireSetToStringTag(),mt=requireSetSpecies(),bt=requireACallable(),St=requireIsCallable(),Et=requireIsObject(),Ct=requireAnInstance(),Rt=requireSpeciesConstructor(),Tt=requireTask().set,wt=requireMicrotask(),At=requireHostReportErrors(),Nt=requirePerform(),Pt=requireQueue(),It=requireInternalState(),Ft=requirePromiseNativeConstructor(),qt=requirePromiseConstructorDetection(),Vt=requireNewPromiseCapability(),Kt="Promise",jt=qt.CONSTRUCTOR,Ut=qt.REJECTION_EVENT,Ot=qt.SUBCLASSING,Wt=It.getterFor(Kt),Bt=It.set,tr=Ft&&Ft.prototype,Jt=Ft,ar=tr,pr=rt.TypeError,cr=rt.document,gr=rt.process,Sr=Vt.f,Er=Sr,Vr=!!(cr&&cr.createEvent&&rt.dispatchEvent),Wr="unhandledrejection",Mr="rejectionhandled",Nr=0,Yr=1,Or=2,Ar=1,Qr=2,hn,Sn,Kr,Hn,ln=function(tn){var dn;return Et(tn)&&St(dn=tn.then)?dn:!1},kn=function(tn,dn){var Rn=dn.value,wn=dn.state===Yr,Un=wn?tn.ok:tn.fail,Zn=tn.resolve,pn=tn.reject,Dn=tn.domain,qn,_a,Vn;try{Un?(wn||(dn.rejection===Qr&&Ln(dn),dn.rejection=Ar),Un===!0?qn=Rn:(Dn&&Dn.enter(),qn=Un(Rn),Dn&&(Dn.exit(),Vn=!0)),qn===tn.promise?pn(new pr("Promise-chain cycle")):(_a=ln(qn))?st(_a,qn,Zn,pn):Zn(qn)):pn(Rn)}catch(bs){Dn&&!Vn&&Dn.exit(),pn(bs)}},xn=function(tn,dn){tn.notified||(tn.notified=!0,wt(function(){for(var Rn=tn.reactions,wn;wn=Rn.get();)kn(wn,tn);tn.notified=!1,dn&&!tn.rejection&&rs(tn)}))},An=function(tn,dn,Rn){var wn,Un;Vr?(wn=cr.createEvent("Event"),wn.promise=dn,wn.reason=Rn,wn.initEvent(tn,!1,!0),rt.dispatchEvent(wn)):wn={promise:dn,reason:Rn},!Ut&&(Un=rt["on"+tn])?Un(wn):tn===Wr&&At("Unhandled promise rejection",Rn)},rs=function(tn){st(Tt,rt,function(){var dn=tn.facade,Rn=tn.value,wn=qs(tn),Un;if(wn&&(Un=Nt(function(){tt?gr.emit("unhandledRejection",Rn,dn):An(Wr,dn,Rn)}),tn.rejection=tt||qs(tn)?Qr:Ar,Un.error))throw Un.value})},qs=function(tn){return tn.rejection!==Ar&&!tn.parent},Ln=function(tn){st(Tt,rt,function(){var dn=tn.facade;tt?gr.emit("rejectionHandled",dn):An(Mr,dn,tn.value)})},Cn=function(tn,dn,Rn){return function(wn){tn(dn,wn,Rn)}},Nn=function(tn,dn,Rn){tn.done||(tn.done=!0,Rn&&(tn=Rn),tn.value=dn,tn.state=Or,xn(tn,!0))},Gr=function(tn,dn,Rn){if(!tn.done){tn.done=!0,Rn&&(tn=Rn);try{if(tn.facade===dn)throw new pr("Promise can't be resolved itself");var wn=ln(dn);wn?wt(function(){var Un={done:!1};try{st(wn,dn,Cn(Gr,Un,tn),Cn(Nn,Un,tn))}catch(Zn){Nn(Un,Zn,tn)}}):(tn.value=dn,tn.state=Yr,xn(tn,!1))}catch(Un){Nn({done:!1},Un,tn)}}};if(jt&&(Jt=function(dn){Ct(this,ar),bt(dn),st(hn,this);var Rn=Wt(this);try{dn(Cn(Gr,Rn),Cn(Nn,Rn))}catch(wn){Nn(Rn,wn)}},ar=Jt.prototype,hn=function(dn){Bt(this,{type:Kt,done:!1,notified:!1,parent:!1,reactions:new Pt,rejection:!1,state:Nr,value:null})},hn.prototype=dt(ar,"then",function(dn,Rn){var wn=Wt(this),Un=Sr(Rt(this,Jt));return wn.parent=!0,Un.ok=St(dn)?dn:!0,Un.fail=St(Rn)&&Rn,Un.domain=tt?gr.domain:void 0,wn.state===Nr?wn.reactions.add(Un):wt(function(){kn(Un,wn)}),Un.promise}),Sn=function(){var tn=new hn,dn=Wt(tn);this.promise=tn,this.resolve=Cn(Gr,dn),this.reject=Cn(Nn,dn)},Vt.f=Sr=function(tn){return tn===Jt||tn===Kr?new Sn(tn):Er(tn)},!_e&&St(Ft)&&tr!==Object.prototype)){Hn=tr.then,Ot||dt(tr,"then",function(dn,Rn){var wn=this;return new Jt(function(Un,Zn){st(Hn,wn,Un,Zn)}).then(dn,Rn)},{unsafe:!0});try{delete tr.constructor}catch{}ft&&ft(tr,ar)}return et({global:!0,constructor:!0,wrap:!0,forced:jt},{Promise:Jt}),Kr=nt.Promise,ht(Jt,Kt,!1,!0),mt(Kt),es_promise_constructor}var es_promise_all={},iterators,hasRequiredIterators;function requireIterators(){return hasRequiredIterators||(hasRequiredIterators=1,iterators={}),iterators}var isArrayIteratorMethod,hasRequiredIsArrayIteratorMethod;function requireIsArrayIteratorMethod(){if(hasRequiredIsArrayIteratorMethod)return isArrayIteratorMethod;hasRequiredIsArrayIteratorMethod=1;var et=requireWellKnownSymbol(),_e=requireIterators(),tt=et("iterator"),rt=Array.prototype;return isArrayIteratorMethod=function(nt){return nt!==void 0&&(_e.Array===nt||rt[tt]===nt)},isArrayIteratorMethod}var getIteratorMethod,hasRequiredGetIteratorMethod;function requireGetIteratorMethod(){if(hasRequiredGetIteratorMethod)return getIteratorMethod;hasRequiredGetIteratorMethod=1;var et=requireClassof(),_e=requireGetMethod(),tt=requireIsNullOrUndefined(),rt=requireIterators(),nt=requireWellKnownSymbol(),st=nt("iterator");return getIteratorMethod=function(dt){if(!tt(dt))return _e(dt,st)||_e(dt,"@@iterator")||rt[et(dt)]},getIteratorMethod}var getIterator,hasRequiredGetIterator;function requireGetIterator(){if(hasRequiredGetIterator)return getIterator;hasRequiredGetIterator=1;var et=requireFunctionCall(),_e=requireACallable(),tt=requireAnObject(),rt=requireTryToString(),nt=requireGetIteratorMethod(),st=TypeError;return getIterator=function(dt,ft){var ht=arguments.length<2?nt(dt):ft;if(_e(ht))return tt(et(ht,dt));throw new st(rt(dt)+" is not iterable")},getIterator}var iteratorClose,hasRequiredIteratorClose;function requireIteratorClose(){if(hasRequiredIteratorClose)return iteratorClose;hasRequiredIteratorClose=1;var et=requireFunctionCall(),_e=requireAnObject(),tt=requireGetMethod();return iteratorClose=function(rt,nt,st){var dt,ft;_e(rt);try{if(dt=tt(rt,"return"),!dt){if(nt==="throw")throw st;return st}dt=et(dt,rt)}catch(ht){ft=!0,dt=ht}if(nt==="throw")throw st;if(ft)throw dt;return _e(dt),st},iteratorClose}var iterate,hasRequiredIterate;function requireIterate(){if(hasRequiredIterate)return iterate;hasRequiredIterate=1;var et=requireFunctionBindContext(),_e=requireFunctionCall(),tt=requireAnObject(),rt=requireTryToString(),nt=requireIsArrayIteratorMethod(),st=requireLengthOfArrayLike(),dt=requireObjectIsPrototypeOf(),ft=requireGetIterator(),ht=requireGetIteratorMethod(),mt=requireIteratorClose(),bt=TypeError,St=function(Ct,Rt){this.stopped=Ct,this.result=Rt},Et=St.prototype;return iterate=function(Ct,Rt,Tt){var wt=Tt&&Tt.that,At=!!(Tt&&Tt.AS_ENTRIES),Nt=!!(Tt&&Tt.IS_RECORD),Pt=!!(Tt&&Tt.IS_ITERATOR),It=!!(Tt&&Tt.INTERRUPTED),Ft=et(Rt,wt),qt,Vt,Kt,jt,Ut,Ot,Wt,Bt=function(Jt){return qt&&mt(qt,"normal"),new St(!0,Jt)},tr=function(Jt){return At?(tt(Jt),It?Ft(Jt[0],Jt[1],Bt):Ft(Jt[0],Jt[1])):It?Ft(Jt,Bt):Ft(Jt)};if(Nt)qt=Ct.iterator;else if(Pt)qt=Ct;else{if(Vt=ht(Ct),!Vt)throw new bt(rt(Ct)+" is not iterable");if(nt(Vt)){for(Kt=0,jt=st(Ct);jt>Kt;Kt++)if(Ut=tr(Ct[Kt]),Ut&&dt(Et,Ut))return Ut;return new St(!1)}qt=ft(Ct,Vt)}for(Ot=Nt?Ct.next:qt.next;!(Wt=_e(Ot,qt)).done;){try{Ut=tr(Wt.value)}catch(Jt){mt(qt,"throw",Jt)}if(typeof Ut=="object"&&Ut&&dt(Et,Ut))return Ut}return new St(!1)},iterate}var checkCorrectnessOfIteration,hasRequiredCheckCorrectnessOfIteration;function requireCheckCorrectnessOfIteration(){if(hasRequiredCheckCorrectnessOfIteration)return checkCorrectnessOfIteration;hasRequiredCheckCorrectnessOfIteration=1;var et=requireWellKnownSymbol(),_e=et("iterator"),tt=!1;try{var rt=0,nt={next:function(){return{done:!!rt++}},return:function(){tt=!0}};nt[_e]=function(){return this},Array.from(nt,function(){throw 2})}catch{}return checkCorrectnessOfIteration=function(st,dt){try{if(!dt&&!tt)return!1}catch{return!1}var ft=!1;try{var ht={};ht[_e]=function(){return{next:function(){return{done:ft=!0}}}},st(ht)}catch{}return ft},checkCorrectnessOfIteration}var promiseStaticsIncorrectIteration,hasRequiredPromiseStaticsIncorrectIteration;function requirePromiseStaticsIncorrectIteration(){if(hasRequiredPromiseStaticsIncorrectIteration)return promiseStaticsIncorrectIteration;hasRequiredPromiseStaticsIncorrectIteration=1;var et=requirePromiseNativeConstructor(),_e=requireCheckCorrectnessOfIteration(),tt=requirePromiseConstructorDetection().CONSTRUCTOR;return promiseStaticsIncorrectIteration=tt||!_e(function(rt){et.all(rt).then(void 0,function(){})}),promiseStaticsIncorrectIteration}var hasRequiredEs_promise_all;function requireEs_promise_all(){if(hasRequiredEs_promise_all)return es_promise_all;hasRequiredEs_promise_all=1;var et=require_export(),_e=requireFunctionCall(),tt=requireACallable(),rt=requireNewPromiseCapability(),nt=requirePerform(),st=requireIterate(),dt=requirePromiseStaticsIncorrectIteration();return et({target:"Promise",stat:!0,forced:dt},{all:function(ht){var mt=this,bt=rt.f(mt),St=bt.resolve,Et=bt.reject,Ct=nt(function(){var Rt=tt(mt.resolve),Tt=[],wt=0,At=1;st(ht,function(Nt){var Pt=wt++,It=!1;At++,_e(Rt,mt,Nt).then(function(Ft){It||(It=!0,Tt[Pt]=Ft,--At||St(Tt))},Et)}),--At||St(Tt)});return Ct.error&&Et(Ct.value),bt.promise}}),es_promise_all}var es_promise_catch={},hasRequiredEs_promise_catch;function requireEs_promise_catch(){if(hasRequiredEs_promise_catch)return es_promise_catch;hasRequiredEs_promise_catch=1;var et=require_export(),_e=requireIsPure(),tt=requirePromiseConstructorDetection().CONSTRUCTOR,rt=requirePromiseNativeConstructor(),nt=requireGetBuiltIn(),st=requireIsCallable(),dt=requireDefineBuiltIn(),ft=rt&&rt.prototype;if(et({target:"Promise",proto:!0,forced:tt,real:!0},{catch:function(mt){return this.then(void 0,mt)}}),!_e&&st(rt)){var ht=nt("Promise").prototype.catch;ft.catch!==ht&&dt(ft,"catch",ht,{unsafe:!0})}return es_promise_catch}var es_promise_race={},hasRequiredEs_promise_race;function requireEs_promise_race(){if(hasRequiredEs_promise_race)return es_promise_race;hasRequiredEs_promise_race=1;var et=require_export(),_e=requireFunctionCall(),tt=requireACallable(),rt=requireNewPromiseCapability(),nt=requirePerform(),st=requireIterate(),dt=requirePromiseStaticsIncorrectIteration();return et({target:"Promise",stat:!0,forced:dt},{race:function(ht){var mt=this,bt=rt.f(mt),St=bt.reject,Et=nt(function(){var Ct=tt(mt.resolve);st(ht,function(Rt){_e(Ct,mt,Rt).then(bt.resolve,St)})});return Et.error&&St(Et.value),bt.promise}}),es_promise_race}var es_promise_reject={},hasRequiredEs_promise_reject;function requireEs_promise_reject(){if(hasRequiredEs_promise_reject)return es_promise_reject;hasRequiredEs_promise_reject=1;var et=require_export(),_e=requireNewPromiseCapability(),tt=requirePromiseConstructorDetection().CONSTRUCTOR;return et({target:"Promise",stat:!0,forced:tt},{reject:function(nt){var st=_e.f(this),dt=st.reject;return dt(nt),st.promise}}),es_promise_reject}var es_promise_resolve={},promiseResolve,hasRequiredPromiseResolve;function requirePromiseResolve(){if(hasRequiredPromiseResolve)return promiseResolve;hasRequiredPromiseResolve=1;var et=requireAnObject(),_e=requireIsObject(),tt=requireNewPromiseCapability();return promiseResolve=function(rt,nt){if(et(rt),_e(nt)&&nt.constructor===rt)return nt;var st=tt.f(rt),dt=st.resolve;return dt(nt),st.promise},promiseResolve}var hasRequiredEs_promise_resolve;function requireEs_promise_resolve(){if(hasRequiredEs_promise_resolve)return es_promise_resolve;hasRequiredEs_promise_resolve=1;var et=require_export(),_e=requireGetBuiltIn(),tt=requireIsPure(),rt=requirePromiseNativeConstructor(),nt=requirePromiseConstructorDetection().CONSTRUCTOR,st=requirePromiseResolve(),dt=_e("Promise"),ft=tt&&!nt;return et({target:"Promise",stat:!0,forced:tt||nt},{resolve:function(mt){return st(ft&&this===dt?rt:this,mt)}}),es_promise_resolve}var hasRequiredEs_promise;function requireEs_promise(){return hasRequiredEs_promise||(hasRequiredEs_promise=1,requireEs_promise_constructor(),requireEs_promise_all(),requireEs_promise_catch(),requireEs_promise_race(),requireEs_promise_reject(),requireEs_promise_resolve()),es_promise}var es_array_splice={},arraySetLength,hasRequiredArraySetLength;function requireArraySetLength(){if(hasRequiredArraySetLength)return arraySetLength;hasRequiredArraySetLength=1;var et=requireDescriptors(),_e=requireIsArray(),tt=TypeError,rt=Object.getOwnPropertyDescriptor,nt=et&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(st){return st instanceof TypeError}})();return arraySetLength=nt?function(st,dt){if(_e(st)&&!rt(st,"length").writable)throw new tt("Cannot set read only .length");return st.length=dt}:function(st,dt){return st.length=dt},arraySetLength}var deletePropertyOrThrow,hasRequiredDeletePropertyOrThrow;function requireDeletePropertyOrThrow(){if(hasRequiredDeletePropertyOrThrow)return deletePropertyOrThrow;hasRequiredDeletePropertyOrThrow=1;var et=requireTryToString(),_e=TypeError;return deletePropertyOrThrow=function(tt,rt){if(!delete tt[rt])throw new _e("Cannot delete property "+et(rt)+" of "+et(tt))},deletePropertyOrThrow}var hasRequiredEs_array_splice;function requireEs_array_splice(){if(hasRequiredEs_array_splice)return es_array_splice;hasRequiredEs_array_splice=1;var et=require_export(),_e=requireToObject(),tt=requireToAbsoluteIndex(),rt=requireToIntegerOrInfinity(),nt=requireLengthOfArrayLike(),st=requireArraySetLength(),dt=requireDoesNotExceedSafeInteger(),ft=requireArraySpeciesCreate(),ht=requireCreateProperty(),mt=requireDeletePropertyOrThrow(),bt=requireArrayMethodHasSpeciesSupport(),St=bt("splice"),Et=Math.max,Ct=Math.min;return et({target:"Array",proto:!0,forced:!St},{splice:function(Tt,wt){var At=_e(this),Nt=nt(At),Pt=tt(Tt,Nt),It=arguments.length,Ft,qt,Vt,Kt,jt,Ut;for(It===0?Ft=qt=0:It===1?(Ft=0,qt=Nt-Pt):(Ft=It-2,qt=Ct(Et(rt(wt),0),Nt-Pt)),dt(Nt+Ft-qt),Vt=ft(At,qt),Kt=0;Kt<qt;Kt++)jt=Pt+Kt,jt in At&&ht(Vt,Kt,At[jt]);if(Vt.length=qt,Ft<qt){for(Kt=Pt;Kt<Nt-qt;Kt++)jt=Kt+qt,Ut=Kt+Ft,jt in At?At[Ut]=At[jt]:mt(At,Ut);for(Kt=Nt;Kt>Nt-qt+Ft;Kt--)mt(At,Kt-1)}else if(Ft>qt)for(Kt=Nt-qt;Kt>Pt;Kt--)jt=Kt+qt-1,Ut=Kt+Ft-1,jt in At?At[Ut]=At[jt]:mt(At,Ut);for(Kt=0;Kt<Ft;Kt++)At[Kt+Pt]=arguments[Kt+2];return st(At,Nt-qt+Ft),Vt}}),es_array_splice}var es_string_match={},hasRequiredEs_string_match;function requireEs_string_match(){if(hasRequiredEs_string_match)return es_string_match;hasRequiredEs_string_match=1;var et=requireFunctionCall(),_e=requireFunctionUncurryThis(),tt=requireFixRegexpWellKnownSymbolLogic(),rt=requireAnObject(),nt=requireIsObject(),st=requireToLength(),dt=requireToString(),ft=requireRequireObjectCoercible(),ht=requireGetMethod(),mt=requireAdvanceStringIndex(),bt=requireRegexpGetFlags(),St=requireRegexpExecAbstract(),Et=_e("".indexOf);return tt("match",function(Ct,Rt,Tt){return[function(At){var Nt=ft(this),Pt=nt(At)?ht(At,Ct):void 0;return Pt?et(Pt,At,Nt):new RegExp(At)[Ct](dt(Nt))},function(wt){var At=rt(this),Nt=dt(wt),Pt=Tt(Rt,At,Nt);if(Pt.done)return Pt.value;var It=dt(bt(At));if(Et(It,"g")===-1)return St(At,Nt);var Ft=Et(It,"u")!==-1;At.lastIndex=0;for(var qt=[],Vt=0,Kt;(Kt=St(At,Nt))!==null;){var jt=dt(Kt[0]);qt[Vt]=jt,jt===""&&(At.lastIndex=mt(Nt,st(At.lastIndex),Ft)),Vt++}return Vt===0?null:qt}]}),es_string_match}var es_string_replace={},getSubstitution,hasRequiredGetSubstitution;function requireGetSubstitution(){if(hasRequiredGetSubstitution)return getSubstitution;hasRequiredGetSubstitution=1;var et=requireFunctionUncurryThis(),_e=requireToObject(),tt=Math.floor,rt=et("".charAt),nt=et("".replace),st=et("".slice),dt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ft=/\$([$&'`]|\d{1,2})/g;return getSubstitution=function(ht,mt,bt,St,Et,Ct){var Rt=bt+ht.length,Tt=St.length,wt=ft;return Et!==void 0&&(Et=_e(Et),wt=dt),nt(Ct,wt,function(At,Nt){var Pt;switch(rt(Nt,0)){case"$":return"$";case"&":return ht;case"`":return st(mt,0,bt);case"'":return st(mt,Rt);case"<":Pt=Et[st(Nt,1,-1)];break;default:var It=+Nt;if(It===0)return At;if(It>Tt){var Ft=tt(It/10);return Ft===0?At:Ft<=Tt?St[Ft-1]===void 0?rt(Nt,1):St[Ft-1]+rt(Nt,1):At}Pt=St[It-1]}return Pt===void 0?"":Pt})},getSubstitution}var hasRequiredEs_string_replace;function requireEs_string_replace(){if(hasRequiredEs_string_replace)return es_string_replace;hasRequiredEs_string_replace=1;var et=requireFunctionApply(),_e=requireFunctionCall(),tt=requireFunctionUncurryThis(),rt=requireFixRegexpWellKnownSymbolLogic(),nt=requireFails(),st=requireAnObject(),dt=requireIsCallable(),ft=requireIsObject(),ht=requireToIntegerOrInfinity(),mt=requireToLength(),bt=requireToString(),St=requireRequireObjectCoercible(),Et=requireAdvanceStringIndex(),Ct=requireGetMethod(),Rt=requireGetSubstitution(),Tt=requireRegexpGetFlags(),wt=requireRegexpExecAbstract(),At=requireWellKnownSymbol(),Nt=At("replace"),Pt=Math.max,It=Math.min,Ft=tt([].concat),qt=tt([].push),Vt=tt("".indexOf),Kt=tt("".slice),jt=function(Bt){return Bt===void 0?Bt:String(Bt)},Ut=(function(){return"a".replace(/./,"$0")==="$0"})(),Ot=(function(){return/./[Nt]?/./[Nt]("a","$0")==="":!1})(),Wt=!nt(function(){var Bt=/./;return Bt.exec=function(){var tr=[];return tr.groups={a:"7"},tr},"".replace(Bt,"$<a>")!=="7"});return rt("replace",function(Bt,tr,Jt){var ar=Ot?"$":"$0";return[function(cr,gr){var Sr=St(this),Er=ft(cr)?Ct(cr,Nt):void 0;return Er?_e(Er,cr,Sr,gr):_e(tr,bt(Sr),cr,gr)},function(pr,cr){var gr=st(this),Sr=bt(pr);if(typeof cr=="string"&&Vt(cr,ar)===-1&&Vt(cr,"$<")===-1){var Er=Jt(tr,gr,Sr,cr);if(Er.done)return Er.value}var Vr=dt(cr);Vr||(cr=bt(cr));var Wr=bt(Tt(gr)),Mr=Vt(Wr,"g")!==-1,Nr;Mr&&(Nr=Vt(Wr,"u")!==-1,gr.lastIndex=0);for(var Yr=[],Or;Or=wt(gr,Sr),!(Or===null||(qt(Yr,Or),!Mr));){var Ar=bt(Or[0]);Ar===""&&(gr.lastIndex=Et(Sr,mt(gr.lastIndex),Nr))}for(var Qr="",hn=0,Sn=0;Sn<Yr.length;Sn++){Or=Yr[Sn];for(var Kr=bt(Or[0]),Hn=Pt(It(ht(Or.index),Sr.length),0),ln=[],kn,xn=1;xn<Or.length;xn++)qt(ln,jt(Or[xn]));var An=Or.groups;if(Vr){var rs=Ft([Kr],ln,Hn,Sr);An!==void 0&&qt(rs,An),kn=bt(et(cr,void 0,rs))}else kn=Rt(Kr,Sr,Hn,ln,An,cr);Hn>=hn&&(Qr+=Kt(Sr,hn,Hn)+kn,hn=Hn+Kr.length)}return Qr+Kt(Sr,hn)}]},!Wt||!Ut||Ot),es_string_replace}var es_array_indexOf={},hasRequiredEs_array_indexOf;function requireEs_array_indexOf(){if(hasRequiredEs_array_indexOf)return es_array_indexOf;hasRequiredEs_array_indexOf=1;var et=require_export(),_e=requireFunctionUncurryThisClause(),tt=requireArrayIncludes().indexOf,rt=requireArrayMethodIsStrict(),nt=_e([].indexOf),st=!!nt&&1/nt([1],1,-0)<0,dt=st||!rt("indexOf");return et({target:"Array",proto:!0,forced:dt},{indexOf:function(ht){var mt=arguments.length>1?arguments[1]:void 0;return st?nt(this,ht,mt)||0:tt(this,ht,mt)}}),es_array_indexOf}var es_number_isSafeInteger={},isIntegralNumber,hasRequiredIsIntegralNumber;function requireIsIntegralNumber(){if(hasRequiredIsIntegralNumber)return isIntegralNumber;hasRequiredIsIntegralNumber=1;var et=requireIsObject(),_e=Math.floor;return isIntegralNumber=Number.isInteger||function(rt){return!et(rt)&&isFinite(rt)&&_e(rt)===rt},isIntegralNumber}var hasRequiredEs_number_isSafeInteger;function requireEs_number_isSafeInteger(){if(hasRequiredEs_number_isSafeInteger)return es_number_isSafeInteger;hasRequiredEs_number_isSafeInteger=1;var et=require_export(),_e=requireIsIntegralNumber(),tt=Math.abs;return et({target:"Number",stat:!0},{isSafeInteger:function(nt){return _e(nt)&&tt(nt)<=9007199254740991}}),es_number_isSafeInteger}var es_array_slice={},hasRequiredEs_array_slice;function requireEs_array_slice(){if(hasRequiredEs_array_slice)return es_array_slice;hasRequiredEs_array_slice=1;var et=require_export(),_e=requireIsArray(),tt=requireIsConstructor(),rt=requireIsObject(),nt=requireToAbsoluteIndex(),st=requireLengthOfArrayLike(),dt=requireToIndexedObject(),ft=requireCreateProperty(),ht=requireWellKnownSymbol(),mt=requireArrayMethodHasSpeciesSupport(),bt=requireArraySlice(),St=mt("slice"),Et=ht("species"),Ct=Array,Rt=Math.max;return et({target:"Array",proto:!0,forced:!St},{slice:function(wt,At){var Nt=dt(this),Pt=st(Nt),It=nt(wt,Pt),Ft=nt(At===void 0?Pt:At,Pt),qt,Vt,Kt;if(_e(Nt)&&(qt=Nt.constructor,tt(qt)&&(qt===Ct||_e(qt.prototype))?qt=void 0:rt(qt)&&(qt=qt[Et],qt===null&&(qt=void 0)),qt===Ct||qt===void 0))return bt(Nt,It,Ft);for(Vt=new(qt===void 0?Ct:qt)(Rt(Ft-It,0)),Kt=0;It<Ft;It++,Kt++)It in Nt&&ft(Vt,Kt,Nt[It]);return Vt.length=Kt,Vt}}),es_array_slice}var es_array_fill={},addToUnscopables,hasRequiredAddToUnscopables;function requireAddToUnscopables(){if(hasRequiredAddToUnscopables)return addToUnscopables;hasRequiredAddToUnscopables=1;var et=requireWellKnownSymbol(),_e=requireObjectCreate(),tt=requireObjectDefineProperty().f,rt=et("unscopables"),nt=Array.prototype;return nt[rt]===void 0&&tt(nt,rt,{configurable:!0,value:_e(null)}),addToUnscopables=function(st){nt[rt][st]=!0},addToUnscopables}var hasRequiredEs_array_fill;function requireEs_array_fill(){if(hasRequiredEs_array_fill)return es_array_fill;hasRequiredEs_array_fill=1;var et=require_export(),_e=requireArrayFill(),tt=requireAddToUnscopables();return et({target:"Array",proto:!0},{fill:_e}),tt("fill"),es_array_fill}var iteratorsCore,hasRequiredIteratorsCore;function requireIteratorsCore(){if(hasRequiredIteratorsCore)return iteratorsCore;hasRequiredIteratorsCore=1;var et=requireFails(),_e=requireIsCallable(),tt=requireIsObject(),rt=requireObjectCreate(),nt=requireObjectGetPrototypeOf(),st=requireDefineBuiltIn(),dt=requireWellKnownSymbol(),ft=requireIsPure(),ht=dt("iterator"),mt=!1,bt,St,Et;[].keys&&(Et=[].keys(),"next"in Et?(St=nt(nt(Et)),St!==Object.prototype&&(bt=St)):mt=!0);var Ct=!tt(bt)||et(function(){var Rt={};return bt[ht].call(Rt)!==Rt});return Ct?bt={}:ft&&(bt=rt(bt)),_e(bt[ht])||st(bt,ht,function(){return this}),iteratorsCore={IteratorPrototype:bt,BUGGY_SAFARI_ITERATORS:mt},iteratorsCore}var iteratorCreateConstructor,hasRequiredIteratorCreateConstructor;function requireIteratorCreateConstructor(){if(hasRequiredIteratorCreateConstructor)return iteratorCreateConstructor;hasRequiredIteratorCreateConstructor=1;var et=requireIteratorsCore().IteratorPrototype,_e=requireObjectCreate(),tt=requireCreatePropertyDescriptor(),rt=requireSetToStringTag(),nt=requireIterators(),st=function(){return this};return iteratorCreateConstructor=function(dt,ft,ht,mt){var bt=ft+" Iterator";return dt.prototype=_e(et,{next:tt(+!mt,ht)}),rt(dt,bt,!1,!0),nt[bt]=st,dt},iteratorCreateConstructor}var iteratorDefine,hasRequiredIteratorDefine;function requireIteratorDefine(){if(hasRequiredIteratorDefine)return iteratorDefine;hasRequiredIteratorDefine=1;var et=require_export(),_e=requireFunctionCall(),tt=requireIsPure(),rt=requireFunctionName(),nt=requireIsCallable(),st=requireIteratorCreateConstructor(),dt=requireObjectGetPrototypeOf(),ft=requireObjectSetPrototypeOf(),ht=requireSetToStringTag(),mt=requireCreateNonEnumerableProperty(),bt=requireDefineBuiltIn(),St=requireWellKnownSymbol(),Et=requireIterators(),Ct=requireIteratorsCore(),Rt=rt.PROPER,Tt=rt.CONFIGURABLE,wt=Ct.IteratorPrototype,At=Ct.BUGGY_SAFARI_ITERATORS,Nt=St("iterator"),Pt="keys",It="values",Ft="entries",qt=function(){return this};return iteratorDefine=function(Vt,Kt,jt,Ut,Ot,Wt,Bt){st(jt,Kt,Ut);var tr=function(Mr){if(Mr===Ot&&gr)return gr;if(!At&&Mr&&Mr in pr)return pr[Mr];switch(Mr){case Pt:return function(){return new jt(this,Mr)};case It:return function(){return new jt(this,Mr)};case Ft:return function(){return new jt(this,Mr)}}return function(){return new jt(this)}},Jt=Kt+" Iterator",ar=!1,pr=Vt.prototype,cr=pr[Nt]||pr["@@iterator"]||Ot&&pr[Ot],gr=!At&&cr||tr(Ot),Sr=Kt==="Array"&&pr.entries||cr,Er,Vr,Wr;if(Sr&&(Er=dt(Sr.call(new Vt)),Er!==Object.prototype&&Er.next&&(!tt&&dt(Er)!==wt&&(ft?ft(Er,wt):nt(Er[Nt])||bt(Er,Nt,qt)),ht(Er,Jt,!0,!0),tt&&(Et[Jt]=qt))),Rt&&Ot===It&&cr&&cr.name!==It&&(!tt&&Tt?mt(pr,"name",It):(ar=!0,gr=function(){return _e(cr,this)})),Ot)if(Vr={values:tr(It),keys:Wt?gr:tr(Pt),entries:tr(Ft)},Bt)for(Wr in Vr)(At||ar||!(Wr in pr))&&bt(pr,Wr,Vr[Wr]);else et({target:Kt,proto:!0,forced:At||ar},Vr);return(!tt||Bt)&&pr[Nt]!==gr&&bt(pr,Nt,gr,{name:Ot}),Et[Kt]=gr,Vr},iteratorDefine}var createIterResultObject,hasRequiredCreateIterResultObject;function requireCreateIterResultObject(){return hasRequiredCreateIterResultObject||(hasRequiredCreateIterResultObject=1,createIterResultObject=function(et,_e){return{value:et,done:_e}}),createIterResultObject}var es_array_iterator,hasRequiredEs_array_iterator;function requireEs_array_iterator(){if(hasRequiredEs_array_iterator)return es_array_iterator;hasRequiredEs_array_iterator=1;var et=requireToIndexedObject(),_e=requireAddToUnscopables(),tt=requireIterators(),rt=requireInternalState(),nt=requireObjectDefineProperty().f,st=requireIteratorDefine(),dt=requireCreateIterResultObject(),ft=requireIsPure(),ht=requireDescriptors(),mt="Array Iterator",bt=rt.set,St=rt.getterFor(mt);es_array_iterator=st(Array,"Array",function(Ct,Rt){bt(this,{type:mt,target:et(Ct),index:0,kind:Rt})},function(){var Ct=St(this),Rt=Ct.target,Tt=Ct.index++;if(!Rt||Tt>=Rt.length)return Ct.target=null,dt(void 0,!0);switch(Ct.kind){case"keys":return dt(Tt,!1);case"values":return dt(Rt[Tt],!1)}return dt([Tt,Rt[Tt]],!1)},"values");var Et=tt.Arguments=tt.Array;if(_e("keys"),_e("values"),_e("entries"),!ft&&ht&&Et.name!=="values")try{nt(Et,"name",{value:"values"})}catch{}return es_array_iterator}var es_typedArray_uint8Array={},typedArrayConstructor={exports:{}},arrayBufferViewCore,hasRequiredArrayBufferViewCore;function requireArrayBufferViewCore(){if(hasRequiredArrayBufferViewCore)return arrayBufferViewCore;hasRequiredArrayBufferViewCore=1;var et=requireArrayBufferBasicDetection(),_e=requireDescriptors(),tt=requireGlobalThis(),rt=requireIsCallable(),nt=requireIsObject(),st=requireHasOwnProperty(),dt=requireClassof(),ft=requireTryToString(),ht=requireCreateNonEnumerableProperty(),mt=requireDefineBuiltIn(),bt=requireDefineBuiltInAccessor(),St=requireObjectIsPrototypeOf(),Et=requireObjectGetPrototypeOf(),Ct=requireObjectSetPrototypeOf(),Rt=requireWellKnownSymbol(),Tt=requireUid(),wt=requireInternalState(),At=wt.enforce,Nt=wt.get,Pt=tt.Int8Array,It=Pt&&Pt.prototype,Ft=tt.Uint8ClampedArray,qt=Ft&&Ft.prototype,Vt=Pt&&Et(Pt),Kt=It&&Et(It),jt=Object.prototype,Ut=tt.TypeError,Ot=Rt("toStringTag"),Wt=Tt("TYPED_ARRAY_TAG"),Bt="TypedArrayConstructor",tr=et&&!!Ct&&dt(tt.opera)!=="Opera",Jt=!1,ar,pr,cr,gr={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Sr={BigInt64Array:8,BigUint64Array:8},Er=function(Qr){if(!nt(Qr))return!1;var hn=dt(Qr);return hn==="DataView"||st(gr,hn)||st(Sr,hn)},Vr=function(Ar){var Qr=Et(Ar);if(nt(Qr)){var hn=Nt(Qr);return hn&&st(hn,Bt)?hn[Bt]:Vr(Qr)}},Wr=function(Ar){if(!nt(Ar))return!1;var Qr=dt(Ar);return st(gr,Qr)||st(Sr,Qr)},Mr=function(Ar){if(Wr(Ar))return Ar;throw new Ut("Target is not a typed array")},Nr=function(Ar){if(rt(Ar)&&(!Ct||St(Vt,Ar)))return Ar;throw new Ut(ft(Ar)+" is not a typed array constructor")},Yr=function(Ar,Qr,hn,Sn){if(_e){if(hn)for(var Kr in gr){var Hn=tt[Kr];if(Hn&&st(Hn.prototype,Ar))try{delete Hn.prototype[Ar]}catch{try{Hn.prototype[Ar]=Qr}catch{}}}(!Kt[Ar]||hn)&&mt(Kt,Ar,hn?Qr:tr&&It[Ar]||Qr,Sn)}},Or=function(Ar,Qr,hn){var Sn,Kr;if(_e){if(Ct){if(hn){for(Sn in gr)if(Kr=tt[Sn],Kr&&st(Kr,Ar))try{delete Kr[Ar]}catch{}}if(!Vt[Ar]||hn)try{return mt(Vt,Ar,hn?Qr:tr&&Vt[Ar]||Qr)}catch{}else return}for(Sn in gr)Kr=tt[Sn],Kr&&(!Kr[Ar]||hn)&&mt(Kr,Ar,Qr)}};for(ar in gr)pr=tt[ar],cr=pr&&pr.prototype,cr?At(cr)[Bt]=pr:tr=!1;for(ar in Sr)pr=tt[ar],cr=pr&&pr.prototype,cr&&(At(cr)[Bt]=pr);if((!tr||!rt(Vt)||Vt===Function.prototype)&&(Vt=function(){throw new Ut("Incorrect invocation")},tr))for(ar in gr)tt[ar]&&Ct(tt[ar],Vt);if((!tr||!Kt||Kt===jt)&&(Kt=Vt.prototype,tr))for(ar in gr)tt[ar]&&Ct(tt[ar].prototype,Kt);if(tr&&Et(qt)!==Kt&&Ct(qt,Kt),_e&&!st(Kt,Ot)){Jt=!0,bt(Kt,Ot,{configurable:!0,get:function(){return nt(this)?this[Wt]:void 0}});for(ar in gr)tt[ar]&&ht(tt[ar],Wt,ar)}return arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:tr,TYPED_ARRAY_TAG:Jt&&Wt,aTypedArray:Mr,aTypedArrayConstructor:Nr,exportTypedArrayMethod:Yr,exportTypedArrayStaticMethod:Or,getTypedArrayConstructor:Vr,isView:Er,isTypedArray:Wr,TypedArray:Vt,TypedArrayPrototype:Kt},arrayBufferViewCore}var typedArrayConstructorsRequireWrappers,hasRequiredTypedArrayConstructorsRequireWrappers;function requireTypedArrayConstructorsRequireWrappers(){if(hasRequiredTypedArrayConstructorsRequireWrappers)return typedArrayConstructorsRequireWrappers;hasRequiredTypedArrayConstructorsRequireWrappers=1;var et=requireGlobalThis(),_e=requireFails(),tt=requireCheckCorrectnessOfIteration(),rt=requireArrayBufferViewCore().NATIVE_ARRAY_BUFFER_VIEWS,nt=et.ArrayBuffer,st=et.Int8Array;return typedArrayConstructorsRequireWrappers=!rt||!_e(function(){st(1)})||!_e(function(){new st(-1)})||!tt(function(dt){new st,new st(null),new st(1.5),new st(dt)},!0)||_e(function(){return new st(new nt(2),1,void 0).length!==1}),typedArrayConstructorsRequireWrappers}var toPositiveInteger,hasRequiredToPositiveInteger;function requireToPositiveInteger(){if(hasRequiredToPositiveInteger)return toPositiveInteger;hasRequiredToPositiveInteger=1;var et=requireToIntegerOrInfinity(),_e=RangeError;return toPositiveInteger=function(tt){var rt=et(tt);if(rt<0)throw new _e("The argument can't be less than 0");return rt},toPositiveInteger}var toOffset,hasRequiredToOffset;function requireToOffset(){if(hasRequiredToOffset)return toOffset;hasRequiredToOffset=1;var et=requireToPositiveInteger(),_e=RangeError;return toOffset=function(tt,rt){var nt=et(tt);if(nt%rt)throw new _e("Wrong offset");return nt},toOffset}var toUint8Clamped,hasRequiredToUint8Clamped;function requireToUint8Clamped(){if(hasRequiredToUint8Clamped)return toUint8Clamped;hasRequiredToUint8Clamped=1;var et=Math.round;return toUint8Clamped=function(_e){var tt=et(_e);return tt<0?0:tt>255?255:tt&255},toUint8Clamped}var isBigIntArray,hasRequiredIsBigIntArray;function requireIsBigIntArray(){if(hasRequiredIsBigIntArray)return isBigIntArray;hasRequiredIsBigIntArray=1;var et=requireClassof();return isBigIntArray=function(_e){var tt=et(_e);return tt==="BigInt64Array"||tt==="BigUint64Array"},isBigIntArray}var toBigInt,hasRequiredToBigInt;function requireToBigInt(){if(hasRequiredToBigInt)return toBigInt;hasRequiredToBigInt=1;var et=requireToPrimitive$1(),_e=TypeError;return toBigInt=function(tt){var rt=et(tt,"number");if(typeof rt=="number")throw new _e("Can't convert number to bigint");return BigInt(rt)},toBigInt}var typedArrayFrom,hasRequiredTypedArrayFrom;function requireTypedArrayFrom(){if(hasRequiredTypedArrayFrom)return typedArrayFrom;hasRequiredTypedArrayFrom=1;var et=requireFunctionBindContext(),_e=requireFunctionCall(),tt=requireAConstructor(),rt=requireToObject(),nt=requireLengthOfArrayLike(),st=requireGetIterator(),dt=requireGetIteratorMethod(),ft=requireIsArrayIteratorMethod(),ht=requireIsBigIntArray(),mt=requireArrayBufferViewCore().aTypedArrayConstructor,bt=requireToBigInt();return typedArrayFrom=function(Et){var Ct=tt(this),Rt=rt(Et),Tt=arguments.length,wt=Tt>1?arguments[1]:void 0,At=wt!==void 0,Nt=dt(Rt),Pt,It,Ft,qt,Vt,Kt,jt,Ut;if(Nt&&!ft(Nt))for(jt=st(Rt,Nt),Ut=jt.next,Rt=[];!(Kt=_e(Ut,jt)).done;)Rt.push(Kt.value);for(At&&Tt>2&&(wt=et(wt,arguments[2])),It=nt(Rt),Ft=new(mt(Ct))(It),qt=ht(Ft),Pt=0;It>Pt;Pt++)Vt=At?wt(Rt[Pt],Pt):Rt[Pt],Ft[Pt]=qt?bt(Vt):+Vt;return Ft},typedArrayFrom}var arrayFromConstructorAndList,hasRequiredArrayFromConstructorAndList;function requireArrayFromConstructorAndList(){if(hasRequiredArrayFromConstructorAndList)return arrayFromConstructorAndList;hasRequiredArrayFromConstructorAndList=1;var et=requireLengthOfArrayLike();return arrayFromConstructorAndList=function(_e,tt,rt){for(var nt=0,st=arguments.length>2?rt:et(tt),dt=new _e(st);st>nt;)dt[nt]=tt[nt++];return dt},arrayFromConstructorAndList}var hasRequiredTypedArrayConstructor;function requireTypedArrayConstructor(){if(hasRequiredTypedArrayConstructor)return typedArrayConstructor.exports;hasRequiredTypedArrayConstructor=1;var et=require_export(),_e=requireGlobalThis(),tt=requireFunctionCall(),rt=requireDescriptors(),nt=requireTypedArrayConstructorsRequireWrappers(),st=requireArrayBufferViewCore(),dt=requireArrayBuffer(),ft=requireAnInstance(),ht=requireCreatePropertyDescriptor(),mt=requireCreateNonEnumerableProperty(),bt=requireIsIntegralNumber(),St=requireToLength(),Et=requireToIndex(),Ct=requireToOffset(),Rt=requireToUint8Clamped(),Tt=requireToPropertyKey$1(),wt=requireHasOwnProperty(),At=requireClassof(),Nt=requireIsObject(),Pt=requireIsSymbol(),It=requireObjectCreate(),Ft=requireObjectIsPrototypeOf(),qt=requireObjectSetPrototypeOf(),Vt=requireObjectGetOwnPropertyNames().f,Kt=requireTypedArrayFrom(),jt=requireArrayIteration().forEach,Ut=requireSetSpecies(),Ot=requireDefineBuiltInAccessor(),Wt=requireObjectDefineProperty(),Bt=requireObjectGetOwnPropertyDescriptor(),tr=requireArrayFromConstructorAndList(),Jt=requireInternalState(),ar=requireInheritIfRequired(),pr=Jt.get,cr=Jt.set,gr=Jt.enforce,Sr=Wt.f,Er=Bt.f,Vr=_e.RangeError,Wr=dt.ArrayBuffer,Mr=Wr.prototype,Nr=dt.DataView,Yr=st.NATIVE_ARRAY_BUFFER_VIEWS,Or=st.TYPED_ARRAY_TAG,Ar=st.TypedArray,Qr=st.TypedArrayPrototype,hn=st.isTypedArray,Sn="BYTES_PER_ELEMENT",Kr="Wrong length",Hn=function(rs,qs){Ot(rs,qs,{configurable:!0,get:function(){return pr(this)[qs]}})},ln=function(rs){var qs;return Ft(Mr,rs)||(qs=At(rs))==="ArrayBuffer"||qs==="SharedArrayBuffer"},kn=function(rs,qs){return hn(rs)&&!Pt(qs)&&qs in rs&&bt(+qs)&&qs>=0},xn=function(qs,Ln){return Ln=Tt(Ln),kn(qs,Ln)?ht(2,qs[Ln]):Er(qs,Ln)},An=function(qs,Ln,Cn){return Ln=Tt(Ln),kn(qs,Ln)&&Nt(Cn)&&wt(Cn,"value")&&!wt(Cn,"get")&&!wt(Cn,"set")&&!Cn.configurable&&(!wt(Cn,"writable")||Cn.writable)&&(!wt(Cn,"enumerable")||Cn.enumerable)?(qs[Ln]=Cn.value,qs):Sr(qs,Ln,Cn)};return rt?(Yr||(Bt.f=xn,Wt.f=An,Hn(Qr,"buffer"),Hn(Qr,"byteOffset"),Hn(Qr,"byteLength"),Hn(Qr,"length")),et({target:"Object",stat:!0,forced:!Yr},{getOwnPropertyDescriptor:xn,defineProperty:An}),typedArrayConstructor.exports=function(rs,qs,Ln){var Cn=rs.match(/\d+/)[0]/8,Nn=rs+(Ln?"Clamped":"")+"Array",Gr="get"+rs,tn="set"+rs,dn=_e[Nn],Rn=dn,wn=Rn&&Rn.prototype,Un={},Zn=function(_a,Vn){var bs=pr(_a);return bs.view[Gr](Vn*Cn+bs.byteOffset,!0)},pn=function(_a,Vn,bs){var Is=pr(_a);Is.view[tn](Vn*Cn+Is.byteOffset,Ln?Rt(bs):bs,!0)},Dn=function(_a,Vn){Sr(_a,Vn,{get:function(){return Zn(this,Vn)},set:function(bs){return pn(this,Vn,bs)},enumerable:!0})};Yr?nt&&(Rn=qs(function(_a,Vn,bs,Is){return ft(_a,wn),ar((function(){return Nt(Vn)?ln(Vn)?Is!==void 0?new dn(Vn,Ct(bs,Cn),Is):bs!==void 0?new dn(Vn,Ct(bs,Cn)):new dn(Vn):hn(Vn)?tr(Rn,Vn):tt(Kt,Rn,Vn):new dn(Et(Vn))})(),_a,Rn)}),qt&&qt(Rn,Ar),jt(Vt(dn),function(_a){_a in Rn||mt(Rn,_a,dn[_a])}),Rn.prototype=wn):(Rn=qs(function(_a,Vn,bs,Is){ft(_a,wn);var uo=0,Rs=0,io,vo,Bo;if(!Nt(Vn))Bo=Et(Vn),vo=Bo*Cn,io=new Wr(vo);else if(ln(Vn)){io=Vn,Rs=Ct(bs,Cn);var En=Vn.byteLength;if(Is===void 0){if(En%Cn)throw new Vr(Kr);if(vo=En-Rs,vo<0)throw new Vr(Kr)}else if(vo=St(Is)*Cn,vo+Rs>En)throw new Vr(Kr);Bo=vo/Cn}else return hn(Vn)?tr(Rn,Vn):tt(Kt,Rn,Vn);for(cr(_a,{buffer:io,byteOffset:Rs,byteLength:vo,length:Bo,view:new Nr(io)});uo<Bo;)Dn(_a,uo++)}),qt&&qt(Rn,Ar),wn=Rn.prototype=It(Qr)),wn.constructor!==Rn&&mt(wn,"constructor",Rn),gr(wn).TypedArrayConstructor=Rn,Or&&mt(wn,Or,Nn);var qn=Rn!==dn;Un[Nn]=Rn,et({global:!0,constructor:!0,forced:qn,sham:!Yr},Un),Sn in Rn||mt(Rn,Sn,Cn),Sn in wn||mt(wn,Sn,Cn),Ut(Nn)}):typedArrayConstructor.exports=function(){},typedArrayConstructor.exports}var hasRequiredEs_typedArray_uint8Array;function requireEs_typedArray_uint8Array(){if(hasRequiredEs_typedArray_uint8Array)return es_typedArray_uint8Array;hasRequiredEs_typedArray_uint8Array=1;var et=requireTypedArrayConstructor();return et("Uint8",function(_e){return function(rt,nt,st){return _e(this,rt,nt,st)}}),es_typedArray_uint8Array}var es_typedArray_copyWithin={},arrayCopyWithin,hasRequiredArrayCopyWithin;function requireArrayCopyWithin(){if(hasRequiredArrayCopyWithin)return arrayCopyWithin;hasRequiredArrayCopyWithin=1;var et=requireToObject(),_e=requireToAbsoluteIndex(),tt=requireLengthOfArrayLike(),rt=requireDeletePropertyOrThrow(),nt=Math.min;return arrayCopyWithin=[].copyWithin||function(dt,ft){var ht=et(this),mt=tt(ht),bt=_e(dt,mt),St=_e(ft,mt),Et=arguments.length>2?arguments[2]:void 0,Ct=nt((Et===void 0?mt:_e(Et,mt))-St,mt-bt),Rt=1;for(St<bt&&bt<St+Ct&&(Rt=-1,St+=Ct-1,bt+=Ct-1);Ct-- >0;)St in ht?ht[bt]=ht[St]:rt(ht,bt),bt+=Rt,St+=Rt;return ht},arrayCopyWithin}var hasRequiredEs_typedArray_copyWithin;function requireEs_typedArray_copyWithin(){if(hasRequiredEs_typedArray_copyWithin)return es_typedArray_copyWithin;hasRequiredEs_typedArray_copyWithin=1;var et=requireFunctionUncurryThis(),_e=requireArrayBufferViewCore(),tt=requireArrayCopyWithin(),rt=et(tt),nt=_e.aTypedArray,st=_e.exportTypedArrayMethod;return st("copyWithin",function(ft,ht){return rt(nt(this),ft,ht,arguments.length>2?arguments[2]:void 0)}),es_typedArray_copyWithin}var es_typedArray_every={},hasRequiredEs_typedArray_every;function requireEs_typedArray_every(){if(hasRequiredEs_typedArray_every)return es_typedArray_every;hasRequiredEs_typedArray_every=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().every,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("every",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_every}var es_typedArray_fill={},hasRequiredEs_typedArray_fill;function requireEs_typedArray_fill(){if(hasRequiredEs_typedArray_fill)return es_typedArray_fill;hasRequiredEs_typedArray_fill=1;var et=requireArrayBufferViewCore(),_e=requireArrayFill(),tt=requireToBigInt(),rt=requireClassof(),nt=requireFunctionCall(),st=requireFunctionUncurryThis(),dt=requireFails(),ft=et.aTypedArray,ht=et.exportTypedArrayMethod,mt=st("".slice),bt=dt(function(){var St=0;return new Int8Array(2).fill({valueOf:function(){return St++}}),St!==1});return ht("fill",function(Et){var Ct=arguments.length;ft(this);var Rt=mt(rt(this),0,3)==="Big"?tt(Et):+Et;return nt(_e,this,Rt,Ct>1?arguments[1]:void 0,Ct>2?arguments[2]:void 0)},bt),es_typedArray_fill}var es_typedArray_filter={},typedArrayFromSameTypeAndList,hasRequiredTypedArrayFromSameTypeAndList;function requireTypedArrayFromSameTypeAndList(){if(hasRequiredTypedArrayFromSameTypeAndList)return typedArrayFromSameTypeAndList;hasRequiredTypedArrayFromSameTypeAndList=1;var et=requireArrayFromConstructorAndList(),_e=requireArrayBufferViewCore().getTypedArrayConstructor;return typedArrayFromSameTypeAndList=function(tt,rt){return et(_e(tt),rt)},typedArrayFromSameTypeAndList}var hasRequiredEs_typedArray_filter;function requireEs_typedArray_filter(){if(hasRequiredEs_typedArray_filter)return es_typedArray_filter;hasRequiredEs_typedArray_filter=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().filter,tt=requireTypedArrayFromSameTypeAndList(),rt=et.aTypedArray,nt=et.exportTypedArrayMethod;return nt("filter",function(dt){var ft=_e(rt(this),dt,arguments.length>1?arguments[1]:void 0);return tt(this,ft)}),es_typedArray_filter}var es_typedArray_find={},hasRequiredEs_typedArray_find;function requireEs_typedArray_find(){if(hasRequiredEs_typedArray_find)return es_typedArray_find;hasRequiredEs_typedArray_find=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().find,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("find",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_find}var es_typedArray_findIndex={},hasRequiredEs_typedArray_findIndex;function requireEs_typedArray_findIndex(){if(hasRequiredEs_typedArray_findIndex)return es_typedArray_findIndex;hasRequiredEs_typedArray_findIndex=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().findIndex,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("findIndex",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_findIndex}var es_typedArray_forEach={},hasRequiredEs_typedArray_forEach;function requireEs_typedArray_forEach(){if(hasRequiredEs_typedArray_forEach)return es_typedArray_forEach;hasRequiredEs_typedArray_forEach=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().forEach,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("forEach",function(st){_e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_forEach}var es_typedArray_includes={},hasRequiredEs_typedArray_includes;function requireEs_typedArray_includes(){if(hasRequiredEs_typedArray_includes)return es_typedArray_includes;hasRequiredEs_typedArray_includes=1;var et=requireArrayBufferViewCore(),_e=requireArrayIncludes().includes,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("includes",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_includes}var es_typedArray_indexOf={},hasRequiredEs_typedArray_indexOf;function requireEs_typedArray_indexOf(){if(hasRequiredEs_typedArray_indexOf)return es_typedArray_indexOf;hasRequiredEs_typedArray_indexOf=1;var et=requireArrayBufferViewCore(),_e=requireArrayIncludes().indexOf,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("indexOf",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_indexOf}var es_typedArray_iterator={},hasRequiredEs_typedArray_iterator;function requireEs_typedArray_iterator(){if(hasRequiredEs_typedArray_iterator)return es_typedArray_iterator;hasRequiredEs_typedArray_iterator=1;var et=requireGlobalThis(),_e=requireFails(),tt=requireFunctionUncurryThis(),rt=requireArrayBufferViewCore(),nt=requireEs_array_iterator(),st=requireWellKnownSymbol(),dt=st("iterator"),ft=et.Uint8Array,ht=tt(nt.values),mt=tt(nt.keys),bt=tt(nt.entries),St=rt.aTypedArray,Et=rt.exportTypedArrayMethod,Ct=ft&&ft.prototype,Rt=!_e(function(){Ct[dt].call([1])}),Tt=!!Ct&&Ct.values&&Ct[dt]===Ct.values&&Ct.values.name==="values",wt=function(){return ht(St(this))};return Et("entries",function(){return bt(St(this))},Rt),Et("keys",function(){return mt(St(this))},Rt),Et("values",wt,Rt||!Tt,{name:"values"}),Et(dt,wt,Rt||!Tt,{name:"values"}),es_typedArray_iterator}var es_typedArray_join={},hasRequiredEs_typedArray_join;function requireEs_typedArray_join(){if(hasRequiredEs_typedArray_join)return es_typedArray_join;hasRequiredEs_typedArray_join=1;var et=requireArrayBufferViewCore(),_e=requireFunctionUncurryThis(),tt=et.aTypedArray,rt=et.exportTypedArrayMethod,nt=_e([].join);return rt("join",function(dt){return nt(tt(this),dt)}),es_typedArray_join}var es_typedArray_lastIndexOf={},arrayLastIndexOf,hasRequiredArrayLastIndexOf;function requireArrayLastIndexOf(){if(hasRequiredArrayLastIndexOf)return arrayLastIndexOf;hasRequiredArrayLastIndexOf=1;var et=requireFunctionApply(),_e=requireToIndexedObject(),tt=requireToIntegerOrInfinity(),rt=requireLengthOfArrayLike(),nt=requireArrayMethodIsStrict(),st=Math.min,dt=[].lastIndexOf,ft=!!dt&&1/[1].lastIndexOf(1,-0)<0,ht=nt("lastIndexOf"),mt=ft||!ht;return arrayLastIndexOf=mt?function(St){if(ft)return et(dt,this,arguments)||0;var Et=_e(this),Ct=rt(Et);if(Ct===0)return-1;var Rt=Ct-1;for(arguments.length>1&&(Rt=st(Rt,tt(arguments[1]))),Rt<0&&(Rt=Ct+Rt);Rt>=0;Rt--)if(Rt in Et&&Et[Rt]===St)return Rt||0;return-1}:dt,arrayLastIndexOf}var hasRequiredEs_typedArray_lastIndexOf;function requireEs_typedArray_lastIndexOf(){if(hasRequiredEs_typedArray_lastIndexOf)return es_typedArray_lastIndexOf;hasRequiredEs_typedArray_lastIndexOf=1;var et=requireArrayBufferViewCore(),_e=requireFunctionApply(),tt=requireArrayLastIndexOf(),rt=et.aTypedArray,nt=et.exportTypedArrayMethod;return nt("lastIndexOf",function(dt){var ft=arguments.length;return _e(tt,rt(this),ft>1?[dt,arguments[1]]:[dt])}),es_typedArray_lastIndexOf}var es_typedArray_map={},hasRequiredEs_typedArray_map;function requireEs_typedArray_map(){if(hasRequiredEs_typedArray_map)return es_typedArray_map;hasRequiredEs_typedArray_map=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().map,tt=et.aTypedArray,rt=et.getTypedArrayConstructor,nt=et.exportTypedArrayMethod;return nt("map",function(dt){return _e(tt(this),dt,arguments.length>1?arguments[1]:void 0,function(ft,ht){return new(rt(ft))(ht)})}),es_typedArray_map}var es_typedArray_reduce={},arrayReduce,hasRequiredArrayReduce;function requireArrayReduce(){if(hasRequiredArrayReduce)return arrayReduce;hasRequiredArrayReduce=1;var et=requireACallable(),_e=requireToObject(),tt=requireIndexedObject(),rt=requireLengthOfArrayLike(),nt=TypeError,st="Reduce of empty array with no initial value",dt=function(ft){return function(ht,mt,bt,St){var Et=_e(ht),Ct=tt(Et),Rt=rt(Et);if(et(mt),Rt===0&&bt<2)throw new nt(st);var Tt=ft?Rt-1:0,wt=ft?-1:1;if(bt<2)for(;;){if(Tt in Ct){St=Ct[Tt],Tt+=wt;break}if(Tt+=wt,ft?Tt<0:Rt<=Tt)throw new nt(st)}for(;ft?Tt>=0:Rt>Tt;Tt+=wt)Tt in Ct&&(St=mt(St,Ct[Tt],Tt,Et));return St}};return arrayReduce={left:dt(!1),right:dt(!0)},arrayReduce}var hasRequiredEs_typedArray_reduce;function requireEs_typedArray_reduce(){if(hasRequiredEs_typedArray_reduce)return es_typedArray_reduce;hasRequiredEs_typedArray_reduce=1;var et=requireArrayBufferViewCore(),_e=requireArrayReduce().left,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("reduce",function(st){var dt=arguments.length;return _e(tt(this),st,dt,dt>1?arguments[1]:void 0)}),es_typedArray_reduce}var es_typedArray_reduceRight={},hasRequiredEs_typedArray_reduceRight;function requireEs_typedArray_reduceRight(){if(hasRequiredEs_typedArray_reduceRight)return es_typedArray_reduceRight;hasRequiredEs_typedArray_reduceRight=1;var et=requireArrayBufferViewCore(),_e=requireArrayReduce().right,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("reduceRight",function(st){var dt=arguments.length;return _e(tt(this),st,dt,dt>1?arguments[1]:void 0)}),es_typedArray_reduceRight}var es_typedArray_reverse={},hasRequiredEs_typedArray_reverse;function requireEs_typedArray_reverse(){if(hasRequiredEs_typedArray_reverse)return es_typedArray_reverse;hasRequiredEs_typedArray_reverse=1;var et=requireArrayBufferViewCore(),_e=et.aTypedArray,tt=et.exportTypedArrayMethod,rt=Math.floor;return tt("reverse",function(){for(var st=this,dt=_e(st).length,ft=rt(dt/2),ht=0,mt;ht<ft;)mt=st[ht],st[ht++]=st[--dt],st[dt]=mt;return st}),es_typedArray_reverse}var es_typedArray_set={},hasRequiredEs_typedArray_set;function requireEs_typedArray_set(){if(hasRequiredEs_typedArray_set)return es_typedArray_set;hasRequiredEs_typedArray_set=1;var et=requireGlobalThis(),_e=requireFunctionCall(),tt=requireArrayBufferViewCore(),rt=requireLengthOfArrayLike(),nt=requireToOffset(),st=requireToObject(),dt=requireFails(),ft=et.RangeError,ht=et.Int8Array,mt=ht&&ht.prototype,bt=mt&&mt.set,St=tt.aTypedArray,Et=tt.exportTypedArrayMethod,Ct=!dt(function(){var Tt=new Uint8ClampedArray(2);return _e(bt,Tt,{length:1,0:3},1),Tt[1]!==3}),Rt=Ct&&tt.NATIVE_ARRAY_BUFFER_VIEWS&&dt(function(){var Tt=new ht(2);return Tt.set(1),Tt.set("2",1),Tt[0]!==0||Tt[1]!==2});return Et("set",function(wt){St(this);var At=nt(arguments.length>1?arguments[1]:void 0,1),Nt=st(wt);if(Ct)return _e(bt,this,Nt,At);var Pt=this.length,It=rt(Nt),Ft=0;if(It+At>Pt)throw new ft("Wrong length");for(;Ft<It;)this[At+Ft]=Nt[Ft++]},!Ct||Rt),es_typedArray_set}var es_typedArray_slice={},hasRequiredEs_typedArray_slice;function requireEs_typedArray_slice(){if(hasRequiredEs_typedArray_slice)return es_typedArray_slice;hasRequiredEs_typedArray_slice=1;var et=requireArrayBufferViewCore(),_e=requireFails(),tt=requireArraySlice(),rt=et.aTypedArray,nt=et.getTypedArrayConstructor,st=et.exportTypedArrayMethod,dt=_e(function(){new Int8Array(1).slice()});return st("slice",function(ht,mt){for(var bt=tt(rt(this),ht,mt),St=nt(this),Et=0,Ct=bt.length,Rt=new St(Ct);Ct>Et;)Rt[Et]=bt[Et++];return Rt},dt),es_typedArray_slice}var es_typedArray_some={},hasRequiredEs_typedArray_some;function requireEs_typedArray_some(){if(hasRequiredEs_typedArray_some)return es_typedArray_some;hasRequiredEs_typedArray_some=1;var et=requireArrayBufferViewCore(),_e=requireArrayIteration().some,tt=et.aTypedArray,rt=et.exportTypedArrayMethod;return rt("some",function(st){return _e(tt(this),st,arguments.length>1?arguments[1]:void 0)}),es_typedArray_some}var es_typedArray_sort={},arraySort,hasRequiredArraySort;function requireArraySort(){if(hasRequiredArraySort)return arraySort;hasRequiredArraySort=1;var et=requireArraySlice(),_e=Math.floor,tt=function(rt,nt){var st=rt.length;if(st<8)for(var dt=1,ft,ht;dt<st;){for(ht=dt,ft=rt[dt];ht&&nt(rt[ht-1],ft)>0;)rt[ht]=rt[--ht];ht!==dt++&&(rt[ht]=ft)}else for(var mt=_e(st/2),bt=tt(et(rt,0,mt),nt),St=tt(et(rt,mt),nt),Et=bt.length,Ct=St.length,Rt=0,Tt=0;Rt<Et||Tt<Ct;)rt[Rt+Tt]=Rt<Et&&Tt<Ct?nt(bt[Rt],St[Tt])<=0?bt[Rt++]:St[Tt++]:Rt<Et?bt[Rt++]:St[Tt++];return rt};return arraySort=tt,arraySort}var environmentFfVersion,hasRequiredEnvironmentFfVersion;function requireEnvironmentFfVersion(){if(hasRequiredEnvironmentFfVersion)return environmentFfVersion;hasRequiredEnvironmentFfVersion=1;var et=requireEnvironmentUserAgent(),_e=et.match(/firefox\/(\d+)/i);return environmentFfVersion=!!_e&&+_e[1],environmentFfVersion}var environmentIsIeOrEdge,hasRequiredEnvironmentIsIeOrEdge;function requireEnvironmentIsIeOrEdge(){if(hasRequiredEnvironmentIsIeOrEdge)return environmentIsIeOrEdge;hasRequiredEnvironmentIsIeOrEdge=1;var et=requireEnvironmentUserAgent();return environmentIsIeOrEdge=/MSIE|Trident/.test(et),environmentIsIeOrEdge}var environmentWebkitVersion,hasRequiredEnvironmentWebkitVersion;function requireEnvironmentWebkitVersion(){if(hasRequiredEnvironmentWebkitVersion)return environmentWebkitVersion;hasRequiredEnvironmentWebkitVersion=1;var et=requireEnvironmentUserAgent(),_e=et.match(/AppleWebKit\/(\d+)\./);return environmentWebkitVersion=!!_e&&+_e[1],environmentWebkitVersion}var hasRequiredEs_typedArray_sort;function requireEs_typedArray_sort(){if(hasRequiredEs_typedArray_sort)return es_typedArray_sort;hasRequiredEs_typedArray_sort=1;var et=requireGlobalThis(),_e=requireFunctionUncurryThisClause(),tt=requireFails(),rt=requireACallable(),nt=requireArraySort(),st=requireArrayBufferViewCore(),dt=requireEnvironmentFfVersion(),ft=requireEnvironmentIsIeOrEdge(),ht=requireEnvironmentV8Version(),mt=requireEnvironmentWebkitVersion(),bt=st.aTypedArray,St=st.exportTypedArrayMethod,Et=et.Uint16Array,Ct=Et&&_e(Et.prototype.sort),Rt=!!Ct&&!(tt(function(){Ct(new Et(2),null)})&&tt(function(){Ct(new Et(2),{})})),Tt=!!Ct&&!tt(function(){if(ht)return ht<74;if(dt)return dt<67;if(ft)return!0;if(mt)return mt<602;var At=new Et(516),Nt=Array(516),Pt,It;for(Pt=0;Pt<516;Pt++)It=Pt%4,At[Pt]=515-Pt,Nt[Pt]=Pt-2*It+3;for(Ct(At,function(Ft,qt){return(Ft/4|0)-(qt/4|0)}),Pt=0;Pt<516;Pt++)if(At[Pt]!==Nt[Pt])return!0}),wt=function(At){return function(Nt,Pt){return At!==void 0?+At(Nt,Pt)||0:Pt!==Pt?-1:Nt!==Nt?1:Nt===0&&Pt===0?1/Nt>0&&1/Pt<0?1:-1:Nt>Pt}};return St("sort",function(Nt){return Nt!==void 0&&rt(Nt),Tt?Ct(this,Nt):nt(bt(this),wt(Nt))},!Tt||Rt),es_typedArray_sort}var es_typedArray_subarray={},hasRequiredEs_typedArray_subarray;function requireEs_typedArray_subarray(){if(hasRequiredEs_typedArray_subarray)return es_typedArray_subarray;hasRequiredEs_typedArray_subarray=1;var et=requireArrayBufferViewCore(),_e=requireToLength(),tt=requireToAbsoluteIndex(),rt=et.aTypedArray,nt=et.getTypedArrayConstructor,st=et.exportTypedArrayMethod;return st("subarray",function(ft,ht){var mt=rt(this),bt=mt.length,St=tt(ft,bt),Et=nt(mt);return new Et(mt.buffer,mt.byteOffset+St*mt.BYTES_PER_ELEMENT,_e((ht===void 0?bt:tt(ht,bt))-St))}),es_typedArray_subarray}var es_typedArray_toLocaleString={},hasRequiredEs_typedArray_toLocaleString;function requireEs_typedArray_toLocaleString(){if(hasRequiredEs_typedArray_toLocaleString)return es_typedArray_toLocaleString;hasRequiredEs_typedArray_toLocaleString=1;var et=requireGlobalThis(),_e=requireFunctionApply(),tt=requireArrayBufferViewCore(),rt=requireFails(),nt=requireArraySlice(),st=et.Int8Array,dt=tt.aTypedArray,ft=tt.exportTypedArrayMethod,ht=[].toLocaleString,mt=!!st&&rt(function(){ht.call(new st(1))}),bt=rt(function(){return[1,2].toLocaleString()!==new st([1,2]).toLocaleString()})||!rt(function(){st.prototype.toLocaleString.call([1,2])});return ft("toLocaleString",function(){return _e(ht,mt?nt(dt(this)):dt(this),nt(arguments))},bt),es_typedArray_toLocaleString}var es_typedArray_toString={},hasRequiredEs_typedArray_toString;function requireEs_typedArray_toString(){if(hasRequiredEs_typedArray_toString)return es_typedArray_toString;hasRequiredEs_typedArray_toString=1;var et=requireArrayBufferViewCore().exportTypedArrayMethod,_e=requireFails(),tt=requireGlobalThis(),rt=requireFunctionUncurryThis(),nt=tt.Uint8Array,st=nt&&nt.prototype||{},dt=[].toString,ft=rt([].join);_e(function(){dt.call({})})&&(dt=function(){return ft(this)});var ht=st.toString!==dt;return et("toString",dt,ht),es_typedArray_toString}var es_object_keys={},hasRequiredEs_object_keys;function requireEs_object_keys(){if(hasRequiredEs_object_keys)return es_object_keys;hasRequiredEs_object_keys=1;var et=require_export(),_e=requireToObject(),tt=requireObjectKeys(),rt=requireFails(),nt=rt(function(){tt(1)});return et({target:"Object",stat:!0,forced:nt},{keys:function(dt){return tt(_e(dt))}}),es_object_keys}var web_domCollections_iterator={},hasRequiredWeb_domCollections_iterator;function requireWeb_domCollections_iterator(){if(hasRequiredWeb_domCollections_iterator)return web_domCollections_iterator;hasRequiredWeb_domCollections_iterator=1;var et=requireGlobalThis(),_e=requireDomIterables(),tt=requireDomTokenListPrototype(),rt=requireEs_array_iterator(),nt=requireCreateNonEnumerableProperty(),st=requireSetToStringTag(),dt=requireWellKnownSymbol(),ft=dt("iterator"),ht=rt.values,mt=function(St,Et){if(St){if(St[ft]!==ht)try{nt(St,ft,ht)}catch{St[ft]=ht}if(st(St,Et,!0),_e[Et]){for(var Ct in rt)if(St[Ct]!==rt[Ct])try{nt(St,Ct,rt[Ct])}catch{St[Ct]=rt[Ct]}}}};for(var bt in _e)mt(et[bt]&&et[bt].prototype,bt);return mt(tt,"DOMTokenList"),web_domCollections_iterator}var es_map={},es_map_constructor={},collection$1,hasRequiredCollection$1;function requireCollection$1(){if(hasRequiredCollection$1)return collection$1;hasRequiredCollection$1=1;var et=require_export(),_e=requireGlobalThis(),tt=requireFunctionUncurryThis(),rt=requireIsForced(),nt=requireDefineBuiltIn(),st=requireInternalMetadata(),dt=requireIterate(),ft=requireAnInstance(),ht=requireIsCallable(),mt=requireIsNullOrUndefined(),bt=requireIsObject(),St=requireFails(),Et=requireCheckCorrectnessOfIteration(),Ct=requireSetToStringTag(),Rt=requireInheritIfRequired();return collection$1=function(Tt,wt,At){var Nt=Tt.indexOf("Map")!==-1,Pt=Tt.indexOf("Weak")!==-1,It=Nt?"set":"add",Ft=_e[Tt],qt=Ft&&Ft.prototype,Vt=Ft,Kt={},jt=function(ar){var pr=tt(qt[ar]);nt(qt,ar,ar==="add"?function(gr){return pr(this,gr===0?0:gr),this}:ar==="delete"?function(cr){return Pt&&!bt(cr)?!1:pr(this,cr===0?0:cr)}:ar==="get"?function(gr){return Pt&&!bt(gr)?void 0:pr(this,gr===0?0:gr)}:ar==="has"?function(gr){return Pt&&!bt(gr)?!1:pr(this,gr===0?0:gr)}:function(gr,Sr){return pr(this,gr===0?0:gr,Sr),this})},Ut=rt(Tt,!ht(Ft)||!(Pt||qt.forEach&&!St(function(){new Ft().entries().next()})));if(Ut)Vt=At.getConstructor(wt,Tt,Nt,It),st.enable();else if(rt(Tt,!0)){var Ot=new Vt,Wt=Ot[It](Pt?{}:-0,1)!==Ot,Bt=St(function(){Ot.has(1)}),tr=Et(function(ar){new Ft(ar)}),Jt=!Pt&&St(function(){for(var ar=new Ft,pr=5;pr--;)ar[It](pr,pr);return!ar.has(-0)});tr||(Vt=wt(function(ar,pr){ft(ar,qt);var cr=Rt(new Ft,ar,Vt);return mt(pr)||dt(pr,cr[It],{that:cr,AS_ENTRIES:Nt}),cr}),Vt.prototype=qt,qt.constructor=Vt),(Bt||Jt)&&(jt("delete"),jt("has"),Nt&&jt("get")),(Jt||Wt)&&jt(It),Pt&&qt.clear&&delete qt.clear}return Kt[Tt]=Vt,et({global:!0,constructor:!0,forced:Vt!==Ft},Kt),Ct(Vt,Tt),Pt||At.setStrong(Vt,Tt,Nt),Vt},collection$1}var collectionStrong,hasRequiredCollectionStrong;function requireCollectionStrong(){if(hasRequiredCollectionStrong)return collectionStrong;hasRequiredCollectionStrong=1;var et=requireObjectCreate(),_e=requireDefineBuiltInAccessor(),tt=requireDefineBuiltIns(),rt=requireFunctionBindContext(),nt=requireAnInstance(),st=requireIsNullOrUndefined(),dt=requireIterate(),ft=requireIteratorDefine(),ht=requireCreateIterResultObject(),mt=requireSetSpecies(),bt=requireDescriptors(),St=requireInternalMetadata().fastKey,Et=requireInternalState(),Ct=Et.set,Rt=Et.getterFor;return collectionStrong={getConstructor:function(Tt,wt,At,Nt){var Pt=Tt(function(Kt,jt){nt(Kt,It),Ct(Kt,{type:wt,index:et(null),first:null,last:null,size:0}),bt||(Kt.size=0),st(jt)||dt(jt,Kt[Nt],{that:Kt,AS_ENTRIES:At})}),It=Pt.prototype,Ft=Rt(wt),qt=function(Kt,jt,Ut){var Ot=Ft(Kt),Wt=Vt(Kt,jt),Bt,tr;return Wt?Wt.value=Ut:(Ot.last=Wt={index:tr=St(jt,!0),key:jt,value:Ut,previous:Bt=Ot.last,next:null,removed:!1},Ot.first||(Ot.first=Wt),Bt&&(Bt.next=Wt),bt?Ot.size++:Kt.size++,tr!=="F"&&(Ot.index[tr]=Wt)),Kt},Vt=function(Kt,jt){var Ut=Ft(Kt),Ot=St(jt),Wt;if(Ot!=="F")return Ut.index[Ot];for(Wt=Ut.first;Wt;Wt=Wt.next)if(Wt.key===jt)return Wt};return tt(It,{clear:function(){for(var jt=this,Ut=Ft(jt),Ot=Ut.first;Ot;)Ot.removed=!0,Ot.previous&&(Ot.previous=Ot.previous.next=null),Ot=Ot.next;Ut.first=Ut.last=null,Ut.index=et(null),bt?Ut.size=0:jt.size=0},delete:function(Kt){var jt=this,Ut=Ft(jt),Ot=Vt(jt,Kt);if(Ot){var Wt=Ot.next,Bt=Ot.previous;delete Ut.index[Ot.index],Ot.removed=!0,Bt&&(Bt.next=Wt),Wt&&(Wt.previous=Bt),Ut.first===Ot&&(Ut.first=Wt),Ut.last===Ot&&(Ut.last=Bt),bt?Ut.size--:jt.size--}return!!Ot},forEach:function(jt){for(var Ut=Ft(this),Ot=rt(jt,arguments.length>1?arguments[1]:void 0),Wt;Wt=Wt?Wt.next:Ut.first;)for(Ot(Wt.value,Wt.key,this);Wt&&Wt.removed;)Wt=Wt.previous},has:function(jt){return!!Vt(this,jt)}}),tt(It,At?{get:function(jt){var Ut=Vt(this,jt);return Ut&&Ut.value},set:function(jt,Ut){return qt(this,jt===0?0:jt,Ut)}}:{add:function(jt){return qt(this,jt=jt===0?0:jt,jt)}}),bt&&_e(It,"size",{configurable:!0,get:function(){return Ft(this).size}}),Pt},setStrong:function(Tt,wt,At){var Nt=wt+" Iterator",Pt=Rt(wt),It=Rt(Nt);ft(Tt,wt,function(Ft,qt){Ct(this,{type:Nt,target:Ft,state:Pt(Ft),kind:qt,last:null})},function(){for(var Ft=It(this),qt=Ft.kind,Vt=Ft.last;Vt&&Vt.removed;)Vt=Vt.previous;return!Ft.target||!(Ft.last=Vt=Vt?Vt.next:Ft.state.first)?(Ft.target=null,ht(void 0,!0)):ht(qt==="keys"?Vt.key:qt==="values"?Vt.value:[Vt.key,Vt.value],!1)},At?"entries":"values",!At,!0),mt(wt)}},collectionStrong}var hasRequiredEs_map_constructor;function requireEs_map_constructor(){if(hasRequiredEs_map_constructor)return es_map_constructor;hasRequiredEs_map_constructor=1;var et=requireCollection$1(),_e=requireCollectionStrong();return et("Map",function(tt){return function(){return tt(this,arguments.length?arguments[0]:void 0)}},_e),es_map_constructor}var hasRequiredEs_map;function requireEs_map(){return hasRequiredEs_map||(hasRequiredEs_map=1,requireEs_map_constructor()),es_map}var es_string_iterator={},hasRequiredEs_string_iterator;function requireEs_string_iterator(){if(hasRequiredEs_string_iterator)return es_string_iterator;hasRequiredEs_string_iterator=1;var et=requireStringMultibyte().charAt,_e=requireToString(),tt=requireInternalState(),rt=requireIteratorDefine(),nt=requireCreateIterResultObject(),st="String Iterator",dt=tt.set,ft=tt.getterFor(st);return rt(String,"String",function(ht){dt(this,{type:st,string:_e(ht),index:0})},function(){var mt=ft(this),bt=mt.string,St=mt.index,Et;return St>=bt.length?nt(void 0,!0):(Et=et(bt,St),mt.index+=Et.length,nt(Et,!1))}),es_string_iterator}var es_number_isNan={},hasRequiredEs_number_isNan;function requireEs_number_isNan(){if(hasRequiredEs_number_isNan)return es_number_isNan;hasRequiredEs_number_isNan=1;var et=require_export();return et({target:"Number",stat:!0},{isNaN:function(tt){return tt!==tt}}),es_number_isNan}var es_array_find={},hasRequiredEs_array_find;function requireEs_array_find(){if(hasRequiredEs_array_find)return es_array_find;hasRequiredEs_array_find=1;var et=require_export(),_e=requireArrayIteration().find,tt=requireAddToUnscopables(),rt="find",nt=!0;return rt in[]&&Array(1)[rt](function(){nt=!1}),et({target:"Array",proto:!0,forced:nt},{find:function(dt){return _e(this,dt,arguments.length>1?arguments[1]:void 0)}}),tt(rt),es_array_find}var es_array_filter={},hasRequiredEs_array_filter;function requireEs_array_filter(){if(hasRequiredEs_array_filter)return es_array_filter;hasRequiredEs_array_filter=1;var et=require_export(),_e=requireArrayIteration().filter,tt=requireArrayMethodHasSpeciesSupport(),rt=tt("filter");return et({target:"Array",proto:!0,forced:!rt},{filter:function(st){return _e(this,st,arguments.length>1?arguments[1]:void 0)}}),es_array_filter}var es_array_some={},hasRequiredEs_array_some;function requireEs_array_some(){if(hasRequiredEs_array_some)return es_array_some;hasRequiredEs_array_some=1;var et=require_export(),_e=requireArrayIteration().some,tt=requireArrayMethodIsStrict(),rt=tt("some");return et({target:"Array",proto:!0,forced:!rt},{some:function(st){return _e(this,st,arguments.length>1?arguments[1]:void 0)}}),es_array_some}var es_array_sort={},hasRequiredEs_array_sort;function requireEs_array_sort(){if(hasRequiredEs_array_sort)return es_array_sort;hasRequiredEs_array_sort=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireACallable(),rt=requireToObject(),nt=requireLengthOfArrayLike(),st=requireDeletePropertyOrThrow(),dt=requireToString(),ft=requireFails(),ht=requireArraySort(),mt=requireArrayMethodIsStrict(),bt=requireEnvironmentFfVersion(),St=requireEnvironmentIsIeOrEdge(),Et=requireEnvironmentV8Version(),Ct=requireEnvironmentWebkitVersion(),Rt=[],Tt=_e(Rt.sort),wt=_e(Rt.push),At=ft(function(){Rt.sort(void 0)}),Nt=ft(function(){Rt.sort(null)}),Pt=mt("sort"),It=!ft(function(){if(Et)return Et<70;if(!(bt&&bt>3)){if(St)return!0;if(Ct)return Ct<603;var Vt="",Kt,jt,Ut,Ot;for(Kt=65;Kt<76;Kt++){switch(jt=String.fromCharCode(Kt),Kt){case 66:case 69:case 70:case 72:Ut=3;break;case 68:case 71:Ut=4;break;default:Ut=2}for(Ot=0;Ot<47;Ot++)Rt.push({k:jt+Ot,v:Ut})}for(Rt.sort(function(Wt,Bt){return Bt.v-Wt.v}),Ot=0;Ot<Rt.length;Ot++)jt=Rt[Ot].k.charAt(0),Vt.charAt(Vt.length-1)!==jt&&(Vt+=jt);return Vt!=="DGBEFHACIJK"}}),Ft=At||!Nt||!Pt||!It,qt=function(Vt){return function(Kt,jt){return jt===void 0?-1:Kt===void 0?1:Vt!==void 0?+Vt(Kt,jt)||0:dt(Kt)>dt(jt)?1:-1}};return et({target:"Array",proto:!0,forced:Ft},{sort:function(Kt){Kt!==void 0&&tt(Kt);var jt=rt(this);if(It)return Kt===void 0?Tt(jt):Tt(jt,Kt);var Ut=[],Ot=nt(jt),Wt,Bt;for(Bt=0;Bt<Ot;Bt++)Bt in jt&&wt(Ut,jt[Bt]);for(ht(Ut,qt(Kt)),Wt=nt(Ut),Bt=0;Bt<Wt;)jt[Bt]=Ut[Bt++];for(;Bt<Ot;)st(jt,Bt++);return jt}}),es_array_sort}var web_url={},web_url_constructor={},urlConstructorDetection,hasRequiredUrlConstructorDetection;function requireUrlConstructorDetection(){if(hasRequiredUrlConstructorDetection)return urlConstructorDetection;hasRequiredUrlConstructorDetection=1;var et=requireFails(),_e=requireWellKnownSymbol(),tt=requireDescriptors(),rt=requireIsPure(),nt=_e("iterator");return urlConstructorDetection=!et(function(){var st=new URL("b?a=1&b=2&c=3","https://a"),dt=st.searchParams,ft=new URLSearchParams("a=1&a=2&b=3"),ht="";return st.pathname="c%20d",dt.forEach(function(mt,bt){dt.delete("b"),ht+=bt+mt}),ft.delete("a",2),ft.delete("b",void 0),rt&&(!st.toJSON||!ft.has("a",1)||ft.has("a",2)||!ft.has("a",void 0)||ft.has("b"))||!dt.size&&(rt||!tt)||!dt.sort||st.href!=="https://a/c%20d?a=1&c=3"||dt.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!dt[nt]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||ht!=="a1c3"||new URL("https://x",void 0).host!=="x"}),urlConstructorDetection}var objectAssign$2,hasRequiredObjectAssign$1;function requireObjectAssign$1(){if(hasRequiredObjectAssign$1)return objectAssign$2;hasRequiredObjectAssign$1=1;var et=requireDescriptors(),_e=requireFunctionUncurryThis(),tt=requireFunctionCall(),rt=requireFails(),nt=requireObjectKeys(),st=requireObjectGetOwnPropertySymbols(),dt=requireObjectPropertyIsEnumerable(),ft=requireToObject(),ht=requireIndexedObject(),mt=Object.assign,bt=Object.defineProperty,St=_e([].concat);return objectAssign$2=!mt||rt(function(){if(et&&mt({b:1},mt(bt({},"a",{enumerable:!0,get:function(){bt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var Et={},Ct={},Rt=Symbol("assign detection"),Tt="abcdefghijklmnopqrst";return Et[Rt]=7,Tt.split("").forEach(function(wt){Ct[wt]=wt}),mt({},Et)[Rt]!==7||nt(mt({},Ct)).join("")!==Tt})?function(Ct,Rt){for(var Tt=ft(Ct),wt=arguments.length,At=1,Nt=st.f,Pt=dt.f;wt>At;)for(var It=ht(arguments[At++]),Ft=Nt?St(nt(It),Nt(It)):nt(It),qt=Ft.length,Vt=0,Kt;qt>Vt;)Kt=Ft[Vt++],(!et||tt(Pt,It,Kt))&&(Tt[Kt]=It[Kt]);return Tt}:mt,objectAssign$2}var callWithSafeIterationClosing,hasRequiredCallWithSafeIterationClosing;function requireCallWithSafeIterationClosing(){if(hasRequiredCallWithSafeIterationClosing)return callWithSafeIterationClosing;hasRequiredCallWithSafeIterationClosing=1;var et=requireAnObject(),_e=requireIteratorClose();return callWithSafeIterationClosing=function(tt,rt,nt,st){try{return st?rt(et(nt)[0],nt[1]):rt(nt)}catch(dt){_e(tt,"throw",dt)}},callWithSafeIterationClosing}var arrayFrom,hasRequiredArrayFrom;function requireArrayFrom(){if(hasRequiredArrayFrom)return arrayFrom;hasRequiredArrayFrom=1;var et=requireFunctionBindContext(),_e=requireFunctionCall(),tt=requireToObject(),rt=requireCallWithSafeIterationClosing(),nt=requireIsArrayIteratorMethod(),st=requireIsConstructor(),dt=requireLengthOfArrayLike(),ft=requireCreateProperty(),ht=requireGetIterator(),mt=requireGetIteratorMethod(),bt=Array;return arrayFrom=function(Et){var Ct=tt(Et),Rt=st(this),Tt=arguments.length,wt=Tt>1?arguments[1]:void 0,At=wt!==void 0;At&&(wt=et(wt,Tt>2?arguments[2]:void 0));var Nt=mt(Ct),Pt=0,It,Ft,qt,Vt,Kt,jt;if(Nt&&!(this===bt&&nt(Nt)))for(Ft=Rt?new this:[],Vt=ht(Ct,Nt),Kt=Vt.next;!(qt=_e(Kt,Vt)).done;Pt++)jt=At?rt(Vt,wt,[qt.value,Pt],!0):qt.value,ft(Ft,Pt,jt);else for(It=dt(Ct),Ft=Rt?new this(It):bt(It);It>Pt;Pt++)jt=At?wt(Ct[Pt],Pt):Ct[Pt],ft(Ft,Pt,jt);return Ft.length=Pt,Ft},arrayFrom}var stringPunycodeToAscii,hasRequiredStringPunycodeToAscii;function requireStringPunycodeToAscii(){if(hasRequiredStringPunycodeToAscii)return stringPunycodeToAscii;hasRequiredStringPunycodeToAscii=1;var et=requireFunctionUncurryThis(),_e=2147483647,tt=36,rt=1,nt=26,st=38,dt=700,ft=72,ht=128,mt="-",bt=/[^\0-\u007E]/,St=/[.\u3002\uFF0E\uFF61]/g,Et="Overflow: input needs wider integers to process",Ct=tt-rt,Rt=RangeError,Tt=et(St.exec),wt=Math.floor,At=String.fromCharCode,Nt=et("".charCodeAt),Pt=et([].join),It=et([].push),Ft=et("".replace),qt=et("".split),Vt=et("".toLowerCase),Kt=function(Wt){for(var Bt=[],tr=0,Jt=Wt.length;tr<Jt;){var ar=Nt(Wt,tr++);if(ar>=55296&&ar<=56319&&tr<Jt){var pr=Nt(Wt,tr++);(pr&64512)===56320?It(Bt,((ar&1023)<<10)+(pr&1023)+65536):(It(Bt,ar),tr--)}else It(Bt,ar)}return Bt},jt=function(Wt){return Wt+22+75*(Wt<26)},Ut=function(Wt,Bt,tr){var Jt=0;for(Wt=tr?wt(Wt/dt):Wt>>1,Wt+=wt(Wt/Bt);Wt>Ct*nt>>1;)Wt=wt(Wt/Ct),Jt+=tt;return wt(Jt+(Ct+1)*Wt/(Wt+st))},Ot=function(Wt){var Bt=[];Wt=Kt(Wt);var tr=Wt.length,Jt=ht,ar=0,pr=ft,cr,gr;for(cr=0;cr<Wt.length;cr++)gr=Wt[cr],gr<128&&It(Bt,At(gr));var Sr=Bt.length,Er=Sr;for(Sr&&It(Bt,mt);Er<tr;){var Vr=_e;for(cr=0;cr<Wt.length;cr++)gr=Wt[cr],gr>=Jt&&gr<Vr&&(Vr=gr);var Wr=Er+1;if(Vr-Jt>wt((_e-ar)/Wr))throw new Rt(Et);for(ar+=(Vr-Jt)*Wr,Jt=Vr,cr=0;cr<Wt.length;cr++){if(gr=Wt[cr],gr<Jt&&++ar>_e)throw new Rt(Et);if(gr===Jt){for(var Mr=ar,Nr=tt;;){var Yr=Nr<=pr?rt:Nr>=pr+nt?nt:Nr-pr;if(Mr<Yr)break;var Or=Mr-Yr,Ar=tt-Yr;It(Bt,At(jt(Yr+Or%Ar))),Mr=wt(Or/Ar),Nr+=tt}It(Bt,At(jt(Mr))),pr=Ut(ar,Wr,Er===Sr),ar=0,Er++}}ar++,Jt++}return Pt(Bt,"")};return stringPunycodeToAscii=function(Wt){var Bt=[],tr=qt(Ft(Vt(Wt),St,"."),"."),Jt,ar;for(Jt=0;Jt<tr.length;Jt++)ar=tr[Jt],It(Bt,Tt(bt,ar)?"xn--"+Ot(ar):ar);return Pt(Bt,".")},stringPunycodeToAscii}var es_string_fromCodePoint={},hasRequiredEs_string_fromCodePoint;function requireEs_string_fromCodePoint(){if(hasRequiredEs_string_fromCodePoint)return es_string_fromCodePoint;hasRequiredEs_string_fromCodePoint=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireToAbsoluteIndex(),rt=RangeError,nt=String.fromCharCode,st=String.fromCodePoint,dt=_e([].join),ft=!!st&&st.length!==1;return et({target:"String",stat:!0,arity:1,forced:ft},{fromCodePoint:function(mt){for(var bt=[],St=arguments.length,Et=0,Ct;St>Et;){if(Ct=+arguments[Et++],tt(Ct,1114111)!==Ct)throw new rt(Ct+" is not a valid code point");bt[Et]=Ct<65536?nt(Ct):nt(((Ct-=65536)>>10)+55296,Ct%1024+56320)}return dt(bt,"")}}),es_string_fromCodePoint}var web_urlSearchParams_constructor,hasRequiredWeb_urlSearchParams_constructor;function requireWeb_urlSearchParams_constructor(){if(hasRequiredWeb_urlSearchParams_constructor)return web_urlSearchParams_constructor;hasRequiredWeb_urlSearchParams_constructor=1,requireEs_array_iterator(),requireEs_string_fromCodePoint();var et=require_export(),_e=requireGlobalThis(),tt=requireSafeGetBuiltIn(),rt=requireGetBuiltIn(),nt=requireFunctionCall(),st=requireFunctionUncurryThis(),dt=requireDescriptors(),ft=requireUrlConstructorDetection(),ht=requireDefineBuiltIn(),mt=requireDefineBuiltInAccessor(),bt=requireDefineBuiltIns(),St=requireSetToStringTag(),Et=requireIteratorCreateConstructor(),Ct=requireInternalState(),Rt=requireAnInstance(),Tt=requireIsCallable(),wt=requireHasOwnProperty(),At=requireFunctionBindContext(),Nt=requireClassof(),Pt=requireAnObject(),It=requireIsObject(),Ft=requireToString(),qt=requireObjectCreate(),Vt=requireCreatePropertyDescriptor(),Kt=requireGetIterator(),jt=requireGetIteratorMethod(),Ut=requireCreateIterResultObject(),Ot=requireValidateArgumentsLength(),Wt=requireWellKnownSymbol(),Bt=requireArraySort(),tr=Wt("iterator"),Jt="URLSearchParams",ar=Jt+"Iterator",pr=Ct.set,cr=Ct.getterFor(Jt),gr=Ct.getterFor(ar),Sr=tt("fetch"),Er=tt("Request"),Vr=tt("Headers"),Wr=Er&&Er.prototype,Mr=Vr&&Vr.prototype,Nr=_e.TypeError,Yr=_e.encodeURIComponent,Or=String.fromCharCode,Ar=rt("String","fromCodePoint"),Qr=parseInt,hn=st("".charAt),Sn=st([].join),Kr=st([].push),Hn=st("".replace),ln=st([].shift),kn=st([].splice),xn=st("".split),An=st("".slice),rs=st(/./.exec),qs=/\+/g,Ln="<22>",Cn=/^[0-9a-f]+$/i,Nn=function(Rs,io){var vo=An(Rs,io,io+2);return rs(Cn,vo)?Qr(vo,16):NaN},Gr=function(Rs){for(var io=0,vo=128;vo>0&&(Rs&vo)!==0;vo>>=1)io++;return io},tn=function(Rs){var io=null;switch(Rs.length){case 1:io=Rs[0];break;case 2:io=(Rs[0]&31)<<6|Rs[1]&63;break;case 3:io=(Rs[0]&15)<<12|(Rs[1]&63)<<6|Rs[2]&63;break;case 4:io=(Rs[0]&7)<<18|(Rs[1]&63)<<12|(Rs[2]&63)<<6|Rs[3]&63;break}return io>1114111?null:io},dn=function(Rs){Rs=Hn(Rs,qs," ");for(var io=Rs.length,vo="",Bo=0;Bo<io;){var En=hn(Rs,Bo);if(En==="%"){if(hn(Rs,Bo+1)==="%"||Bo+3>io){vo+="%",Bo++;continue}var In=Nn(Rs,Bo+1);if(In!==In){vo+=En,Bo++;continue}Bo+=2;var ds=Gr(In);if(ds===0)En=Or(In);else{if(ds===1||ds>4){vo+=Ln,Bo++;continue}for(var Ps=[In],yo=1;yo<ds&&(Bo++,!(Bo+3>io||hn(Rs,Bo)!=="%"));){var rn=Nn(Rs,Bo+1);if(rn!==rn){Bo+=3;break}if(rn>191||rn<128)break;Kr(Ps,rn),Bo+=2,yo++}if(Ps.length!==ds){vo+=Ln;continue}var es=tn(Ps);es===null?vo+=Ln:En=Ar(es)}}vo+=En,Bo++}return vo},Rn=/[!'()~]|%20/g,wn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Un=function(Rs){return wn[Rs]},Zn=function(Rs){return Hn(Yr(Rs),Rn,Un)},pn=Et(function(io,vo){pr(this,{type:ar,target:cr(io).entries,index:0,kind:vo})},Jt,function(){var io=gr(this),vo=io.target,Bo=io.index++;if(!vo||Bo>=vo.length)return io.target=null,Ut(void 0,!0);var En=vo[Bo];switch(io.kind){case"keys":return Ut(En.key,!1);case"values":return Ut(En.value,!1)}return Ut([En.key,En.value],!1)},!0),Dn=function(Rs){this.entries=[],this.url=null,Rs!==void 0&&(It(Rs)?this.parseObject(Rs):this.parseQuery(typeof Rs=="string"?hn(Rs,0)==="?"?An(Rs,1):Rs:Ft(Rs)))};Dn.prototype={type:Jt,bindURL:function(Rs){this.url=Rs,this.update()},parseObject:function(Rs){var io=this.entries,vo=jt(Rs),Bo,En,In,ds,Ps,yo,rn;if(vo)for(Bo=Kt(Rs,vo),En=Bo.next;!(In=nt(En,Bo)).done;){if(ds=Kt(Pt(In.value)),Ps=ds.next,(yo=nt(Ps,ds)).done||(rn=nt(Ps,ds)).done||!nt(Ps,ds).done)throw new Nr("Expected sequence with length 2");Kr(io,{key:Ft(yo.value),value:Ft(rn.value)})}else for(var es in Rs)wt(Rs,es)&&Kr(io,{key:es,value:Ft(Rs[es])})},parseQuery:function(Rs){if(Rs)for(var io=this.entries,vo=xn(Rs,"&"),Bo=0,En,In;Bo<vo.length;)En=vo[Bo++],En.length&&(In=xn(En,"="),Kr(io,{key:dn(ln(In)),value:dn(Sn(In,"="))}))},serialize:function(){for(var Rs=this.entries,io=[],vo=0,Bo;vo<Rs.length;)Bo=Rs[vo++],Kr(io,Zn(Bo.key)+"="+Zn(Bo.value));return Sn(io,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var qn=function(){Rt(this,_a);var io=arguments.length>0?arguments[0]:void 0,vo=pr(this,new Dn(io));dt||(this.size=vo.entries.length)},_a=qn.prototype;if(bt(_a,{append:function(io,vo){var Bo=cr(this);Ot(arguments.length,2),Kr(Bo.entries,{key:Ft(io),value:Ft(vo)}),dt||this.length++,Bo.updateURL()},delete:function(Rs){for(var io=cr(this),vo=Ot(arguments.length,1),Bo=io.entries,En=Ft(Rs),In=vo<2?void 0:arguments[1],ds=In===void 0?In:Ft(In),Ps=0;Ps<Bo.length;){var yo=Bo[Ps];if(yo.key===En&&(ds===void 0||yo.value===ds)){if(kn(Bo,Ps,1),ds!==void 0)break}else Ps++}dt||(this.size=Bo.length),io.updateURL()},get:function(io){var vo=cr(this).entries;Ot(arguments.length,1);for(var Bo=Ft(io),En=0;En<vo.length;En++)if(vo[En].key===Bo)return vo[En].value;return null},getAll:function(io){var vo=cr(this).entries;Ot(arguments.length,1);for(var Bo=Ft(io),En=[],In=0;In<vo.length;In++)vo[In].key===Bo&&Kr(En,vo[In].value);return En},has:function(io){for(var vo=cr(this).entries,Bo=Ot(arguments.length,1),En=Ft(io),In=Bo<2?void 0:arguments[1],ds=In===void 0?In:Ft(In),Ps=0;Ps<vo.length;){var yo=vo[Ps++];if(yo.key===En&&(ds===void 0||yo.value===ds))return!0}return!1},set:function(io,vo){var Bo=cr(this);Ot(arguments.length,1);for(var En=Bo.entries,In=!1,ds=Ft(io),Ps=Ft(vo),yo=0,rn;yo<En.length;yo++)rn=En[yo],rn.key===ds&&(In?kn(En,yo--,1):(In=!0,rn.value=Ps));In||Kr(En,{key:ds,value:Ps}),dt||(this.size=En.length),Bo.updateURL()},sort:function(){var io=cr(this);Bt(io.entries,function(vo,Bo){return vo.key>Bo.key?1:-1}),io.updateURL()},forEach:function(io){for(var vo=cr(this).entries,Bo=At(io,arguments.length>1?arguments[1]:void 0),En=0,In;En<vo.length;)In=vo[En++],Bo(In.value,In.key,this)},keys:function(){return new pn(this,"keys")},values:function(){return new pn(this,"values")},entries:function(){return new pn(this,"entries")}},{enumerable:!0}),ht(_a,tr,_a.entries,{name:"entries"}),ht(_a,"toString",function(){return cr(this).serialize()},{enumerable:!0}),dt&&mt(_a,"size",{get:function(){return cr(this).entries.length},configurable:!0,enumerable:!0}),St(qn,Jt),et({global:!0,constructor:!0,forced:!ft},{URLSearchParams:qn}),!ft&&Tt(Vr)){var Vn=st(Mr.has),bs=st(Mr.set),Is=function(Rs){if(It(Rs)){var io=Rs.body,vo;if(Nt(io)===Jt)return vo=Rs.headers?new Vr(Rs.headers):new Vr,Vn(vo,"content-type")||bs(vo,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),qt(Rs,{body:Vt(0,Ft(io)),headers:Vt(0,vo)})}return Rs};if(Tt(Sr)&&et({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(io){return Sr(io,arguments.length>1?Is(arguments[1]):{})}}),Tt(Er)){var uo=function(io){return Rt(this,Wr),new Er(io,arguments.length>1?Is(arguments[1]):{})};Wr.constructor=uo,uo.prototype=Wr,et({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:uo})}}return web_urlSearchParams_constructor={URLSearchParams:qn,getState:cr},web_urlSearchParams_constructor}var hasRequiredWeb_url_constructor;function requireWeb_url_constructor(){if(hasRequiredWeb_url_constructor)return web_url_constructor;hasRequiredWeb_url_constructor=1,requireEs_string_iterator();var et=require_export(),_e=requireDescriptors(),tt=requireUrlConstructorDetection(),rt=requireGlobalThis(),nt=requireFunctionBindContext(),st=requireFunctionUncurryThis(),dt=requireDefineBuiltIn(),ft=requireDefineBuiltInAccessor(),ht=requireAnInstance(),mt=requireHasOwnProperty(),bt=requireObjectAssign$1(),St=requireArrayFrom(),Et=requireArraySlice(),Ct=requireStringMultibyte().codeAt,Rt=requireStringPunycodeToAscii(),Tt=requireToString(),wt=requireSetToStringTag(),At=requireValidateArgumentsLength(),Nt=requireWeb_urlSearchParams_constructor(),Pt=requireInternalState(),It=Pt.set,Ft=Pt.getterFor("URL"),qt=Nt.URLSearchParams,Vt=Nt.getState,Kt=rt.URL,jt=rt.TypeError,Ut=rt.parseInt,Ot=Math.floor,Wt=Math.pow,Bt=st("".charAt),tr=st(/./.exec),Jt=st([].join),ar=st(1.1.toString),pr=st([].pop),cr=st([].push),gr=st("".replace),Sr=st([].shift),Er=st("".split),Vr=st("".slice),Wr=st("".toLowerCase),Mr=st([].unshift),Nr="Invalid authority",Yr="Invalid scheme",Or="Invalid host",Ar="Invalid port",Qr=/[a-z]/i,hn=/[\d+-.a-z]/i,Sn=/\d/,Kr=/^0x/i,Hn=/^[0-7]+$/,ln=/^\d+$/,kn=/^[\da-f]+$/i,xn=/[\0\t\n\r #%/:<>?@[\\\]^|]/,An=/[\0\t\n\r #/:<>?@[\\\]^|]/,rs=/^[\u0000-\u0020]+/,qs=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ln=/[\t\n\r]/g,Cn,Nn=function(Jr){var vn=Er(Jr,"."),fn,gn,mn,ss,ga,Ns,vs;if(vn.length&&vn[vn.length-1]===""&&vn.length--,fn=vn.length,fn>4)return Jr;for(gn=[],mn=0;mn<fn;mn++){if(ss=vn[mn],ss==="")return Jr;if(ga=10,ss.length>1&&Bt(ss,0)==="0"&&(ga=tr(Kr,ss)?16:8,ss=Vr(ss,ga===8?1:2)),ss==="")Ns=0;else{if(!tr(ga===10?ln:ga===8?Hn:kn,ss))return Jr;Ns=Ut(ss,ga)}cr(gn,Ns)}for(mn=0;mn<fn;mn++)if(Ns=gn[mn],mn===fn-1){if(Ns>=Wt(256,5-fn))return null}else if(Ns>255)return null;for(vs=pr(gn),mn=0;mn<gn.length;mn++)vs+=gn[mn]*Wt(256,3-mn);return vs},Gr=function(Jr){var vn=[0,0,0,0,0,0,0,0],fn=0,gn=null,mn=0,ss,ga,Ns,vs,Xs,co,ls,Mo=function(){return Bt(Jr,mn)};if(Mo()===":"){if(Bt(Jr,1)!==":")return;mn+=2,fn++,gn=fn}for(;Mo();){if(fn===8)return;if(Mo()===":"){if(gn!==null)return;mn++,fn++,gn=fn;continue}for(ss=ga=0;ga<4&&tr(kn,Mo());)ss=ss*16+Ut(Mo(),16),mn++,ga++;if(Mo()==="."){if(ga===0||(mn-=ga,fn>6))return;for(Ns=0;Mo();){if(vs=null,Ns>0)if(Mo()==="."&&Ns<4)mn++;else return;if(!tr(Sn,Mo()))return;for(;tr(Sn,Mo());){if(Xs=Ut(Mo(),10),vs===null)vs=Xs;else{if(vs===0)return;vs=vs*10+Xs}if(vs>255)return;mn++}vn[fn]=vn[fn]*256+vs,Ns++,(Ns===2||Ns===4)&&fn++}if(Ns!==4)return;break}else if(Mo()===":"){if(mn++,!Mo())return}else if(Mo())return;vn[fn++]=ss}if(gn!==null)for(co=fn-gn,fn=7;fn!==0&&co>0;)ls=vn[fn],vn[fn--]=vn[gn+co-1],vn[gn+--co]=ls;else if(fn!==8)return;return vn},tn=function(Jr){for(var vn=null,fn=1,gn=null,mn=0,ss=0;ss<8;ss++)Jr[ss]!==0?(mn>fn&&(vn=gn,fn=mn),gn=null,mn=0):(gn===null&&(gn=ss),++mn);return mn>fn?gn:vn},dn=function(Jr){var vn,fn,gn,mn;if(typeof Jr=="number"){for(vn=[],fn=0;fn<4;fn++)Mr(vn,Jr%256),Jr=Ot(Jr/256);return Jt(vn,".")}if(typeof Jr=="object"){for(vn="",gn=tn(Jr),fn=0;fn<8;fn++)mn&&Jr[fn]===0||(mn&&(mn=!1),gn===fn?(vn+=fn?":":"::",mn=!0):(vn+=ar(Jr[fn],16),fn<7&&(vn+=":")));return"["+vn+"]"}return Jr},Rn={},wn=bt({},Rn,{" ":1,'"':1,"<":1,">":1,"`":1}),Un=bt({},wn,{"#":1,"?":1,"{":1,"}":1}),Zn=bt({},Un,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pn=function(Jr,vn){var fn=Ct(Jr,0);return fn>32&&fn<127&&!mt(vn,Jr)?Jr:encodeURIComponent(Jr)},Dn={ftp:21,file:null,http:80,https:443,ws:80,wss:443},qn=function(Jr,vn){var fn;return Jr.length===2&&tr(Qr,Bt(Jr,0))&&((fn=Bt(Jr,1))===":"||!vn&&fn==="|")},_a=function(Jr){var vn;return Jr.length>1&&qn(Vr(Jr,0,2))&&(Jr.length===2||(vn=Bt(Jr,2))==="/"||vn==="\\"||vn==="?"||vn==="#")},Vn=function(Jr){return Jr==="."||Wr(Jr)==="%2e"},bs=function(Jr){return Jr=Wr(Jr),Jr===".."||Jr==="%2e."||Jr===".%2e"||Jr==="%2e%2e"},Is={},uo={},Rs={},io={},vo={},Bo={},En={},In={},ds={},Ps={},yo={},rn={},es={},Gs={},Ro={},ru={},du={},Iu={},Sl={},Ko={},Fl={},gl=function(Jr,vn,fn){var gn=Tt(Jr),mn,ss,ga;if(vn){if(ss=this.parse(gn),ss)throw new jt(ss);this.searchParams=null}else{if(fn!==void 0&&(mn=new gl(fn,!0)),ss=this.parse(gn,null,mn),ss)throw new jt(ss);ga=Vt(new qt),ga.bindURL(this),this.searchParams=ga}};gl.prototype={type:"URL",parse:function(Jr,vn,fn){var gn=this,mn=vn||Is,ss=0,ga="",Ns=!1,vs=!1,Xs=!1,co,ls,Mo,Nu;for(Jr=Tt(Jr),vn||(gn.scheme="",gn.username="",gn.password="",gn.host=null,gn.port=null,gn.path=[],gn.query=null,gn.fragment=null,gn.cannotBeABaseURL=!1,Jr=gr(Jr,rs,""),Jr=gr(Jr,qs,"$1")),Jr=gr(Jr,Ln,""),co=St(Jr);ss<=co.length;){switch(ls=co[ss],mn){case Is:if(ls&&tr(Qr,ls))ga+=Wr(ls),mn=uo;else{if(vn)return Yr;mn=Rs;continue}break;case uo:if(ls&&(tr(hn,ls)||ls==="+"||ls==="-"||ls==="."))ga+=Wr(ls);else if(ls===":"){if(vn&&(gn.isSpecial()!==mt(Dn,ga)||ga==="file"&&(gn.includesCredentials()||gn.port!==null)||gn.scheme==="file"&&!gn.host))return;if(gn.scheme=ga,vn){gn.isSpecial()&&Dn[gn.scheme]===gn.port&&(gn.port=null);return}ga="",gn.scheme==="file"?mn=Gs:gn.isSpecial()&&fn&&fn.scheme===gn.scheme?mn=io:gn.isSpecial()?mn=In:co[ss+1]==="/"?(mn=vo,ss++):(gn.cannotBeABaseURL=!0,cr(gn.path,""),mn=Sl)}else{if(vn)return Yr;ga="",mn=Rs,ss=0;continue}break;case Rs:if(!fn||fn.cannotBeABaseURL&&ls!=="#")return Yr;if(fn.cannotBeABaseURL&&ls==="#"){gn.scheme=fn.scheme,gn.path=Et(fn.path),gn.query=fn.query,gn.fragment="",gn.cannotBeABaseURL=!0,mn=Fl;break}mn=fn.scheme==="file"?Gs:Bo;continue;case io:if(ls==="/"&&co[ss+1]==="/")mn=ds,ss++;else{mn=Bo;continue}break;case vo:if(ls==="/"){mn=Ps;break}else{mn=Iu;continue}case Bo:if(gn.scheme=fn.scheme,ls===Cn)gn.username=fn.username,gn.password=fn.password,gn.host=fn.host,gn.port=fn.port,gn.path=Et(fn.path),gn.query=fn.query;else if(ls==="/"||ls==="\\"&&gn.isSpecial())mn=En;else if(ls==="?")gn.username=fn.username,gn.password=fn.password,gn.host=fn.host,gn.port=fn.port,gn.path=Et(fn.path),gn.query="",mn=Ko;else if(ls==="#")gn.username=fn.username,gn.password=fn.password,gn.host=fn.host,gn.port=fn.port,gn.path=Et(fn.path),gn.query=fn.query,gn.fragment="",mn=Fl;else{gn.username=fn.username,gn.password=fn.password,gn.host=fn.host,gn.port=fn.port,gn.path=Et(fn.path),gn.path.length--,mn=Iu;continue}break;case En:if(gn.isSpecial()&&(ls==="/"||ls==="\\"))mn=ds;else if(ls==="/")mn=Ps;else{gn.username=fn.username,gn.password=fn.password,gn.host=fn.host,gn.port=fn.port,mn=Iu;continue}break;case In:if(mn=ds,ls!=="/"||Bt(ga,ss+1)!=="/")continue;ss++;break;case ds:if(ls!=="/"&&ls!=="\\"){mn=Ps;continue}break;case Ps:if(ls==="@"){Ns&&(ga="%40"+ga),Ns=!0,Mo=St(ga);for(var Ou=0;Ou<Mo.length;Ou++){var $u=Mo[Ou];if($u===":"&&!Xs){Xs=!0;continue}var Hu=pn($u,Zn);Xs?gn.password+=Hu:gn.username+=Hu}ga=""}else if(ls===Cn||ls==="/"||ls==="?"||ls==="#"||ls==="\\"&&gn.isSpecial()){if(Ns&&ga==="")return Nr;ss-=St(ga).length+1,ga="",mn=yo}else ga+=ls;break;case yo:case rn:if(vn&&gn.scheme==="file"){mn=ru;continue}else if(ls===":"&&!vs){if(ga==="")return Or;if(Nu=gn.parseHost(ga),Nu)return Nu;if(ga="",mn=es,vn===rn)return}else if(ls===Cn||ls==="/"||ls==="?"||ls==="#"||ls==="\\"&&gn.isSpecial()){if(gn.isSpecial()&&ga==="")return Or;if(vn&&ga===""&&(gn.includesCredentials()||gn.port!==null))return;if(Nu=gn.parseHost(ga),Nu)return Nu;if(ga="",mn=du,vn)return;continue}else ls==="["?vs=!0:ls==="]"&&(vs=!1),ga+=ls;break;case es:if(tr(Sn,ls))ga+=ls;else if(ls===Cn||ls==="/"||ls==="?"||ls==="#"||ls==="\\"&&gn.isSpecial()||vn){if(ga!==""){var kl=Ut(ga,10);if(kl>65535)return Ar;gn.port=gn.isSpecial()&&kl===Dn[gn.scheme]?null:kl,ga=""}if(vn)return;mn=du;continue}else return Ar;break;case Gs:if(gn.scheme="file",ls==="/"||ls==="\\")mn=Ro;else if(fn&&fn.scheme==="file")switch(ls){case Cn:gn.host=fn.host,gn.path=Et(fn.path),gn.query=fn.query;break;case"?":gn.host=fn.host,gn.path=Et(fn.path),gn.query="",mn=Ko;break;case"#":gn.host=fn.host,gn.path=Et(fn.path),gn.query=fn.query,gn.fragment="",mn=Fl;break;default:_a(Jt(Et(co,ss),""))||(gn.host=fn.host,gn.path=Et(fn.path),gn.shortenPath()),mn=Iu;continue}else{mn=Iu;continue}break;case Ro:if(ls==="/"||ls==="\\"){mn=ru;break}fn&&fn.scheme==="file"&&!_a(Jt(Et(co,ss),""))&&(qn(fn.path[0],!0)?cr(gn.path,fn.path[0]):gn.host=fn.host),mn=Iu;continue;case ru:if(ls===Cn||ls==="/"||ls==="\\"||ls==="?"||ls==="#"){if(!vn&&qn(ga))mn=Iu;else if(ga===""){if(gn.host="",vn)return;mn=du}else{if(Nu=gn.parseHost(ga),Nu)return Nu;if(gn.host==="localhost"&&(gn.host=""),vn)return;ga="",mn=du}continue}else ga+=ls;break;case du:if(gn.isSpecial()){if(mn=Iu,ls!=="/"&&ls!=="\\")continue}else if(!vn&&ls==="?")gn.query="",mn=Ko;else if(!vn&&ls==="#")gn.fragment="",mn=Fl;else if(ls!==Cn&&(mn=Iu,ls!=="/"))continue;break;case Iu:if(ls===Cn||ls==="/"||ls==="\\"&&gn.isSpecial()||!vn&&(ls==="?"||ls==="#")){if(bs(ga)?(gn.shortenPath(),ls!=="/"&&!(ls==="\\"&&gn.isSpecial())&&cr(gn.path,"")):Vn(ga)?ls!=="/"&&!(ls==="\\"&&gn.isSpecial())&&cr(gn.path,""):(gn.scheme==="file"&&!gn.path.length&&qn(ga)&&(gn.host&&(gn.host=""),ga=Bt(ga,0)+":"),cr(gn.path,ga)),ga="",gn.scheme==="file"&&(ls===Cn||ls==="?"||ls==="#"))for(;gn.path.length>1&&gn.path[0]==="";)Sr(gn.path);ls==="?"?(gn.query="",mn=Ko):ls==="#"&&(gn.fragment="",mn=Fl)}else ga+=pn(ls,Un);break;case Sl:ls==="?"?(gn.query="",mn=Ko):ls==="#"?(gn.fragment="",mn=Fl):ls!==Cn&&(gn.path[0]+=pn(ls,Rn));break;case Ko:!vn&&ls==="#"?(gn.fragment="",mn=Fl):ls!==Cn&&(ls==="'"&&gn.isSpecial()?gn.query+="%27":ls==="#"?gn.query+="%23":gn.query+=pn(ls,Rn));break;case Fl:ls!==Cn&&(gn.fragment+=pn(ls,wn));break}ss++}},parseHost:function(Jr){var vn,fn,gn;if(Bt(Jr,0)==="["){if(Bt(Jr,Jr.length-1)!=="]"||(vn=Gr(Vr(Jr,1,-1)),!vn))return Or;this.host=vn}else if(this.isSpecial()){if(Jr=Rt(Jr),tr(xn,Jr)||(vn=Nn(Jr),vn===null))return Or;this.host=vn}else{if(tr(An,Jr))return Or;for(vn="",fn=St(Jr),gn=0;gn<fn.length;gn++)vn+=pn(fn[gn],Rn);this.host=vn}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return mt(Dn,this.scheme)},shortenPath:function(){var Jr=this.path,vn=Jr.length;vn&&(this.scheme!=="file"||vn!==1||!qn(Jr[0],!0))&&Jr.length--},serialize:function(){var Jr=this,vn=Jr.scheme,fn=Jr.username,gn=Jr.password,mn=Jr.host,ss=Jr.port,ga=Jr.path,Ns=Jr.query,vs=Jr.fragment,Xs=vn+":";return mn!==null?(Xs+="//",Jr.includesCredentials()&&(Xs+=fn+(gn?":"+gn:"")+"@"),Xs+=dn(mn),ss!==null&&(Xs+=":"+ss)):vn==="file"&&(Xs+="//"),Xs+=Jr.cannotBeABaseURL?ga[0]:ga.length?"/"+Jt(ga,"/"):"",Ns!==null&&(Xs+="?"+Ns),vs!==null&&(Xs+="#"+vs),Xs},setHref:function(Jr){var vn=this.parse(Jr);if(vn)throw new jt(vn);this.searchParams.update()},getOrigin:function(){var Jr=this.scheme,vn=this.port;if(Jr==="blob")try{return new Gu(Jr.path[0]).origin}catch{return"null"}return Jr==="file"||!this.isSpecial()?"null":Jr+"://"+dn(this.host)+(vn!==null?":"+vn:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(Jr){this.parse(Tt(Jr)+":",Is)},getUsername:function(){return this.username},setUsername:function(Jr){var vn=St(Tt(Jr));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var fn=0;fn<vn.length;fn++)this.username+=pn(vn[fn],Zn)}},getPassword:function(){return this.password},setPassword:function(Jr){var vn=St(Tt(Jr));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var fn=0;fn<vn.length;fn++)this.password+=pn(vn[fn],Zn)}},getHost:function(){var Jr=this.host,vn=this.port;return Jr===null?"":vn===null?dn(Jr):dn(Jr)+":"+vn},setHost:function(Jr){this.cannotBeABaseURL||this.parse(Jr,yo)},getHostname:function(){var Jr=this.host;return Jr===null?"":dn(Jr)},setHostname:function(Jr){this.cannotBeABaseURL||this.parse(Jr,rn)},getPort:function(){var Jr=this.port;return Jr===null?"":Tt(Jr)},setPort:function(Jr){this.cannotHaveUsernamePasswordPort()||(Jr=Tt(Jr),Jr===""?this.port=null:this.parse(Jr,es))},getPathname:function(){var Jr=this.path;return this.cannotBeABaseURL?Jr[0]:Jr.length?"/"+Jt(Jr,"/"):""},setPathname:function(Jr){this.cannotBeABaseURL||(this.path=[],this.parse(Jr,du))},getSearch:function(){var Jr=this.query;return Jr?"?"+Jr:""},setSearch:function(Jr){Jr=Tt(Jr),Jr===""?this.query=null:(Bt(Jr,0)==="?"&&(Jr=Vr(Jr,1)),this.query="",this.parse(Jr,Ko)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var Jr=this.fragment;return Jr?"#"+Jr:""},setHash:function(Jr){if(Jr=Tt(Jr),Jr===""){this.fragment=null;return}Bt(Jr,0)==="#"&&(Jr=Vr(Jr,1)),this.fragment="",this.parse(Jr,Fl)},update:function(){this.query=this.searchParams.serialize()||null}};var Gu=function(vn){var fn=ht(this,Lu),gn=At(arguments.length,1)>1?arguments[1]:void 0,mn=It(fn,new gl(vn,!1,gn));_e||(fn.href=mn.serialize(),fn.origin=mn.getOrigin(),fn.protocol=mn.getProtocol(),fn.username=mn.getUsername(),fn.password=mn.getPassword(),fn.host=mn.getHost(),fn.hostname=mn.getHostname(),fn.port=mn.getPort(),fn.pathname=mn.getPathname(),fn.search=mn.getSearch(),fn.searchParams=mn.getSearchParams(),fn.hash=mn.getHash())},Lu=Gu.prototype,Ku=function(Jr,vn){return{get:function(){return Ft(this)[Jr]()},set:vn&&function(fn){return Ft(this)[vn](fn)},configurable:!0,enumerable:!0}};if(_e&&(ft(Lu,"href",Ku("serialize","setHref")),ft(Lu,"origin",Ku("getOrigin")),ft(Lu,"protocol",Ku("getProtocol","setProtocol")),ft(Lu,"username",Ku("getUsername","setUsername")),ft(Lu,"password",Ku("getPassword","setPassword")),ft(Lu,"host",Ku("getHost","setHost")),ft(Lu,"hostname",Ku("getHostname","setHostname")),ft(Lu,"port",Ku("getPort","setPort")),ft(Lu,"pathname",Ku("getPathname","setPathname")),ft(Lu,"search",Ku("getSearch","setSearch")),ft(Lu,"searchParams",Ku("getSearchParams")),ft(Lu,"hash",Ku("getHash","setHash"))),dt(Lu,"toJSON",function(){return Ft(this).serialize()},{enumerable:!0}),dt(Lu,"toString",function(){return Ft(this).serialize()},{enumerable:!0}),Kt){var uu=Kt.createObjectURL,en=Kt.revokeObjectURL;uu&&dt(Gu,"createObjectURL",nt(uu,Kt)),en&&dt(Gu,"revokeObjectURL",nt(en,Kt))}return wt(Gu,"URL"),et({global:!0,constructor:!0,forced:!tt,sham:!_e},{URL:Gu}),web_url_constructor}var hasRequiredWeb_url;function requireWeb_url(){return hasRequiredWeb_url||(hasRequiredWeb_url=1,requireWeb_url_constructor()),web_url}var es_string_search={},sameValue,hasRequiredSameValue;function requireSameValue(){return hasRequiredSameValue||(hasRequiredSameValue=1,sameValue=Object.is||function(_e,tt){return _e===tt?_e!==0||1/_e===1/tt:_e!==_e&&tt!==tt}),sameValue}var hasRequiredEs_string_search;function requireEs_string_search(){if(hasRequiredEs_string_search)return es_string_search;hasRequiredEs_string_search=1;var et=requireFunctionCall(),_e=requireFixRegexpWellKnownSymbolLogic(),tt=requireAnObject(),rt=requireIsObject(),nt=requireRequireObjectCoercible(),st=requireSameValue(),dt=requireToString(),ft=requireGetMethod(),ht=requireRegexpExecAbstract();return _e("search",function(mt,bt,St){return[function(Ct){var Rt=nt(this),Tt=rt(Ct)?ft(Ct,mt):void 0;return Tt?et(Tt,Ct,Rt):new RegExp(Ct)[mt](dt(Rt))},function(Et){var Ct=tt(this),Rt=dt(Et),Tt=St(bt,Ct,Rt);if(Tt.done)return Tt.value;var wt=Ct.lastIndex;st(wt,0)||(Ct.lastIndex=0);var At=ht(Ct,Rt);return st(Ct.lastIndex,wt)||(Ct.lastIndex=wt),At===null?-1:At.index}]}),es_string_search}var es_array_isArray={},hasRequiredEs_array_isArray;function requireEs_array_isArray(){if(hasRequiredEs_array_isArray)return es_array_isArray;hasRequiredEs_array_isArray=1;var et=require_export(),_e=requireIsArray();return et({target:"Array",stat:!0},{isArray:_e}),es_array_isArray}var es_regexp_constructor={},isRegexp,hasRequiredIsRegexp;function requireIsRegexp(){if(hasRequiredIsRegexp)return isRegexp;hasRequiredIsRegexp=1;var et=requireIsObject(),_e=requireClassofRaw(),tt=requireWellKnownSymbol(),rt=tt("match");return isRegexp=function(nt){var st;return et(nt)&&((st=nt[rt])!==void 0?!!st:_e(nt)==="RegExp")},isRegexp}var proxyAccessor,hasRequiredProxyAccessor;function requireProxyAccessor(){if(hasRequiredProxyAccessor)return proxyAccessor;hasRequiredProxyAccessor=1;var et=requireObjectDefineProperty().f;return proxyAccessor=function(_e,tt,rt){rt in _e||et(_e,rt,{configurable:!0,get:function(){return tt[rt]},set:function(nt){tt[rt]=nt}})},proxyAccessor}var hasRequiredEs_regexp_constructor;function requireEs_regexp_constructor(){if(hasRequiredEs_regexp_constructor)return es_regexp_constructor;hasRequiredEs_regexp_constructor=1;var et=requireDescriptors(),_e=requireGlobalThis(),tt=requireFunctionUncurryThis(),rt=requireIsForced(),nt=requireInheritIfRequired(),st=requireCreateNonEnumerableProperty(),dt=requireObjectCreate(),ft=requireObjectGetOwnPropertyNames().f,ht=requireObjectIsPrototypeOf(),mt=requireIsRegexp(),bt=requireToString(),St=requireRegexpGetFlags(),Et=requireRegexpStickyHelpers(),Ct=requireProxyAccessor(),Rt=requireDefineBuiltIn(),Tt=requireFails(),wt=requireHasOwnProperty(),At=requireInternalState().enforce,Nt=requireSetSpecies(),Pt=requireWellKnownSymbol(),It=requireRegexpUnsupportedDotAll(),Ft=requireRegexpUnsupportedNcg(),qt=Pt("match"),Vt=_e.RegExp,Kt=Vt.prototype,jt=_e.SyntaxError,Ut=tt(Kt.exec),Ot=tt("".charAt),Wt=tt("".replace),Bt=tt("".indexOf),tr=tt("".slice),Jt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ar=/a/g,pr=/a/g,cr=new Vt(ar)!==ar,gr=Et.MISSED_STICKY,Sr=Et.UNSUPPORTED_Y,Er=et&&(!cr||gr||It||Ft||Tt(function(){return pr[qt]=!1,Vt(ar)!==ar||Vt(pr)===pr||String(Vt(ar,"i"))!=="/a/i"})),Vr=function(Or){for(var Ar=Or.length,Qr=0,hn="",Sn=!1,Kr;Qr<=Ar;Qr++){if(Kr=Ot(Or,Qr),Kr==="\\"){hn+=Kr+Ot(Or,++Qr);continue}!Sn&&Kr==="."?hn+="[\\s\\S]":(Kr==="["?Sn=!0:Kr==="]"&&(Sn=!1),hn+=Kr)}return hn},Wr=function(Or){for(var Ar=Or.length,Qr=0,hn="",Sn=[],Kr=dt(null),Hn=!1,ln=!1,kn=0,xn="",An;Qr<=Ar;Qr++){if(An=Ot(Or,Qr),An==="\\")An+=Ot(Or,++Qr);else if(An==="]")Hn=!1;else if(!Hn)switch(!0){case An==="[":Hn=!0;break;case An==="(":if(hn+=An,tr(Or,Qr+1,Qr+3)==="?:")continue;Ut(Jt,tr(Or,Qr+1))&&(Qr+=2,ln=!0),kn++;continue;case(An===">"&&ln):if(xn===""||wt(Kr,xn))throw new jt("Invalid capture group name");Kr[xn]=!0,Sn[Sn.length]=[xn,kn],ln=!1,xn="";continue}ln?xn+=An:hn+=An}return[hn,Sn]};if(rt("RegExp",Er)){for(var Mr=function(Ar,Qr){var hn=ht(Kt,this),Sn=mt(Ar),Kr=Qr===void 0,Hn=[],ln=Ar,kn,xn,An,rs,qs,Ln;if(!hn&&Sn&&Kr&&Ar.constructor===Mr)return Ar;if((Sn||ht(Kt,Ar))&&(Ar=Ar.source,Kr&&(Qr=St(ln))),Ar=Ar===void 0?"":bt(Ar),Qr=Qr===void 0?"":bt(Qr),ln=Ar,It&&"dotAll"in ar&&(xn=!!Qr&&Bt(Qr,"s")>-1,xn&&(Qr=Wt(Qr,/s/g,""))),kn=Qr,gr&&"sticky"in ar&&(An=!!Qr&&Bt(Qr,"y")>-1,An&&Sr&&(Qr=Wt(Qr,/y/g,""))),Ft&&(rs=Wr(Ar),Ar=rs[0],Hn=rs[1]),qs=nt(Vt(Ar,Qr),hn?this:Kt,Mr),(xn||An||Hn.length)&&(Ln=At(qs),xn&&(Ln.dotAll=!0,Ln.raw=Mr(Vr(Ar),kn)),An&&(Ln.sticky=!0),Hn.length&&(Ln.groups=Hn)),Ar!==ln)try{st(qs,"source",ln===""?"(?:)":ln)}catch{}return qs},Nr=ft(Vt),Yr=0;Nr.length>Yr;)Ct(Mr,Vt,Nr[Yr++]);Kt.constructor=Mr,Mr.prototype=Kt,Rt(_e,"RegExp",Mr,{constructor:!0})}return Nt("RegExp"),es_regexp_constructor}var es_symbol_description={},hasRequiredEs_symbol_description;function requireEs_symbol_description(){if(hasRequiredEs_symbol_description)return es_symbol_description;hasRequiredEs_symbol_description=1;var et=require_export(),_e=requireDescriptors(),tt=requireGlobalThis(),rt=requireFunctionUncurryThis(),nt=requireHasOwnProperty(),st=requireIsCallable(),dt=requireObjectIsPrototypeOf(),ft=requireToString(),ht=requireDefineBuiltInAccessor(),mt=requireCopyConstructorProperties(),bt=tt.Symbol,St=bt&&bt.prototype;if(_e&&st(bt)&&(!("description"in St)||bt().description!==void 0)){var Et={},Ct=function(){var Ft=arguments.length<1||arguments[0]===void 0?void 0:ft(arguments[0]),qt=dt(St,this)?new bt(Ft):Ft===void 0?bt():bt(Ft);return Ft===""&&(Et[qt]=!0),qt};mt(Ct,bt),Ct.prototype=St,St.constructor=Ct;var Rt=String(bt("description detection"))==="Symbol(description detection)",Tt=rt(St.valueOf),wt=rt(St.toString),At=/^Symbol\((.*)\)[^)]+$/,Nt=rt("".replace),Pt=rt("".slice);ht(St,"description",{configurable:!0,get:function(){var Ft=Tt(this);if(nt(Et,Ft))return"";var qt=wt(Ft),Vt=Rt?Pt(qt,7,-1):Nt(qt,At,"$1");return Vt===""?void 0:Vt}}),et({global:!0,constructor:!0,forced:!0},{Symbol:Ct})}return es_symbol_description}var es_array_findIndex={},hasRequiredEs_array_findIndex;function requireEs_array_findIndex(){if(hasRequiredEs_array_findIndex)return es_array_findIndex;hasRequiredEs_array_findIndex=1;var et=require_export(),_e=requireArrayIteration().findIndex,tt=requireAddToUnscopables(),rt="findIndex",nt=!0;return rt in[]&&Array(1)[rt](function(){nt=!1}),et({target:"Array",proto:!0,forced:nt},{findIndex:function(dt){return _e(this,dt,arguments.length>1?arguments[1]:void 0)}}),tt(rt),es_array_findIndex}var es_object_seal={},hasRequiredEs_object_seal;function requireEs_object_seal(){if(hasRequiredEs_object_seal)return es_object_seal;hasRequiredEs_object_seal=1;var et=require_export(),_e=requireIsObject(),tt=requireInternalMetadata().onFreeze,rt=requireFreezing(),nt=requireFails(),st=Object.seal,dt=nt(function(){st(1)});return et({target:"Object",stat:!0,forced:dt,sham:!rt},{seal:function(ht){return st&&_e(ht)?st(tt(ht)):ht}}),es_object_seal}var es_object_assign={},hasRequiredEs_object_assign;function requireEs_object_assign(){if(hasRequiredEs_object_assign)return es_object_assign;hasRequiredEs_object_assign=1;var et=require_export(),_e=requireObjectAssign$1();return et({target:"Object",stat:!0,arity:2,forced:Object.assign!==_e},{assign:_e}),es_object_assign}var es_number_isFinite={},numberIsFinite,hasRequiredNumberIsFinite;function requireNumberIsFinite(){if(hasRequiredNumberIsFinite)return numberIsFinite;hasRequiredNumberIsFinite=1;var et=requireGlobalThis(),_e=et.isFinite;return numberIsFinite=Number.isFinite||function(rt){return typeof rt=="number"&&_e(rt)},numberIsFinite}var hasRequiredEs_number_isFinite;function requireEs_number_isFinite(){if(hasRequiredEs_number_isFinite)return es_number_isFinite;hasRequiredEs_number_isFinite=1;var et=require_export(),_e=requireNumberIsFinite();return et({target:"Number",stat:!0},{isFinite:_e}),es_number_isFinite}var es_number_isInteger={},hasRequiredEs_number_isInteger;function requireEs_number_isInteger(){if(hasRequiredEs_number_isInteger)return es_number_isInteger;hasRequiredEs_number_isInteger=1;var et=require_export(),_e=requireIsIntegralNumber();return et({target:"Number",stat:!0},{isInteger:_e}),es_number_isInteger}var es_number_parseFloat={},numberParseFloat,hasRequiredNumberParseFloat;function requireNumberParseFloat(){if(hasRequiredNumberParseFloat)return numberParseFloat;hasRequiredNumberParseFloat=1;var et=requireGlobalThis(),_e=requireFails(),tt=requireFunctionUncurryThis(),rt=requireToString(),nt=requireStringTrim().trim,st=requireWhitespaces(),dt=tt("".charAt),ft=et.parseFloat,ht=et.Symbol,mt=ht&&ht.iterator,bt=1/ft(st+"-0")!==-1/0||mt&&!_e(function(){ft(Object(mt))});return numberParseFloat=bt?function(Et){var Ct=nt(rt(Et)),Rt=ft(Ct);return Rt===0&&dt(Ct,0)==="-"?-0:Rt}:ft,numberParseFloat}var hasRequiredEs_number_parseFloat;function requireEs_number_parseFloat(){if(hasRequiredEs_number_parseFloat)return es_number_parseFloat;hasRequiredEs_number_parseFloat=1;var et=require_export(),_e=requireNumberParseFloat();return et({target:"Number",stat:!0,forced:Number.parseFloat!==_e},{parseFloat:_e}),es_number_parseFloat}var es_number_parseInt={},hasRequiredEs_number_parseInt;function requireEs_number_parseInt(){if(hasRequiredEs_number_parseInt)return es_number_parseInt;hasRequiredEs_number_parseInt=1;var et=require_export(),_e=requireNumberParseInt();return et({target:"Number",stat:!0,forced:Number.parseInt!==_e},{parseInt:_e}),es_number_parseInt}var es_date_toJson={},hasRequiredEs_date_toJson;function requireEs_date_toJson(){if(hasRequiredEs_date_toJson)return es_date_toJson;hasRequiredEs_date_toJson=1;var et=require_export(),_e=requireFails(),tt=requireToObject(),rt=requireToPrimitive$1(),nt=_e(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});return et({target:"Date",proto:!0,arity:1,forced:nt},{toJSON:function(dt){var ft=tt(this),ht=rt(ft,"number");return typeof ht=="number"&&!isFinite(ht)?null:ft.toISOString()}}),es_date_toJson}var web_url_toJson={},hasRequiredWeb_url_toJson;function requireWeb_url_toJson(){if(hasRequiredWeb_url_toJson)return web_url_toJson;hasRequiredWeb_url_toJson=1;var et=require_export(),_e=requireFunctionCall();return et({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return _e(URL.prototype.toString,this)}}),web_url_toJson}var es_symbol_iterator={},hasRequiredEs_symbol_iterator;function requireEs_symbol_iterator(){if(hasRequiredEs_symbol_iterator)return es_symbol_iterator;hasRequiredEs_symbol_iterator=1;var et=requireWellKnownSymbolDefine();return et("iterator"),es_symbol_iterator}var es_array_every={},hasRequiredEs_array_every;function requireEs_array_every(){if(hasRequiredEs_array_every)return es_array_every;hasRequiredEs_array_every=1;var et=require_export(),_e=requireArrayIteration().every,tt=requireArrayMethodIsStrict(),rt=tt("every");return et({target:"Array",proto:!0,forced:!rt},{every:function(st){return _e(this,st,arguments.length>1?arguments[1]:void 0)}}),es_array_every}var es_array_lastIndexOf={},hasRequiredEs_array_lastIndexOf;function requireEs_array_lastIndexOf(){if(hasRequiredEs_array_lastIndexOf)return es_array_lastIndexOf;hasRequiredEs_array_lastIndexOf=1;var et=require_export(),_e=requireArrayLastIndexOf();return et({target:"Array",proto:!0,forced:_e!==[].lastIndexOf},{lastIndexOf:_e}),es_array_lastIndexOf}var es_array_reduce={},hasRequiredEs_array_reduce;function requireEs_array_reduce(){if(hasRequiredEs_array_reduce)return es_array_reduce;hasRequiredEs_array_reduce=1;var et=require_export(),_e=requireArrayReduce().left,tt=requireArrayMethodIsStrict(),rt=requireEnvironmentV8Version(),nt=requireEnvironmentIsNode(),st=!nt&&rt>79&&rt<83,dt=st||!tt("reduce");return et({target:"Array",proto:!0,forced:dt},{reduce:function(ht){var mt=arguments.length;return _e(this,ht,mt,mt>1?arguments[1]:void 0)}}),es_array_reduce}var es_array_reduceRight={},hasRequiredEs_array_reduceRight;function requireEs_array_reduceRight(){if(hasRequiredEs_array_reduceRight)return es_array_reduceRight;hasRequiredEs_array_reduceRight=1;var et=require_export(),_e=requireArrayReduce().right,tt=requireArrayMethodIsStrict(),rt=requireEnvironmentV8Version(),nt=requireEnvironmentIsNode(),st=!nt&&rt>79&&rt<83,dt=st||!tt("reduceRight");return et({target:"Array",proto:!0,forced:dt},{reduceRight:function(ht){return _e(this,ht,arguments.length,arguments.length>1?arguments[1]:void 0)}}),es_array_reduceRight}var es_string_anchor={},createHtml,hasRequiredCreateHtml;function requireCreateHtml(){if(hasRequiredCreateHtml)return createHtml;hasRequiredCreateHtml=1;var et=requireFunctionUncurryThis(),_e=requireRequireObjectCoercible(),tt=requireToString(),rt=/"/g,nt=et("".replace);return createHtml=function(st,dt,ft,ht){var mt=tt(_e(st)),bt="<"+dt;return ft!==""&&(bt+=" "+ft+'="'+nt(tt(ht),rt,"&quot;")+'"'),bt+">"+mt+"</"+dt+">"},createHtml}var stringHtmlForced,hasRequiredStringHtmlForced;function requireStringHtmlForced(){if(hasRequiredStringHtmlForced)return stringHtmlForced;hasRequiredStringHtmlForced=1;var et=requireFails();return stringHtmlForced=function(_e){return et(function(){var tt=""[_e]('"');return tt!==tt.toLowerCase()||tt.split('"').length>3})},stringHtmlForced}var hasRequiredEs_string_anchor;function requireEs_string_anchor(){if(hasRequiredEs_string_anchor)return es_string_anchor;hasRequiredEs_string_anchor=1;var et=require_export(),_e=requireCreateHtml(),tt=requireStringHtmlForced();return et({target:"String",proto:!0,forced:tt("anchor")},{anchor:function(nt){return _e(this,"a","name",nt)}}),es_string_anchor}var es_parseFloat={},hasRequiredEs_parseFloat;function requireEs_parseFloat(){if(hasRequiredEs_parseFloat)return es_parseFloat;hasRequiredEs_parseFloat=1;var et=require_export(),_e=requireNumberParseFloat();return et({global:!0,forced:parseFloat!==_e},{parseFloat:_e}),es_parseFloat}var es_array_includes={},hasRequiredEs_array_includes;function requireEs_array_includes(){if(hasRequiredEs_array_includes)return es_array_includes;hasRequiredEs_array_includes=1;var et=require_export(),_e=requireArrayIncludes().includes,tt=requireFails(),rt=requireAddToUnscopables(),nt=tt(function(){return!Array(1).includes()});return et({target:"Array",proto:!0,forced:nt},{includes:function(dt){return _e(this,dt,arguments.length>1?arguments[1]:void 0)}}),rt("includes"),es_array_includes}var es_string_includes={},notARegexp,hasRequiredNotARegexp;function requireNotARegexp(){if(hasRequiredNotARegexp)return notARegexp;hasRequiredNotARegexp=1;var et=requireIsRegexp(),_e=TypeError;return notARegexp=function(tt){if(et(tt))throw new _e("The method doesn't accept regular expressions");return tt},notARegexp}var correctIsRegexpLogic,hasRequiredCorrectIsRegexpLogic;function requireCorrectIsRegexpLogic(){if(hasRequiredCorrectIsRegexpLogic)return correctIsRegexpLogic;hasRequiredCorrectIsRegexpLogic=1;var et=requireWellKnownSymbol(),_e=et("match");return correctIsRegexpLogic=function(tt){var rt=/./;try{"/./"[tt](rt)}catch{try{return rt[_e]=!1,"/./"[tt](rt)}catch{}}return!1},correctIsRegexpLogic}var hasRequiredEs_string_includes;function requireEs_string_includes(){if(hasRequiredEs_string_includes)return es_string_includes;hasRequiredEs_string_includes=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireNotARegexp(),rt=requireRequireObjectCoercible(),nt=requireToString(),st=requireCorrectIsRegexpLogic(),dt=_e("".indexOf);return et({target:"String",proto:!0,forced:!st("includes")},{includes:function(ht){return!!~dt(nt(rt(this)),nt(tt(ht)),arguments.length>1?arguments[1]:void 0)}}),es_string_includes}var es_number_minSafeInteger={},hasRequiredEs_number_minSafeInteger;function requireEs_number_minSafeInteger(){if(hasRequiredEs_number_minSafeInteger)return es_number_minSafeInteger;hasRequiredEs_number_minSafeInteger=1;var et=require_export();return et({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991}),es_number_minSafeInteger}var es_array_reverse={},hasRequiredEs_array_reverse;function requireEs_array_reverse(){if(hasRequiredEs_array_reverse)return es_array_reverse;hasRequiredEs_array_reverse=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireIsArray(),rt=_e([].reverse),nt=[1,2];return et({target:"Array",proto:!0,forced:String(nt)===String(nt.reverse())},{reverse:function(){return tt(this)&&(this.length=this.length),rt(this)}}),es_array_reverse}var es_set={},es_set_constructor={},hasRequiredEs_set_constructor;function requireEs_set_constructor(){if(hasRequiredEs_set_constructor)return es_set_constructor;hasRequiredEs_set_constructor=1;var et=requireCollection$1(),_e=requireCollectionStrong();return et("Set",function(tt){return function(){return tt(this,arguments.length?arguments[0]:void 0)}},_e),es_set_constructor}var hasRequiredEs_set;function requireEs_set(){return hasRequiredEs_set||(hasRequiredEs_set=1,requireEs_set_constructor()),es_set}var es_string_repeat={},stringRepeat,hasRequiredStringRepeat;function requireStringRepeat(){if(hasRequiredStringRepeat)return stringRepeat;hasRequiredStringRepeat=1;var et=requireToIntegerOrInfinity(),_e=requireToString(),tt=requireRequireObjectCoercible(),rt=RangeError;return stringRepeat=function(st){var dt=_e(tt(this)),ft="",ht=et(st);if(ht<0||ht===1/0)throw new rt("Wrong number of repetitions");for(;ht>0;(ht>>>=1)&&(dt+=dt))ht&1&&(ft+=dt);return ft},stringRepeat}var hasRequiredEs_string_repeat;function requireEs_string_repeat(){if(hasRequiredEs_string_repeat)return es_string_repeat;hasRequiredEs_string_repeat=1;var et=require_export(),_e=requireStringRepeat();return et({target:"String",proto:!0},{repeat:_e}),es_string_repeat}var es_number_toFixed={},hasRequiredEs_number_toFixed;function requireEs_number_toFixed(){if(hasRequiredEs_number_toFixed)return es_number_toFixed;hasRequiredEs_number_toFixed=1;var et=require_export(),_e=requireFunctionUncurryThis(),tt=requireToIntegerOrInfinity(),rt=requireThisNumberValue(),nt=requireStringRepeat(),st=requireFails(),dt=RangeError,ft=String,ht=Math.floor,mt=_e(nt),bt=_e("".slice),St=_e(1.1.toFixed),Et=function(Nt,Pt,It){return Pt===0?It:Pt%2===1?Et(Nt,Pt-1,It*Nt):Et(Nt*Nt,Pt/2,It)},Ct=function(Nt){for(var Pt=0,It=Nt;It>=4096;)Pt+=12,It/=4096;for(;It>=2;)Pt+=1,It/=2;return Pt},Rt=function(Nt,Pt,It){for(var Ft=-1,qt=It;++Ft<6;)qt+=Pt*Nt[Ft],Nt[Ft]=qt%1e7,qt=ht(qt/1e7)},Tt=function(Nt,Pt){for(var It=6,Ft=0;--It>=0;)Ft+=Nt[It],Nt[It]=ht(Ft/Pt),Ft=Ft%Pt*1e7},wt=function(Nt){for(var Pt=6,It="";--Pt>=0;)if(It!==""||Pt===0||Nt[Pt]!==0){var Ft=ft(Nt[Pt]);It=It===""?Ft:It+mt("0",7-Ft.length)+Ft}return It},At=st(function(){return St(8e-5,3)!=="0.000"||St(.9,0)!=="1"||St(1.255,2)!=="1.25"||St(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!st(function(){St({})});return et({target:"Number",proto:!0,forced:At},{toFixed:function(Pt){var It=rt(this),Ft=tt(Pt),qt=[0,0,0,0,0,0],Vt="",Kt="0",jt,Ut,Ot,Wt;if(Ft<0||Ft>20)throw new dt("Incorrect fraction digits");if(It!==It)return"NaN";if(It<=-1e21||It>=1e21)return ft(It);if(It<0&&(Vt="-",It=-It),It>1e-21)if(jt=Ct(It*Et(2,69,1))-69,Ut=jt<0?It*Et(2,-jt,1):It/Et(2,jt,1),Ut*=4503599627370496,jt=52-jt,jt>0){for(Rt(qt,0,Ut),Ot=Ft;Ot>=7;)Rt(qt,1e7,0),Ot-=7;for(Rt(qt,Et(10,Ot,1),0),Ot=jt-1;Ot>=23;)Tt(qt,1<<23),Ot-=23;Tt(qt,1<<Ot),Rt(qt,1,1),Tt(qt,2),Kt=wt(qt)}else Rt(qt,0,Ut),Rt(qt,1<<-jt,0),Kt=wt(qt)+mt("0",Ft);return Ft>0?(Wt=Kt.length,Kt=Vt+(Wt<=Ft?"0."+mt("0",Ft-Wt)+Kt:bt(Kt,0,Wt-Ft)+"."+bt(Kt,Wt-Ft))):Kt=Vt+Kt,Kt}}),es_number_toFixed}var es_string_endsWith={},hasRequiredEs_string_endsWith;function requireEs_string_endsWith(){if(hasRequiredEs_string_endsWith)return es_string_endsWith;hasRequiredEs_string_endsWith=1;var et=require_export(),_e=requireFunctionUncurryThisClause(),tt=requireObjectGetOwnPropertyDescriptor().f,rt=requireToLength(),nt=requireToString(),st=requireNotARegexp(),dt=requireRequireObjectCoercible(),ft=requireCorrectIsRegexpLogic(),ht=requireIsPure(),mt=_e("".slice),bt=Math.min,St=ft("endsWith"),Et=!ht&&!St&&!!(function(){var Ct=tt(String.prototype,"endsWith");return Ct&&!Ct.writable})();return et({target:"String",proto:!0,forced:!Et&&!St},{endsWith:function(Rt){var Tt=nt(dt(this));st(Rt);var wt=arguments.length>1?arguments[1]:void 0,At=Tt.length,Nt=wt===void 0?At:bt(rt(wt),At),Pt=nt(Rt);return mt(Tt,Nt-Pt.length,Nt)===Pt}}),es_string_endsWith}var es_string_startsWith={},hasRequiredEs_string_startsWith;function requireEs_string_startsWith(){if(hasRequiredEs_string_startsWith)return es_string_startsWith;hasRequiredEs_string_startsWith=1;var et=require_export(),_e=requireFunctionUncurryThisClause(),tt=requireObjectGetOwnPropertyDescriptor().f,rt=requireToLength(),nt=requireToString(),st=requireNotARegexp(),dt=requireRequireObjectCoercible(),ft=requireCorrectIsRegexpLogic(),ht=requireIsPure(),mt=_e("".slice),bt=Math.min,St=ft("startsWith"),Et=!ht&&!St&&!!(function(){var Ct=tt(String.prototype,"startsWith");return Ct&&!Ct.writable})();return et({target:"String",proto:!0,forced:!Et&&!St},{startsWith:function(Rt){var Tt=nt(dt(this));st(Rt);var wt=rt(bt(arguments.length>1?arguments[1]:void 0,Tt.length)),At=nt(Rt);return mt(Tt,wt,wt+At.length)===At}}),es_string_startsWith}var es_weakSet={},es_weakSet_constructor={},collectionWeak,hasRequiredCollectionWeak;function requireCollectionWeak(){if(hasRequiredCollectionWeak)return collectionWeak;hasRequiredCollectionWeak=1;var et=requireFunctionUncurryThis(),_e=requireDefineBuiltIns(),tt=requireInternalMetadata().getWeakData,rt=requireAnInstance(),nt=requireAnObject(),st=requireIsNullOrUndefined(),dt=requireIsObject(),ft=requireIterate(),ht=requireArrayIteration(),mt=requireHasOwnProperty(),bt=requireInternalState(),St=bt.set,Et=bt.getterFor,Ct=ht.find,Rt=ht.findIndex,Tt=et([].splice),wt=0,At=function(It){return It.frozen||(It.frozen=new Nt)},Nt=function(){this.entries=[]},Pt=function(It,Ft){return Ct(It.entries,function(qt){return qt[0]===Ft})};return Nt.prototype={get:function(It){var Ft=Pt(this,It);if(Ft)return Ft[1]},has:function(It){return!!Pt(this,It)},set:function(It,Ft){var qt=Pt(this,It);qt?qt[1]=Ft:this.entries.push([It,Ft])},delete:function(It){var Ft=Rt(this.entries,function(qt){return qt[0]===It});return~Ft&&Tt(this.entries,Ft,1),!!~Ft}},collectionWeak={getConstructor:function(It,Ft,qt,Vt){var Kt=It(function(Wt,Bt){rt(Wt,jt),St(Wt,{type:Ft,id:wt++,frozen:null}),st(Bt)||ft(Bt,Wt[Vt],{that:Wt,AS_ENTRIES:qt})}),jt=Kt.prototype,Ut=Et(Ft),Ot=function(Wt,Bt,tr){var Jt=Ut(Wt),ar=tt(nt(Bt),!0);return ar===!0?At(Jt).set(Bt,tr):ar[Jt.id]=tr,Wt};return _e(jt,{delete:function(Wt){var Bt=Ut(this);if(!dt(Wt))return!1;var tr=tt(Wt);return tr===!0?At(Bt).delete(Wt):tr&&mt(tr,Bt.id)&&delete tr[Bt.id]},has:function(Bt){var tr=Ut(this);if(!dt(Bt))return!1;var Jt=tt(Bt);return Jt===!0?At(tr).has(Bt):Jt&&mt(Jt,tr.id)}}),_e(jt,qt?{get:function(Bt){var tr=Ut(this);if(dt(Bt)){var Jt=tt(Bt);if(Jt===!0)return At(tr).get(Bt);if(Jt)return Jt[tr.id]}},set:function(Bt,tr){return Ot(this,Bt,tr)}}:{add:function(Bt){return Ot(this,Bt,!0)}}),Kt}},collectionWeak}var hasRequiredEs_weakSet_constructor;function requireEs_weakSet_constructor(){if(hasRequiredEs_weakSet_constructor)return es_weakSet_constructor;hasRequiredEs_weakSet_constructor=1;var et=requireCollection$1(),_e=requireCollectionWeak();return et("WeakSet",function(tt){return function(){return tt(this,arguments.length?arguments[0]:void 0)}},_e),es_weakSet_constructor}var hasRequiredEs_weakSet;function requireEs_weakSet(){return hasRequiredEs_weakSet||(hasRequiredEs_weakSet=1,requireEs_weakSet_constructor()),es_weakSet}var es_string_trim={},stringTrimForced,hasRequiredStringTrimForced;function requireStringTrimForced(){if(hasRequiredStringTrimForced)return stringTrimForced;hasRequiredStringTrimForced=1;var et=requireFunctionName().PROPER,_e=requireFails(),tt=requireWhitespaces(),rt="…";return stringTrimForced=function(nt){return _e(function(){return!!tt[nt]()||rt[nt]()!==rt||et&&tt[nt].name!==nt})},stringTrimForced}var hasRequiredEs_string_trim;function requireEs_string_trim(){if(hasRequiredEs_string_trim)return es_string_trim;hasRequiredEs_string_trim=1;var et=require_export(),_e=requireStringTrim().trim,tt=requireStringTrimForced();return et({target:"String",proto:!0,forced:tt("trim")},{trim:function(){return _e(this)}}),es_string_trim}var es_weakMap={},es_weakMap_constructor={},hasRequiredEs_weakMap_constructor;function requireEs_weakMap_constructor(){if(hasRequiredEs_weakMap_constructor)return es_weakMap_constructor;hasRequiredEs_weakMap_constructor=1;var et=requireFreezing(),_e=requireGlobalThis(),tt=requireFunctionUncurryThis(),rt=requireDefineBuiltIns(),nt=requireInternalMetadata(),st=requireCollection$1(),dt=requireCollectionWeak(),ft=requireIsObject(),ht=requireInternalState().enforce,mt=requireFails(),bt=requireWeakMapBasicDetection(),St=Object,Et=Array.isArray,Ct=St.isExtensible,Rt=St.isFrozen,Tt=St.isSealed,wt=St.freeze,At=St.seal,Nt=!_e.ActiveXObject&&"ActiveXObject"in _e,Pt,It=function(Wt){return function(){return Wt(this,arguments.length?arguments[0]:void 0)}},Ft=st("WeakMap",It,dt),qt=Ft.prototype,Vt=tt(qt.set),Kt=function(){return et&&mt(function(){var Wt=wt([]);return Vt(new Ft,Wt,1),!Rt(Wt)})};if(bt)if(Nt){Pt=dt.getConstructor(It,"WeakMap",!0),nt.enable();var jt=tt(qt.delete),Ut=tt(qt.has),Ot=tt(qt.get);rt(qt,{delete:function(Wt){if(ft(Wt)&&!Ct(Wt)){var Bt=ht(this);return Bt.frozen||(Bt.frozen=new Pt),jt(this,Wt)||Bt.frozen.delete(Wt)}return jt(this,Wt)},has:function(Bt){if(ft(Bt)&&!Ct(Bt)){var tr=ht(this);return tr.frozen||(tr.frozen=new Pt),Ut(this,Bt)||tr.frozen.has(Bt)}return Ut(this,Bt)},get:function(Bt){if(ft(Bt)&&!Ct(Bt)){var tr=ht(this);return tr.frozen||(tr.frozen=new Pt),Ut(this,Bt)?Ot(this,Bt):tr.frozen.get(Bt)}return Ot(this,Bt)},set:function(Bt,tr){if(ft(Bt)&&!Ct(Bt)){var Jt=ht(this);Jt.frozen||(Jt.frozen=new Pt),Ut(this,Bt)?Vt(this,Bt,tr):Jt.frozen.set(Bt,tr)}else Vt(this,Bt,tr);return this}})}else Kt()&&rt(qt,{set:function(Bt,tr){var Jt;return Et(Bt)&&(Rt(Bt)?Jt=wt:Tt(Bt)&&(Jt=At)),Vt(this,Bt,tr),Jt&&Jt(Bt),this}});return es_weakMap_constructor}var hasRequiredEs_weakMap;function requireEs_weakMap(){return hasRequiredEs_weakMap||(hasRequiredEs_weakMap=1,requireEs_weakMap_constructor()),es_weakMap}var es_array_from={},hasRequiredEs_array_from;function requireEs_array_from(){if(hasRequiredEs_array_from)return es_array_from;hasRequiredEs_array_from=1;var et=require_export(),_e=requireArrayFrom(),tt=requireCheckCorrectnessOfIteration(),rt=!tt(function(nt){Array.from(nt)});return et({target:"Array",stat:!0,forced:rt},{from:_e}),es_array_from}var es_string_italics={},hasRequiredEs_string_italics;function requireEs_string_italics(){if(hasRequiredEs_string_italics)return es_string_italics;hasRequiredEs_string_italics=1;var et=require_export(),_e=requireCreateHtml(),tt=requireStringHtmlForced();return et({target:"String",proto:!0,forced:tt("italics")},{italics:function(){return _e(this,"i","","")}}),es_string_italics}var es_string_bold={},hasRequiredEs_string_bold;function requireEs_string_bold(){if(hasRequiredEs_string_bold)return es_string_bold;hasRequiredEs_string_bold=1;var et=require_export(),_e=requireCreateHtml(),tt=requireStringHtmlForced();return et({target:"String",proto:!0,forced:tt("bold")},{bold:function(){return _e(this,"b","","")}}),es_string_bold}var es_string_codePointAt={},hasRequiredEs_string_codePointAt;function requireEs_string_codePointAt(){if(hasRequiredEs_string_codePointAt)return es_string_codePointAt;hasRequiredEs_string_codePointAt=1;var et=require_export(),_e=requireStringMultibyte().codeAt;return et({target:"String",proto:!0},{codePointAt:function(rt){return _e(this,rt)}}),es_string_codePointAt}var es_string_padStart={},stringPad,hasRequiredStringPad;function requireStringPad(){if(hasRequiredStringPad)return stringPad;hasRequiredStringPad=1;var et=requireFunctionUncurryThis(),_e=requireToLength(),tt=requireToString(),rt=requireStringRepeat(),nt=requireRequireObjectCoercible(),st=et(rt),dt=et("".slice),ft=Math.ceil,ht=function(mt){return function(bt,St,Et){var Ct=tt(nt(bt)),Rt=_e(St),Tt=Ct.length,wt=Et===void 0?" ":tt(Et),At,Nt;return Rt<=Tt||wt===""?Ct:(At=Rt-Tt,Nt=st(wt,ft(At/wt.length)),Nt.length>At&&(Nt=dt(Nt,0,At)),mt?Ct+Nt:Nt+Ct)}};return stringPad={start:ht(!1),end:ht(!0)},stringPad}var stringPadWebkitBug,hasRequiredStringPadWebkitBug;function requireStringPadWebkitBug(){if(hasRequiredStringPadWebkitBug)return stringPadWebkitBug;hasRequiredStringPadWebkitBug=1;var et=requireEnvironmentUserAgent();return stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(et),stringPadWebkitBug}var hasRequiredEs_string_padStart;function requireEs_string_padStart(){if(hasRequiredEs_string_padStart)return es_string_padStart;hasRequiredEs_string_padStart=1;var et=require_export(),_e=requireStringPad().start,tt=requireStringPadWebkitBug();return et({target:"String",proto:!0,forced:tt},{padStart:function(nt){return _e(this,nt,arguments.length>1?arguments[1]:void 0)}}),es_string_padStart}var es_string_link={},hasRequiredEs_string_link;function requireEs_string_link(){if(hasRequiredEs_string_link)return es_string_link;hasRequiredEs_string_link=1;var et=require_export(),_e=requireCreateHtml(),tt=requireStringHtmlForced();return et({target:"String",proto:!0,forced:tt("link")},{link:function(nt){return _e(this,"a","href",nt)}}),es_string_link}var es_promise_finally={},hasRequiredEs_promise_finally;function requireEs_promise_finally(){if(hasRequiredEs_promise_finally)return es_promise_finally;hasRequiredEs_promise_finally=1;var et=require_export(),_e=requireIsPure(),tt=requirePromiseNativeConstructor(),rt=requireFails(),nt=requireGetBuiltIn(),st=requireIsCallable(),dt=requireSpeciesConstructor(),ft=requirePromiseResolve(),ht=requireDefineBuiltIn(),mt=tt&&tt.prototype,bt=!!tt&&rt(function(){mt.finally.call({then:function(){}},function(){})});if(et({target:"Promise",proto:!0,real:!0,forced:bt},{finally:function(Et){var Ct=dt(this,nt("Promise")),Rt=st(Et);return this.then(Rt?function(Tt){return ft(Ct,Et()).then(function(){return Tt})}:Et,Rt?function(Tt){return ft(Ct,Et()).then(function(){throw Tt})}:Et)}}),!_e&&st(tt)){var St=nt("Promise").prototype.finally;mt.finally!==St&&ht(mt,"finally",St,{unsafe:!0})}return es_promise_finally}function die(et){for(var _e=arguments.length,tt=new Array(_e>1?_e-1:0),rt=1;rt<_e;rt++)tt[rt-1]=arguments[rt];throw new Error(typeof et=="number"?"[MobX] minified error nr: "+et+(tt.length?" "+tt.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+et)}var mockGlobal={};function getGlobal(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:mockGlobal}var assign$1=Object.assign,getDescriptor$1=Object.getOwnPropertyDescriptor,defineProperty$1=Object.defineProperty,objectPrototype=Object.prototype,EMPTY_ARRAY=[];Object.freeze(EMPTY_ARRAY);var EMPTY_OBJECT={};Object.freeze(EMPTY_OBJECT);var hasProxy=typeof Proxy<"u",plainObjectString=Object.toString();function assertProxies(){hasProxy||die("Proxy not available")}function once(et){var _e=!1;return function(){if(!_e)return _e=!0,et.apply(this,arguments)}}var noop$7=function(){};function isFunction$1(et){return typeof et=="function"}function isStringish(et){var _e=typeof et;switch(_e){case"string":case"symbol":case"number":return!0}return!1}function isObject$4(et){return et!==null&&typeof et=="object"}function isPlainObject(et){if(!isObject$4(et))return!1;var _e=Object.getPrototypeOf(et);if(_e==null)return!0;var tt=Object.hasOwnProperty.call(_e,"constructor")&&_e.constructor;return typeof tt=="function"&&tt.toString()===plainObjectString}function isGenerator(et){var _e=et?.constructor;return _e?_e.name==="GeneratorFunction"||_e.displayName==="GeneratorFunction":!1}function addHiddenProp(et,_e,tt){defineProperty$1(et,_e,{enumerable:!1,writable:!0,configurable:!0,value:tt})}function addHiddenFinalProp(et,_e,tt){defineProperty$1(et,_e,{enumerable:!1,writable:!1,configurable:!0,value:tt})}function createInstanceofPredicate(et,_e){var tt="isMobX"+et;return _e.prototype[tt]=!0,function(rt){return isObject$4(rt)&&rt[tt]===!0}}function isES6Map(et){return et!=null&&Object.prototype.toString.call(et)==="[object Map]"}function isPlainES6Map(et){var _e=Object.getPrototypeOf(et),tt=Object.getPrototypeOf(_e),rt=Object.getPrototypeOf(tt);return rt===null}function isES6Set(et){return et!=null&&Object.prototype.toString.call(et)==="[object Set]"}var hasGetOwnPropertySymbols=typeof Object.getOwnPropertySymbols<"u";function getPlainObjectKeys(et){var _e=Object.keys(et);if(!hasGetOwnPropertySymbols)return _e;var tt=Object.getOwnPropertySymbols(et);return tt.length?[].concat(_e,tt.filter(function(rt){return objectPrototype.propertyIsEnumerable.call(et,rt)})):_e}var ownKeys=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:hasGetOwnPropertySymbols?function(et){return Object.getOwnPropertyNames(et).concat(Object.getOwnPropertySymbols(et))}:Object.getOwnPropertyNames;function toPrimitive$1(et){return et===null?null:typeof et=="object"?""+et:et}function hasProp(et,_e){return objectPrototype.hasOwnProperty.call(et,_e)}var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(_e){var tt={};return ownKeys(_e).forEach(function(rt){tt[rt]=getDescriptor$1(_e,rt)}),tt};function getFlag(et,_e){return!!(et&_e)}function setFlag(et,_e,tt){return tt?et|=_e:et&=~_e,et}function _arrayLikeToArray(et,_e){(_e==null||_e>et.length)&&(_e=et.length);for(var tt=0,rt=Array(_e);tt<_e;tt++)rt[tt]=et[tt];return rt}function _defineProperties(et,_e){for(var tt=0;tt<_e.length;tt++){var rt=_e[tt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(et,_toPropertyKey(rt.key),rt)}}function _createClass(et,_e,tt){return _e&&_defineProperties(et.prototype,_e),Object.defineProperty(et,"prototype",{writable:!1}),et}function _createForOfIteratorHelperLoose(et,_e){var tt=typeof Symbol<"u"&&et[Symbol.iterator]||et["@@iterator"];if(tt)return(tt=tt.call(et)).next.bind(tt);if(Array.isArray(et)||(tt=_unsupportedIterableToArray(et))||_e){tt&&(et=tt);var rt=0;return function(){return rt>=et.length?{done:!0}:{done:!1,value:et[rt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(et){for(var _e=1;_e<arguments.length;_e++){var tt=arguments[_e];for(var rt in tt)({}).hasOwnProperty.call(tt,rt)&&(et[rt]=tt[rt])}return et},_extends$2.apply(null,arguments)}function _inheritsLoose(et,_e){et.prototype=Object.create(_e.prototype),et.prototype.constructor=et,_setPrototypeOf(et,_e)}function _setPrototypeOf(et,_e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(tt,rt){return tt.__proto__=rt,tt},_setPrototypeOf(et,_e)}function _toPrimitive(et,_e){if(typeof et!="object"||!et)return et;var tt=et[Symbol.toPrimitive];if(tt!==void 0){var rt=tt.call(et,_e);if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(et)}function _toPropertyKey(et){var _e=_toPrimitive(et,"string");return typeof _e=="symbol"?_e:_e+""}function _unsupportedIterableToArray(et,_e){if(et){if(typeof et=="string")return _arrayLikeToArray(et,_e);var tt={}.toString.call(et).slice(8,-1);return tt==="Object"&&et.constructor&&(tt=et.constructor.name),tt==="Map"||tt==="Set"?Array.from(et):tt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(tt)?_arrayLikeToArray(et,_e):void 0}}var storedAnnotationsSymbol=Symbol("mobx-stored-annotations");function createDecoratorAnnotation(et){function _e(tt,rt){if(is20223Decorator(rt))return et.decorate_20223_(tt,rt);storeAnnotation(tt,rt,et)}return Object.assign(_e,et)}function storeAnnotation(et,_e,tt){hasProp(et,storedAnnotationsSymbol)||addHiddenProp(et,storedAnnotationsSymbol,_extends$2({},et[storedAnnotationsSymbol])),isOverride(tt)||(et[storedAnnotationsSymbol][_e]=tt)}function collectStoredAnnotations(et){return hasProp(et,storedAnnotationsSymbol)||addHiddenProp(et,storedAnnotationsSymbol,_extends$2({},et[storedAnnotationsSymbol])),et[storedAnnotationsSymbol]}function is20223Decorator(et){return typeof et=="object"&&typeof et.kind=="string"}var $mobx=Symbol("mobx administration"),Atom=(function(){function et(tt){tt===void 0&&(tt="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=tt}var _e=et.prototype;return _e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(rt){return rt()})},_e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(rt){return rt()})},_e.reportObserved=function(){return reportObserved(this)},_e.reportChanged=function(){startBatch(),propagateChanged(this),endBatch()},_e.toString=function(){return this.name_},_createClass(et,[{key:"isBeingObserved",get:function(){return getFlag(this.flags_,et.isBeingObservedMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isBeingObservedMask_,rt)}},{key:"isPendingUnobservation",get:function(){return getFlag(this.flags_,et.isPendingUnobservationMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isPendingUnobservationMask_,rt)}},{key:"diffValue",get:function(){return getFlag(this.flags_,et.diffValueMask_)?1:0},set:function(rt){this.flags_=setFlag(this.flags_,et.diffValueMask_,rt===1)}}])})();Atom.isBeingObservedMask_=1;Atom.isPendingUnobservationMask_=2;Atom.diffValueMask_=4;var isAtom=createInstanceofPredicate("Atom",Atom);function createAtom(et,_e,tt){_e===void 0&&(_e=noop$7),tt===void 0&&(tt=noop$7);var rt=new Atom(et);return _e!==noop$7&&onBecomeObserved(rt,_e),tt!==noop$7&&onBecomeUnobserved(rt,tt),rt}function identityComparer(et,_e){return et===_e}function structuralComparer(et,_e){return deepEqual$2(et,_e)}function shallowComparer(et,_e){return deepEqual$2(et,_e,1)}function defaultComparer(et,_e){return Object.is?Object.is(et,_e):et===_e?et!==0||1/et===1/_e:et!==et&&_e!==_e}var comparer={identity:identityComparer,structural:structuralComparer,default:defaultComparer,shallow:shallowComparer};function deepEnhancer(et,_e,tt){return isObservable(et)?et:Array.isArray(et)?observable.array(et,{name:tt}):isPlainObject(et)?observable.object(et,void 0,{name:tt}):isES6Map(et)?observable.map(et,{name:tt}):isES6Set(et)?observable.set(et,{name:tt}):typeof et=="function"&&!isAction(et)&&!isFlow(et)?isGenerator(et)?flow$1(et):autoAction(tt,et):et}function shallowEnhancer(et,_e,tt){if(et==null||isObservableObject(et)||isObservableArray(et)||isObservableMap(et)||isObservableSet(et))return et;if(Array.isArray(et))return observable.array(et,{name:tt,deep:!1});if(isPlainObject(et))return observable.object(et,void 0,{name:tt,deep:!1});if(isES6Map(et))return observable.map(et,{name:tt,deep:!1});if(isES6Set(et))return observable.set(et,{name:tt,deep:!1})}function referenceEnhancer(et){return et}function refStructEnhancer(et,_e){return deepEqual$2(et,_e)?_e:et}var OVERRIDE="override",override=createDecoratorAnnotation({annotationType_:OVERRIDE,make_,extend_,decorate_20223_});function isOverride(et){return et.annotationType_===OVERRIDE}function make_(et,_e){return 0}function extend_(et,_e,tt,rt){die("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function decorate_20223_(et,_e){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function createActionAnnotation(et,_e){return{annotationType_:et,options_:_e,make_:make_$1,extend_:extend_$1,decorate_20223_:decorate_20223_$1}}function make_$1(et,_e,tt,rt){var nt;if((nt=this.options_)!=null&&nt.bound)return this.extend_(et,_e,tt,!1)===null?0:1;if(rt===et.target_)return this.extend_(et,_e,tt,!1)===null?0:2;if(isAction(tt.value))return 1;var st=createActionDescriptor(et,this,_e,tt,!1);return defineProperty$1(rt,_e,st),2}function extend_$1(et,_e,tt,rt){var nt=createActionDescriptor(et,this,_e,tt);return et.defineProperty_(_e,nt,rt)}function decorate_20223_$1(et,_e){var tt=_e.kind,rt=_e.name,nt=_e.addInitializer,st=this,dt=function(mt){var bt,St,Et,Ct;return createAction((bt=(St=st.options_)==null?void 0:St.name)!=null?bt:rt.toString(),mt,(Et=(Ct=st.options_)==null?void 0:Ct.autoAction)!=null?Et:!1)};if(tt=="field")return function(ht){var mt,bt=ht;return isAction(bt)||(bt=dt(bt)),(mt=st.options_)!=null&&mt.bound&&(bt=bt.bind(this),bt.isMobxAction=!0),bt};if(tt=="method"){var ft;return isAction(et)||(et=dt(et)),(ft=this.options_)!=null&&ft.bound&&nt(function(){var ht=this,mt=ht[rt].bind(ht);mt.isMobxAction=!0,ht[rt]=mt}),et}die("Cannot apply '"+st.annotationType_+"' to '"+String(rt)+"' (kind: "+tt+"):"+(`
'`+st.annotationType_+"' can only be used on properties with a function value."))}function assertActionDescriptor(et,_e,tt,rt){_e.annotationType_,rt.value}function createActionDescriptor(et,_e,tt,rt,nt){var st,dt,ft,ht,mt,bt,St;nt===void 0&&(nt=globalState.safeDescriptors),assertActionDescriptor(et,_e,tt,rt);var Et=rt.value;if((st=_e.options_)!=null&&st.bound){var Ct;Et=Et.bind((Ct=et.proxy_)!=null?Ct:et.target_)}return{value:createAction((dt=(ft=_e.options_)==null?void 0:ft.name)!=null?dt:tt.toString(),Et,(ht=(mt=_e.options_)==null?void 0:mt.autoAction)!=null?ht:!1,(bt=_e.options_)!=null&&bt.bound?(St=et.proxy_)!=null?St:et.target_:void 0),configurable:nt?et.isPlainObject_:!0,enumerable:!1,writable:!nt}}function createFlowAnnotation(et,_e){return{annotationType_:et,options_:_e,make_:make_$2,extend_:extend_$2,decorate_20223_:decorate_20223_$2}}function make_$2(et,_e,tt,rt){var nt;if(rt===et.target_)return this.extend_(et,_e,tt,!1)===null?0:2;if((nt=this.options_)!=null&&nt.bound&&(!hasProp(et.target_,_e)||!isFlow(et.target_[_e]))&&this.extend_(et,_e,tt,!1)===null)return 0;if(isFlow(tt.value))return 1;var st=createFlowDescriptor(et,this,_e,tt,!1,!1);return defineProperty$1(rt,_e,st),2}function extend_$2(et,_e,tt,rt){var nt,st=createFlowDescriptor(et,this,_e,tt,(nt=this.options_)==null?void 0:nt.bound);return et.defineProperty_(_e,st,rt)}function decorate_20223_$2(et,_e){var tt,rt=_e.name,nt=_e.addInitializer;return isFlow(et)||(et=flow$1(et)),(tt=this.options_)!=null&&tt.bound&&nt(function(){var st=this,dt=st[rt].bind(st);dt.isMobXFlow=!0,st[rt]=dt}),et}function assertFlowDescriptor(et,_e,tt,rt){_e.annotationType_,rt.value}function createFlowDescriptor(et,_e,tt,rt,nt,st){st===void 0&&(st=globalState.safeDescriptors),assertFlowDescriptor(et,_e,tt,rt);var dt=rt.value;if(isFlow(dt)||(dt=flow$1(dt)),nt){var ft;dt=dt.bind((ft=et.proxy_)!=null?ft:et.target_),dt.isMobXFlow=!0}return{value:dt,configurable:st?et.isPlainObject_:!0,enumerable:!1,writable:!st}}function createComputedAnnotation(et,_e){return{annotationType_:et,options_:_e,make_:make_$3,extend_:extend_$3,decorate_20223_:decorate_20223_$3}}function make_$3(et,_e,tt){return this.extend_(et,_e,tt,!1)===null?0:1}function extend_$3(et,_e,tt,rt){return assertComputedDescriptor(et,this,_e,tt),et.defineComputedProperty_(_e,_extends$2({},this.options_,{get:tt.get,set:tt.set}),rt)}function decorate_20223_$3(et,_e){var tt=this,rt=_e.name,nt=_e.addInitializer;return nt(function(){var st=asObservableObject(this)[$mobx],dt=_extends$2({},tt.options_,{get:et,context:this});dt.name||(dt.name="ObservableObject."+rt.toString()),st.values_.set(rt,new ComputedValue(dt))}),function(){return this[$mobx].getObservablePropValue_(rt)}}function assertComputedDescriptor(et,_e,tt,rt){_e.annotationType_,rt.get}function createObservableAnnotation(et,_e){return{annotationType_:et,options_:_e,make_:make_$4,extend_:extend_$4,decorate_20223_:decorate_20223_$4}}function make_$4(et,_e,tt){return this.extend_(et,_e,tt,!1)===null?0:1}function extend_$4(et,_e,tt,rt){var nt,st;return assertObservableDescriptor(et,this),et.defineObservableProperty_(_e,tt.value,(nt=(st=this.options_)==null?void 0:st.enhancer)!=null?nt:deepEnhancer,rt)}function decorate_20223_$4(et,_e){var tt=this,rt=_e.kind,nt=_e.name,st=new WeakSet;function dt(ft,ht){var mt,bt,St=asObservableObject(ft)[$mobx],Et=new ObservableValue(ht,(mt=(bt=tt.options_)==null?void 0:bt.enhancer)!=null?mt:deepEnhancer,"ObservableObject."+nt.toString(),!1);St.values_.set(nt,Et),st.add(ft)}if(rt=="accessor")return{get:function(){return st.has(this)||dt(this,et.get.call(this)),this[$mobx].getObservablePropValue_(nt)},set:function(ht){return st.has(this)||dt(this,ht),this[$mobx].setObservablePropValue_(nt,ht)},init:function(ht){return st.has(this)||dt(this,ht),ht}}}function assertObservableDescriptor(et,_e,tt,rt){_e.annotationType_}var AUTO="true",autoAnnotation=createAutoAnnotation();function createAutoAnnotation(et){return{annotationType_:AUTO,options_:et,make_:make_$5,extend_:extend_$5,decorate_20223_:decorate_20223_$5}}function make_$5(et,_e,tt,rt){var nt,st;if(tt.get)return computed.make_(et,_e,tt,rt);if(tt.set){var dt=isAction(tt.set)?tt.set:createAction(_e.toString(),tt.set);return rt===et.target_?et.defineProperty_(_e,{configurable:globalState.safeDescriptors?et.isPlainObject_:!0,set:dt})===null?0:2:(defineProperty$1(rt,_e,{configurable:!0,set:dt}),2)}if(rt!==et.target_&&typeof tt.value=="function"){var ft;if(isGenerator(tt.value)){var ht,mt=(ht=this.options_)!=null&&ht.autoBind?flow$1.bound:flow$1;return mt.make_(et,_e,tt,rt)}var bt=(ft=this.options_)!=null&&ft.autoBind?autoAction.bound:autoAction;return bt.make_(et,_e,tt,rt)}var St=((nt=this.options_)==null?void 0:nt.deep)===!1?observable.ref:observable;if(typeof tt.value=="function"&&(st=this.options_)!=null&&st.autoBind){var Et;tt.value=tt.value.bind((Et=et.proxy_)!=null?Et:et.target_)}return St.make_(et,_e,tt,rt)}function extend_$5(et,_e,tt,rt){var nt,st;if(tt.get)return computed.extend_(et,_e,tt,rt);if(tt.set)return et.defineProperty_(_e,{configurable:globalState.safeDescriptors?et.isPlainObject_:!0,set:createAction(_e.toString(),tt.set)},rt);if(typeof tt.value=="function"&&(nt=this.options_)!=null&&nt.autoBind){var dt;tt.value=tt.value.bind((dt=et.proxy_)!=null?dt:et.target_)}var ft=((st=this.options_)==null?void 0:st.deep)===!1?observable.ref:observable;return ft.extend_(et,_e,tt,rt)}function decorate_20223_$5(et,_e){die("'"+this.annotationType_+"' cannot be used as a decorator")}var OBSERVABLE="observable",OBSERVABLE_REF="observable.ref",OBSERVABLE_SHALLOW="observable.shallow",OBSERVABLE_STRUCT="observable.struct",defaultCreateObservableOptions={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(defaultCreateObservableOptions);function asCreateObservableOptions(et){return et||defaultCreateObservableOptions}var observableAnnotation=createObservableAnnotation(OBSERVABLE),observableRefAnnotation=createObservableAnnotation(OBSERVABLE_REF,{enhancer:referenceEnhancer}),observableShallowAnnotation=createObservableAnnotation(OBSERVABLE_SHALLOW,{enhancer:shallowEnhancer}),observableStructAnnotation=createObservableAnnotation(OBSERVABLE_STRUCT,{enhancer:refStructEnhancer}),observableDecoratorAnnotation=createDecoratorAnnotation(observableAnnotation);function getEnhancerFromOptions(et){return et.deep===!0?deepEnhancer:et.deep===!1?referenceEnhancer:getEnhancerFromAnnotation(et.defaultDecorator)}function getAnnotationFromOptions(et){var _e;return et?(_e=et.defaultDecorator)!=null?_e:createAutoAnnotation(et):void 0}function getEnhancerFromAnnotation(et){var _e,tt;return et&&(_e=(tt=et.options_)==null?void 0:tt.enhancer)!=null?_e:deepEnhancer}function createObservable(et,_e,tt){if(is20223Decorator(_e))return observableAnnotation.decorate_20223_(et,_e);if(isStringish(_e)){storeAnnotation(et,_e,observableAnnotation);return}return isObservable(et)?et:isPlainObject(et)?observable.object(et,_e,tt):Array.isArray(et)?observable.array(et,_e):isES6Map(et)?observable.map(et,_e):isES6Set(et)?observable.set(et,_e):typeof et=="object"&&et!==null?et:observable.box(et,_e)}assign$1(createObservable,observableDecoratorAnnotation);var observableFactories={box:function(_e,tt){var rt=asCreateObservableOptions(tt);return new ObservableValue(_e,getEnhancerFromOptions(rt),rt.name,!0,rt.equals)},array:function(_e,tt){var rt=asCreateObservableOptions(tt);return(globalState.useProxies===!1||rt.proxy===!1?createLegacyArray:createObservableArray)(_e,getEnhancerFromOptions(rt),rt.name)},map:function(_e,tt){var rt=asCreateObservableOptions(tt);return new ObservableMap(_e,getEnhancerFromOptions(rt),rt.name)},set:function(_e,tt){var rt=asCreateObservableOptions(tt);return new ObservableSet(_e,getEnhancerFromOptions(rt),rt.name)},object:function(_e,tt,rt){return initObservable(function(){return extendObservable(globalState.useProxies===!1||rt?.proxy===!1?asObservableObject({},rt):asDynamicObservableObject({},rt),_e,tt)})},ref:createDecoratorAnnotation(observableRefAnnotation),shallow:createDecoratorAnnotation(observableShallowAnnotation),deep:observableDecoratorAnnotation,struct:createDecoratorAnnotation(observableStructAnnotation)},observable=assign$1(createObservable,observableFactories),COMPUTED="computed",COMPUTED_STRUCT="computed.struct",computedAnnotation=createComputedAnnotation(COMPUTED),computedStructAnnotation=createComputedAnnotation(COMPUTED_STRUCT,{equals:comparer.structural}),computed=function(_e,tt){if(is20223Decorator(tt))return computedAnnotation.decorate_20223_(_e,tt);if(isStringish(tt))return storeAnnotation(_e,tt,computedAnnotation);if(isPlainObject(_e))return createDecoratorAnnotation(createComputedAnnotation(COMPUTED,_e));var rt=isPlainObject(tt)?tt:{};return rt.get=_e,rt.name||(rt.name=_e.name||""),new ComputedValue(rt)};Object.assign(computed,computedAnnotation);computed.struct=createDecoratorAnnotation(computedStructAnnotation);var _getDescriptor$config,_getDescriptor,currentActionId=0,nextActionId=1,isFunctionNameConfigurable=(_getDescriptor$config=(_getDescriptor=getDescriptor$1(function(){},"name"))==null?void 0:_getDescriptor.configurable)!=null?_getDescriptor$config:!1,tmpNameDescriptor={value:"action",configurable:!0,writable:!1,enumerable:!1};function createAction(et,_e,tt,rt){tt===void 0&&(tt=!1);function nt(){return executeAction(et,tt,_e,rt||this,arguments)}return nt.isMobxAction=!0,nt.toString=function(){return _e.toString()},isFunctionNameConfigurable&&(tmpNameDescriptor.value=et,defineProperty$1(nt,"name",tmpNameDescriptor)),nt}function executeAction(et,_e,tt,rt,nt){var st=_startAction(et,_e);try{return tt.apply(rt,nt)}catch(dt){throw st.error_=dt,dt}finally{_endAction(st)}}function _startAction(et,_e,tt,rt){var nt=!1,st=0,dt=globalState.trackingDerivation,ft=!_e||!dt;startBatch();var ht=globalState.allowStateChanges;ft&&(untrackedStart(),ht=allowStateChangesStart(!0));var mt=allowStateReadsStart(!0),bt={runAsAction_:ft,prevDerivation_:dt,prevAllowStateChanges_:ht,prevAllowStateReads_:mt,notifySpy_:nt,startTime_:st,actionId_:nextActionId++,parentActionId_:currentActionId};return currentActionId=bt.actionId_,bt}function _endAction(et){currentActionId!==et.actionId_&&die(30),currentActionId=et.parentActionId_,et.error_!==void 0&&(globalState.suppressReactionErrors=!0),allowStateChangesEnd(et.prevAllowStateChanges_),allowStateReadsEnd(et.prevAllowStateReads_),endBatch(),et.runAsAction_&&untrackedEnd(et.prevDerivation_),globalState.suppressReactionErrors=!1}function allowStateChanges(et,_e){var tt=allowStateChangesStart(et);try{return _e()}finally{allowStateChangesEnd(tt)}}function allowStateChangesStart(et){var _e=globalState.allowStateChanges;return globalState.allowStateChanges=et,_e}function allowStateChangesEnd(et){globalState.allowStateChanges=et}var ObservableValue=(function(et){function _e(rt,nt,st,dt,ft){var ht;return st===void 0&&(st="ObservableValue"),ft===void 0&&(ft=comparer.default),ht=et.call(this,st)||this,ht.enhancer=void 0,ht.name_=void 0,ht.equals=void 0,ht.hasUnreportedChange_=!1,ht.interceptors_=void 0,ht.changeListeners_=void 0,ht.value_=void 0,ht.dehancer=void 0,ht.enhancer=nt,ht.name_=st,ht.equals=ft,ht.value_=nt(rt,void 0,st),ht}_inheritsLoose(_e,et);var tt=_e.prototype;return tt.dehanceValue=function(nt){return this.dehancer!==void 0?this.dehancer(nt):nt},tt.set=function(nt){this.value_,nt=this.prepareNewValue_(nt),nt!==globalState.UNCHANGED&&this.setNewValue_(nt)},tt.prepareNewValue_=function(nt){if(hasInterceptors(this)){var st=interceptChange(this,{object:this,type:UPDATE,newValue:nt});if(!st)return globalState.UNCHANGED;nt=st.newValue}return nt=this.enhancer(nt,this.value_,this.name_),this.equals(this.value_,nt)?globalState.UNCHANGED:nt},tt.setNewValue_=function(nt){var st=this.value_;this.value_=nt,this.reportChanged(),hasListeners(this)&&notifyListeners(this,{type:UPDATE,object:this,newValue:nt,oldValue:st})},tt.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},tt.intercept_=function(nt){return registerInterceptor(this,nt)},tt.observe_=function(nt,st){return st&&nt({observableKind:"value",debugObjectName:this.name_,object:this,type:UPDATE,newValue:this.value_,oldValue:void 0}),registerListener(this,nt)},tt.raw=function(){return this.value_},tt.toJSON=function(){return this.get()},tt.toString=function(){return this.name_+"["+this.value_+"]"},tt.valueOf=function(){return toPrimitive$1(this.get())},tt[Symbol.toPrimitive]=function(){return this.valueOf()},_e})(Atom),isObservableValue=createInstanceofPredicate("ObservableValue",ObservableValue),ComputedValue=(function(){function et(tt){this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new CaughtException(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=TraceMode.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,tt.get||die(31),this.derivation=tt.get,this.name_=tt.name||"ComputedValue",tt.set&&(this.setter_=createAction("ComputedValue-setter",tt.set)),this.equals_=tt.equals||(tt.compareStructural||tt.struct?comparer.structural:comparer.default),this.scope_=tt.context,this.requiresReaction_=tt.requiresReaction,this.keepAlive_=!!tt.keepAlive}var _e=et.prototype;return _e.onBecomeStale_=function(){propagateMaybeChanged(this)},_e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(rt){return rt()})},_e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(rt){return rt()})},_e.get=function(){if(this.isComputing&&die(32,this.name_,this.derivation),globalState.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)shouldCompute(this)&&(this.warnAboutUntrackedRead_(),startBatch(),this.value_=this.computeValue_(!1),endBatch());else if(reportObserved(this),shouldCompute(this)){var rt=globalState.trackingContext;this.keepAlive_&&!rt&&(globalState.trackingContext=this),this.trackAndCompute()&&propagateChangeConfirmed(this),globalState.trackingContext=rt}var nt=this.value_;if(isCaughtException(nt))throw nt.cause;return nt},_e.set=function(rt){if(this.setter_){this.isRunningSetter&&die(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,rt)}finally{this.isRunningSetter=!1}}else die(34,this.name_)},_e.trackAndCompute=function(){var rt=this.value_,nt=this.dependenciesState_===IDerivationState_.NOT_TRACKING_,st=this.computeValue_(!0),dt=nt||isCaughtException(rt)||isCaughtException(st)||!this.equals_(rt,st);return dt&&(this.value_=st),dt},_e.computeValue_=function(rt){this.isComputing=!0;var nt=allowStateChangesStart(!1),st;if(rt)st=trackDerivedFunction(this,this.derivation,this.scope_);else if(globalState.disableErrorBoundaries===!0)st=this.derivation.call(this.scope_);else try{st=this.derivation.call(this.scope_)}catch(dt){st=new CaughtException(dt)}return allowStateChangesEnd(nt),this.isComputing=!1,st},_e.suspend_=function(){this.keepAlive_||(clearObserving(this),this.value_=void 0)},_e.observe_=function(rt,nt){var st=this,dt=!0,ft=void 0;return autorun(function(){var ht=st.get();if(!dt||nt){var mt=untrackedStart();rt({observableKind:"computed",debugObjectName:st.name_,type:UPDATE,object:st,newValue:ht,oldValue:ft}),untrackedEnd(mt)}dt=!1,ft=ht})},_e.warnAboutUntrackedRead_=function(){},_e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},_e.valueOf=function(){return toPrimitive$1(this.get())},_e[Symbol.toPrimitive]=function(){return this.valueOf()},_createClass(et,[{key:"isComputing",get:function(){return getFlag(this.flags_,et.isComputingMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isComputingMask_,rt)}},{key:"isRunningSetter",get:function(){return getFlag(this.flags_,et.isRunningSetterMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isRunningSetterMask_,rt)}},{key:"isBeingObserved",get:function(){return getFlag(this.flags_,et.isBeingObservedMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isBeingObservedMask_,rt)}},{key:"isPendingUnobservation",get:function(){return getFlag(this.flags_,et.isPendingUnobservationMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isPendingUnobservationMask_,rt)}},{key:"diffValue",get:function(){return getFlag(this.flags_,et.diffValueMask_)?1:0},set:function(rt){this.flags_=setFlag(this.flags_,et.diffValueMask_,rt===1)}}])})();ComputedValue.isComputingMask_=1;ComputedValue.isRunningSetterMask_=2;ComputedValue.isBeingObservedMask_=4;ComputedValue.isPendingUnobservationMask_=8;ComputedValue.diffValueMask_=16;var isComputedValue=createInstanceofPredicate("ComputedValue",ComputedValue),IDerivationState_;(function(et){et[et.NOT_TRACKING_=-1]="NOT_TRACKING_",et[et.UP_TO_DATE_=0]="UP_TO_DATE_",et[et.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",et[et.STALE_=2]="STALE_"})(IDerivationState_||(IDerivationState_={}));var TraceMode;(function(et){et[et.NONE=0]="NONE",et[et.LOG=1]="LOG",et[et.BREAK=2]="BREAK"})(TraceMode||(TraceMode={}));var CaughtException=function(_e){this.cause=void 0,this.cause=_e};function isCaughtException(et){return et instanceof CaughtException}function shouldCompute(et){switch(et.dependenciesState_){case IDerivationState_.UP_TO_DATE_:return!1;case IDerivationState_.NOT_TRACKING_:case IDerivationState_.STALE_:return!0;case IDerivationState_.POSSIBLY_STALE_:{for(var _e=allowStateReadsStart(!0),tt=untrackedStart(),rt=et.observing_,nt=rt.length,st=0;st<nt;st++){var dt=rt[st];if(isComputedValue(dt)){if(globalState.disableErrorBoundaries)dt.get();else try{dt.get()}catch{return untrackedEnd(tt),allowStateReadsEnd(_e),!0}if(et.dependenciesState_===IDerivationState_.STALE_)return untrackedEnd(tt),allowStateReadsEnd(_e),!0}}return changeDependenciesStateTo0(et),untrackedEnd(tt),allowStateReadsEnd(_e),!1}}}function isComputingDerivation(){return globalState.trackingDerivation!==null}function checkIfStateModificationsAreAllowed(et){}function trackDerivedFunction(et,_e,tt){var rt=allowStateReadsStart(!0);changeDependenciesStateTo0(et),et.newObserving_=new Array(et.runId_===0?100:et.observing_.length),et.unboundDepsCount_=0,et.runId_=++globalState.runId;var nt=globalState.trackingDerivation;globalState.trackingDerivation=et,globalState.inBatch++;var st;if(globalState.disableErrorBoundaries===!0)st=_e.call(tt);else try{st=_e.call(tt)}catch(dt){st=new CaughtException(dt)}return globalState.inBatch--,globalState.trackingDerivation=nt,bindDependencies(et),allowStateReadsEnd(rt),st}function bindDependencies(et){for(var _e=et.observing_,tt=et.observing_=et.newObserving_,rt=IDerivationState_.UP_TO_DATE_,nt=0,st=et.unboundDepsCount_,dt=0;dt<st;dt++){var ft=tt[dt];ft.diffValue===0&&(ft.diffValue=1,nt!==dt&&(tt[nt]=ft),nt++),ft.dependenciesState_>rt&&(rt=ft.dependenciesState_)}for(tt.length=nt,et.newObserving_=null,st=_e.length;st--;){var ht=_e[st];ht.diffValue===0&&removeObserver(ht,et),ht.diffValue=0}for(;nt--;){var mt=tt[nt];mt.diffValue===1&&(mt.diffValue=0,addObserver(mt,et))}rt!==IDerivationState_.UP_TO_DATE_&&(et.dependenciesState_=rt,et.onBecomeStale_())}function clearObserving(et){var _e=et.observing_;et.observing_=[];for(var tt=_e.length;tt--;)removeObserver(_e[tt],et);et.dependenciesState_=IDerivationState_.NOT_TRACKING_}function untracked(et){var _e=untrackedStart();try{return et()}finally{untrackedEnd(_e)}}function untrackedStart(){var et=globalState.trackingDerivation;return globalState.trackingDerivation=null,et}function untrackedEnd(et){globalState.trackingDerivation=et}function allowStateReadsStart(et){var _e=globalState.allowStateReads;return globalState.allowStateReads=et,_e}function allowStateReadsEnd(et){globalState.allowStateReads=et}function changeDependenciesStateTo0(et){if(et.dependenciesState_!==IDerivationState_.UP_TO_DATE_){et.dependenciesState_=IDerivationState_.UP_TO_DATE_;for(var _e=et.observing_,tt=_e.length;tt--;)_e[tt].lowestObserverState_=IDerivationState_.UP_TO_DATE_}}var persistentKeys=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],MobXGlobals=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},canMergeGlobalState=!0,isolateCalled=!1,globalState=(function(){var et=getGlobal();return et.__mobxInstanceCount>0&&!et.__mobxGlobals&&(canMergeGlobalState=!1),et.__mobxGlobals&&et.__mobxGlobals.version!==new MobXGlobals().version&&(canMergeGlobalState=!1),canMergeGlobalState?et.__mobxGlobals?(et.__mobxInstanceCount+=1,et.__mobxGlobals.UNCHANGED||(et.__mobxGlobals.UNCHANGED={}),et.__mobxGlobals):(et.__mobxInstanceCount=1,et.__mobxGlobals=new MobXGlobals):(setTimeout(function(){isolateCalled||die(35)},1),new MobXGlobals)})();function isolateGlobalState(){if((globalState.pendingReactions.length||globalState.inBatch||globalState.isRunningReactions)&&die(36),isolateCalled=!0,canMergeGlobalState){var et=getGlobal();--et.__mobxInstanceCount===0&&(et.__mobxGlobals=void 0),globalState=new MobXGlobals}}function getGlobalState(){return globalState}function resetGlobalState(){var et=new MobXGlobals;for(var _e in et)persistentKeys.indexOf(_e)===-1&&(globalState[_e]=et[_e]);globalState.allowStateChanges=!globalState.enforceActions}function hasObservers(et){return et.observers_&&et.observers_.size>0}function getObservers(et){return et.observers_}function addObserver(et,_e){et.observers_.add(_e),et.lowestObserverState_>_e.dependenciesState_&&(et.lowestObserverState_=_e.dependenciesState_)}function removeObserver(et,_e){et.observers_.delete(_e),et.observers_.size===0&&queueForUnobservation(et)}function queueForUnobservation(et){et.isPendingUnobservation===!1&&(et.isPendingUnobservation=!0,globalState.pendingUnobservations.push(et))}function startBatch(){globalState.inBatch++}function endBatch(){if(--globalState.inBatch===0){runReactions();for(var et=globalState.pendingUnobservations,_e=0;_e<et.length;_e++){var tt=et[_e];tt.isPendingUnobservation=!1,tt.observers_.size===0&&(tt.isBeingObserved&&(tt.isBeingObserved=!1,tt.onBUO()),tt instanceof ComputedValue&&tt.suspend_())}globalState.pendingUnobservations=[]}}function reportObserved(et){var _e=globalState.trackingDerivation;return _e!==null?(_e.runId_!==et.lastAccessedBy_&&(et.lastAccessedBy_=_e.runId_,_e.newObserving_[_e.unboundDepsCount_++]=et,!et.isBeingObserved&&globalState.trackingContext&&(et.isBeingObserved=!0,et.onBO())),et.isBeingObserved):(et.observers_.size===0&&globalState.inBatch>0&&queueForUnobservation(et),!1)}function propagateChanged(et){et.lowestObserverState_!==IDerivationState_.STALE_&&(et.lowestObserverState_=IDerivationState_.STALE_,et.observers_.forEach(function(_e){_e.dependenciesState_===IDerivationState_.UP_TO_DATE_&&_e.onBecomeStale_(),_e.dependenciesState_=IDerivationState_.STALE_}))}function propagateChangeConfirmed(et){et.lowestObserverState_!==IDerivationState_.STALE_&&(et.lowestObserverState_=IDerivationState_.STALE_,et.observers_.forEach(function(_e){_e.dependenciesState_===IDerivationState_.POSSIBLY_STALE_?_e.dependenciesState_=IDerivationState_.STALE_:_e.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(et.lowestObserverState_=IDerivationState_.UP_TO_DATE_)}))}function propagateMaybeChanged(et){et.lowestObserverState_===IDerivationState_.UP_TO_DATE_&&(et.lowestObserverState_=IDerivationState_.POSSIBLY_STALE_,et.observers_.forEach(function(_e){_e.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(_e.dependenciesState_=IDerivationState_.POSSIBLY_STALE_,_e.onBecomeStale_())}))}var Reaction=(function(){function et(tt,rt,nt,st){tt===void 0&&(tt="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=TraceMode.NONE,this.name_=tt,this.onInvalidate_=rt,this.errorHandler_=nt,this.requiresObservable_=st}var _e=et.prototype;return _e.onBecomeStale_=function(){this.schedule_()},_e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,globalState.pendingReactions.push(this),runReactions())},_e.runReaction_=function(){if(!this.isDisposed){startBatch(),this.isScheduled=!1;var rt=globalState.trackingContext;if(globalState.trackingContext=this,shouldCompute(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(nt){this.reportExceptionInDerivation_(nt)}}globalState.trackingContext=rt,endBatch()}},_e.track=function(rt){if(!this.isDisposed){startBatch(),this.isRunning=!0;var nt=globalState.trackingContext;globalState.trackingContext=this;var st=trackDerivedFunction(this,rt,void 0);globalState.trackingContext=nt,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&clearObserving(this),isCaughtException(st)&&this.reportExceptionInDerivation_(st.cause),endBatch()}},_e.reportExceptionInDerivation_=function(rt){var nt=this;if(this.errorHandler_){this.errorHandler_(rt,this);return}if(globalState.disableErrorBoundaries)throw rt;var st="[mobx] uncaught error in '"+this+"'";globalState.suppressReactionErrors||console.error(st,rt),globalState.globalReactionErrorHandlers.forEach(function(dt){return dt(rt,nt)})},_e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(startBatch(),clearObserving(this),endBatch()))},_e.getDisposer_=function(rt){var nt=this,st=function dt(){nt.dispose(),rt==null||rt.removeEventListener==null||rt.removeEventListener("abort",dt)};return rt==null||rt.addEventListener==null||rt.addEventListener("abort",st),st[$mobx]=this,"dispose"in Symbol&&typeof Symbol.dispose=="symbol"&&(st[Symbol.dispose]=st),st},_e.toString=function(){return"Reaction["+this.name_+"]"},_e.trace=function(rt){},_createClass(et,[{key:"isDisposed",get:function(){return getFlag(this.flags_,et.isDisposedMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isDisposedMask_,rt)}},{key:"isScheduled",get:function(){return getFlag(this.flags_,et.isScheduledMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isScheduledMask_,rt)}},{key:"isTrackPending",get:function(){return getFlag(this.flags_,et.isTrackPendingMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isTrackPendingMask_,rt)}},{key:"isRunning",get:function(){return getFlag(this.flags_,et.isRunningMask_)},set:function(rt){this.flags_=setFlag(this.flags_,et.isRunningMask_,rt)}},{key:"diffValue",get:function(){return getFlag(this.flags_,et.diffValueMask_)?1:0},set:function(rt){this.flags_=setFlag(this.flags_,et.diffValueMask_,rt===1)}}])})();Reaction.isDisposedMask_=1;Reaction.isScheduledMask_=2;Reaction.isTrackPendingMask_=4;Reaction.isRunningMask_=8;Reaction.diffValueMask_=16;function onReactionError(et){return globalState.globalReactionErrorHandlers.push(et),function(){var _e=globalState.globalReactionErrorHandlers.indexOf(et);_e>=0&&globalState.globalReactionErrorHandlers.splice(_e,1)}}var MAX_REACTION_ITERATIONS=100,reactionScheduler=function(_e){return _e()};function runReactions(){globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){globalState.isRunningReactions=!0;for(var et=globalState.pendingReactions,_e=0;et.length>0;){++_e===MAX_REACTION_ITERATIONS&&(console.error("[mobx] cycle in reaction: "+et[0]),et.splice(0));for(var tt=et.splice(0),rt=0,nt=tt.length;rt<nt;rt++)tt[rt].runReaction_()}globalState.isRunningReactions=!1}var isReaction=createInstanceofPredicate("Reaction",Reaction);function setReactionScheduler(et){var _e=reactionScheduler;reactionScheduler=function(rt){return et(function(){return _e(rt)})}}function isSpyEnabled(){return!1}function spyReport(et){}function spyReportStart(et){}function spyReportEnd(et){}function spy(et){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var ACTION="action",ACTION_BOUND="action.bound",AUTOACTION="autoAction",AUTOACTION_BOUND="autoAction.bound",DEFAULT_ACTION_NAME="<unnamed action>",actionAnnotation=createActionAnnotation(ACTION),actionBoundAnnotation=createActionAnnotation(ACTION_BOUND,{bound:!0}),autoActionAnnotation=createActionAnnotation(AUTOACTION,{autoAction:!0}),autoActionBoundAnnotation=createActionAnnotation(AUTOACTION_BOUND,{autoAction:!0,bound:!0});function createActionFactory(et){var _e=function(rt,nt){if(isFunction$1(rt))return createAction(rt.name||DEFAULT_ACTION_NAME,rt,et);if(isFunction$1(nt))return createAction(rt,nt,et);if(is20223Decorator(nt))return(et?autoActionAnnotation:actionAnnotation).decorate_20223_(rt,nt);if(isStringish(nt))return storeAnnotation(rt,nt,et?autoActionAnnotation:actionAnnotation);if(isStringish(rt))return createDecoratorAnnotation(createActionAnnotation(et?AUTOACTION:ACTION,{name:rt,autoAction:et}))};return _e}var action=createActionFactory(!1);Object.assign(action,actionAnnotation);var autoAction=createActionFactory(!0);Object.assign(autoAction,autoActionAnnotation);action.bound=createDecoratorAnnotation(actionBoundAnnotation);autoAction.bound=createDecoratorAnnotation(autoActionBoundAnnotation);function runInAction(et){return executeAction(et.name||DEFAULT_ACTION_NAME,!1,et,this,void 0)}function isAction(et){return isFunction$1(et)&&et.isMobxAction===!0}function autorun(et,_e){var tt,rt,nt,st;_e===void 0&&(_e=EMPTY_OBJECT);var dt=(tt=(rt=_e)==null?void 0:rt.name)!=null?tt:"Autorun",ft=!_e.scheduler&&!_e.delay,ht;if(ft)ht=new Reaction(dt,function(){this.track(St)},_e.onError,_e.requiresObservable);else{var mt=createSchedulerFromOptions(_e),bt=!1;ht=new Reaction(dt,function(){bt||(bt=!0,mt(function(){bt=!1,ht.isDisposed||ht.track(St)}))},_e.onError,_e.requiresObservable)}function St(){et(ht)}return(nt=_e)!=null&&(nt=nt.signal)!=null&&nt.aborted||ht.schedule_(),ht.getDisposer_((st=_e)==null?void 0:st.signal)}var run$1=function(_e){return _e()};function createSchedulerFromOptions(et){return et.scheduler?et.scheduler:et.delay?function(_e){return setTimeout(_e,et.delay)}:run$1}function reaction$1(et,_e,tt){var rt,nt,st;tt===void 0&&(tt=EMPTY_OBJECT);var dt=(rt=tt.name)!=null?rt:"Reaction",ft=action(dt,tt.onError?wrapErrorHandler(tt.onError,_e):_e),ht=!tt.scheduler&&!tt.delay,mt=createSchedulerFromOptions(tt),bt=!0,St=!1,Et,Ct=tt.compareStructural?comparer.structural:tt.equals||comparer.default,Rt=new Reaction(dt,function(){bt||ht?Tt():St||(St=!0,mt(Tt))},tt.onError,tt.requiresObservable);function Tt(){if(St=!1,!Rt.isDisposed){var wt=!1,At=Et;Rt.track(function(){var Nt=allowStateChanges(!1,function(){return et(Rt)});wt=bt||!Ct(Et,Nt),Et=Nt}),(bt&&tt.fireImmediately||!bt&&wt)&&ft(Et,At,Rt),bt=!1}}return(nt=tt)!=null&&(nt=nt.signal)!=null&&nt.aborted||Rt.schedule_(),Rt.getDisposer_((st=tt)==null?void 0:st.signal)}function wrapErrorHandler(et,_e){return function(){try{return _e.apply(this,arguments)}catch(tt){et.call(this,tt)}}}var ON_BECOME_OBSERVED="onBO",ON_BECOME_UNOBSERVED="onBUO";function onBecomeObserved(et,_e,tt){return interceptHook(ON_BECOME_OBSERVED,et,_e,tt)}function onBecomeUnobserved(et,_e,tt){return interceptHook(ON_BECOME_UNOBSERVED,et,_e,tt)}function interceptHook(et,_e,tt,rt){var nt=typeof rt=="function"?getAtom(_e,tt):getAtom(_e),st=isFunction$1(rt)?rt:tt,dt=et+"L";return nt[dt]?nt[dt].add(st):nt[dt]=new Set([st]),function(){var ft=nt[dt];ft&&(ft.delete(st),ft.size===0&&delete nt[dt])}}var NEVER="never",ALWAYS="always",OBSERVED="observed";function configure(et){et.isolateGlobalState===!0&&isolateGlobalState();var _e=et.useProxies,tt=et.enforceActions;if(_e!==void 0&&(globalState.useProxies=_e===ALWAYS?!0:_e===NEVER?!1:typeof Proxy<"u"),_e==="ifavailable"&&(globalState.verifyProxies=!0),tt!==void 0){var rt=tt===ALWAYS?ALWAYS:tt===OBSERVED;globalState.enforceActions=rt,globalState.allowStateChanges=!(rt===!0||rt===ALWAYS)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(nt){nt in et&&(globalState[nt]=!!et[nt])}),globalState.allowStateReads=!globalState.observableRequiresReaction,et.reactionScheduler&&setReactionScheduler(et.reactionScheduler)}function extendObservable(et,_e,tt,rt){var nt=getOwnPropertyDescriptors(_e);return initObservable(function(){var st=asObservableObject(et,rt)[$mobx];ownKeys(nt).forEach(function(dt){st.extend_(dt,nt[dt],tt&&dt in tt?tt[dt]:!0)})}),et}function getDependencyTree(et,_e){return nodeToDependencyTree(getAtom(et,_e))}function nodeToDependencyTree(et){var _e={name:et.name_};return et.observing_&&et.observing_.length>0&&(_e.dependencies=unique(et.observing_).map(nodeToDependencyTree)),_e}function getObserverTree(et,_e){return nodeToObserverTree(getAtom(et,_e))}function nodeToObserverTree(et){var _e={name:et.name_};return hasObservers(et)&&(_e.observers=Array.from(getObservers(et)).map(nodeToObserverTree)),_e}function unique(et){return Array.from(new Set(et))}var generatorId=0;function FlowCancellationError(){this.message="FLOW_CANCELLED"}FlowCancellationError.prototype=Object.create(Error.prototype);function isFlowCancellationError(et){return et instanceof FlowCancellationError}var flowAnnotation=createFlowAnnotation("flow"),flowBoundAnnotation=createFlowAnnotation("flow.bound",{bound:!0}),flow$1=Object.assign(function(_e,tt){if(is20223Decorator(tt))return flowAnnotation.decorate_20223_(_e,tt);if(isStringish(tt))return storeAnnotation(_e,tt,flowAnnotation);var rt=_e,nt=rt.name||"<unnamed flow>",st=function(){var ft=this,ht=arguments,mt=++generatorId,bt=action(nt+" - runid: "+mt+" - init",rt).apply(ft,ht),St,Et=void 0,Ct=new Promise(function(Rt,Tt){var wt=0;St=Tt;function At(It){Et=void 0;var Ft;try{Ft=action(nt+" - runid: "+mt+" - yield "+wt++,bt.next).call(bt,It)}catch(qt){return Tt(qt)}Pt(Ft)}function Nt(It){Et=void 0;var Ft;try{Ft=action(nt+" - runid: "+mt+" - yield "+wt++,bt.throw).call(bt,It)}catch(qt){return Tt(qt)}Pt(Ft)}function Pt(It){if(isFunction$1(It?.then)){It.then(Pt,Tt);return}return It.done?Rt(It.value):(Et=Promise.resolve(It.value),Et.then(At,Nt))}At(void 0)});return Ct.cancel=action(nt+" - runid: "+mt+" - cancel",function(){try{Et&&cancelPromise(Et);var Rt=bt.return(void 0),Tt=Promise.resolve(Rt.value);Tt.then(noop$7,noop$7),cancelPromise(Tt),St(new FlowCancellationError)}catch(wt){St(wt)}}),Ct};return st.isMobXFlow=!0,st},flowAnnotation);flow$1.bound=createDecoratorAnnotation(flowBoundAnnotation);function cancelPromise(et){isFunction$1(et.cancel)&&et.cancel()}function flowResult(et){return et}function isFlow(et){return et?.isMobXFlow===!0}function interceptReads(et,_e,tt){var rt;return isObservableMap(et)||isObservableArray(et)||isObservableValue(et)?rt=getAdministration(et):isObservableObject(et)&&(rt=getAdministration(et,_e)),rt.dehancer=typeof _e=="function"?_e:tt,function(){rt.dehancer=void 0}}function intercept(et,_e,tt){return isFunction$1(tt)?interceptProperty(et,_e,tt):interceptInterceptable(et,_e)}function interceptInterceptable(et,_e){return getAdministration(et).intercept_(_e)}function interceptProperty(et,_e,tt){return getAdministration(et,_e).intercept_(tt)}function _isComputed(et,_e){if(_e===void 0)return isComputedValue(et);if(isObservableObject(et)===!1||!et[$mobx].values_.has(_e))return!1;var tt=getAtom(et,_e);return isComputedValue(tt)}function isComputed(et){return _isComputed(et)}function isComputedProp(et,_e){return _isComputed(et,_e)}function _isObservable(et,_e){return et?_e!==void 0?isObservableObject(et)?et[$mobx].values_.has(_e):!1:isObservableObject(et)||!!et[$mobx]||isAtom(et)||isReaction(et)||isComputedValue(et):!1}function isObservable(et){return _isObservable(et)}function isObservableProp(et,_e){return _isObservable(et,_e)}function keys$2(et){if(isObservableObject(et))return et[$mobx].keys_();if(isObservableMap(et)||isObservableSet(et))return Array.from(et.keys());if(isObservableArray(et))return et.map(function(_e,tt){return tt});die(5)}function values$2(et){if(isObservableObject(et))return keys$2(et).map(function(_e){return et[_e]});if(isObservableMap(et))return keys$2(et).map(function(_e){return et.get(_e)});if(isObservableSet(et))return Array.from(et.values());if(isObservableArray(et))return et.slice();die(6)}function entries(et){if(isObservableObject(et))return keys$2(et).map(function(_e){return[_e,et[_e]]});if(isObservableMap(et))return keys$2(et).map(function(_e){return[_e,et.get(_e)]});if(isObservableSet(et))return Array.from(et.entries());if(isObservableArray(et))return et.map(function(_e,tt){return[tt,_e]});die(7)}function set2(et,_e,tt){if(arguments.length===2&&!isObservableSet(et)){startBatch();var rt=_e;try{for(var nt in rt)set2(et,nt,rt[nt])}finally{endBatch()}return}isObservableObject(et)?et[$mobx].set_(_e,tt):isObservableMap(et)?et.set(_e,tt):isObservableSet(et)?et.add(_e):isObservableArray(et)?(typeof _e!="number"&&(_e=parseInt(_e,10)),_e<0&&die("Invalid index: '"+_e+"'"),startBatch(),_e>=et.length&&(et.length=_e+1),et[_e]=tt,endBatch()):die(8)}function remove(et,_e){isObservableObject(et)?et[$mobx].delete_(_e):isObservableMap(et)||isObservableSet(et)?et.delete(_e):isObservableArray(et)?(typeof _e!="number"&&(_e=parseInt(_e,10)),et.splice(_e,1)):die(9)}function has$1(et,_e){if(isObservableObject(et))return et[$mobx].has_(_e);if(isObservableMap(et))return et.has(_e);if(isObservableSet(et))return et.has(_e);if(isObservableArray(et))return _e>=0&&_e<et.length;die(10)}function get$1(et,_e){if(has$1(et,_e)){if(isObservableObject(et))return et[$mobx].get_(_e);if(isObservableMap(et))return et.get(_e);if(isObservableArray(et))return et[_e];die(11)}}function apiDefineProperty(et,_e,tt){if(isObservableObject(et))return et[$mobx].defineProperty_(_e,tt);die(39)}function apiOwnKeys(et){if(isObservableObject(et))return et[$mobx].ownKeys_();die(38)}function observe(et,_e,tt,rt){return isFunction$1(tt)?observeObservableProperty(et,_e,tt,rt):observeObservable(et,_e,tt)}function observeObservable(et,_e,tt){return getAdministration(et).observe_(_e,tt)}function observeObservableProperty(et,_e,tt,rt){return getAdministration(et,_e).observe_(tt,rt)}function cache$3(et,_e,tt){return et.set(_e,tt),tt}function toJSHelper(et,_e){if(et==null||typeof et!="object"||et instanceof Date||!isObservable(et))return et;if(isObservableValue(et)||isComputedValue(et))return toJSHelper(et.get(),_e);if(_e.has(et))return _e.get(et);if(isObservableArray(et)){var tt=cache$3(_e,et,new Array(et.length));return et.forEach(function(dt,ft){tt[ft]=toJSHelper(dt,_e)}),tt}if(isObservableSet(et)){var rt=cache$3(_e,et,new Set);return et.forEach(function(dt){rt.add(toJSHelper(dt,_e))}),rt}if(isObservableMap(et)){var nt=cache$3(_e,et,new Map);return et.forEach(function(dt,ft){nt.set(ft,toJSHelper(dt,_e))}),nt}else{var st=cache$3(_e,et,{});return apiOwnKeys(et).forEach(function(dt){objectPrototype.propertyIsEnumerable.call(et,dt)&&(st[dt]=toJSHelper(et[dt],_e))}),st}}function toJS(et,_e){return toJSHelper(et,new Map)}function trace$2(){}function transaction(et,_e){_e===void 0&&(_e=void 0),startBatch();try{return et.apply(_e)}finally{endBatch()}}function when(et,_e,tt){return arguments.length===1||_e&&typeof _e=="object"?whenPromise(et,_e):_when(et,_e,tt||{})}function _when(et,_e,tt){var rt;if(typeof tt.timeout=="number"){var nt=new Error("WHEN_TIMEOUT");rt=setTimeout(function(){if(!dt[$mobx].isDisposed)if(dt(),tt.onError)tt.onError(nt);else throw nt},tt.timeout)}tt.name="When";var st=createAction("When-effect",_e),dt=autorun(function(ft){var ht=allowStateChanges(!1,et);ht&&(ft.dispose(),rt&&clearTimeout(rt),st())},tt);return dt}function whenPromise(et,_e){var tt;if(_e!=null&&(tt=_e.signal)!=null&&tt.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var rt,nt,st=new Promise(function(dt,ft){var ht,mt=_when(et,dt,_extends$2({},_e,{onError:ft}));rt=function(){mt(),ft(new Error("WHEN_CANCELLED"))},nt=function(){mt(),ft(new Error("WHEN_ABORTED"))},_e==null||(ht=_e.signal)==null||ht.addEventListener==null||ht.addEventListener("abort",nt)}).finally(function(){var dt;return _e==null||(dt=_e.signal)==null||dt.removeEventListener==null?void 0:dt.removeEventListener("abort",nt)});return st.cancel=rt,st}function getAdm(et){return et[$mobx]}var objectProxyTraps={has:function(_e,tt){return getAdm(_e).has_(tt)},get:function(_e,tt){return getAdm(_e).get_(tt)},set:function(_e,tt,rt){var nt;return isStringish(tt)?(nt=getAdm(_e).set_(tt,rt,!0))!=null?nt:!0:!1},deleteProperty:function(_e,tt){var rt;return isStringish(tt)?(rt=getAdm(_e).delete_(tt,!0))!=null?rt:!0:!1},defineProperty:function(_e,tt,rt){var nt;return(nt=getAdm(_e).defineProperty_(tt,rt))!=null?nt:!0},ownKeys:function(_e){return getAdm(_e).ownKeys_()},preventExtensions:function(_e){die(13)}};function asDynamicObservableObject(et,_e){var tt,rt;return assertProxies(),et=asObservableObject(et,_e),(rt=(tt=et[$mobx]).proxy_)!=null?rt:tt.proxy_=new Proxy(et,objectProxyTraps)}function hasInterceptors(et){return et.interceptors_!==void 0&&et.interceptors_.length>0}function registerInterceptor(et,_e){var tt=et.interceptors_||(et.interceptors_=[]);return tt.push(_e),once(function(){var rt=tt.indexOf(_e);rt!==-1&&tt.splice(rt,1)})}function interceptChange(et,_e){var tt=untrackedStart();try{for(var rt=[].concat(et.interceptors_||[]),nt=0,st=rt.length;nt<st&&(_e=rt[nt](_e),_e&&!_e.type&&die(14),!!_e);nt++);return _e}finally{untrackedEnd(tt)}}function hasListeners(et){return et.changeListeners_!==void 0&&et.changeListeners_.length>0}function registerListener(et,_e){var tt=et.changeListeners_||(et.changeListeners_=[]);return tt.push(_e),once(function(){var rt=tt.indexOf(_e);rt!==-1&&tt.splice(rt,1)})}function notifyListeners(et,_e){var tt=untrackedStart(),rt=et.changeListeners_;if(rt){rt=rt.slice();for(var nt=0,st=rt.length;nt<st;nt++)rt[nt](_e);untrackedEnd(tt)}}function makeObservable(et,_e,tt){return initObservable(function(){var rt,nt=asObservableObject(et,tt)[$mobx];(rt=_e)!=null||(_e=collectStoredAnnotations(et)),ownKeys(_e).forEach(function(st){return nt.make_(st,_e[st])})}),et}var keysSymbol=Symbol("mobx-keys");function makeAutoObservable(et,_e,tt){return isPlainObject(et)?extendObservable(et,et,_e,tt):(initObservable(function(){var rt=asObservableObject(et,tt)[$mobx];if(!et[keysSymbol]){var nt=Object.getPrototypeOf(et),st=new Set([].concat(ownKeys(et),ownKeys(nt)));st.delete("constructor"),st.delete($mobx),addHiddenProp(nt,keysSymbol,st)}et[keysSymbol].forEach(function(dt){return rt.make_(dt,_e&&dt in _e?_e[dt]:!0)})}),et)}var SPLICE="splice",UPDATE="update",MAX_SPLICE_SIZE=1e4,arrayTraps={get:function(_e,tt){var rt=_e[$mobx];return tt===$mobx?rt:tt==="length"?rt.getArrayLength_():typeof tt=="string"&&!isNaN(tt)?rt.get_(parseInt(tt)):hasProp(arrayExtensions,tt)?arrayExtensions[tt]:_e[tt]},set:function(_e,tt,rt){var nt=_e[$mobx];return tt==="length"&&nt.setArrayLength_(rt),typeof tt=="symbol"||isNaN(tt)?_e[tt]=rt:nt.set_(parseInt(tt),rt),!0},preventExtensions:function(){die(15)}},ObservableArrayAdministration=(function(){function et(tt,rt,nt,st){tt===void 0&&(tt="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=nt,this.legacyMode_=st,this.atom_=new Atom(tt),this.enhancer_=function(dt,ft){return rt(dt,ft,"ObservableArray[..]")}}var _e=et.prototype;return _e.dehanceValue_=function(rt){return this.dehancer!==void 0?this.dehancer(rt):rt},_e.dehanceValues_=function(rt){return this.dehancer!==void 0&&rt.length>0?rt.map(this.dehancer):rt},_e.intercept_=function(rt){return registerInterceptor(this,rt)},_e.observe_=function(rt,nt){return nt===void 0&&(nt=!1),nt&&rt({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),registerListener(this,rt)},_e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},_e.setArrayLength_=function(rt){(typeof rt!="number"||isNaN(rt)||rt<0)&&die("Out of range: "+rt);var nt=this.values_.length;if(rt!==nt)if(rt>nt){for(var st=new Array(rt-nt),dt=0;dt<rt-nt;dt++)st[dt]=void 0;this.spliceWithArray_(nt,0,st)}else this.spliceWithArray_(rt,nt-rt)},_e.updateArrayLength_=function(rt,nt){rt!==this.lastKnownLength_&&die(16),this.lastKnownLength_+=nt,this.legacyMode_&&nt>0&&reserveArrayBuffer(rt+nt+1)},_e.spliceWithArray_=function(rt,nt,st){var dt=this;this.atom_;var ft=this.values_.length;if(rt===void 0?rt=0:rt>ft?rt=ft:rt<0&&(rt=Math.max(0,ft+rt)),arguments.length===1?nt=ft-rt:nt==null?nt=0:nt=Math.max(0,Math.min(nt,ft-rt)),st===void 0&&(st=EMPTY_ARRAY),hasInterceptors(this)){var ht=interceptChange(this,{object:this.proxy_,type:SPLICE,index:rt,removedCount:nt,added:st});if(!ht)return EMPTY_ARRAY;nt=ht.removedCount,st=ht.added}if(st=st.length===0?st:st.map(function(St){return dt.enhancer_(St,void 0)}),this.legacyMode_){var mt=st.length-nt;this.updateArrayLength_(ft,mt)}var bt=this.spliceItemsIntoValues_(rt,nt,st);return(nt!==0||st.length!==0)&&this.notifyArraySplice_(rt,st,bt),this.dehanceValues_(bt)},_e.spliceItemsIntoValues_=function(rt,nt,st){if(st.length<MAX_SPLICE_SIZE){var dt;return(dt=this.values_).splice.apply(dt,[rt,nt].concat(st))}else{var ft=this.values_.slice(rt,rt+nt),ht=this.values_.slice(rt+nt);this.values_.length+=st.length-nt;for(var mt=0;mt<st.length;mt++)this.values_[rt+mt]=st[mt];for(var bt=0;bt<ht.length;bt++)this.values_[rt+st.length+bt]=ht[bt];return ft}},_e.notifyArrayChildUpdate_=function(rt,nt,st){var dt=!this.owned_&&isSpyEnabled(),ft=hasListeners(this),ht=ft||dt?{observableKind:"array",object:this.proxy_,type:UPDATE,debugObjectName:this.atom_.name_,index:rt,newValue:nt,oldValue:st}:null;this.atom_.reportChanged(),ft&&notifyListeners(this,ht)},_e.notifyArraySplice_=function(rt,nt,st){var dt=!this.owned_&&isSpyEnabled(),ft=hasListeners(this),ht=ft||dt?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:SPLICE,index:rt,removed:st,added:nt,removedCount:st.length,addedCount:nt.length}:null;this.atom_.reportChanged(),ft&&notifyListeners(this,ht)},_e.get_=function(rt){if(this.legacyMode_&&rt>=this.values_.length){console.warn("[mobx] Out of bounds read: "+rt);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[rt])},_e.set_=function(rt,nt){var st=this.values_;if(this.legacyMode_&&rt>st.length&&die(17,rt,st.length),rt<st.length){this.atom_;var dt=st[rt];if(hasInterceptors(this)){var ft=interceptChange(this,{type:UPDATE,object:this.proxy_,index:rt,newValue:nt});if(!ft)return;nt=ft.newValue}nt=this.enhancer_(nt,dt);var ht=nt!==dt;ht&&(st[rt]=nt,this.notifyArrayChildUpdate_(rt,nt,dt))}else{for(var mt=new Array(rt+1-st.length),bt=0;bt<mt.length-1;bt++)mt[bt]=void 0;mt[mt.length-1]=nt,this.spliceWithArray_(st.length,0,mt)}},et})();function createObservableArray(et,_e,tt,rt){return tt===void 0&&(tt="ObservableArray"),rt===void 0&&(rt=!1),assertProxies(),initObservable(function(){var nt=new ObservableArrayAdministration(tt,_e,rt,!1);addHiddenFinalProp(nt.values_,$mobx,nt);var st=new Proxy(nt.values_,arrayTraps);return nt.proxy_=st,et&&et.length&&nt.spliceWithArray_(0,0,et),st})}var arrayExtensions={clear:function(){return this.splice(0)},replace:function(_e){var tt=this[$mobx];return tt.spliceWithArray_(0,tt.values_.length,_e)},toJSON:function(){return this.slice()},splice:function(_e,tt){for(var rt=arguments.length,nt=new Array(rt>2?rt-2:0),st=2;st<rt;st++)nt[st-2]=arguments[st];var dt=this[$mobx];switch(arguments.length){case 0:return[];case 1:return dt.spliceWithArray_(_e);case 2:return dt.spliceWithArray_(_e,tt)}return dt.spliceWithArray_(_e,tt,nt)},spliceWithArray:function(_e,tt,rt){return this[$mobx].spliceWithArray_(_e,tt,rt)},push:function(){for(var _e=this[$mobx],tt=arguments.length,rt=new Array(tt),nt=0;nt<tt;nt++)rt[nt]=arguments[nt];return _e.spliceWithArray_(_e.values_.length,0,rt),_e.values_.length},pop:function(){return this.splice(Math.max(this[$mobx].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var _e=this[$mobx],tt=arguments.length,rt=new Array(tt),nt=0;nt<tt;nt++)rt[nt]=arguments[nt];return _e.spliceWithArray_(0,0,rt),_e.values_.length},reverse:function(){return globalState.trackingDerivation&&die(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){globalState.trackingDerivation&&die(37,"sort");var _e=this.slice();return _e.sort.apply(_e,arguments),this.replace(_e),this},remove:function(_e){var tt=this[$mobx],rt=tt.dehanceValues_(tt.values_).indexOf(_e);return rt>-1?(this.splice(rt,1),!0):!1}};addArrayExtension("at",simpleFunc);addArrayExtension("concat",simpleFunc);addArrayExtension("flat",simpleFunc);addArrayExtension("includes",simpleFunc);addArrayExtension("indexOf",simpleFunc);addArrayExtension("join",simpleFunc);addArrayExtension("lastIndexOf",simpleFunc);addArrayExtension("slice",simpleFunc);addArrayExtension("toString",simpleFunc);addArrayExtension("toLocaleString",simpleFunc);addArrayExtension("toSorted",simpleFunc);addArrayExtension("toSpliced",simpleFunc);addArrayExtension("with",simpleFunc);addArrayExtension("every",mapLikeFunc);addArrayExtension("filter",mapLikeFunc);addArrayExtension("find",mapLikeFunc);addArrayExtension("findIndex",mapLikeFunc);addArrayExtension("findLast",mapLikeFunc);addArrayExtension("findLastIndex",mapLikeFunc);addArrayExtension("flatMap",mapLikeFunc);addArrayExtension("forEach",mapLikeFunc);addArrayExtension("map",mapLikeFunc);addArrayExtension("some",mapLikeFunc);addArrayExtension("toReversed",mapLikeFunc);addArrayExtension("reduce",reduceLikeFunc);addArrayExtension("reduceRight",reduceLikeFunc);function addArrayExtension(et,_e){typeof Array.prototype[et]=="function"&&(arrayExtensions[et]=_e(et))}function simpleFunc(et){return function(){var _e=this[$mobx];_e.atom_.reportObserved();var tt=_e.dehanceValues_(_e.values_);return tt[et].apply(tt,arguments)}}function mapLikeFunc(et){return function(_e,tt){var rt=this,nt=this[$mobx];nt.atom_.reportObserved();var st=nt.dehanceValues_(nt.values_);return st[et](function(dt,ft){return _e.call(tt,dt,ft,rt)})}}function reduceLikeFunc(et){return function(){var _e=this,tt=this[$mobx];tt.atom_.reportObserved();var rt=tt.dehanceValues_(tt.values_),nt=arguments[0];return arguments[0]=function(st,dt,ft){return nt(st,dt,ft,_e)},rt[et].apply(rt,arguments)}}var isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(et){return isObject$4(et)&&isObservableArrayAdministration(et[$mobx])}var ObservableMapMarker={},ADD="add",DELETE="delete",ObservableMap=(function(){function et(tt,rt,nt){var st=this;rt===void 0&&(rt=deepEnhancer),nt===void 0&&(nt="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[$mobx]=ObservableMapMarker,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=rt,this.name_=nt,isFunction$1(Map)||die(18),initObservable(function(){st.keysAtom_=createAtom("ObservableMap.keys()"),st.data_=new Map,st.hasMap_=new Map,tt&&st.merge(tt)})}var _e=et.prototype;return _e.has_=function(rt){return this.data_.has(rt)},_e.has=function(rt){var nt=this;if(!globalState.trackingDerivation)return this.has_(rt);var st=this.hasMap_.get(rt);if(!st){var dt=st=new ObservableValue(this.has_(rt),referenceEnhancer,"ObservableMap.key?",!1);this.hasMap_.set(rt,dt),onBecomeUnobserved(dt,function(){return nt.hasMap_.delete(rt)})}return st.get()},_e.set=function(rt,nt){var st=this.has_(rt);if(hasInterceptors(this)){var dt=interceptChange(this,{type:st?UPDATE:ADD,object:this,newValue:nt,name:rt});if(!dt)return this;nt=dt.newValue}return st?this.updateValue_(rt,nt):this.addValue_(rt,nt),this},_e.delete=function(rt){var nt=this;if(this.keysAtom_,hasInterceptors(this)){var st=interceptChange(this,{type:DELETE,object:this,name:rt});if(!st)return!1}if(this.has_(rt)){var dt=isSpyEnabled(),ft=hasListeners(this),ht=ft||dt?{observableKind:"map",debugObjectName:this.name_,type:DELETE,object:this,oldValue:this.data_.get(rt).value_,name:rt}:null;return transaction(function(){var mt;nt.keysAtom_.reportChanged(),(mt=nt.hasMap_.get(rt))==null||mt.setNewValue_(!1);var bt=nt.data_.get(rt);bt.setNewValue_(void 0),nt.data_.delete(rt)}),ft&&notifyListeners(this,ht),!0}return!1},_e.updateValue_=function(rt,nt){var st=this.data_.get(rt);if(nt=st.prepareNewValue_(nt),nt!==globalState.UNCHANGED){var dt=isSpyEnabled(),ft=hasListeners(this),ht=ft||dt?{observableKind:"map",debugObjectName:this.name_,type:UPDATE,object:this,oldValue:st.value_,name:rt,newValue:nt}:null;st.setNewValue_(nt),ft&&notifyListeners(this,ht)}},_e.addValue_=function(rt,nt){var st=this;this.keysAtom_,transaction(function(){var mt,bt=new ObservableValue(nt,st.enhancer_,"ObservableMap.key",!1);st.data_.set(rt,bt),nt=bt.value_,(mt=st.hasMap_.get(rt))==null||mt.setNewValue_(!0),st.keysAtom_.reportChanged()});var dt=isSpyEnabled(),ft=hasListeners(this),ht=ft||dt?{observableKind:"map",debugObjectName:this.name_,type:ADD,object:this,name:rt,newValue:nt}:null;ft&&notifyListeners(this,ht)},_e.get=function(rt){return this.has(rt)?this.dehanceValue_(this.data_.get(rt).get()):this.dehanceValue_(void 0)},_e.dehanceValue_=function(rt){return this.dehancer!==void 0?this.dehancer(rt):rt},_e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},_e.values=function(){var rt=this,nt=this.keys();return makeIterableForMap({next:function(){var dt=nt.next(),ft=dt.done,ht=dt.value;return{done:ft,value:ft?void 0:rt.get(ht)}}})},_e.entries=function(){var rt=this,nt=this.keys();return makeIterableForMap({next:function(){var dt=nt.next(),ft=dt.done,ht=dt.value;return{done:ft,value:ft?void 0:[ht,rt.get(ht)]}}})},_e[Symbol.iterator]=function(){return this.entries()},_e.forEach=function(rt,nt){for(var st=_createForOfIteratorHelperLoose(this),dt;!(dt=st()).done;){var ft=dt.value,ht=ft[0],mt=ft[1];rt.call(nt,mt,ht,this)}},_e.merge=function(rt){var nt=this;return isObservableMap(rt)&&(rt=new Map(rt)),transaction(function(){isPlainObject(rt)?getPlainObjectKeys(rt).forEach(function(st){return nt.set(st,rt[st])}):Array.isArray(rt)?rt.forEach(function(st){var dt=st[0],ft=st[1];return nt.set(dt,ft)}):isES6Map(rt)?(isPlainES6Map(rt)||die(19,rt),rt.forEach(function(st,dt){return nt.set(dt,st)})):rt!=null&&die(20,rt)}),this},_e.clear=function(){var rt=this;transaction(function(){untracked(function(){for(var nt=_createForOfIteratorHelperLoose(rt.keys()),st;!(st=nt()).done;){var dt=st.value;rt.delete(dt)}})})},_e.replace=function(rt){var nt=this;return transaction(function(){for(var st=convertToMap(rt),dt=new Map,ft=!1,ht=_createForOfIteratorHelperLoose(nt.data_.keys()),mt;!(mt=ht()).done;){var bt=mt.value;if(!st.has(bt)){var St=nt.delete(bt);if(St)ft=!0;else{var Et=nt.data_.get(bt);dt.set(bt,Et)}}}for(var Ct=_createForOfIteratorHelperLoose(st.entries()),Rt;!(Rt=Ct()).done;){var Tt=Rt.value,wt=Tt[0],At=Tt[1],Nt=nt.data_.has(wt);if(nt.set(wt,At),nt.data_.has(wt)){var Pt=nt.data_.get(wt);dt.set(wt,Pt),Nt||(ft=!0)}}if(!ft)if(nt.data_.size!==dt.size)nt.keysAtom_.reportChanged();else for(var It=nt.data_.keys(),Ft=dt.keys(),qt=It.next(),Vt=Ft.next();!qt.done;){if(qt.value!==Vt.value){nt.keysAtom_.reportChanged();break}qt=It.next(),Vt=Ft.next()}nt.data_=dt}),this},_e.toString=function(){return"[object ObservableMap]"},_e.toJSON=function(){return Array.from(this)},_e.observe_=function(rt,nt){return registerListener(this,rt)},_e.intercept_=function(rt){return registerInterceptor(this,rt)},_createClass(et,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])})(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap);function makeIterableForMap(et){return et[Symbol.toStringTag]="MapIterator",makeIterable(et)}function convertToMap(et){if(isES6Map(et)||isObservableMap(et))return et;if(Array.isArray(et))return new Map(et);if(isPlainObject(et)){var _e=new Map;for(var tt in et)_e.set(tt,et[tt]);return _e}else return die(21,et)}var ObservableSetMarker={},ObservableSet=(function(){function et(tt,rt,nt){var st=this;rt===void 0&&(rt=deepEnhancer),nt===void 0&&(nt="ObservableSet"),this.name_=void 0,this[$mobx]=ObservableSetMarker,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=nt,isFunction$1(Set)||die(22),this.enhancer_=function(dt,ft){return rt(dt,ft,nt)},initObservable(function(){st.atom_=createAtom(st.name_),tt&&st.replace(tt)})}var _e=et.prototype;return _e.dehanceValue_=function(rt){return this.dehancer!==void 0?this.dehancer(rt):rt},_e.clear=function(){var rt=this;transaction(function(){untracked(function(){for(var nt=_createForOfIteratorHelperLoose(rt.data_.values()),st;!(st=nt()).done;){var dt=st.value;rt.delete(dt)}})})},_e.forEach=function(rt,nt){for(var st=_createForOfIteratorHelperLoose(this),dt;!(dt=st()).done;){var ft=dt.value;rt.call(nt,ft,ft,this)}},_e.add=function(rt){var nt=this;if(this.atom_,hasInterceptors(this)){var st=interceptChange(this,{type:ADD,object:this,newValue:rt});if(!st)return this;rt=st.newValue}if(!this.has(rt)){transaction(function(){nt.data_.add(nt.enhancer_(rt,void 0)),nt.atom_.reportChanged()});var dt=!1,ft=hasListeners(this),ht=ft||dt?{observableKind:"set",debugObjectName:this.name_,type:ADD,object:this,newValue:rt}:null;ft&&notifyListeners(this,ht)}return this},_e.delete=function(rt){var nt=this;if(hasInterceptors(this)){var st=interceptChange(this,{type:DELETE,object:this,oldValue:rt});if(!st)return!1}if(this.has(rt)){var dt=!1,ft=hasListeners(this),ht=ft||dt?{observableKind:"set",debugObjectName:this.name_,type:DELETE,object:this,oldValue:rt}:null;return transaction(function(){nt.atom_.reportChanged(),nt.data_.delete(rt)}),ft&&notifyListeners(this,ht),!0}return!1},_e.has=function(rt){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(rt))},_e.entries=function(){var rt=this.values();return makeIterableForSet({next:function(){var st=rt.next(),dt=st.value,ft=st.done;return ft?{value:void 0,done:ft}:{value:[dt,dt],done:ft}}})},_e.keys=function(){return this.values()},_e.values=function(){this.atom_.reportObserved();var rt=this,nt=this.data_.values();return makeIterableForSet({next:function(){var dt=nt.next(),ft=dt.value,ht=dt.done;return ht?{value:void 0,done:ht}:{value:rt.dehanceValue_(ft),done:ht}}})},_e.intersection=function(rt){if(isES6Set(rt)&&!isObservableSet(rt))return rt.intersection(this);var nt=new Set(this);return nt.intersection(rt)},_e.union=function(rt){if(isES6Set(rt)&&!isObservableSet(rt))return rt.union(this);var nt=new Set(this);return nt.union(rt)},_e.difference=function(rt){return new Set(this).difference(rt)},_e.symmetricDifference=function(rt){if(isES6Set(rt)&&!isObservableSet(rt))return rt.symmetricDifference(this);var nt=new Set(this);return nt.symmetricDifference(rt)},_e.isSubsetOf=function(rt){return new Set(this).isSubsetOf(rt)},_e.isSupersetOf=function(rt){return new Set(this).isSupersetOf(rt)},_e.isDisjointFrom=function(rt){if(isES6Set(rt)&&!isObservableSet(rt))return rt.isDisjointFrom(this);var nt=new Set(this);return nt.isDisjointFrom(rt)},_e.replace=function(rt){var nt=this;return isObservableSet(rt)&&(rt=new Set(rt)),transaction(function(){Array.isArray(rt)?(nt.clear(),rt.forEach(function(st){return nt.add(st)})):isES6Set(rt)?(nt.clear(),rt.forEach(function(st){return nt.add(st)})):rt!=null&&die("Cannot initialize set from "+rt)}),this},_e.observe_=function(rt,nt){return registerListener(this,rt)},_e.intercept_=function(rt){return registerInterceptor(this,rt)},_e.toJSON=function(){return Array.from(this)},_e.toString=function(){return"[object ObservableSet]"},_e[Symbol.iterator]=function(){return this.values()},_createClass(et,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])})(),isObservableSet=createInstanceofPredicate("ObservableSet",ObservableSet);function makeIterableForSet(et){return et[Symbol.toStringTag]="SetIterator",makeIterable(et)}var descriptorCache=Object.create(null),REMOVE="remove",ObservableObjectAdministration=(function(){function et(tt,rt,nt,st){rt===void 0&&(rt=new Map),st===void 0&&(st=autoAnnotation),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=tt,this.values_=rt,this.name_=nt,this.defaultAnnotation_=st,this.keysAtom_=new Atom("ObservableObject.keys"),this.isPlainObject_=isPlainObject(this.target_)}var _e=et.prototype;return _e.getObservablePropValue_=function(rt){return this.values_.get(rt).get()},_e.setObservablePropValue_=function(rt,nt){var st=this.values_.get(rt);if(st instanceof ComputedValue)return st.set(nt),!0;if(hasInterceptors(this)){var dt=interceptChange(this,{type:UPDATE,object:this.proxy_||this.target_,name:rt,newValue:nt});if(!dt)return null;nt=dt.newValue}if(nt=st.prepareNewValue_(nt),nt!==globalState.UNCHANGED){var ft=hasListeners(this),ht=!1,mt=ft||ht?{type:UPDATE,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:st.value_,name:rt,newValue:nt}:null;st.setNewValue_(nt),ft&&notifyListeners(this,mt)}return!0},_e.get_=function(rt){return globalState.trackingDerivation&&!hasProp(this.target_,rt)&&this.has_(rt),this.target_[rt]},_e.set_=function(rt,nt,st){return st===void 0&&(st=!1),hasProp(this.target_,rt)?this.values_.has(rt)?this.setObservablePropValue_(rt,nt):st?Reflect.set(this.target_,rt,nt):(this.target_[rt]=nt,!0):this.extend_(rt,{value:nt,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,st)},_e.has_=function(rt){if(!globalState.trackingDerivation)return rt in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var nt=this.pendingKeys_.get(rt);return nt||(nt=new ObservableValue(rt in this.target_,referenceEnhancer,"ObservableObject.key?",!1),this.pendingKeys_.set(rt,nt)),nt.get()},_e.make_=function(rt,nt){if(nt===!0&&(nt=this.defaultAnnotation_),nt!==!1){if(!(rt in this.target_)){var st;if((st=this.target_[storedAnnotationsSymbol])!=null&&st[rt])return;die(1,nt.annotationType_,this.name_+"."+rt.toString())}for(var dt=this.target_;dt&&dt!==objectPrototype;){var ft=getDescriptor$1(dt,rt);if(ft){var ht=nt.make_(this,rt,ft,dt);if(ht===0)return;if(ht===1)break}dt=Object.getPrototypeOf(dt)}recordAnnotationApplied(this,nt,rt)}},_e.extend_=function(rt,nt,st,dt){if(dt===void 0&&(dt=!1),st===!0&&(st=this.defaultAnnotation_),st===!1)return this.defineProperty_(rt,nt,dt);var ft=st.extend_(this,rt,nt,dt);return ft&&recordAnnotationApplied(this,st,rt),ft},_e.defineProperty_=function(rt,nt,st){st===void 0&&(st=!1),this.keysAtom_;try{startBatch();var dt=this.delete_(rt);if(!dt)return dt;if(hasInterceptors(this)){var ft=interceptChange(this,{object:this.proxy_||this.target_,name:rt,type:ADD,newValue:nt.value});if(!ft)return null;var ht=ft.newValue;nt.value!==ht&&(nt=_extends$2({},nt,{value:ht}))}if(st){if(!Reflect.defineProperty(this.target_,rt,nt))return!1}else defineProperty$1(this.target_,rt,nt);this.notifyPropertyAddition_(rt,nt.value)}finally{endBatch()}return!0},_e.defineObservableProperty_=function(rt,nt,st,dt){dt===void 0&&(dt=!1),this.keysAtom_;try{startBatch();var ft=this.delete_(rt);if(!ft)return ft;if(hasInterceptors(this)){var ht=interceptChange(this,{object:this.proxy_||this.target_,name:rt,type:ADD,newValue:nt});if(!ht)return null;nt=ht.newValue}var mt=getCachedObservablePropDescriptor(rt),bt={configurable:globalState.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:mt.get,set:mt.set};if(dt){if(!Reflect.defineProperty(this.target_,rt,bt))return!1}else defineProperty$1(this.target_,rt,bt);var St=new ObservableValue(nt,st,"ObservableObject.key",!1);this.values_.set(rt,St),this.notifyPropertyAddition_(rt,St.value_)}finally{endBatch()}return!0},_e.defineComputedProperty_=function(rt,nt,st){st===void 0&&(st=!1),this.keysAtom_;try{startBatch();var dt=this.delete_(rt);if(!dt)return dt;if(hasInterceptors(this)){var ft=interceptChange(this,{object:this.proxy_||this.target_,name:rt,type:ADD,newValue:void 0});if(!ft)return null}nt.name||(nt.name="ObservableObject.key"),nt.context=this.proxy_||this.target_;var ht=getCachedObservablePropDescriptor(rt),mt={configurable:globalState.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:ht.get,set:ht.set};if(st){if(!Reflect.defineProperty(this.target_,rt,mt))return!1}else defineProperty$1(this.target_,rt,mt);this.values_.set(rt,new ComputedValue(nt)),this.notifyPropertyAddition_(rt,void 0)}finally{endBatch()}return!0},_e.delete_=function(rt,nt){if(nt===void 0&&(nt=!1),this.keysAtom_,!hasProp(this.target_,rt))return!0;if(hasInterceptors(this)){var st=interceptChange(this,{object:this.proxy_||this.target_,name:rt,type:REMOVE});if(!st)return null}try{var dt;startBatch();var ft=hasListeners(this),ht=!1,mt=this.values_.get(rt),bt=void 0;if(!mt&&(ft||ht)){var St;bt=(St=getDescriptor$1(this.target_,rt))==null?void 0:St.value}if(nt){if(!Reflect.deleteProperty(this.target_,rt))return!1}else delete this.target_[rt];if(mt&&(this.values_.delete(rt),mt instanceof ObservableValue&&(bt=mt.value_),propagateChanged(mt)),this.keysAtom_.reportChanged(),(dt=this.pendingKeys_)==null||(dt=dt.get(rt))==null||dt.set(rt in this.target_),ft||ht){var Et={type:REMOVE,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:bt,name:rt};ft&&notifyListeners(this,Et)}}finally{endBatch()}return!0},_e.observe_=function(rt,nt){return registerListener(this,rt)},_e.intercept_=function(rt){return registerInterceptor(this,rt)},_e.notifyPropertyAddition_=function(rt,nt){var st,dt=hasListeners(this),ft=!1;if(dt||ft){var ht=dt||ft?{type:ADD,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:rt,newValue:nt}:null;dt&&notifyListeners(this,ht)}(st=this.pendingKeys_)==null||(st=st.get(rt))==null||st.set(!0),this.keysAtom_.reportChanged()},_e.ownKeys_=function(){return this.keysAtom_.reportObserved(),ownKeys(this.target_)},_e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},et})();function asObservableObject(et,_e){var tt;if(hasProp(et,$mobx))return et;var rt=(tt=_e?.name)!=null?tt:"ObservableObject",nt=new ObservableObjectAdministration(et,new Map,String(rt),getAnnotationFromOptions(_e));return addHiddenProp(et,$mobx,nt),et}var isObservableObjectAdministration=createInstanceofPredicate("ObservableObjectAdministration",ObservableObjectAdministration);function getCachedObservablePropDescriptor(et){return descriptorCache[et]||(descriptorCache[et]={get:function(){return this[$mobx].getObservablePropValue_(et)},set:function(tt){return this[$mobx].setObservablePropValue_(et,tt)}})}function isObservableObject(et){return isObject$4(et)?isObservableObjectAdministration(et[$mobx]):!1}function recordAnnotationApplied(et,_e,tt){var rt;(rt=et.target_[storedAnnotationsSymbol])==null||delete rt[tt]}var ENTRY_0=createArrayEntryDescriptor(0),safariPrototypeSetterInheritanceBug=(function(){var et=!1,_e={};return Object.defineProperty(_e,"0",{set:function(){et=!0}}),Object.create(_e)[0]=1,et===!1})(),OBSERVABLE_ARRAY_BUFFER_SIZE=0,StubArray=function(){};function inherit(et,_e){Object.setPrototypeOf?Object.setPrototypeOf(et.prototype,_e):et.prototype.__proto__!==void 0?et.prototype.__proto__=_e:et.prototype=_e}inherit(StubArray,Array.prototype);var LegacyObservableArray=(function(et){function _e(rt,nt,st,dt){var ft;return st===void 0&&(st="ObservableArray"),dt===void 0&&(dt=!1),ft=et.call(this)||this,initObservable(function(){var ht=new ObservableArrayAdministration(st,nt,dt,!0);ht.proxy_=ft,addHiddenFinalProp(ft,$mobx,ht),rt&&rt.length&&ft.spliceWithArray(0,0,rt),safariPrototypeSetterInheritanceBug&&Object.defineProperty(ft,"0",ENTRY_0)}),ft}_inheritsLoose(_e,et);var tt=_e.prototype;return tt.concat=function(){this[$mobx].atom_.reportObserved();for(var nt=arguments.length,st=new Array(nt),dt=0;dt<nt;dt++)st[dt]=arguments[dt];return Array.prototype.concat.apply(this.slice(),st.map(function(ft){return isObservableArray(ft)?ft.slice():ft}))},tt[Symbol.iterator]=function(){var rt=this,nt=0;return makeIterable({next:function(){return nt<rt.length?{value:rt[nt++],done:!1}:{done:!0,value:void 0}}})},_createClass(_e,[{key:"length",get:function(){return this[$mobx].getArrayLength_()},set:function(nt){this[$mobx].setArrayLength_(nt)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(StubArray);Object.entries(arrayExtensions).forEach(function(et){var _e=et[0],tt=et[1];_e!=="concat"&&addHiddenProp(LegacyObservableArray.prototype,_e,tt)});function createArrayEntryDescriptor(et){return{enumerable:!1,configurable:!0,get:function(){return this[$mobx].get_(et)},set:function(tt){this[$mobx].set_(et,tt)}}}function createArrayBufferItem(et){defineProperty$1(LegacyObservableArray.prototype,""+et,createArrayEntryDescriptor(et))}function reserveArrayBuffer(et){if(et>OBSERVABLE_ARRAY_BUFFER_SIZE){for(var _e=OBSERVABLE_ARRAY_BUFFER_SIZE;_e<et+100;_e++)createArrayBufferItem(_e);OBSERVABLE_ARRAY_BUFFER_SIZE=et}}reserveArrayBuffer(1e3);function createLegacyArray(et,_e,tt){return new LegacyObservableArray(et,_e,tt)}function getAtom(et,_e){if(typeof et=="object"&&et!==null){if(isObservableArray(et))return _e!==void 0&&die(23),et[$mobx].atom_;if(isObservableSet(et))return et.atom_;if(isObservableMap(et)){if(_e===void 0)return et.keysAtom_;var tt=et.data_.get(_e)||et.hasMap_.get(_e);return tt||die(25,_e,getDebugName(et)),tt}if(isObservableObject(et)){if(!_e)return die(26);var rt=et[$mobx].values_.get(_e);return rt||die(27,_e,getDebugName(et)),rt}if(isAtom(et)||isComputedValue(et)||isReaction(et))return et}else if(isFunction$1(et)&&isReaction(et[$mobx]))return et[$mobx];die(28)}function getAdministration(et,_e){if(et||die(29),_e!==void 0)return getAdministration(getAtom(et,_e));if(isAtom(et)||isComputedValue(et)||isReaction(et)||isObservableMap(et)||isObservableSet(et))return et;if(et[$mobx])return et[$mobx];die(24,et)}function getDebugName(et,_e){var tt;if(_e!==void 0)tt=getAtom(et,_e);else{if(isAction(et))return et.name;isObservableObject(et)||isObservableMap(et)||isObservableSet(et)?tt=getAdministration(et):tt=getAtom(et)}return tt.name_}function initObservable(et){var _e=untrackedStart(),tt=allowStateChangesStart(!0);startBatch();try{return et()}finally{endBatch(),allowStateChangesEnd(tt),untrackedEnd(_e)}}var toString$2=objectPrototype.toString;function deepEqual$2(et,_e,tt){return tt===void 0&&(tt=-1),eq(et,_e,tt)}function eq(et,_e,tt,rt,nt){if(et===_e)return et!==0||1/et===1/_e;if(et==null||_e==null)return!1;if(et!==et)return _e!==_e;var st=typeof et;if(st!=="function"&&st!=="object"&&typeof _e!="object")return!1;var dt=toString$2.call(et);if(dt!==toString$2.call(_e))return!1;switch(dt){case"[object RegExp]":case"[object String]":return""+et==""+_e;case"[object Number]":return+et!=+et?+_e!=+_e:+et==0?1/+et===1/_e:+et==+_e;case"[object Date]":case"[object Boolean]":return+et==+_e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(et)===Symbol.valueOf.call(_e);case"[object Map]":case"[object Set]":tt>=0&&tt++;break}et=unwrap(et),_e=unwrap(_e);var ft=dt==="[object Array]";if(!ft){if(typeof et!="object"||typeof _e!="object")return!1;var ht=et.constructor,mt=_e.constructor;if(ht!==mt&&!(isFunction$1(ht)&&ht instanceof ht&&isFunction$1(mt)&&mt instanceof mt)&&"constructor"in et&&"constructor"in _e)return!1}if(tt===0)return!1;tt<0&&(tt=-1),rt=rt||[],nt=nt||[];for(var bt=rt.length;bt--;)if(rt[bt]===et)return nt[bt]===_e;if(rt.push(et),nt.push(_e),ft){if(bt=et.length,bt!==_e.length)return!1;for(;bt--;)if(!eq(et[bt],_e[bt],tt-1,rt,nt))return!1}else{var St=Object.keys(et),Et=St.length;if(Object.keys(_e).length!==Et)return!1;for(var Ct=0;Ct<Et;Ct++){var Rt=St[Ct];if(!(hasProp(_e,Rt)&&eq(et[Rt],_e[Rt],tt-1,rt,nt)))return!1}}return rt.pop(),nt.pop(),!0}function unwrap(et){return isObservableArray(et)?et.slice():isES6Map(et)||isObservableMap(et)||isES6Set(et)||isObservableSet(et)?Array.from(et.entries()):et}var _getGlobal$Iterator,maybeIteratorPrototype=((_getGlobal$Iterator=getGlobal().Iterator)==null?void 0:_getGlobal$Iterator.prototype)||{};function makeIterable(et){return et[Symbol.iterator]=getSelf,Object.assign(Object.create(maybeIteratorPrototype),et)}function getSelf(){return this}["Symbol","Map","Set"].forEach(function(et){var _e=getGlobal();typeof _e[et]>"u"&&die("MobX requires global '"+et+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy,extras:{getDebugName},$mobx});const mobx_esm=Object.freeze(Object.defineProperty({__proto__:null,$mobx,FlowCancellationError,ObservableMap,ObservableSet,Reaction,_allowStateChanges:allowStateChanges,_allowStateChangesInsideComputed:runInAction,_allowStateReadsEnd:allowStateReadsEnd,_allowStateReadsStart:allowStateReadsStart,_autoAction:autoAction,_endAction,_getAdministration:getAdministration,_getGlobalState:getGlobalState,_interceptReads:interceptReads,_isComputingDerivation:isComputingDerivation,_resetGlobalState:resetGlobalState,_startAction,action,autorun,comparer,computed,configure,createAtom,defineProperty:apiDefineProperty,entries,extendObservable,flow:flow$1,flowResult,get:get$1,getAtom,getDebugName,getDependencyTree,getObserverTree,has:has$1,intercept,isAction,isBoxedObservable:isObservableValue,isComputed,isComputedProp,isFlow,isFlowCancellationError,isObservable,isObservableArray,isObservableMap,isObservableObject,isObservableProp,isObservableSet,keys:keys$2,makeAutoObservable,makeObservable,observable,observe,onBecomeObserved,onBecomeUnobserved,onReactionError,override,ownKeys:apiOwnKeys,reaction:reaction$1,remove,runInAction,set:set2,spy,toJS,trace:trace$2,transaction,untracked,values:values$2,when},Symbol.toStringTag,{value:"Module"})),require$$116=getAugmentedNamespace$1(mobx_esm);var dist$1={},hasRequiredDist$1;function requireDist$1(){if(hasRequiredDist$1)return dist$1;hasRequiredDist$1=1;function et(){CanvasRenderingContext2D.prototype.ellipse===void 0&&(CanvasRenderingContext2D.prototype.ellipse=function(_e,tt,rt,nt,st,dt,ft,ht){this.save(),this.translate(_e,tt),this.rotate(st),this.scale(rt,nt),this.arc(0,0,1,dt,ft,ht),this.restore()}),CanvasRenderingContext2D.prototype.resetTransform===void 0&&(CanvasRenderingContext2D.prototype.resetTransform=function(){this.setTransform(1,0,0,1,0,0)}),(function(){CanvasRenderingContext2D.prototype.getTransform===void 0&&(CanvasRenderingContext2D.prototype.getTransform=(function(){return function(){var _e=this._t2stack&&this._t2stack[this._t2stack.length-1]||{a:1,b:0,c:0,d:1,e:0,f:0};return _e}})(),CanvasRenderingContext2D.prototype.save=(function(){var _e=CanvasRenderingContext2D.prototype.save;return function(){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var tt=this._t2stack[this._t2stack.length-1];this._t2stack.push(tt&&{a:tt.a,b:tt.b,c:tt.c,d:tt.d,e:tt.e,f:tt.f}),_e.call(this)}})(),CanvasRenderingContext2D.prototype.restore=(function(){var _e=CanvasRenderingContext2D.prototype.restore;return function(){this._t2stack&&this._t2stack.pop(),_e.call(this)}})(),CanvasRenderingContext2D.prototype.transform=(function(){var _e=CanvasRenderingContext2D.prototype.transform;return function(tt,rt,nt,st,dt,ft){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var ht=this._t2stack[this._t2stack.length-1],mt=ht.a*tt+ht.c*rt,bt=ht.b*tt+ht.d*rt,St=ht.a*nt+ht.c*st,Et=ht.b*nt+ht.d*st,Ct=ht.e+ht.a*dt+ht.c*ft,Rt=ht.f+ht.b*dt+ht.d*ft;ht.a=mt,ht.b=bt,ht.c=St,ht.d=Et,ht.e=Ct,ht.f=Rt,_e.call(this,tt,rt,nt,st,dt,ft)}})(),CanvasRenderingContext2D.prototype.setTransform=(function(){var _e=CanvasRenderingContext2D.prototype.setTransform;return function(tt,rt,nt,st,dt,ft){if(this._t2stack||(this._t2stack=[{}]),typeof tt=="object"||typeof tt>"u"){var ht=tt.a,mt=tt.b,bt=tt.c,St=tt.d,Et=tt.e,Ct=tt.f;this._t2stack[this._t2stack.length-1]={a:ht,b:mt,c:bt,d:St,e:Et,f:Ct},_e.call(this,ht,mt,bt,St,Et,Ct)}else this._t2stack[this._t2stack.length-1]={a:tt,b:rt,c:nt,d:st,e:dt,f:ft},_e.call(this,tt,rt,nt,st,dt,ft)}})(),CanvasRenderingContext2D.prototype.resetTransform=(function(){var _e=CanvasRenderingContext2D.prototype.resetTransform;return function(){this._t2stack||(this._t2stack=[{}]),this._t2stack[this._t2stack.length-1]={a:1,b:0,c:0,d:1,e:0,f:0},_e&&_e.call(this)}})(),CanvasRenderingContext2D.prototype.scale=(function(){var _e=CanvasRenderingContext2D.prototype.scale;return function(tt,rt){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var nt=this._t2stack[this._t2stack.length-1];tt=tt||1,rt=rt||tt,nt.a*=tt,nt.c*=rt,nt.b*=tt,nt.d*=rt,_e.call(this,tt,rt)}})(),CanvasRenderingContext2D.prototype.rotate=(function(){var _e=CanvasRenderingContext2D.prototype.rotate;return function(tt){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var rt=this._t2stack[this._t2stack.length-1],nt=Math.cos(-tt),st=Math.sin(-tt),dt=rt.a*nt-rt.c*st,ft=rt.b*nt-rt.d*st,ht=rt.c*nt+rt.a*st,mt=rt.d*nt+rt.b*st;return rt.a=dt,rt.b=ft,rt.c=ht,rt.d=mt,_e.call(this,tt)}})(),CanvasRenderingContext2D.prototype.translate=(function(){var _e=CanvasRenderingContext2D.prototype.translate;return function(tt,rt){this._t2stack||(this._t2stack=[{a:1,b:0,c:0,d:1,e:0,f:0}]);var nt=this._t2stack[this._t2stack.length-1];return nt.e+=tt*nt.a+rt*nt.c,nt.f+=tt*nt.b+rt*nt.d,_e.call(this,tt,rt)}})())})()}return et(),dist$1}var sparkMd5={exports:{}},hasRequiredSparkMd5;function requireSparkMd5(){return hasRequiredSparkMd5||(hasRequiredSparkMd5=1,(function(et,_e){(function(tt){et.exports=tt()})(function(tt){var rt=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function nt(At,Nt){var Pt=At[0],It=At[1],Ft=At[2],qt=At[3];Pt+=(It&Ft|~It&qt)+Nt[0]-680876936|0,Pt=(Pt<<7|Pt>>>25)+It|0,qt+=(Pt&It|~Pt&Ft)+Nt[1]-389564586|0,qt=(qt<<12|qt>>>20)+Pt|0,Ft+=(qt&Pt|~qt&It)+Nt[2]+606105819|0,Ft=(Ft<<17|Ft>>>15)+qt|0,It+=(Ft&qt|~Ft&Pt)+Nt[3]-1044525330|0,It=(It<<22|It>>>10)+Ft|0,Pt+=(It&Ft|~It&qt)+Nt[4]-176418897|0,Pt=(Pt<<7|Pt>>>25)+It|0,qt+=(Pt&It|~Pt&Ft)+Nt[5]+1200080426|0,qt=(qt<<12|qt>>>20)+Pt|0,Ft+=(qt&Pt|~qt&It)+Nt[6]-1473231341|0,Ft=(Ft<<17|Ft>>>15)+qt|0,It+=(Ft&qt|~Ft&Pt)+Nt[7]-45705983|0,It=(It<<22|It>>>10)+Ft|0,Pt+=(It&Ft|~It&qt)+Nt[8]+1770035416|0,Pt=(Pt<<7|Pt>>>25)+It|0,qt+=(Pt&It|~Pt&Ft)+Nt[9]-1958414417|0,qt=(qt<<12|qt>>>20)+Pt|0,Ft+=(qt&Pt|~qt&It)+Nt[10]-42063|0,Ft=(Ft<<17|Ft>>>15)+qt|0,It+=(Ft&qt|~Ft&Pt)+Nt[11]-1990404162|0,It=(It<<22|It>>>10)+Ft|0,Pt+=(It&Ft|~It&qt)+Nt[12]+1804603682|0,Pt=(Pt<<7|Pt>>>25)+It|0,qt+=(Pt&It|~Pt&Ft)+Nt[13]-40341101|0,qt=(qt<<12|qt>>>20)+Pt|0,Ft+=(qt&Pt|~qt&It)+Nt[14]-1502002290|0,Ft=(Ft<<17|Ft>>>15)+qt|0,It+=(Ft&qt|~Ft&Pt)+Nt[15]+1236535329|0,It=(It<<22|It>>>10)+Ft|0,Pt+=(It&qt|Ft&~qt)+Nt[1]-165796510|0,Pt=(Pt<<5|Pt>>>27)+It|0,qt+=(Pt&Ft|It&~Ft)+Nt[6]-1069501632|0,qt=(qt<<9|qt>>>23)+Pt|0,Ft+=(qt&It|Pt&~It)+Nt[11]+643717713|0,Ft=(Ft<<14|Ft>>>18)+qt|0,It+=(Ft&Pt|qt&~Pt)+Nt[0]-373897302|0,It=(It<<20|It>>>12)+Ft|0,Pt+=(It&qt|Ft&~qt)+Nt[5]-701558691|0,Pt=(Pt<<5|Pt>>>27)+It|0,qt+=(Pt&Ft|It&~Ft)+Nt[10]+38016083|0,qt=(qt<<9|qt>>>23)+Pt|0,Ft+=(qt&It|Pt&~It)+Nt[15]-660478335|0,Ft=(Ft<<14|Ft>>>18)+qt|0,It+=(Ft&Pt|qt&~Pt)+Nt[4]-405537848|0,It=(It<<20|It>>>12)+Ft|0,Pt+=(It&qt|Ft&~qt)+Nt[9]+568446438|0,Pt=(Pt<<5|Pt>>>27)+It|0,qt+=(Pt&Ft|It&~Ft)+Nt[14]-1019803690|0,qt=(qt<<9|qt>>>23)+Pt|0,Ft+=(qt&It|Pt&~It)+Nt[3]-187363961|0,Ft=(Ft<<14|Ft>>>18)+qt|0,It+=(Ft&Pt|qt&~Pt)+Nt[8]+1163531501|0,It=(It<<20|It>>>12)+Ft|0,Pt+=(It&qt|Ft&~qt)+Nt[13]-1444681467|0,Pt=(Pt<<5|Pt>>>27)+It|0,qt+=(Pt&Ft|It&~Ft)+Nt[2]-51403784|0,qt=(qt<<9|qt>>>23)+Pt|0,Ft+=(qt&It|Pt&~It)+Nt[7]+1735328473|0,Ft=(Ft<<14|Ft>>>18)+qt|0,It+=(Ft&Pt|qt&~Pt)+Nt[12]-1926607734|0,It=(It<<20|It>>>12)+Ft|0,Pt+=(It^Ft^qt)+Nt[5]-378558|0,Pt=(Pt<<4|Pt>>>28)+It|0,qt+=(Pt^It^Ft)+Nt[8]-2022574463|0,qt=(qt<<11|qt>>>21)+Pt|0,Ft+=(qt^Pt^It)+Nt[11]+1839030562|0,Ft=(Ft<<16|Ft>>>16)+qt|0,It+=(Ft^qt^Pt)+Nt[14]-35309556|0,It=(It<<23|It>>>9)+Ft|0,Pt+=(It^Ft^qt)+Nt[1]-1530992060|0,Pt=(Pt<<4|Pt>>>28)+It|0,qt+=(Pt^It^Ft)+Nt[4]+1272893353|0,qt=(qt<<11|qt>>>21)+Pt|0,Ft+=(qt^Pt^It)+Nt[7]-155497632|0,Ft=(Ft<<16|Ft>>>16)+qt|0,It+=(Ft^qt^Pt)+Nt[10]-1094730640|0,It=(It<<23|It>>>9)+Ft|0,Pt+=(It^Ft^qt)+Nt[13]+681279174|0,Pt=(Pt<<4|Pt>>>28)+It|0,qt+=(Pt^It^Ft)+Nt[0]-358537222|0,qt=(qt<<11|qt>>>21)+Pt|0,Ft+=(qt^Pt^It)+Nt[3]-722521979|0,Ft=(Ft<<16|Ft>>>16)+qt|0,It+=(Ft^qt^Pt)+Nt[6]+76029189|0,It=(It<<23|It>>>9)+Ft|0,Pt+=(It^Ft^qt)+Nt[9]-640364487|0,Pt=(Pt<<4|Pt>>>28)+It|0,qt+=(Pt^It^Ft)+Nt[12]-421815835|0,qt=(qt<<11|qt>>>21)+Pt|0,Ft+=(qt^Pt^It)+Nt[15]+530742520|0,Ft=(Ft<<16|Ft>>>16)+qt|0,It+=(Ft^qt^Pt)+Nt[2]-995338651|0,It=(It<<23|It>>>9)+Ft|0,Pt+=(Ft^(It|~qt))+Nt[0]-198630844|0,Pt=(Pt<<6|Pt>>>26)+It|0,qt+=(It^(Pt|~Ft))+Nt[7]+1126891415|0,qt=(qt<<10|qt>>>22)+Pt|0,Ft+=(Pt^(qt|~It))+Nt[14]-1416354905|0,Ft=(Ft<<15|Ft>>>17)+qt|0,It+=(qt^(Ft|~Pt))+Nt[5]-57434055|0,It=(It<<21|It>>>11)+Ft|0,Pt+=(Ft^(It|~qt))+Nt[12]+1700485571|0,Pt=(Pt<<6|Pt>>>26)+It|0,qt+=(It^(Pt|~Ft))+Nt[3]-1894986606|0,qt=(qt<<10|qt>>>22)+Pt|0,Ft+=(Pt^(qt|~It))+Nt[10]-1051523|0,Ft=(Ft<<15|Ft>>>17)+qt|0,It+=(qt^(Ft|~Pt))+Nt[1]-2054922799|0,It=(It<<21|It>>>11)+Ft|0,Pt+=(Ft^(It|~qt))+Nt[8]+1873313359|0,Pt=(Pt<<6|Pt>>>26)+It|0,qt+=(It^(Pt|~Ft))+Nt[15]-30611744|0,qt=(qt<<10|qt>>>22)+Pt|0,Ft+=(Pt^(qt|~It))+Nt[6]-1560198380|0,Ft=(Ft<<15|Ft>>>17)+qt|0,It+=(qt^(Ft|~Pt))+Nt[13]+1309151649|0,It=(It<<21|It>>>11)+Ft|0,Pt+=(Ft^(It|~qt))+Nt[4]-145523070|0,Pt=(Pt<<6|Pt>>>26)+It|0,qt+=(It^(Pt|~Ft))+Nt[11]-1120210379|0,qt=(qt<<10|qt>>>22)+Pt|0,Ft+=(Pt^(qt|~It))+Nt[2]+718787259|0,Ft=(Ft<<15|Ft>>>17)+qt|0,It+=(qt^(Ft|~Pt))+Nt[9]-343485551|0,It=(It<<21|It>>>11)+Ft|0,At[0]=Pt+At[0]|0,At[1]=It+At[1]|0,At[2]=Ft+At[2]|0,At[3]=qt+At[3]|0}function st(At){var Nt=[],Pt;for(Pt=0;Pt<64;Pt+=4)Nt[Pt>>2]=At.charCodeAt(Pt)+(At.charCodeAt(Pt+1)<<8)+(At.charCodeAt(Pt+2)<<16)+(At.charCodeAt(Pt+3)<<24);return Nt}function dt(At){var Nt=[],Pt;for(Pt=0;Pt<64;Pt+=4)Nt[Pt>>2]=At[Pt]+(At[Pt+1]<<8)+(At[Pt+2]<<16)+(At[Pt+3]<<24);return Nt}function ft(At){var Nt=At.length,Pt=[1732584193,-271733879,-1732584194,271733878],It,Ft,qt,Vt,Kt,jt;for(It=64;It<=Nt;It+=64)nt(Pt,st(At.substring(It-64,It)));for(At=At.substring(It-64),Ft=At.length,qt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],It=0;It<Ft;It+=1)qt[It>>2]|=At.charCodeAt(It)<<(It%4<<3);if(qt[It>>2]|=128<<(It%4<<3),It>55)for(nt(Pt,qt),It=0;It<16;It+=1)qt[It]=0;return Vt=Nt*8,Vt=Vt.toString(16).match(/(.*?)(.{0,8})$/),Kt=parseInt(Vt[2],16),jt=parseInt(Vt[1],16)||0,qt[14]=Kt,qt[15]=jt,nt(Pt,qt),Pt}function ht(At){var Nt=At.length,Pt=[1732584193,-271733879,-1732584194,271733878],It,Ft,qt,Vt,Kt,jt;for(It=64;It<=Nt;It+=64)nt(Pt,dt(At.subarray(It-64,It)));for(At=It-64<Nt?At.subarray(It-64):new Uint8Array(0),Ft=At.length,qt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],It=0;It<Ft;It+=1)qt[It>>2]|=At[It]<<(It%4<<3);if(qt[It>>2]|=128<<(It%4<<3),It>55)for(nt(Pt,qt),It=0;It<16;It+=1)qt[It]=0;return Vt=Nt*8,Vt=Vt.toString(16).match(/(.*?)(.{0,8})$/),Kt=parseInt(Vt[2],16),jt=parseInt(Vt[1],16)||0,qt[14]=Kt,qt[15]=jt,nt(Pt,qt),Pt}function mt(At){var Nt="",Pt;for(Pt=0;Pt<4;Pt+=1)Nt+=rt[At>>Pt*8+4&15]+rt[At>>Pt*8&15];return Nt}function bt(At){var Nt;for(Nt=0;Nt<At.length;Nt+=1)At[Nt]=mt(At[Nt]);return At.join("")}bt(ft("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function At(Nt,Pt){return Nt=Nt|0||0,Nt<0?Math.max(Nt+Pt,0):Math.min(Nt,Pt)}ArrayBuffer.prototype.slice=function(Nt,Pt){var It=this.byteLength,Ft=At(Nt,It),qt=It,Vt,Kt,jt,Ut;return Pt!==tt&&(qt=At(Pt,It)),Ft>qt?new ArrayBuffer(0):(Vt=qt-Ft,Kt=new ArrayBuffer(Vt),jt=new Uint8Array(Kt),Ut=new Uint8Array(this,Ft,Vt),jt.set(Ut),Kt)}})();function St(At){return/[\u0080-\uFFFF]/.test(At)&&(At=unescape(encodeURIComponent(At))),At}function Et(At,Nt){var Pt=At.length,It=new ArrayBuffer(Pt),Ft=new Uint8Array(It),qt;for(qt=0;qt<Pt;qt+=1)Ft[qt]=At.charCodeAt(qt);return Nt?Ft:It}function Ct(At){return String.fromCharCode.apply(null,new Uint8Array(At))}function Rt(At,Nt,Pt){var It=new Uint8Array(At.byteLength+Nt.byteLength);return It.set(new Uint8Array(At)),It.set(new Uint8Array(Nt),At.byteLength),It}function Tt(At){var Nt=[],Pt=At.length,It;for(It=0;It<Pt-1;It+=2)Nt.push(parseInt(At.substr(It,2),16));return String.fromCharCode.apply(String,Nt)}function wt(){this.reset()}return wt.prototype.append=function(At){return this.appendBinary(St(At)),this},wt.prototype.appendBinary=function(At){this._buff+=At,this._length+=At.length;var Nt=this._buff.length,Pt;for(Pt=64;Pt<=Nt;Pt+=64)nt(this._hash,st(this._buff.substring(Pt-64,Pt)));return this._buff=this._buff.substring(Pt-64),this},wt.prototype.end=function(At){var Nt=this._buff,Pt=Nt.length,It,Ft=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],qt;for(It=0;It<Pt;It+=1)Ft[It>>2]|=Nt.charCodeAt(It)<<(It%4<<3);return this._finish(Ft,Pt),qt=bt(this._hash),At&&(qt=Tt(qt)),this.reset(),qt},wt.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},wt.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},wt.prototype.setState=function(At){return this._buff=At.buff,this._length=At.length,this._hash=At.hash,this},wt.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},wt.prototype._finish=function(At,Nt){var Pt=Nt,It,Ft,qt;if(At[Pt>>2]|=128<<(Pt%4<<3),Pt>55)for(nt(this._hash,At),Pt=0;Pt<16;Pt+=1)At[Pt]=0;It=this._length*8,It=It.toString(16).match(/(.*?)(.{0,8})$/),Ft=parseInt(It[2],16),qt=parseInt(It[1],16)||0,At[14]=Ft,At[15]=qt,nt(this._hash,At)},wt.hash=function(At,Nt){return wt.hashBinary(St(At),Nt)},wt.hashBinary=function(At,Nt){var Pt=ft(At),It=bt(Pt);return Nt?Tt(It):It},wt.ArrayBuffer=function(){this.reset()},wt.ArrayBuffer.prototype.append=function(At){var Nt=Rt(this._buff.buffer,At),Pt=Nt.length,It;for(this._length+=At.byteLength,It=64;It<=Pt;It+=64)nt(this._hash,dt(Nt.subarray(It-64,It)));return this._buff=It-64<Pt?new Uint8Array(Nt.buffer.slice(It-64)):new Uint8Array(0),this},wt.ArrayBuffer.prototype.end=function(At){var Nt=this._buff,Pt=Nt.length,It=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Ft,qt;for(Ft=0;Ft<Pt;Ft+=1)It[Ft>>2]|=Nt[Ft]<<(Ft%4<<3);return this._finish(It,Pt),qt=bt(this._hash),At&&(qt=Tt(qt)),this.reset(),qt},wt.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},wt.ArrayBuffer.prototype.getState=function(){var At=wt.prototype.getState.call(this);return At.buff=Ct(At.buff),At},wt.ArrayBuffer.prototype.setState=function(At){return At.buff=Et(At.buff,!0),wt.prototype.setState.call(this,At)},wt.ArrayBuffer.prototype.destroy=wt.prototype.destroy,wt.ArrayBuffer.prototype._finish=wt.prototype._finish,wt.ArrayBuffer.hash=function(At,Nt){var Pt=ht(new Uint8Array(At)),It=bt(Pt);return Nt?Tt(It):It},wt})})(sparkMd5)),sparkMd5.exports}var browserAtob={exports:{}},hasRequiredBrowserAtob;function requireBrowserAtob(){return hasRequiredBrowserAtob||(hasRequiredBrowserAtob=1,(function(et){(function(_e){function tt(nt){return typeof nt=="function"?nt:typeof Buffer=="function"?function(dt){//!! Deliberately using an API that's deprecated in node.js because
//!! this file is for browsers and we expect them to cope with it.
//!! Discussion: github.com/node-browser-compat/atob/pull/9
return new Buffer(dt,"base64").toString("binary")}:typeof _e.base64js=="object"?function(dt){var ft=_e.base64js.b64ToByteArray(dt);return Array.prototype.map.call(ft,function(ht){return String.fromCharCode(ht)}).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")}}var rt=tt(_e.atob);_e.atob=rt,et&&et.exports&&(et.exports=rt)})(window)})(browserAtob)),browserAtob.exports}var queryString={},strictUriEncode,hasRequiredStrictUriEncode;function requireStrictUriEncode(){return hasRequiredStrictUriEncode||(hasRequiredStrictUriEncode=1,strictUriEncode=function(et){return encodeURIComponent(et).replace(/[!'()*]/g,function(_e){return"%"+_e.charCodeAt(0).toString(16).toUpperCase()})}),strictUriEncode}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var objectAssign$1,hasRequiredObjectAssign;function requireObjectAssign(){if(hasRequiredObjectAssign)return objectAssign$1;hasRequiredObjectAssign=1;var et=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable;function rt(st){if(st==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(st)}function nt(){try{if(!Object.assign)return!1;var st=new String("abc");if(st[5]="de",Object.getOwnPropertyNames(st)[0]==="5")return!1;for(var dt={},ft=0;ft<10;ft++)dt["_"+String.fromCharCode(ft)]=ft;var ht=Object.getOwnPropertyNames(dt).map(function(bt){return dt[bt]});if(ht.join("")!=="0123456789")return!1;var mt={};return"abcdefghijklmnopqrst".split("").forEach(function(bt){mt[bt]=bt}),Object.keys(Object.assign({},mt)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return objectAssign$1=nt()?Object.assign:function(st,dt){for(var ft,ht=rt(st),mt,bt=1;bt<arguments.length;bt++){ft=Object(arguments[bt]);for(var St in ft)_e.call(ft,St)&&(ht[St]=ft[St]);if(et){mt=et(ft);for(var Et=0;Et<mt.length;Et++)tt.call(ft,mt[Et])&&(ht[mt[Et]]=ft[mt[Et]])}}return ht},objectAssign$1}var decodeUriComponent,hasRequiredDecodeUriComponent;function requireDecodeUriComponent(){if(hasRequiredDecodeUriComponent)return decodeUriComponent;hasRequiredDecodeUriComponent=1;var et="%[a-f0-9]{2}",_e=new RegExp("("+et+")|([^%]+?)","gi"),tt=new RegExp("("+et+")+","gi");function rt(dt,ft){try{return[decodeURIComponent(dt.join(""))]}catch{}if(dt.length===1)return dt;ft=ft||1;var ht=dt.slice(0,ft),mt=dt.slice(ft);return Array.prototype.concat.call([],rt(ht),rt(mt))}function nt(dt){try{return decodeURIComponent(dt)}catch{for(var ft=dt.match(_e)||[],ht=1;ht<ft.length;ht++)dt=rt(ft,ht).join(""),ft=dt.match(_e)||[];return dt}}function st(dt){for(var ft={"%FE%FF":"<22><>","%FF%FE":"<22><>"},ht=tt.exec(dt);ht;){try{ft[ht[0]]=decodeURIComponent(ht[0])}catch{var mt=nt(ht[0]);mt!==ht[0]&&(ft[ht[0]]=mt)}ht=tt.exec(dt)}ft["%C2"]="<22>";for(var bt=Object.keys(ft),St=0;St<bt.length;St++){var Et=bt[St];dt=dt.replace(new RegExp(Et,"g"),ft[Et])}return dt}return decodeUriComponent=function(dt){if(typeof dt!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof dt+"`");try{return dt=dt.replace(/\+/g," "),decodeURIComponent(dt)}catch{return st(dt)}},decodeUriComponent}var hasRequiredQueryString;function requireQueryString(){if(hasRequiredQueryString)return queryString;hasRequiredQueryString=1;var et=requireStrictUriEncode(),_e=requireObjectAssign(),tt=requireDecodeUriComponent();function rt(mt){switch(mt.arrayFormat){case"index":return function(bt,St,Et){return St===null?[st(bt,mt),"[",Et,"]"].join(""):[st(bt,mt),"[",st(Et,mt),"]=",st(St,mt)].join("")};case"bracket":return function(bt,St){return St===null?st(bt,mt):[st(bt,mt),"[]=",st(St,mt)].join("")};default:return function(bt,St){return St===null?st(bt,mt):[st(bt,mt),"=",st(St,mt)].join("")}}}function nt(mt){var bt;switch(mt.arrayFormat){case"index":return function(St,Et,Ct){if(bt=/\[(\d*)\]$/.exec(St),St=St.replace(/\[\d*\]$/,""),!bt){Ct[St]=Et;return}Ct[St]===void 0&&(Ct[St]={}),Ct[St][bt[1]]=Et};case"bracket":return function(St,Et,Ct){if(bt=/(\[\])$/.exec(St),St=St.replace(/\[\]$/,""),bt){if(Ct[St]===void 0){Ct[St]=[Et];return}}else{Ct[St]=Et;return}Ct[St]=[].concat(Ct[St],Et)};default:return function(St,Et,Ct){if(Ct[St]===void 0){Ct[St]=Et;return}Ct[St]=[].concat(Ct[St],Et)}}}function st(mt,bt){return bt.encode?bt.strict?et(mt):encodeURIComponent(mt):mt}function dt(mt){return Array.isArray(mt)?mt.sort():typeof mt=="object"?dt(Object.keys(mt)).sort(function(bt,St){return Number(bt)-Number(St)}).map(function(bt){return mt[bt]}):mt}function ft(mt){var bt=mt.indexOf("?");return bt===-1?"":mt.slice(bt+1)}function ht(mt,bt){bt=_e({arrayFormat:"none"},bt);var St=nt(bt),Et=Object.create(null);return typeof mt!="string"||(mt=mt.trim().replace(/^[?#&]/,""),!mt)?Et:(mt.split("&").forEach(function(Ct){var Rt=Ct.replace(/\+/g," ").split("="),Tt=Rt.shift(),wt=Rt.length>0?Rt.join("="):void 0;wt=wt===void 0?null:tt(wt),St(tt(Tt),wt,Et)}),Object.keys(Et).sort().reduce(function(Ct,Rt){var Tt=Et[Rt];return Tt&&typeof Tt=="object"&&!Array.isArray(Tt)?Ct[Rt]=dt(Tt):Ct[Rt]=Tt,Ct},Object.create(null)))}return queryString.extract=ft,queryString.parse=ht,queryString.stringify=function(mt,bt){var St={encode:!0,strict:!0,arrayFormat:"none"};bt=_e(St,bt),bt.sort===!1&&(bt.sort=function(){});var Et=rt(bt);return mt?Object.keys(mt).sort(bt.sort).map(function(Ct){var Rt=mt[Ct];if(Rt===void 0)return"";if(Rt===null)return st(Ct,bt);if(Array.isArray(Rt)){var Tt=[];return Rt.slice().forEach(function(wt){wt!==void 0&&Tt.push(Et(Ct,wt,Tt.length))}),Tt.join("&")}return st(Ct,bt)+"="+st(Rt,bt)}).filter(function(Ct){return Ct.length>0}).join("&"):""},queryString.parseUrl=function(mt,bt){return{url:mt.split("?")[0]||"",query:ht(ft(mt),bt)}},queryString}var react$1={exports:{}},react_production_min$1={};/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min$1;hasRequiredReact_production_min=1;var et=requireObjectAssign(),_e=typeof Symbol=="function"&&Symbol.for,tt=_e?Symbol.for("react.element"):60103,rt=_e?Symbol.for("react.portal"):60106,nt=_e?Symbol.for("react.fragment"):60107,st=_e?Symbol.for("react.strict_mode"):60108,dt=_e?Symbol.for("react.profiler"):60114,ft=_e?Symbol.for("react.provider"):60109,ht=_e?Symbol.for("react.context"):60110,mt=_e?Symbol.for("react.forward_ref"):60112,bt=_e?Symbol.for("react.suspense"):60113,St=_e?Symbol.for("react.memo"):60115,Et=_e?Symbol.for("react.lazy"):60116,Ct=typeof Symbol=="function"&&Symbol.iterator;function Rt(Nr){for(var Yr="https://reactjs.org/docs/error-decoder.html?invariant="+Nr,Or=1;Or<arguments.length;Or++)Yr+="&args[]="+encodeURIComponent(arguments[Or]);return"Minified React error #"+Nr+"; visit "+Yr+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Tt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wt={};function At(Nr,Yr,Or){this.props=Nr,this.context=Yr,this.refs=wt,this.updater=Or||Tt}At.prototype.isReactComponent={},At.prototype.setState=function(Nr,Yr){if(typeof Nr!="object"&&typeof Nr!="function"&&Nr!=null)throw Error(Rt(85));this.updater.enqueueSetState(this,Nr,Yr,"setState")},At.prototype.forceUpdate=function(Nr){this.updater.enqueueForceUpdate(this,Nr,"forceUpdate")};function Nt(){}Nt.prototype=At.prototype;function Pt(Nr,Yr,Or){this.props=Nr,this.context=Yr,this.refs=wt,this.updater=Or||Tt}var It=Pt.prototype=new Nt;It.constructor=Pt,et(It,At.prototype),It.isPureReactComponent=!0;var Ft={current:null},qt=Object.prototype.hasOwnProperty,Vt={key:!0,ref:!0,__self:!0,__source:!0};function Kt(Nr,Yr,Or){var Ar,Qr={},hn=null,Sn=null;if(Yr!=null)for(Ar in Yr.ref!==void 0&&(Sn=Yr.ref),Yr.key!==void 0&&(hn=""+Yr.key),Yr)qt.call(Yr,Ar)&&!Vt.hasOwnProperty(Ar)&&(Qr[Ar]=Yr[Ar]);var Kr=arguments.length-2;if(Kr===1)Qr.children=Or;else if(1<Kr){for(var Hn=Array(Kr),ln=0;ln<Kr;ln++)Hn[ln]=arguments[ln+2];Qr.children=Hn}if(Nr&&Nr.defaultProps)for(Ar in Kr=Nr.defaultProps,Kr)Qr[Ar]===void 0&&(Qr[Ar]=Kr[Ar]);return{$$typeof:tt,type:Nr,key:hn,ref:Sn,props:Qr,_owner:Ft.current}}function jt(Nr,Yr){return{$$typeof:tt,type:Nr.type,key:Yr,ref:Nr.ref,props:Nr.props,_owner:Nr._owner}}function Ut(Nr){return typeof Nr=="object"&&Nr!==null&&Nr.$$typeof===tt}function Ot(Nr){var Yr={"=":"=0",":":"=2"};return"$"+(""+Nr).replace(/[=:]/g,function(Or){return Yr[Or]})}var Wt=/\/+/g,Bt=[];function tr(Nr,Yr,Or,Ar){if(Bt.length){var Qr=Bt.pop();return Qr.result=Nr,Qr.keyPrefix=Yr,Qr.func=Or,Qr.context=Ar,Qr.count=0,Qr}return{result:Nr,keyPrefix:Yr,func:Or,context:Ar,count:0}}function Jt(Nr){Nr.result=null,Nr.keyPrefix=null,Nr.func=null,Nr.context=null,Nr.count=0,10>Bt.length&&Bt.push(Nr)}function ar(Nr,Yr,Or,Ar){var Qr=typeof Nr;(Qr==="undefined"||Qr==="boolean")&&(Nr=null);var hn=!1;if(Nr===null)hn=!0;else switch(Qr){case"string":case"number":hn=!0;break;case"object":switch(Nr.$$typeof){case tt:case rt:hn=!0}}if(hn)return Or(Ar,Nr,Yr===""?"."+cr(Nr,0):Yr),1;if(hn=0,Yr=Yr===""?".":Yr+":",Array.isArray(Nr))for(var Sn=0;Sn<Nr.length;Sn++){Qr=Nr[Sn];var Kr=Yr+cr(Qr,Sn);hn+=ar(Qr,Kr,Or,Ar)}else if(Nr===null||typeof Nr!="object"?Kr=null:(Kr=Ct&&Nr[Ct]||Nr["@@iterator"],Kr=typeof Kr=="function"?Kr:null),typeof Kr=="function")for(Nr=Kr.call(Nr),Sn=0;!(Qr=Nr.next()).done;)Qr=Qr.value,Kr=Yr+cr(Qr,Sn++),hn+=ar(Qr,Kr,Or,Ar);else if(Qr==="object")throw Or=""+Nr,Error(Rt(31,Or==="[object Object]"?"object with keys {"+Object.keys(Nr).join(", ")+"}":Or,""));return hn}function pr(Nr,Yr,Or){return Nr==null?0:ar(Nr,"",Yr,Or)}function cr(Nr,Yr){return typeof Nr=="object"&&Nr!==null&&Nr.key!=null?Ot(Nr.key):Yr.toString(36)}function gr(Nr,Yr){Nr.func.call(Nr.context,Yr,Nr.count++)}function Sr(Nr,Yr,Or){var Ar=Nr.result,Qr=Nr.keyPrefix;Nr=Nr.func.call(Nr.context,Yr,Nr.count++),Array.isArray(Nr)?Er(Nr,Ar,Or,function(hn){return hn}):Nr!=null&&(Ut(Nr)&&(Nr=jt(Nr,Qr+(!Nr.key||Yr&&Yr.key===Nr.key?"":(""+Nr.key).replace(Wt,"$&/")+"/")+Or)),Ar.push(Nr))}function Er(Nr,Yr,Or,Ar,Qr){var hn="";Or!=null&&(hn=(""+Or).replace(Wt,"$&/")+"/"),Yr=tr(Yr,hn,Ar,Qr),pr(Nr,Sr,Yr),Jt(Yr)}var Vr={current:null};function Wr(){var Nr=Vr.current;if(Nr===null)throw Error(Rt(321));return Nr}var Mr={ReactCurrentDispatcher:Vr,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:Ft,IsSomeRendererActing:{current:!1},assign:et};return react_production_min$1.Children={map:function(Nr,Yr,Or){if(Nr==null)return Nr;var Ar=[];return Er(Nr,Ar,null,Yr,Or),Ar},forEach:function(Nr,Yr,Or){if(Nr==null)return Nr;Yr=tr(null,null,Yr,Or),pr(Nr,gr,Yr),Jt(Yr)},count:function(Nr){return pr(Nr,function(){return null},null)},toArray:function(Nr){var Yr=[];return Er(Nr,Yr,null,function(Or){return Or}),Yr},only:function(Nr){if(!Ut(Nr))throw Error(Rt(143));return Nr}},react_production_min$1.Component=At,react_production_min$1.Fragment=nt,react_production_min$1.Profiler=dt,react_production_min$1.PureComponent=Pt,react_production_min$1.StrictMode=st,react_production_min$1.Suspense=bt,react_production_min$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mr,react_production_min$1.cloneElement=function(Nr,Yr,Or){if(Nr==null)throw Error(Rt(267,Nr));var Ar=et({},Nr.props),Qr=Nr.key,hn=Nr.ref,Sn=Nr._owner;if(Yr!=null){if(Yr.ref!==void 0&&(hn=Yr.ref,Sn=Ft.current),Yr.key!==void 0&&(Qr=""+Yr.key),Nr.type&&Nr.type.defaultProps)var Kr=Nr.type.defaultProps;for(Hn in Yr)qt.call(Yr,Hn)&&!Vt.hasOwnProperty(Hn)&&(Ar[Hn]=Yr[Hn]===void 0&&Kr!==void 0?Kr[Hn]:Yr[Hn])}var Hn=arguments.length-2;if(Hn===1)Ar.children=Or;else if(1<Hn){Kr=Array(Hn);for(var ln=0;ln<Hn;ln++)Kr[ln]=arguments[ln+2];Ar.children=Kr}return{$$typeof:tt,type:Nr.type,key:Qr,ref:hn,props:Ar,_owner:Sn}},react_production_min$1.createContext=function(Nr,Yr){return Yr===void 0&&(Yr=null),Nr={$$typeof:ht,_calculateChangedBits:Yr,_currentValue:Nr,_currentValue2:Nr,_threadCount:0,Provider:null,Consumer:null},Nr.Provider={$$typeof:ft,_context:Nr},Nr.Consumer=Nr},react_production_min$1.createElement=Kt,react_production_min$1.createFactory=function(Nr){var Yr=Kt.bind(null,Nr);return Yr.type=Nr,Yr},react_production_min$1.createRef=function(){return{current:null}},react_production_min$1.forwardRef=function(Nr){return{$$typeof:mt,render:Nr}},react_production_min$1.isValidElement=Ut,react_production_min$1.lazy=function(Nr){return{$$typeof:Et,_ctor:Nr,_status:-1,_result:null}},react_production_min$1.memo=function(Nr,Yr){return{$$typeof:St,type:Nr,compare:Yr===void 0?null:Yr}},react_production_min$1.useCallback=function(Nr,Yr){return Wr().useCallback(Nr,Yr)},react_production_min$1.useContext=function(Nr,Yr){return Wr().useContext(Nr,Yr)},react_production_min$1.useDebugValue=function(){},react_production_min$1.useEffect=function(Nr,Yr){return Wr().useEffect(Nr,Yr)},react_production_min$1.useImperativeHandle=function(Nr,Yr,Or){return Wr().useImperativeHandle(Nr,Yr,Or)},react_production_min$1.useLayoutEffect=function(Nr,Yr){return Wr().useLayoutEffect(Nr,Yr)},react_production_min$1.useMemo=function(Nr,Yr){return Wr().useMemo(Nr,Yr)},react_production_min$1.useReducer=function(Nr,Yr,Or){return Wr().useReducer(Nr,Yr,Or)},react_production_min$1.useRef=function(Nr){return Wr().useRef(Nr)},react_production_min$1.useState=function(Nr){return Wr().useState(Nr)},react_production_min$1.version="16.14.0",react_production_min$1}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react$1.exports=requireReact_production_min()),react$1.exports}var es5$1={exports:{}},es5=es5$1.exports,hasRequiredEs5;function requireEs5(){return hasRequiredEs5||(hasRequiredEs5=1,(function(et,_e){(function(tt,rt){et.exports=rt()})(es5,(function(){return(function(tt){var rt={};function nt(st){if(rt[st])return rt[st].exports;var dt=rt[st]={i:st,l:!1,exports:{}};return tt[st].call(dt.exports,dt,dt.exports,nt),dt.l=!0,dt.exports}return nt.m=tt,nt.c=rt,nt.d=function(st,dt,ft){nt.o(st,dt)||Object.defineProperty(st,dt,{enumerable:!0,get:ft})},nt.r=function(st){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(st,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(st,"__esModule",{value:!0})},nt.t=function(st,dt){if(1&dt&&(st=nt(st)),8&dt||4&dt&&typeof st=="object"&&st&&st.__esModule)return st;var ft=Object.create(null);if(nt.r(ft),Object.defineProperty(ft,"default",{enumerable:!0,value:st}),2&dt&&typeof st!="string")for(var ht in st)nt.d(ft,ht,(function(mt){return st[mt]}).bind(null,ht));return ft},nt.n=function(st){var dt=st&&st.__esModule?function(){return st.default}:function(){return st};return nt.d(dt,"a",dt),dt},nt.o=function(st,dt){return Object.prototype.hasOwnProperty.call(st,dt)},nt.p="",nt(nt.s=90)})({17:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st=nt(18),dt=(function(){function ft(){}return ft.getFirstMatch=function(ht,mt){var bt=mt.match(ht);return bt&&bt.length>0&&bt[1]||""},ft.getSecondMatch=function(ht,mt){var bt=mt.match(ht);return bt&&bt.length>1&&bt[2]||""},ft.matchAndReturnConst=function(ht,mt,bt){if(ht.test(mt))return bt},ft.getWindowsVersionName=function(ht){switch(ht){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},ft.getMacOSVersionName=function(ht){var mt=ht.split(".").splice(0,2).map((function(bt){return parseInt(bt,10)||0}));if(mt.push(0),mt[0]===10)switch(mt[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},ft.getAndroidVersionName=function(ht){var mt=ht.split(".").splice(0,2).map((function(bt){return parseInt(bt,10)||0}));if(mt.push(0),!(mt[0]===1&&mt[1]<5))return mt[0]===1&&mt[1]<6?"Cupcake":mt[0]===1&&mt[1]>=6?"Donut":mt[0]===2&&mt[1]<2?"Eclair":mt[0]===2&&mt[1]===2?"Froyo":mt[0]===2&&mt[1]>2?"Gingerbread":mt[0]===3?"Honeycomb":mt[0]===4&&mt[1]<1?"Ice Cream Sandwich":mt[0]===4&&mt[1]<4?"Jelly Bean":mt[0]===4&&mt[1]>=4?"KitKat":mt[0]===5?"Lollipop":mt[0]===6?"Marshmallow":mt[0]===7?"Nougat":mt[0]===8?"Oreo":mt[0]===9?"Pie":void 0},ft.getVersionPrecision=function(ht){return ht.split(".").length},ft.compareVersions=function(ht,mt,bt){bt===void 0&&(bt=!1);var St=ft.getVersionPrecision(ht),Et=ft.getVersionPrecision(mt),Ct=Math.max(St,Et),Rt=0,Tt=ft.map([ht,mt],(function(wt){var At=Ct-ft.getVersionPrecision(wt),Nt=wt+new Array(At+1).join(".0");return ft.map(Nt.split("."),(function(Pt){return new Array(20-Pt.length).join("0")+Pt})).reverse()}));for(bt&&(Rt=Ct-Math.min(St,Et)),Ct-=1;Ct>=Rt;){if(Tt[0][Ct]>Tt[1][Ct])return 1;if(Tt[0][Ct]===Tt[1][Ct]){if(Ct===Rt)return 0;Ct-=1}else if(Tt[0][Ct]<Tt[1][Ct])return-1}},ft.map=function(ht,mt){var bt,St=[];if(Array.prototype.map)return Array.prototype.map.call(ht,mt);for(bt=0;bt<ht.length;bt+=1)St.push(mt(ht[bt]));return St},ft.find=function(ht,mt){var bt,St;if(Array.prototype.find)return Array.prototype.find.call(ht,mt);for(bt=0,St=ht.length;bt<St;bt+=1){var Et=ht[bt];if(mt(Et,bt))return Et}},ft.assign=function(ht){for(var mt,bt,St=ht,Et=arguments.length,Ct=new Array(Et>1?Et-1:0),Rt=1;Rt<Et;Rt++)Ct[Rt-1]=arguments[Rt];if(Object.assign)return Object.assign.apply(Object,[ht].concat(Ct));var Tt=function(){var wt=Ct[mt];typeof wt=="object"&&wt!==null&&Object.keys(wt).forEach((function(At){St[At]=wt[At]}))};for(mt=0,bt=Ct.length;mt<bt;mt+=1)Tt();return ht},ft.getBrowserAlias=function(ht){return st.BROWSER_ALIASES_MAP[ht]},ft.getBrowserTypeByAlias=function(ht){return st.BROWSER_MAP[ht]||""},ft})();rt.default=dt,tt.exports=rt.default},18:function(tt,rt,nt){rt.__esModule=!0,rt.ENGINE_MAP=rt.OS_MAP=rt.PLATFORMS_MAP=rt.BROWSER_MAP=rt.BROWSER_ALIASES_MAP=void 0,rt.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},rt.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},rt.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},rt.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},rt.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st,dt=(st=nt(91))&&st.__esModule?st:{default:st},ft=nt(18);function ht(bt,St){for(var Et=0;Et<St.length;Et++){var Ct=St[Et];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(bt,Ct.key,Ct)}}var mt=(function(){function bt(){}var St,Et,Ct;return bt.getParser=function(Rt,Tt){if(Tt===void 0&&(Tt=!1),typeof Rt!="string")throw new Error("UserAgent should be a string");return new dt.default(Rt,Tt)},bt.parse=function(Rt){return new dt.default(Rt).getResult()},St=bt,Ct=[{key:"BROWSER_MAP",get:function(){return ft.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return ft.ENGINE_MAP}},{key:"OS_MAP",get:function(){return ft.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return ft.PLATFORMS_MAP}}],(Et=null)&&ht(St.prototype,Et),Ct&&ht(St,Ct),bt})();rt.default=mt,tt.exports=rt.default},91:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st=bt(nt(92)),dt=bt(nt(93)),ft=bt(nt(94)),ht=bt(nt(95)),mt=bt(nt(17));function bt(Et){return Et&&Et.__esModule?Et:{default:Et}}var St=(function(){function Et(Rt,Tt){if(Tt===void 0&&(Tt=!1),Rt==null||Rt==="")throw new Error("UserAgent parameter can't be empty");this._ua=Rt,this.parsedResult={},Tt!==!0&&this.parse()}var Ct=Et.prototype;return Ct.getUA=function(){return this._ua},Ct.test=function(Rt){return Rt.test(this._ua)},Ct.parseBrowser=function(){var Rt=this;this.parsedResult.browser={};var Tt=mt.default.find(st.default,(function(wt){if(typeof wt.test=="function")return wt.test(Rt);if(Array.isArray(wt.test))return wt.test.some((function(At){return Rt.test(At)}));throw new Error("Browser's test function is not valid")}));return Tt&&(this.parsedResult.browser=Tt.describe(this.getUA())),this.parsedResult.browser},Ct.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},Ct.getBrowserName=function(Rt){return Rt?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},Ct.getBrowserVersion=function(){return this.getBrowser().version},Ct.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},Ct.parseOS=function(){var Rt=this;this.parsedResult.os={};var Tt=mt.default.find(dt.default,(function(wt){if(typeof wt.test=="function")return wt.test(Rt);if(Array.isArray(wt.test))return wt.test.some((function(At){return Rt.test(At)}));throw new Error("Browser's test function is not valid")}));return Tt&&(this.parsedResult.os=Tt.describe(this.getUA())),this.parsedResult.os},Ct.getOSName=function(Rt){var Tt=this.getOS().name;return Rt?String(Tt).toLowerCase()||"":Tt||""},Ct.getOSVersion=function(){return this.getOS().version},Ct.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},Ct.getPlatformType=function(Rt){Rt===void 0&&(Rt=!1);var Tt=this.getPlatform().type;return Rt?String(Tt).toLowerCase()||"":Tt||""},Ct.parsePlatform=function(){var Rt=this;this.parsedResult.platform={};var Tt=mt.default.find(ft.default,(function(wt){if(typeof wt.test=="function")return wt.test(Rt);if(Array.isArray(wt.test))return wt.test.some((function(At){return Rt.test(At)}));throw new Error("Browser's test function is not valid")}));return Tt&&(this.parsedResult.platform=Tt.describe(this.getUA())),this.parsedResult.platform},Ct.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},Ct.getEngineName=function(Rt){return Rt?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},Ct.parseEngine=function(){var Rt=this;this.parsedResult.engine={};var Tt=mt.default.find(ht.default,(function(wt){if(typeof wt.test=="function")return wt.test(Rt);if(Array.isArray(wt.test))return wt.test.some((function(At){return Rt.test(At)}));throw new Error("Browser's test function is not valid")}));return Tt&&(this.parsedResult.engine=Tt.describe(this.getUA())),this.parsedResult.engine},Ct.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},Ct.getResult=function(){return mt.default.assign({},this.parsedResult)},Ct.satisfies=function(Rt){var Tt=this,wt={},At=0,Nt={},Pt=0;if(Object.keys(Rt).forEach((function(Ot){var Wt=Rt[Ot];typeof Wt=="string"?(Nt[Ot]=Wt,Pt+=1):typeof Wt=="object"&&(wt[Ot]=Wt,At+=1)})),At>0){var It=Object.keys(wt),Ft=mt.default.find(It,(function(Ot){return Tt.isOS(Ot)}));if(Ft){var qt=this.satisfies(wt[Ft]);if(qt!==void 0)return qt}var Vt=mt.default.find(It,(function(Ot){return Tt.isPlatform(Ot)}));if(Vt){var Kt=this.satisfies(wt[Vt]);if(Kt!==void 0)return Kt}}if(Pt>0){var jt=Object.keys(Nt),Ut=mt.default.find(jt,(function(Ot){return Tt.isBrowser(Ot,!0)}));if(Ut!==void 0)return this.compareVersion(Nt[Ut])}},Ct.isBrowser=function(Rt,Tt){Tt===void 0&&(Tt=!1);var wt=this.getBrowserName().toLowerCase(),At=Rt.toLowerCase(),Nt=mt.default.getBrowserTypeByAlias(At);return Tt&&Nt&&(At=Nt.toLowerCase()),At===wt},Ct.compareVersion=function(Rt){var Tt=[0],wt=Rt,At=!1,Nt=this.getBrowserVersion();if(typeof Nt=="string")return Rt[0]===">"||Rt[0]==="<"?(wt=Rt.substr(1),Rt[1]==="="?(At=!0,wt=Rt.substr(2)):Tt=[],Rt[0]===">"?Tt.push(1):Tt.push(-1)):Rt[0]==="="?wt=Rt.substr(1):Rt[0]==="~"&&(At=!0,wt=Rt.substr(1)),Tt.indexOf(mt.default.compareVersions(Nt,wt,At))>-1},Ct.isOS=function(Rt){return this.getOSName(!0)===String(Rt).toLowerCase()},Ct.isPlatform=function(Rt){return this.getPlatformType(!0)===String(Rt).toLowerCase()},Ct.isEngine=function(Rt){return this.getEngineName(!0)===String(Rt).toLowerCase()},Ct.is=function(Rt,Tt){return Tt===void 0&&(Tt=!1),this.isBrowser(Rt,Tt)||this.isOS(Rt)||this.isPlatform(Rt)},Ct.some=function(Rt){var Tt=this;return Rt===void 0&&(Rt=[]),Rt.some((function(wt){return Tt.is(wt)}))},Et})();rt.default=St,tt.exports=rt.default},92:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st,dt=(st=nt(17))&&st.__esModule?st:{default:st},ft=/version\/(\d+(\.?_?\d+)+)/i,ht=[{test:[/googlebot/i],describe:function(mt){var bt={name:"Googlebot"},St=dt.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/opera/i],describe:function(mt){var bt={name:"Opera"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/opr\/|opios/i],describe:function(mt){var bt={name:"Opera"},St=dt.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/SamsungBrowser/i],describe:function(mt){var bt={name:"Samsung Internet for Android"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/Whale/i],describe:function(mt){var bt={name:"NAVER Whale Browser"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/PaleMoon/i],describe:function(mt){var bt={name:"Pale Moon"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/MZBrowser/i],describe:function(mt){var bt={name:"MZ Browser"},St=dt.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/focus/i],describe:function(mt){var bt={name:"Focus"},St=dt.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/swing/i],describe:function(mt){var bt={name:"Swing"},St=dt.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/coast/i],describe:function(mt){var bt={name:"Opera Coast"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(mt){var bt={name:"Opera Touch"},St=dt.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/yabrowser/i],describe:function(mt){var bt={name:"Yandex Browser"},St=dt.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/ucbrowser/i],describe:function(mt){var bt={name:"UC Browser"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/Maxthon|mxios/i],describe:function(mt){var bt={name:"Maxthon"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/epiphany/i],describe:function(mt){var bt={name:"Epiphany"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/puffin/i],describe:function(mt){var bt={name:"Puffin"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/sleipnir/i],describe:function(mt){var bt={name:"Sleipnir"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/k-meleon/i],describe:function(mt){var bt={name:"K-Meleon"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/micromessenger/i],describe:function(mt){var bt={name:"WeChat"},St=dt.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/qqbrowser/i],describe:function(mt){var bt={name:/qqbrowserlite/i.test(mt)?"QQ Browser Lite":"QQ Browser"},St=dt.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/msie|trident/i],describe:function(mt){var bt={name:"Internet Explorer"},St=dt.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/\sedg\//i],describe:function(mt){var bt={name:"Microsoft Edge"},St=dt.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/edg([ea]|ios)/i],describe:function(mt){var bt={name:"Microsoft Edge"},St=dt.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/vivaldi/i],describe:function(mt){var bt={name:"Vivaldi"},St=dt.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/seamonkey/i],describe:function(mt){var bt={name:"SeaMonkey"},St=dt.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/sailfish/i],describe:function(mt){var bt={name:"Sailfish"},St=dt.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,mt);return St&&(bt.version=St),bt}},{test:[/silk/i],describe:function(mt){var bt={name:"Amazon Silk"},St=dt.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/phantom/i],describe:function(mt){var bt={name:"PhantomJS"},St=dt.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/slimerjs/i],describe:function(mt){var bt={name:"SlimerJS"},St=dt.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(mt){var bt={name:"BlackBerry"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/(web|hpw)[o0]s/i],describe:function(mt){var bt={name:"WebOS Browser"},St=dt.default.getFirstMatch(ft,mt)||dt.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/bada/i],describe:function(mt){var bt={name:"Bada"},St=dt.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/tizen/i],describe:function(mt){var bt={name:"Tizen"},St=dt.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/qupzilla/i],describe:function(mt){var bt={name:"QupZilla"},St=dt.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/firefox|iceweasel|fxios/i],describe:function(mt){var bt={name:"Firefox"},St=dt.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/electron/i],describe:function(mt){var bt={name:"Electron"},St=dt.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/MiuiBrowser/i],describe:function(mt){var bt={name:"Miui"},St=dt.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/chromium/i],describe:function(mt){var bt={name:"Chromium"},St=dt.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,mt)||dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/chrome|crios|crmo/i],describe:function(mt){var bt={name:"Chrome"},St=dt.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/GSA/i],describe:function(mt){var bt={name:"Google Search"},St=dt.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:function(mt){var bt=!mt.test(/like android/i),St=mt.test(/android/i);return bt&&St},describe:function(mt){var bt={name:"Android Browser"},St=dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/playstation 4/i],describe:function(mt){var bt={name:"PlayStation 4"},St=dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/safari|applewebkit/i],describe:function(mt){var bt={name:"Safari"},St=dt.default.getFirstMatch(ft,mt);return St&&(bt.version=St),bt}},{test:[/.*/i],describe:function(mt){var bt=mt.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:dt.default.getFirstMatch(bt,mt),version:dt.default.getSecondMatch(bt,mt)}}}];rt.default=ht,tt.exports=rt.default},93:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st,dt=(st=nt(17))&&st.__esModule?st:{default:st},ft=nt(18),ht=[{test:[/Roku\/DVP/],describe:function(mt){var bt=dt.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,mt);return{name:ft.OS_MAP.Roku,version:bt}}},{test:[/windows phone/i],describe:function(mt){var bt=dt.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,mt);return{name:ft.OS_MAP.WindowsPhone,version:bt}}},{test:[/windows /i],describe:function(mt){var bt=dt.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,mt),St=dt.default.getWindowsVersionName(bt);return{name:ft.OS_MAP.Windows,version:bt,versionName:St}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(mt){var bt={name:ft.OS_MAP.iOS},St=dt.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,mt);return St&&(bt.version=St),bt}},{test:[/macintosh/i],describe:function(mt){var bt=dt.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,mt).replace(/[_\s]/g,"."),St=dt.default.getMacOSVersionName(bt),Et={name:ft.OS_MAP.MacOS,version:bt};return St&&(Et.versionName=St),Et}},{test:[/(ipod|iphone|ipad)/i],describe:function(mt){var bt=dt.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,mt).replace(/[_\s]/g,".");return{name:ft.OS_MAP.iOS,version:bt}}},{test:function(mt){var bt=!mt.test(/like android/i),St=mt.test(/android/i);return bt&&St},describe:function(mt){var bt=dt.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,mt),St=dt.default.getAndroidVersionName(bt),Et={name:ft.OS_MAP.Android,version:bt};return St&&(Et.versionName=St),Et}},{test:[/(web|hpw)[o0]s/i],describe:function(mt){var bt=dt.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,mt),St={name:ft.OS_MAP.WebOS};return bt&&bt.length&&(St.version=bt),St}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(mt){var bt=dt.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,mt)||dt.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,mt)||dt.default.getFirstMatch(/\bbb(\d+)/i,mt);return{name:ft.OS_MAP.BlackBerry,version:bt}}},{test:[/bada/i],describe:function(mt){var bt=dt.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,mt);return{name:ft.OS_MAP.Bada,version:bt}}},{test:[/tizen/i],describe:function(mt){var bt=dt.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,mt);return{name:ft.OS_MAP.Tizen,version:bt}}},{test:[/linux/i],describe:function(){return{name:ft.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:ft.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(mt){var bt=dt.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,mt);return{name:ft.OS_MAP.PlayStation4,version:bt}}}];rt.default=ht,tt.exports=rt.default},94:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st,dt=(st=nt(17))&&st.__esModule?st:{default:st},ft=nt(18),ht=[{test:[/googlebot/i],describe:function(){return{type:ft.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(mt){var bt=dt.default.getFirstMatch(/(can-l01)/i,mt)&&"Nova",St={type:ft.PLATFORMS_MAP.mobile,vendor:"Huawei"};return bt&&(St.model=bt),St}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:ft.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:ft.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:ft.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:ft.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:ft.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:ft.PLATFORMS_MAP.tablet}}},{test:function(mt){var bt=mt.test(/ipod|iphone/i),St=mt.test(/like (ipod|iphone)/i);return bt&&!St},describe:function(mt){var bt=dt.default.getFirstMatch(/(ipod|iphone)/i,mt);return{type:ft.PLATFORMS_MAP.mobile,vendor:"Apple",model:bt}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:ft.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(mt){var bt=dt.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,mt),St={type:ft.PLATFORMS_MAP.mobile,vendor:"Nokia"};return bt&&(St.model=bt),St}},{test:[/[^-]mobi/i],describe:function(){return{type:ft.PLATFORMS_MAP.mobile}}},{test:function(mt){return mt.getBrowserName(!0)==="blackberry"},describe:function(){return{type:ft.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(mt){return mt.getBrowserName(!0)==="bada"},describe:function(){return{type:ft.PLATFORMS_MAP.mobile}}},{test:function(mt){return mt.getBrowserName()==="windows phone"},describe:function(){return{type:ft.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(mt){var bt=Number(String(mt.getOSVersion()).split(".")[0]);return mt.getOSName(!0)==="android"&&bt>=3},describe:function(){return{type:ft.PLATFORMS_MAP.tablet}}},{test:function(mt){return mt.getOSName(!0)==="android"},describe:function(){return{type:ft.PLATFORMS_MAP.mobile}}},{test:function(mt){return mt.getOSName(!0)==="macos"},describe:function(){return{type:ft.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(mt){return mt.getOSName(!0)==="windows"},describe:function(){return{type:ft.PLATFORMS_MAP.desktop}}},{test:function(mt){return mt.getOSName(!0)==="linux"},describe:function(){return{type:ft.PLATFORMS_MAP.desktop}}},{test:function(mt){return mt.getOSName(!0)==="playstation 4"},describe:function(){return{type:ft.PLATFORMS_MAP.tv}}},{test:function(mt){return mt.getOSName(!0)==="roku"},describe:function(){return{type:ft.PLATFORMS_MAP.tv}}}];rt.default=ht,tt.exports=rt.default},95:function(tt,rt,nt){rt.__esModule=!0,rt.default=void 0;var st,dt=(st=nt(17))&&st.__esModule?st:{default:st},ft=nt(18),ht=[{test:function(mt){return mt.getBrowserName(!0)==="microsoft edge"},describe:function(mt){if(/\sedg\//i.test(mt))return{name:ft.ENGINE_MAP.Blink};var bt=dt.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,mt);return{name:ft.ENGINE_MAP.EdgeHTML,version:bt}}},{test:[/trident/i],describe:function(mt){var bt={name:ft.ENGINE_MAP.Trident},St=dt.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:function(mt){return mt.test(/presto/i)},describe:function(mt){var bt={name:ft.ENGINE_MAP.Presto},St=dt.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:function(mt){var bt=mt.test(/gecko/i),St=mt.test(/like gecko/i);return bt&&!St},describe:function(mt){var bt={name:ft.ENGINE_MAP.Gecko},St=dt.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:ft.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(mt){var bt={name:ft.ENGINE_MAP.WebKit},St=dt.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,mt);return St&&(bt.version=St),bt}}];rt.default=ht,tt.exports=rt.default}})}))})(es5$1)),es5$1.exports}var resizeObservers$1=[],hasActiveObservations$1=function(){return resizeObservers$1.some(function(et){return et.activeTargets.length>0})},hasSkippedObservations$1=function(){return resizeObservers$1.some(function(et){return et.skippedTargets.length>0})},msg$1="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError$1=function(){var et;typeof ErrorEvent=="function"?et=new ErrorEvent("error",{message:msg$1}):(et=document.createEvent("Event"),et.initEvent("error",!1,!1),et.message=msg$1),window.dispatchEvent(et)},ResizeObserverBoxOptions$1;(function(et){et.BORDER_BOX="border-box",et.CONTENT_BOX="content-box",et.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ResizeObserverBoxOptions$1||(ResizeObserverBoxOptions$1={}));var freeze$1=function(et){return Object.freeze(et)},ResizeObserverSize$1=(function(){function et(_e,tt){this.inlineSize=_e,this.blockSize=tt,freeze$1(this)}return et})(),DOMRectReadOnly$1=(function(){function et(_e,tt,rt,nt){return this.x=_e,this.y=tt,this.width=rt,this.height=nt,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze$1(this)}return et.prototype.toJSON=function(){var _e=this,tt=_e.x,rt=_e.y,nt=_e.top,st=_e.right,dt=_e.bottom,ft=_e.left,ht=_e.width,mt=_e.height;return{x:tt,y:rt,top:nt,right:st,bottom:dt,left:ft,width:ht,height:mt}},et.fromRect=function(_e){return new et(_e.x,_e.y,_e.width,_e.height)},et})(),isSVG$1=function(et){return et instanceof SVGElement&&"getBBox"in et},isHidden$1=function(et){if(isSVG$1(et)){var _e=et.getBBox(),tt=_e.width,rt=_e.height;return!tt&&!rt}var nt=et,st=nt.offsetWidth,dt=nt.offsetHeight;return!(st||dt||et.getClientRects().length)},isElement$1=function(et){var _e;if(et instanceof Element)return!0;var tt=(_e=et?.ownerDocument)===null||_e===void 0?void 0:_e.defaultView;return!!(tt&&et instanceof tt.Element)},isReplacedElement$1=function(et){switch(et.tagName){case"INPUT":if(et.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},global$2=typeof window<"u"?window:{},cache$2=new WeakMap,scrollRegexp$1=/auto|scroll/,verticalRegexp$1=/^tb|vertical/,IE$1=/msie|trident/i.test(global$2.navigator&&global$2.navigator.userAgent),parseDimension$1=function(et){return parseFloat(et||"0")},size$3=function(et,_e,tt){return et===void 0&&(et=0),_e===void 0&&(_e=0),tt===void 0&&(tt=!1),new ResizeObserverSize$1((tt?_e:et)||0,(tt?et:_e)||0)},zeroBoxes$1=freeze$1({devicePixelContentBoxSize:size$3(),borderBoxSize:size$3(),contentBoxSize:size$3(),contentRect:new DOMRectReadOnly$1(0,0,0,0)}),calculateBoxSizes$1=function(et,_e){if(_e===void 0&&(_e=!1),cache$2.has(et)&&!_e)return cache$2.get(et);if(isHidden$1(et))return cache$2.set(et,zeroBoxes$1),zeroBoxes$1;var tt=getComputedStyle(et),rt=isSVG$1(et)&&et.ownerSVGElement&&et.getBBox(),nt=!IE$1&&tt.boxSizing==="border-box",st=verticalRegexp$1.test(tt.writingMode||""),dt=!rt&&scrollRegexp$1.test(tt.overflowY||""),ft=!rt&&scrollRegexp$1.test(tt.overflowX||""),ht=rt?0:parseDimension$1(tt.paddingTop),mt=rt?0:parseDimension$1(tt.paddingRight),bt=rt?0:parseDimension$1(tt.paddingBottom),St=rt?0:parseDimension$1(tt.paddingLeft),Et=rt?0:parseDimension$1(tt.borderTopWidth),Ct=rt?0:parseDimension$1(tt.borderRightWidth),Rt=rt?0:parseDimension$1(tt.borderBottomWidth),Tt=rt?0:parseDimension$1(tt.borderLeftWidth),wt=St+mt,At=ht+bt,Nt=Tt+Ct,Pt=Et+Rt,It=ft?et.offsetHeight-Pt-et.clientHeight:0,Ft=dt?et.offsetWidth-Nt-et.clientWidth:0,qt=nt?wt+Nt:0,Vt=nt?At+Pt:0,Kt=rt?rt.width:parseDimension$1(tt.width)-qt-Ft,jt=rt?rt.height:parseDimension$1(tt.height)-Vt-It,Ut=Kt+wt+Ft+Nt,Ot=jt+At+It+Pt,Wt=freeze$1({devicePixelContentBoxSize:size$3(Math.round(Kt*devicePixelRatio),Math.round(jt*devicePixelRatio),st),borderBoxSize:size$3(Ut,Ot,st),contentBoxSize:size$3(Kt,jt,st),contentRect:new DOMRectReadOnly$1(St,ht,Kt,jt)});return cache$2.set(et,Wt),Wt},calculateBoxSize$1=function(et,_e,tt){var rt=calculateBoxSizes$1(et,tt),nt=rt.borderBoxSize,st=rt.contentBoxSize,dt=rt.devicePixelContentBoxSize;switch(_e){case ResizeObserverBoxOptions$1.DEVICE_PIXEL_CONTENT_BOX:return dt;case ResizeObserverBoxOptions$1.BORDER_BOX:return nt;default:return st}},ResizeObserverEntry$1=(function(){function et(_e){var tt=calculateBoxSizes$1(_e);this.target=_e,this.contentRect=tt.contentRect,this.borderBoxSize=freeze$1([tt.borderBoxSize]),this.contentBoxSize=freeze$1([tt.contentBoxSize]),this.devicePixelContentBoxSize=freeze$1([tt.devicePixelContentBoxSize])}return et})(),calculateDepthForNode$1=function(et){if(isHidden$1(et))return 1/0;for(var _e=0,tt=et.parentNode;tt;)_e+=1,tt=tt.parentNode;return _e},broadcastActiveObservations$1=function(){var et=1/0,_e=[];resizeObservers$1.forEach(function(dt){if(dt.activeTargets.length!==0){var ft=[];dt.activeTargets.forEach(function(mt){var bt=new ResizeObserverEntry$1(mt.target),St=calculateDepthForNode$1(mt.target);ft.push(bt),mt.lastReportedSize=calculateBoxSize$1(mt.target,mt.observedBox),St<et&&(et=St)}),_e.push(function(){dt.callback.call(dt.observer,ft,dt.observer)}),dt.activeTargets.splice(0,dt.activeTargets.length)}});for(var tt=0,rt=_e;tt<rt.length;tt++){var nt=rt[tt];nt()}return et},gatherActiveObservationsAtDepth$1=function(et){resizeObservers$1.forEach(function(tt){tt.activeTargets.splice(0,tt.activeTargets.length),tt.skippedTargets.splice(0,tt.skippedTargets.length),tt.observationTargets.forEach(function(nt){nt.isActive()&&(calculateDepthForNode$1(nt.target)>et?tt.activeTargets.push(nt):tt.skippedTargets.push(nt))})})},process$3=function(){var et=0;for(gatherActiveObservationsAtDepth$1(et);hasActiveObservations$1();)et=broadcastActiveObservations$1(),gatherActiveObservationsAtDepth$1(et);return hasSkippedObservations$1()&&deliverResizeLoopError$1(),et>0},trigger$2,callbacks$2=[],notify$1=function(){return callbacks$2.splice(0).forEach(function(et){return et()})},queueMicroTask$1=function(et){if(!trigger$2){var _e=0,tt=document.createTextNode(""),rt={characterData:!0};new MutationObserver(function(){return notify$1()}).observe(tt,rt),trigger$2=function(){tt.textContent="".concat(_e?_e--:_e++)}}callbacks$2.push(et),trigger$2()},queueResizeObserver$1=function(et){queueMicroTask$1(function(){requestAnimationFrame(et)})},watching$1=0,isWatching$1=function(){return!!watching$1},CATCH_PERIOD$1=250,observerConfig$1={attributes:!0,characterData:!0,childList:!0,subtree:!0},events$1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time$1=function(et){return et===void 0&&(et=0),Date.now()+et},scheduled$1=!1,Scheduler$1=(function(){function et(){var _e=this;this.stopped=!0,this.listener=function(){return _e.schedule()}}return et.prototype.run=function(_e){var tt=this;if(_e===void 0&&(_e=CATCH_PERIOD$1),!scheduled$1){scheduled$1=!0;var rt=time$1(_e);queueResizeObserver$1(function(){var nt=!1;try{nt=process$3()}finally{if(scheduled$1=!1,_e=rt-time$1(),!isWatching$1())return;nt?tt.run(1e3):_e>0?tt.run(_e):tt.start()}})}},et.prototype.schedule=function(){this.stop(),this.run()},et.prototype.observe=function(){var _e=this,tt=function(){return _e.observer&&_e.observer.observe(document.body,observerConfig$1)};document.body?tt():global$2.addEventListener("DOMContentLoaded",tt)},et.prototype.start=function(){var _e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),events$1.forEach(function(tt){return global$2.addEventListener(tt,_e.listener,!0)}))},et.prototype.stop=function(){var _e=this;this.stopped||(this.observer&&this.observer.disconnect(),events$1.forEach(function(tt){return global$2.removeEventListener(tt,_e.listener,!0)}),this.stopped=!0)},et})(),scheduler$3=new Scheduler$1,updateCount$1=function(et){!watching$1&&et>0&&scheduler$3.start(),watching$1+=et,!watching$1&&scheduler$3.stop()},skipNotifyOnElement$1=function(et){return!isSVG$1(et)&&!isReplacedElement$1(et)&&getComputedStyle(et).display==="inline"},ResizeObservation$1=(function(){function et(_e,tt){this.target=_e,this.observedBox=tt||ResizeObserverBoxOptions$1.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return et.prototype.isActive=function(){var _e=calculateBoxSize$1(this.target,this.observedBox,!0);return skipNotifyOnElement$1(this.target)&&(this.lastReportedSize=_e),this.lastReportedSize.inlineSize!==_e.inlineSize||this.lastReportedSize.blockSize!==_e.blockSize},et})(),ResizeObserverDetail$1=(function(){function et(_e,tt){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=_e,this.callback=tt}return et})(),observerMap$1=new WeakMap,getObservationIndex$1=function(et,_e){for(var tt=0;tt<et.length;tt+=1)if(et[tt].target===_e)return tt;return-1},ResizeObserverController$1=(function(){function et(){}return et.connect=function(_e,tt){var rt=new ResizeObserverDetail$1(_e,tt);observerMap$1.set(_e,rt)},et.observe=function(_e,tt,rt){var nt=observerMap$1.get(_e),st=nt.observationTargets.length===0;getObservationIndex$1(nt.observationTargets,tt)<0&&(st&&resizeObservers$1.push(nt),nt.observationTargets.push(new ResizeObservation$1(tt,rt&&rt.box)),updateCount$1(1),scheduler$3.schedule())},et.unobserve=function(_e,tt){var rt=observerMap$1.get(_e),nt=getObservationIndex$1(rt.observationTargets,tt),st=rt.observationTargets.length===1;nt>=0&&(st&&resizeObservers$1.splice(resizeObservers$1.indexOf(rt),1),rt.observationTargets.splice(nt,1),updateCount$1(-1))},et.disconnect=function(_e){var tt=this,rt=observerMap$1.get(_e);rt.observationTargets.slice().forEach(function(nt){return tt.unobserve(_e,nt.target)}),rt.activeTargets.splice(0,rt.activeTargets.length)},et})(),ResizeObserver$4=(function(){function et(_e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof _e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ResizeObserverController$1.connect(this,_e)}return et.prototype.observe=function(_e,tt){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$1(_e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController$1.observe(this,_e,tt)},et.prototype.unobserve=function(_e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement$1(_e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController$1.unobserve(this,_e)},et.prototype.disconnect=function(){ResizeObserverController$1.disconnect(this)},et.toString=function(){return"function ResizeObserver () { [polyfill code] }"},et})();const resizeObserver=Object.freeze(Object.defineProperty({__proto__:null,ResizeObserver:ResizeObserver$4,ResizeObserverEntry:ResizeObserverEntry$1,ResizeObserverSize:ResizeObserverSize$1},Symbol.toStringTag,{value:"Module"})),require$$123=getAugmentedNamespace$1(resizeObserver);var reactDom$1={exports:{}},reactDom_production_min$1={},scheduler$2={exports:{}},scheduler_production_min$1={};/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,(function(et){var _e,tt,rt,nt,st;if(typeof window>"u"||typeof MessageChannel!="function"){var dt=null,ft=null,ht=function(){if(dt!==null)try{var Mr=et.unstable_now();dt(!0,Mr),dt=null}catch(Nr){throw setTimeout(ht,0),Nr}},mt=Date.now();et.unstable_now=function(){return Date.now()-mt},_e=function(Mr){dt!==null?setTimeout(_e,0,Mr):(dt=Mr,setTimeout(ht,0))},tt=function(Mr,Nr){ft=setTimeout(Mr,Nr)},rt=function(){clearTimeout(ft)},nt=function(){return!1},st=et.unstable_forceFrameRate=function(){}}else{var bt=window.performance,St=window.Date,Et=window.setTimeout,Ct=window.clearTimeout;if(typeof console<"u"){var Rt=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://fb.me/react-polyfills"),typeof Rt!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof bt=="object"&&typeof bt.now=="function")et.unstable_now=function(){return bt.now()};else{var Tt=St.now();et.unstable_now=function(){return St.now()-Tt}}var wt=!1,At=null,Nt=-1,Pt=5,It=0;nt=function(){return et.unstable_now()>=It},st=function(){},et.unstable_forceFrameRate=function(Mr){0>Mr||125<Mr?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):Pt=0<Mr?Math.floor(1e3/Mr):5};var Ft=new MessageChannel,qt=Ft.port2;Ft.port1.onmessage=function(){if(At!==null){var Mr=et.unstable_now();It=Mr+Pt;try{At(!0,Mr)?qt.postMessage(null):(wt=!1,At=null)}catch(Nr){throw qt.postMessage(null),Nr}}else wt=!1},_e=function(Mr){At=Mr,wt||(wt=!0,qt.postMessage(null))},tt=function(Mr,Nr){Nt=Et(function(){Mr(et.unstable_now())},Nr)},rt=function(){Ct(Nt),Nt=-1}}function Vt(Mr,Nr){var Yr=Mr.length;Mr.push(Nr);e:for(;;){var Or=Yr-1>>>1,Ar=Mr[Or];if(Ar!==void 0&&0<Ut(Ar,Nr))Mr[Or]=Nr,Mr[Yr]=Ar,Yr=Or;else break e}}function Kt(Mr){return Mr=Mr[0],Mr===void 0?null:Mr}function jt(Mr){var Nr=Mr[0];if(Nr!==void 0){var Yr=Mr.pop();if(Yr!==Nr){Mr[0]=Yr;e:for(var Or=0,Ar=Mr.length;Or<Ar;){var Qr=2*(Or+1)-1,hn=Mr[Qr],Sn=Qr+1,Kr=Mr[Sn];if(hn!==void 0&&0>Ut(hn,Yr))Kr!==void 0&&0>Ut(Kr,hn)?(Mr[Or]=Kr,Mr[Sn]=Yr,Or=Sn):(Mr[Or]=hn,Mr[Qr]=Yr,Or=Qr);else if(Kr!==void 0&&0>Ut(Kr,Yr))Mr[Or]=Kr,Mr[Sn]=Yr,Or=Sn;else break e}}return Nr}return null}function Ut(Mr,Nr){var Yr=Mr.sortIndex-Nr.sortIndex;return Yr!==0?Yr:Mr.id-Nr.id}var Ot=[],Wt=[],Bt=1,tr=null,Jt=3,ar=!1,pr=!1,cr=!1;function gr(Mr){for(var Nr=Kt(Wt);Nr!==null;){if(Nr.callback===null)jt(Wt);else if(Nr.startTime<=Mr)jt(Wt),Nr.sortIndex=Nr.expirationTime,Vt(Ot,Nr);else break;Nr=Kt(Wt)}}function Sr(Mr){if(cr=!1,gr(Mr),!pr)if(Kt(Ot)!==null)pr=!0,_e(Er);else{var Nr=Kt(Wt);Nr!==null&&tt(Sr,Nr.startTime-Mr)}}function Er(Mr,Nr){pr=!1,cr&&(cr=!1,rt()),ar=!0;var Yr=Jt;try{for(gr(Nr),tr=Kt(Ot);tr!==null&&(!(tr.expirationTime>Nr)||Mr&&!nt());){var Or=tr.callback;if(Or!==null){tr.callback=null,Jt=tr.priorityLevel;var Ar=Or(tr.expirationTime<=Nr);Nr=et.unstable_now(),typeof Ar=="function"?tr.callback=Ar:tr===Kt(Ot)&&jt(Ot),gr(Nr)}else jt(Ot);tr=Kt(Ot)}if(tr!==null)var Qr=!0;else{var hn=Kt(Wt);hn!==null&&tt(Sr,hn.startTime-Nr),Qr=!1}return Qr}finally{tr=null,Jt=Yr,ar=!1}}function Vr(Mr){switch(Mr){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Wr=st;et.unstable_IdlePriority=5,et.unstable_ImmediatePriority=1,et.unstable_LowPriority=4,et.unstable_NormalPriority=3,et.unstable_Profiling=null,et.unstable_UserBlockingPriority=2,et.unstable_cancelCallback=function(Mr){Mr.callback=null},et.unstable_continueExecution=function(){pr||ar||(pr=!0,_e(Er))},et.unstable_getCurrentPriorityLevel=function(){return Jt},et.unstable_getFirstCallbackNode=function(){return Kt(Ot)},et.unstable_next=function(Mr){switch(Jt){case 1:case 2:case 3:var Nr=3;break;default:Nr=Jt}var Yr=Jt;Jt=Nr;try{return Mr()}finally{Jt=Yr}},et.unstable_pauseExecution=function(){},et.unstable_requestPaint=Wr,et.unstable_runWithPriority=function(Mr,Nr){switch(Mr){case 1:case 2:case 3:case 4:case 5:break;default:Mr=3}var Yr=Jt;Jt=Mr;try{return Nr()}finally{Jt=Yr}},et.unstable_scheduleCallback=function(Mr,Nr,Yr){var Or=et.unstable_now();if(typeof Yr=="object"&&Yr!==null){var Ar=Yr.delay;Ar=typeof Ar=="number"&&0<Ar?Or+Ar:Or,Yr=typeof Yr.timeout=="number"?Yr.timeout:Vr(Mr)}else Yr=Vr(Mr),Ar=Or;return Yr=Ar+Yr,Mr={id:Bt++,callback:Nr,priorityLevel:Mr,startTime:Ar,expirationTime:Yr,sortIndex:-1},Ar>Or?(Mr.sortIndex=Ar,Vt(Wt,Mr),Kt(Ot)===null&&Mr===Kt(Wt)&&(cr?rt():cr=!0,tt(Sr,Ar-Or))):(Mr.sortIndex=Yr,Vt(Ot,Mr),pr||ar||(pr=!0,_e(Er))),Mr},et.unstable_shouldYield=function(){var Mr=et.unstable_now();gr(Mr);var Nr=Kt(Ot);return Nr!==tr&&tr!==null&&Nr!==null&&Nr.callback!==null&&Nr.startTime<=Mr&&Nr.expirationTime<tr.expirationTime||nt()},et.unstable_wrapCallback=function(Mr){var Nr=Jt;return function(){var Yr=Jt;Jt=Nr;try{return Mr.apply(this,arguments)}finally{Jt=Yr}}}})(scheduler_production_min$1)),scheduler_production_min$1}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler$2.exports=requireScheduler_production_min()),scheduler$2.exports}/** @license React v16.14.0
* 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 hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min$1;hasRequiredReactDom_production_min=1;var et=requireReact(),_e=requireObjectAssign(),tt=requireScheduler();function rt(Gt){for(var er="https://reactjs.org/docs/error-decoder.html?invariant="+Gt,hr=1;hr<arguments.length;hr++)er+="&args[]="+encodeURIComponent(arguments[hr]);return"Minified React error #"+Gt+"; visit "+er+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!et)throw Error(rt(227));function nt(Gt,er,hr,Fr,nn,zn,_i,As,ps){var xo=Array.prototype.slice.call(arguments,3);try{er.apply(hr,xo)}catch(Pu){this.onError(Pu)}}var st=!1,dt=null,ft=!1,ht=null,mt={onError:function(Gt){st=!0,dt=Gt}};function bt(Gt,er,hr,Fr,nn,zn,_i,As,ps){st=!1,dt=null,nt.apply(mt,arguments)}function St(Gt,er,hr,Fr,nn,zn,_i,As,ps){if(bt.apply(this,arguments),st){if(st){var xo=dt;st=!1,dt=null}else throw Error(rt(198));ft||(ft=!0,ht=xo)}}var Et=null,Ct=null,Rt=null;function Tt(Gt,er,hr){var Fr=Gt.type||"unknown-event";Gt.currentTarget=Rt(hr),St(Fr,er,void 0,Gt),Gt.currentTarget=null}var wt=null,At={};function Nt(){if(wt)for(var Gt in At){var er=At[Gt],hr=wt.indexOf(Gt);if(!(-1<hr))throw Error(rt(96,Gt));if(!It[hr]){if(!er.extractEvents)throw Error(rt(97,Gt));It[hr]=er,hr=er.eventTypes;for(var Fr in hr){var nn=void 0,zn=hr[Fr],_i=er,As=Fr;if(Ft.hasOwnProperty(As))throw Error(rt(99,As));Ft[As]=zn;var ps=zn.phasedRegistrationNames;if(ps){for(nn in ps)ps.hasOwnProperty(nn)&&Pt(ps[nn],_i,As);nn=!0}else zn.registrationName?(Pt(zn.registrationName,_i,As),nn=!0):nn=!1;if(!nn)throw Error(rt(98,Fr,Gt))}}}}function Pt(Gt,er,hr){if(qt[Gt])throw Error(rt(100,Gt));qt[Gt]=er,Vt[Gt]=er.eventTypes[hr].dependencies}var It=[],Ft={},qt={},Vt={};function Kt(Gt){var er=!1,hr;for(hr in Gt)if(Gt.hasOwnProperty(hr)){var Fr=Gt[hr];if(!At.hasOwnProperty(hr)||At[hr]!==Fr){if(At[hr])throw Error(rt(102,hr));At[hr]=Fr,er=!0}}er&&Nt()}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ut=null,Ot=null,Wt=null;function Bt(Gt){if(Gt=Ct(Gt)){if(typeof Ut!="function")throw Error(rt(280));var er=Gt.stateNode;er&&(er=Et(er),Ut(Gt.stateNode,Gt.type,er))}}function tr(Gt){Ot?Wt?Wt.push(Gt):Wt=[Gt]:Ot=Gt}function Jt(){if(Ot){var Gt=Ot,er=Wt;if(Wt=Ot=null,Bt(Gt),er)for(Gt=0;Gt<er.length;Gt++)Bt(er[Gt])}}function ar(Gt,er){return Gt(er)}function pr(Gt,er,hr,Fr,nn){return Gt(er,hr,Fr,nn)}function cr(){}var gr=ar,Sr=!1,Er=!1;function Vr(){(Ot!==null||Wt!==null)&&(cr(),Jt())}function Wr(Gt,er,hr){if(Er)return Gt(er,hr);Er=!0;try{return gr(Gt,er,hr)}finally{Er=!1,Vr()}}var Mr=/^[: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]*$/,Nr=Object.prototype.hasOwnProperty,Yr={},Or={};function Ar(Gt){return Nr.call(Or,Gt)?!0:Nr.call(Yr,Gt)?!1:Mr.test(Gt)?Or[Gt]=!0:(Yr[Gt]=!0,!1)}function Qr(Gt,er,hr,Fr){if(hr!==null&&hr.type===0)return!1;switch(typeof er){case"function":case"symbol":return!0;case"boolean":return Fr?!1:hr!==null?!hr.acceptsBooleans:(Gt=Gt.toLowerCase().slice(0,5),Gt!=="data-"&&Gt!=="aria-");default:return!1}}function hn(Gt,er,hr,Fr){if(er===null||typeof er>"u"||Qr(Gt,er,hr,Fr))return!0;if(Fr)return!1;if(hr!==null)switch(hr.type){case 3:return!er;case 4:return er===!1;case 5:return isNaN(er);case 6:return isNaN(er)||1>er}return!1}function Sn(Gt,er,hr,Fr,nn,zn){this.acceptsBooleans=er===2||er===3||er===4,this.attributeName=Fr,this.attributeNamespace=nn,this.mustUseProperty=hr,this.propertyName=Gt,this.type=er,this.sanitizeURL=zn}var Kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(Gt){Kr[Gt]=new Sn(Gt,0,!1,Gt,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(Gt){var er=Gt[0];Kr[er]=new Sn(er,1,!1,Gt[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,2,!1,Gt.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,2,!1,Gt,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(Gt){Kr[Gt]=new Sn(Gt,3,!1,Gt.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,3,!0,Gt,null,!1)}),["capture","download"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,4,!1,Gt,null,!1)}),["cols","rows","size","span"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,6,!1,Gt,null,!1)}),["rowSpan","start"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,5,!1,Gt.toLowerCase(),null,!1)});var Hn=/[\-:]([a-z])/g;function ln(Gt){return Gt[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(Gt){var er=Gt.replace(Hn,ln);Kr[er]=new Sn(er,1,!1,Gt,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(Gt){var er=Gt.replace(Hn,ln);Kr[er]=new Sn(er,1,!1,Gt,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(Gt){var er=Gt.replace(Hn,ln);Kr[er]=new Sn(er,1,!1,Gt,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,1,!1,Gt.toLowerCase(),null,!1)}),Kr.xlinkHref=new Sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(Gt){Kr[Gt]=new Sn(Gt,1,!1,Gt.toLowerCase(),null,!0)});var kn=et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;kn.hasOwnProperty("ReactCurrentDispatcher")||(kn.ReactCurrentDispatcher={current:null}),kn.hasOwnProperty("ReactCurrentBatchConfig")||(kn.ReactCurrentBatchConfig={suspense:null});function xn(Gt,er,hr,Fr){var nn=Kr.hasOwnProperty(er)?Kr[er]:null,zn=nn!==null?nn.type===0:Fr?!1:!(!(2<er.length)||er[0]!=="o"&&er[0]!=="O"||er[1]!=="n"&&er[1]!=="N");zn||(hn(er,hr,nn,Fr)&&(hr=null),Fr||nn===null?Ar(er)&&(hr===null?Gt.removeAttribute(er):Gt.setAttribute(er,""+hr)):nn.mustUseProperty?Gt[nn.propertyName]=hr===null?nn.type===3?!1:"":hr:(er=nn.attributeName,Fr=nn.attributeNamespace,hr===null?Gt.removeAttribute(er):(nn=nn.type,hr=nn===3||nn===4&&hr===!0?"":""+hr,Fr?Gt.setAttributeNS(Fr,er,hr):Gt.setAttribute(er,hr))))}var An=/^(.*)[\\\/]/,rs=typeof Symbol=="function"&&Symbol.for,qs=rs?Symbol.for("react.element"):60103,Ln=rs?Symbol.for("react.portal"):60106,Cn=rs?Symbol.for("react.fragment"):60107,Nn=rs?Symbol.for("react.strict_mode"):60108,Gr=rs?Symbol.for("react.profiler"):60114,tn=rs?Symbol.for("react.provider"):60109,dn=rs?Symbol.for("react.context"):60110,Rn=rs?Symbol.for("react.concurrent_mode"):60111,wn=rs?Symbol.for("react.forward_ref"):60112,Un=rs?Symbol.for("react.suspense"):60113,Zn=rs?Symbol.for("react.suspense_list"):60120,pn=rs?Symbol.for("react.memo"):60115,Dn=rs?Symbol.for("react.lazy"):60116,qn=rs?Symbol.for("react.block"):60121,_a=typeof Symbol=="function"&&Symbol.iterator;function Vn(Gt){return Gt===null||typeof Gt!="object"?null:(Gt=_a&&Gt[_a]||Gt["@@iterator"],typeof Gt=="function"?Gt:null)}function bs(Gt){if(Gt._status===-1){Gt._status=0;var er=Gt._ctor;er=er(),Gt._result=er,er.then(function(hr){Gt._status===0&&(hr=hr.default,Gt._status=1,Gt._result=hr)},function(hr){Gt._status===0&&(Gt._status=2,Gt._result=hr)})}}function Is(Gt){if(Gt==null)return null;if(typeof Gt=="function")return Gt.displayName||Gt.name||null;if(typeof Gt=="string")return Gt;switch(Gt){case Cn:return"Fragment";case Ln:return"Portal";case Gr:return"Profiler";case Nn:return"StrictMode";case Un:return"Suspense";case Zn:return"SuspenseList"}if(typeof Gt=="object")switch(Gt.$$typeof){case dn:return"Context.Consumer";case tn:return"Context.Provider";case wn:var er=Gt.render;return er=er.displayName||er.name||"",Gt.displayName||(er!==""?"ForwardRef("+er+")":"ForwardRef");case pn:return Is(Gt.type);case qn:return Is(Gt.render);case Dn:if(Gt=Gt._status===1?Gt._result:null)return Is(Gt)}return null}function uo(Gt){var er="";do{e:switch(Gt.tag){case 3:case 4:case 6:case 7:case 10:case 9:var hr="";break e;default:var Fr=Gt._debugOwner,nn=Gt._debugSource,zn=Is(Gt.type);hr=null,Fr&&(hr=Is(Fr.type)),Fr=zn,zn="",nn?zn=" (at "+nn.fileName.replace(An,"")+":"+nn.lineNumber+")":hr&&(zn=" (created by "+hr+")"),hr=`
in `+(Fr||"Unknown")+zn}er+=hr,Gt=Gt.return}while(Gt);return er}function Rs(Gt){switch(typeof Gt){case"boolean":case"number":case"object":case"string":case"undefined":return Gt;default:return""}}function io(Gt){var er=Gt.type;return(Gt=Gt.nodeName)&&Gt.toLowerCase()==="input"&&(er==="checkbox"||er==="radio")}function vo(Gt){var er=io(Gt)?"checked":"value",hr=Object.getOwnPropertyDescriptor(Gt.constructor.prototype,er),Fr=""+Gt[er];if(!Gt.hasOwnProperty(er)&&typeof hr<"u"&&typeof hr.get=="function"&&typeof hr.set=="function"){var nn=hr.get,zn=hr.set;return Object.defineProperty(Gt,er,{configurable:!0,get:function(){return nn.call(this)},set:function(_i){Fr=""+_i,zn.call(this,_i)}}),Object.defineProperty(Gt,er,{enumerable:hr.enumerable}),{getValue:function(){return Fr},setValue:function(_i){Fr=""+_i},stopTracking:function(){Gt._valueTracker=null,delete Gt[er]}}}}function Bo(Gt){Gt._valueTracker||(Gt._valueTracker=vo(Gt))}function En(Gt){if(!Gt)return!1;var er=Gt._valueTracker;if(!er)return!0;var hr=er.getValue(),Fr="";return Gt&&(Fr=io(Gt)?Gt.checked?"true":"false":Gt.value),Gt=Fr,Gt!==hr?(er.setValue(Gt),!0):!1}function In(Gt,er){var hr=er.checked;return _e({},er,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:hr??Gt._wrapperState.initialChecked})}function ds(Gt,er){var hr=er.defaultValue==null?"":er.defaultValue,Fr=er.checked!=null?er.checked:er.defaultChecked;hr=Rs(er.value!=null?er.value:hr),Gt._wrapperState={initialChecked:Fr,initialValue:hr,controlled:er.type==="checkbox"||er.type==="radio"?er.checked!=null:er.value!=null}}function Ps(Gt,er){er=er.checked,er!=null&&xn(Gt,"checked",er,!1)}function yo(Gt,er){Ps(Gt,er);var hr=Rs(er.value),Fr=er.type;if(hr!=null)Fr==="number"?(hr===0&&Gt.value===""||Gt.value!=hr)&&(Gt.value=""+hr):Gt.value!==""+hr&&(Gt.value=""+hr);else if(Fr==="submit"||Fr==="reset"){Gt.removeAttribute("value");return}er.hasOwnProperty("value")?es(Gt,er.type,hr):er.hasOwnProperty("defaultValue")&&es(Gt,er.type,Rs(er.defaultValue)),er.checked==null&&er.defaultChecked!=null&&(Gt.defaultChecked=!!er.defaultChecked)}function rn(Gt,er,hr){if(er.hasOwnProperty("value")||er.hasOwnProperty("defaultValue")){var Fr=er.type;if(!(Fr!=="submit"&&Fr!=="reset"||er.value!==void 0&&er.value!==null))return;er=""+Gt._wrapperState.initialValue,hr||er===Gt.value||(Gt.value=er),Gt.defaultValue=er}hr=Gt.name,hr!==""&&(Gt.name=""),Gt.defaultChecked=!!Gt._wrapperState.initialChecked,hr!==""&&(Gt.name=hr)}function es(Gt,er,hr){(er!=="number"||Gt.ownerDocument.activeElement!==Gt)&&(hr==null?Gt.defaultValue=""+Gt._wrapperState.initialValue:Gt.defaultValue!==""+hr&&(Gt.defaultValue=""+hr))}function Gs(Gt){var er="";return et.Children.forEach(Gt,function(hr){hr!=null&&(er+=hr)}),er}function Ro(Gt,er){return Gt=_e({children:void 0},er),(er=Gs(er.children))&&(Gt.children=er),Gt}function ru(Gt,er,hr,Fr){if(Gt=Gt.options,er){er={};for(var nn=0;nn<hr.length;nn++)er["$"+hr[nn]]=!0;for(hr=0;hr<Gt.length;hr++)nn=er.hasOwnProperty("$"+Gt[hr].value),Gt[hr].selected!==nn&&(Gt[hr].selected=nn),nn&&Fr&&(Gt[hr].defaultSelected=!0)}else{for(hr=""+Rs(hr),er=null,nn=0;nn<Gt.length;nn++){if(Gt[nn].value===hr){Gt[nn].selected=!0,Fr&&(Gt[nn].defaultSelected=!0);return}er!==null||Gt[nn].disabled||(er=Gt[nn])}er!==null&&(er.selected=!0)}}function du(Gt,er){if(er.dangerouslySetInnerHTML!=null)throw Error(rt(91));return _e({},er,{value:void 0,defaultValue:void 0,children:""+Gt._wrapperState.initialValue})}function Iu(Gt,er){var hr=er.value;if(hr==null){if(hr=er.children,er=er.defaultValue,hr!=null){if(er!=null)throw Error(rt(92));if(Array.isArray(hr)){if(!(1>=hr.length))throw Error(rt(93));hr=hr[0]}er=hr}er==null&&(er=""),hr=er}Gt._wrapperState={initialValue:Rs(hr)}}function Sl(Gt,er){var hr=Rs(er.value),Fr=Rs(er.defaultValue);hr!=null&&(hr=""+hr,hr!==Gt.value&&(Gt.value=hr),er.defaultValue==null&&Gt.defaultValue!==hr&&(Gt.defaultValue=hr)),Fr!=null&&(Gt.defaultValue=""+Fr)}function Ko(Gt){var er=Gt.textContent;er===Gt._wrapperState.initialValue&&er!==""&&er!==null&&(Gt.value=er)}var Fl={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function gl(Gt){switch(Gt){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 Gu(Gt,er){return Gt==null||Gt==="http://www.w3.org/1999/xhtml"?gl(er):Gt==="http://www.w3.org/2000/svg"&&er==="foreignObject"?"http://www.w3.org/1999/xhtml":Gt}var Lu,Ku=(function(Gt){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(er,hr,Fr,nn){MSApp.execUnsafeLocalFunction(function(){return Gt(er,hr,Fr,nn)})}:Gt})(function(Gt,er){if(Gt.namespaceURI!==Fl.svg||"innerHTML"in Gt)Gt.innerHTML=er;else{for(Lu=Lu||document.createElement("div"),Lu.innerHTML="<svg>"+er.valueOf().toString()+"</svg>",er=Lu.firstChild;Gt.firstChild;)Gt.removeChild(Gt.firstChild);for(;er.firstChild;)Gt.appendChild(er.firstChild)}});function uu(Gt,er){if(er){var hr=Gt.firstChild;if(hr&&hr===Gt.lastChild&&hr.nodeType===3){hr.nodeValue=er;return}}Gt.textContent=er}function en(Gt,er){var hr={};return hr[Gt.toLowerCase()]=er.toLowerCase(),hr["Webkit"+Gt]="webkit"+er,hr["Moz"+Gt]="moz"+er,hr}var Jr={animationend:en("Animation","AnimationEnd"),animationiteration:en("Animation","AnimationIteration"),animationstart:en("Animation","AnimationStart"),transitionend:en("Transition","TransitionEnd")},vn={},fn={};jt&&(fn=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function gn(Gt){if(vn[Gt])return vn[Gt];if(!Jr[Gt])return Gt;var er=Jr[Gt],hr;for(hr in er)if(er.hasOwnProperty(hr)&&hr in fn)return vn[Gt]=er[hr];return Gt}var mn=gn("animationend"),ss=gn("animationiteration"),ga=gn("animationstart"),Ns=gn("transitionend"),vs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xs=new(typeof WeakMap=="function"?WeakMap:Map);function co(Gt){var er=Xs.get(Gt);return er===void 0&&(er=new Map,Xs.set(Gt,er)),er}function ls(Gt){var er=Gt,hr=Gt;if(Gt.alternate)for(;er.return;)er=er.return;else{Gt=er;do er=Gt,(er.effectTag&1026)!==0&&(hr=er.return),Gt=er.return;while(Gt)}return er.tag===3?hr:null}function Mo(Gt){if(Gt.tag===13){var er=Gt.memoizedState;if(er===null&&(Gt=Gt.alternate,Gt!==null&&(er=Gt.memoizedState)),er!==null)return er.dehydrated}return null}function Nu(Gt){if(ls(Gt)!==Gt)throw Error(rt(188))}function Ou(Gt){var er=Gt.alternate;if(!er){if(er=ls(Gt),er===null)throw Error(rt(188));return er!==Gt?null:Gt}for(var hr=Gt,Fr=er;;){var nn=hr.return;if(nn===null)break;var zn=nn.alternate;if(zn===null){if(Fr=nn.return,Fr!==null){hr=Fr;continue}break}if(nn.child===zn.child){for(zn=nn.child;zn;){if(zn===hr)return Nu(nn),Gt;if(zn===Fr)return Nu(nn),er;zn=zn.sibling}throw Error(rt(188))}if(hr.return!==Fr.return)hr=nn,Fr=zn;else{for(var _i=!1,As=nn.child;As;){if(As===hr){_i=!0,hr=nn,Fr=zn;break}if(As===Fr){_i=!0,Fr=nn,hr=zn;break}As=As.sibling}if(!_i){for(As=zn.child;As;){if(As===hr){_i=!0,hr=zn,Fr=nn;break}if(As===Fr){_i=!0,Fr=zn,hr=nn;break}As=As.sibling}if(!_i)throw Error(rt(189))}}if(hr.alternate!==Fr)throw Error(rt(190))}if(hr.tag!==3)throw Error(rt(188));return hr.stateNode.current===hr?Gt:er}function $u(Gt){if(Gt=Ou(Gt),!Gt)return null;for(var er=Gt;;){if(er.tag===5||er.tag===6)return er;if(er.child)er.child.return=er,er=er.child;else{if(er===Gt)break;for(;!er.sibling;){if(!er.return||er.return===Gt)return null;er=er.return}er.sibling.return=er.return,er=er.sibling}}return null}function Hu(Gt,er){if(er==null)throw Error(rt(30));return Gt==null?er:Array.isArray(Gt)?Array.isArray(er)?(Gt.push.apply(Gt,er),Gt):(Gt.push(er),Gt):Array.isArray(er)?[Gt].concat(er):[Gt,er]}function kl(Gt,er,hr){Array.isArray(Gt)?Gt.forEach(er,hr):Gt&&er.call(hr,Gt)}var Uu=null;function tl(Gt){if(Gt){var er=Gt._dispatchListeners,hr=Gt._dispatchInstances;if(Array.isArray(er))for(var Fr=0;Fr<er.length&&!Gt.isPropagationStopped();Fr++)Tt(Gt,er[Fr],hr[Fr]);else er&&Tt(Gt,er,hr);Gt._dispatchListeners=null,Gt._dispatchInstances=null,Gt.isPersistent()||Gt.constructor.release(Gt)}}function rl(Gt){if(Gt!==null&&(Uu=Hu(Uu,Gt)),Gt=Uu,Uu=null,Gt){if(kl(Gt,tl),Uu)throw Error(rt(95));if(ft)throw Gt=ht,ft=!1,ht=null,Gt}}function Wu(Gt){return Gt=Gt.target||Gt.srcElement||window,Gt.correspondingUseElement&&(Gt=Gt.correspondingUseElement),Gt.nodeType===3?Gt.parentNode:Gt}function tp(Gt){if(!jt)return!1;Gt="on"+Gt;var er=Gt in document;return er||(er=document.createElement("div"),er.setAttribute(Gt,"return;"),er=typeof er[Gt]=="function"),er}var Al=[];function om(Gt){Gt.topLevelType=null,Gt.nativeEvent=null,Gt.targetInst=null,Gt.ancestors.length=0,10>Al.length&&Al.push(Gt)}function Op(Gt,er,hr,Fr){if(Al.length){var nn=Al.pop();return nn.topLevelType=Gt,nn.eventSystemFlags=Fr,nn.nativeEvent=er,nn.targetInst=hr,nn}return{topLevelType:Gt,eventSystemFlags:Fr,nativeEvent:er,targetInst:hr,ancestors:[]}}function op(Gt){var er=Gt.targetInst,hr=er;do{if(!hr){Gt.ancestors.push(hr);break}var Fr=hr;if(Fr.tag===3)Fr=Fr.stateNode.containerInfo;else{for(;Fr.return;)Fr=Fr.return;Fr=Fr.tag!==3?null:Fr.stateNode.containerInfo}if(!Fr)break;er=hr.tag,er!==5&&er!==6||Gt.ancestors.push(hr),hr=Hr(Fr)}while(hr);for(hr=0;hr<Gt.ancestors.length;hr++){er=Gt.ancestors[hr];var nn=Wu(Gt.nativeEvent);Fr=Gt.topLevelType;var zn=Gt.nativeEvent,_i=Gt.eventSystemFlags;hr===0&&(_i|=64);for(var As=null,ps=0;ps<It.length;ps++){var xo=It[ps];xo&&(xo=xo.extractEvents(Fr,er,zn,nn,_i))&&(As=Hu(As,xo))}rl(As)}}function wl(Gt,er,hr){if(!hr.has(Gt)){switch(Gt){case"scroll":xm(er,"scroll",!0);break;case"focus":case"blur":xm(er,"focus",!0),xm(er,"blur",!0),hr.set("blur",null),hr.set("focus",null);break;case"cancel":case"close":tp(Gt)&&xm(er,Gt,!0);break;case"invalid":case"submit":case"reset":break;default:vs.indexOf(Gt)===-1&&Xo(Gt,er)}hr.set(Gt,null)}}var um,Im,Il,sn=!1,mr=[],fr=null,yr=null,jr=null,un=new Map,$n=new Map,Yn=[],os="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Vs="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function eo(Gt,er){var hr=co(er);os.forEach(function(Fr){wl(Fr,er,hr)}),Vs.forEach(function(Fr){wl(Fr,er,hr)})}function qo(Gt,er,hr,Fr,nn){return{blockedOn:Gt,topLevelType:er,eventSystemFlags:hr|32,nativeEvent:nn,container:Fr}}function Po(Gt,er){switch(Gt){case"focus":case"blur":fr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":jr=null;break;case"pointerover":case"pointerout":un.delete(er.pointerId);break;case"gotpointercapture":case"lostpointercapture":$n.delete(er.pointerId)}}function su(Gt,er,hr,Fr,nn,zn){return Gt===null||Gt.nativeEvent!==zn?(Gt=qo(er,hr,Fr,nn,zn),er!==null&&(er=bn(er),er!==null&&Im(er)),Gt):(Gt.eventSystemFlags|=Fr,Gt)}function mu(Gt,er,hr,Fr,nn){switch(er){case"focus":return fr=su(fr,Gt,er,hr,Fr,nn),!0;case"dragenter":return yr=su(yr,Gt,er,hr,Fr,nn),!0;case"mouseover":return jr=su(jr,Gt,er,hr,Fr,nn),!0;case"pointerover":var zn=nn.pointerId;return un.set(zn,su(un.get(zn)||null,Gt,er,hr,Fr,nn)),!0;case"gotpointercapture":return zn=nn.pointerId,$n.set(zn,su($n.get(zn)||null,Gt,er,hr,Fr,nn)),!0}return!1}function zu(Gt){var er=Hr(Gt.target);if(er!==null){var hr=ls(er);if(hr!==null){if(er=hr.tag,er===13){if(er=Mo(hr),er!==null){Gt.blockedOn=er,tt.unstable_runWithPriority(Gt.priority,function(){Il(hr)});return}}else if(er===3&&hr.stateNode.hydrate){Gt.blockedOn=hr.tag===3?hr.stateNode.containerInfo:null;return}}}Gt.blockedOn=null}function lu(Gt){if(Gt.blockedOn!==null)return!1;var er=Lp(Gt.topLevelType,Gt.eventSystemFlags,Gt.container,Gt.nativeEvent);if(er!==null){var hr=bn(er);return hr!==null&&Im(hr),Gt.blockedOn=er,!1}return!0}function vl(Gt,er,hr){lu(Gt)&&hr.delete(er)}function up(){for(sn=!1;0<mr.length;){var Gt=mr[0];if(Gt.blockedOn!==null){Gt=bn(Gt.blockedOn),Gt!==null&&um(Gt);break}var er=Lp(Gt.topLevelType,Gt.eventSystemFlags,Gt.container,Gt.nativeEvent);er!==null?Gt.blockedOn=er:mr.shift()}fr!==null&&lu(fr)&&(fr=null),yr!==null&&lu(yr)&&(yr=null),jr!==null&&lu(jr)&&(jr=null),un.forEach(vl),$n.forEach(vl)}function _c(Gt,er){Gt.blockedOn===er&&(Gt.blockedOn=null,sn||(sn=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,up)))}function Bl(Gt){function er(nn){return _c(nn,Gt)}if(0<mr.length){_c(mr[0],Gt);for(var hr=1;hr<mr.length;hr++){var Fr=mr[hr];Fr.blockedOn===Gt&&(Fr.blockedOn=null)}}for(fr!==null&&_c(fr,Gt),yr!==null&&_c(yr,Gt),jr!==null&&_c(jr,Gt),un.forEach(er),$n.forEach(er),hr=0;hr<Yn.length;hr++)Fr=Yn[hr],Fr.blockedOn===Gt&&(Fr.blockedOn=null);for(;0<Yn.length&&(hr=Yn[0],hr.blockedOn===null);)zu(hr),hr.blockedOn===null&&Yn.shift()}var rp={},Kp=new Map,lp=new Map,qp=["abort","abort",mn,"animationEnd",ss,"animationIteration",ga,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ns,"transitionEnd","waiting","waiting"];function lm(Gt,er){for(var hr=0;hr<Gt.length;hr+=2){var Fr=Gt[hr],nn=Gt[hr+1],zn="on"+(nn[0].toUpperCase()+nn.slice(1));zn={phasedRegistrationNames:{bubbled:zn,captured:zn+"Capture"},dependencies:[Fr],eventPriority:er},lp.set(Fr,er),Kp.set(Fr,zn),rp[nn]=zn}}lm("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),lm("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),lm(qp,2);for(var dl="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),el=0;el<dl.length;el++)lp.set(dl[el],0);var gv=tt.unstable_UserBlockingPriority,Vm=tt.unstable_runWithPriority,nl=!0;function Xo(Gt,er){xm(er,Gt,!1)}function xm(Gt,er,hr){var Fr=lp.get(er);switch(Fr===void 0?2:Fr){case 0:Fr=nm.bind(null,er,1,Gt);break;case 1:Fr=vv.bind(null,er,1,Gt);break;default:Fr=rv.bind(null,er,1,Gt)}hr?Gt.addEventListener(er,Fr,!0):Gt.addEventListener(er,Fr,!1)}function nm(Gt,er,hr,Fr){Sr||cr();var nn=rv,zn=Sr;Sr=!0;try{pr(nn,Gt,er,hr,Fr)}finally{(Sr=zn)||Vr()}}function vv(Gt,er,hr,Fr){Vm(gv,rv.bind(null,Gt,er,hr,Fr))}function rv(Gt,er,hr,Fr){if(nl)if(0<mr.length&&-1<os.indexOf(Gt))Gt=qo(null,Gt,er,hr,Fr),mr.push(Gt);else{var nn=Lp(Gt,er,hr,Fr);if(nn===null)Po(Gt,Fr);else if(-1<os.indexOf(Gt))Gt=qo(nn,Gt,er,hr,Fr),mr.push(Gt);else if(!mu(nn,Gt,er,hr,Fr)){Po(Gt,Fr),Gt=Op(Gt,Fr,null,er);try{Wr(op,Gt)}finally{om(Gt)}}}}function Lp(Gt,er,hr,Fr){if(hr=Wu(Fr),hr=Hr(hr),hr!==null){var nn=ls(hr);if(nn===null)hr=null;else{var zn=nn.tag;if(zn===13){if(hr=Mo(nn),hr!==null)return hr;hr=null}else if(zn===3){if(nn.stateNode.hydrate)return nn.tag===3?nn.stateNode.containerInfo:null;hr=null}else nn!==hr&&(hr=null)}}Gt=Op(Gt,Fr,hr,er);try{Wr(op,Gt)}finally{om(Gt)}return null}var cp={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},nv=["Webkit","ms","Moz","O"];Object.keys(cp).forEach(function(Gt){nv.forEach(function(er){er=er+Gt.charAt(0).toUpperCase()+Gt.substring(1),cp[er]=cp[Gt]})});function Hm(Gt,er,hr){return er==null||typeof er=="boolean"||er===""?"":hr||typeof er!="number"||er===0||cp.hasOwnProperty(Gt)&&cp[Gt]?(""+er).trim():er+"px"}function Rv(Gt,er){Gt=Gt.style;for(var hr in er)if(er.hasOwnProperty(hr)){var Fr=hr.indexOf("--")===0,nn=Hm(hr,er[hr],Fr);hr==="float"&&(hr="cssFloat"),Fr?Gt.setProperty(hr,nn):Gt[hr]=nn}}var mm=_e({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 Wm(Gt,er){if(er){if(mm[Gt]&&(er.children!=null||er.dangerouslySetInnerHTML!=null))throw Error(rt(137,Gt,""));if(er.dangerouslySetInnerHTML!=null){if(er.children!=null)throw Error(rt(60));if(!(typeof er.dangerouslySetInnerHTML=="object"&&"__html"in er.dangerouslySetInnerHTML))throw Error(rt(61))}if(er.style!=null&&typeof er.style!="object")throw Error(rt(62,""))}}function uy(Gt,er){if(Gt.indexOf("-")===-1)return typeof er.is=="string";switch(Gt){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sm=Fl.html;function wm(Gt,er){Gt=Gt.nodeType===9||Gt.nodeType===11?Gt:Gt.ownerDocument;var hr=co(Gt);er=Vt[er];for(var Fr=0;Fr<er.length;Fr++)wl(er[Fr],Gt,hr)}function tm(){}function iv(Gt){if(Gt=Gt||(typeof document<"u"?document:void 0),typeof Gt>"u")return null;try{return Gt.activeElement||Gt.body}catch{return Gt.body}}function _d(Gt){for(;Gt&&Gt.firstChild;)Gt=Gt.firstChild;return Gt}function Xm(Gt,er){var hr=_d(Gt);Gt=0;for(var Fr;hr;){if(hr.nodeType===3){if(Fr=Gt+hr.textContent.length,Gt<=er&&Fr>=er)return{node:hr,offset:er-Gt};Gt=Fr}e:{for(;hr;){if(hr.nextSibling){hr=hr.nextSibling;break e}hr=hr.parentNode}hr=void 0}hr=_d(hr)}}function Cl(Gt,er){return Gt&&er?Gt===er?!0:Gt&&Gt.nodeType===3?!1:er&&er.nodeType===3?Cl(Gt,er.parentNode):"contains"in Gt?Gt.contains(er):Gt.compareDocumentPosition?!!(Gt.compareDocumentPosition(er)&16):!1:!1}function Cy(){for(var Gt=window,er=iv();er instanceof Gt.HTMLIFrameElement;){try{var hr=typeof er.contentWindow.location.href=="string"}catch{hr=!1}if(hr)Gt=er.contentWindow;else break;er=iv(Gt.document)}return er}function zv(Gt){var er=Gt&&Gt.nodeName&&Gt.nodeName.toLowerCase();return er&&(er==="input"&&(Gt.type==="text"||Gt.type==="search"||Gt.type==="tel"||Gt.type==="url"||Gt.type==="password")||er==="textarea"||Gt.contentEditable==="true")}var Fp="$",Tm="/$",yv="$?",_l="$!",Wp=null,Zp=null;function Xp(Gt,er){switch(Gt){case"button":case"input":case"select":case"textarea":return!!er.autoFocus}return!1}function np(Gt,er){return Gt==="textarea"||Gt==="option"||Gt==="noscript"||typeof er.children=="string"||typeof er.children=="number"||typeof er.dangerouslySetInnerHTML=="object"&&er.dangerouslySetInnerHTML!==null&&er.dangerouslySetInnerHTML.__html!=null}var Rm=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0;function bv(Gt){for(;Gt!=null;Gt=Gt.nextSibling){var er=Gt.nodeType;if(er===1||er===3)break}return Gt}function Cr(Gt){Gt=Gt.previousSibling;for(var er=0;Gt;){if(Gt.nodeType===8){var hr=Gt.data;if(hr===Fp||hr===_l||hr===yv){if(er===0)return Gt;er--}else hr===Tm&&er++}Gt=Gt.previousSibling}return null}var ir=Math.random().toString(36).slice(2),nr="__reactInternalInstance$"+ir,dr="__reactEventHandlers$"+ir,Pr="__reactContainere$"+ir;function Hr(Gt){var er=Gt[nr];if(er)return er;for(var hr=Gt.parentNode;hr;){if(er=hr[Pr]||hr[nr]){if(hr=er.alternate,er.child!==null||hr!==null&&hr.child!==null)for(Gt=Cr(Gt);Gt!==null;){if(hr=Gt[nr])return hr;Gt=Cr(Gt)}return er}Gt=hr,hr=Gt.parentNode}return null}function bn(Gt){return Gt=Gt[nr]||Gt[Pr],!Gt||Gt.tag!==5&&Gt.tag!==6&&Gt.tag!==13&&Gt.tag!==3?null:Gt}function Pn(Gt){if(Gt.tag===5||Gt.tag===6)return Gt.stateNode;throw Error(rt(33))}function Wn(Gt){return Gt[dr]||null}function ms(Gt){do Gt=Gt.return;while(Gt&&Gt.tag!==5);return Gt||null}function Es(Gt,er){var hr=Gt.stateNode;if(!hr)return null;var Fr=Et(hr);if(!Fr)return null;hr=Fr[er];e:switch(er){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Fr=!Fr.disabled)||(Gt=Gt.type,Fr=!(Gt==="button"||Gt==="input"||Gt==="select"||Gt==="textarea")),Gt=!Fr;break e;default:Gt=!1}if(Gt)return null;if(hr&&typeof hr!="function")throw Error(rt(231,er,typeof hr));return hr}function ao(Gt,er,hr){(er=Es(Gt,hr.dispatchConfig.phasedRegistrationNames[er]))&&(hr._dispatchListeners=Hu(hr._dispatchListeners,er),hr._dispatchInstances=Hu(hr._dispatchInstances,Gt))}function Js(Gt){if(Gt&&Gt.dispatchConfig.phasedRegistrationNames){for(var er=Gt._targetInst,hr=[];er;)hr.push(er),er=ms(er);for(er=hr.length;0<er--;)ao(hr[er],"captured",Gt);for(er=0;er<hr.length;er++)ao(hr[er],"bubbled",Gt)}}function po(Gt,er,hr){Gt&&hr&&hr.dispatchConfig.registrationName&&(er=Es(Gt,hr.dispatchConfig.registrationName))&&(hr._dispatchListeners=Hu(hr._dispatchListeners,er),hr._dispatchInstances=Hu(hr._dispatchInstances,Gt))}function So(Gt){Gt&&Gt.dispatchConfig.registrationName&&po(Gt._targetInst,null,Gt)}function $o(Gt){kl(Gt,Js)}var Zo=null,au=null,ou=null;function Yo(){if(ou)return ou;var Gt,er=au,hr=er.length,Fr,nn="value"in Zo?Zo.value:Zo.textContent,zn=nn.length;for(Gt=0;Gt<hr&&er[Gt]===nn[Gt];Gt++);var _i=hr-Gt;for(Fr=1;Fr<=_i&&er[hr-Fr]===nn[zn-Fr];Fr++);return ou=nn.slice(Gt,1<Fr?1-Fr:void 0)}function Ru(){return!0}function ku(){return!1}function Vu(Gt,er,hr,Fr){this.dispatchConfig=Gt,this._targetInst=er,this.nativeEvent=hr,Gt=this.constructor.Interface;for(var nn in Gt)Gt.hasOwnProperty(nn)&&((er=Gt[nn])?this[nn]=er(hr):nn==="target"?this.target=Fr:this[nn]=hr[nn]);return this.isDefaultPrevented=(hr.defaultPrevented!=null?hr.defaultPrevented:hr.returnValue===!1)?Ru:ku,this.isPropagationStopped=ku,this}_e(Vu.prototype,{preventDefault:function(){this.defaultPrevented=!0;var Gt=this.nativeEvent;Gt&&(Gt.preventDefault?Gt.preventDefault():typeof Gt.returnValue!="unknown"&&(Gt.returnValue=!1),this.isDefaultPrevented=Ru)},stopPropagation:function(){var Gt=this.nativeEvent;Gt&&(Gt.stopPropagation?Gt.stopPropagation():typeof Gt.cancelBubble!="unknown"&&(Gt.cancelBubble=!0),this.isPropagationStopped=Ru)},persist:function(){this.isPersistent=Ru},isPersistent:ku,destructor:function(){var Gt=this.constructor.Interface,er;for(er in Gt)this[er]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ku,this._dispatchInstances=this._dispatchListeners=null}}),Vu.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(Gt){return Gt.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Vu.extend=function(Gt){function er(){}function hr(){return Fr.apply(this,arguments)}var Fr=this;er.prototype=Fr.prototype;var nn=new er;return _e(nn,hr.prototype),hr.prototype=nn,hr.prototype.constructor=hr,hr.Interface=_e({},Fr.Interface,Gt),hr.extend=Fr.extend,fu(hr),hr},fu(Vu);function sl(Gt,er,hr,Fr){if(this.eventPool.length){var nn=this.eventPool.pop();return this.call(nn,Gt,er,hr,Fr),nn}return new this(Gt,er,hr,Fr)}function nu(Gt){if(!(Gt instanceof this))throw Error(rt(279));Gt.destructor(),10>this.eventPool.length&&this.eventPool.push(Gt)}function fu(Gt){Gt.eventPool=[],Gt.getPooled=sl,Gt.release=nu}var Vo=Vu.extend({data:null}),ll=Vu.extend({data:null}),zl=[9,13,27,32],Gl=jt&&"CompositionEvent"in window,Dl=null;jt&&"documentMode"in document&&(Dl=document.documentMode);var dp=jt&&"TextEvent"in window&&!Dl,Bp=jt&&(!Gl||Dl&&8<Dl&&11>=Dl),cm=" ",Rl={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},hl=!1;function hp(Gt,er){switch(Gt){case"keyup":return zl.indexOf(er.keyCode)!==-1;case"keydown":return er.keyCode!==229;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Cp(Gt){return Gt=Gt.detail,typeof Gt=="object"&&"data"in Gt?Gt.data:null}var il=!1;function Jp(Gt,er){switch(Gt){case"compositionend":return Cp(er);case"keypress":return er.which!==32?null:(hl=!0,cm);case"textInput":return Gt=er.data,Gt===cm&&hl?null:Gt;default:return null}}function fp(Gt,er){if(il)return Gt==="compositionend"||!Gl&&hp(Gt,er)?(Gt=Yo(),ou=au=Zo=null,il=!1,Gt):null;switch(Gt){case"paste":return null;case"keypress":if(!(er.ctrlKey||er.altKey||er.metaKey)||er.ctrlKey&&er.altKey){if(er.char&&1<er.char.length)return er.char;if(er.which)return String.fromCharCode(er.which)}return null;case"compositionend":return Bp&&er.locale!=="ko"?null:er.data;default:return null}}var Jy={eventTypes:Rl,extractEvents:function(Gt,er,hr,Fr){var nn;if(Gl)e:{switch(Gt){case"compositionstart":var zn=Rl.compositionStart;break e;case"compositionend":zn=Rl.compositionEnd;break e;case"compositionupdate":zn=Rl.compositionUpdate;break e}zn=void 0}else il?hp(Gt,hr)&&(zn=Rl.compositionEnd):Gt==="keydown"&&hr.keyCode===229&&(zn=Rl.compositionStart);return zn?(Bp&&hr.locale!=="ko"&&(il||zn!==Rl.compositionStart?zn===Rl.compositionEnd&&il&&(nn=Yo()):(Zo=Fr,au="value"in Zo?Zo.value:Zo.textContent,il=!0)),zn=Vo.getPooled(zn,er,hr,Fr),nn?zn.data=nn:(nn=Cp(hr),nn!==null&&(zn.data=nn)),$o(zn),nn=zn):nn=null,(Gt=dp?Jp(Gt,hr):fp(Gt,hr))?(er=ll.getPooled(Rl.beforeInput,er,hr,Fr),er.data=Gt,$o(er)):er=null,nn===null?er:er===null?nn:[nn,er]}},ip={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bs(Gt){var er=Gt&&Gt.nodeName&&Gt.nodeName.toLowerCase();return er==="input"?!!ip[Gt.type]:er==="textarea"}var Do={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fo(Gt,er,hr){return Gt=Vu.getPooled(Do.change,Gt,er,hr),Gt.type="change",tr(hr),$o(Gt),Gt}var bu=null,Qu=null;function jl(Gt){rl(Gt)}function Yp(Gt){var er=Pn(Gt);if(En(er))return Gt}function _h(Gt,er){if(Gt==="change")return er}var Pm=!1;jt&&(Pm=tp("input")&&(!document.documentMode||9<document.documentMode));function Lm(){bu&&(bu.detachEvent("onpropertychange",_v),Qu=bu=null)}function _v(Gt){if(Gt.propertyName==="value"&&Yp(Qu))if(Gt=fo(Qu,Gt,Wu(Gt)),Sr)rl(Gt);else{Sr=!0;try{ar(jl,Gt)}finally{Sr=!1,Vr()}}}function gp(Gt,er,hr){Gt==="focus"?(Lm(),bu=er,Qu=hr,bu.attachEvent("onpropertychange",_v)):Gt==="blur"&&Lm()}function o_(Gt){if(Gt==="selectionchange"||Gt==="keyup"||Gt==="keydown")return Yp(Qu)}function Gv(Gt,er){if(Gt==="click")return Yp(er)}function ly(Gt,er){if(Gt==="input"||Gt==="change")return Yp(er)}var Dy={eventTypes:Do,_isInputEventSupported:Pm,extractEvents:function(Gt,er,hr,Fr){var nn=er?Pn(er):window,zn=nn.nodeName&&nn.nodeName.toLowerCase();if(zn==="select"||zn==="input"&&nn.type==="file")var _i=_h;else if(Bs(nn))if(Pm)_i=ly;else{_i=o_;var As=gp}else(zn=nn.nodeName)&&zn.toLowerCase()==="input"&&(nn.type==="checkbox"||nn.type==="radio")&&(_i=Gv);if(_i&&(_i=_i(Gt,er)))return fo(_i,hr,Fr);As&&As(Gt,nn,er),Gt==="blur"&&(Gt=nn._wrapperState)&&Gt.controlled&&nn.type==="number"&&es(nn,"number",nn.value)}},Zu=Vu.extend({view:null,detail:null}),N_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u_(Gt){var er=this.nativeEvent;return er.getModifierState?er.getModifierState(Gt):(Gt=N_[Gt])?!!er[Gt]:!1}function cy(){return u_}var Pv=0,vp=0,Fu=!1,Zv=!1,Nv=Zu.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:cy,button:null,buttons:null,relatedTarget:function(Gt){return Gt.relatedTarget||(Gt.fromElement===Gt.srcElement?Gt.toElement:Gt.fromElement)},movementX:function(Gt){if("movementX"in Gt)return Gt.movementX;var er=Pv;return Pv=Gt.screenX,Fu?Gt.type==="mousemove"?Gt.screenX-er:0:(Fu=!0,0)},movementY:function(Gt){if("movementY"in Gt)return Gt.movementY;var er=vp;return vp=Gt.screenY,Zv?Gt.type==="mousemove"?Gt.screenY-er:0:(Zv=!0,0)}}),av=Nv.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Gy={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},My={eventTypes:Gy,extractEvents:function(Gt,er,hr,Fr,nn){var zn=Gt==="mouseover"||Gt==="pointerover",_i=Gt==="mouseout"||Gt==="pointerout";if(zn&&(nn&32)===0&&(hr.relatedTarget||hr.fromElement)||!_i&&!zn)return null;if(zn=Fr.window===Fr?Fr:(zn=Fr.ownerDocument)?zn.defaultView||zn.parentWindow:window,_i){if(_i=er,er=(er=hr.relatedTarget||hr.toElement)?Hr(er):null,er!==null){var As=ls(er);(er!==As||er.tag!==5&&er.tag!==6)&&(er=null)}}else _i=null;if(_i===er)return null;if(Gt==="mouseout"||Gt==="mouseover")var ps=Nv,xo=Gy.mouseLeave,Pu=Gy.mouseEnter,Bu="mouse";else(Gt==="pointerout"||Gt==="pointerover")&&(ps=av,xo=Gy.pointerLeave,Pu=Gy.pointerEnter,Bu="pointer");if(Gt=_i==null?zn:Pn(_i),zn=er==null?zn:Pn(er),xo=ps.getPooled(xo,_i,hr,Fr),xo.type=Bu+"leave",xo.target=Gt,xo.relatedTarget=zn,hr=ps.getPooled(Pu,er,hr,Fr),hr.type=Bu+"enter",hr.target=zn,hr.relatedTarget=Gt,Fr=_i,Bu=er,Fr&&Bu)e:{for(ps=Fr,Pu=Bu,_i=0,Gt=ps;Gt;Gt=ms(Gt))_i++;for(Gt=0,er=Pu;er;er=ms(er))Gt++;for(;0<_i-Gt;)ps=ms(ps),_i--;for(;0<Gt-_i;)Pu=ms(Pu),Gt--;for(;_i--;){if(ps===Pu||ps===Pu.alternate)break e;ps=ms(ps),Pu=ms(Pu)}ps=null}else ps=null;for(Pu=ps,ps=[];Fr&&Fr!==Pu&&(_i=Fr.alternate,!(_i!==null&&_i===Pu));)ps.push(Fr),Fr=ms(Fr);for(Fr=[];Bu&&Bu!==Pu&&(_i=Bu.alternate,!(_i!==null&&_i===Pu));)Fr.push(Bu),Bu=ms(Bu);for(Bu=0;Bu<ps.length;Bu++)po(ps[Bu],"bubbled",xo);for(Bu=Fr.length;0<Bu--;)po(Fr[Bu],"captured",hr);return(nn&64)===0?[xo]:[xo,hr]}};function $0(Gt,er){return Gt===er&&(Gt!==0||1/Gt===1/er)||Gt!==Gt&&er!==er}var Iy=typeof Object.is=="function"?Object.is:$0,Ym=Object.prototype.hasOwnProperty;function yp(Gt,er){if(Iy(Gt,er))return!0;if(typeof Gt!="object"||Gt===null||typeof er!="object"||er===null)return!1;var hr=Object.keys(Gt),Fr=Object.keys(er);if(hr.length!==Fr.length)return!1;for(Fr=0;Fr<hr.length;Fr++)if(!Ym.call(er,hr[Fr])||!Iy(Gt[hr[Fr]],er[hr[Fr]]))return!1;return!0}var pp=jt&&"documentMode"in document&&11>=document.documentMode,xv={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Yl=null,l_=null,e0=null,Vv=!1;function dy(Gt,er){var hr=er.window===er?er.document:er.nodeType===9?er:er.ownerDocument;return Vv||Yl==null||Yl!==iv(hr)?null:(hr=Yl,"selectionStart"in hr&&zv(hr)?hr={start:hr.selectionStart,end:hr.selectionEnd}:(hr=(hr.ownerDocument&&hr.ownerDocument.defaultView||window).getSelection(),hr={anchorNode:hr.anchorNode,anchorOffset:hr.anchorOffset,focusNode:hr.focusNode,focusOffset:hr.focusOffset}),e0&&yp(e0,hr)?null:(e0=hr,Gt=Vu.getPooled(xv.select,l_,Gt,er),Gt.type="select",Gt.target=Yl,$o(Gt),Gt))}var hy={eventTypes:xv,extractEvents:function(Gt,er,hr,Fr,nn,zn){if(nn=zn||(Fr.window===Fr?Fr.document:Fr.nodeType===9?Fr:Fr.ownerDocument),!(zn=!nn)){e:{nn=co(nn),zn=Vt.onSelect;for(var _i=0;_i<zn.length;_i++)if(!nn.has(zn[_i])){nn=!1;break e}nn=!0}zn=!nn}if(zn)return null;switch(nn=er?Pn(er):window,Gt){case"focus":(Bs(nn)||nn.contentEditable==="true")&&(Yl=nn,l_=er,e0=null);break;case"blur":e0=l_=Yl=null;break;case"mousedown":Vv=!0;break;case"contextmenu":case"mouseup":case"dragend":return Vv=!1,dy(hr,Fr);case"selectionchange":if(pp)break;case"keydown":case"keyup":return dy(hr,Fr)}return null}},Jv=Vu.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Jn=Vu.extend({clipboardData:function(Gt){return"clipboardData"in Gt?Gt.clipboardData:window.clipboardData}}),Ql=Zu.extend({relatedTarget:null});function fy(Gt){var er=Gt.keyCode;return"charCode"in Gt?(Gt=Gt.charCode,Gt===0&&er===13&&(Gt=13)):Gt=er,Gt===10&&(Gt=13),32<=Gt||Gt===13?Gt:0}var U0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gm=Zu.extend({key:function(Gt){if(Gt.key){var er=U0[Gt.key]||Gt.key;if(er!=="Unidentified")return er}return Gt.type==="keypress"?(Gt=fy(Gt),Gt===13?"Enter":String.fromCharCode(Gt)):Gt.type==="keydown"||Gt.type==="keyup"?Pl[Gt.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:cy,charCode:function(Gt){return Gt.type==="keypress"?fy(Gt):0},keyCode:function(Gt){return Gt.type==="keydown"||Gt.type==="keyup"?Gt.keyCode:0},which:function(Gt){return Gt.type==="keypress"?fy(Gt):Gt.type==="keydown"||Gt.type==="keyup"?Gt.keyCode:0}}),z0=Nv.extend({dataTransfer:null}),G0=Zu.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:cy}),Nm=Vu.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),x0=Nv.extend({deltaX:function(Gt){return"deltaX"in Gt?Gt.deltaX:"wheelDeltaX"in Gt?-Gt.wheelDeltaX:0},deltaY:function(Gt){return"deltaY"in Gt?Gt.deltaY:"wheelDeltaY"in Gt?-Gt.wheelDeltaY:"wheelDelta"in Gt?-Gt.wheelDelta:0},deltaZ:null,deltaMode:null}),kv={eventTypes:rp,extractEvents:function(Gt,er,hr,Fr){var nn=Kp.get(Gt);if(!nn)return null;switch(Gt){case"keypress":if(fy(hr)===0)return null;case"keydown":case"keyup":Gt=gm;break;case"blur":case"focus":Gt=Ql;break;case"click":if(hr.button===2)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Gt=Nv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Gt=z0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Gt=G0;break;case mn:case ss:case ga:Gt=Jv;break;case Ns:Gt=Nm;break;case"scroll":Gt=Zu;break;case"wheel":Gt=x0;break;case"copy":case"cut":case"paste":Gt=Jn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Gt=av;break;default:Gt=Vu}return er=Gt.getPooled(nn,er,hr,Fr),$o(er),er}};if(wt)throw Error(rt(101));wt=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Nt();var $l=bn;Et=Wn,Ct=$l,Rt=Pn,Kt({SimpleEventPlugin:kv,EnterLeaveEventPlugin:My,ChangeEventPlugin:Dy,SelectEventPlugin:hy,BeforeInputEventPlugin:Jy});var sv=[],wp=-1;function yl(Gt){0>wp||(Gt.current=sv[wp],sv[wp]=null,wp--)}function Tp(Gt,er){wp++,sv[wp]=Gt.current,Gt.current=er}var Hv={},vm={current:Hv},Qm={current:!1},V0=Hv;function Ov(Gt,er){var hr=Gt.type.contextTypes;if(!hr)return Hv;var Fr=Gt.stateNode;if(Fr&&Fr.__reactInternalMemoizedUnmaskedChildContext===er)return Fr.__reactInternalMemoizedMaskedChildContext;var nn={},zn;for(zn in hr)nn[zn]=er[zn];return Fr&&(Gt=Gt.stateNode,Gt.__reactInternalMemoizedUnmaskedChildContext=er,Gt.__reactInternalMemoizedMaskedChildContext=nn),nn}function Sv(Gt){return Gt=Gt.childContextTypes,Gt!=null}function c_(){yl(Qm),yl(vm)}function ey(Gt,er,hr){if(vm.current!==Hv)throw Error(rt(168));Tp(vm,er),Tp(Qm,hr)}function py(Gt,er,hr){var Fr=Gt.stateNode;if(Gt=er.childContextTypes,typeof Fr.getChildContext!="function")return hr;Fr=Fr.getChildContext();for(var nn in Fr)if(!(nn in Gt))throw Error(rt(108,Is(er)||"Unknown",nn));return _e({},hr,{},Fr)}function Tr(Gt){return Gt=(Gt=Gt.stateNode)&&Gt.__reactInternalMemoizedMergedChildContext||Hv,V0=vm.current,Tp(vm,Gt),Tp(Qm,Qm.current),!0}function br(Gt,er,hr){var Fr=Gt.stateNode;if(!Fr)throw Error(rt(169));hr?(Gt=py(Gt,er,V0),Fr.__reactInternalMemoizedMergedChildContext=Gt,yl(Qm),yl(vm),Tp(vm,Gt)):yl(Qm),Tp(Qm,hr)}var zr=tt.unstable_runWithPriority,$r=tt.unstable_scheduleCallback,an=tt.unstable_cancelCallback,yn=tt.unstable_requestPaint,as=tt.unstable_now,hs=tt.unstable_getCurrentPriorityLevel,ys=tt.unstable_ImmediatePriority,Ss=tt.unstable_UserBlockingPriority,zs=tt.unstable_NormalPriority,wo=tt.unstable_LowPriority,hu=tt.unstable_IdlePriority,ko={},Xu=tt.unstable_shouldYield,Ju=yn!==void 0?yn:function(){},jp=null,wv=null,Vy=!1,S0=as(),Tv=1e4>S0?as:function(){return as()-S0};function Fm(){switch(hs()){case ys:return 99;case Ss:return 98;case zs:return 97;case wo:return 96;case hu:return 95;default:throw Error(rt(332))}}function w0(Gt){switch(Gt){case 99:return ys;case 98:return Ss;case 97:return zs;case 96:return wo;case 95:return hu;default:throw Error(rt(332))}}function qv(Gt,er){return Gt=w0(Gt),zr(Gt,er)}function bp(Gt,er,hr){return Gt=w0(Gt),$r(Gt,er,hr)}function T0(Gt){return jp===null?(jp=[Gt],wv=$r(ys,H0)):jp.push(Gt),ko}function Bm(){if(wv!==null){var Gt=wv;wv=null,an(Gt)}H0()}function H0(){if(!Vy&&jp!==null){Vy=!0;var Gt=0;try{var er=jp;qv(99,function(){for(;Gt<er.length;Gt++){var hr=er[Gt];do hr=hr(!0);while(hr!==null)}}),jp=null}catch(hr){throw jp!==null&&(jp=jp.slice(Gt+1)),$r(ys,Bm),hr}finally{Vy=!1}}}function jx(Gt,er,hr){return hr/=10,1073741821-(((1073741821-Gt+er/10)/hr|0)+1)*hr}function am(Gt,er){if(Gt&&Gt.defaultProps){er=_e({},er),Gt=Gt.defaultProps;for(var hr in Gt)er[hr]===void 0&&(er[hr]=Gt[hr])}return er}var _p={current:null},ux=null,k_=null,i1=null;function lx(){i1=k_=ux=null}function cx(Gt){var er=_p.current;yl(_p),Gt.type._context._currentValue=er}function dx(Gt,er){for(;Gt!==null;){var hr=Gt.alternate;if(Gt.childExpirationTime<er)Gt.childExpirationTime=er,hr!==null&&hr.childExpirationTime<er&&(hr.childExpirationTime=er);else if(hr!==null&&hr.childExpirationTime<er)hr.childExpirationTime=er;else break;Gt=Gt.return}}function O_(Gt,er){ux=Gt,i1=k_=null,Gt=Gt.dependencies,Gt!==null&&Gt.firstContext!==null&&(Gt.expirationTime>=er&&(yy=!0),Gt.firstContext=null)}function Hy(Gt,er){if(i1!==Gt&&er!==!1&&er!==0)if((typeof er!="number"||er===1073741823)&&(i1=Gt,er=1073741823),er={context:Gt,observedBits:er,next:null},k_===null){if(ux===null)throw Error(rt(308));k_=er,ux.dependencies={expirationTime:0,firstContext:er,responders:null}}else k_=k_.next=er;return Gt._currentValue}var Ev=!1;function Ry(Gt){Gt.updateQueue={baseState:Gt.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function fl(Gt,er){Gt=Gt.updateQueue,er.updateQueue===Gt&&(er.updateQueue={baseState:Gt.baseState,baseQueue:Gt.baseQueue,shared:Gt.shared,effects:Gt.effects})}function t0(Gt,er){return Gt={expirationTime:Gt,suspenseConfig:er,tag:0,payload:null,callback:null,next:null},Gt.next=Gt}function Xn(Gt,er){if(Gt=Gt.updateQueue,Gt!==null){Gt=Gt.shared;var hr=Gt.pending;hr===null?er.next=er:(er.next=hr.next,hr.next=er),Gt.pending=er}}function wS(Gt,er){var hr=Gt.alternate;hr!==null&&fl(hr,Gt),Gt=Gt.updateQueue,hr=Gt.baseQueue,hr===null?(Gt.baseQueue=er.next=er,er.next=er):(er.next=hr.next,hr.next=er)}function k1(Gt,er,hr,Fr){var nn=Gt.updateQueue;Ev=!1;var zn=nn.baseQueue,_i=nn.shared.pending;if(_i!==null){if(zn!==null){var As=zn.next;zn.next=_i.next,_i.next=As}zn=_i,nn.shared.pending=null,As=Gt.alternate,As!==null&&(As=As.updateQueue,As!==null&&(As.baseQueue=_i))}if(zn!==null){As=zn.next;var ps=nn.baseState,xo=0,Pu=null,Bu=null,_f=null;if(As!==null){var zp=As;do{if(_i=zp.expirationTime,_i<Fr){var s0={expirationTime:zp.expirationTime,suspenseConfig:zp.suspenseConfig,tag:zp.tag,payload:zp.payload,callback:zp.callback,next:null};_f===null?(Bu=_f=s0,Pu=ps):_f=_f.next=s0,_i>xo&&(xo=_i)}else{_f!==null&&(_f=_f.next={expirationTime:1073741823,suspenseConfig:zp.suspenseConfig,tag:zp.tag,payload:zp.payload,callback:zp.callback,next:null}),fT(_i,zp.suspenseConfig);e:{var Xv=Gt,ho=zp;switch(_i=er,s0=hr,ho.tag){case 1:if(Xv=ho.payload,typeof Xv=="function"){ps=Xv.call(s0,ps,_i);break e}ps=Xv;break e;case 3:Xv.effectTag=Xv.effectTag&-4097|64;case 0:if(Xv=ho.payload,_i=typeof Xv=="function"?Xv.call(s0,ps,_i):Xv,_i==null)break e;ps=_e({},ps,_i);break e;case 2:Ev=!0}}zp.callback!==null&&(Gt.effectTag|=32,_i=nn.effects,_i===null?nn.effects=[zp]:_i.push(zp))}if(zp=zp.next,zp===null||zp===As){if(_i=nn.shared.pending,_i===null)break;zp=zn.next=_i.next,_i.next=As,nn.baseQueue=zn=_i,nn.shared.pending=null}}while(!0)}_f===null?Pu=ps:_f.next=Bu,nn.baseState=Pu,nn.baseQueue=_f,BS(xo),Gt.expirationTime=xo,Gt.memoizedState=ps}}function W0(Gt,er,hr){if(Gt=er.effects,er.effects=null,Gt!==null)for(er=0;er<Gt.length;er++){var Fr=Gt[er],nn=Fr.callback;if(nn!==null){if(Fr.callback=null,Fr=nn,nn=hr,typeof Fr!="function")throw Error(rt(191,Fr));Fr.call(nn)}}}var O1=kn.ReactCurrentBatchConfig,q1=new et.Component().refs;function Py(Gt,er,hr,Fr){er=Gt.memoizedState,hr=hr(Fr,er),hr=hr==null?er:_e({},er,hr),Gt.memoizedState=hr,Gt.expirationTime===0&&(Gt.updateQueue.baseState=hr)}var d_={isMounted:function(Gt){return(Gt=Gt._reactInternalFiber)?ls(Gt)===Gt:!1},enqueueSetState:function(Gt,er,hr){Gt=Gt._reactInternalFiber;var Fr=ny(),nn=O1.suspense;Fr=ym(Fr,Gt,nn),nn=t0(Fr,nn),nn.payload=er,hr!=null&&(nn.callback=hr),Xn(Gt,nn),hm(Gt,Fr)},enqueueReplaceState:function(Gt,er,hr){Gt=Gt._reactInternalFiber;var Fr=ny(),nn=O1.suspense;Fr=ym(Fr,Gt,nn),nn=t0(Fr,nn),nn.tag=1,nn.payload=er,hr!=null&&(nn.callback=hr),Xn(Gt,nn),hm(Gt,Fr)},enqueueForceUpdate:function(Gt,er){Gt=Gt._reactInternalFiber;var hr=ny(),Fr=O1.suspense;hr=ym(hr,Gt,Fr),Fr=t0(hr,Fr),Fr.tag=2,er!=null&&(Fr.callback=er),Xn(Gt,Fr),hm(Gt,hr)}};function hx(Gt,er,hr,Fr,nn,zn,_i){return Gt=Gt.stateNode,typeof Gt.shouldComponentUpdate=="function"?Gt.shouldComponentUpdate(Fr,zn,_i):er.prototype&&er.prototype.isPureReactComponent?!yp(hr,Fr)||!yp(nn,zn):!0}function uw(Gt,er,hr){var Fr=!1,nn=Hv,zn=er.contextType;return typeof zn=="object"&&zn!==null?zn=Hy(zn):(nn=Sv(er)?V0:vm.current,Fr=er.contextTypes,zn=(Fr=Fr!=null)?Ov(Gt,nn):Hv),er=new er(hr,zn),Gt.memoizedState=er.state!==null&&er.state!==void 0?er.state:null,er.updater=d_,Gt.stateNode=er,er._reactInternalFiber=Gt,Fr&&(Gt=Gt.stateNode,Gt.__reactInternalMemoizedUnmaskedChildContext=nn,Gt.__reactInternalMemoizedMaskedChildContext=zn),er}function $x(Gt,er,hr,Fr){Gt=er.state,typeof er.componentWillReceiveProps=="function"&&er.componentWillReceiveProps(hr,Fr),typeof er.UNSAFE_componentWillReceiveProps=="function"&&er.UNSAFE_componentWillReceiveProps(hr,Fr),er.state!==Gt&&d_.enqueueReplaceState(er,er.state,null)}function h_(Gt,er,hr,Fr){var nn=Gt.stateNode;nn.props=hr,nn.state=Gt.memoizedState,nn.refs=q1,Ry(Gt);var zn=er.contextType;typeof zn=="object"&&zn!==null?nn.context=Hy(zn):(zn=Sv(er)?V0:vm.current,nn.context=Ov(Gt,zn)),k1(Gt,hr,nn,Fr),nn.state=Gt.memoizedState,zn=er.getDerivedStateFromProps,typeof zn=="function"&&(Py(Gt,er,zn,hr),nn.state=Gt.memoizedState),typeof er.getDerivedStateFromProps=="function"||typeof nn.getSnapshotBeforeUpdate=="function"||typeof nn.UNSAFE_componentWillMount!="function"&&typeof nn.componentWillMount!="function"||(er=nn.state,typeof nn.componentWillMount=="function"&&nn.componentWillMount(),typeof nn.UNSAFE_componentWillMount=="function"&&nn.UNSAFE_componentWillMount(),er!==nn.state&&d_.enqueueReplaceState(nn,nn.state,null),k1(Gt,hr,nn,Fr),nn.state=Gt.memoizedState),typeof nn.componentDidMount=="function"&&(Gt.effectTag|=4)}var my=Array.isArray;function Ux(Gt,er,hr){if(Gt=hr.ref,Gt!==null&&typeof Gt!="function"&&typeof Gt!="object"){if(hr._owner){if(hr=hr._owner,hr){if(hr.tag!==1)throw Error(rt(309));var Fr=hr.stateNode}if(!Fr)throw Error(rt(147,Gt));var nn=""+Gt;return er!==null&&er.ref!==null&&typeof er.ref=="function"&&er.ref._stringRef===nn?er.ref:(er=function(zn){var _i=Fr.refs;_i===q1&&(_i=Fr.refs={}),zn===null?delete _i[nn]:_i[nn]=zn},er._stringRef=nn,er)}if(typeof Gt!="string")throw Error(rt(284));if(!hr._owner)throw Error(rt(290,Gt))}return Gt}function L1(Gt,er){if(Gt.type!=="textarea")throw Error(rt(31,Object.prototype.toString.call(er)==="[object Object]"?"object with keys {"+Object.keys(er).join(", ")+"}":er,""))}function oE(Gt){function er(ho,Zs){if(Gt){var No=ho.lastEffect;No!==null?(No.nextEffect=Zs,ho.lastEffect=Zs):ho.firstEffect=ho.lastEffect=Zs,Zs.nextEffect=null,Zs.effectTag=8}}function hr(ho,Zs){if(!Gt)return null;for(;Zs!==null;)er(ho,Zs),Zs=Zs.sibling;return null}function Fr(ho,Zs){for(ho=new Map;Zs!==null;)Zs.key!==null?ho.set(Zs.key,Zs):ho.set(Zs.index,Zs),Zs=Zs.sibling;return ho}function nn(ho,Zs){return ho=Sx(ho,Zs),ho.index=0,ho.sibling=null,ho}function zn(ho,Zs,No){return ho.index=No,Gt?(No=ho.alternate,No!==null?(No=No.index,No<Zs?(ho.effectTag=2,Zs):No):(ho.effectTag=2,Zs)):Zs}function _i(ho){return Gt&&ho.alternate===null&&(ho.effectTag=2),ho}function As(ho,Zs,No,iu){return Zs===null||Zs.tag!==6?(Zs=Sw(No,ho.mode,iu),Zs.return=ho,Zs):(Zs=nn(Zs,No),Zs.return=ho,Zs)}function ps(ho,Zs,No,iu){return Zs!==null&&Zs.elementType===No.type?(iu=nn(Zs,No.props),iu.ref=Ux(ho,Zs,No),iu.return=ho,iu):(iu=xw(No.type,No.key,No.props,null,ho.mode,iu),iu.ref=Ux(ho,Zs,No),iu.return=ho,iu)}function xo(ho,Zs,No,iu){return Zs===null||Zs.tag!==4||Zs.stateNode.containerInfo!==No.containerInfo||Zs.stateNode.implementation!==No.implementation?(Zs=ww(No,ho.mode,iu),Zs.return=ho,Zs):(Zs=nn(Zs,No.children||[]),Zs.return=ho,Zs)}function Pu(ho,Zs,No,iu,wu){return Zs===null||Zs.tag!==7?(Zs=V_(No,ho.mode,iu,wu),Zs.return=ho,Zs):(Zs=nn(Zs,No),Zs.return=ho,Zs)}function Bu(ho,Zs,No){if(typeof Zs=="string"||typeof Zs=="number")return Zs=Sw(""+Zs,ho.mode,No),Zs.return=ho,Zs;if(typeof Zs=="object"&&Zs!==null){switch(Zs.$$typeof){case qs:return No=xw(Zs.type,Zs.key,Zs.props,null,ho.mode,No),No.ref=Ux(ho,null,Zs),No.return=ho,No;case Ln:return Zs=ww(Zs,ho.mode,No),Zs.return=ho,Zs}if(my(Zs)||Vn(Zs))return Zs=V_(Zs,ho.mode,No,null),Zs.return=ho,Zs;L1(ho,Zs)}return null}function _f(ho,Zs,No,iu){var wu=Zs!==null?Zs.key:null;if(typeof No=="string"||typeof No=="number")return wu!==null?null:As(ho,Zs,""+No,iu);if(typeof No=="object"&&No!==null){switch(No.$$typeof){case qs:return No.key===wu?No.type===Cn?Pu(ho,Zs,No.props.children,iu,wu):ps(ho,Zs,No,iu):null;case Ln:return No.key===wu?xo(ho,Zs,No,iu):null}if(my(No)||Vn(No))return wu!==null?null:Pu(ho,Zs,No,iu,null);L1(ho,No)}return null}function zp(ho,Zs,No,iu,wu){if(typeof iu=="string"||typeof iu=="number")return ho=ho.get(No)||null,As(Zs,ho,""+iu,wu);if(typeof iu=="object"&&iu!==null){switch(iu.$$typeof){case qs:return ho=ho.get(iu.key===null?No:iu.key)||null,iu.type===Cn?Pu(Zs,ho,iu.props.children,wu,iu.key):ps(Zs,ho,iu,wu);case Ln:return ho=ho.get(iu.key===null?No:iu.key)||null,xo(Zs,ho,iu,wu)}if(my(iu)||Vn(iu))return ho=ho.get(No)||null,Pu(Zs,ho,iu,wu,null);L1(Zs,iu)}return null}function s0(ho,Zs,No,iu){for(var wu=null,ju=null,ml=Zs,Mp=Zs=0,Cm=null;ml!==null&&Mp<No.length;Mp++){ml.index>Mp?(Cm=ml,ml=null):Cm=ml.sibling;var Wl=_f(ho,ml,No[Mp],iu);if(Wl===null){ml===null&&(ml=Cm);break}Gt&&ml&&Wl.alternate===null&&er(ho,ml),Zs=zn(Wl,Zs,Mp),ju===null?wu=Wl:ju.sibling=Wl,ju=Wl,ml=Cm}if(Mp===No.length)return hr(ho,ml),wu;if(ml===null){for(;Mp<No.length;Mp++)ml=Bu(ho,No[Mp],iu),ml!==null&&(Zs=zn(ml,Zs,Mp),ju===null?wu=ml:ju.sibling=ml,ju=ml);return wu}for(ml=Fr(ho,ml);Mp<No.length;Mp++)Cm=zp(ml,ho,Mp,No[Mp],iu),Cm!==null&&(Gt&&Cm.alternate!==null&&ml.delete(Cm.key===null?Mp:Cm.key),Zs=zn(Cm,Zs,Mp),ju===null?wu=Cm:ju.sibling=Cm,ju=Cm);return Gt&&ml.forEach(function(x1){return er(ho,x1)}),wu}function Xv(ho,Zs,No,iu){var wu=Vn(No);if(typeof wu!="function")throw Error(rt(150));if(No=wu.call(No),No==null)throw Error(rt(151));for(var ju=wu=null,ml=Zs,Mp=Zs=0,Cm=null,Wl=No.next();ml!==null&&!Wl.done;Mp++,Wl=No.next()){ml.index>Mp?(Cm=ml,ml=null):Cm=ml.sibling;var x1=_f(ho,ml,Wl.value,iu);if(x1===null){ml===null&&(ml=Cm);break}Gt&&ml&&x1.alternate===null&&er(ho,ml),Zs=zn(x1,Zs,Mp),ju===null?wu=x1:ju.sibling=x1,ju=x1,ml=Cm}if(Wl.done)return hr(ho,ml),wu;if(ml===null){for(;!Wl.done;Mp++,Wl=No.next())Wl=Bu(ho,Wl.value,iu),Wl!==null&&(Zs=zn(Wl,Zs,Mp),ju===null?wu=Wl:ju.sibling=Wl,ju=Wl);return wu}for(ml=Fr(ho,ml);!Wl.done;Mp++,Wl=No.next())Wl=zp(ml,ho,Mp,Wl.value,iu),Wl!==null&&(Gt&&Wl.alternate!==null&&ml.delete(Wl.key===null?Mp:Wl.key),Zs=zn(Wl,Zs,Mp),ju===null?wu=Wl:ju.sibling=Wl,ju=Wl);return Gt&&ml.forEach(function(EE){return er(ho,EE)}),wu}return function(ho,Zs,No,iu){var wu=typeof No=="object"&&No!==null&&No.type===Cn&&No.key===null;wu&&(No=No.props.children);var ju=typeof No=="object"&&No!==null;if(ju)switch(No.$$typeof){case qs:e:{for(ju=No.key,wu=Zs;wu!==null;){if(wu.key===ju){switch(wu.tag){case 7:if(No.type===Cn){hr(ho,wu.sibling),Zs=nn(wu,No.props.children),Zs.return=ho,ho=Zs;break e}break;default:if(wu.elementType===No.type){hr(ho,wu.sibling),Zs=nn(wu,No.props),Zs.ref=Ux(ho,wu,No),Zs.return=ho,ho=Zs;break e}}hr(ho,wu);break}else er(ho,wu);wu=wu.sibling}No.type===Cn?(Zs=V_(No.props.children,ho.mode,iu,No.key),Zs.return=ho,ho=Zs):(iu=xw(No.type,No.key,No.props,null,ho.mode,iu),iu.ref=Ux(ho,Zs,No),iu.return=ho,ho=iu)}return _i(ho);case Ln:e:{for(wu=No.key;Zs!==null;){if(Zs.key===wu)if(Zs.tag===4&&Zs.stateNode.containerInfo===No.containerInfo&&Zs.stateNode.implementation===No.implementation){hr(ho,Zs.sibling),Zs=nn(Zs,No.children||[]),Zs.return=ho,ho=Zs;break e}else{hr(ho,Zs);break}else er(ho,Zs);Zs=Zs.sibling}Zs=ww(No,ho.mode,iu),Zs.return=ho,ho=Zs}return _i(ho)}if(typeof No=="string"||typeof No=="number")return No=""+No,Zs!==null&&Zs.tag===6?(hr(ho,Zs.sibling),Zs=nn(Zs,No),Zs.return=ho,ho=Zs):(hr(ho,Zs),Zs=Sw(No,ho.mode,iu),Zs.return=ho,ho=Zs),_i(ho);if(my(No))return s0(ho,Zs,No,iu);if(Vn(No))return Xv(ho,Zs,No,iu);if(ju&&L1(ho,No),typeof No>"u"&&!wu)switch(ho.tag){case 1:case 0:throw ho=ho.type,Error(rt(152,ho.displayName||ho.name||"Component"))}return hr(ho,Zs)}}var f_=oE(!0),jm=oE(!1),X0={},p_={current:X0},xp={current:X0},m_={current:X0};function g_(Gt){if(Gt===X0)throw Error(rt(174));return Gt}function r0(Gt,er){switch(Tp(m_,er),Tp(xp,Gt),Tp(p_,X0),Gt=er.nodeType,Gt){case 9:case 11:er=(er=er.documentElement)?er.namespaceURI:Gu(null,"");break;default:Gt=Gt===8?er.parentNode:er,er=Gt.namespaceURI||null,Gt=Gt.tagName,er=Gu(er,Gt)}yl(p_),Tp(p_,er)}function q_(){yl(p_),yl(xp),yl(m_)}function Av(Gt){g_(m_.current);var er=g_(p_.current),hr=Gu(er,Gt.type);er!==hr&&(Tp(xp,Gt),Tp(p_,hr))}function v_(Gt){xp.current===Gt&&(yl(p_),yl(xp))}var Km={current:0};function F1(Gt){for(var er=Gt;er!==null;){if(er.tag===13){var hr=er.memoizedState;if(hr!==null&&(hr=hr.dehydrated,hr===null||hr.data===yv||hr.data===_l))return er}else if(er.tag===19&&er.memoizedProps.revealOrder!==void 0){if((er.effectTag&64)!==0)return er}else if(er.child!==null){er.child.return=er,er=er.child;continue}if(er===Gt)break;for(;er.sibling===null;){if(er.return===null||er.return===Gt)return null;er=er.return}er.sibling.return=er.return,er=er.sibling}return null}function TS(Gt,er){return{responder:Gt,props:er}}var E0=kn.ReactCurrentDispatcher,A0=kn.ReactCurrentBatchConfig,C0=0,Em=null,Ny=null,ty=null,a1=!1;function gy(){throw Error(rt(321))}function lw(Gt,er){if(er===null)return!1;for(var hr=0;hr<er.length&&hr<Gt.length;hr++)if(!Iy(Gt[hr],er[hr]))return!1;return!0}function ES(Gt,er,hr,Fr,nn,zn){if(C0=zn,Em=er,er.memoizedState=null,er.updateQueue=null,er.expirationTime=0,E0.current=Gt===null||Gt.memoizedState===null?$m:Vl,Gt=hr(Fr,nn),er.expirationTime===C0){zn=0;do{if(er.expirationTime=0,!(25>zn))throw Error(rt(301));zn+=1,ty=Ny=null,er.updateQueue=null,E0.current=Y0,Gt=hr(Fr,nn)}while(er.expirationTime===C0)}if(E0.current=d1,er=Ny!==null&&Ny.next!==null,C0=0,ty=Ny=Em=null,a1=!1,er)throw Error(rt(300));return Gt}function s1(){var Gt={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ty===null?Em.memoizedState=ty=Gt:ty=ty.next=Gt,ty}function o1(){if(Ny===null){var Gt=Em.alternate;Gt=Gt!==null?Gt.memoizedState:null}else Gt=Ny.next;var er=ty===null?Em.memoizedState:ty.next;if(er!==null)ty=er,Ny=Gt;else{if(Gt===null)throw Error(rt(310));Ny=Gt,Gt={memoizedState:Ny.memoizedState,baseState:Ny.baseState,baseQueue:Ny.baseQueue,queue:Ny.queue,next:null},ty===null?Em.memoizedState=ty=Gt:ty=ty.next=Gt}return ty}function B1(Gt,er){return typeof er=="function"?er(Gt):er}function fx(Gt){var er=o1(),hr=er.queue;if(hr===null)throw Error(rt(311));hr.lastRenderedReducer=Gt;var Fr=Ny,nn=Fr.baseQueue,zn=hr.pending;if(zn!==null){if(nn!==null){var _i=nn.next;nn.next=zn.next,zn.next=_i}Fr.baseQueue=nn=zn,hr.pending=null}if(nn!==null){nn=nn.next,Fr=Fr.baseState;var As=_i=zn=null,ps=nn;do{var xo=ps.expirationTime;if(xo<C0){var Pu={expirationTime:ps.expirationTime,suspenseConfig:ps.suspenseConfig,action:ps.action,eagerReducer:ps.eagerReducer,eagerState:ps.eagerState,next:null};As===null?(_i=As=Pu,zn=Fr):As=As.next=Pu,xo>Em.expirationTime&&(Em.expirationTime=xo,BS(xo))}else As!==null&&(As=As.next={expirationTime:1073741823,suspenseConfig:ps.suspenseConfig,action:ps.action,eagerReducer:ps.eagerReducer,eagerState:ps.eagerState,next:null}),fT(xo,ps.suspenseConfig),Fr=ps.eagerReducer===Gt?ps.eagerState:Gt(Fr,ps.action);ps=ps.next}while(ps!==null&&ps!==nn);As===null?zn=Fr:As.next=_i,Iy(Fr,er.memoizedState)||(yy=!0),er.memoizedState=Fr,er.baseState=zn,er.baseQueue=As,hr.lastRenderedState=Fr}return[er.memoizedState,hr.dispatch]}function AS(Gt){var er=o1(),hr=er.queue;if(hr===null)throw Error(rt(311));hr.lastRenderedReducer=Gt;var Fr=hr.dispatch,nn=hr.pending,zn=er.memoizedState;if(nn!==null){hr.pending=null;var _i=nn=nn.next;do zn=Gt(zn,_i.action),_i=_i.next;while(_i!==nn);Iy(zn,er.memoizedState)||(yy=!0),er.memoizedState=zn,er.baseQueue===null&&(er.baseState=zn),hr.lastRenderedState=zn}return[zn,Fr]}function CS(Gt){var er=s1();return typeof Gt=="function"&&(Gt=Gt()),er.memoizedState=er.baseState=Gt,Gt=er.queue={pending:null,dispatch:null,lastRenderedReducer:B1,lastRenderedState:Gt},Gt=Gt.dispatch=hw.bind(null,Em,Gt),[er.memoizedState,Gt]}function dm(Gt,er,hr,Fr){return Gt={tag:Gt,create:er,destroy:hr,deps:Fr,next:null},er=Em.updateQueue,er===null?(er={lastEffect:null},Em.updateQueue=er,er.lastEffect=Gt.next=Gt):(hr=er.lastEffect,hr===null?er.lastEffect=Gt.next=Gt:(Fr=hr.next,hr.next=Gt,Gt.next=Fr,er.lastEffect=Gt)),Gt}function D0(){return o1().memoizedState}function cw(Gt,er,hr,Fr){var nn=s1();Em.effectTag|=Gt,nn.memoizedState=dm(1|er,hr,void 0,Fr===void 0?null:Fr)}function j1(Gt,er,hr,Fr){var nn=o1();Fr=Fr===void 0?null:Fr;var zn=void 0;if(Ny!==null){var _i=Ny.memoizedState;if(zn=_i.destroy,Fr!==null&&lw(Fr,_i.deps)){dm(er,hr,zn,Fr);return}}Em.effectTag|=Gt,nn.memoizedState=dm(1|er,hr,zn,Fr)}function Am(Gt,er){return cw(516,4,Gt,er)}function vy(Gt,er){return j1(516,4,Gt,er)}function u1(Gt,er){return j1(4,2,Gt,er)}function dw(Gt,er){if(typeof er=="function")return Gt=Gt(),er(Gt),function(){er(null)};if(er!=null)return Gt=Gt(),er.current=Gt,function(){er.current=null}}function zx(Gt,er,hr){return hr=hr!=null?hr.concat([Gt]):null,j1(4,2,dw.bind(null,er,Gt),hr)}function cT(){}function l1(Gt,er){return s1().memoizedState=[Gt,er===void 0?null:er],Gt}function c1(Gt,er){var hr=o1();er=er===void 0?null:er;var Fr=hr.memoizedState;return Fr!==null&&er!==null&&lw(er,Fr[1])?Fr[0]:(hr.memoizedState=[Gt,er],Gt)}function ky(Gt,er){var hr=o1();er=er===void 0?null:er;var Fr=hr.memoizedState;return Fr!==null&&er!==null&&lw(er,Fr[1])?Fr[0]:(Gt=Gt(),hr.memoizedState=[Gt,er],Gt)}function $1(Gt,er,hr){var Fr=Fm();qv(98>Fr?98:Fr,function(){Gt(!0)}),qv(97<Fr?97:Fr,function(){var nn=A0.suspense;A0.suspense=er===void 0?null:er;try{Gt(!1),hr()}finally{A0.suspense=nn}})}function hw(Gt,er,hr){var Fr=ny(),nn=O1.suspense;Fr=ym(Fr,Gt,nn),nn={expirationTime:Fr,suspenseConfig:nn,action:hr,eagerReducer:null,eagerState:null,next:null};var zn=er.pending;if(zn===null?nn.next=nn:(nn.next=zn.next,zn.next=nn),er.pending=nn,zn=Gt.alternate,Gt===Em||zn!==null&&zn===Em)a1=!0,nn.expirationTime=C0,Em.expirationTime=C0;else{if(Gt.expirationTime===0&&(zn===null||zn.expirationTime===0)&&(zn=er.lastRenderedReducer,zn!==null))try{var _i=er.lastRenderedState,As=zn(_i,hr);if(nn.eagerReducer=zn,nn.eagerState=As,Iy(As,_i))return}catch{}finally{}hm(Gt,Fr)}}var d1={readContext:Hy,useCallback:gy,useContext:gy,useEffect:gy,useImperativeHandle:gy,useLayoutEffect:gy,useMemo:gy,useReducer:gy,useRef:gy,useState:gy,useDebugValue:gy,useResponder:gy,useDeferredValue:gy,useTransition:gy},$m={readContext:Hy,useCallback:l1,useContext:Hy,useEffect:Am,useImperativeHandle:function(Gt,er,hr){return hr=hr!=null?hr.concat([Gt]):null,cw(4,2,dw.bind(null,er,Gt),hr)},useLayoutEffect:function(Gt,er){return cw(4,2,Gt,er)},useMemo:function(Gt,er){var hr=s1();return er=er===void 0?null:er,Gt=Gt(),hr.memoizedState=[Gt,er],Gt},useReducer:function(Gt,er,hr){var Fr=s1();return er=hr!==void 0?hr(er):er,Fr.memoizedState=Fr.baseState=er,Gt=Fr.queue={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:er},Gt=Gt.dispatch=hw.bind(null,Em,Gt),[Fr.memoizedState,Gt]},useRef:function(Gt){var er=s1();return Gt={current:Gt},er.memoizedState=Gt},useState:CS,useDebugValue:cT,useResponder:TS,useDeferredValue:function(Gt,er){var hr=CS(Gt),Fr=hr[0],nn=hr[1];return Am(function(){var zn=A0.suspense;A0.suspense=er===void 0?null:er;try{nn(Gt)}finally{A0.suspense=zn}},[Gt,er]),Fr},useTransition:function(Gt){var er=CS(!1),hr=er[0];return er=er[1],[l1($1.bind(null,er,Gt),[er,Gt]),hr]}},Vl={readContext:Hy,useCallback:c1,useContext:Hy,useEffect:vy,useImperativeHandle:zx,useLayoutEffect:u1,useMemo:ky,useReducer:fx,useRef:D0,useState:function(){return fx(B1)},useDebugValue:cT,useResponder:TS,useDeferredValue:function(Gt,er){var hr=fx(B1),Fr=hr[0],nn=hr[1];return vy(function(){var zn=A0.suspense;A0.suspense=er===void 0?null:er;try{nn(Gt)}finally{A0.suspense=zn}},[Gt,er]),Fr},useTransition:function(Gt){var er=fx(B1),hr=er[0];return er=er[1],[c1($1.bind(null,er,Gt),[er,Gt]),hr]}},Y0={readContext:Hy,useCallback:c1,useContext:Hy,useEffect:vy,useImperativeHandle:zx,useLayoutEffect:u1,useMemo:ky,useReducer:AS,useRef:D0,useState:function(){return AS(B1)},useDebugValue:cT,useResponder:TS,useDeferredValue:function(Gt,er){var hr=AS(B1),Fr=hr[0],nn=hr[1];return vy(function(){var zn=A0.suspense;A0.suspense=er===void 0?null:er;try{nn(Gt)}finally{A0.suspense=zn}},[Gt,er]),Fr},useTransition:function(Gt){var er=AS(B1),hr=er[0];return er=er[1],[c1($1.bind(null,er,Gt),[er,Gt]),hr]}},Cv=null,Wv=null,n0=!1;function uE(Gt,er){var hr=b_(5,null,null,0);hr.elementType="DELETED",hr.type="DELETED",hr.stateNode=er,hr.return=Gt,hr.effectTag=8,Gt.lastEffect!==null?(Gt.lastEffect.nextEffect=hr,Gt.lastEffect=hr):Gt.firstEffect=Gt.lastEffect=hr}function fw(Gt,er){switch(Gt.tag){case 5:var hr=Gt.type;return er=er.nodeType!==1||hr.toLowerCase()!==er.nodeName.toLowerCase()?null:er,er!==null?(Gt.stateNode=er,!0):!1;case 6:return er=Gt.pendingProps===""||er.nodeType!==3?null:er,er!==null?(Gt.stateNode=er,!0):!1;case 13:return!1;default:return!1}}function ov(Gt){if(n0){var er=Wv;if(er){var hr=er;if(!fw(Gt,er)){if(er=bv(hr.nextSibling),!er||!fw(Gt,er)){Gt.effectTag=Gt.effectTag&-1025|2,n0=!1,Cv=Gt;return}uE(Cv,hr)}Cv=Gt,Wv=bv(er.firstChild)}else Gt.effectTag=Gt.effectTag&-1025|2,n0=!1,Cv=Gt}}function Q0(Gt){for(Gt=Gt.return;Gt!==null&&Gt.tag!==5&&Gt.tag!==3&&Gt.tag!==13;)Gt=Gt.return;Cv=Gt}function h1(Gt){if(Gt!==Cv)return!1;if(!n0)return Q0(Gt),n0=!0,!1;var er=Gt.type;if(Gt.tag!==5||er!=="head"&&er!=="body"&&!np(er,Gt.memoizedProps))for(er=Wv;er;)uE(Gt,er),er=bv(er.nextSibling);if(Q0(Gt),Gt.tag===13){if(Gt=Gt.memoizedState,Gt=Gt!==null?Gt.dehydrated:null,!Gt)throw Error(rt(317));e:{for(Gt=Gt.nextSibling,er=0;Gt;){if(Gt.nodeType===8){var hr=Gt.data;if(hr===Tm){if(er===0){Wv=bv(Gt.nextSibling);break e}er--}else hr!==Fp&&hr!==_l&&hr!==yv||er++}Gt=Gt.nextSibling}Wv=null}}else Wv=Cv?bv(Gt.stateNode.nextSibling):null;return!0}function Oy(){Wv=Cv=null,n0=!1}var DS=kn.ReactCurrentOwner,yy=!1;function sm(Gt,er,hr,Fr){er.child=Gt===null?jm(er,null,hr,Fr):f_(er,Gt.child,hr,Fr)}function L_(Gt,er,hr,Fr,nn){hr=hr.render;var zn=er.ref;return O_(er,nn),Fr=ES(Gt,er,hr,Fr,zn,nn),Gt!==null&&!yy?(er.updateQueue=Gt.updateQueue,er.effectTag&=-517,Gt.expirationTime<=nn&&(Gt.expirationTime=0),j_(Gt,er,nn)):(er.effectTag|=1,sm(Gt,er,Fr,nn),er.child)}function U1(Gt,er,hr,Fr,nn,zn){if(Gt===null){var _i=hr.type;return typeof _i=="function"&&!$S(_i)&&_i.defaultProps===void 0&&hr.compare===null&&hr.defaultProps===void 0?(er.tag=15,er.type=_i,Wy(Gt,er,_i,Fr,nn,zn)):(Gt=xw(hr.type,null,Fr,null,er.mode,zn),Gt.ref=er.ref,Gt.return=er,er.child=Gt)}return _i=Gt.child,nn<zn&&(nn=_i.memoizedProps,hr=hr.compare,hr=hr!==null?hr:yp,hr(nn,Fr)&&Gt.ref===er.ref)?j_(Gt,er,zn):(er.effectTag|=1,Gt=Sx(_i,Fr),Gt.ref=er.ref,Gt.return=er,er.child=Gt)}function Wy(Gt,er,hr,Fr,nn,zn){return Gt!==null&&yp(Gt.memoizedProps,Fr)&&Gt.ref===er.ref&&(yy=!1,nn<zn)?(er.expirationTime=Gt.expirationTime,j_(Gt,er,zn)):MS(Gt,er,hr,Fr,zn)}function F_(Gt,er){var hr=er.ref;(Gt===null&&hr!==null||Gt!==null&&Gt.ref!==hr)&&(er.effectTag|=128)}function MS(Gt,er,hr,Fr,nn){var zn=Sv(hr)?V0:vm.current;return zn=Ov(er,zn),O_(er,nn),hr=ES(Gt,er,hr,Fr,zn,nn),Gt!==null&&!yy?(er.updateQueue=Gt.updateQueue,er.effectTag&=-517,Gt.expirationTime<=nn&&(Gt.expirationTime=0),j_(Gt,er,nn)):(er.effectTag|=1,sm(Gt,er,hr,nn),er.child)}function y_(Gt,er,hr,Fr,nn){if(Sv(hr)){var zn=!0;Tr(er)}else zn=!1;if(O_(er,nn),er.stateNode===null)Gt!==null&&(Gt.alternate=null,er.alternate=null,er.effectTag|=2),uw(er,hr,Fr),h_(er,hr,Fr,nn),Fr=!0;else if(Gt===null){var _i=er.stateNode,As=er.memoizedProps;_i.props=As;var ps=_i.context,xo=hr.contextType;typeof xo=="object"&&xo!==null?xo=Hy(xo):(xo=Sv(hr)?V0:vm.current,xo=Ov(er,xo));var Pu=hr.getDerivedStateFromProps,Bu=typeof Pu=="function"||typeof _i.getSnapshotBeforeUpdate=="function";Bu||typeof _i.UNSAFE_componentWillReceiveProps!="function"&&typeof _i.componentWillReceiveProps!="function"||(As!==Fr||ps!==xo)&&$x(er,_i,Fr,xo),Ev=!1;var _f=er.memoizedState;_i.state=_f,k1(er,Fr,_i,nn),ps=er.memoizedState,As!==Fr||_f!==ps||Qm.current||Ev?(typeof Pu=="function"&&(Py(er,hr,Pu,Fr),ps=er.memoizedState),(As=Ev||hx(er,hr,As,Fr,_f,ps,xo))?(Bu||typeof _i.UNSAFE_componentWillMount!="function"&&typeof _i.componentWillMount!="function"||(typeof _i.componentWillMount=="function"&&_i.componentWillMount(),typeof _i.UNSAFE_componentWillMount=="function"&&_i.UNSAFE_componentWillMount()),typeof _i.componentDidMount=="function"&&(er.effectTag|=4)):(typeof _i.componentDidMount=="function"&&(er.effectTag|=4),er.memoizedProps=Fr,er.memoizedState=ps),_i.props=Fr,_i.state=ps,_i.context=xo,Fr=As):(typeof _i.componentDidMount=="function"&&(er.effectTag|=4),Fr=!1)}else _i=er.stateNode,fl(Gt,er),As=er.memoizedProps,_i.props=er.type===er.elementType?As:am(er.type,As),ps=_i.context,xo=hr.contextType,typeof xo=="object"&&xo!==null?xo=Hy(xo):(xo=Sv(hr)?V0:vm.current,xo=Ov(er,xo)),Pu=hr.getDerivedStateFromProps,(Bu=typeof Pu=="function"||typeof _i.getSnapshotBeforeUpdate=="function")||typeof _i.UNSAFE_componentWillReceiveProps!="function"&&typeof _i.componentWillReceiveProps!="function"||(As!==Fr||ps!==xo)&&$x(er,_i,Fr,xo),Ev=!1,ps=er.memoizedState,_i.state=ps,k1(er,Fr,_i,nn),_f=er.memoizedState,As!==Fr||ps!==_f||Qm.current||Ev?(typeof Pu=="function"&&(Py(er,hr,Pu,Fr),_f=er.memoizedState),(Pu=Ev||hx(er,hr,As,Fr,ps,_f,xo))?(Bu||typeof _i.UNSAFE_componentWillUpdate!="function"&&typeof _i.componentWillUpdate!="function"||(typeof _i.componentWillUpdate=="function"&&_i.componentWillUpdate(Fr,_f,xo),typeof _i.UNSAFE_componentWillUpdate=="function"&&_i.UNSAFE_componentWillUpdate(Fr,_f,xo)),typeof _i.componentDidUpdate=="function"&&(er.effectTag|=4),typeof _i.getSnapshotBeforeUpdate=="function"&&(er.effectTag|=256)):(typeof _i.componentDidUpdate!="function"||As===Gt.memoizedProps&&ps===Gt.memoizedState||(er.effectTag|=4),typeof _i.getSnapshotBeforeUpdate!="function"||As===Gt.memoizedProps&&ps===Gt.memoizedState||(er.effectTag|=256),er.memoizedProps=Fr,er.memoizedState=_f),_i.props=Fr,_i.state=_f,_i.context=xo,Fr=Pu):(typeof _i.componentDidUpdate!="function"||As===Gt.memoizedProps&&ps===Gt.memoizedState||(er.effectTag|=4),typeof _i.getSnapshotBeforeUpdate!="function"||As===Gt.memoizedProps&&ps===Gt.memoizedState||(er.effectTag|=256),Fr=!1);return Gx(Gt,er,hr,Fr,zn,nn)}function Gx(Gt,er,hr,Fr,nn,zn){F_(Gt,er);var _i=(er.effectTag&64)!==0;if(!Fr&&!_i)return nn&&br(er,hr,!1),j_(Gt,er,zn);Fr=er.stateNode,DS.current=er;var As=_i&&typeof hr.getDerivedStateFromError!="function"?null:Fr.render();return er.effectTag|=1,Gt!==null&&_i?(er.child=f_(er,Gt.child,null,zn),er.child=f_(er,null,As,zn)):sm(Gt,er,As,zn),er.memoizedState=Fr.state,nn&&br(er,hr,!0),er.child}function Vx(Gt){var er=Gt.stateNode;er.pendingContext?ey(Gt,er.pendingContext,er.pendingContext!==er.context):er.context&&ey(Gt,er.context,!1),r0(Gt,er.containerInfo)}var mx={dehydrated:null,retryTime:0};function qy(Gt,er,hr){var Fr=er.mode,nn=er.pendingProps,zn=Km.current,_i=!1,As;if((As=(er.effectTag&64)!==0)||(As=(zn&2)!==0&&(Gt===null||Gt.memoizedState!==null)),As?(_i=!0,er.effectTag&=-65):Gt!==null&&Gt.memoizedState===null||nn.fallback===void 0||nn.unstable_avoidThisFallback===!0||(zn|=1),Tp(Km,zn&1),Gt===null){if(nn.fallback!==void 0&&ov(er),_i){if(_i=nn.fallback,nn=V_(null,Fr,0,null),nn.return=er,(er.mode&2)===0)for(Gt=er.memoizedState!==null?er.child.child:er.child,nn.child=Gt;Gt!==null;)Gt.return=nn,Gt=Gt.sibling;return hr=V_(_i,Fr,hr,null),hr.return=er,nn.sibling=hr,er.memoizedState=mx,er.child=nn,hr}return Fr=nn.children,er.memoizedState=null,er.child=jm(er,null,Fr,hr)}if(Gt.memoizedState!==null){if(Gt=Gt.child,Fr=Gt.sibling,_i){if(nn=nn.fallback,hr=Sx(Gt,Gt.pendingProps),hr.return=er,(er.mode&2)===0&&(_i=er.memoizedState!==null?er.child.child:er.child,_i!==Gt.child))for(hr.child=_i;_i!==null;)_i.return=hr,_i=_i.sibling;return Fr=Sx(Fr,nn),Fr.return=er,hr.sibling=Fr,hr.childExpirationTime=0,er.memoizedState=mx,er.child=hr,Fr}return hr=f_(er,Gt.child,nn.children,hr),er.memoizedState=null,er.child=hr}if(Gt=Gt.child,_i){if(_i=nn.fallback,nn=V_(null,Fr,0,null),nn.return=er,nn.child=Gt,Gt!==null&&(Gt.return=nn),(er.mode&2)===0)for(Gt=er.memoizedState!==null?er.child.child:er.child,nn.child=Gt;Gt!==null;)Gt.return=nn,Gt=Gt.sibling;return hr=V_(_i,Fr,hr,null),hr.return=er,nn.sibling=hr,hr.effectTag|=2,nn.childExpirationTime=0,er.memoizedState=mx,er.child=nn,hr}return er.memoizedState=null,er.child=f_(er,Gt,nn.children,hr)}function Hx(Gt,er){Gt.expirationTime<er&&(Gt.expirationTime=er);var hr=Gt.alternate;hr!==null&&hr.expirationTime<er&&(hr.expirationTime=er),dx(Gt.return,er)}function B_(Gt,er,hr,Fr,nn,zn){var _i=Gt.memoizedState;_i===null?Gt.memoizedState={isBackwards:er,rendering:null,renderingStartTime:0,last:Fr,tail:hr,tailExpiration:0,tailMode:nn,lastEffect:zn}:(_i.isBackwards=er,_i.rendering=null,_i.renderingStartTime=0,_i.last=Fr,_i.tail=hr,_i.tailExpiration=0,_i.tailMode=nn,_i.lastEffect=zn)}function ry(Gt,er,hr){var Fr=er.pendingProps,nn=Fr.revealOrder,zn=Fr.tail;if(sm(Gt,er,Fr.children,hr),Fr=Km.current,(Fr&2)!==0)Fr=Fr&1|2,er.effectTag|=64;else{if(Gt!==null&&(Gt.effectTag&64)!==0)e:for(Gt=er.child;Gt!==null;){if(Gt.tag===13)Gt.memoizedState!==null&&Hx(Gt,hr);else if(Gt.tag===19)Hx(Gt,hr);else if(Gt.child!==null){Gt.child.return=Gt,Gt=Gt.child;continue}if(Gt===er)break e;for(;Gt.sibling===null;){if(Gt.return===null||Gt.return===er)break e;Gt=Gt.return}Gt.sibling.return=Gt.return,Gt=Gt.sibling}Fr&=1}if(Tp(Km,Fr),(er.mode&2)===0)er.memoizedState=null;else switch(nn){case"forwards":for(hr=er.child,nn=null;hr!==null;)Gt=hr.alternate,Gt!==null&&F1(Gt)===null&&(nn=hr),hr=hr.sibling;hr=nn,hr===null?(nn=er.child,er.child=null):(nn=hr.sibling,hr.sibling=null),B_(er,!1,nn,hr,zn,er.lastEffect);break;case"backwards":for(hr=null,nn=er.child,er.child=null;nn!==null;){if(Gt=nn.alternate,Gt!==null&&F1(Gt)===null){er.child=nn;break}Gt=nn.sibling,nn.sibling=hr,hr=nn,nn=Gt}B_(er,!0,hr,null,zn,er.lastEffect);break;case"together":B_(er,!1,null,null,void 0,er.lastEffect);break;default:er.memoizedState=null}return er.child}function j_(Gt,er,hr){Gt!==null&&(er.dependencies=Gt.dependencies);var Fr=er.expirationTime;if(Fr!==0&&BS(Fr),er.childExpirationTime<hr)return null;if(Gt!==null&&er.child!==Gt.child)throw Error(rt(153));if(er.child!==null){for(Gt=er.child,hr=Sx(Gt,Gt.pendingProps),er.child=hr,hr.return=er;Gt.sibling!==null;)Gt=Gt.sibling,hr=hr.sibling=Sx(Gt,Gt.pendingProps),hr.return=er;hr.sibling=null}return er.child}var IS,RS,lE,pw;IS=function(Gt,er){for(var hr=er.child;hr!==null;){if(hr.tag===5||hr.tag===6)Gt.appendChild(hr.stateNode);else if(hr.tag!==4&&hr.child!==null){hr.child.return=hr,hr=hr.child;continue}if(hr===er)break;for(;hr.sibling===null;){if(hr.return===null||hr.return===er)return;hr=hr.return}hr.sibling.return=hr.return,hr=hr.sibling}},RS=function(){},lE=function(Gt,er,hr,Fr,nn){var zn=Gt.memoizedProps;if(zn!==Fr){var _i=er.stateNode;switch(g_(p_.current),Gt=null,hr){case"input":zn=In(_i,zn),Fr=In(_i,Fr),Gt=[];break;case"option":zn=Ro(_i,zn),Fr=Ro(_i,Fr),Gt=[];break;case"select":zn=_e({},zn,{value:void 0}),Fr=_e({},Fr,{value:void 0}),Gt=[];break;case"textarea":zn=du(_i,zn),Fr=du(_i,Fr),Gt=[];break;default:typeof zn.onClick!="function"&&typeof Fr.onClick=="function"&&(_i.onclick=tm)}Wm(hr,Fr);var As,ps;hr=null;for(As in zn)if(!Fr.hasOwnProperty(As)&&zn.hasOwnProperty(As)&&zn[As]!=null)if(As==="style")for(ps in _i=zn[As],_i)_i.hasOwnProperty(ps)&&(hr||(hr={}),hr[ps]="");else As!=="dangerouslySetInnerHTML"&&As!=="children"&&As!=="suppressContentEditableWarning"&&As!=="suppressHydrationWarning"&&As!=="autoFocus"&&(qt.hasOwnProperty(As)?Gt||(Gt=[]):(Gt=Gt||[]).push(As,null));for(As in Fr){var xo=Fr[As];if(_i=zn?.[As],Fr.hasOwnProperty(As)&&xo!==_i&&(xo!=null||_i!=null))if(As==="style")if(_i){for(ps in _i)!_i.hasOwnProperty(ps)||xo&&xo.hasOwnProperty(ps)||(hr||(hr={}),hr[ps]="");for(ps in xo)xo.hasOwnProperty(ps)&&_i[ps]!==xo[ps]&&(hr||(hr={}),hr[ps]=xo[ps])}else hr||(Gt||(Gt=[]),Gt.push(As,hr)),hr=xo;else As==="dangerouslySetInnerHTML"?(xo=xo?xo.__html:void 0,_i=_i?_i.__html:void 0,xo!=null&&_i!==xo&&(Gt=Gt||[]).push(As,xo)):As==="children"?_i===xo||typeof xo!="string"&&typeof xo!="number"||(Gt=Gt||[]).push(As,""+xo):As!=="suppressContentEditableWarning"&&As!=="suppressHydrationWarning"&&(qt.hasOwnProperty(As)?(xo!=null&&wm(nn,As),Gt||_i===xo||(Gt=[])):(Gt=Gt||[]).push(As,xo))}hr&&(Gt=Gt||[]).push("style",hr),nn=Gt,(er.updateQueue=nn)&&(er.effectTag|=4)}},pw=function(Gt,er,hr,Fr){hr!==Fr&&(er.effectTag|=4)};function gx(Gt,er){switch(Gt.tailMode){case"hidden":er=Gt.tail;for(var hr=null;er!==null;)er.alternate!==null&&(hr=er),er=er.sibling;hr===null?Gt.tail=null:hr.sibling=null;break;case"collapsed":hr=Gt.tail;for(var Fr=null;hr!==null;)hr.alternate!==null&&(Fr=hr),hr=hr.sibling;Fr===null?er||Gt.tail===null?Gt.tail=null:Gt.tail.sibling=null:Fr.sibling=null}}function mw(Gt,er,hr){var Fr=er.pendingProps;switch(er.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Sv(er.type)&&c_(),null;case 3:return q_(),yl(Qm),yl(vm),hr=er.stateNode,hr.pendingContext&&(hr.context=hr.pendingContext,hr.pendingContext=null),Gt!==null&&Gt.child!==null||!h1(er)||(er.effectTag|=4),RS(er),null;case 5:v_(er),hr=g_(m_.current);var nn=er.type;if(Gt!==null&&er.stateNode!=null)lE(Gt,er,nn,Fr,hr),Gt.ref!==er.ref&&(er.effectTag|=128);else{if(!Fr){if(er.stateNode===null)throw Error(rt(166));return null}if(Gt=g_(p_.current),h1(er)){Fr=er.stateNode,nn=er.type;var zn=er.memoizedProps;switch(Fr[nr]=er,Fr[dr]=zn,nn){case"iframe":case"object":case"embed":Xo("load",Fr);break;case"video":case"audio":for(Gt=0;Gt<vs.length;Gt++)Xo(vs[Gt],Fr);break;case"source":Xo("error",Fr);break;case"img":case"image":case"link":Xo("error",Fr),Xo("load",Fr);break;case"form":Xo("reset",Fr),Xo("submit",Fr);break;case"details":Xo("toggle",Fr);break;case"input":ds(Fr,zn),Xo("invalid",Fr),wm(hr,"onChange");break;case"select":Fr._wrapperState={wasMultiple:!!zn.multiple},Xo("invalid",Fr),wm(hr,"onChange");break;case"textarea":Iu(Fr,zn),Xo("invalid",Fr),wm(hr,"onChange")}Wm(nn,zn),Gt=null;for(var _i in zn)if(zn.hasOwnProperty(_i)){var As=zn[_i];_i==="children"?typeof As=="string"?Fr.textContent!==As&&(Gt=["children",As]):typeof As=="number"&&Fr.textContent!==""+As&&(Gt=["children",""+As]):qt.hasOwnProperty(_i)&&As!=null&&wm(hr,_i)}switch(nn){case"input":Bo(Fr),rn(Fr,zn,!0);break;case"textarea":Bo(Fr),Ko(Fr);break;case"select":case"option":break;default:typeof zn.onClick=="function"&&(Fr.onclick=tm)}hr=Gt,er.updateQueue=hr,hr!==null&&(er.effectTag|=4)}else{switch(_i=hr.nodeType===9?hr:hr.ownerDocument,Gt===Sm&&(Gt=gl(nn)),Gt===Sm?nn==="script"?(Gt=_i.createElement("div"),Gt.innerHTML="<script><\/script>",Gt=Gt.removeChild(Gt.firstChild)):typeof Fr.is=="string"?Gt=_i.createElement(nn,{is:Fr.is}):(Gt=_i.createElement(nn),nn==="select"&&(_i=Gt,Fr.multiple?_i.multiple=!0:Fr.size&&(_i.size=Fr.size))):Gt=_i.createElementNS(Gt,nn),Gt[nr]=er,Gt[dr]=Fr,IS(Gt,er,!1,!1),er.stateNode=Gt,_i=uy(nn,Fr),nn){case"iframe":case"object":case"embed":Xo("load",Gt),As=Fr;break;case"video":case"audio":for(As=0;As<vs.length;As++)Xo(vs[As],Gt);As=Fr;break;case"source":Xo("error",Gt),As=Fr;break;case"img":case"image":case"link":Xo("error",Gt),Xo("load",Gt),As=Fr;break;case"form":Xo("reset",Gt),Xo("submit",Gt),As=Fr;break;case"details":Xo("toggle",Gt),As=Fr;break;case"input":ds(Gt,Fr),As=In(Gt,Fr),Xo("invalid",Gt),wm(hr,"onChange");break;case"option":As=Ro(Gt,Fr);break;case"select":Gt._wrapperState={wasMultiple:!!Fr.multiple},As=_e({},Fr,{value:void 0}),Xo("invalid",Gt),wm(hr,"onChange");break;case"textarea":Iu(Gt,Fr),As=du(Gt,Fr),Xo("invalid",Gt),wm(hr,"onChange");break;default:As=Fr}Wm(nn,As);var ps=As;for(zn in ps)if(ps.hasOwnProperty(zn)){var xo=ps[zn];zn==="style"?Rv(Gt,xo):zn==="dangerouslySetInnerHTML"?(xo=xo?xo.__html:void 0,xo!=null&&Ku(Gt,xo)):zn==="children"?typeof xo=="string"?(nn!=="textarea"||xo!=="")&&uu(Gt,xo):typeof xo=="number"&&uu(Gt,""+xo):zn!=="suppressContentEditableWarning"&&zn!=="suppressHydrationWarning"&&zn!=="autoFocus"&&(qt.hasOwnProperty(zn)?xo!=null&&wm(hr,zn):xo!=null&&xn(Gt,zn,xo,_i))}switch(nn){case"input":Bo(Gt),rn(Gt,Fr,!1);break;case"textarea":Bo(Gt),Ko(Gt);break;case"option":Fr.value!=null&&Gt.setAttribute("value",""+Rs(Fr.value));break;case"select":Gt.multiple=!!Fr.multiple,hr=Fr.value,hr!=null?ru(Gt,!!Fr.multiple,hr,!1):Fr.defaultValue!=null&&ru(Gt,!!Fr.multiple,Fr.defaultValue,!0);break;default:typeof As.onClick=="function"&&(Gt.onclick=tm)}Xp(nn,Fr)&&(er.effectTag|=4)}er.ref!==null&&(er.effectTag|=128)}return null;case 6:if(Gt&&er.stateNode!=null)pw(Gt,er,Gt.memoizedProps,Fr);else{if(typeof Fr!="string"&&er.stateNode===null)throw Error(rt(166));hr=g_(m_.current),g_(p_.current),h1(er)?(hr=er.stateNode,Fr=er.memoizedProps,hr[nr]=er,hr.nodeValue!==Fr&&(er.effectTag|=4)):(hr=(hr.nodeType===9?hr:hr.ownerDocument).createTextNode(Fr),hr[nr]=er,er.stateNode=hr)}return null;case 13:return yl(Km),Fr=er.memoizedState,(er.effectTag&64)!==0?(er.expirationTime=hr,er):(hr=Fr!==null,Fr=!1,Gt===null?er.memoizedProps.fallback!==void 0&&h1(er):(nn=Gt.memoizedState,Fr=nn!==null,hr||nn===null||(nn=Gt.child.sibling,nn!==null&&(zn=er.firstEffect,zn!==null?(er.firstEffect=nn,nn.nextEffect=zn):(er.firstEffect=er.lastEffect=nn,nn.nextEffect=null),nn.effectTag=8))),hr&&!Fr&&(er.mode&2)!==0&&(Gt===null&&er.memoizedProps.unstable_avoidThisFallback!==!0||(Km.current&1)!==0?Dv===U_&&(Dv=OS):((Dv===U_||Dv===OS)&&(Dv=bx),z1!==0&&Xy!==null&&(W1(Xy,Sy),vT(Xy,z1)))),(hr||Fr)&&(er.effectTag|=4),null);case 4:return q_(),RS(er),null;case 10:return cx(er),null;case 17:return Sv(er.type)&&c_(),null;case 19:if(yl(Km),Fr=er.memoizedState,Fr===null)return null;if(nn=(er.effectTag&64)!==0,zn=Fr.rendering,zn===null){if(nn)gx(Fr,!1);else if(Dv!==U_||Gt!==null&&(Gt.effectTag&64)!==0)for(zn=er.child;zn!==null;){if(Gt=F1(zn),Gt!==null){for(er.effectTag|=64,gx(Fr,!1),nn=Gt.updateQueue,nn!==null&&(er.updateQueue=nn,er.effectTag|=4),Fr.lastEffect===null&&(er.firstEffect=null),er.lastEffect=Fr.lastEffect,Fr=er.child;Fr!==null;)nn=Fr,zn=hr,nn.effectTag&=2,nn.nextEffect=null,nn.firstEffect=null,nn.lastEffect=null,Gt=nn.alternate,Gt===null?(nn.childExpirationTime=0,nn.expirationTime=zn,nn.child=null,nn.memoizedProps=null,nn.memoizedState=null,nn.updateQueue=null,nn.dependencies=null):(nn.childExpirationTime=Gt.childExpirationTime,nn.expirationTime=Gt.expirationTime,nn.child=Gt.child,nn.memoizedProps=Gt.memoizedProps,nn.memoizedState=Gt.memoizedState,nn.updateQueue=Gt.updateQueue,zn=Gt.dependencies,nn.dependencies=zn===null?null:{expirationTime:zn.expirationTime,firstContext:zn.firstContext,responders:zn.responders}),Fr=Fr.sibling;return Tp(Km,Km.current&1|2),er.child}zn=zn.sibling}}else{if(!nn)if(Gt=F1(zn),Gt!==null){if(er.effectTag|=64,nn=!0,hr=Gt.updateQueue,hr!==null&&(er.updateQueue=hr,er.effectTag|=4),gx(Fr,!0),Fr.tail===null&&Fr.tailMode==="hidden"&&!zn.alternate)return er=er.lastEffect=Fr.lastEffect,er!==null&&(er.nextEffect=null),null}else 2*Tv()-Fr.renderingStartTime>Fr.tailExpiration&&1<hr&&(er.effectTag|=64,nn=!0,gx(Fr,!1),er.expirationTime=er.childExpirationTime=hr-1);Fr.isBackwards?(zn.sibling=er.child,er.child=zn):(hr=Fr.last,hr!==null?hr.sibling=zn:er.child=zn,Fr.last=zn)}return Fr.tail!==null?(Fr.tailExpiration===0&&(Fr.tailExpiration=Tv()+500),hr=Fr.tail,Fr.rendering=hr,Fr.tail=hr.sibling,Fr.lastEffect=er.lastEffect,Fr.renderingStartTime=Tv(),hr.sibling=null,er=Km.current,Tp(Km,nn?er&1|2:er&1),hr):null}throw Error(rt(156,er.tag))}function kA(Gt){switch(Gt.tag){case 1:Sv(Gt.type)&&c_();var er=Gt.effectTag;return er&4096?(Gt.effectTag=er&-4097|64,Gt):null;case 3:if(q_(),yl(Qm),yl(vm),er=Gt.effectTag,(er&64)!==0)throw Error(rt(285));return Gt.effectTag=er&-4097|64,Gt;case 5:return v_(Gt),null;case 13:return yl(Km),er=Gt.effectTag,er&4096?(Gt.effectTag=er&-4097|64,Gt):null;case 19:return yl(Km),null;case 4:return q_(),null;case 10:return cx(Gt),null;default:return null}}function gw(Gt,er){return{value:Gt,source:er,stack:uo(er)}}var by=typeof WeakSet=="function"?WeakSet:Set;function _y(Gt,er){var hr=er.source,Fr=er.stack;Fr===null&&hr!==null&&(Fr=uo(hr)),hr!==null&&Is(hr.type),er=er.value,Gt!==null&&Gt.tag===1&&Is(Gt.type);try{console.error(er)}catch(nn){setTimeout(function(){throw nn})}}function i0(Gt,er){try{er.props=Gt.memoizedProps,er.state=Gt.memoizedState,er.componentWillUnmount()}catch(hr){_1(Gt,hr)}}function PS(Gt){var er=Gt.ref;if(er!==null)if(typeof er=="function")try{er(null)}catch(hr){_1(Gt,hr)}else er.current=null}function cE(Gt,er){switch(er.tag){case 0:case 11:case 15:case 22:return;case 1:if(er.effectTag&256&&Gt!==null){var hr=Gt.memoizedProps,Fr=Gt.memoizedState;Gt=er.stateNode,er=Gt.getSnapshotBeforeUpdate(er.elementType===er.type?hr:am(er.type,hr),Fr),Gt.__reactInternalSnapshotBeforeUpdate=er}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(rt(163))}function M0(Gt,er){if(er=er.updateQueue,er=er!==null?er.lastEffect:null,er!==null){var hr=er=er.next;do{if((hr.tag&Gt)===Gt){var Fr=hr.destroy;hr.destroy=void 0,Fr!==void 0&&Fr()}hr=hr.next}while(hr!==er)}}function K0(Gt,er){if(er=er.updateQueue,er=er!==null?er.lastEffect:null,er!==null){var hr=er=er.next;do{if((hr.tag&Gt)===Gt){var Fr=hr.create;hr.destroy=Fr()}hr=hr.next}while(hr!==er)}}function dE(Gt,er,hr){switch(hr.tag){case 0:case 11:case 15:case 22:K0(3,hr);return;case 1:if(Gt=hr.stateNode,hr.effectTag&4)if(er===null)Gt.componentDidMount();else{var Fr=hr.elementType===hr.type?er.memoizedProps:am(hr.type,er.memoizedProps);Gt.componentDidUpdate(Fr,er.memoizedState,Gt.__reactInternalSnapshotBeforeUpdate)}er=hr.updateQueue,er!==null&&W0(hr,er,Gt);return;case 3:if(er=hr.updateQueue,er!==null){if(Gt=null,hr.child!==null)switch(hr.child.tag){case 5:Gt=hr.child.stateNode;break;case 1:Gt=hr.child.stateNode}W0(hr,er,Gt)}return;case 5:Gt=hr.stateNode,er===null&&hr.effectTag&4&&Xp(hr.type,hr.memoizedProps)&&Gt.focus();return;case 6:return;case 4:return;case 12:return;case 13:hr.memoizedState===null&&(hr=hr.alternate,hr!==null&&(hr=hr.memoizedState,hr!==null&&(hr=hr.dehydrated,hr!==null&&Bl(hr))));return;case 19:case 17:case 20:case 21:return}throw Error(rt(163))}function $_(Gt,er,hr){switch(typeof _w=="function"&&_w(er),er.tag){case 0:case 11:case 14:case 15:case 22:if(Gt=er.updateQueue,Gt!==null&&(Gt=Gt.lastEffect,Gt!==null)){var Fr=Gt.next;qv(97<hr?97:hr,function(){var nn=Fr;do{var zn=nn.destroy;if(zn!==void 0){var _i=er;try{zn()}catch(As){_1(_i,As)}}nn=nn.next}while(nn!==Fr)})}break;case 1:PS(er),hr=er.stateNode,typeof hr.componentWillUnmount=="function"&&i0(er,hr);break;case 5:PS(er);break;case 4:Wx(Gt,er,hr)}}function hE(Gt){var er=Gt.alternate;Gt.return=null,Gt.child=null,Gt.memoizedState=null,Gt.updateQueue=null,Gt.dependencies=null,Gt.alternate=null,Gt.firstEffect=null,Gt.lastEffect=null,Gt.pendingProps=null,Gt.memoizedProps=null,Gt.stateNode=null,er!==null&&hE(er)}function Ep(Gt){return Gt.tag===5||Gt.tag===3||Gt.tag===4}function vx(Gt){e:{for(var er=Gt.return;er!==null;){if(Ep(er)){var hr=er;break e}er=er.return}throw Error(rt(160))}switch(er=hr.stateNode,hr.tag){case 5:var Fr=!1;break;case 3:er=er.containerInfo,Fr=!0;break;case 4:er=er.containerInfo,Fr=!0;break;default:throw Error(rt(161))}hr.effectTag&16&&(uu(er,""),hr.effectTag&=-17);e:t:for(hr=Gt;;){for(;hr.sibling===null;){if(hr.return===null||Ep(hr.return)){hr=null;break e}hr=hr.return}for(hr.sibling.return=hr.return,hr=hr.sibling;hr.tag!==5&&hr.tag!==6&&hr.tag!==18;){if(hr.effectTag&2||hr.child===null||hr.tag===4)continue t;hr.child.return=hr,hr=hr.child}if(!(hr.effectTag&2)){hr=hr.stateNode;break e}}Fr?xy(Gt,hr,er):f1(Gt,hr,er)}function xy(Gt,er,hr){var Fr=Gt.tag,nn=Fr===5||Fr===6;if(nn)Gt=nn?Gt.stateNode:Gt.stateNode.instance,er?hr.nodeType===8?hr.parentNode.insertBefore(Gt,er):hr.insertBefore(Gt,er):(hr.nodeType===8?(er=hr.parentNode,er.insertBefore(Gt,hr)):(er=hr,er.appendChild(Gt)),hr=hr._reactRootContainer,hr!=null||er.onclick!==null||(er.onclick=tm));else if(Fr!==4&&(Gt=Gt.child,Gt!==null))for(xy(Gt,er,hr),Gt=Gt.sibling;Gt!==null;)xy(Gt,er,hr),Gt=Gt.sibling}function f1(Gt,er,hr){var Fr=Gt.tag,nn=Fr===5||Fr===6;if(nn)Gt=nn?Gt.stateNode:Gt.stateNode.instance,er?hr.insertBefore(Gt,er):hr.appendChild(Gt);else if(Fr!==4&&(Gt=Gt.child,Gt!==null))for(f1(Gt,er,hr),Gt=Gt.sibling;Gt!==null;)f1(Gt,er,hr),Gt=Gt.sibling}function Wx(Gt,er,hr){for(var Fr=er,nn=!1,zn,_i;;){if(!nn){nn=Fr.return;e:for(;;){if(nn===null)throw Error(rt(160));switch(zn=nn.stateNode,nn.tag){case 5:_i=!1;break e;case 3:zn=zn.containerInfo,_i=!0;break e;case 4:zn=zn.containerInfo,_i=!0;break e}nn=nn.return}nn=!0}if(Fr.tag===5||Fr.tag===6){e:for(var As=Gt,ps=Fr,xo=hr,Pu=ps;;)if($_(As,Pu,xo),Pu.child!==null&&Pu.tag!==4)Pu.child.return=Pu,Pu=Pu.child;else{if(Pu===ps)break e;for(;Pu.sibling===null;){if(Pu.return===null||Pu.return===ps)break e;Pu=Pu.return}Pu.sibling.return=Pu.return,Pu=Pu.sibling}_i?(As=zn,ps=Fr.stateNode,As.nodeType===8?As.parentNode.removeChild(ps):As.removeChild(ps)):zn.removeChild(Fr.stateNode)}else if(Fr.tag===4){if(Fr.child!==null){zn=Fr.stateNode.containerInfo,_i=!0,Fr.child.return=Fr,Fr=Fr.child;continue}}else if($_(Gt,Fr,hr),Fr.child!==null){Fr.child.return=Fr,Fr=Fr.child;continue}if(Fr===er)break;for(;Fr.sibling===null;){if(Fr.return===null||Fr.return===er)return;Fr=Fr.return,Fr.tag===4&&(nn=!1)}Fr.sibling.return=Fr.return,Fr=Fr.sibling}}function NS(Gt,er){switch(er.tag){case 0:case 11:case 14:case 15:case 22:M0(3,er);return;case 1:return;case 5:var hr=er.stateNode;if(hr!=null){var Fr=er.memoizedProps,nn=Gt!==null?Gt.memoizedProps:Fr;Gt=er.type;var zn=er.updateQueue;if(er.updateQueue=null,zn!==null){for(hr[dr]=Fr,Gt==="input"&&Fr.type==="radio"&&Fr.name!=null&&Ps(hr,Fr),uy(Gt,nn),er=uy(Gt,Fr),nn=0;nn<zn.length;nn+=2){var _i=zn[nn],As=zn[nn+1];_i==="style"?Rv(hr,As):_i==="dangerouslySetInnerHTML"?Ku(hr,As):_i==="children"?uu(hr,As):xn(hr,_i,As,er)}switch(Gt){case"input":yo(hr,Fr);break;case"textarea":Sl(hr,Fr);break;case"select":er=hr._wrapperState.wasMultiple,hr._wrapperState.wasMultiple=!!Fr.multiple,Gt=Fr.value,Gt!=null?ru(hr,!!Fr.multiple,Gt,!1):er!==!!Fr.multiple&&(Fr.defaultValue!=null?ru(hr,!!Fr.multiple,Fr.defaultValue,!0):ru(hr,!!Fr.multiple,Fr.multiple?[]:"",!1))}}}return;case 6:if(er.stateNode===null)throw Error(rt(162));er.stateNode.nodeValue=er.memoizedProps;return;case 3:er=er.stateNode,er.hydrate&&(er.hydrate=!1,Bl(er.containerInfo));return;case 12:return;case 13:if(hr=er,er.memoizedState===null?Fr=!1:(Fr=!0,hr=er.child,m1=Tv()),hr!==null)e:for(Gt=hr;;){if(Gt.tag===5)zn=Gt.stateNode,Fr?(zn=zn.style,typeof zn.setProperty=="function"?zn.setProperty("display","none","important"):zn.display="none"):(zn=Gt.stateNode,nn=Gt.memoizedProps.style,nn=nn!=null&&nn.hasOwnProperty("display")?nn.display:null,zn.style.display=Hm("display",nn));else if(Gt.tag===6)Gt.stateNode.nodeValue=Fr?"":Gt.memoizedProps;else if(Gt.tag===13&&Gt.memoizedState!==null&&Gt.memoizedState.dehydrated===null){zn=Gt.child.sibling,zn.return=Gt,Gt=zn;continue}else if(Gt.child!==null){Gt.child.return=Gt,Gt=Gt.child;continue}if(Gt===hr)break;for(;Gt.sibling===null;){if(Gt.return===null||Gt.return===hr)break e;Gt=Gt.return}Gt.sibling.return=Gt.return,Gt=Gt.sibling}p1(er);return;case 19:p1(er);return;case 17:return}throw Error(rt(163))}function p1(Gt){var er=Gt.updateQueue;if(er!==null){Gt.updateQueue=null;var hr=Gt.stateNode;hr===null&&(hr=Gt.stateNode=new by),er.forEach(function(Fr){var nn=_E.bind(null,Gt,Fr);hr.has(Fr)||(hr.add(Fr),Fr.then(nn,nn))})}}var Xx=typeof WeakMap=="function"?WeakMap:Map;function yx(Gt,er,hr){hr=t0(hr,null),hr.tag=3,hr.payload={element:null};var Fr=er.value;return hr.callback=function(){z_||(z_=!0,lv=Fr),_y(Gt,er)},hr}function Um(Gt,er,hr){hr=t0(hr,null),hr.tag=3;var Fr=Gt.type.getDerivedStateFromError;if(typeof Fr=="function"){var nn=er.value;hr.payload=function(){return _y(Gt,er),Fr(nn)}}var zn=Gt.stateNode;return zn!==null&&typeof zn.componentDidCatch=="function"&&(hr.callback=function(){typeof Fr!="function"&&(R0===null?R0=new Set([this]):R0.add(this),_y(Gt,er));var _i=er.stack;this.componentDidCatch(er.value,{componentStack:_i!==null?_i:""})}),hr}var Yx=Math.ceil,em=kn.ReactCurrentDispatcher,Ly=kn.ReactCurrentOwner,Dp=0,kS=8,bl=16,Z0=32,U_=0,$p=1,Lv=2,OS=3,bx=4,I0=5,Nl=Dp,Xy=null,pl=null,Sy=0,Dv=U_,_x=null,J0=1073741823,uv=1073741823,al=null,z1=0,Qx=!1,m1=0,ub=500,Yu=null,z_=!1,lv=null,R0=null,vw=!1,g1=null,qS=90,G1=null,LS=0,dT=null,FS=0;function ny(){return(Nl&(bl|Z0))!==Dp?1073741821-(Tv()/10|0):FS!==0?FS:FS=1073741821-(Tv()/10|0)}function ym(Gt,er,hr){if(er=er.mode,(er&2)===0)return 1073741823;var Fr=Fm();if((er&4)===0)return Fr===99?1073741823:1073741822;if((Nl&bl)!==Dp)return Sy;if(hr!==null)Gt=jx(Gt,hr.timeoutMs|0||5e3,250);else switch(Fr){case 99:Gt=1073741823;break;case 98:Gt=jx(Gt,150,100);break;case 97:case 96:Gt=jx(Gt,5e3,250);break;case 95:Gt=2;break;default:throw Error(rt(326))}return Xy!==null&&Gt===Sy&&--Gt,Gt}function hm(Gt,er){if(50<LS)throw LS=0,dT=null,Error(rt(185));if(Gt=yw(Gt,er),Gt!==null){var hr=Fm();er===1073741823?(Nl&kS)!==Dp&&(Nl&(bl|Z0))===Dp?V1(Gt):(a0(Gt),Nl===Dp&&Bm()):a0(Gt),(Nl&4)===Dp||hr!==98&&hr!==99||(G1===null?G1=new Map([[Gt,er]]):(hr=G1.get(Gt),(hr===void 0||hr>er)&&G1.set(Gt,er)))}}function yw(Gt,er){Gt.expirationTime<er&&(Gt.expirationTime=er);var hr=Gt.alternate;hr!==null&&hr.expirationTime<er&&(hr.expirationTime=er);var Fr=Gt.return,nn=null;if(Fr===null&&Gt.tag===3)nn=Gt.stateNode;else for(;Fr!==null;){if(hr=Fr.alternate,Fr.childExpirationTime<er&&(Fr.childExpirationTime=er),hr!==null&&hr.childExpirationTime<er&&(hr.childExpirationTime=er),Fr.return===null&&Fr.tag===3){nn=Fr.stateNode;break}Fr=Fr.return}return nn!==null&&(Xy===nn&&(BS(er),Dv===bx&&W1(nn,Sy)),vT(nn,er)),nn}function Kx(Gt){var er=Gt.lastExpiredTime;if(er!==0||(er=Gt.firstPendingTime,!wE(Gt,er)))return er;var hr=Gt.lastPingedTime;return Gt=Gt.nextKnownPendingLevel,Gt=hr>Gt?hr:Gt,2>=Gt&&er!==Gt?0:Gt}function a0(Gt){if(Gt.lastExpiredTime!==0)Gt.callbackExpirationTime=1073741823,Gt.callbackPriority=99,Gt.callbackNode=T0(V1.bind(null,Gt));else{var er=Kx(Gt),hr=Gt.callbackNode;if(er===0)hr!==null&&(Gt.callbackNode=null,Gt.callbackExpirationTime=0,Gt.callbackPriority=90);else{var Fr=ny();if(er===1073741823?Fr=99:er===1||er===2?Fr=95:(Fr=10*(1073741821-er)-10*(1073741821-Fr),Fr=0>=Fr?99:250>=Fr?98:5250>=Fr?97:95),hr!==null){var nn=Gt.callbackPriority;if(Gt.callbackExpirationTime===er&&nn>=Fr)return;hr!==ko&&an(hr)}Gt.callbackExpirationTime=er,Gt.callbackPriority=Fr,er=er===1073741823?T0(V1.bind(null,Gt)):bp(Fr,fE.bind(null,Gt),{timeout:10*(1073741821-er)-Tv()}),Gt.callbackNode=er}}}function fE(Gt,er){if(FS=0,er)return er=ny(),Tw(Gt,er),a0(Gt),null;var hr=Kx(Gt);if(hr!==0){if(er=Gt.callbackNode,(Nl&(bl|Z0))!==Dp)throw Error(rt(327));if(H1(),Gt===Xy&&hr===Sy||xx(Gt,hr),pl!==null){var Fr=Nl;Nl|=bl;var nn=gE();do try{pT();break}catch(As){y1(Gt,As)}while(!0);if(lx(),Nl=Fr,em.current=nn,Dv===$p)throw er=_x,xx(Gt,hr),W1(Gt,hr),a0(Gt),er;if(pl===null)switch(nn=Gt.finishedWork=Gt.current.alternate,Gt.finishedExpirationTime=hr,Fr=Dv,Xy=null,Fr){case U_:case $p:throw Error(rt(345));case Lv:Tw(Gt,2<hr?2:hr);break;case OS:if(W1(Gt,hr),Fr=Gt.lastSuspendedTime,hr===Fr&&(Gt.nextKnownPendingLevel=jS(nn)),J0===1073741823&&(nn=m1+ub-Tv(),10<nn)){if(Qx){var zn=Gt.lastPingedTime;if(zn===0||zn>=hr){Gt.lastPingedTime=hr,xx(Gt,hr);break}}if(zn=Kx(Gt),zn!==0&&zn!==hr)break;if(Fr!==0&&Fr!==hr){Gt.lastPingedTime=Fr;break}Gt.timeoutHandle=Rm(b1.bind(null,Gt),nn);break}b1(Gt);break;case bx:if(W1(Gt,hr),Fr=Gt.lastSuspendedTime,hr===Fr&&(Gt.nextKnownPendingLevel=jS(nn)),Qx&&(nn=Gt.lastPingedTime,nn===0||nn>=hr)){Gt.lastPingedTime=hr,xx(Gt,hr);break}if(nn=Kx(Gt),nn!==0&&nn!==hr)break;if(Fr!==0&&Fr!==hr){Gt.lastPingedTime=Fr;break}if(uv!==1073741823?Fr=10*(1073741821-uv)-Tv():J0===1073741823?Fr=0:(Fr=10*(1073741821-J0)-5e3,nn=Tv(),hr=10*(1073741821-hr)-nn,Fr=nn-Fr,0>Fr&&(Fr=0),Fr=(120>Fr?120:480>Fr?480:1080>Fr?1080:1920>Fr?1920:3e3>Fr?3e3:4320>Fr?4320:1960*Yx(Fr/1960))-Fr,hr<Fr&&(Fr=hr)),10<Fr){Gt.timeoutHandle=Rm(b1.bind(null,Gt),Fr);break}b1(Gt);break;case I0:if(J0!==1073741823&&al!==null){zn=J0;var _i=al;if(Fr=_i.busyMinDurationMs|0,0>=Fr?Fr=0:(nn=_i.busyDelayMs|0,zn=Tv()-(10*(1073741821-zn)-(_i.timeoutMs|0||5e3)),Fr=zn<=nn?0:nn+Fr-zn),10<Fr){W1(Gt,hr),Gt.timeoutHandle=Rm(b1.bind(null,Gt),Fr);break}}b1(Gt);break;default:throw Error(rt(329))}if(a0(Gt),Gt.callbackNode===er)return fE.bind(null,Gt)}}return null}function V1(Gt){var er=Gt.lastExpiredTime;if(er=er!==0?er:1073741823,(Nl&(bl|Z0))!==Dp)throw Error(rt(327));if(H1(),Gt===Xy&&er===Sy||xx(Gt,er),pl!==null){var hr=Nl;Nl|=bl;var Fr=gE();do try{vE();break}catch(nn){y1(Gt,nn)}while(!0);if(lx(),Nl=hr,em.current=Fr,Dv===$p)throw hr=_x,xx(Gt,er),W1(Gt,er),a0(Gt),hr;if(pl!==null)throw Error(rt(261));Gt.finishedWork=Gt.current.alternate,Gt.finishedExpirationTime=er,Xy=null,b1(Gt),a0(Gt)}return null}function pE(){if(G1!==null){var Gt=G1;G1=null,Gt.forEach(function(er,hr){Tw(hr,er),a0(hr)}),Bm()}}function hT(Gt,er){var hr=Nl;Nl|=1;try{return Gt(er)}finally{Nl=hr,Nl===Dp&&Bm()}}function mE(Gt,er){var hr=Nl;Nl&=-2,Nl|=kS;try{return Gt(er)}finally{Nl=hr,Nl===Dp&&Bm()}}function xx(Gt,er){Gt.finishedWork=null,Gt.finishedExpirationTime=0;var hr=Gt.timeoutHandle;if(hr!==-1&&(Gt.timeoutHandle=-1,_0(hr)),pl!==null)for(hr=pl.return;hr!==null;){var Fr=hr;switch(Fr.tag){case 1:Fr=Fr.type.childContextTypes,Fr!=null&&c_();break;case 3:q_(),yl(Qm),yl(vm);break;case 5:v_(Fr);break;case 4:q_();break;case 13:yl(Km);break;case 19:yl(Km);break;case 10:cx(Fr)}hr=hr.return}Xy=Gt,pl=Sx(Gt.current,null),Sy=er,Dv=U_,_x=null,uv=J0=1073741823,al=null,z1=0,Qx=!1}function y1(Gt,er){do{try{if(lx(),E0.current=d1,a1)for(var hr=Em.memoizedState;hr!==null;){var Fr=hr.queue;Fr!==null&&(Fr.pending=null),hr=hr.next}if(C0=0,ty=Ny=Em=null,a1=!1,pl===null||pl.return===null)return Dv=$p,_x=er,pl=null;e:{var nn=Gt,zn=pl.return,_i=pl,As=er;if(er=Sy,_i.effectTag|=2048,_i.firstEffect=_i.lastEffect=null,As!==null&&typeof As=="object"&&typeof As.then=="function"){var ps=As;if((_i.mode&2)===0){var xo=_i.alternate;xo?(_i.updateQueue=xo.updateQueue,_i.memoizedState=xo.memoizedState,_i.expirationTime=xo.expirationTime):(_i.updateQueue=null,_i.memoizedState=null)}var Pu=(Km.current&1)!==0,Bu=zn;do{var _f;if(_f=Bu.tag===13){var zp=Bu.memoizedState;if(zp!==null)_f=zp.dehydrated!==null;else{var s0=Bu.memoizedProps;_f=s0.fallback===void 0?!1:s0.unstable_avoidThisFallback!==!0?!0:!Pu}}if(_f){var Xv=Bu.updateQueue;if(Xv===null){var ho=new Set;ho.add(ps),Bu.updateQueue=ho}else Xv.add(ps);if((Bu.mode&2)===0){if(Bu.effectTag|=64,_i.effectTag&=-2981,_i.tag===1)if(_i.alternate===null)_i.tag=17;else{var Zs=t0(1073741823,null);Zs.tag=2,Xn(_i,Zs)}_i.expirationTime=1073741823;break e}As=void 0,_i=er;var No=nn.pingCache;if(No===null?(No=nn.pingCache=new Xx,As=new Set,No.set(ps,As)):(As=No.get(ps),As===void 0&&(As=new Set,No.set(ps,As))),!As.has(_i)){As.add(_i);var iu=bE.bind(null,nn,ps,_i);ps.then(iu,iu)}Bu.effectTag|=4096,Bu.expirationTime=er;break e}Bu=Bu.return}while(Bu!==null);As=Error((Is(_i.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+uo(_i))}Dv!==I0&&(Dv=Lv),As=gw(As,_i),Bu=zn;do{switch(Bu.tag){case 3:ps=As,Bu.effectTag|=4096,Bu.expirationTime=er;var wu=yx(Bu,ps,er);wS(Bu,wu);break e;case 1:ps=As;var ju=Bu.type,ml=Bu.stateNode;if((Bu.effectTag&64)===0&&(typeof ju.getDerivedStateFromError=="function"||ml!==null&&typeof ml.componentDidCatch=="function"&&(R0===null||!R0.has(ml)))){Bu.effectTag|=4096,Bu.expirationTime=er;var Mp=Um(Bu,ps,er);wS(Bu,Mp);break e}}Bu=Bu.return}while(Bu!==null)}pl=Zx(pl)}catch(Cm){er=Cm;continue}break}while(!0)}function gE(){var Gt=em.current;return em.current=d1,Gt===null?d1:Gt}function fT(Gt,er){Gt<J0&&2<Gt&&(J0=Gt),er!==null&&Gt<uv&&2<Gt&&(uv=Gt,al=er)}function BS(Gt){Gt>z1&&(z1=Gt)}function vE(){for(;pl!==null;)pl=mT(pl)}function pT(){for(;pl!==null&&!Xu();)pl=mT(pl)}function mT(Gt){var er=G_(Gt.alternate,Gt,Sy);return Gt.memoizedProps=Gt.pendingProps,er===null&&(er=Zx(Gt)),Ly.current=null,er}function Zx(Gt){pl=Gt;do{var er=pl.alternate;if(Gt=pl.return,(pl.effectTag&2048)===0){if(er=mw(er,pl,Sy),Sy===1||pl.childExpirationTime!==1){for(var hr=0,Fr=pl.child;Fr!==null;){var nn=Fr.expirationTime,zn=Fr.childExpirationTime;nn>hr&&(hr=nn),zn>hr&&(hr=zn),Fr=Fr.sibling}pl.childExpirationTime=hr}if(er!==null)return er;Gt!==null&&(Gt.effectTag&2048)===0&&(Gt.firstEffect===null&&(Gt.firstEffect=pl.firstEffect),pl.lastEffect!==null&&(Gt.lastEffect!==null&&(Gt.lastEffect.nextEffect=pl.firstEffect),Gt.lastEffect=pl.lastEffect),1<pl.effectTag&&(Gt.lastEffect!==null?Gt.lastEffect.nextEffect=pl:Gt.firstEffect=pl,Gt.lastEffect=pl))}else{if(er=kA(pl),er!==null)return er.effectTag&=2047,er;Gt!==null&&(Gt.firstEffect=Gt.lastEffect=null,Gt.effectTag|=2048)}if(er=pl.sibling,er!==null)return er;pl=Gt}while(pl!==null);return Dv===U_&&(Dv=I0),null}function jS(Gt){var er=Gt.expirationTime;return Gt=Gt.childExpirationTime,er>Gt?er:Gt}function b1(Gt){var er=Fm();return qv(99,yE.bind(null,Gt,er)),null}function yE(Gt,er){do H1();while(g1!==null);if((Nl&(bl|Z0))!==Dp)throw Error(rt(327));var hr=Gt.finishedWork,Fr=Gt.finishedExpirationTime;if(hr===null)return null;if(Gt.finishedWork=null,Gt.finishedExpirationTime=0,hr===Gt.current)throw Error(rt(177));Gt.callbackNode=null,Gt.callbackExpirationTime=0,Gt.callbackPriority=90,Gt.nextKnownPendingLevel=0;var nn=jS(hr);if(Gt.firstPendingTime=nn,Fr<=Gt.lastSuspendedTime?Gt.firstSuspendedTime=Gt.lastSuspendedTime=Gt.nextKnownPendingLevel=0:Fr<=Gt.firstSuspendedTime&&(Gt.firstSuspendedTime=Fr-1),Fr<=Gt.lastPingedTime&&(Gt.lastPingedTime=0),Fr<=Gt.lastExpiredTime&&(Gt.lastExpiredTime=0),Gt===Xy&&(pl=Xy=null,Sy=0),1<hr.effectTag?hr.lastEffect!==null?(hr.lastEffect.nextEffect=hr,nn=hr.firstEffect):nn=hr:nn=hr.firstEffect,nn!==null){var zn=Nl;Nl|=Z0,Ly.current=null,Wp=nl;var _i=Cy();if(zv(_i)){if("selectionStart"in _i)var As={start:_i.selectionStart,end:_i.selectionEnd};else e:{As=(As=_i.ownerDocument)&&As.defaultView||window;var ps=As.getSelection&&As.getSelection();if(ps&&ps.rangeCount!==0){As=ps.anchorNode;var xo=ps.anchorOffset,Pu=ps.focusNode;ps=ps.focusOffset;try{As.nodeType,Pu.nodeType}catch{As=null;break e}var Bu=0,_f=-1,zp=-1,s0=0,Xv=0,ho=_i,Zs=null;t:for(;;){for(var No;ho!==As||xo!==0&&ho.nodeType!==3||(_f=Bu+xo),ho!==Pu||ps!==0&&ho.nodeType!==3||(zp=Bu+ps),ho.nodeType===3&&(Bu+=ho.nodeValue.length),(No=ho.firstChild)!==null;)Zs=ho,ho=No;for(;;){if(ho===_i)break t;if(Zs===As&&++s0===xo&&(_f=Bu),Zs===Pu&&++Xv===ps&&(zp=Bu),(No=ho.nextSibling)!==null)break;ho=Zs,Zs=ho.parentNode}ho=No}As=_f===-1||zp===-1?null:{start:_f,end:zp}}else As=null}As=As||{start:0,end:0}}else As=null;Zp={activeElementDetached:null,focusedElem:_i,selectionRange:As},nl=!1,Yu=nn;do try{bw()}catch(Wl){if(Yu===null)throw Error(rt(330));_1(Yu,Wl),Yu=Yu.nextEffect}while(Yu!==null);Yu=nn;do try{for(_i=Gt,As=er;Yu!==null;){var iu=Yu.effectTag;if(iu&16&&uu(Yu.stateNode,""),iu&128){var wu=Yu.alternate;if(wu!==null){var ju=wu.ref;ju!==null&&(typeof ju=="function"?ju(null):ju.current=null)}}switch(iu&1038){case 2:vx(Yu),Yu.effectTag&=-3;break;case 6:vx(Yu),Yu.effectTag&=-3,NS(Yu.alternate,Yu);break;case 1024:Yu.effectTag&=-1025;break;case 1028:Yu.effectTag&=-1025,NS(Yu.alternate,Yu);break;case 4:NS(Yu.alternate,Yu);break;case 8:xo=Yu,Wx(_i,xo,As),hE(xo)}Yu=Yu.nextEffect}}catch(Wl){if(Yu===null)throw Error(rt(330));_1(Yu,Wl),Yu=Yu.nextEffect}while(Yu!==null);if(ju=Zp,wu=Cy(),iu=ju.focusedElem,As=ju.selectionRange,wu!==iu&&iu&&iu.ownerDocument&&Cl(iu.ownerDocument.documentElement,iu)){for(As!==null&&zv(iu)&&(wu=As.start,ju=As.end,ju===void 0&&(ju=wu),"selectionStart"in iu?(iu.selectionStart=wu,iu.selectionEnd=Math.min(ju,iu.value.length)):(ju=(wu=iu.ownerDocument||document)&&wu.defaultView||window,ju.getSelection&&(ju=ju.getSelection(),xo=iu.textContent.length,_i=Math.min(As.start,xo),As=As.end===void 0?_i:Math.min(As.end,xo),!ju.extend&&_i>As&&(xo=As,As=_i,_i=xo),xo=Xm(iu,_i),Pu=Xm(iu,As),xo&&Pu&&(ju.rangeCount!==1||ju.anchorNode!==xo.node||ju.anchorOffset!==xo.offset||ju.focusNode!==Pu.node||ju.focusOffset!==Pu.offset)&&(wu=wu.createRange(),wu.setStart(xo.node,xo.offset),ju.removeAllRanges(),_i>As?(ju.addRange(wu),ju.extend(Pu.node,Pu.offset)):(wu.setEnd(Pu.node,Pu.offset),ju.addRange(wu)))))),wu=[],ju=iu;ju=ju.parentNode;)ju.nodeType===1&&wu.push({element:ju,left:ju.scrollLeft,top:ju.scrollTop});for(typeof iu.focus=="function"&&iu.focus(),iu=0;iu<wu.length;iu++)ju=wu[iu],ju.element.scrollLeft=ju.left,ju.element.scrollTop=ju.top}nl=!!Wp,Zp=Wp=null,Gt.current=hr,Yu=nn;do try{for(iu=Gt;Yu!==null;){var ml=Yu.effectTag;if(ml&36&&dE(iu,Yu.alternate,Yu),ml&128){wu=void 0;var Mp=Yu.ref;if(Mp!==null){var Cm=Yu.stateNode;switch(Yu.tag){case 5:wu=Cm;break;default:wu=Cm}typeof Mp=="function"?Mp(wu):Mp.current=wu}}Yu=Yu.nextEffect}}catch(Wl){if(Yu===null)throw Error(rt(330));_1(Yu,Wl),Yu=Yu.nextEffect}while(Yu!==null);Yu=null,Ju(),Nl=zn}else Gt.current=hr;if(vw)vw=!1,g1=Gt,qS=er;else for(Yu=nn;Yu!==null;)er=Yu.nextEffect,Yu.nextEffect=null,Yu=er;if(er=Gt.firstPendingTime,er===0&&(R0=null),er===1073741823?Gt===dT?LS++:(LS=0,dT=Gt):LS=0,typeof gT=="function"&&gT(hr.stateNode,Fr),a0(Gt),z_)throw z_=!1,Gt=lv,lv=null,Gt;return(Nl&kS)!==Dp||Bm(),null}function bw(){for(;Yu!==null;){var Gt=Yu.effectTag;(Gt&256)!==0&&cE(Yu.alternate,Yu),(Gt&512)===0||vw||(vw=!0,bp(97,function(){return H1(),null})),Yu=Yu.nextEffect}}function H1(){if(qS!==90){var Gt=97<qS?97:qS;return qS=90,qv(Gt,cv)}}function cv(){if(g1===null)return!1;var Gt=g1;if(g1=null,(Nl&(bl|Z0))!==Dp)throw Error(rt(331));var er=Nl;for(Nl|=Z0,Gt=Gt.current.firstEffect;Gt!==null;){try{var hr=Gt;if((hr.effectTag&512)!==0)switch(hr.tag){case 0:case 11:case 15:case 22:M0(5,hr),K0(5,hr)}}catch(Fr){if(Gt===null)throw Error(rt(330));_1(Gt,Fr)}hr=Gt.nextEffect,Gt.nextEffect=null,Gt=hr}return Nl=er,Bm(),!0}function vb(Gt,er,hr){er=gw(hr,er),er=yx(Gt,er,1073741823),Xn(Gt,er),Gt=yw(Gt,1073741823),Gt!==null&&a0(Gt)}function _1(Gt,er){if(Gt.tag===3)vb(Gt,Gt,er);else for(var hr=Gt.return;hr!==null;){if(hr.tag===3){vb(hr,Gt,er);break}else if(hr.tag===1){var Fr=hr.stateNode;if(typeof hr.type.getDerivedStateFromError=="function"||typeof Fr.componentDidCatch=="function"&&(R0===null||!R0.has(Fr))){Gt=gw(er,Gt),Gt=Um(hr,Gt,1073741823),Xn(hr,Gt),hr=yw(hr,1073741823),hr!==null&&a0(hr);break}}hr=hr.return}}function bE(Gt,er,hr){var Fr=Gt.pingCache;Fr!==null&&Fr.delete(er),Xy===Gt&&Sy===hr?Dv===bx||Dv===OS&&J0===1073741823&&Tv()-m1<ub?xx(Gt,Sy):Qx=!0:wE(Gt,hr)&&(er=Gt.lastPingedTime,er!==0&&er<hr||(Gt.lastPingedTime=hr,a0(Gt)))}function _E(Gt,er){var hr=Gt.stateNode;hr!==null&&hr.delete(er),er=0,er===0&&(er=ny(),er=ym(er,Gt,null)),Gt=yw(Gt,er),Gt!==null&&a0(Gt)}var G_;G_=function(Gt,er,hr){var Fr=er.expirationTime;if(Gt!==null){var nn=er.pendingProps;if(Gt.memoizedProps!==nn||Qm.current)yy=!0;else{if(Fr<hr){switch(yy=!1,er.tag){case 3:Vx(er),Oy();break;case 5:if(Av(er),er.mode&4&&hr!==1&&nn.hidden)return er.expirationTime=er.childExpirationTime=1,null;break;case 1:Sv(er.type)&&Tr(er);break;case 4:r0(er,er.stateNode.containerInfo);break;case 10:Fr=er.memoizedProps.value,nn=er.type._context,Tp(_p,nn._currentValue),nn._currentValue=Fr;break;case 13:if(er.memoizedState!==null)return Fr=er.child.childExpirationTime,Fr!==0&&Fr>=hr?qy(Gt,er,hr):(Tp(Km,Km.current&1),er=j_(Gt,er,hr),er!==null?er.sibling:null);Tp(Km,Km.current&1);break;case 19:if(Fr=er.childExpirationTime>=hr,(Gt.effectTag&64)!==0){if(Fr)return ry(Gt,er,hr);er.effectTag|=64}if(nn=er.memoizedState,nn!==null&&(nn.rendering=null,nn.tail=null),Tp(Km,Km.current),!Fr)return null}return j_(Gt,er,hr)}yy=!1}}else yy=!1;switch(er.expirationTime=0,er.tag){case 2:if(Fr=er.type,Gt!==null&&(Gt.alternate=null,er.alternate=null,er.effectTag|=2),Gt=er.pendingProps,nn=Ov(er,vm.current),O_(er,hr),nn=ES(null,er,Fr,Gt,nn,hr),er.effectTag|=1,typeof nn=="object"&&nn!==null&&typeof nn.render=="function"&&nn.$$typeof===void 0){if(er.tag=1,er.memoizedState=null,er.updateQueue=null,Sv(Fr)){var zn=!0;Tr(er)}else zn=!1;er.memoizedState=nn.state!==null&&nn.state!==void 0?nn.state:null,Ry(er);var _i=Fr.getDerivedStateFromProps;typeof _i=="function"&&Py(er,Fr,_i,Gt),nn.updater=d_,er.stateNode=nn,nn._reactInternalFiber=er,h_(er,Fr,Gt,hr),er=Gx(null,er,Fr,!0,zn,hr)}else er.tag=0,sm(null,er,nn,hr),er=er.child;return er;case 16:e:{if(nn=er.elementType,Gt!==null&&(Gt.alternate=null,er.alternate=null,er.effectTag|=2),Gt=er.pendingProps,bs(nn),nn._status!==1)throw nn._result;switch(nn=nn._result,er.type=nn,zn=er.tag=OA(nn),Gt=am(nn,Gt),zn){case 0:er=MS(null,er,nn,Gt,hr);break e;case 1:er=y_(null,er,nn,Gt,hr);break e;case 11:er=L_(null,er,nn,Gt,hr);break e;case 14:er=U1(null,er,nn,am(nn.type,Gt),Fr,hr);break e}throw Error(rt(306,nn,""))}return er;case 0:return Fr=er.type,nn=er.pendingProps,nn=er.elementType===Fr?nn:am(Fr,nn),MS(Gt,er,Fr,nn,hr);case 1:return Fr=er.type,nn=er.pendingProps,nn=er.elementType===Fr?nn:am(Fr,nn),y_(Gt,er,Fr,nn,hr);case 3:if(Vx(er),Fr=er.updateQueue,Gt===null||Fr===null)throw Error(rt(282));if(Fr=er.pendingProps,nn=er.memoizedState,nn=nn!==null?nn.element:null,fl(Gt,er),k1(er,Fr,null,hr),Fr=er.memoizedState.element,Fr===nn)Oy(),er=j_(Gt,er,hr);else{if((nn=er.stateNode.hydrate)&&(Wv=bv(er.stateNode.containerInfo.firstChild),Cv=er,nn=n0=!0),nn)for(hr=jm(er,null,Fr,hr),er.child=hr;hr;)hr.effectTag=hr.effectTag&-3|1024,hr=hr.sibling;else sm(Gt,er,Fr,hr),Oy();er=er.child}return er;case 5:return Av(er),Gt===null&&ov(er),Fr=er.type,nn=er.pendingProps,zn=Gt!==null?Gt.memoizedProps:null,_i=nn.children,np(Fr,nn)?_i=null:zn!==null&&np(Fr,zn)&&(er.effectTag|=16),F_(Gt,er),er.mode&4&&hr!==1&&nn.hidden?(er.expirationTime=er.childExpirationTime=1,er=null):(sm(Gt,er,_i,hr),er=er.child),er;case 6:return Gt===null&&ov(er),null;case 13:return qy(Gt,er,hr);case 4:return r0(er,er.stateNode.containerInfo),Fr=er.pendingProps,Gt===null?er.child=f_(er,null,Fr,hr):sm(Gt,er,Fr,hr),er.child;case 11:return Fr=er.type,nn=er.pendingProps,nn=er.elementType===Fr?nn:am(Fr,nn),L_(Gt,er,Fr,nn,hr);case 7:return sm(Gt,er,er.pendingProps,hr),er.child;case 8:return sm(Gt,er,er.pendingProps.children,hr),er.child;case 12:return sm(Gt,er,er.pendingProps.children,hr),er.child;case 10:e:{Fr=er.type._context,nn=er.pendingProps,_i=er.memoizedProps,zn=nn.value;var As=er.type._context;if(Tp(_p,As._currentValue),As._currentValue=zn,_i!==null)if(As=_i.value,zn=Iy(As,zn)?0:(typeof Fr._calculateChangedBits=="function"?Fr._calculateChangedBits(As,zn):1073741823)|0,zn===0){if(_i.children===nn.children&&!Qm.current){er=j_(Gt,er,hr);break e}}else for(As=er.child,As!==null&&(As.return=er);As!==null;){var ps=As.dependencies;if(ps!==null){_i=As.child;for(var xo=ps.firstContext;xo!==null;){if(xo.context===Fr&&(xo.observedBits&zn)!==0){As.tag===1&&(xo=t0(hr,null),xo.tag=2,Xn(As,xo)),As.expirationTime<hr&&(As.expirationTime=hr),xo=As.alternate,xo!==null&&xo.expirationTime<hr&&(xo.expirationTime=hr),dx(As.return,hr),ps.expirationTime<hr&&(ps.expirationTime=hr);break}xo=xo.next}}else _i=As.tag===10&&As.type===er.type?null:As.child;if(_i!==null)_i.return=As;else for(_i=As;_i!==null;){if(_i===er){_i=null;break}if(As=_i.sibling,As!==null){As.return=_i.return,_i=As;break}_i=_i.return}As=_i}sm(Gt,er,nn.children,hr),er=er.child}return er;case 9:return nn=er.type,zn=er.pendingProps,Fr=zn.children,O_(er,hr),nn=Hy(nn,zn.unstable_observedBits),Fr=Fr(nn),er.effectTag|=1,sm(Gt,er,Fr,hr),er.child;case 14:return nn=er.type,zn=am(nn,er.pendingProps),zn=am(nn.type,zn),U1(Gt,er,nn,zn,Fr,hr);case 15:return Wy(Gt,er,er.type,er.pendingProps,Fr,hr);case 17:return Fr=er.type,nn=er.pendingProps,nn=er.elementType===Fr?nn:am(Fr,nn),Gt!==null&&(Gt.alternate=null,er.alternate=null,er.effectTag|=2),er.tag=1,Sv(Fr)?(Gt=!0,Tr(er)):Gt=!1,O_(er,hr),uw(er,Fr,nn),h_(er,Fr,nn,hr),Gx(null,er,Fr,!0,Gt,hr);case 19:return ry(Gt,er,hr)}throw Error(rt(156,er.tag))};var gT=null,_w=null;function xE(Gt){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(er.isDisabled||!er.supportsFiber)return!0;try{var hr=er.inject(Gt);gT=function(Fr){try{er.onCommitFiberRoot(hr,Fr,void 0,(Fr.current.effectTag&64)===64)}catch{}},_w=function(Fr){try{er.onCommitFiberUnmount(hr,Fr)}catch{}}}catch{}return!0}function SE(Gt,er,hr,Fr){this.tag=Gt,this.key=hr,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=er,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Fr,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function b_(Gt,er,hr,Fr){return new SE(Gt,er,hr,Fr)}function $S(Gt){return Gt=Gt.prototype,!(!Gt||!Gt.isReactComponent)}function OA(Gt){if(typeof Gt=="function")return $S(Gt)?1:0;if(Gt!=null){if(Gt=Gt.$$typeof,Gt===wn)return 11;if(Gt===pn)return 14}return 2}function Sx(Gt,er){var hr=Gt.alternate;return hr===null?(hr=b_(Gt.tag,er,Gt.key,Gt.mode),hr.elementType=Gt.elementType,hr.type=Gt.type,hr.stateNode=Gt.stateNode,hr.alternate=Gt,Gt.alternate=hr):(hr.pendingProps=er,hr.effectTag=0,hr.nextEffect=null,hr.firstEffect=null,hr.lastEffect=null),hr.childExpirationTime=Gt.childExpirationTime,hr.expirationTime=Gt.expirationTime,hr.child=Gt.child,hr.memoizedProps=Gt.memoizedProps,hr.memoizedState=Gt.memoizedState,hr.updateQueue=Gt.updateQueue,er=Gt.dependencies,hr.dependencies=er===null?null:{expirationTime:er.expirationTime,firstContext:er.firstContext,responders:er.responders},hr.sibling=Gt.sibling,hr.index=Gt.index,hr.ref=Gt.ref,hr}function xw(Gt,er,hr,Fr,nn,zn){var _i=2;if(Fr=Gt,typeof Gt=="function")$S(Gt)&&(_i=1);else if(typeof Gt=="string")_i=5;else e:switch(Gt){case Cn:return V_(hr.children,nn,zn,er);case Rn:_i=8,nn|=7;break;case Nn:_i=8,nn|=1;break;case Gr:return Gt=b_(12,hr,er,nn|8),Gt.elementType=Gr,Gt.type=Gr,Gt.expirationTime=zn,Gt;case Un:return Gt=b_(13,hr,er,nn),Gt.type=Un,Gt.elementType=Un,Gt.expirationTime=zn,Gt;case Zn:return Gt=b_(19,hr,er,nn),Gt.elementType=Zn,Gt.expirationTime=zn,Gt;default:if(typeof Gt=="object"&&Gt!==null)switch(Gt.$$typeof){case tn:_i=10;break e;case dn:_i=9;break e;case wn:_i=11;break e;case pn:_i=14;break e;case Dn:_i=16,Fr=null;break e;case qn:_i=22;break e}throw Error(rt(130,Gt==null?Gt:typeof Gt,""))}return er=b_(_i,hr,er,nn),er.elementType=Gt,er.type=Fr,er.expirationTime=zn,er}function V_(Gt,er,hr,Fr){return Gt=b_(7,Gt,Fr,er),Gt.expirationTime=hr,Gt}function Sw(Gt,er,hr){return Gt=b_(6,Gt,null,er),Gt.expirationTime=hr,Gt}function ww(Gt,er,hr){return er=b_(4,Gt.children!==null?Gt.children:[],Gt.key,er),er.expirationTime=hr,er.stateNode={containerInfo:Gt.containerInfo,pendingChildren:null,implementation:Gt.implementation},er}function qA(Gt,er,hr){this.tag=er,this.current=null,this.containerInfo=Gt,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=hr,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function wE(Gt,er){var hr=Gt.firstSuspendedTime;return Gt=Gt.lastSuspendedTime,hr!==0&&hr>=er&&Gt<=er}function W1(Gt,er){var hr=Gt.firstSuspendedTime,Fr=Gt.lastSuspendedTime;hr<er&&(Gt.firstSuspendedTime=er),(Fr>er||hr===0)&&(Gt.lastSuspendedTime=er),er<=Gt.lastPingedTime&&(Gt.lastPingedTime=0),er<=Gt.lastExpiredTime&&(Gt.lastExpiredTime=0)}function vT(Gt,er){er>Gt.firstPendingTime&&(Gt.firstPendingTime=er);var hr=Gt.firstSuspendedTime;hr!==0&&(er>=hr?Gt.firstSuspendedTime=Gt.lastSuspendedTime=Gt.nextKnownPendingLevel=0:er>=Gt.lastSuspendedTime&&(Gt.lastSuspendedTime=er+1),er>Gt.nextKnownPendingLevel&&(Gt.nextKnownPendingLevel=er))}function Tw(Gt,er){var hr=Gt.lastExpiredTime;(hr===0||hr>er)&&(Gt.lastExpiredTime=er)}function Ew(Gt,er,hr,Fr){var nn=er.current,zn=ny(),_i=O1.suspense;zn=ym(zn,nn,_i);e:if(hr){hr=hr._reactInternalFiber;t:{if(ls(hr)!==hr||hr.tag!==1)throw Error(rt(170));var As=hr;do{switch(As.tag){case 3:As=As.stateNode.context;break t;case 1:if(Sv(As.type)){As=As.stateNode.__reactInternalMemoizedMergedChildContext;break t}}As=As.return}while(As!==null);throw Error(rt(171))}if(hr.tag===1){var ps=hr.type;if(Sv(ps)){hr=py(hr,ps,As);break e}}hr=As}else hr=Hv;return er.context===null?er.context=hr:er.pendingContext=hr,er=t0(zn,_i),er.payload={element:Gt},Fr=Fr===void 0?null:Fr,Fr!==null&&(er.callback=Fr),Xn(nn,er),hm(nn,zn),zn}function Aw(Gt){if(Gt=Gt.current,!Gt.child)return null;switch(Gt.child.tag){case 5:return Gt.child.stateNode;default:return Gt.child.stateNode}}function TE(Gt,er){Gt=Gt.memoizedState,Gt!==null&&Gt.dehydrated!==null&&Gt.retryTime<er&&(Gt.retryTime=er)}function yT(Gt,er){TE(Gt,er),(Gt=Gt.alternate)&&TE(Gt,er)}function bT(Gt,er,hr){hr=hr!=null&&hr.hydrate===!0;var Fr=new qA(Gt,er,hr),nn=b_(3,null,null,er===2?7:er===1?3:0);Fr.current=nn,nn.stateNode=Fr,Ry(nn),Gt[Pr]=Fr.current,hr&&er!==0&&eo(Gt,Gt.nodeType===9?Gt:Gt.ownerDocument),this._internalRoot=Fr}bT.prototype.render=function(Gt){Ew(Gt,this._internalRoot,null,null)},bT.prototype.unmount=function(){var Gt=this._internalRoot,er=Gt.containerInfo;Ew(null,Gt,null,function(){er[Pr]=null})};function iy(Gt){return!(!Gt||Gt.nodeType!==1&&Gt.nodeType!==9&&Gt.nodeType!==11&&(Gt.nodeType!==8||Gt.nodeValue!==" react-mount-point-unstable "))}function cl(Gt,er){if(er||(er=Gt?Gt.nodeType===9?Gt.documentElement:Gt.firstChild:null,er=!(!er||er.nodeType!==1||!er.hasAttribute("data-reactroot"))),!er)for(var hr;hr=Gt.lastChild;)Gt.removeChild(hr);return new bT(Gt,0,er?{hydrate:!0}:void 0)}function Ol(Gt,er,hr,Fr,nn){var zn=hr._reactRootContainer;if(zn){var _i=zn._internalRoot;if(typeof nn=="function"){var As=nn;nn=function(){var xo=Aw(_i);As.call(xo)}}Ew(er,_i,Gt,nn)}else{if(zn=hr._reactRootContainer=cl(hr,Fr),_i=zn._internalRoot,typeof nn=="function"){var ps=nn;nn=function(){var xo=Aw(_i);ps.call(xo)}}mE(function(){Ew(er,_i,Gt,nn)})}return Aw(_i)}function Cw(Gt,er,hr){var Fr=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ln,key:Fr==null?null:""+Fr,children:Gt,containerInfo:er,implementation:hr}}um=function(Gt){if(Gt.tag===13){var er=jx(ny(),150,100);hm(Gt,er),yT(Gt,er)}},Im=function(Gt){Gt.tag===13&&(hm(Gt,3),yT(Gt,3))},Il=function(Gt){if(Gt.tag===13){var er=ny();er=ym(er,Gt,null),hm(Gt,er),yT(Gt,er)}},Ut=function(Gt,er,hr){switch(er){case"input":if(yo(Gt,hr),er=hr.name,hr.type==="radio"&&er!=null){for(hr=Gt;hr.parentNode;)hr=hr.parentNode;for(hr=hr.querySelectorAll("input[name="+JSON.stringify(""+er)+'][type="radio"]'),er=0;er<hr.length;er++){var Fr=hr[er];if(Fr!==Gt&&Fr.form===Gt.form){var nn=Wn(Fr);if(!nn)throw Error(rt(90));En(Fr),yo(Fr,nn)}}}break;case"textarea":Sl(Gt,hr);break;case"select":er=hr.value,er!=null&&ru(Gt,!!hr.multiple,er,!1)}},ar=hT,pr=function(Gt,er,hr,Fr,nn){var zn=Nl;Nl|=4;try{return qv(98,Gt.bind(null,er,hr,Fr,nn))}finally{Nl=zn,Nl===Dp&&Bm()}},cr=function(){(Nl&(1|bl|Z0))===Dp&&(pE(),H1())},gr=function(Gt,er){var hr=Nl;Nl|=2;try{return Gt(er)}finally{Nl=hr,Nl===Dp&&Bm()}};function Ho(Gt,er){var hr=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!iy(er))throw Error(rt(200));return Cw(Gt,er,null,hr)}var Fy={Events:[bn,Pn,Wn,Kt,Ft,$o,function(Gt){kl(Gt,So)},tr,Jt,rv,rl,H1,{current:!1}]};return(function(Gt){var er=Gt.findFiberByHostInstance;return xE(_e({},Gt,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:kn.ReactCurrentDispatcher,findHostInstanceByFiber:function(hr){return hr=$u(hr),hr===null?null:hr.stateNode},findFiberByHostInstance:function(hr){return er?er(hr):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:Hr,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),reactDom_production_min$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fy,reactDom_production_min$1.createPortal=Ho,reactDom_production_min$1.findDOMNode=function(Gt){if(Gt==null)return null;if(Gt.nodeType===1)return Gt;var er=Gt._reactInternalFiber;if(er===void 0)throw typeof Gt.render=="function"?Error(rt(188)):Error(rt(268,Object.keys(Gt)));return Gt=$u(er),Gt=Gt===null?null:Gt.stateNode,Gt},reactDom_production_min$1.flushSync=function(Gt,er){if((Nl&(bl|Z0))!==Dp)throw Error(rt(187));var hr=Nl;Nl|=1;try{return qv(99,Gt.bind(null,er))}finally{Nl=hr,Bm()}},reactDom_production_min$1.hydrate=function(Gt,er,hr){if(!iy(er))throw Error(rt(200));return Ol(null,Gt,er,!0,hr)},reactDom_production_min$1.render=function(Gt,er,hr){if(!iy(er))throw Error(rt(200));return Ol(null,Gt,er,!1,hr)},reactDom_production_min$1.unmountComponentAtNode=function(Gt){if(!iy(Gt))throw Error(rt(40));return Gt._reactRootContainer?(mE(function(){Ol(null,null,Gt,!1,function(){Gt._reactRootContainer=null,Gt[Pr]=null})}),!0):!1},reactDom_production_min$1.unstable_batchedUpdates=hT,reactDom_production_min$1.unstable_createPortal=function(Gt,er){return Ho(Gt,er,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},reactDom_production_min$1.unstable_renderSubtreeIntoContainer=function(Gt,er,hr,Fr){if(!iy(hr))throw Error(rt(200));if(Gt==null||Gt._reactInternalFiber===void 0)throw Error(rt(38));return Ol(Gt,er,hr,!1,Fr)},reactDom_production_min$1.version="16.14.0",reactDom_production_min$1}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom$1.exports;hasRequiredReactDom=1;function et(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(et)}catch(_e){console.error(_e)}}return et(),reactDom$1.exports=requireReactDom_production_min(),reactDom$1.exports}var getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),rnds8=new Uint8Array(16);function rng(){if(!getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var byteToHex=[];for(var i$3=0;i$3<256;++i$3)byteToHex[i$3]=(i$3+256).toString(16).substr(1);function bytesToUuid(et,_e){var tt=0,rt=byteToHex;return[rt[et[tt++]],rt[et[tt++]],rt[et[tt++]],rt[et[tt++]],"-",rt[et[tt++]],rt[et[tt++]],"-",rt[et[tt++]],rt[et[tt++]],"-",rt[et[tt++]],rt[et[tt++]],"-",rt[et[tt++]],rt[et[tt++]],rt[et[tt++]],rt[et[tt++]],rt[et[tt++]],rt[et[tt++]]].join("")}var _nodeId,_clockseq,_lastMSecs=0,_lastNSecs=0;function v1(et,_e,tt){var rt=_e&&tt||0,nt=_e||[];et=et||{};var st=et.node||_nodeId,dt=et.clockseq!==void 0?et.clockseq:_clockseq;if(st==null||dt==null){var ft=et.random||(et.rng||rng)();st==null&&(st=_nodeId=[ft[0]|1,ft[1],ft[2],ft[3],ft[4],ft[5]]),dt==null&&(dt=_clockseq=(ft[6]<<8|ft[7])&16383)}var ht=et.msecs!==void 0?et.msecs:new Date().getTime(),mt=et.nsecs!==void 0?et.nsecs:_lastNSecs+1,bt=ht-_lastMSecs+(mt-_lastNSecs)/1e4;if(bt<0&&et.clockseq===void 0&&(dt=dt+1&16383),(bt<0||ht>_lastMSecs)&&et.nsecs===void 0&&(mt=0),mt>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=ht,_lastNSecs=mt,_clockseq=dt,ht+=122192928e5;var St=((ht&268435455)*1e4+mt)%4294967296;nt[rt++]=St>>>24&255,nt[rt++]=St>>>16&255,nt[rt++]=St>>>8&255,nt[rt++]=St&255;var Et=ht/4294967296*1e4&268435455;nt[rt++]=Et>>>8&255,nt[rt++]=Et&255,nt[rt++]=Et>>>24&15|16,nt[rt++]=Et>>>16&255,nt[rt++]=dt>>>8|128,nt[rt++]=dt&255;for(var Ct=0;Ct<6;++Ct)nt[rt+Ct]=st[Ct];return _e||bytesToUuid(nt)}function uuidToBytes(et){var _e=[];return et.replace(/[a-fA-F0-9]{2}/g,function(tt){_e.push(parseInt(tt,16))}),_e}function stringToBytes$1(et){et=unescape(encodeURIComponent(et));for(var _e=new Array(et.length),tt=0;tt<et.length;tt++)_e[tt]=et.charCodeAt(tt);return _e}var DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",URL$1="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v35(et,_e,tt){var rt=function(st,dt,ft,ht){var mt=ft&&ht||0;if(typeof st=="string"&&(st=stringToBytes$1(st)),typeof dt=="string"&&(dt=uuidToBytes(dt)),!Array.isArray(st))throw TypeError("value must be an array of bytes");if(!Array.isArray(dt)||dt.length!==16)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var bt=tt(dt.concat(st));if(bt[6]=bt[6]&15|_e,bt[8]=bt[8]&63|128,ft)for(var St=0;St<16;++St)ft[mt+St]=bt[St];return ft||bytesToUuid(bt)};try{rt.name=et}catch{}return rt.DNS=DNS,rt.URL=URL$1,rt}function md5(et){if(typeof et=="string"){var _e=unescape(encodeURIComponent(et));et=new Array(_e.length);for(var tt=0;tt<_e.length;tt++)et[tt]=_e.charCodeAt(tt)}return md5ToHexEncodedArray(wordsToMd5(bytesToWords(et),et.length*8))}function md5ToHexEncodedArray(et){var _e,tt,rt=[],nt=et.length*32,st="0123456789abcdef",dt;for(_e=0;_e<nt;_e+=8)tt=et[_e>>5]>>>_e%32&255,dt=parseInt(st.charAt(tt>>>4&15)+st.charAt(tt&15),16),rt.push(dt);return rt}function wordsToMd5(et,_e){et[_e>>5]|=128<<_e%32,et[(_e+64>>>9<<4)+14]=_e;var tt,rt,nt,st,dt,ft=1732584193,ht=-271733879,mt=-1732584194,bt=271733878;for(tt=0;tt<et.length;tt+=16)rt=ft,nt=ht,st=mt,dt=bt,ft=md5ff(ft,ht,mt,bt,et[tt],7,-680876936),bt=md5ff(bt,ft,ht,mt,et[tt+1],12,-389564586),mt=md5ff(mt,bt,ft,ht,et[tt+2],17,606105819),ht=md5ff(ht,mt,bt,ft,et[tt+3],22,-1044525330),ft=md5ff(ft,ht,mt,bt,et[tt+4],7,-176418897),bt=md5ff(bt,ft,ht,mt,et[tt+5],12,1200080426),mt=md5ff(mt,bt,ft,ht,et[tt+6],17,-1473231341),ht=md5ff(ht,mt,bt,ft,et[tt+7],22,-45705983),ft=md5ff(ft,ht,mt,bt,et[tt+8],7,1770035416),bt=md5ff(bt,ft,ht,mt,et[tt+9],12,-1958414417),mt=md5ff(mt,bt,ft,ht,et[tt+10],17,-42063),ht=md5ff(ht,mt,bt,ft,et[tt+11],22,-1990404162),ft=md5ff(ft,ht,mt,bt,et[tt+12],7,1804603682),bt=md5ff(bt,ft,ht,mt,et[tt+13],12,-40341101),mt=md5ff(mt,bt,ft,ht,et[tt+14],17,-1502002290),ht=md5ff(ht,mt,bt,ft,et[tt+15],22,1236535329),ft=md5gg(ft,ht,mt,bt,et[tt+1],5,-165796510),bt=md5gg(bt,ft,ht,mt,et[tt+6],9,-1069501632),mt=md5gg(mt,bt,ft,ht,et[tt+11],14,643717713),ht=md5gg(ht,mt,bt,ft,et[tt],20,-373897302),ft=md5gg(ft,ht,mt,bt,et[tt+5],5,-701558691),bt=md5gg(bt,ft,ht,mt,et[tt+10],9,38016083),mt=md5gg(mt,bt,ft,ht,et[tt+15],14,-660478335),ht=md5gg(ht,mt,bt,ft,et[tt+4],20,-405537848),ft=md5gg(ft,ht,mt,bt,et[tt+9],5,568446438),bt=md5gg(bt,ft,ht,mt,et[tt+14],9,-1019803690),mt=md5gg(mt,bt,ft,ht,et[tt+3],14,-187363961),ht=md5gg(ht,mt,bt,ft,et[tt+8],20,1163531501),ft=md5gg(ft,ht,mt,bt,et[tt+13],5,-1444681467),bt=md5gg(bt,ft,ht,mt,et[tt+2],9,-51403784),mt=md5gg(mt,bt,ft,ht,et[tt+7],14,1735328473),ht=md5gg(ht,mt,bt,ft,et[tt+12],20,-1926607734),ft=md5hh(ft,ht,mt,bt,et[tt+5],4,-378558),bt=md5hh(bt,ft,ht,mt,et[tt+8],11,-2022574463),mt=md5hh(mt,bt,ft,ht,et[tt+11],16,1839030562),ht=md5hh(ht,mt,bt,ft,et[tt+14],23,-35309556),ft=md5hh(ft,ht,mt,bt,et[tt+1],4,-1530992060),bt=md5hh(bt,ft,ht,mt,et[tt+4],11,1272893353),mt=md5hh(mt,bt,ft,ht,et[tt+7],16,-155497632),ht=md5hh(ht,mt,bt,ft,et[tt+10],23,-1094730640),ft=md5hh(ft,ht,mt,bt,et[tt+13],4,681279174),bt=md5hh(bt,ft,ht,mt,et[tt],11,-358537222),mt=md5hh(mt,bt,ft,ht,et[tt+3],16,-722521979),ht=md5hh(ht,mt,bt,ft,et[tt+6],23,76029189),ft=md5hh(ft,ht,mt,bt,et[tt+9],4,-640364487),bt=md5hh(bt,ft,ht,mt,et[tt+12],11,-421815835),mt=md5hh(mt,bt,ft,ht,et[tt+15],16,530742520),ht=md5hh(ht,mt,bt,ft,et[tt+2],23,-995338651),ft=md5ii(ft,ht,mt,bt,et[tt],6,-198630844),bt=md5ii(bt,ft,ht,mt,et[tt+7],10,1126891415),mt=md5ii(mt,bt,ft,ht,et[tt+14],15,-1416354905),ht=md5ii(ht,mt,bt,ft,et[tt+5],21,-57434055),ft=md5ii(ft,ht,mt,bt,et[tt+12],6,1700485571),bt=md5ii(bt,ft,ht,mt,et[tt+3],10,-1894986606),mt=md5ii(mt,bt,ft,ht,et[tt+10],15,-1051523),ht=md5ii(ht,mt,bt,ft,et[tt+1],21,-2054922799),ft=md5ii(ft,ht,mt,bt,et[tt+8],6,1873313359),bt=md5ii(bt,ft,ht,mt,et[tt+15],10,-30611744),mt=md5ii(mt,bt,ft,ht,et[tt+6],15,-1560198380),ht=md5ii(ht,mt,bt,ft,et[tt+13],21,1309151649),ft=md5ii(ft,ht,mt,bt,et[tt+4],6,-145523070),bt=md5ii(bt,ft,ht,mt,et[tt+11],10,-1120210379),mt=md5ii(mt,bt,ft,ht,et[tt+2],15,718787259),ht=md5ii(ht,mt,bt,ft,et[tt+9],21,-343485551),ft=safeAdd(ft,rt),ht=safeAdd(ht,nt),mt=safeAdd(mt,st),bt=safeAdd(bt,dt);return[ft,ht,mt,bt]}function bytesToWords(et){var _e,tt=[];for(tt[(et.length>>2)-1]=void 0,_e=0;_e<tt.length;_e+=1)tt[_e]=0;var rt=et.length*8;for(_e=0;_e<rt;_e+=8)tt[_e>>5]|=(et[_e/8]&255)<<_e%32;return tt}function safeAdd(et,_e){var tt=(et&65535)+(_e&65535),rt=(et>>16)+(_e>>16)+(tt>>16);return rt<<16|tt&65535}function bitRotateLeft(et,_e){return et<<_e|et>>>32-_e}function md5cmn(et,_e,tt,rt,nt,st){return safeAdd(bitRotateLeft(safeAdd(safeAdd(_e,et),safeAdd(rt,st)),nt),tt)}function md5ff(et,_e,tt,rt,nt,st,dt){return md5cmn(_e&tt|~_e&rt,et,_e,nt,st,dt)}function md5gg(et,_e,tt,rt,nt,st,dt){return md5cmn(_e&rt|tt&~rt,et,_e,nt,st,dt)}function md5hh(et,_e,tt,rt,nt,st,dt){return md5cmn(_e^tt^rt,et,_e,nt,st,dt)}function md5ii(et,_e,tt,rt,nt,st,dt){return md5cmn(tt^(_e|~rt),et,_e,nt,st,dt)}var v3=v35("v3",48,md5);function v4(et,_e,tt){var rt=_e&&tt||0;typeof et=="string"&&(_e=et==="binary"?new Array(16):null,et=null),et=et||{};var nt=et.random||(et.rng||rng)();if(nt[6]=nt[6]&15|64,nt[8]=nt[8]&63|128,_e)for(var st=0;st<16;++st)_e[rt+st]=nt[st];return _e||bytesToUuid(nt)}function f$1(et,_e,tt,rt){switch(et){case 0:return _e&tt^~_e&rt;case 1:return _e^tt^rt;case 2:return _e&tt^_e&rt^tt&rt;case 3:return _e^tt^rt}}function ROTL(et,_e){return et<<_e|et>>>32-_e}function sha1(et){var _e=[1518500249,1859775393,2400959708,3395469782],tt=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof et=="string"){var rt=unescape(encodeURIComponent(et));et=new Array(rt.length);for(var nt=0;nt<rt.length;nt++)et[nt]=rt.charCodeAt(nt)}et.push(128);for(var st=et.length/4+2,dt=Math.ceil(st/16),ft=new Array(dt),nt=0;nt<dt;nt++){ft[nt]=new Array(16);for(var ht=0;ht<16;ht++)ft[nt][ht]=et[nt*64+ht*4]<<24|et[nt*64+ht*4+1]<<16|et[nt*64+ht*4+2]<<8|et[nt*64+ht*4+3]}ft[dt-1][14]=(et.length-1)*8/Math.pow(2,32),ft[dt-1][14]=Math.floor(ft[dt-1][14]),ft[dt-1][15]=(et.length-1)*8&4294967295;for(var nt=0;nt<dt;nt++){for(var mt=new Array(80),bt=0;bt<16;bt++)mt[bt]=ft[nt][bt];for(var bt=16;bt<80;bt++)mt[bt]=ROTL(mt[bt-3]^mt[bt-8]^mt[bt-14]^mt[bt-16],1);for(var St=tt[0],Et=tt[1],Ct=tt[2],Rt=tt[3],Tt=tt[4],bt=0;bt<80;bt++){var wt=Math.floor(bt/20),At=ROTL(St,5)+f$1(wt,Et,Ct,Rt)+Tt+_e[wt]+mt[bt]>>>0;Tt=Rt,Rt=Ct,Ct=ROTL(Et,30)>>>0,Et=St,St=At}tt[0]=tt[0]+St>>>0,tt[1]=tt[1]+Et>>>0,tt[2]=tt[2]+Ct>>>0,tt[3]=tt[3]+Rt>>>0,tt[4]=tt[4]+Tt>>>0}return[tt[0]>>24&255,tt[0]>>16&255,tt[0]>>8&255,tt[0]&255,tt[1]>>24&255,tt[1]>>16&255,tt[1]>>8&255,tt[1]&255,tt[2]>>24&255,tt[2]>>16&255,tt[2]>>8&255,tt[2]&255,tt[3]>>24&255,tt[3]>>16&255,tt[3]>>8&255,tt[3]&255,tt[4]>>24&255,tt[4]>>16&255,tt[4]>>8&255,tt[4]&255]}var v5=v35("v5",80,sha1);const esmBrowser=Object.freeze(Object.defineProperty({__proto__:null,v1,v3,v4,v5},Symbol.toStringTag,{value:"Module"})),require$$125=getAugmentedNamespace$1(esmBrowser);var eventemitter3$1={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,(function(et){var _e=Object.prototype.hasOwnProperty,tt="~";function rt(){}Object.create&&(rt.prototype=Object.create(null),new rt().__proto__||(tt=!1));function nt(ht,mt,bt){this.fn=ht,this.context=mt,this.once=bt||!1}function st(ht,mt,bt,St,Et){if(typeof bt!="function")throw new TypeError("The listener must be a function");var Ct=new nt(bt,St||ht,Et),Rt=tt?tt+mt:mt;return ht._events[Rt]?ht._events[Rt].fn?ht._events[Rt]=[ht._events[Rt],Ct]:ht._events[Rt].push(Ct):(ht._events[Rt]=Ct,ht._eventsCount++),ht}function dt(ht,mt){--ht._eventsCount===0?ht._events=new rt:delete ht._events[mt]}function ft(){this._events=new rt,this._eventsCount=0}ft.prototype.eventNames=function(){var mt=[],bt,St;if(this._eventsCount===0)return mt;for(St in bt=this._events)_e.call(bt,St)&&mt.push(tt?St.slice(1):St);return Object.getOwnPropertySymbols?mt.concat(Object.getOwnPropertySymbols(bt)):mt},ft.prototype.listeners=function(mt){var bt=tt?tt+mt:mt,St=this._events[bt];if(!St)return[];if(St.fn)return[St.fn];for(var Et=0,Ct=St.length,Rt=new Array(Ct);Et<Ct;Et++)Rt[Et]=St[Et].fn;return Rt},ft.prototype.listenerCount=function(mt){var bt=tt?tt+mt:mt,St=this._events[bt];return St?St.fn?1:St.length:0},ft.prototype.emit=function(mt,bt,St,Et,Ct,Rt){var Tt=tt?tt+mt:mt;if(!this._events[Tt])return!1;var wt=this._events[Tt],At=arguments.length,Nt,Pt;if(wt.fn){switch(wt.once&&this.removeListener(mt,wt.fn,void 0,!0),At){case 1:return wt.fn.call(wt.context),!0;case 2:return wt.fn.call(wt.context,bt),!0;case 3:return wt.fn.call(wt.context,bt,St),!0;case 4:return wt.fn.call(wt.context,bt,St,Et),!0;case 5:return wt.fn.call(wt.context,bt,St,Et,Ct),!0;case 6:return wt.fn.call(wt.context,bt,St,Et,Ct,Rt),!0}for(Pt=1,Nt=new Array(At-1);Pt<At;Pt++)Nt[Pt-1]=arguments[Pt];wt.fn.apply(wt.context,Nt)}else{var It=wt.length,Ft;for(Pt=0;Pt<It;Pt++)switch(wt[Pt].once&&this.removeListener(mt,wt[Pt].fn,void 0,!0),At){case 1:wt[Pt].fn.call(wt[Pt].context);break;case 2:wt[Pt].fn.call(wt[Pt].context,bt);break;case 3:wt[Pt].fn.call(wt[Pt].context,bt,St);break;case 4:wt[Pt].fn.call(wt[Pt].context,bt,St,Et);break;default:if(!Nt)for(Ft=1,Nt=new Array(At-1);Ft<At;Ft++)Nt[Ft-1]=arguments[Ft];wt[Pt].fn.apply(wt[Pt].context,Nt)}}return!0},ft.prototype.on=function(mt,bt,St){return st(this,mt,bt,St,!1)},ft.prototype.once=function(mt,bt,St){return st(this,mt,bt,St,!0)},ft.prototype.removeListener=function(mt,bt,St,Et){var Ct=tt?tt+mt:mt;if(!this._events[Ct])return this;if(!bt)return dt(this,Ct),this;var Rt=this._events[Ct];if(Rt.fn)Rt.fn===bt&&(!Et||Rt.once)&&(!St||Rt.context===St)&&dt(this,Ct);else{for(var Tt=0,wt=[],At=Rt.length;Tt<At;Tt++)(Rt[Tt].fn!==bt||Et&&!Rt[Tt].once||St&&Rt[Tt].context!==St)&&wt.push(Rt[Tt]);wt.length?this._events[Ct]=wt.length===1?wt[0]:wt:dt(this,Ct)}return this},ft.prototype.removeAllListeners=function(mt){var bt;return mt?(bt=tt?tt+mt:mt,this._events[bt]&&dt(this,bt)):(this._events=new rt,this._eventsCount=0),this},ft.prototype.off=ft.prototype.removeListener,ft.prototype.addListener=ft.prototype.on,ft.prefixed=tt,ft.EventEmitter=ft,et.exports=ft})(eventemitter3$1)),eventemitter3$1.exports}var colorString$1={exports:{}},colorName$1,hasRequiredColorName;function requireColorName(){return hasRequiredColorName||(hasRequiredColorName=1,colorName$1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),colorName$1}var simpleSwizzle$1={exports:{}},isArrayish,hasRequiredIsArrayish;function requireIsArrayish(){return hasRequiredIsArrayish||(hasRequiredIsArrayish=1,isArrayish=function(_e){return!_e||typeof _e=="string"?!1:_e instanceof Array||Array.isArray(_e)||_e.length>=0&&(_e.splice instanceof Function||Object.getOwnPropertyDescriptor(_e,_e.length-1)&&_e.constructor.name!=="String")}),isArrayish}var hasRequiredSimpleSwizzle;function requireSimpleSwizzle(){if(hasRequiredSimpleSwizzle)return simpleSwizzle$1.exports;hasRequiredSimpleSwizzle=1;var et=requireIsArrayish(),_e=Array.prototype.concat,tt=Array.prototype.slice,rt=simpleSwizzle$1.exports=function(st){for(var dt=[],ft=0,ht=st.length;ft<ht;ft++){var mt=st[ft];et(mt)?dt=_e.call(dt,tt.call(mt)):dt.push(mt)}return dt};return rt.wrap=function(nt){return function(){return nt(rt(arguments))}},simpleSwizzle$1.exports}var hasRequiredColorString;function requireColorString(){if(hasRequiredColorString)return colorString$1.exports;hasRequiredColorString=1;var et=requireColorName(),_e=requireSimpleSwizzle(),tt=Object.hasOwnProperty,rt=Object.create(null);for(var nt in et)tt.call(et,nt)&&(rt[et[nt]]=nt);var st=colorString$1.exports={to:{},get:{}};st.get=function(ht){var mt=ht.substring(0,3).toLowerCase(),bt,St;switch(mt){case"hsl":bt=st.get.hsl(ht),St="hsl";break;case"hwb":bt=st.get.hwb(ht),St="hwb";break;default:bt=st.get.rgb(ht),St="rgb";break}return bt?{model:St,value:bt}:null},st.get.rgb=function(ht){if(!ht)return null;var mt=/^#([a-f0-9]{3,4})$/i,bt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,St=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Et=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Ct=/^(\w+)$/,Rt=[0,0,0,1],Tt,wt,At;if(Tt=ht.match(bt)){for(At=Tt[2],Tt=Tt[1],wt=0;wt<3;wt++){var Nt=wt*2;Rt[wt]=parseInt(Tt.slice(Nt,Nt+2),16)}At&&(Rt[3]=parseInt(At,16)/255)}else if(Tt=ht.match(mt)){for(Tt=Tt[1],At=Tt[3],wt=0;wt<3;wt++)Rt[wt]=parseInt(Tt[wt]+Tt[wt],16);At&&(Rt[3]=parseInt(At+At,16)/255)}else if(Tt=ht.match(St)){for(wt=0;wt<3;wt++)Rt[wt]=parseInt(Tt[wt+1],0);Tt[4]&&(Tt[5]?Rt[3]=parseFloat(Tt[4])*.01:Rt[3]=parseFloat(Tt[4]))}else if(Tt=ht.match(Et)){for(wt=0;wt<3;wt++)Rt[wt]=Math.round(parseFloat(Tt[wt+1])*2.55);Tt[4]&&(Tt[5]?Rt[3]=parseFloat(Tt[4])*.01:Rt[3]=parseFloat(Tt[4]))}else return(Tt=ht.match(Ct))?Tt[1]==="transparent"?[0,0,0,0]:tt.call(et,Tt[1])?(Rt=et[Tt[1]],Rt[3]=1,Rt):null:null;for(wt=0;wt<3;wt++)Rt[wt]=dt(Rt[wt],0,255);return Rt[3]=dt(Rt[3],0,1),Rt},st.get.hsl=function(ht){if(!ht)return null;var mt=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,bt=ht.match(mt);if(bt){var St=parseFloat(bt[4]),Et=(parseFloat(bt[1])%360+360)%360,Ct=dt(parseFloat(bt[2]),0,100),Rt=dt(parseFloat(bt[3]),0,100),Tt=dt(isNaN(St)?1:St,0,1);return[Et,Ct,Rt,Tt]}return null},st.get.hwb=function(ht){if(!ht)return null;var mt=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,bt=ht.match(mt);if(bt){var St=parseFloat(bt[4]),Et=(parseFloat(bt[1])%360+360)%360,Ct=dt(parseFloat(bt[2]),0,100),Rt=dt(parseFloat(bt[3]),0,100),Tt=dt(isNaN(St)?1:St,0,1);return[Et,Ct,Rt,Tt]}return null},st.to.hex=function(){var ht=_e(arguments);return"#"+ft(ht[0])+ft(ht[1])+ft(ht[2])+(ht[3]<1?ft(Math.round(ht[3]*255)):"")},st.to.rgb=function(){var ht=_e(arguments);return ht.length<4||ht[3]===1?"rgb("+Math.round(ht[0])+", "+Math.round(ht[1])+", "+Math.round(ht[2])+")":"rgba("+Math.round(ht[0])+", "+Math.round(ht[1])+", "+Math.round(ht[2])+", "+ht[3]+")"},st.to.rgb.percent=function(){var ht=_e(arguments),mt=Math.round(ht[0]/255*100),bt=Math.round(ht[1]/255*100),St=Math.round(ht[2]/255*100);return ht.length<4||ht[3]===1?"rgb("+mt+"%, "+bt+"%, "+St+"%)":"rgba("+mt+"%, "+bt+"%, "+St+"%, "+ht[3]+")"},st.to.hsl=function(){var ht=_e(arguments);return ht.length<4||ht[3]===1?"hsl("+ht[0]+", "+ht[1]+"%, "+ht[2]+"%)":"hsla("+ht[0]+", "+ht[1]+"%, "+ht[2]+"%, "+ht[3]+")"},st.to.hwb=function(){var ht=_e(arguments),mt="";return ht.length>=4&&ht[3]!==1&&(mt=", "+ht[3]),"hwb("+ht[0]+", "+ht[1]+"%, "+ht[2]+"%"+mt+")"},st.to.keyword=function(ht){return rt[ht.slice(0,3)]};function dt(ht,mt,bt){return Math.min(Math.max(mt,ht),bt)}function ft(ht){var mt=Math.round(ht).toString(16).toUpperCase();return mt.length<2?"0"+mt:mt}return colorString$1.exports}var conversions,hasRequiredConversions;function requireConversions(){if(hasRequiredConversions)return conversions;hasRequiredConversions=1;const et=requireColorName(),_e={};for(const nt of Object.keys(et))_e[et[nt]]=nt;const tt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};conversions=tt;for(const nt of Object.keys(tt)){if(!("channels"in tt[nt]))throw new Error("missing channels property: "+nt);if(!("labels"in tt[nt]))throw new Error("missing channel labels property: "+nt);if(tt[nt].labels.length!==tt[nt].channels)throw new Error("channel and label counts mismatch: "+nt);const{channels:st,labels:dt}=tt[nt];delete tt[nt].channels,delete tt[nt].labels,Object.defineProperty(tt[nt],"channels",{value:st}),Object.defineProperty(tt[nt],"labels",{value:dt})}tt.rgb.hsl=function(nt){const st=nt[0]/255,dt=nt[1]/255,ft=nt[2]/255,ht=Math.min(st,dt,ft),mt=Math.max(st,dt,ft),bt=mt-ht;let St,Et;mt===ht?St=0:st===mt?St=(dt-ft)/bt:dt===mt?St=2+(ft-st)/bt:ft===mt&&(St=4+(st-dt)/bt),St=Math.min(St*60,360),St<0&&(St+=360);const Ct=(ht+mt)/2;return mt===ht?Et=0:Ct<=.5?Et=bt/(mt+ht):Et=bt/(2-mt-ht),[St,Et*100,Ct*100]},tt.rgb.hsv=function(nt){let st,dt,ft,ht,mt;const bt=nt[0]/255,St=nt[1]/255,Et=nt[2]/255,Ct=Math.max(bt,St,Et),Rt=Ct-Math.min(bt,St,Et),Tt=function(wt){return(Ct-wt)/6/Rt+1/2};return Rt===0?(ht=0,mt=0):(mt=Rt/Ct,st=Tt(bt),dt=Tt(St),ft=Tt(Et),bt===Ct?ht=ft-dt:St===Ct?ht=1/3+st-ft:Et===Ct&&(ht=2/3+dt-st),ht<0?ht+=1:ht>1&&(ht-=1)),[ht*360,mt*100,Ct*100]},tt.rgb.hwb=function(nt){const st=nt[0],dt=nt[1];let ft=nt[2];const ht=tt.rgb.hsl(nt)[0],mt=1/255*Math.min(st,Math.min(dt,ft));return ft=1-1/255*Math.max(st,Math.max(dt,ft)),[ht,mt*100,ft*100]},tt.rgb.cmyk=function(nt){const st=nt[0]/255,dt=nt[1]/255,ft=nt[2]/255,ht=Math.min(1-st,1-dt,1-ft),mt=(1-st-ht)/(1-ht)||0,bt=(1-dt-ht)/(1-ht)||0,St=(1-ft-ht)/(1-ht)||0;return[mt*100,bt*100,St*100,ht*100]};function rt(nt,st){return(nt[0]-st[0])**2+(nt[1]-st[1])**2+(nt[2]-st[2])**2}return tt.rgb.keyword=function(nt){const st=_e[nt];if(st)return st;let dt=1/0,ft;for(const ht of Object.keys(et)){const mt=et[ht],bt=rt(nt,mt);bt<dt&&(dt=bt,ft=ht)}return ft},tt.keyword.rgb=function(nt){return et[nt]},tt.rgb.xyz=function(nt){let st=nt[0]/255,dt=nt[1]/255,ft=nt[2]/255;st=st>.04045?((st+.055)/1.055)**2.4:st/12.92,dt=dt>.04045?((dt+.055)/1.055)**2.4:dt/12.92,ft=ft>.04045?((ft+.055)/1.055)**2.4:ft/12.92;const ht=st*.4124+dt*.3576+ft*.1805,mt=st*.2126+dt*.7152+ft*.0722,bt=st*.0193+dt*.1192+ft*.9505;return[ht*100,mt*100,bt*100]},tt.rgb.lab=function(nt){const st=tt.rgb.xyz(nt);let dt=st[0],ft=st[1],ht=st[2];dt/=95.047,ft/=100,ht/=108.883,dt=dt>.008856?dt**(1/3):7.787*dt+16/116,ft=ft>.008856?ft**(1/3):7.787*ft+16/116,ht=ht>.008856?ht**(1/3):7.787*ht+16/116;const mt=116*ft-16,bt=500*(dt-ft),St=200*(ft-ht);return[mt,bt,St]},tt.hsl.rgb=function(nt){const st=nt[0]/360,dt=nt[1]/100,ft=nt[2]/100;let ht,mt,bt;if(dt===0)return bt=ft*255,[bt,bt,bt];ft<.5?ht=ft*(1+dt):ht=ft+dt-ft*dt;const St=2*ft-ht,Et=[0,0,0];for(let Ct=0;Ct<3;Ct++)mt=st+1/3*-(Ct-1),mt<0&&mt++,mt>1&&mt--,6*mt<1?bt=St+(ht-St)*6*mt:2*mt<1?bt=ht:3*mt<2?bt=St+(ht-St)*(2/3-mt)*6:bt=St,Et[Ct]=bt*255;return Et},tt.hsl.hsv=function(nt){const st=nt[0];let dt=nt[1]/100,ft=nt[2]/100,ht=dt;const mt=Math.max(ft,.01);ft*=2,dt*=ft<=1?ft:2-ft,ht*=mt<=1?mt:2-mt;const bt=(ft+dt)/2,St=ft===0?2*ht/(mt+ht):2*dt/(ft+dt);return[st,St*100,bt*100]},tt.hsv.rgb=function(nt){const st=nt[0]/60,dt=nt[1]/100;let ft=nt[2]/100;const ht=Math.floor(st)%6,mt=st-Math.floor(st),bt=255*ft*(1-dt),St=255*ft*(1-dt*mt),Et=255*ft*(1-dt*(1-mt));switch(ft*=255,ht){case 0:return[ft,Et,bt];case 1:return[St,ft,bt];case 2:return[bt,ft,Et];case 3:return[bt,St,ft];case 4:return[Et,bt,ft];case 5:return[ft,bt,St]}},tt.hsv.hsl=function(nt){const st=nt[0],dt=nt[1]/100,ft=nt[2]/100,ht=Math.max(ft,.01);let mt,bt;bt=(2-dt)*ft;const St=(2-dt)*ht;return mt=dt*ht,mt/=St<=1?St:2-St,mt=mt||0,bt/=2,[st,mt*100,bt*100]},tt.hwb.rgb=function(nt){const st=nt[0]/360;let dt=nt[1]/100,ft=nt[2]/100;const ht=dt+ft;let mt;ht>1&&(dt/=ht,ft/=ht);const bt=Math.floor(6*st),St=1-ft;mt=6*st-bt,(bt&1)!==0&&(mt=1-mt);const Et=dt+mt*(St-dt);let Ct,Rt,Tt;switch(bt){default:case 6:case 0:Ct=St,Rt=Et,Tt=dt;break;case 1:Ct=Et,Rt=St,Tt=dt;break;case 2:Ct=dt,Rt=St,Tt=Et;break;case 3:Ct=dt,Rt=Et,Tt=St;break;case 4:Ct=Et,Rt=dt,Tt=St;break;case 5:Ct=St,Rt=dt,Tt=Et;break}return[Ct*255,Rt*255,Tt*255]},tt.cmyk.rgb=function(nt){const st=nt[0]/100,dt=nt[1]/100,ft=nt[2]/100,ht=nt[3]/100,mt=1-Math.min(1,st*(1-ht)+ht),bt=1-Math.min(1,dt*(1-ht)+ht),St=1-Math.min(1,ft*(1-ht)+ht);return[mt*255,bt*255,St*255]},tt.xyz.rgb=function(nt){const st=nt[0]/100,dt=nt[1]/100,ft=nt[2]/100;let ht,mt,bt;return ht=st*3.2406+dt*-1.5372+ft*-.4986,mt=st*-.9689+dt*1.8758+ft*.0415,bt=st*.0557+dt*-.204+ft*1.057,ht=ht>.0031308?1.055*ht**(1/2.4)-.055:ht*12.92,mt=mt>.0031308?1.055*mt**(1/2.4)-.055:mt*12.92,bt=bt>.0031308?1.055*bt**(1/2.4)-.055:bt*12.92,ht=Math.min(Math.max(0,ht),1),mt=Math.min(Math.max(0,mt),1),bt=Math.min(Math.max(0,bt),1),[ht*255,mt*255,bt*255]},tt.xyz.lab=function(nt){let st=nt[0],dt=nt[1],ft=nt[2];st/=95.047,dt/=100,ft/=108.883,st=st>.008856?st**(1/3):7.787*st+16/116,dt=dt>.008856?dt**(1/3):7.787*dt+16/116,ft=ft>.008856?ft**(1/3):7.787*ft+16/116;const ht=116*dt-16,mt=500*(st-dt),bt=200*(dt-ft);return[ht,mt,bt]},tt.lab.xyz=function(nt){const st=nt[0],dt=nt[1],ft=nt[2];let ht,mt,bt;mt=(st+16)/116,ht=dt/500+mt,bt=mt-ft/200;const St=mt**3,Et=ht**3,Ct=bt**3;return mt=St>.008856?St:(mt-16/116)/7.787,ht=Et>.008856?Et:(ht-16/116)/7.787,bt=Ct>.008856?Ct:(bt-16/116)/7.787,ht*=95.047,mt*=100,bt*=108.883,[ht,mt,bt]},tt.lab.lch=function(nt){const st=nt[0],dt=nt[1],ft=nt[2];let ht;ht=Math.atan2(ft,dt)*360/2/Math.PI,ht<0&&(ht+=360);const bt=Math.sqrt(dt*dt+ft*ft);return[st,bt,ht]},tt.lch.lab=function(nt){const st=nt[0],dt=nt[1],ht=nt[2]/360*2*Math.PI,mt=dt*Math.cos(ht),bt=dt*Math.sin(ht);return[st,mt,bt]},tt.rgb.ansi16=function(nt,st=null){const[dt,ft,ht]=nt;let mt=st===null?tt.rgb.hsv(nt)[2]:st;if(mt=Math.round(mt/50),mt===0)return 30;let bt=30+(Math.round(ht/255)<<2|Math.round(ft/255)<<1|Math.round(dt/255));return mt===2&&(bt+=60),bt},tt.hsv.ansi16=function(nt){return tt.rgb.ansi16(tt.hsv.rgb(nt),nt[2])},tt.rgb.ansi256=function(nt){const st=nt[0],dt=nt[1],ft=nt[2];return st===dt&&dt===ft?st<8?16:st>248?231:Math.round((st-8)/247*24)+232:16+36*Math.round(st/255*5)+6*Math.round(dt/255*5)+Math.round(ft/255*5)},tt.ansi16.rgb=function(nt){let st=nt%10;if(st===0||st===7)return nt>50&&(st+=3.5),st=st/10.5*255,[st,st,st];const dt=(~~(nt>50)+1)*.5,ft=(st&1)*dt*255,ht=(st>>1&1)*dt*255,mt=(st>>2&1)*dt*255;return[ft,ht,mt]},tt.ansi256.rgb=function(nt){if(nt>=232){const mt=(nt-232)*10+8;return[mt,mt,mt]}nt-=16;let st;const dt=Math.floor(nt/36)/5*255,ft=Math.floor((st=nt%36)/6)/5*255,ht=st%6/5*255;return[dt,ft,ht]},tt.rgb.hex=function(nt){const dt=(((Math.round(nt[0])&255)<<16)+((Math.round(nt[1])&255)<<8)+(Math.round(nt[2])&255)).toString(16).toUpperCase();return"000000".substring(dt.length)+dt},tt.hex.rgb=function(nt){const st=nt.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!st)return[0,0,0];let dt=st[0];st[0].length===3&&(dt=dt.split("").map(St=>St+St).join(""));const ft=parseInt(dt,16),ht=ft>>16&255,mt=ft>>8&255,bt=ft&255;return[ht,mt,bt]},tt.rgb.hcg=function(nt){const st=nt[0]/255,dt=nt[1]/255,ft=nt[2]/255,ht=Math.max(Math.max(st,dt),ft),mt=Math.min(Math.min(st,dt),ft),bt=ht-mt;let St,Et;return bt<1?St=mt/(1-bt):St=0,bt<=0?Et=0:ht===st?Et=(dt-ft)/bt%6:ht===dt?Et=2+(ft-st)/bt:Et=4+(st-dt)/bt,Et/=6,Et%=1,[Et*360,bt*100,St*100]},tt.hsl.hcg=function(nt){const st=nt[1]/100,dt=nt[2]/100,ft=dt<.5?2*st*dt:2*st*(1-dt);let ht=0;return ft<1&&(ht=(dt-.5*ft)/(1-ft)),[nt[0],ft*100,ht*100]},tt.hsv.hcg=function(nt){const st=nt[1]/100,dt=nt[2]/100,ft=st*dt;let ht=0;return ft<1&&(ht=(dt-ft)/(1-ft)),[nt[0],ft*100,ht*100]},tt.hcg.rgb=function(nt){const st=nt[0]/360,dt=nt[1]/100,ft=nt[2]/100;if(dt===0)return[ft*255,ft*255,ft*255];const ht=[0,0,0],mt=st%1*6,bt=mt%1,St=1-bt;let Et=0;switch(Math.floor(mt)){case 0:ht[0]=1,ht[1]=bt,ht[2]=0;break;case 1:ht[0]=St,ht[1]=1,ht[2]=0;break;case 2:ht[0]=0,ht[1]=1,ht[2]=bt;break;case 3:ht[0]=0,ht[1]=St,ht[2]=1;break;case 4:ht[0]=bt,ht[1]=0,ht[2]=1;break;default:ht[0]=1,ht[1]=0,ht[2]=St}return Et=(1-dt)*ft,[(dt*ht[0]+Et)*255,(dt*ht[1]+Et)*255,(dt*ht[2]+Et)*255]},tt.hcg.hsv=function(nt){const st=nt[1]/100,dt=nt[2]/100,ft=st+dt*(1-st);let ht=0;return ft>0&&(ht=st/ft),[nt[0],ht*100,ft*100]},tt.hcg.hsl=function(nt){const st=nt[1]/100,ft=nt[2]/100*(1-st)+.5*st;let ht=0;return ft>0&&ft<.5?ht=st/(2*ft):ft>=.5&&ft<1&&(ht=st/(2*(1-ft))),[nt[0],ht*100,ft*100]},tt.hcg.hwb=function(nt){const st=nt[1]/100,dt=nt[2]/100,ft=st+dt*(1-st);return[nt[0],(ft-st)*100,(1-ft)*100]},tt.hwb.hcg=function(nt){const st=nt[1]/100,ft=1-nt[2]/100,ht=ft-st;let mt=0;return ht<1&&(mt=(ft-ht)/(1-ht)),[nt[0],ht*100,mt*100]},tt.apple.rgb=function(nt){return[nt[0]/65535*255,nt[1]/65535*255,nt[2]/65535*255]},tt.rgb.apple=function(nt){return[nt[0]/255*65535,nt[1]/255*65535,nt[2]/255*65535]},tt.gray.rgb=function(nt){return[nt[0]/100*255,nt[0]/100*255,nt[0]/100*255]},tt.gray.hsl=function(nt){return[0,0,nt[0]]},tt.gray.hsv=tt.gray.hsl,tt.gray.hwb=function(nt){return[0,100,nt[0]]},tt.gray.cmyk=function(nt){return[0,0,0,nt[0]]},tt.gray.lab=function(nt){return[nt[0],0,0]},tt.gray.hex=function(nt){const st=Math.round(nt[0]/100*255)&255,ft=((st<<16)+(st<<8)+st).toString(16).toUpperCase();return"000000".substring(ft.length)+ft},tt.rgb.gray=function(nt){return[(nt[0]+nt[1]+nt[2])/3/255*100]},conversions}var route,hasRequiredRoute;function requireRoute(){if(hasRequiredRoute)return route;hasRequiredRoute=1;const et=requireConversions();function _e(){const st={},dt=Object.keys(et);for(let ft=dt.length,ht=0;ht<ft;ht++)st[dt[ht]]={distance:-1,parent:null};return st}function tt(st){const dt=_e(),ft=[st];for(dt[st].distance=0;ft.length;){const ht=ft.pop(),mt=Object.keys(et[ht]);for(let bt=mt.length,St=0;St<bt;St++){const Et=mt[St],Ct=dt[Et];Ct.distance===-1&&(Ct.distance=dt[ht].distance+1,Ct.parent=ht,ft.unshift(Et))}}return dt}function rt(st,dt){return function(ft){return dt(st(ft))}}function nt(st,dt){const ft=[dt[st].parent,st];let ht=et[dt[st].parent][st],mt=dt[st].parent;for(;dt[mt].parent;)ft.unshift(dt[mt].parent),ht=rt(et[dt[mt].parent][mt],ht),mt=dt[mt].parent;return ht.conversion=ft,ht}return route=function(st){const dt=tt(st),ft={},ht=Object.keys(dt);for(let mt=ht.length,bt=0;bt<mt;bt++){const St=ht[bt];dt[St].parent!==null&&(ft[St]=nt(St,dt))}return ft},route}var colorConvert,hasRequiredColorConvert;function requireColorConvert(){if(hasRequiredColorConvert)return colorConvert;hasRequiredColorConvert=1;const et=requireConversions(),_e=requireRoute(),tt={},rt=Object.keys(et);function nt(dt){const ft=function(...ht){const mt=ht[0];return mt==null?mt:(mt.length>1&&(ht=mt),dt(ht))};return"conversion"in dt&&(ft.conversion=dt.conversion),ft}function st(dt){const ft=function(...ht){const mt=ht[0];if(mt==null)return mt;mt.length>1&&(ht=mt);const bt=dt(ht);if(typeof bt=="object")for(let St=bt.length,Et=0;Et<St;Et++)bt[Et]=Math.round(bt[Et]);return bt};return"conversion"in dt&&(ft.conversion=dt.conversion),ft}return rt.forEach(dt=>{tt[dt]={},Object.defineProperty(tt[dt],"channels",{value:et[dt].channels}),Object.defineProperty(tt[dt],"labels",{value:et[dt].labels});const ft=_e(dt);Object.keys(ft).forEach(mt=>{const bt=ft[mt];tt[dt][mt]=st(bt),tt[dt][mt].raw=nt(bt)})}),colorConvert=tt,colorConvert}var color$1,hasRequiredColor;function requireColor(){if(hasRequiredColor)return color$1;hasRequiredColor=1;const et=requireColorString(),_e=requireColorConvert(),tt=["keyword","gray","hex"],rt={};for(const Et of Object.keys(_e))rt[[..._e[Et].labels].sort().join("")]=Et;const nt={};function st(Et,Ct){if(!(this instanceof st))return new st(Et,Ct);if(Ct&&Ct in tt&&(Ct=null),Ct&&!(Ct in _e))throw new Error("Unknown model: "+Ct);let Rt,Tt;if(Et==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(Et instanceof st)this.model=Et.model,this.color=[...Et.color],this.valpha=Et.valpha;else if(typeof Et=="string"){const wt=et.get(Et);if(wt===null)throw new Error("Unable to parse color from string: "+Et);this.model=wt.model,Tt=_e[this.model].channels,this.color=wt.value.slice(0,Tt),this.valpha=typeof wt.value[Tt]=="number"?wt.value[Tt]:1}else if(Et.length>0){this.model=Ct||"rgb",Tt=_e[this.model].channels;const wt=Array.prototype.slice.call(Et,0,Tt);this.color=St(wt,Tt),this.valpha=typeof Et[Tt]=="number"?Et[Tt]:1}else if(typeof Et=="number")this.model="rgb",this.color=[Et>>16&255,Et>>8&255,Et&255],this.valpha=1;else{this.valpha=1;const wt=Object.keys(Et);"alpha"in Et&&(wt.splice(wt.indexOf("alpha"),1),this.valpha=typeof Et.alpha=="number"?Et.alpha:0);const At=wt.sort().join("");if(!(At in rt))throw new Error("Unable to parse color from object: "+JSON.stringify(Et));this.model=rt[At];const{labels:Nt}=_e[this.model],Pt=[];for(Rt=0;Rt<Nt.length;Rt++)Pt.push(Et[Nt[Rt]]);this.color=St(Pt)}if(nt[this.model])for(Tt=_e[this.model].channels,Rt=0;Rt<Tt;Rt++){const wt=nt[this.model][Rt];wt&&(this.color[Rt]=wt(this.color[Rt]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}st.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(Et){let Ct=this.model in et.to?this:this.rgb();Ct=Ct.round(typeof Et=="number"?Et:1);const Rt=Ct.valpha===1?Ct.color:[...Ct.color,this.valpha];return et.to[Ct.model](Rt)},percentString(Et){const Ct=this.rgb().round(typeof Et=="number"?Et:1),Rt=Ct.valpha===1?Ct.color:[...Ct.color,this.valpha];return et.to.rgb.percent(Rt)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const Et={},{channels:Ct}=_e[this.model],{labels:Rt}=_e[this.model];for(let Tt=0;Tt<Ct;Tt++)Et[Rt[Tt]]=this.color[Tt];return this.valpha!==1&&(Et.alpha=this.valpha),Et},unitArray(){const Et=this.rgb().color;return Et[0]/=255,Et[1]/=255,Et[2]/=255,this.valpha!==1&&Et.push(this.valpha),Et},unitObject(){const Et=this.rgb().object();return Et.r/=255,Et.g/=255,Et.b/=255,this.valpha!==1&&(Et.alpha=this.valpha),Et},round(Et){return Et=Math.max(Et||0,0),new st([...this.color.map(ft(Et)),this.valpha],this.model)},alpha(Et){return Et!==void 0?new st([...this.color,Math.max(0,Math.min(1,Et))],this.model):this.valpha},red:ht("rgb",0,mt(255)),green:ht("rgb",1,mt(255)),blue:ht("rgb",2,mt(255)),hue:ht(["hsl","hsv","hsl","hwb","hcg"],0,Et=>(Et%360+360)%360),saturationl:ht("hsl",1,mt(100)),lightness:ht("hsl",2,mt(100)),saturationv:ht("hsv",1,mt(100)),value:ht("hsv",2,mt(100)),chroma:ht("hcg",1,mt(100)),gray:ht("hcg",2,mt(100)),white:ht("hwb",1,mt(100)),wblack:ht("hwb",2,mt(100)),cyan:ht("cmyk",0,mt(100)),magenta:ht("cmyk",1,mt(100)),yellow:ht("cmyk",2,mt(100)),black:ht("cmyk",3,mt(100)),x:ht("xyz",0,mt(95.047)),y:ht("xyz",1,mt(100)),z:ht("xyz",2,mt(108.833)),l:ht("lab",0,mt(100)),a:ht("lab",1),b:ht("lab",2),keyword(Et){return Et!==void 0?new st(Et):_e[this.model].keyword(this.color)},hex(Et){return Et!==void 0?new st(Et):et.to.hex(this.rgb().round().color)},hexa(Et){if(Et!==void 0)return new st(Et);const Ct=this.rgb().round().color;let Rt=Math.round(this.valpha*255).toString(16).toUpperCase();return Rt.length===1&&(Rt="0"+Rt),et.to.hex(Ct)+Rt},rgbNumber(){const Et=this.rgb().color;return(Et[0]&255)<<16|(Et[1]&255)<<8|Et[2]&255},luminosity(){const Et=this.rgb().color,Ct=[];for(const[Rt,Tt]of Et.entries()){const wt=Tt/255;Ct[Rt]=wt<=.04045?wt/12.92:((wt+.055)/1.055)**2.4}return .2126*Ct[0]+.7152*Ct[1]+.0722*Ct[2]},contrast(Et){const Ct=this.luminosity(),Rt=Et.luminosity();return Ct>Rt?(Ct+.05)/(Rt+.05):(Rt+.05)/(Ct+.05)},level(Et){const Ct=this.contrast(Et);return Ct>=7?"AAA":Ct>=4.5?"AA":""},isDark(){const Et=this.rgb().color;return(Et[0]*2126+Et[1]*7152+Et[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const Et=this.rgb();for(let Ct=0;Ct<3;Ct++)Et.color[Ct]=255-Et.color[Ct];return Et},lighten(Et){const Ct=this.hsl();return Ct.color[2]+=Ct.color[2]*Et,Ct},darken(Et){const Ct=this.hsl();return Ct.color[2]-=Ct.color[2]*Et,Ct},saturate(Et){const Ct=this.hsl();return Ct.color[1]+=Ct.color[1]*Et,Ct},desaturate(Et){const Ct=this.hsl();return Ct.color[1]-=Ct.color[1]*Et,Ct},whiten(Et){const Ct=this.hwb();return Ct.color[1]+=Ct.color[1]*Et,Ct},blacken(Et){const Ct=this.hwb();return Ct.color[2]+=Ct.color[2]*Et,Ct},grayscale(){const Et=this.rgb().color,Ct=Et[0]*.3+Et[1]*.59+Et[2]*.11;return st.rgb(Ct,Ct,Ct)},fade(Et){return this.alpha(this.valpha-this.valpha*Et)},opaquer(Et){return this.alpha(this.valpha+this.valpha*Et)},rotate(Et){const Ct=this.hsl();let Rt=Ct.color[0];return Rt=(Rt+Et)%360,Rt=Rt<0?360+Rt:Rt,Ct.color[0]=Rt,Ct},mix(Et,Ct){if(!Et||!Et.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof Et);const Rt=Et.rgb(),Tt=this.rgb(),wt=Ct===void 0?.5:Ct,At=2*wt-1,Nt=Rt.alpha()-Tt.alpha(),Pt=((At*Nt===-1?At:(At+Nt)/(1+At*Nt))+1)/2,It=1-Pt;return st.rgb(Pt*Rt.red()+It*Tt.red(),Pt*Rt.green()+It*Tt.green(),Pt*Rt.blue()+It*Tt.blue(),Rt.alpha()*wt+Tt.alpha()*(1-wt))}};for(const Et of Object.keys(_e)){if(tt.includes(Et))continue;const{channels:Ct}=_e[Et];st.prototype[Et]=function(...Rt){return this.model===Et?new st(this):Rt.length>0?new st(Rt,Et):new st([...bt(_e[this.model][Et].raw(this.color)),this.valpha],Et)},st[Et]=function(...Rt){let Tt=Rt[0];return typeof Tt=="number"&&(Tt=St(Rt,Ct)),new st(Tt,Et)}}function dt(Et,Ct){return Number(Et.toFixed(Ct))}function ft(Et){return function(Ct){return dt(Ct,Et)}}function ht(Et,Ct,Rt){Et=Array.isArray(Et)?Et:[Et];for(const Tt of Et)(nt[Tt]||(nt[Tt]=[]))[Ct]=Rt;return Et=Et[0],function(Tt){let wt;return Tt!==void 0?(Rt&&(Tt=Rt(Tt)),wt=this[Et](),wt.color[Ct]=Tt,wt):(wt=this[Et]().color[Ct],Rt&&(wt=Rt(wt)),wt)}}function mt(Et){return function(Ct){return Math.max(0,Math.min(Et,Ct))}}function bt(Et){return Array.isArray(Et)?Et:[Et]}function St(Et,Ct){for(let Rt=0;Rt<Ct;Rt++)typeof Et[Rt]!="number"&&(Et[Rt]=0);return Et}return color$1=st,color$1}function getAugmentedNamespace(et){if(et.__esModule)return et;var _e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(et).forEach(function(tt){var rt=Object.getOwnPropertyDescriptor(et,tt);Object.defineProperty(_e,tt,rt.get?rt:{enumerable:!0,get:function(){return et[tt]}})}),_e}var global$1$1=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,inited=!1;function init$1(){inited=!0;for(var et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_e=0,tt=et.length;_e<tt;++_e)lookup[_e]=et[_e],revLookup[et.charCodeAt(_e)]=_e;revLookup[45]=62,revLookup[95]=63}function toByteArray(et){inited||init$1();var _e,tt,rt,nt,st,dt,ft=et.length;if(ft%4>0)throw new Error("Invalid string. Length must be a multiple of 4");st=et[ft-2]==="="?2:et[ft-1]==="="?1:0,dt=new Arr(ft*3/4-st),rt=st>0?ft-4:ft;var ht=0;for(_e=0,tt=0;_e<rt;_e+=4,tt+=3)nt=revLookup[et.charCodeAt(_e)]<<18|revLookup[et.charCodeAt(_e+1)]<<12|revLookup[et.charCodeAt(_e+2)]<<6|revLookup[et.charCodeAt(_e+3)],dt[ht++]=nt>>16&255,dt[ht++]=nt>>8&255,dt[ht++]=nt&255;return st===2?(nt=revLookup[et.charCodeAt(_e)]<<2|revLookup[et.charCodeAt(_e+1)]>>4,dt[ht++]=nt&255):st===1&&(nt=revLookup[et.charCodeAt(_e)]<<10|revLookup[et.charCodeAt(_e+1)]<<4|revLookup[et.charCodeAt(_e+2)]>>2,dt[ht++]=nt>>8&255,dt[ht++]=nt&255),dt}function tripletToBase64(et){return lookup[et>>18&63]+lookup[et>>12&63]+lookup[et>>6&63]+lookup[et&63]}function encodeChunk(et,_e,tt){for(var rt,nt=[],st=_e;st<tt;st+=3)rt=(et[st]<<16)+(et[st+1]<<8)+et[st+2],nt.push(tripletToBase64(rt));return nt.join("")}function fromByteArray(et){inited||init$1();for(var _e,tt=et.length,rt=tt%3,nt="",st=[],dt=16383,ft=0,ht=tt-rt;ft<ht;ft+=dt)st.push(encodeChunk(et,ft,ft+dt>ht?ht:ft+dt));return rt===1?(_e=et[tt-1],nt+=lookup[_e>>2],nt+=lookup[_e<<4&63],nt+="=="):rt===2&&(_e=(et[tt-2]<<8)+et[tt-1],nt+=lookup[_e>>10],nt+=lookup[_e>>4&63],nt+=lookup[_e<<2&63],nt+="="),st.push(nt),st.join("")}function read(et,_e,tt,rt,nt){var st,dt,ft=nt*8-rt-1,ht=(1<<ft)-1,mt=ht>>1,bt=-7,St=tt?nt-1:0,Et=tt?-1:1,Ct=et[_e+St];for(St+=Et,st=Ct&(1<<-bt)-1,Ct>>=-bt,bt+=ft;bt>0;st=st*256+et[_e+St],St+=Et,bt-=8);for(dt=st&(1<<-bt)-1,st>>=-bt,bt+=rt;bt>0;dt=dt*256+et[_e+St],St+=Et,bt-=8);if(st===0)st=1-mt;else{if(st===ht)return dt?NaN:(Ct?-1:1)*(1/0);dt=dt+Math.pow(2,rt),st=st-mt}return(Ct?-1:1)*dt*Math.pow(2,st-rt)}function write(et,_e,tt,rt,nt,st){var dt,ft,ht,mt=st*8-nt-1,bt=(1<<mt)-1,St=bt>>1,Et=nt===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ct=rt?0:st-1,Rt=rt?1:-1,Tt=_e<0||_e===0&&1/_e<0?1:0;for(_e=Math.abs(_e),isNaN(_e)||_e===1/0?(ft=isNaN(_e)?1:0,dt=bt):(dt=Math.floor(Math.log(_e)/Math.LN2),_e*(ht=Math.pow(2,-dt))<1&&(dt--,ht*=2),dt+St>=1?_e+=Et/ht:_e+=Et*Math.pow(2,1-St),_e*ht>=2&&(dt++,ht/=2),dt+St>=bt?(ft=0,dt=bt):dt+St>=1?(ft=(_e*ht-1)*Math.pow(2,nt),dt=dt+St):(ft=_e*Math.pow(2,St-1)*Math.pow(2,nt),dt=0));nt>=8;et[tt+Ct]=ft&255,Ct+=Rt,ft/=256,nt-=8);for(dt=dt<<nt|ft,mt+=nt;mt>0;et[tt+Ct]=dt&255,Ct+=Rt,dt/=256,mt-=8);et[tt+Ct-Rt]|=Tt*128}var toString$1={}.toString,isArray$4=Array.isArray||function(et){return toString$1.call(et)=="[object Array]"};/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var INSPECT_MAX_BYTES=50;Buffer$1.TYPED_ARRAY_SUPPORT=global$1$1.TYPED_ARRAY_SUPPORT!==void 0?global$1$1.TYPED_ARRAY_SUPPORT:!0;function kMaxLength(){return Buffer$1.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(et,_e){if(kMaxLength()<_e)throw new RangeError("Invalid typed array length");return Buffer$1.TYPED_ARRAY_SUPPORT?(et=new Uint8Array(_e),et.__proto__=Buffer$1.prototype):(et===null&&(et=new Buffer$1(_e)),et.length=_e),et}function Buffer$1(et,_e,tt){if(!Buffer$1.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer$1))return new Buffer$1(et,_e,tt);if(typeof et=="number"){if(typeof _e=="string")throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,et)}return from$2(this,et,_e,tt)}Buffer$1.poolSize=8192;Buffer$1._augment=function(et){return et.__proto__=Buffer$1.prototype,et};function from$2(et,_e,tt,rt){if(typeof _e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&_e instanceof ArrayBuffer?fromArrayBuffer(et,_e,tt,rt):typeof _e=="string"?fromString(et,_e,tt):fromObject(et,_e)}Buffer$1.from=function(et,_e,tt){return from$2(null,et,_e,tt)};Buffer$1.TYPED_ARRAY_SUPPORT&&(Buffer$1.prototype.__proto__=Uint8Array.prototype,Buffer$1.__proto__=Uint8Array);function assertSize(et){if(typeof et!="number")throw new TypeError('"size" argument must be a number');if(et<0)throw new RangeError('"size" argument must not be negative')}function alloc(et,_e,tt,rt){return assertSize(_e),_e<=0?createBuffer(et,_e):tt!==void 0?typeof rt=="string"?createBuffer(et,_e).fill(tt,rt):createBuffer(et,_e).fill(tt):createBuffer(et,_e)}Buffer$1.alloc=function(et,_e,tt){return alloc(null,et,_e,tt)};function allocUnsafe(et,_e){if(assertSize(_e),et=createBuffer(et,_e<0?0:checked(_e)|0),!Buffer$1.TYPED_ARRAY_SUPPORT)for(var tt=0;tt<_e;++tt)et[tt]=0;return et}Buffer$1.allocUnsafe=function(et){return allocUnsafe(null,et)};Buffer$1.allocUnsafeSlow=function(et){return allocUnsafe(null,et)};function fromString(et,_e,tt){if((typeof tt!="string"||tt==="")&&(tt="utf8"),!Buffer$1.isEncoding(tt))throw new TypeError('"encoding" must be a valid string encoding');var rt=byteLength(_e,tt)|0;et=createBuffer(et,rt);var nt=et.write(_e,tt);return nt!==rt&&(et=et.slice(0,nt)),et}function fromArrayLike(et,_e){var tt=_e.length<0?0:checked(_e.length)|0;et=createBuffer(et,tt);for(var rt=0;rt<tt;rt+=1)et[rt]=_e[rt]&255;return et}function fromArrayBuffer(et,_e,tt,rt){if(_e.byteLength,tt<0||_e.byteLength<tt)throw new RangeError("'offset' is out of bounds");if(_e.byteLength<tt+(rt||0))throw new RangeError("'length' is out of bounds");return tt===void 0&&rt===void 0?_e=new Uint8Array(_e):rt===void 0?_e=new Uint8Array(_e,tt):_e=new Uint8Array(_e,tt,rt),Buffer$1.TYPED_ARRAY_SUPPORT?(et=_e,et.__proto__=Buffer$1.prototype):et=fromArrayLike(et,_e),et}function fromObject(et,_e){if(internalIsBuffer(_e)){var tt=checked(_e.length)|0;return et=createBuffer(et,tt),et.length===0||_e.copy(et,0,0,tt),et}if(_e){if(typeof ArrayBuffer<"u"&&_e.buffer instanceof ArrayBuffer||"length"in _e)return typeof _e.length!="number"||isnan(_e.length)?createBuffer(et,0):fromArrayLike(et,_e);if(_e.type==="Buffer"&&isArray$4(_e.data))return fromArrayLike(et,_e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(et){if(et>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return et|0}Buffer$1.isBuffer=isBuffer;function internalIsBuffer(et){return!!(et!=null&&et._isBuffer)}Buffer$1.compare=function(_e,tt){if(!internalIsBuffer(_e)||!internalIsBuffer(tt))throw new TypeError("Arguments must be Buffers");if(_e===tt)return 0;for(var rt=_e.length,nt=tt.length,st=0,dt=Math.min(rt,nt);st<dt;++st)if(_e[st]!==tt[st]){rt=_e[st],nt=tt[st];break}return rt<nt?-1:nt<rt?1:0};Buffer$1.isEncoding=function(_e){switch(String(_e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};Buffer$1.concat=function(_e,tt){if(!isArray$4(_e))throw new TypeError('"list" argument must be an Array of Buffers');if(_e.length===0)return Buffer$1.alloc(0);var rt;if(tt===void 0)for(tt=0,rt=0;rt<_e.length;++rt)tt+=_e[rt].length;var nt=Buffer$1.allocUnsafe(tt),st=0;for(rt=0;rt<_e.length;++rt){var dt=_e[rt];if(!internalIsBuffer(dt))throw new TypeError('"list" argument must be an Array of Buffers');dt.copy(nt,st),st+=dt.length}return nt};function byteLength(et,_e){if(internalIsBuffer(et))return et.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(et)||et instanceof ArrayBuffer))return et.byteLength;typeof et!="string"&&(et=""+et);var tt=et.length;if(tt===0)return 0;for(var rt=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return tt;case"utf8":case"utf-8":case void 0:return utf8ToBytes(et).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt*2;case"hex":return tt>>>1;case"base64":return base64ToBytes(et).length;default:if(rt)return utf8ToBytes(et).length;_e=(""+_e).toLowerCase(),rt=!0}}Buffer$1.byteLength=byteLength;function slowToString(et,_e,tt){var rt=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((tt===void 0||tt>this.length)&&(tt=this.length),tt<=0)||(tt>>>=0,_e>>>=0,tt<=_e))return"";for(et||(et="utf8");;)switch(et){case"hex":return hexSlice(this,_e,tt);case"utf8":case"utf-8":return utf8Slice(this,_e,tt);case"ascii":return asciiSlice(this,_e,tt);case"latin1":case"binary":return latin1Slice(this,_e,tt);case"base64":return base64Slice(this,_e,tt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,_e,tt);default:if(rt)throw new TypeError("Unknown encoding: "+et);et=(et+"").toLowerCase(),rt=!0}}Buffer$1.prototype._isBuffer=!0;function swap(et,_e,tt){var rt=et[_e];et[_e]=et[tt],et[tt]=rt}Buffer$1.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var tt=0;tt<_e;tt+=2)swap(this,tt,tt+1);return this};Buffer$1.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var tt=0;tt<_e;tt+=4)swap(this,tt,tt+3),swap(this,tt+1,tt+2);return this};Buffer$1.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var tt=0;tt<_e;tt+=8)swap(this,tt,tt+7),swap(this,tt+1,tt+6),swap(this,tt+2,tt+5),swap(this,tt+3,tt+4);return this};Buffer$1.prototype.toString=function(){var _e=this.length|0;return _e===0?"":arguments.length===0?utf8Slice(this,0,_e):slowToString.apply(this,arguments)};Buffer$1.prototype.equals=function(_e){if(!internalIsBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:Buffer$1.compare(this,_e)===0};Buffer$1.prototype.inspect=function(){var _e="",tt=INSPECT_MAX_BYTES;return this.length>0&&(_e=this.toString("hex",0,tt).match(/.{2}/g).join(" "),this.length>tt&&(_e+=" ... ")),"<Buffer "+_e+">"};Buffer$1.prototype.compare=function(_e,tt,rt,nt,st){if(!internalIsBuffer(_e))throw new TypeError("Argument must be a Buffer");if(tt===void 0&&(tt=0),rt===void 0&&(rt=_e?_e.length:0),nt===void 0&&(nt=0),st===void 0&&(st=this.length),tt<0||rt>_e.length||nt<0||st>this.length)throw new RangeError("out of range index");if(nt>=st&&tt>=rt)return 0;if(nt>=st)return-1;if(tt>=rt)return 1;if(tt>>>=0,rt>>>=0,nt>>>=0,st>>>=0,this===_e)return 0;for(var dt=st-nt,ft=rt-tt,ht=Math.min(dt,ft),mt=this.slice(nt,st),bt=_e.slice(tt,rt),St=0;St<ht;++St)if(mt[St]!==bt[St]){dt=mt[St],ft=bt[St];break}return dt<ft?-1:ft<dt?1:0};function bidirectionalIndexOf(et,_e,tt,rt,nt){if(et.length===0)return-1;if(typeof tt=="string"?(rt=tt,tt=0):tt>2147483647?tt=2147483647:tt<-2147483648&&(tt=-2147483648),tt=+tt,isNaN(tt)&&(tt=nt?0:et.length-1),tt<0&&(tt=et.length+tt),tt>=et.length){if(nt)return-1;tt=et.length-1}else if(tt<0)if(nt)tt=0;else return-1;if(typeof _e=="string"&&(_e=Buffer$1.from(_e,rt)),internalIsBuffer(_e))return _e.length===0?-1:arrayIndexOf(et,_e,tt,rt,nt);if(typeof _e=="number")return _e=_e&255,Buffer$1.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?nt?Uint8Array.prototype.indexOf.call(et,_e,tt):Uint8Array.prototype.lastIndexOf.call(et,_e,tt):arrayIndexOf(et,[_e],tt,rt,nt);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(et,_e,tt,rt,nt){var st=1,dt=et.length,ft=_e.length;if(rt!==void 0&&(rt=String(rt).toLowerCase(),rt==="ucs2"||rt==="ucs-2"||rt==="utf16le"||rt==="utf-16le")){if(et.length<2||_e.length<2)return-1;st=2,dt/=2,ft/=2,tt/=2}function ht(Ct,Rt){return st===1?Ct[Rt]:Ct.readUInt16BE(Rt*st)}var mt;if(nt){var bt=-1;for(mt=tt;mt<dt;mt++)if(ht(et,mt)===ht(_e,bt===-1?0:mt-bt)){if(bt===-1&&(bt=mt),mt-bt+1===ft)return bt*st}else bt!==-1&&(mt-=mt-bt),bt=-1}else for(tt+ft>dt&&(tt=dt-ft),mt=tt;mt>=0;mt--){for(var St=!0,Et=0;Et<ft;Et++)if(ht(et,mt+Et)!==ht(_e,Et)){St=!1;break}if(St)return mt}return-1}Buffer$1.prototype.includes=function(_e,tt,rt){return this.indexOf(_e,tt,rt)!==-1};Buffer$1.prototype.indexOf=function(_e,tt,rt){return bidirectionalIndexOf(this,_e,tt,rt,!0)};Buffer$1.prototype.lastIndexOf=function(_e,tt,rt){return bidirectionalIndexOf(this,_e,tt,rt,!1)};function hexWrite(et,_e,tt,rt){tt=Number(tt)||0;var nt=et.length-tt;rt?(rt=Number(rt),rt>nt&&(rt=nt)):rt=nt;var st=_e.length;if(st%2!==0)throw new TypeError("Invalid hex string");rt>st/2&&(rt=st/2);for(var dt=0;dt<rt;++dt){var ft=parseInt(_e.substr(dt*2,2),16);if(isNaN(ft))return dt;et[tt+dt]=ft}return dt}function utf8Write(et,_e,tt,rt){return blitBuffer(utf8ToBytes(_e,et.length-tt),et,tt,rt)}function asciiWrite(et,_e,tt,rt){return blitBuffer(asciiToBytes(_e),et,tt,rt)}function latin1Write(et,_e,tt,rt){return asciiWrite(et,_e,tt,rt)}function base64Write(et,_e,tt,rt){return blitBuffer(base64ToBytes(_e),et,tt,rt)}function ucs2Write(et,_e,tt,rt){return blitBuffer(utf16leToBytes(_e,et.length-tt),et,tt,rt)}Buffer$1.prototype.write=function(_e,tt,rt,nt){if(tt===void 0)nt="utf8",rt=this.length,tt=0;else if(rt===void 0&&typeof tt=="string")nt=tt,rt=this.length,tt=0;else if(isFinite(tt))tt=tt|0,isFinite(rt)?(rt=rt|0,nt===void 0&&(nt="utf8")):(nt=rt,rt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var st=this.length-tt;if((rt===void 0||rt>st)&&(rt=st),_e.length>0&&(rt<0||tt<0)||tt>this.length)throw new RangeError("Attempt to write outside buffer bounds");nt||(nt="utf8");for(var dt=!1;;)switch(nt){case"hex":return hexWrite(this,_e,tt,rt);case"utf8":case"utf-8":return utf8Write(this,_e,tt,rt);case"ascii":return asciiWrite(this,_e,tt,rt);case"latin1":case"binary":return latin1Write(this,_e,tt,rt);case"base64":return base64Write(this,_e,tt,rt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,_e,tt,rt);default:if(dt)throw new TypeError("Unknown encoding: "+nt);nt=(""+nt).toLowerCase(),dt=!0}};Buffer$1.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(et,_e,tt){return _e===0&&tt===et.length?fromByteArray(et):fromByteArray(et.slice(_e,tt))}function utf8Slice(et,_e,tt){tt=Math.min(et.length,tt);for(var rt=[],nt=_e;nt<tt;){var st=et[nt],dt=null,ft=st>239?4:st>223?3:st>191?2:1;if(nt+ft<=tt){var ht,mt,bt,St;switch(ft){case 1:st<128&&(dt=st);break;case 2:ht=et[nt+1],(ht&192)===128&&(St=(st&31)<<6|ht&63,St>127&&(dt=St));break;case 3:ht=et[nt+1],mt=et[nt+2],(ht&192)===128&&(mt&192)===128&&(St=(st&15)<<12|(ht&63)<<6|mt&63,St>2047&&(St<55296||St>57343)&&(dt=St));break;case 4:ht=et[nt+1],mt=et[nt+2],bt=et[nt+3],(ht&192)===128&&(mt&192)===128&&(bt&192)===128&&(St=(st&15)<<18|(ht&63)<<12|(mt&63)<<6|bt&63,St>65535&&St<1114112&&(dt=St))}}dt===null?(dt=65533,ft=1):dt>65535&&(dt-=65536,rt.push(dt>>>10&1023|55296),dt=56320|dt&1023),rt.push(dt),nt+=ft}return decodeCodePointsArray(rt)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(et){var _e=et.length;if(_e<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,et);for(var tt="",rt=0;rt<_e;)tt+=String.fromCharCode.apply(String,et.slice(rt,rt+=MAX_ARGUMENTS_LENGTH));return tt}function asciiSlice(et,_e,tt){var rt="";tt=Math.min(et.length,tt);for(var nt=_e;nt<tt;++nt)rt+=String.fromCharCode(et[nt]&127);return rt}function latin1Slice(et,_e,tt){var rt="";tt=Math.min(et.length,tt);for(var nt=_e;nt<tt;++nt)rt+=String.fromCharCode(et[nt]);return rt}function hexSlice(et,_e,tt){var rt=et.length;(!_e||_e<0)&&(_e=0),(!tt||tt<0||tt>rt)&&(tt=rt);for(var nt="",st=_e;st<tt;++st)nt+=toHex$1(et[st]);return nt}function utf16leSlice(et,_e,tt){for(var rt=et.slice(_e,tt),nt="",st=0;st<rt.length;st+=2)nt+=String.fromCharCode(rt[st]+rt[st+1]*256);return nt}Buffer$1.prototype.slice=function(_e,tt){var rt=this.length;_e=~~_e,tt=tt===void 0?rt:~~tt,_e<0?(_e+=rt,_e<0&&(_e=0)):_e>rt&&(_e=rt),tt<0?(tt+=rt,tt<0&&(tt=0)):tt>rt&&(tt=rt),tt<_e&&(tt=_e);var nt;if(Buffer$1.TYPED_ARRAY_SUPPORT)nt=this.subarray(_e,tt),nt.__proto__=Buffer$1.prototype;else{var st=tt-_e;nt=new Buffer$1(st,void 0);for(var dt=0;dt<st;++dt)nt[dt]=this[dt+_e]}return nt};function checkOffset(et,_e,tt){if(et%1!==0||et<0)throw new RangeError("offset is not uint");if(et+_e>tt)throw new RangeError("Trying to access beyond buffer length")}Buffer$1.prototype.readUIntLE=function(_e,tt,rt){_e=_e|0,tt=tt|0,rt||checkOffset(_e,tt,this.length);for(var nt=this[_e],st=1,dt=0;++dt<tt&&(st*=256);)nt+=this[_e+dt]*st;return nt};Buffer$1.prototype.readUIntBE=function(_e,tt,rt){_e=_e|0,tt=tt|0,rt||checkOffset(_e,tt,this.length);for(var nt=this[_e+--tt],st=1;tt>0&&(st*=256);)nt+=this[_e+--tt]*st;return nt};Buffer$1.prototype.readUInt8=function(_e,tt){return tt||checkOffset(_e,1,this.length),this[_e]};Buffer$1.prototype.readUInt16LE=function(_e,tt){return tt||checkOffset(_e,2,this.length),this[_e]|this[_e+1]<<8};Buffer$1.prototype.readUInt16BE=function(_e,tt){return tt||checkOffset(_e,2,this.length),this[_e]<<8|this[_e+1]};Buffer$1.prototype.readUInt32LE=function(_e,tt){return tt||checkOffset(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216};Buffer$1.prototype.readUInt32BE=function(_e,tt){return tt||checkOffset(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])};Buffer$1.prototype.readIntLE=function(_e,tt,rt){_e=_e|0,tt=tt|0,rt||checkOffset(_e,tt,this.length);for(var nt=this[_e],st=1,dt=0;++dt<tt&&(st*=256);)nt+=this[_e+dt]*st;return st*=128,nt>=st&&(nt-=Math.pow(2,8*tt)),nt};Buffer$1.prototype.readIntBE=function(_e,tt,rt){_e=_e|0,tt=tt|0,rt||checkOffset(_e,tt,this.length);for(var nt=tt,st=1,dt=this[_e+--nt];nt>0&&(st*=256);)dt+=this[_e+--nt]*st;return st*=128,dt>=st&&(dt-=Math.pow(2,8*tt)),dt};Buffer$1.prototype.readInt8=function(_e,tt){return tt||checkOffset(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]};Buffer$1.prototype.readInt16LE=function(_e,tt){tt||checkOffset(_e,2,this.length);var rt=this[_e]|this[_e+1]<<8;return rt&32768?rt|4294901760:rt};Buffer$1.prototype.readInt16BE=function(_e,tt){tt||checkOffset(_e,2,this.length);var rt=this[_e+1]|this[_e]<<8;return rt&32768?rt|4294901760:rt};Buffer$1.prototype.readInt32LE=function(_e,tt){return tt||checkOffset(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24};Buffer$1.prototype.readInt32BE=function(_e,tt){return tt||checkOffset(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]};Buffer$1.prototype.readFloatLE=function(_e,tt){return tt||checkOffset(_e,4,this.length),read(this,_e,!0,23,4)};Buffer$1.prototype.readFloatBE=function(_e,tt){return tt||checkOffset(_e,4,this.length),read(this,_e,!1,23,4)};Buffer$1.prototype.readDoubleLE=function(_e,tt){return tt||checkOffset(_e,8,this.length),read(this,_e,!0,52,8)};Buffer$1.prototype.readDoubleBE=function(_e,tt){return tt||checkOffset(_e,8,this.length),read(this,_e,!1,52,8)};function checkInt(et,_e,tt,rt,nt,st){if(!internalIsBuffer(et))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>nt||_e<st)throw new RangeError('"value" argument is out of bounds');if(tt+rt>et.length)throw new RangeError("Index out of range")}Buffer$1.prototype.writeUIntLE=function(_e,tt,rt,nt){if(_e=+_e,tt=tt|0,rt=rt|0,!nt){var st=Math.pow(2,8*rt)-1;checkInt(this,_e,tt,rt,st,0)}var dt=1,ft=0;for(this[tt]=_e&255;++ft<rt&&(dt*=256);)this[tt+ft]=_e/dt&255;return tt+rt};Buffer$1.prototype.writeUIntBE=function(_e,tt,rt,nt){if(_e=+_e,tt=tt|0,rt=rt|0,!nt){var st=Math.pow(2,8*rt)-1;checkInt(this,_e,tt,rt,st,0)}var dt=rt-1,ft=1;for(this[tt+dt]=_e&255;--dt>=0&&(ft*=256);)this[tt+dt]=_e/ft&255;return tt+rt};Buffer$1.prototype.writeUInt8=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,1,255,0),Buffer$1.TYPED_ARRAY_SUPPORT||(_e=Math.floor(_e)),this[tt]=_e&255,tt+1};function objectWriteUInt16(et,_e,tt,rt){_e<0&&(_e=65535+_e+1);for(var nt=0,st=Math.min(et.length-tt,2);nt<st;++nt)et[tt+nt]=(_e&255<<8*(rt?nt:1-nt))>>>(rt?nt:1-nt)*8}Buffer$1.prototype.writeUInt16LE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,2,65535,0),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e&255,this[tt+1]=_e>>>8):objectWriteUInt16(this,_e,tt,!0),tt+2};Buffer$1.prototype.writeUInt16BE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,2,65535,0),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e>>>8,this[tt+1]=_e&255):objectWriteUInt16(this,_e,tt,!1),tt+2};function objectWriteUInt32(et,_e,tt,rt){_e<0&&(_e=4294967295+_e+1);for(var nt=0,st=Math.min(et.length-tt,4);nt<st;++nt)et[tt+nt]=_e>>>(rt?nt:3-nt)*8&255}Buffer$1.prototype.writeUInt32LE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,4,4294967295,0),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt+3]=_e>>>24,this[tt+2]=_e>>>16,this[tt+1]=_e>>>8,this[tt]=_e&255):objectWriteUInt32(this,_e,tt,!0),tt+4};Buffer$1.prototype.writeUInt32BE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,4,4294967295,0),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e>>>24,this[tt+1]=_e>>>16,this[tt+2]=_e>>>8,this[tt+3]=_e&255):objectWriteUInt32(this,_e,tt,!1),tt+4};Buffer$1.prototype.writeIntLE=function(_e,tt,rt,nt){if(_e=+_e,tt=tt|0,!nt){var st=Math.pow(2,8*rt-1);checkInt(this,_e,tt,rt,st-1,-st)}var dt=0,ft=1,ht=0;for(this[tt]=_e&255;++dt<rt&&(ft*=256);)_e<0&&ht===0&&this[tt+dt-1]!==0&&(ht=1),this[tt+dt]=(_e/ft>>0)-ht&255;return tt+rt};Buffer$1.prototype.writeIntBE=function(_e,tt,rt,nt){if(_e=+_e,tt=tt|0,!nt){var st=Math.pow(2,8*rt-1);checkInt(this,_e,tt,rt,st-1,-st)}var dt=rt-1,ft=1,ht=0;for(this[tt+dt]=_e&255;--dt>=0&&(ft*=256);)_e<0&&ht===0&&this[tt+dt+1]!==0&&(ht=1),this[tt+dt]=(_e/ft>>0)-ht&255;return tt+rt};Buffer$1.prototype.writeInt8=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,1,127,-128),Buffer$1.TYPED_ARRAY_SUPPORT||(_e=Math.floor(_e)),_e<0&&(_e=255+_e+1),this[tt]=_e&255,tt+1};Buffer$1.prototype.writeInt16LE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,2,32767,-32768),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e&255,this[tt+1]=_e>>>8):objectWriteUInt16(this,_e,tt,!0),tt+2};Buffer$1.prototype.writeInt16BE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,2,32767,-32768),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e>>>8,this[tt+1]=_e&255):objectWriteUInt16(this,_e,tt,!1),tt+2};Buffer$1.prototype.writeInt32LE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,4,2147483647,-2147483648),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e&255,this[tt+1]=_e>>>8,this[tt+2]=_e>>>16,this[tt+3]=_e>>>24):objectWriteUInt32(this,_e,tt,!0),tt+4};Buffer$1.prototype.writeInt32BE=function(_e,tt,rt){return _e=+_e,tt=tt|0,rt||checkInt(this,_e,tt,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),Buffer$1.TYPED_ARRAY_SUPPORT?(this[tt]=_e>>>24,this[tt+1]=_e>>>16,this[tt+2]=_e>>>8,this[tt+3]=_e&255):objectWriteUInt32(this,_e,tt,!1),tt+4};function checkIEEE754(et,_e,tt,rt,nt,st){if(tt+rt>et.length)throw new RangeError("Index out of range");if(tt<0)throw new RangeError("Index out of range")}function writeFloat(et,_e,tt,rt,nt){return nt||checkIEEE754(et,_e,tt,4),write(et,_e,tt,rt,23,4),tt+4}Buffer$1.prototype.writeFloatLE=function(_e,tt,rt){return writeFloat(this,_e,tt,!0,rt)};Buffer$1.prototype.writeFloatBE=function(_e,tt,rt){return writeFloat(this,_e,tt,!1,rt)};function writeDouble(et,_e,tt,rt,nt){return nt||checkIEEE754(et,_e,tt,8),write(et,_e,tt,rt,52,8),tt+8}Buffer$1.prototype.writeDoubleLE=function(_e,tt,rt){return writeDouble(this,_e,tt,!0,rt)};Buffer$1.prototype.writeDoubleBE=function(_e,tt,rt){return writeDouble(this,_e,tt,!1,rt)};Buffer$1.prototype.copy=function(_e,tt,rt,nt){if(rt||(rt=0),!nt&&nt!==0&&(nt=this.length),tt>=_e.length&&(tt=_e.length),tt||(tt=0),nt>0&&nt<rt&&(nt=rt),nt===rt||_e.length===0||this.length===0)return 0;if(tt<0)throw new RangeError("targetStart out of bounds");if(rt<0||rt>=this.length)throw new RangeError("sourceStart out of bounds");if(nt<0)throw new RangeError("sourceEnd out of bounds");nt>this.length&&(nt=this.length),_e.length-tt<nt-rt&&(nt=_e.length-tt+rt);var st=nt-rt,dt;if(this===_e&&rt<tt&&tt<nt)for(dt=st-1;dt>=0;--dt)_e[dt+tt]=this[dt+rt];else if(st<1e3||!Buffer$1.TYPED_ARRAY_SUPPORT)for(dt=0;dt<st;++dt)_e[dt+tt]=this[dt+rt];else Uint8Array.prototype.set.call(_e,this.subarray(rt,rt+st),tt);return st};Buffer$1.prototype.fill=function(_e,tt,rt,nt){if(typeof _e=="string"){if(typeof tt=="string"?(nt=tt,tt=0,rt=this.length):typeof rt=="string"&&(nt=rt,rt=this.length),_e.length===1){var st=_e.charCodeAt(0);st<256&&(_e=st)}if(nt!==void 0&&typeof nt!="string")throw new TypeError("encoding must be a string");if(typeof nt=="string"&&!Buffer$1.isEncoding(nt))throw new TypeError("Unknown encoding: "+nt)}else typeof _e=="number"&&(_e=_e&255);if(tt<0||this.length<tt||this.length<rt)throw new RangeError("Out of range index");if(rt<=tt)return this;tt=tt>>>0,rt=rt===void 0?this.length:rt>>>0,_e||(_e=0);var dt;if(typeof _e=="number")for(dt=tt;dt<rt;++dt)this[dt]=_e;else{var ft=internalIsBuffer(_e)?_e:utf8ToBytes(new Buffer$1(_e,nt).toString()),ht=ft.length;for(dt=0;dt<rt-tt;++dt)this[dt+tt]=ft[dt%ht]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(et){if(et=stringtrim(et).replace(INVALID_BASE64_RE,""),et.length<2)return"";for(;et.length%4!==0;)et=et+"=";return et}function stringtrim(et){return et.trim?et.trim():et.replace(/^\s+|\s+$/g,"")}function toHex$1(et){return et<16?"0"+et.toString(16):et.toString(16)}function utf8ToBytes(et,_e){_e=_e||1/0;for(var tt,rt=et.length,nt=null,st=[],dt=0;dt<rt;++dt){if(tt=et.charCodeAt(dt),tt>55295&&tt<57344){if(!nt){if(tt>56319){(_e-=3)>-1&&st.push(239,191,189);continue}else if(dt+1===rt){(_e-=3)>-1&&st.push(239,191,189);continue}nt=tt;continue}if(tt<56320){(_e-=3)>-1&&st.push(239,191,189),nt=tt;continue}tt=(nt-55296<<10|tt-56320)+65536}else nt&&(_e-=3)>-1&&st.push(239,191,189);if(nt=null,tt<128){if((_e-=1)<0)break;st.push(tt)}else if(tt<2048){if((_e-=2)<0)break;st.push(tt>>6|192,tt&63|128)}else if(tt<65536){if((_e-=3)<0)break;st.push(tt>>12|224,tt>>6&63|128,tt&63|128)}else if(tt<1114112){if((_e-=4)<0)break;st.push(tt>>18|240,tt>>12&63|128,tt>>6&63|128,tt&63|128)}else throw new Error("Invalid code point")}return st}function asciiToBytes(et){for(var _e=[],tt=0;tt<et.length;++tt)_e.push(et.charCodeAt(tt)&255);return _e}function utf16leToBytes(et,_e){for(var tt,rt,nt,st=[],dt=0;dt<et.length&&!((_e-=2)<0);++dt)tt=et.charCodeAt(dt),rt=tt>>8,nt=tt%256,st.push(nt),st.push(rt);return st}function base64ToBytes(et){return toByteArray(base64clean(et))}function blitBuffer(et,_e,tt,rt){for(var nt=0;nt<rt&&!(nt+tt>=_e.length||nt>=et.length);++nt)_e[nt+tt]=et[nt];return nt}function isnan(et){return et!==et}function isBuffer(et){return et!=null&&(!!et._isBuffer||isFastBuffer(et)||isSlowBuffer(et))}function isFastBuffer(et){return!!et.constructor&&typeof et.constructor.isBuffer=="function"&&et.constructor.isBuffer(et)}function isSlowBuffer(et){return typeof et.readFloatLE=="function"&&typeof et.slice=="function"&&isFastBuffer(et.slice(0,0))}var sax$1={},domain;function EventHandlers(){}EventHandlers.prototype=Object.create(null);function EventEmitter$1(){EventEmitter$1.init.call(this)}EventEmitter$1.EventEmitter=EventEmitter$1;EventEmitter$1.usingDomains=!1;EventEmitter$1.prototype.domain=void 0;EventEmitter$1.prototype._events=void 0;EventEmitter$1.prototype._maxListeners=void 0;EventEmitter$1.defaultMaxListeners=10;EventEmitter$1.init=function(){this.domain=null,EventEmitter$1.usingDomains&&domain.active,(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new EventHandlers,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$1.prototype.setMaxListeners=function(_e){if(typeof _e!="number"||_e<0||isNaN(_e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=_e,this};function $getMaxListeners(et){return et._maxListeners===void 0?EventEmitter$1.defaultMaxListeners:et._maxListeners}EventEmitter$1.prototype.getMaxListeners=function(){return $getMaxListeners(this)};function emitNone(et,_e,tt){if(_e)et.call(tt);else for(var rt=et.length,nt=arrayClone(et,rt),st=0;st<rt;++st)nt[st].call(tt)}function emitOne(et,_e,tt,rt){if(_e)et.call(tt,rt);else for(var nt=et.length,st=arrayClone(et,nt),dt=0;dt<nt;++dt)st[dt].call(tt,rt)}function emitTwo(et,_e,tt,rt,nt){if(_e)et.call(tt,rt,nt);else for(var st=et.length,dt=arrayClone(et,st),ft=0;ft<st;++ft)dt[ft].call(tt,rt,nt)}function emitThree(et,_e,tt,rt,nt,st){if(_e)et.call(tt,rt,nt,st);else for(var dt=et.length,ft=arrayClone(et,dt),ht=0;ht<dt;++ht)ft[ht].call(tt,rt,nt,st)}function emitMany(et,_e,tt,rt){if(_e)et.apply(tt,rt);else for(var nt=et.length,st=arrayClone(et,nt),dt=0;dt<nt;++dt)st[dt].apply(tt,rt)}EventEmitter$1.prototype.emit=function(_e){var tt,rt,nt,st,dt,ft,ht,mt=_e==="error";if(ft=this._events,ft)mt=mt&&ft.error==null;else if(!mt)return!1;if(ht=this.domain,mt){if(tt=arguments[1],ht)tt||(tt=new Error('Uncaught, unspecified "error" event')),tt.domainEmitter=this,tt.domain=ht,tt.domainThrown=!1,ht.emit("error",tt);else{if(tt instanceof Error)throw tt;var bt=new Error('Uncaught, unspecified "error" event. ('+tt+")");throw bt.context=tt,bt}return!1}if(rt=ft[_e],!rt)return!1;var St=typeof rt=="function";switch(nt=arguments.length,nt){case 1:emitNone(rt,St,this);break;case 2:emitOne(rt,St,this,arguments[1]);break;case 3:emitTwo(rt,St,this,arguments[1],arguments[2]);break;case 4:emitThree(rt,St,this,arguments[1],arguments[2],arguments[3]);break;default:for(st=new Array(nt-1),dt=1;dt<nt;dt++)st[dt-1]=arguments[dt];emitMany(rt,St,this,st)}return!0};function _addListener(et,_e,tt,rt){var nt,st,dt;if(typeof tt!="function")throw new TypeError('"listener" argument must be a function');if(st=et._events,st?(st.newListener&&(et.emit("newListener",_e,tt.listener?tt.listener:tt),st=et._events),dt=st[_e]):(st=et._events=new EventHandlers,et._eventsCount=0),!dt)dt=st[_e]=tt,++et._eventsCount;else if(typeof dt=="function"?dt=st[_e]=rt?[tt,dt]:[dt,tt]:rt?dt.unshift(tt):dt.push(tt),!dt.warned&&(nt=$getMaxListeners(et),nt&&nt>0&&dt.length>nt)){dt.warned=!0;var ft=new Error("Possible EventEmitter memory leak detected. "+dt.length+" "+_e+" listeners added. Use emitter.setMaxListeners() to increase limit");ft.name="MaxListenersExceededWarning",ft.emitter=et,ft.type=_e,ft.count=dt.length,emitWarning(ft)}return et}function emitWarning(et){typeof console.warn=="function"?console.warn(et):console.log(et)}EventEmitter$1.prototype.addListener=function(_e,tt){return _addListener(this,_e,tt,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function(_e,tt){return _addListener(this,_e,tt,!0)};function _onceWrap(et,_e,tt){var rt=!1;function nt(){et.removeListener(_e,nt),rt||(rt=!0,tt.apply(et,arguments))}return nt.listener=tt,nt}EventEmitter$1.prototype.once=function(_e,tt){if(typeof tt!="function")throw new TypeError('"listener" argument must be a function');return this.on(_e,_onceWrap(this,_e,tt)),this};EventEmitter$1.prototype.prependOnceListener=function(_e,tt){if(typeof tt!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(_e,_onceWrap(this,_e,tt)),this};EventEmitter$1.prototype.removeListener=function(_e,tt){var rt,nt,st,dt,ft;if(typeof tt!="function")throw new TypeError('"listener" argument must be a function');if(nt=this._events,!nt)return this;if(rt=nt[_e],!rt)return this;if(rt===tt||rt.listener&&rt.listener===tt)--this._eventsCount===0?this._events=new EventHandlers:(delete nt[_e],nt.removeListener&&this.emit("removeListener",_e,rt.listener||tt));else if(typeof rt!="function"){for(st=-1,dt=rt.length;dt-- >0;)if(rt[dt]===tt||rt[dt].listener&&rt[dt].listener===tt){ft=rt[dt].listener,st=dt;break}if(st<0)return this;if(rt.length===1){if(rt[0]=void 0,--this._eventsCount===0)return this._events=new EventHandlers,this;delete nt[_e]}else spliceOne(rt,st);nt.removeListener&&this.emit("removeListener",_e,ft||tt)}return this};EventEmitter$1.prototype.removeAllListeners=function(_e){var tt,rt;if(rt=this._events,!rt)return this;if(!rt.removeListener)return arguments.length===0?(this._events=new EventHandlers,this._eventsCount=0):rt[_e]&&(--this._eventsCount===0?this._events=new EventHandlers:delete rt[_e]),this;if(arguments.length===0){for(var nt=Object.keys(rt),st=0,dt;st<nt.length;++st)dt=nt[st],dt!=="removeListener"&&this.removeAllListeners(dt);return this.removeAllListeners("removeListener"),this._events=new EventHandlers,this._eventsCount=0,this}if(tt=rt[_e],typeof tt=="function")this.removeListener(_e,tt);else if(tt)do this.removeListener(_e,tt[tt.length-1]);while(tt[0]);return this};EventEmitter$1.prototype.listeners=function(_e){var tt,rt,nt=this._events;return nt?(tt=nt[_e],tt?typeof tt=="function"?rt=[tt.listener||tt]:rt=unwrapListeners(tt):rt=[]):rt=[],rt};EventEmitter$1.listenerCount=function(et,_e){return typeof et.listenerCount=="function"?et.listenerCount(_e):listenerCount$1.call(et,_e)};EventEmitter$1.prototype.listenerCount=listenerCount$1;function listenerCount$1(et){var _e=this._events;if(_e){var tt=_e[et];if(typeof tt=="function")return 1;if(tt)return tt.length}return 0}EventEmitter$1.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(et,_e){for(var tt=_e,rt=tt+1,nt=et.length;rt<nt;tt+=1,rt+=1)et[tt]=et[rt];et.pop()}function arrayClone(et,_e){for(var tt=new Array(_e);_e--;)tt[_e]=et[_e];return tt}function unwrapListeners(et){for(var _e=new Array(et.length),tt=0;tt<_e.length;++tt)_e[tt]=et[tt].listener||et[tt];return _e}function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;typeof global$1$1.setTimeout=="function"&&(cachedSetTimeout=setTimeout);typeof global$1$1.clearTimeout=="function"&&(cachedClearTimeout=clearTimeout);function runTimeout(et){if(cachedSetTimeout===setTimeout)return setTimeout(et,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(et,0);try{return cachedSetTimeout(et,0)}catch{try{return cachedSetTimeout.call(null,et,0)}catch{return cachedSetTimeout.call(this,et,0)}}}function runClearTimeout(et){if(cachedClearTimeout===clearTimeout)return clearTimeout(et);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(et);try{return cachedClearTimeout(et)}catch{try{return cachedClearTimeout.call(null,et)}catch{return cachedClearTimeout.call(this,et)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var et=runTimeout(cleanUpNextTick);draining=!0;for(var _e=queue.length;_e;){for(currentQueue=queue,queue=[];++queueIndex<_e;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,_e=queue.length}currentQueue=null,draining=!1,runClearTimeout(et)}}function nextTick$1(et){var _e=new Array(arguments.length-1);if(arguments.length>1)for(var tt=1;tt<arguments.length;tt++)_e[tt-1]=arguments[tt];queue.push(new Item(et,_e)),queue.length===1&&!draining&&runTimeout(drainQueue)}function Item(et,_e){this.fun=et,this.array=_e}Item.prototype.run=function(){this.fun.apply(null,this.array)};var env={},performance$1=global$1$1.performance||{};performance$1.now||performance$1.mozNow||performance$1.msNow||performance$1.oNow||performance$1.webkitNow;var browser$1={env},process$2=browser$1,inherits;typeof Object.create=="function"?inherits=function(_e,tt){_e.super_=tt,_e.prototype=Object.create(tt.prototype,{constructor:{value:_e,enumerable:!1,writable:!0,configurable:!0}})}:inherits=function(_e,tt){_e.super_=tt;var rt=function(){};rt.prototype=tt.prototype,_e.prototype=new rt,_e.prototype.constructor=_e};var inherits$1=inherits,formatRegExp=/%[sdj%]/g;function format$2(et){if(!isString(et)){for(var _e=[],tt=0;tt<arguments.length;tt++)_e.push(inspect2(arguments[tt]));return _e.join(" ")}for(var tt=1,rt=arguments,nt=rt.length,st=String(et).replace(formatRegExp,function(ft){if(ft==="%%")return"%";if(tt>=nt)return ft;switch(ft){case"%s":return String(rt[tt++]);case"%d":return Number(rt[tt++]);case"%j":try{return JSON.stringify(rt[tt++])}catch{return"[Circular]"}default:return ft}}),dt=rt[tt];tt<nt;dt=rt[++tt])isNull(dt)||!isObject$3(dt)?st+=" "+dt:st+=" "+inspect2(dt);return st}function deprecate$1(et,_e){if(isUndefined(global$1$1.process))return function(){return deprecate$1(et,_e).apply(this,arguments)};if(process$2.noDeprecation===!0)return et;var tt=!1;function rt(){if(!tt){if(process$2.throwDeprecation)throw new Error(_e);process$2.traceDeprecation?console.trace(_e):console.error(_e),tt=!0}return et.apply(this,arguments)}return rt}var debugs={},debugEnviron;function debuglog(et){if(isUndefined(debugEnviron)&&(debugEnviron=process$2.env.NODE_DEBUG||""),et=et.toUpperCase(),!debugs[et])if(new RegExp("\\b"+et+"\\b","i").test(debugEnviron)){var _e=0;debugs[et]=function(){var tt=format$2.apply(null,arguments);console.error("%s %d: %s",et,_e,tt)}}else debugs[et]=function(){};return debugs[et]}function inspect2(et,_e){var tt={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(tt.depth=arguments[2]),arguments.length>=4&&(tt.colors=arguments[3]),isBoolean(_e)?tt.showHidden=_e:_e&&_extend(tt,_e),isUndefined(tt.showHidden)&&(tt.showHidden=!1),isUndefined(tt.depth)&&(tt.depth=2),isUndefined(tt.colors)&&(tt.colors=!1),isUndefined(tt.customInspect)&&(tt.customInspect=!0),tt.colors&&(tt.stylize=stylizeWithColor),formatValue(tt,et,tt.depth)}inspect2.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(et,_e){var tt=inspect2.styles[_e];return tt?"\x1B["+inspect2.colors[tt][0]+"m"+et+"\x1B["+inspect2.colors[tt][1]+"m":et}function stylizeNoColor(et,_e){return et}function arrayToHash(et){var _e={};return et.forEach(function(tt,rt){_e[tt]=!0}),_e}function formatValue(et,_e,tt){if(et.customInspect&&_e&&isFunction(_e.inspect)&&_e.inspect!==inspect2&&!(_e.constructor&&_e.constructor.prototype===_e)){var rt=_e.inspect(tt,et);return isString(rt)||(rt=formatValue(et,rt,tt)),rt}var nt=formatPrimitive(et,_e);if(nt)return nt;var st=Object.keys(_e),dt=arrayToHash(st);if(et.showHidden&&(st=Object.getOwnPropertyNames(_e)),isError(_e)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return formatError(_e);if(st.length===0){if(isFunction(_e)){var ft=_e.name?": "+_e.name:"";return et.stylize("[Function"+ft+"]","special")}if(isRegExp(_e))return et.stylize(RegExp.prototype.toString.call(_e),"regexp");if(isDate(_e))return et.stylize(Date.prototype.toString.call(_e),"date");if(isError(_e))return formatError(_e)}var ht="",mt=!1,bt=["{","}"];if(isArray$3(_e)&&(mt=!0,bt=["[","]"]),isFunction(_e)){var St=_e.name?": "+_e.name:"";ht=" [Function"+St+"]"}if(isRegExp(_e)&&(ht=" "+RegExp.prototype.toString.call(_e)),isDate(_e)&&(ht=" "+Date.prototype.toUTCString.call(_e)),isError(_e)&&(ht=" "+formatError(_e)),st.length===0&&(!mt||_e.length==0))return bt[0]+ht+bt[1];if(tt<0)return isRegExp(_e)?et.stylize(RegExp.prototype.toString.call(_e),"regexp"):et.stylize("[Object]","special");et.seen.push(_e);var Et;return mt?Et=formatArray(et,_e,tt,dt,st):Et=st.map(function(Ct){return formatProperty(et,_e,tt,dt,Ct,mt)}),et.seen.pop(),reduceToSingleString(Et,ht,bt)}function formatPrimitive(et,_e){if(isUndefined(_e))return et.stylize("undefined","undefined");if(isString(_e)){var tt="'"+JSON.stringify(_e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return et.stylize(tt,"string")}if(isNumber(_e))return et.stylize(""+_e,"number");if(isBoolean(_e))return et.stylize(""+_e,"boolean");if(isNull(_e))return et.stylize("null","null")}function formatError(et){return"["+Error.prototype.toString.call(et)+"]"}function formatArray(et,_e,tt,rt,nt){for(var st=[],dt=0,ft=_e.length;dt<ft;++dt)hasOwnProperty$3(_e,String(dt))?st.push(formatProperty(et,_e,tt,rt,String(dt),!0)):st.push("");return nt.forEach(function(ht){ht.match(/^\d+$/)||st.push(formatProperty(et,_e,tt,rt,ht,!0))}),st}function formatProperty(et,_e,tt,rt,nt,st){var dt,ft,ht;if(ht=Object.getOwnPropertyDescriptor(_e,nt)||{value:_e[nt]},ht.get?ht.set?ft=et.stylize("[Getter/Setter]","special"):ft=et.stylize("[Getter]","special"):ht.set&&(ft=et.stylize("[Setter]","special")),hasOwnProperty$3(rt,nt)||(dt="["+nt+"]"),ft||(et.seen.indexOf(ht.value)<0?(isNull(tt)?ft=formatValue(et,ht.value,null):ft=formatValue(et,ht.value,tt-1),ft.indexOf(`
`)>-1&&(st?ft=ft.split(`
`).map(function(mt){return" "+mt}).join(`
`).substr(2):ft=`
`+ft.split(`
`).map(function(mt){return" "+mt}).join(`
`))):ft=et.stylize("[Circular]","special")),isUndefined(dt)){if(st&&nt.match(/^\d+$/))return ft;dt=JSON.stringify(""+nt),dt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dt=dt.substr(1,dt.length-2),dt=et.stylize(dt,"name")):(dt=dt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dt=et.stylize(dt,"string"))}return dt+": "+ft}function reduceToSingleString(et,_e,tt){var rt=et.reduce(function(nt,st){return st.indexOf(`
`)>=0,nt+st.replace(/\u001b\[\d\d?m/g,"").length+1},0);return rt>60?tt[0]+(_e===""?"":_e+`
`)+" "+et.join(`,
`)+" "+tt[1]:tt[0]+_e+" "+et.join(", ")+" "+tt[1]}function isArray$3(et){return Array.isArray(et)}function isBoolean(et){return typeof et=="boolean"}function isNull(et){return et===null}function isNumber(et){return typeof et=="number"}function isString(et){return typeof et=="string"}function isUndefined(et){return et===void 0}function isRegExp(et){return isObject$3(et)&&objectToString(et)==="[object RegExp]"}function isObject$3(et){return typeof et=="object"&&et!==null}function isDate(et){return isObject$3(et)&&objectToString(et)==="[object Date]"}function isError(et){return isObject$3(et)&&(objectToString(et)==="[object Error]"||et instanceof Error)}function isFunction(et){return typeof et=="function"}function objectToString(et){return Object.prototype.toString.call(et)}function _extend(et,_e){if(!_e||!isObject$3(_e))return et;for(var tt=Object.keys(_e),rt=tt.length;rt--;)et[tt[rt]]=_e[tt[rt]];return et}function hasOwnProperty$3(et,_e){return Object.prototype.hasOwnProperty.call(et,_e)}function BufferList(){this.head=null,this.tail=null,this.length=0}BufferList.prototype.push=function(et){var _e={data:et,next:null};this.length>0?this.tail.next=_e:this.head=_e,this.tail=_e,++this.length};BufferList.prototype.unshift=function(et){var _e={data:et,next:this.head};this.length===0&&(this.tail=_e),this.head=_e,++this.length};BufferList.prototype.shift=function(){if(this.length!==0){var et=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,et}};BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0};BufferList.prototype.join=function(et){if(this.length===0)return"";for(var _e=this.head,tt=""+_e.data;_e=_e.next;)tt+=et+_e.data;return tt};BufferList.prototype.concat=function(et){if(this.length===0)return Buffer$1.alloc(0);if(this.length===1)return this.head.data;for(var _e=Buffer$1.allocUnsafe(et>>>0),tt=this.head,rt=0;tt;)tt.data.copy(_e,rt),rt+=tt.data.length,tt=tt.next;return _e};var isBufferEncoding=Buffer$1.isEncoding||function(et){switch(et&&et.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function assertEncoding(et){if(et&&!isBufferEncoding(et))throw new Error("Unknown encoding: "+et)}function StringDecoder(et){switch(this.encoding=(et||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(et),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer$1(6),this.charReceived=0,this.charLength=0}StringDecoder.prototype.write=function(et){for(var _e="";this.charLength;){var tt=et.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:et.length;if(et.copy(this.charBuffer,this.charReceived,0,tt),this.charReceived+=tt,this.charReceived<this.charLength)return"";et=et.slice(tt,et.length),_e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var nt=_e.charCodeAt(_e.length-1);if(nt>=55296&&nt<=56319){this.charLength+=this.surrogateSize,_e="";continue}if(this.charReceived=this.charLength=0,et.length===0)return _e;break}this.detectIncompleteChar(et);var rt=et.length;this.charLength&&(et.copy(this.charBuffer,0,et.length-this.charReceived,rt),rt-=this.charReceived),_e+=et.toString(this.encoding,0,rt);var rt=_e.length-1,nt=_e.charCodeAt(rt);if(nt>=55296&&nt<=56319){var st=this.surrogateSize;return this.charLength+=st,this.charReceived+=st,this.charBuffer.copy(this.charBuffer,st,0,st),et.copy(this.charBuffer,0,0,st),_e.substring(0,rt)}return _e};StringDecoder.prototype.detectIncompleteChar=function(et){for(var _e=et.length>=3?3:et.length;_e>0;_e--){var tt=et[et.length-_e];if(_e==1&&tt>>5==6){this.charLength=2;break}if(_e<=2&&tt>>4==14){this.charLength=3;break}if(_e<=3&&tt>>3==30){this.charLength=4;break}}this.charReceived=_e};StringDecoder.prototype.end=function(et){var _e="";if(et&&et.length&&(_e=this.write(et)),this.charReceived){var tt=this.charReceived,rt=this.charBuffer,nt=this.encoding;_e+=rt.slice(0,tt).toString(nt)}return _e};function passThroughWrite(et){return et.toString(this.encoding)}function utf16DetectIncompleteChar(et){this.charReceived=et.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(et){this.charReceived=et.length%3,this.charLength=this.charReceived?3:0}var stringDecoder=Object.freeze({__proto__:null,StringDecoder});Readable.ReadableState=ReadableState;var debug=debuglog("stream");inherits$1(Readable,EventEmitter$1);function prependListener2(et,_e,tt){if(typeof et.prependListener=="function")return et.prependListener(_e,tt);!et._events||!et._events[_e]?et.on(_e,tt):Array.isArray(et._events[_e])?et._events[_e].unshift(tt):et._events[_e]=[tt,et._events[_e]]}function listenerCount(et,_e){return et.listeners(_e).length}function ReadableState(et,_e){et=et||{},this.objectMode=!!et.objectMode,_e instanceof Duplex&&(this.objectMode=this.objectMode||!!et.readableObjectMode);var tt=et.highWaterMark,rt=this.objectMode?16:16*1024;this.highWaterMark=tt||tt===0?tt:rt,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=et.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,et.encoding&&(this.decoder=new StringDecoder(et.encoding),this.encoding=et.encoding)}function Readable(et){if(!(this instanceof Readable))return new Readable(et);this._readableState=new ReadableState(et,this),this.readable=!0,et&&typeof et.read=="function"&&(this._read=et.read),EventEmitter$1.call(this)}Readable.prototype.push=function(et,_e){var tt=this._readableState;return!tt.objectMode&&typeof et=="string"&&(_e=_e||tt.defaultEncoding,_e!==tt.encoding&&(et=Buffer$1.from(et,_e),_e="")),readableAddChunk(this,tt,et,_e,!1)};Readable.prototype.unshift=function(et){var _e=this._readableState;return readableAddChunk(this,_e,et,"",!0)};Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};function readableAddChunk(et,_e,tt,rt,nt){var st=chunkInvalid(_e,tt);if(st)et.emit("error",st);else if(tt===null)_e.reading=!1,onEofChunk(et,_e);else if(_e.objectMode||tt&&tt.length>0)if(_e.ended&&!nt){var dt=new Error("stream.push() after EOF");et.emit("error",dt)}else if(_e.endEmitted&&nt){var ft=new Error("stream.unshift() after end event");et.emit("error",ft)}else{var ht;_e.decoder&&!nt&&!rt&&(tt=_e.decoder.write(tt),ht=!_e.objectMode&&tt.length===0),nt||(_e.reading=!1),ht||(_e.flowing&&_e.length===0&&!_e.sync?(et.emit("data",tt),et.read(0)):(_e.length+=_e.objectMode?1:tt.length,nt?_e.buffer.unshift(tt):_e.buffer.push(tt),_e.needReadable&&emitReadable(et))),maybeReadMore(et,_e)}else nt||(_e.reading=!1);return needMoreData(_e)}function needMoreData(et){return!et.ended&&(et.needReadable||et.length<et.highWaterMark||et.length===0)}Readable.prototype.setEncoding=function(et){return this._readableState.decoder=new StringDecoder(et),this._readableState.encoding=et,this};var MAX_HWM=8388608;function computeNewHighWaterMark(et){return et>=MAX_HWM?et=MAX_HWM:(et--,et|=et>>>1,et|=et>>>2,et|=et>>>4,et|=et>>>8,et|=et>>>16,et++),et}function howMuchToRead(et,_e){return et<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:et!==et?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(et>_e.highWaterMark&&(_e.highWaterMark=computeNewHighWaterMark(et)),et<=_e.length?et:_e.ended?_e.length:(_e.needReadable=!0,0))}Readable.prototype.read=function(et){debug("read",et),et=parseInt(et,10);var _e=this._readableState,tt=et;if(et!==0&&(_e.emittedReadable=!1),et===0&&_e.needReadable&&(_e.length>=_e.highWaterMark||_e.ended))return debug("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?endReadable(this):emitReadable(this),null;if(et=howMuchToRead(et,_e),et===0&&_e.ended)return _e.length===0&&endReadable(this),null;var rt=_e.needReadable;debug("need readable",rt),(_e.length===0||_e.length-et<_e.highWaterMark)&&(rt=!0,debug("length less than watermark",rt)),_e.ended||_e.reading?(rt=!1,debug("reading or ended",rt)):rt&&(debug("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(et=howMuchToRead(tt,_e)));var nt;return et>0?nt=fromList(et,_e):nt=null,nt===null?(_e.needReadable=!0,et=0):_e.length-=et,_e.length===0&&(_e.ended||(_e.needReadable=!0),tt!==et&&_e.ended&&endReadable(this)),nt!==null&&this.emit("data",nt),nt};function chunkInvalid(et,_e){var tt=null;return!Buffer$1.isBuffer(_e)&&typeof _e!="string"&&_e!==null&&_e!==void 0&&!et.objectMode&&(tt=new TypeError("Invalid non-string/buffer chunk")),tt}function onEofChunk(et,_e){if(!_e.ended){if(_e.decoder){var tt=_e.decoder.end();tt&&tt.length&&(_e.buffer.push(tt),_e.length+=_e.objectMode?1:tt.length)}_e.ended=!0,emitReadable(et)}}function emitReadable(et){var _e=et._readableState;_e.needReadable=!1,_e.emittedReadable||(debug("emitReadable",_e.flowing),_e.emittedReadable=!0,_e.sync?nextTick$1(emitReadable_,et):emitReadable_(et))}function emitReadable_(et){debug("emit readable"),et.emit("readable"),flow(et)}function maybeReadMore(et,_e){_e.readingMore||(_e.readingMore=!0,nextTick$1(maybeReadMore_,et,_e))}function maybeReadMore_(et,_e){for(var tt=_e.length;!_e.reading&&!_e.flowing&&!_e.ended&&_e.length<_e.highWaterMark&&(debug("maybeReadMore read 0"),et.read(0),tt!==_e.length);)tt=_e.length;_e.readingMore=!1}Readable.prototype._read=function(et){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=function(et,_e){var tt=this,rt=this._readableState;switch(rt.pipesCount){case 0:rt.pipes=et;break;case 1:rt.pipes=[rt.pipes,et];break;default:rt.pipes.push(et);break}rt.pipesCount+=1,debug("pipe count=%d opts=%j",rt.pipesCount,_e);var nt=!_e||_e.end!==!1,st=nt?ft:bt;rt.endEmitted?nextTick$1(st):tt.once("end",st),et.on("unpipe",dt);function dt(At){debug("onunpipe"),At===tt&&bt()}function ft(){debug("onend"),et.end()}var ht=pipeOnDrain(tt);et.on("drain",ht);var mt=!1;function bt(){debug("cleanup"),et.removeListener("close",Rt),et.removeListener("finish",Tt),et.removeListener("drain",ht),et.removeListener("error",Ct),et.removeListener("unpipe",dt),tt.removeListener("end",ft),tt.removeListener("end",bt),tt.removeListener("data",Et),mt=!0,rt.awaitDrain&&(!et._writableState||et._writableState.needDrain)&&ht()}var St=!1;tt.on("data",Et);function Et(At){debug("ondata"),St=!1;var Nt=et.write(At);Nt===!1&&!St&&((rt.pipesCount===1&&rt.pipes===et||rt.pipesCount>1&&indexOf2(rt.pipes,et)!==-1)&&!mt&&(debug("false write response, pause",tt._readableState.awaitDrain),tt._readableState.awaitDrain++,St=!0),tt.pause())}function Ct(At){debug("onerror",At),wt(),et.removeListener("error",Ct),listenerCount(et,"error")===0&&et.emit("error",At)}prependListener2(et,"error",Ct);function Rt(){et.removeListener("finish",Tt),wt()}et.once("close",Rt);function Tt(){debug("onfinish"),et.removeListener("close",Rt),wt()}et.once("finish",Tt);function wt(){debug("unpipe"),tt.unpipe(et)}return et.emit("pipe",tt),rt.flowing||(debug("pipe resume"),tt.resume()),et};function pipeOnDrain(et){return function(){var _e=et._readableState;debug("pipeOnDrain",_e.awaitDrain),_e.awaitDrain&&_e.awaitDrain--,_e.awaitDrain===0&&et.listeners("data").length&&(_e.flowing=!0,flow(et))}}Readable.prototype.unpipe=function(et){var _e=this._readableState;if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return et&&et!==_e.pipes?this:(et||(et=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,et&&et.emit("unpipe",this),this);if(!et){var tt=_e.pipes,rt=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var nt=0;nt<rt;nt++)tt[nt].emit("unpipe",this);return this}var st=indexOf2(_e.pipes,et);return st===-1?this:(_e.pipes.splice(st,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),et.emit("unpipe",this),this)};Readable.prototype.on=function(et,_e){var tt=EventEmitter$1.prototype.on.call(this,et,_e);if(et==="data")this._readableState.flowing!==!1&&this.resume();else if(et==="readable"){var rt=this._readableState;!rt.endEmitted&&!rt.readableListening&&(rt.readableListening=rt.needReadable=!0,rt.emittedReadable=!1,rt.reading?rt.length&&emitReadable(this):nextTick$1(nReadingNextTick,this))}return tt};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(et){debug("readable nexttick read 0"),et.read(0)}Readable.prototype.resume=function(){var et=this._readableState;return et.flowing||(debug("resume"),et.flowing=!0,resume(this,et)),this};function resume(et,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,nextTick$1(resume_,et,_e))}function resume_(et,_e){_e.reading||(debug("resume read 0"),et.read(0)),_e.resumeScheduled=!1,_e.awaitDrain=0,et.emit("resume"),flow(et),_e.flowing&&!_e.reading&&et.read(0)}Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function flow(et){var _e=et._readableState;for(debug("flow",_e.flowing);_e.flowing&&et.read()!==null;);}Readable.prototype.wrap=function(et){var _e=this._readableState,tt=!1,rt=this;et.on("end",function(){if(debug("wrapped end"),_e.decoder&&!_e.ended){var dt=_e.decoder.end();dt&&dt.length&&rt.push(dt)}rt.push(null)}),et.on("data",function(dt){if(debug("wrapped data"),_e.decoder&&(dt=_e.decoder.write(dt)),!(_e.objectMode&&dt==null)&&!(!_e.objectMode&&(!dt||!dt.length))){var ft=rt.push(dt);ft||(tt=!0,et.pause())}});for(var nt in et)this[nt]===void 0&&typeof et[nt]=="function"&&(this[nt]=(function(dt){return function(){return et[dt].apply(et,arguments)}})(nt));var st=["error","close","destroy","pause","resume"];return forEach$2(st,function(dt){et.on(dt,rt.emit.bind(rt,dt))}),rt._read=function(dt){debug("wrapped _read",dt),tt&&(tt=!1,et.resume())},rt};Readable._fromList=fromList;function fromList(et,_e){if(_e.length===0)return null;var tt;return _e.objectMode?tt=_e.buffer.shift():!et||et>=_e.length?(_e.decoder?tt=_e.buffer.join(""):_e.buffer.length===1?tt=_e.buffer.head.data:tt=_e.buffer.concat(_e.length),_e.buffer.clear()):tt=fromListPartial(et,_e.buffer,_e.decoder),tt}function fromListPartial(et,_e,tt){var rt;return et<_e.head.data.length?(rt=_e.head.data.slice(0,et),_e.head.data=_e.head.data.slice(et)):et===_e.head.data.length?rt=_e.shift():rt=tt?copyFromBufferString(et,_e):copyFromBuffer(et,_e),rt}function copyFromBufferString(et,_e){var tt=_e.head,rt=1,nt=tt.data;for(et-=nt.length;tt=tt.next;){var st=tt.data,dt=et>st.length?st.length:et;if(dt===st.length?nt+=st:nt+=st.slice(0,et),et-=dt,et===0){dt===st.length?(++rt,tt.next?_e.head=tt.next:_e.head=_e.tail=null):(_e.head=tt,tt.data=st.slice(dt));break}++rt}return _e.length-=rt,nt}function copyFromBuffer(et,_e){var tt=Buffer$1.allocUnsafe(et),rt=_e.head,nt=1;for(rt.data.copy(tt),et-=rt.data.length;rt=rt.next;){var st=rt.data,dt=et>st.length?st.length:et;if(st.copy(tt,tt.length-et,0,dt),et-=dt,et===0){dt===st.length?(++nt,rt.next?_e.head=rt.next:_e.head=_e.tail=null):(_e.head=rt,rt.data=st.slice(dt));break}++nt}return _e.length-=nt,tt}function endReadable(et){var _e=et._readableState;if(_e.length>0)throw new Error('"endReadable()" called on non-empty stream');_e.endEmitted||(_e.ended=!0,nextTick$1(endReadableNT,_e,et))}function endReadableNT(et,_e){!et.endEmitted&&et.length===0&&(et.endEmitted=!0,_e.readable=!1,_e.emit("end"))}function forEach$2(et,_e){for(var tt=0,rt=et.length;tt<rt;tt++)_e(et[tt],tt)}function indexOf2(et,_e){for(var tt=0,rt=et.length;tt<rt;tt++)if(et[tt]===_e)return tt;return-1}Writable.WritableState=WritableState;inherits$1(Writable,EventEmitter$1);function nop(){}function WriteReq(et,_e,tt){this.chunk=et,this.encoding=_e,this.callback=tt,this.next=null}function WritableState(et,_e){Object.defineProperty(this,"buffer",{get:deprecate$1(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),et=et||{},this.objectMode=!!et.objectMode,_e instanceof Duplex&&(this.objectMode=this.objectMode||!!et.writableObjectMode);var tt=et.highWaterMark,rt=this.objectMode?16:16*1024;this.highWaterMark=tt||tt===0?tt:rt,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var nt=et.decodeStrings===!1;this.decodeStrings=!nt,this.defaultEncoding=et.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(st){onwrite(_e,st)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function(){for(var _e=this.bufferedRequest,tt=[];_e;)tt.push(_e),_e=_e.next;return tt};function Writable(et){if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(et);this._writableState=new WritableState(et,this),this.writable=!0,et&&(typeof et.write=="function"&&(this._write=et.write),typeof et.writev=="function"&&(this._writev=et.writev)),EventEmitter$1.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(et,_e){var tt=new Error("write after end");et.emit("error",tt),nextTick$1(_e,tt)}function validChunk(et,_e,tt,rt){var nt=!0,st=!1;return tt===null?st=new TypeError("May not write null values to stream"):!Buffer$1.isBuffer(tt)&&typeof tt!="string"&&tt!==void 0&&!_e.objectMode&&(st=new TypeError("Invalid non-string/buffer chunk")),st&&(et.emit("error",st),nextTick$1(rt,st),nt=!1),nt}Writable.prototype.write=function(et,_e,tt){var rt=this._writableState,nt=!1;return typeof _e=="function"&&(tt=_e,_e=null),Buffer$1.isBuffer(et)?_e="buffer":_e||(_e=rt.defaultEncoding),typeof tt!="function"&&(tt=nop),rt.ended?writeAfterEnd(this,tt):validChunk(this,rt,et,tt)&&(rt.pendingcb++,nt=writeOrBuffer(this,rt,et,_e,tt)),nt};Writable.prototype.cork=function(){var et=this._writableState;et.corked++};Writable.prototype.uncork=function(){var et=this._writableState;et.corked&&(et.corked--,!et.writing&&!et.corked&&!et.finished&&!et.bufferProcessing&&et.bufferedRequest&&clearBuffer(this,et))};Writable.prototype.setDefaultEncoding=function(_e){if(typeof _e=="string"&&(_e=_e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+_e);return this._writableState.defaultEncoding=_e,this};function decodeChunk(et,_e,tt){return!et.objectMode&&et.decodeStrings!==!1&&typeof _e=="string"&&(_e=Buffer$1.from(_e,tt)),_e}function writeOrBuffer(et,_e,tt,rt,nt){tt=decodeChunk(_e,tt,rt),Buffer$1.isBuffer(tt)&&(rt="buffer");var st=_e.objectMode?1:tt.length;_e.length+=st;var dt=_e.length<_e.highWaterMark;if(dt||(_e.needDrain=!0),_e.writing||_e.corked){var ft=_e.lastBufferedRequest;_e.lastBufferedRequest=new WriteReq(tt,rt,nt),ft?ft.next=_e.lastBufferedRequest:_e.bufferedRequest=_e.lastBufferedRequest,_e.bufferedRequestCount+=1}else doWrite(et,_e,!1,st,tt,rt,nt);return dt}function doWrite(et,_e,tt,rt,nt,st,dt){_e.writelen=rt,_e.writecb=dt,_e.writing=!0,_e.sync=!0,tt?et._writev(nt,_e.onwrite):et._write(nt,st,_e.onwrite),_e.sync=!1}function onwriteError(et,_e,tt,rt,nt){--_e.pendingcb,tt?nextTick$1(nt,rt):nt(rt),et._writableState.errorEmitted=!0,et.emit("error",rt)}function onwriteStateUpdate(et){et.writing=!1,et.writecb=null,et.length-=et.writelen,et.writelen=0}function onwrite(et,_e){var tt=et._writableState,rt=tt.sync,nt=tt.writecb;if(onwriteStateUpdate(tt),_e)onwriteError(et,tt,rt,_e,nt);else{var st=needFinish(tt);!st&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&clearBuffer(et,tt),rt?nextTick$1(afterWrite,et,tt,st,nt):afterWrite(et,tt,st,nt)}}function afterWrite(et,_e,tt,rt){tt||onwriteDrain(et,_e),_e.pendingcb--,rt(),finishMaybe(et,_e)}function onwriteDrain(et,_e){_e.length===0&&_e.needDrain&&(_e.needDrain=!1,et.emit("drain"))}function clearBuffer(et,_e){_e.bufferProcessing=!0;var tt=_e.bufferedRequest;if(et._writev&&tt&&tt.next){var rt=_e.bufferedRequestCount,nt=new Array(rt),st=_e.corkedRequestsFree;st.entry=tt;for(var dt=0;tt;)nt[dt]=tt,tt=tt.next,dt+=1;doWrite(et,_e,!0,_e.length,nt,"",st.finish),_e.pendingcb++,_e.lastBufferedRequest=null,st.next?(_e.corkedRequestsFree=st.next,st.next=null):_e.corkedRequestsFree=new CorkedRequest(_e)}else{for(;tt;){var ft=tt.chunk,ht=tt.encoding,mt=tt.callback,bt=_e.objectMode?1:ft.length;if(doWrite(et,_e,!1,bt,ft,ht,mt),tt=tt.next,_e.writing)break}tt===null&&(_e.lastBufferedRequest=null)}_e.bufferedRequestCount=0,_e.bufferedRequest=tt,_e.bufferProcessing=!1}Writable.prototype._write=function(et,_e,tt){tt(new Error("not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(et,_e,tt){var rt=this._writableState;typeof et=="function"?(tt=et,et=null,_e=null):typeof _e=="function"&&(tt=_e,_e=null),et!=null&&this.write(et,_e),rt.corked&&(rt.corked=1,this.uncork()),!rt.ending&&!rt.finished&&endWritable(this,rt,tt)};function needFinish(et){return et.ending&&et.length===0&&et.bufferedRequest===null&&!et.finished&&!et.writing}function prefinish(et,_e){_e.prefinished||(_e.prefinished=!0,et.emit("prefinish"))}function finishMaybe(et,_e){var tt=needFinish(_e);return tt&&(_e.pendingcb===0?(prefinish(et,_e),_e.finished=!0,et.emit("finish")):prefinish(et,_e)),tt}function endWritable(et,_e,tt){_e.ending=!0,finishMaybe(et,_e),tt&&(_e.finished?nextTick$1(tt):et.once("finish",tt)),_e.ended=!0,et.writable=!1}function CorkedRequest(et){var _e=this;this.next=null,this.entry=null,this.finish=function(tt){var rt=_e.entry;for(_e.entry=null;rt;){var nt=rt.callback;et.pendingcb--,nt(tt),rt=rt.next}et.corkedRequestsFree?et.corkedRequestsFree.next=_e:et.corkedRequestsFree=_e}}inherits$1(Duplex,Readable);var keys$1=Object.keys(Writable.prototype);for(var v$3=0;v$3<keys$1.length;v$3++){var method=keys$1[v$3];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}function Duplex(et){if(!(this instanceof Duplex))return new Duplex(et);Readable.call(this,et),Writable.call(this,et),et&&et.readable===!1&&(this.readable=!1),et&&et.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,et&&et.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||nextTick$1(onEndNT,this)}function onEndNT(et){et.end()}inherits$1(Transform,Duplex);function TransformState(et){this.afterTransform=function(_e,tt){return afterTransform(et,_e,tt)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(et,_e,tt){var rt=et._transformState;rt.transforming=!1;var nt=rt.writecb;if(!nt)return et.emit("error",new Error("no writecb in Transform class"));rt.writechunk=null,rt.writecb=null,tt!=null&&et.push(tt),nt(_e);var st=et._readableState;st.reading=!1,(st.needReadable||st.length<st.highWaterMark)&&et._read(st.highWaterMark)}function Transform(et){if(!(this instanceof Transform))return new Transform(et);Duplex.call(this,et),this._transformState=new TransformState(this);var _e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,et&&(typeof et.transform=="function"&&(this._transform=et.transform),typeof et.flush=="function"&&(this._flush=et.flush)),this.once("prefinish",function(){typeof this._flush=="function"?this._flush(function(tt){done(_e,tt)}):done(_e)})}Transform.prototype.push=function(et,_e){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,et,_e)};Transform.prototype._transform=function(et,_e,tt){throw new Error("Not implemented")};Transform.prototype._write=function(et,_e,tt){var rt=this._transformState;if(rt.writecb=tt,rt.writechunk=et,rt.writeencoding=_e,!rt.transforming){var nt=this._readableState;(rt.needTransform||nt.needReadable||nt.length<nt.highWaterMark)&&this._read(nt.highWaterMark)}};Transform.prototype._read=function(et){var _e=this._transformState;_e.writechunk!==null&&_e.writecb&&!_e.transforming?(_e.transforming=!0,this._transform(_e.writechunk,_e.writeencoding,_e.afterTransform)):_e.needTransform=!0};function done(et,_e){if(_e)return et.emit("error",_e);var tt=et._writableState,rt=et._transformState;if(tt.length)throw new Error("Calling transform done when ws.length != 0");if(rt.transforming)throw new Error("Calling transform done when still transforming");return et.push(null)}inherits$1(PassThrough,Transform);function PassThrough(et){if(!(this instanceof PassThrough))return new PassThrough(et);Transform.call(this,et)}PassThrough.prototype._transform=function(et,_e,tt){tt(null,et)};inherits$1(Stream$1,EventEmitter$1);Stream$1.Readable=Readable;Stream$1.Writable=Writable;Stream$1.Duplex=Duplex;Stream$1.Transform=Transform;Stream$1.PassThrough=PassThrough;Stream$1.Stream=Stream$1;function Stream$1(){EventEmitter$1.call(this)}Stream$1.prototype.pipe=function(et,_e){var tt=this;function rt(bt){et.writable&&et.write(bt)===!1&&tt.pause&&tt.pause()}tt.on("data",rt);function nt(){tt.readable&&tt.resume&&tt.resume()}et.on("drain",nt),!et._isStdio&&(!_e||_e.end!==!1)&&(tt.on("end",dt),tt.on("close",ft));var st=!1;function dt(){st||(st=!0,et.end())}function ft(){st||(st=!0,typeof et.destroy=="function"&&et.destroy())}function ht(bt){if(mt(),EventEmitter$1.listenerCount(this,"error")===0)throw bt}tt.on("error",ht),et.on("error",ht);function mt(){tt.removeListener("data",rt),et.removeListener("drain",nt),tt.removeListener("end",dt),tt.removeListener("close",ft),tt.removeListener("error",ht),et.removeListener("error",ht),tt.removeListener("end",mt),tt.removeListener("close",mt),et.removeListener("close",mt)}return tt.on("end",mt),tt.on("close",mt),et.on("close",mt),et.emit("pipe",tt),et};var stream=Object.freeze({__proto__:null,default:Stream$1,Readable,Writable,Duplex,Transform,PassThrough,Stream:Stream$1}),require$$0$1=getAugmentedNamespace(stream),require$$1=getAugmentedNamespace(stringDecoder);(function(et){(function(_e){_e.parser=function(Or,Ar){return new rt(Or,Ar)},_e.SAXParser=rt,_e.SAXStream=bt,_e.createStream=mt,_e.MAX_BUFFER_LENGTH=64*1024;var tt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];_e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function rt(Or,Ar){if(!(this instanceof rt))return new rt(Or,Ar);var Qr=this;st(Qr),Qr.q=Qr.c="",Qr.bufferCheckPosition=_e.MAX_BUFFER_LENGTH,Qr.opt=Ar||{},Qr.opt.lowercase=Qr.opt.lowercase||Qr.opt.lowercasetags,Qr.looseCase=Qr.opt.lowercase?"toLowerCase":"toUpperCase",Qr.tags=[],Qr.closed=Qr.closedRoot=Qr.sawRoot=!1,Qr.tag=Qr.error=null,Qr.strict=!!Or,Qr.noscript=!!(Or||Qr.opt.noscript),Qr.state=jt.BEGIN,Qr.strictEntities=Qr.opt.strictEntities,Qr.ENTITIES=Qr.strictEntities?Object.create(_e.XML_ENTITIES):Object.create(_e.ENTITIES),Qr.attribList=[],Qr.opt.xmlns&&(Qr.ns=Object.create(Tt)),Qr.trackPosition=Qr.opt.position!==!1,Qr.trackPosition&&(Qr.position=Qr.line=Qr.column=0),Ot(Qr,"onready")}Object.create||(Object.create=function(Or){function Ar(){}Ar.prototype=Or;var Qr=new Ar;return Qr}),Object.keys||(Object.keys=function(Or){var Ar=[];for(var Qr in Or)Or.hasOwnProperty(Qr)&&Ar.push(Qr);return Ar});function nt(Or){for(var Ar=Math.max(_e.MAX_BUFFER_LENGTH,10),Qr=0,hn=0,Sn=tt.length;hn<Sn;hn++){var Kr=Or[tt[hn]].length;if(Kr>Ar)switch(tt[hn]){case"textNode":Bt(Or);break;case"cdata":Wt(Or,"oncdata",Or.cdata),Or.cdata="";break;case"script":Wt(Or,"onscript",Or.script),Or.script="";break;default:Jt(Or,"Max buffer length exceeded: "+tt[hn])}Qr=Math.max(Qr,Kr)}var Hn=_e.MAX_BUFFER_LENGTH-Qr;Or.bufferCheckPosition=Hn+Or.position}function st(Or){for(var Ar=0,Qr=tt.length;Ar<Qr;Ar++)Or[tt[Ar]]=""}function dt(Or){Bt(Or),Or.cdata!==""&&(Wt(Or,"oncdata",Or.cdata),Or.cdata=""),Or.script!==""&&(Wt(Or,"onscript",Or.script),Or.script="")}rt.prototype={end:function(){ar(this)},write:Yr,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){dt(this)}};var ft;try{ft=require$$0$1.Stream}catch{ft=function(){}}var ht=_e.EVENTS.filter(function(Or){return Or!=="error"&&Or!=="end"});function mt(Or,Ar){return new bt(Or,Ar)}function bt(Or,Ar){if(!(this instanceof bt))return new bt(Or,Ar);ft.apply(this),this._parser=new rt(Or,Ar),this.writable=!0,this.readable=!0;var Qr=this;this._parser.onend=function(){Qr.emit("end")},this._parser.onerror=function(hn){Qr.emit("error",hn),Qr._parser.error=null},this._decoder=null,ht.forEach(function(hn){Object.defineProperty(Qr,"on"+hn,{get:function(){return Qr._parser["on"+hn]},set:function(Sn){if(!Sn)return Qr.removeAllListeners(hn),Qr._parser["on"+hn]=Sn,Sn;Qr.on(hn,Sn)},enumerable:!0,configurable:!1})})}bt.prototype=Object.create(ft.prototype,{constructor:{value:bt}}),bt.prototype.write=function(Or){if(typeof Buffer$1=="function"&&typeof Buffer$1.isBuffer=="function"&&Buffer$1.isBuffer(Or)){if(!this._decoder){var Ar=require$$1.StringDecoder;this._decoder=new Ar("utf8")}Or=this._decoder.write(Or)}return this._parser.write(Or.toString()),this.emit("data",Or),!0},bt.prototype.end=function(Or){return Or&&Or.length&&this.write(Or),this._parser.end(),!0},bt.prototype.on=function(Or,Ar){var Qr=this;return!Qr._parser["on"+Or]&&ht.indexOf(Or)!==-1&&(Qr._parser["on"+Or]=function(){var hn=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);hn.splice(0,0,Or),Qr.emit.apply(Qr,hn)}),ft.prototype.on.call(Qr,Or,Ar)};var St="[CDATA[",Et="DOCTYPE",Ct="http://www.w3.org/XML/1998/namespace",Rt="http://www.w3.org/2000/xmlns/",Tt={xml:Ct,xmlns:Rt},wt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,At=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Nt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Pt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function It(Or){return Or===" "||Or===`
`||Or==="\r"||Or===" "}function Ft(Or){return Or==='"'||Or==="'"}function qt(Or){return Or===">"||It(Or)}function Vt(Or,Ar){return Or.test(Ar)}function Kt(Or,Ar){return!Vt(Or,Ar)}var jt=0;_e.STATE={BEGIN:jt++,BEGIN_WHITESPACE:jt++,TEXT:jt++,TEXT_ENTITY:jt++,OPEN_WAKA:jt++,SGML_DECL:jt++,SGML_DECL_QUOTED:jt++,DOCTYPE:jt++,DOCTYPE_QUOTED:jt++,DOCTYPE_DTD:jt++,DOCTYPE_DTD_QUOTED:jt++,COMMENT_STARTING:jt++,COMMENT:jt++,COMMENT_ENDING:jt++,COMMENT_ENDED:jt++,CDATA:jt++,CDATA_ENDING:jt++,CDATA_ENDING_2:jt++,PROC_INST:jt++,PROC_INST_BODY:jt++,PROC_INST_ENDING:jt++,OPEN_TAG:jt++,OPEN_TAG_SLASH:jt++,ATTRIB:jt++,ATTRIB_NAME:jt++,ATTRIB_NAME_SAW_WHITE:jt++,ATTRIB_VALUE:jt++,ATTRIB_VALUE_QUOTED:jt++,ATTRIB_VALUE_CLOSED:jt++,ATTRIB_VALUE_UNQUOTED:jt++,ATTRIB_VALUE_ENTITY_Q:jt++,ATTRIB_VALUE_ENTITY_U:jt++,CLOSE_TAG:jt++,CLOSE_TAG_SAW_WHITE:jt++,SCRIPT:jt++,SCRIPT_ENDING:jt++},_e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(_e.ENTITIES).forEach(function(Or){var Ar=_e.ENTITIES[Or],Qr=typeof Ar=="number"?String.fromCharCode(Ar):Ar;_e.ENTITIES[Or]=Qr});for(var Ut in _e.STATE)_e.STATE[_e.STATE[Ut]]=Ut;jt=_e.STATE;function Ot(Or,Ar,Qr){Or[Ar]&&Or[Ar](Qr)}function Wt(Or,Ar,Qr){Or.textNode&&Bt(Or),Ot(Or,Ar,Qr)}function Bt(Or){Or.textNode=tr(Or.opt,Or.textNode),Or.textNode&&Ot(Or,"ontext",Or.textNode),Or.textNode=""}function tr(Or,Ar){return Or.trim&&(Ar=Ar.trim()),Or.normalize&&(Ar=Ar.replace(/\s+/g," ")),Ar}function Jt(Or,Ar){return Bt(Or),Or.trackPosition&&(Ar+=`
Line: `+Or.line+`
Column: `+Or.column+`
Char: `+Or.c),Ar=new Error(Ar),Or.error=Ar,Ot(Or,"onerror",Ar),Or}function ar(Or){return Or.sawRoot&&!Or.closedRoot&&pr(Or,"Unclosed root tag"),Or.state!==jt.BEGIN&&Or.state!==jt.BEGIN_WHITESPACE&&Or.state!==jt.TEXT&&Jt(Or,"Unexpected end"),Bt(Or),Or.c="",Or.closed=!0,Ot(Or,"onend"),rt.call(Or,Or.strict,Or.opt),Or}function pr(Or,Ar){if(typeof Or!="object"||!(Or instanceof rt))throw new Error("bad call to strictFail");Or.strict&&Jt(Or,Ar)}function cr(Or){Or.strict||(Or.tagName=Or.tagName[Or.looseCase]());var Ar=Or.tags[Or.tags.length-1]||Or,Qr=Or.tag={name:Or.tagName,attributes:{}};Or.opt.xmlns&&(Qr.ns=Ar.ns),Or.attribList.length=0,Wt(Or,"onopentagstart",Qr)}function gr(Or,Ar){var Qr=Or.indexOf(":"),hn=Qr<0?["",Or]:Or.split(":"),Sn=hn[0],Kr=hn[1];return Ar&&Or==="xmlns"&&(Sn="xmlns",Kr=""),{prefix:Sn,local:Kr}}function Sr(Or){if(Or.strict||(Or.attribName=Or.attribName[Or.looseCase]()),Or.attribList.indexOf(Or.attribName)!==-1||Or.tag.attributes.hasOwnProperty(Or.attribName)){Or.attribName=Or.attribValue="";return}if(Or.opt.xmlns){var Ar=gr(Or.attribName,!0),Qr=Ar.prefix,hn=Ar.local;if(Qr==="xmlns")if(hn==="xml"&&Or.attribValue!==Ct)pr(Or,"xml: prefix must be bound to "+Ct+`
Actual: `+Or.attribValue);else if(hn==="xmlns"&&Or.attribValue!==Rt)pr(Or,"xmlns: prefix must be bound to "+Rt+`
Actual: `+Or.attribValue);else{var Sn=Or.tag,Kr=Or.tags[Or.tags.length-1]||Or;Sn.ns===Kr.ns&&(Sn.ns=Object.create(Kr.ns)),Sn.ns[hn]=Or.attribValue}Or.attribList.push([Or.attribName,Or.attribValue])}else Or.tag.attributes[Or.attribName]=Or.attribValue,Wt(Or,"onattribute",{name:Or.attribName,value:Or.attribValue});Or.attribName=Or.attribValue=""}function Er(Or,Ar){if(Or.opt.xmlns){var Qr=Or.tag,hn=gr(Or.tagName);Qr.prefix=hn.prefix,Qr.local=hn.local,Qr.uri=Qr.ns[hn.prefix]||"",Qr.prefix&&!Qr.uri&&(pr(Or,"Unbound namespace prefix: "+JSON.stringify(Or.tagName)),Qr.uri=hn.prefix);var Sn=Or.tags[Or.tags.length-1]||Or;Qr.ns&&Sn.ns!==Qr.ns&&Object.keys(Qr.ns).forEach(function(Nn){Wt(Or,"onopennamespace",{prefix:Nn,uri:Qr.ns[Nn]})});for(var Kr=0,Hn=Or.attribList.length;Kr<Hn;Kr++){var ln=Or.attribList[Kr],kn=ln[0],xn=ln[1],An=gr(kn,!0),rs=An.prefix,qs=An.local,Ln=rs===""?"":Qr.ns[rs]||"",Cn={name:kn,value:xn,prefix:rs,local:qs,uri:Ln};rs&&rs!=="xmlns"&&!Ln&&(pr(Or,"Unbound namespace prefix: "+JSON.stringify(rs)),Cn.uri=rs),Or.tag.attributes[kn]=Cn,Wt(Or,"onattribute",Cn)}Or.attribList.length=0}Or.tag.isSelfClosing=!!Ar,Or.sawRoot=!0,Or.tags.push(Or.tag),Wt(Or,"onopentag",Or.tag),Ar||(!Or.noscript&&Or.tagName.toLowerCase()==="script"?Or.state=jt.SCRIPT:Or.state=jt.TEXT,Or.tag=null,Or.tagName=""),Or.attribName=Or.attribValue="",Or.attribList.length=0}function Vr(Or){if(!Or.tagName){pr(Or,"Weird empty close tag."),Or.textNode+="</>",Or.state=jt.TEXT;return}if(Or.script){if(Or.tagName!=="script"){Or.script+="</"+Or.tagName+">",Or.tagName="",Or.state=jt.SCRIPT;return}Wt(Or,"onscript",Or.script),Or.script=""}var Ar=Or.tags.length,Qr=Or.tagName;Or.strict||(Qr=Qr[Or.looseCase]());for(var hn=Qr;Ar--;){var Sn=Or.tags[Ar];if(Sn.name!==hn)pr(Or,"Unexpected close tag");else break}if(Ar<0){pr(Or,"Unmatched closing tag: "+Or.tagName),Or.textNode+="</"+Or.tagName+">",Or.state=jt.TEXT;return}Or.tagName=Qr;for(var Kr=Or.tags.length;Kr-- >Ar;){var Hn=Or.tag=Or.tags.pop();Or.tagName=Or.tag.name,Wt(Or,"onclosetag",Or.tagName);var ln={};for(var kn in Hn.ns)ln[kn]=Hn.ns[kn];var xn=Or.tags[Or.tags.length-1]||Or;Or.opt.xmlns&&Hn.ns!==xn.ns&&Object.keys(Hn.ns).forEach(function(An){var rs=Hn.ns[An];Wt(Or,"onclosenamespace",{prefix:An,uri:rs})})}Ar===0&&(Or.closedRoot=!0),Or.tagName=Or.attribValue=Or.attribName="",Or.attribList.length=0,Or.state=jt.TEXT}function Wr(Or){var Ar=Or.entity,Qr=Ar.toLowerCase(),hn,Sn="";return Or.ENTITIES[Ar]?Or.ENTITIES[Ar]:Or.ENTITIES[Qr]?Or.ENTITIES[Qr]:(Ar=Qr,Ar.charAt(0)==="#"&&(Ar.charAt(1)==="x"?(Ar=Ar.slice(2),hn=parseInt(Ar,16),Sn=hn.toString(16)):(Ar=Ar.slice(1),hn=parseInt(Ar,10),Sn=hn.toString(10))),Ar=Ar.replace(/^0+/,""),isNaN(hn)||Sn.toLowerCase()!==Ar?(pr(Or,"Invalid character entity"),"&"+Or.entity+";"):String.fromCodePoint(hn))}function Mr(Or,Ar){Ar==="<"?(Or.state=jt.OPEN_WAKA,Or.startTagPosition=Or.position):It(Ar)||(pr(Or,"Non-whitespace before first tag."),Or.textNode=Ar,Or.state=jt.TEXT)}function Nr(Or,Ar){var Qr="";return Ar<Or.length&&(Qr=Or.charAt(Ar)),Qr}function Yr(Or){var Ar=this;if(this.error)throw this.error;if(Ar.closed)return Jt(Ar,"Cannot write after close. Assign an onready handler.");if(Or===null)return ar(Ar);typeof Or=="object"&&(Or=Or.toString());for(var Qr=0,hn="";hn=Nr(Or,Qr++),Ar.c=hn,!!hn;)switch(Ar.trackPosition&&(Ar.position++,hn===`
`?(Ar.line++,Ar.column=0):Ar.column++),Ar.state){case jt.BEGIN:if(Ar.state=jt.BEGIN_WHITESPACE,hn==="\uFEFF")continue;Mr(Ar,hn);continue;case jt.BEGIN_WHITESPACE:Mr(Ar,hn);continue;case jt.TEXT:if(Ar.sawRoot&&!Ar.closedRoot){for(var Sn=Qr-1;hn&&hn!=="<"&&hn!=="&";)hn=Nr(Or,Qr++),hn&&Ar.trackPosition&&(Ar.position++,hn===`
`?(Ar.line++,Ar.column=0):Ar.column++);Ar.textNode+=Or.substring(Sn,Qr-1)}hn==="<"&&!(Ar.sawRoot&&Ar.closedRoot&&!Ar.strict)?(Ar.state=jt.OPEN_WAKA,Ar.startTagPosition=Ar.position):(!It(hn)&&(!Ar.sawRoot||Ar.closedRoot)&&pr(Ar,"Text data outside of root node."),hn==="&"?Ar.state=jt.TEXT_ENTITY:Ar.textNode+=hn);continue;case jt.SCRIPT:hn==="<"?Ar.state=jt.SCRIPT_ENDING:Ar.script+=hn;continue;case jt.SCRIPT_ENDING:hn==="/"?Ar.state=jt.CLOSE_TAG:(Ar.script+="<"+hn,Ar.state=jt.SCRIPT);continue;case jt.OPEN_WAKA:if(hn==="!")Ar.state=jt.SGML_DECL,Ar.sgmlDecl="";else if(!It(hn))if(Vt(wt,hn))Ar.state=jt.OPEN_TAG,Ar.tagName=hn;else if(hn==="/")Ar.state=jt.CLOSE_TAG,Ar.tagName="";else if(hn==="?")Ar.state=jt.PROC_INST,Ar.procInstName=Ar.procInstBody="";else{if(pr(Ar,"Unencoded <"),Ar.startTagPosition+1<Ar.position){var Kr=Ar.position-Ar.startTagPosition;hn=new Array(Kr).join(" ")+hn}Ar.textNode+="<"+hn,Ar.state=jt.TEXT}continue;case jt.SGML_DECL:(Ar.sgmlDecl+hn).toUpperCase()===St?(Wt(Ar,"onopencdata"),Ar.state=jt.CDATA,Ar.sgmlDecl="",Ar.cdata=""):Ar.sgmlDecl+hn==="--"?(Ar.state=jt.COMMENT,Ar.comment="",Ar.sgmlDecl=""):(Ar.sgmlDecl+hn).toUpperCase()===Et?(Ar.state=jt.DOCTYPE,(Ar.doctype||Ar.sawRoot)&&pr(Ar,"Inappropriately located doctype declaration"),Ar.doctype="",Ar.sgmlDecl=""):hn===">"?(Wt(Ar,"onsgmldeclaration",Ar.sgmlDecl),Ar.sgmlDecl="",Ar.state=jt.TEXT):(Ft(hn)&&(Ar.state=jt.SGML_DECL_QUOTED),Ar.sgmlDecl+=hn);continue;case jt.SGML_DECL_QUOTED:hn===Ar.q&&(Ar.state=jt.SGML_DECL,Ar.q=""),Ar.sgmlDecl+=hn;continue;case jt.DOCTYPE:hn===">"?(Ar.state=jt.TEXT,Wt(Ar,"ondoctype",Ar.doctype),Ar.doctype=!0):(Ar.doctype+=hn,hn==="["?Ar.state=jt.DOCTYPE_DTD:Ft(hn)&&(Ar.state=jt.DOCTYPE_QUOTED,Ar.q=hn));continue;case jt.DOCTYPE_QUOTED:Ar.doctype+=hn,hn===Ar.q&&(Ar.q="",Ar.state=jt.DOCTYPE);continue;case jt.DOCTYPE_DTD:Ar.doctype+=hn,hn==="]"?Ar.state=jt.DOCTYPE:Ft(hn)&&(Ar.state=jt.DOCTYPE_DTD_QUOTED,Ar.q=hn);continue;case jt.DOCTYPE_DTD_QUOTED:Ar.doctype+=hn,hn===Ar.q&&(Ar.state=jt.DOCTYPE_DTD,Ar.q="");continue;case jt.COMMENT:hn==="-"?Ar.state=jt.COMMENT_ENDING:Ar.comment+=hn;continue;case jt.COMMENT_ENDING:hn==="-"?(Ar.state=jt.COMMENT_ENDED,Ar.comment=tr(Ar.opt,Ar.comment),Ar.comment&&Wt(Ar,"oncomment",Ar.comment),Ar.comment=""):(Ar.comment+="-"+hn,Ar.state=jt.COMMENT);continue;case jt.COMMENT_ENDED:hn!==">"?(pr(Ar,"Malformed comment"),Ar.comment+="--"+hn,Ar.state=jt.COMMENT):Ar.state=jt.TEXT;continue;case jt.CDATA:hn==="]"?Ar.state=jt.CDATA_ENDING:Ar.cdata+=hn;continue;case jt.CDATA_ENDING:hn==="]"?Ar.state=jt.CDATA_ENDING_2:(Ar.cdata+="]"+hn,Ar.state=jt.CDATA);continue;case jt.CDATA_ENDING_2:hn===">"?(Ar.cdata&&Wt(Ar,"oncdata",Ar.cdata),Wt(Ar,"onclosecdata"),Ar.cdata="",Ar.state=jt.TEXT):hn==="]"?Ar.cdata+="]":(Ar.cdata+="]]"+hn,Ar.state=jt.CDATA);continue;case jt.PROC_INST:hn==="?"?Ar.state=jt.PROC_INST_ENDING:It(hn)?Ar.state=jt.PROC_INST_BODY:Ar.procInstName+=hn;continue;case jt.PROC_INST_BODY:if(!Ar.procInstBody&&It(hn))continue;hn==="?"?Ar.state=jt.PROC_INST_ENDING:Ar.procInstBody+=hn;continue;case jt.PROC_INST_ENDING:hn===">"?(Wt(Ar,"onprocessinginstruction",{name:Ar.procInstName,body:Ar.procInstBody}),Ar.procInstName=Ar.procInstBody="",Ar.state=jt.TEXT):(Ar.procInstBody+="?"+hn,Ar.state=jt.PROC_INST_BODY);continue;case jt.OPEN_TAG:Vt(At,hn)?Ar.tagName+=hn:(cr(Ar),hn===">"?Er(Ar):hn==="/"?Ar.state=jt.OPEN_TAG_SLASH:(It(hn)||pr(Ar,"Invalid character in tag name"),Ar.state=jt.ATTRIB));continue;case jt.OPEN_TAG_SLASH:hn===">"?(Er(Ar,!0),Vr(Ar)):(pr(Ar,"Forward-slash in opening tag not followed by >"),Ar.state=jt.ATTRIB);continue;case jt.ATTRIB:if(It(hn))continue;hn===">"?Er(Ar):hn==="/"?Ar.state=jt.OPEN_TAG_SLASH:Vt(wt,hn)?(Ar.attribName=hn,Ar.attribValue="",Ar.state=jt.ATTRIB_NAME):pr(Ar,"Invalid attribute name");continue;case jt.ATTRIB_NAME:hn==="="?Ar.state=jt.ATTRIB_VALUE:hn===">"?(pr(Ar,"Attribute without value"),Ar.attribValue=Ar.attribName,Sr(Ar),Er(Ar)):It(hn)?Ar.state=jt.ATTRIB_NAME_SAW_WHITE:Vt(At,hn)?Ar.attribName+=hn:pr(Ar,"Invalid attribute name");continue;case jt.ATTRIB_NAME_SAW_WHITE:if(hn==="=")Ar.state=jt.ATTRIB_VALUE;else{if(It(hn))continue;pr(Ar,"Attribute without value"),Ar.tag.attributes[Ar.attribName]="",Ar.attribValue="",Wt(Ar,"onattribute",{name:Ar.attribName,value:""}),Ar.attribName="",hn===">"?Er(Ar):Vt(wt,hn)?(Ar.attribName=hn,Ar.state=jt.ATTRIB_NAME):(pr(Ar,"Invalid attribute name"),Ar.state=jt.ATTRIB)}continue;case jt.ATTRIB_VALUE:if(It(hn))continue;Ft(hn)?(Ar.q=hn,Ar.state=jt.ATTRIB_VALUE_QUOTED):(pr(Ar,"Unquoted attribute value"),Ar.state=jt.ATTRIB_VALUE_UNQUOTED,Ar.attribValue=hn);continue;case jt.ATTRIB_VALUE_QUOTED:if(hn!==Ar.q){hn==="&"?Ar.state=jt.ATTRIB_VALUE_ENTITY_Q:Ar.attribValue+=hn;continue}Sr(Ar),Ar.q="",Ar.state=jt.ATTRIB_VALUE_CLOSED;continue;case jt.ATTRIB_VALUE_CLOSED:It(hn)?Ar.state=jt.ATTRIB:hn===">"?Er(Ar):hn==="/"?Ar.state=jt.OPEN_TAG_SLASH:Vt(wt,hn)?(pr(Ar,"No whitespace between attributes"),Ar.attribName=hn,Ar.attribValue="",Ar.state=jt.ATTRIB_NAME):pr(Ar,"Invalid attribute name");continue;case jt.ATTRIB_VALUE_UNQUOTED:if(!qt(hn)){hn==="&"?Ar.state=jt.ATTRIB_VALUE_ENTITY_U:Ar.attribValue+=hn;continue}Sr(Ar),hn===">"?Er(Ar):Ar.state=jt.ATTRIB;continue;case jt.CLOSE_TAG:if(Ar.tagName)hn===">"?Vr(Ar):Vt(At,hn)?Ar.tagName+=hn:Ar.script?(Ar.script+="</"+Ar.tagName,Ar.tagName="",Ar.state=jt.SCRIPT):(It(hn)||pr(Ar,"Invalid tagname in closing tag"),Ar.state=jt.CLOSE_TAG_SAW_WHITE);else{if(It(hn))continue;Kt(wt,hn)?Ar.script?(Ar.script+="</"+hn,Ar.state=jt.SCRIPT):pr(Ar,"Invalid tagname in closing tag."):Ar.tagName=hn}continue;case jt.CLOSE_TAG_SAW_WHITE:if(It(hn))continue;hn===">"?Vr(Ar):pr(Ar,"Invalid characters in closing tag");continue;case jt.TEXT_ENTITY:case jt.ATTRIB_VALUE_ENTITY_Q:case jt.ATTRIB_VALUE_ENTITY_U:var Hn,ln;switch(Ar.state){case jt.TEXT_ENTITY:Hn=jt.TEXT,ln="textNode";break;case jt.ATTRIB_VALUE_ENTITY_Q:Hn=jt.ATTRIB_VALUE_QUOTED,ln="attribValue";break;case jt.ATTRIB_VALUE_ENTITY_U:Hn=jt.ATTRIB_VALUE_UNQUOTED,ln="attribValue";break}hn===";"?(Ar[ln]+=Wr(Ar),Ar.entity="",Ar.state=Hn):Vt(Ar.entity.length?Pt:Nt,hn)?Ar.entity+=hn:(pr(Ar,"Invalid character in entity name"),Ar[ln]+="&"+Ar.entity+hn,Ar.entity="",Ar.state=Hn);continue;default:throw new Error(Ar,"Unknown state: "+Ar.state)}return Ar.position>=Ar.bufferCheckPosition&&nt(Ar),Ar}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||(function(){var Or=String.fromCharCode,Ar=Math.floor,Qr=function(){var hn=16384,Sn=[],Kr,Hn,ln=-1,kn=arguments.length;if(!kn)return"";for(var xn="";++ln<kn;){var An=Number(arguments[ln]);if(!isFinite(An)||An<0||An>1114111||Ar(An)!==An)throw RangeError("Invalid code point: "+An);An<=65535?Sn.push(An):(An-=65536,Kr=(An>>10)+55296,Hn=An%1024+56320,Sn.push(Kr,Hn)),(ln+1===kn||Sn.length>hn)&&(xn+=Or.apply(null,Sn),Sn.length=0)}return xn};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Qr,configurable:!0,writable:!0}):String.fromCodePoint=Qr})()})(et)})(sax$1);var arrayHelper={isArray:function(et){return Array.isArray?Array.isArray(et):Object.prototype.toString.call(et)==="[object Array]"}},isArray$2=arrayHelper.isArray,optionsHelper={copyOptions:function(et){var _e,tt={};for(_e in et)et.hasOwnProperty(_e)&&(tt[_e]=et[_e]);return tt},ensureFlagExists:function(et,_e){(!(et in _e)||typeof _e[et]!="boolean")&&(_e[et]=!1)},ensureSpacesExists:function(et){(!("spaces"in et)||typeof et.spaces!="number"&&typeof et.spaces!="string")&&(et.spaces=0)},ensureAlwaysArrayExists:function(et){(!("alwaysArray"in et)||typeof et.alwaysArray!="boolean"&&!isArray$2(et.alwaysArray))&&(et.alwaysArray=!1)},ensureKeyExists:function(et,_e){(!(et+"Key"in _e)||typeof _e[et+"Key"]!="string")&&(_e[et+"Key"]=_e.compact?"_"+et:et)},checkFnExists:function(et,_e){return et+"Fn"in _e}},sax$2=sax$1,helper$2=optionsHelper,isArray$1=arrayHelper.isArray,options,currentElement$1;function validateOptions$2(et){return options=helper$2.copyOptions(et),helper$2.ensureFlagExists("ignoreDeclaration",options),helper$2.ensureFlagExists("ignoreInstruction",options),helper$2.ensureFlagExists("ignoreAttributes",options),helper$2.ensureFlagExists("ignoreText",options),helper$2.ensureFlagExists("ignoreComment",options),helper$2.ensureFlagExists("ignoreCdata",options),helper$2.ensureFlagExists("ignoreDoctype",options),helper$2.ensureFlagExists("compact",options),helper$2.ensureFlagExists("alwaysChildren",options),helper$2.ensureFlagExists("addParent",options),helper$2.ensureFlagExists("trim",options),helper$2.ensureFlagExists("nativeType",options),helper$2.ensureFlagExists("nativeTypeAttributes",options),helper$2.ensureFlagExists("sanitize",options),helper$2.ensureFlagExists("instructionHasAttributes",options),helper$2.ensureFlagExists("captureSpacesBetweenElements",options),helper$2.ensureAlwaysArrayExists(options),helper$2.ensureKeyExists("declaration",options),helper$2.ensureKeyExists("instruction",options),helper$2.ensureKeyExists("attributes",options),helper$2.ensureKeyExists("text",options),helper$2.ensureKeyExists("comment",options),helper$2.ensureKeyExists("cdata",options),helper$2.ensureKeyExists("doctype",options),helper$2.ensureKeyExists("type",options),helper$2.ensureKeyExists("name",options),helper$2.ensureKeyExists("elements",options),helper$2.ensureKeyExists("parent",options),options}function nativeType(et){var _e=Number(et);if(!isNaN(_e))return _e;var tt=et.toLowerCase();return tt==="true"?!0:tt==="false"?!1:et}function addField(et,_e){var tt;if(options.compact){if(!currentElement$1[options[et+"Key"]]&&(isArray$1(options.alwaysArray)?options.alwaysArray.indexOf(options[et+"Key"])!==-1:options.alwaysArray)&&(currentElement$1[options[et+"Key"]]=[]),currentElement$1[options[et+"Key"]]&&!isArray$1(currentElement$1[options[et+"Key"]])&&(currentElement$1[options[et+"Key"]]=[currentElement$1[options[et+"Key"]]]),et+"Fn"in options&&typeof _e=="string"&&(_e=options[et+"Fn"](_e,currentElement$1)),et==="instruction"&&("instructionFn"in options||"instructionNameFn"in options)){for(tt in _e)if(_e.hasOwnProperty(tt))if("instructionFn"in options)_e[tt]=options.instructionFn(_e[tt],tt,currentElement$1);else{var rt=_e[tt];delete _e[tt],_e[options.instructionNameFn(tt,rt,currentElement$1)]=rt}}isArray$1(currentElement$1[options[et+"Key"]])?currentElement$1[options[et+"Key"]].push(_e):currentElement$1[options[et+"Key"]]=_e}else{currentElement$1[options.elementsKey]||(currentElement$1[options.elementsKey]=[]);var nt={};if(nt[options.typeKey]=et,et==="instruction"){for(tt in _e)if(_e.hasOwnProperty(tt))break;nt[options.nameKey]="instructionNameFn"in options?options.instructionNameFn(tt,_e,currentElement$1):tt,options.instructionHasAttributes?(nt[options.attributesKey]=_e[tt][options.attributesKey],"instructionFn"in options&&(nt[options.attributesKey]=options.instructionFn(nt[options.attributesKey],tt,currentElement$1))):("instructionFn"in options&&(_e[tt]=options.instructionFn(_e[tt],tt,currentElement$1)),nt[options.instructionKey]=_e[tt])}else et+"Fn"in options&&(_e=options[et+"Fn"](_e,currentElement$1)),nt[options[et+"Key"]]=_e;options.addParent&&(nt[options.parentKey]=currentElement$1),currentElement$1[options.elementsKey].push(nt)}}function manipulateAttributes(et){if("attributesFn"in options&&et&&(et=options.attributesFn(et,currentElement$1)),(options.trim||"attributeValueFn"in options||"attributeNameFn"in options||options.nativeTypeAttributes)&&et){var _e;for(_e in et)if(et.hasOwnProperty(_e)&&(options.trim&&(et[_e]=et[_e].trim()),options.nativeTypeAttributes&&(et[_e]=nativeType(et[_e])),"attributeValueFn"in options&&(et[_e]=options.attributeValueFn(et[_e],_e,currentElement$1)),"attributeNameFn"in options)){var tt=et[_e];delete et[_e],et[options.attributeNameFn(_e,et[_e],currentElement$1)]=tt}}return et}function onInstruction(et){var _e={};if(et.body&&(et.name.toLowerCase()==="xml"||options.instructionHasAttributes)){for(var tt=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,rt;(rt=tt.exec(et.body))!==null;)_e[rt[1]]=rt[2]||rt[3]||rt[4];_e=manipulateAttributes(_e)}if(et.name.toLowerCase()==="xml"){if(options.ignoreDeclaration)return;currentElement$1[options.declarationKey]={},Object.keys(_e).length&&(currentElement$1[options.declarationKey][options.attributesKey]=_e),options.addParent&&(currentElement$1[options.declarationKey][options.parentKey]=currentElement$1)}else{if(options.ignoreInstruction)return;options.trim&&(et.body=et.body.trim());var nt={};options.instructionHasAttributes&&Object.keys(_e).length?(nt[et.name]={},nt[et.name][options.attributesKey]=_e):nt[et.name]=et.body,addField("instruction",nt)}}function onStartElement(et,_e){var tt;if(typeof et=="object"&&(_e=et.attributes,et=et.name),_e=manipulateAttributes(_e),"elementNameFn"in options&&(et=options.elementNameFn(et,currentElement$1)),options.compact){if(tt={},!options.ignoreAttributes&&_e&&Object.keys(_e).length){tt[options.attributesKey]={};var rt;for(rt in _e)_e.hasOwnProperty(rt)&&(tt[options.attributesKey][rt]=_e[rt])}!(et in currentElement$1)&&(isArray$1(options.alwaysArray)?options.alwaysArray.indexOf(et)!==-1:options.alwaysArray)&&(currentElement$1[et]=[]),currentElement$1[et]&&!isArray$1(currentElement$1[et])&&(currentElement$1[et]=[currentElement$1[et]]),isArray$1(currentElement$1[et])?currentElement$1[et].push(tt):currentElement$1[et]=tt}else currentElement$1[options.elementsKey]||(currentElement$1[options.elementsKey]=[]),tt={},tt[options.typeKey]="element",tt[options.nameKey]=et,!options.ignoreAttributes&&_e&&Object.keys(_e).length&&(tt[options.attributesKey]=_e),options.alwaysChildren&&(tt[options.elementsKey]=[]),currentElement$1[options.elementsKey].push(tt);tt[options.parentKey]=currentElement$1,currentElement$1=tt}function onText(et){options.ignoreText||!et.trim()&&!options.captureSpacesBetweenElements||(options.trim&&(et=et.trim()),options.nativeType&&(et=nativeType(et)),options.sanitize&&(et=et.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),addField("text",et))}function onComment(et){options.ignoreComment||(options.trim&&(et=et.trim()),addField("comment",et))}function onEndElement(et){var _e=currentElement$1[options.parentKey];options.addParent||delete currentElement$1[options.parentKey],currentElement$1=_e}function onCdata(et){options.ignoreCdata||(options.trim&&(et=et.trim()),addField("cdata",et))}function onDoctype(et){options.ignoreDoctype||(et=et.replace(/^ /,""),options.trim&&(et=et.trim()),addField("doctype",et))}function onError$1(et){et.note=et,"onErrorFn"in options&&options.onErrorFn(et)}var xml2js$1=function(et,_e){var tt=sax$2.parser(!0,{}),rt={};currentElement$1=rt,options=validateOptions$2(_e),tt.opt={strictEntities:!0},tt.onopentag=onStartElement,tt.ontext=onText,tt.oncomment=onComment,tt.onclosetag=onEndElement,tt.onerror=onError$1,tt.oncdata=onCdata,tt.ondoctype=onDoctype,tt.onprocessinginstruction=onInstruction;try{tt.write(et).close()}catch{}if(rt[options.elementsKey]){var nt=rt[options.elementsKey];delete rt[options.elementsKey],rt[options.elementsKey]=nt,delete rt.text}return rt},helper$1=optionsHelper,xml2js=xml2js$1;function validateOptions$1(et){var _e=helper$1.copyOptions(et);return helper$1.ensureSpacesExists(_e),_e}var xml2json=function(et,_e){var tt,rt,nt,st;return tt=validateOptions$1(_e),rt=xml2js(et,tt),st="compact"in tt&&tt.compact?"_parent":"parent","addParent"in tt&&tt.addParent?nt=JSON.stringify(rt,function(dt,ft){return dt===st?"_":ft},tt.spaces):nt=JSON.stringify(rt,null,tt.spaces),nt.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},helper=optionsHelper,isArray=arrayHelper.isArray,currentElement,currentElementName;function validateOptions(et){var _e=helper.copyOptions(et);return helper.ensureFlagExists("ignoreDeclaration",_e),helper.ensureFlagExists("ignoreInstruction",_e),helper.ensureFlagExists("ignoreAttributes",_e),helper.ensureFlagExists("ignoreText",_e),helper.ensureFlagExists("ignoreComment",_e),helper.ensureFlagExists("ignoreCdata",_e),helper.ensureFlagExists("ignoreDoctype",_e),helper.ensureFlagExists("compact",_e),helper.ensureFlagExists("indentText",_e),helper.ensureFlagExists("indentCdata",_e),helper.ensureFlagExists("indentAttributes",_e),helper.ensureFlagExists("indentInstruction",_e),helper.ensureFlagExists("fullTagEmptyElement",_e),helper.ensureFlagExists("noQuotesForNativeAttributes",_e),helper.ensureSpacesExists(_e),typeof _e.spaces=="number"&&(_e.spaces=Array(_e.spaces+1).join(" ")),helper.ensureKeyExists("declaration",_e),helper.ensureKeyExists("instruction",_e),helper.ensureKeyExists("attributes",_e),helper.ensureKeyExists("text",_e),helper.ensureKeyExists("comment",_e),helper.ensureKeyExists("cdata",_e),helper.ensureKeyExists("doctype",_e),helper.ensureKeyExists("type",_e),helper.ensureKeyExists("name",_e),helper.ensureKeyExists("elements",_e),_e}function writeIndentation(et,_e,tt){return(!tt&&et.spaces?`
`:"")+Array(_e+1).join(et.spaces)}function writeAttributes(et,_e,tt){if(_e.ignoreAttributes)return"";"attributesFn"in _e&&(et=_e.attributesFn(et,currentElementName,currentElement));var rt,nt,st,dt,ft=[];for(rt in et)et.hasOwnProperty(rt)&&et[rt]!==null&&et[rt]!==void 0&&(dt=_e.noQuotesForNativeAttributes&&typeof et[rt]!="string"?"":'"',nt=""+et[rt],nt=nt.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;"),st="attributeNameFn"in _e?_e.attributeNameFn(rt,nt,currentElementName,currentElement):rt,ft.push(_e.spaces&&_e.indentAttributes?writeIndentation(_e,tt+1,!1):" "),ft.push(st+"="+dt+("attributeValueFn"in _e?_e.attributeValueFn(nt,rt,currentElementName,currentElement):nt)+dt));return et&&Object.keys(et).length&&_e.spaces&&_e.indentAttributes&&ft.push(writeIndentation(_e,tt,!1)),ft.join("")}function writeDeclaration(et,_e,tt){return currentElement=et,currentElementName="xml",_e.ignoreDeclaration?"":"<?xml"+writeAttributes(et[_e.attributesKey],_e,tt)+"?>"}function writeInstruction(et,_e,tt){if(_e.ignoreInstruction)return"";var rt;for(rt in et)if(et.hasOwnProperty(rt))break;var nt="instructionNameFn"in _e?_e.instructionNameFn(rt,et[rt],currentElementName,currentElement):rt;if(typeof et[rt]=="object")return currentElement=et,currentElementName=nt,"<?"+nt+writeAttributes(et[rt][_e.attributesKey],_e,tt)+"?>";var st=et[rt]?et[rt]:"";return"instructionFn"in _e&&(st=_e.instructionFn(st,rt,currentElementName,currentElement)),"<?"+nt+(st?" "+st:"")+"?>"}function writeComment(et,_e){return _e.ignoreComment?"":"<!--"+("commentFn"in _e?_e.commentFn(et,currentElementName,currentElement):et)+"-->"}function writeCdata(et,_e){return _e.ignoreCdata?"":"<![CDATA["+("cdataFn"in _e?_e.cdataFn(et,currentElementName,currentElement):et.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function writeDoctype(et,_e){return _e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in _e?_e.doctypeFn(et,currentElementName,currentElement):et)+">"}function writeText(et,_e){return _e.ignoreText?"":(et=""+et,et=et.replace(/&amp;/g,"&"),et=et.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in _e?_e.textFn(et,currentElementName,currentElement):et)}function hasContent(et,_e){var tt;if(et.elements&&et.elements.length)for(tt=0;tt<et.elements.length;++tt)switch(et.elements[tt][_e.typeKey]){case"text":if(_e.indentText)return!0;break;case"cdata":if(_e.indentCdata)return!0;break;case"instruction":if(_e.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function writeElement(et,_e,tt){currentElement=et,currentElementName=et.name;var rt=[],nt="elementNameFn"in _e?_e.elementNameFn(et.name,et):et.name;rt.push("<"+nt),et[_e.attributesKey]&&rt.push(writeAttributes(et[_e.attributesKey],_e,tt));var st=et[_e.elementsKey]&&et[_e.elementsKey].length||et[_e.attributesKey]&&et[_e.attributesKey]["xml:space"]==="preserve";return st||("fullTagEmptyElementFn"in _e?st=_e.fullTagEmptyElementFn(et.name,et):st=_e.fullTagEmptyElement),st?(rt.push(">"),et[_e.elementsKey]&&et[_e.elementsKey].length&&(rt.push(writeElements(et[_e.elementsKey],_e,tt+1)),currentElement=et,currentElementName=et.name),rt.push(_e.spaces&&hasContent(et,_e)?`
`+Array(tt+1).join(_e.spaces):""),rt.push("</"+nt+">")):rt.push("/>"),rt.join("")}function writeElements(et,_e,tt,rt){return et.reduce(function(nt,st){var dt=writeIndentation(_e,tt,rt&&!nt);switch(st.type){case"element":return nt+dt+writeElement(st,_e,tt);case"comment":return nt+dt+writeComment(st[_e.commentKey],_e);case"doctype":return nt+dt+writeDoctype(st[_e.doctypeKey],_e);case"cdata":return nt+(_e.indentCdata?dt:"")+writeCdata(st[_e.cdataKey],_e);case"text":return nt+(_e.indentText?dt:"")+writeText(st[_e.textKey],_e);case"instruction":var ft={};return ft[st[_e.nameKey]]=st[_e.attributesKey]?st:st[_e.instructionKey],nt+(_e.indentInstruction?dt:"")+writeInstruction(ft,_e,tt)}},"")}function hasContentCompact(et,_e,tt){var rt;for(rt in et)if(et.hasOwnProperty(rt))switch(rt){case _e.parentKey:case _e.attributesKey:break;case _e.textKey:if(_e.indentText||tt)return!0;break;case _e.cdataKey:if(_e.indentCdata||tt)return!0;break;case _e.instructionKey:if(_e.indentInstruction||tt)return!0;break;case _e.doctypeKey:case _e.commentKey:return!0;default:return!0}return!1}function writeElementCompact(et,_e,tt,rt,nt){currentElement=et,currentElementName=_e;var st="elementNameFn"in tt?tt.elementNameFn(_e,et):_e;if(typeof et>"u"||et===null||et==="")return"fullTagEmptyElementFn"in tt&&tt.fullTagEmptyElementFn(_e,et)||tt.fullTagEmptyElement?"<"+st+"></"+st+">":"<"+st+"/>";var dt=[];if(_e){if(dt.push("<"+st),typeof et!="object")return dt.push(">"+writeText(et,tt)+"</"+st+">"),dt.join("");et[tt.attributesKey]&&dt.push(writeAttributes(et[tt.attributesKey],tt,rt));var ft=hasContentCompact(et,tt,!0)||et[tt.attributesKey]&&et[tt.attributesKey]["xml:space"]==="preserve";if(ft||("fullTagEmptyElementFn"in tt?ft=tt.fullTagEmptyElementFn(_e,et):ft=tt.fullTagEmptyElement),ft)dt.push(">");else return dt.push("/>"),dt.join("")}return dt.push(writeElementsCompact(et,tt,rt+1,!1)),currentElement=et,currentElementName=_e,_e&&dt.push((nt?writeIndentation(tt,rt,!1):"")+"</"+st+">"),dt.join("")}function writeElementsCompact(et,_e,tt,rt){var nt,st,dt,ft=[];for(st in et)if(et.hasOwnProperty(st))for(dt=isArray(et[st])?et[st]:[et[st]],nt=0;nt<dt.length;++nt){switch(st){case _e.declarationKey:ft.push(writeDeclaration(dt[nt],_e,tt));break;case _e.instructionKey:ft.push((_e.indentInstruction?writeIndentation(_e,tt,rt):"")+writeInstruction(dt[nt],_e,tt));break;case _e.attributesKey:case _e.parentKey:break;case _e.textKey:ft.push((_e.indentText?writeIndentation(_e,tt,rt):"")+writeText(dt[nt],_e));break;case _e.cdataKey:ft.push((_e.indentCdata?writeIndentation(_e,tt,rt):"")+writeCdata(dt[nt],_e));break;case _e.doctypeKey:ft.push(writeIndentation(_e,tt,rt)+writeDoctype(dt[nt],_e));break;case _e.commentKey:ft.push(writeIndentation(_e,tt,rt)+writeComment(dt[nt],_e));break;default:ft.push(writeIndentation(_e,tt,rt)+writeElementCompact(dt[nt],st,_e,tt,hasContentCompact(dt[nt],_e)))}rt=rt&&!ft.length}return ft.join("")}var js2xml$1=function(et,_e){_e=validateOptions(_e);var tt=[];return currentElement=et,currentElementName="_root_",_e.compact?tt.push(writeElementsCompact(et,_e,0,!0)):(et[_e.declarationKey]&&tt.push(writeDeclaration(et[_e.declarationKey],_e,0)),et[_e.elementsKey]&&et[_e.elementsKey].length&&tt.push(writeElements(et[_e.elementsKey],_e,0,!tt.length))),tt.join("")},js2xml=js2xml$1,json2xml=function(et,_e){et instanceof Buffer&&(et=et.toString());var tt=null;if(typeof et=="string")try{tt=JSON.parse(et)}catch{throw new Error("The JSON structure is invalid")}else tt=et;return js2xml(tt,_e)};const index_es=Object.freeze(Object.defineProperty({__proto__:null,js2xml:js2xml$1,json2xml,xml2js:xml2js$1,xml2json},Symbol.toStringTag,{value:"Module"})),require$$128=getAugmentedNamespace$1(index_es);var cjs={},mainAny={},configReadonly={},interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,(function(et){function _e(tt){return tt&&tt.__esModule?tt:{default:tt}}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(interopRequireDefault)),interopRequireDefault.exports}var _extends$1={exports:{}},hasRequired_extends;function require_extends(){return hasRequired_extends||(hasRequired_extends=1,(function(et){function _e(){return et.exports=_e=Object.assign?Object.assign.bind():function(tt){for(var rt=1;rt<arguments.length;rt++){var nt=arguments[rt];for(var st in nt)({}).hasOwnProperty.call(nt,st)&&(tt[st]=nt[st])}return tt},et.exports.__esModule=!0,et.exports.default=et.exports,_e.apply(null,arguments)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(_extends$1)),_extends$1.exports}var config$2={},hasRequiredConfig$2;function requireConfig$2(){if(hasRequiredConfig$2)return config$2;hasRequiredConfig$2=1,Object.defineProperty(config$2,"__esModule",{value:!0}),config$2.DEFAULT_CONFIG=void 0;var et={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};return config$2.DEFAULT_CONFIG=et,config$2}var config$1={},object={},_typeof={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,(function(et){function _e(tt){"@babel/helpers - typeof";return et.exports=_e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},et.exports.__esModule=!0,et.exports.default=et.exports,_e(tt)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(_typeof)),_typeof.exports}var is={},hasRequiredIs;function requireIs(){if(hasRequiredIs)return is;hasRequiredIs=1;var et=requireInteropRequireDefault();Object.defineProperty(is,"__esModule",{value:!0}),is.isAccessorNode=Kt,is.isArray=void 0,is.isArrayNode=jt,is.isAssignmentNode=Ut,is.isBigNumber=rt,is.isBlockNode=Ot,is.isBoolean=Tt,is.isChain=Wr,is.isCollection=bt,is.isComplex=nt,is.isConditionalNode=Wt,is.isConstantNode=Bt,is.isDate=Pt,is.isDenseMatrix=St,is.isFraction=st,is.isFunction=Nt,is.isFunctionAssignmentNode=tr,is.isFunctionNode=Jt,is.isHelp=At,is.isIndex=Rt,is.isIndexNode=ar,is.isMatrix=mt,is.isNode=pr,is.isNull=qt,is.isNumber=tt,is.isObject=Ft,is.isObjectNode=cr,is.isOperatorNode=gr,is.isParenthesisNode=Sr,is.isRange=Ct,is.isRangeNode=Er,is.isRegExp=It,is.isResultSet=wt,is.isSparseMatrix=Et,is.isString=ft,is.isSymbolNode=Vr,is.isUndefined=Vt,is.isUnit=dt,is.typeOf=Mr;var _e=et(require_typeof());function tt(Nr){return typeof Nr=="number"}function rt(Nr){return!Nr||(0,_e.default)(Nr)!=="object"||typeof Nr.constructor!="function"?!1:Nr.isBigNumber===!0&&(0,_e.default)(Nr.constructor.prototype)==="object"&&Nr.constructor.prototype.isBigNumber===!0||typeof Nr.constructor.isDecimal=="function"&&Nr.constructor.isDecimal(Nr)===!0}function nt(Nr){return Nr&&(0,_e.default)(Nr)==="object"&&Object.getPrototypeOf(Nr).isComplex===!0||!1}function st(Nr){return Nr&&(0,_e.default)(Nr)==="object"&&Object.getPrototypeOf(Nr).isFraction===!0||!1}function dt(Nr){return Nr&&Nr.constructor.prototype.isUnit===!0||!1}function ft(Nr){return typeof Nr=="string"}var ht=Array.isArray;is.isArray=ht;function mt(Nr){return Nr&&Nr.constructor.prototype.isMatrix===!0||!1}function bt(Nr){return Array.isArray(Nr)||mt(Nr)}function St(Nr){return Nr&&Nr.isDenseMatrix&&Nr.constructor.prototype.isMatrix===!0||!1}function Et(Nr){return Nr&&Nr.isSparseMatrix&&Nr.constructor.prototype.isMatrix===!0||!1}function Ct(Nr){return Nr&&Nr.constructor.prototype.isRange===!0||!1}function Rt(Nr){return Nr&&Nr.constructor.prototype.isIndex===!0||!1}function Tt(Nr){return typeof Nr=="boolean"}function wt(Nr){return Nr&&Nr.constructor.prototype.isResultSet===!0||!1}function At(Nr){return Nr&&Nr.constructor.prototype.isHelp===!0||!1}function Nt(Nr){return typeof Nr=="function"}function Pt(Nr){return Nr instanceof Date}function It(Nr){return Nr instanceof RegExp}function Ft(Nr){return!!(Nr&&(0,_e.default)(Nr)==="object"&&Nr.constructor===Object&&!nt(Nr)&&!st(Nr))}function qt(Nr){return Nr===null}function Vt(Nr){return Nr===void 0}function Kt(Nr){return Nr&&Nr.isAccessorNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function jt(Nr){return Nr&&Nr.isArrayNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Ut(Nr){return Nr&&Nr.isAssignmentNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Ot(Nr){return Nr&&Nr.isBlockNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Wt(Nr){return Nr&&Nr.isConditionalNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Bt(Nr){return Nr&&Nr.isConstantNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function tr(Nr){return Nr&&Nr.isFunctionAssignmentNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Jt(Nr){return Nr&&Nr.isFunctionNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function ar(Nr){return Nr&&Nr.isIndexNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function pr(Nr){return Nr&&Nr.isNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function cr(Nr){return Nr&&Nr.isObjectNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function gr(Nr){return Nr&&Nr.isOperatorNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Sr(Nr){return Nr&&Nr.isParenthesisNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Er(Nr){return Nr&&Nr.isRangeNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Vr(Nr){return Nr&&Nr.isSymbolNode===!0&&Nr.constructor.prototype.isNode===!0||!1}function Wr(Nr){return Nr&&Nr.constructor.prototype.isChain===!0||!1}function Mr(Nr){var Yr=(0,_e.default)(Nr);return Yr==="object"?Nr===null?"null":Array.isArray(Nr)?"Array":Nr instanceof Date?"Date":Nr instanceof RegExp?"RegExp":rt(Nr)?"BigNumber":nt(Nr)?"Complex":st(Nr)?"Fraction":mt(Nr)?"Matrix":dt(Nr)?"Unit":Rt(Nr)?"Index":Ct(Nr)?"Range":wt(Nr)?"ResultSet":pr(Nr)?Nr.type:Wr(Nr)?"Chain":At(Nr)?"Help":"Object":Yr==="function"?"Function":Yr}return is}var hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1;var et=requireInteropRequireDefault();Object.defineProperty(object,"__esModule",{value:!0}),object.canDefineProperty=bt,object.clone=rt,object.deepExtend=dt,object.deepFlatten=ht,object.deepStrictEqual=ft,object.extend=st,object.get=Tt,object.hasOwnProperty=Ct,object.isLegacyFactory=Rt,object.lazy=St,object.mapObject=nt,object.pick=At,object.pickShallow=Nt,object.set=wt,object.traverse=Et,object.values=Pt;var _e=et(require_typeof()),tt=requireIs();function rt(Ft){var qt=(0,_e.default)(Ft);if(qt==="number"||qt==="string"||qt==="boolean"||Ft===null||Ft===void 0)return Ft;if(typeof Ft.clone=="function")return Ft.clone();if(Array.isArray(Ft))return Ft.map(function(Vt){return rt(Vt)});if(Ft instanceof Date)return new Date(Ft.valueOf());if((0,tt.isBigNumber)(Ft))return Ft;if(Ft instanceof RegExp)throw new TypeError("Cannot clone "+Ft);return nt(Ft,rt)}function nt(Ft,qt){var Vt={};for(var Kt in Ft)Ct(Ft,Kt)&&(Vt[Kt]=qt(Ft[Kt]));return Vt}function st(Ft,qt){for(var Vt in qt)Ct(qt,Vt)&&(Ft[Vt]=qt[Vt]);return Ft}function dt(Ft,qt){if(Array.isArray(qt))throw new TypeError("Arrays are not supported by deepExtend");for(var Vt in qt)if(Ct(qt,Vt)&&!(Vt in Object.prototype)&&!(Vt in Function.prototype))if(qt[Vt]&&qt[Vt].constructor===Object)Ft[Vt]===void 0&&(Ft[Vt]={}),Ft[Vt]&&Ft[Vt].constructor===Object?dt(Ft[Vt],qt[Vt]):Ft[Vt]=qt[Vt];else{if(Array.isArray(qt[Vt]))throw new TypeError("Arrays are not supported by deepExtend");Ft[Vt]=qt[Vt]}return Ft}function ft(Ft,qt){var Vt,Kt,jt;if(Array.isArray(Ft)){if(!Array.isArray(qt)||Ft.length!==qt.length)return!1;for(Kt=0,jt=Ft.length;Kt<jt;Kt++)if(!ft(Ft[Kt],qt[Kt]))return!1;return!0}else{if(typeof Ft=="function")return Ft===qt;if(Ft instanceof Object){if(Array.isArray(qt)||!(qt instanceof Object))return!1;for(Vt in Ft)if(!(Vt in qt)||!ft(Ft[Vt],qt[Vt]))return!1;for(Vt in qt)if(!(Vt in Ft))return!1;return!0}else return Ft===qt}}function ht(Ft){var qt={};return mt(Ft,qt),qt}function mt(Ft,qt){for(var Vt in Ft)if(Ct(Ft,Vt)){var Kt=Ft[Vt];(0,_e.default)(Kt)==="object"&&Kt!==null?mt(Kt,qt):qt[Vt]=Kt}}function bt(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){return null}}),!0}catch{}return!1}function St(Ft,qt,Vt){var Kt=!0,jt;Object.defineProperty(Ft,qt,{get:function(){return Kt&&(jt=Vt(),Kt=!1),jt},set:function(Ot){jt=Ot,Kt=!1},configurable:!0,enumerable:!0})}function Et(Ft,qt){if(qt&&typeof qt=="string")return Et(Ft,qt.split("."));var Vt=Ft;if(qt)for(var Kt=0;Kt<qt.length;Kt++){var jt=qt[Kt];jt in Vt||(Vt[jt]={}),Vt=Vt[jt]}return Vt}function Ct(Ft,qt){return Ft&&Object.hasOwnProperty.call(Ft,qt)}function Rt(Ft){return Ft&&typeof Ft.factory=="function"}function Tt(Ft,qt){if(typeof qt=="string")return It(qt)?Tt(Ft,qt.split(".")):Ft[qt];for(var Vt=Ft,Kt=0;Kt<qt.length;Kt++){var jt=qt[Kt];Vt=Vt?Vt[jt]:void 0}return Vt}function wt(Ft,qt,Vt){if(typeof qt=="string")return It(qt)?wt(Ft,qt.split("."),Vt):(Ft[qt]=Vt,Ft);for(var Kt=Ft,jt=0;jt<qt.length-1;jt++){var Ut=qt[jt];Kt[Ut]===void 0&&(Kt[Ut]={}),Kt=Kt[Ut]}if(qt.length>0){var Ot=qt[qt.length-1];Kt[Ot]=Vt}return Ft}function At(Ft,qt,Vt){for(var Kt={},jt=0;jt<qt.length;jt++){var Ut=qt[jt],Ot=Tt(Ft,Ut);Ot!==void 0&&wt(Kt,Ut,Vt?Vt(Ot,Ut):Ot)}return Kt}function Nt(Ft,qt){for(var Vt={},Kt=0;Kt<qt.length;Kt++){var jt=qt[Kt],Ut=Ft[jt];Ut!==void 0&&(Vt[jt]=Ut)}return Vt}function Pt(Ft){return Object.keys(Ft).map(function(qt){return Ft[qt]})}function It(Ft){return Ft.indexOf(".")!==-1}return object}var hasRequiredConfig$1;function requireConfig$1(){if(hasRequiredConfig$1)return config$1;hasRequiredConfig$1=1,Object.defineProperty(config$1,"__esModule",{value:!0}),config$1.NUMBER_OPTIONS=config$1.MATRIX_OPTIONS=void 0,config$1.configFactory=nt;var et=requireObject(),_e=requireConfig$2(),tt=["Matrix","Array"];config$1.MATRIX_OPTIONS=tt;var rt=["number","BigNumber","Fraction"];config$1.NUMBER_OPTIONS=rt;function nt(ft,ht){function mt(bt){if(bt){var St=(0,et.mapObject)(ft,et.clone);dt(bt,"matrix",tt),dt(bt,"number",rt),(0,et.deepExtend)(ft,bt);var Et=(0,et.mapObject)(ft,et.clone),Ct=(0,et.mapObject)(bt,et.clone);return ht("config",Et,St,Ct),Et}else return(0,et.mapObject)(ft,et.clone)}return mt.MATRIX_OPTIONS=tt,mt.NUMBER_OPTIONS=rt,Object.keys(_e.DEFAULT_CONFIG).forEach(function(bt){Object.defineProperty(mt,bt,{get:function(){return ft[bt]},enumerable:!0,configurable:!0})}),mt}function st(ft,ht){return ft.indexOf(ht)!==-1}function dt(ft,ht,mt){ft[ht]!==void 0&&!st(mt,ft[ht])&&console.warn('Warning: Unknown value "'+ft[ht]+'" for configuration option "'+ht+'". Available options: '+mt.map(function(bt){return JSON.stringify(bt)}).join(", ")+".")}return config$1}var hasRequiredConfigReadonly;function requireConfigReadonly(){if(hasRequiredConfigReadonly)return configReadonly;hasRequiredConfigReadonly=1;var et=requireInteropRequireDefault();Object.defineProperty(configReadonly,"__esModule",{value:!0}),configReadonly.config=void 0;var _e=et(require_extends()),tt=requireConfig$2(),rt=requireConfig$1(),nt=function(dt){if(dt)throw new Error(`The global config is readonly.
Please create a mathjs instance if you want to change the default configuration.
Example:
import { create, all } from 'mathjs';
const mathjs = create(all);
mathjs.config({ number: 'BigNumber' });
`);return Object.freeze(tt.DEFAULT_CONFIG)};return configReadonly.config=nt,(0,_e.default)(nt,tt.DEFAULT_CONFIG,{MATRIX_OPTIONS:rt.MATRIX_OPTIONS,NUMBER_OPTIONS:rt.NUMBER_OPTIONS}),configReadonly}var pureFunctionsAny_generated={},factoriesAny={},typed$1={},typedFunction$1={exports:{}},typedFunction=typedFunction$1.exports,hasRequiredTypedFunction;function requireTypedFunction(){return hasRequiredTypedFunction||(hasRequiredTypedFunction=1,(function(et,_e){(function(tt,rt){et.exports=rt()})(typedFunction,function(){function tt(){return!0}function rt(){return!1}function nt(){}function st(){var dt=[{name:"number",test:function(Ln){return typeof Ln=="number"}},{name:"string",test:function(Ln){return typeof Ln=="string"}},{name:"boolean",test:function(Ln){return typeof Ln=="boolean"}},{name:"Function",test:function(Ln){return typeof Ln=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(Ln){return Ln instanceof Date}},{name:"RegExp",test:function(Ln){return Ln instanceof RegExp}},{name:"Object",test:function(Ln){return typeof Ln=="object"&&Ln!==null&&Ln.constructor===Object}},{name:"null",test:function(Ln){return Ln===null}},{name:"undefined",test:function(Ln){return Ln===void 0}}],ft={name:"any",test:tt},ht=[],mt=[],bt={types:dt,conversions:mt,ignore:ht};function St(Ln){var Cn=kn(bt.types,function(Gr){return Gr.name===Ln});if(Cn)return Cn;if(Ln==="any")return ft;var Nn=kn(bt.types,function(Gr){return Gr.name.toLowerCase()===Ln.toLowerCase()});throw new TypeError('Unknown type "'+Ln+'"'+(Nn?'. Did you mean "'+Nn.name+'"?':""))}function Et(Ln){return Ln===ft?999:bt.types.indexOf(Ln)}function Ct(Ln){var Cn=kn(bt.types,function(Nn){return Nn.test(Ln)});if(Cn)return Cn.name;throw new TypeError("Value has unknown type. Value: "+Ln)}function Rt(Ln,Cn){if(!Ln.signatures)throw new TypeError("Function is no typed-function");var Nn;if(typeof Cn=="string"){Nn=Cn.split(",");for(var Gr=0;Gr<Nn.length;Gr++)Nn[Gr]=Nn[Gr].trim()}else if(Array.isArray(Cn))Nn=Cn;else throw new TypeError("String array or a comma separated string expected");var tn=Nn.join(","),dn=Ln.signatures[tn];if(dn)return dn;throw new TypeError("Signature not found (signature: "+(Ln.name||"unnamed")+"("+Nn.join(", ")+"))")}function Tt(Ln,Cn){var Nn=Ct(Ln);if(Cn===Nn)return Ln;for(var Gr=0;Gr<bt.conversions.length;Gr++){var tn=bt.conversions[Gr];if(tn.from===Nn&&tn.to===Cn)return tn.convert(Ln)}throw new Error("Cannot convert from "+Nn+" to "+Cn)}function wt(Ln){return Ln.map(function(Cn){var Nn=Cn.types.map(jt);return(Cn.restParam?"...":"")+Nn.join("|")}).join(",")}function At(Ln,Cn){var Nn=Ln.indexOf("...")===0,Gr=Nn?Ln.length>3?Ln.slice(3):"any":Ln,tn=Gr.split("|").map(Yr).filter(Or).filter(Nr),dn=pr(Cn,tn),Rn=tn.map(function(Un){var Zn=St(Un);return{name:Un,typeIndex:Et(Zn),test:Zn.test,conversion:null,conversionIndex:-1}}),wn=dn.map(function(Un){var Zn=St(Un.from);return{name:Un.from,typeIndex:Et(Zn),test:Zn.test,conversion:Un,conversionIndex:Cn.indexOf(Un)}});return{types:Rn.concat(wn),restParam:Nn}}function Nt(Ln,Cn,Nn){var Gr=[];return Ln.trim()!==""&&(Gr=Ln.split(",").map(Yr).map(function(tn,dn,Rn){var wn=At(tn,Nn);if(wn.restParam&&dn!==Rn.length-1)throw new SyntaxError('Unexpected rest parameter "'+tn+'": only allowed for the last parameter');return wn})),Gr.some(Qr)?null:{params:Gr,fn:Cn}}function Pt(Ln){var Cn=Sn(Ln);return Cn?Cn.restParam:!1}function It(Ln){return Ln.types.some(function(Cn){return Cn.conversion!=null})}function Ft(Ln){if(!Ln||Ln.types.length===0)return tt;if(Ln.types.length===1)return St(Ln.types[0].name).test;if(Ln.types.length===2){var Cn=St(Ln.types[0].name).test,Nn=St(Ln.types[1].name).test;return function(dn){return Cn(dn)||Nn(dn)}}else{var Gr=Ln.types.map(function(tn){return St(tn.name).test});return function(dn){for(var Rn=0;Rn<Gr.length;Rn++)if(Gr[Rn](dn))return!0;return!1}}}function qt(Ln){var Cn,Nn,Gr;if(Pt(Ln)){Cn=hn(Ln).map(Ft);var tn=Cn.length,dn=Ft(Sn(Ln)),Rn=function(wn){for(var Un=tn;Un<wn.length;Un++)if(!dn(wn[Un]))return!1;return!0};return function(Un){for(var Zn=0;Zn<Cn.length;Zn++)if(!Cn[Zn](Un[Zn]))return!1;return Rn(Un)&&Un.length>=tn+1}}else return Ln.length===0?function(Un){return Un.length===0}:Ln.length===1?(Nn=Ft(Ln[0]),function(Un){return Nn(Un[0])&&Un.length===1}):Ln.length===2?(Nn=Ft(Ln[0]),Gr=Ft(Ln[1]),function(Un){return Nn(Un[0])&&Gr(Un[1])&&Un.length===2}):(Cn=Ln.map(Ft),function(Un){for(var Zn=0;Zn<Cn.length;Zn++)if(!Cn[Zn](Un[Zn]))return!1;return Un.length===Cn.length})}function Vt(Ln,Cn){return Cn<Ln.params.length?Ln.params[Cn]:Pt(Ln.params)?Sn(Ln.params):null}function Kt(Ln,Cn,Nn){var Gr=Vt(Ln,Cn),tn=Gr?Nn?Gr.types.filter(Ut):Gr.types:[];return tn.map(jt)}function jt(Ln){return Ln.name}function Ut(Ln){return Ln.conversion===null||Ln.conversion===void 0}function Ot(Ln,Cn){var Nn=xn(An(Ln,function(Gr){return Kt(Gr,Cn,!1)}));return Nn.indexOf("any")!==-1?["any"]:Nn}function Wt(Ln,Cn,Nn){var Gr,tn,dn=Ln||"unnamed",Rn=Nn,wn;for(wn=0;wn<Cn.length;wn++){var Un=Rn.filter(function(qn){var _a=Ft(Vt(qn,wn));return(wn<qn.params.length||Pt(qn.params))&&_a(Cn[wn])});if(Un.length===0){if(tn=Ot(Rn,wn),tn.length>0){var Zn=Ct(Cn[wn]);return Gr=new TypeError("Unexpected type of argument in function "+dn+" (expected: "+tn.join(" or ")+", actual: "+Zn+", index: "+wn+")"),Gr.data={category:"wrongType",fn:dn,index:wn,actual:Zn,expected:tn},Gr}}else Rn=Un}var pn=Rn.map(function(qn){return Pt(qn.params)?1/0:qn.params.length});if(Cn.length<Math.min.apply(null,pn))return tn=Ot(Rn,wn),Gr=new TypeError("Too few arguments in function "+dn+" (expected: "+tn.join(" or ")+", index: "+Cn.length+")"),Gr.data={category:"tooFewArgs",fn:dn,index:Cn.length,expected:tn},Gr;var Dn=Math.max.apply(null,pn);return Cn.length>Dn?(Gr=new TypeError("Too many arguments in function "+dn+" (expected: "+Dn+", actual: "+Cn.length+")"),Gr.data={category:"tooManyArgs",fn:dn,index:Cn.length,expectedLength:Dn},Gr):(Gr=new TypeError('Arguments of type "'+Cn.join(", ")+'" do not match any of the defined signatures of function '+dn+"."),Gr.data={category:"mismatch",actual:Cn.map(Ct)},Gr)}function Bt(Ln){for(var Cn=999,Nn=0;Nn<Ln.types.length;Nn++)Ut(Ln.types[Nn])&&(Cn=Math.min(Cn,Ln.types[Nn].typeIndex));return Cn}function tr(Ln){for(var Cn=999,Nn=0;Nn<Ln.types.length;Nn++)Ut(Ln.types[Nn])||(Cn=Math.min(Cn,Ln.types[Nn].conversionIndex));return Cn}function Jt(Ln,Cn){var Nn;return Nn=Ln.restParam-Cn.restParam,Nn!==0||(Nn=It(Ln)-It(Cn),Nn!==0)||(Nn=Bt(Ln)-Bt(Cn),Nn!==0)?Nn:tr(Ln)-tr(Cn)}function ar(Ln,Cn){var Nn=Math.min(Ln.params.length,Cn.params.length),Gr,tn;if(tn=Ln.params.some(It)-Cn.params.some(It),tn!==0)return tn;for(Gr=0;Gr<Nn;Gr++)if(tn=It(Ln.params[Gr])-It(Cn.params[Gr]),tn!==0)return tn;for(Gr=0;Gr<Nn;Gr++)if(tn=Jt(Ln.params[Gr],Cn.params[Gr]),tn!==0)return tn;return Ln.params.length-Cn.params.length}function pr(Ln,Cn){var Nn={};return Ln.forEach(function(Gr){Cn.indexOf(Gr.from)===-1&&Cn.indexOf(Gr.to)!==-1&&!Nn[Gr.from]&&(Nn[Gr.from]=Gr)}),Object.keys(Nn).map(function(Gr){return Nn[Gr]})}function cr(Ln,Cn){var Nn=Cn;if(Ln.some(It)){var Gr=Pt(Ln),tn=Ln.map(gr);Nn=function(){for(var Un=[],Zn=Gr?arguments.length-1:arguments.length,pn=0;pn<Zn;pn++)Un[pn]=tn[pn](arguments[pn]);return Gr&&(Un[Zn]=arguments[Zn].map(tn[Zn])),Cn.apply(this,Un)}}var dn=Nn;if(Pt(Ln)){var Rn=Ln.length-1;dn=function(){return Nn.apply(this,Kr(arguments,0,Rn).concat([Kr(arguments,Rn)]))}}return dn}function gr(Ln){var Cn,Nn,Gr,tn,dn=[],Rn=[];switch(Ln.types.forEach(function(wn){wn.conversion&&(dn.push(St(wn.conversion.from).test),Rn.push(wn.conversion.convert))}),Rn.length){case 0:return function(Un){return Un};case 1:return Cn=dn[0],Gr=Rn[0],function(Un){return Cn(Un)?Gr(Un):Un};case 2:return Cn=dn[0],Nn=dn[1],Gr=Rn[0],tn=Rn[1],function(Un){return Cn(Un)?Gr(Un):Nn(Un)?tn(Un):Un};default:return function(Un){for(var Zn=0;Zn<Rn.length;Zn++)if(dn[Zn](Un))return Rn[Zn](Un);return Un}}}function Sr(Ln){var Cn={};return Ln.forEach(function(Nn){Nn.params.some(It)||Er(Nn.params,!0).forEach(function(Gr){Cn[wt(Gr)]=Nn.fn})}),Cn}function Er(Ln,Cn){function Nn(Gr,tn,dn){if(tn<Gr.length){var Rn=Gr[tn],wn=Cn?Rn.types.filter(Ut):Rn.types,Un;if(Rn.restParam){var Zn=wn.filter(Ut);Un=Zn.length<wn.length?[Zn,wn]:[wn]}else Un=wn.map(function(Dn){return[Dn]});return An(Un,function(Dn){return Nn(Gr,tn+1,dn.concat([Dn]))})}else{var pn=dn.map(function(Dn,qn){return{types:Dn,restParam:qn===Gr.length-1&&Pt(Gr)}});return[pn]}}return Nn(Ln,0,[])}function Vr(Ln,Cn){for(var Nn=Math.max(Ln.params.length,Cn.params.length),Gr=0;Gr<Nn;Gr++){var tn=Kt(Ln,Gr,!0),dn=Kt(Cn,Gr,!0);if(!ln(tn,dn))return!1}var Rn=Ln.params.length,wn=Cn.params.length,Un=Pt(Ln.params),Zn=Pt(Cn.params);return Un?Zn?Rn===wn:wn>=Rn:Zn?Rn>=wn:Rn===wn}function Wr(Ln,Cn){if(Object.keys(Cn).length===0)throw new SyntaxError("No signatures provided");var Nn=[];Object.keys(Cn).map(function(uu){return Nt(uu,Cn[uu],bt.conversions)}).filter(Ar).forEach(function(uu){var en=kn(Nn,function(Jr){return Vr(Jr,uu)});if(en)throw new TypeError('Conflicting signatures "'+wt(en.params)+'" and "'+wt(uu.params)+'".');Nn.push(uu)});var Gr=An(Nn,function(uu){var en=uu?Er(uu.params,!1):[];return en.map(function(Jr){return{params:Jr,fn:uu.fn}})}).filter(Ar);Gr.sort(ar);var tn=Gr[0]&&Gr[0].params.length<=2&&!Pt(Gr[0].params),dn=Gr[1]&&Gr[1].params.length<=2&&!Pt(Gr[1].params),Rn=Gr[2]&&Gr[2].params.length<=2&&!Pt(Gr[2].params),wn=Gr[3]&&Gr[3].params.length<=2&&!Pt(Gr[3].params),Un=Gr[4]&&Gr[4].params.length<=2&&!Pt(Gr[4].params),Zn=Gr[5]&&Gr[5].params.length<=2&&!Pt(Gr[5].params),pn=tn&&dn&&Rn&&wn&&Un&&Zn,Dn=Gr.map(function(uu){return qt(uu.params)}),qn=tn?Ft(Gr[0].params[0]):rt,_a=dn?Ft(Gr[1].params[0]):rt,Vn=Rn?Ft(Gr[2].params[0]):rt,bs=wn?Ft(Gr[3].params[0]):rt,Is=Un?Ft(Gr[4].params[0]):rt,uo=Zn?Ft(Gr[5].params[0]):rt,Rs=tn?Ft(Gr[0].params[1]):rt,io=dn?Ft(Gr[1].params[1]):rt,vo=Rn?Ft(Gr[2].params[1]):rt,Bo=wn?Ft(Gr[3].params[1]):rt,En=Un?Ft(Gr[4].params[1]):rt,In=Zn?Ft(Gr[5].params[1]):rt,ds=Gr.map(function(uu){return cr(uu.params,uu.fn)}),Ps=tn?ds[0]:nt,yo=dn?ds[1]:nt,rn=Rn?ds[2]:nt,es=wn?ds[3]:nt,Gs=Un?ds[4]:nt,Ro=Zn?ds[5]:nt,ru=tn?Gr[0].params.length:-1,du=dn?Gr[1].params.length:-1,Iu=Rn?Gr[2].params.length:-1,Sl=wn?Gr[3].params.length:-1,Ko=Un?Gr[4].params.length:-1,Fl=Zn?Gr[5].params.length:-1,gl=pn?6:0,Gu=Gr.length,Lu=function(){for(var en=gl;en<Gu;en++)if(Dn[en](arguments))return ds[en].apply(this,arguments);return bt.onMismatch(Ln,arguments,Gr)},Ku=function uu(en,Jr){return arguments.length===ru&&qn(en)&&Rs(Jr)?Ps.apply(uu,arguments):arguments.length===du&&_a(en)&&io(Jr)?yo.apply(uu,arguments):arguments.length===Iu&&Vn(en)&&vo(Jr)?rn.apply(uu,arguments):arguments.length===Sl&&bs(en)&&Bo(Jr)?es.apply(uu,arguments):arguments.length===Ko&&Is(en)&&En(Jr)?Gs.apply(uu,arguments):arguments.length===Fl&&uo(en)&&In(Jr)?Ro.apply(uu,arguments):Lu.apply(uu,arguments)};try{Object.defineProperty(Ku,"name",{value:Ln})}catch{}return Ku.signatures=Sr(Gr),Ku}function Mr(Ln,Cn,Nn){throw Wt(Ln,Cn,Nn)}function Nr(Ln){return bt.ignore.indexOf(Ln)===-1}function Yr(Ln){return Ln.trim()}function Or(Ln){return!!Ln}function Ar(Ln){return Ln!==null}function Qr(Ln){return Ln.types.length===0}function hn(Ln){return Ln.slice(0,Ln.length-1)}function Sn(Ln){return Ln[Ln.length-1]}function Kr(Ln,Cn,Nn){return Array.prototype.slice.call(Ln,Cn,Nn)}function Hn(Ln,Cn){return Ln.indexOf(Cn)!==-1}function ln(Ln,Cn){for(var Nn=0;Nn<Ln.length;Nn++)if(Hn(Cn,Ln[Nn]))return!0;return!1}function kn(Ln,Cn){for(var Nn=0;Nn<Ln.length;Nn++)if(Cn(Ln[Nn]))return Ln[Nn]}function xn(Ln){for(var Cn={},Nn=0;Nn<Ln.length;Nn++)Cn[Ln[Nn]]=!0;return Object.keys(Cn)}function An(Ln,Cn){return Array.prototype.concat.apply([],Ln.map(Cn))}function rs(Ln){for(var Cn="",Nn=0;Nn<Ln.length;Nn++){var Gr=Ln[Nn];if((typeof Gr.signatures=="object"||typeof Gr.signature=="string")&&Gr.name!==""){if(Cn==="")Cn=Gr.name;else if(Cn!==Gr.name){var tn=new Error("Function names do not match (expected: "+Cn+", actual: "+Gr.name+")");throw tn.data={actual:Gr.name,expected:Cn},tn}}}return Cn}function qs(Ln){var Cn,Nn={};function Gr(wn,Un){if(Nn.hasOwnProperty(wn)&&Un!==Nn[wn])throw Cn=new Error('Signature "'+wn+'" is defined twice'),Cn.data={signature:wn},Cn}for(var tn=0;tn<Ln.length;tn++){var dn=Ln[tn];if(typeof dn.signatures=="object")for(var Rn in dn.signatures)dn.signatures.hasOwnProperty(Rn)&&(Gr(Rn,dn.signatures[Rn]),Nn[Rn]=dn.signatures[Rn]);else if(typeof dn.signature=="string")Gr(dn.signature,dn),Nn[dn.signature]=dn;else throw Cn=new TypeError("Function is no typed-function (index: "+tn+")"),Cn.data={index:tn},Cn}return Nn}return bt=Wr("typed",{"string, Object":Wr,Object:function(Ln){var Cn=[];for(var Nn in Ln)Ln.hasOwnProperty(Nn)&&Cn.push(Ln[Nn]);var Gr=rs(Cn);return Wr(Gr,Ln)},"...Function":function(Ln){return Wr(rs(Ln),qs(Ln))},"string, ...Function":function(Ln,Cn){return Wr(Ln,qs(Cn))}}),bt.create=st,bt.types=dt,bt.conversions=mt,bt.ignore=ht,bt.onMismatch=Mr,bt.throwMismatchError=Mr,bt.createError=Wt,bt.convert=Tt,bt.find=Rt,bt.addType=function(Ln,Cn){if(!Ln||typeof Ln.name!="string"||typeof Ln.test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");if(Cn!==!1){for(var Nn=0;Nn<bt.types.length;Nn++)if(bt.types[Nn].name==="Object"){bt.types.splice(Nn,0,Ln);return}}bt.types.push(Ln)},bt.addConversion=function(Ln){if(!Ln||typeof Ln.from!="string"||typeof Ln.to!="string"||typeof Ln.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");bt.conversions.push(Ln)},bt}return st()})})(typedFunction$1)),typedFunction$1.exports}var number$4={},hasRequiredNumber$3;function requireNumber$3(){if(hasRequiredNumber$3)return number$4;hasRequiredNumber$3=1,Object.defineProperty(number$4,"__esModule",{value:!0}),number$4.cbrt=number$4.atanh=number$4.asinh=number$4.acosh=number$4.DBL_EPSILON=void 0,number$4.copysign=Ut,number$4.cosh=void 0,number$4.digits=At,number$4.expm1=void 0,number$4.format=mt,number$4.isInteger=_e,number$4.log2=number$4.log1p=number$4.log10=void 0,number$4.nearlyEqual=Pt,number$4.roundDigits=Tt,number$4.sinh=number$4.sign=void 0,number$4.splitNumber=bt,number$4.tanh=void 0,number$4.toEngineering=St,number$4.toExponential=Ct,number$4.toFixed=Et,number$4.toPrecision=Rt;var et=requireIs();function _e(Ot){return typeof Ot=="boolean"?!0:isFinite(Ot)?Ot===Math.round(Ot):!1}var tt=Math.sign||function(Ot){return Ot>0?1:Ot<0?-1:0};number$4.sign=tt;var rt=Math.log2||function(Wt){return Math.log(Wt)/Math.LN2};number$4.log2=rt;var nt=Math.log10||function(Wt){return Math.log(Wt)/Math.LN10};number$4.log10=nt;var st=Math.log1p||function(Ot){return Math.log(Ot+1)};number$4.log1p=st;var dt=Math.cbrt||function(Wt){if(Wt===0)return Wt;var Bt=Wt<0,tr;return Bt&&(Wt=-Wt),isFinite(Wt)?(tr=Math.exp(Math.log(Wt)/3),tr=(Wt/(tr*tr)+2*tr)/3):tr=Wt,Bt?-tr:tr};number$4.cbrt=dt;var ft=Math.expm1||function(Wt){return Wt>=2e-4||Wt<=-2e-4?Math.exp(Wt)-1:Wt+Wt*Wt/2+Wt*Wt*Wt/6};number$4.expm1=ft;function ht(Ot,Wt,Bt){var tr={2:"0b",8:"0o",16:"0x"},Jt=tr[Wt],ar="";if(Bt){if(Bt<1)throw new Error("size must be in greater than 0");if(!_e(Bt))throw new Error("size must be an integer");if(Ot>Math.pow(2,Bt-1)-1||Ot<-Math.pow(2,Bt-1))throw new Error("Value must be in range [-2^".concat(Bt-1,", 2^").concat(Bt-1,"-1]"));if(!_e(Ot))throw new Error("Value must be an integer");Ot<0&&(Ot=Ot+Math.pow(2,Bt)),ar="i".concat(Bt)}var pr="";return Ot<0&&(Ot=-Ot,pr="-"),"".concat(pr).concat(Jt).concat(Ot.toString(Wt)).concat(ar)}function mt(Ot,Wt){if(typeof Wt=="function")return Wt(Ot);if(Ot===1/0)return"Infinity";if(Ot===-1/0)return"-Infinity";if(isNaN(Ot))return"NaN";var Bt="auto",tr,Jt;if(Wt&&(Wt.notation&&(Bt=Wt.notation),(0,et.isNumber)(Wt)?tr=Wt:(0,et.isNumber)(Wt.precision)&&(tr=Wt.precision),Wt.wordSize&&(Jt=Wt.wordSize,typeof Jt!="number")))throw new Error('Option "wordSize" must be a number');switch(Bt){case"fixed":return Et(Ot,tr);case"exponential":return Ct(Ot,tr);case"engineering":return St(Ot,tr);case"bin":return ht(Ot,2,Jt);case"oct":return ht(Ot,8,Jt);case"hex":return ht(Ot,16,Jt);case"auto":return Rt(Ot,tr,Wt&&Wt).replace(/((\.\d*?)(0+))($|e)/,function(){var ar=arguments[2],pr=arguments[4];return ar!=="."?ar+pr:pr});default:throw new Error('Unknown notation "'+Bt+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function bt(Ot){var Wt=String(Ot).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!Wt)throw new SyntaxError("Invalid number "+Ot);var Bt=Wt[1],tr=Wt[2],Jt=parseFloat(Wt[4]||"0"),ar=tr.indexOf(".");Jt+=ar!==-1?ar-1:tr.length-1;var pr=tr.replace(".","").replace(/^0*/,function(cr){return Jt-=cr.length,""}).replace(/0*$/,"").split("").map(function(cr){return parseInt(cr)});return pr.length===0&&(pr.push(0),Jt++),{sign:Bt,coefficients:pr,exponent:Jt}}function St(Ot,Wt){if(isNaN(Ot)||!isFinite(Ot))return String(Ot);var Bt=bt(Ot),tr=Tt(Bt,Wt),Jt=tr.exponent,ar=tr.coefficients,pr=Jt%3===0?Jt:Jt<0?Jt-3-Jt%3:Jt-Jt%3;if((0,et.isNumber)(Wt))for(;Wt>ar.length||Jt-pr+1>ar.length;)ar.push(0);else for(var cr=Math.abs(Jt-pr)-(ar.length-1),gr=0;gr<cr;gr++)ar.push(0);for(var Sr=Math.abs(Jt-pr),Er=1;Sr>0;)Er++,Sr--;var Vr=ar.slice(Er).join(""),Wr=(0,et.isNumber)(Wt)&&Vr.length||Vr.match(/[1-9]/)?"."+Vr:"",Mr=ar.slice(0,Er).join("")+Wr+"e"+(Jt>=0?"+":"")+pr.toString();return tr.sign+Mr}function Et(Ot,Wt){if(isNaN(Ot)||!isFinite(Ot))return String(Ot);var Bt=bt(Ot),tr=typeof Wt=="number"?Tt(Bt,Bt.exponent+1+Wt):Bt,Jt=tr.coefficients,ar=tr.exponent+1,pr=ar+(Wt||0);return Jt.length<pr&&(Jt=Jt.concat(wt(pr-Jt.length))),ar<0&&(Jt=wt(-ar+1).concat(Jt),ar=1),ar<Jt.length&&Jt.splice(ar,0,ar===0?"0.":"."),tr.sign+Jt.join("")}function Ct(Ot,Wt){if(isNaN(Ot)||!isFinite(Ot))return String(Ot);var Bt=bt(Ot),tr=Wt?Tt(Bt,Wt):Bt,Jt=tr.coefficients,ar=tr.exponent;Jt.length<Wt&&(Jt=Jt.concat(wt(Wt-Jt.length)));var pr=Jt.shift();return tr.sign+pr+(Jt.length>0?"."+Jt.join(""):"")+"e"+(ar>=0?"+":"")+ar}function Rt(Ot,Wt,Bt){if(isNaN(Ot)||!isFinite(Ot))return String(Ot);var tr=Bt&&Bt.lowerExp!==void 0?Bt.lowerExp:-3,Jt=Bt&&Bt.upperExp!==void 0?Bt.upperExp:5,ar=bt(Ot),pr=Wt?Tt(ar,Wt):ar;if(pr.exponent<tr||pr.exponent>=Jt)return Ct(Ot,Wt);var cr=pr.coefficients,gr=pr.exponent;cr.length<Wt&&(cr=cr.concat(wt(Wt-cr.length))),cr=cr.concat(wt(gr-cr.length+1+(cr.length<Wt?Wt-cr.length:0))),cr=wt(-gr).concat(cr);var Sr=gr>0?gr:0;return Sr<cr.length-1&&cr.splice(Sr+1,0,"."),pr.sign+cr.join("")}function Tt(Ot,Wt){for(var Bt={sign:Ot.sign,coefficients:Ot.coefficients,exponent:Ot.exponent},tr=Bt.coefficients;Wt<=0;)tr.unshift(0),Bt.exponent++,Wt++;if(tr.length>Wt){var Jt=tr.splice(Wt,tr.length-Wt);if(Jt[0]>=5){var ar=Wt-1;for(tr[ar]++;tr[ar]===10;)tr.pop(),ar===0&&(tr.unshift(0),Bt.exponent++,ar++),ar--,tr[ar]++}}return Bt}function wt(Ot){for(var Wt=[],Bt=0;Bt<Ot;Bt++)Wt.push(0);return Wt}function At(Ot){return Ot.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var Nt=Number.EPSILON||2220446049250313e-31;number$4.DBL_EPSILON=Nt;function Pt(Ot,Wt,Bt){if(Bt==null)return Ot===Wt;if(Ot===Wt)return!0;if(isNaN(Ot)||isNaN(Wt))return!1;if(isFinite(Ot)&&isFinite(Wt)){var tr=Math.abs(Ot-Wt);return tr<Nt?!0:tr<=Math.max(Math.abs(Ot),Math.abs(Wt))*Bt}return!1}var It=Math.acosh||function(Ot){return Math.log(Math.sqrt(Ot*Ot-1)+Ot)};number$4.acosh=It;var Ft=Math.asinh||function(Ot){return Math.log(Math.sqrt(Ot*Ot+1)+Ot)};number$4.asinh=Ft;var qt=Math.atanh||function(Ot){return Math.log((1+Ot)/(1-Ot))/2};number$4.atanh=qt;var Vt=Math.cosh||function(Ot){return(Math.exp(Ot)+Math.exp(-Ot))/2};number$4.cosh=Vt;var Kt=Math.sinh||function(Ot){return(Math.exp(Ot)-Math.exp(-Ot))/2};number$4.sinh=Kt;var jt=Math.tanh||function(Ot){var Wt=Math.exp(2*Ot);return(Wt-1)/(Wt+1)};number$4.tanh=jt;function Ut(Ot,Wt){var Bt=Ot>0?!0:Ot<0?!1:1/Ot===1/0,tr=Wt>0?!0:Wt<0?!1:1/Wt===1/0;return Bt^tr?-Ot:Ot}return number$4}var factory$1={},array={},string$2={},formatter={},hasRequiredFormatter;function requireFormatter(){if(hasRequiredFormatter)return formatter;hasRequiredFormatter=1,Object.defineProperty(formatter,"__esModule",{value:!0}),formatter.format=tt,formatter.toEngineering=rt,formatter.toExponential=nt,formatter.toFixed=st;var et=requireNumber$3();function _e(dt,ft,ht){var mt=dt.constructor,bt=new mt(2),St="";if(ht){if(ht<1)throw new Error("size must be in greater than 0");if(!(0,et.isInteger)(ht))throw new Error("size must be an integer");if(dt.greaterThan(bt.pow(ht-1).sub(1))||dt.lessThan(bt.pow(ht-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(ht-1,", 2^").concat(ht-1,"-1]"));if(!dt.isInteger())throw new Error("Value must be an integer");dt.lessThan(0)&&(dt=dt.add(bt.pow(ht))),St="i".concat(ht)}switch(ft){case 2:return"".concat(dt.toBinary()).concat(St);case 8:return"".concat(dt.toOctal()).concat(St);case 16:return"".concat(dt.toHexadecimal()).concat(St);default:throw new Error("Base ".concat(ft," not supported "))}}function tt(dt,ft){if(typeof ft=="function")return ft(dt);if(!dt.isFinite())return dt.isNaN()?"NaN":dt.gt(0)?"Infinity":"-Infinity";var ht="auto",mt,bt;if(ft!==void 0&&(ft.notation&&(ht=ft.notation),typeof ft=="number"?mt=ft:ft.precision&&(mt=ft.precision),ft.wordSize&&(bt=ft.wordSize,typeof bt!="number")))throw new Error('Option "wordSize" must be a number');switch(ht){case"fixed":return st(dt,mt);case"exponential":return nt(dt,mt);case"engineering":return rt(dt,mt);case"bin":return _e(dt,2,bt);case"oct":return _e(dt,8,bt);case"hex":return _e(dt,16,bt);case"auto":{var St=ft&&ft.lowerExp!==void 0?ft.lowerExp:-3,Et=ft&&ft.upperExp!==void 0?ft.upperExp:5;if(dt.isZero())return"0";var Ct,Rt=dt.toSignificantDigits(mt),Tt=Rt.e;return Tt>=St&&Tt<Et?Ct=Rt.toFixed():Ct=nt(dt,mt),Ct.replace(/((\.\d*?)(0+))($|e)/,function(){var wt=arguments[2],At=arguments[4];return wt!=="."?wt+At:At})}default:throw new Error('Unknown notation "'+ht+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function rt(dt,ft){var ht=dt.e,mt=ht%3===0?ht:ht<0?ht-3-ht%3:ht-ht%3,bt=dt.mul(Math.pow(10,-mt)),St=bt.toPrecision(ft);return St.indexOf("e")!==-1&&(St=bt.toString()),St+"e"+(ht>=0?"+":"")+mt.toString()}function nt(dt,ft){return ft!==void 0?dt.toExponential(ft-1):dt.toExponential()}function st(dt,ft){return dt.toFixed(ft)}return formatter}var hasRequiredString$2;function requireString$2(){if(hasRequiredString$2)return string$2;hasRequiredString$2=1;var et=requireInteropRequireDefault();Object.defineProperty(string$2,"__esModule",{value:!0}),string$2.compareText=Et,string$2.endsWith=st,string$2.escape=mt,string$2.format=dt,string$2.stringify=ht;var _e=et(require_typeof()),tt=requireIs(),rt=requireNumber$3(),nt=requireFormatter();function st(Ct,Rt){var Tt=Ct.length-Rt.length,wt=Ct.length;return Ct.substring(Tt,wt)===Rt}function dt(Ct,Rt){var Tt=ft(Ct,Rt);return Rt&&(0,_e.default)(Rt)==="object"&&"truncate"in Rt&&Tt.length>Rt.truncate?Tt.substring(0,Rt.truncate-3)+"...":Tt}function ft(Ct,Rt){if(typeof Ct=="number")return(0,rt.format)(Ct,Rt);if((0,tt.isBigNumber)(Ct))return(0,nt.format)(Ct,Rt);if(St(Ct))return!Rt||Rt.fraction!=="decimal"?Ct.s*Ct.n+"/"+Ct.d:Ct.toString();if(Array.isArray(Ct))return bt(Ct,Rt);if((0,tt.isString)(Ct))return'"'+Ct+'"';if(typeof Ct=="function")return Ct.syntax?String(Ct.syntax):"function";if(Ct&&(0,_e.default)(Ct)==="object"){if(typeof Ct.format=="function")return Ct.format(Rt);if(Ct&&Ct.toString(Rt)!=={}.toString())return Ct.toString(Rt);var Tt=Object.keys(Ct).map(function(wt){return'"'+wt+'": '+dt(Ct[wt],Rt)});return"{"+Tt.join(", ")+"}"}return String(Ct)}function ht(Ct){for(var Rt=String(Ct),Tt="",wt=0;wt<Rt.length;){var At=Rt.charAt(wt);At==="\\"?(Tt+=At,wt++,At=Rt.charAt(wt),(At===""||'"\\/bfnrtu'.indexOf(At)===-1)&&(Tt+="\\"),Tt+=At):At==='"'?Tt+='\\"':Tt+=At,wt++}return'"'+Tt+'"'}function mt(Ct){var Rt=String(Ct);return Rt=Rt.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),Rt}function bt(Ct,Rt){if(Array.isArray(Ct)){for(var Tt="[",wt=Ct.length,At=0;At<wt;At++)At!==0&&(Tt+=", "),Tt+=bt(Ct[At],Rt);return Tt+="]",Tt}else return dt(Ct,Rt)}function St(Ct){return Ct&&(0,_e.default)(Ct)==="object"&&typeof Ct.s=="number"&&typeof Ct.n=="number"&&typeof Ct.d=="number"||!1}function Et(Ct,Rt){if(!(0,tt.isString)(Ct))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+(0,tt.typeOf)(Ct)+", index: 0)");if(!(0,tt.isString)(Rt))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+(0,tt.typeOf)(Rt)+", index: 1)");return Ct===Rt?0:Ct>Rt?1:-1}return string$2}var DimensionError={},hasRequiredDimensionError;function requireDimensionError(){if(hasRequiredDimensionError)return DimensionError;hasRequiredDimensionError=1,Object.defineProperty(DimensionError,"__esModule",{value:!0}),DimensionError.DimensionError=et;function et(_e,tt,rt){if(!(this instanceof et))throw new SyntaxError("Constructor must be called with the new operator");this.actual=_e,this.expected=tt,this.relation=rt,this.message="Dimension mismatch ("+(Array.isArray(_e)?"["+_e.join(", ")+"]":_e)+" "+(this.relation||"!=")+" "+(Array.isArray(tt)?"["+tt.join(", ")+"]":tt)+")",this.stack=new Error().stack}return et.prototype=new RangeError,et.prototype.constructor=RangeError,et.prototype.name="DimensionError",et.prototype.isDimensionError=!0,DimensionError}var IndexError={},hasRequiredIndexError;function requireIndexError(){if(hasRequiredIndexError)return IndexError;hasRequiredIndexError=1,Object.defineProperty(IndexError,"__esModule",{value:!0}),IndexError.IndexError=et;function et(_e,tt,rt){if(!(this instanceof et))throw new SyntaxError("Constructor must be called with the new operator");this.index=_e,arguments.length<3?(this.min=0,this.max=tt):(this.min=tt,this.max=rt),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}return et.prototype=new RangeError,et.prototype.constructor=RangeError,et.prototype.name="IndexError",et.prototype.isIndexError=!0,IndexError}var hasRequiredArray;function requireArray(){if(hasRequiredArray)return array;hasRequiredArray=1,Object.defineProperty(array,"__esModule",{value:!0}),array.arraySize=st,array.contains=tr,array.filter=qt,array.filterRegExp=Vt,array.flatten=Pt,array.forEach=Ft,array.generalize=Ut,array.getArrayDataType=Ot,array.identify=jt,array.initial=Bt,array.join=Kt,array.last=Wt,array.map=It,array.processSizesWildcard=Et,array.reshape=St,array.resize=mt,array.squeeze=Tt,array.unsqueeze=At,array.validate=ft,array.validateIndex=ht;var et=requireNumber$3(),_e=requireIs(),tt=requireString$2(),rt=requireDimensionError(),nt=requireIndexError();function st(Jt){for(var ar=[];Array.isArray(Jt);)ar.push(Jt.length),Jt=Jt[0];return ar}function dt(Jt,ar,pr){var cr,gr=Jt.length;if(gr!==ar[pr])throw new rt.DimensionError(gr,ar[pr]);if(pr<ar.length-1){var Sr=pr+1;for(cr=0;cr<gr;cr++){var Er=Jt[cr];if(!Array.isArray(Er))throw new rt.DimensionError(ar.length-1,ar.length,"<");dt(Jt[cr],ar,Sr)}}else for(cr=0;cr<gr;cr++)if(Array.isArray(Jt[cr]))throw new rt.DimensionError(ar.length+1,ar.length,">")}function ft(Jt,ar){var pr=ar.length===0;if(pr){if(Array.isArray(Jt))throw new rt.DimensionError(Jt.length,0)}else dt(Jt,ar,0)}function ht(Jt,ar){if(!(0,_e.isNumber)(Jt)||!(0,et.isInteger)(Jt))throw new TypeError("Index must be an integer (value: "+Jt+")");if(Jt<0||typeof ar=="number"&&Jt>=ar)throw new nt.IndexError(Jt,ar)}function mt(Jt,ar,pr){if(!Array.isArray(Jt)||!Array.isArray(ar))throw new TypeError("Array expected");if(ar.length===0)throw new Error("Resizing to scalar is not supported");ar.forEach(function(gr){if(!(0,_e.isNumber)(gr)||!(0,et.isInteger)(gr)||gr<0)throw new TypeError("Invalid size, must contain positive integers (size: "+(0,tt.format)(ar)+")")});var cr=pr!==void 0?pr:0;return bt(Jt,ar,0,cr),Jt}function bt(Jt,ar,pr,cr){var gr,Sr,Er=Jt.length,Vr=ar[pr],Wr=Math.min(Er,Vr);if(Jt.length=Vr,pr<ar.length-1){var Mr=pr+1;for(gr=0;gr<Wr;gr++)Sr=Jt[gr],Array.isArray(Sr)||(Sr=[Sr],Jt[gr]=Sr),bt(Sr,ar,Mr,cr);for(gr=Wr;gr<Vr;gr++)Sr=[],Jt[gr]=Sr,bt(Sr,ar,Mr,cr)}else{for(gr=0;gr<Wr;gr++)for(;Array.isArray(Jt[gr]);)Jt[gr]=Jt[gr][0];for(gr=Wr;gr<Vr;gr++)Jt[gr]=cr}}function St(Jt,ar){var pr=Pt(Jt),cr=pr.length;if(!Array.isArray(Jt)||!Array.isArray(ar))throw new TypeError("Array expected");if(ar.length===0)throw new rt.DimensionError(0,cr,"!=");ar=Et(ar,cr);var gr=Ct(ar);if(cr!==gr)throw new rt.DimensionError(gr,cr,"!=");try{return Rt(pr,ar)}catch(Sr){throw Sr instanceof rt.DimensionError?new rt.DimensionError(gr,cr,"!="):Sr}}function Et(Jt,ar){var pr=Ct(Jt),cr=Jt.slice(),gr=-1,Sr=Jt.indexOf(gr),Er=Jt.indexOf(gr,Sr+1)>=0;if(Er)throw new Error("More than one wildcard in sizes");var Vr=Sr>=0,Wr=ar%pr===0;if(Vr)if(Wr)cr[Sr]=-ar/pr;else throw new Error("Could not replace wildcard, since "+ar+" is no multiple of "+-pr);return cr}function Ct(Jt){return Jt.reduce(function(ar,pr){return ar*pr},1)}function Rt(Jt,ar){for(var pr=Jt,cr,gr=ar.length-1;gr>0;gr--){var Sr=ar[gr];cr=[];for(var Er=pr.length/Sr,Vr=0;Vr<Er;Vr++)cr.push(pr.slice(Vr*Sr,(Vr+1)*Sr));pr=cr}return pr}function Tt(Jt,ar){for(var pr=ar||st(Jt);Array.isArray(Jt)&&Jt.length===1;)Jt=Jt[0],pr.shift();for(var cr=pr.length;pr[cr-1]===1;)cr--;return cr<pr.length&&(Jt=wt(Jt,cr,0),pr.length=cr),Jt}function wt(Jt,ar,pr){var cr,gr;if(pr<ar){var Sr=pr+1;for(cr=0,gr=Jt.length;cr<gr;cr++)Jt[cr]=wt(Jt[cr],ar,Sr)}else for(;Array.isArray(Jt);)Jt=Jt[0];return Jt}function At(Jt,ar,pr,cr){var gr=cr||st(Jt);if(pr)for(var Sr=0;Sr<pr;Sr++)Jt=[Jt],gr.unshift(1);for(Jt=Nt(Jt,ar,0);gr.length<ar;)gr.push(1);return Jt}function Nt(Jt,ar,pr){var cr,gr;if(Array.isArray(Jt)){var Sr=pr+1;for(cr=0,gr=Jt.length;cr<gr;cr++)Jt[cr]=Nt(Jt[cr],ar,Sr)}else for(var Er=pr;Er<ar;Er++)Jt=[Jt];return Jt}function Pt(Jt){if(!Array.isArray(Jt))return Jt;var ar=[];return Jt.forEach(function pr(cr){Array.isArray(cr)?cr.forEach(pr):ar.push(cr)}),ar}function It(Jt,ar){return Array.prototype.map.call(Jt,ar)}function Ft(Jt,ar){Array.prototype.forEach.call(Jt,ar)}function qt(Jt,ar){if(st(Jt).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(Jt,ar)}function Vt(Jt,ar){if(st(Jt).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(Jt,function(pr){return ar.test(pr)})}function Kt(Jt,ar){return Array.prototype.join.call(Jt,ar)}function jt(Jt){if(!Array.isArray(Jt))throw new TypeError("Array input expected");if(Jt.length===0)return Jt;var ar=[],pr=0;ar[0]={value:Jt[0],identifier:0};for(var cr=1;cr<Jt.length;cr++)Jt[cr]===Jt[cr-1]?pr++:pr=0,ar.push({value:Jt[cr],identifier:pr});return ar}function Ut(Jt){if(!Array.isArray(Jt))throw new TypeError("Array input expected");if(Jt.length===0)return Jt;for(var ar=[],pr=0;pr<Jt.length;pr++)ar.push(Jt[pr].value);return ar}function Ot(Jt,ar){for(var pr,cr=0,gr=0;gr<Jt.length;gr++){var Sr=Jt[gr],Er=Array.isArray(Sr);if(gr===0&&Er&&(cr=Sr.length),Er&&Sr.length!==cr)return;var Vr=Er?Ot(Sr,ar):ar(Sr);if(pr===void 0)pr=Vr;else if(pr!==Vr)return"mixed"}return pr}function Wt(Jt){return Jt[Jt.length-1]}function Bt(Jt){return Jt.slice(0,Jt.length-1)}function tr(Jt,ar){return Jt.indexOf(ar)!==-1}return array}var hasRequiredFactory;function requireFactory(){if(hasRequiredFactory)return factory$1;hasRequiredFactory=1,Object.defineProperty(factory$1,"__esModule",{value:!0}),factory$1.assertDependencies=dt,factory$1.create=nt,factory$1.factory=tt,factory$1.isFactory=st,factory$1.isOptionalDependency=ft,factory$1.sortFactories=rt,factory$1.stripOptionalNotation=ht;var et=requireArray(),_e=requireObject();function tt(mt,bt,St,Et){function Ct(Rt){var Tt=(0,_e.pickShallow)(Rt,bt.map(ht));return dt(mt,bt,Rt),St(Tt)}return Ct.isFactory=!0,Ct.fn=mt,Ct.dependencies=bt.slice().sort(),Et&&(Ct.meta=Et),Ct}function rt(mt){var bt={};mt.forEach(function(Rt){bt[Rt.fn]=Rt});function St(Rt,Tt){return!!(st(Rt)&&((0,et.contains)(Rt.dependencies,Tt.fn||Tt.name)||Rt.dependencies.some(function(wt){return St(bt[wt],Tt)})))}var Et=[];function Ct(Rt){for(var Tt=0;Tt<Et.length&&!St(Et[Tt],Rt);)Tt++;Et.splice(Tt,0,Rt)}return mt.filter(st).forEach(Ct),mt.filter(function(Rt){return!st(Rt)}).forEach(Ct),Et}function nt(mt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return rt(mt).forEach(function(St){return St(bt)}),bt}function st(mt){return typeof mt=="function"&&typeof mt.fn=="string"&&Array.isArray(mt.dependencies)}function dt(mt,bt,St){var Et=bt.filter(function(Rt){return!ft(Rt)}).every(function(Rt){return St[Rt]!==void 0});if(!Et){var Ct=bt.filter(function(Rt){return St[Rt]===void 0});throw new Error('Cannot create function "'.concat(mt,'", ')+"some dependencies are missing: ".concat(Ct.map(function(Rt){return'"'.concat(Rt,'"')}).join(", "),"."))}}function ft(mt){return mt&&mt[0]==="?"}function ht(mt){return mt&&mt[0]==="?"?mt.slice(1):mt}return factory$1}var map$2={},classCallCheck={exports:{}},hasRequiredClassCallCheck;function requireClassCallCheck(){return hasRequiredClassCallCheck||(hasRequiredClassCallCheck=1,(function(et){function _e(tt,rt){if(!(tt instanceof rt))throw new TypeError("Cannot call a class as a function")}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(classCallCheck)),classCallCheck.exports}var createClass={exports:{}},toPropertyKey={exports:{}},toPrimitive={exports:{}},hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,(function(et){var _e=require_typeof().default;function tt(rt,nt){if(_e(rt)!="object"||!rt)return rt;var st=rt[Symbol.toPrimitive];if(st!==void 0){var dt=st.call(rt,nt||"default");if(_e(dt)!="object")return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(nt==="string"?String:Number)(rt)}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(toPrimitive)),toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){return hasRequiredToPropertyKey||(hasRequiredToPropertyKey=1,(function(et){var _e=require_typeof().default,tt=requireToPrimitive();function rt(nt){var st=tt(nt,"string");return _e(st)=="symbol"?st:st+""}et.exports=rt,et.exports.__esModule=!0,et.exports.default=et.exports})(toPropertyKey)),toPropertyKey.exports}var hasRequiredCreateClass;function requireCreateClass(){return hasRequiredCreateClass||(hasRequiredCreateClass=1,(function(et){var _e=requireToPropertyKey();function tt(nt,st){for(var dt=0;dt<st.length;dt++){var ft=st[dt];ft.enumerable=ft.enumerable||!1,ft.configurable=!0,"value"in ft&&(ft.writable=!0),Object.defineProperty(nt,_e(ft.key),ft)}}function rt(nt,st,dt){return st&&tt(nt.prototype,st),dt&&tt(nt,dt),Object.defineProperty(nt,"prototype",{writable:!1}),nt}et.exports=rt,et.exports.__esModule=!0,et.exports.default=et.exports})(createClass)),createClass.exports}var customs={},hasRequiredCustoms;function requireCustoms(){if(hasRequiredCustoms)return customs;hasRequiredCustoms=1;var et=requireInteropRequireDefault();Object.defineProperty(customs,"__esModule",{value:!0}),customs.getSafeProperties=st,customs.getSafeProperty=rt,customs.hasSafeProperty=dt,customs.isPlainObject=bt,customs.isSafeMethod=mt,customs.isSafeProperty=ft,customs.setSafeProperty=nt,customs.validateSafeMethod=ht;var _e=et(require_typeof()),tt=requireObject();function rt(Ct,Rt){if(bt(Ct)&&ft(Ct,Rt))return Ct[Rt];throw typeof Ct[Rt]=="function"&&mt(Ct,Rt)?new Error('Cannot access method "'+Rt+'" as a property'):new Error('No access to property "'+Rt+'"')}function nt(Ct,Rt,Tt){if(bt(Ct)&&ft(Ct,Rt))return Ct[Rt]=Tt,Tt;throw new Error('No access to property "'+Rt+'"')}function st(Ct){return Object.keys(Ct).filter(function(Rt){return(0,tt.hasOwnProperty)(Ct,Rt)})}function dt(Ct,Rt){return Rt in Ct}function ft(Ct,Rt){return!Ct||(0,_e.default)(Ct)!=="object"?!1:(0,tt.hasOwnProperty)(St,Rt)?!0:!(Rt in Object.prototype||Rt in Function.prototype)}function ht(Ct,Rt){if(!mt(Ct,Rt))throw new Error('No access to method "'+Rt+'"')}function mt(Ct,Rt){return Ct==null||typeof Ct[Rt]!="function"||(0,tt.hasOwnProperty)(Ct,Rt)&&Object.getPrototypeOf&&Rt in Object.getPrototypeOf(Ct)?!1:(0,tt.hasOwnProperty)(Et,Rt)?!0:!(Rt in Object.prototype||Rt in Function.prototype)}function bt(Ct){return(0,_e.default)(Ct)==="object"&&Ct&&Ct.constructor===Object}var St={length:!0,name:!0},Et={toString:!0,valueOf:!0,toLocaleString:!0};return customs}var hasRequiredMap$2;function requireMap$2(){if(hasRequiredMap$2)return map$2;hasRequiredMap$2=1;var et=requireInteropRequireDefault();Object.defineProperty(map$2,"__esModule",{value:!0}),map$2.ObjectWrappingMap=void 0,map$2.assign=Ct,map$2.createEmptyMap=mt,map$2.createMap=bt,map$2.isMap=Et,map$2.toObject=St;var _e=et(requireClassCallCheck()),tt=et(requireCreateClass()),rt=requireCustoms(),nt=requireIs();function st(Rt,Tt){var wt=typeof Symbol<"u"&&Rt[Symbol.iterator]||Rt["@@iterator"];if(!wt){if(Array.isArray(Rt)||(wt=dt(Rt))||Tt){wt&&(Rt=wt);var At=0,Nt=function(){};return{s:Nt,n:function(){return At>=Rt.length?{done:!0}:{done:!1,value:Rt[At++]}},e:function(Vt){throw Vt},f:Nt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Pt=!0,It=!1,Ft;return{s:function(){wt=wt.call(Rt)},n:function(){var Vt=wt.next();return Pt=Vt.done,Vt},e:function(Vt){It=!0,Ft=Vt},f:function(){try{!Pt&&wt.return!=null&&wt.return()}finally{if(It)throw Ft}}}}function dt(Rt,Tt){if(Rt){if(typeof Rt=="string")return ft(Rt,Tt);var wt=Object.prototype.toString.call(Rt).slice(8,-1);if(wt==="Object"&&Rt.constructor&&(wt=Rt.constructor.name),wt==="Map"||wt==="Set")return Array.from(Rt);if(wt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wt))return ft(Rt,Tt)}}function ft(Rt,Tt){(Tt==null||Tt>Rt.length)&&(Tt=Rt.length);for(var wt=0,At=new Array(Tt);wt<Tt;wt++)At[wt]=Rt[wt];return At}var ht=(function(){function Rt(Tt){(0,_e.default)(this,Rt),this.wrappedObject=Tt}return(0,tt.default)(Rt,[{key:"keys",value:function(){return Object.keys(this.wrappedObject)}},{key:"get",value:function(wt){return(0,rt.getSafeProperty)(this.wrappedObject,wt)}},{key:"set",value:function(wt,At){return(0,rt.setSafeProperty)(this.wrappedObject,wt,At),this}},{key:"has",value:function(wt){return(0,rt.hasSafeProperty)(this.wrappedObject,wt)}}]),Rt})();map$2.ObjectWrappingMap=ht;function mt(){return new Map}function bt(Rt){if(!Rt)return mt();if(Et(Rt))return Rt;if((0,nt.isObject)(Rt))return new ht(Rt);throw new Error("createMap can create maps from objects or Maps")}function St(Rt){if(Rt instanceof ht)return Rt.wrappedObject;var Tt={},wt=st(Rt.keys()),At;try{for(wt.s();!(At=wt.n()).done;){var Nt=At.value,Pt=Rt.get(Nt);(0,rt.setSafeProperty)(Tt,Nt,Pt)}}catch(It){wt.e(It)}finally{wt.f()}return Tt}function Et(Rt){return Rt?Rt instanceof Map||Rt instanceof ht||typeof Rt.set=="function"&&typeof Rt.get=="function"&&typeof Rt.keys=="function"&&typeof Rt.has=="function":!1}function Ct(Rt){for(var Tt=arguments.length,wt=new Array(Tt>1?Tt-1:0),At=1;At<Tt;At++)wt[At-1]=arguments[At];for(var Nt=0,Pt=wt;Nt<Pt.length;Nt++){var It=Pt[Nt];if(It){if(Et(It)){var Ft=st(It.keys()),qt;try{for(Ft.s();!(qt=Ft.n()).done;){var Vt=qt.value;Rt.set(Vt,It.get(Vt))}}catch(Ot){Ft.e(Ot)}finally{Ft.f()}}else if((0,nt.isObject)(It))for(var Kt=0,jt=Object.keys(It);Kt<jt.length;Kt++){var Ut=jt[Kt];Rt.set(Ut,It[Ut])}}}return Rt}return map$2}var hasRequiredTyped$1;function requireTyped$1(){if(hasRequiredTyped$1)return typed$1;hasRequiredTyped$1=1;var et=requireInteropRequireDefault();Object.defineProperty(typed$1,"__esModule",{value:!0}),typed$1.createTyped=void 0;var _e=requireIs(),tt=et(requireTypedFunction()),rt=requireNumber$3(),nt=requireFactory(),st=requireMap$2(),dt=function(){return dt=tt.default.create,tt.default},ft=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],ht=(0,nt.factory)("typed",ft,function(Rt){var Tt=Rt.BigNumber,wt=Rt.Complex,At=Rt.DenseMatrix,Nt=Rt.Fraction,Pt=dt();return Pt.types=[{name:"number",test:_e.isNumber},{name:"Complex",test:_e.isComplex},{name:"BigNumber",test:_e.isBigNumber},{name:"Fraction",test:_e.isFraction},{name:"Unit",test:_e.isUnit},{name:"string",test:_e.isString},{name:"Chain",test:_e.isChain},{name:"Array",test:_e.isArray},{name:"Matrix",test:_e.isMatrix},{name:"DenseMatrix",test:_e.isDenseMatrix},{name:"SparseMatrix",test:_e.isSparseMatrix},{name:"Range",test:_e.isRange},{name:"Index",test:_e.isIndex},{name:"boolean",test:_e.isBoolean},{name:"ResultSet",test:_e.isResultSet},{name:"Help",test:_e.isHelp},{name:"function",test:_e.isFunction},{name:"Date",test:_e.isDate},{name:"RegExp",test:_e.isRegExp},{name:"null",test:_e.isNull},{name:"undefined",test:_e.isUndefined},{name:"AccessorNode",test:_e.isAccessorNode},{name:"ArrayNode",test:_e.isArrayNode},{name:"AssignmentNode",test:_e.isAssignmentNode},{name:"BlockNode",test:_e.isBlockNode},{name:"ConditionalNode",test:_e.isConditionalNode},{name:"ConstantNode",test:_e.isConstantNode},{name:"FunctionNode",test:_e.isFunctionNode},{name:"FunctionAssignmentNode",test:_e.isFunctionAssignmentNode},{name:"IndexNode",test:_e.isIndexNode},{name:"Node",test:_e.isNode},{name:"ObjectNode",test:_e.isObjectNode},{name:"OperatorNode",test:_e.isOperatorNode},{name:"ParenthesisNode",test:_e.isParenthesisNode},{name:"RangeNode",test:_e.isRangeNode},{name:"SymbolNode",test:_e.isSymbolNode},{name:"Map",test:st.isMap},{name:"Object",test:_e.isObject}],Pt.conversions=[{from:"number",to:"BigNumber",convert:function(Ft){if(Tt||mt(Ft),(0,rt.digits)(Ft)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+Ft+"). Use function bignumber(x) to convert to BigNumber.");return new Tt(Ft)}},{from:"number",to:"Complex",convert:function(Ft){return wt||bt(Ft),new wt(Ft,0)}},{from:"number",to:"string",convert:function(Ft){return Ft+""}},{from:"BigNumber",to:"Complex",convert:function(Ft){return wt||bt(Ft),new wt(Ft.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(Ft){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(Ft){return wt||bt(Ft),new wt(Ft.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(Ft){Nt||Et(Ft);var qt=new Nt(Ft);if(qt.valueOf()!==Ft)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+Ft+"). Use function fraction(x) to convert to Fraction.");return qt}},{from:"string",to:"number",convert:function(Ft){var qt=Number(Ft);if(isNaN(qt))throw new Error('Cannot convert "'+Ft+'" to a number');return qt}},{from:"string",to:"BigNumber",convert:function(Ft){Tt||mt(Ft);try{return new Tt(Ft)}catch{throw new Error('Cannot convert "'+Ft+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(Ft){Nt||Et(Ft);try{return new Nt(Ft)}catch{throw new Error('Cannot convert "'+Ft+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(Ft){wt||bt(Ft);try{return new wt(Ft)}catch{throw new Error('Cannot convert "'+Ft+'" to Complex')}}},{from:"boolean",to:"number",convert:function(Ft){return+Ft}},{from:"boolean",to:"BigNumber",convert:function(Ft){return Tt||mt(Ft),new Tt(+Ft)}},{from:"boolean",to:"Fraction",convert:function(Ft){return Nt||Et(Ft),new Nt(+Ft)}},{from:"boolean",to:"string",convert:function(Ft){return String(Ft)}},{from:"Array",to:"Matrix",convert:function(Ft){return At||St(),new At(Ft)}},{from:"Matrix",to:"Array",convert:function(Ft){return Ft.valueOf()}}],Pt});typed$1.createTyped=ht;function mt(Ct){throw new Error("Cannot convert value ".concat(Ct," into a BigNumber: no class 'BigNumber' provided"))}function bt(Ct){throw new Error("Cannot convert value ".concat(Ct," into a Complex number: no class 'Complex' provided"))}function St(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Et(Ct){throw new Error("Cannot convert value ".concat(Ct," into a Fraction, no class 'Fraction' provided."))}return typed$1}var ResultSet={},hasRequiredResultSet;function requireResultSet(){if(hasRequiredResultSet)return ResultSet;hasRequiredResultSet=1,Object.defineProperty(ResultSet,"__esModule",{value:!0}),ResultSet.createResultSet=void 0;var et=requireFactory(),_e="ResultSet",tt=[],rt=(0,et.factory)(_e,tt,function(){function nt(st){if(!(this instanceof nt))throw new SyntaxError("Constructor must be called with the new operator");this.entries=st||[]}return nt.prototype.type="ResultSet",nt.prototype.isResultSet=!0,nt.prototype.valueOf=function(){return this.entries},nt.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},nt.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},nt.fromJSON=function(st){return new nt(st.entries)},nt},{isClass:!0});return ResultSet.createResultSet=rt,ResultSet}var BigNumber={},decimal$1={exports:{}},decimal=decimal$1.exports,hasRequiredDecimal;function requireDecimal(){return hasRequiredDecimal||(hasRequiredDecimal=1,(function(et){(function(_e){/*!
* decimal.js v10.6.0
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licence
*/var tt=9e15,rt=1e9,nt="0123456789abcdef",st="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",dt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ft={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-tt,maxE:tt,crypto:!1},ht,mt,bt,St,Et=!0,Ct="[DecimalError] ",Rt=Ct+"Invalid argument: ",Tt=Ct+"Precision limit exceeded",wt=Ct+"crypto unavailable",At="[object Decimal]",Nt=Math.floor,Pt=Math.pow,It=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ft=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,qt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Vt=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Kt=1e7,jt=7,Ut=9007199254740991,Ot=st.length-1,Wt=dt.length-1,Bt={toStringTag:At};Bt.absoluteValue=Bt.abs=function(){var en=new this.constructor(this);return en.s<0&&(en.s=1),Sr(en)},Bt.ceil=function(){return Sr(new this.constructor(this),this.e+1,2)},Bt.clampedTo=Bt.clamp=function(en,Jr){var vn,fn=this,gn=fn.constructor;if(en=new gn(en),Jr=new gn(Jr),!en.s||!Jr.s)return new gn(NaN);if(en.gt(Jr))throw Error(Rt+Jr);return vn=fn.cmp(en),vn<0?en:fn.cmp(Jr)>0?Jr:new gn(fn)},Bt.comparedTo=Bt.cmp=function(en){var Jr,vn,fn,gn,mn=this,ss=mn.d,ga=(en=new mn.constructor(en)).d,Ns=mn.s,vs=en.s;if(!ss||!ga)return!Ns||!vs?NaN:Ns!==vs?Ns:ss===ga?0:!ss^Ns<0?1:-1;if(!ss[0]||!ga[0])return ss[0]?Ns:ga[0]?-vs:0;if(Ns!==vs)return Ns;if(mn.e!==en.e)return mn.e>en.e^Ns<0?1:-1;for(fn=ss.length,gn=ga.length,Jr=0,vn=fn<gn?fn:gn;Jr<vn;++Jr)if(ss[Jr]!==ga[Jr])return ss[Jr]>ga[Jr]^Ns<0?1:-1;return fn===gn?0:fn>gn^Ns<0?1:-1},Bt.cosine=Bt.cos=function(){var en,Jr,vn=this,fn=vn.constructor;return vn.d?vn.d[0]?(en=fn.precision,Jr=fn.rounding,fn.precision=en+Math.max(vn.e,vn.sd())+jt,fn.rounding=1,vn=cr(fn,rs(fn,vn)),fn.precision=en,fn.rounding=Jr,Sr(St==2||St==3?vn.neg():vn,en,Jr,!0)):new fn(1):new fn(NaN)},Bt.cubeRoot=Bt.cbrt=function(){var en,Jr,vn,fn,gn,mn,ss,ga,Ns,vs,Xs=this,co=Xs.constructor;if(!Xs.isFinite()||Xs.isZero())return new co(Xs);for(Et=!1,mn=Xs.s*Pt(Xs.s*Xs,1/3),!mn||Math.abs(mn)==1/0?(vn=tr(Xs.d),en=Xs.e,(mn=(en-vn.length+1)%3)&&(vn+=mn==1||mn==-2?"0":"00"),mn=Pt(vn,1/3),en=Nt((en+1)/3)-(en%3==(en<0?-1:2)),mn==1/0?vn="5e"+en:(vn=mn.toExponential(),vn=vn.slice(0,vn.indexOf("e")+1)+en),fn=new co(vn),fn.s=Xs.s):fn=new co(mn.toString()),ss=(en=co.precision)+3;;)if(ga=fn,Ns=ga.times(ga).times(ga),vs=Ns.plus(Xs),fn=gr(vs.plus(Xs).times(ga),vs.plus(Ns),ss+2,1),tr(ga.d).slice(0,ss)===(vn=tr(fn.d)).slice(0,ss))if(vn=vn.slice(ss-3,ss+1),vn=="9999"||!gn&&vn=="4999"){if(!gn&&(Sr(ga,en+1,0),ga.times(ga).times(ga).eq(Xs))){fn=ga;break}ss+=4,gn=1}else{(!+vn||!+vn.slice(1)&&vn.charAt(0)=="5")&&(Sr(fn,en+1,1),Jr=!fn.times(fn).times(fn).eq(Xs));break}return Et=!0,Sr(fn,en,co.rounding,Jr)},Bt.decimalPlaces=Bt.dp=function(){var en,Jr=this.d,vn=NaN;if(Jr){if(en=Jr.length-1,vn=(en-Nt(this.e/jt))*jt,en=Jr[en],en)for(;en%10==0;en/=10)vn--;vn<0&&(vn=0)}return vn},Bt.dividedBy=Bt.div=function(en){return gr(this,new this.constructor(en))},Bt.dividedToIntegerBy=Bt.divToInt=function(en){var Jr=this,vn=Jr.constructor;return Sr(gr(Jr,new vn(en),0,1,1),vn.precision,vn.rounding)},Bt.equals=Bt.eq=function(en){return this.cmp(en)===0},Bt.floor=function(){return Sr(new this.constructor(this),this.e+1,3)},Bt.greaterThan=Bt.gt=function(en){return this.cmp(en)>0},Bt.greaterThanOrEqualTo=Bt.gte=function(en){var Jr=this.cmp(en);return Jr==1||Jr===0},Bt.hyperbolicCosine=Bt.cosh=function(){var en,Jr,vn,fn,gn,mn=this,ss=mn.constructor,ga=new ss(1);if(!mn.isFinite())return new ss(mn.s?1/0:NaN);if(mn.isZero())return ga;vn=ss.precision,fn=ss.rounding,ss.precision=vn+Math.max(mn.e,mn.sd())+4,ss.rounding=1,gn=mn.d.length,gn<32?(en=Math.ceil(gn/3),Jr=(1/An(4,en)).toString()):(en=16,Jr="2.3283064365386962890625e-10"),mn=xn(ss,1,mn.times(Jr),new ss(1),!0);for(var Ns,vs=en,Xs=new ss(8);vs--;)Ns=mn.times(mn),mn=ga.minus(Ns.times(Xs.minus(Ns.times(Xs))));return Sr(mn,ss.precision=vn,ss.rounding=fn,!0)},Bt.hyperbolicSine=Bt.sinh=function(){var en,Jr,vn,fn,gn=this,mn=gn.constructor;if(!gn.isFinite()||gn.isZero())return new mn(gn);if(Jr=mn.precision,vn=mn.rounding,mn.precision=Jr+Math.max(gn.e,gn.sd())+4,mn.rounding=1,fn=gn.d.length,fn<3)gn=xn(mn,2,gn,gn,!0);else{en=1.4*Math.sqrt(fn),en=en>16?16:en|0,gn=gn.times(1/An(5,en)),gn=xn(mn,2,gn,gn,!0);for(var ss,ga=new mn(5),Ns=new mn(16),vs=new mn(20);en--;)ss=gn.times(gn),gn=gn.times(ga.plus(ss.times(Ns.times(ss).plus(vs))))}return mn.precision=Jr,mn.rounding=vn,Sr(gn,Jr,vn,!0)},Bt.hyperbolicTangent=Bt.tanh=function(){var en,Jr,vn=this,fn=vn.constructor;return vn.isFinite()?vn.isZero()?new fn(vn):(en=fn.precision,Jr=fn.rounding,fn.precision=en+7,fn.rounding=1,gr(vn.sinh(),vn.cosh(),fn.precision=en,fn.rounding=Jr)):new fn(vn.s)},Bt.inverseCosine=Bt.acos=function(){var en=this,Jr=en.constructor,vn=en.abs().cmp(1),fn=Jr.precision,gn=Jr.rounding;return vn!==-1?vn===0?en.isNeg()?Mr(Jr,fn,gn):new Jr(0):new Jr(NaN):en.isZero()?Mr(Jr,fn+4,gn).times(.5):(Jr.precision=fn+6,Jr.rounding=1,en=new Jr(1).minus(en).div(en.plus(1)).sqrt().atan(),Jr.precision=fn,Jr.rounding=gn,en.times(2))},Bt.inverseHyperbolicCosine=Bt.acosh=function(){var en,Jr,vn=this,fn=vn.constructor;return vn.lte(1)?new fn(vn.eq(1)?0:NaN):vn.isFinite()?(en=fn.precision,Jr=fn.rounding,fn.precision=en+Math.max(Math.abs(vn.e),vn.sd())+4,fn.rounding=1,Et=!1,vn=vn.times(vn).minus(1).sqrt().plus(vn),Et=!0,fn.precision=en,fn.rounding=Jr,vn.ln()):new fn(vn)},Bt.inverseHyperbolicSine=Bt.asinh=function(){var en,Jr,vn=this,fn=vn.constructor;return!vn.isFinite()||vn.isZero()?new fn(vn):(en=fn.precision,Jr=fn.rounding,fn.precision=en+2*Math.max(Math.abs(vn.e),vn.sd())+6,fn.rounding=1,Et=!1,vn=vn.times(vn).plus(1).sqrt().plus(vn),Et=!0,fn.precision=en,fn.rounding=Jr,vn.ln())},Bt.inverseHyperbolicTangent=Bt.atanh=function(){var en,Jr,vn,fn,gn=this,mn=gn.constructor;return gn.isFinite()?gn.e>=0?new mn(gn.abs().eq(1)?gn.s/0:gn.isZero()?gn:NaN):(en=mn.precision,Jr=mn.rounding,fn=gn.sd(),Math.max(fn,en)<2*-gn.e-1?Sr(new mn(gn),en,Jr,!0):(mn.precision=vn=fn-gn.e,gn=gr(gn.plus(1),new mn(1).minus(gn),vn+en,1),mn.precision=en+4,mn.rounding=1,gn=gn.ln(),mn.precision=en,mn.rounding=Jr,gn.times(.5))):new mn(NaN)},Bt.inverseSine=Bt.asin=function(){var en,Jr,vn,fn,gn=this,mn=gn.constructor;return gn.isZero()?new mn(gn):(Jr=gn.abs().cmp(1),vn=mn.precision,fn=mn.rounding,Jr!==-1?Jr===0?(en=Mr(mn,vn+4,fn).times(.5),en.s=gn.s,en):new mn(NaN):(mn.precision=vn+6,mn.rounding=1,gn=gn.div(new mn(1).minus(gn.times(gn)).sqrt().plus(1)).atan(),mn.precision=vn,mn.rounding=fn,gn.times(2)))},Bt.inverseTangent=Bt.atan=function(){var en,Jr,vn,fn,gn,mn,ss,ga,Ns,vs=this,Xs=vs.constructor,co=Xs.precision,ls=Xs.rounding;if(vs.isFinite()){if(vs.isZero())return new Xs(vs);if(vs.abs().eq(1)&&co+4<=Wt)return ss=Mr(Xs,co+4,ls).times(.25),ss.s=vs.s,ss}else{if(!vs.s)return new Xs(NaN);if(co+4<=Wt)return ss=Mr(Xs,co+4,ls).times(.5),ss.s=vs.s,ss}for(Xs.precision=ga=co+10,Xs.rounding=1,vn=Math.min(28,ga/jt+2|0),en=vn;en;--en)vs=vs.div(vs.times(vs).plus(1).sqrt().plus(1));for(Et=!1,Jr=Math.ceil(ga/jt),fn=1,Ns=vs.times(vs),ss=new Xs(vs),gn=vs;en!==-1;)if(gn=gn.times(Ns),mn=ss.minus(gn.div(fn+=2)),gn=gn.times(Ns),ss=mn.plus(gn.div(fn+=2)),ss.d[Jr]!==void 0)for(en=Jr;ss.d[en]===mn.d[en]&&en--;);return vn&&(ss=ss.times(2<<vn-1)),Et=!0,Sr(ss,Xs.precision=co,Xs.rounding=ls,!0)},Bt.isFinite=function(){return!!this.d},Bt.isInteger=Bt.isInt=function(){return!!this.d&&Nt(this.e/jt)>this.d.length-2},Bt.isNaN=function(){return!this.s},Bt.isNegative=Bt.isNeg=function(){return this.s<0},Bt.isPositive=Bt.isPos=function(){return this.s>0},Bt.isZero=function(){return!!this.d&&this.d[0]===0},Bt.lessThan=Bt.lt=function(en){return this.cmp(en)<0},Bt.lessThanOrEqualTo=Bt.lte=function(en){return this.cmp(en)<1},Bt.logarithm=Bt.log=function(en){var Jr,vn,fn,gn,mn,ss,ga,Ns,vs=this,Xs=vs.constructor,co=Xs.precision,ls=Xs.rounding,Mo=5;if(en==null)en=new Xs(10),Jr=!0;else{if(en=new Xs(en),vn=en.d,en.s<0||!vn||!vn[0]||en.eq(1))return new Xs(NaN);Jr=en.eq(10)}if(vn=vs.d,vs.s<0||!vn||!vn[0]||vs.eq(1))return new Xs(vn&&!vn[0]?-1/0:vs.s!=1?NaN:vn?0:1/0);if(Jr)if(vn.length>1)mn=!0;else{for(gn=vn[0];gn%10===0;)gn/=10;mn=gn!==1}if(Et=!1,ga=co+Mo,ss=Sn(vs,ga),fn=Jr?Wr(Xs,ga+10):Sn(en,ga),Ns=gr(ss,fn,ga,1),ar(Ns.d,gn=co,ls))do if(ga+=10,ss=Sn(vs,ga),fn=Jr?Wr(Xs,ga+10):Sn(en,ga),Ns=gr(ss,fn,ga,1),!mn){+tr(Ns.d).slice(gn+1,gn+15)+1==1e14&&(Ns=Sr(Ns,co+1,0));break}while(ar(Ns.d,gn+=10,ls));return Et=!0,Sr(Ns,co,ls)},Bt.minus=Bt.sub=function(en){var Jr,vn,fn,gn,mn,ss,ga,Ns,vs,Xs,co,ls,Mo=this,Nu=Mo.constructor;if(en=new Nu(en),!Mo.d||!en.d)return!Mo.s||!en.s?en=new Nu(NaN):Mo.d?en.s=-en.s:en=new Nu(en.d||Mo.s!==en.s?Mo:NaN),en;if(Mo.s!=en.s)return en.s=-en.s,Mo.plus(en);if(vs=Mo.d,ls=en.d,ga=Nu.precision,Ns=Nu.rounding,!vs[0]||!ls[0]){if(ls[0])en.s=-en.s;else if(vs[0])en=new Nu(Mo);else return new Nu(Ns===3?-0:0);return Et?Sr(en,ga,Ns):en}if(vn=Nt(en.e/jt),Xs=Nt(Mo.e/jt),vs=vs.slice(),mn=Xs-vn,mn){for(co=mn<0,co?(Jr=vs,mn=-mn,ss=ls.length):(Jr=ls,vn=Xs,ss=vs.length),fn=Math.max(Math.ceil(ga/jt),ss)+2,mn>fn&&(mn=fn,Jr.length=1),Jr.reverse(),fn=mn;fn--;)Jr.push(0);Jr.reverse()}else{for(fn=vs.length,ss=ls.length,co=fn<ss,co&&(ss=fn),fn=0;fn<ss;fn++)if(vs[fn]!=ls[fn]){co=vs[fn]<ls[fn];break}mn=0}for(co&&(Jr=vs,vs=ls,ls=Jr,en.s=-en.s),ss=vs.length,fn=ls.length-ss;fn>0;--fn)vs[ss++]=0;for(fn=ls.length;fn>mn;){if(vs[--fn]<ls[fn]){for(gn=fn;gn&&vs[--gn]===0;)vs[gn]=Kt-1;--vs[gn],vs[fn]+=Kt}vs[fn]-=ls[fn]}for(;vs[--ss]===0;)vs.pop();for(;vs[0]===0;vs.shift())--vn;return vs[0]?(en.d=vs,en.e=Vr(vs,vn),Et?Sr(en,ga,Ns):en):new Nu(Ns===3?-0:0)},Bt.modulo=Bt.mod=function(en){var Jr,vn=this,fn=vn.constructor;return en=new fn(en),!vn.d||!en.s||en.d&&!en.d[0]?new fn(NaN):!en.d||vn.d&&!vn.d[0]?Sr(new fn(vn),fn.precision,fn.rounding):(Et=!1,fn.modulo==9?(Jr=gr(vn,en.abs(),0,3,1),Jr.s*=en.s):Jr=gr(vn,en,0,fn.modulo,1),Jr=Jr.times(en),Et=!0,vn.minus(Jr))},Bt.naturalExponential=Bt.exp=function(){return hn(this)},Bt.naturalLogarithm=Bt.ln=function(){return Sn(this)},Bt.negated=Bt.neg=function(){var en=new this.constructor(this);return en.s=-en.s,Sr(en)},Bt.plus=Bt.add=function(en){var Jr,vn,fn,gn,mn,ss,ga,Ns,vs,Xs,co=this,ls=co.constructor;if(en=new ls(en),!co.d||!en.d)return!co.s||!en.s?en=new ls(NaN):co.d||(en=new ls(en.d||co.s===en.s?co:NaN)),en;if(co.s!=en.s)return en.s=-en.s,co.minus(en);if(vs=co.d,Xs=en.d,ga=ls.precision,Ns=ls.rounding,!vs[0]||!Xs[0])return Xs[0]||(en=new ls(co)),Et?Sr(en,ga,Ns):en;if(mn=Nt(co.e/jt),fn=Nt(en.e/jt),vs=vs.slice(),gn=mn-fn,gn){for(gn<0?(vn=vs,gn=-gn,ss=Xs.length):(vn=Xs,fn=mn,ss=vs.length),mn=Math.ceil(ga/jt),ss=mn>ss?mn+1:ss+1,gn>ss&&(gn=ss,vn.length=1),vn.reverse();gn--;)vn.push(0);vn.reverse()}for(ss=vs.length,gn=Xs.length,ss-gn<0&&(gn=ss,vn=Xs,Xs=vs,vs=vn),Jr=0;gn;)Jr=(vs[--gn]=vs[gn]+Xs[gn]+Jr)/Kt|0,vs[gn]%=Kt;for(Jr&&(vs.unshift(Jr),++fn),ss=vs.length;vs[--ss]==0;)vs.pop();return en.d=vs,en.e=Vr(vs,fn),Et?Sr(en,ga,Ns):en},Bt.precision=Bt.sd=function(en){var Jr,vn=this;if(en!==void 0&&en!==!!en&&en!==1&&en!==0)throw Error(Rt+en);return vn.d?(Jr=Nr(vn.d),en&&vn.e+1>Jr&&(Jr=vn.e+1)):Jr=NaN,Jr},Bt.round=function(){var en=this,Jr=en.constructor;return Sr(new Jr(en),en.e+1,Jr.rounding)},Bt.sine=Bt.sin=function(){var en,Jr,vn=this,fn=vn.constructor;return vn.isFinite()?vn.isZero()?new fn(vn):(en=fn.precision,Jr=fn.rounding,fn.precision=en+Math.max(vn.e,vn.sd())+jt,fn.rounding=1,vn=kn(fn,rs(fn,vn)),fn.precision=en,fn.rounding=Jr,Sr(St>2?vn.neg():vn,en,Jr,!0)):new fn(NaN)},Bt.squareRoot=Bt.sqrt=function(){var en,Jr,vn,fn,gn,mn,ss=this,ga=ss.d,Ns=ss.e,vs=ss.s,Xs=ss.constructor;if(vs!==1||!ga||!ga[0])return new Xs(!vs||vs<0&&(!ga||ga[0])?NaN:ga?ss:1/0);for(Et=!1,vs=Math.sqrt(+ss),vs==0||vs==1/0?(Jr=tr(ga),(Jr.length+Ns)%2==0&&(Jr+="0"),vs=Math.sqrt(Jr),Ns=Nt((Ns+1)/2)-(Ns<0||Ns%2),vs==1/0?Jr="5e"+Ns:(Jr=vs.toExponential(),Jr=Jr.slice(0,Jr.indexOf("e")+1)+Ns),fn=new Xs(Jr)):fn=new Xs(vs.toString()),vn=(Ns=Xs.precision)+3;;)if(mn=fn,fn=mn.plus(gr(ss,mn,vn+2,1)).times(.5),tr(mn.d).slice(0,vn)===(Jr=tr(fn.d)).slice(0,vn))if(Jr=Jr.slice(vn-3,vn+1),Jr=="9999"||!gn&&Jr=="4999"){if(!gn&&(Sr(mn,Ns+1,0),mn.times(mn).eq(ss))){fn=mn;break}vn+=4,gn=1}else{(!+Jr||!+Jr.slice(1)&&Jr.charAt(0)=="5")&&(Sr(fn,Ns+1,1),en=!fn.times(fn).eq(ss));break}return Et=!0,Sr(fn,Ns,Xs.rounding,en)},Bt.tangent=Bt.tan=function(){var en,Jr,vn=this,fn=vn.constructor;return vn.isFinite()?vn.isZero()?new fn(vn):(en=fn.precision,Jr=fn.rounding,fn.precision=en+10,fn.rounding=1,vn=vn.sin(),vn.s=1,vn=gr(vn,new fn(1).minus(vn.times(vn)).sqrt(),en+10,0),fn.precision=en,fn.rounding=Jr,Sr(St==2||St==4?vn.neg():vn,en,Jr,!0)):new fn(NaN)},Bt.times=Bt.mul=function(en){var Jr,vn,fn,gn,mn,ss,ga,Ns,vs,Xs=this,co=Xs.constructor,ls=Xs.d,Mo=(en=new co(en)).d;if(en.s*=Xs.s,!ls||!ls[0]||!Mo||!Mo[0])return new co(!en.s||ls&&!ls[0]&&!Mo||Mo&&!Mo[0]&&!ls?NaN:!ls||!Mo?en.s/0:en.s*0);for(vn=Nt(Xs.e/jt)+Nt(en.e/jt),Ns=ls.length,vs=Mo.length,Ns<vs&&(mn=ls,ls=Mo,Mo=mn,ss=Ns,Ns=vs,vs=ss),mn=[],ss=Ns+vs,fn=ss;fn--;)mn.push(0);for(fn=vs;--fn>=0;){for(Jr=0,gn=Ns+fn;gn>fn;)ga=mn[gn]+Mo[fn]*ls[gn-fn-1]+Jr,mn[gn--]=ga%Kt|0,Jr=ga/Kt|0;mn[gn]=(mn[gn]+Jr)%Kt|0}for(;!mn[--ss];)mn.pop();return Jr?++vn:mn.shift(),en.d=mn,en.e=Vr(mn,vn),Et?Sr(en,co.precision,co.rounding):en},Bt.toBinary=function(en,Jr){return qs(this,2,en,Jr)},Bt.toDecimalPlaces=Bt.toDP=function(en,Jr){var vn=this,fn=vn.constructor;return vn=new fn(vn),en===void 0?vn:(Jt(en,0,rt),Jr===void 0?Jr=fn.rounding:Jt(Jr,0,8),Sr(vn,en+vn.e+1,Jr))},Bt.toExponential=function(en,Jr){var vn,fn=this,gn=fn.constructor;return en===void 0?vn=Er(fn,!0):(Jt(en,0,rt),Jr===void 0?Jr=gn.rounding:Jt(Jr,0,8),fn=Sr(new gn(fn),en+1,Jr),vn=Er(fn,!0,en+1)),fn.isNeg()&&!fn.isZero()?"-"+vn:vn},Bt.toFixed=function(en,Jr){var vn,fn,gn=this,mn=gn.constructor;return en===void 0?vn=Er(gn):(Jt(en,0,rt),Jr===void 0?Jr=mn.rounding:Jt(Jr,0,8),fn=Sr(new mn(gn),en+gn.e+1,Jr),vn=Er(fn,!1,en+fn.e+1)),gn.isNeg()&&!gn.isZero()?"-"+vn:vn},Bt.toFraction=function(en){var Jr,vn,fn,gn,mn,ss,ga,Ns,vs,Xs,co,ls,Mo=this,Nu=Mo.d,Ou=Mo.constructor;if(!Nu)return new Ou(Mo);if(vs=vn=new Ou(1),fn=Ns=new Ou(0),Jr=new Ou(fn),mn=Jr.e=Nr(Nu)-Mo.e-1,ss=mn%jt,Jr.d[0]=Pt(10,ss<0?jt+ss:ss),en==null)en=mn>0?Jr:vs;else{if(ga=new Ou(en),!ga.isInt()||ga.lt(vs))throw Error(Rt+ga);en=ga.gt(Jr)?mn>0?Jr:vs:ga}for(Et=!1,ga=new Ou(tr(Nu)),Xs=Ou.precision,Ou.precision=mn=Nu.length*jt*2;co=gr(ga,Jr,0,1,1),gn=vn.plus(co.times(fn)),gn.cmp(en)!=1;)vn=fn,fn=gn,gn=vs,vs=Ns.plus(co.times(gn)),Ns=gn,gn=Jr,Jr=ga.minus(co.times(gn)),ga=gn;return gn=gr(en.minus(vn),fn,0,1,1),Ns=Ns.plus(gn.times(vs)),vn=vn.plus(gn.times(fn)),Ns.s=vs.s=Mo.s,ls=gr(vs,fn,mn,1).minus(Mo).abs().cmp(gr(Ns,vn,mn,1).minus(Mo).abs())<1?[vs,fn]:[Ns,vn],Ou.precision=Xs,Et=!0,ls},Bt.toHexadecimal=Bt.toHex=function(en,Jr){return qs(this,16,en,Jr)},Bt.toNearest=function(en,Jr){var vn=this,fn=vn.constructor;if(vn=new fn(vn),en==null){if(!vn.d)return vn;en=new fn(1),Jr=fn.rounding}else{if(en=new fn(en),Jr===void 0?Jr=fn.rounding:Jt(Jr,0,8),!vn.d)return en.s?vn:en;if(!en.d)return en.s&&(en.s=vn.s),en}return en.d[0]?(Et=!1,vn=gr(vn,en,0,Jr,1).times(en),Et=!0,Sr(vn)):(en.s=vn.s,vn=en),vn},Bt.toNumber=function(){return+this},Bt.toOctal=function(en,Jr){return qs(this,8,en,Jr)},Bt.toPower=Bt.pow=function(en){var Jr,vn,fn,gn,mn,ss,ga=this,Ns=ga.constructor,vs=+(en=new Ns(en));if(!ga.d||!en.d||!ga.d[0]||!en.d[0])return new Ns(Pt(+ga,vs));if(ga=new Ns(ga),ga.eq(1))return ga;if(fn=Ns.precision,mn=Ns.rounding,en.eq(1))return Sr(ga,fn,mn);if(Jr=Nt(en.e/jt),Jr>=en.d.length-1&&(vn=vs<0?-vs:vs)<=Ut)return gn=Or(Ns,ga,vn,fn),en.s<0?new Ns(1).div(gn):Sr(gn,fn,mn);if(ss=ga.s,ss<0){if(Jr<en.d.length-1)return new Ns(NaN);if((en.d[Jr]&1)==0&&(ss=1),ga.e==0&&ga.d[0]==1&&ga.d.length==1)return ga.s=ss,ga}return vn=Pt(+ga,vs),Jr=vn==0||!isFinite(vn)?Nt(vs*(Math.log("0."+tr(ga.d))/Math.LN10+ga.e+1)):new Ns(vn+"").e,Jr>Ns.maxE+1||Jr<Ns.minE-1?new Ns(Jr>0?ss/0:0):(Et=!1,Ns.rounding=ga.s=1,vn=Math.min(12,(Jr+"").length),gn=hn(en.times(Sn(ga,fn+vn)),fn),gn.d&&(gn=Sr(gn,fn+5,1),ar(gn.d,fn,mn)&&(Jr=fn+10,gn=Sr(hn(en.times(Sn(ga,Jr+vn)),Jr),Jr+5,1),+tr(gn.d).slice(fn+1,fn+15)+1==1e14&&(gn=Sr(gn,fn+1,0)))),gn.s=ss,Et=!0,Ns.rounding=mn,Sr(gn,fn,mn))},Bt.toPrecision=function(en,Jr){var vn,fn=this,gn=fn.constructor;return en===void 0?vn=Er(fn,fn.e<=gn.toExpNeg||fn.e>=gn.toExpPos):(Jt(en,1,rt),Jr===void 0?Jr=gn.rounding:Jt(Jr,0,8),fn=Sr(new gn(fn),en,Jr),vn=Er(fn,en<=fn.e||fn.e<=gn.toExpNeg,en)),fn.isNeg()&&!fn.isZero()?"-"+vn:vn},Bt.toSignificantDigits=Bt.toSD=function(en,Jr){var vn=this,fn=vn.constructor;return en===void 0?(en=fn.precision,Jr=fn.rounding):(Jt(en,1,rt),Jr===void 0?Jr=fn.rounding:Jt(Jr,0,8)),Sr(new fn(vn),en,Jr)},Bt.toString=function(){var en=this,Jr=en.constructor,vn=Er(en,en.e<=Jr.toExpNeg||en.e>=Jr.toExpPos);return en.isNeg()&&!en.isZero()?"-"+vn:vn},Bt.truncated=Bt.trunc=function(){return Sr(new this.constructor(this),this.e+1,1)},Bt.valueOf=Bt.toJSON=function(){var en=this,Jr=en.constructor,vn=Er(en,en.e<=Jr.toExpNeg||en.e>=Jr.toExpPos);return en.isNeg()?"-"+vn:vn};function tr(en){var Jr,vn,fn,gn=en.length-1,mn="",ss=en[0];if(gn>0){for(mn+=ss,Jr=1;Jr<gn;Jr++)fn=en[Jr]+"",vn=jt-fn.length,vn&&(mn+=Yr(vn)),mn+=fn;ss=en[Jr],fn=ss+"",vn=jt-fn.length,vn&&(mn+=Yr(vn))}else if(ss===0)return"0";for(;ss%10===0;)ss/=10;return mn+ss}function Jt(en,Jr,vn){if(en!==~~en||en<Jr||en>vn)throw Error(Rt+en)}function ar(en,Jr,vn,fn){var gn,mn,ss,ga;for(mn=en[0];mn>=10;mn/=10)--Jr;return--Jr<0?(Jr+=jt,gn=0):(gn=Math.ceil((Jr+1)/jt),Jr%=jt),mn=Pt(10,jt-Jr),ga=en[gn]%mn|0,fn==null?Jr<3?(Jr==0?ga=ga/100|0:Jr==1&&(ga=ga/10|0),ss=vn<4&&ga==99999||vn>3&&ga==49999||ga==5e4||ga==0):ss=(vn<4&&ga+1==mn||vn>3&&ga+1==mn/2)&&(en[gn+1]/mn/100|0)==Pt(10,Jr-2)-1||(ga==mn/2||ga==0)&&(en[gn+1]/mn/100|0)==0:Jr<4?(Jr==0?ga=ga/1e3|0:Jr==1?ga=ga/100|0:Jr==2&&(ga=ga/10|0),ss=(fn||vn<4)&&ga==9999||!fn&&vn>3&&ga==4999):ss=((fn||vn<4)&&ga+1==mn||!fn&&vn>3&&ga+1==mn/2)&&(en[gn+1]/mn/1e3|0)==Pt(10,Jr-3)-1,ss}function pr(en,Jr,vn){for(var fn,gn=[0],mn,ss=0,ga=en.length;ss<ga;){for(mn=gn.length;mn--;)gn[mn]*=Jr;for(gn[0]+=nt.indexOf(en.charAt(ss++)),fn=0;fn<gn.length;fn++)gn[fn]>vn-1&&(gn[fn+1]===void 0&&(gn[fn+1]=0),gn[fn+1]+=gn[fn]/vn|0,gn[fn]%=vn)}return gn.reverse()}function cr(en,Jr){var vn,fn,gn;if(Jr.isZero())return Jr;fn=Jr.d.length,fn<32?(vn=Math.ceil(fn/3),gn=(1/An(4,vn)).toString()):(vn=16,gn="2.3283064365386962890625e-10"),en.precision+=vn,Jr=xn(en,1,Jr.times(gn),new en(1));for(var mn=vn;mn--;){var ss=Jr.times(Jr);Jr=ss.times(ss).minus(ss).times(8).plus(1)}return en.precision-=vn,Jr}var gr=(function(){function en(fn,gn,mn){var ss,ga=0,Ns=fn.length;for(fn=fn.slice();Ns--;)ss=fn[Ns]*gn+ga,fn[Ns]=ss%mn|0,ga=ss/mn|0;return ga&&fn.unshift(ga),fn}function Jr(fn,gn,mn,ss){var ga,Ns;if(mn!=ss)Ns=mn>ss?1:-1;else for(ga=Ns=0;ga<mn;ga++)if(fn[ga]!=gn[ga]){Ns=fn[ga]>gn[ga]?1:-1;break}return Ns}function vn(fn,gn,mn,ss){for(var ga=0;mn--;)fn[mn]-=ga,ga=fn[mn]<gn[mn]?1:0,fn[mn]=ga*ss+fn[mn]-gn[mn];for(;!fn[0]&&fn.length>1;)fn.shift()}return function(fn,gn,mn,ss,ga,Ns){var vs,Xs,co,ls,Mo,Nu,Ou,$u,Hu,kl,Uu,tl,rl,Wu,tp,Al,om,Op,op,wl,um=fn.constructor,Im=fn.s==gn.s?1:-1,Il=fn.d,sn=gn.d;if(!Il||!Il[0]||!sn||!sn[0])return new um(!fn.s||!gn.s||(Il?sn&&Il[0]==sn[0]:!sn)?NaN:Il&&Il[0]==0||!sn?Im*0:Im/0);for(Ns?(Mo=1,Xs=fn.e-gn.e):(Ns=Kt,Mo=jt,Xs=Nt(fn.e/Mo)-Nt(gn.e/Mo)),op=sn.length,om=Il.length,Hu=new um(Im),kl=Hu.d=[],co=0;sn[co]==(Il[co]||0);co++);if(sn[co]>(Il[co]||0)&&Xs--,mn==null?(Wu=mn=um.precision,ss=um.rounding):ga?Wu=mn+(fn.e-gn.e)+1:Wu=mn,Wu<0)kl.push(1),Nu=!0;else{if(Wu=Wu/Mo+2|0,co=0,op==1){for(ls=0,sn=sn[0],Wu++;(co<om||ls)&&Wu--;co++)tp=ls*Ns+(Il[co]||0),kl[co]=tp/sn|0,ls=tp%sn|0;Nu=ls||co<om}else{for(ls=Ns/(sn[0]+1)|0,ls>1&&(sn=en(sn,ls,Ns),Il=en(Il,ls,Ns),op=sn.length,om=Il.length),Al=op,Uu=Il.slice(0,op),tl=Uu.length;tl<op;)Uu[tl++]=0;wl=sn.slice(),wl.unshift(0),Op=sn[0],sn[1]>=Ns/2&&++Op;do ls=0,vs=Jr(sn,Uu,op,tl),vs<0?(rl=Uu[0],op!=tl&&(rl=rl*Ns+(Uu[1]||0)),ls=rl/Op|0,ls>1?(ls>=Ns&&(ls=Ns-1),Ou=en(sn,ls,Ns),$u=Ou.length,tl=Uu.length,vs=Jr(Ou,Uu,$u,tl),vs==1&&(ls--,vn(Ou,op<$u?wl:sn,$u,Ns))):(ls==0&&(vs=ls=1),Ou=sn.slice()),$u=Ou.length,$u<tl&&Ou.unshift(0),vn(Uu,Ou,tl,Ns),vs==-1&&(tl=Uu.length,vs=Jr(sn,Uu,op,tl),vs<1&&(ls++,vn(Uu,op<tl?wl:sn,tl,Ns))),tl=Uu.length):vs===0&&(ls++,Uu=[0]),kl[co++]=ls,vs&&Uu[0]?Uu[tl++]=Il[Al]||0:(Uu=[Il[Al]],tl=1);while((Al++<om||Uu[0]!==void 0)&&Wu--);Nu=Uu[0]!==void 0}kl[0]||kl.shift()}if(Mo==1)Hu.e=Xs,mt=Nu;else{for(co=1,ls=kl[0];ls>=10;ls/=10)co++;Hu.e=co+Xs*Mo-1,Sr(Hu,ga?mn+Hu.e+1:mn,ss,Nu)}return Hu}})();function Sr(en,Jr,vn,fn){var gn,mn,ss,ga,Ns,vs,Xs,co,ls,Mo=en.constructor;e:if(Jr!=null){if(co=en.d,!co)return en;for(gn=1,ga=co[0];ga>=10;ga/=10)gn++;if(mn=Jr-gn,mn<0)mn+=jt,ss=Jr,Xs=co[ls=0],Ns=Xs/Pt(10,gn-ss-1)%10|0;else if(ls=Math.ceil((mn+1)/jt),ga=co.length,ls>=ga)if(fn){for(;ga++<=ls;)co.push(0);Xs=Ns=0,gn=1,mn%=jt,ss=mn-jt+1}else break e;else{for(Xs=ga=co[ls],gn=1;ga>=10;ga/=10)gn++;mn%=jt,ss=mn-jt+gn,Ns=ss<0?0:Xs/Pt(10,gn-ss-1)%10|0}if(fn=fn||Jr<0||co[ls+1]!==void 0||(ss<0?Xs:Xs%Pt(10,gn-ss-1)),vs=vn<4?(Ns||fn)&&(vn==0||vn==(en.s<0?3:2)):Ns>5||Ns==5&&(vn==4||fn||vn==6&&(mn>0?ss>0?Xs/Pt(10,gn-ss):0:co[ls-1])%10&1||vn==(en.s<0?8:7)),Jr<1||!co[0])return co.length=0,vs?(Jr-=en.e+1,co[0]=Pt(10,(jt-Jr%jt)%jt),en.e=-Jr||0):co[0]=en.e=0,en;if(mn==0?(co.length=ls,ga=1,ls--):(co.length=ls+1,ga=Pt(10,jt-mn),co[ls]=ss>0?(Xs/Pt(10,gn-ss)%Pt(10,ss)|0)*ga:0),vs)for(;;)if(ls==0){for(mn=1,ss=co[0];ss>=10;ss/=10)mn++;for(ss=co[0]+=ga,ga=1;ss>=10;ss/=10)ga++;mn!=ga&&(en.e++,co[0]==Kt&&(co[0]=1));break}else{if(co[ls]+=ga,co[ls]!=Kt)break;co[ls--]=0,ga=1}for(mn=co.length;co[--mn]===0;)co.pop()}return Et&&(en.e>Mo.maxE?(en.d=null,en.e=NaN):en.e<Mo.minE&&(en.e=0,en.d=[0])),en}function Er(en,Jr,vn){if(!en.isFinite())return Kr(en);var fn,gn=en.e,mn=tr(en.d),ss=mn.length;return Jr?(vn&&(fn=vn-ss)>0?mn=mn.charAt(0)+"."+mn.slice(1)+Yr(fn):ss>1&&(mn=mn.charAt(0)+"."+mn.slice(1)),mn=mn+(en.e<0?"e":"e+")+en.e):gn<0?(mn="0."+Yr(-gn-1)+mn,vn&&(fn=vn-ss)>0&&(mn+=Yr(fn))):gn>=ss?(mn+=Yr(gn+1-ss),vn&&(fn=vn-gn-1)>0&&(mn=mn+"."+Yr(fn))):((fn=gn+1)<ss&&(mn=mn.slice(0,fn)+"."+mn.slice(fn)),vn&&(fn=vn-ss)>0&&(gn+1===ss&&(mn+="."),mn+=Yr(fn))),mn}function Vr(en,Jr){var vn=en[0];for(Jr*=jt;vn>=10;vn/=10)Jr++;return Jr}function Wr(en,Jr,vn){if(Jr>Ot)throw Et=!0,vn&&(en.precision=vn),Error(Tt);return Sr(new en(st),Jr,1,!0)}function Mr(en,Jr,vn){if(Jr>Wt)throw Error(Tt);return Sr(new en(dt),Jr,vn,!0)}function Nr(en){var Jr=en.length-1,vn=Jr*jt+1;if(Jr=en[Jr],Jr){for(;Jr%10==0;Jr/=10)vn--;for(Jr=en[0];Jr>=10;Jr/=10)vn++}return vn}function Yr(en){for(var Jr="";en--;)Jr+="0";return Jr}function Or(en,Jr,vn,fn){var gn,mn=new en(1),ss=Math.ceil(fn/jt+4);for(Et=!1;;){if(vn%2&&(mn=mn.times(Jr),Ln(mn.d,ss)&&(gn=!0)),vn=Nt(vn/2),vn===0){vn=mn.d.length-1,gn&&mn.d[vn]===0&&++mn.d[vn];break}Jr=Jr.times(Jr),Ln(Jr.d,ss)}return Et=!0,mn}function Ar(en){return en.d[en.d.length-1]&1}function Qr(en,Jr,vn){for(var fn,gn,mn=new en(Jr[0]),ss=0;++ss<Jr.length;){if(gn=new en(Jr[ss]),!gn.s){mn=gn;break}fn=mn.cmp(gn),(fn===vn||fn===0&&mn.s===vn)&&(mn=gn)}return mn}function hn(en,Jr){var vn,fn,gn,mn,ss,ga,Ns,vs=0,Xs=0,co=0,ls=en.constructor,Mo=ls.rounding,Nu=ls.precision;if(!en.d||!en.d[0]||en.e>17)return new ls(en.d?en.d[0]?en.s<0?0:1/0:1:en.s?en.s<0?0:en:NaN);for(Jr==null?(Et=!1,Ns=Nu):Ns=Jr,ga=new ls(.03125);en.e>-2;)en=en.times(ga),co+=5;for(fn=Math.log(Pt(2,co))/Math.LN10*2+5|0,Ns+=fn,vn=mn=ss=new ls(1),ls.precision=Ns;;){if(mn=Sr(mn.times(en),Ns,1),vn=vn.times(++Xs),ga=ss.plus(gr(mn,vn,Ns,1)),tr(ga.d).slice(0,Ns)===tr(ss.d).slice(0,Ns)){for(gn=co;gn--;)ss=Sr(ss.times(ss),Ns,1);if(Jr==null)if(vs<3&&ar(ss.d,Ns-fn,Mo,vs))ls.precision=Ns+=10,vn=mn=ga=new ls(1),Xs=0,vs++;else return Sr(ss,ls.precision=Nu,Mo,Et=!0);else return ls.precision=Nu,ss}ss=ga}}function Sn(en,Jr){var vn,fn,gn,mn,ss,ga,Ns,vs,Xs,co,ls,Mo=1,Nu=10,Ou=en,$u=Ou.d,Hu=Ou.constructor,kl=Hu.rounding,Uu=Hu.precision;if(Ou.s<0||!$u||!$u[0]||!Ou.e&&$u[0]==1&&$u.length==1)return new Hu($u&&!$u[0]?-1/0:Ou.s!=1?NaN:$u?0:Ou);if(Jr==null?(Et=!1,Xs=Uu):Xs=Jr,Hu.precision=Xs+=Nu,vn=tr($u),fn=vn.charAt(0),Math.abs(mn=Ou.e)<15e14){for(;fn<7&&fn!=1||fn==1&&vn.charAt(1)>3;)Ou=Ou.times(en),vn=tr(Ou.d),fn=vn.charAt(0),Mo++;mn=Ou.e,fn>1?(Ou=new Hu("0."+vn),mn++):Ou=new Hu(fn+"."+vn.slice(1))}else return vs=Wr(Hu,Xs+2,Uu).times(mn+""),Ou=Sn(new Hu(fn+"."+vn.slice(1)),Xs-Nu).plus(vs),Hu.precision=Uu,Jr==null?Sr(Ou,Uu,kl,Et=!0):Ou;for(co=Ou,Ns=ss=Ou=gr(Ou.minus(1),Ou.plus(1),Xs,1),ls=Sr(Ou.times(Ou),Xs,1),gn=3;;){if(ss=Sr(ss.times(ls),Xs,1),vs=Ns.plus(gr(ss,new Hu(gn),Xs,1)),tr(vs.d).slice(0,Xs)===tr(Ns.d).slice(0,Xs))if(Ns=Ns.times(2),mn!==0&&(Ns=Ns.plus(Wr(Hu,Xs+2,Uu).times(mn+""))),Ns=gr(Ns,new Hu(Mo),Xs,1),Jr==null)if(ar(Ns.d,Xs-Nu,kl,ga))Hu.precision=Xs+=Nu,vs=ss=Ou=gr(co.minus(1),co.plus(1),Xs,1),ls=Sr(Ou.times(Ou),Xs,1),gn=ga=1;else return Sr(Ns,Hu.precision=Uu,kl,Et=!0);else return Hu.precision=Uu,Ns;Ns=vs,gn+=2}}function Kr(en){return String(en.s*en.s/0)}function Hn(en,Jr){var vn,fn,gn;for((vn=Jr.indexOf("."))>-1&&(Jr=Jr.replace(".","")),(fn=Jr.search(/e/i))>0?(vn<0&&(vn=fn),vn+=+Jr.slice(fn+1),Jr=Jr.substring(0,fn)):vn<0&&(vn=Jr.length),fn=0;Jr.charCodeAt(fn)===48;fn++);for(gn=Jr.length;Jr.charCodeAt(gn-1)===48;--gn);if(Jr=Jr.slice(fn,gn),Jr){if(gn-=fn,en.e=vn=vn-fn-1,en.d=[],fn=(vn+1)%jt,vn<0&&(fn+=jt),fn<gn){for(fn&&en.d.push(+Jr.slice(0,fn)),gn-=jt;fn<gn;)en.d.push(+Jr.slice(fn,fn+=jt));Jr=Jr.slice(fn),fn=jt-Jr.length}else fn-=gn;for(;fn--;)Jr+="0";en.d.push(+Jr),Et&&(en.e>en.constructor.maxE?(en.d=null,en.e=NaN):en.e<en.constructor.minE&&(en.e=0,en.d=[0]))}else en.e=0,en.d=[0];return en}function ln(en,Jr){var vn,fn,gn,mn,ss,ga,Ns,vs,Xs;if(Jr.indexOf("_")>-1){if(Jr=Jr.replace(/(\d)_(?=\d)/g,"$1"),Vt.test(Jr))return Hn(en,Jr)}else if(Jr==="Infinity"||Jr==="NaN")return+Jr||(en.s=NaN),en.e=NaN,en.d=null,en;if(Ft.test(Jr))vn=16,Jr=Jr.toLowerCase();else if(It.test(Jr))vn=2;else if(qt.test(Jr))vn=8;else throw Error(Rt+Jr);for(mn=Jr.search(/p/i),mn>0?(Ns=+Jr.slice(mn+1),Jr=Jr.substring(2,mn)):Jr=Jr.slice(2),mn=Jr.indexOf("."),ss=mn>=0,fn=en.constructor,ss&&(Jr=Jr.replace(".",""),ga=Jr.length,mn=ga-mn,gn=Or(fn,new fn(vn),mn,mn*2)),vs=pr(Jr,vn,Kt),Xs=vs.length-1,mn=Xs;vs[mn]===0;--mn)vs.pop();return mn<0?new fn(en.s*0):(en.e=Vr(vs,Xs),en.d=vs,Et=!1,ss&&(en=gr(en,gn,ga*4)),Ns&&(en=en.times(Math.abs(Ns)<54?Pt(2,Ns):ht.pow(2,Ns))),Et=!0,en)}function kn(en,Jr){var vn,fn=Jr.d.length;if(fn<3)return Jr.isZero()?Jr:xn(en,2,Jr,Jr);vn=1.4*Math.sqrt(fn),vn=vn>16?16:vn|0,Jr=Jr.times(1/An(5,vn)),Jr=xn(en,2,Jr,Jr);for(var gn,mn=new en(5),ss=new en(16),ga=new en(20);vn--;)gn=Jr.times(Jr),Jr=Jr.times(mn.plus(gn.times(ss.times(gn).minus(ga))));return Jr}function xn(en,Jr,vn,fn,gn){var mn,ss,ga,Ns,vs=en.precision,Xs=Math.ceil(vs/jt);for(Et=!1,Ns=vn.times(vn),ga=new en(fn);;){if(ss=gr(ga.times(Ns),new en(Jr++*Jr++),vs,1),ga=gn?fn.plus(ss):fn.minus(ss),fn=gr(ss.times(Ns),new en(Jr++*Jr++),vs,1),ss=ga.plus(fn),ss.d[Xs]!==void 0){for(mn=Xs;ss.d[mn]===ga.d[mn]&&mn--;);if(mn==-1)break}mn=ga,ga=fn,fn=ss,ss=mn}return Et=!0,ss.d.length=Xs+1,ss}function An(en,Jr){for(var vn=en;--Jr;)vn*=en;return vn}function rs(en,Jr){var vn,fn=Jr.s<0,gn=Mr(en,en.precision,1),mn=gn.times(.5);if(Jr=Jr.abs(),Jr.lte(mn))return St=fn?4:1,Jr;if(vn=Jr.divToInt(gn),vn.isZero())St=fn?3:2;else{if(Jr=Jr.minus(vn.times(gn)),Jr.lte(mn))return St=Ar(vn)?fn?2:3:fn?4:1,Jr;St=Ar(vn)?fn?1:4:fn?3:2}return Jr.minus(gn).abs()}function qs(en,Jr,vn,fn){var gn,mn,ss,ga,Ns,vs,Xs,co,ls,Mo=en.constructor,Nu=vn!==void 0;if(Nu?(Jt(vn,1,rt),fn===void 0?fn=Mo.rounding:Jt(fn,0,8)):(vn=Mo.precision,fn=Mo.rounding),!en.isFinite())Xs=Kr(en);else{for(Xs=Er(en),ss=Xs.indexOf("."),Nu?(gn=2,Jr==16?vn=vn*4-3:Jr==8&&(vn=vn*3-2)):gn=Jr,ss>=0&&(Xs=Xs.replace(".",""),ls=new Mo(1),ls.e=Xs.length-ss,ls.d=pr(Er(ls),10,gn),ls.e=ls.d.length),co=pr(Xs,10,gn),mn=Ns=co.length;co[--Ns]==0;)co.pop();if(!co[0])Xs=Nu?"0p+0":"0";else{if(ss<0?mn--:(en=new Mo(en),en.d=co,en.e=mn,en=gr(en,ls,vn,fn,0,gn),co=en.d,mn=en.e,vs=mt),ss=co[vn],ga=gn/2,vs=vs||co[vn+1]!==void 0,vs=fn<4?(ss!==void 0||vs)&&(fn===0||fn===(en.s<0?3:2)):ss>ga||ss===ga&&(fn===4||vs||fn===6&&co[vn-1]&1||fn===(en.s<0?8:7)),co.length=vn,vs)for(;++co[--vn]>gn-1;)co[vn]=0,vn||(++mn,co.unshift(1));for(Ns=co.length;!co[Ns-1];--Ns);for(ss=0,Xs="";ss<Ns;ss++)Xs+=nt.charAt(co[ss]);if(Nu){if(Ns>1)if(Jr==16||Jr==8){for(ss=Jr==16?4:3,--Ns;Ns%ss;Ns++)Xs+="0";for(co=pr(Xs,gn,Jr),Ns=co.length;!co[Ns-1];--Ns);for(ss=1,Xs="1.";ss<Ns;ss++)Xs+=nt.charAt(co[ss])}else Xs=Xs.charAt(0)+"."+Xs.slice(1);Xs=Xs+(mn<0?"p":"p+")+mn}else if(mn<0){for(;++mn;)Xs="0"+Xs;Xs="0."+Xs}else if(++mn>Ns)for(mn-=Ns;mn--;)Xs+="0";else mn<Ns&&(Xs=Xs.slice(0,mn)+"."+Xs.slice(mn))}Xs=(Jr==16?"0x":Jr==2?"0b":Jr==8?"0o":"")+Xs}return en.s<0?"-"+Xs:Xs}function Ln(en,Jr){if(en.length>Jr)return en.length=Jr,!0}function Cn(en){return new this(en).abs()}function Nn(en){return new this(en).acos()}function Gr(en){return new this(en).acosh()}function tn(en,Jr){return new this(en).plus(Jr)}function dn(en){return new this(en).asin()}function Rn(en){return new this(en).asinh()}function wn(en){return new this(en).atan()}function Un(en){return new this(en).atanh()}function Zn(en,Jr){en=new this(en),Jr=new this(Jr);var vn,fn=this.precision,gn=this.rounding,mn=fn+4;return!en.s||!Jr.s?vn=new this(NaN):!en.d&&!Jr.d?(vn=Mr(this,mn,1).times(Jr.s>0?.25:.75),vn.s=en.s):!Jr.d||en.isZero()?(vn=Jr.s<0?Mr(this,fn,gn):new this(0),vn.s=en.s):!en.d||Jr.isZero()?(vn=Mr(this,mn,1).times(.5),vn.s=en.s):Jr.s<0?(this.precision=mn,this.rounding=1,vn=this.atan(gr(en,Jr,mn,1)),Jr=Mr(this,mn,1),this.precision=fn,this.rounding=gn,vn=en.s<0?vn.minus(Jr):vn.plus(Jr)):vn=this.atan(gr(en,Jr,mn,1)),vn}function pn(en){return new this(en).cbrt()}function Dn(en){return Sr(en=new this(en),en.e+1,2)}function qn(en,Jr,vn){return new this(en).clamp(Jr,vn)}function _a(en){if(!en||typeof en!="object")throw Error(Ct+"Object expected");var Jr,vn,fn,gn=en.defaults===!0,mn=["precision",1,rt,"rounding",0,8,"toExpNeg",-tt,0,"toExpPos",0,tt,"maxE",0,tt,"minE",-tt,0,"modulo",0,9];for(Jr=0;Jr<mn.length;Jr+=3)if(vn=mn[Jr],gn&&(this[vn]=ft[vn]),(fn=en[vn])!==void 0)if(Nt(fn)===fn&&fn>=mn[Jr+1]&&fn<=mn[Jr+2])this[vn]=fn;else throw Error(Rt+vn+": "+fn);if(vn="crypto",gn&&(this[vn]=ft[vn]),(fn=en[vn])!==void 0)if(fn===!0||fn===!1||fn===0||fn===1)if(fn)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[vn]=!0;else throw Error(wt);else this[vn]=!1;else throw Error(Rt+vn+": "+fn);return this}function Vn(en){return new this(en).cos()}function bs(en){return new this(en).cosh()}function Is(en){var Jr,vn,fn;function gn(mn){var ss,ga,Ns,vs=this;if(!(vs instanceof gn))return new gn(mn);if(vs.constructor=gn,Bo(mn)){vs.s=mn.s,Et?!mn.d||mn.e>gn.maxE?(vs.e=NaN,vs.d=null):mn.e<gn.minE?(vs.e=0,vs.d=[0]):(vs.e=mn.e,vs.d=mn.d.slice()):(vs.e=mn.e,vs.d=mn.d?mn.d.slice():mn.d);return}if(Ns=typeof mn,Ns==="number"){if(mn===0){vs.s=1/mn<0?-1:1,vs.e=0,vs.d=[0];return}if(mn<0?(mn=-mn,vs.s=-1):vs.s=1,mn===~~mn&&mn<1e7){for(ss=0,ga=mn;ga>=10;ga/=10)ss++;Et?ss>gn.maxE?(vs.e=NaN,vs.d=null):ss<gn.minE?(vs.e=0,vs.d=[0]):(vs.e=ss,vs.d=[mn]):(vs.e=ss,vs.d=[mn]);return}if(mn*0!==0){mn||(vs.s=NaN),vs.e=NaN,vs.d=null;return}return Hn(vs,mn.toString())}if(Ns==="string")return(ga=mn.charCodeAt(0))===45?(mn=mn.slice(1),vs.s=-1):(ga===43&&(mn=mn.slice(1)),vs.s=1),Vt.test(mn)?Hn(vs,mn):ln(vs,mn);if(Ns==="bigint")return mn<0?(mn=-mn,vs.s=-1):vs.s=1,Hn(vs,mn.toString());throw Error(Rt+mn)}if(gn.prototype=Bt,gn.ROUND_UP=0,gn.ROUND_DOWN=1,gn.ROUND_CEIL=2,gn.ROUND_FLOOR=3,gn.ROUND_HALF_UP=4,gn.ROUND_HALF_DOWN=5,gn.ROUND_HALF_EVEN=6,gn.ROUND_HALF_CEIL=7,gn.ROUND_HALF_FLOOR=8,gn.EUCLID=9,gn.config=gn.set=_a,gn.clone=Is,gn.isDecimal=Bo,gn.abs=Cn,gn.acos=Nn,gn.acosh=Gr,gn.add=tn,gn.asin=dn,gn.asinh=Rn,gn.atan=wn,gn.atanh=Un,gn.atan2=Zn,gn.cbrt=pn,gn.ceil=Dn,gn.clamp=qn,gn.cos=Vn,gn.cosh=bs,gn.div=uo,gn.exp=Rs,gn.floor=io,gn.hypot=vo,gn.ln=En,gn.log=In,gn.log10=Ps,gn.log2=ds,gn.max=yo,gn.min=rn,gn.mod=es,gn.mul=Gs,gn.pow=Ro,gn.random=ru,gn.round=du,gn.sign=Iu,gn.sin=Sl,gn.sinh=Ko,gn.sqrt=Fl,gn.sub=gl,gn.sum=Gu,gn.tan=Lu,gn.tanh=Ku,gn.trunc=uu,en===void 0&&(en={}),en&&en.defaults!==!0)for(fn=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],Jr=0;Jr<fn.length;)en.hasOwnProperty(vn=fn[Jr++])||(en[vn]=this[vn]);return gn.config(en),gn}function uo(en,Jr){return new this(en).div(Jr)}function Rs(en){return new this(en).exp()}function io(en){return Sr(en=new this(en),en.e+1,3)}function vo(){var en,Jr,vn=new this(0);for(Et=!1,en=0;en<arguments.length;)if(Jr=new this(arguments[en++]),Jr.d)vn.d&&(vn=vn.plus(Jr.times(Jr)));else{if(Jr.s)return Et=!0,new this(1/0);vn=Jr}return Et=!0,vn.sqrt()}function Bo(en){return en instanceof ht||en&&en.toStringTag===At||!1}function En(en){return new this(en).ln()}function In(en,Jr){return new this(en).log(Jr)}function ds(en){return new this(en).log(2)}function Ps(en){return new this(en).log(10)}function yo(){return Qr(this,arguments,-1)}function rn(){return Qr(this,arguments,1)}function es(en,Jr){return new this(en).mod(Jr)}function Gs(en,Jr){return new this(en).mul(Jr)}function Ro(en,Jr){return new this(en).pow(Jr)}function ru(en){var Jr,vn,fn,gn,mn=0,ss=new this(1),ga=[];if(en===void 0?en=this.precision:Jt(en,1,rt),fn=Math.ceil(en/jt),this.crypto)if(crypto.getRandomValues)for(Jr=crypto.getRandomValues(new Uint32Array(fn));mn<fn;)gn=Jr[mn],gn>=429e7?Jr[mn]=crypto.getRandomValues(new Uint32Array(1))[0]:ga[mn++]=gn%1e7;else if(crypto.randomBytes){for(Jr=crypto.randomBytes(fn*=4);mn<fn;)gn=Jr[mn]+(Jr[mn+1]<<8)+(Jr[mn+2]<<16)+((Jr[mn+3]&127)<<24),gn>=214e7?crypto.randomBytes(4).copy(Jr,mn):(ga.push(gn%1e7),mn+=4);mn=fn/4}else throw Error(wt);else for(;mn<fn;)ga[mn++]=Math.random()*1e7|0;for(fn=ga[--mn],en%=jt,fn&&en&&(gn=Pt(10,jt-en),ga[mn]=(fn/gn|0)*gn);ga[mn]===0;mn--)ga.pop();if(mn<0)vn=0,ga=[0];else{for(vn=-1;ga[0]===0;vn-=jt)ga.shift();for(fn=1,gn=ga[0];gn>=10;gn/=10)fn++;fn<jt&&(vn-=jt-fn)}return ss.e=vn,ss.d=ga,ss}function du(en){return Sr(en=new this(en),en.e+1,this.rounding)}function Iu(en){return en=new this(en),en.d?en.d[0]?en.s:0*en.s:en.s||NaN}function Sl(en){return new this(en).sin()}function Ko(en){return new this(en).sinh()}function Fl(en){return new this(en).sqrt()}function gl(en,Jr){return new this(en).sub(Jr)}function Gu(){var en=0,Jr=arguments,vn=new this(Jr[en]);for(Et=!1;vn.s&&++en<Jr.length;)vn=vn.plus(Jr[en]);return Et=!0,Sr(vn,this.precision,this.rounding)}function Lu(en){return new this(en).tan()}function Ku(en){return new this(en).tanh()}function uu(en){return Sr(en=new this(en),en.e+1,1)}ht=Is(ft),ht.prototype.constructor=ht,ht.default=ht.Decimal=ht,st=new ht(st),dt=new ht(dt),et.exports?(typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(Bt[Symbol.for("nodejs.util.inspect.custom")]=Bt.toString,Bt[Symbol.toStringTag]="Decimal"),et.exports=ht):(_e||(_e=typeof self<"u"&&self&&self.self==self?self:window),bt=_e.Decimal,ht.noConflict=function(){return _e.Decimal=bt,ht},_e.Decimal=ht)})(decimal)})(decimal$1)),decimal$1.exports}var hasRequiredBigNumber;function requireBigNumber(){if(hasRequiredBigNumber)return BigNumber;hasRequiredBigNumber=1;var et=requireInteropRequireDefault();Object.defineProperty(BigNumber,"__esModule",{value:!0}),BigNumber.createBigNumberClass=void 0;var _e=et(requireDecimal()),tt=requireFactory(),rt="BigNumber",nt=["?on","config"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.on,ht=dt.config,mt=_e.default.clone({precision:ht.precision,modulo:_e.default.EUCLID});return mt.prototype=Object.create(mt.prototype),mt.prototype.type="BigNumber",mt.prototype.isBigNumber=!0,mt.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},mt.fromJSON=function(bt){return new mt(bt.value)},ft&&ft("config",function(bt,St){bt.precision!==St.precision&&mt.config({precision:bt.precision})}),mt},{isClass:!0});return BigNumber.createBigNumberClass=st,BigNumber}var Complex={},complex$3={exports:{}},hasRequiredComplex$4;function requireComplex$4(){return hasRequiredComplex$4||(hasRequiredComplex$4=1,(function(et){const _e=Math.cosh||function(bt){return Math.abs(bt)<1e-9?1-bt:(Math.exp(bt)+Math.exp(-bt))*.5},tt=Math.sinh||function(bt){return Math.abs(bt)<1e-9?bt:(Math.exp(bt)-Math.exp(-bt))*.5},rt=function(bt){const St=Math.PI/4;if(-St>bt||bt>St)return Math.cos(bt)-1;const Et=bt*bt;return Et*(Et*(Et*(Et*(Et*(Et*(Et*(Et/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},nt=function(bt,St){return bt=Math.abs(bt),St=Math.abs(St),bt<St&&([bt,St]=[St,bt]),bt<1e8?Math.sqrt(bt*bt+St*St):(St/=bt,bt*Math.sqrt(1+St*St))},st=function(){throw SyntaxError("Invalid Param")};function dt(bt,St){const Et=Math.abs(bt),Ct=Math.abs(St);return bt===0?Math.log(Ct):St===0?Math.log(Et):Et<3e3&&Ct<3e3?Math.log(bt*bt+St*St)*.5:(bt=bt*.5,St=St*.5,.5*Math.log(bt*bt+St*St)+Math.LN2)}const ft={re:0,im:0},ht=function(bt,St){const Et=ft;if(bt==null)Et.re=Et.im=0;else if(St!==void 0)Et.re=bt,Et.im=St;else switch(typeof bt){case"object":if("im"in bt&&"re"in bt)Et.re=bt.re,Et.im=bt.im;else if("abs"in bt&&"arg"in bt){if(!isFinite(bt.abs)&&isFinite(bt.arg))return mt.INFINITY;Et.re=bt.abs*Math.cos(bt.arg),Et.im=bt.abs*Math.sin(bt.arg)}else if("r"in bt&&"phi"in bt){if(!isFinite(bt.r)&&isFinite(bt.phi))return mt.INFINITY;Et.re=bt.r*Math.cos(bt.phi),Et.im=bt.r*Math.sin(bt.phi)}else bt.length===2?(Et.re=bt[0],Et.im=bt[1]):st();break;case"string":Et.im=Et.re=0;const Ct=bt.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);let Rt=1,Tt=0;Ct===null&&st();for(let wt=0;wt<Ct.length;wt++){const At=Ct[wt];At===" "||At===" "||At===`
`||(At==="+"?Rt++:At==="-"?Tt++:At==="i"||At==="I"?(Rt+Tt===0&&st(),Ct[wt+1]!==" "&&!isNaN(Ct[wt+1])?(Et.im+=parseFloat((Tt%2?"-":"")+Ct[wt+1]),wt++):Et.im+=parseFloat((Tt%2?"-":"")+"1"),Rt=Tt=0):((Rt+Tt===0||isNaN(At))&&st(),Ct[wt+1]==="i"||Ct[wt+1]==="I"?(Et.im+=parseFloat((Tt%2?"-":"")+At),wt++):Et.re+=parseFloat((Tt%2?"-":"")+At),Rt=Tt=0))}Rt+Tt>0&&st();break;case"number":Et.im=0,Et.re=bt;break;default:st()}return isNaN(Et.re)||isNaN(Et.im),Et};function mt(bt,St){if(!(this instanceof mt))return new mt(bt,St);const Et=ht(bt,St);this.re=Et.re,this.im=Et.im}mt.prototype={re:0,im:0,sign:function(){const bt=nt(this.re,this.im);return new mt(this.re/bt,this.im/bt)},add:function(bt,St){const Et=ht(bt,St),Ct=this.isInfinite(),Rt=!(isFinite(Et.re)&&isFinite(Et.im));return Ct||Rt?Ct&&Rt?mt.NAN:mt.INFINITY:new mt(this.re+Et.re,this.im+Et.im)},sub:function(bt,St){const Et=ht(bt,St),Ct=this.isInfinite(),Rt=!(isFinite(Et.re)&&isFinite(Et.im));return Ct||Rt?Ct&&Rt?mt.NAN:mt.INFINITY:new mt(this.re-Et.re,this.im-Et.im)},mul:function(bt,St){const Et=ht(bt,St),Ct=this.isInfinite(),Rt=!(isFinite(Et.re)&&isFinite(Et.im)),Tt=this.re===0&&this.im===0,wt=Et.re===0&&Et.im===0;return Ct&&wt||Rt&&Tt?mt.NAN:Ct||Rt?mt.INFINITY:Et.im===0&&this.im===0?new mt(this.re*Et.re,0):new mt(this.re*Et.re-this.im*Et.im,this.re*Et.im+this.im*Et.re)},div:function(bt,St){const Et=ht(bt,St),Ct=this.isInfinite(),Rt=!(isFinite(Et.re)&&isFinite(Et.im)),Tt=this.re===0&&this.im===0,wt=Et.re===0&&Et.im===0;if(Tt&&wt||Ct&&Rt)return mt.NAN;if(wt||Ct)return mt.INFINITY;if(Tt||Rt)return mt.ZERO;if(Et.im===0)return new mt(this.re/Et.re,this.im/Et.re);if(Math.abs(Et.re)<Math.abs(Et.im)){const At=Et.re/Et.im,Nt=Et.re*At+Et.im;return new mt((this.re*At+this.im)/Nt,(this.im*At-this.re)/Nt)}else{const At=Et.im/Et.re,Nt=Et.im*At+Et.re;return new mt((this.re+this.im*At)/Nt,(this.im-this.re*At)/Nt)}},pow:function(bt,St){const Et=ht(bt,St),Ct=this.re===0&&this.im===0;if(Et.re===0&&Et.im===0)return mt.ONE;if(Et.im===0){if(this.im===0&&this.re>0)return new mt(Math.pow(this.re,Et.re),0);if(this.re===0)switch((Et.re%4+4)%4){case 0:return new mt(Math.pow(this.im,Et.re),0);case 1:return new mt(0,Math.pow(this.im,Et.re));case 2:return new mt(-Math.pow(this.im,Et.re),0);case 3:return new mt(0,-Math.pow(this.im,Et.re))}}if(Ct&&Et.re>0)return mt.ZERO;const Tt=Math.atan2(this.im,this.re),wt=dt(this.re,this.im);let At=Math.exp(Et.re*wt-Et.im*Tt),Nt=Et.im*wt+Et.re*Tt;return new mt(At*Math.cos(Nt),At*Math.sin(Nt))},sqrt:function(){const bt=this.re,St=this.im;if(St===0)return bt>=0?new mt(Math.sqrt(bt),0):new mt(0,Math.sqrt(-bt));const Et=nt(bt,St);let Ct=Math.sqrt(.5*(Et+Math.abs(bt))),Rt=Math.abs(St)/(2*Ct);return bt>=0?new mt(Ct,St<0?-Rt:Rt):new mt(Rt,St<0?-Ct:Ct)},exp:function(){const bt=Math.exp(this.re);return this.im===0?new mt(bt,0):new mt(bt*Math.cos(this.im),bt*Math.sin(this.im))},expm1:function(){const bt=this.re,St=this.im;return new mt(Math.expm1(bt)*Math.cos(St)+rt(St),Math.exp(bt)*Math.sin(St))},log:function(){const bt=this.re,St=this.im;return St===0&&bt>0?new mt(Math.log(bt),0):new mt(dt(bt,St),Math.atan2(St,bt))},abs:function(){return nt(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const bt=this.re,St=this.im;return new mt(Math.sin(bt)*_e(St),Math.cos(bt)*tt(St))},cos:function(){const bt=this.re,St=this.im;return new mt(Math.cos(bt)*_e(St),-Math.sin(bt)*tt(St))},tan:function(){const bt=2*this.re,St=2*this.im,Et=Math.cos(bt)+_e(St);return new mt(Math.sin(bt)/Et,tt(St)/Et)},cot:function(){const bt=2*this.re,St=2*this.im,Et=Math.cos(bt)-_e(St);return new mt(-Math.sin(bt)/Et,tt(St)/Et)},sec:function(){const bt=this.re,St=this.im,Et=.5*_e(2*St)+.5*Math.cos(2*bt);return new mt(Math.cos(bt)*_e(St)/Et,Math.sin(bt)*tt(St)/Et)},csc:function(){const bt=this.re,St=this.im,Et=.5*_e(2*St)-.5*Math.cos(2*bt);return new mt(Math.sin(bt)*_e(St)/Et,-Math.cos(bt)*tt(St)/Et)},asin:function(){const bt=this.re,St=this.im,Et=new mt(St*St-bt*bt+1,-2*bt*St).sqrt(),Ct=new mt(Et.re-St,Et.im+bt).log();return new mt(Ct.im,-Ct.re)},acos:function(){const bt=this.re,St=this.im,Et=new mt(St*St-bt*bt+1,-2*bt*St).sqrt(),Ct=new mt(Et.re-St,Et.im+bt).log();return new mt(Math.PI/2-Ct.im,Ct.re)},atan:function(){const bt=this.re,St=this.im;if(bt===0){if(St===1)return new mt(0,1/0);if(St===-1)return new mt(0,-1/0)}const Et=bt*bt+(1-St)*(1-St),Ct=new mt((1-St*St-bt*bt)/Et,-2*bt/Et).log();return new mt(-.5*Ct.im,.5*Ct.re)},acot:function(){const bt=this.re,St=this.im;if(St===0)return new mt(Math.atan2(1,bt),0);const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).atan():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).atan()},asec:function(){const bt=this.re,St=this.im;if(bt===0&&St===0)return new mt(0,1/0);const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).acos():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).acos()},acsc:function(){const bt=this.re,St=this.im;if(bt===0&&St===0)return new mt(Math.PI/2,1/0);const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).asin():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).asin()},sinh:function(){const bt=this.re,St=this.im;return new mt(tt(bt)*Math.cos(St),_e(bt)*Math.sin(St))},cosh:function(){const bt=this.re,St=this.im;return new mt(_e(bt)*Math.cos(St),tt(bt)*Math.sin(St))},tanh:function(){const bt=2*this.re,St=2*this.im,Et=_e(bt)+Math.cos(St);return new mt(tt(bt)/Et,Math.sin(St)/Et)},coth:function(){const bt=2*this.re,St=2*this.im,Et=_e(bt)-Math.cos(St);return new mt(tt(bt)/Et,-Math.sin(St)/Et)},csch:function(){const bt=this.re,St=this.im,Et=Math.cos(2*St)-_e(2*bt);return new mt(-2*tt(bt)*Math.cos(St)/Et,2*_e(bt)*Math.sin(St)/Et)},sech:function(){const bt=this.re,St=this.im,Et=Math.cos(2*St)+_e(2*bt);return new mt(2*_e(bt)*Math.cos(St)/Et,-2*tt(bt)*Math.sin(St)/Et)},asinh:function(){let bt=this.im;this.im=-this.re,this.re=bt;const St=this.asin();return this.re=-this.im,this.im=bt,bt=St.re,St.re=-St.im,St.im=bt,St},acosh:function(){const bt=this.acos();if(bt.im<=0){const St=bt.re;bt.re=-bt.im,bt.im=St}else{const St=bt.im;bt.im=-bt.re,bt.re=St}return bt},atanh:function(){const bt=this.re,St=this.im,Et=bt>1&&St===0,Ct=1-bt,Rt=1+bt,Tt=Ct*Ct+St*St,wt=Tt!==0?new mt((Rt*Ct-St*St)/Tt,(St*Ct+Rt*St)/Tt):new mt(bt!==-1?bt/0:0,St!==0?St/0:0),At=wt.re;return wt.re=dt(wt.re,wt.im)/2,wt.im=Math.atan2(wt.im,At)/2,Et&&(wt.im=-wt.im),wt},acoth:function(){const bt=this.re,St=this.im;if(bt===0&&St===0)return new mt(0,Math.PI/2);const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).atanh():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).atanh()},acsch:function(){const bt=this.re,St=this.im;if(St===0)return new mt(bt!==0?Math.log(bt+Math.sqrt(bt*bt+1)):1/0,0);const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).asinh():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).asinh()},asech:function(){const bt=this.re,St=this.im;if(this.isZero())return mt.INFINITY;const Et=bt*bt+St*St;return Et!==0?new mt(bt/Et,-St/Et).acosh():new mt(bt!==0?bt/0:0,St!==0?-St/0:0).acosh()},inverse:function(){if(this.isZero())return mt.INFINITY;if(this.isInfinite())return mt.ZERO;const bt=this.re,St=this.im,Et=bt*bt+St*St;return new mt(bt/Et,-St/Et)},conjugate:function(){return new mt(this.re,-this.im)},neg:function(){return new mt(-this.re,-this.im)},ceil:function(bt){return bt=Math.pow(10,bt||0),new mt(Math.ceil(this.re*bt)/bt,Math.ceil(this.im*bt)/bt)},floor:function(bt){return bt=Math.pow(10,bt||0),new mt(Math.floor(this.re*bt)/bt,Math.floor(this.im*bt)/bt)},round:function(bt){return bt=Math.pow(10,bt||0),new mt(Math.round(this.re*bt)/bt,Math.round(this.im*bt)/bt)},equals:function(bt,St){const Et=ht(bt,St);return Math.abs(Et.re-this.re)<=mt.EPSILON&&Math.abs(Et.im-this.im)<=mt.EPSILON},clone:function(){return new mt(this.re,this.im)},toString:function(){let bt=this.re,St=this.im,Et="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(bt)<mt.EPSILON&&(bt=0),Math.abs(St)<mt.EPSILON&&(St=0),St===0?Et+bt:(bt!==0?(Et+=bt,Et+=" ",St<0?(St=-St,Et+="-"):Et+="+",Et+=" "):St<0&&(St=-St,Et+="-"),St!==1&&(Et+=St),Et+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},mt.ZERO=new mt(0,0),mt.ONE=new mt(1,0),mt.I=new mt(0,1),mt.PI=new mt(Math.PI,0),mt.E=new mt(Math.E,0),mt.INFINITY=new mt(1/0,1/0),mt.NAN=new mt(NaN,NaN),mt.EPSILON=1e-15,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=mt,mt.Complex=mt,et.exports=mt})(complex$3)),complex$3.exports}var hasRequiredComplex$3;function requireComplex$3(){if(hasRequiredComplex$3)return Complex;hasRequiredComplex$3=1;var et=requireInteropRequireDefault();Object.defineProperty(Complex,"__esModule",{value:!0}),Complex.createComplexClass=void 0;var _e=et(require_typeof()),tt=et(requireComplex$4()),rt=requireNumber$3(),nt=requireIs(),st=requireFactory(),dt="Complex",ft=[],ht=(0,st.factory)(dt,ft,function(){return tt.default.prototype.type="Complex",tt.default.prototype.isComplex=!0,tt.default.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},tt.default.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},tt.default.prototype.format=function(mt){var bt="",St=this.im,Et=this.re,Ct=(0,rt.format)(this.re,mt),Rt=(0,rt.format)(this.im,mt),Tt=(0,nt.isNumber)(mt)?mt:mt?mt.precision:null;if(Tt!==null){var wt=Math.pow(10,-Tt);Math.abs(Et/St)<wt&&(Et=0),Math.abs(St/Et)<wt&&(St=0)}return St===0?bt=Ct:Et===0?St===1?bt="i":St===-1?bt="-i":bt=Rt+"i":St<0?St===-1?bt=Ct+" - i":bt=Ct+" - "+Rt.substring(1)+"i":St===1?bt=Ct+" + i":bt=Ct+" + "+Rt+"i",bt},tt.default.fromPolar=function(mt){switch(arguments.length){case 1:{var bt=arguments[0];if((0,_e.default)(bt)==="object")return(0,tt.default)(bt);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var St=arguments[0],Et=arguments[1];if((0,nt.isNumber)(St)){if((0,nt.isUnit)(Et)&&Et.hasBase("ANGLE")&&(Et=Et.toNumber("rad")),(0,nt.isNumber)(Et))return new tt.default({r:St,phi:Et});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},tt.default.prototype.valueOf=tt.default.prototype.toString,tt.default.fromJSON=function(mt){return new tt.default(mt)},tt.default.compare=function(mt,bt){return mt.re>bt.re?1:mt.re<bt.re?-1:mt.im>bt.im?1:mt.im<bt.im?-1:0},tt.default},{isClass:!0});return Complex.createComplexClass=ht,Complex}var Fraction={},fraction$2={exports:{}};/**
* @license Fraction.js v4.3.7 31/08/2023
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
*
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/var hasRequiredFraction$3;function requireFraction$3(){return hasRequiredFraction$3||(hasRequiredFraction$3=1,(function(et,_e){(function(tt){var rt=2e3,nt={s:1,n:0,d:1};function st(At,Nt){if(isNaN(At=parseInt(At,10)))throw Tt();return At*Nt}function dt(At,Nt){if(Nt===0)throw Rt();var Pt=Object.create(Ct.prototype);Pt.s=At<0?-1:1,At=At<0?-At:At;var It=Et(At,Nt);return Pt.n=At/It,Pt.d=Nt/It,Pt}function ft(At){for(var Nt={},Pt=At,It=2,Ft=4;Ft<=Pt;){for(;Pt%It===0;)Pt/=It,Nt[It]=(Nt[It]||0)+1;Ft+=1+2*It++}return Pt!==At?Pt>1&&(Nt[Pt]=(Nt[Pt]||0)+1):Nt[At]=(Nt[At]||0)+1,Nt}var ht=function(At,Nt){var Pt=0,It=1,Ft=1,qt=0,Vt=0,Kt=0,jt=1,Ut=1,Ot=0,Wt=1,Bt=1,tr=1,Jt=1e7,ar;if(At!=null)if(Nt!==void 0){if(Pt=At,It=Nt,Ft=Pt*It,Pt%1!==0||It%1!==0)throw wt()}else switch(typeof At){case"object":{if("d"in At&&"n"in At)Pt=At.n,It=At.d,"s"in At&&(Pt*=At.s);else if(0 in At)Pt=At[0],1 in At&&(It=At[1]);else throw Tt();Ft=Pt*It;break}case"number":{if(At<0&&(Ft=At,At=-At),At%1===0)Pt=At;else if(At>0){for(At>=1&&(Ut=Math.pow(10,Math.floor(1+Math.log(At)/Math.LN10)),At/=Ut);Wt<=Jt&&tr<=Jt;)if(ar=(Ot+Bt)/(Wt+tr),At===ar){Wt+tr<=Jt?(Pt=Ot+Bt,It=Wt+tr):tr>Wt?(Pt=Bt,It=tr):(Pt=Ot,It=Wt);break}else At>ar?(Ot+=Bt,Wt+=tr):(Bt+=Ot,tr+=Wt),Wt>Jt?(Pt=Bt,It=tr):(Pt=Ot,It=Wt);Pt*=Ut}else(isNaN(At)||isNaN(Nt))&&(It=Pt=NaN);break}case"string":{if(Wt=At.match(/\d+|./g),Wt===null)throw Tt();if(Wt[Ot]==="-"?(Ft=-1,Ot++):Wt[Ot]==="+"&&Ot++,Wt.length===Ot+1?Vt=st(Wt[Ot++],Ft):Wt[Ot+1]==="."||Wt[Ot]==="."?(Wt[Ot]!=="."&&(qt=st(Wt[Ot++],Ft)),Ot++,(Ot+1===Wt.length||Wt[Ot+1]==="("&&Wt[Ot+3]===")"||Wt[Ot+1]==="'"&&Wt[Ot+3]==="'")&&(Vt=st(Wt[Ot],Ft),jt=Math.pow(10,Wt[Ot].length),Ot++),(Wt[Ot]==="("&&Wt[Ot+2]===")"||Wt[Ot]==="'"&&Wt[Ot+2]==="'")&&(Kt=st(Wt[Ot+1],Ft),Ut=Math.pow(10,Wt[Ot+1].length)-1,Ot+=3)):Wt[Ot+1]==="/"||Wt[Ot+1]===":"?(Vt=st(Wt[Ot],Ft),jt=st(Wt[Ot+2],1),Ot+=3):Wt[Ot+3]==="/"&&Wt[Ot+1]===" "&&(qt=st(Wt[Ot],Ft),Vt=st(Wt[Ot+2],Ft),jt=st(Wt[Ot+4],1),Ot+=5),Wt.length<=Ot){It=jt*Ut,Ft=Pt=Kt+It*qt+Ut*Vt;break}}default:throw Tt()}if(It===0)throw Rt();nt.s=Ft<0?-1:1,nt.n=Math.abs(Pt),nt.d=Math.abs(It)};function mt(At,Nt,Pt){for(var It=1;Nt>0;At=At*At%Pt,Nt>>=1)Nt&1&&(It=It*At%Pt);return It}function bt(At,Nt){for(;Nt%2===0;Nt/=2);for(;Nt%5===0;Nt/=5);if(Nt===1)return 0;for(var Pt=10%Nt,It=1;Pt!==1;It++)if(Pt=Pt*10%Nt,It>rt)return 0;return It}function St(At,Nt,Pt){for(var It=1,Ft=mt(10,Pt,Nt),qt=0;qt<300;qt++){if(It===Ft)return qt;It=It*10%Nt,Ft=Ft*10%Nt}return 0}function Et(At,Nt){if(!At)return Nt;if(!Nt)return At;for(;;){if(At%=Nt,!At)return Nt;if(Nt%=At,!Nt)return At}}function Ct(At,Nt){if(ht(At,Nt),this instanceof Ct)At=Et(nt.d,nt.n),this.s=nt.s,this.n=nt.n/At,this.d=nt.d/At;else return dt(nt.s*nt.n,nt.d)}var Rt=function(){return new Error("Division by Zero")},Tt=function(){return new Error("Invalid argument")},wt=function(){return new Error("Parameters must be integer")};Ct.prototype={s:1,n:0,d:1,abs:function(){return dt(this.n,this.d)},neg:function(){return dt(-this.s*this.n,this.d)},add:function(At,Nt){return ht(At,Nt),dt(this.s*this.n*nt.d+nt.s*this.d*nt.n,this.d*nt.d)},sub:function(At,Nt){return ht(At,Nt),dt(this.s*this.n*nt.d-nt.s*this.d*nt.n,this.d*nt.d)},mul:function(At,Nt){return ht(At,Nt),dt(this.s*nt.s*this.n*nt.n,this.d*nt.d)},div:function(At,Nt){return ht(At,Nt),dt(this.s*nt.s*this.n*nt.d,this.d*nt.n)},clone:function(){return dt(this.s*this.n,this.d)},mod:function(At,Nt){if(isNaN(this.n)||isNaN(this.d))return new Ct(NaN);if(At===void 0)return dt(this.s*this.n%this.d,1);if(ht(At,Nt),nt.n===0&&this.d===0)throw Rt();return dt(this.s*(nt.d*this.n)%(nt.n*this.d),nt.d*this.d)},gcd:function(At,Nt){return ht(At,Nt),dt(Et(nt.n,this.n)*Et(nt.d,this.d),nt.d*this.d)},lcm:function(At,Nt){return ht(At,Nt),nt.n===0&&this.n===0?dt(0,1):dt(nt.n*this.n,Et(nt.n,this.n)*Et(nt.d,this.d))},ceil:function(At){return At=Math.pow(10,At||0),isNaN(this.n)||isNaN(this.d)?new Ct(NaN):dt(Math.ceil(At*this.s*this.n/this.d),At)},floor:function(At){return At=Math.pow(10,At||0),isNaN(this.n)||isNaN(this.d)?new Ct(NaN):dt(Math.floor(At*this.s*this.n/this.d),At)},round:function(At){return At=Math.pow(10,At||0),isNaN(this.n)||isNaN(this.d)?new Ct(NaN):dt(Math.round(At*this.s*this.n/this.d),At)},roundTo:function(At,Nt){return ht(At,Nt),dt(this.s*Math.round(this.n*nt.d/(this.d*nt.n))*nt.n,nt.d)},inverse:function(){return dt(this.s*this.d,this.n)},pow:function(At,Nt){if(ht(At,Nt),nt.d===1)return nt.s<0?dt(Math.pow(this.s*this.d,nt.n),Math.pow(this.n,nt.n)):dt(Math.pow(this.s*this.n,nt.n),Math.pow(this.d,nt.n));if(this.s<0)return null;var Pt=ft(this.n),It=ft(this.d),Ft=1,qt=1;for(var Vt in Pt)if(Vt!=="1"){if(Vt==="0"){Ft=0;break}if(Pt[Vt]*=nt.n,Pt[Vt]%nt.d===0)Pt[Vt]/=nt.d;else return null;Ft*=Math.pow(Vt,Pt[Vt])}for(var Vt in It)if(Vt!=="1"){if(It[Vt]*=nt.n,It[Vt]%nt.d===0)It[Vt]/=nt.d;else return null;qt*=Math.pow(Vt,It[Vt])}return nt.s<0?dt(qt,Ft):dt(Ft,qt)},equals:function(At,Nt){return ht(At,Nt),this.s*this.n*nt.d===nt.s*nt.n*this.d},compare:function(At,Nt){ht(At,Nt);var Pt=this.s*this.n*nt.d-nt.s*nt.n*this.d;return(0<Pt)-(Pt<0)},simplify:function(At){if(isNaN(this.n)||isNaN(this.d))return this;At=At||.001;for(var Nt=this.abs(),Pt=Nt.toContinued(),It=1;It<Pt.length;It++){for(var Ft=dt(Pt[It-1],1),qt=It-2;qt>=0;qt--)Ft=Ft.inverse().add(Pt[qt]);if(Math.abs(Ft.sub(Nt).valueOf())<At)return Ft.mul(this.s)}return this},divisible:function(At,Nt){return ht(At,Nt),!(!(nt.n*this.d)||this.n*nt.d%(nt.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(At){var Nt,Pt="",It=this.n,Ft=this.d;return this.s<0&&(Pt+="-"),Ft===1?Pt+=It:(At&&(Nt=Math.floor(It/Ft))>0&&(Pt+=Nt,Pt+=" ",It%=Ft),Pt+=It,Pt+="/",Pt+=Ft),Pt},toLatex:function(At){var Nt,Pt="",It=this.n,Ft=this.d;return this.s<0&&(Pt+="-"),Ft===1?Pt+=It:(At&&(Nt=Math.floor(It/Ft))>0&&(Pt+=Nt,It%=Ft),Pt+="\\frac{",Pt+=It,Pt+="}{",Pt+=Ft,Pt+="}"),Pt},toContinued:function(){var At,Nt=this.n,Pt=this.d,It=[];if(isNaN(Nt)||isNaN(Pt))return It;do It.push(Math.floor(Nt/Pt)),At=Nt%Pt,Nt=Pt,Pt=At;while(Nt!==1);return It},toString:function(At){var Nt=this.n,Pt=this.d;if(isNaN(Nt)||isNaN(Pt))return"NaN";At=At||15;var It=bt(Nt,Pt),Ft=St(Nt,Pt,It),qt=this.s<0?"-":"";if(qt+=Nt/Pt|0,Nt%=Pt,Nt*=10,Nt&&(qt+="."),It){for(var Vt=Ft;Vt--;)qt+=Nt/Pt|0,Nt%=Pt,Nt*=10;qt+="(";for(var Vt=It;Vt--;)qt+=Nt/Pt|0,Nt%=Pt,Nt*=10;qt+=")"}else for(var Vt=At;Nt&&Vt--;)qt+=Nt/Pt|0,Nt%=Pt,Nt*=10;return qt}},Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=Ct,et.exports=Ct})()})(fraction$2,fraction$2.exports)),fraction$2.exports}var hasRequiredFraction$2;function requireFraction$2(){if(hasRequiredFraction$2)return Fraction;hasRequiredFraction$2=1;var et=requireInteropRequireDefault();Object.defineProperty(Fraction,"__esModule",{value:!0}),Fraction.createFractionClass=void 0;var _e=et(requireFraction$3()),tt=requireFactory(),rt="Fraction",nt=[],st=(0,tt.factory)(rt,nt,function(){return _e.default.prototype.type="Fraction",_e.default.prototype.isFraction=!0,_e.default.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},_e.default.fromJSON=function(dt){return new _e.default(dt)},_e.default},{isClass:!0});return Fraction.createFractionClass=st,Fraction}var Range={},hasRequiredRange$2;function requireRange$2(){if(hasRequiredRange$2)return Range;hasRequiredRange$2=1,Object.defineProperty(Range,"__esModule",{value:!0}),Range.createRangeClass=void 0;var et=requireIs(),_e=requireNumber$3(),tt=requireFactory(),rt="Range",nt=[],st=(0,tt.factory)(rt,nt,function(){function dt(ft,ht,mt){if(!(this instanceof dt))throw new SyntaxError("Constructor must be called with the new operator");var bt=ft!=null,St=ht!=null,Et=mt!=null;if(bt){if((0,et.isBigNumber)(ft))ft=ft.toNumber();else if(typeof ft!="number")throw new TypeError("Parameter start must be a number")}if(St){if((0,et.isBigNumber)(ht))ht=ht.toNumber();else if(typeof ht!="number")throw new TypeError("Parameter end must be a number")}if(Et){if((0,et.isBigNumber)(mt))mt=mt.toNumber();else if(typeof mt!="number")throw new TypeError("Parameter step must be a number")}this.start=bt?parseFloat(ft):0,this.end=St?parseFloat(ht):0,this.step=Et?parseFloat(mt):1}return dt.prototype.type="Range",dt.prototype.isRange=!0,dt.parse=function(ft){if(typeof ft!="string")return null;var ht=ft.split(":"),mt=ht.map(function(St){return parseFloat(St)}),bt=mt.some(function(St){return isNaN(St)});if(bt)return null;switch(mt.length){case 2:return new dt(mt[0],mt[1]);case 3:return new dt(mt[0],mt[2],mt[1]);default:return null}},dt.prototype.clone=function(){return new dt(this.start,this.end,this.step)},dt.prototype.size=function(){var ft=0,ht=this.start,mt=this.step,bt=this.end,St=bt-ht;return(0,_e.sign)(mt)===(0,_e.sign)(St)?ft=Math.ceil(St/mt):St===0&&(ft=0),isNaN(ft)&&(ft=0),[ft]},dt.prototype.min=function(){var ft=this.size()[0];if(ft>0)return this.step>0?this.start:this.start+(ft-1)*this.step},dt.prototype.max=function(){var ft=this.size()[0];if(ft>0)return this.step>0?this.start+(ft-1)*this.step:this.start},dt.prototype.forEach=function(ft){var ht=this.start,mt=this.step,bt=this.end,St=0;if(mt>0)for(;ht<bt;)ft(ht,[St],this),ht+=mt,St++;else if(mt<0)for(;ht>bt;)ft(ht,[St],this),ht+=mt,St++},dt.prototype.map=function(ft){var ht=[];return this.forEach(function(mt,bt,St){ht[bt[0]]=ft(mt,bt,St)}),ht},dt.prototype.toArray=function(){var ft=[];return this.forEach(function(ht,mt){ft[mt[0]]=ht}),ft},dt.prototype.valueOf=function(){return this.toArray()},dt.prototype.format=function(ft){var ht=(0,_e.format)(this.start,ft);return this.step!==1&&(ht+=":"+(0,_e.format)(this.step,ft)),ht+=":"+(0,_e.format)(this.end,ft),ht},dt.prototype.toString=function(){return this.format()},dt.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},dt.fromJSON=function(ft){return new dt(ft.start,ft.end,ft.step)},dt},{isClass:!0});return Range.createRangeClass=st,Range}var Matrix={},hasRequiredMatrix$2;function requireMatrix$2(){if(hasRequiredMatrix$2)return Matrix;hasRequiredMatrix$2=1,Object.defineProperty(Matrix,"__esModule",{value:!0}),Matrix.createMatrixClass=void 0;var et=requireFactory(),_e="Matrix",tt=[],rt=(0,et.factory)(_e,tt,function(){function nt(){if(!(this instanceof nt))throw new SyntaxError("Constructor must be called with the new operator")}return nt.prototype.type="Matrix",nt.prototype.isMatrix=!0,nt.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},nt.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},nt.prototype.create=function(st,dt){throw new Error("Cannot invoke create on a Matrix interface")},nt.prototype.subset=function(st,dt,ft){throw new Error("Cannot invoke subset on a Matrix interface")},nt.prototype.get=function(st){throw new Error("Cannot invoke get on a Matrix interface")},nt.prototype.set=function(st,dt,ft){throw new Error("Cannot invoke set on a Matrix interface")},nt.prototype.resize=function(st,dt){throw new Error("Cannot invoke resize on a Matrix interface")},nt.prototype.reshape=function(st,dt){throw new Error("Cannot invoke reshape on a Matrix interface")},nt.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},nt.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},nt.prototype.map=function(st,dt){throw new Error("Cannot invoke map on a Matrix interface")},nt.prototype.forEach=function(st){throw new Error("Cannot invoke forEach on a Matrix interface")},nt.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},nt.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},nt.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},nt.prototype.format=function(st){throw new Error("Cannot invoke format on a Matrix interface")},nt.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},nt},{isClass:!0});return Matrix.createMatrixClass=rt,Matrix}var DenseMatrix={},regeneratorRuntime$1={exports:{}},OverloadYield={exports:{}},hasRequiredOverloadYield;function requireOverloadYield(){return hasRequiredOverloadYield||(hasRequiredOverloadYield=1,(function(et){function _e(tt,rt){this.v=tt,this.k=rt}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(OverloadYield)),OverloadYield.exports}var regenerator$1={exports:{}},regeneratorDefine={exports:{}},hasRequiredRegeneratorDefine;function requireRegeneratorDefine(){return hasRequiredRegeneratorDefine||(hasRequiredRegeneratorDefine=1,(function(et){function _e(tt,rt,nt,st){var dt=Object.defineProperty;try{dt({},"",{})}catch{dt=0}et.exports=_e=function(ht,mt,bt,St){function Et(Ct,Rt){_e(ht,Ct,function(Tt){return this._invoke(Ct,Rt,Tt)})}mt?dt?dt(ht,mt,{value:bt,enumerable:!St,configurable:!St,writable:!St}):ht[mt]=bt:(Et("next",0),Et("throw",1),Et("return",2))},et.exports.__esModule=!0,et.exports.default=et.exports,_e(tt,rt,nt,st)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorDefine)),regeneratorDefine.exports}var hasRequiredRegenerator$1;function requireRegenerator$1(){return hasRequiredRegenerator$1||(hasRequiredRegenerator$1=1,(function(et){var _e=requireRegeneratorDefine();function tt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var rt,nt,st=typeof Symbol=="function"?Symbol:{},dt=st.iterator||"@@iterator",ft=st.toStringTag||"@@toStringTag";function ht(wt,At,Nt,Pt){var It=At&&At.prototype instanceof bt?At:bt,Ft=Object.create(It.prototype);return _e(Ft,"_invoke",(function(qt,Vt,Kt){var jt,Ut,Ot,Wt=0,Bt=Kt||[],tr=!1,Jt={p:0,n:0,v:rt,a:ar,f:ar.bind(rt,4),d:function(cr,gr){return jt=cr,Ut=0,Ot=rt,Jt.n=gr,mt}};function ar(pr,cr){for(Ut=pr,Ot=cr,nt=0;!tr&&Wt&&!gr&&nt<Bt.length;nt++){var gr,Sr=Bt[nt],Er=Jt.p,Vr=Sr[2];pr>3?(gr=Vr===cr)&&(Ot=Sr[(Ut=Sr[4])?5:(Ut=3,3)],Sr[4]=Sr[5]=rt):Sr[0]<=Er&&((gr=pr<2&&Er<Sr[1])?(Ut=0,Jt.v=cr,Jt.n=Sr[1]):Er<Vr&&(gr=pr<3||Sr[0]>cr||cr>Vr)&&(Sr[4]=pr,Sr[5]=cr,Jt.n=Vr,Ut=0))}if(gr||pr>1)return mt;throw tr=!0,cr}return function(pr,cr,gr){if(Wt>1)throw TypeError("Generator is already running");for(tr&&cr===1&&ar(cr,gr),Ut=cr,Ot=gr;(nt=Ut<2?rt:Ot)||!tr;){jt||(Ut?Ut<3?(Ut>1&&(Jt.n=-1),ar(Ut,Ot)):Jt.n=Ot:Jt.v=Ot);try{if(Wt=2,jt){if(Ut||(pr="next"),nt=jt[pr]){if(!(nt=nt.call(jt,Ot)))throw TypeError("iterator result is not an object");if(!nt.done)return nt;Ot=nt.value,Ut<2&&(Ut=0)}else Ut===1&&(nt=jt.return)&&nt.call(jt),Ut<2&&(Ot=TypeError("The iterator does not provide a '"+pr+"' method"),Ut=1);jt=rt}else if((nt=(tr=Jt.n<0)?Ot:qt.call(Vt,Jt))!==mt)break}catch(Sr){jt=rt,Ut=1,Ot=Sr}finally{Wt=1}}return{value:nt,done:tr}}})(wt,Nt,Pt),!0),Ft}var mt={};function bt(){}function St(){}function Et(){}nt=Object.getPrototypeOf;var Ct=[][dt]?nt(nt([][dt]())):(_e(nt={},dt,function(){return this}),nt),Rt=Et.prototype=bt.prototype=Object.create(Ct);function Tt(wt){return Object.setPrototypeOf?Object.setPrototypeOf(wt,Et):(wt.__proto__=Et,_e(wt,ft,"GeneratorFunction")),wt.prototype=Object.create(Rt),wt}return St.prototype=Et,_e(Rt,"constructor",Et),_e(Et,"constructor",St),St.displayName="GeneratorFunction",_e(Et,ft,"GeneratorFunction"),_e(Rt),_e(Rt,ft,"Generator"),_e(Rt,dt,function(){return this}),_e(Rt,"toString",function(){return"[object Generator]"}),(et.exports=tt=function(){return{w:ht,m:Tt}},et.exports.__esModule=!0,et.exports.default=et.exports)()}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(regenerator$1)),regenerator$1.exports}var regeneratorAsync={exports:{}},regeneratorAsyncGen={exports:{}},regeneratorAsyncIterator={exports:{}},hasRequiredRegeneratorAsyncIterator;function requireRegeneratorAsyncIterator(){return hasRequiredRegeneratorAsyncIterator||(hasRequiredRegeneratorAsyncIterator=1,(function(et){var _e=requireOverloadYield(),tt=requireRegeneratorDefine();function rt(nt,st){function dt(ht,mt,bt,St){try{var Et=nt[ht](mt),Ct=Et.value;return Ct instanceof _e?st.resolve(Ct.v).then(function(Rt){dt("next",Rt,bt,St)},function(Rt){dt("throw",Rt,bt,St)}):st.resolve(Ct).then(function(Rt){Et.value=Rt,bt(Et)},function(Rt){return dt("throw",Rt,bt,St)})}catch(Rt){St(Rt)}}var ft;this.next||(tt(rt.prototype),tt(rt.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),tt(this,"_invoke",function(ht,mt,bt){function St(){return new st(function(Et,Ct){dt(ht,bt,Et,Ct)})}return ft=ft?ft.then(St,St):St()},!0)}et.exports=rt,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorAsyncIterator)),regeneratorAsyncIterator.exports}var hasRequiredRegeneratorAsyncGen;function requireRegeneratorAsyncGen(){return hasRequiredRegeneratorAsyncGen||(hasRequiredRegeneratorAsyncGen=1,(function(et){var _e=requireRegenerator$1(),tt=requireRegeneratorAsyncIterator();function rt(nt,st,dt,ft,ht){return new tt(_e().w(nt,st,dt,ft),ht||Promise)}et.exports=rt,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorAsyncGen)),regeneratorAsyncGen.exports}var hasRequiredRegeneratorAsync;function requireRegeneratorAsync(){return hasRequiredRegeneratorAsync||(hasRequiredRegeneratorAsync=1,(function(et){var _e=requireRegeneratorAsyncGen();function tt(rt,nt,st,dt,ft){var ht=_e(rt,nt,st,dt,ft);return ht.next().then(function(mt){return mt.done?mt.value:ht.next()})}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorAsync)),regeneratorAsync.exports}var regeneratorKeys={exports:{}},hasRequiredRegeneratorKeys;function requireRegeneratorKeys(){return hasRequiredRegeneratorKeys||(hasRequiredRegeneratorKeys=1,(function(et){function _e(tt){var rt=Object(tt),nt=[];for(var st in rt)nt.unshift(st);return function dt(){for(;nt.length;)if((st=nt.pop())in rt)return dt.value=st,dt.done=!1,dt;return dt.done=!0,dt}}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorKeys)),regeneratorKeys.exports}var regeneratorValues={exports:{}},hasRequiredRegeneratorValues;function requireRegeneratorValues(){return hasRequiredRegeneratorValues||(hasRequiredRegeneratorValues=1,(function(et){var _e=require_typeof().default;function tt(rt){if(rt!=null){var nt=rt[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],st=0;if(nt)return nt.call(rt);if(typeof rt.next=="function")return rt;if(!isNaN(rt.length))return{next:function(){return rt&&st>=rt.length&&(rt=void 0),{value:rt&&rt[st++],done:!rt}}}}throw new TypeError(_e(rt)+" is not iterable")}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorValues)),regeneratorValues.exports}var hasRequiredRegeneratorRuntime;function requireRegeneratorRuntime(){return hasRequiredRegeneratorRuntime||(hasRequiredRegeneratorRuntime=1,(function(et){var _e=requireOverloadYield(),tt=requireRegenerator$1(),rt=requireRegeneratorAsync(),nt=requireRegeneratorAsyncGen(),st=requireRegeneratorAsyncIterator(),dt=requireRegeneratorKeys(),ft=requireRegeneratorValues();function ht(){var mt=tt(),bt=mt.m(ht),St=(Object.getPrototypeOf?Object.getPrototypeOf(bt):bt.__proto__).constructor;function Et(Tt){var wt=typeof Tt=="function"&&Tt.constructor;return!!wt&&(wt===St||(wt.displayName||wt.name)==="GeneratorFunction")}var Ct={throw:1,return:2,break:3,continue:3};function Rt(Tt){var wt,At;return function(Nt){wt||(wt={stop:function(){return At(Nt.a,2)},catch:function(){return Nt.v},abrupt:function(It,Ft){return At(Nt.a,Ct[It],Ft)},delegateYield:function(It,Ft,qt){return wt.resultName=Ft,At(Nt.d,ft(It),qt)},finish:function(It){return At(Nt.f,It)}},At=function(It,Ft,qt){Nt.p=wt.prev,Nt.n=wt.next;try{return It(Ft,qt)}finally{wt.next=Nt.n}}),wt.resultName&&(wt[wt.resultName]=Nt.v,wt.resultName=void 0),wt.sent=Nt.v,wt.next=Nt.n;try{return Tt.call(this,wt)}finally{Nt.p=wt.prev,Nt.n=wt.next}}}return(et.exports=ht=function(){return{wrap:function(At,Nt,Pt,It){return mt.w(Rt(At),Nt,Pt,It&&It.reverse())},isGeneratorFunction:Et,mark:mt.m,awrap:function(At,Nt){return new _e(At,Nt)},AsyncIterator:st,async:function(At,Nt,Pt,It,Ft){return(Et(Nt)?nt:rt)(Rt(At),Nt,Pt,It,Ft)},keys:dt,values:ft}},et.exports.__esModule=!0,et.exports.default=et.exports)()}et.exports=ht,et.exports.__esModule=!0,et.exports.default=et.exports})(regeneratorRuntime$1)),regeneratorRuntime$1.exports}var regenerator,hasRequiredRegenerator;function requireRegenerator(){if(hasRequiredRegenerator)return regenerator;hasRequiredRegenerator=1;var et=requireRegeneratorRuntime()();regenerator=et;try{regeneratorRuntime=et}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=et:Function("r","regeneratorRuntime = r")(et)}return regenerator}var hasRequiredDenseMatrix;function requireDenseMatrix(){if(hasRequiredDenseMatrix)return DenseMatrix;hasRequiredDenseMatrix=1;var et=requireInteropRequireDefault();Object.defineProperty(DenseMatrix,"__esModule",{value:!0}),DenseMatrix.createDenseMatrixClass=void 0;var _e=et(requireRegenerator()),tt=requireIs(),rt=requireArray(),nt=requireString$2(),st=requireNumber$3(),dt=requireObject(),ft=requireDimensionError(),ht=requireFactory();function mt(Tt,wt){var At=typeof Symbol<"u"&&Tt[Symbol.iterator]||Tt["@@iterator"];if(!At){if(Array.isArray(Tt)||(At=bt(Tt))||wt){At&&(Tt=At);var Nt=0,Pt=function(){};return{s:Pt,n:function(){return Nt>=Tt.length?{done:!0}:{done:!1,value:Tt[Nt++]}},e:function(Kt){throw Kt},f:Pt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var It=!0,Ft=!1,qt;return{s:function(){At=At.call(Tt)},n:function(){var Kt=At.next();return It=Kt.done,Kt},e:function(Kt){Ft=!0,qt=Kt},f:function(){try{!It&&At.return!=null&&At.return()}finally{if(Ft)throw qt}}}}function bt(Tt,wt){if(Tt){if(typeof Tt=="string")return St(Tt,wt);var At=Object.prototype.toString.call(Tt).slice(8,-1);if(At==="Object"&&Tt.constructor&&(At=Tt.constructor.name),At==="Map"||At==="Set")return Array.from(Tt);if(At==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(At))return St(Tt,wt)}}function St(Tt,wt){(wt==null||wt>Tt.length)&&(wt=Tt.length);for(var At=0,Nt=new Array(wt);At<wt;At++)Nt[At]=Tt[At];return Nt}var Et="DenseMatrix",Ct=["Matrix"],Rt=(0,ht.factory)(Et,Ct,function(Tt){var wt=Tt.Matrix;function At(jt,Ut){if(!(this instanceof At))throw new SyntaxError("Constructor must be called with the new operator");if(Ut&&!(0,tt.isString)(Ut))throw new Error("Invalid datatype: "+Ut);if((0,tt.isMatrix)(jt))jt.type==="DenseMatrix"?(this._data=(0,dt.clone)(jt._data),this._size=(0,dt.clone)(jt._size),this._datatype=Ut||jt._datatype):(this._data=jt.toArray(),this._size=jt.size(),this._datatype=Ut||jt._datatype);else if(jt&&(0,tt.isArray)(jt.data)&&(0,tt.isArray)(jt.size))this._data=jt.data,this._size=jt.size,(0,rt.validate)(this._data,this._size),this._datatype=Ut||jt.datatype;else if((0,tt.isArray)(jt))this._data=Kt(jt),this._size=(0,rt.arraySize)(this._data),(0,rt.validate)(this._data,this._size),this._datatype=Ut;else{if(jt)throw new TypeError("Unsupported type of data ("+(0,tt.typeOf)(jt)+")");this._data=[],this._size=[0],this._datatype=Ut}}At.prototype=new wt,At.prototype.createDenseMatrix=function(jt,Ut){return new At(jt,Ut)},At.prototype.type="DenseMatrix",At.prototype.isDenseMatrix=!0,At.prototype.getDataType=function(){return(0,rt.getArrayDataType)(this._data,tt.typeOf)},At.prototype.storage=function(){return"dense"},At.prototype.datatype=function(){return this._datatype},At.prototype.create=function(jt,Ut){return new At(jt,Ut)},At.prototype.subset=function(jt,Ut,Ot){switch(arguments.length){case 1:return Nt(this,jt);case 2:case 3:return It(this,jt,Ut,Ot);default:throw new SyntaxError("Wrong number of arguments")}},At.prototype.get=function(jt){if(!(0,tt.isArray)(jt))throw new TypeError("Array expected");if(jt.length!==this._size.length)throw new ft.DimensionError(jt.length,this._size.length);for(var Ut=0;Ut<jt.length;Ut++)(0,rt.validateIndex)(jt[Ut],this._size[Ut]);for(var Ot=this._data,Wt=0,Bt=jt.length;Wt<Bt;Wt++){var tr=jt[Wt];(0,rt.validateIndex)(tr,Ot.length),Ot=Ot[tr]}return Ot},At.prototype.set=function(jt,Ut,Ot){if(!(0,tt.isArray)(jt))throw new TypeError("Array expected");if(jt.length<this._size.length)throw new ft.DimensionError(jt.length,this._size.length,"<");var Wt,Bt,tr,Jt=jt.map(function(pr){return pr+1});Vt(this,Jt,Ot);var ar=this._data;for(Wt=0,Bt=jt.length-1;Wt<Bt;Wt++)tr=jt[Wt],(0,rt.validateIndex)(tr,ar.length),ar=ar[tr];return tr=jt[jt.length-1],(0,rt.validateIndex)(tr,ar.length),ar[tr]=Ut,this};function Nt(jt,Ut){if(!(0,tt.isIndex)(Ut))throw new TypeError("Invalid index");var Ot=Ut.isScalar();if(Ot)return jt.get(Ut.min());var Wt=Ut.size();if(Wt.length!==jt._size.length)throw new ft.DimensionError(Wt.length,jt._size.length);for(var Bt=Ut.min(),tr=Ut.max(),Jt=0,ar=jt._size.length;Jt<ar;Jt++)(0,rt.validateIndex)(Bt[Jt],jt._size[Jt]),(0,rt.validateIndex)(tr[Jt],jt._size[Jt]);return new At(Pt(jt._data,Ut,Wt.length,0),jt._datatype)}function Pt(jt,Ut,Ot,Wt){var Bt=Wt===Ot-1,tr=Ut.dimension(Wt);return Bt?tr.map(function(Jt){return(0,rt.validateIndex)(Jt,jt.length),jt[Jt]}).valueOf():tr.map(function(Jt){(0,rt.validateIndex)(Jt,jt.length);var ar=jt[Jt];return Pt(ar,Ut,Ot,Wt+1)}).valueOf()}function It(jt,Ut,Ot,Wt){if(!Ut||Ut.isIndex!==!0)throw new TypeError("Invalid index");var Bt=Ut.size(),tr=Ut.isScalar(),Jt;if((0,tt.isMatrix)(Ot)?(Jt=Ot.size(),Ot=Ot.valueOf()):Jt=(0,rt.arraySize)(Ot),tr){if(Jt.length!==0)throw new TypeError("Scalar expected");jt.set(Ut.min(),Ot,Wt)}else{if(Bt.length<jt._size.length)throw new ft.DimensionError(Bt.length,jt._size.length,"<");if(Jt.length<Bt.length){for(var ar=0,pr=0;Bt[ar]===1&&Jt[ar]===1;)ar++;for(;Bt[ar]===1;)pr++,ar++;Ot=(0,rt.unsqueeze)(Ot,Bt.length,pr,Jt)}if(!(0,dt.deepStrictEqual)(Bt,Jt))throw new ft.DimensionError(Bt,Jt,">");var cr=Ut.max().map(function(Er){return Er+1});Vt(jt,cr,Wt);var gr=Bt.length,Sr=0;Ft(jt._data,Ut,Ot,gr,Sr)}return jt}function Ft(jt,Ut,Ot,Wt,Bt){var tr=Bt===Wt-1,Jt=Ut.dimension(Bt);tr?Jt.forEach(function(ar,pr){(0,rt.validateIndex)(ar),jt[ar]=Ot[pr[0]]}):Jt.forEach(function(ar,pr){(0,rt.validateIndex)(ar),Ft(jt[ar],Ut,Ot[pr[0]],Wt,Bt+1)})}At.prototype.resize=function(jt,Ut,Ot){if(!(0,tt.isCollection)(jt))throw new TypeError("Array or Matrix expected");var Wt=jt.valueOf().map(function(tr){return Array.isArray(tr)&&tr.length===1?tr[0]:tr}),Bt=Ot?this.clone():this;return qt(Bt,Wt,Ut)};function qt(jt,Ut,Ot){if(Ut.length===0){for(var Wt=jt._data;(0,tt.isArray)(Wt);)Wt=Wt[0];return Wt}return jt._size=Ut.slice(0),jt._data=(0,rt.resize)(jt._data,jt._size,Ot),jt}At.prototype.reshape=function(jt,Ut){var Ot=Ut?this.clone():this;Ot._data=(0,rt.reshape)(Ot._data,jt);var Wt=Ot._size.reduce(function(Bt,tr){return Bt*tr});return Ot._size=(0,rt.processSizesWildcard)(jt,Wt),Ot};function Vt(jt,Ut,Ot){for(var Wt=jt._size.slice(0),Bt=!1;Wt.length<Ut.length;)Wt.push(0),Bt=!0;for(var tr=0,Jt=Ut.length;tr<Jt;tr++)Ut[tr]>Wt[tr]&&(Wt[tr]=Ut[tr],Bt=!0);Bt&&qt(jt,Wt,Ot)}At.prototype.clone=function(){var jt=new At({data:(0,dt.clone)(this._data),size:(0,dt.clone)(this._size),datatype:this._datatype});return jt},At.prototype.size=function(){return this._size.slice(0)},At.prototype.map=function(jt){var Ut=this,Ot=function tr(Jt,ar){return(0,tt.isArray)(Jt)?Jt.map(function(pr,cr){return tr(pr,ar.concat(cr))}):jt(Jt,ar,Ut)},Wt=Ot(this._data,[]),Bt=this._datatype!==void 0?(0,rt.getArrayDataType)(Wt,tt.typeOf):void 0;return new At(Wt,Bt)},At.prototype.forEach=function(jt){var Ut=this,Ot=function Wt(Bt,tr){(0,tt.isArray)(Bt)?Bt.forEach(function(Jt,ar){Wt(Jt,tr.concat(ar))}):jt(Bt,tr,Ut)};Ot(this._data,[])},At.prototype[Symbol.iterator]=_e.default.mark(function jt(){var Ut;return _e.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Ut=_e.default.mark(function Bt(tr,Jt){var ar;return _e.default.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:if(!(0,tt.isArray)(tr)){cr.next=9;break}ar=0;case 2:if(!(ar<tr.length)){cr.next=7;break}return cr.delegateYield(Bt(tr[ar],Jt.concat(ar)),"t0",4);case 4:ar++,cr.next=2;break;case 7:cr.next=11;break;case 9:return cr.next=11,{value:tr,index:Jt};case 11:case"end":return cr.stop()}},Bt)}),Wt.delegateYield(Ut(this._data,[]),"t0",2);case 2:case"end":return Wt.stop()}},jt,this)}),At.prototype.rows=function(){var jt=[],Ut=this.size();if(Ut.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var Ot=this._data,Wt=mt(Ot),Bt;try{for(Wt.s();!(Bt=Wt.n()).done;){var tr=Bt.value;jt.push(new At([tr],this._datatype))}}catch(Jt){Wt.e(Jt)}finally{Wt.f()}return jt},At.prototype.columns=function(){var jt=this,Ut=[],Ot=this.size();if(Ot.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var Wt=this._data,Bt=function(ar){var pr=Wt.map(function(cr){return[cr[ar]]});Ut.push(new At(pr,jt._datatype))},tr=0;tr<Ot[1];tr++)Bt(tr);return Ut},At.prototype.toArray=function(){return(0,dt.clone)(this._data)},At.prototype.valueOf=function(){return this._data},At.prototype.format=function(jt){return(0,nt.format)(this._data,jt)},At.prototype.toString=function(){return(0,nt.format)(this._data)},At.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},At.prototype.diagonal=function(jt){if(jt){if((0,tt.isBigNumber)(jt)&&(jt=jt.toNumber()),!(0,tt.isNumber)(jt)||!(0,st.isInteger)(jt))throw new TypeError("The parameter k must be an integer number")}else jt=0;for(var Ut=jt>0?jt:0,Ot=jt<0?-jt:0,Wt=this._size[0],Bt=this._size[1],tr=Math.min(Wt-Ot,Bt-Ut),Jt=[],ar=0;ar<tr;ar++)Jt[ar]=this._data[ar+Ot][ar+Ut];return new At({data:Jt,size:[tr],datatype:this._datatype})},At.diagonal=function(jt,Ut,Ot,Wt){if(!(0,tt.isArray)(jt))throw new TypeError("Array expected, size parameter");if(jt.length!==2)throw new Error("Only two dimensions matrix are supported");if(jt=jt.map(function(Vr){if((0,tt.isBigNumber)(Vr)&&(Vr=Vr.toNumber()),!(0,tt.isNumber)(Vr)||!(0,st.isInteger)(Vr)||Vr<1)throw new Error("Size values must be positive integers");return Vr}),Ot){if((0,tt.isBigNumber)(Ot)&&(Ot=Ot.toNumber()),!(0,tt.isNumber)(Ot)||!(0,st.isInteger)(Ot))throw new TypeError("The parameter k must be an integer number")}else Ot=0;var Bt=Ot>0?Ot:0,tr=Ot<0?-Ot:0,Jt=jt[0],ar=jt[1],pr=Math.min(Jt-tr,ar-Bt),cr;if((0,tt.isArray)(Ut)){if(Ut.length!==pr)throw new Error("Invalid value array length");cr=function(Wr){return Ut[Wr]}}else if((0,tt.isMatrix)(Ut)){var gr=Ut.size();if(gr.length!==1||gr[0]!==pr)throw new Error("Invalid matrix length");cr=function(Wr){return Ut.get([Wr])}}else cr=function(){return Ut};Wt||(Wt=(0,tt.isBigNumber)(cr(0))?cr(0).mul(0):0);var Sr=[];if(jt.length>0){Sr=(0,rt.resize)(Sr,jt,Wt);for(var Er=0;Er<pr;Er++)Sr[Er+tr][Er+Bt]=cr(Er)}return new At({data:Sr,size:[Jt,ar]})},At.fromJSON=function(jt){return new At(jt)},At.prototype.swapRows=function(jt,Ut){if(!(0,tt.isNumber)(jt)||!(0,st.isInteger)(jt)||!(0,tt.isNumber)(Ut)||!(0,st.isInteger)(Ut))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return(0,rt.validateIndex)(jt,this._size[0]),(0,rt.validateIndex)(Ut,this._size[0]),At._swapRows(jt,Ut,this._data),this},At._swapRows=function(jt,Ut,Ot){var Wt=Ot[jt];Ot[jt]=Ot[Ut],Ot[Ut]=Wt};function Kt(jt){for(var Ut=0,Ot=jt.length;Ut<Ot;Ut++){var Wt=jt[Ut];(0,tt.isArray)(Wt)?jt[Ut]=Kt(Wt):Wt&&Wt.isMatrix===!0&&(jt[Ut]=Kt(Wt.valueOf()))}return jt}return At},{isClass:!0});return DenseMatrix.createDenseMatrixClass=Rt,DenseMatrix}var clone$1={},hasRequiredClone$1;function requireClone$1(){if(hasRequiredClone$1)return clone$1;hasRequiredClone$1=1,Object.defineProperty(clone$1,"__esModule",{value:!0}),clone$1.createClone=void 0;var et=requireObject(),_e=requireFactory(),tt="clone",rt=["typed"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{any:et.clone})});return clone$1.createClone=nt,clone$1}var isInteger$1={},collection={},_switch={},hasRequired_switch;function require_switch(){if(hasRequired_switch)return _switch;hasRequired_switch=1,Object.defineProperty(_switch,"__esModule",{value:!0}),_switch._switch=et;function et(_e){var tt=_e.length,rt=_e[0].length,nt,st,dt=[];for(st=0;st<rt;st++){var ft=[];for(nt=0;nt<tt;nt++)ft.push(_e[nt][st]);dt.push(ft)}return dt}return _switch}var hasRequiredCollection;function requireCollection(){if(hasRequiredCollection)return collection;hasRequiredCollection=1,Object.defineProperty(collection,"__esModule",{value:!0}),collection.containsCollections=nt,collection.deepForEach=st,collection.deepMap=dt,collection.reduce=ft,collection.scatter=mt;var et=requireIs(),_e=requireIndexError(),tt=requireArray(),rt=require_switch();function nt(bt){for(var St=0;St<bt.length;St++)if((0,et.isCollection)(bt[St]))return!0;return!1}function st(bt,St){(0,et.isMatrix)(bt)&&(bt=bt.valueOf());for(var Et=0,Ct=bt.length;Et<Ct;Et++){var Rt=bt[Et];Array.isArray(Rt)?st(Rt,St):St(Rt)}}function dt(bt,St,Et){return bt&&typeof bt.map=="function"?bt.map(function(Ct){return dt(Ct,St)}):St(bt)}function ft(bt,St,Et){var Ct=Array.isArray(bt)?(0,tt.arraySize)(bt):bt.size();if(St<0||St>=Ct.length)throw new _e.IndexError(St,Ct.length);return(0,et.isMatrix)(bt)?bt.create(ht(bt.valueOf(),St,Et)):ht(bt,St,Et)}function ht(bt,St,Et){var Ct,Rt,Tt,wt;if(St<=0)if(Array.isArray(bt[0])){for(wt=(0,rt._switch)(bt),Rt=[],Ct=0;Ct<wt.length;Ct++)Rt[Ct]=ht(wt[Ct],St-1,Et);return Rt}else{for(Tt=bt[0],Ct=1;Ct<bt.length;Ct++)Tt=Et(Tt,bt[Ct]);return Tt}else{for(Rt=[],Ct=0;Ct<bt.length;Ct++)Rt[Ct]=ht(bt[Ct],St-1,Et);return Rt}}function mt(bt,St,Et,Ct,Rt,Tt,wt,At,Nt,Pt,It){var Ft=bt._values,qt=bt._index,Vt=bt._ptr,Kt,jt,Ut,Ot;if(Ct)for(jt=Vt[St],Ut=Vt[St+1],Kt=jt;Kt<Ut;Kt++)Ot=qt[Kt],Et[Ot]!==Tt?(Et[Ot]=Tt,wt.push(Ot),Pt?(Ct[Ot]=Nt?At(Ft[Kt],It):At(It,Ft[Kt]),Rt[Ot]=Tt):Ct[Ot]=Ft[Kt]):(Ct[Ot]=Nt?At(Ft[Kt],Ct[Ot]):At(Ct[Ot],Ft[Kt]),Rt[Ot]=Tt);else for(jt=Vt[St],Ut=Vt[St+1],Kt=jt;Kt<Ut;Kt++)Ot=qt[Kt],Et[Ot]!==Tt?(Et[Ot]=Tt,wt.push(Ot)):Rt[Ot]=Tt}return collection}var hasRequiredIsInteger$1;function requireIsInteger$1(){if(hasRequiredIsInteger$1)return isInteger$1;hasRequiredIsInteger$1=1,Object.defineProperty(isInteger$1,"__esModule",{value:!0}),isInteger$1.createIsInteger=void 0;var et=requireCollection(),_e=requireNumber$3(),tt=requireFactory(),rt="isInteger",nt=["typed"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:_e.isInteger,BigNumber:function(mt){return mt.isInt()},Fraction:function(mt){return mt.d===1&&isFinite(mt.n)},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return isInteger$1.createIsInteger=st,isInteger$1}var isNegative$1={},number$3={},arithmetic={},hasRequiredArithmetic;function requireArithmetic(){if(hasRequiredArithmetic)return arithmetic;hasRequiredArithmetic=1,Object.defineProperty(arithmetic,"__esModule",{value:!0}),arithmetic.absNumber=rt,arithmetic.addNumber=nt,arithmetic.cbrtNumber=bt,arithmetic.cubeNumber=St,arithmetic.divideNumber=ft,arithmetic.expNumber=Et,arithmetic.expm1Number=Ct,arithmetic.gcdNumber=Rt,arithmetic.lcmNumber=Tt,arithmetic.log10Number=At,arithmetic.log1pNumber=Pt,arithmetic.log2Number=Nt,arithmetic.logNumber=wt,arithmetic.modNumber=It,arithmetic.multiplyNumber=dt,arithmetic.normNumber=Wt,arithmetic.nthRootNumber=Ft,arithmetic.powNumber=Ut,arithmetic.roundNumber=Ot,arithmetic.signNumber=qt,arithmetic.sqrtNumber=Vt,arithmetic.squareNumber=Kt,arithmetic.subtractNumber=st,arithmetic.unaryMinusNumber=ht,arithmetic.unaryPlusNumber=mt,arithmetic.xgcdNumber=jt;var et=requireNumber$3(),_e="number",tt="number, number";function rt(Bt){return Math.abs(Bt)}rt.signature=_e;function nt(Bt,tr){return Bt+tr}nt.signature=tt;function st(Bt,tr){return Bt-tr}st.signature=tt;function dt(Bt,tr){return Bt*tr}dt.signature=tt;function ft(Bt,tr){return Bt/tr}ft.signature=tt;function ht(Bt){return-Bt}ht.signature=_e;function mt(Bt){return Bt}mt.signature=_e;function bt(Bt){return(0,et.cbrt)(Bt)}bt.signature=_e;function St(Bt){return Bt*Bt*Bt}St.signature=_e;function Et(Bt){return Math.exp(Bt)}Et.signature=_e;function Ct(Bt){return(0,et.expm1)(Bt)}Ct.signature=_e;function Rt(Bt,tr){if(!(0,et.isInteger)(Bt)||!(0,et.isInteger)(tr))throw new Error("Parameters in function gcd must be integer numbers");for(var Jt;tr!==0;)Jt=Bt%tr,Bt=tr,tr=Jt;return Bt<0?-Bt:Bt}Rt.signature=tt;function Tt(Bt,tr){if(!(0,et.isInteger)(Bt)||!(0,et.isInteger)(tr))throw new Error("Parameters in function lcm must be integer numbers");if(Bt===0||tr===0)return 0;for(var Jt,ar=Bt*tr;tr!==0;)Jt=tr,tr=Bt%Jt,Bt=Jt;return Math.abs(ar/Bt)}Tt.signature=tt;function wt(Bt,tr){return tr?Math.log(Bt)/Math.log(tr):Math.log(Bt)}function At(Bt){return(0,et.log10)(Bt)}At.signature=_e;function Nt(Bt){return(0,et.log2)(Bt)}Nt.signature=_e;function Pt(Bt){return(0,et.log1p)(Bt)}Pt.signature=_e;function It(Bt,tr){if(tr>0)return Bt-tr*Math.floor(Bt/tr);if(tr===0)return Bt;throw new Error("Cannot calculate mod for a negative divisor")}It.signature=tt;function Ft(Bt){var tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,Jt=tr<0;if(Jt&&(tr=-tr),tr===0)throw new Error("Root must be non-zero");if(Bt<0&&Math.abs(tr)%2!==1)throw new Error("Root must be odd when a is negative.");if(Bt===0)return Jt?1/0:0;if(!isFinite(Bt))return Jt?0:Bt;var ar=Math.pow(Math.abs(Bt),1/tr);return ar=Bt<0?-ar:ar,Jt?1/ar:ar}function qt(Bt){return(0,et.sign)(Bt)}qt.signature=_e;function Vt(Bt){return Math.sqrt(Bt)}Vt.signature=_e;function Kt(Bt){return Bt*Bt}Kt.signature=_e;function jt(Bt,tr){var Jt,ar,pr,cr=0,gr=1,Sr=1,Er=0;if(!(0,et.isInteger)(Bt)||!(0,et.isInteger)(tr))throw new Error("Parameters in function xgcd must be integer numbers");for(;tr;)ar=Math.floor(Bt/tr),pr=Bt-ar*tr,Jt=cr,cr=gr-ar*cr,gr=Jt,Jt=Sr,Sr=Er-ar*Sr,Er=Jt,Bt=tr,tr=pr;var Vr;return Bt<0?Vr=[-Bt,-gr,-Er]:Vr=[Bt,Bt?gr:0,Er],Vr}jt.signature=tt;function Ut(Bt,tr){return Bt*Bt<1&&tr===1/0||Bt*Bt>1&&tr===-1/0?0:Math.pow(Bt,tr)}Ut.signature=tt;function Ot(Bt){var tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!(0,et.isInteger)(tr)||tr<0||tr>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat((0,et.toFixed)(Bt,tr))}function Wt(Bt){return Math.abs(Bt)}return Wt.signature=_e,arithmetic}var bitwise$1={},hasRequiredBitwise$1;function requireBitwise$1(){if(hasRequiredBitwise$1)return bitwise$1;hasRequiredBitwise$1=1,Object.defineProperty(bitwise$1,"__esModule",{value:!0}),bitwise$1.bitAndNumber=rt,bitwise$1.bitNotNumber=nt,bitwise$1.bitOrNumber=st,bitwise$1.bitXorNumber=dt,bitwise$1.leftShiftNumber=ft,bitwise$1.rightArithShiftNumber=ht,bitwise$1.rightLogShiftNumber=mt;var et=requireNumber$3(),_e="number",tt="number, number";function rt(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function bitAnd");return bt&St}rt.signature=tt;function nt(bt){if(!(0,et.isInteger)(bt))throw new Error("Integer expected in function bitNot");return~bt}nt.signature=_e;function st(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function bitOr");return bt|St}st.signature=tt;function dt(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function bitXor");return bt^St}dt.signature=tt;function ft(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function leftShift");return bt<<St}ft.signature=tt;function ht(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function rightArithShift");return bt>>St}ht.signature=tt;function mt(bt,St){if(!(0,et.isInteger)(bt)||!(0,et.isInteger)(St))throw new Error("Integers expected in function rightLogShift");return bt>>>St}return mt.signature=tt,bitwise$1}var combinations$2={},product={},hasRequiredProduct;function requireProduct(){if(hasRequiredProduct)return product;hasRequiredProduct=1,Object.defineProperty(product,"__esModule",{value:!0}),product.product=et;function et(_e,tt){if(tt<_e)return 1;if(tt===_e)return tt;var rt=tt+_e>>1;return et(_e,rt)*et(rt+1,tt)}return product}var hasRequiredCombinations$2;function requireCombinations$2(){if(hasRequiredCombinations$2)return combinations$2;hasRequiredCombinations$2=1,Object.defineProperty(combinations$2,"__esModule",{value:!0}),combinations$2.combinationsNumber=tt;var et=requireNumber$3(),_e=requireProduct();function tt(rt,nt){if(!(0,et.isInteger)(rt)||rt<0)throw new TypeError("Positive integer value expected in function combinations");if(!(0,et.isInteger)(nt)||nt<0)throw new TypeError("Positive integer value expected in function combinations");if(nt>rt)throw new TypeError("k must be less than or equal to n");for(var st=rt-nt,dt=1,ft=nt<st?st+1:nt+1,ht=2,mt=nt<st?nt:st,bt=ft;bt<=rt;++bt)for(dt*=bt;ht<=mt&&dt%ht===0;)dt/=ht,++ht;return ht<=mt&&(dt/=(0,_e.product)(ht,mt)),dt}return tt.signature="number, number",combinations$2}var constants$2={},hasRequiredConstants$2;function requireConstants$2(){if(hasRequiredConstants$2)return constants$2;hasRequiredConstants$2=1,Object.defineProperty(constants$2,"__esModule",{value:!0}),constants$2.tau=constants$2.pi=constants$2.phi=constants$2.e=void 0;var et=Math.PI;constants$2.pi=et;var _e=2*Math.PI;constants$2.tau=_e;var tt=Math.E;constants$2.e=tt;var rt=1.618033988749895;return constants$2.phi=rt,constants$2}var logical={},hasRequiredLogical;function requireLogical(){if(hasRequiredLogical)return logical;hasRequiredLogical=1,Object.defineProperty(logical,"__esModule",{value:!0}),logical.andNumber=st,logical.notNumber=tt,logical.orNumber=rt,logical.xorNumber=nt;var et="number",_e="number, number";function tt(dt){return!dt}tt.signature=et;function rt(dt,ft){return!!(dt||ft)}rt.signature=_e;function nt(dt,ft){return!!dt!=!!ft}nt.signature=_e;function st(dt,ft){return!!(dt&&ft)}return st.signature=_e,logical}var relational={},hasRequiredRelational;function requireRelational(){return hasRequiredRelational||(hasRequiredRelational=1),relational}var probability={},hasRequiredProbability;function requireProbability(){if(hasRequiredProbability)return probability;hasRequiredProbability=1,Object.defineProperty(probability,"__esModule",{value:!0}),probability.gammaG=void 0,probability.gammaNumber=tt,probability.lgammaN=probability.lgammaG=probability.gammaP=void 0,probability.lgammaNumber=mt,probability.lnSqrt2PI=probability.lgammaSeries=void 0;var et=requireNumber$3(),_e=requireProduct();function tt(bt){var St;if((0,et.isInteger)(bt))return bt<=0?isFinite(bt)?1/0:NaN:bt>171?1/0:(0,_e.product)(1,bt-1);if(bt<.5)return Math.PI/(Math.sin(Math.PI*bt)*tt(1-bt));if(bt>=171.35)return 1/0;if(bt>85){var Et=bt*bt,Ct=Et*bt,Rt=Ct*bt,Tt=Rt*bt;return Math.sqrt(2*Math.PI/bt)*Math.pow(bt/Math.E,bt)*(1+1/(12*bt)+1/(288*Et)-139/(51840*Ct)-571/(2488320*Rt)+163879/(209018880*Tt)+5246819/(75246796800*Tt*bt))}--bt,St=nt[0];for(var wt=1;wt<nt.length;++wt)St+=nt[wt]/(bt+wt);var At=bt+rt+.5;return Math.sqrt(2*Math.PI)*Math.pow(At,bt+.5)*Math.exp(-At)*St}tt.signature="number";var rt=4.7421875;probability.gammaG=rt;var nt=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];probability.gammaP=nt;var st=.9189385332046728;probability.lnSqrt2PI=st;var dt=5;probability.lgammaG=dt;var ft=7;probability.lgammaN=ft;var ht=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];probability.lgammaSeries=ht;function mt(bt){if(bt<0)return NaN;if(bt===0)return 1/0;if(!isFinite(bt))return bt;if(bt<.5)return Math.log(Math.PI/Math.sin(Math.PI*bt))-mt(1-bt);bt=bt-1;for(var St=bt+dt+.5,Et=ht[0],Ct=ft-1;Ct>=1;Ct--)Et+=ht[Ct]/(bt+Ct);return st+(bt+.5)*Math.log(St)-St+Math.log(Et)}return mt.signature="number",probability}var trigonometry={},hasRequiredTrigonometry;function requireTrigonometry(){if(hasRequiredTrigonometry)return trigonometry;hasRequiredTrigonometry=1,Object.defineProperty(trigonometry,"__esModule",{value:!0}),trigonometry.acosNumber=rt,trigonometry.acoshNumber=nt,trigonometry.acotNumber=st,trigonometry.acothNumber=dt,trigonometry.acscNumber=ft,trigonometry.acschNumber=ht,trigonometry.asecNumber=mt,trigonometry.asechNumber=bt,trigonometry.asinNumber=St,trigonometry.asinhNumber=Et,trigonometry.atan2Number=Rt,trigonometry.atanNumber=Ct,trigonometry.atanhNumber=Tt,trigonometry.cosNumber=wt,trigonometry.coshNumber=At,trigonometry.cotNumber=Nt,trigonometry.cothNumber=Pt,trigonometry.cscNumber=It,trigonometry.cschNumber=Ft,trigonometry.secNumber=qt,trigonometry.sechNumber=Vt,trigonometry.sinNumber=Kt,trigonometry.sinhNumber=jt,trigonometry.tanNumber=Ut,trigonometry.tanhNumber=Ot;var et=requireNumber$3(),_e="number",tt="number, number";function rt(Wt){return Math.acos(Wt)}rt.signature=_e;function nt(Wt){return(0,et.acosh)(Wt)}nt.signature=_e;function st(Wt){return Math.atan(1/Wt)}st.signature=_e;function dt(Wt){return isFinite(Wt)?(Math.log((Wt+1)/Wt)+Math.log(Wt/(Wt-1)))/2:0}dt.signature=_e;function ft(Wt){return Math.asin(1/Wt)}ft.signature=_e;function ht(Wt){var Bt=1/Wt;return Math.log(Bt+Math.sqrt(Bt*Bt+1))}ht.signature=_e;function mt(Wt){return Math.acos(1/Wt)}mt.signature=_e;function bt(Wt){var Bt=1/Wt,tr=Math.sqrt(Bt*Bt-1);return Math.log(tr+Bt)}bt.signature=_e;function St(Wt){return Math.asin(Wt)}St.signature=_e;function Et(Wt){return(0,et.asinh)(Wt)}Et.signature=_e;function Ct(Wt){return Math.atan(Wt)}Ct.signature=_e;function Rt(Wt,Bt){return Math.atan2(Wt,Bt)}Rt.signature=tt;function Tt(Wt){return(0,et.atanh)(Wt)}Tt.signature=_e;function wt(Wt){return Math.cos(Wt)}wt.signature=_e;function At(Wt){return(0,et.cosh)(Wt)}At.signature=_e;function Nt(Wt){return 1/Math.tan(Wt)}Nt.signature=_e;function Pt(Wt){var Bt=Math.exp(2*Wt);return(Bt+1)/(Bt-1)}Pt.signature=_e;function It(Wt){return 1/Math.sin(Wt)}It.signature=_e;function Ft(Wt){return Wt===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(Wt)-Math.exp(-Wt)))*(0,et.sign)(Wt)}Ft.signature=_e;function qt(Wt){return 1/Math.cos(Wt)}qt.signature=_e;function Vt(Wt){return 2/(Math.exp(Wt)+Math.exp(-Wt))}Vt.signature=_e;function Kt(Wt){return Math.sin(Wt)}Kt.signature=_e;function jt(Wt){return(0,et.sinh)(Wt)}jt.signature=_e;function Ut(Wt){return Math.tan(Wt)}Ut.signature=_e;function Ot(Wt){return(0,et.tanh)(Wt)}return Ot.signature=_e,trigonometry}var utils$2={},hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$2;hasRequiredUtils$1=1,Object.defineProperty(utils$2,"__esModule",{value:!0}),utils$2.isIntegerNumber=tt,utils$2.isNaNNumber=dt,utils$2.isNegativeNumber=rt,utils$2.isPositiveNumber=nt,utils$2.isZeroNumber=st;var et=requireNumber$3(),_e="number";function tt(ft){return(0,et.isInteger)(ft)}tt.signature=_e;function rt(ft){return ft<0}rt.signature=_e;function nt(ft){return ft>0}nt.signature=_e;function st(ft){return ft===0}st.signature=_e;function dt(ft){return Number.isNaN(ft)}return dt.signature=_e,utils$2}var hasRequiredNumber$2;function requireNumber$2(){return hasRequiredNumber$2||(hasRequiredNumber$2=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0});var _e=requireArithmetic();Object.keys(_e).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===_e[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return _e[bt]}})});var tt=requireBitwise$1();Object.keys(tt).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===tt[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return tt[bt]}})});var rt=requireCombinations$2();Object.keys(rt).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===rt[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return rt[bt]}})});var nt=requireConstants$2();Object.keys(nt).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===nt[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return nt[bt]}})});var st=requireLogical();Object.keys(st).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===st[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return st[bt]}})});var dt=requireRelational();Object.keys(dt).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===dt[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return dt[bt]}})});var ft=requireProbability();Object.keys(ft).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===ft[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return ft[bt]}})});var ht=requireTrigonometry();Object.keys(ht).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===ht[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return ht[bt]}})});var mt=requireUtils$1();Object.keys(mt).forEach(function(bt){bt==="default"||bt==="__esModule"||bt in et&&et[bt]===mt[bt]||Object.defineProperty(et,bt,{enumerable:!0,get:function(){return mt[bt]}})})})(number$3)),number$3}var hasRequiredIsNegative$1;function requireIsNegative$1(){if(hasRequiredIsNegative$1)return isNegative$1;hasRequiredIsNegative$1=1,Object.defineProperty(isNegative$1,"__esModule",{value:!0}),isNegative$1.createIsNegative=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="isNegative",nt=["typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.isNegativeNumber,BigNumber:function(mt){return mt.isNeg()&&!mt.isZero()&&!mt.isNaN()},Fraction:function(mt){return mt.s<0},Unit:function(mt){return this(mt.value)},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return isNegative$1.createIsNegative=st,isNegative$1}var isNumeric$1={},hasRequiredIsNumeric$1;function requireIsNumeric$1(){if(hasRequiredIsNumeric$1)return isNumeric$1;hasRequiredIsNumeric$1=1,Object.defineProperty(isNumeric$1,"__esModule",{value:!0}),isNumeric$1.createIsNumeric=void 0;var et=requireCollection(),_e=requireFactory(),tt="isNumeric",rt=["typed"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(ht){return(0,et.deepMap)(ht,this)}})});return isNumeric$1.createIsNumeric=nt,isNumeric$1}var hasNumericValue$1={},hasRequiredHasNumericValue$1;function requireHasNumericValue$1(){if(hasRequiredHasNumericValue$1)return hasNumericValue$1;hasRequiredHasNumericValue$1=1,Object.defineProperty(hasNumericValue$1,"__esModule",{value:!0}),hasNumericValue$1.createHasNumericValue=void 0;var et=requireFactory(),_e="hasNumericValue",tt=["typed","isNumeric"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.isNumeric;return st(_e,{string:function(ht){return ht.trim().length>0&&!isNaN(Number(ht))},any:function(ht){return dt(ht)}})});return hasNumericValue$1.createHasNumericValue=rt,hasNumericValue$1}var isPositive$1={},hasRequiredIsPositive$1;function requireIsPositive$1(){if(hasRequiredIsPositive$1)return isPositive$1;hasRequiredIsPositive$1=1,Object.defineProperty(isPositive$1,"__esModule",{value:!0}),isPositive$1.createIsPositive=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="isPositive",nt=["typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.isPositiveNumber,BigNumber:function(mt){return!mt.isNeg()&&!mt.isZero()&&!mt.isNaN()},Fraction:function(mt){return mt.s>0&&mt.n>0},Unit:function(mt){return this(mt.value)},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return isPositive$1.createIsPositive=st,isPositive$1}var isZero$1={},hasRequiredIsZero$1;function requireIsZero$1(){if(hasRequiredIsZero$1)return isZero$1;hasRequiredIsZero$1=1,Object.defineProperty(isZero$1,"__esModule",{value:!0}),isZero$1.createIsZero=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="isZero",nt=["typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.isZeroNumber,BigNumber:function(mt){return mt.isZero()},Complex:function(mt){return mt.re===0&&mt.im===0},Fraction:function(mt){return mt.d===1&&mt.n===0},Unit:function(mt){return this(mt.value)},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return isZero$1.createIsZero=st,isZero$1}var _isNaN$1={},hasRequired_isNaN$1;function require_isNaN$1(){if(hasRequired_isNaN$1)return _isNaN$1;hasRequired_isNaN$1=1,Object.defineProperty(_isNaN$1,"__esModule",{value:!0}),_isNaN$1.createIsNaN=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="isNaN",nt=["typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.isNaNNumber,BigNumber:function(mt){return mt.isNaN()},Fraction:function(mt){return!1},Complex:function(mt){return mt.isNaN()},Unit:function(mt){return Number.isNaN(mt.value)},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,Number.isNaN)}})});return _isNaN$1.createIsNaN=st,_isNaN$1}var typeOf$1={},hasRequiredTypeOf$1;function requireTypeOf$1(){if(hasRequiredTypeOf$1)return typeOf$1;hasRequiredTypeOf$1=1,Object.defineProperty(typeOf$1,"__esModule",{value:!0}),typeOf$1.createTypeOf=void 0;var et=requireFactory(),_e=requireIs(),tt="typeOf",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{any:_e.typeOf})});return typeOf$1.createTypeOf=nt,typeOf$1}var equalScalar={},nearlyEqual={},hasRequiredNearlyEqual;function requireNearlyEqual(){if(hasRequiredNearlyEqual)return nearlyEqual;hasRequiredNearlyEqual=1,Object.defineProperty(nearlyEqual,"__esModule",{value:!0}),nearlyEqual.nearlyEqual=et;function et(_e,tt,rt){if(rt==null)return _e.eq(tt);if(_e.eq(tt))return!0;if(_e.isNaN()||tt.isNaN())return!1;if(_e.isFinite()&&tt.isFinite()){var nt=_e.minus(tt).abs();if(nt.isZero())return!0;var st=_e.constructor.max(_e.abs(),tt.abs());return nt.lte(st.times(rt))}return!1}return nearlyEqual}var complex$2={},hasRequiredComplex$2;function requireComplex$2(){if(hasRequiredComplex$2)return complex$2;hasRequiredComplex$2=1,Object.defineProperty(complex$2,"__esModule",{value:!0}),complex$2.complexEquals=_e;var et=requireNumber$3();function _e(tt,rt,nt){return(0,et.nearlyEqual)(tt.re,rt.re,nt)&&(0,et.nearlyEqual)(tt.im,rt.im,nt)}return complex$2}var hasRequiredEqualScalar;function requireEqualScalar(){if(hasRequiredEqualScalar)return equalScalar;hasRequiredEqualScalar=1,Object.defineProperty(equalScalar,"__esModule",{value:!0}),equalScalar.createEqualScalarNumber=equalScalar.createEqualScalar=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireComplex$2(),nt="equalScalar",st=["typed","config"],dt=(0,tt.factory)(nt,st,function(ht){var mt=ht.typed,bt=ht.config;return mt(nt,{"boolean, boolean":function(Et,Ct){return Et===Ct},"number, number":function(Et,Ct){return(0,_e.nearlyEqual)(Et,Ct,bt.epsilon)},"BigNumber, BigNumber":function(Et,Ct){return Et.eq(Ct)||(0,et.nearlyEqual)(Et,Ct,bt.epsilon)},"Fraction, Fraction":function(Et,Ct){return Et.equals(Ct)},"Complex, Complex":function(Et,Ct){return(0,rt.complexEquals)(Et,Ct,bt.epsilon)},"Unit, Unit":function(Et,Ct){if(!Et.equalBase(Ct))throw new Error("Cannot compare units with different base");return this(Et.value,Ct.value)}})});equalScalar.createEqualScalar=dt;var ft=(0,tt.factory)(nt,["typed","config"],function(ht){var mt=ht.typed,bt=ht.config;return mt(nt,{"number, number":function(Et,Ct){return(0,_e.nearlyEqual)(Et,Ct,bt.epsilon)}})});return equalScalar.createEqualScalarNumber=ft,equalScalar}var SparseMatrix={},hasRequiredSparseMatrix;function requireSparseMatrix(){if(hasRequiredSparseMatrix)return SparseMatrix;hasRequiredSparseMatrix=1;var et=requireInteropRequireDefault();Object.defineProperty(SparseMatrix,"__esModule",{value:!0}),SparseMatrix.createSparseMatrixClass=void 0;var _e=et(requireRegenerator()),tt=requireIs(),rt=requireNumber$3(),nt=requireString$2(),st=requireObject(),dt=requireArray(),ft=requireFactory(),ht=requireDimensionError(),mt="SparseMatrix",bt=["typed","equalScalar","Matrix"],St=(0,ft.factory)(mt,bt,function(Et){var Ct=Et.typed,Rt=Et.equalScalar,Tt=Et.Matrix;function wt(Ot,Wt){if(!(this instanceof wt))throw new SyntaxError("Constructor must be called with the new operator");if(Wt&&!(0,tt.isString)(Wt))throw new Error("Invalid datatype: "+Wt);if((0,tt.isMatrix)(Ot))At(this,Ot,Wt);else if(Ot&&(0,tt.isArray)(Ot.index)&&(0,tt.isArray)(Ot.ptr)&&(0,tt.isArray)(Ot.size))this._values=Ot.values,this._index=Ot.index,this._ptr=Ot.ptr,this._size=Ot.size,this._datatype=Wt||Ot.datatype;else if((0,tt.isArray)(Ot))Nt(this,Ot,Wt);else{if(Ot)throw new TypeError("Unsupported type of data ("+(0,tt.typeOf)(Ot)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=Wt}}function At(Ot,Wt,Bt){Wt.type==="SparseMatrix"?(Ot._values=Wt._values?(0,st.clone)(Wt._values):void 0,Ot._index=(0,st.clone)(Wt._index),Ot._ptr=(0,st.clone)(Wt._ptr),Ot._size=(0,st.clone)(Wt._size),Ot._datatype=Bt||Wt._datatype):Nt(Ot,Wt.valueOf(),Bt||Wt._datatype)}function Nt(Ot,Wt,Bt){Ot._values=[],Ot._index=[],Ot._ptr=[],Ot._datatype=Bt;var tr=Wt.length,Jt=0,ar=Rt,pr=0;if((0,tt.isString)(Bt)&&(ar=Ct.find(Rt,[Bt,Bt])||Rt,pr=Ct.convert(0,Bt)),tr>0){var cr=0;do{Ot._ptr.push(Ot._index.length);for(var gr=0;gr<tr;gr++){var Sr=Wt[gr];if((0,tt.isArray)(Sr)){if(cr===0&&Jt<Sr.length&&(Jt=Sr.length),cr<Sr.length){var Er=Sr[cr];ar(Er,pr)||(Ot._values.push(Er),Ot._index.push(gr))}}else cr===0&&Jt<1&&(Jt=1),ar(Sr,pr)||(Ot._values.push(Sr),Ot._index.push(gr))}cr++}while(cr<Jt)}Ot._ptr.push(Ot._index.length),Ot._size=[tr,Jt]}wt.prototype=new Tt,wt.prototype.createSparseMatrix=function(Ot,Wt){return new wt(Ot,Wt)},wt.prototype.type="SparseMatrix",wt.prototype.isSparseMatrix=!0,wt.prototype.getDataType=function(){return(0,dt.getArrayDataType)(this._values,tt.typeOf)},wt.prototype.storage=function(){return"sparse"},wt.prototype.datatype=function(){return this._datatype},wt.prototype.create=function(Ot,Wt){return new wt(Ot,Wt)},wt.prototype.density=function(){var Ot=this._size[0],Wt=this._size[1];return Ot!==0&&Wt!==0?this._index.length/(Ot*Wt):0},wt.prototype.subset=function(Ot,Wt,Bt){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return Pt(this,Ot);case 2:case 3:return It(this,Ot,Wt,Bt);default:throw new SyntaxError("Wrong number of arguments")}};function Pt(Ot,Wt){if(!(0,tt.isIndex)(Wt))throw new TypeError("Invalid index");var Bt=Wt.isScalar();if(Bt)return Ot.get(Wt.min());var tr=Wt.size();if(tr.length!==Ot._size.length)throw new ht.DimensionError(tr.length,Ot._size.length);var Jt,ar,pr,cr,gr=Wt.min(),Sr=Wt.max();for(Jt=0,ar=Ot._size.length;Jt<ar;Jt++)(0,dt.validateIndex)(gr[Jt],Ot._size[Jt]),(0,dt.validateIndex)(Sr[Jt],Ot._size[Jt]);var Er=Ot._values,Vr=Ot._index,Wr=Ot._ptr,Mr=Wt.dimension(0),Nr=Wt.dimension(1),Yr=[],Or=[];Mr.forEach(function(Sn,Kr){Or[Sn]=Kr[0],Yr[Sn]=!0});var Ar=Er?[]:void 0,Qr=[],hn=[];return Nr.forEach(function(Sn){for(hn.push(Qr.length),pr=Wr[Sn],cr=Wr[Sn+1];pr<cr;pr++)Jt=Vr[pr],Yr[Jt]===!0&&(Qr.push(Or[Jt]),Ar&&Ar.push(Er[pr]))}),hn.push(Qr.length),new wt({values:Ar,index:Qr,ptr:hn,size:tr,datatype:Ot._datatype})}function It(Ot,Wt,Bt,tr){if(!Wt||Wt.isIndex!==!0)throw new TypeError("Invalid index");var Jt=Wt.size(),ar=Wt.isScalar(),pr;if((0,tt.isMatrix)(Bt)?(pr=Bt.size(),Bt=Bt.toArray()):pr=(0,dt.arraySize)(Bt),ar){if(pr.length!==0)throw new TypeError("Scalar expected");Ot.set(Wt.min(),Bt,tr)}else{if(Jt.length!==1&&Jt.length!==2)throw new ht.DimensionError(Jt.length,Ot._size.length,"<");if(pr.length<Jt.length){for(var cr=0,gr=0;Jt[cr]===1&&pr[cr]===1;)cr++;for(;Jt[cr]===1;)gr++,cr++;Bt=(0,dt.unsqueeze)(Bt,Jt.length,gr,pr)}if(!(0,st.deepStrictEqual)(Jt,pr))throw new ht.DimensionError(Jt,pr,">");if(Jt.length===1){var Sr=Wt.dimension(0);Sr.forEach(function(Wr,Mr){(0,dt.validateIndex)(Wr),Ot.set([Wr,0],Bt[Mr[0]],tr)})}else{var Er=Wt.dimension(0),Vr=Wt.dimension(1);Er.forEach(function(Wr,Mr){(0,dt.validateIndex)(Wr),Vr.forEach(function(Nr,Yr){(0,dt.validateIndex)(Nr),Ot.set([Wr,Nr],Bt[Mr[0]][Yr[0]],tr)})})}}return Ot}wt.prototype.get=function(Ot){if(!(0,tt.isArray)(Ot))throw new TypeError("Array expected");if(Ot.length!==this._size.length)throw new ht.DimensionError(Ot.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var Wt=Ot[0],Bt=Ot[1];(0,dt.validateIndex)(Wt,this._size[0]),(0,dt.validateIndex)(Bt,this._size[1]);var tr=Ft(Wt,this._ptr[Bt],this._ptr[Bt+1],this._index);return tr<this._ptr[Bt+1]&&this._index[tr]===Wt?this._values[tr]:0},wt.prototype.set=function(Ot,Wt,Bt){if(!(0,tt.isArray)(Ot))throw new TypeError("Array expected");if(Ot.length!==this._size.length)throw new ht.DimensionError(Ot.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var tr=Ot[0],Jt=Ot[1],ar=this._size[0],pr=this._size[1],cr=Rt,gr=0;(0,tt.isString)(this._datatype)&&(cr=Ct.find(Rt,[this._datatype,this._datatype])||Rt,gr=Ct.convert(0,this._datatype)),(tr>ar-1||Jt>pr-1)&&(Kt(this,Math.max(tr+1,ar),Math.max(Jt+1,pr),Bt),ar=this._size[0],pr=this._size[1]),(0,dt.validateIndex)(tr,ar),(0,dt.validateIndex)(Jt,pr);var Sr=Ft(tr,this._ptr[Jt],this._ptr[Jt+1],this._index);return Sr<this._ptr[Jt+1]&&this._index[Sr]===tr?cr(Wt,gr)?qt(Sr,Jt,this._values,this._index,this._ptr):this._values[Sr]=Wt:Vt(Sr,tr,Jt,Wt,this._values,this._index,this._ptr),this};function Ft(Ot,Wt,Bt,tr){if(Bt-Wt===0)return Bt;for(var Jt=Wt;Jt<Bt;Jt++)if(tr[Jt]===Ot)return Jt;return Wt}function qt(Ot,Wt,Bt,tr,Jt){Bt.splice(Ot,1),tr.splice(Ot,1);for(var ar=Wt+1;ar<Jt.length;ar++)Jt[ar]--}function Vt(Ot,Wt,Bt,tr,Jt,ar,pr){Jt.splice(Ot,0,tr),ar.splice(Ot,0,Wt);for(var cr=Bt+1;cr<pr.length;cr++)pr[cr]++}wt.prototype.resize=function(Ot,Wt,Bt){if(!(0,tt.isCollection)(Ot))throw new TypeError("Array or Matrix expected");var tr=Ot.valueOf().map(function(ar){return Array.isArray(ar)&&ar.length===1?ar[0]:ar});if(tr.length!==2)throw new Error("Only two dimensions matrix are supported");tr.forEach(function(ar){if(!(0,tt.isNumber)(ar)||!(0,rt.isInteger)(ar)||ar<0)throw new TypeError("Invalid size, must contain positive integers (size: "+(0,nt.format)(tr)+")")});var Jt=Bt?this.clone():this;return Kt(Jt,tr[0],tr[1],Wt)};function Kt(Ot,Wt,Bt,tr){var Jt=tr||0,ar=Rt,pr=0;(0,tt.isString)(Ot._datatype)&&(ar=Ct.find(Rt,[Ot._datatype,Ot._datatype])||Rt,pr=Ct.convert(0,Ot._datatype),Jt=Ct.convert(Jt,Ot._datatype));var cr=!ar(Jt,pr),gr=Ot._size[0],Sr=Ot._size[1],Er,Vr,Wr;if(Bt>Sr){for(Vr=Sr;Vr<Bt;Vr++)if(Ot._ptr[Vr]=Ot._values.length,cr)for(Er=0;Er<gr;Er++)Ot._values.push(Jt),Ot._index.push(Er);Ot._ptr[Bt]=Ot._values.length}else Bt<Sr&&(Ot._ptr.splice(Bt+1,Sr-Bt),Ot._values.splice(Ot._ptr[Bt],Ot._values.length),Ot._index.splice(Ot._ptr[Bt],Ot._index.length));if(Sr=Bt,Wt>gr){if(cr){var Mr=0;for(Vr=0;Vr<Sr;Vr++){Ot._ptr[Vr]=Ot._ptr[Vr]+Mr,Wr=Ot._ptr[Vr+1]+Mr;var Nr=0;for(Er=gr;Er<Wt;Er++,Nr++)Ot._values.splice(Wr+Nr,0,Jt),Ot._index.splice(Wr+Nr,0,Er),Mr++}Ot._ptr[Sr]=Ot._values.length}}else if(Wt<gr){var Yr=0;for(Vr=0;Vr<Sr;Vr++){Ot._ptr[Vr]=Ot._ptr[Vr]-Yr;var Or=Ot._ptr[Vr],Ar=Ot._ptr[Vr+1]-Yr;for(Wr=Or;Wr<Ar;Wr++)Er=Ot._index[Wr],Er>Wt-1&&(Ot._values.splice(Wr,1),Ot._index.splice(Wr,1),Yr++)}Ot._ptr[Vr]=Ot._values.length}return Ot._size[0]=Wt,Ot._size[1]=Bt,Ot}wt.prototype.reshape=function(Ot,Wt){if(!(0,tt.isArray)(Ot))throw new TypeError("Array expected");if(Ot.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");Ot.forEach(function(Sn){if(!(0,tt.isNumber)(Sn)||!(0,rt.isInteger)(Sn)||Sn<=-2||Sn===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+(0,nt.format)(Ot)+")")});var Bt=this._size[0]*this._size[1];Ot=(0,dt.processSizesWildcard)(Ot,Bt);var tr=Ot[0]*Ot[1];if(Bt!==tr)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var Jt=Wt?this.clone():this;if(this._size[0]===Ot[0]&&this._size[1]===Ot[1])return Jt;for(var ar=[],pr=0;pr<Jt._ptr.length;pr++)for(var cr=0;cr<Jt._ptr[pr+1]-Jt._ptr[pr];cr++)ar.push(pr);for(var gr=Jt._values.slice(),Sr=Jt._index.slice(),Er=0;Er<Jt._index.length;Er++){var Vr=Sr[Er],Wr=ar[Er],Mr=Vr*Jt._size[1]+Wr;ar[Er]=Mr%Ot[1],Sr[Er]=Math.floor(Mr/Ot[1])}Jt._values.length=0,Jt._index.length=0,Jt._ptr.length=Ot[1]+1,Jt._size=Ot.slice();for(var Nr=0;Nr<Jt._ptr.length;Nr++)Jt._ptr[Nr]=0;for(var Yr=0;Yr<gr.length;Yr++){var Or=Sr[Yr],Ar=ar[Yr],Qr=gr[Yr],hn=Ft(Or,Jt._ptr[Ar],Jt._ptr[Ar+1],Jt._index);Vt(hn,Or,Ar,Qr,Jt._values,Jt._index,Jt._ptr)}return Jt},wt.prototype.clone=function(){var Ot=new wt({values:this._values?(0,st.clone)(this._values):void 0,index:(0,st.clone)(this._index),ptr:(0,st.clone)(this._ptr),size:(0,st.clone)(this._size),datatype:this._datatype});return Ot},wt.prototype.size=function(){return this._size.slice(0)},wt.prototype.map=function(Ot,Wt){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var Bt=this,tr=this._size[0],Jt=this._size[1],ar=function(cr,gr,Sr){return Ot(cr,[gr,Sr],Bt)};return jt(this,0,tr-1,0,Jt-1,ar,Wt)};function jt(Ot,Wt,Bt,tr,Jt,ar,pr){var cr=[],gr=[],Sr=[],Er=Rt,Vr=0;(0,tt.isString)(Ot._datatype)&&(Er=Ct.find(Rt,[Ot._datatype,Ot._datatype])||Rt,Vr=Ct.convert(0,Ot._datatype));for(var Wr=function(kn,xn,An){kn=ar(kn,xn,An),Er(kn,Vr)||(cr.push(kn),gr.push(xn))},Mr=tr;Mr<=Jt;Mr++){Sr.push(cr.length);var Nr=Ot._ptr[Mr],Yr=Ot._ptr[Mr+1];if(pr)for(var Or=Nr;Or<Yr;Or++){var Ar=Ot._index[Or];Ar>=Wt&&Ar<=Bt&&Wr(Ot._values[Or],Ar-Wt,Mr-tr)}else{for(var Qr={},hn=Nr;hn<Yr;hn++){var Sn=Ot._index[hn];Qr[Sn]=Ot._values[hn]}for(var Kr=Wt;Kr<=Bt;Kr++){var Hn=Kr in Qr?Qr[Kr]:0;Wr(Hn,Kr-Wt,Mr-tr)}}}return Sr.push(cr.length),new wt({values:cr,index:gr,ptr:Sr,size:[Bt-Wt+1,Jt-tr+1]})}wt.prototype.forEach=function(Ot,Wt){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var Bt=this,tr=this._size[0],Jt=this._size[1],ar=0;ar<Jt;ar++){var pr=this._ptr[ar],cr=this._ptr[ar+1];if(Wt)for(var gr=pr;gr<cr;gr++){var Sr=this._index[gr];Ot(this._values[gr],[Sr,ar],Bt)}else{for(var Er={},Vr=pr;Vr<cr;Vr++){var Wr=this._index[Vr];Er[Wr]=this._values[Vr]}for(var Mr=0;Mr<tr;Mr++){var Nr=Mr in Er?Er[Mr]:0;Ot(Nr,[Mr,ar],Bt)}}}},wt.prototype[Symbol.iterator]=_e.default.mark(function Ot(){var Wt,Bt,tr,Jt,ar,pr;return _e.default.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(this._values){gr.next=2;break}throw new Error("Cannot iterate a Pattern only matrix");case 2:Wt=this._size[1],Bt=0;case 4:if(!(Bt<Wt)){gr.next=18;break}tr=this._ptr[Bt],Jt=this._ptr[Bt+1],ar=tr;case 8:if(!(ar<Jt)){gr.next=15;break}return pr=this._index[ar],gr.next=12,{value:this._values[ar],index:[pr,Bt]};case 12:ar++,gr.next=8;break;case 15:Bt++,gr.next=4;break;case 18:case"end":return gr.stop()}},Ot,this)}),wt.prototype.toArray=function(){return Ut(this._values,this._index,this._ptr,this._size,!0)},wt.prototype.valueOf=function(){return Ut(this._values,this._index,this._ptr,this._size,!1)};function Ut(Ot,Wt,Bt,tr,Jt){var ar=tr[0],pr=tr[1],cr=[],gr,Sr;for(gr=0;gr<ar;gr++)for(cr[gr]=[],Sr=0;Sr<pr;Sr++)cr[gr][Sr]=0;for(Sr=0;Sr<pr;Sr++)for(var Er=Bt[Sr],Vr=Bt[Sr+1],Wr=Er;Wr<Vr;Wr++)gr=Wt[Wr],cr[gr][Sr]=Ot?Jt?(0,st.clone)(Ot[Wr]):Ot[Wr]:1;return cr}return wt.prototype.format=function(Ot){for(var Wt=this._size[0],Bt=this._size[1],tr=this.density(),Jt="Sparse Matrix ["+(0,nt.format)(Wt,Ot)+" x "+(0,nt.format)(Bt,Ot)+"] density: "+(0,nt.format)(tr,Ot)+`
`,ar=0;ar<Bt;ar++)for(var pr=this._ptr[ar],cr=this._ptr[ar+1],gr=pr;gr<cr;gr++){var Sr=this._index[gr];Jt+=`
(`+(0,nt.format)(Sr,Ot)+", "+(0,nt.format)(ar,Ot)+") ==> "+(this._values?(0,nt.format)(this._values[gr],Ot):"X")}return Jt},wt.prototype.toString=function(){return(0,nt.format)(this.toArray())},wt.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},wt.prototype.diagonal=function(Ot){if(Ot){if((0,tt.isBigNumber)(Ot)&&(Ot=Ot.toNumber()),!(0,tt.isNumber)(Ot)||!(0,rt.isInteger)(Ot))throw new TypeError("The parameter k must be an integer number")}else Ot=0;var Wt=Ot>0?Ot:0,Bt=Ot<0?-Ot:0,tr=this._size[0],Jt=this._size[1],ar=Math.min(tr-Bt,Jt-Wt),pr=[],cr=[],gr=[];gr[0]=0;for(var Sr=Wt;Sr<Jt&&pr.length<ar;Sr++)for(var Er=this._ptr[Sr],Vr=this._ptr[Sr+1],Wr=Er;Wr<Vr;Wr++){var Mr=this._index[Wr];if(Mr===Sr-Wt+Bt){pr.push(this._values[Wr]),cr[pr.length-1]=Mr-Bt;break}}return gr.push(pr.length),new wt({values:pr,index:cr,ptr:gr,size:[ar,1]})},wt.fromJSON=function(Ot){return new wt(Ot)},wt.diagonal=function(Ot,Wt,Bt,tr,Jt){if(!(0,tt.isArray)(Ot))throw new TypeError("Array expected, size parameter");if(Ot.length!==2)throw new Error("Only two dimensions matrix are supported");if(Ot=Ot.map(function(Sn){if((0,tt.isBigNumber)(Sn)&&(Sn=Sn.toNumber()),!(0,tt.isNumber)(Sn)||!(0,rt.isInteger)(Sn)||Sn<1)throw new Error("Size values must be positive integers");return Sn}),Bt){if((0,tt.isBigNumber)(Bt)&&(Bt=Bt.toNumber()),!(0,tt.isNumber)(Bt)||!(0,rt.isInteger)(Bt))throw new TypeError("The parameter k must be an integer number")}else Bt=0;var ar=Rt,pr=0;(0,tt.isString)(Jt)&&(ar=Ct.find(Rt,[Jt,Jt])||Rt,pr=Ct.convert(0,Jt));var cr=Bt>0?Bt:0,gr=Bt<0?-Bt:0,Sr=Ot[0],Er=Ot[1],Vr=Math.min(Sr-gr,Er-cr),Wr;if((0,tt.isArray)(Wt)){if(Wt.length!==Vr)throw new Error("Invalid value array length");Wr=function(Kr){return Wt[Kr]}}else if((0,tt.isMatrix)(Wt)){var Mr=Wt.size();if(Mr.length!==1||Mr[0]!==Vr)throw new Error("Invalid matrix length");Wr=function(Kr){return Wt.get([Kr])}}else Wr=function(){return Wt};for(var Nr=[],Yr=[],Or=[],Ar=0;Ar<Er;Ar++){Or.push(Nr.length);var Qr=Ar-cr;if(Qr>=0&&Qr<Vr){var hn=Wr(Qr);ar(hn,pr)||(Yr.push(Qr+gr),Nr.push(hn))}}return Or.push(Nr.length),new wt({values:Nr,index:Yr,ptr:Or,size:[Sr,Er]})},wt.prototype.swapRows=function(Ot,Wt){if(!(0,tt.isNumber)(Ot)||!(0,rt.isInteger)(Ot)||!(0,tt.isNumber)(Wt)||!(0,rt.isInteger)(Wt))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return(0,dt.validateIndex)(Ot,this._size[0]),(0,dt.validateIndex)(Wt,this._size[0]),wt._swapRows(Ot,Wt,this._size[1],this._values,this._index,this._ptr),this},wt._forEachRow=function(Ot,Wt,Bt,tr,Jt){for(var ar=tr[Ot],pr=tr[Ot+1],cr=ar;cr<pr;cr++)Jt(Bt[cr],Wt[cr])},wt._swapRows=function(Ot,Wt,Bt,tr,Jt,ar){for(var pr=0;pr<Bt;pr++){var cr=ar[pr],gr=ar[pr+1],Sr=Ft(Ot,cr,gr,Jt),Er=Ft(Wt,cr,gr,Jt);if(Sr<gr&&Er<gr&&Jt[Sr]===Ot&&Jt[Er]===Wt){if(tr){var Vr=tr[Sr];tr[Sr]=tr[Er],tr[Er]=Vr}continue}if(Sr<gr&&Jt[Sr]===Ot&&(Er>=gr||Jt[Er]!==Wt)){var Wr=tr?tr[Sr]:void 0;Jt.splice(Er,0,Wt),tr&&tr.splice(Er,0,Wr),Jt.splice(Er<=Sr?Sr+1:Sr,1),tr&&tr.splice(Er<=Sr?Sr+1:Sr,1);continue}if(Er<gr&&Jt[Er]===Wt&&(Sr>=gr||Jt[Sr]!==Ot)){var Mr=tr?tr[Er]:void 0;Jt.splice(Sr,0,Ot),tr&&tr.splice(Sr,0,Mr),Jt.splice(Sr<=Er?Er+1:Er,1),tr&&tr.splice(Sr<=Er?Er+1:Er,1)}}},wt},{isClass:!0});return SparseMatrix.createSparseMatrixClass=St,SparseMatrix}var number$2={},hasRequiredNumber$1;function requireNumber$1(){if(hasRequiredNumber$1)return number$2;hasRequiredNumber$1=1,Object.defineProperty(number$2,"__esModule",{value:!0}),number$2.createNumber=void 0;var et=requireFactory(),_e=requireCollection(),tt="number",rt=["typed"];function nt(ft){var ht=ft.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(ht){var mt={"0b":2,"0o":8,"0x":16}[ht[1]],bt=ht[2],St=ht[3];return{input:ft,radix:mt,integerPart:bt,fractionalPart:St}}else return null}function st(ft){for(var ht=parseInt(ft.integerPart,ft.radix),mt=0,bt=0;bt<ft.fractionalPart.length;bt++){var St=parseInt(ft.fractionalPart[bt],ft.radix);mt+=St/Math.pow(ft.radix,bt+1)}var Et=ht+mt;if(isNaN(Et))throw new SyntaxError('String "'+ft.input+'" is no valid number');return Et}var dt=(0,et.factory)(tt,rt,function(ft){var ht=ft.typed,mt=ht("number",{"":function(){return 0},number:function(St){return St},string:function(St){if(St==="NaN")return NaN;var Et=nt(St);if(Et)return st(Et);var Ct=0,Rt=St.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);Rt&&(Ct=Number(Rt[2]),St=Rt[1]);var Tt=Number(St);if(isNaN(Tt))throw new SyntaxError('String "'+St+'" is no valid number');if(Rt){if(Tt>Math.pow(2,Ct)-1)throw new SyntaxError('String "'.concat(St,'" is out of range'));Tt>=Math.pow(2,Ct-1)&&(Tt=Tt-Math.pow(2,Ct))}return Tt},BigNumber:function(St){return St.toNumber()},Fraction:function(St){return St.valueOf()},Unit:function(St){throw new Error("Second argument with valueless unit expected")},null:function(St){return 0},"Unit, string | Unit":function(St,Et){return St.toNumber(Et)},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this)}});return mt.fromJSON=function(bt){return parseFloat(bt.value)},mt});return number$2.createNumber=dt,number$2}var string$1={},hasRequiredString$1;function requireString$1(){if(hasRequiredString$1)return string$1;hasRequiredString$1=1,Object.defineProperty(string$1,"__esModule",{value:!0}),string$1.createString=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$3(),rt="string",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{"":function(){return""},number:tt.format,null:function(mt){return"null"},boolean:function(mt){return mt+""},string:function(mt){return mt},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)},any:function(mt){return String(mt)}})});return string$1.createString=st,string$1}var boolean$1={},hasRequiredBoolean$1;function requireBoolean$1(){if(hasRequiredBoolean$1)return boolean$1;hasRequiredBoolean$1=1,Object.defineProperty(boolean$1,"__esModule",{value:!0}),boolean$1.createBoolean=void 0;var et=requireFactory(),_e=requireCollection(),tt="boolean",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{"":function(){return!1},boolean:function(ht){return ht},number:function(ht){return!!ht},null:function(ht){return!1},BigNumber:function(ht){return!ht.isZero()},string:function(ht){var mt=ht.toLowerCase();if(mt==="true")return!0;if(mt==="false")return!1;var bt=Number(ht);if(ht!==""&&!isNaN(bt))return!!bt;throw new Error('Cannot convert "'+ht+'" to a boolean')},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return boolean$1.createBoolean=nt,boolean$1}var bignumber$1={},hasRequiredBignumber$1;function requireBignumber$1(){if(hasRequiredBignumber$1)return bignumber$1;hasRequiredBignumber$1=1,Object.defineProperty(bignumber$1,"__esModule",{value:!0}),bignumber$1.createBignumber=void 0;var et=requireFactory(),_e=requireCollection(),tt="bignumber",rt=["typed","BigNumber"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.BigNumber;return dt("bignumber",{"":function(){return new ft(0)},number:function(mt){return new ft(mt+"")},string:function(mt){var bt=mt.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(bt){var St=bt[2],Et=ft(bt[1]),Ct=new ft(2).pow(Number(St));if(Et.gt(Ct.sub(1)))throw new SyntaxError('String "'.concat(mt,'" is out of range'));var Rt=new ft(2).pow(Number(St)-1);return Et.gte(Rt)?Et.sub(Ct):Et}return new ft(mt)},BigNumber:function(mt){return mt},Fraction:function(mt){return new ft(mt.n).div(mt.d).times(mt.s)},null:function(mt){return new ft(0)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return bignumber$1.createBignumber=nt,bignumber$1}var complex$1={},hasRequiredComplex$1;function requireComplex$1(){if(hasRequiredComplex$1)return complex$1;hasRequiredComplex$1=1,Object.defineProperty(complex$1,"__esModule",{value:!0}),complex$1.createComplex=void 0;var et=requireFactory(),_e=requireCollection(),tt="complex",rt=["typed","Complex"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.Complex;return dt("complex",{"":function(){return ft.ZERO},number:function(mt){return new ft(mt,0)},"number, number":function(mt,bt){return new ft(mt,bt)},"BigNumber, BigNumber":function(mt,bt){return new ft(mt.toNumber(),bt.toNumber())},Fraction:function(mt){return new ft(mt.valueOf(),0)},Complex:function(mt){return mt.clone()},string:function(mt){return ft(mt)},null:function(mt){return ft(0)},Object:function(mt){if("re"in mt&&"im"in mt)return new ft(mt.re,mt.im);if("r"in mt&&"phi"in mt||"abs"in mt&&"arg"in mt)return new ft(mt);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return complex$1.createComplex=nt,complex$1}var fraction$1={},hasRequiredFraction$1;function requireFraction$1(){if(hasRequiredFraction$1)return fraction$1;hasRequiredFraction$1=1,Object.defineProperty(fraction$1,"__esModule",{value:!0}),fraction$1.createFraction=void 0;var et=requireFactory(),_e=requireCollection(),tt="fraction",rt=["typed","Fraction"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.Fraction;return dt("fraction",{number:function(mt){if(!isFinite(mt)||isNaN(mt))throw new Error(mt+" cannot be represented as a fraction");return new ft(mt)},string:function(mt){return new ft(mt)},"number, number":function(mt,bt){return new ft(mt,bt)},null:function(mt){return new ft(0)},BigNumber:function(mt){return new ft(mt.toString())},Fraction:function(mt){return mt},Object:function(mt){return new ft(mt)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return fraction$1.createFraction=nt,fraction$1}var matrix$1={},hasRequiredMatrix$1;function requireMatrix$1(){if(hasRequiredMatrix$1)return matrix$1;hasRequiredMatrix$1=1,Object.defineProperty(matrix$1,"__esModule",{value:!0}),matrix$1.createMatrix=void 0;var et=requireFactory(),_e="matrix",tt=["typed","Matrix","DenseMatrix","SparseMatrix"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed;nt.Matrix;var dt=nt.DenseMatrix,ft=nt.SparseMatrix;return st(_e,{"":function(){return ht([])},string:function(bt){return ht([],bt)},"string, string":function(bt,St){return ht([],bt,St)},Array:function(bt){return ht(bt)},Matrix:function(bt){return ht(bt,bt.storage())},"Array | Matrix, string":ht,"Array | Matrix, string, string":ht});function ht(mt,bt,St){if(bt==="dense"||bt==="default"||bt===void 0)return new dt(mt,St);if(bt==="sparse")return new ft(mt,St);throw new TypeError("Unknown matrix type "+JSON.stringify(bt)+".")}});return matrix$1.createMatrix=rt,matrix$1}var matrixFromFunction$1={},hasRequiredMatrixFromFunction$1;function requireMatrixFromFunction$1(){if(hasRequiredMatrixFromFunction$1)return matrixFromFunction$1;hasRequiredMatrixFromFunction$1=1,Object.defineProperty(matrixFromFunction$1,"__esModule",{value:!0}),matrixFromFunction$1.createMatrixFromFunction=void 0;var et=requireFactory(),_e="matrixFromFunction",tt=["typed","matrix","isZero"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.matrix,ft=nt.isZero;return st(_e,{"Array | Matrix, function, string, string":function(bt,St,Et,Ct){return ht(bt,St,Et,Ct)},"Array | Matrix, function, string":function(bt,St,Et){return ht(bt,St,Et)},"Matrix, function":function(bt,St){return ht(bt,St,"dense")},"Array, function":function(bt,St){return ht(bt,St,"dense").toArray()},"Array | Matrix, string, function":function(bt,St,Et){return ht(bt,Et,St)},"Array | Matrix, string, string, function":function(bt,St,Et,Ct){return ht(bt,Ct,St,Et)}});function ht(mt,bt,St,Et){var Ct;return Et!==void 0?Ct=dt(St,Et):Ct=dt(St),Ct.resize(mt),Ct.forEach(function(Rt,Tt){var wt=bt(Tt);ft(wt)||Ct.set(Tt,wt)}),Ct}});return matrixFromFunction$1.createMatrixFromFunction=rt,matrixFromFunction$1}var matrixFromRows$1={},hasRequiredMatrixFromRows$1;function requireMatrixFromRows$1(){if(hasRequiredMatrixFromRows$1)return matrixFromRows$1;hasRequiredMatrixFromRows$1=1,Object.defineProperty(matrixFromRows$1,"__esModule",{value:!0}),matrixFromRows$1.createMatrixFromRows=void 0;var et=requireFactory();function _e(ft,ht){var mt=typeof Symbol<"u"&&ft[Symbol.iterator]||ft["@@iterator"];if(!mt){if(Array.isArray(ft)||(mt=tt(ft))||ht){mt&&(ft=mt);var bt=0,St=function(){};return{s:St,n:function(){return bt>=ft.length?{done:!0}:{done:!1,value:ft[bt++]}},e:function(wt){throw wt},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Et=!0,Ct=!1,Rt;return{s:function(){mt=mt.call(ft)},n:function(){var wt=mt.next();return Et=wt.done,wt},e:function(wt){Ct=!0,Rt=wt},f:function(){try{!Et&&mt.return!=null&&mt.return()}finally{if(Ct)throw Rt}}}}function tt(ft,ht){if(ft){if(typeof ft=="string")return rt(ft,ht);var mt=Object.prototype.toString.call(ft).slice(8,-1);if(mt==="Object"&&ft.constructor&&(mt=ft.constructor.name),mt==="Map"||mt==="Set")return Array.from(ft);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return rt(ft,ht)}}function rt(ft,ht){(ht==null||ht>ft.length)&&(ht=ft.length);for(var mt=0,bt=new Array(ht);mt<ht;mt++)bt[mt]=ft[mt];return bt}var nt="matrixFromRows",st=["typed","matrix","flatten","size"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.flatten,St=ft.size;return ht(nt,{"...Array":function(Tt){return Et(Tt)},"...Matrix":function(Tt){return mt(Et(Tt.map(function(wt){return wt.toArray()})))}});function Et(Rt){if(Rt.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var Tt=Ct(Rt[0]),wt=[],At=_e(Rt),Nt;try{for(At.s();!(Nt=At.n()).done;){var Pt=Nt.value,It=Ct(Pt);if(It!==Tt)throw new TypeError("The vectors had different length: "+(Tt|0)+" ≠ "+(It|0));wt.push(bt(Pt))}}catch(Ft){At.e(Ft)}finally{At.f()}return wt}function Ct(Rt){var Tt=St(Rt);if(Tt.length===1)return Tt[0];if(Tt.length===2){if(Tt[0]===1)return Tt[1];if(Tt[1]===1)return Tt[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});return matrixFromRows$1.createMatrixFromRows=dt,matrixFromRows$1}var matrixFromColumns$1={},hasRequiredMatrixFromColumns$1;function requireMatrixFromColumns$1(){if(hasRequiredMatrixFromColumns$1)return matrixFromColumns$1;hasRequiredMatrixFromColumns$1=1,Object.defineProperty(matrixFromColumns$1,"__esModule",{value:!0}),matrixFromColumns$1.createMatrixFromColumns=void 0;var et=requireFactory();function _e(ft,ht){var mt=typeof Symbol<"u"&&ft[Symbol.iterator]||ft["@@iterator"];if(!mt){if(Array.isArray(ft)||(mt=tt(ft))||ht){mt&&(ft=mt);var bt=0,St=function(){};return{s:St,n:function(){return bt>=ft.length?{done:!0}:{done:!1,value:ft[bt++]}},e:function(wt){throw wt},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Et=!0,Ct=!1,Rt;return{s:function(){mt=mt.call(ft)},n:function(){var wt=mt.next();return Et=wt.done,wt},e:function(wt){Ct=!0,Rt=wt},f:function(){try{!Et&&mt.return!=null&&mt.return()}finally{if(Ct)throw Rt}}}}function tt(ft,ht){if(ft){if(typeof ft=="string")return rt(ft,ht);var mt=Object.prototype.toString.call(ft).slice(8,-1);if(mt==="Object"&&ft.constructor&&(mt=ft.constructor.name),mt==="Map"||mt==="Set")return Array.from(ft);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return rt(ft,ht)}}function rt(ft,ht){(ht==null||ht>ft.length)&&(ht=ft.length);for(var mt=0,bt=new Array(ht);mt<ht;mt++)bt[mt]=ft[mt];return bt}var nt="matrixFromColumns",st=["typed","matrix","flatten","size"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.flatten,St=ft.size;return ht(nt,{"...Array":function(Tt){return Et(Tt)},"...Matrix":function(Tt){return mt(Et(Tt.map(function(wt){return wt.toArray()})))}});function Et(Rt){if(Rt.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var Tt=Ct(Rt[0]),wt=[],At=0;At<Tt;At++)wt[At]=[];var Nt=_e(Rt),Pt;try{for(Nt.s();!(Pt=Nt.n()).done;){var It=Pt.value,Ft=Ct(It);if(Ft!==Tt)throw new TypeError("The vectors had different length: "+(Tt|0)+" ≠ "+(Ft|0));for(var qt=bt(It),Vt=0;Vt<Tt;Vt++)wt[Vt].push(qt[Vt])}}catch(Kt){Nt.e(Kt)}finally{Nt.f()}return wt}function Ct(Rt){var Tt=St(Rt);if(Tt.length===1)return Tt[0];if(Tt.length===2){if(Tt[0]===1)return Tt[1];if(Tt[1]===1)return Tt[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}});return matrixFromColumns$1.createMatrixFromColumns=dt,matrixFromColumns$1}var splitUnit$1={},hasRequiredSplitUnit$1;function requireSplitUnit$1(){if(hasRequiredSplitUnit$1)return splitUnit$1;hasRequiredSplitUnit$1=1,Object.defineProperty(splitUnit$1,"__esModule",{value:!0}),splitUnit$1.createSplitUnit=void 0;var et=requireFactory(),_e="splitUnit",tt=["typed"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed;return st(_e,{"Unit, Array":function(ft,ht){return ft.splitUnit(ht)}})});return splitUnit$1.createSplitUnit=rt,splitUnit$1}var unaryMinus$1={},hasRequiredUnaryMinus$1;function requireUnaryMinus$1(){if(hasRequiredUnaryMinus$1)return unaryMinus$1;hasRequiredUnaryMinus$1=1,Object.defineProperty(unaryMinus$1,"__esModule",{value:!0}),unaryMinus$1.createUnaryMinus=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="unaryMinus",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.unaryMinusNumber,Complex:function(mt){return mt.neg()},BigNumber:function(mt){return mt.neg()},Fraction:function(mt){return mt.neg()},Unit:function(mt){var bt=mt.clone();return bt.value=this(mt.value),bt},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)}})});return unaryMinus$1.createUnaryMinus=st,unaryMinus$1}var unaryPlus$1={},hasRequiredUnaryPlus$1;function requireUnaryPlus$1(){if(hasRequiredUnaryPlus$1)return unaryPlus$1;hasRequiredUnaryPlus$1=1,Object.defineProperty(unaryPlus$1,"__esModule",{value:!0}),unaryPlus$1.createUnaryPlus=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="unaryPlus",nt=["typed","config","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.BigNumber;return ft(rt,{number:tt.unaryPlusNumber,Complex:function(St){return St},BigNumber:function(St){return St},Fraction:function(St){return St},Unit:function(St){return St.clone()},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this,!0)},"boolean | string":function(St){return ht.number==="BigNumber"?new mt(+St):+St}})});return unaryPlus$1.createUnaryPlus=st,unaryPlus$1}var abs$1={},hasRequiredAbs$1;function requireAbs$1(){if(hasRequiredAbs$1)return abs$1;hasRequiredAbs$1=1,Object.defineProperty(abs$1,"__esModule",{value:!0}),abs$1.createAbs=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="abs",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.absNumber,Complex:function(mt){return mt.abs()},BigNumber:function(mt){return mt.abs()},Fraction:function(mt){return mt.abs()},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)},Unit:function(mt){return mt.abs()}})});return abs$1.createAbs=st,abs$1}var apply={},hasRequiredApply;function requireApply(){if(hasRequiredApply)return apply;hasRequiredApply=1,Object.defineProperty(apply,"__esModule",{value:!0}),apply.createApply=void 0;var et=requireFactory(),_e=requireArray(),tt=requireIs(),rt=requireIndexError(),nt="apply",st=["typed","isInteger"],dt=(0,et.factory)(nt,st,function(mt){var bt=mt.typed,St=mt.isInteger;return bt(nt,{"Array | Matrix, number | BigNumber, function":function(Ct,Rt,Tt){if(!St(Rt))throw new TypeError("Integer number expected for dimension");var wt=Array.isArray(Ct)?(0,_e.arraySize)(Ct):Ct.size();if(Rt<0||Rt>=wt.length)throw new rt.IndexError(Rt,wt.length);return(0,tt.isMatrix)(Ct)?Ct.create(ft(Ct.valueOf(),Rt,Tt)):ft(Ct,Rt,Tt)}})});apply.createApply=dt;function ft(mt,bt,St){var Et,Ct,Rt;if(bt<=0)if(Array.isArray(mt[0])){for(Rt=ht(mt),Ct=[],Et=0;Et<Rt.length;Et++)Ct[Et]=ft(Rt[Et],bt-1,St);return Ct}else return St(mt);else{for(Ct=[],Et=0;Et<mt.length;Et++)Ct[Et]=ft(mt[Et],bt-1,St);return Ct}}function ht(mt){var bt=mt.length,St=mt[0].length,Et,Ct,Rt=[];for(Ct=0;Ct<St;Ct++){var Tt=[];for(Et=0;Et<bt;Et++)Tt.push(mt[Et][Ct]);Rt.push(Tt)}return Rt}return apply}var addScalar={},hasRequiredAddScalar;function requireAddScalar(){if(hasRequiredAddScalar)return addScalar;hasRequiredAddScalar=1,Object.defineProperty(addScalar,"__esModule",{value:!0}),addScalar.createAddScalar=void 0;var et=requireFactory(),_e=requireNumber$2(),tt="addScalar",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{"number, number":_e.addNumber,"Complex, Complex":function(ht,mt){return ht.add(mt)},"BigNumber, BigNumber":function(ht,mt){return ht.plus(mt)},"Fraction, Fraction":function(ht,mt){return ht.add(mt)},"Unit, Unit":function(ht,mt){if(ht.value===null||ht.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(mt.value===null||mt.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!ht.equalBase(mt))throw new Error("Units do not match");var bt=ht.clone();return bt.value=this(bt.value,mt.value),bt.fixPrefix=!1,bt}})});return addScalar.createAddScalar=nt,addScalar}var cbrt$1={},hasRequiredCbrt$1;function requireCbrt$1(){if(hasRequiredCbrt$1)return cbrt$1;hasRequiredCbrt$1=1,Object.defineProperty(cbrt$1,"__esModule",{value:!0}),cbrt$1.createCbrt=void 0;var et=requireFactory(),_e=requireIs(),tt=requireCollection(),rt=requireNumber$2(),nt="cbrt",st=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.config,mt=ft.typed,bt=ft.isNegative,St=ft.unaryMinus,Et=ft.matrix,Ct=ft.Complex,Rt=ft.BigNumber,Tt=ft.Fraction;return mt(nt,{number:rt.cbrtNumber,Complex:wt,"Complex, boolean":wt,BigNumber:function(Pt){return Pt.cbrt()},Unit:At,"Array | Matrix":function(Pt){return(0,tt.deepMap)(Pt,this,!0)}});function wt(Nt,Pt){var It=Nt.arg()/3,Ft=Nt.abs(),qt=new Ct((0,rt.cbrtNumber)(Ft),0).mul(new Ct(0,It).exp());if(Pt){var Vt=[qt,new Ct((0,rt.cbrtNumber)(Ft),0).mul(new Ct(0,It+Math.PI*2/3).exp()),new Ct((0,rt.cbrtNumber)(Ft),0).mul(new Ct(0,It-Math.PI*2/3).exp())];return ht.matrix==="Array"?Vt:Et(Vt)}else return qt}function At(Nt){if(Nt.value&&(0,_e.isComplex)(Nt.value)){var Pt=Nt.clone();return Pt.value=1,Pt=Pt.pow(1/3),Pt.value=wt(Nt.value),Pt}else{var It=bt(Nt.value);It&&(Nt.value=St(Nt.value));var Ft;(0,_e.isBigNumber)(Nt.value)?Ft=new Rt(1).div(3):(0,_e.isFraction)(Nt.value)?Ft=new Tt(1,3):Ft=1/3;var qt=Nt.pow(Ft);return It&&(qt.value=St(qt.value)),qt}}});return cbrt$1.createCbrt=dt,cbrt$1}var ceil$1={},slicedToArray={exports:{}},arrayWithHoles={exports:{}},hasRequiredArrayWithHoles;function requireArrayWithHoles(){return hasRequiredArrayWithHoles||(hasRequiredArrayWithHoles=1,(function(et){function _e(tt){if(Array.isArray(tt))return tt}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(arrayWithHoles)),arrayWithHoles.exports}var iterableToArrayLimit={exports:{}},hasRequiredIterableToArrayLimit;function requireIterableToArrayLimit(){return hasRequiredIterableToArrayLimit||(hasRequiredIterableToArrayLimit=1,(function(et){function _e(tt,rt){var nt=tt==null?null:typeof Symbol<"u"&&tt[Symbol.iterator]||tt["@@iterator"];if(nt!=null){var st,dt,ft,ht,mt=[],bt=!0,St=!1;try{if(ft=(nt=nt.call(tt)).next,rt===0){if(Object(nt)!==nt)return;bt=!1}else for(;!(bt=(st=ft.call(nt)).done)&&(mt.push(st.value),mt.length!==rt);bt=!0);}catch(Et){St=!0,dt=Et}finally{try{if(!bt&&nt.return!=null&&(ht=nt.return(),Object(ht)!==ht))return}finally{if(St)throw dt}}return mt}}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(iterableToArrayLimit)),iterableToArrayLimit.exports}var unsupportedIterableToArray={exports:{}},arrayLikeToArray={exports:{}},hasRequiredArrayLikeToArray;function requireArrayLikeToArray(){return hasRequiredArrayLikeToArray||(hasRequiredArrayLikeToArray=1,(function(et){function _e(tt,rt){(rt==null||rt>tt.length)&&(rt=tt.length);for(var nt=0,st=Array(rt);nt<rt;nt++)st[nt]=tt[nt];return st}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(arrayLikeToArray)),arrayLikeToArray.exports}var hasRequiredUnsupportedIterableToArray;function requireUnsupportedIterableToArray(){return hasRequiredUnsupportedIterableToArray||(hasRequiredUnsupportedIterableToArray=1,(function(et){var _e=requireArrayLikeToArray();function tt(rt,nt){if(rt){if(typeof rt=="string")return _e(rt,nt);var st={}.toString.call(rt).slice(8,-1);return st==="Object"&&rt.constructor&&(st=rt.constructor.name),st==="Map"||st==="Set"?Array.from(rt):st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st)?_e(rt,nt):void 0}}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(unsupportedIterableToArray)),unsupportedIterableToArray.exports}var nonIterableRest={exports:{}},hasRequiredNonIterableRest;function requireNonIterableRest(){return hasRequiredNonIterableRest||(hasRequiredNonIterableRest=1,(function(et){function _e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(nonIterableRest)),nonIterableRest.exports}var hasRequiredSlicedToArray;function requireSlicedToArray(){return hasRequiredSlicedToArray||(hasRequiredSlicedToArray=1,(function(et){var _e=requireArrayWithHoles(),tt=requireIterableToArrayLimit(),rt=requireUnsupportedIterableToArray(),nt=requireNonIterableRest();function st(dt,ft){return _e(dt)||tt(dt,ft)||rt(dt,ft)||nt()}et.exports=st,et.exports.__esModule=!0,et.exports.default=et.exports})(slicedToArray)),slicedToArray.exports}var algorithm11={},hasRequiredAlgorithm11;function requireAlgorithm11(){if(hasRequiredAlgorithm11)return algorithm11;hasRequiredAlgorithm11=1,Object.defineProperty(algorithm11,"__esModule",{value:!0}),algorithm11.createAlgorithm11=void 0;var et=requireFactory(),_e="algorithm11",tt=["typed","equalScalar"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.equalScalar;return function(ht,mt,bt,St){var Et=ht._values,Ct=ht._index,Rt=ht._ptr,Tt=ht._size,wt=ht._datatype;if(!Et)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var At=Tt[0],Nt=Tt[1],Pt,It=dt,Ft=0,qt=bt;typeof wt=="string"&&(Pt=wt,It=st.find(dt,[Pt,Pt]),Ft=st.convert(0,Pt),mt=st.convert(mt,Pt),qt=st.find(bt,[Pt,Pt]));for(var Vt=[],Kt=[],jt=[],Ut=0;Ut<Nt;Ut++){jt[Ut]=Kt.length;for(var Ot=Rt[Ut],Wt=Rt[Ut+1],Bt=Ot;Bt<Wt;Bt++){var tr=Ct[Bt],Jt=St?qt(mt,Et[Bt]):qt(Et[Bt],mt);It(Jt,Ft)||(Kt.push(tr),Vt.push(Jt))}}return jt[Nt]=Kt.length,ht.createSparseMatrix({values:Vt,index:Kt,ptr:jt,size:[At,Nt],datatype:Pt})}});return algorithm11.createAlgorithm11=rt,algorithm11}var algorithm12={},hasRequiredAlgorithm12;function requireAlgorithm12(){if(hasRequiredAlgorithm12)return algorithm12;hasRequiredAlgorithm12=1,Object.defineProperty(algorithm12,"__esModule",{value:!0}),algorithm12.createAlgorithm12=void 0;var et=requireFactory(),_e="algorithm12",tt=["typed","DenseMatrix"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.DenseMatrix;return function(ht,mt,bt,St){var Et=ht._values,Ct=ht._index,Rt=ht._ptr,Tt=ht._size,wt=ht._datatype;if(!Et)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var At=Tt[0],Nt=Tt[1],Pt,It=bt;typeof wt=="string"&&(Pt=wt,mt=st.convert(mt,Pt),It=st.find(bt,[Pt,Pt]));for(var Ft=[],qt=[],Vt=[],Kt=0;Kt<Nt;Kt++){for(var jt=Kt+1,Ut=Rt[Kt],Ot=Rt[Kt+1],Wt=Ut;Wt<Ot;Wt++){var Bt=Ct[Wt];qt[Bt]=Et[Wt],Vt[Bt]=jt}for(var tr=0;tr<At;tr++)Kt===0&&(Ft[tr]=[]),Vt[tr]===jt?Ft[tr][Kt]=St?It(mt,qt[tr]):It(qt[tr],mt):Ft[tr][Kt]=St?It(mt,0):It(0,mt)}return new dt({data:Ft,size:[At,Nt],datatype:Pt})}});return algorithm12.createAlgorithm12=rt,algorithm12}var algorithm14={},hasRequiredAlgorithm14;function requireAlgorithm14(){if(hasRequiredAlgorithm14)return algorithm14;hasRequiredAlgorithm14=1,Object.defineProperty(algorithm14,"__esModule",{value:!0}),algorithm14.createAlgorithm14=void 0;var et=requireFactory(),_e=requireObject(),tt="algorithm14",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return function(mt,bt,St,Et){var Ct=mt._data,Rt=mt._size,Tt=mt._datatype,wt,At=St;typeof Tt=="string"&&(wt=Tt,bt=dt.convert(bt,wt),At=dt.find(St,[wt,wt]));var Nt=Rt.length>0?ft(At,0,Rt,Rt[0],Ct,bt,Et):[];return mt.createDenseMatrix({data:Nt,size:(0,_e.clone)(Rt),datatype:wt})};function ft(ht,mt,bt,St,Et,Ct,Rt){var Tt=[];if(mt===bt.length-1)for(var wt=0;wt<St;wt++)Tt[wt]=Rt?ht(Ct,Et[wt]):ht(Et[wt],Ct);else for(var At=0;At<St;At++)Tt[At]=ft(ht,mt+1,bt,bt[mt+1],Et[At],Ct,Rt);return Tt}});return algorithm14.createAlgorithm14=nt,algorithm14}var hasRequiredCeil$1;function requireCeil$1(){if(hasRequiredCeil$1)return ceil$1;hasRequiredCeil$1=1;var et=requireInteropRequireDefault();Object.defineProperty(ceil$1,"__esModule",{value:!0}),ceil$1.createCeilNumber=ceil$1.createCeil=void 0;var _e=et(requireSlicedToArray()),tt=et(requireDecimal()),rt=requireFactory(),nt=requireCollection(),st=requireNumber$3(),dt=requireNearlyEqual(),ft=requireAlgorithm11(),ht=requireAlgorithm12(),mt=requireAlgorithm14(),bt="ceil",St=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],Et=(0,rt.factory)(bt,["typed","config","round"],function(Rt){var Tt=Rt.typed,wt=Rt.config,At=Rt.round;return Tt(bt,{number:function(Pt){return(0,st.nearlyEqual)(Pt,At(Pt),wt.epsilon)?At(Pt):Math.ceil(Pt)},"number, number":function(Pt,It){if((0,st.nearlyEqual)(Pt,At(Pt,It),wt.epsilon))return At(Pt,It);var Ft="".concat(Pt,"e").split("e"),qt=(0,_e.default)(Ft,2),Vt=qt[0],Kt=qt[1],jt=Math.ceil(Number("".concat(Vt,"e").concat(Number(Kt)+It))),Ut="".concat(jt,"e").split("e"),Ot=(0,_e.default)(Ut,2);return Vt=Ot[0],Kt=Ot[1],Number("".concat(Vt,"e").concat(Number(Kt)-It))}})});ceil$1.createCeilNumber=Et;var Ct=(0,rt.factory)(bt,St,function(Rt){var Tt=Rt.typed,wt=Rt.config,At=Rt.round,Nt=Rt.matrix,Pt=Rt.equalScalar,It=Rt.zeros,Ft=Rt.DenseMatrix,qt=(0,ft.createAlgorithm11)({typed:Tt,equalScalar:Pt}),Vt=(0,ht.createAlgorithm12)({typed:Tt,DenseMatrix:Ft}),Kt=(0,mt.createAlgorithm14)({typed:Tt}),jt=Et({typed:Tt,config:wt,round:At});return Tt("ceil",{number:jt.signatures.number,"number,number":jt.signatures["number,number"],Complex:function(Ot){return Ot.ceil()},"Complex, number":function(Ot,Wt){return Ot.ceil(Wt)},"Complex, BigNumber":function(Ot,Wt){return Ot.ceil(Wt.toNumber())},BigNumber:function(Ot){return(0,dt.nearlyEqual)(Ot,At(Ot),wt.epsilon)?At(Ot):Ot.ceil()},"BigNumber, BigNumber":function(Ot,Wt){return(0,dt.nearlyEqual)(Ot,At(Ot,Wt),wt.epsilon)?At(Ot,Wt):Ot.toDecimalPlaces(Wt.toNumber(),tt.default.ROUND_CEIL)},Fraction:function(Ot){return Ot.ceil()},"Fraction, number":function(Ot,Wt){return Ot.ceil(Wt)},"Fraction, BigNumber":function(Ot,Wt){return Ot.ceil(Wt.toNumber())},"Array | Matrix":function(Ot){return(0,nt.deepMap)(Ot,this,!0)},"Array, number | BigNumber":function(Ot,Wt){var Bt=this;return(0,nt.deepMap)(Ot,function(tr){return Bt(tr,Wt)},!0)},"SparseMatrix, number | BigNumber":function(Ot,Wt){return qt(Ot,Wt,this,!1)},"DenseMatrix, number | BigNumber":function(Ot,Wt){return Kt(Ot,Wt,this,!1)},"number | Complex | Fraction | BigNumber, Array":function(Ot,Wt){return Kt(Nt(Wt),Ot,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(Ot,Wt){return Pt(Ot,0)?It(Wt.size(),Wt.storage()):Wt.storage()==="dense"?Kt(Wt,Ot,this,!0):Vt(Wt,Ot,this,!0)}})});return ceil$1.createCeil=Ct,ceil$1}var cube$1={},hasRequiredCube$1;function requireCube$1(){if(hasRequiredCube$1)return cube$1;hasRequiredCube$1=1,Object.defineProperty(cube$1,"__esModule",{value:!0}),cube$1.createCube=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="cube",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.cubeNumber,Complex:function(mt){return mt.mul(mt).mul(mt)},BigNumber:function(mt){return mt.times(mt).times(mt)},Fraction:function(mt){return mt.pow(3)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)},Unit:function(mt){return mt.pow(3)}})});return cube$1.createCube=st,cube$1}var exp$1={},hasRequiredExp$1;function requireExp$1(){if(hasRequiredExp$1)return exp$1;hasRequiredExp$1=1,Object.defineProperty(exp$1,"__esModule",{value:!0}),exp$1.createExp=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="exp",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.expNumber,Complex:function(mt){return mt.exp()},BigNumber:function(mt){return mt.exp()},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return exp$1.createExp=st,exp$1}var expm1$1={},hasRequiredExpm1$1;function requireExpm1$1(){if(hasRequiredExpm1$1)return expm1$1;hasRequiredExpm1$1=1,Object.defineProperty(expm1$1,"__esModule",{value:!0}),expm1$1.createExpm1=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="expm1",nt=["typed","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.Complex;return ft(rt,{number:tt.expm1Number,Complex:function(bt){var St=Math.exp(bt.re);return new ht(St*Math.cos(bt.im)-1,St*Math.sin(bt.im))},BigNumber:function(bt){return bt.exp().minus(1)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return expm1$1.createExpm1=st,expm1$1}var fix$1={},hasRequiredFix$1;function requireFix$1(){if(hasRequiredFix$1)return fix$1;hasRequiredFix$1=1,Object.defineProperty(fix$1,"__esModule",{value:!0}),fix$1.createFixNumber=fix$1.createFix=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireAlgorithm12(),rt=requireAlgorithm14(),nt="fix",st=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],dt=(0,et.factory)(nt,["typed","ceil","floor"],function(ht){var mt=ht.typed,bt=ht.ceil,St=ht.floor;return mt(nt,{number:function(Ct){return Ct>0?St(Ct):bt(Ct)},"number, number":function(Ct,Rt){return Ct>0?St(Ct,Rt):bt(Ct,Rt)}})});fix$1.createFixNumber=dt;var ft=(0,et.factory)(nt,st,function(ht){var mt=ht.typed,bt=ht.Complex,St=ht.matrix,Et=ht.ceil,Ct=ht.floor,Rt=ht.equalScalar,Tt=ht.zeros,wt=ht.DenseMatrix,At=(0,tt.createAlgorithm12)({typed:mt,DenseMatrix:wt}),Nt=(0,rt.createAlgorithm14)({typed:mt}),Pt=dt({typed:mt,ceil:Et,floor:Ct});return mt("fix",{number:Pt.signatures.number,"number, number | BigNumber":Pt.signatures["number,number"],Complex:function(Ft){return new bt(Ft.re>0?Math.floor(Ft.re):Math.ceil(Ft.re),Ft.im>0?Math.floor(Ft.im):Math.ceil(Ft.im))},"Complex, number":function(Ft,qt){return new bt(Ft.re>0?Ct(Ft.re,qt):Et(Ft.re,qt),Ft.im>0?Ct(Ft.im,qt):Et(Ft.im,qt))},"Complex, BigNumber":function(Ft,qt){var Vt=qt.toNumber();return new bt(Ft.re>0?Ct(Ft.re,Vt):Et(Ft.re,Vt),Ft.im>0?Ct(Ft.im,Vt):Et(Ft.im,Vt))},BigNumber:function(Ft){return Ft.isNegative()?Et(Ft):Ct(Ft)},"BigNumber, number | BigNumber":function(Ft,qt){return Ft.isNegative()?Et(Ft,qt):Ct(Ft,qt)},Fraction:function(Ft){return Ft.s<0?Ft.ceil():Ft.floor()},"Fraction, number | BigNumber":function(Ft,qt){return Ft.s<0?Et(Ft,qt):Ct(Ft,qt)},"Array | Matrix":function(Ft){return(0,_e.deepMap)(Ft,this,!0)},"Array | Matrix, number | BigNumber":function(Ft,qt){var Vt=this;return(0,_e.deepMap)(Ft,function(Kt){return Vt(Kt,qt)},!0)},"number | Complex | Fraction | BigNumber, Array":function(Ft,qt){return Nt(St(qt),Ft,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(Ft,qt){return Rt(Ft,0)?Tt(qt.size(),qt.storage()):qt.storage()==="dense"?Nt(qt,Ft,this,!0):At(qt,Ft,this,!0)}})});return fix$1.createFix=ft,fix$1}var floor$1={},hasRequiredFloor$1;function requireFloor$1(){if(hasRequiredFloor$1)return floor$1;hasRequiredFloor$1=1;var et=requireInteropRequireDefault();Object.defineProperty(floor$1,"__esModule",{value:!0}),floor$1.createFloorNumber=floor$1.createFloor=void 0;var _e=et(requireSlicedToArray()),tt=et(requireDecimal()),rt=requireFactory(),nt=requireCollection(),st=requireNumber$3(),dt=requireNearlyEqual(),ft=requireAlgorithm11(),ht=requireAlgorithm12(),mt=requireAlgorithm14(),bt="floor",St=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],Et=(0,rt.factory)(bt,["typed","config","round"],function(Rt){var Tt=Rt.typed,wt=Rt.config,At=Rt.round;return Tt(bt,{number:function(Pt){return(0,st.nearlyEqual)(Pt,At(Pt),wt.epsilon)?At(Pt):Math.floor(Pt)},"number, number":function(Pt,It){if((0,st.nearlyEqual)(Pt,At(Pt,It),wt.epsilon))return At(Pt,It);var Ft="".concat(Pt,"e").split("e"),qt=(0,_e.default)(Ft,2),Vt=qt[0],Kt=qt[1],jt=Math.floor(Number("".concat(Vt,"e").concat(Number(Kt)+It))),Ut="".concat(jt,"e").split("e"),Ot=(0,_e.default)(Ut,2);return Vt=Ot[0],Kt=Ot[1],Number("".concat(Vt,"e").concat(Number(Kt)-It))}})});floor$1.createFloorNumber=Et;var Ct=(0,rt.factory)(bt,St,function(Rt){var Tt=Rt.typed,wt=Rt.config,At=Rt.round,Nt=Rt.matrix,Pt=Rt.equalScalar,It=Rt.zeros,Ft=Rt.DenseMatrix,qt=(0,ft.createAlgorithm11)({typed:Tt,equalScalar:Pt}),Vt=(0,ht.createAlgorithm12)({typed:Tt,DenseMatrix:Ft}),Kt=(0,mt.createAlgorithm14)({typed:Tt}),jt=Et({typed:Tt,config:wt,round:At});return Tt("floor",{number:jt.signatures.number,"number,number":jt.signatures["number,number"],Complex:function(Ot){return Ot.floor()},"Complex, number":function(Ot,Wt){return Ot.floor(Wt)},"Complex, BigNumber":function(Ot,Wt){return Ot.floor(Wt.toNumber())},BigNumber:function(Ot){return(0,dt.nearlyEqual)(Ot,At(Ot),wt.epsilon)?At(Ot):Ot.floor()},"BigNumber, BigNumber":function(Ot,Wt){return(0,dt.nearlyEqual)(Ot,At(Ot,Wt),wt.epsilon)?At(Ot,Wt):Ot.toDecimalPlaces(Wt.toNumber(),tt.default.ROUND_FLOOR)},Fraction:function(Ot){return Ot.floor()},"Fraction, number":function(Ot,Wt){return Ot.floor(Wt)},"Fraction, BigNumber":function(Ot,Wt){return Ot.floor(Wt.toNumber())},"Array | Matrix":function(Ot){return(0,nt.deepMap)(Ot,this,!0)},"Array, number | BigNumber":function(Ot,Wt){var Bt=this;return(0,nt.deepMap)(Ot,function(tr){return Bt(tr,Wt)},!0)},"SparseMatrix, number | BigNumber":function(Ot,Wt){return qt(Ot,Wt,this,!1)},"DenseMatrix, number | BigNumber":function(Ot,Wt){return Kt(Ot,Wt,this,!1)},"number | Complex | Fraction | BigNumber, Array":function(Ot,Wt){return Kt(Nt(Wt),Ot,this,!0).valueOf()},"number | Complex | Fraction | BigNumber, Matrix":function(Ot,Wt){return Pt(Ot,0)?It(Wt.size(),Wt.storage()):Wt.storage()==="dense"?Kt(Wt,Ot,this,!0):Vt(Wt,Ot,this,!0)}})});return floor$1.createFloor=Ct,floor$1}var gcd$1={},algorithm01={},hasRequiredAlgorithm01;function requireAlgorithm01(){if(hasRequiredAlgorithm01)return algorithm01;hasRequiredAlgorithm01=1,Object.defineProperty(algorithm01,"__esModule",{value:!0}),algorithm01.createAlgorithm01=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm01",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return function(ht,mt,bt,St){var Et=ht._data,Ct=ht._size,Rt=ht._datatype,Tt=mt._values,wt=mt._index,At=mt._ptr,Nt=mt._size,Pt=mt._datatype;if(Ct.length!==Nt.length)throw new _e.DimensionError(Ct.length,Nt.length);if(Ct[0]!==Nt[0]||Ct[1]!==Nt[1])throw new RangeError("Dimension mismatch. Matrix A ("+Ct+") must match Matrix B ("+Nt+")");if(!Tt)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var It=Ct[0],Ft=Ct[1],qt=typeof Rt=="string"&&Rt===Pt?Rt:void 0,Vt=qt?dt.find(bt,[qt,qt]):bt,Kt,jt,Ut=[];for(Kt=0;Kt<It;Kt++)Ut[Kt]=[];var Ot=[],Wt=[];for(jt=0;jt<Ft;jt++){for(var Bt=jt+1,tr=At[jt],Jt=At[jt+1],ar=tr;ar<Jt;ar++)Kt=wt[ar],Ot[Kt]=St?Vt(Tt[ar],Et[Kt][jt]):Vt(Et[Kt][jt],Tt[ar]),Wt[Kt]=Bt;for(Kt=0;Kt<It;Kt++)Wt[Kt]===Bt?Ut[Kt][jt]=Ot[Kt]:Ut[Kt][jt]=Et[Kt][jt]}return ht.createDenseMatrix({data:Ut,size:[It,Ft],datatype:qt})}});return algorithm01.createAlgorithm01=nt,algorithm01}var algorithm04={},hasRequiredAlgorithm04;function requireAlgorithm04(){if(hasRequiredAlgorithm04)return algorithm04;hasRequiredAlgorithm04=1,Object.defineProperty(algorithm04,"__esModule",{value:!0}),algorithm04.createAlgorithm04=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm04",rt=["typed","equalScalar"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.equalScalar;return function(mt,bt,St){var Et=mt._values,Ct=mt._index,Rt=mt._ptr,Tt=mt._size,wt=mt._datatype,At=bt._values,Nt=bt._index,Pt=bt._ptr,It=bt._size,Ft=bt._datatype;if(Tt.length!==It.length)throw new _e.DimensionError(Tt.length,It.length);if(Tt[0]!==It[0]||Tt[1]!==It[1])throw new RangeError("Dimension mismatch. Matrix A ("+Tt+") must match Matrix B ("+It+")");var qt=Tt[0],Vt=Tt[1],Kt,jt=ft,Ut=0,Ot=St;typeof wt=="string"&&wt===Ft&&(Kt=wt,jt=dt.find(ft,[Kt,Kt]),Ut=dt.convert(0,Kt),Ot=dt.find(St,[Kt,Kt]));var Wt=Et&&At?[]:void 0,Bt=[],tr=[],Jt=Et&&At?[]:void 0,ar=Et&&At?[]:void 0,pr=[],cr=[],gr,Sr,Er,Vr,Wr;for(Sr=0;Sr<Vt;Sr++){tr[Sr]=Bt.length;var Mr=Sr+1;for(Vr=Rt[Sr],Wr=Rt[Sr+1],Er=Vr;Er<Wr;Er++)gr=Ct[Er],Bt.push(gr),pr[gr]=Mr,Jt&&(Jt[gr]=Et[Er]);for(Vr=Pt[Sr],Wr=Pt[Sr+1],Er=Vr;Er<Wr;Er++)if(gr=Nt[Er],pr[gr]===Mr){if(Jt){var Nr=Ot(Jt[gr],At[Er]);jt(Nr,Ut)?pr[gr]=null:Jt[gr]=Nr}}else Bt.push(gr),cr[gr]=Mr,ar&&(ar[gr]=At[Er]);if(Jt&&ar)for(Er=tr[Sr];Er<Bt.length;)gr=Bt[Er],pr[gr]===Mr?(Wt[Er]=Jt[gr],Er++):cr[gr]===Mr?(Wt[Er]=ar[gr],Er++):Bt.splice(Er,1)}return tr[Vt]=Bt.length,mt.createSparseMatrix({values:Wt,index:Bt,ptr:tr,size:[qt,Vt],datatype:Kt})}});return algorithm04.createAlgorithm04=nt,algorithm04}var algorithm10={},hasRequiredAlgorithm10;function requireAlgorithm10(){if(hasRequiredAlgorithm10)return algorithm10;hasRequiredAlgorithm10=1,Object.defineProperty(algorithm10,"__esModule",{value:!0}),algorithm10.createAlgorithm10=void 0;var et=requireFactory(),_e="algorithm10",tt=["typed","DenseMatrix"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.DenseMatrix;return function(ht,mt,bt,St){var Et=ht._values,Ct=ht._index,Rt=ht._ptr,Tt=ht._size,wt=ht._datatype;if(!Et)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var At=Tt[0],Nt=Tt[1],Pt,It=bt;typeof wt=="string"&&(Pt=wt,mt=st.convert(mt,Pt),It=st.find(bt,[Pt,Pt]));for(var Ft=[],qt=[],Vt=[],Kt=0;Kt<Nt;Kt++){for(var jt=Kt+1,Ut=Rt[Kt],Ot=Rt[Kt+1],Wt=Ut;Wt<Ot;Wt++){var Bt=Ct[Wt];qt[Bt]=Et[Wt],Vt[Bt]=jt}for(var tr=0;tr<At;tr++)Kt===0&&(Ft[tr]=[]),Vt[tr]===jt?Ft[tr][Kt]=St?It(mt,qt[tr]):It(qt[tr],mt):Ft[tr][Kt]=mt}return new dt({data:Ft,size:[At,Nt],datatype:Pt})}});return algorithm10.createAlgorithm10=rt,algorithm10}var algorithm13={},hasRequiredAlgorithm13;function requireAlgorithm13(){if(hasRequiredAlgorithm13)return algorithm13;hasRequiredAlgorithm13=1,Object.defineProperty(algorithm13,"__esModule",{value:!0}),algorithm13.createAlgorithm13=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm13",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return function(mt,bt,St){var Et=mt._data,Ct=mt._size,Rt=mt._datatype,Tt=bt._data,wt=bt._size,At=bt._datatype,Nt=[];if(Ct.length!==wt.length)throw new _e.DimensionError(Ct.length,wt.length);for(var Pt=0;Pt<Ct.length;Pt++){if(Ct[Pt]!==wt[Pt])throw new RangeError("Dimension mismatch. Matrix A ("+Ct+") must match Matrix B ("+wt+")");Nt[Pt]=Ct[Pt]}var It,Ft=St;typeof Rt=="string"&&Rt===At&&(It=Rt,Ft=dt.find(St,[It,It]));var qt=Nt.length>0?ft(Ft,0,Nt,Nt[0],Et,Tt):[];return mt.createDenseMatrix({data:qt,size:Nt,datatype:It})};function ft(ht,mt,bt,St,Et,Ct){var Rt=[];if(mt===bt.length-1)for(var Tt=0;Tt<St;Tt++)Rt[Tt]=ht(Et[Tt],Ct[Tt]);else for(var wt=0;wt<St;wt++)Rt[wt]=ft(ht,mt+1,bt,bt[mt+1],Et[wt],Ct[wt]);return Rt}});return algorithm13.createAlgorithm13=nt,algorithm13}var hasRequiredGcd$1;function requireGcd$1(){if(hasRequiredGcd$1)return gcd$1;hasRequiredGcd$1=1,Object.defineProperty(gcd$1,"__esModule",{value:!0}),gcd$1.createGcd=void 0;var et=requireFactory(),_e=requireAlgorithm01(),tt=requireAlgorithm04(),rt=requireAlgorithm10(),nt=requireAlgorithm13(),st=requireAlgorithm14(),dt=requireNumber$2(),ft="gcd",ht=["typed","matrix","equalScalar","BigNumber","DenseMatrix"],mt=(0,et.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=bt.BigNumber,Tt=bt.DenseMatrix,wt=(0,_e.createAlgorithm01)({typed:St}),At=(0,tt.createAlgorithm04)({typed:St,equalScalar:Ct}),Nt=(0,rt.createAlgorithm10)({typed:St,DenseMatrix:Tt}),Pt=(0,nt.createAlgorithm13)({typed:St}),It=(0,st.createAlgorithm14)({typed:St});return St(ft,{"number, number":dt.gcdNumber,"BigNumber, BigNumber":Ft,"Fraction, Fraction":function(Vt,Kt){return Vt.gcd(Kt)},"SparseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,this)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return wt(Kt,Vt,this,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return wt(Vt,Kt,this,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return Pt(Vt,Kt,this)},"Array, Array":function(Vt,Kt){return this(Et(Vt),Et(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Et(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Et(Kt))},"SparseMatrix, number | BigNumber":function(Vt,Kt){return Nt(Vt,Kt,this,!1)},"DenseMatrix, number | BigNumber":function(Vt,Kt){return It(Vt,Kt,this,!1)},"number | BigNumber, SparseMatrix":function(Vt,Kt){return Nt(Kt,Vt,this,!0)},"number | BigNumber, DenseMatrix":function(Vt,Kt){return It(Kt,Vt,this,!0)},"Array, number | BigNumber":function(Vt,Kt){return It(Et(Vt),Kt,this,!1).valueOf()},"number | BigNumber, Array":function(Vt,Kt){return It(Et(Kt),Vt,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(Vt,Kt,jt){for(var Ut=this(Vt,Kt),Ot=0;Ot<jt.length;Ot++)Ut=this(Ut,jt[Ot]);return Ut}});function Ft(qt,Vt){if(!qt.isInt()||!Vt.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var Kt=new Rt(0);!Vt.isZero();){var jt=qt.mod(Vt);qt=Vt,Vt=jt}return qt.lt(Kt)?qt.neg():qt}});return gcd$1.createGcd=mt,gcd$1}var lcm$1={},algorithm02={},hasRequiredAlgorithm02;function requireAlgorithm02(){if(hasRequiredAlgorithm02)return algorithm02;hasRequiredAlgorithm02=1,Object.defineProperty(algorithm02,"__esModule",{value:!0}),algorithm02.createAlgorithm02=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm02",rt=["typed","equalScalar"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.equalScalar;return function(mt,bt,St,Et){var Ct=mt._data,Rt=mt._size,Tt=mt._datatype,wt=bt._values,At=bt._index,Nt=bt._ptr,Pt=bt._size,It=bt._datatype;if(Rt.length!==Pt.length)throw new _e.DimensionError(Rt.length,Pt.length);if(Rt[0]!==Pt[0]||Rt[1]!==Pt[1])throw new RangeError("Dimension mismatch. Matrix A ("+Rt+") must match Matrix B ("+Pt+")");if(!wt)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var Ft=Rt[0],qt=Rt[1],Vt,Kt=ft,jt=0,Ut=St;typeof Tt=="string"&&Tt===It&&(Vt=Tt,Kt=dt.find(ft,[Vt,Vt]),jt=dt.convert(0,Vt),Ut=dt.find(St,[Vt,Vt]));for(var Ot=[],Wt=[],Bt=[],tr=0;tr<qt;tr++){Bt[tr]=Wt.length;for(var Jt=Nt[tr],ar=Nt[tr+1],pr=Jt;pr<ar;pr++){var cr=At[pr],gr=Et?Ut(wt[pr],Ct[cr][tr]):Ut(Ct[cr][tr],wt[pr]);Kt(gr,jt)||(Wt.push(cr),Ot.push(gr))}}return Bt[qt]=Wt.length,bt.createSparseMatrix({values:Ot,index:Wt,ptr:Bt,size:[Ft,qt],datatype:Vt})}});return algorithm02.createAlgorithm02=nt,algorithm02}var algorithm06={},hasRequiredAlgorithm06;function requireAlgorithm06(){if(hasRequiredAlgorithm06)return algorithm06;hasRequiredAlgorithm06=1,Object.defineProperty(algorithm06,"__esModule",{value:!0}),algorithm06.createAlgorithm06=void 0;var et=requireFactory(),_e=requireDimensionError(),tt=requireCollection(),rt="algorithm06",nt=["typed","equalScalar"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.equalScalar;return function(bt,St,Et){var Ct=bt._values,Rt=bt._size,Tt=bt._datatype,wt=St._values,At=St._size,Nt=St._datatype;if(Rt.length!==At.length)throw new _e.DimensionError(Rt.length,At.length);if(Rt[0]!==At[0]||Rt[1]!==At[1])throw new RangeError("Dimension mismatch. Matrix A ("+Rt+") must match Matrix B ("+At+")");var Pt=Rt[0],It=Rt[1],Ft,qt=ht,Vt=0,Kt=Et;typeof Tt=="string"&&Tt===Nt&&(Ft=Tt,qt=ft.find(ht,[Ft,Ft]),Vt=ft.convert(0,Ft),Kt=ft.find(Et,[Ft,Ft]));for(var jt=Ct&&wt?[]:void 0,Ut=[],Ot=[],Wt=jt?[]:void 0,Bt=[],tr=[],Jt=0;Jt<It;Jt++){Ot[Jt]=Ut.length;var ar=Jt+1;if((0,tt.scatter)(bt,Jt,Bt,Wt,tr,ar,Ut,Kt),(0,tt.scatter)(St,Jt,Bt,Wt,tr,ar,Ut,Kt),Wt)for(var pr=Ot[Jt];pr<Ut.length;){var cr=Ut[pr];if(tr[cr]===ar){var gr=Wt[cr];qt(gr,Vt)?Ut.splice(pr,1):(jt.push(gr),pr++)}else Ut.splice(pr,1)}else for(var Sr=Ot[Jt];Sr<Ut.length;){var Er=Ut[Sr];tr[Er]!==ar?Ut.splice(Sr,1):Sr++}}return Ot[It]=Ut.length,bt.createSparseMatrix({values:jt,index:Ut,ptr:Ot,size:[Pt,It],datatype:Ft})}});return algorithm06.createAlgorithm06=st,algorithm06}var hasRequiredLcm$1;function requireLcm$1(){if(hasRequiredLcm$1)return lcm$1;hasRequiredLcm$1=1,Object.defineProperty(lcm$1,"__esModule",{value:!0}),lcm$1.createLcm=void 0;var et=requireFactory(),_e=requireAlgorithm02(),tt=requireAlgorithm06(),rt=requireAlgorithm11(),nt=requireAlgorithm13(),st=requireAlgorithm14(),dt=requireNumber$2(),ft="lcm",ht=["typed","matrix","equalScalar"],mt=(0,et.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=(0,_e.createAlgorithm02)({typed:St,equalScalar:Ct}),Tt=(0,tt.createAlgorithm06)({typed:St,equalScalar:Ct}),wt=(0,rt.createAlgorithm11)({typed:St,equalScalar:Ct}),At=(0,nt.createAlgorithm13)({typed:St}),Nt=(0,st.createAlgorithm14)({typed:St});return St(ft,{"number, number":dt.lcmNumber,"BigNumber, BigNumber":Pt,"Fraction, Fraction":function(Ft,qt){return Ft.lcm(qt)},"SparseMatrix, SparseMatrix":function(Ft,qt){return Tt(Ft,qt,this)},"SparseMatrix, DenseMatrix":function(Ft,qt){return Rt(qt,Ft,this,!0)},"DenseMatrix, SparseMatrix":function(Ft,qt){return Rt(Ft,qt,this,!1)},"DenseMatrix, DenseMatrix":function(Ft,qt){return At(Ft,qt,this)},"Array, Array":function(Ft,qt){return this(Et(Ft),Et(qt)).valueOf()},"Array, Matrix":function(Ft,qt){return this(Et(Ft),qt)},"Matrix, Array":function(Ft,qt){return this(Ft,Et(qt))},"SparseMatrix, number | BigNumber":function(Ft,qt){return wt(Ft,qt,this,!1)},"DenseMatrix, number | BigNumber":function(Ft,qt){return Nt(Ft,qt,this,!1)},"number | BigNumber, SparseMatrix":function(Ft,qt){return wt(qt,Ft,this,!0)},"number | BigNumber, DenseMatrix":function(Ft,qt){return Nt(qt,Ft,this,!0)},"Array, number | BigNumber":function(Ft,qt){return Nt(Et(Ft),qt,this,!1).valueOf()},"number | BigNumber, Array":function(Ft,qt){return Nt(Et(qt),Ft,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(Ft,qt,Vt){for(var Kt=this(Ft,qt),jt=0;jt<Vt.length;jt++)Kt=this(Kt,Vt[jt]);return Kt}});function Pt(It,Ft){if(!It.isInt()||!Ft.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(It.isZero())return It;if(Ft.isZero())return Ft;for(var qt=It.times(Ft);!Ft.isZero();){var Vt=Ft;Ft=It.mod(Vt),It=Vt}return qt.div(It).abs()}});return lcm$1.createLcm=mt,lcm$1}var log10$1={},hasRequiredLog10$1;function requireLog10$1(){if(hasRequiredLog10$1)return log10$1;hasRequiredLog10$1=1,Object.defineProperty(log10$1,"__esModule",{value:!0}),log10$1.createLog10=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="log10",nt=["typed","config","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex;return ft(rt,{number:function(St){return St>=0||ht.predictable?(0,tt.log10Number)(St):new mt(St,0).log().div(Math.LN10)},Complex:function(St){return new mt(St).log().div(Math.LN10)},BigNumber:function(St){return!St.isNegative()||ht.predictable?St.log():new mt(St.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this)}})});return log10$1.createLog10=st,log10$1}var log2$1={},hasRequiredLog2$1;function requireLog2$1(){if(hasRequiredLog2$1)return log2$1;hasRequiredLog2$1=1,Object.defineProperty(log2$1,"__esModule",{value:!0}),log2$1.createLog2=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="log2",nt=["typed","config","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex;return ft(rt,{number:function(Et){return Et>=0||ht.predictable?(0,tt.log2Number)(Et):bt(new mt(Et,0))},Complex:bt,BigNumber:function(Et){return!Et.isNegative()||ht.predictable?Et.log(2):bt(new mt(Et.toNumber(),0))},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)}});function bt(St){var Et=Math.sqrt(St.re*St.re+St.im*St.im);return new mt(Math.log2?Math.log2(Et):Math.log(Et)/Math.LN2,Math.atan2(St.im,St.re)/Math.LN2)}});return log2$1.createLog2=st,log2$1}var mod$1={},algorithm03={},hasRequiredAlgorithm03;function requireAlgorithm03(){if(hasRequiredAlgorithm03)return algorithm03;hasRequiredAlgorithm03=1,Object.defineProperty(algorithm03,"__esModule",{value:!0}),algorithm03.createAlgorithm03=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm03",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return function(ht,mt,bt,St){var Et=ht._data,Ct=ht._size,Rt=ht._datatype,Tt=mt._values,wt=mt._index,At=mt._ptr,Nt=mt._size,Pt=mt._datatype;if(Ct.length!==Nt.length)throw new _e.DimensionError(Ct.length,Nt.length);if(Ct[0]!==Nt[0]||Ct[1]!==Nt[1])throw new RangeError("Dimension mismatch. Matrix A ("+Ct+") must match Matrix B ("+Nt+")");if(!Tt)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var It=Ct[0],Ft=Ct[1],qt,Vt=0,Kt=bt;typeof Rt=="string"&&Rt===Pt&&(qt=Rt,Vt=dt.convert(0,qt),Kt=dt.find(bt,[qt,qt]));for(var jt=[],Ut=0;Ut<It;Ut++)jt[Ut]=[];for(var Ot=[],Wt=[],Bt=0;Bt<Ft;Bt++){for(var tr=Bt+1,Jt=At[Bt],ar=At[Bt+1],pr=Jt;pr<ar;pr++){var cr=wt[pr];Ot[cr]=St?Kt(Tt[pr],Et[cr][Bt]):Kt(Et[cr][Bt],Tt[pr]),Wt[cr]=tr}for(var gr=0;gr<It;gr++)Wt[gr]===tr?jt[gr][Bt]=Ot[gr]:jt[gr][Bt]=St?Kt(Vt,Et[gr][Bt]):Kt(Et[gr][Bt],Vt)}return ht.createDenseMatrix({data:jt,size:[It,Ft],datatype:qt})}});return algorithm03.createAlgorithm03=nt,algorithm03}var algorithm05={},hasRequiredAlgorithm05;function requireAlgorithm05(){if(hasRequiredAlgorithm05)return algorithm05;hasRequiredAlgorithm05=1,Object.defineProperty(algorithm05,"__esModule",{value:!0}),algorithm05.createAlgorithm05=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm05",rt=["typed","equalScalar"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.equalScalar;return function(mt,bt,St){var Et=mt._values,Ct=mt._index,Rt=mt._ptr,Tt=mt._size,wt=mt._datatype,At=bt._values,Nt=bt._index,Pt=bt._ptr,It=bt._size,Ft=bt._datatype;if(Tt.length!==It.length)throw new _e.DimensionError(Tt.length,It.length);if(Tt[0]!==It[0]||Tt[1]!==It[1])throw new RangeError("Dimension mismatch. Matrix A ("+Tt+") must match Matrix B ("+It+")");var qt=Tt[0],Vt=Tt[1],Kt,jt=ft,Ut=0,Ot=St;typeof wt=="string"&&wt===Ft&&(Kt=wt,jt=dt.find(ft,[Kt,Kt]),Ut=dt.convert(0,Kt),Ot=dt.find(St,[Kt,Kt]));var Wt=Et&&At?[]:void 0,Bt=[],tr=[],Jt=Wt?[]:void 0,ar=Wt?[]:void 0,pr=[],cr=[],gr,Sr,Er,Vr;for(Sr=0;Sr<Vt;Sr++){tr[Sr]=Bt.length;var Wr=Sr+1;for(Er=Rt[Sr],Vr=Rt[Sr+1];Er<Vr;Er++)gr=Ct[Er],Bt.push(gr),pr[gr]=Wr,Jt&&(Jt[gr]=Et[Er]);for(Er=Pt[Sr],Vr=Pt[Sr+1];Er<Vr;Er++)gr=Nt[Er],pr[gr]!==Wr&&Bt.push(gr),cr[gr]=Wr,ar&&(ar[gr]=At[Er]);if(Wt)for(Er=tr[Sr];Er<Bt.length;){gr=Bt[Er];var Mr=pr[gr],Nr=cr[gr];if(Mr===Wr||Nr===Wr){var Yr=Mr===Wr?Jt[gr]:Ut,Or=Nr===Wr?ar[gr]:Ut,Ar=Ot(Yr,Or);jt(Ar,Ut)?Bt.splice(Er,1):(Wt.push(Ar),Er++)}}}return tr[Vt]=Bt.length,mt.createSparseMatrix({values:Wt,index:Bt,ptr:tr,size:[qt,Vt],datatype:Kt})}});return algorithm05.createAlgorithm05=nt,algorithm05}var hasRequiredMod$1;function requireMod$1(){if(hasRequiredMod$1)return mod$1;hasRequiredMod$1=1,Object.defineProperty(mod$1,"__esModule",{value:!0}),mod$1.createMod=void 0;var et=requireFactory(),_e=requireAlgorithm02(),tt=requireAlgorithm03(),rt=requireAlgorithm05(),nt=requireAlgorithm11(),st=requireAlgorithm12(),dt=requireAlgorithm13(),ft=requireAlgorithm14(),ht=requireNumber$2(),mt="mod",bt=["typed","matrix","equalScalar","DenseMatrix"],St=(0,et.factory)(mt,bt,function(Et){var Ct=Et.typed,Rt=Et.matrix,Tt=Et.equalScalar,wt=Et.DenseMatrix,At=(0,_e.createAlgorithm02)({typed:Ct,equalScalar:Tt}),Nt=(0,tt.createAlgorithm03)({typed:Ct}),Pt=(0,rt.createAlgorithm05)({typed:Ct,equalScalar:Tt}),It=(0,nt.createAlgorithm11)({typed:Ct,equalScalar:Tt}),Ft=(0,st.createAlgorithm12)({typed:Ct,DenseMatrix:wt}),qt=(0,dt.createAlgorithm13)({typed:Ct}),Vt=(0,ft.createAlgorithm14)({typed:Ct});return Ct(mt,{"number, number":ht.modNumber,"BigNumber, BigNumber":function(jt,Ut){if(Ut.isNeg())throw new Error("Cannot calculate mod for a negative divisor");return Ut.isZero()?jt:jt.mod(Ut)},"Fraction, Fraction":function(jt,Ut){if(Ut.compare(0)<0)throw new Error("Cannot calculate mod for a negative divisor");return jt.compare(0)>=0?jt.mod(Ut):jt.mod(Ut).add(Ut).mod(Ut)},"SparseMatrix, SparseMatrix":function(jt,Ut){return Pt(jt,Ut,this,!1)},"SparseMatrix, DenseMatrix":function(jt,Ut){return At(Ut,jt,this,!0)},"DenseMatrix, SparseMatrix":function(jt,Ut){return Nt(jt,Ut,this,!1)},"DenseMatrix, DenseMatrix":function(jt,Ut){return qt(jt,Ut,this)},"Array, Array":function(jt,Ut){return this(Rt(jt),Rt(Ut)).valueOf()},"Array, Matrix":function(jt,Ut){return this(Rt(jt),Ut)},"Matrix, Array":function(jt,Ut){return this(jt,Rt(Ut))},"SparseMatrix, any":function(jt,Ut){return It(jt,Ut,this,!1)},"DenseMatrix, any":function(jt,Ut){return Vt(jt,Ut,this,!1)},"any, SparseMatrix":function(jt,Ut){return Ft(Ut,jt,this,!0)},"any, DenseMatrix":function(jt,Ut){return Vt(Ut,jt,this,!0)},"Array, any":function(jt,Ut){return Vt(Rt(jt),Ut,this,!1).valueOf()},"any, Array":function(jt,Ut){return Vt(Rt(Ut),jt,this,!0).valueOf()}})});return mod$1.createMod=St,mod$1}var multiplyScalar={},hasRequiredMultiplyScalar;function requireMultiplyScalar(){if(hasRequiredMultiplyScalar)return multiplyScalar;hasRequiredMultiplyScalar=1,Object.defineProperty(multiplyScalar,"__esModule",{value:!0}),multiplyScalar.createMultiplyScalar=void 0;var et=requireFactory(),_e=requireNumber$2(),tt="multiplyScalar",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt("multiplyScalar",{"number, number":_e.multiplyNumber,"Complex, Complex":function(ht,mt){return ht.mul(mt)},"BigNumber, BigNumber":function(ht,mt){return ht.times(mt)},"Fraction, Fraction":function(ht,mt){return ht.mul(mt)},"number | Fraction | BigNumber | Complex, Unit":function(ht,mt){var bt=mt.clone();return bt.value=bt.value===null?bt._normalize(ht):this(bt.value,ht),bt},"Unit, number | Fraction | BigNumber | Complex":function(ht,mt){var bt=ht.clone();return bt.value=bt.value===null?bt._normalize(mt):this(bt.value,mt),bt},"Unit, Unit":function(ht,mt){return ht.multiply(mt)}})});return multiplyScalar.createMultiplyScalar=nt,multiplyScalar}var multiply$1={},hasRequiredMultiply$1;function requireMultiply$1(){if(hasRequiredMultiply$1)return multiply$1;hasRequiredMultiply$1=1,Object.defineProperty(multiply$1,"__esModule",{value:!0}),multiply$1.createMultiply=void 0;var et=requireFactory(),_e=requireIs(),tt=requireObject(),rt=requireArray(),nt=requireAlgorithm11(),st=requireAlgorithm14(),dt="multiply",ft=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],ht=(0,et.factory)(dt,ft,function(mt){var bt=mt.typed,St=mt.matrix,Et=mt.addScalar,Ct=mt.multiplyScalar,Rt=mt.equalScalar,Tt=mt.dot,wt=(0,nt.createAlgorithm11)({typed:bt,equalScalar:Rt}),At=(0,st.createAlgorithm14)({typed:bt});function Nt(tr,Jt){switch(tr.length){case 1:switch(Jt.length){case 1:if(tr[0]!==Jt[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(tr[0]!==Jt[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+tr[0]+") must match Matrix rows ("+Jt[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+Jt.length+" dimensions)")}break;case 2:switch(Jt.length){case 1:if(tr[1]!==Jt[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+tr[1]+") must match Vector length ("+Jt[0]+")");break;case 2:if(tr[1]!==Jt[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+tr[1]+") must match Matrix B rows ("+Jt[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+Jt.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+tr.length+" dimensions)")}}function Pt(tr,Jt,ar){if(ar===0)throw new Error("Cannot multiply two empty vectors");return Tt(tr,Jt)}function It(tr,Jt){if(Jt.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return Ft(tr,Jt)}function Ft(tr,Jt){var ar=tr._data,pr=tr._size,cr=tr._datatype,gr=Jt._data,Sr=Jt._size,Er=Jt._datatype,Vr=pr[0],Wr=Sr[1],Mr,Nr=Et,Yr=Ct;cr&&Er&&cr===Er&&typeof cr=="string"&&(Mr=cr,Nr=bt.find(Et,[Mr,Mr]),Yr=bt.find(Ct,[Mr,Mr]));for(var Or=[],Ar=0;Ar<Wr;Ar++){for(var Qr=Yr(ar[0],gr[0][Ar]),hn=1;hn<Vr;hn++)Qr=Nr(Qr,Yr(ar[hn],gr[hn][Ar]));Or[Ar]=Qr}return tr.createDenseMatrix({data:Or,size:[Wr],datatype:Mr})}var qt=bt("_multiplyMatrixVector",{"DenseMatrix, any":Kt,"SparseMatrix, any":Ot}),Vt=bt("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":jt,"DenseMatrix, SparseMatrix":Ut,"SparseMatrix, DenseMatrix":Wt,"SparseMatrix, SparseMatrix":Bt});function Kt(tr,Jt){var ar=tr._data,pr=tr._size,cr=tr._datatype,gr=Jt._data,Sr=Jt._datatype,Er=pr[0],Vr=pr[1],Wr,Mr=Et,Nr=Ct;cr&&Sr&&cr===Sr&&typeof cr=="string"&&(Wr=cr,Mr=bt.find(Et,[Wr,Wr]),Nr=bt.find(Ct,[Wr,Wr]));for(var Yr=[],Or=0;Or<Er;Or++){for(var Ar=ar[Or],Qr=Nr(Ar[0],gr[0]),hn=1;hn<Vr;hn++)Qr=Mr(Qr,Nr(Ar[hn],gr[hn]));Yr[Or]=Qr}return tr.createDenseMatrix({data:Yr,size:[Er],datatype:Wr})}function jt(tr,Jt){var ar=tr._data,pr=tr._size,cr=tr._datatype,gr=Jt._data,Sr=Jt._size,Er=Jt._datatype,Vr=pr[0],Wr=pr[1],Mr=Sr[1],Nr,Yr=Et,Or=Ct;cr&&Er&&cr===Er&&typeof cr=="string"&&(Nr=cr,Yr=bt.find(Et,[Nr,Nr]),Or=bt.find(Ct,[Nr,Nr]));for(var Ar=[],Qr=0;Qr<Vr;Qr++){var hn=ar[Qr];Ar[Qr]=[];for(var Sn=0;Sn<Mr;Sn++){for(var Kr=Or(hn[0],gr[0][Sn]),Hn=1;Hn<Wr;Hn++)Kr=Yr(Kr,Or(hn[Hn],gr[Hn][Sn]));Ar[Qr][Sn]=Kr}}return tr.createDenseMatrix({data:Ar,size:[Vr,Mr],datatype:Nr})}function Ut(tr,Jt){var ar=tr._data,pr=tr._size,cr=tr._datatype,gr=Jt._values,Sr=Jt._index,Er=Jt._ptr,Vr=Jt._size,Wr=Jt._datatype;if(!gr)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var Mr=pr[0],Nr=Vr[1],Yr,Or=Et,Ar=Ct,Qr=Rt,hn=0;cr&&Wr&&cr===Wr&&typeof cr=="string"&&(Yr=cr,Or=bt.find(Et,[Yr,Yr]),Ar=bt.find(Ct,[Yr,Yr]),Qr=bt.find(Rt,[Yr,Yr]),hn=bt.convert(0,Yr));for(var Sn=[],Kr=[],Hn=[],ln=Jt.createSparseMatrix({values:Sn,index:Kr,ptr:Hn,size:[Mr,Nr],datatype:Yr}),kn=0;kn<Nr;kn++){Hn[kn]=Kr.length;var xn=Er[kn],An=Er[kn+1];if(An>xn)for(var rs=0,qs=0;qs<Mr;qs++){for(var Ln=qs+1,Cn=void 0,Nn=xn;Nn<An;Nn++){var Gr=Sr[Nn];rs!==Ln?(Cn=Ar(ar[qs][Gr],gr[Nn]),rs=Ln):Cn=Or(Cn,Ar(ar[qs][Gr],gr[Nn]))}rs===Ln&&!Qr(Cn,hn)&&(Kr.push(qs),Sn.push(Cn))}}return Hn[Nr]=Kr.length,ln}function Ot(tr,Jt){var ar=tr._values,pr=tr._index,cr=tr._ptr,gr=tr._datatype;if(!ar)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var Sr=Jt._data,Er=Jt._datatype,Vr=tr._size[0],Wr=Jt._size[0],Mr=[],Nr=[],Yr=[],Or,Ar=Et,Qr=Ct,hn=Rt,Sn=0;gr&&Er&&gr===Er&&typeof gr=="string"&&(Or=gr,Ar=bt.find(Et,[Or,Or]),Qr=bt.find(Ct,[Or,Or]),hn=bt.find(Rt,[Or,Or]),Sn=bt.convert(0,Or));var Kr=[],Hn=[];Yr[0]=0;for(var ln=0;ln<Wr;ln++){var kn=Sr[ln];if(!hn(kn,Sn))for(var xn=cr[ln],An=cr[ln+1],rs=xn;rs<An;rs++){var qs=pr[rs];Hn[qs]?Kr[qs]=Ar(Kr[qs],Qr(kn,ar[rs])):(Hn[qs]=!0,Nr.push(qs),Kr[qs]=Qr(kn,ar[rs]))}}for(var Ln=Nr.length,Cn=0;Cn<Ln;Cn++){var Nn=Nr[Cn];Mr[Cn]=Kr[Nn]}return Yr[1]=Nr.length,tr.createSparseMatrix({values:Mr,index:Nr,ptr:Yr,size:[Vr,1],datatype:Or})}function Wt(tr,Jt){var ar=tr._values,pr=tr._index,cr=tr._ptr,gr=tr._datatype;if(!ar)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var Sr=Jt._data,Er=Jt._datatype,Vr=tr._size[0],Wr=Jt._size[0],Mr=Jt._size[1],Nr,Yr=Et,Or=Ct,Ar=Rt,Qr=0;gr&&Er&&gr===Er&&typeof gr=="string"&&(Nr=gr,Yr=bt.find(Et,[Nr,Nr]),Or=bt.find(Ct,[Nr,Nr]),Ar=bt.find(Rt,[Nr,Nr]),Qr=bt.convert(0,Nr));for(var hn=[],Sn=[],Kr=[],Hn=tr.createSparseMatrix({values:hn,index:Sn,ptr:Kr,size:[Vr,Mr],datatype:Nr}),ln=[],kn=[],xn=0;xn<Mr;xn++){Kr[xn]=Sn.length;for(var An=xn+1,rs=0;rs<Wr;rs++){var qs=Sr[rs][xn];if(!Ar(qs,Qr))for(var Ln=cr[rs],Cn=cr[rs+1],Nn=Ln;Nn<Cn;Nn++){var Gr=pr[Nn];kn[Gr]!==An?(kn[Gr]=An,Sn.push(Gr),ln[Gr]=Or(qs,ar[Nn])):ln[Gr]=Yr(ln[Gr],Or(qs,ar[Nn]))}}for(var tn=Kr[xn],dn=Sn.length,Rn=tn;Rn<dn;Rn++){var wn=Sn[Rn];hn[Rn]=ln[wn]}}return Kr[Mr]=Sn.length,Hn}function Bt(tr,Jt){var ar=tr._values,pr=tr._index,cr=tr._ptr,gr=tr._datatype,Sr=Jt._values,Er=Jt._index,Vr=Jt._ptr,Wr=Jt._datatype,Mr=tr._size[0],Nr=Jt._size[1],Yr=ar&&Sr,Or,Ar=Et,Qr=Ct;gr&&Wr&&gr===Wr&&typeof gr=="string"&&(Or=gr,Ar=bt.find(Et,[Or,Or]),Qr=bt.find(Ct,[Or,Or]));for(var hn=Yr?[]:void 0,Sn=[],Kr=[],Hn=tr.createSparseMatrix({values:hn,index:Sn,ptr:Kr,size:[Mr,Nr],datatype:Or}),ln=Yr?[]:void 0,kn=[],xn,An,rs,qs,Ln,Cn,Nn,Gr,tn=0;tn<Nr;tn++){Kr[tn]=Sn.length;var dn=tn+1;for(Ln=Vr[tn],Cn=Vr[tn+1],qs=Ln;qs<Cn;qs++)if(Gr=Er[qs],Yr)for(An=cr[Gr],rs=cr[Gr+1],xn=An;xn<rs;xn++)Nn=pr[xn],kn[Nn]!==dn?(kn[Nn]=dn,Sn.push(Nn),ln[Nn]=Qr(Sr[qs],ar[xn])):ln[Nn]=Ar(ln[Nn],Qr(Sr[qs],ar[xn]));else for(An=cr[Gr],rs=cr[Gr+1],xn=An;xn<rs;xn++)Nn=pr[xn],kn[Nn]!==dn&&(kn[Nn]=dn,Sn.push(Nn));if(Yr)for(var Rn=Kr[tn],wn=Sn.length,Un=Rn;Un<wn;Un++){var Zn=Sn[Un];hn[Un]=ln[Zn]}}return Kr[Nr]=Sn.length,Hn}return bt(dt,(0,tt.extend)({"Array, Array":function(Jt,ar){Nt((0,rt.arraySize)(Jt),(0,rt.arraySize)(ar));var pr=this(St(Jt),St(ar));return(0,_e.isMatrix)(pr)?pr.valueOf():pr},"Matrix, Matrix":function(Jt,ar){var pr=Jt.size(),cr=ar.size();return Nt(pr,cr),pr.length===1?cr.length===1?Pt(Jt,ar,pr[0]):It(Jt,ar):cr.length===1?qt(Jt,ar):Vt(Jt,ar)},"Matrix, Array":function(Jt,ar){return this(Jt,St(ar))},"Array, Matrix":function(Jt,ar){return this(St(Jt,ar.storage()),ar)},"SparseMatrix, any":function(Jt,ar){return wt(Jt,ar,Ct,!1)},"DenseMatrix, any":function(Jt,ar){return At(Jt,ar,Ct,!1)},"any, SparseMatrix":function(Jt,ar){return wt(ar,Jt,Ct,!0)},"any, DenseMatrix":function(Jt,ar){return At(ar,Jt,Ct,!0)},"Array, any":function(Jt,ar){return At(St(Jt),ar,Ct,!1).valueOf()},"any, Array":function(Jt,ar){return At(St(ar),Jt,Ct,!0).valueOf()},"any, any":Ct,"any, any, ...any":function(Jt,ar,pr){for(var cr=this(Jt,ar),gr=0;gr<pr.length;gr++)cr=this(cr,pr[gr]);return cr}},Ct.signatures))});return multiply$1.createMultiply=ht,multiply$1}var nthRoot$1={},hasRequiredNthRoot$1;function requireNthRoot$1(){if(hasRequiredNthRoot$1)return nthRoot$1;hasRequiredNthRoot$1=1,Object.defineProperty(nthRoot$1,"__esModule",{value:!0}),nthRoot$1.createNthRootNumber=nthRoot$1.createNthRoot=void 0;var et=requireFactory(),_e=requireAlgorithm01(),tt=requireAlgorithm02(),rt=requireAlgorithm06(),nt=requireAlgorithm11(),st=requireAlgorithm13(),dt=requireAlgorithm14(),ft=requireNumber$2(),ht="nthRoot",mt=["typed","matrix","equalScalar","BigNumber"],bt=(0,et.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.matrix,Tt=Et.equalScalar,wt=Et.BigNumber,At=(0,_e.createAlgorithm01)({typed:Ct}),Nt=(0,tt.createAlgorithm02)({typed:Ct,equalScalar:Tt}),Pt=(0,rt.createAlgorithm06)({typed:Ct,equalScalar:Tt}),It=(0,nt.createAlgorithm11)({typed:Ct,equalScalar:Tt}),Ft=(0,st.createAlgorithm13)({typed:Ct}),qt=(0,dt.createAlgorithm14)({typed:Ct}),Vt="Complex number not supported in function nthRoot. Use nthRoots instead.";return Ct(ht,{number:ft.nthRootNumber,"number, number":ft.nthRootNumber,BigNumber:function(Ut){return Kt(Ut,new wt(2))},Complex:function(Ut){throw new Error(Vt)},"Complex, number":function(Ut,Ot){throw new Error(Vt)},"BigNumber, BigNumber":Kt,"Array | Matrix":function(Ut){return this(Ut,2)},"SparseMatrix, SparseMatrix":function(Ut,Ot){if(Ot.density()===1)return Pt(Ut,Ot,this);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(Ut,Ot){return Nt(Ot,Ut,this,!0)},"DenseMatrix, SparseMatrix":function(Ut,Ot){if(Ot.density()===1)return At(Ut,Ot,this,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(Ut,Ot){return Ft(Ut,Ot,this)},"Array, Array":function(Ut,Ot){return this(Rt(Ut),Rt(Ot)).valueOf()},"Array, Matrix":function(Ut,Ot){return this(Rt(Ut),Ot)},"Matrix, Array":function(Ut,Ot){return this(Ut,Rt(Ot))},"SparseMatrix, number | BigNumber":function(Ut,Ot){return It(Ut,Ot,this,!1)},"DenseMatrix, number | BigNumber":function(Ut,Ot){return qt(Ut,Ot,this,!1)},"number | BigNumber, SparseMatrix":function(Ut,Ot){if(Ot.density()===1)return It(Ot,Ut,this,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(Ut,Ot){return qt(Ot,Ut,this,!0)},"Array, number | BigNumber":function(Ut,Ot){return this(Rt(Ut),Ot).valueOf()},"number | BigNumber, Array":function(Ut,Ot){return this(Ut,Rt(Ot)).valueOf()}});function Kt(jt,Ut){var Ot=wt.precision,Wt=wt.clone({precision:Ot+2}),Bt=new wt(0),tr=new Wt(1),Jt=Ut.isNegative();if(Jt&&(Ut=Ut.neg()),Ut.isZero())throw new Error("Root must be non-zero");if(jt.isNegative()&&!Ut.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(jt.isZero())return Jt?new Wt(1/0):0;if(!jt.isFinite())return Jt?Bt:jt;var ar=jt.abs().pow(tr.div(Ut));return ar=jt.isNeg()?ar.neg():ar,new wt((Jt?tr.div(ar):ar).toPrecision(Ot))}});nthRoot$1.createNthRoot=bt;var St=(0,et.factory)(ht,["typed"],function(Et){var Ct=Et.typed;return Ct(ht,{number:ft.nthRootNumber,"number, number":ft.nthRootNumber})});return nthRoot$1.createNthRootNumber=St,nthRoot$1}var sign$1={},hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1,Object.defineProperty(sign$1,"__esModule",{value:!0}),sign$1.createSign=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="sign",nt=["typed","BigNumber","Fraction","complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber,mt=dt.complex,bt=dt.Fraction;return ft(rt,{number:tt.signNumber,Complex:function(Et){return Et.im===0?mt((0,tt.signNumber)(Et.re)):Et.sign()},BigNumber:function(Et){return new ht(Et.cmp(0))},Fraction:function(Et){return new bt(Et.s,1)},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this,!0)},Unit:function(Et){if(!Et._isDerived()&&Et.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return this(Et.value)}})});return sign$1.createSign=st,sign$1}var sqrt$1={},hasRequiredSqrt$1;function requireSqrt$1(){if(hasRequiredSqrt$1)return sqrt$1;hasRequiredSqrt$1=1,Object.defineProperty(sqrt$1,"__esModule",{value:!0}),sqrt$1.createSqrt=void 0;var et=requireFactory(),_e=requireCollection(),tt="sqrt",rt=["config","typed","Complex"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.config,ft=st.typed,ht=st.Complex;return ft("sqrt",{number:mt,Complex:function(St){return St.sqrt()},BigNumber:function(St){return!St.isNegative()||dt.predictable?St.sqrt():mt(St.toNumber())},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this,!0)},Unit:function(St){return St.pow(.5)}});function mt(bt){return isNaN(bt)?NaN:bt>=0||dt.predictable?Math.sqrt(bt):new ht(bt,0).sqrt()}});return sqrt$1.createSqrt=nt,sqrt$1}var square$1={},hasRequiredSquare$1;function requireSquare$1(){if(hasRequiredSquare$1)return square$1;hasRequiredSquare$1=1,Object.defineProperty(square$1,"__esModule",{value:!0}),square$1.createSquare=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="square",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.squareNumber,Complex:function(mt){return mt.mul(mt)},BigNumber:function(mt){return mt.times(mt)},Fraction:function(mt){return mt.mul(mt)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)},Unit:function(mt){return mt.pow(2)}})});return square$1.createSquare=st,square$1}var subtract$1={},hasRequiredSubtract$1;function requireSubtract$1(){if(hasRequiredSubtract$1)return subtract$1;hasRequiredSubtract$1=1,Object.defineProperty(subtract$1,"__esModule",{value:!0}),subtract$1.createSubtract=void 0;var et=requireFactory(),_e=requireDimensionError(),tt=requireAlgorithm01(),rt=requireAlgorithm03(),nt=requireAlgorithm05(),st=requireAlgorithm10(),dt=requireAlgorithm13(),ft=requireAlgorithm14(),ht="subtract",mt=["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],bt=(0,et.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.matrix,Tt=Et.equalScalar,wt=Et.addScalar,At=Et.unaryMinus,Nt=Et.DenseMatrix,Pt=(0,tt.createAlgorithm01)({typed:Ct}),It=(0,rt.createAlgorithm03)({typed:Ct}),Ft=(0,nt.createAlgorithm05)({typed:Ct,equalScalar:Tt}),qt=(0,st.createAlgorithm10)({typed:Ct,DenseMatrix:Nt}),Vt=(0,dt.createAlgorithm13)({typed:Ct}),Kt=(0,ft.createAlgorithm14)({typed:Ct});return Ct(ht,{"number, number":function(Ut,Ot){return Ut-Ot},"Complex, Complex":function(Ut,Ot){return Ut.sub(Ot)},"BigNumber, BigNumber":function(Ut,Ot){return Ut.minus(Ot)},"Fraction, Fraction":function(Ut,Ot){return Ut.sub(Ot)},"Unit, Unit":function(Ut,Ot){if(Ut.value===null)throw new Error("Parameter x contains a unit with undefined value");if(Ot.value===null)throw new Error("Parameter y contains a unit with undefined value");if(!Ut.equalBase(Ot))throw new Error("Units do not match");var Wt=Ut.clone();return Wt.value=this(Wt.value,Ot.value),Wt.fixPrefix=!1,Wt},"SparseMatrix, SparseMatrix":function(Ut,Ot){return St(Ut,Ot),Ft(Ut,Ot,this)},"SparseMatrix, DenseMatrix":function(Ut,Ot){return St(Ut,Ot),It(Ot,Ut,this,!0)},"DenseMatrix, SparseMatrix":function(Ut,Ot){return St(Ut,Ot),Pt(Ut,Ot,this,!1)},"DenseMatrix, DenseMatrix":function(Ut,Ot){return St(Ut,Ot),Vt(Ut,Ot,this)},"Array, Array":function(Ut,Ot){return this(Rt(Ut),Rt(Ot)).valueOf()},"Array, Matrix":function(Ut,Ot){return this(Rt(Ut),Ot)},"Matrix, Array":function(Ut,Ot){return this(Ut,Rt(Ot))},"SparseMatrix, any":function(Ut,Ot){return qt(Ut,At(Ot),wt)},"DenseMatrix, any":function(Ut,Ot){return Kt(Ut,Ot,this)},"any, SparseMatrix":function(Ut,Ot){return qt(Ot,Ut,this,!0)},"any, DenseMatrix":function(Ut,Ot){return Kt(Ot,Ut,this,!0)},"Array, any":function(Ut,Ot){return Kt(Rt(Ut),Ot,this,!1).valueOf()},"any, Array":function(Ut,Ot){return Kt(Rt(Ot),Ut,this,!0).valueOf()}})});subtract$1.createSubtract=bt;function St(Et,Ct){var Rt=Et.size(),Tt=Ct.size();if(Rt.length!==Tt.length)throw new _e.DimensionError(Rt.length,Tt.length)}return subtract$1}var xgcd$1={},hasRequiredXgcd$1;function requireXgcd$1(){if(hasRequiredXgcd$1)return xgcd$1;hasRequiredXgcd$1=1,Object.defineProperty(xgcd$1,"__esModule",{value:!0}),xgcd$1.createXgcd=void 0;var et=requireFactory(),_e=requireNumber$2(),tt="xgcd",rt=["typed","config","matrix","BigNumber"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.matrix,mt=st.BigNumber;return dt(tt,{"number, number":function(Et,Ct){var Rt=(0,_e.xgcdNumber)(Et,Ct);return ft.matrix==="Array"?Rt:ht(Rt)},"BigNumber, BigNumber":bt});function bt(St,Et){var Ct,Rt,Tt,wt=new mt(0),At=new mt(1),Nt=wt,Pt=At,It=At,Ft=wt;if(!St.isInt()||!Et.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!Et.isZero();)Rt=St.div(Et).floor(),Tt=St.mod(Et),Ct=Nt,Nt=Pt.minus(Rt.times(Nt)),Pt=Ct,Ct=It,It=Ft.minus(Rt.times(It)),Ft=Ct,St=Et,Et=Tt;var qt;return St.lt(wt)?qt=[St.neg(),Pt.neg(),Ft.neg()]:qt=[St,St.isZero()?0:Pt,Ft],ft.matrix==="Array"?qt:ht(qt)}});return xgcd$1.createXgcd=nt,xgcd$1}var invmod$1={},hasRequiredInvmod$1;function requireInvmod$1(){if(hasRequiredInvmod$1)return invmod$1;hasRequiredInvmod$1=1;var et=requireInteropRequireDefault();Object.defineProperty(invmod$1,"__esModule",{value:!0}),invmod$1.createInvmod=void 0;var _e=et(requireSlicedToArray()),tt=requireFactory(),rt="invmod",nt=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed;dt.config;var ht=dt.BigNumber,mt=dt.xgcd,bt=dt.equal,St=dt.smaller,Et=dt.mod,Ct=dt.add,Rt=dt.isInteger;return ft(rt,{"number, number":Tt,"BigNumber, BigNumber":Tt});function Tt(wt,At){if(!Rt(wt)||!Rt(At))throw new Error("Parameters in function invmod must be integer numbers");if(wt=Et(wt,At),bt(At,0))throw new Error("Divisor must be non zero");var Nt=mt(wt,At);Nt=Nt.valueOf();var Pt=Nt,It=(0,_e.default)(Pt,2),Ft=It[0],qt=It[1];return bt(Ft,ht(1))?(qt=Et(qt,At),St(qt,ht(0))&&(qt=Ct(qt,At)),qt):NaN}});return invmod$1.createInvmod=st,invmod$1}var dotMultiply$1={},algorithm09={},hasRequiredAlgorithm09;function requireAlgorithm09(){if(hasRequiredAlgorithm09)return algorithm09;hasRequiredAlgorithm09=1,Object.defineProperty(algorithm09,"__esModule",{value:!0}),algorithm09.createAlgorithm09=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm09",rt=["typed","equalScalar"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.equalScalar;return function(mt,bt,St){var Et=mt._values,Ct=mt._index,Rt=mt._ptr,Tt=mt._size,wt=mt._datatype,At=bt._values,Nt=bt._index,Pt=bt._ptr,It=bt._size,Ft=bt._datatype;if(Tt.length!==It.length)throw new _e.DimensionError(Tt.length,It.length);if(Tt[0]!==It[0]||Tt[1]!==It[1])throw new RangeError("Dimension mismatch. Matrix A ("+Tt+") must match Matrix B ("+It+")");var qt=Tt[0],Vt=Tt[1],Kt,jt=ft,Ut=0,Ot=St;typeof wt=="string"&&wt===Ft&&(Kt=wt,jt=dt.find(ft,[Kt,Kt]),Ut=dt.convert(0,Kt),Ot=dt.find(St,[Kt,Kt]));var Wt=Et&&At?[]:void 0,Bt=[],tr=[],Jt=Wt?[]:void 0,ar=[],pr,cr,gr,Sr,Er;for(cr=0;cr<Vt;cr++){tr[cr]=Bt.length;var Vr=cr+1;if(Jt)for(Sr=Pt[cr],Er=Pt[cr+1],gr=Sr;gr<Er;gr++)pr=Nt[gr],ar[pr]=Vr,Jt[pr]=At[gr];for(Sr=Rt[cr],Er=Rt[cr+1],gr=Sr;gr<Er;gr++)if(pr=Ct[gr],Jt){var Wr=ar[pr]===Vr?Jt[pr]:Ut,Mr=Ot(Et[gr],Wr);jt(Mr,Ut)||(Bt.push(pr),Wt.push(Mr))}else Bt.push(pr)}return tr[Vt]=Bt.length,mt.createSparseMatrix({values:Wt,index:Bt,ptr:tr,size:[qt,Vt],datatype:Kt})}});return algorithm09.createAlgorithm09=nt,algorithm09}var hasRequiredDotMultiply$1;function requireDotMultiply$1(){if(hasRequiredDotMultiply$1)return dotMultiply$1;hasRequiredDotMultiply$1=1,Object.defineProperty(dotMultiply$1,"__esModule",{value:!0}),dotMultiply$1.createDotMultiply=void 0;var et=requireFactory(),_e=requireAlgorithm02(),tt=requireAlgorithm09(),rt=requireAlgorithm11(),nt=requireAlgorithm13(),st=requireAlgorithm14(),dt="dotMultiply",ft=["typed","matrix","equalScalar","multiplyScalar"],ht=(0,et.factory)(dt,ft,function(mt){var bt=mt.typed,St=mt.matrix,Et=mt.equalScalar,Ct=mt.multiplyScalar,Rt=(0,_e.createAlgorithm02)({typed:bt,equalScalar:Et}),Tt=(0,tt.createAlgorithm09)({typed:bt,equalScalar:Et}),wt=(0,rt.createAlgorithm11)({typed:bt,equalScalar:Et}),At=(0,nt.createAlgorithm13)({typed:bt}),Nt=(0,st.createAlgorithm14)({typed:bt});return bt(dt,{"any, any":Ct,"SparseMatrix, SparseMatrix":function(It,Ft){return Tt(It,Ft,Ct,!1)},"SparseMatrix, DenseMatrix":function(It,Ft){return Rt(Ft,It,Ct,!0)},"DenseMatrix, SparseMatrix":function(It,Ft){return Rt(It,Ft,Ct,!1)},"DenseMatrix, DenseMatrix":function(It,Ft){return At(It,Ft,Ct)},"Array, Array":function(It,Ft){return this(St(It),St(Ft)).valueOf()},"Array, Matrix":function(It,Ft){return this(St(It),Ft)},"Matrix, Array":function(It,Ft){return this(It,St(Ft))},"SparseMatrix, any":function(It,Ft){return wt(It,Ft,Ct,!1)},"DenseMatrix, any":function(It,Ft){return Nt(It,Ft,Ct,!1)},"any, SparseMatrix":function(It,Ft){return wt(Ft,It,Ct,!0)},"any, DenseMatrix":function(It,Ft){return Nt(Ft,It,Ct,!0)},"Array, any":function(It,Ft){return Nt(St(It),Ft,Ct,!1).valueOf()},"any, Array":function(It,Ft){return Nt(St(Ft),It,Ct,!0).valueOf()}})});return dotMultiply$1.createDotMultiply=ht,dotMultiply$1}var bitAnd$1={},bitwise={},hasRequiredBitwise;function requireBitwise(){if(hasRequiredBitwise)return bitwise;hasRequiredBitwise=1,Object.defineProperty(bitwise,"__esModule",{value:!0}),bitwise.bitAndBigNumber=et,bitwise.bitNotBigNumber=_e,bitwise.bitOrBigNumber=tt,bitwise.bitXor=st,bitwise.bitwise=rt,bitwise.leftShiftBigNumber=dt,bitwise.rightArithShiftBigNumber=ft;function et(ht,mt){if(ht.isFinite()&&!ht.isInteger()||mt.isFinite()&&!mt.isInteger())throw new Error("Integers expected in function bitAnd");var bt=ht.constructor;if(ht.isNaN()||mt.isNaN())return new bt(NaN);if(ht.isZero()||mt.eq(-1)||ht.eq(mt))return ht;if(mt.isZero()||ht.eq(-1))return mt;if(!ht.isFinite()||!mt.isFinite()){if(!ht.isFinite()&&!mt.isFinite())return ht.isNegative()===mt.isNegative()?ht:new bt(0);if(!ht.isFinite())return mt.isNegative()?ht:ht.isNegative()?new bt(0):mt;if(!mt.isFinite())return ht.isNegative()?mt:mt.isNegative()?new bt(0):ht}return rt(ht,mt,function(St,Et){return St&Et})}function _e(ht){if(ht.isFinite()&&!ht.isInteger())throw new Error("Integer expected in function bitNot");var mt=ht.constructor,bt=mt.precision;mt.config({precision:1e9});var St=ht.plus(new mt(1));return St.s=-St.s||null,mt.config({precision:bt}),St}function tt(ht,mt){if(ht.isFinite()&&!ht.isInteger()||mt.isFinite()&&!mt.isInteger())throw new Error("Integers expected in function bitOr");var bt=ht.constructor;if(ht.isNaN()||mt.isNaN())return new bt(NaN);var St=new bt(-1);return ht.isZero()||mt.eq(St)||ht.eq(mt)?mt:mt.isZero()||ht.eq(St)?ht:!ht.isFinite()||!mt.isFinite()?!ht.isFinite()&&!ht.isNegative()&&mt.isNegative()||ht.isNegative()&&!mt.isNegative()&&!mt.isFinite()?St:ht.isNegative()&&mt.isNegative()?ht.isFinite()?ht:mt:ht.isFinite()?mt:ht:rt(ht,mt,function(Et,Ct){return Et|Ct})}function rt(ht,mt,bt){var St=ht.constructor,Et,Ct,Rt=+(ht.s<0),Tt=+(mt.s<0);if(Rt){Et=nt(_e(ht));for(var wt=0;wt<Et.length;++wt)Et[wt]^=1}else Et=nt(ht);if(Tt){Ct=nt(_e(mt));for(var At=0;At<Ct.length;++At)Ct[At]^=1}else Ct=nt(mt);var Nt,Pt,It;Et.length<=Ct.length?(Nt=Et,Pt=Ct,It=Rt):(Nt=Ct,Pt=Et,It=Tt);var Ft=Nt.length,qt=Pt.length,Vt=bt(Rt,Tt)^1,Kt=new St(Vt^1),jt=new St(1),Ut=new St(2),Ot=St.precision;for(St.config({precision:1e9});Ft>0;)bt(Nt[--Ft],Pt[--qt])===Vt&&(Kt=Kt.plus(jt)),jt=jt.times(Ut);for(;qt>0;)bt(It,Pt[--qt])===Vt&&(Kt=Kt.plus(jt)),jt=jt.times(Ut);return St.config({precision:Ot}),Vt===0&&(Kt.s=-Kt.s),Kt}function nt(ht){for(var mt=ht.d,bt=mt[0]+"",St=1;St<mt.length;++St){for(var Et=mt[St]+"",Ct=7-Et.length;Ct--;)Et="0"+Et;bt+=Et}for(var Rt=bt.length;bt.charAt(Rt)==="0";)Rt--;var Tt=ht.e,wt=bt.slice(0,Rt+1||1),At=wt.length;if(Tt>0)if(++Tt>At)for(Tt-=At;Tt--;)wt+="0";else Tt<At&&(wt=wt.slice(0,Tt)+"."+wt.slice(Tt));for(var Nt=[0],Pt=0;Pt<wt.length;){for(var It=Nt.length;It--;)Nt[It]*=10;Nt[0]+=parseInt(wt.charAt(Pt++));for(var Ft=0;Ft<Nt.length;++Ft)Nt[Ft]>1&&((Nt[Ft+1]===null||Nt[Ft+1]===void 0)&&(Nt[Ft+1]=0),Nt[Ft+1]+=Nt[Ft]>>1,Nt[Ft]&=1)}return Nt.reverse()}function st(ht,mt){if(ht.isFinite()&&!ht.isInteger()||mt.isFinite()&&!mt.isInteger())throw new Error("Integers expected in function bitXor");var bt=ht.constructor;if(ht.isNaN()||mt.isNaN())return new bt(NaN);if(ht.isZero())return mt;if(mt.isZero())return ht;if(ht.eq(mt))return new bt(0);var St=new bt(-1);return ht.eq(St)?_e(mt):mt.eq(St)?_e(ht):!ht.isFinite()||!mt.isFinite()?!ht.isFinite()&&!mt.isFinite()?St:new bt(ht.isNegative()===mt.isNegative()?1/0:-1/0):rt(ht,mt,function(Et,Ct){return Et^Ct})}function dt(ht,mt){if(ht.isFinite()&&!ht.isInteger()||mt.isFinite()&&!mt.isInteger())throw new Error("Integers expected in function leftShift");var bt=ht.constructor;return ht.isNaN()||mt.isNaN()||mt.isNegative()&&!mt.isZero()?new bt(NaN):ht.isZero()||mt.isZero()?ht:!ht.isFinite()&&!mt.isFinite()?new bt(NaN):mt.lt(55)?ht.times(Math.pow(2,mt.toNumber())+""):ht.times(new bt(2).pow(mt))}function ft(ht,mt){if(ht.isFinite()&&!ht.isInteger()||mt.isFinite()&&!mt.isInteger())throw new Error("Integers expected in function rightArithShift");var bt=ht.constructor;return ht.isNaN()||mt.isNaN()||mt.isNegative()&&!mt.isZero()?new bt(NaN):ht.isZero()||mt.isZero()?ht:mt.isFinite()?mt.lt(55)?ht.div(Math.pow(2,mt.toNumber())+"").floor():ht.div(new bt(2).pow(mt)).floor():ht.isNegative()?new bt(-1):ht.isFinite()?new bt(0):new bt(NaN)}return bitwise}var hasRequiredBitAnd$1;function requireBitAnd$1(){if(hasRequiredBitAnd$1)return bitAnd$1;hasRequiredBitAnd$1=1,Object.defineProperty(bitAnd$1,"__esModule",{value:!0}),bitAnd$1.createBitAnd=void 0;var et=requireBitwise(),_e=requireAlgorithm02(),tt=requireAlgorithm11(),rt=requireAlgorithm13(),nt=requireAlgorithm14(),st=requireAlgorithm06(),dt=requireFactory(),ft=requireNumber$2(),ht="bitAnd",mt=["typed","matrix","equalScalar"],bt=(0,dt.factory)(ht,mt,function(St){var Et=St.typed,Ct=St.matrix,Rt=St.equalScalar,Tt=(0,_e.createAlgorithm02)({typed:Et,equalScalar:Rt}),wt=(0,st.createAlgorithm06)({typed:Et,equalScalar:Rt}),At=(0,tt.createAlgorithm11)({typed:Et,equalScalar:Rt}),Nt=(0,rt.createAlgorithm13)({typed:Et}),Pt=(0,nt.createAlgorithm14)({typed:Et});return Et(ht,{"number, number":ft.bitAndNumber,"BigNumber, BigNumber":et.bitAndBigNumber,"SparseMatrix, SparseMatrix":function(Ft,qt){return wt(Ft,qt,this,!1)},"SparseMatrix, DenseMatrix":function(Ft,qt){return Tt(qt,Ft,this,!0)},"DenseMatrix, SparseMatrix":function(Ft,qt){return Tt(Ft,qt,this,!1)},"DenseMatrix, DenseMatrix":function(Ft,qt){return Nt(Ft,qt,this)},"Array, Array":function(Ft,qt){return this(Ct(Ft),Ct(qt)).valueOf()},"Array, Matrix":function(Ft,qt){return this(Ct(Ft),qt)},"Matrix, Array":function(Ft,qt){return this(Ft,Ct(qt))},"SparseMatrix, any":function(Ft,qt){return At(Ft,qt,this,!1)},"DenseMatrix, any":function(Ft,qt){return Pt(Ft,qt,this,!1)},"any, SparseMatrix":function(Ft,qt){return At(qt,Ft,this,!0)},"any, DenseMatrix":function(Ft,qt){return Pt(qt,Ft,this,!0)},"Array, any":function(Ft,qt){return Pt(Ct(Ft),qt,this,!1).valueOf()},"any, Array":function(Ft,qt){return Pt(Ct(qt),Ft,this,!0).valueOf()}})});return bitAnd$1.createBitAnd=bt,bitAnd$1}var bitNot$1={},hasRequiredBitNot$1;function requireBitNot$1(){if(hasRequiredBitNot$1)return bitNot$1;hasRequiredBitNot$1=1,Object.defineProperty(bitNot$1,"__esModule",{value:!0}),bitNot$1.createBitNot=void 0;var et=requireBitwise(),_e=requireCollection(),tt=requireFactory(),rt=requireNumber$2(),nt="bitNot",st=["typed"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed;return ht(nt,{number:rt.bitNotNumber,BigNumber:et.bitNotBigNumber,"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return bitNot$1.createBitNot=dt,bitNot$1}var bitOr$1={},hasRequiredBitOr$1;function requireBitOr$1(){if(hasRequiredBitOr$1)return bitOr$1;hasRequiredBitOr$1=1,Object.defineProperty(bitOr$1,"__esModule",{value:!0}),bitOr$1.createBitOr=void 0;var et=requireBitwise(),_e=requireFactory(),tt=requireAlgorithm14(),rt=requireAlgorithm13(),nt=requireAlgorithm10(),st=requireAlgorithm04(),dt=requireAlgorithm01(),ft=requireNumber$2(),ht="bitOr",mt=["typed","matrix","equalScalar","DenseMatrix"],bt=(0,_e.factory)(ht,mt,function(St){var Et=St.typed,Ct=St.matrix,Rt=St.equalScalar,Tt=St.DenseMatrix,wt=(0,dt.createAlgorithm01)({typed:Et}),At=(0,st.createAlgorithm04)({typed:Et,equalScalar:Rt}),Nt=(0,nt.createAlgorithm10)({typed:Et,DenseMatrix:Tt}),Pt=(0,rt.createAlgorithm13)({typed:Et}),It=(0,tt.createAlgorithm14)({typed:Et});return Et(ht,{"number, number":ft.bitOrNumber,"BigNumber, BigNumber":et.bitOrBigNumber,"SparseMatrix, SparseMatrix":function(qt,Vt){return At(qt,Vt,this)},"SparseMatrix, DenseMatrix":function(qt,Vt){return wt(Vt,qt,this,!0)},"DenseMatrix, SparseMatrix":function(qt,Vt){return wt(qt,Vt,this,!1)},"DenseMatrix, DenseMatrix":function(qt,Vt){return Pt(qt,Vt,this)},"Array, Array":function(qt,Vt){return this(Ct(qt),Ct(Vt)).valueOf()},"Array, Matrix":function(qt,Vt){return this(Ct(qt),Vt)},"Matrix, Array":function(qt,Vt){return this(qt,Ct(Vt))},"SparseMatrix, any":function(qt,Vt){return Nt(qt,Vt,this,!1)},"DenseMatrix, any":function(qt,Vt){return It(qt,Vt,this,!1)},"any, SparseMatrix":function(qt,Vt){return Nt(Vt,qt,this,!0)},"any, DenseMatrix":function(qt,Vt){return It(Vt,qt,this,!0)},"Array, any":function(qt,Vt){return It(Ct(qt),Vt,this,!1).valueOf()},"any, Array":function(qt,Vt){return It(Ct(Vt),qt,this,!0).valueOf()}})});return bitOr$1.createBitOr=bt,bitOr$1}var bitXor$1={},algorithm07={},hasRequiredAlgorithm07;function requireAlgorithm07(){if(hasRequiredAlgorithm07)return algorithm07;hasRequiredAlgorithm07=1,Object.defineProperty(algorithm07,"__esModule",{value:!0}),algorithm07.createAlgorithm07=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm07",rt=["typed","DenseMatrix"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.DenseMatrix;return function(bt,St,Et){var Ct=bt._size,Rt=bt._datatype,Tt=St._size,wt=St._datatype;if(Ct.length!==Tt.length)throw new _e.DimensionError(Ct.length,Tt.length);if(Ct[0]!==Tt[0]||Ct[1]!==Tt[1])throw new RangeError("Dimension mismatch. Matrix A ("+Ct+") must match Matrix B ("+Tt+")");var At=Ct[0],Nt=Ct[1],Pt,It=0,Ft=Et;typeof Rt=="string"&&Rt===wt&&(Pt=Rt,It=dt.convert(0,Pt),Ft=dt.find(Et,[Pt,Pt]));var qt,Vt,Kt=[];for(qt=0;qt<At;qt++)Kt[qt]=[];var jt=[],Ut=[],Ot=[],Wt=[];for(Vt=0;Vt<Nt;Vt++){var Bt=Vt+1;for(ht(bt,Vt,Ot,jt,Bt),ht(St,Vt,Wt,Ut,Bt),qt=0;qt<At;qt++){var tr=Ot[qt]===Bt?jt[qt]:It,Jt=Wt[qt]===Bt?Ut[qt]:It;Kt[qt][Vt]=Ft(tr,Jt)}}return new ft({data:Kt,size:[At,Nt],datatype:Pt})};function ht(mt,bt,St,Et,Ct){for(var Rt=mt._values,Tt=mt._index,wt=mt._ptr,At=wt[bt],Nt=wt[bt+1];At<Nt;At++){var Pt=Tt[At];St[Pt]=Ct,Et[Pt]=Rt[At]}}});return algorithm07.createAlgorithm07=nt,algorithm07}var hasRequiredBitXor$1;function requireBitXor$1(){if(hasRequiredBitXor$1)return bitXor$1;hasRequiredBitXor$1=1,Object.defineProperty(bitXor$1,"__esModule",{value:!0}),bitXor$1.createBitXor=void 0;var et=requireBitwise(),_e=requireAlgorithm03(),tt=requireAlgorithm07(),rt=requireAlgorithm12(),nt=requireAlgorithm13(),st=requireAlgorithm14(),dt=requireFactory(),ft=requireNumber$2(),ht="bitXor",mt=["typed","matrix","DenseMatrix"],bt=(0,dt.factory)(ht,mt,function(St){var Et=St.typed,Ct=St.matrix,Rt=St.DenseMatrix,Tt=(0,_e.createAlgorithm03)({typed:Et}),wt=(0,tt.createAlgorithm07)({typed:Et,DenseMatrix:Rt}),At=(0,rt.createAlgorithm12)({typed:Et,DenseMatrix:Rt}),Nt=(0,nt.createAlgorithm13)({typed:Et}),Pt=(0,st.createAlgorithm14)({typed:Et});return Et(ht,{"number, number":ft.bitXorNumber,"BigNumber, BigNumber":et.bitXor,"SparseMatrix, SparseMatrix":function(Ft,qt){return wt(Ft,qt,this)},"SparseMatrix, DenseMatrix":function(Ft,qt){return Tt(qt,Ft,this,!0)},"DenseMatrix, SparseMatrix":function(Ft,qt){return Tt(Ft,qt,this,!1)},"DenseMatrix, DenseMatrix":function(Ft,qt){return Nt(Ft,qt,this)},"Array, Array":function(Ft,qt){return this(Ct(Ft),Ct(qt)).valueOf()},"Array, Matrix":function(Ft,qt){return this(Ct(Ft),qt)},"Matrix, Array":function(Ft,qt){return this(Ft,Ct(qt))},"SparseMatrix, any":function(Ft,qt){return At(Ft,qt,this,!1)},"DenseMatrix, any":function(Ft,qt){return Pt(Ft,qt,this,!1)},"any, SparseMatrix":function(Ft,qt){return At(qt,Ft,this,!0)},"any, DenseMatrix":function(Ft,qt){return Pt(qt,Ft,this,!0)},"Array, any":function(Ft,qt){return Pt(Ct(Ft),qt,this,!1).valueOf()},"any, Array":function(Ft,qt){return Pt(Ct(qt),Ft,this,!0).valueOf()}})});return bitXor$1.createBitXor=bt,bitXor$1}var arg$1={},hasRequiredArg$1;function requireArg$1(){if(hasRequiredArg$1)return arg$1;hasRequiredArg$1=1,Object.defineProperty(arg$1,"__esModule",{value:!0}),arg$1.createArg=void 0;var et=requireFactory(),_e=requireCollection(),tt="arg",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:function(ht){return Math.atan2(0,ht)},BigNumber:function(ht){return ht.constructor.atan2(0,ht)},Complex:function(ht){return ht.arg()},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return arg$1.createArg=nt,arg$1}var conj$1={},hasRequiredConj$1;function requireConj$1(){if(hasRequiredConj$1)return conj$1;hasRequiredConj$1=1,Object.defineProperty(conj$1,"__esModule",{value:!0}),conj$1.createConj=void 0;var et=requireFactory(),_e=requireCollection(),tt="conj",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:function(ht){return ht},BigNumber:function(ht){return ht},Complex:function(ht){return ht.conjugate()},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return conj$1.createConj=nt,conj$1}var im$1={},hasRequiredIm$1;function requireIm$1(){if(hasRequiredIm$1)return im$1;hasRequiredIm$1=1,Object.defineProperty(im$1,"__esModule",{value:!0}),im$1.createIm=void 0;var et=requireFactory(),_e=requireCollection(),tt="im",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:function(ht){return 0},BigNumber:function(ht){return ht.mul(0)},Fraction:function(ht){return ht.mul(0)},Complex:function(ht){return ht.im},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return im$1.createIm=nt,im$1}var re$2={},hasRequiredRe$1;function requireRe$1(){if(hasRequiredRe$1)return re$2;hasRequiredRe$1=1,Object.defineProperty(re$2,"__esModule",{value:!0}),re$2.createRe=void 0;var et=requireFactory(),_e=requireCollection(),tt="re",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:function(ht){return ht},BigNumber:function(ht){return ht},Fraction:function(ht){return ht},Complex:function(ht){return ht.re},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return re$2.createRe=nt,re$2}var not$1={},hasRequiredNot$1;function requireNot$1(){if(hasRequiredNot$1)return not$1;hasRequiredNot$1=1,Object.defineProperty(not$1,"__esModule",{value:!0}),not$1.createNot=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="not",nt=["typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.notNumber,Complex:function(mt){return mt.re===0&&mt.im===0},BigNumber:function(mt){return mt.isZero()||mt.isNaN()},Unit:function(mt){return mt.value!==null?this(mt.value):!0},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return not$1.createNot=st,not$1}var or$1={},hasRequiredOr$1;function requireOr$1(){if(hasRequiredOr$1)return or$1;hasRequiredOr$1=1,Object.defineProperty(or$1,"__esModule",{value:!0}),or$1.createOr=void 0;var et=requireAlgorithm03(),_e=requireAlgorithm12(),tt=requireAlgorithm13(),rt=requireAlgorithm14(),nt=requireAlgorithm05(),st=requireFactory(),dt=requireNumber$2(),ft="or",ht=["typed","matrix","equalScalar","DenseMatrix"],mt=(0,st.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=bt.DenseMatrix,Tt=(0,et.createAlgorithm03)({typed:St}),wt=(0,nt.createAlgorithm05)({typed:St,equalScalar:Ct}),At=(0,_e.createAlgorithm12)({typed:St,DenseMatrix:Rt}),Nt=(0,tt.createAlgorithm13)({typed:St}),Pt=(0,rt.createAlgorithm14)({typed:St});return St(ft,{"number, number":dt.orNumber,"Complex, Complex":function(Ft,qt){return Ft.re!==0||Ft.im!==0||qt.re!==0||qt.im!==0},"BigNumber, BigNumber":function(Ft,qt){return!Ft.isZero()&&!Ft.isNaN()||!qt.isZero()&&!qt.isNaN()},"Unit, Unit":function(Ft,qt){return this(Ft.value||0,qt.value||0)},"SparseMatrix, SparseMatrix":function(Ft,qt){return wt(Ft,qt,this)},"SparseMatrix, DenseMatrix":function(Ft,qt){return Tt(qt,Ft,this,!0)},"DenseMatrix, SparseMatrix":function(Ft,qt){return Tt(Ft,qt,this,!1)},"DenseMatrix, DenseMatrix":function(Ft,qt){return Nt(Ft,qt,this)},"Array, Array":function(Ft,qt){return this(Et(Ft),Et(qt)).valueOf()},"Array, Matrix":function(Ft,qt){return this(Et(Ft),qt)},"Matrix, Array":function(Ft,qt){return this(Ft,Et(qt))},"SparseMatrix, any":function(Ft,qt){return At(Ft,qt,this,!1)},"DenseMatrix, any":function(Ft,qt){return Pt(Ft,qt,this,!1)},"any, SparseMatrix":function(Ft,qt){return At(qt,Ft,this,!0)},"any, DenseMatrix":function(Ft,qt){return Pt(qt,Ft,this,!0)},"Array, any":function(Ft,qt){return Pt(Et(Ft),qt,this,!1).valueOf()},"any, Array":function(Ft,qt){return Pt(Et(qt),Ft,this,!0).valueOf()}})});return or$1.createOr=mt,or$1}var xor$1={},hasRequiredXor$1;function requireXor$1(){if(hasRequiredXor$1)return xor$1;hasRequiredXor$1=1,Object.defineProperty(xor$1,"__esModule",{value:!0}),xor$1.createXor=void 0;var et=requireAlgorithm03(),_e=requireAlgorithm07(),tt=requireAlgorithm12(),rt=requireAlgorithm13(),nt=requireAlgorithm14(),st=requireFactory(),dt=requireNumber$2(),ft="xor",ht=["typed","matrix","DenseMatrix"],mt=(0,st.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.DenseMatrix,Rt=(0,et.createAlgorithm03)({typed:St}),Tt=(0,_e.createAlgorithm07)({typed:St,DenseMatrix:Ct}),wt=(0,tt.createAlgorithm12)({typed:St,DenseMatrix:Ct}),At=(0,rt.createAlgorithm13)({typed:St}),Nt=(0,nt.createAlgorithm14)({typed:St});return St(ft,{"number, number":dt.xorNumber,"Complex, Complex":function(It,Ft){return(It.re!==0||It.im!==0)!=(Ft.re!==0||Ft.im!==0)},"BigNumber, BigNumber":function(It,Ft){return(!It.isZero()&&!It.isNaN())!=(!Ft.isZero()&&!Ft.isNaN())},"Unit, Unit":function(It,Ft){return this(It.value||0,Ft.value||0)},"SparseMatrix, SparseMatrix":function(It,Ft){return Tt(It,Ft,this)},"SparseMatrix, DenseMatrix":function(It,Ft){return Rt(Ft,It,this,!0)},"DenseMatrix, SparseMatrix":function(It,Ft){return Rt(It,Ft,this,!1)},"DenseMatrix, DenseMatrix":function(It,Ft){return At(It,Ft,this)},"Array, Array":function(It,Ft){return this(Et(It),Et(Ft)).valueOf()},"Array, Matrix":function(It,Ft){return this(Et(It),Ft)},"Matrix, Array":function(It,Ft){return this(It,Et(Ft))},"SparseMatrix, any":function(It,Ft){return wt(It,Ft,this,!1)},"DenseMatrix, any":function(It,Ft){return Nt(It,Ft,this,!1)},"any, SparseMatrix":function(It,Ft){return wt(Ft,It,this,!0)},"any, DenseMatrix":function(It,Ft){return Nt(Ft,It,this,!0)},"Array, any":function(It,Ft){return Nt(Et(It),Ft,this,!1).valueOf()},"any, Array":function(It,Ft){return Nt(Et(Ft),It,this,!0).valueOf()}})});return xor$1.createXor=mt,xor$1}var concat$2={},hasRequiredConcat$1;function requireConcat$1(){if(hasRequiredConcat$1)return concat$2;hasRequiredConcat$1=1,Object.defineProperty(concat$2,"__esModule",{value:!0}),concat$2.createConcat=void 0;var et=requireIs(),_e=requireObject(),tt=requireArray(),rt=requireIndexError(),nt=requireDimensionError(),st=requireFactory(),dt="concat",ft=["typed","matrix","isInteger"],ht=(0,st.factory)(dt,ft,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.isInteger;return St(dt,{"...Array | Matrix | number | BigNumber":function(Tt){var wt,At=Tt.length,Nt=-1,Pt,It=!1,Ft=[];for(wt=0;wt<At;wt++){var qt=Tt[wt];if((0,et.isMatrix)(qt)&&(It=!0),(0,et.isNumber)(qt)||(0,et.isBigNumber)(qt)){if(wt!==At-1)throw new Error("Dimension must be specified as last argument");if(Pt=Nt,Nt=qt.valueOf(),!Ct(Nt))throw new TypeError("Integer number expected for dimension");if(Nt<0||wt>0&&Nt>Pt)throw new rt.IndexError(Nt,Pt+1)}else{var Vt=(0,_e.clone)(qt).valueOf(),Kt=(0,tt.arraySize)(Vt);if(Ft[wt]=Vt,Pt=Nt,Nt=Kt.length-1,wt>0&&Nt!==Pt)throw new nt.DimensionError(Pt+1,Nt+1)}}if(Ft.length===0)throw new SyntaxError("At least one matrix expected");for(var jt=Ft.shift();Ft.length;)jt=mt(jt,Ft.shift(),Nt,0);return It?Et(jt):jt},"...string":function(Tt){return Tt.join("")}})});concat$2.createConcat=ht;function mt(bt,St,Et,Ct){if(Ct<Et){if(bt.length!==St.length)throw new nt.DimensionError(bt.length,St.length);for(var Rt=[],Tt=0;Tt<bt.length;Tt++)Rt[Tt]=mt(bt[Tt],St[Tt],Et,Ct+1);return Rt}else return bt.concat(St)}return concat$2}var column$1={},hasRequiredColumn$1;function requireColumn$1(){if(hasRequiredColumn$1)return column$1;hasRequiredColumn$1=1,Object.defineProperty(column$1,"__esModule",{value:!0}),column$1.createColumn=void 0;var et=requireFactory(),_e=requireObject(),tt=requireArray(),rt="column",nt=["typed","Index","matrix","range"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.Index,mt=dt.matrix,bt=dt.range;return ft(rt,{"Matrix, number":St,"Array, number":function(Ct,Rt){return St(mt((0,_e.clone)(Ct)),Rt).valueOf()}});function St(Et,Ct){if(Et.size().length!==2)throw new Error("Only two dimensional matrix is supported");(0,tt.validateIndex)(Ct,Et.size()[1]);var Rt=bt(0,Et.size()[0]),Tt=new ht(Rt,Ct);return Et.subset(Tt)}});return column$1.createColumn=st,column$1}var count$1={},hasRequiredCount$1;function requireCount$1(){if(hasRequiredCount$1)return count$1;hasRequiredCount$1=1,Object.defineProperty(count$1,"__esModule",{value:!0}),count$1.createCount=void 0;var et=requireFactory(),_e="count",tt=["typed","size","prod"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.size,ft=nt.prod;return st(_e,{string:function(mt){return mt.length},"Matrix | Array":function(mt){return ft(dt(mt))}})});return count$1.createCount=rt,count$1}var cross$1={},hasRequiredCross$1;function requireCross$1(){if(hasRequiredCross$1)return cross$1;hasRequiredCross$1=1,Object.defineProperty(cross$1,"__esModule",{value:!0}),cross$1.createCross=void 0;var et=requireArray(),_e=requireFactory(),tt="cross",rt=["typed","matrix","subtract","multiply"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.subtract,mt=st.multiply;return dt(tt,{"Matrix, Matrix":function(Et,Ct){return ft(bt(Et.toArray(),Ct.toArray()))},"Matrix, Array":function(Et,Ct){return ft(bt(Et.toArray(),Ct))},"Array, Matrix":function(Et,Ct){return ft(bt(Et,Ct.toArray()))},"Array, Array":bt});function bt(St,Et){var Ct=Math.max((0,et.arraySize)(St).length,(0,et.arraySize)(Et).length);St=(0,et.squeeze)(St),Et=(0,et.squeeze)(Et);var Rt=(0,et.arraySize)(St),Tt=(0,et.arraySize)(Et);if(Rt.length!==1||Tt.length!==1||Rt[0]!==3||Tt[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+Rt.join(", ")+"], B = ["+Tt.join(", ")+"])");var wt=[ht(mt(St[1],Et[2]),mt(St[2],Et[1])),ht(mt(St[2],Et[0]),mt(St[0],Et[2])),ht(mt(St[0],Et[1]),mt(St[1],Et[0]))];return Ct>1?[wt]:wt}});return cross$1.createCross=nt,cross$1}var diag$1={},hasRequiredDiag$1;function requireDiag$1(){if(hasRequiredDiag$1)return diag$1;hasRequiredDiag$1=1,Object.defineProperty(diag$1,"__esModule",{value:!0}),diag$1.createDiag=void 0;var et=requireIs(),_e=requireArray(),tt=requireNumber$3(),rt=requireFactory(),nt="diag",st=["typed","matrix","DenseMatrix","SparseMatrix"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.DenseMatrix,St=ft.SparseMatrix;return ht(nt,{Array:function(wt){return Et(wt,0,(0,_e.arraySize)(wt),null)},"Array, number":function(wt,At){return Et(wt,At,(0,_e.arraySize)(wt),null)},"Array, BigNumber":function(wt,At){return Et(wt,At.toNumber(),(0,_e.arraySize)(wt),null)},"Array, string":function(wt,At){return Et(wt,0,(0,_e.arraySize)(wt),At)},"Array, number, string":function(wt,At,Nt){return Et(wt,At,(0,_e.arraySize)(wt),Nt)},"Array, BigNumber, string":function(wt,At,Nt){return Et(wt,At.toNumber(),(0,_e.arraySize)(wt),Nt)},Matrix:function(wt){return Et(wt,0,wt.size(),wt.storage())},"Matrix, number":function(wt,At){return Et(wt,At,wt.size(),wt.storage())},"Matrix, BigNumber":function(wt,At){return Et(wt,At.toNumber(),wt.size(),wt.storage())},"Matrix, string":function(wt,At){return Et(wt,0,wt.size(),At)},"Matrix, number, string":function(wt,At,Nt){return Et(wt,At,wt.size(),Nt)},"Matrix, BigNumber, string":function(wt,At,Nt){return Et(wt,At.toNumber(),wt.size(),Nt)}});function Et(Tt,wt,At,Nt){if(!(0,tt.isInteger)(wt))throw new TypeError("Second parameter in function diag must be an integer");var Pt=wt>0?wt:0,It=wt<0?-wt:0;switch(At.length){case 1:return Ct(Tt,wt,Nt,At[0],It,Pt);case 2:return Rt(Tt,wt,Nt,At,It,Pt)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function Ct(Tt,wt,At,Nt,Pt,It){var Ft=[Nt+Pt,Nt+It];if(At&&At!=="sparse"&&At!=="dense")throw new TypeError("Unknown matrix type ".concat(At,'"'));var qt=At==="sparse"?St.diagonal(Ft,Tt,wt):bt.diagonal(Ft,Tt,wt);return At!==null?qt:qt.valueOf()}function Rt(Tt,wt,At,Nt,Pt,It){if((0,et.isMatrix)(Tt)){var Ft=Tt.diagonal(wt);return At!==null?At!==Ft.storage()?mt(Ft,At):Ft:Ft.valueOf()}for(var qt=Math.min(Nt[0]-Pt,Nt[1]-It),Vt=[],Kt=0;Kt<qt;Kt++)Vt[Kt]=Tt[Kt+Pt][Kt+It];return At!==null?mt(Vt):Vt}});return diag$1.createDiag=dt,diag$1}var filter$1={},_function$1={},lruQueue={},hasRequiredLruQueue;function requireLruQueue(){if(hasRequiredLruQueue)return lruQueue;hasRequiredLruQueue=1,Object.defineProperty(lruQueue,"__esModule",{value:!0}),lruQueue.lruQueue=et;function et(_e){var tt=0,rt=1,nt=Object.create(null),st=Object.create(null),dt=0,ft=function(mt){var bt=st[mt];if(bt&&(delete nt[bt],delete st[mt],--tt,rt===bt)){if(!tt){dt=0,rt=1;return}for(;!hasOwnProperty.call(nt,++rt););}};return _e=Math.abs(_e),{hit:function(mt){var bt=st[mt],St=++dt;if(nt[St]=mt,st[mt]=St,!bt)return++tt,tt<=_e?void 0:(mt=nt[rt],ft(mt),mt);if(delete nt[bt],rt===bt)for(;!hasOwnProperty.call(nt,++rt););},delete:ft,clear:function(){tt=dt=0,rt=1,nt=Object.create(null),st=Object.create(null)}}}return lruQueue}var hasRequired_function$1;function require_function$1(){if(hasRequired_function$1)return _function$1;hasRequired_function$1=1;var et=requireInteropRequireDefault();Object.defineProperty(_function$1,"__esModule",{value:!0}),_function$1.maxArgumentCount=st,_function$1.memoize=rt,_function$1.memoizeCompare=nt;var _e=et(require_typeof()),tt=requireLruQueue();function rt(dt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ht=ft.hasher,mt=ft.limit;return mt=mt??Number.POSITIVE_INFINITY,ht=ht??JSON.stringify,function bt(){(0,_e.default)(bt.cache)!=="object"&&(bt.cache={values:new Map,lru:(0,tt.lruQueue)(mt||Number.POSITIVE_INFINITY)});for(var St=[],Et=0;Et<arguments.length;Et++)St[Et]=arguments[Et];var Ct=ht(St);if(bt.cache.values.has(Ct))return bt.cache.lru.hit(Ct),bt.cache.values.get(Ct);var Rt=dt.apply(dt,St);return bt.cache.values.set(Ct,Rt),bt.cache.values.delete(bt.cache.lru.hit(Ct)),Rt}}function nt(dt,ft){var ht=function mt(){for(var bt=[],St=0;St<arguments.length;St++)bt[St]=arguments[St];for(var Et=0;Et<mt.cache.length;Et++){var Ct=mt.cache[Et];if(ft(bt,Ct.args))return Ct.res}var Rt=dt.apply(dt,bt);return mt.cache.unshift({args:bt,res:Rt}),Rt};return ht.cache=[],ht}function st(dt){return Object.keys(dt.signatures||{}).reduce(function(ft,ht){var mt=(ht.match(/,/g)||[]).length+1;return Math.max(ft,mt)},-1)}return _function$1}var hasRequiredFilter$1;function requireFilter$1(){if(hasRequiredFilter$1)return filter$1;hasRequiredFilter$1=1,Object.defineProperty(filter$1,"__esModule",{value:!0}),filter$1.createFilter=void 0;var et=requireArray(),_e=require_function$1(),tt=requireFactory(),rt="filter",nt=["typed"],st=(0,tt.factory)(rt,nt,function(ft){var ht=ft.typed;return ht("filter",{"Array, function":dt,"Matrix, function":function(bt,St){return bt.create(dt(bt.toArray(),St))},"Array, RegExp":et.filterRegExp,"Matrix, RegExp":function(bt,St){return bt.create((0,et.filterRegExp)(bt.toArray(),St))}})});filter$1.createFilter=st;function dt(ft,ht){var mt=(0,_e.maxArgumentCount)(ht);return(0,et.filter)(ft,function(bt,St,Et){return mt===1?ht(bt):mt===2?ht(bt,[St]):ht(bt,[St],Et)})}return filter$1}var flatten$2={},hasRequiredFlatten$1;function requireFlatten$1(){if(hasRequiredFlatten$1)return flatten$2;hasRequiredFlatten$1=1,Object.defineProperty(flatten$2,"__esModule",{value:!0}),flatten$2.createFlatten=void 0;var et=requireObject(),_e=requireArray(),tt=requireFactory(),rt="flatten",nt=["typed","matrix"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix;return ft(rt,{Array:function(bt){return(0,_e.flatten)((0,et.clone)(bt))},Matrix:function(bt){var St=(0,_e.flatten)((0,et.clone)(bt.toArray()));return ht(St)}})});return flatten$2.createFlatten=st,flatten$2}var forEach$1={},hasRequiredForEach$1;function requireForEach$1(){if(hasRequiredForEach$1)return forEach$1;hasRequiredForEach$1=1,Object.defineProperty(forEach$1,"__esModule",{value:!0}),forEach$1.createForEach=void 0;var et=require_function$1(),_e=requireArray(),tt=requireFactory(),rt="forEach",nt=["typed"],st=(0,tt.factory)(rt,nt,function(ft){var ht=ft.typed;return ht(rt,{"Array, function":dt,"Matrix, function":function(bt,St){return bt.forEach(St)}})});forEach$1.createForEach=st;function dt(ft,ht){var mt=(0,et.maxArgumentCount)(ht),bt=function St(Et,Ct){Array.isArray(Et)?(0,_e.forEach)(Et,function(Rt,Tt){St(Rt,Ct.concat(Tt))}):mt===1?ht(Et):mt===2?ht(Et,Ct):ht(Et,Ct,ft)};bt(ft,[])}return forEach$1}var getMatrixDataType$1={},hasRequiredGetMatrixDataType$1;function requireGetMatrixDataType$1(){if(hasRequiredGetMatrixDataType$1)return getMatrixDataType$1;hasRequiredGetMatrixDataType$1=1,Object.defineProperty(getMatrixDataType$1,"__esModule",{value:!0}),getMatrixDataType$1.createGetMatrixDataType=void 0;var et=requireFactory(),_e=requireArray(),tt=requireIs(),rt="getMatrixDataType",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{Array:function(mt){return(0,_e.getArrayDataType)(mt,tt.typeOf)},Matrix:function(mt){return mt.getDataType()}})});return getMatrixDataType$1.createGetMatrixDataType=st,getMatrixDataType$1}var identity$2={},hasRequiredIdentity$1;function requireIdentity$1(){if(hasRequiredIdentity$1)return identity$2;hasRequiredIdentity$1=1,Object.defineProperty(identity$2,"__esModule",{value:!0}),identity$2.createIdentity=void 0;var et=requireIs(),_e=requireArray(),tt=requireNumber$3(),rt=requireFactory(),nt="identity",st=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.matrix,St=ft.BigNumber,Et=ft.DenseMatrix,Ct=ft.SparseMatrix;return ht(nt,{"":function(){return mt.matrix==="Matrix"?bt([]):[]},string:function(At){return bt(At)},"number | BigNumber":function(At){return Tt(At,At,mt.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(At,Nt){return Tt(At,At,Nt)},"number | BigNumber, number | BigNumber":function(At,Nt){return Tt(At,Nt,mt.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(At,Nt,Pt){return Tt(At,Nt,Pt)},Array:function(At){return Rt(At)},"Array, string":function(At,Nt){return Rt(At,Nt)},Matrix:function(At){return Rt(At.valueOf(),At.storage())},"Matrix, string":function(At,Nt){return Rt(At.valueOf(),Nt)}});function Rt(wt,At){switch(wt.length){case 0:return At?bt(At):[];case 1:return Tt(wt[0],wt[0],At);case 2:return Tt(wt[0],wt[1],At);default:throw new Error("Vector containing two values expected")}}function Tt(wt,At,Nt){var Pt=(0,et.isBigNumber)(wt)||(0,et.isBigNumber)(At)?St:null;if((0,et.isBigNumber)(wt)&&(wt=wt.toNumber()),(0,et.isBigNumber)(At)&&(At=At.toNumber()),!(0,tt.isInteger)(wt)||wt<1)throw new Error("Parameters in function identity must be positive integers");if(!(0,tt.isInteger)(At)||At<1)throw new Error("Parameters in function identity must be positive integers");var It=Pt?new St(1):1,Ft=Pt?new Pt(0):0,qt=[wt,At];if(Nt){if(Nt==="sparse")return Ct.diagonal(qt,It,0,Ft);if(Nt==="dense")return Et.diagonal(qt,It,0,Ft);throw new TypeError('Unknown matrix type "'.concat(Nt,'"'))}for(var Vt=(0,_e.resize)([],qt,Ft),Kt=wt<At?wt:At,jt=0;jt<Kt;jt++)Vt[jt][jt]=It;return Vt}});return identity$2.createIdentity=dt,identity$2}var kron$1={},hasRequiredKron$1;function requireKron$1(){if(hasRequiredKron$1)return kron$1;hasRequiredKron$1=1,Object.defineProperty(kron$1,"__esModule",{value:!0}),kron$1.createKron=void 0;var et=requireArray(),_e=requireFactory(),tt="kron",rt=["typed","matrix","multiplyScalar"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.multiplyScalar;return dt(tt,{"Matrix, Matrix":function(St,Et){return ft(mt(St.toArray(),Et.toArray()))},"Matrix, Array":function(St,Et){return ft(mt(St.toArray(),Et))},"Array, Matrix":function(St,Et){return ft(mt(St,Et.toArray()))},"Array, Array":mt});function mt(bt,St){if((0,et.arraySize)(bt).length===1&&(bt=[bt]),(0,et.arraySize)(St).length===1&&(St=[St]),(0,et.arraySize)(bt).length>2||(0,et.arraySize)(St).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(bt.length)+", y = "+JSON.stringify(St.length)+")");var Et=[],Ct=[];return bt.map(function(Rt){return St.map(function(Tt){return Ct=[],Et.push(Ct),Rt.map(function(wt){return Tt.map(function(At){return Ct.push(ht(wt,At))})})})})&&Et}});return kron$1.createKron=nt,kron$1}var map$1={},hasRequiredMap$1;function requireMap$1(){if(hasRequiredMap$1)return map$1;hasRequiredMap$1=1,Object.defineProperty(map$1,"__esModule",{value:!0}),map$1.createMap=void 0;var et=require_function$1(),_e=requireFactory(),tt="map",rt=["typed"],nt=(0,_e.factory)(tt,rt,function(dt){var ft=dt.typed;return ft(tt,{"Array, function":st,"Matrix, function":function(mt,bt){return mt.map(bt)}})});map$1.createMap=nt;function st(dt,ft){var ht=(0,et.maxArgumentCount)(ft),mt=function bt(St,Et){if(Array.isArray(St))return St.map(function(Tt,wt){return bt(Tt,Et.concat(wt))});try{return ht===1?ft(St):ht===2?ft(St,Et):ft(St,Et,dt)}catch(Tt){if(Tt instanceof TypeError&&"data"in Tt&&Tt.data.category==="wrongType"){var Ct="map attempted to call '".concat(Tt.data.fn,"(").concat(St),Rt=JSON.stringify(Et);throw ht===2?Ct+=","+Rt:ht!==1&&(Ct+=",".concat(Rt,",").concat(dt)),Ct+=")' but argument ".concat(Tt.data.index+1," of type "),Ct+="".concat(Tt.data.actual," does not match expected type "),Ct+=Tt.data.expected.join(" or "),new TypeError(Ct)}throw Tt}};return mt(dt,[])}return map$1}var diff$1={},hasRequiredDiff$1;function requireDiff$1(){if(hasRequiredDiff$1)return diff$1;hasRequiredDiff$1=1,Object.defineProperty(diff$1,"__esModule",{value:!0}),diff$1.createDiff=void 0;var et=requireFactory(),_e=requireNumber$3(),tt=requireIs(),rt="diff",nt=["typed","matrix","subtract","number"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix,mt=dt.subtract,bt=dt.number;return ft(rt,{"Array | Matrix":function(wt){return(0,tt.isMatrix)(wt)?ht(Et(wt.toArray())):Et(wt)},"Array | Matrix, number":function(wt,At){if(!(0,_e.isInteger)(At))throw new RangeError("Dimension must be a whole number");return(0,tt.isMatrix)(wt)?ht(St(wt.toArray(),At)):St(wt,At)},"Array | Matrix, BigNumber":function(wt,At){return this(wt,bt(At))}});function St(Tt,wt){if((0,tt.isMatrix)(Tt)&&(Tt=Tt.toArray()),!Array.isArray(Tt))throw RangeError("Array/Matrix does not have that many dimensions");if(wt>0){var At=[];return Tt.forEach(function(Nt){At.push(St(Nt,wt-1))}),At}else{if(wt===0)return Et(Tt);throw RangeError("Cannot have negative dimension")}}function Et(Tt){var wt=[],At=Tt.length;if(At<2)return Tt;for(var Nt=1;Nt<At;Nt++)wt.push(Ct(Tt[Nt-1],Tt[Nt]));return wt}function Ct(Tt,wt){(0,tt.isMatrix)(Tt)&&(Tt=Tt.toArray()),(0,tt.isMatrix)(wt)&&(wt=wt.toArray());var At=Array.isArray(Tt),Nt=Array.isArray(wt);if(At&&Nt)return Rt(Tt,wt);if(!At&&!Nt)return mt(wt,Tt);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function Rt(Tt,wt){if(Tt.length!==wt.length)throw RangeError("Not all sub-arrays have the same length");for(var At=[],Nt=Tt.length,Pt=0;Pt<Nt;Pt++)At.push(Ct(Tt[Pt],wt[Pt]));return At}});return diff$1.createDiff=st,diff$1}var ones$1={},hasRequiredOnes$1;function requireOnes$1(){if(hasRequiredOnes$1)return ones$1;hasRequiredOnes$1=1,Object.defineProperty(ones$1,"__esModule",{value:!0}),ones$1.createOnes=void 0;var et=requireIs(),_e=requireNumber$3(),tt=requireArray(),rt=requireFactory(),nt="ones",st=["typed","config","matrix","BigNumber"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.matrix,St=ft.BigNumber;return ht("ones",{"":function(){return mt.matrix==="Array"?Et([]):Et([],"default")},"...number | BigNumber | string":function(wt){var At=wt[wt.length-1];if(typeof At=="string"){var Nt=wt.pop();return Et(wt,Nt)}else return mt.matrix==="Array"?Et(wt):Et(wt,"default")},Array:Et,Matrix:function(wt){var At=wt.storage();return Et(wt.valueOf(),At)},"Array | Matrix, string":function(wt,At){return Et(wt.valueOf(),At)}});function Et(Tt,wt){var At=Ct(Tt),Nt=At?new St(1):1;if(Rt(Tt),wt){var Pt=bt(wt);return Tt.length>0?Pt.resize(Tt,Nt):Pt}else{var It=[];return Tt.length>0?(0,tt.resize)(It,Tt,Nt):It}}function Ct(Tt){var wt=!1;return Tt.forEach(function(At,Nt,Pt){(0,et.isBigNumber)(At)&&(wt=!0,Pt[Nt]=At.toNumber())}),wt}function Rt(Tt){Tt.forEach(function(wt){if(typeof wt!="number"||!(0,_e.isInteger)(wt)||wt<0)throw new Error("Parameters in function ones must be positive integers")})}});return ones$1.createOnes=dt,ones$1}var range$2={},noop$6={},hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop$6;hasRequiredNoop=1,Object.defineProperty(noop$6,"__esModule",{value:!0}),noop$6.noBignumber=et,noop$6.noFraction=_e,noop$6.noIndex=rt,noop$6.noMatrix=tt,noop$6.noSubset=nt;function et(){throw new Error('No "bignumber" implementation available')}function _e(){throw new Error('No "fraction" implementation available')}function tt(){throw new Error('No "matrix" implementation available')}function rt(){throw new Error('No "index" implementation available')}function nt(){throw new Error('No "matrix" implementation available')}return noop$6}var hasRequiredRange$1;function requireRange$1(){if(hasRequiredRange$1)return range$2;hasRequiredRange$1=1,Object.defineProperty(range$2,"__esModule",{value:!0}),range$2.createRange=void 0;var et=requireFactory(),_e=requireNoop(),tt="range",rt=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.matrix,mt=st.bignumber,bt=st.smaller,St=st.smallerEq,Et=st.larger,Ct=st.largerEq;return dt(tt,{string:Tt,"string, boolean":Tt,"number, number":function(qt,Vt){return Rt(wt(qt,Vt,1))},"number, number, number":function(qt,Vt,Kt){return Rt(wt(qt,Vt,Kt))},"number, number, boolean":function(qt,Vt,Kt){return Rt(Kt?At(qt,Vt,1):wt(qt,Vt,1))},"number, number, number, boolean":function(qt,Vt,Kt,jt){return Rt(jt?At(qt,Vt,Kt):wt(qt,Vt,Kt))},"BigNumber, BigNumber":function(qt,Vt){var Kt=qt.constructor;return Rt(Nt(qt,Vt,new Kt(1)))},"BigNumber, BigNumber, BigNumber":function(qt,Vt,Kt){return Rt(Nt(qt,Vt,Kt))},"BigNumber, BigNumber, boolean":function(qt,Vt,Kt){var jt=qt.constructor;return Rt(Kt?Pt(qt,Vt,new jt(1)):Nt(qt,Vt,new jt(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(qt,Vt,Kt,jt){return Rt(jt?Pt(qt,Vt,Kt):Nt(qt,Vt,Kt))}});function Rt(Ft){return ft.matrix==="Matrix"?ht?ht(Ft):(0,_e.noMatrix)():Ft}function Tt(Ft,qt){var Vt=It(Ft);if(!Vt)throw new SyntaxError('String "'+Ft+'" is no valid range');var Kt;return ft.number==="BigNumber"?(mt===void 0&&(0,_e.noBignumber)(),Kt=qt?Pt:Nt,Rt(Kt(mt(Vt.start),mt(Vt.end),mt(Vt.step)))):(Kt=qt?At:wt,Rt(Kt(Vt.start,Vt.end,Vt.step)))}function wt(Ft,qt,Vt){var Kt=[],jt=Ft;if(Vt>0)for(;bt(jt,qt);)Kt.push(jt),jt+=Vt;else if(Vt<0)for(;Et(jt,qt);)Kt.push(jt),jt+=Vt;return Kt}function At(Ft,qt,Vt){var Kt=[],jt=Ft;if(Vt>0)for(;St(jt,qt);)Kt.push(jt),jt+=Vt;else if(Vt<0)for(;Ct(jt,qt);)Kt.push(jt),jt+=Vt;return Kt}function Nt(Ft,qt,Vt){var Kt=mt(0),jt=[],Ut=Ft;if(Vt.gt(Kt))for(;bt(Ut,qt);)jt.push(Ut),Ut=Ut.plus(Vt);else if(Vt.lt(Kt))for(;Et(Ut,qt);)jt.push(Ut),Ut=Ut.plus(Vt);return jt}function Pt(Ft,qt,Vt){var Kt=mt(0),jt=[],Ut=Ft;if(Vt.gt(Kt))for(;St(Ut,qt);)jt.push(Ut),Ut=Ut.plus(Vt);else if(Vt.lt(Kt))for(;Ct(Ut,qt);)jt.push(Ut),Ut=Ut.plus(Vt);return jt}function It(Ft){var qt=Ft.split(":"),Vt=qt.map(function(jt){return Number(jt)}),Kt=Vt.some(function(jt){return isNaN(jt)});if(Kt)return null;switch(Vt.length){case 2:return{start:Vt[0],end:Vt[1],step:1};case 3:return{start:Vt[0],end:Vt[2],step:Vt[1]};default:return null}}});return range$2.createRange=nt,range$2}var reshape$1={},hasRequiredReshape$1;function requireReshape$1(){if(hasRequiredReshape$1)return reshape$1;hasRequiredReshape$1=1,Object.defineProperty(reshape$1,"__esModule",{value:!0}),reshape$1.createReshape=void 0;var et=requireArray(),_e=requireFactory(),tt="reshape",rt=["typed","isInteger","matrix"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.isInteger;return dt(tt,{"Matrix, Array":function(mt,bt){return mt.reshape(bt)},"Array, Array":function(mt,bt){return bt.forEach(function(St){if(!ft(St))throw new TypeError("Invalid size for dimension: "+St)}),(0,et.reshape)(mt,bt)}})});return reshape$1.createReshape=nt,reshape$1}var resize$1={},ArgumentsError={},hasRequiredArgumentsError;function requireArgumentsError(){if(hasRequiredArgumentsError)return ArgumentsError;hasRequiredArgumentsError=1,Object.defineProperty(ArgumentsError,"__esModule",{value:!0}),ArgumentsError.ArgumentsError=et;function et(_e,tt,rt,nt){if(!(this instanceof et))throw new SyntaxError("Constructor must be called with the new operator");this.fn=_e,this.count=tt,this.min=rt,this.max=nt,this.message="Wrong number of arguments in function "+_e+" ("+tt+" provided, "+rt+(nt!=null?"-"+nt:"")+" expected)",this.stack=new Error().stack}return et.prototype=new Error,et.prototype.constructor=Error,et.prototype.name="ArgumentsError",et.prototype.isArgumentsError=!0,ArgumentsError}var hasRequiredResize$1;function requireResize$1(){if(hasRequiredResize$1)return resize$1;hasRequiredResize$1=1,Object.defineProperty(resize$1,"__esModule",{value:!0}),resize$1.createResize=void 0;var et=requireIs(),_e=requireDimensionError(),tt=requireArgumentsError(),rt=requireNumber$3(),nt=requireString$2(),st=requireObject(),dt=requireArray(),ft=requireFactory(),ht="resize",mt=["config","matrix"],bt=(0,ft.factory)(ht,mt,function(St){var Et=St.config,Ct=St.matrix;return function(wt,At,Nt){if(arguments.length!==2&&arguments.length!==3)throw new tt.ArgumentsError("resize",arguments.length,2,3);if((0,et.isMatrix)(At)&&(At=At.valueOf()),(0,et.isBigNumber)(At[0])&&(At=At.map(function(Ft){return(0,et.isBigNumber)(Ft)?Ft.toNumber():Ft})),(0,et.isMatrix)(wt))return wt.resize(At,Nt,!0);if(typeof wt=="string")return Rt(wt,At,Nt);var Pt=Array.isArray(wt)?!1:Et.matrix!=="Array";if(At.length===0){for(;Array.isArray(wt);)wt=wt[0];return(0,st.clone)(wt)}else{Array.isArray(wt)||(wt=[wt]),wt=(0,st.clone)(wt);var It=(0,dt.resize)(wt,At,Nt);return Pt?Ct(It):It}};function Rt(Tt,wt,At){if(At!==void 0){if(typeof At!="string"||At.length!==1)throw new TypeError("Single character expected as defaultValue")}else At=" ";if(wt.length!==1)throw new _e.DimensionError(wt.length,1);var Nt=wt[0];if(typeof Nt!="number"||!(0,rt.isInteger)(Nt))throw new TypeError("Invalid size, must contain positive integers (size: "+(0,nt.format)(wt)+")");if(Tt.length>Nt)return Tt.substring(0,Nt);if(Tt.length<Nt){for(var Pt=Tt,It=0,Ft=Nt-Tt.length;It<Ft;It++)Pt+=At;return Pt}else return Tt}});return resize$1.createResize=bt,resize$1}var rotate$1={},hasRequiredRotate$1;function requireRotate$1(){if(hasRequiredRotate$1)return rotate$1;hasRequiredRotate$1=1,Object.defineProperty(rotate$1,"__esModule",{value:!0}),rotate$1.createRotate=void 0;var et=requireFactory(),_e=requireArray(),tt="rotate",rt=["typed","multiply","rotationMatrix"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.multiply,ht=st.rotationMatrix;return dt(tt,{"Array , number | BigNumber | Complex | Unit":function(St,Et){mt(St,2);var Ct=ft(ht(Et),St);return Ct.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(St,Et){return mt(St,2),ft(ht(Et),St)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(St,Et,Ct){mt(St,3);var Rt=ft(ht(Et,Ct),St);return Rt},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(St,Et,Ct){return mt(St,3),ft(ht(Et,Ct),St)}});function mt(bt,St){var Et=Array.isArray(bt)?(0,_e.arraySize)(bt):bt.size();if(Et.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(St));if(Et.length===2&&Et[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(St));if(Et[0]!==St)throw new RangeError("Vector must be of dimensions 1x".concat(St))}});return rotate$1.createRotate=nt,rotate$1}var rotationMatrix$1={},hasRequiredRotationMatrix$1;function requireRotationMatrix$1(){if(hasRequiredRotationMatrix$1)return rotationMatrix$1;hasRequiredRotationMatrix$1=1,Object.defineProperty(rotationMatrix$1,"__esModule",{value:!0}),rotationMatrix$1.createRotationMatrix=void 0;var et=requireIs(),_e=requireFactory(),tt="rotationMatrix",rt=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.multiplyScalar,mt=st.addScalar,bt=st.unaryMinus,St=st.norm,Et=st.BigNumber,Ct=st.matrix,Rt=st.DenseMatrix,Tt=st.SparseMatrix,wt=st.cos,At=st.sin;return dt(tt,{"":function(){return ft.matrix==="Matrix"?Ct([]):[]},string:function(Kt){return Ct(Kt)},"number | BigNumber | Complex | Unit":function(Kt){return Nt(Kt,ft.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(Kt,jt){return Nt(Kt,jt)},"number | BigNumber | Complex | Unit, Array":function(Kt,jt){var Ut=Ct(jt);return Pt(Ut),qt(Kt,Ut,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(Kt,jt){Pt(jt);var Ut=jt.storage()||(ft.matrix==="Matrix"?"dense":void 0);return qt(Kt,jt,Ut)},"number | BigNumber | Complex | Unit, Array, string":function(Kt,jt,Ut){var Ot=Ct(jt);return Pt(Ot),qt(Kt,Ot,Ut)},"number | BigNumber | Complex | Unit, Matrix, string":function(Kt,jt,Ut){return Pt(jt),qt(Kt,jt,Ut)}});function Nt(Vt,Kt){var jt=(0,et.isBigNumber)(Vt),Ut=jt?new Et(-1):-1,Ot=wt(Vt),Wt=At(Vt),Bt=[[Ot,ht(Ut,Wt)],[Wt,Ot]];return Ft(Bt,Kt)}function Pt(Vt){var Kt=Vt.size();if(Kt.length<1||Kt[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function It(Vt){return Vt.reduce(function(Kt,jt){return ht(Kt,jt)})}function Ft(Vt,Kt){if(Kt){if(Kt==="sparse")return new Tt(Vt);if(Kt==="dense")return new Rt(Vt);throw new TypeError('Unknown matrix type "'.concat(Kt,'"'))}return Vt}function qt(Vt,Kt,jt){var Ut=St(Kt);if(Ut===0)throw new RangeError("Rotation around zero vector");var Ot=(0,et.isBigNumber)(Vt)?Et:null,Wt=Ot?new Ot(1):1,Bt=Ot?new Ot(-1):-1,tr=Ot?new Ot(Kt.get([0])/Ut):Kt.get([0])/Ut,Jt=Ot?new Ot(Kt.get([1])/Ut):Kt.get([1])/Ut,ar=Ot?new Ot(Kt.get([2])/Ut):Kt.get([2])/Ut,pr=wt(Vt),cr=mt(Wt,bt(pr)),gr=At(Vt),Sr=mt(pr,It([tr,tr,cr])),Er=mt(It([tr,Jt,cr]),It([Bt,ar,gr])),Vr=mt(It([tr,ar,cr]),It([Jt,gr])),Wr=mt(It([tr,Jt,cr]),It([ar,gr])),Mr=mt(pr,It([Jt,Jt,cr])),Nr=mt(It([Jt,ar,cr]),It([Bt,tr,gr])),Yr=mt(It([tr,ar,cr]),It([Bt,Jt,gr])),Or=mt(It([Jt,ar,cr]),It([tr,gr])),Ar=mt(pr,It([ar,ar,cr])),Qr=[[Sr,Er,Vr],[Wr,Mr,Nr],[Yr,Or,Ar]];return Ft(Qr,jt)}});return rotationMatrix$1.createRotationMatrix=nt,rotationMatrix$1}var row$1={},hasRequiredRow$1;function requireRow$1(){if(hasRequiredRow$1)return row$1;hasRequiredRow$1=1,Object.defineProperty(row$1,"__esModule",{value:!0}),row$1.createRow=void 0;var et=requireFactory(),_e=requireObject(),tt=requireArray(),rt="row",nt=["typed","Index","matrix","range"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.Index,mt=dt.matrix,bt=dt.range;return ft(rt,{"Matrix, number":St,"Array, number":function(Ct,Rt){return St(mt((0,_e.clone)(Ct)),Rt).valueOf()}});function St(Et,Ct){if(Et.size().length!==2)throw new Error("Only two dimensional matrix is supported");(0,tt.validateIndex)(Ct,Et.size()[0]);var Rt=bt(0,Et.size()[1]),Tt=new ht(Ct,Rt);return Et.subset(Tt)}});return row$1.createRow=st,row$1}var size$2={},hasRequiredSize$1;function requireSize$1(){if(hasRequiredSize$1)return size$2;hasRequiredSize$1=1,Object.defineProperty(size$2,"__esModule",{value:!0}),size$2.createSize=void 0;var et=requireArray(),_e=requireFactory(),tt=requireNoop(),rt="size",nt=["typed","config","?matrix"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.matrix;return ft(rt,{Matrix:function(St){return St.create(St.size())},Array:et.arraySize,string:function(St){return ht.matrix==="Array"?[St.length]:mt([St.length])},"number | Complex | BigNumber | Unit | boolean | null":function(St){return ht.matrix==="Array"?[]:mt?mt([]):(0,tt.noMatrix)()}})});return size$2.createSize=st,size$2}var squeeze$1={},hasRequiredSqueeze$1;function requireSqueeze$1(){if(hasRequiredSqueeze$1)return squeeze$1;hasRequiredSqueeze$1=1,Object.defineProperty(squeeze$1,"__esModule",{value:!0}),squeeze$1.createSqueeze=void 0;var et=requireObject(),_e=requireArray(),tt=requireFactory(),rt="squeeze",nt=["typed","matrix"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix;return ft(rt,{Array:function(bt){return(0,_e.squeeze)((0,et.clone)(bt))},Matrix:function(bt){var St=(0,_e.squeeze)(bt.toArray());return Array.isArray(St)?ht(St):St},any:function(bt){return(0,et.clone)(bt)}})});return squeeze$1.createSqueeze=st,squeeze$1}var subset$1={},hasRequiredSubset$1;function requireSubset$1(){if(hasRequiredSubset$1)return subset$1;hasRequiredSubset$1=1,Object.defineProperty(subset$1,"__esModule",{value:!0}),subset$1.createSubset=void 0;var et=requireIs(),_e=requireObject(),tt=requireArray(),rt=requireCustoms(),nt=requireDimensionError(),st=requireFactory(),dt="subset",ft=["typed","matrix"],ht=(0,st.factory)(dt,ft,function(Ct){var Rt=Ct.typed,Tt=Ct.matrix;return Rt(dt,{"Array, Index":function(At,Nt){var Pt=Tt(At),It=Pt.subset(Nt);return Nt.isScalar()?It:It.valueOf()},"Matrix, Index":function(At,Nt){return At.subset(Nt)},"Object, Index":St,"string, Index":mt,"Array, Index, any":function(At,Nt,Pt){return Tt((0,_e.clone)(At)).subset(Nt,Pt,void 0).valueOf()},"Array, Index, any, any":function(At,Nt,Pt,It){return Tt((0,_e.clone)(At)).subset(Nt,Pt,It).valueOf()},"Matrix, Index, any":function(At,Nt,Pt){return At.clone().subset(Nt,Pt)},"Matrix, Index, any, any":function(At,Nt,Pt,It){return At.clone().subset(Nt,Pt,It)},"string, Index, string":bt,"string, Index, string, string":bt,"Object, Index, any":Et})});subset$1.createSubset=ht;function mt(Ct,Rt){if(!(0,et.isIndex)(Rt))throw new TypeError("Index expected");if(Rt.size().length!==1)throw new nt.DimensionError(Rt.size().length,1);var Tt=Ct.length;(0,tt.validateIndex)(Rt.min()[0],Tt),(0,tt.validateIndex)(Rt.max()[0],Tt);var wt=Rt.dimension(0),At="";return wt.forEach(function(Nt){At+=Ct.charAt(Nt)}),At}function bt(Ct,Rt,Tt,wt){if(!Rt||Rt.isIndex!==!0)throw new TypeError("Index expected");if(Rt.size().length!==1)throw new nt.DimensionError(Rt.size().length,1);if(wt!==void 0){if(typeof wt!="string"||wt.length!==1)throw new TypeError("Single character expected as defaultValue")}else wt=" ";var At=Rt.dimension(0),Nt=At.size()[0];if(Nt!==Tt.length)throw new nt.DimensionError(At.size()[0],Tt.length);var Pt=Ct.length;(0,tt.validateIndex)(Rt.min()[0]),(0,tt.validateIndex)(Rt.max()[0]);for(var It=[],Ft=0;Ft<Pt;Ft++)It[Ft]=Ct.charAt(Ft);if(At.forEach(function(Kt,jt){It[Kt]=Tt.charAt(jt[0])}),It.length>Pt)for(var qt=Pt-1,Vt=It.length;qt<Vt;qt++)It[qt]||(It[qt]=wt);return It.join("")}function St(Ct,Rt){if(Rt.size().length!==1)throw new nt.DimensionError(Rt.size(),1);var Tt=Rt.dimension(0);if(typeof Tt!="string")throw new TypeError("String expected as index to retrieve an object property");return(0,rt.getSafeProperty)(Ct,Tt)}function Et(Ct,Rt,Tt){if(Rt.size().length!==1)throw new nt.DimensionError(Rt.size(),1);var wt=Rt.dimension(0);if(typeof wt!="string")throw new TypeError("String expected as index to retrieve an object property");var At=(0,_e.clone)(Ct);return(0,rt.setSafeProperty)(At,wt,Tt),At}return subset$1}var transpose$1={},hasRequiredTranspose$1;function requireTranspose$1(){if(hasRequiredTranspose$1)return transpose$1;hasRequiredTranspose$1=1,Object.defineProperty(transpose$1,"__esModule",{value:!0}),transpose$1.createTranspose=void 0;var et=requireObject(),_e=requireString$2(),tt=requireFactory(),rt="transpose",nt=["typed","matrix"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix;return ft("transpose",{Array:function(Et){return this(ht(Et)).valueOf()},Matrix:function(Et){var Ct=Et.size(),Rt;switch(Ct.length){case 1:Rt=Et.clone();break;case 2:{var Tt=Ct[0],wt=Ct[1];if(wt===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+(0,_e.format)(Ct)+")");switch(Et.storage()){case"dense":Rt=mt(Et,Tt,wt);break;case"sparse":Rt=bt(Et,Tt,wt);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+(0,_e.format)(this._size)+")")}return Rt},any:function(Et){return(0,et.clone)(Et)}});function mt(St,Et,Ct){for(var Rt=St._data,Tt=[],wt,At=0;At<Ct;At++){wt=Tt[At]=[];for(var Nt=0;Nt<Et;Nt++)wt[Nt]=(0,et.clone)(Rt[Nt][At])}return St.createDenseMatrix({data:Tt,size:[Ct,Et],datatype:St._datatype})}function bt(St,Et,Ct){for(var Rt=St._values,Tt=St._index,wt=St._ptr,At=Rt?[]:void 0,Nt=[],Pt=[],It=[],Ft=0;Ft<Et;Ft++)It[Ft]=0;var qt,Vt,Kt;for(qt=0,Vt=Tt.length;qt<Vt;qt++)It[Tt[qt]]++;for(var jt=0,Ut=0;Ut<Et;Ut++)Pt.push(jt),jt+=It[Ut],It[Ut]=Pt[Ut];for(Pt.push(jt),Kt=0;Kt<Ct;Kt++)for(var Ot=wt[Kt],Wt=wt[Kt+1],Bt=Ot;Bt<Wt;Bt++){var tr=It[Tt[Bt]]++;Nt[tr]=Kt,Rt&&(At[tr]=(0,et.clone)(Rt[Bt]))}return St.createSparseMatrix({values:At,index:Nt,ptr:Pt,size:[Ct,Et],datatype:St._datatype})}});return transpose$1.createTranspose=st,transpose$1}var ctranspose$1={},hasRequiredCtranspose$1;function requireCtranspose$1(){if(hasRequiredCtranspose$1)return ctranspose$1;hasRequiredCtranspose$1=1,Object.defineProperty(ctranspose$1,"__esModule",{value:!0}),ctranspose$1.createCtranspose=void 0;var et=requireFactory(),_e="ctranspose",tt=["typed","transpose","conj"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.transpose,ft=nt.conj;return st(_e,{any:function(mt){return ft(dt(mt))}})});return ctranspose$1.createCtranspose=rt,ctranspose$1}var zeros$1={},hasRequiredZeros$1;function requireZeros$1(){if(hasRequiredZeros$1)return zeros$1;hasRequiredZeros$1=1,Object.defineProperty(zeros$1,"__esModule",{value:!0}),zeros$1.createZeros=void 0;var et=requireIs(),_e=requireNumber$3(),tt=requireArray(),rt=requireFactory(),nt="zeros",st=["typed","config","matrix","BigNumber"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.matrix,St=ft.BigNumber;return ht(nt,{"":function(){return mt.matrix==="Array"?Et([]):Et([],"default")},"...number | BigNumber | string":function(wt){var At=wt[wt.length-1];if(typeof At=="string"){var Nt=wt.pop();return Et(wt,Nt)}else return mt.matrix==="Array"?Et(wt):Et(wt,"default")},Array:Et,Matrix:function(wt){var At=wt.storage();return Et(wt.valueOf(),At)},"Array | Matrix, string":function(wt,At){return Et(wt.valueOf(),At)}});function Et(Tt,wt){var At=Ct(Tt),Nt=At?new St(0):0;if(Rt(Tt),wt){var Pt=bt(wt);return Tt.length>0?Pt.resize(Tt,Nt):Pt}else{var It=[];return Tt.length>0?(0,tt.resize)(It,Tt,Nt):It}}function Ct(Tt){var wt=!1;return Tt.forEach(function(At,Nt,Pt){(0,et.isBigNumber)(At)&&(wt=!0,Pt[Nt]=At.toNumber())}),wt}function Rt(Tt){Tt.forEach(function(wt){if(typeof wt!="number"||!(0,_e.isInteger)(wt)||wt<0)throw new Error("Parameters in function zeros must be positive integers")})}});return zeros$1.createZeros=dt,zeros$1}var fft$1={},toConsumableArray={exports:{}},arrayWithoutHoles={exports:{}},hasRequiredArrayWithoutHoles;function requireArrayWithoutHoles(){return hasRequiredArrayWithoutHoles||(hasRequiredArrayWithoutHoles=1,(function(et){var _e=requireArrayLikeToArray();function tt(rt){if(Array.isArray(rt))return _e(rt)}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(arrayWithoutHoles)),arrayWithoutHoles.exports}var iterableToArray={exports:{}},hasRequiredIterableToArray;function requireIterableToArray(){return hasRequiredIterableToArray||(hasRequiredIterableToArray=1,(function(et){function _e(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(iterableToArray)),iterableToArray.exports}var nonIterableSpread={exports:{}},hasRequiredNonIterableSpread;function requireNonIterableSpread(){return hasRequiredNonIterableSpread||(hasRequiredNonIterableSpread=1,(function(et){function _e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}et.exports=_e,et.exports.__esModule=!0,et.exports.default=et.exports})(nonIterableSpread)),nonIterableSpread.exports}var hasRequiredToConsumableArray;function requireToConsumableArray(){return hasRequiredToConsumableArray||(hasRequiredToConsumableArray=1,(function(et){var _e=requireArrayWithoutHoles(),tt=requireIterableToArray(),rt=requireUnsupportedIterableToArray(),nt=requireNonIterableSpread();function st(dt){return _e(dt)||tt(dt)||rt(dt)||nt()}et.exports=st,et.exports.__esModule=!0,et.exports.default=et.exports})(toConsumableArray)),toConsumableArray.exports}var hasRequiredFft$1;function requireFft$1(){if(hasRequiredFft$1)return fft$1;hasRequiredFft$1=1;var et=requireInteropRequireDefault();Object.defineProperty(fft$1,"__esModule",{value:!0}),fft$1.createFft=void 0;var _e=et(requireToConsumableArray()),tt=requireArray(),rt=requireFactory(),nt="fft",st=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed;ft.matrix;var mt=ft.addScalar,bt=ft.multiplyScalar,St=ft.divideScalar,Et=ft.exp,Ct=ft.tau,Rt=ft.i;return ht(nt,{Array:Tt,Matrix:function(Pt){return Pt.create(Tt(Pt.toArray()))}});function Tt(Nt){var Pt=(0,tt.arraySize)(Nt);return Pt.length===1?At(Nt,Pt[0]):wt(Nt.map(function(It){return Tt(It,Pt.slice(1))}),0)}function wt(Nt,Pt){var It=(0,tt.arraySize)(Nt);if(Pt!==0)return new Array(It[0]).fill(0).map(function(qt,Vt){return wt(Nt[Vt],Pt-1)});if(It.length===1)return At(Nt);function Ft(qt){var Vt=(0,tt.arraySize)(qt);return new Array(Vt[1]).fill(0).map(function(Kt,jt){return new Array(Vt[0]).fill(0).map(function(Ut,Ot){return qt[Ot][jt]})})}return Ft(wt(Ft(Nt),1))}function At(Nt){var Pt=Nt.length;if(Pt===1)return[Nt[0]];if(Pt%2===0){for(var It=[].concat((0,_e.default)(At(Nt.filter(function(Kt,jt){return jt%2===0}))),(0,_e.default)(At(Nt.filter(function(Kt,jt){return jt%2===1})))),Ft=0;Ft<Pt/2;Ft++){var qt=It[Ft],Vt=bt(It[Ft+Pt/2],Et(bt(bt(Ct,Rt),St(-Ft,Pt))));It[Ft]=mt(qt,Vt),It[Ft+Pt/2]=mt(qt,bt(-1,Vt))}return It}throw new Error("Can only calculate FFT of power-of-two size")}});return fft$1.createFft=dt,fft$1}var ifft$1={},hasRequiredIfft$1;function requireIfft$1(){if(hasRequiredIfft$1)return ifft$1;hasRequiredIfft$1=1,Object.defineProperty(ifft$1,"__esModule",{value:!0}),ifft$1.createIfft=void 0;var et=requireArray(),_e=requireFactory(),tt=requireIs(),rt="ifft",nt=["typed","fft","dotDivide","conj"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.fft,mt=dt.dotDivide,bt=dt.conj;return ft(rt,{"Array | Matrix":function(Et){var Ct=(0,tt.isMatrix)(Et)?Et.size():(0,et.arraySize)(Et);return mt(bt(ht(bt(Et))),Ct.reduce(function(Rt,Tt){return Rt*Tt},1))}})});return ifft$1.createIfft=st,ifft$1}var erf$1={},hasRequiredErf$1;function requireErf$1(){if(hasRequiredErf$1)return erf$1;hasRequiredErf$1=1,Object.defineProperty(erf$1,"__esModule",{value:!0}),erf$1.createErf=void 0;var et=requireCollection(),_e=requireNumber$3(),tt=requireFactory(),rt="erf",nt=["typed"],st=(0,tt.factory)(rt,nt,function(St){var Et=St.typed;return Et("name",{number:function(At){var Nt=Math.abs(At);return Nt>=bt?(0,_e.sign)(At):Nt<=dt?(0,_e.sign)(At)*Ct(Nt):Nt<=4?(0,_e.sign)(At)*(1-Rt(Nt)):(0,_e.sign)(At)*(1-Tt(Nt))},"Array | Matrix":function(At){return(0,et.deepMap)(At,this)}});function Ct(wt){var At=wt*wt,Nt=ht[0][4]*At,Pt=At,It;for(It=0;It<3;It+=1)Nt=(Nt+ht[0][It])*At,Pt=(Pt+mt[0][It])*At;return wt*(Nt+ht[0][3])/(Pt+mt[0][3])}function Rt(wt){var At=ht[1][8]*wt,Nt=wt,Pt;for(Pt=0;Pt<7;Pt+=1)At=(At+ht[1][Pt])*wt,Nt=(Nt+mt[1][Pt])*wt;var It=(At+ht[1][7])/(Nt+mt[1][7]),Ft=parseInt(wt*16)/16,qt=(wt-Ft)*(wt+Ft);return Math.exp(-Ft*Ft)*Math.exp(-qt)*It}function Tt(wt){var At=1/(wt*wt),Nt=ht[2][5]*At,Pt=At,It;for(It=0;It<4;It+=1)Nt=(Nt+ht[2][It])*At,Pt=(Pt+mt[2][It])*At;var Ft=At*(Nt+ht[2][4])/(Pt+mt[2][4]);Ft=(ft-Ft)/wt,At=parseInt(wt*16)/16;var qt=(wt-At)*(wt+At);return Math.exp(-At*At)*Math.exp(-qt)*Ft}});erf$1.createErf=st;var dt=.46875,ft=.5641895835477563,ht=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],mt=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],bt=Math.pow(2,53);return erf$1}var mode$1={},hasRequiredMode$1;function requireMode$1(){if(hasRequiredMode$1)return mode$1;hasRequiredMode$1=1,Object.defineProperty(mode$1,"__esModule",{value:!0}),mode$1.createMode=void 0;var et=requireArray(),_e=requireFactory(),tt="mode",rt=["typed","isNaN","isNumeric"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.isNaN,ht=st.isNumeric;return dt(tt,{"Array | Matrix":mt,"...":function(St){return mt(St)}});function mt(bt){bt=(0,et.flatten)(bt.valueOf());var St=bt.length;if(St===0)throw new Error("Cannot calculate mode of an empty array");for(var Et={},Ct=[],Rt=0,Tt=0;Tt<bt.length;Tt++){var wt=bt[Tt];if(ht(wt)&&ft(wt))throw new Error("Cannot calculate mode of an array containing NaN values");wt in Et||(Et[wt]=0),Et[wt]++,Et[wt]===Rt?Ct.push(wt):Et[wt]>Rt&&(Rt=Et[wt],Ct=[wt])}return Ct}});return mode$1.createMode=nt,mode$1}var prod$1={},improveErrorMessage={},hasRequiredImproveErrorMessage;function requireImproveErrorMessage(){if(hasRequiredImproveErrorMessage)return improveErrorMessage;hasRequiredImproveErrorMessage=1,Object.defineProperty(improveErrorMessage,"__esModule",{value:!0}),improveErrorMessage.improveErrorMessage=_e;var et=requireIs();function _e(tt,rt,nt){var st;return String(tt).indexOf("Unexpected type")!==-1?(st=arguments.length>2?" (type: "+(0,et.typeOf)(nt)+", value: "+JSON.stringify(nt)+")":" (type: "+tt.data.actual+")",new TypeError("Cannot calculate "+rt+", unexpected type of argument"+st)):String(tt).indexOf("complex numbers")!==-1?(st=arguments.length>2?" (type: "+(0,et.typeOf)(nt)+", value: "+JSON.stringify(nt)+")":"",new TypeError("Cannot calculate "+rt+", no ordering relation is defined for complex numbers"+st)):tt}return improveErrorMessage}var hasRequiredProd$1;function requireProd$1(){if(hasRequiredProd$1)return prod$1;hasRequiredProd$1=1,Object.defineProperty(prod$1,"__esModule",{value:!0}),prod$1.createProd=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireImproveErrorMessage(),rt="prod",nt=["typed","config","multiplyScalar","numeric"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.multiplyScalar,bt=dt.numeric;return ft(rt,{"Array | Matrix":St,"Array | Matrix, number | BigNumber":function(Ct,Rt){throw new Error("prod(A, dim) is not yet supported")},"...":function(Ct){return St(Ct)}});function St(Et){var Ct;if((0,et.deepForEach)(Et,function(Rt){try{Ct=Ct===void 0?Rt:mt(Ct,Rt)}catch(Tt){throw(0,tt.improveErrorMessage)(Tt,"prod",Rt)}}),typeof Ct=="string"&&(Ct=bt(Ct,ht.number)),Ct===void 0)throw new Error("Cannot calculate prod of an empty array");return Ct}});return prod$1.createProd=st,prod$1}var format$1={},hasRequiredFormat$1;function requireFormat$1(){if(hasRequiredFormat$1)return format$1;hasRequiredFormat$1=1,Object.defineProperty(format$1,"__esModule",{value:!0}),format$1.createFormat=void 0;var et=requireString$2(),_e=requireFactory(),tt="format",rt=["typed"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{any:et.format,"any, Object | function | number":et.format})});return format$1.createFormat=nt,format$1}var bin$1={},hasRequiredBin$1;function requireBin$1(){if(hasRequiredBin$1)return bin$1;hasRequiredBin$1=1,Object.defineProperty(bin$1,"__esModule",{value:!0}),bin$1.createBin=void 0;var et=requireFactory(),_e="bin",tt=["typed","format"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.format;return st(_e,{"number | BigNumber":function(ht){return dt(ht,{notation:"bin"})},"number | BigNumber, number":function(ht,mt){return dt(ht,{notation:"bin",wordSize:mt})}})});return bin$1.createBin=rt,bin$1}var oct$1={},hasRequiredOct$1;function requireOct$1(){if(hasRequiredOct$1)return oct$1;hasRequiredOct$1=1,Object.defineProperty(oct$1,"__esModule",{value:!0}),oct$1.createOct=void 0;var et=requireFactory(),_e="oct",tt=["typed","format"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.format;return st(_e,{"number | BigNumber":function(ht){return dt(ht,{notation:"oct"})},"number | BigNumber, number":function(ht,mt){return dt(ht,{notation:"oct",wordSize:mt})}})});return oct$1.createOct=rt,oct$1}var hex$2={},hasRequiredHex$1;function requireHex$1(){if(hasRequiredHex$1)return hex$2;hasRequiredHex$1=1,Object.defineProperty(hex$2,"__esModule",{value:!0}),hex$2.createHex=void 0;var et=requireFactory(),_e="hex",tt=["typed","format"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.format;return st(_e,{"number | BigNumber":function(ht){return dt(ht,{notation:"hex"})},"number | BigNumber, number":function(ht,mt){return dt(ht,{notation:"hex",wordSize:mt})}})});return hex$2.createHex=rt,hex$2}var print$1={},hasRequiredPrint$1;function requirePrint$1(){if(hasRequiredPrint$1)return print$1;hasRequiredPrint$1=1,Object.defineProperty(print$1,"__esModule",{value:!0}),print$1.createPrint=void 0;var et=requireString$2(),_e=requireIs(),tt=requireFactory(),rt="print",nt=["typed"],st=(0,tt.factory)(rt,nt,function(ft){var ht=ft.typed;return ht(rt,{"string, Object | Array":dt,"string, Object | Array, number | Object":dt})});print$1.createPrint=st;function dt(ft,ht,mt){return ft.replace(/\$([\w.]+)/g,function(bt,St){for(var Et=St.split("."),Ct=ht[Et.shift()];Et.length&&Ct!==void 0;){var Rt=Et.shift();Ct=Rt?Ct[Rt]:Ct+"."}return Ct!==void 0?(0,_e.isString)(Ct)?Ct:(0,et.format)(Ct,mt):bt})}return print$1}var to$1={},hasRequiredTo$1;function requireTo$1(){if(hasRequiredTo$1)return to$1;hasRequiredTo$1=1,Object.defineProperty(to$1,"__esModule",{value:!0}),to$1.createTo=void 0;var et=requireFactory(),_e=requireAlgorithm13(),tt=requireAlgorithm14(),rt="to",nt=["typed","matrix"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix,mt=(0,_e.createAlgorithm13)({typed:ft}),bt=(0,tt.createAlgorithm14)({typed:ft});return ft(rt,{"Unit, Unit | string":function(Et,Ct){return Et.to(Ct)},"Matrix, Matrix":function(Et,Ct){return mt(Et,Ct,this)},"Array, Array":function(Et,Ct){return this(ht(Et),ht(Ct)).valueOf()},"Array, Matrix":function(Et,Ct){return this(ht(Et),Ct)},"Matrix, Array":function(Et,Ct){return this(Et,ht(Ct))},"Matrix, any":function(Et,Ct){return bt(Et,Ct,this,!1)},"any, Matrix":function(Et,Ct){return bt(Ct,Et,this,!0)},"Array, any":function(Et,Ct){return bt(ht(Et),Ct,this,!1).valueOf()},"any, Array":function(Et,Ct){return bt(ht(Ct),Et,this,!0).valueOf()}})});return to$1.createTo=st,to$1}var isPrime$1={},hasRequiredIsPrime$1;function requireIsPrime$1(){if(hasRequiredIsPrime$1)return isPrime$1;hasRequiredIsPrime$1=1,Object.defineProperty(isPrime$1,"__esModule",{value:!0}),isPrime$1.createIsPrime=void 0;var et=requireCollection(),_e=requireFactory(),tt="isPrime",rt=["typed"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:function(ht){if(ht*0!==0)return!1;if(ht<=3)return ht>1;if(ht%2===0||ht%3===0)return!1;for(var mt=5;mt*mt<=ht;mt+=6)if(ht%mt===0||ht%(mt+2)===0)return!1;return!0},BigNumber:function(ht){if(ht.toNumber()*0!==0)return!1;if(ht.lte(3))return ht.gt(1);if(ht.mod(2).eq(0)||ht.mod(3).eq(0))return!1;if(ht.lt(Math.pow(2,32))){for(var mt=ht.toNumber(),bt=5;bt*bt<=mt;bt+=6)if(mt%bt===0||mt%(bt+2)===0)return!1;return!0}function St(Vt,Kt,jt){for(var Ut=1;!Kt.eq(0);)Kt.mod(2).eq(0)?(Kt=Kt.div(2),Vt=Vt.mul(Vt).mod(jt)):(Kt=Kt.sub(1),Ut=Vt.mul(Ut).mod(jt));return Ut}var Et=ht.constructor.clone({precision:ht.toFixed(0).length*2});ht=new Et(ht);for(var Ct=0,Rt=ht.sub(1);Rt.mod(2).eq(0);)Rt=Rt.div(2),Ct+=1;var Tt=null;if(ht.lt("3317044064679887385961981"))Tt=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(function(Vt){return Vt<ht});else{var wt=Math.min(ht.toNumber()-2,Math.floor(2*Math.pow(ht.toFixed(0).length*Math.log(10),2)));Tt=[];for(var At=2;At<=wt;At+=1)Tt.push(wt)}for(var Nt=0;Nt<Tt.length;Nt+=1){var Pt=Tt[Nt],It=St(ht.sub(ht).add(Pt),Rt,ht);if(!It.eq(1)){for(var Ft=0,qt=It;!qt.eq(ht.sub(1));Ft+=1,qt=qt.mul(qt).mod(ht))if(Ft===Ct-1)return!1}}return!0},"Array | Matrix":function(ht){return(0,et.deepMap)(ht,this)}})});return isPrime$1.createIsPrime=nt,isPrime$1}var numeric$1={},hasRequiredNumeric$1;function requireNumeric$1(){if(hasRequiredNumeric$1)return numeric$1;hasRequiredNumeric$1=1,Object.defineProperty(numeric$1,"__esModule",{value:!0}),numeric$1.createNumeric=void 0;var et=requireIs(),_e=requireFactory(),tt=requireNoop(),rt="numeric",nt=["number","?bignumber","?fraction"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.number,ht=dt.bignumber,mt=dt.fraction,bt={string:!0,number:!0,BigNumber:!0,Fraction:!0},St={number:function(Ct){return ft(Ct)},BigNumber:ht?function(Et){return ht(Et)}:tt.noBignumber,Fraction:mt?function(Et){return mt(Et)}:tt.noFraction};return function(Ct,Rt){var Tt=(0,et.typeOf)(Ct);if(!(Tt in bt))throw new TypeError("Cannot convert "+Ct+' of type "'+Tt+'"; valid input types are '+Object.keys(bt).join(", "));if(!(Rt in St))throw new TypeError("Cannot convert "+Ct+' to type "'+Rt+'"; valid output types are '+Object.keys(St).join(", "));return Rt===Tt?Ct:St[Rt](Ct)}});return numeric$1.createNumeric=st,numeric$1}var divideScalar={},hasRequiredDivideScalar;function requireDivideScalar(){if(hasRequiredDivideScalar)return divideScalar;hasRequiredDivideScalar=1,Object.defineProperty(divideScalar,"__esModule",{value:!0}),divideScalar.createDivideScalar=void 0;var et=requireFactory(),_e=requireIs(),tt="divideScalar",rt=["typed","numeric"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.numeric;return dt(tt,{"number, number":function(mt,bt){return mt/bt},"Complex, Complex":function(mt,bt){return mt.div(bt)},"BigNumber, BigNumber":function(mt,bt){return mt.div(bt)},"Fraction, Fraction":function(mt,bt){return mt.div(bt)},"Unit, number | Fraction | BigNumber":function(mt,bt){var St=mt.clone(),Et=ft(1,(0,_e.typeOf)(bt));return St.value=this(St.value===null?St._normalize(Et):St.value,bt),St},"number | Fraction | BigNumber, Unit":function(mt,bt){var St=bt.clone();St=St.pow(-1);var Et=ft(1,(0,_e.typeOf)(mt));return St.value=this(mt,bt.value===null?bt._normalize(Et):bt.value),St},"Unit, Unit":function(mt,bt){return mt.divide(bt)}})});return divideScalar.createDivideScalar=nt,divideScalar}var pow$1={},hasRequiredPow$1;function requirePow$1(){if(hasRequiredPow$1)return pow$1;hasRequiredPow$1=1,Object.defineProperty(pow$1,"__esModule",{value:!0}),pow$1.createPow=void 0;var et=requireFactory(),_e=requireNumber$3(),tt=requireArray(),rt=requireNumber$2(),nt="pow",st=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.identity,St=ft.multiply,Et=ft.matrix,Ct=ft.inv,Rt=ft.number,Tt=ft.fraction,wt=ft.Complex;return ht(nt,{"number, number":At,"Complex, Complex":function(Ft,qt){return Ft.pow(qt)},"BigNumber, BigNumber":function(Ft,qt){return qt.isInteger()||Ft>=0||mt.predictable?Ft.pow(qt):new wt(Ft.toNumber(),0).pow(qt.toNumber(),0)},"Fraction, Fraction":function(Ft,qt){var Vt=Ft.pow(qt);if(Vt!=null)return Vt;if(mt.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return At(Ft.valueOf(),qt.valueOf())},"Array, number":Nt,"Array, BigNumber":function(Ft,qt){return Nt(Ft,qt.toNumber())},"Matrix, number":Pt,"Matrix, BigNumber":function(Ft,qt){return Pt(Ft,qt.toNumber())},"Unit, number | BigNumber":function(Ft,qt){return Ft.pow(qt)}});function At(It,Ft){if(mt.predictable&&!(0,_e.isInteger)(Ft)&&It<0)try{var qt=Tt(Ft),Vt=Rt(qt);if((Ft===Vt||Math.abs((Ft-Vt)/Ft)<1e-14)&&qt.d%2===1)return(qt.n%2===0?1:-1)*Math.pow(-It,Ft)}catch{}return mt.predictable&&(It<-1&&Ft===1/0||It>-1&&It<0&&Ft===-1/0)?NaN:(0,_e.isInteger)(Ft)||It>=0||mt.predictable?(0,rt.powNumber)(It,Ft):It*It<1&&Ft===1/0||It*It>1&&Ft===-1/0?0:new wt(It,0).pow(Ft,0)}function Nt(It,Ft){if(!(0,_e.isInteger)(Ft))throw new TypeError("For A^b, b must be an integer (value is "+Ft+")");var qt=(0,tt.arraySize)(It);if(qt.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+qt.length+" dimensions)");if(qt[0]!==qt[1])throw new Error("For A^b, A must be square (size is "+qt[0]+"x"+qt[1]+")");if(Ft<0)try{return Nt(Ct(It),-Ft)}catch(jt){throw jt.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+Ft+")"):jt}for(var Vt=bt(qt[0]).valueOf(),Kt=It;Ft>=1;)(Ft&1)===1&&(Vt=St(Kt,Vt)),Ft>>=1,Kt=St(Kt,Kt);return Vt}function Pt(It,Ft){return Et(Nt(It.valueOf(),Ft))}});return pow$1.createPow=dt,pow$1}var round$1={},hasRequiredRound$1;function requireRound$1(){if(hasRequiredRound$1)return round$1;hasRequiredRound$1=1,Object.defineProperty(round$1,"__esModule",{value:!0}),round$1.createRound=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireAlgorithm11(),rt=requireAlgorithm12(),nt=requireAlgorithm14(),st=requireNumber$2(),dt="Number of decimals in function round must be an integer",ft="round",ht=["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],mt=(0,et.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=bt.zeros,Tt=bt.BigNumber,wt=bt.DenseMatrix,At=(0,tt.createAlgorithm11)({typed:St,equalScalar:Ct}),Nt=(0,rt.createAlgorithm12)({typed:St,DenseMatrix:wt}),Pt=(0,nt.createAlgorithm14)({typed:St});return St(ft,{number:st.roundNumber,"number, number":st.roundNumber,"number, BigNumber":function(Ft,qt){if(!qt.isInteger())throw new TypeError(dt);return new Tt(Ft).toDecimalPlaces(qt.toNumber())},Complex:function(Ft){return Ft.round()},"Complex, number":function(Ft,qt){if(qt%1)throw new TypeError(dt);return Ft.round(qt)},"Complex, BigNumber":function(Ft,qt){if(!qt.isInteger())throw new TypeError(dt);var Vt=qt.toNumber();return Ft.round(Vt)},BigNumber:function(Ft){return Ft.toDecimalPlaces(0)},"BigNumber, BigNumber":function(Ft,qt){if(!qt.isInteger())throw new TypeError(dt);return Ft.toDecimalPlaces(qt.toNumber())},Fraction:function(Ft){return Ft.round()},"Fraction, number":function(Ft,qt){if(qt%1)throw new TypeError(dt);return Ft.round(qt)},"Fraction, BigNumber":function(Ft,qt){if(!qt.isInteger())throw new TypeError(dt);return Ft.round(qt.toNumber())},"Array | Matrix":function(Ft){return(0,_e.deepMap)(Ft,this,!0)},"SparseMatrix, number | BigNumber":function(Ft,qt){return At(Ft,qt,this,!1)},"DenseMatrix, number | BigNumber":function(Ft,qt){return Pt(Ft,qt,this,!1)},"Array, number | BigNumber":function(Ft,qt){return Pt(Et(Ft),qt,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(Ft,qt){return Ct(Ft,0)?Rt(qt.size(),qt.storage()):Nt(qt,Ft,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(Ft,qt){return Ct(Ft,0)?Rt(qt.size(),qt.storage()):Pt(qt,Ft,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(Ft,qt){return Pt(Et(qt),Ft,this,!0).valueOf()}})});return round$1.createRound=mt,round$1}var log$4={},hasRequiredLog$1;function requireLog$1(){if(hasRequiredLog$1)return log$4;hasRequiredLog$1=1,Object.defineProperty(log$4,"__esModule",{value:!0}),log$4.createLog=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="log",nt=["config","typed","divideScalar","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.divideScalar,bt=dt.Complex;return ft(rt,{number:function(Et){return Et>=0||ht.predictable?(0,tt.logNumber)(Et):new bt(Et,0).log()},Complex:function(Et){return Et.log()},BigNumber:function(Et){return!Et.isNegative()||ht.predictable?Et.ln():new bt(Et.toNumber(),0).log()},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)},"any, any":function(Et,Ct){return mt(this(Et),this(Ct))}})});return log$4.createLog=st,log$4}var log1p$1={},hasRequiredLog1p$1;function requireLog1p$1(){if(hasRequiredLog1p$1)return log1p$1;hasRequiredLog1p$1=1,Object.defineProperty(log1p$1,"__esModule",{value:!0}),log1p$1.createLog1p=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$3(),rt="log1p",nt=["typed","config","divideScalar","log","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.divideScalar,bt=dt.log,St=dt.Complex;return ft(rt,{number:function(Rt){return Rt>=-1||ht.predictable?(0,tt.log1p)(Rt):Et(new St(Rt,0))},Complex:Et,BigNumber:function(Rt){var Tt=Rt.plus(1);return!Tt.isNegative()||ht.predictable?Tt.ln():Et(new St(Rt.toNumber(),0))},"Array | Matrix":function(Rt){return(0,_e.deepMap)(Rt,this)},"any, any":function(Rt,Tt){return mt(this(Rt),bt(Tt))}});function Et(Ct){var Rt=Ct.re+1;return new St(Math.log(Math.sqrt(Rt*Rt+Ct.im*Ct.im)),Math.atan2(Ct.im,Rt))}});return log1p$1.createLog1p=st,log1p$1}var nthRoots$1={},hasRequiredNthRoots$1;function requireNthRoots$1(){if(hasRequiredNthRoots$1)return nthRoots$1;hasRequiredNthRoots$1=1,Object.defineProperty(nthRoots$1,"__esModule",{value:!0}),nthRoots$1.createNthRoots=void 0;var et=requireFactory(),_e="nthRoots",tt=["config","typed","divideScalar","Complex"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed;nt.config,nt.divideScalar;var dt=nt.Complex,ft=[function(bt){return new dt(bt,0)},function(bt){return new dt(0,bt)},function(bt){return new dt(-bt,0)},function(bt){return new dt(0,-bt)}];function ht(mt,bt){if(bt<0)throw new Error("Root must be greater than zero");if(bt===0)throw new Error("Root must be non-zero");if(bt%1!==0)throw new Error("Root must be an integer");if(mt===0||mt.abs()===0)return[new dt(0,0)];var St=typeof mt=="number",Et;(St||mt.re===0||mt.im===0)&&(St?Et=2*+(mt<0):mt.im===0?Et=2*+(mt.re<0):Et=2*+(mt.im<0)+1);for(var Ct=mt.arg(),Rt=mt.abs(),Tt=[],wt=Math.pow(Rt,1/bt),At=0;At<bt;At++){var Nt=(Et+4*At)/bt;if(Nt===Math.round(Nt)){Tt.push(ft[Nt%4](wt));continue}Tt.push(new dt({r:wt,phi:(Ct+2*Math.PI*At)/bt}))}return Tt}return st(_e,{Complex:function(bt){return ht(bt,2)},"Complex, number":ht})});return nthRoots$1.createNthRoots=rt,nthRoots$1}var dotPow$1={},hasRequiredDotPow$1;function requireDotPow$1(){if(hasRequiredDotPow$1)return dotPow$1;hasRequiredDotPow$1=1,Object.defineProperty(dotPow$1,"__esModule",{value:!0}),dotPow$1.createDotPow=void 0;var et=requireFactory(),_e=requireAlgorithm03(),tt=requireAlgorithm07(),rt=requireAlgorithm11(),nt=requireAlgorithm12(),st=requireAlgorithm13(),dt=requireAlgorithm14(),ft="dotPow",ht=["typed","equalScalar","matrix","pow","DenseMatrix"],mt=(0,et.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.equalScalar,Ct=bt.matrix,Rt=bt.pow,Tt=bt.DenseMatrix,wt=(0,_e.createAlgorithm03)({typed:St}),At=(0,tt.createAlgorithm07)({typed:St,DenseMatrix:Tt}),Nt=(0,rt.createAlgorithm11)({typed:St,equalScalar:Et}),Pt=(0,nt.createAlgorithm12)({typed:St,DenseMatrix:Tt}),It=(0,st.createAlgorithm13)({typed:St}),Ft=(0,dt.createAlgorithm14)({typed:St});return St(ft,{"any, any":Rt,"SparseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,Rt,!1)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return wt(Kt,Vt,Rt,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return wt(Vt,Kt,Rt,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return It(Vt,Kt,Rt)},"Array, Array":function(Vt,Kt){return this(Ct(Vt),Ct(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Ct(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Ct(Kt))},"SparseMatrix, any":function(Vt,Kt){return Nt(Vt,Kt,this,!1)},"DenseMatrix, any":function(Vt,Kt){return Ft(Vt,Kt,this,!1)},"any, SparseMatrix":function(Vt,Kt){return Pt(Kt,Vt,this,!0)},"any, DenseMatrix":function(Vt,Kt){return Ft(Kt,Vt,this,!0)},"Array, any":function(Vt,Kt){return Ft(Ct(Vt),Kt,this,!1).valueOf()},"any, Array":function(Vt,Kt){return Ft(Ct(Kt),Vt,this,!0).valueOf()}})});return dotPow$1.createDotPow=mt,dotPow$1}var dotDivide$1={},hasRequiredDotDivide$1;function requireDotDivide$1(){if(hasRequiredDotDivide$1)return dotDivide$1;hasRequiredDotDivide$1=1,Object.defineProperty(dotDivide$1,"__esModule",{value:!0}),dotDivide$1.createDotDivide=void 0;var et=requireFactory(),_e=requireAlgorithm02(),tt=requireAlgorithm03(),rt=requireAlgorithm07(),nt=requireAlgorithm11(),st=requireAlgorithm12(),dt=requireAlgorithm13(),ft=requireAlgorithm14(),ht="dotDivide",mt=["typed","matrix","equalScalar","divideScalar","DenseMatrix"],bt=(0,et.factory)(ht,mt,function(St){var Et=St.typed,Ct=St.matrix,Rt=St.equalScalar,Tt=St.divideScalar,wt=St.DenseMatrix,At=(0,_e.createAlgorithm02)({typed:Et,equalScalar:Rt}),Nt=(0,tt.createAlgorithm03)({typed:Et}),Pt=(0,rt.createAlgorithm07)({typed:Et,DenseMatrix:wt}),It=(0,nt.createAlgorithm11)({typed:Et,equalScalar:Rt}),Ft=(0,st.createAlgorithm12)({typed:Et,DenseMatrix:wt}),qt=(0,dt.createAlgorithm13)({typed:Et}),Vt=(0,ft.createAlgorithm14)({typed:Et});return Et(ht,{"any, any":Tt,"SparseMatrix, SparseMatrix":function(jt,Ut){return Pt(jt,Ut,Tt,!1)},"SparseMatrix, DenseMatrix":function(jt,Ut){return At(Ut,jt,Tt,!0)},"DenseMatrix, SparseMatrix":function(jt,Ut){return Nt(jt,Ut,Tt,!1)},"DenseMatrix, DenseMatrix":function(jt,Ut){return qt(jt,Ut,Tt)},"Array, Array":function(jt,Ut){return this(Ct(jt),Ct(Ut)).valueOf()},"Array, Matrix":function(jt,Ut){return this(Ct(jt),Ut)},"Matrix, Array":function(jt,Ut){return this(jt,Ct(Ut))},"SparseMatrix, any":function(jt,Ut){return It(jt,Ut,Tt,!1)},"DenseMatrix, any":function(jt,Ut){return Vt(jt,Ut,Tt,!1)},"any, SparseMatrix":function(jt,Ut){return Ft(Ut,jt,Tt,!0)},"any, DenseMatrix":function(jt,Ut){return Vt(Ut,jt,Tt,!0)},"Array, any":function(jt,Ut){return Vt(Ct(jt),Ut,Tt,!1).valueOf()},"any, Array":function(jt,Ut){return Vt(Ct(Ut),jt,Tt,!0).valueOf()}})});return dotDivide$1.createDotDivide=bt,dotDivide$1}var lsolve$1={},solveValidation={},hasRequiredSolveValidation;function requireSolveValidation(){if(hasRequiredSolveValidation)return solveValidation;hasRequiredSolveValidation=1,Object.defineProperty(solveValidation,"__esModule",{value:!0}),solveValidation.createSolveValidation=rt;var et=requireIs(),_e=requireArray(),tt=requireString$2();function rt(nt){var st=nt.DenseMatrix;return function(ft,ht,mt){var bt=ft.size();if(bt.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+(0,tt.format)(bt)+")");var St=bt[0],Et=bt[1];if(St!==Et)throw new RangeError("Matrix must be square (size: "+(0,tt.format)(bt)+")");var Ct=[];if((0,et.isMatrix)(ht)){var Rt=ht.size(),Tt=ht._data;if(Rt.length===1){if(Rt[0]!==St)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var wt=0;wt<St;wt++)Ct[wt]=[Tt[wt]];return new st({data:Ct,size:[St,1],datatype:ht._datatype})}if(Rt.length===2){if(Rt[0]!==St||Rt[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if((0,et.isDenseMatrix)(ht)){if(mt){Ct=[];for(var At=0;At<St;At++)Ct[At]=[Tt[At][0]];return new st({data:Ct,size:[St,1],datatype:ht._datatype})}return ht}if((0,et.isSparseMatrix)(ht)){for(var Nt=0;Nt<St;Nt++)Ct[Nt]=[0];for(var Pt=ht._values,It=ht._index,Ft=ht._ptr,qt=Ft[1],Vt=Ft[0];Vt<qt;Vt++){var Kt=It[Vt];Ct[Kt][0]=Pt[Vt]}return new st({data:Ct,size:[St,1],datatype:ht._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if((0,et.isArray)(ht)){var jt=(0,_e.arraySize)(ht);if(jt.length===1){if(jt[0]!==St)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var Ut=0;Ut<St;Ut++)Ct[Ut]=[ht[Ut]];return new st({data:Ct,size:[St,1]})}if(jt.length===2){if(jt[0]!==St||jt[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var Ot=0;Ot<St;Ot++)Ct[Ot]=[ht[Ot][0]];return new st({data:Ct,size:[St,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}return solveValidation}var hasRequiredLsolve$1;function requireLsolve$1(){if(hasRequiredLsolve$1)return lsolve$1;hasRequiredLsolve$1=1,Object.defineProperty(lsolve$1,"__esModule",{value:!0}),lsolve$1.createLsolve=void 0;var et=requireFactory(),_e=requireSolveValidation(),tt="lsolve",rt=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.divideScalar,mt=st.multiplyScalar,bt=st.subtract,St=st.equalScalar,Et=st.DenseMatrix,Ct=(0,_e.createSolveValidation)({DenseMatrix:Et});return dt(tt,{"SparseMatrix, Array | Matrix":function(At,Nt){return Tt(At,Nt)},"DenseMatrix, Array | Matrix":function(At,Nt){return Rt(At,Nt)},"Array, Array | Matrix":function(At,Nt){var Pt=ft(At),It=Rt(Pt,Nt);return It.valueOf()}});function Rt(wt,At){At=Ct(wt,At,!0);for(var Nt=At._data,Pt=wt._size[0],It=wt._size[1],Ft=[],qt=wt._data,Vt=0;Vt<It;Vt++){var Kt=Nt[Vt][0]||0,jt=void 0;if(St(Kt,0))jt=0;else{var Ut=qt[Vt][Vt];if(St(Ut,0))throw new Error("Linear system cannot be solved since matrix is singular");jt=ht(Kt,Ut);for(var Ot=Vt+1;Ot<Pt;Ot++)Nt[Ot]=[bt(Nt[Ot][0]||0,mt(jt,qt[Ot][Vt]))]}Ft[Vt]=[jt]}return new Et({data:Ft,size:[Pt,1]})}function Tt(wt,At){At=Ct(wt,At,!0);for(var Nt=At._data,Pt=wt._size[0],It=wt._size[1],Ft=wt._values,qt=wt._index,Vt=wt._ptr,Kt=[],jt=0;jt<It;jt++){var Ut=Nt[jt][0]||0;if(St(Ut,0))Kt[jt]=[0];else{for(var Ot=0,Wt=[],Bt=[],tr=Vt[jt],Jt=Vt[jt+1],ar=tr;ar<Jt;ar++){var pr=qt[ar];pr===jt?Ot=Ft[ar]:pr>jt&&(Wt.push(Ft[ar]),Bt.push(pr))}if(St(Ot,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var cr=ht(Ut,Ot),gr=0,Sr=Bt.length;gr<Sr;gr++){var Er=Bt[gr];Nt[Er]=[bt(Nt[Er][0]||0,mt(cr,Wt[gr]))]}Kt[jt]=[cr]}}return new Et({data:Kt,size:[Pt,1]})}});return lsolve$1.createLsolve=nt,lsolve$1}var usolve$1={},hasRequiredUsolve$1;function requireUsolve$1(){if(hasRequiredUsolve$1)return usolve$1;hasRequiredUsolve$1=1,Object.defineProperty(usolve$1,"__esModule",{value:!0}),usolve$1.createUsolve=void 0;var et=requireFactory(),_e=requireSolveValidation(),tt="usolve",rt=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.divideScalar,mt=st.multiplyScalar,bt=st.subtract,St=st.equalScalar,Et=st.DenseMatrix,Ct=(0,_e.createSolveValidation)({DenseMatrix:Et});return dt(tt,{"SparseMatrix, Array | Matrix":function(At,Nt){return Tt(At,Nt)},"DenseMatrix, Array | Matrix":function(At,Nt){return Rt(At,Nt)},"Array, Array | Matrix":function(At,Nt){var Pt=ft(At),It=Rt(Pt,Nt);return It.valueOf()}});function Rt(wt,At){At=Ct(wt,At,!0);for(var Nt=At._data,Pt=wt._size[0],It=wt._size[1],Ft=[],qt=wt._data,Vt=It-1;Vt>=0;Vt--){var Kt=Nt[Vt][0]||0,jt=void 0;if(St(Kt,0))jt=0;else{var Ut=qt[Vt][Vt];if(St(Ut,0))throw new Error("Linear system cannot be solved since matrix is singular");jt=ht(Kt,Ut);for(var Ot=Vt-1;Ot>=0;Ot--)Nt[Ot]=[bt(Nt[Ot][0]||0,mt(jt,qt[Ot][Vt]))]}Ft[Vt]=[jt]}return new Et({data:Ft,size:[Pt,1]})}function Tt(wt,At){At=Ct(wt,At,!0);for(var Nt=At._data,Pt=wt._size[0],It=wt._size[1],Ft=wt._values,qt=wt._index,Vt=wt._ptr,Kt=[],jt=It-1;jt>=0;jt--){var Ut=Nt[jt][0]||0;if(St(Ut,0))Kt[jt]=[0];else{for(var Ot=0,Wt=[],Bt=[],tr=Vt[jt],Jt=Vt[jt+1],ar=Jt-1;ar>=tr;ar--){var pr=qt[ar];pr===jt?Ot=Ft[ar]:pr<jt&&(Wt.push(Ft[ar]),Bt.push(pr))}if(St(Ot,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var cr=ht(Ut,Ot),gr=0,Sr=Bt.length;gr<Sr;gr++){var Er=Bt[gr];Nt[Er]=[bt(Nt[Er][0],mt(cr,Wt[gr]))]}Kt[jt]=[cr]}}return new Et({data:Kt,size:[Pt,1]})}});return usolve$1.createUsolve=nt,usolve$1}var lsolveAll$1={},hasRequiredLsolveAll$1;function requireLsolveAll$1(){if(hasRequiredLsolveAll$1)return lsolveAll$1;hasRequiredLsolveAll$1=1;var et=requireInteropRequireDefault();Object.defineProperty(lsolveAll$1,"__esModule",{value:!0}),lsolveAll$1.createLsolveAll=void 0;var _e=et(requireToConsumableArray()),tt=requireFactory(),rt=requireSolveValidation(),nt="lsolveAll",st=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.divideScalar,St=ft.multiplyScalar,Et=ft.subtract,Ct=ft.equalScalar,Rt=ft.DenseMatrix,Tt=(0,rt.createSolveValidation)({DenseMatrix:Rt});return ht(nt,{"SparseMatrix, Array | Matrix":function(Pt,It){return At(Pt,It)},"DenseMatrix, Array | Matrix":function(Pt,It){return wt(Pt,It)},"Array, Array | Matrix":function(Pt,It){var Ft=mt(Pt),qt=wt(Ft,It);return qt.map(function(Vt){return Vt.valueOf()})}});function wt(Nt,Pt){for(var It=[Tt(Nt,Pt,!0)._data.map(function(Jt){return Jt[0]})],Ft=Nt._data,qt=Nt._size[0],Vt=Nt._size[1],Kt=0;Kt<Vt;Kt++)for(var jt=It.length,Ut=0;Ut<jt;Ut++){var Ot=It[Ut];if(Ct(Ft[Kt][Kt],0))if(Ct(Ot[Kt],0)){if(Ut===0){var Bt=(0,_e.default)(Ot);Bt[Kt]=1;for(var tr=Kt+1;tr<Vt;tr++)Bt[tr]=Et(Bt[tr],Ft[tr][Kt]);It.push(Bt)}}else{if(Ut===0)return[];It.splice(Ut,1),Ut-=1,jt-=1}else{Ot[Kt]=bt(Ot[Kt],Ft[Kt][Kt]);for(var Wt=Kt+1;Wt<Vt;Wt++)Ot[Wt]=Et(Ot[Wt],St(Ot[Kt],Ft[Wt][Kt]))}}return It.map(function(Jt){return new Rt({data:Jt.map(function(ar){return[ar]}),size:[qt,1]})})}function At(Nt,Pt){for(var It=[Tt(Nt,Pt,!0)._data.map(function(Ar){return Ar[0]})],Ft=Nt._size[0],qt=Nt._size[1],Vt=Nt._values,Kt=Nt._index,jt=Nt._ptr,Ut=0;Ut<qt;Ut++)for(var Ot=It.length,Wt=0;Wt<Ot;Wt++){for(var Bt=It[Wt],tr=[],Jt=[],ar=jt[Ut],pr=jt[Ut+1],cr=0,gr=ar;gr<pr;gr++){var Sr=Kt[gr];Sr===Ut?cr=Vt[gr]:Sr>Ut&&(tr.push(Vt[gr]),Jt.push(Sr))}if(Ct(cr,0))if(Ct(Bt[Ut],0)){if(Wt===0){var Mr=(0,_e.default)(Bt);Mr[Ut]=1;for(var Nr=0,Yr=Jt.length;Nr<Yr;Nr++){var Or=Jt[Nr];Mr[Or]=Et(Mr[Or],tr[Nr])}It.push(Mr)}}else{if(Wt===0)return[];It.splice(Wt,1),Wt-=1,Ot-=1}else{Bt[Ut]=bt(Bt[Ut],cr);for(var Er=0,Vr=Jt.length;Er<Vr;Er++){var Wr=Jt[Er];Bt[Wr]=Et(Bt[Wr],St(Bt[Ut],tr[Er]))}}}return It.map(function(Ar){return new Rt({data:Ar.map(function(Qr){return[Qr]}),size:[Ft,1]})})}});return lsolveAll$1.createLsolveAll=dt,lsolveAll$1}var usolveAll$1={},hasRequiredUsolveAll$1;function requireUsolveAll$1(){if(hasRequiredUsolveAll$1)return usolveAll$1;hasRequiredUsolveAll$1=1;var et=requireInteropRequireDefault();Object.defineProperty(usolveAll$1,"__esModule",{value:!0}),usolveAll$1.createUsolveAll=void 0;var _e=et(requireToConsumableArray()),tt=requireFactory(),rt=requireSolveValidation(),nt="usolveAll",st=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.divideScalar,St=ft.multiplyScalar,Et=ft.subtract,Ct=ft.equalScalar,Rt=ft.DenseMatrix,Tt=(0,rt.createSolveValidation)({DenseMatrix:Rt});return ht(nt,{"SparseMatrix, Array | Matrix":function(Pt,It){return At(Pt,It)},"DenseMatrix, Array | Matrix":function(Pt,It){return wt(Pt,It)},"Array, Array | Matrix":function(Pt,It){var Ft=mt(Pt),qt=wt(Ft,It);return qt.map(function(Vt){return Vt.valueOf()})}});function wt(Nt,Pt){for(var It=[Tt(Nt,Pt,!0)._data.map(function(Jt){return Jt[0]})],Ft=Nt._data,qt=Nt._size[0],Vt=Nt._size[1],Kt=Vt-1;Kt>=0;Kt--)for(var jt=It.length,Ut=0;Ut<jt;Ut++){var Ot=It[Ut];if(Ct(Ft[Kt][Kt],0))if(Ct(Ot[Kt],0)){if(Ut===0){var Bt=(0,_e.default)(Ot);Bt[Kt]=1;for(var tr=Kt-1;tr>=0;tr--)Bt[tr]=Et(Bt[tr],Ft[tr][Kt]);It.push(Bt)}}else{if(Ut===0)return[];It.splice(Ut,1),Ut-=1,jt-=1}else{Ot[Kt]=bt(Ot[Kt],Ft[Kt][Kt]);for(var Wt=Kt-1;Wt>=0;Wt--)Ot[Wt]=Et(Ot[Wt],St(Ot[Kt],Ft[Wt][Kt]))}}return It.map(function(Jt){return new Rt({data:Jt.map(function(ar){return[ar]}),size:[qt,1]})})}function At(Nt,Pt){for(var It=[Tt(Nt,Pt,!0)._data.map(function(Ar){return Ar[0]})],Ft=Nt._size[0],qt=Nt._size[1],Vt=Nt._values,Kt=Nt._index,jt=Nt._ptr,Ut=qt-1;Ut>=0;Ut--)for(var Ot=It.length,Wt=0;Wt<Ot;Wt++){for(var Bt=It[Wt],tr=[],Jt=[],ar=jt[Ut],pr=jt[Ut+1],cr=0,gr=pr-1;gr>=ar;gr--){var Sr=Kt[gr];Sr===Ut?cr=Vt[gr]:Sr<Ut&&(tr.push(Vt[gr]),Jt.push(Sr))}if(Ct(cr,0))if(Ct(Bt[Ut],0)){if(Wt===0){var Mr=(0,_e.default)(Bt);Mr[Ut]=1;for(var Nr=0,Yr=Jt.length;Nr<Yr;Nr++){var Or=Jt[Nr];Mr[Or]=Et(Mr[Or],tr[Nr])}It.push(Mr)}}else{if(Wt===0)return[];It.splice(Wt,1),Wt-=1,Ot-=1}else{Bt[Ut]=bt(Bt[Ut],cr);for(var Er=0,Vr=Jt.length;Er<Vr;Er++){var Wr=Jt[Er];Bt[Wr]=Et(Bt[Wr],St(Bt[Ut],tr[Er]))}}}return It.map(function(Ar){return new Rt({data:Ar.map(function(Qr){return[Qr]}),size:[Ft,1]})})}});return usolveAll$1.createUsolveAll=dt,usolveAll$1}var leftShift$1={},algorithm08={},hasRequiredAlgorithm08;function requireAlgorithm08(){if(hasRequiredAlgorithm08)return algorithm08;hasRequiredAlgorithm08=1,Object.defineProperty(algorithm08,"__esModule",{value:!0}),algorithm08.createAlgorithm08=void 0;var et=requireFactory(),_e=requireDimensionError(),tt="algorithm08",rt=["typed","equalScalar"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.equalScalar;return function(mt,bt,St){var Et=mt._values,Ct=mt._index,Rt=mt._ptr,Tt=mt._size,wt=mt._datatype,At=bt._values,Nt=bt._index,Pt=bt._ptr,It=bt._size,Ft=bt._datatype;if(Tt.length!==It.length)throw new _e.DimensionError(Tt.length,It.length);if(Tt[0]!==It[0]||Tt[1]!==It[1])throw new RangeError("Dimension mismatch. Matrix A ("+Tt+") must match Matrix B ("+It+")");if(!Et||!At)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var qt=Tt[0],Vt=Tt[1],Kt,jt=ft,Ut=0,Ot=St;typeof wt=="string"&&wt===Ft&&(Kt=wt,jt=dt.find(ft,[Kt,Kt]),Ut=dt.convert(0,Kt),Ot=dt.find(St,[Kt,Kt]));for(var Wt=[],Bt=[],tr=[],Jt=[],ar=[],pr,cr,gr,Sr,Er=0;Er<Vt;Er++){tr[Er]=Bt.length;var Vr=Er+1;for(cr=Rt[Er],gr=Rt[Er+1],pr=cr;pr<gr;pr++)Sr=Ct[pr],ar[Sr]=Vr,Jt[Sr]=Et[pr],Bt.push(Sr);for(cr=Pt[Er],gr=Pt[Er+1],pr=cr;pr<gr;pr++)Sr=Nt[pr],ar[Sr]===Vr&&(Jt[Sr]=Ot(Jt[Sr],At[pr]));for(pr=tr[Er];pr<Bt.length;){Sr=Bt[pr];var Wr=Jt[Sr];jt(Wr,Ut)?Bt.splice(pr,1):(Wt.push(Wr),pr++)}}return tr[Vt]=Bt.length,mt.createSparseMatrix({values:Wt,index:Bt,ptr:tr,size:[qt,Vt],datatype:Kt})}});return algorithm08.createAlgorithm08=nt,algorithm08}var hasRequiredLeftShift$1;function requireLeftShift$1(){if(hasRequiredLeftShift$1)return leftShift$1;hasRequiredLeftShift$1=1,Object.defineProperty(leftShift$1,"__esModule",{value:!0}),leftShift$1.createLeftShift=void 0;var et=requireAlgorithm02(),_e=requireAlgorithm11(),tt=requireAlgorithm13(),rt=requireAlgorithm14(),nt=requireAlgorithm01(),st=requireAlgorithm10(),dt=requireAlgorithm08(),ft=requireFactory(),ht=requireNumber$2(),mt=requireBitwise(),bt="leftShift",St=["typed","matrix","equalScalar","zeros","DenseMatrix"],Et=(0,ft.factory)(bt,St,function(Ct){var Rt=Ct.typed,Tt=Ct.matrix,wt=Ct.equalScalar,At=Ct.zeros,Nt=Ct.DenseMatrix,Pt=(0,nt.createAlgorithm01)({typed:Rt}),It=(0,et.createAlgorithm02)({typed:Rt,equalScalar:wt}),Ft=(0,dt.createAlgorithm08)({typed:Rt,equalScalar:wt}),qt=(0,st.createAlgorithm10)({typed:Rt,DenseMatrix:Nt}),Vt=(0,_e.createAlgorithm11)({typed:Rt,equalScalar:wt}),Kt=(0,tt.createAlgorithm13)({typed:Rt}),jt=(0,rt.createAlgorithm14)({typed:Rt});return Rt(bt,{"number, number":ht.leftShiftNumber,"BigNumber, BigNumber":mt.leftShiftBigNumber,"SparseMatrix, SparseMatrix":function(Ot,Wt){return Ft(Ot,Wt,this,!1)},"SparseMatrix, DenseMatrix":function(Ot,Wt){return It(Wt,Ot,this,!0)},"DenseMatrix, SparseMatrix":function(Ot,Wt){return Pt(Ot,Wt,this,!1)},"DenseMatrix, DenseMatrix":function(Ot,Wt){return Kt(Ot,Wt,this)},"Array, Array":function(Ot,Wt){return this(Tt(Ot),Tt(Wt)).valueOf()},"Array, Matrix":function(Ot,Wt){return this(Tt(Ot),Wt)},"Matrix, Array":function(Ot,Wt){return this(Ot,Tt(Wt))},"SparseMatrix, number | BigNumber":function(Ot,Wt){return wt(Wt,0)?Ot.clone():Vt(Ot,Wt,this,!1)},"DenseMatrix, number | BigNumber":function(Ot,Wt){return wt(Wt,0)?Ot.clone():jt(Ot,Wt,this,!1)},"number | BigNumber, SparseMatrix":function(Ot,Wt){return wt(Ot,0)?At(Wt.size(),Wt.storage()):qt(Wt,Ot,this,!0)},"number | BigNumber, DenseMatrix":function(Ot,Wt){return wt(Ot,0)?At(Wt.size(),Wt.storage()):jt(Wt,Ot,this,!0)},"Array, number | BigNumber":function(Ot,Wt){return this(Tt(Ot),Wt).valueOf()},"number | BigNumber, Array":function(Ot,Wt){return this(Ot,Tt(Wt)).valueOf()}})});return leftShift$1.createLeftShift=Et,leftShift$1}var rightArithShift$1={},hasRequiredRightArithShift$1;function requireRightArithShift$1(){if(hasRequiredRightArithShift$1)return rightArithShift$1;hasRequiredRightArithShift$1=1,Object.defineProperty(rightArithShift$1,"__esModule",{value:!0}),rightArithShift$1.createRightArithShift=void 0;var et=requireBitwise(),_e=requireAlgorithm02(),tt=requireAlgorithm11(),rt=requireAlgorithm13(),nt=requireAlgorithm14(),st=requireAlgorithm01(),dt=requireAlgorithm10(),ft=requireAlgorithm08(),ht=requireFactory(),mt=requireNumber$2(),bt="rightArithShift",St=["typed","matrix","equalScalar","zeros","DenseMatrix"],Et=(0,ht.factory)(bt,St,function(Ct){var Rt=Ct.typed,Tt=Ct.matrix,wt=Ct.equalScalar,At=Ct.zeros,Nt=Ct.DenseMatrix,Pt=(0,st.createAlgorithm01)({typed:Rt}),It=(0,_e.createAlgorithm02)({typed:Rt,equalScalar:wt}),Ft=(0,ft.createAlgorithm08)({typed:Rt,equalScalar:wt}),qt=(0,dt.createAlgorithm10)({typed:Rt,DenseMatrix:Nt}),Vt=(0,tt.createAlgorithm11)({typed:Rt,equalScalar:wt}),Kt=(0,rt.createAlgorithm13)({typed:Rt}),jt=(0,nt.createAlgorithm14)({typed:Rt});return Rt(bt,{"number, number":mt.rightArithShiftNumber,"BigNumber, BigNumber":et.rightArithShiftBigNumber,"SparseMatrix, SparseMatrix":function(Ot,Wt){return Ft(Ot,Wt,this,!1)},"SparseMatrix, DenseMatrix":function(Ot,Wt){return It(Wt,Ot,this,!0)},"DenseMatrix, SparseMatrix":function(Ot,Wt){return Pt(Ot,Wt,this,!1)},"DenseMatrix, DenseMatrix":function(Ot,Wt){return Kt(Ot,Wt,this)},"Array, Array":function(Ot,Wt){return this(Tt(Ot),Tt(Wt)).valueOf()},"Array, Matrix":function(Ot,Wt){return this(Tt(Ot),Wt)},"Matrix, Array":function(Ot,Wt){return this(Ot,Tt(Wt))},"SparseMatrix, number | BigNumber":function(Ot,Wt){return wt(Wt,0)?Ot.clone():Vt(Ot,Wt,this,!1)},"DenseMatrix, number | BigNumber":function(Ot,Wt){return wt(Wt,0)?Ot.clone():jt(Ot,Wt,this,!1)},"number | BigNumber, SparseMatrix":function(Ot,Wt){return wt(Ot,0)?At(Wt.size(),Wt.storage()):qt(Wt,Ot,this,!0)},"number | BigNumber, DenseMatrix":function(Ot,Wt){return wt(Ot,0)?At(Wt.size(),Wt.storage()):jt(Wt,Ot,this,!0)},"Array, number | BigNumber":function(Ot,Wt){return this(Tt(Ot),Wt).valueOf()},"number | BigNumber, Array":function(Ot,Wt){return this(Ot,Tt(Wt)).valueOf()}})});return rightArithShift$1.createRightArithShift=Et,rightArithShift$1}var rightLogShift$1={},hasRequiredRightLogShift$1;function requireRightLogShift$1(){if(hasRequiredRightLogShift$1)return rightLogShift$1;hasRequiredRightLogShift$1=1,Object.defineProperty(rightLogShift$1,"__esModule",{value:!0}),rightLogShift$1.createRightLogShift=void 0;var et=requireAlgorithm02(),_e=requireAlgorithm11(),tt=requireAlgorithm13(),rt=requireAlgorithm14(),nt=requireAlgorithm01(),st=requireAlgorithm10(),dt=requireAlgorithm08(),ft=requireFactory(),ht=requireNumber$2(),mt="rightLogShift",bt=["typed","matrix","equalScalar","zeros","DenseMatrix"],St=(0,ft.factory)(mt,bt,function(Et){var Ct=Et.typed,Rt=Et.matrix,Tt=Et.equalScalar,wt=Et.zeros,At=Et.DenseMatrix,Nt=(0,nt.createAlgorithm01)({typed:Ct}),Pt=(0,et.createAlgorithm02)({typed:Ct,equalScalar:Tt}),It=(0,dt.createAlgorithm08)({typed:Ct,equalScalar:Tt}),Ft=(0,st.createAlgorithm10)({typed:Ct,DenseMatrix:At}),qt=(0,_e.createAlgorithm11)({typed:Ct,equalScalar:Tt}),Vt=(0,tt.createAlgorithm13)({typed:Ct}),Kt=(0,rt.createAlgorithm14)({typed:Ct});return Ct(mt,{"number, number":ht.rightLogShiftNumber,"SparseMatrix, SparseMatrix":function(Ut,Ot){return It(Ut,Ot,this,!1)},"SparseMatrix, DenseMatrix":function(Ut,Ot){return Pt(Ot,Ut,this,!0)},"DenseMatrix, SparseMatrix":function(Ut,Ot){return Nt(Ut,Ot,this,!1)},"DenseMatrix, DenseMatrix":function(Ut,Ot){return Vt(Ut,Ot,this)},"Array, Array":function(Ut,Ot){return this(Rt(Ut),Rt(Ot)).valueOf()},"Array, Matrix":function(Ut,Ot){return this(Rt(Ut),Ot)},"Matrix, Array":function(Ut,Ot){return this(Ut,Rt(Ot))},"SparseMatrix, number | BigNumber":function(Ut,Ot){return Tt(Ot,0)?Ut.clone():qt(Ut,Ot,this,!1)},"DenseMatrix, number | BigNumber":function(Ut,Ot){return Tt(Ot,0)?Ut.clone():Kt(Ut,Ot,this,!1)},"number | BigNumber, SparseMatrix":function(Ut,Ot){return Tt(Ut,0)?wt(Ot.size(),Ot.storage()):Ft(Ot,Ut,this,!0)},"number | BigNumber, DenseMatrix":function(Ut,Ot){return Tt(Ut,0)?wt(Ot.size(),Ot.storage()):Kt(Ot,Ut,this,!0)},"Array, number | BigNumber":function(Ut,Ot){return this(Rt(Ut),Ot).valueOf()},"number | BigNumber, Array":function(Ut,Ot){return this(Ut,Rt(Ot)).valueOf()}})});return rightLogShift$1.createRightLogShift=St,rightLogShift$1}var and$1={},hasRequiredAnd$1;function requireAnd$1(){if(hasRequiredAnd$1)return and$1;hasRequiredAnd$1=1,Object.defineProperty(and$1,"__esModule",{value:!0}),and$1.createAnd=void 0;var et=requireAlgorithm02(),_e=requireAlgorithm11(),tt=requireAlgorithm13(),rt=requireAlgorithm14(),nt=requireAlgorithm06(),st=requireFactory(),dt=requireNumber$2(),ft="and",ht=["typed","matrix","equalScalar","zeros","not"],mt=(0,st.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=bt.zeros,Tt=bt.not,wt=(0,et.createAlgorithm02)({typed:St,equalScalar:Ct}),At=(0,nt.createAlgorithm06)({typed:St,equalScalar:Ct}),Nt=(0,_e.createAlgorithm11)({typed:St,equalScalar:Ct}),Pt=(0,tt.createAlgorithm13)({typed:St}),It=(0,rt.createAlgorithm14)({typed:St});return St(ft,{"number, number":dt.andNumber,"Complex, Complex":function(qt,Vt){return(qt.re!==0||qt.im!==0)&&(Vt.re!==0||Vt.im!==0)},"BigNumber, BigNumber":function(qt,Vt){return!qt.isZero()&&!Vt.isZero()&&!qt.isNaN()&&!Vt.isNaN()},"Unit, Unit":function(qt,Vt){return this(qt.value||0,Vt.value||0)},"SparseMatrix, SparseMatrix":function(qt,Vt){return At(qt,Vt,this,!1)},"SparseMatrix, DenseMatrix":function(qt,Vt){return wt(Vt,qt,this,!0)},"DenseMatrix, SparseMatrix":function(qt,Vt){return wt(qt,Vt,this,!1)},"DenseMatrix, DenseMatrix":function(qt,Vt){return Pt(qt,Vt,this)},"Array, Array":function(qt,Vt){return this(Et(qt),Et(Vt)).valueOf()},"Array, Matrix":function(qt,Vt){return this(Et(qt),Vt)},"Matrix, Array":function(qt,Vt){return this(qt,Et(Vt))},"SparseMatrix, any":function(qt,Vt){return Tt(Vt)?Rt(qt.size(),qt.storage()):Nt(qt,Vt,this,!1)},"DenseMatrix, any":function(qt,Vt){return Tt(Vt)?Rt(qt.size(),qt.storage()):It(qt,Vt,this,!1)},"any, SparseMatrix":function(qt,Vt){return Tt(qt)?Rt(qt.size(),qt.storage()):Nt(Vt,qt,this,!0)},"any, DenseMatrix":function(qt,Vt){return Tt(qt)?Rt(qt.size(),qt.storage()):It(Vt,qt,this,!0)},"Array, any":function(qt,Vt){return this(Et(qt),Vt).valueOf()},"any, Array":function(qt,Vt){return this(qt,Et(Vt)).valueOf()}})});return and$1.createAnd=mt,and$1}var compare$1={},hasRequiredCompare$1;function requireCompare$1(){if(hasRequiredCompare$1)return compare$1;hasRequiredCompare$1=1,Object.defineProperty(compare$1,"__esModule",{value:!0}),compare$1.createCompareNumber=compare$1.createCompare=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireAlgorithm03(),nt=requireAlgorithm12(),st=requireAlgorithm14(),dt=requireAlgorithm13(),ft=requireAlgorithm05(),ht="compare",mt=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],bt=(0,tt.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.equalScalar,wt=Et.matrix,At=Et.BigNumber,Nt=Et.Fraction,Pt=Et.DenseMatrix,It=(0,rt.createAlgorithm03)({typed:Ct}),Ft=(0,ft.createAlgorithm05)({typed:Ct,equalScalar:Tt}),qt=(0,nt.createAlgorithm12)({typed:Ct,DenseMatrix:Pt}),Vt=(0,dt.createAlgorithm13)({typed:Ct}),Kt=(0,st.createAlgorithm14)({typed:Ct});return Ct(ht,{"boolean, boolean":function(Ut,Ot){return Ut===Ot?0:Ut>Ot?1:-1},"number, number":function(Ut,Ot){return(0,_e.nearlyEqual)(Ut,Ot,Rt.epsilon)?0:Ut>Ot?1:-1},"BigNumber, BigNumber":function(Ut,Ot){return(0,et.nearlyEqual)(Ut,Ot,Rt.epsilon)?new At(0):new At(Ut.cmp(Ot))},"Fraction, Fraction":function(Ut,Ot){return new Nt(Ut.compare(Ot))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(Ut,Ot){if(!Ut.equalBase(Ot))throw new Error("Cannot compare units with different base");return this(Ut.value,Ot.value)},"SparseMatrix, SparseMatrix":function(Ut,Ot){return Ft(Ut,Ot,this)},"SparseMatrix, DenseMatrix":function(Ut,Ot){return It(Ot,Ut,this,!0)},"DenseMatrix, SparseMatrix":function(Ut,Ot){return It(Ut,Ot,this,!1)},"DenseMatrix, DenseMatrix":function(Ut,Ot){return Vt(Ut,Ot,this)},"Array, Array":function(Ut,Ot){return this(wt(Ut),wt(Ot)).valueOf()},"Array, Matrix":function(Ut,Ot){return this(wt(Ut),Ot)},"Matrix, Array":function(Ut,Ot){return this(Ut,wt(Ot))},"SparseMatrix, any":function(Ut,Ot){return qt(Ut,Ot,this,!1)},"DenseMatrix, any":function(Ut,Ot){return Kt(Ut,Ot,this,!1)},"any, SparseMatrix":function(Ut,Ot){return qt(Ot,Ut,this,!0)},"any, DenseMatrix":function(Ut,Ot){return Kt(Ot,Ut,this,!0)},"Array, any":function(Ut,Ot){return Kt(wt(Ut),Ot,this,!1).valueOf()},"any, Array":function(Ut,Ot){return Kt(wt(Ot),Ut,this,!0).valueOf()}})});compare$1.createCompare=bt;var St=(0,tt.factory)(ht,["typed","config"],function(Et){var Ct=Et.typed,Rt=Et.config;return Ct(ht,{"number, number":function(wt,At){return(0,_e.nearlyEqual)(wt,At,Rt.epsilon)?0:wt>At?1:-1}})});return compare$1.createCompareNumber=St,compare$1}var compareNatural$1={},naturalSort,hasRequiredNaturalSort;function requireNaturalSort(){return hasRequiredNaturalSort||(hasRequiredNaturalSort=1,naturalSort=function et(_e,tt){var rt=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,nt=/(^[ ]*|[ ]*$)/g,st=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,dt=/^0x[0-9a-f]+$/i,ft=/^0/,ht=function(Pt){return et.insensitive&&(""+Pt).toLowerCase()||""+Pt},mt=ht(_e).replace(nt,"")||"",bt=ht(tt).replace(nt,"")||"",St=mt.replace(rt,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),Et=bt.replace(rt,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),Ct=parseInt(mt.match(dt),16)||St.length!==1&&mt.match(st)&&Date.parse(mt),Rt=parseInt(bt.match(dt),16)||Ct&&bt.match(st)&&Date.parse(bt)||null,Tt,wt;if(Rt){if(Ct<Rt)return-1;if(Ct>Rt)return 1}for(var At=0,Nt=Math.max(St.length,Et.length);At<Nt;At++){if(Tt=!(St[At]||"").match(ft)&&parseFloat(St[At])||St[At]||0,wt=!(Et[At]||"").match(ft)&&parseFloat(Et[At])||Et[At]||0,isNaN(Tt)!==isNaN(wt))return isNaN(Tt)?1:-1;if(typeof Tt!=typeof wt&&(Tt+="",wt+=""),Tt<wt)return-1;if(Tt>wt)return 1}return 0}),naturalSort}var hasRequiredCompareNatural$1;function requireCompareNatural$1(){if(hasRequiredCompareNatural$1)return compareNatural$1;hasRequiredCompareNatural$1=1;var et=requireInteropRequireDefault();Object.defineProperty(compareNatural$1,"__esModule",{value:!0}),compareNatural$1.createCompareNatural=void 0;var _e=et(requireNaturalSort()),tt=requireIs(),rt=requireFactory(),nt="compareNatural",st=["typed","compare"],dt=(0,rt.factory)(nt,st,function(ht){var mt=ht.typed,bt=ht.compare,St=bt.signatures["boolean,boolean"];return mt(nt,{"any, any":function(wt,At){var Nt=(0,tt.typeOf)(wt),Pt=(0,tt.typeOf)(At),It;if((Nt==="number"||Nt==="BigNumber"||Nt==="Fraction")&&(Pt==="number"||Pt==="BigNumber"||Pt==="Fraction"))return It=bt(wt,At),It.toString()!=="0"?It>0?1:-1:(0,_e.default)(Nt,Pt);if(Nt==="Array"||Nt==="Matrix"||Pt==="Array"||Pt==="Matrix")return It=Et(this,wt,At),It!==0?It:(0,_e.default)(Nt,Pt);if(Nt!==Pt)return(0,_e.default)(Nt,Pt);if(Nt==="Complex")return ft(wt,At);if(Nt==="Unit")return wt.equalBase(At)?this(wt.value,At.value):Ct(this,wt.formatUnits(),At.formatUnits());if(Nt==="boolean")return St(wt,At);if(Nt==="string")return(0,_e.default)(wt,At);if(Nt==="Object")return Rt(this,wt,At);if(Nt==="null"||Nt==="undefined")return 0;throw new TypeError('Unsupported type of value "'+Nt+'"')}});function Et(Tt,wt,At){return(0,tt.isSparseMatrix)(wt)&&(0,tt.isSparseMatrix)(At)?Ct(Tt,wt.toJSON().values,At.toJSON().values):(0,tt.isSparseMatrix)(wt)?Et(Tt,wt.toArray(),At):(0,tt.isSparseMatrix)(At)?Et(Tt,wt,At.toArray()):(0,tt.isDenseMatrix)(wt)?Et(Tt,wt.toJSON().data,At):(0,tt.isDenseMatrix)(At)?Et(Tt,wt,At.toJSON().data):Array.isArray(wt)?Array.isArray(At)?Ct(Tt,wt,At):Et(Tt,wt,[At]):Et(Tt,[wt],At)}function Ct(Tt,wt,At){for(var Nt=0,Pt=Math.min(wt.length,At.length);Nt<Pt;Nt++){var It=Tt(wt[Nt],At[Nt]);if(It!==0)return It}return wt.length>At.length?1:wt.length<At.length?-1:0}function Rt(Tt,wt,At){var Nt=Object.keys(wt),Pt=Object.keys(At);Nt.sort(_e.default),Pt.sort(_e.default);var It=Ct(Tt,Nt,Pt);if(It!==0)return It;for(var Ft=0;Ft<Nt.length;Ft++){var qt=Tt(wt[Nt[Ft]],At[Pt[Ft]]);if(qt!==0)return qt}return 0}});compareNatural$1.createCompareNatural=dt;function ft(ht,mt){return ht.re>mt.re?1:ht.re<mt.re?-1:ht.im>mt.im?1:ht.im<mt.im?-1:0}return compareNatural$1}var compareText$1={},hasRequiredCompareText$1;function requireCompareText$1(){if(hasRequiredCompareText$1)return compareText$1;hasRequiredCompareText$1=1,Object.defineProperty(compareText$1,"__esModule",{value:!0}),compareText$1.createCompareTextNumber=compareText$1.createCompareText=void 0;var et=requireString$2(),_e=requireFactory(),tt=requireAlgorithm14(),rt=requireAlgorithm13(),nt="compareText",st=["typed","matrix"],dt=(0,_e.factory)(nt,st,function(ht){var mt=ht.typed,bt=ht.matrix,St=(0,rt.createAlgorithm13)({typed:mt}),Et=(0,tt.createAlgorithm14)({typed:mt});return mt(nt,{"any, any":et.compareText,"DenseMatrix, DenseMatrix":function(Rt,Tt){return St(Rt,Tt,et.compareText)},"Array, Array":function(Rt,Tt){return this(bt(Rt),bt(Tt)).valueOf()},"Array, Matrix":function(Rt,Tt){return this(bt(Rt),Tt)},"Matrix, Array":function(Rt,Tt){return this(Rt,bt(Tt))},"DenseMatrix, any":function(Rt,Tt){return Et(Rt,Tt,et.compareText,!1)},"any, DenseMatrix":function(Rt,Tt){return Et(Tt,Rt,et.compareText,!0)},"Array, any":function(Rt,Tt){return Et(bt(Rt),Tt,et.compareText,!1).valueOf()},"any, Array":function(Rt,Tt){return Et(bt(Tt),Rt,et.compareText,!0).valueOf()}})});compareText$1.createCompareText=dt;var ft=(0,_e.factory)(nt,["typed"],function(ht){var mt=ht.typed;return mt(nt,{"any, any":et.compareText})});return compareText$1.createCompareTextNumber=ft,compareText$1}var equal$1={},hasRequiredEqual$1;function requireEqual$1(){if(hasRequiredEqual$1)return equal$1;hasRequiredEqual$1=1,Object.defineProperty(equal$1,"__esModule",{value:!0}),equal$1.createEqualNumber=equal$1.createEqual=void 0;var et=requireFactory(),_e=requireAlgorithm03(),tt=requireAlgorithm07(),rt=requireAlgorithm12(),nt=requireAlgorithm13(),st=requireAlgorithm14(),dt="equal",ft=["typed","matrix","equalScalar","DenseMatrix"],ht=(0,et.factory)(dt,ft,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.equalScalar,Rt=bt.DenseMatrix,Tt=(0,_e.createAlgorithm03)({typed:St}),wt=(0,tt.createAlgorithm07)({typed:St,DenseMatrix:Rt}),At=(0,rt.createAlgorithm12)({typed:St,DenseMatrix:Rt}),Nt=(0,nt.createAlgorithm13)({typed:St}),Pt=(0,st.createAlgorithm14)({typed:St});return St(dt,{"any, any":function(Ft,qt){return Ft===null?qt===null:qt===null?Ft===null:Ft===void 0?qt===void 0:qt===void 0?Ft===void 0:Ct(Ft,qt)},"SparseMatrix, SparseMatrix":function(Ft,qt){return wt(Ft,qt,Ct)},"SparseMatrix, DenseMatrix":function(Ft,qt){return Tt(qt,Ft,Ct,!0)},"DenseMatrix, SparseMatrix":function(Ft,qt){return Tt(Ft,qt,Ct,!1)},"DenseMatrix, DenseMatrix":function(Ft,qt){return Nt(Ft,qt,Ct)},"Array, Array":function(Ft,qt){return this(Et(Ft),Et(qt)).valueOf()},"Array, Matrix":function(Ft,qt){return this(Et(Ft),qt)},"Matrix, Array":function(Ft,qt){return this(Ft,Et(qt))},"SparseMatrix, any":function(Ft,qt){return At(Ft,qt,Ct,!1)},"DenseMatrix, any":function(Ft,qt){return Pt(Ft,qt,Ct,!1)},"any, SparseMatrix":function(Ft,qt){return At(qt,Ft,Ct,!0)},"any, DenseMatrix":function(Ft,qt){return Pt(qt,Ft,Ct,!0)},"Array, any":function(Ft,qt){return Pt(Et(Ft),qt,Ct,!1).valueOf()},"any, Array":function(Ft,qt){return Pt(Et(qt),Ft,Ct,!0).valueOf()}})});equal$1.createEqual=ht;var mt=(0,et.factory)(dt,["typed","equalScalar"],function(bt){var St=bt.typed,Et=bt.equalScalar;return St(dt,{"any, any":function(Rt,Tt){return Rt===null?Tt===null:Tt===null?Rt===null:Rt===void 0?Tt===void 0:Tt===void 0?Rt===void 0:Et(Rt,Tt)}})});return equal$1.createEqualNumber=mt,equal$1}var equalText$1={},hasRequiredEqualText$1;function requireEqualText$1(){if(hasRequiredEqualText$1)return equalText$1;hasRequiredEqualText$1=1,Object.defineProperty(equalText$1,"__esModule",{value:!0}),equalText$1.createEqualText=void 0;var et=requireFactory(),_e="equalText",tt=["typed","compareText","isZero"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.compareText,ft=nt.isZero;return st(_e,{"any, any":function(mt,bt){return ft(dt(mt,bt))}})});return equalText$1.createEqualText=rt,equalText$1}var smaller$1={},hasRequiredSmaller$1;function requireSmaller$1(){if(hasRequiredSmaller$1)return smaller$1;hasRequiredSmaller$1=1,Object.defineProperty(smaller$1,"__esModule",{value:!0}),smaller$1.createSmallerNumber=smaller$1.createSmaller=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireAlgorithm03(),nt=requireAlgorithm07(),st=requireAlgorithm12(),dt=requireAlgorithm14(),ft=requireAlgorithm13(),ht="smaller",mt=["typed","config","matrix","DenseMatrix"],bt=(0,tt.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.matrix,wt=Et.DenseMatrix,At=(0,rt.createAlgorithm03)({typed:Ct}),Nt=(0,nt.createAlgorithm07)({typed:Ct,DenseMatrix:wt}),Pt=(0,st.createAlgorithm12)({typed:Ct,DenseMatrix:wt}),It=(0,ft.createAlgorithm13)({typed:Ct}),Ft=(0,dt.createAlgorithm14)({typed:Ct});return Ct(ht,{"boolean, boolean":function(Vt,Kt){return Vt<Kt},"number, number":function(Vt,Kt){return Vt<Kt&&!(0,_e.nearlyEqual)(Vt,Kt,Rt.epsilon)},"BigNumber, BigNumber":function(Vt,Kt){return Vt.lt(Kt)&&!(0,et.nearlyEqual)(Vt,Kt,Rt.epsilon)},"Fraction, Fraction":function(Vt,Kt){return Vt.compare(Kt)===-1},"Complex, Complex":function(Vt,Kt){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(Vt,Kt){if(!Vt.equalBase(Kt))throw new Error("Cannot compare units with different base");return this(Vt.value,Kt.value)},"SparseMatrix, SparseMatrix":function(Vt,Kt){return Nt(Vt,Kt,this)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return At(Kt,Vt,this,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,this,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return It(Vt,Kt,this)},"Array, Array":function(Vt,Kt){return this(Tt(Vt),Tt(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Tt(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Tt(Kt))},"SparseMatrix, any":function(Vt,Kt){return Pt(Vt,Kt,this,!1)},"DenseMatrix, any":function(Vt,Kt){return Ft(Vt,Kt,this,!1)},"any, SparseMatrix":function(Vt,Kt){return Pt(Kt,Vt,this,!0)},"any, DenseMatrix":function(Vt,Kt){return Ft(Kt,Vt,this,!0)},"Array, any":function(Vt,Kt){return Ft(Tt(Vt),Kt,this,!1).valueOf()},"any, Array":function(Vt,Kt){return Ft(Tt(Kt),Vt,this,!0).valueOf()}})});smaller$1.createSmaller=bt;var St=(0,tt.factory)(ht,["typed","config"],function(Et){var Ct=Et.typed,Rt=Et.config;return Ct(ht,{"number, number":function(wt,At){return wt<At&&!(0,_e.nearlyEqual)(wt,At,Rt.epsilon)}})});return smaller$1.createSmallerNumber=St,smaller$1}var smallerEq$1={},hasRequiredSmallerEq$1;function requireSmallerEq$1(){if(hasRequiredSmallerEq$1)return smallerEq$1;hasRequiredSmallerEq$1=1,Object.defineProperty(smallerEq$1,"__esModule",{value:!0}),smallerEq$1.createSmallerEqNumber=smallerEq$1.createSmallerEq=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireAlgorithm03(),nt=requireAlgorithm07(),st=requireAlgorithm12(),dt=requireAlgorithm14(),ft=requireAlgorithm13(),ht="smallerEq",mt=["typed","config","matrix","DenseMatrix"],bt=(0,tt.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.matrix,wt=Et.DenseMatrix,At=(0,rt.createAlgorithm03)({typed:Ct}),Nt=(0,nt.createAlgorithm07)({typed:Ct,DenseMatrix:wt}),Pt=(0,st.createAlgorithm12)({typed:Ct,DenseMatrix:wt}),It=(0,ft.createAlgorithm13)({typed:Ct}),Ft=(0,dt.createAlgorithm14)({typed:Ct});return Ct(ht,{"boolean, boolean":function(Vt,Kt){return Vt<=Kt},"number, number":function(Vt,Kt){return Vt<=Kt||(0,_e.nearlyEqual)(Vt,Kt,Rt.epsilon)},"BigNumber, BigNumber":function(Vt,Kt){return Vt.lte(Kt)||(0,et.nearlyEqual)(Vt,Kt,Rt.epsilon)},"Fraction, Fraction":function(Vt,Kt){return Vt.compare(Kt)!==1},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(Vt,Kt){if(!Vt.equalBase(Kt))throw new Error("Cannot compare units with different base");return this(Vt.value,Kt.value)},"SparseMatrix, SparseMatrix":function(Vt,Kt){return Nt(Vt,Kt,this)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return At(Kt,Vt,this,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,this,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return It(Vt,Kt,this)},"Array, Array":function(Vt,Kt){return this(Tt(Vt),Tt(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Tt(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Tt(Kt))},"SparseMatrix, any":function(Vt,Kt){return Pt(Vt,Kt,this,!1)},"DenseMatrix, any":function(Vt,Kt){return Ft(Vt,Kt,this,!1)},"any, SparseMatrix":function(Vt,Kt){return Pt(Kt,Vt,this,!0)},"any, DenseMatrix":function(Vt,Kt){return Ft(Kt,Vt,this,!0)},"Array, any":function(Vt,Kt){return Ft(Tt(Vt),Kt,this,!1).valueOf()},"any, Array":function(Vt,Kt){return Ft(Tt(Kt),Vt,this,!0).valueOf()}})});smallerEq$1.createSmallerEq=bt;var St=(0,tt.factory)(ht,["typed","config"],function(Et){var Ct=Et.typed,Rt=Et.config;return Ct(ht,{"number, number":function(wt,At){return wt<=At||(0,_e.nearlyEqual)(wt,At,Rt.epsilon)}})});return smallerEq$1.createSmallerEqNumber=St,smallerEq$1}var larger$1={},hasRequiredLarger$1;function requireLarger$1(){if(hasRequiredLarger$1)return larger$1;hasRequiredLarger$1=1,Object.defineProperty(larger$1,"__esModule",{value:!0}),larger$1.createLargerNumber=larger$1.createLarger=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireAlgorithm03(),nt=requireAlgorithm07(),st=requireAlgorithm12(),dt=requireAlgorithm14(),ft=requireAlgorithm13(),ht="larger",mt=["typed","config","matrix","DenseMatrix"],bt=(0,tt.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.matrix,wt=Et.DenseMatrix,At=(0,rt.createAlgorithm03)({typed:Ct}),Nt=(0,nt.createAlgorithm07)({typed:Ct,DenseMatrix:wt}),Pt=(0,st.createAlgorithm12)({typed:Ct,DenseMatrix:wt}),It=(0,ft.createAlgorithm13)({typed:Ct}),Ft=(0,dt.createAlgorithm14)({typed:Ct});return Ct(ht,{"boolean, boolean":function(Vt,Kt){return Vt>Kt},"number, number":function(Vt,Kt){return Vt>Kt&&!(0,_e.nearlyEqual)(Vt,Kt,Rt.epsilon)},"BigNumber, BigNumber":function(Vt,Kt){return Vt.gt(Kt)&&!(0,et.nearlyEqual)(Vt,Kt,Rt.epsilon)},"Fraction, Fraction":function(Vt,Kt){return Vt.compare(Kt)===1},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(Vt,Kt){if(!Vt.equalBase(Kt))throw new Error("Cannot compare units with different base");return this(Vt.value,Kt.value)},"SparseMatrix, SparseMatrix":function(Vt,Kt){return Nt(Vt,Kt,this)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return At(Kt,Vt,this,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,this,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return It(Vt,Kt,this)},"Array, Array":function(Vt,Kt){return this(Tt(Vt),Tt(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Tt(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Tt(Kt))},"SparseMatrix, any":function(Vt,Kt){return Pt(Vt,Kt,this,!1)},"DenseMatrix, any":function(Vt,Kt){return Ft(Vt,Kt,this,!1)},"any, SparseMatrix":function(Vt,Kt){return Pt(Kt,Vt,this,!0)},"any, DenseMatrix":function(Vt,Kt){return Ft(Kt,Vt,this,!0)},"Array, any":function(Vt,Kt){return Ft(Tt(Vt),Kt,this,!1).valueOf()},"any, Array":function(Vt,Kt){return Ft(Tt(Kt),Vt,this,!0).valueOf()}})});larger$1.createLarger=bt;var St=(0,tt.factory)(ht,["typed","config"],function(Et){var Ct=Et.typed,Rt=Et.config;return Ct(ht,{"number, number":function(wt,At){return wt>At&&!(0,_e.nearlyEqual)(wt,At,Rt.epsilon)}})});return larger$1.createLargerNumber=St,larger$1}var largerEq$1={},hasRequiredLargerEq$1;function requireLargerEq$1(){if(hasRequiredLargerEq$1)return largerEq$1;hasRequiredLargerEq$1=1,Object.defineProperty(largerEq$1,"__esModule",{value:!0}),largerEq$1.createLargerEqNumber=largerEq$1.createLargerEq=void 0;var et=requireNearlyEqual(),_e=requireNumber$3(),tt=requireFactory(),rt=requireAlgorithm03(),nt=requireAlgorithm07(),st=requireAlgorithm12(),dt=requireAlgorithm14(),ft=requireAlgorithm13(),ht="largerEq",mt=["typed","config","matrix","DenseMatrix"],bt=(0,tt.factory)(ht,mt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.matrix,wt=Et.DenseMatrix,At=(0,rt.createAlgorithm03)({typed:Ct}),Nt=(0,nt.createAlgorithm07)({typed:Ct,DenseMatrix:wt}),Pt=(0,st.createAlgorithm12)({typed:Ct,DenseMatrix:wt}),It=(0,ft.createAlgorithm13)({typed:Ct}),Ft=(0,dt.createAlgorithm14)({typed:Ct});return Ct(ht,{"boolean, boolean":function(Vt,Kt){return Vt>=Kt},"number, number":function(Vt,Kt){return Vt>=Kt||(0,_e.nearlyEqual)(Vt,Kt,Rt.epsilon)},"BigNumber, BigNumber":function(Vt,Kt){return Vt.gte(Kt)||(0,et.nearlyEqual)(Vt,Kt,Rt.epsilon)},"Fraction, Fraction":function(Vt,Kt){return Vt.compare(Kt)!==-1},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(Vt,Kt){if(!Vt.equalBase(Kt))throw new Error("Cannot compare units with different base");return this(Vt.value,Kt.value)},"SparseMatrix, SparseMatrix":function(Vt,Kt){return Nt(Vt,Kt,this)},"SparseMatrix, DenseMatrix":function(Vt,Kt){return At(Kt,Vt,this,!0)},"DenseMatrix, SparseMatrix":function(Vt,Kt){return At(Vt,Kt,this,!1)},"DenseMatrix, DenseMatrix":function(Vt,Kt){return It(Vt,Kt,this)},"Array, Array":function(Vt,Kt){return this(Tt(Vt),Tt(Kt)).valueOf()},"Array, Matrix":function(Vt,Kt){return this(Tt(Vt),Kt)},"Matrix, Array":function(Vt,Kt){return this(Vt,Tt(Kt))},"SparseMatrix, any":function(Vt,Kt){return Pt(Vt,Kt,this,!1)},"DenseMatrix, any":function(Vt,Kt){return Ft(Vt,Kt,this,!1)},"any, SparseMatrix":function(Vt,Kt){return Pt(Kt,Vt,this,!0)},"any, DenseMatrix":function(Vt,Kt){return Ft(Kt,Vt,this,!0)},"Array, any":function(Vt,Kt){return Ft(Tt(Vt),Kt,this,!1).valueOf()},"any, Array":function(Vt,Kt){return Ft(Tt(Kt),Vt,this,!0).valueOf()}})});largerEq$1.createLargerEq=bt;var St=(0,tt.factory)(ht,["typed","config"],function(Et){var Ct=Et.typed,Rt=Et.config;return Ct(ht,{"number, number":function(wt,At){return wt>=At||(0,_e.nearlyEqual)(wt,At,Rt.epsilon)}})});return largerEq$1.createLargerEqNumber=St,largerEq$1}var deepEqual$1={},hasRequiredDeepEqual$1;function requireDeepEqual$1(){if(hasRequiredDeepEqual$1)return deepEqual$1;hasRequiredDeepEqual$1=1,Object.defineProperty(deepEqual$1,"__esModule",{value:!0}),deepEqual$1.createDeepEqual=void 0;var et=requireFactory(),_e="deepEqual",tt=["typed","equal"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.equal;return st(_e,{"any, any":function(mt,bt){return ft(mt.valueOf(),bt.valueOf())}});function ft(ht,mt){if(Array.isArray(ht))if(Array.isArray(mt)){var bt=ht.length;if(bt!==mt.length)return!1;for(var St=0;St<bt;St++)if(!ft(ht[St],mt[St]))return!1;return!0}else return!1;else return Array.isArray(mt)?!1:dt(ht,mt)}});return deepEqual$1.createDeepEqual=rt,deepEqual$1}var unequal$1={},hasRequiredUnequal$1;function requireUnequal$1(){if(hasRequiredUnequal$1)return unequal$1;hasRequiredUnequal$1=1,Object.defineProperty(unequal$1,"__esModule",{value:!0}),unequal$1.createUnequalNumber=unequal$1.createUnequal=void 0;var et=requireFactory(),_e=requireAlgorithm03(),tt=requireAlgorithm07(),rt=requireAlgorithm12(),nt=requireAlgorithm14(),st=requireAlgorithm13(),dt="unequal",ft=["typed","config","equalScalar","matrix","DenseMatrix"],ht=(0,et.factory)(dt,ft,function(bt){var St=bt.typed;bt.config;var Et=bt.equalScalar,Ct=bt.matrix,Rt=bt.DenseMatrix,Tt=(0,_e.createAlgorithm03)({typed:St}),wt=(0,tt.createAlgorithm07)({typed:St,DenseMatrix:Rt}),At=(0,rt.createAlgorithm12)({typed:St,DenseMatrix:Rt}),Nt=(0,st.createAlgorithm13)({typed:St}),Pt=(0,nt.createAlgorithm14)({typed:St});return St("unequal",{"any, any":function(qt,Vt){return qt===null?Vt!==null:Vt===null?qt!==null:qt===void 0?Vt!==void 0:Vt===void 0?qt!==void 0:It(qt,Vt)},"SparseMatrix, SparseMatrix":function(qt,Vt){return wt(qt,Vt,It)},"SparseMatrix, DenseMatrix":function(qt,Vt){return Tt(Vt,qt,It,!0)},"DenseMatrix, SparseMatrix":function(qt,Vt){return Tt(qt,Vt,It,!1)},"DenseMatrix, DenseMatrix":function(qt,Vt){return Nt(qt,Vt,It)},"Array, Array":function(qt,Vt){return this(Ct(qt),Ct(Vt)).valueOf()},"Array, Matrix":function(qt,Vt){return this(Ct(qt),Vt)},"Matrix, Array":function(qt,Vt){return this(qt,Ct(Vt))},"SparseMatrix, any":function(qt,Vt){return At(qt,Vt,It,!1)},"DenseMatrix, any":function(qt,Vt){return Pt(qt,Vt,It,!1)},"any, SparseMatrix":function(qt,Vt){return At(Vt,qt,It,!0)},"any, DenseMatrix":function(qt,Vt){return Pt(Vt,qt,It,!0)},"Array, any":function(qt,Vt){return Pt(Ct(qt),Vt,It,!1).valueOf()},"any, Array":function(qt,Vt){return Pt(Ct(Vt),qt,It,!0).valueOf()}});function It(Ft,qt){return!Et(Ft,qt)}});unequal$1.createUnequal=ht;var mt=(0,et.factory)(dt,["typed","equalScalar"],function(bt){var St=bt.typed,Et=bt.equalScalar;return St(dt,{"any, any":function(Rt,Tt){return Rt===null?Tt!==null:Tt===null?Rt!==null:Rt===void 0?Tt!==void 0:Tt===void 0?Rt!==void 0:!Et(Rt,Tt)}})});return unequal$1.createUnequalNumber=mt,unequal$1}var partitionSelect$1={},hasRequiredPartitionSelect$1;function requirePartitionSelect$1(){if(hasRequiredPartitionSelect$1)return partitionSelect$1;hasRequiredPartitionSelect$1=1,Object.defineProperty(partitionSelect$1,"__esModule",{value:!0}),partitionSelect$1.createPartitionSelect=void 0;var et=requireIs(),_e=requireNumber$3(),tt=requireFactory(),rt="partitionSelect",nt=["typed","isNumeric","isNaN","compare"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.isNumeric,mt=dt.isNaN,bt=dt.compare,St=bt,Et=function(wt,At){return-bt(wt,At)};return ft(rt,{"Array | Matrix, number":function(wt,At){return Ct(wt,At,St)},"Array | Matrix, number, string":function(wt,At,Nt){if(Nt==="asc")return Ct(wt,At,St);if(Nt==="desc")return Ct(wt,At,Et);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":Ct});function Ct(Tt,wt,At){if(!(0,_e.isInteger)(wt)||wt<0)throw new Error("k must be a non-negative integer");if((0,et.isMatrix)(Tt)){var Nt=Tt.size();if(Nt.length>1)throw new Error("Only one dimensional matrices supported");return Rt(Tt.valueOf(),wt,At)}if(Array.isArray(Tt))return Rt(Tt,wt,At)}function Rt(Tt,wt,At){if(wt>=Tt.length)throw new Error("k out of bounds");for(var Nt=0;Nt<Tt.length;Nt++)if(ht(Tt[Nt])&&mt(Tt[Nt]))return Tt[Nt];for(var Pt=0,It=Tt.length-1;Pt<It;){for(var Ft=Pt,qt=It,Vt=Tt[Math.floor(Math.random()*(It-Pt+1))+Pt];Ft<qt;)if(At(Tt[Ft],Vt)>=0){var Kt=Tt[qt];Tt[qt]=Tt[Ft],Tt[Ft]=Kt,--qt}else++Ft;At(Tt[Ft],Vt)>0&&--Ft,wt<=Ft?It=Ft:Pt=Ft+1}return Tt[wt]}});return partitionSelect$1.createPartitionSelect=st,partitionSelect$1}var sort$1={},hasRequiredSort$1;function requireSort$1(){if(hasRequiredSort$1)return sort$1;hasRequiredSort$1=1,Object.defineProperty(sort$1,"__esModule",{value:!0}),sort$1.createSort=void 0;var et=requireArray(),_e=requireFactory(),tt="sort",rt=["typed","matrix","compare","compareNatural"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.compare,mt=st.compareNatural,bt=ht,St=function(wt,At){return-ht(wt,At)};return dt(tt,{Array:function(wt){return Ct(wt),wt.sort(bt)},Matrix:function(wt){return Rt(wt),ft(wt.toArray().sort(bt),wt.storage())},"Array, function":function(wt,At){return Ct(wt),wt.sort(At)},"Matrix, function":function(wt,At){return Rt(wt),ft(wt.toArray().sort(At),wt.storage())},"Array, string":function(wt,At){return Ct(wt),wt.sort(Et(At))},"Matrix, string":function(wt,At){return Rt(wt),ft(wt.toArray().sort(Et(At)),wt.storage())}});function Et(Tt){if(Tt==="asc")return bt;if(Tt==="desc")return St;if(Tt==="natural")return mt;throw new Error('String "asc", "desc", or "natural" expected')}function Ct(Tt){if((0,et.arraySize)(Tt).length!==1)throw new Error("One dimensional array expected")}function Rt(Tt){if(Tt.size().length!==1)throw new Error("One dimensional matrix expected")}});return sort$1.createSort=nt,sort$1}var max$1={},hasRequiredMax$1;function requireMax$1(){if(hasRequiredMax$1)return max$1;hasRequiredMax$1=1,Object.defineProperty(max$1,"__esModule",{value:!0}),max$1.createMax=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireImproveErrorMessage(),rt="max",nt=["typed","config","numeric","larger"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.numeric,bt=dt.larger;return ft(rt,{"Array | Matrix":Et,"Array | Matrix, number | BigNumber":function(Rt,Tt){return(0,et.reduce)(Rt,Tt.valueOf(),St)},"...":function(Rt){if((0,et.containsCollections)(Rt))throw new TypeError("Scalar values expected in function max");return Et(Rt)}});function St(Ct,Rt){try{return bt(Ct,Rt)?Ct:Rt}catch(Tt){throw(0,tt.improveErrorMessage)(Tt,"max",Rt)}}function Et(Ct){var Rt;if((0,et.deepForEach)(Ct,function(Tt){try{isNaN(Tt)&&typeof Tt=="number"?Rt=NaN:(Rt===void 0||bt(Tt,Rt))&&(Rt=Tt)}catch(wt){throw(0,tt.improveErrorMessage)(wt,"max",Tt)}}),Rt===void 0)throw new Error("Cannot calculate max of an empty array");return typeof Rt=="string"&&(Rt=mt(Rt,ht.number)),Rt}});return max$1.createMax=st,max$1}var min$1={},hasRequiredMin$1;function requireMin$1(){if(hasRequiredMin$1)return min$1;hasRequiredMin$1=1,Object.defineProperty(min$1,"__esModule",{value:!0}),min$1.createMin=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireImproveErrorMessage(),rt="min",nt=["typed","config","numeric","smaller"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.numeric,bt=dt.smaller;return ft(rt,{"Array | Matrix":Et,"Array | Matrix, number | BigNumber":function(Rt,Tt){return(0,et.reduce)(Rt,Tt.valueOf(),St)},"...":function(Rt){if((0,et.containsCollections)(Rt))throw new TypeError("Scalar values expected in function min");return Et(Rt)}});function St(Ct,Rt){try{return bt(Ct,Rt)?Ct:Rt}catch(Tt){throw(0,tt.improveErrorMessage)(Tt,"min",Rt)}}function Et(Ct){var Rt;if((0,et.deepForEach)(Ct,function(Tt){try{isNaN(Tt)&&typeof Tt=="number"?Rt=NaN:(Rt===void 0||bt(Tt,Rt))&&(Rt=Tt)}catch(wt){throw(0,tt.improveErrorMessage)(wt,"min",Tt)}}),Rt===void 0)throw new Error("Cannot calculate min of an empty array");return typeof Rt=="string"&&(Rt=mt(Rt,ht.number)),Rt}});return min$1.createMin=st,min$1}var ImmutableDenseMatrix={},hasRequiredImmutableDenseMatrix;function requireImmutableDenseMatrix(){if(hasRequiredImmutableDenseMatrix)return ImmutableDenseMatrix;hasRequiredImmutableDenseMatrix=1,Object.defineProperty(ImmutableDenseMatrix,"__esModule",{value:!0}),ImmutableDenseMatrix.createImmutableDenseMatrixClass=void 0;var et=requireIs(),_e=requireObject(),tt=requireFactory(),rt="ImmutableDenseMatrix",nt=["smaller","DenseMatrix"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.smaller,ht=dt.DenseMatrix;function mt(bt,St){if(!(this instanceof mt))throw new SyntaxError("Constructor must be called with the new operator");if(St&&!(0,et.isString)(St))throw new Error("Invalid datatype: "+St);if((0,et.isMatrix)(bt)||(0,et.isArray)(bt)){var Et=new ht(bt,St);this._data=Et._data,this._size=Et._size,this._datatype=Et._datatype,this._min=null,this._max=null}else if(bt&&(0,et.isArray)(bt.data)&&(0,et.isArray)(bt.size))this._data=bt.data,this._size=bt.size,this._datatype=bt.datatype,this._min=typeof bt.min<"u"?bt.min:null,this._max=typeof bt.max<"u"?bt.max:null;else{if(bt)throw new TypeError("Unsupported type of data ("+(0,et.typeOf)(bt)+")");this._data=[],this._size=[0],this._datatype=St,this._min=null,this._max=null}}return mt.prototype=new ht,mt.prototype.type="ImmutableDenseMatrix",mt.prototype.isImmutableDenseMatrix=!0,mt.prototype.subset=function(bt){switch(arguments.length){case 1:{var St=ht.prototype.subset.call(this,bt);return(0,et.isMatrix)(St)?new mt({data:St._data,size:St._size,datatype:St._datatype}):St}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},mt.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},mt.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},mt.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},mt.prototype.clone=function(){return new mt({data:(0,_e.clone)(this._data),size:(0,_e.clone)(this._size),datatype:this._datatype})},mt.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},mt.fromJSON=function(bt){return new mt(bt)},mt.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},mt.prototype.min=function(){if(this._min===null){var bt=null;this.forEach(function(St){(bt===null||ft(St,bt))&&(bt=St)}),this._min=bt!==null?bt:void 0}return this._min},mt.prototype.max=function(){if(this._max===null){var bt=null;this.forEach(function(St){(bt===null||ft(bt,St))&&(bt=St)}),this._max=bt!==null?bt:void 0}return this._max},mt},{isClass:!0});return ImmutableDenseMatrix.createImmutableDenseMatrixClass=st,ImmutableDenseMatrix}var MatrixIndex={},hasRequiredMatrixIndex;function requireMatrixIndex(){if(hasRequiredMatrixIndex)return MatrixIndex;hasRequiredMatrixIndex=1,Object.defineProperty(MatrixIndex,"__esModule",{value:!0}),MatrixIndex.createIndexClass=void 0;var et=requireIs(),_e=requireObject(),tt=requireNumber$3(),rt=requireFactory(),nt="Index",st=["ImmutableDenseMatrix"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.ImmutableDenseMatrix;function mt(St){if(!(this instanceof mt))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var Et=0,Ct=arguments.length;Et<Ct;Et++){var Rt=arguments[Et];if((0,et.isRange)(Rt))this._dimensions.push(Rt),this._isScalar=!1;else if(Array.isArray(Rt)||(0,et.isMatrix)(Rt)){var Tt=bt(Rt.valueOf());this._dimensions.push(Tt);var wt=Tt.size();(wt.length!==1||wt[0]!==1)&&(this._isScalar=!1)}else if(typeof Rt=="number")this._dimensions.push(bt([Rt]));else if(typeof Rt=="string")this._dimensions.push(Rt);else throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range")}}mt.prototype.type="Index",mt.prototype.isIndex=!0;function bt(St){for(var Et=0,Ct=St.length;Et<Ct;Et++)if(typeof St[Et]!="number"||!(0,tt.isInteger)(St[Et]))throw new TypeError("Index parameters must be positive integer numbers");return new ht(St)}return mt.prototype.clone=function(){var St=new mt;return St._dimensions=(0,_e.clone)(this._dimensions),St._isScalar=this._isScalar,St},mt.create=function(St){var Et=new mt;return mt.apply(Et,St),Et},mt.prototype.size=function(){for(var St=[],Et=0,Ct=this._dimensions.length;Et<Ct;Et++){var Rt=this._dimensions[Et];St[Et]=typeof Rt=="string"?1:Rt.size()[0]}return St},mt.prototype.max=function(){for(var St=[],Et=0,Ct=this._dimensions.length;Et<Ct;Et++){var Rt=this._dimensions[Et];St[Et]=typeof Rt=="string"?Rt:Rt.max()}return St},mt.prototype.min=function(){for(var St=[],Et=0,Ct=this._dimensions.length;Et<Ct;Et++){var Rt=this._dimensions[Et];St[Et]=typeof Rt=="string"?Rt:Rt.min()}return St},mt.prototype.forEach=function(St){for(var Et=0,Ct=this._dimensions.length;Et<Ct;Et++)St(this._dimensions[Et],Et,this)},mt.prototype.dimension=function(St){return this._dimensions[St]||null},mt.prototype.isObjectProperty=function(){return this._dimensions.length===1&&typeof this._dimensions[0]=="string"},mt.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},mt.prototype.isScalar=function(){return this._isScalar},mt.prototype.toArray=function(){for(var St=[],Et=0,Ct=this._dimensions.length;Et<Ct;Et++){var Rt=this._dimensions[Et];St.push(typeof Rt=="string"?Rt:Rt.toArray())}return St},mt.prototype.valueOf=mt.prototype.toArray,mt.prototype.toString=function(){for(var St=[],Et=0,Ct=this._dimensions.length;Et<Ct;Et++){var Rt=this._dimensions[Et];typeof Rt=="string"?St.push(JSON.stringify(Rt)):St.push(Rt.toString())}return"["+St.join(", ")+"]"},mt.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},mt.fromJSON=function(St){return mt.create(St.dimensions)},mt},{isClass:!0});return MatrixIndex.createIndexClass=dt,MatrixIndex}var FibonacciHeap={},hasRequiredFibonacciHeap;function requireFibonacciHeap(){if(hasRequiredFibonacciHeap)return FibonacciHeap;hasRequiredFibonacciHeap=1,Object.defineProperty(FibonacciHeap,"__esModule",{value:!0}),FibonacciHeap.createFibonacciHeapClass=void 0;var et=requireFactory(),_e="FibonacciHeap",tt=["smaller","larger"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.smaller,dt=nt.larger,ft=1/Math.log((1+Math.sqrt(5))/2);function ht(){if(!(this instanceof ht))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}ht.prototype.type="FibonacciHeap",ht.prototype.isFibonacciHeap=!0,ht.prototype.insert=function(Rt,Tt){var wt={key:Rt,value:Tt,degree:0};if(this._minimum){var At=this._minimum;wt.left=At,wt.right=At.right,At.right=wt,wt.right.left=wt,st(Rt,At.key)&&(this._minimum=wt)}else wt.left=wt,wt.right=wt,this._minimum=wt;return this._size++,wt},ht.prototype.size=function(){return this._size},ht.prototype.clear=function(){this._minimum=null,this._size=0},ht.prototype.isEmpty=function(){return this._size===0},ht.prototype.extractMinimum=function(){var Rt=this._minimum;if(Rt===null)return Rt;for(var Tt=this._minimum,wt=Rt.degree,At=Rt.child;wt>0;){var Nt=At.right;At.left.right=At.right,At.right.left=At.left,At.left=Tt,At.right=Tt.right,Tt.right=At,At.right.left=At,At.parent=null,At=Nt,wt--}return Rt.left.right=Rt.right,Rt.right.left=Rt.left,Rt===Rt.right?Tt=null:(Tt=Rt.right,Tt=Ct(Tt,this._size)),this._size--,this._minimum=Tt,Rt},ht.prototype.remove=function(Rt){this._minimum=mt(this._minimum,Rt,-1),this.extractMinimum()};function mt(Rt,Tt,wt){Tt.key=wt;var At=Tt.parent;return At&&st(Tt.key,At.key)&&(bt(Rt,Tt,At),St(Rt,At)),st(Tt.key,Rt.key)&&(Rt=Tt),Rt}function bt(Rt,Tt,wt){Tt.left.right=Tt.right,Tt.right.left=Tt.left,wt.degree--,wt.child===Tt&&(wt.child=Tt.right),wt.degree===0&&(wt.child=null),Tt.left=Rt,Tt.right=Rt.right,Rt.right=Tt,Tt.right.left=Tt,Tt.parent=null,Tt.mark=!1}function St(Rt,Tt){var wt=Tt.parent;wt&&(Tt.mark?(bt(Rt,Tt,wt),St(wt)):Tt.mark=!0)}var Et=function(Tt,wt){Tt.left.right=Tt.right,Tt.right.left=Tt.left,Tt.parent=wt,wt.child?(Tt.left=wt.child,Tt.right=wt.child.right,wt.child.right=Tt,Tt.right.left=Tt):(wt.child=Tt,Tt.right=Tt,Tt.left=Tt),wt.degree++,Tt.mark=!1};function Ct(Rt,Tt){var wt=Math.floor(Math.log(Tt)*ft)+1,At=new Array(wt),Nt=0,Pt=Rt;if(Pt)for(Nt++,Pt=Pt.right;Pt!==Rt;)Nt++,Pt=Pt.right;for(var It;Nt>0;){for(var Ft=Pt.degree,qt=Pt.right;It=At[Ft],!!It;){if(dt(Pt.key,It.key)){var Vt=It;It=Pt,Pt=Vt}Et(It,Pt),At[Ft]=null,Ft++}At[Ft]=Pt,Pt=qt,Nt--}Rt=null;for(var Kt=0;Kt<wt;Kt++)It=At[Kt],It&&(Rt?(It.left.right=It.right,It.right.left=It.left,It.left=Rt,It.right=Rt.right,Rt.right=It,It.right.left=It,st(It.key,Rt.key)&&(Rt=It)):Rt=It);return Rt}return ht},{isClass:!0});return FibonacciHeap.createFibonacciHeapClass=rt,FibonacciHeap}var Spa={},hasRequiredSpa;function requireSpa(){if(hasRequiredSpa)return Spa;hasRequiredSpa=1,Object.defineProperty(Spa,"__esModule",{value:!0}),Spa.createSpaClass=void 0;var et=requireFactory(),_e="Spa",tt=["addScalar","equalScalar","FibonacciHeap"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.addScalar,dt=nt.equalScalar,ft=nt.FibonacciHeap;function ht(){if(!(this instanceof ht))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new ft}return ht.prototype.type="Spa",ht.prototype.isSpa=!0,ht.prototype.set=function(mt,bt){if(this._values[mt])this._values[mt].value=bt;else{var St=this._heap.insert(mt,bt);this._values[mt]=St}},ht.prototype.get=function(mt){var bt=this._values[mt];return bt?bt.value:0},ht.prototype.accumulate=function(mt,bt){var St=this._values[mt];St?St.value=st(St.value,bt):(St=this._heap.insert(mt,bt),this._values[mt]=St)},ht.prototype.forEach=function(mt,bt,St){var Et=this._heap,Ct=this._values,Rt=[],Tt=Et.extractMinimum();for(Tt&&Rt.push(Tt);Tt&&Tt.key<=bt;)Tt.key>=mt&&(dt(Tt.value,0)||St(Tt.key,Tt.value,this)),Tt=Et.extractMinimum(),Tt&&Rt.push(Tt);for(var wt=0;wt<Rt.length;wt++){var At=Rt[wt];Tt=Et.insert(At.key,At.value),Ct[Tt.key]=Tt}},ht.prototype.swap=function(mt,bt){var St=this._values[mt],Et=this._values[bt];if(!St&&Et)St=this._heap.insert(mt,Et.value),this._heap.remove(Et),this._values[mt]=St,this._values[bt]=void 0;else if(St&&!Et)Et=this._heap.insert(bt,St.value),this._heap.remove(St),this._values[bt]=Et,this._values[mt]=void 0;else if(St&&Et){var Ct=St.value;St.value=Et.value,Et.value=Ct}},ht},{isClass:!0});return Spa.createSpaClass=rt,Spa}var Unit={},defineProperty={exports:{}},hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,(function(et){var _e=requireToPropertyKey();function tt(rt,nt,st){return(nt=_e(nt))in rt?Object.defineProperty(rt,nt,{value:st,enumerable:!0,configurable:!0,writable:!0}):rt[nt]=st,rt}et.exports=tt,et.exports.__esModule=!0,et.exports.default=et.exports})(defineProperty)),defineProperty.exports}var constants$1={},hasRequiredConstants$1;function requireConstants$1(){if(hasRequiredConstants$1)return constants$1;hasRequiredConstants$1=1,Object.defineProperty(constants$1,"__esModule",{value:!0}),constants$1.createBigNumberTau=constants$1.createBigNumberPi=constants$1.createBigNumberPhi=constants$1.createBigNumberE=void 0;var et=require_function$1(),_e=(0,et.memoize)(function(dt){return new dt(1).exp()},{hasher:st});constants$1.createBigNumberE=_e;var tt=(0,et.memoize)(function(dt){return new dt(1).plus(new dt(5).sqrt()).div(2)},{hasher:st});constants$1.createBigNumberPhi=tt;var rt=(0,et.memoize)(function(dt){return dt.acos(-1)},{hasher:st});constants$1.createBigNumberPi=rt;var nt=(0,et.memoize)(function(dt){return rt(dt).times(2)},{hasher:st});constants$1.createBigNumberTau=nt;function st(dt){return dt[0].precision}return constants$1}var hasRequiredUnit$2;function requireUnit$2(){if(hasRequiredUnit$2)return Unit;hasRequiredUnit$2=1;var et=requireInteropRequireDefault();Object.defineProperty(Unit,"__esModule",{value:!0}),Unit.createUnitClass=void 0;var _e=et(require_typeof()),tt=et(require_extends()),rt=et(requireDefineProperty()),nt=requireIs(),st=requireFactory(),dt=require_function$1(),ft=requireString$2(),ht=requireObject(),mt=requireConstants$1();function bt(Tt,wt){var At=Object.keys(Tt);if(Object.getOwnPropertySymbols){var Nt=Object.getOwnPropertySymbols(Tt);wt&&(Nt=Nt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Tt,Pt).enumerable})),At.push.apply(At,Nt)}return At}function St(Tt){for(var wt=1;wt<arguments.length;wt++){var At=arguments[wt]!=null?arguments[wt]:{};wt%2?bt(Object(At),!0).forEach(function(Nt){(0,rt.default)(Tt,Nt,At[Nt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Tt,Object.getOwnPropertyDescriptors(At)):bt(Object(At)).forEach(function(Nt){Object.defineProperty(Tt,Nt,Object.getOwnPropertyDescriptor(At,Nt))})}return Tt}var Et="Unit",Ct=["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],Rt=(0,st.factory)(Et,Ct,function(Tt){var wt=Tt.on,At=Tt.config,Nt=Tt.addScalar,Pt=Tt.subtract,It=Tt.multiplyScalar,Ft=Tt.divideScalar,qt=Tt.pow,Vt=Tt.abs,Kt=Tt.fix,jt=Tt.round,Ut=Tt.equal,Ot=Tt.isNumeric,Wt=Tt.format,Bt=Tt.number,tr=Tt.Complex,Jt=Tt.BigNumber,ar=Tt.Fraction,pr=Bt;function cr(pn,Dn){if(!(this instanceof cr))throw new Error("Constructor must be called with the new operator");if(!(pn==null||Ot(pn)||(0,nt.isComplex)(pn)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(Dn!==void 0&&(typeof Dn!="string"||Dn===""))throw new TypeError("Second parameter in Unit constructor must be a string");if(Dn!==void 0){var qn=cr.parse(Dn);this.units=qn.units,this.dimensions=qn.dimensions}else{this.units=[{unit:An,prefix:Kr.NONE,power:0}],this.dimensions=[];for(var _a=0;_a<Hn.length;_a++)this.dimensions[_a]=0}this.value=pn!=null?this._normalize(pn):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}cr.prototype.type="Unit",cr.prototype.isUnit=!0;var gr,Sr,Er;function Vr(){for(;Er===" "||Er===" ";)Nr()}function Wr(pn){return pn>="0"&&pn<="9"||pn==="."}function Mr(pn){return pn>="0"&&pn<="9"}function Nr(){Sr++,Er=gr.charAt(Sr)}function Yr(pn){Sr=pn,Er=gr.charAt(Sr)}function Or(){var pn="",Dn=Sr;if(Er==="+"?Nr():Er==="-"&&(pn+=Er,Nr()),!Wr(Er))return Yr(Dn),null;if(Er==="."){if(pn+=Er,Nr(),!Mr(Er))return Yr(Dn),null}else{for(;Mr(Er);)pn+=Er,Nr();Er==="."&&(pn+=Er,Nr())}for(;Mr(Er);)pn+=Er,Nr();if(Er==="E"||Er==="e"){var qn="",_a=Sr;if(qn+=Er,Nr(),(Er==="+"||Er==="-")&&(qn+=Er,Nr()),!Mr(Er))return Yr(_a),pn;for(pn=pn+qn;Mr(Er);)pn+=Er,Nr()}return pn}function Ar(){for(var pn="";Mr(Er)||cr.isValidAlpha(Er);)pn+=Er,Nr();var Dn=pn.charAt(0);return cr.isValidAlpha(Dn)?pn:null}function Qr(pn){return Er===pn?(Nr(),pn):null}cr.parse=function(pn,Dn){if(Dn=Dn||{},gr=pn,Sr=-1,Er="",typeof gr!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var qn=new cr;qn.units=[];var _a=1,Vn=!1;Nr(),Vr();var bs=Or(),Is=null;if(bs){if(At.number==="BigNumber")Is=new Jt(bs);else if(At.number==="Fraction")try{Is=new ar(bs)}catch{Is=parseFloat(bs)}else Is=parseFloat(bs);Vr(),Qr("*")?(_a=1,Vn=!0):Qr("/")&&(_a=-1,Vn=!0)}for(var uo=[],Rs=1;;){for(Vr();Er==="(";)uo.push(_a),Rs*=_a,_a=1,Nr(),Vr();var io=void 0;if(Er){var vo=Er;if(io=Ar(),io===null)throw new SyntaxError('Unexpected "'+vo+'" in "'+gr+'" at index '+Sr.toString())}else break;var Bo=hn(io);if(Bo===null)throw new SyntaxError('Unit "'+io+'" not found.');var En=_a*Rs;if(Vr(),Qr("^")){Vr();var In=Or();if(In===null)throw new SyntaxError('In "'+pn+'", "^" must be followed by a floating-point number');En*=In}qn.units.push({unit:Bo.unit,prefix:Bo.prefix,power:En});for(var ds=0;ds<Hn.length;ds++)qn.dimensions[ds]+=(Bo.unit.dimensions[ds]||0)*En;for(Vr();Er===")";){if(uo.length===0)throw new SyntaxError('Unmatched ")" in "'+gr+'" at index '+Sr.toString());Rs/=uo.pop(),Nr(),Vr()}if(Vn=!1,Qr("*")?(_a=1,Vn=!0):Qr("/")?(_a=-1,Vn=!0):_a=1,Bo.unit.base){var Ps=Bo.unit.base.key;Cn.auto[Ps]={unit:Bo.unit,prefix:Bo.prefix}}}if(Vr(),Er)throw new SyntaxError('Could not parse: "'+pn+'"');if(Vn)throw new SyntaxError('Trailing characters: "'+pn+'"');if(uo.length!==0)throw new SyntaxError('Unmatched "(" in "'+gr+'"');if(qn.units.length===0&&!Dn.allowNoUnits)throw new SyntaxError('"'+pn+'" contains no units');return qn.value=Is!==void 0?qn._normalize(Is):null,qn},cr.prototype.clone=function(){var pn=new cr;pn.fixPrefix=this.fixPrefix,pn.skipAutomaticSimplification=this.skipAutomaticSimplification,pn.value=(0,ht.clone)(this.value),pn.dimensions=this.dimensions.slice(0),pn.units=[];for(var Dn=0;Dn<this.units.length;Dn++){pn.units[Dn]={};for(var qn in this.units[Dn])(0,ht.hasOwnProperty)(this.units[Dn],qn)&&(pn.units[Dn][qn]=this.units[Dn][qn])}return pn},cr.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},cr.prototype._normalize=function(pn){if(pn==null||this.units.length===0)return pn;for(var Dn=pn,qn=cr._getNumberConverter((0,nt.typeOf)(pn)),_a=0;_a<this.units.length;_a++){var Vn=qn(this.units[_a].unit.value),bs=qn(this.units[_a].prefix.value),Is=qn(this.units[_a].power);Dn=It(Dn,qt(It(Vn,bs),Is))}return Dn},cr.prototype._denormalize=function(pn,Dn){if(pn==null||this.units.length===0)return pn;for(var qn=pn,_a=cr._getNumberConverter((0,nt.typeOf)(pn)),Vn=0;Vn<this.units.length;Vn++){var bs=_a(this.units[Vn].unit.value),Is=_a(this.units[Vn].prefix.value),uo=_a(this.units[Vn].power);qn=Ft(qn,qt(It(bs,Is),uo))}return qn};var hn=(0,dt.memoize)(function(pn){if((0,ht.hasOwnProperty)(rs,pn)){var Dn=rs[pn],qn=Dn.prefixes[""];return{unit:Dn,prefix:qn}}for(var _a in rs)if((0,ht.hasOwnProperty)(rs,_a)&&(0,ft.endsWith)(pn,_a)){var Vn=rs[_a],bs=pn.length-_a.length,Is=pn.substring(0,bs),uo=(0,ht.hasOwnProperty)(Vn.prefixes,Is)?Vn.prefixes[Is]:void 0;if(uo!==void 0)return{unit:Vn,prefix:uo}}return null},{hasher:function(Dn){return Dn[0]},limit:100});cr.isValuelessUnit=function(pn){return hn(pn)!==null},cr.prototype.hasBase=function(pn){if(typeof pn=="string"&&(pn=ln[pn]),!pn)return!1;for(var Dn=0;Dn<Hn.length;Dn++)if(Math.abs((this.dimensions[Dn]||0)-(pn.dimensions[Dn]||0))>1e-12)return!1;return!0},cr.prototype.equalBase=function(pn){for(var Dn=0;Dn<Hn.length;Dn++)if(Math.abs((this.dimensions[Dn]||0)-(pn.dimensions[Dn]||0))>1e-12)return!1;return!0},cr.prototype.equals=function(pn){return this.equalBase(pn)&&Ut(this.value,pn.value)},cr.prototype.multiply=function(pn){for(var Dn=this.clone(),qn=0;qn<Hn.length;qn++)Dn.dimensions[qn]=(this.dimensions[qn]||0)+(pn.dimensions[qn]||0);for(var _a=0;_a<pn.units.length;_a++){var Vn=St({},pn.units[_a]);Dn.units.push(Vn)}if(this.value!==null||pn.value!==null){var bs=this.value===null?this._normalize(1):this.value,Is=pn.value===null?pn._normalize(1):pn.value;Dn.value=It(bs,Is)}else Dn.value=null;return Dn.skipAutomaticSimplification=!1,Sn(Dn)},cr.prototype.divide=function(pn){for(var Dn=this.clone(),qn=0;qn<Hn.length;qn++)Dn.dimensions[qn]=(this.dimensions[qn]||0)-(pn.dimensions[qn]||0);for(var _a=0;_a<pn.units.length;_a++){var Vn=St(St({},pn.units[_a]),{},{power:-pn.units[_a].power});Dn.units.push(Vn)}if(this.value!==null||pn.value!==null){var bs=this.value===null?this._normalize(1):this.value,Is=pn.value===null?pn._normalize(1):pn.value;Dn.value=Ft(bs,Is)}else Dn.value=null;return Dn.skipAutomaticSimplification=!1,Sn(Dn)},cr.prototype.pow=function(pn){for(var Dn=this.clone(),qn=0;qn<Hn.length;qn++)Dn.dimensions[qn]=(this.dimensions[qn]||0)*pn;for(var _a=0;_a<Dn.units.length;_a++)Dn.units[_a].power*=pn;return Dn.value!==null?Dn.value=qt(Dn.value,pn):Dn.value=null,Dn.skipAutomaticSimplification=!1,Sn(Dn)};function Sn(pn){return pn.equalBase(ln.NONE)&&pn.value!==null&&!At.predictable?pn.value:pn}cr.prototype.abs=function(){var pn=this.clone();if(pn.value!==null)if(pn._isDerived()||pn.units[0].unit.offset===0)pn.value=Vt(pn.value);else{var Dn=cr._getNumberConverter((0,nt.typeOf)(pn.value)),qn=Dn(pn.units[0].unit.value),_a=Dn(pn.units[0].unit.offset),Vn=It(qn,_a);pn.value=Pt(Vt(Nt(pn.value,Vn)),Vn)}for(var bs in pn.units)(pn.units[bs].unit.name==="VA"||pn.units[bs].unit.name==="VAR")&&(pn.units[bs].unit=rs.W);return pn},cr.prototype.to=function(pn){var Dn=this.value===null?this._normalize(1):this.value,qn;if(typeof pn=="string")qn=cr.parse(pn);else if((0,nt.isUnit)(pn))qn=pn.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(qn))throw new Error("Units do not match ('".concat(qn.toString(),"' != '").concat(this.toString(),"')"));if(qn.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units[0].unit.offset===qn.units[0].unit.offset)qn.value=(0,ht.clone)(Dn);else{var _a=cr._getNumberConverter((0,nt.typeOf)(Dn)),Vn=_a(this.units[0].unit.value),bs=_a(this.units[0].unit.offset),Is=It(Vn,bs),uo=_a(qn.units[0].unit.value),Rs=_a(qn.units[0].unit.offset),io=It(uo,Rs);qn.value=Pt(Nt(Dn,Is),io)}return qn.fixPrefix=!0,qn.skipAutomaticSimplification=!0,qn},cr.prototype.toNumber=function(pn){return pr(this.toNumeric(pn))},cr.prototype.toNumeric=function(pn){var Dn;return pn?Dn=this.to(pn):Dn=this.clone(),Dn._isDerived()||Dn.units.length===0?Dn._denormalize(Dn.value):Dn._denormalize(Dn.value,Dn.units[0].prefix.value)},cr.prototype.toString=function(){return this.format()},cr.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},cr.fromJSON=function(pn){var Dn=new cr(pn.value,pn.unit);return Dn.fixPrefix=pn.fixPrefix||!1,Dn},cr.prototype.valueOf=cr.prototype.toString,cr.prototype.simplify=function(){var pn=this.clone(),Dn=[],qn;for(var _a in Nn)if((0,ht.hasOwnProperty)(Nn,_a)&&pn.hasBase(ln[_a])){qn=_a;break}if(qn==="NONE")pn.units=[];else{var Vn;if(qn&&(0,ht.hasOwnProperty)(Nn,qn)&&(Vn=Nn[qn]),Vn)pn.units=[{unit:Vn.unit,prefix:Vn.prefix,power:1}];else{for(var bs=!1,Is=0;Is<Hn.length;Is++){var uo=Hn[Is];Math.abs(pn.dimensions[Is]||0)>1e-12&&((0,ht.hasOwnProperty)(Nn,uo)?Dn.push({unit:Nn[uo].unit,prefix:Nn[uo].prefix,power:pn.dimensions[Is]||0}):bs=!0)}Dn.length<pn.units.length&&!bs&&(pn.units=Dn)}}return pn},cr.prototype.toSI=function(){for(var pn=this.clone(),Dn=[],qn=0;qn<Hn.length;qn++){var _a=Hn[qn];if(Math.abs(pn.dimensions[qn]||0)>1e-12)if((0,ht.hasOwnProperty)(Cn.si,_a))Dn.push({unit:Cn.si[_a].unit,prefix:Cn.si[_a].prefix,power:pn.dimensions[qn]||0});else throw new Error("Cannot express custom unit "+_a+" in SI units")}return pn.units=Dn,pn.fixPrefix=!0,pn.skipAutomaticSimplification=!0,pn},cr.prototype.formatUnits=function(){for(var pn="",Dn="",qn=0,_a=0,Vn=0;Vn<this.units.length;Vn++)this.units[Vn].power>0?(qn++,pn+=" "+this.units[Vn].prefix.name+this.units[Vn].unit.name,Math.abs(this.units[Vn].power-1)>1e-15&&(pn+="^"+this.units[Vn].power)):this.units[Vn].power<0&&_a++;if(_a>0)for(var bs=0;bs<this.units.length;bs++)this.units[bs].power<0&&(qn>0?(Dn+=" "+this.units[bs].prefix.name+this.units[bs].unit.name,Math.abs(this.units[bs].power+1)>1e-15&&(Dn+="^"+-this.units[bs].power)):(Dn+=" "+this.units[bs].prefix.name+this.units[bs].unit.name,Dn+="^"+this.units[bs].power));pn=pn.substr(1),Dn=Dn.substr(1),qn>1&&_a>0&&(pn="("+pn+")"),_a>1&&qn>0&&(Dn="("+Dn+")");var Is=pn;return qn>0&&_a>0&&(Is+=" / "),Is+=Dn,Is},cr.prototype.format=function(pn){var Dn=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),qn=!1;typeof Dn.value<"u"&&Dn.value!==null&&(0,nt.isComplex)(Dn.value)&&(qn=Math.abs(Dn.value.re)<1e-14);for(var _a in Dn.units)(0,ht.hasOwnProperty)(Dn.units,_a)&&Dn.units[_a].unit&&(Dn.units[_a].unit.name==="VA"&&qn?Dn.units[_a].unit=rs.VAR:Dn.units[_a].unit.name==="VAR"&&!qn&&(Dn.units[_a].unit=rs.VA));Dn.units.length===1&&!Dn.fixPrefix&&Math.abs(Dn.units[0].power-Math.round(Dn.units[0].power))<1e-14&&(Dn.units[0].prefix=Dn._bestPrefix());var Vn=Dn._denormalize(Dn.value),bs=Dn.value!==null?Wt(Vn,pn||{}):"",Is=Dn.formatUnits();return Dn.value&&(0,nt.isComplex)(Dn.value)&&(bs="("+bs+")"),Is.length>0&&bs.length>0&&(bs+=" "),bs+=Is,bs},cr.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var pn=this.value!==null?Vt(this.value):0,Dn=Vt(this.units[0].unit.value),qn=this.units[0].prefix;if(pn===0)return qn;var _a=this.units[0].power,Vn=Math.log(pn/Math.pow(qn.value*Dn,_a))/Math.LN10-1.2;if(Vn>-2.200001&&Vn<1.800001)return qn;Vn=Math.abs(Vn);var bs=this.units[0].unit.prefixes;for(var Is in bs)if((0,ht.hasOwnProperty)(bs,Is)){var uo=bs[Is];if(uo.scientific){var Rs=Math.abs(Math.log(pn/Math.pow(uo.value*Dn,_a))/Math.LN10-1.2);(Rs<Vn||Rs===Vn&&uo.name.length<qn.name.length)&&(qn=uo,Vn=Rs)}}return qn},cr.prototype.splitUnit=function(pn){for(var Dn=this.clone(),qn=[],_a=0;_a<pn.length&&(Dn=Dn.to(pn[_a]),_a!==pn.length-1);_a++){var Vn=Dn.toNumeric(),bs=jt(Vn),Is=void 0,uo=Ut(bs,Vn);uo?Is=bs:Is=Kt(Dn.toNumeric());var Rs=new cr(Is,pn[_a].toString());qn.push(Rs),Dn=Pt(Dn,Rs)}for(var io=0,vo=0;vo<qn.length;vo++)io=Nt(io,qn[vo].value);return Ut(io,this.value)&&(Dn.value=0),qn.push(Dn),qn};var Kr={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};Kr.SHORTLONG=(0,tt.default)({},Kr.SHORT,Kr.LONG),Kr.BINARY_SHORT=(0,tt.default)({},Kr.BINARY_SHORT_SI,Kr.BINARY_SHORT_IEC),Kr.BINARY_LONG=(0,tt.default)({},Kr.BINARY_LONG_SI,Kr.BINARY_LONG_IEC);var Hn=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],ln={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var kn in ln)(0,ht.hasOwnProperty)(ln,kn)&&(ln[kn].key=kn);var xn={},An={name:"",base:xn,value:1,offset:0,dimensions:Hn.map(function(pn){return 0})},rs={meter:{name:"meter",base:ln.LENGTH,prefixes:Kr.LONG,value:1,offset:0},inch:{name:"inch",base:ln.LENGTH,prefixes:Kr.NONE,value:.0254,offset:0},foot:{name:"foot",base:ln.LENGTH,prefixes:Kr.NONE,value:.3048,offset:0},yard:{name:"yard",base:ln.LENGTH,prefixes:Kr.NONE,value:.9144,offset:0},mile:{name:"mile",base:ln.LENGTH,prefixes:Kr.NONE,value:1609.344,offset:0},link:{name:"link",base:ln.LENGTH,prefixes:Kr.NONE,value:.201168,offset:0},rod:{name:"rod",base:ln.LENGTH,prefixes:Kr.NONE,value:5.0292,offset:0},chain:{name:"chain",base:ln.LENGTH,prefixes:Kr.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:ln.LENGTH,prefixes:Kr.NONE,value:1e-10,offset:0},m:{name:"m",base:ln.LENGTH,prefixes:Kr.SHORT,value:1,offset:0},in:{name:"in",base:ln.LENGTH,prefixes:Kr.NONE,value:.0254,offset:0},ft:{name:"ft",base:ln.LENGTH,prefixes:Kr.NONE,value:.3048,offset:0},yd:{name:"yd",base:ln.LENGTH,prefixes:Kr.NONE,value:.9144,offset:0},mi:{name:"mi",base:ln.LENGTH,prefixes:Kr.NONE,value:1609.344,offset:0},li:{name:"li",base:ln.LENGTH,prefixes:Kr.NONE,value:.201168,offset:0},rd:{name:"rd",base:ln.LENGTH,prefixes:Kr.NONE,value:5.02921,offset:0},ch:{name:"ch",base:ln.LENGTH,prefixes:Kr.NONE,value:20.1168,offset:0},mil:{name:"mil",base:ln.LENGTH,prefixes:Kr.NONE,value:254e-7,offset:0},m2:{name:"m2",base:ln.SURFACE,prefixes:Kr.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:ln.SURFACE,prefixes:Kr.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:ln.SURFACE,prefixes:Kr.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:ln.SURFACE,prefixes:Kr.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:ln.SURFACE,prefixes:Kr.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:ln.SURFACE,prefixes:Kr.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:ln.SURFACE,prefixes:Kr.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:ln.SURFACE,prefixes:Kr.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:ln.SURFACE,prefixes:Kr.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:ln.SURFACE,prefixes:Kr.NONE,value:1e4,offset:0},m3:{name:"m3",base:ln.VOLUME,prefixes:Kr.CUBIC,value:1,offset:0},L:{name:"L",base:ln.VOLUME,prefixes:Kr.SHORT,value:.001,offset:0},l:{name:"l",base:ln.VOLUME,prefixes:Kr.SHORT,value:.001,offset:0},litre:{name:"litre",base:ln.VOLUME,prefixes:Kr.LONG,value:.001,offset:0},cuin:{name:"cuin",base:ln.VOLUME,prefixes:Kr.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:ln.VOLUME,prefixes:Kr.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:ln.VOLUME,prefixes:Kr.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:ln.VOLUME,prefixes:Kr.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:ln.VOLUME,prefixes:Kr.NONE,value:15e-6,offset:0},drop:{name:"drop",base:ln.VOLUME,prefixes:Kr.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:ln.VOLUME,prefixes:Kr.NONE,value:5e-8,offset:0},minim:{name:"minim",base:ln.VOLUME,prefixes:Kr.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:ln.VOLUME,prefixes:Kr.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:ln.VOLUME,prefixes:Kr.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:ln.VOLUME,prefixes:Kr.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:ln.VOLUME,prefixes:Kr.NONE,value:1e-6,offset:0},cup:{name:"cup",base:ln.VOLUME,prefixes:Kr.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:ln.VOLUME,prefixes:Kr.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:ln.VOLUME,prefixes:Kr.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:ln.VOLUME,prefixes:Kr.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:ln.VOLUME,prefixes:Kr.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:ln.VOLUME,prefixes:Kr.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:ln.VOLUME,prefixes:Kr.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:ln.VOLUME,prefixes:Kr.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:ln.VOLUME,prefixes:Kr.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:ln.VOLUME,prefixes:Kr.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:ln.VOLUME,prefixes:Kr.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:ln.VOLUME,prefixes:Kr.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:ln.VOLUME,prefixes:Kr.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:ln.VOLUME,prefixes:Kr.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:ln.VOLUME,prefixes:Kr.NONE,value:.1173478,offset:0},obl:{name:"obl",base:ln.VOLUME,prefixes:Kr.NONE,value:.1589873,offset:0},g:{name:"g",base:ln.MASS,prefixes:Kr.SHORT,value:.001,offset:0},gram:{name:"gram",base:ln.MASS,prefixes:Kr.LONG,value:.001,offset:0},ton:{name:"ton",base:ln.MASS,prefixes:Kr.SHORT,value:907.18474,offset:0},t:{name:"t",base:ln.MASS,prefixes:Kr.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:ln.MASS,prefixes:Kr.LONG,value:1e3,offset:0},grain:{name:"grain",base:ln.MASS,prefixes:Kr.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:ln.MASS,prefixes:Kr.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:ln.MASS,prefixes:Kr.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:ln.MASS,prefixes:Kr.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:ln.MASS,prefixes:Kr.NONE,value:45.359237,offset:0},stick:{name:"stick",base:ln.MASS,prefixes:Kr.NONE,value:.115,offset:0},stone:{name:"stone",base:ln.MASS,prefixes:Kr.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:ln.MASS,prefixes:Kr.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:ln.MASS,prefixes:Kr.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:ln.MASS,prefixes:Kr.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:ln.MASS,prefixes:Kr.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:ln.MASS,prefixes:Kr.NONE,value:45.359237,offset:0},s:{name:"s",base:ln.TIME,prefixes:Kr.SHORT,value:1,offset:0},min:{name:"min",base:ln.TIME,prefixes:Kr.NONE,value:60,offset:0},h:{name:"h",base:ln.TIME,prefixes:Kr.NONE,value:3600,offset:0},second:{name:"second",base:ln.TIME,prefixes:Kr.LONG,value:1,offset:0},sec:{name:"sec",base:ln.TIME,prefixes:Kr.LONG,value:1,offset:0},minute:{name:"minute",base:ln.TIME,prefixes:Kr.NONE,value:60,offset:0},hour:{name:"hour",base:ln.TIME,prefixes:Kr.NONE,value:3600,offset:0},day:{name:"day",base:ln.TIME,prefixes:Kr.NONE,value:86400,offset:0},week:{name:"week",base:ln.TIME,prefixes:Kr.NONE,value:7*86400,offset:0},month:{name:"month",base:ln.TIME,prefixes:Kr.NONE,value:2629800,offset:0},year:{name:"year",base:ln.TIME,prefixes:Kr.NONE,value:31557600,offset:0},decade:{name:"decade",base:ln.TIME,prefixes:Kr.NONE,value:315576e3,offset:0},century:{name:"century",base:ln.TIME,prefixes:Kr.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:ln.TIME,prefixes:Kr.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:ln.FREQUENCY,prefixes:Kr.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:ln.FREQUENCY,prefixes:Kr.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:ln.ANGLE,prefixes:Kr.SHORT,value:1,offset:0},radian:{name:"radian",base:ln.ANGLE,prefixes:Kr.LONG,value:1,offset:0},deg:{name:"deg",base:ln.ANGLE,prefixes:Kr.SHORT,value:null,offset:0},degree:{name:"degree",base:ln.ANGLE,prefixes:Kr.LONG,value:null,offset:0},grad:{name:"grad",base:ln.ANGLE,prefixes:Kr.SHORT,value:null,offset:0},gradian:{name:"gradian",base:ln.ANGLE,prefixes:Kr.LONG,value:null,offset:0},cycle:{name:"cycle",base:ln.ANGLE,prefixes:Kr.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:ln.ANGLE,prefixes:Kr.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:ln.ANGLE,prefixes:Kr.NONE,value:null,offset:0},A:{name:"A",base:ln.CURRENT,prefixes:Kr.SHORT,value:1,offset:0},ampere:{name:"ampere",base:ln.CURRENT,prefixes:Kr.LONG,value:1,offset:0},K:{name:"K",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1,offset:0},degC:{name:"degC",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1,offset:273.15},degF:{name:"degF",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1,offset:0},celsius:{name:"celsius",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:ln.TEMPERATURE,prefixes:Kr.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:ln.AMOUNT_OF_SUBSTANCE,prefixes:Kr.SHORT,value:1,offset:0},mole:{name:"mole",base:ln.AMOUNT_OF_SUBSTANCE,prefixes:Kr.LONG,value:1,offset:0},cd:{name:"cd",base:ln.LUMINOUS_INTENSITY,prefixes:Kr.SHORT,value:1,offset:0},candela:{name:"candela",base:ln.LUMINOUS_INTENSITY,prefixes:Kr.LONG,value:1,offset:0},N:{name:"N",base:ln.FORCE,prefixes:Kr.SHORT,value:1,offset:0},newton:{name:"newton",base:ln.FORCE,prefixes:Kr.LONG,value:1,offset:0},dyn:{name:"dyn",base:ln.FORCE,prefixes:Kr.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:ln.FORCE,prefixes:Kr.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:ln.FORCE,prefixes:Kr.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:ln.FORCE,prefixes:Kr.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:ln.FORCE,prefixes:Kr.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:ln.FORCE,prefixes:Kr.NONE,value:9.80665,offset:0},J:{name:"J",base:ln.ENERGY,prefixes:Kr.SHORT,value:1,offset:0},joule:{name:"joule",base:ln.ENERGY,prefixes:Kr.SHORT,value:1,offset:0},erg:{name:"erg",base:ln.ENERGY,prefixes:Kr.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:ln.ENERGY,prefixes:Kr.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:ln.ENERGY,prefixes:Kr.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:ln.ENERGY,prefixes:Kr.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:ln.ENERGY,prefixes:Kr.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:ln.POWER,prefixes:Kr.SHORT,value:1,offset:0},watt:{name:"watt",base:ln.POWER,prefixes:Kr.LONG,value:1,offset:0},hp:{name:"hp",base:ln.POWER,prefixes:Kr.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:ln.POWER,prefixes:Kr.SHORT,value:tr.I,offset:0},VA:{name:"VA",base:ln.POWER,prefixes:Kr.SHORT,value:1,offset:0},Pa:{name:"Pa",base:ln.PRESSURE,prefixes:Kr.SHORT,value:1,offset:0},psi:{name:"psi",base:ln.PRESSURE,prefixes:Kr.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:ln.PRESSURE,prefixes:Kr.NONE,value:101325,offset:0},bar:{name:"bar",base:ln.PRESSURE,prefixes:Kr.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:ln.PRESSURE,prefixes:Kr.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:ln.PRESSURE,prefixes:Kr.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:ln.PRESSURE,prefixes:Kr.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:ln.PRESSURE,prefixes:Kr.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:ln.ELECTRIC_CHARGE,prefixes:Kr.LONG,value:1,offset:0},C:{name:"C",base:ln.ELECTRIC_CHARGE,prefixes:Kr.SHORT,value:1,offset:0},farad:{name:"farad",base:ln.ELECTRIC_CAPACITANCE,prefixes:Kr.LONG,value:1,offset:0},F:{name:"F",base:ln.ELECTRIC_CAPACITANCE,prefixes:Kr.SHORT,value:1,offset:0},volt:{name:"volt",base:ln.ELECTRIC_POTENTIAL,prefixes:Kr.LONG,value:1,offset:0},V:{name:"V",base:ln.ELECTRIC_POTENTIAL,prefixes:Kr.SHORT,value:1,offset:0},ohm:{name:"ohm",base:ln.ELECTRIC_RESISTANCE,prefixes:Kr.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:ln.ELECTRIC_INDUCTANCE,prefixes:Kr.LONG,value:1,offset:0},H:{name:"H",base:ln.ELECTRIC_INDUCTANCE,prefixes:Kr.SHORT,value:1,offset:0},siemens:{name:"siemens",base:ln.ELECTRIC_CONDUCTANCE,prefixes:Kr.LONG,value:1,offset:0},S:{name:"S",base:ln.ELECTRIC_CONDUCTANCE,prefixes:Kr.SHORT,value:1,offset:0},weber:{name:"weber",base:ln.MAGNETIC_FLUX,prefixes:Kr.LONG,value:1,offset:0},Wb:{name:"Wb",base:ln.MAGNETIC_FLUX,prefixes:Kr.SHORT,value:1,offset:0},tesla:{name:"tesla",base:ln.MAGNETIC_FLUX_DENSITY,prefixes:Kr.LONG,value:1,offset:0},T:{name:"T",base:ln.MAGNETIC_FLUX_DENSITY,prefixes:Kr.SHORT,value:1,offset:0},b:{name:"b",base:ln.BIT,prefixes:Kr.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:ln.BIT,prefixes:Kr.BINARY_LONG,value:1,offset:0},B:{name:"B",base:ln.BIT,prefixes:Kr.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:ln.BIT,prefixes:Kr.BINARY_LONG,value:8,offset:0}},qs={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Ln(pn){if(pn.number==="BigNumber"){var Dn=(0,mt.createBigNumberPi)(Jt);rs.rad.value=new Jt(1),rs.deg.value=Dn.div(180),rs.grad.value=Dn.div(200),rs.cycle.value=Dn.times(2),rs.arcsec.value=Dn.div(648e3),rs.arcmin.value=Dn.div(10800)}else rs.rad.value=1,rs.deg.value=Math.PI/180,rs.grad.value=Math.PI/200,rs.cycle.value=Math.PI*2,rs.arcsec.value=Math.PI/648e3,rs.arcmin.value=Math.PI/10800;rs.radian.value=rs.rad.value,rs.degree.value=rs.deg.value,rs.gradian.value=rs.grad.value}Ln(At),wt&&wt("config",function(pn,Dn){pn.number!==Dn.number&&Ln(pn)});var Cn={si:{NONE:{unit:An,prefix:Kr.NONE[""]},LENGTH:{unit:rs.m,prefix:Kr.SHORT[""]},MASS:{unit:rs.g,prefix:Kr.SHORT.k},TIME:{unit:rs.s,prefix:Kr.SHORT[""]},CURRENT:{unit:rs.A,prefix:Kr.SHORT[""]},TEMPERATURE:{unit:rs.K,prefix:Kr.SHORT[""]},LUMINOUS_INTENSITY:{unit:rs.cd,prefix:Kr.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:rs.mol,prefix:Kr.SHORT[""]},ANGLE:{unit:rs.rad,prefix:Kr.SHORT[""]},BIT:{unit:rs.bits,prefix:Kr.SHORT[""]},FORCE:{unit:rs.N,prefix:Kr.SHORT[""]},ENERGY:{unit:rs.J,prefix:Kr.SHORT[""]},POWER:{unit:rs.W,prefix:Kr.SHORT[""]},PRESSURE:{unit:rs.Pa,prefix:Kr.SHORT[""]},ELECTRIC_CHARGE:{unit:rs.C,prefix:Kr.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:rs.F,prefix:Kr.SHORT[""]},ELECTRIC_POTENTIAL:{unit:rs.V,prefix:Kr.SHORT[""]},ELECTRIC_RESISTANCE:{unit:rs.ohm,prefix:Kr.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:rs.H,prefix:Kr.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:rs.S,prefix:Kr.SHORT[""]},MAGNETIC_FLUX:{unit:rs.Wb,prefix:Kr.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:rs.T,prefix:Kr.SHORT[""]},FREQUENCY:{unit:rs.Hz,prefix:Kr.SHORT[""]}}};Cn.cgs=JSON.parse(JSON.stringify(Cn.si)),Cn.cgs.LENGTH={unit:rs.m,prefix:Kr.SHORT.c},Cn.cgs.MASS={unit:rs.g,prefix:Kr.SHORT[""]},Cn.cgs.FORCE={unit:rs.dyn,prefix:Kr.SHORT[""]},Cn.cgs.ENERGY={unit:rs.erg,prefix:Kr.NONE[""]},Cn.us=JSON.parse(JSON.stringify(Cn.si)),Cn.us.LENGTH={unit:rs.ft,prefix:Kr.NONE[""]},Cn.us.MASS={unit:rs.lbm,prefix:Kr.NONE[""]},Cn.us.TEMPERATURE={unit:rs.degF,prefix:Kr.NONE[""]},Cn.us.FORCE={unit:rs.lbf,prefix:Kr.NONE[""]},Cn.us.ENERGY={unit:rs.BTU,prefix:Kr.BTU[""]},Cn.us.POWER={unit:rs.hp,prefix:Kr.NONE[""]},Cn.us.PRESSURE={unit:rs.psi,prefix:Kr.NONE[""]},Cn.auto=JSON.parse(JSON.stringify(Cn.si));var Nn=Cn.auto;cr.setUnitSystem=function(pn){if((0,ht.hasOwnProperty)(Cn,pn))Nn=Cn[pn];else throw new Error("Unit system "+pn+" does not exist. Choices are: "+Object.keys(Cn).join(", "))},cr.getUnitSystem=function(){for(var pn in Cn)if((0,ht.hasOwnProperty)(Cn,pn)&&Cn[pn]===Nn)return pn},cr.typeConverters={BigNumber:function(Dn){return new Jt(Dn+"")},Fraction:function(Dn){return new ar(Dn)},Complex:function(Dn){return Dn},number:function(Dn){return Dn}},cr._getNumberConverter=function(pn){if(!cr.typeConverters[pn])throw new TypeError('Unsupported type "'+pn+'"');return cr.typeConverters[pn]};for(var Gr in rs)if((0,ht.hasOwnProperty)(rs,Gr)){var tn=rs[Gr];tn.dimensions=tn.base.dimensions}for(var dn in qs)if((0,ht.hasOwnProperty)(qs,dn)){var Rn=rs[qs[dn]],wn={};for(var Un in Rn)(0,ht.hasOwnProperty)(Rn,Un)&&(wn[Un]=Rn[Un]);wn.name=dn,rs[dn]=wn}cr.isValidAlpha=function(Dn){return/^[a-zA-Z]$/.test(Dn)};function Zn(pn){for(var Dn=0;Dn<pn.length;Dn++){if(Er=pn.charAt(Dn),Dn===0&&!cr.isValidAlpha(Er))throw new Error('Invalid unit name (must begin with alpha character): "'+pn+'"');if(Dn>0&&!(cr.isValidAlpha(Er)||Mr(Er)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+pn+'"')}}return cr.createUnit=function(pn,Dn){if((0,_e.default)(pn)!=="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(Dn&&Dn.override){for(var qn in pn)if((0,ht.hasOwnProperty)(pn,qn)&&cr.deleteUnit(qn),pn[qn].aliases)for(var _a=0;_a<pn[qn].aliases.length;_a++)cr.deleteUnit(pn[qn].aliases[_a])}var Vn;for(var bs in pn)(0,ht.hasOwnProperty)(pn,bs)&&(Vn=cr.createUnitSingle(bs,pn[bs]));return Vn},cr.createUnitSingle=function(pn,Dn,qn){if((typeof Dn>"u"||Dn===null)&&(Dn={}),typeof pn!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if((0,ht.hasOwnProperty)(rs,pn))throw new Error('Cannot create unit "'+pn+'": a unit with that name already exists');Zn(pn);var _a=null,Vn=[],bs=0,Is,uo,Rs;if(Dn&&Dn.type==="Unit")_a=Dn.clone();else if(typeof Dn=="string")Dn!==""&&(Is=Dn);else if((0,_e.default)(Dn)==="object")Is=Dn.definition,uo=Dn.prefixes,bs=Dn.offset,Rs=Dn.baseName,Dn.aliases&&(Vn=Dn.aliases.valueOf());else throw new TypeError('Cannot create unit "'+pn+'" from "'+Dn.toString()+'": expecting "string" or "Unit" or "Object"');if(Vn){for(var io=0;io<Vn.length;io++)if((0,ht.hasOwnProperty)(rs,Vn[io]))throw new Error('Cannot create alias "'+Vn[io]+'": a unit with that name already exists')}if(Is&&typeof Is=="string"&&!_a)try{_a=cr.parse(Is,{allowNoUnits:!0})}catch(Iu){throw Iu.message='Could not create unit "'+pn+'" from "'+Is+'": '+Iu.message,Iu}else Is&&Is.type==="Unit"&&(_a=Is.clone());Vn=Vn||[],bs=bs||0,uo&&uo.toUpperCase?uo=Kr[uo.toUpperCase()]||Kr.NONE:uo=Kr.NONE;var vo={};if(_a){vo={name:pn,value:_a.value,dimensions:_a.dimensions.slice(0),prefixes:uo,offset:bs};var ds=!1;for(var Ps in ln)if((0,ht.hasOwnProperty)(ln,Ps)){for(var yo=!0,rn=0;rn<Hn.length;rn++)if(Math.abs((vo.dimensions[rn]||0)-(ln[Ps].dimensions[rn]||0))>1e-12){yo=!1;break}if(yo){ds=!0,vo.base=ln[Ps];break}}if(!ds){Rs=Rs||pn+"_STUFF";var es={dimensions:_a.dimensions.slice(0)};es.key=Rs,ln[Rs]=es,Nn[Rs]={unit:vo,prefix:Kr.NONE[""]},vo.base=ln[Rs]}}else{if(Rs=Rs||pn+"_STUFF",Hn.indexOf(Rs)>=0)throw new Error('Cannot create new base unit "'+pn+'": a base unit with that name already exists (and cannot be overridden)');Hn.push(Rs);for(var Bo in ln)(0,ht.hasOwnProperty)(ln,Bo)&&(ln[Bo].dimensions[Hn.length-1]=0);for(var En={dimensions:[]},In=0;In<Hn.length;In++)En.dimensions[In]=0;En.dimensions[Hn.length-1]=1,En.key=Rs,ln[Rs]=En,vo={name:pn,value:1,dimensions:ln[Rs].dimensions.slice(0),prefixes:uo,offset:bs,base:ln[Rs]},Nn[Rs]={unit:vo,prefix:Kr.NONE[""]}}cr.UNITS[pn]=vo;for(var Gs=0;Gs<Vn.length;Gs++){var Ro=Vn[Gs],ru={};for(var du in vo)(0,ht.hasOwnProperty)(vo,du)&&(ru[du]=vo[du]);ru.name=Ro,cr.UNITS[Ro]=ru}return delete hn.cache,new cr(null,pn)},cr.deleteUnit=function(pn){delete cr.UNITS[pn]},cr.PREFIXES=Kr,cr.BASE_DIMENSIONS=Hn,cr.BASE_UNITS=ln,cr.UNIT_SYSTEMS=Cn,cr.UNITS=rs,cr},{isClass:!0});return Unit.createUnitClass=Rt,Unit}var unit$1={},hasRequiredUnit$1;function requireUnit$1(){if(hasRequiredUnit$1)return unit$1;hasRequiredUnit$1=1,Object.defineProperty(unit$1,"__esModule",{value:!0}),unit$1.createUnitFunction=void 0;var et=requireFactory(),_e=requireCollection(),tt="unit",rt=["typed","Unit"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.Unit;return dt(tt,{Unit:function(mt){return mt.clone()},string:function(mt){return ft.isValuelessUnit(mt)?new ft(null,mt):ft.parse(mt,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(mt,bt){return new ft(mt,bt)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return unit$1.createUnitFunction=nt,unit$1}var sparse$1={},hasRequiredSparse$1;function requireSparse$1(){if(hasRequiredSparse$1)return sparse$1;hasRequiredSparse$1=1,Object.defineProperty(sparse$1,"__esModule",{value:!0}),sparse$1.createSparse=void 0;var et=requireFactory(),_e="sparse",tt=["typed","SparseMatrix"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.SparseMatrix;return st(_e,{"":function(){return new dt([])},string:function(ht){return new dt([],ht)},"Array | Matrix":function(ht){return new dt(ht)},"Array | Matrix, string":function(ht,mt){return new dt(ht,mt)}})});return sparse$1.createSparse=rt,sparse$1}var createUnit$1={},hasRequiredCreateUnit$1;function requireCreateUnit$1(){if(hasRequiredCreateUnit$1)return createUnit$1;hasRequiredCreateUnit$1=1,Object.defineProperty(createUnit$1,"__esModule",{value:!0}),createUnit$1.createCreateUnit=void 0;var et=requireFactory(),_e="createUnit",tt=["typed","Unit"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.Unit;return st(_e,{"Object, Object":function(ht,mt){return dt.createUnit(ht,mt)},Object:function(ht){return dt.createUnit(ht,{})},"string, Unit | string | Object, Object":function(ht,mt,bt){var St={};return St[ht]=mt,dt.createUnit(St,bt)},"string, Unit | string | Object":function(ht,mt){var bt={};return bt[ht]=mt,dt.createUnit(bt,{})},string:function(ht){var mt={};return mt[ht]={},dt.createUnit(mt,{})}})});return createUnit$1.createCreateUnit=rt,createUnit$1}var acos$1={},hasRequiredAcos$1;function requireAcos$1(){if(hasRequiredAcos$1)return acos$1;hasRequiredAcos$1=1,Object.defineProperty(acos$1,"__esModule",{value:!0}),acos$1.createAcos=void 0;var et=requireFactory(),_e=requireCollection(),tt="acos",rt=["typed","config","Complex"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.Complex;return dt(tt,{number:function(bt){return bt>=-1&&bt<=1||ft.predictable?Math.acos(bt):new ht(bt,0).acos()},Complex:function(bt){return bt.acos()},BigNumber:function(bt){return bt.acos()},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return acos$1.createAcos=nt,acos$1}var acosh$1={},hasRequiredAcosh$1;function requireAcosh$1(){if(hasRequiredAcosh$1)return acosh$1;hasRequiredAcosh$1=1,Object.defineProperty(acosh$1,"__esModule",{value:!0}),acosh$1.createAcosh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="acosh",nt=["typed","config","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex;return ft(rt,{number:function(St){return St>=1||ht.predictable?(0,tt.acoshNumber)(St):St<=-1?new mt(Math.log(Math.sqrt(St*St-1)-St),Math.PI):new mt(St,0).acosh()},Complex:function(St){return St.acosh()},BigNumber:function(St){return St.acosh()},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this)}})});return acosh$1.createAcosh=st,acosh$1}var acot$1={},hasRequiredAcot$1;function requireAcot$1(){if(hasRequiredAcot$1)return acot$1;hasRequiredAcot$1=1,Object.defineProperty(acot$1,"__esModule",{value:!0}),acot$1.createAcot=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="acot",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.acotNumber,Complex:function(bt){return bt.acot()},BigNumber:function(bt){return new ht(1).div(bt).atan()},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return acot$1.createAcot=st,acot$1}var acoth$1={},hasRequiredAcoth$1;function requireAcoth$1(){if(hasRequiredAcoth$1)return acoth$1;hasRequiredAcoth$1=1,Object.defineProperty(acoth$1,"__esModule",{value:!0}),acoth$1.createAcoth=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="acoth",nt=["typed","config","Complex","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex,bt=dt.BigNumber;return ft(rt,{number:function(Et){return Et>=1||Et<=-1||ht.predictable?(0,tt.acothNumber)(Et):new mt(Et,0).acoth()},Complex:function(Et){return Et.acoth()},BigNumber:function(Et){return new bt(1).div(Et).atanh()},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)}})});return acoth$1.createAcoth=st,acoth$1}var acsc$1={},hasRequiredAcsc$1;function requireAcsc$1(){if(hasRequiredAcsc$1)return acsc$1;hasRequiredAcsc$1=1,Object.defineProperty(acsc$1,"__esModule",{value:!0}),acsc$1.createAcsc=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="acsc",nt=["typed","config","Complex","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex,bt=dt.BigNumber;return ft(rt,{number:function(Et){return Et<=-1||Et>=1||ht.predictable?(0,tt.acscNumber)(Et):new mt(Et,0).acsc()},Complex:function(Et){return Et.acsc()},BigNumber:function(Et){return new bt(1).div(Et).asin()},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)}})});return acsc$1.createAcsc=st,acsc$1}var acsch$1={},hasRequiredAcsch$1;function requireAcsch$1(){if(hasRequiredAcsch$1)return acsch$1;hasRequiredAcsch$1=1,Object.defineProperty(acsch$1,"__esModule",{value:!0}),acsch$1.createAcsch=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="acsch",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.acschNumber,Complex:function(bt){return bt.acsch()},BigNumber:function(bt){return new ht(1).div(bt).asinh()},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return acsch$1.createAcsch=st,acsch$1}var asec$1={},hasRequiredAsec$1;function requireAsec$1(){if(hasRequiredAsec$1)return asec$1;hasRequiredAsec$1=1,Object.defineProperty(asec$1,"__esModule",{value:!0}),asec$1.createAsec=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="asec",nt=["typed","config","Complex","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex,bt=dt.BigNumber;return ft(rt,{number:function(Et){return Et<=-1||Et>=1||ht.predictable?(0,tt.asecNumber)(Et):new mt(Et,0).asec()},Complex:function(Et){return Et.asec()},BigNumber:function(Et){return new bt(1).div(Et).acos()},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)}})});return asec$1.createAsec=st,asec$1}var asech$1={},hasRequiredAsech$1;function requireAsech$1(){if(hasRequiredAsech$1)return asech$1;hasRequiredAsech$1=1,Object.defineProperty(asech$1,"__esModule",{value:!0}),asech$1.createAsech=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="asech",nt=["typed","config","Complex","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex,bt=dt.BigNumber;return ft(rt,{number:function(Et){if(Et<=1&&Et>=-1||ht.predictable){var Ct=1/Et;if(Ct>0||ht.predictable)return(0,tt.asechNumber)(Et);var Rt=Math.sqrt(Ct*Ct-1);return new mt(Math.log(Rt-Ct),Math.PI)}return new mt(Et,0).asech()},Complex:function(Et){return Et.asech()},BigNumber:function(Et){return new bt(1).div(Et).acosh()},"Array | Matrix":function(Et){return(0,_e.deepMap)(Et,this)}})});return asech$1.createAsech=st,asech$1}var asin$1={},hasRequiredAsin$1;function requireAsin$1(){if(hasRequiredAsin$1)return asin$1;hasRequiredAsin$1=1,Object.defineProperty(asin$1,"__esModule",{value:!0}),asin$1.createAsin=void 0;var et=requireFactory(),_e=requireCollection(),tt="asin",rt=["typed","config","Complex"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.Complex;return dt(tt,{number:function(bt){return bt>=-1&&bt<=1||ft.predictable?Math.asin(bt):new ht(bt,0).asin()},Complex:function(bt){return bt.asin()},BigNumber:function(bt){return bt.asin()},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this,!0)}})});return asin$1.createAsin=nt,asin$1}var asinh$1={},hasRequiredAsinh$1;function requireAsinh$1(){if(hasRequiredAsinh$1)return asinh$1;hasRequiredAsinh$1=1,Object.defineProperty(asinh$1,"__esModule",{value:!0}),asinh$1.createAsinh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="asinh",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft("asinh",{number:tt.asinhNumber,Complex:function(mt){return mt.asinh()},BigNumber:function(mt){return mt.asinh()},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)}})});return asinh$1.createAsinh=st,asinh$1}var atan$1={},hasRequiredAtan$1;function requireAtan$1(){if(hasRequiredAtan$1)return atan$1;hasRequiredAtan$1=1,Object.defineProperty(atan$1,"__esModule",{value:!0}),atan$1.createAtan=void 0;var et=requireFactory(),_e=requireCollection(),tt="atan",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt("atan",{number:function(ht){return Math.atan(ht)},Complex:function(ht){return ht.atan()},BigNumber:function(ht){return ht.atan()},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this,!0)}})});return atan$1.createAtan=nt,atan$1}var atan2$1={},hasRequiredAtan2$1;function requireAtan2$1(){if(hasRequiredAtan2$1)return atan2$1;hasRequiredAtan2$1=1,Object.defineProperty(atan2$1,"__esModule",{value:!0}),atan2$1.createAtan2=void 0;var et=requireFactory(),_e=requireAlgorithm02(),tt=requireAlgorithm03(),rt=requireAlgorithm09(),nt=requireAlgorithm11(),st=requireAlgorithm12(),dt=requireAlgorithm13(),ft=requireAlgorithm14(),ht="atan2",mt=["typed","matrix","equalScalar","BigNumber","DenseMatrix"],bt=(0,et.factory)(ht,mt,function(St){var Et=St.typed,Ct=St.matrix,Rt=St.equalScalar,Tt=St.BigNumber,wt=St.DenseMatrix,At=(0,_e.createAlgorithm02)({typed:Et,equalScalar:Rt}),Nt=(0,tt.createAlgorithm03)({typed:Et}),Pt=(0,rt.createAlgorithm09)({typed:Et,equalScalar:Rt}),It=(0,nt.createAlgorithm11)({typed:Et,equalScalar:Rt}),Ft=(0,st.createAlgorithm12)({typed:Et,DenseMatrix:wt}),qt=(0,dt.createAlgorithm13)({typed:Et}),Vt=(0,ft.createAlgorithm14)({typed:Et});return Et(ht,{"number, number":Math.atan2,"BigNumber, BigNumber":function(jt,Ut){return Tt.atan2(jt,Ut)},"SparseMatrix, SparseMatrix":function(jt,Ut){return Pt(jt,Ut,this,!1)},"SparseMatrix, DenseMatrix":function(jt,Ut){return At(Ut,jt,this,!0)},"DenseMatrix, SparseMatrix":function(jt,Ut){return Nt(jt,Ut,this,!1)},"DenseMatrix, DenseMatrix":function(jt,Ut){return qt(jt,Ut,this)},"Array, Array":function(jt,Ut){return this(Ct(jt),Ct(Ut)).valueOf()},"Array, Matrix":function(jt,Ut){return this(Ct(jt),Ut)},"Matrix, Array":function(jt,Ut){return this(jt,Ct(Ut))},"SparseMatrix, number | BigNumber":function(jt,Ut){return It(jt,Ut,this,!1)},"DenseMatrix, number | BigNumber":function(jt,Ut){return Vt(jt,Ut,this,!1)},"number | BigNumber, SparseMatrix":function(jt,Ut){return Ft(Ut,jt,this,!0)},"number | BigNumber, DenseMatrix":function(jt,Ut){return Vt(Ut,jt,this,!0)},"Array, number | BigNumber":function(jt,Ut){return Vt(Ct(jt),Ut,this,!1).valueOf()},"number | BigNumber, Array":function(jt,Ut){return Vt(Ct(Ut),jt,this,!0).valueOf()}})});return atan2$1.createAtan2=bt,atan2$1}var atanh$1={},hasRequiredAtanh$1;function requireAtanh$1(){if(hasRequiredAtanh$1)return atanh$1;hasRequiredAtanh$1=1,Object.defineProperty(atanh$1,"__esModule",{value:!0}),atanh$1.createAtanh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="atanh",nt=["typed","config","Complex"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.Complex;return ft(rt,{number:function(St){return St<=1&&St>=-1||ht.predictable?(0,tt.atanhNumber)(St):new mt(St,0).atanh()},Complex:function(St){return St.atanh()},BigNumber:function(St){return St.atanh()},"Array | Matrix":function(St){return(0,_e.deepMap)(St,this,!0)}})});return atanh$1.createAtanh=st,atanh$1}var cos$1={},hasRequiredCos$1;function requireCos$1(){if(hasRequiredCos$1)return cos$1;hasRequiredCos$1=1,Object.defineProperty(cos$1,"__esModule",{value:!0}),cos$1.createCos=void 0;var et=requireFactory(),_e=requireCollection(),tt="cos",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:Math.cos,Complex:function(ht){return ht.cos()},BigNumber:function(ht){return ht.cos()},Unit:function(ht){if(!ht.hasBase(ht.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return this(ht.value)},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this)}})});return cos$1.createCos=nt,cos$1}var cosh$1={},hasRequiredCosh$1;function requireCosh$1(){if(hasRequiredCosh$1)return cosh$1;hasRequiredCosh$1=1,Object.defineProperty(cosh$1,"__esModule",{value:!0}),cosh$1.createCosh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$3(),rt="cosh",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.cosh,Complex:function(mt){return mt.cosh()},BigNumber:function(mt){return mt.cosh()},Unit:function(mt){if(!mt.hasBase(mt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return this(mt.value)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this)}})});return cosh$1.createCosh=st,cosh$1}var cot$1={},hasRequiredCot$1;function requireCot$1(){if(hasRequiredCot$1)return cot$1;hasRequiredCot$1=1,Object.defineProperty(cot$1,"__esModule",{value:!0}),cot$1.createCot=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="cot",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.cotNumber,Complex:function(bt){return bt.cot()},BigNumber:function(bt){return new ht(1).div(bt.tan())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return cot$1.createCot=st,cot$1}var coth$1={},hasRequiredCoth$1;function requireCoth$1(){if(hasRequiredCoth$1)return coth$1;hasRequiredCoth$1=1,Object.defineProperty(coth$1,"__esModule",{value:!0}),coth$1.createCoth=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="coth",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.cothNumber,Complex:function(bt){return bt.coth()},BigNumber:function(bt){return new ht(1).div(bt.tanh())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return coth$1.createCoth=st,coth$1}var csc$1={},hasRequiredCsc$1;function requireCsc$1(){if(hasRequiredCsc$1)return csc$1;hasRequiredCsc$1=1,Object.defineProperty(csc$1,"__esModule",{value:!0}),csc$1.createCsc=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="csc",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.cscNumber,Complex:function(bt){return bt.csc()},BigNumber:function(bt){return new ht(1).div(bt.sin())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return csc$1.createCsc=st,csc$1}var csch$1={},hasRequiredCsch$1;function requireCsch$1(){if(hasRequiredCsch$1)return csch$1;hasRequiredCsch$1=1,Object.defineProperty(csch$1,"__esModule",{value:!0}),csch$1.createCsch=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="csch",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.cschNumber,Complex:function(bt){return bt.csch()},BigNumber:function(bt){return new ht(1).div(bt.sinh())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return csch$1.createCsch=st,csch$1}var sec$1={},hasRequiredSec$1;function requireSec$1(){if(hasRequiredSec$1)return sec$1;hasRequiredSec$1=1,Object.defineProperty(sec$1,"__esModule",{value:!0}),sec$1.createSec=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="sec",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.secNumber,Complex:function(bt){return bt.sec()},BigNumber:function(bt){return new ht(1).div(bt.cos())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return sec$1.createSec=st,sec$1}var sech$1={},hasRequiredSech$1;function requireSech$1(){if(hasRequiredSech$1)return sech$1;hasRequiredSech$1=1,Object.defineProperty(sech$1,"__esModule",{value:!0}),sech$1.createSech=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="sech",nt=["typed","BigNumber"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.BigNumber;return ft(rt,{number:tt.sechNumber,Complex:function(bt){return bt.sech()},BigNumber:function(bt){return new ht(1).div(bt.cosh())},Unit:function(bt){if(!bt.hasBase(bt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return this(bt.value)},"Array | Matrix":function(bt){return(0,_e.deepMap)(bt,this)}})});return sech$1.createSech=st,sech$1}var sin$1={},hasRequiredSin$1;function requireSin$1(){if(hasRequiredSin$1)return sin$1;hasRequiredSin$1=1,Object.defineProperty(sin$1,"__esModule",{value:!0}),sin$1.createSin=void 0;var et=requireFactory(),_e=requireCollection(),tt="sin",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:Math.sin,Complex:function(ht){return ht.sin()},BigNumber:function(ht){return ht.sin()},Unit:function(ht){if(!ht.hasBase(ht.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return this(ht.value)},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this,!0)}})});return sin$1.createSin=nt,sin$1}var sinh$1={},hasRequiredSinh$1;function requireSinh$1(){if(hasRequiredSinh$1)return sinh$1;hasRequiredSinh$1=1,Object.defineProperty(sinh$1,"__esModule",{value:!0}),sinh$1.createSinh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$2(),rt="sinh",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft(rt,{number:tt.sinhNumber,Complex:function(mt){return mt.sinh()},BigNumber:function(mt){return mt.sinh()},Unit:function(mt){if(!mt.hasBase(mt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return this(mt.value)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)}})});return sinh$1.createSinh=st,sinh$1}var tan$1={},hasRequiredTan$1;function requireTan$1(){if(hasRequiredTan$1)return tan$1;hasRequiredTan$1=1,Object.defineProperty(tan$1,"__esModule",{value:!0}),tan$1.createTan=void 0;var et=requireFactory(),_e=requireCollection(),tt="tan",rt=["typed"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed;return dt(tt,{number:Math.tan,Complex:function(ht){return ht.tan()},BigNumber:function(ht){return ht.tan()},Unit:function(ht){if(!ht.hasBase(ht.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return this(ht.value)},"Array | Matrix":function(ht){return(0,_e.deepMap)(ht,this,!0)}})});return tan$1.createTan=nt,tan$1}var tanh$1={},hasRequiredTanh$1;function requireTanh$1(){if(hasRequiredTanh$1)return tanh$1;hasRequiredTanh$1=1,Object.defineProperty(tanh$1,"__esModule",{value:!0}),tanh$1.createTanh=void 0;var et=requireFactory(),_e=requireCollection(),tt=requireNumber$3(),rt="tanh",nt=["typed"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed;return ft("tanh",{number:tt.tanh,Complex:function(mt){return mt.tanh()},BigNumber:function(mt){return mt.tanh()},Unit:function(mt){if(!mt.hasBase(mt.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return this(mt.value)},"Array | Matrix":function(mt){return(0,_e.deepMap)(mt,this,!0)}})});return tanh$1.createTanh=st,tanh$1}var setCartesian$1={},hasRequiredSetCartesian$1;function requireSetCartesian$1(){if(hasRequiredSetCartesian$1)return setCartesian$1;hasRequiredSetCartesian$1=1,Object.defineProperty(setCartesian$1,"__esModule",{value:!0}),setCartesian$1.createSetCartesian=void 0;var et=requireArray(),_e=requireFactory(),tt="setCartesian",rt=["typed","size","subset","compareNatural","Index","DenseMatrix"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index,St=st.DenseMatrix;return dt(tt,{"Array | Matrix, Array | Matrix":function(Ct,Rt){var Tt=[];if(ht(ft(Ct),new bt(0))!==0&&ht(ft(Rt),new bt(0))!==0){var wt=(0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()).sort(mt),At=(0,et.flatten)(Array.isArray(Rt)?Rt:Rt.toArray()).sort(mt);Tt=[];for(var Nt=0;Nt<wt.length;Nt++)for(var Pt=0;Pt<At.length;Pt++)Tt.push([wt[Nt],At[Pt]])}return Array.isArray(Ct)&&Array.isArray(Rt)?Tt:new St(Tt)}})});return setCartesian$1.createSetCartesian=nt,setCartesian$1}var setDifference$1={},hasRequiredSetDifference$1;function requireSetDifference$1(){if(hasRequiredSetDifference$1)return setDifference$1;hasRequiredSetDifference$1=1,Object.defineProperty(setDifference$1,"__esModule",{value:!0}),setDifference$1.createSetDifference=void 0;var et=requireArray(),_e=requireFactory(),tt="setDifference",rt=["typed","size","subset","compareNatural","Index","DenseMatrix"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index,St=st.DenseMatrix;return dt(tt,{"Array | Matrix, Array | Matrix":function(Ct,Rt){var Tt;if(ht(ft(Ct),new bt(0))===0)Tt=[];else{if(ht(ft(Rt),new bt(0))===0)return(0,et.flatten)(Ct.toArray());var wt=(0,et.identify)((0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()).sort(mt)),At=(0,et.identify)((0,et.flatten)(Array.isArray(Rt)?Rt:Rt.toArray()).sort(mt));Tt=[];for(var Nt,Pt=0;Pt<wt.length;Pt++){Nt=!1;for(var It=0;It<At.length;It++)if(mt(wt[Pt].value,At[It].value)===0&&wt[Pt].identifier===At[It].identifier){Nt=!0;break}Nt||Tt.push(wt[Pt])}}return Array.isArray(Ct)&&Array.isArray(Rt)?(0,et.generalize)(Tt):new St((0,et.generalize)(Tt))}})});return setDifference$1.createSetDifference=nt,setDifference$1}var setDistinct$1={},hasRequiredSetDistinct$1;function requireSetDistinct$1(){if(hasRequiredSetDistinct$1)return setDistinct$1;hasRequiredSetDistinct$1=1,Object.defineProperty(setDistinct$1,"__esModule",{value:!0}),setDistinct$1.createSetDistinct=void 0;var et=requireArray(),_e=requireFactory(),tt="setDistinct",rt=["typed","size","subset","compareNatural","Index","DenseMatrix"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index,St=st.DenseMatrix;return dt(tt,{"Array | Matrix":function(Ct){var Rt;if(ht(ft(Ct),new bt(0))===0)Rt=[];else{var Tt=(0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()).sort(mt);Rt=[],Rt.push(Tt[0]);for(var wt=1;wt<Tt.length;wt++)mt(Tt[wt],Tt[wt-1])!==0&&Rt.push(Tt[wt])}return Array.isArray(Ct)?Rt:new St(Rt)}})});return setDistinct$1.createSetDistinct=nt,setDistinct$1}var setIntersect$1={},hasRequiredSetIntersect$1;function requireSetIntersect$1(){if(hasRequiredSetIntersect$1)return setIntersect$1;hasRequiredSetIntersect$1=1,Object.defineProperty(setIntersect$1,"__esModule",{value:!0}),setIntersect$1.createSetIntersect=void 0;var et=requireArray(),_e=requireFactory(),tt="setIntersect",rt=["typed","size","subset","compareNatural","Index","DenseMatrix"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index,St=st.DenseMatrix;return dt(tt,{"Array | Matrix, Array | Matrix":function(Ct,Rt){var Tt;if(ht(ft(Ct),new bt(0))===0||ht(ft(Rt),new bt(0))===0)Tt=[];else{var wt=(0,et.identify)((0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()).sort(mt)),At=(0,et.identify)((0,et.flatten)(Array.isArray(Rt)?Rt:Rt.toArray()).sort(mt));Tt=[];for(var Nt=0;Nt<wt.length;Nt++)for(var Pt=0;Pt<At.length;Pt++)if(mt(wt[Nt].value,At[Pt].value)===0&&wt[Nt].identifier===At[Pt].identifier){Tt.push(wt[Nt]);break}}return Array.isArray(Ct)&&Array.isArray(Rt)?(0,et.generalize)(Tt):new St((0,et.generalize)(Tt))}})});return setIntersect$1.createSetIntersect=nt,setIntersect$1}var setIsSubset$1={},hasRequiredSetIsSubset$1;function requireSetIsSubset$1(){if(hasRequiredSetIsSubset$1)return setIsSubset$1;hasRequiredSetIsSubset$1=1,Object.defineProperty(setIsSubset$1,"__esModule",{value:!0}),setIsSubset$1.createSetIsSubset=void 0;var et=requireArray(),_e=requireFactory(),tt="setIsSubset",rt=["typed","size","subset","compareNatural","Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index;return dt(tt,{"Array | Matrix, Array | Matrix":function(Et,Ct){if(ht(ft(Et),new bt(0))===0)return!0;if(ht(ft(Ct),new bt(0))===0)return!1;for(var Rt=(0,et.identify)((0,et.flatten)(Array.isArray(Et)?Et:Et.toArray()).sort(mt)),Tt=(0,et.identify)((0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()).sort(mt)),wt,At=0;At<Rt.length;At++){wt=!1;for(var Nt=0;Nt<Tt.length;Nt++)if(mt(Rt[At].value,Tt[Nt].value)===0&&Rt[At].identifier===Tt[Nt].identifier){wt=!0;break}if(wt===!1)return!1}return!0}})});return setIsSubset$1.createSetIsSubset=nt,setIsSubset$1}var setMultiplicity$1={},hasRequiredSetMultiplicity$1;function requireSetMultiplicity$1(){if(hasRequiredSetMultiplicity$1)return setMultiplicity$1;hasRequiredSetMultiplicity$1=1,Object.defineProperty(setMultiplicity$1,"__esModule",{value:!0}),setMultiplicity$1.createSetMultiplicity=void 0;var et=requireArray(),_e=requireFactory(),tt="setMultiplicity",rt=["typed","size","subset","compareNatural","Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index;return dt(tt,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(Et,Ct){if(ht(ft(Ct),new bt(0))===0)return 0;for(var Rt=(0,et.flatten)(Array.isArray(Ct)?Ct:Ct.toArray()),Tt=0,wt=0;wt<Rt.length;wt++)mt(Rt[wt],Et)===0&&Tt++;return Tt}})});return setMultiplicity$1.createSetMultiplicity=nt,setMultiplicity$1}var setPowerset$1={},hasRequiredSetPowerset$1;function requireSetPowerset$1(){if(hasRequiredSetPowerset$1)return setPowerset$1;hasRequiredSetPowerset$1=1,Object.defineProperty(setPowerset$1,"__esModule",{value:!0}),setPowerset$1.createSetPowerset=void 0;var et=requireArray(),_e=requireFactory(),tt="setPowerset",rt=["typed","size","subset","compareNatural","Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.subset,mt=st.compareNatural,bt=st.Index;return dt(tt,{"Array | Matrix":function(Rt){if(ht(ft(Rt),new bt(0))===0)return[];for(var Tt=(0,et.flatten)(Array.isArray(Rt)?Rt:Rt.toArray()).sort(mt),wt=[],At=0;At.toString(2).length<=Tt.length;)wt.push(St(Tt,At.toString(2).split("").reverse())),At++;return Et(wt)}});function St(Ct,Rt){for(var Tt=[],wt=0;wt<Rt.length;wt++)Rt[wt]==="1"&&Tt.push(Ct[wt]);return Tt}function Et(Ct){for(var Rt=[],Tt=Ct.length-1;Tt>0;Tt--)for(var wt=0;wt<Tt;wt++)Ct[wt].length>Ct[wt+1].length&&(Rt=Ct[wt],Ct[wt]=Ct[wt+1],Ct[wt+1]=Rt);return Ct}});return setPowerset$1.createSetPowerset=nt,setPowerset$1}var setSize$1={},hasRequiredSetSize$1;function requireSetSize$1(){if(hasRequiredSetSize$1)return setSize$1;hasRequiredSetSize$1=1,Object.defineProperty(setSize$1,"__esModule",{value:!0}),setSize$1.createSetSize=void 0;var et=requireArray(),_e=requireFactory(),tt="setSize",rt=["typed","compareNatural"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.compareNatural;return dt(tt,{"Array | Matrix":function(mt){return Array.isArray(mt)?(0,et.flatten)(mt).length:(0,et.flatten)(mt.toArray()).length},"Array | Matrix, boolean":function(mt,bt){if(bt===!1||mt.length===0)return Array.isArray(mt)?(0,et.flatten)(mt).length:(0,et.flatten)(mt.toArray()).length;for(var St=(0,et.flatten)(Array.isArray(mt)?mt:mt.toArray()).sort(ft),Et=1,Ct=1;Ct<St.length;Ct++)ft(St[Ct],St[Ct-1])!==0&&Et++;return Et}})});return setSize$1.createSetSize=nt,setSize$1}var setSymDifference$1={},hasRequiredSetSymDifference$1;function requireSetSymDifference$1(){if(hasRequiredSetSymDifference$1)return setSymDifference$1;hasRequiredSetSymDifference$1=1,Object.defineProperty(setSymDifference$1,"__esModule",{value:!0}),setSymDifference$1.createSetSymDifference=void 0;var et=requireArray(),_e=requireFactory(),tt="setSymDifference",rt=["typed","size","concat","subset","setDifference","Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.concat,mt=st.subset,bt=st.setDifference,St=st.Index;return dt(tt,{"Array | Matrix, Array | Matrix":function(Ct,Rt){if(mt(ft(Ct),new St(0))===0)return(0,et.flatten)(Rt);if(mt(ft(Rt),new St(0))===0)return(0,et.flatten)(Ct);var Tt=(0,et.flatten)(Ct),wt=(0,et.flatten)(Rt);return ht(bt(Tt,wt),bt(wt,Tt))}})});return setSymDifference$1.createSetSymDifference=nt,setSymDifference$1}var setUnion$1={},hasRequiredSetUnion$1;function requireSetUnion$1(){if(hasRequiredSetUnion$1)return setUnion$1;hasRequiredSetUnion$1=1,Object.defineProperty(setUnion$1,"__esModule",{value:!0}),setUnion$1.createSetUnion=void 0;var et=requireArray(),_e=requireFactory(),tt="setUnion",rt=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.size,ht=st.concat,mt=st.subset,bt=st.setIntersect,St=st.setSymDifference,Et=st.Index;return dt(tt,{"Array | Matrix, Array | Matrix":function(Rt,Tt){if(mt(ft(Rt),new Et(0))===0)return(0,et.flatten)(Tt);if(mt(ft(Tt),new Et(0))===0)return(0,et.flatten)(Rt);var wt=(0,et.flatten)(Rt),At=(0,et.flatten)(Tt);return ht(St(wt,At),bt(wt,At))}})});return setUnion$1.createSetUnion=nt,setUnion$1}var add$1={},hasRequiredAdd$1;function requireAdd$1(){if(hasRequiredAdd$1)return add$1;hasRequiredAdd$1=1,Object.defineProperty(add$1,"__esModule",{value:!0}),add$1.createAdd=void 0;var et=requireFactory(),_e=requireObject(),tt=requireAlgorithm01(),rt=requireAlgorithm04(),nt=requireAlgorithm10(),st=requireAlgorithm13(),dt=requireAlgorithm14(),ft="add",ht=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],mt=(0,et.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.matrix,Ct=bt.addScalar,Rt=bt.equalScalar,Tt=bt.DenseMatrix;bt.SparseMatrix;var wt=(0,tt.createAlgorithm01)({typed:St}),At=(0,rt.createAlgorithm04)({typed:St,equalScalar:Rt}),Nt=(0,nt.createAlgorithm10)({typed:St,DenseMatrix:Tt}),Pt=(0,st.createAlgorithm13)({typed:St}),It=(0,dt.createAlgorithm14)({typed:St});return St(ft,(0,_e.extend)({"DenseMatrix, DenseMatrix":function(qt,Vt){return Pt(qt,Vt,Ct)},"DenseMatrix, SparseMatrix":function(qt,Vt){return wt(qt,Vt,Ct,!1)},"SparseMatrix, DenseMatrix":function(qt,Vt){return wt(Vt,qt,Ct,!0)},"SparseMatrix, SparseMatrix":function(qt,Vt){return At(qt,Vt,Ct)},"Array, Array":function(qt,Vt){return this(Et(qt),Et(Vt)).valueOf()},"Array, Matrix":function(qt,Vt){return this(Et(qt),Vt)},"Matrix, Array":function(qt,Vt){return this(qt,Et(Vt))},"DenseMatrix, any":function(qt,Vt){return It(qt,Vt,Ct,!1)},"SparseMatrix, any":function(qt,Vt){return Nt(qt,Vt,Ct,!1)},"any, DenseMatrix":function(qt,Vt){return It(Vt,qt,Ct,!0)},"any, SparseMatrix":function(qt,Vt){return Nt(Vt,qt,Ct,!0)},"Array, any":function(qt,Vt){return It(Et(qt),Vt,Ct,!1).valueOf()},"any, Array":function(qt,Vt){return It(Et(Vt),qt,Ct,!0).valueOf()},"any, any":Ct,"any, any, ...any":function(qt,Vt,Kt){for(var jt=this(qt,Vt),Ut=0;Ut<Kt.length;Ut++)jt=this(jt,Kt[Ut]);return jt}},Ct.signatures))});return add$1.createAdd=mt,add$1}var hypot$1={},hasRequiredHypot$1;function requireHypot$1(){if(hasRequiredHypot$1)return hypot$1;hasRequiredHypot$1=1,Object.defineProperty(hypot$1,"__esModule",{value:!0}),hypot$1.createHypot=void 0;var et=requireFactory(),_e=requireArray(),tt="hypot",rt=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.abs,ht=st.addScalar,mt=st.divideScalar,bt=st.multiplyScalar,St=st.sqrt,Et=st.smaller,Ct=st.isPositive;return dt(tt,{"... number | BigNumber":Rt,Array:function(wt){return this.apply(this,(0,_e.flatten)(wt))},Matrix:function(wt){return this.apply(this,(0,_e.flatten)(wt.toArray()))}});function Rt(Tt){for(var wt=0,At=0,Nt=0;Nt<Tt.length;Nt++){var Pt=ft(Tt[Nt]);Et(At,Pt)?(wt=bt(wt,bt(mt(At,Pt),mt(At,Pt))),wt=ht(wt,1),At=Pt):wt=ht(wt,Ct(Pt)?bt(mt(Pt,At),mt(Pt,At)):Pt)}return bt(At,St(wt))}});return hypot$1.createHypot=nt,hypot$1}var norm$1={},hasRequiredNorm$1;function requireNorm$1(){if(hasRequiredNorm$1)return norm$1;hasRequiredNorm$1=1,Object.defineProperty(norm$1,"__esModule",{value:!0}),norm$1.createNorm=void 0;var et=requireFactory(),_e="norm",tt=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.abs,ft=nt.add,ht=nt.pow,mt=nt.conj,bt=nt.sqrt,St=nt.multiply,Et=nt.equalScalar,Ct=nt.larger,Rt=nt.smaller,Tt=nt.matrix,wt=nt.ctranspose,At=nt.eigs;return st(_e,{number:Math.abs,Complex:function(Wt){return Wt.abs()},BigNumber:function(Wt){return Wt.abs()},boolean:function(Wt){return Math.abs(Wt)},Array:function(Wt){return Ut(Tt(Wt),2)},Matrix:function(Wt){return Ut(Wt,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(Wt){return this(Wt)},"Array, number | BigNumber | string":function(Wt,Bt){return Ut(Tt(Wt),Bt)},"Matrix, number | BigNumber | string":function(Wt,Bt){return Ut(Wt,Bt)}});function Nt(Ot){var Wt=0;return Ot.forEach(function(Bt){var tr=dt(Bt);Ct(tr,Wt)&&(Wt=tr)},!0),Wt}function Pt(Ot){var Wt;return Ot.forEach(function(Bt){var tr=dt(Bt);(!Wt||Rt(tr,Wt))&&(Wt=tr)},!0),Wt||0}function It(Ot,Wt){if(Wt===Number.POSITIVE_INFINITY||Wt==="inf")return Nt(Ot);if(Wt===Number.NEGATIVE_INFINITY||Wt==="-inf")return Pt(Ot);if(Wt==="fro")return Ut(Ot,2);if(typeof Wt=="number"&&!isNaN(Wt)){if(!Et(Wt,0)){var Bt=0;return Ot.forEach(function(tr){Bt=ft(ht(dt(tr),Wt),Bt)},!0),ht(Bt,1/Wt)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function Ft(Ot){var Wt=0;return Ot.forEach(function(Bt,tr){Wt=ft(Wt,St(Bt,mt(Bt)))}),dt(bt(Wt))}function qt(Ot){var Wt=[],Bt=0;return Ot.forEach(function(tr,Jt){var ar=Jt[1],pr=ft(Wt[ar]||0,dt(tr));Ct(pr,Bt)&&(Bt=pr),Wt[ar]=pr},!0),Bt}function Vt(Ot){var Wt=Ot.size();if(Wt[0]!==Wt[1])throw new RangeError("Invalid matrix dimensions");var Bt=wt(Ot),tr=St(Bt,Ot),Jt=At(tr).values.toArray(),ar=Jt[Jt.length-1];return dt(bt(ar))}function Kt(Ot){var Wt=[],Bt=0;return Ot.forEach(function(tr,Jt){var ar=Jt[0],pr=ft(Wt[ar]||0,dt(tr));Ct(pr,Bt)&&(Bt=pr),Wt[ar]=pr},!0),Bt}function jt(Ot,Wt){if(Wt===1)return qt(Ot);if(Wt===Number.POSITIVE_INFINITY||Wt==="inf")return Kt(Ot);if(Wt==="fro")return Ft(Ot);if(Wt===2)return Vt(Ot);throw new Error("Unsupported parameter value "+Wt)}function Ut(Ot,Wt){var Bt=Ot.size();if(Bt.length===1)return It(Ot,Wt);if(Bt.length===2){if(Bt[0]&&Bt[1])return jt(Ot,Wt);throw new RangeError("Invalid matrix dimensions")}}});return norm$1.createNorm=rt,norm$1}var dot$1={},hasRequiredDot$1;function requireDot$1(){if(hasRequiredDot$1)return dot$1;hasRequiredDot$1=1,Object.defineProperty(dot$1,"__esModule",{value:!0}),dot$1.createDot=void 0;var et=requireFactory(),_e=requireIs(),tt="dot",rt=["typed","addScalar","multiplyScalar","conj","size"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.addScalar,ht=st.multiplyScalar,mt=st.conj,bt=st.size;return dt(tt,{"Array | DenseMatrix, Array | DenseMatrix":Et,"SparseMatrix, SparseMatrix":Ct});function St(Tt,wt){var At=Rt(Tt),Nt=Rt(wt),Pt,It;if(At.length===1)Pt=At[0];else if(At.length===2&&At[1]===1)Pt=At[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+At.join(", ")+")");if(Nt.length===1)It=Nt[0];else if(Nt.length===2&&Nt[1]===1)It=Nt[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+Nt.join(", ")+")");if(Pt!==It)throw new RangeError("Vectors must have equal length ("+Pt+" != "+It+")");if(Pt===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return Pt}function Et(Tt,wt){var At=St(Tt,wt),Nt=(0,_e.isMatrix)(Tt)?Tt._data:Tt,Pt=(0,_e.isMatrix)(Tt)?Tt._datatype:void 0,It=(0,_e.isMatrix)(wt)?wt._data:wt,Ft=(0,_e.isMatrix)(wt)?wt._datatype:void 0,qt=Rt(Tt).length===2,Vt=Rt(wt).length===2,Kt=ft,jt=ht;if(Pt&&Ft&&Pt===Ft&&typeof Pt=="string"){var Ut=Pt;Kt=dt.find(ft,[Ut,Ut]),jt=dt.find(ht,[Ut,Ut])}if(!qt&&!Vt){for(var Ot=jt(mt(Nt[0]),It[0]),Wt=1;Wt<At;Wt++)Ot=Kt(Ot,jt(mt(Nt[Wt]),It[Wt]));return Ot}if(!qt&&Vt){for(var Bt=jt(mt(Nt[0]),It[0][0]),tr=1;tr<At;tr++)Bt=Kt(Bt,jt(mt(Nt[tr]),It[tr][0]));return Bt}if(qt&&!Vt){for(var Jt=jt(mt(Nt[0][0]),It[0]),ar=1;ar<At;ar++)Jt=Kt(Jt,jt(mt(Nt[ar][0]),It[ar]));return Jt}if(qt&&Vt){for(var pr=jt(mt(Nt[0][0]),It[0][0]),cr=1;cr<At;cr++)pr=Kt(pr,jt(mt(Nt[cr][0]),It[cr][0]));return pr}}function Ct(Tt,wt){St(Tt,wt);for(var At=Tt._index,Nt=Tt._values,Pt=wt._index,It=wt._values,Ft=0,qt=ft,Vt=ht,Kt=0,jt=0;Kt<At.length&&jt<Pt.length;){var Ut=At[Kt],Ot=Pt[jt];if(Ut<Ot){Kt++;continue}if(Ut>Ot){jt++;continue}Ut===Ot&&(Ft=qt(Ft,Vt(Nt[Kt],It[jt])),Kt++,jt++)}return Ft}function Rt(Tt){return(0,_e.isMatrix)(Tt)?Tt.size():bt(Tt)}});return dot$1.createDot=nt,dot$1}var trace$1={},hasRequiredTrace$1;function requireTrace$1(){if(hasRequiredTrace$1)return trace$1;hasRequiredTrace$1=1,Object.defineProperty(trace$1,"__esModule",{value:!0}),trace$1.createTrace=void 0;var et=requireObject(),_e=requireString$2(),tt=requireFactory(),rt="trace",nt=["typed","matrix","add"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix,mt=dt.add;return ft("trace",{Array:function(Ct){return bt(ht(Ct))},SparseMatrix:St,DenseMatrix:bt,any:et.clone});function bt(Et){var Ct=Et._size,Rt=Et._data;switch(Ct.length){case 1:if(Ct[0]===1)return(0,et.clone)(Rt[0]);throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Ct)+")");case 2:{var Tt=Ct[0],wt=Ct[1];if(Tt===wt){for(var At=0,Nt=0;Nt<Tt;Nt++)At=mt(At,Rt[Nt][Nt]);return At}else throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Ct)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+(0,_e.format)(Ct)+")")}}function St(Et){var Ct=Et._values,Rt=Et._index,Tt=Et._ptr,wt=Et._size,At=wt[0],Nt=wt[1];if(At===Nt){var Pt=0;if(Ct.length>0)for(var It=0;It<Nt;It++)for(var Ft=Tt[It],qt=Tt[It+1],Vt=Ft;Vt<qt;Vt++){var Kt=Rt[Vt];if(Kt===It){Pt=mt(Pt,Ct[Vt]);break}if(Kt>It)break}return Pt}throw new RangeError("Matrix must be square (size: "+(0,_e.format)(wt)+")")}});return trace$1.createTrace=st,trace$1}var _function={},hasRequired_function;function require_function(){if(hasRequired_function)return _function;hasRequired_function=1,Object.defineProperty(_function,"__esModule",{value:!0}),_function.createIndex=void 0;var et=requireFactory(),_e=requireIs(),tt="index",rt=["typed","Index"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.Index;return dt(tt,{"...number | string | BigNumber | Range | Array | Matrix":function(mt){var bt=mt.map(function(Et){return(0,_e.isBigNumber)(Et)?Et.toNumber():Array.isArray(Et)||(0,_e.isMatrix)(Et)?Et.map(function(Ct){return(0,_e.isBigNumber)(Ct)?Ct.toNumber():Ct}):Et}),St=new ft;return ft.apply(St,bt),St}})});return _function.createIndex=nt,_function}var Node={},keywords={},hasRequiredKeywords;function requireKeywords(){if(hasRequiredKeywords)return keywords;hasRequiredKeywords=1,Object.defineProperty(keywords,"__esModule",{value:!0}),keywords.keywords=void 0;var et=new Set(["end"]);return keywords.keywords=et,keywords}var hasRequiredNode;function requireNode(){if(hasRequiredNode)return Node;hasRequiredNode=1;var et=requireInteropRequireDefault();Object.defineProperty(Node,"__esModule",{value:!0}),Node.createNode=void 0;var _e=et(requireToConsumableArray()),tt=et(require_typeof()),rt=requireIs(),nt=requireKeywords(),st=requireObject(),dt=requireFactory(),ft=requireMap$2(),ht="Node",mt=["mathWithTransform"],bt=(0,dt.factory)(ht,mt,function(St){var Et=St.mathWithTransform;function Ct(){if(!(this instanceof Ct))throw new SyntaxError("Constructor must be called with the new operator")}Ct.prototype.evaluate=function(Tt){return this.compile().evaluate(Tt)},Ct.prototype.type="Node",Ct.prototype.isNode=!0,Ct.prototype.comment="",Ct.prototype.compile=function(){var Tt=this._compile(Et,{}),wt={},At=null;function Nt(Pt){var It=(0,ft.createMap)(Pt);return Rt(It),Tt(It,wt,At)}return{evaluate:Nt}},Ct.prototype._compile=function(Tt,wt){throw new Error("Method _compile should be implemented by type "+this.type)},Ct.prototype.forEach=function(Tt){throw new Error("Cannot run forEach on a Node interface")},Ct.prototype.map=function(Tt){throw new Error("Cannot run map on a Node interface")},Ct.prototype._ifNode=function(Tt){if(!(0,rt.isNode)(Tt))throw new TypeError("Callback function must return a Node");return Tt},Ct.prototype.traverse=function(Tt){Tt(this,null,null);function wt(At,Nt){At.forEach(function(Pt,It,Ft){Nt(Pt,It,Ft),wt(Pt,Nt)})}wt(this,Tt)},Ct.prototype.transform=function(Tt){function wt(At,Nt,Pt){var It=Tt(At,Nt,Pt);return It!==At?It:At.map(wt)}return wt(this,null,null)},Ct.prototype.filter=function(Tt){var wt=[];return this.traverse(function(At,Nt,Pt){Tt(At,Nt,Pt)&&wt.push(At)}),wt},Ct.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},Ct.prototype.cloneDeep=function(){return this.map(function(Tt){return Tt.cloneDeep()})},Ct.prototype.equals=function(Tt){return Tt?(0,st.deepStrictEqual)(this,Tt):!1},Ct.prototype.toString=function(Tt){var wt=this._getCustomString(Tt);return typeof wt<"u"?wt:this._toString(Tt)},Ct.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},Ct.prototype.toHTML=function(Tt){var wt=this._getCustomString(Tt);return typeof wt<"u"?wt:this.toHTML(Tt)},Ct.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},Ct.prototype.toTex=function(Tt){var wt=this._getCustomString(Tt);return typeof wt<"u"?wt:this._toTex(Tt)},Ct.prototype._toTex=function(Tt){throw new Error("_toTex not implemented for "+this.type)},Ct.prototype._getCustomString=function(Tt){if(Tt&&(0,tt.default)(Tt)==="object")switch((0,tt.default)(Tt.handler)){case"object":case"undefined":return;case"function":return Tt.handler(this,Tt);default:throw new TypeError("Object or function expected as callback")}},Ct.prototype.getIdentifier=function(){return this.type},Ct.prototype.getContent=function(){return this};function Rt(Tt){for(var wt=0,At=(0,_e.default)(nt.keywords);wt<At.length;wt++){var Nt=At[wt];if(Tt.has(Nt))throw new Error('Scope contains an illegal symbol, "'+Nt+'" is a reserved keyword')}}return Ct},{isClass:!0,isNode:!0});return Node.createNode=bt,Node}var AccessorNode={},access={},errorTransform={},hasRequiredErrorTransform;function requireErrorTransform(){if(hasRequiredErrorTransform)return errorTransform;hasRequiredErrorTransform=1,Object.defineProperty(errorTransform,"__esModule",{value:!0}),errorTransform.errorTransform=_e;var et=requireIndexError();function _e(tt){return tt&&tt.isIndexError?new et.IndexError(tt.index+1,tt.min+1,tt.max!==void 0?tt.max+1:void 0):tt}return errorTransform}var hasRequiredAccess;function requireAccess(){if(hasRequiredAccess)return access;hasRequiredAccess=1;var et=requireInteropRequireDefault();Object.defineProperty(access,"__esModule",{value:!0}),access.accessFactory=nt;var _e=et(require_typeof()),tt=requireErrorTransform(),rt=requireCustoms();function nt(st){var dt=st.subset;return function(ht,mt){try{if(Array.isArray(ht))return dt(ht,mt);if(ht&&typeof ht.subset=="function")return ht.subset(mt);if(typeof ht=="string")return dt(ht,mt);if((0,_e.default)(ht)==="object"){if(!mt.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return(0,rt.getSafeProperty)(ht,mt.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(bt){throw(0,tt.errorTransform)(bt)}}}return access}var hasRequiredAccessorNode;function requireAccessorNode(){if(hasRequiredAccessorNode)return AccessorNode;hasRequiredAccessorNode=1,Object.defineProperty(AccessorNode,"__esModule",{value:!0}),AccessorNode.createAccessorNode=void 0;var et=requireIs(),_e=requireCustoms(),tt=requireFactory(),rt=requireAccess(),nt="AccessorNode",st=["subset","Node"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.subset,mt=ft.Node,bt=(0,rt.accessFactory)({subset:ht});function St(Ct,Rt){if(!(this instanceof St))throw new SyntaxError("Constructor must be called with the new operator");if(!(0,et.isNode)(Ct))throw new TypeError('Node expected for parameter "object"');if(!(0,et.isIndexNode)(Rt))throw new TypeError('IndexNode expected for parameter "index"');this.object=Ct||null,this.index=Rt,Object.defineProperty(this,"name",{get:(function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}).bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}St.prototype=new mt,St.prototype.type="AccessorNode",St.prototype.isAccessorNode=!0,St.prototype._compile=function(Ct,Rt){var Tt=this.object._compile(Ct,Rt),wt=this.index._compile(Ct,Rt);if(this.index.isObjectProperty()){var At=this.index.getObjectProperty();return function(Pt,It,Ft){return(0,_e.getSafeProperty)(Tt(Pt,It,Ft),At)}}else return function(Pt,It,Ft){var qt=Tt(Pt,It,Ft),Vt=wt(Pt,It,qt);return bt(qt,Vt)}},St.prototype.forEach=function(Ct){Ct(this.object,"object",this),Ct(this.index,"index",this)},St.prototype.map=function(Ct){return new St(this._ifNode(Ct(this.object,"object",this)),this._ifNode(Ct(this.index,"index",this)))},St.prototype.clone=function(){return new St(this.object,this.index)},St.prototype._toString=function(Ct){var Rt=this.object.toString(Ct);return Et(this.object)&&(Rt="("+Rt+")"),Rt+this.index.toString(Ct)},St.prototype.toHTML=function(Ct){var Rt=this.object.toHTML(Ct);return Et(this.object)&&(Rt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Rt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Rt+this.index.toHTML(Ct)},St.prototype._toTex=function(Ct){var Rt=this.object.toTex(Ct);return Et(this.object)&&(Rt="\\left(' + object + '\\right)"),Rt+this.index.toTex(Ct)},St.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},St.fromJSON=function(Ct){return new St(Ct.object,Ct.index)};function Et(Ct){return!((0,et.isAccessorNode)(Ct)||(0,et.isArrayNode)(Ct)||(0,et.isConstantNode)(Ct)||(0,et.isFunctionNode)(Ct)||(0,et.isObjectNode)(Ct)||(0,et.isParenthesisNode)(Ct)||(0,et.isSymbolNode)(Ct))}return St},{isClass:!0,isNode:!0});return AccessorNode.createAccessorNode=dt,AccessorNode}var ArrayNode={},hasRequiredArrayNode;function requireArrayNode(){if(hasRequiredArrayNode)return ArrayNode;hasRequiredArrayNode=1,Object.defineProperty(ArrayNode,"__esModule",{value:!0}),ArrayNode.createArrayNode=void 0;var et=requireIs(),_e=requireArray(),tt=requireFactory(),rt="ArrayNode",nt=["Node"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.Node;function ht(mt){if(!(this instanceof ht))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=mt||[],!Array.isArray(this.items)||!this.items.every(et.isNode))throw new TypeError("Array containing Nodes expected")}return ht.prototype=new ft,ht.prototype.type="ArrayNode",ht.prototype.isArrayNode=!0,ht.prototype._compile=function(mt,bt){var St=(0,_e.map)(this.items,function(Rt){return Rt._compile(mt,bt)}),Et=mt.config.matrix!=="Array";if(Et){var Ct=mt.matrix;return function(Tt,wt,At){return Ct((0,_e.map)(St,function(Nt){return Nt(Tt,wt,At)}))}}else return function(Tt,wt,At){return(0,_e.map)(St,function(Nt){return Nt(Tt,wt,At)})}},ht.prototype.forEach=function(mt){for(var bt=0;bt<this.items.length;bt++){var St=this.items[bt];mt(St,"items["+bt+"]",this)}},ht.prototype.map=function(mt){for(var bt=[],St=0;St<this.items.length;St++)bt[St]=this._ifNode(mt(this.items[St],"items["+St+"]",this));return new ht(bt)},ht.prototype.clone=function(){return new ht(this.items.slice(0))},ht.prototype._toString=function(mt){var bt=this.items.map(function(St){return St.toString(mt)});return"["+bt.join(", ")+"]"},ht.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},ht.fromJSON=function(mt){return new ht(mt.items)},ht.prototype.toHTML=function(mt){var bt=this.items.map(function(St){return St.toHTML(mt)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+bt.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},ht.prototype._toTex=function(mt){function bt(St,Et){var Ct=St.some(et.isArrayNode)&&!St.every(et.isArrayNode),Rt=Et||Ct,Tt=Rt?"&":"\\\\",wt=St.map(function(At){return At.items?bt(At.items,!Et):At.toTex(mt)}).join(Tt);return Ct||!Rt||Rt&&!Et?"\\begin{bmatrix}"+wt+"\\end{bmatrix}":wt}return bt(this.items,!1)},ht},{isClass:!0,isNode:!0});return ArrayNode.createArrayNode=st,ArrayNode}var AssignmentNode={},assign={},hasRequiredAssign;function requireAssign(){if(hasRequiredAssign)return assign;hasRequiredAssign=1;var et=requireInteropRequireDefault();Object.defineProperty(assign,"__esModule",{value:!0}),assign.assignFactory=nt;var _e=et(require_typeof()),tt=requireErrorTransform(),rt=requireCustoms();function nt(st){var dt=st.subset,ft=st.matrix;return function(mt,bt,St){try{if(Array.isArray(mt))return ft(mt).subset(bt,St).valueOf();if(mt&&typeof mt.subset=="function")return mt.subset(bt,St);if(typeof mt=="string")return dt(mt,bt,St);if((0,_e.default)(mt)==="object"){if(!bt.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return(0,rt.setSafeProperty)(mt,bt.getObjectProperty(),St),mt}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(Et){throw(0,tt.errorTransform)(Et)}}}return assign}var operators={},hasRequiredOperators;function requireOperators(){if(hasRequiredOperators)return operators;hasRequiredOperators=1,Object.defineProperty(operators,"__esModule",{value:!0}),operators.getAssociativity=rt,operators.getPrecedence=tt,operators.isAssociativeWith=nt,operators.properties=void 0;var et=requireObject(),_e=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];operators.properties=_e;function tt(st,dt){var ft=st;dt!=="keep"&&(ft=st.getContent());for(var ht=ft.getIdentifier(),mt=0;mt<_e.length;mt++)if(ht in _e[mt])return mt;return null}function rt(st,dt){var ft=st;dt!=="keep"&&(ft=st.getContent());var ht=ft.getIdentifier(),mt=tt(ft,dt);if(mt===null)return null;var bt=_e[mt][ht];if((0,et.hasOwnProperty)(bt,"associativity")){if(bt.associativity==="left")return"left";if(bt.associativity==="right")return"right";throw Error("'"+ht+"' has the invalid associativity '"+bt.associativity+"'.")}return null}function nt(st,dt,ft){var ht=ft!=="keep"?st.getContent():st,mt=ft!=="keep"?st.getContent():dt,bt=ht.getIdentifier(),St=mt.getIdentifier(),Et=tt(ht,ft);if(Et===null)return null;var Ct=_e[Et][bt];if((0,et.hasOwnProperty)(Ct,"associativeWith")&&Ct.associativeWith instanceof Array){for(var Rt=0;Rt<Ct.associativeWith.length;Rt++)if(Ct.associativeWith[Rt]===St)return!0;return!1}return null}return operators}var hasRequiredAssignmentNode;function requireAssignmentNode(){if(hasRequiredAssignmentNode)return AssignmentNode;hasRequiredAssignmentNode=1,Object.defineProperty(AssignmentNode,"__esModule",{value:!0}),AssignmentNode.createAssignmentNode=void 0;var et=requireIs(),_e=requireCustoms(),tt=requireFactory(),rt=requireAccess(),nt=requireAssign(),st=requireOperators(),dt="AssignmentNode",ft=["subset","?matrix","Node"],ht=(0,tt.factory)(dt,ft,function(mt){var bt=mt.subset,St=mt.matrix,Et=mt.Node,Ct=(0,rt.accessFactory)({subset:bt}),Rt=(0,nt.assignFactory)({subset:bt,matrix:St});function Tt(At,Nt,Pt){if(!(this instanceof Tt))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=At,this.index=Pt?Nt:null,this.value=Pt||Nt,!(0,et.isSymbolNode)(At)&&!(0,et.isAccessorNode)(At))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if((0,et.isSymbolNode)(At)&&At.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!(0,et.isIndexNode)(this.index))throw new TypeError('IndexNode expected as "index"');if(!(0,et.isNode)(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:(function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}).bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}Tt.prototype=new Et,Tt.prototype.type="AssignmentNode",Tt.prototype.isAssignmentNode=!0,Tt.prototype._compile=function(At,Nt){var Pt=this.object._compile(At,Nt),It=this.index?this.index._compile(At,Nt):null,Ft=this.value._compile(At,Nt),qt=this.object.name;if(this.index)if(this.index.isObjectProperty()){var Vt=this.index.getObjectProperty();return function(Wt,Bt,tr){var Jt=Pt(Wt,Bt,tr),ar=Ft(Wt,Bt,tr);return(0,_e.setSafeProperty)(Jt,Vt,ar),ar}}else{if((0,et.isSymbolNode)(this.object))return function(Wt,Bt,tr){var Jt=Pt(Wt,Bt,tr),ar=Ft(Wt,Bt,tr),pr=It(Wt,Bt,Jt);return Wt.set(qt,Rt(Jt,pr,ar)),ar};var Kt=this.object.object._compile(At,Nt);if(this.object.index.isObjectProperty()){var jt=this.object.index.getObjectProperty();return function(Wt,Bt,tr){var Jt=Kt(Wt,Bt,tr),ar=(0,_e.getSafeProperty)(Jt,jt),pr=It(Wt,Bt,ar),cr=Ft(Wt,Bt,tr);return(0,_e.setSafeProperty)(Jt,jt,Rt(ar,pr,cr)),cr}}else{var Ut=this.object.index._compile(At,Nt);return function(Wt,Bt,tr){var Jt=Kt(Wt,Bt,tr),ar=Ut(Wt,Bt,Jt),pr=Ct(Jt,ar),cr=It(Wt,Bt,pr),gr=Ft(Wt,Bt,tr);return Rt(Jt,ar,Rt(pr,cr,gr)),gr}}}else{if(!(0,et.isSymbolNode)(this.object))throw new TypeError("SymbolNode expected as object");return function(Wt,Bt,tr){var Jt=Ft(Wt,Bt,tr);return Wt.set(qt,Jt),Jt}}},Tt.prototype.forEach=function(At){At(this.object,"object",this),this.index&&At(this.index,"index",this),At(this.value,"value",this)},Tt.prototype.map=function(At){var Nt=this._ifNode(At(this.object,"object",this)),Pt=this.index?this._ifNode(At(this.index,"index",this)):null,It=this._ifNode(At(this.value,"value",this));return new Tt(Nt,Pt,It)},Tt.prototype.clone=function(){return new Tt(this.object,this.index,this.value)};function wt(At,Nt){Nt||(Nt="keep");var Pt=(0,st.getPrecedence)(At,Nt),It=(0,st.getPrecedence)(At.value,Nt);return Nt==="all"||It!==null&&It<=Pt}return Tt.prototype._toString=function(At){var Nt=this.object.toString(At),Pt=this.index?this.index.toString(At):"",It=this.value.toString(At);return wt(this,At&&At.parenthesis)&&(It="("+It+")"),Nt+Pt+" = "+It},Tt.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},Tt.fromJSON=function(At){return new Tt(At.object,At.index,At.value)},Tt.prototype.toHTML=function(At){var Nt=this.object.toHTML(At),Pt=this.index?this.index.toHTML(At):"",It=this.value.toHTML(At);return wt(this,At&&At.parenthesis)&&(It='<span class="math-paranthesis math-round-parenthesis">(</span>'+It+'<span class="math-paranthesis math-round-parenthesis">)</span>'),Nt+Pt+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+It},Tt.prototype._toTex=function(At){var Nt=this.object.toTex(At),Pt=this.index?this.index.toTex(At):"",It=this.value.toTex(At);return wt(this,At&&At.parenthesis)&&(It="\\left(".concat(It,"\\right)")),Nt+Pt+":="+It},Tt},{isClass:!0,isNode:!0});return AssignmentNode.createAssignmentNode=ht,AssignmentNode}var BlockNode={},hasRequiredBlockNode;function requireBlockNode(){if(hasRequiredBlockNode)return BlockNode;hasRequiredBlockNode=1,Object.defineProperty(BlockNode,"__esModule",{value:!0}),BlockNode.createBlockNode=void 0;var et=requireIs(),_e=requireArray(),tt=requireFactory(),rt="BlockNode",nt=["ResultSet","Node"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.ResultSet,ht=dt.Node;function mt(bt){if(!(this instanceof mt))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(bt))throw new Error("Array expected");this.blocks=bt.map(function(St){var Et=St&&St.node,Ct=St&&St.visible!==void 0?St.visible:!0;if(!(0,et.isNode)(Et))throw new TypeError('Property "node" must be a Node');if(typeof Ct!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:Et,visible:Ct}})}return mt.prototype=new ht,mt.prototype.type="BlockNode",mt.prototype.isBlockNode=!0,mt.prototype._compile=function(bt,St){var Et=(0,_e.map)(this.blocks,function(Ct){return{evaluate:Ct.node._compile(bt,St),visible:Ct.visible}});return function(Rt,Tt,wt){var At=[];return(0,_e.forEach)(Et,function(Pt){var It=Pt.evaluate(Rt,Tt,wt);Pt.visible&&At.push(It)}),new ft(At)}},mt.prototype.forEach=function(bt){for(var St=0;St<this.blocks.length;St++)bt(this.blocks[St].node,"blocks["+St+"].node",this)},mt.prototype.map=function(bt){for(var St=[],Et=0;Et<this.blocks.length;Et++){var Ct=this.blocks[Et],Rt=this._ifNode(bt(Ct.node,"blocks["+Et+"].node",this));St[Et]={node:Rt,visible:Ct.visible}}return new mt(St)},mt.prototype.clone=function(){var bt=this.blocks.map(function(St){return{node:St.node,visible:St.visible}});return new mt(bt)},mt.prototype._toString=function(bt){return this.blocks.map(function(St){return St.node.toString(bt)+(St.visible?"":";")}).join(`
`)},mt.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},mt.fromJSON=function(bt){return new mt(bt.blocks)},mt.prototype.toHTML=function(bt){return this.blocks.map(function(St){return St.node.toHTML(bt)+(St.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')},mt.prototype._toTex=function(bt){return this.blocks.map(function(St){return St.node.toTex(bt)+(St.visible?"":";")}).join(`\\;\\;
`)},mt},{isClass:!0,isNode:!0});return BlockNode.createBlockNode=st,BlockNode}var ConditionalNode={},hasRequiredConditionalNode;function requireConditionalNode(){if(hasRequiredConditionalNode)return ConditionalNode;hasRequiredConditionalNode=1,Object.defineProperty(ConditionalNode,"__esModule",{value:!0}),ConditionalNode.createConditionalNode=void 0;var et=requireIs(),_e=requireFactory(),tt=requireOperators(),rt="ConditionalNode",nt=["Node"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.Node;function ht(bt,St,Et){if(!(this instanceof ht))throw new SyntaxError("Constructor must be called with the new operator");if(!(0,et.isNode)(bt))throw new TypeError("Parameter condition must be a Node");if(!(0,et.isNode)(St))throw new TypeError("Parameter trueExpr must be a Node");if(!(0,et.isNode)(Et))throw new TypeError("Parameter falseExpr must be a Node");this.condition=bt,this.trueExpr=St,this.falseExpr=Et}ht.prototype=new ft,ht.prototype.type="ConditionalNode",ht.prototype.isConditionalNode=!0,ht.prototype._compile=function(bt,St){var Et=this.condition._compile(bt,St),Ct=this.trueExpr._compile(bt,St),Rt=this.falseExpr._compile(bt,St);return function(wt,At,Nt){return mt(Et(wt,At,Nt))?Ct(wt,At,Nt):Rt(wt,At,Nt)}},ht.prototype.forEach=function(bt){bt(this.condition,"condition",this),bt(this.trueExpr,"trueExpr",this),bt(this.falseExpr,"falseExpr",this)},ht.prototype.map=function(bt){return new ht(this._ifNode(bt(this.condition,"condition",this)),this._ifNode(bt(this.trueExpr,"trueExpr",this)),this._ifNode(bt(this.falseExpr,"falseExpr",this)))},ht.prototype.clone=function(){return new ht(this.condition,this.trueExpr,this.falseExpr)},ht.prototype._toString=function(bt){var St=bt&&bt.parenthesis?bt.parenthesis:"keep",Et=(0,tt.getPrecedence)(this,St),Ct=this.condition.toString(bt),Rt=(0,tt.getPrecedence)(this.condition,St);(St==="all"||this.condition.type==="OperatorNode"||Rt!==null&&Rt<=Et)&&(Ct="("+Ct+")");var Tt=this.trueExpr.toString(bt),wt=(0,tt.getPrecedence)(this.trueExpr,St);(St==="all"||this.trueExpr.type==="OperatorNode"||wt!==null&&wt<=Et)&&(Tt="("+Tt+")");var At=this.falseExpr.toString(bt),Nt=(0,tt.getPrecedence)(this.falseExpr,St);return(St==="all"||this.falseExpr.type==="OperatorNode"||Nt!==null&&Nt<=Et)&&(At="("+At+")"),Ct+" ? "+Tt+" : "+At},ht.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},ht.fromJSON=function(bt){return new ht(bt.condition,bt.trueExpr,bt.falseExpr)},ht.prototype.toHTML=function(bt){var St=bt&&bt.parenthesis?bt.parenthesis:"keep",Et=(0,tt.getPrecedence)(this,St),Ct=this.condition.toHTML(bt),Rt=(0,tt.getPrecedence)(this.condition,St);(St==="all"||this.condition.type==="OperatorNode"||Rt!==null&&Rt<=Et)&&(Ct='<span class="math-parenthesis math-round-parenthesis">(</span>'+Ct+'<span class="math-parenthesis math-round-parenthesis">)</span>');var Tt=this.trueExpr.toHTML(bt),wt=(0,tt.getPrecedence)(this.trueExpr,St);(St==="all"||this.trueExpr.type==="OperatorNode"||wt!==null&&wt<=Et)&&(Tt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Tt+'<span class="math-parenthesis math-round-parenthesis">)</span>');var At=this.falseExpr.toHTML(bt),Nt=(0,tt.getPrecedence)(this.falseExpr,St);return(St==="all"||this.falseExpr.type==="OperatorNode"||Nt!==null&&Nt<=Et)&&(At='<span class="math-parenthesis math-round-parenthesis">(</span>'+At+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Ct+'<span class="math-operator math-conditional-operator">?</span>'+Tt+'<span class="math-operator math-conditional-operator">:</span>'+At},ht.prototype._toTex=function(bt){return"\\begin{cases} {"+this.trueExpr.toTex(bt)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(bt)+"}\\\\{"+this.falseExpr.toTex(bt)+"}, &\\quad{\\text{otherwise}}\\end{cases}"};function mt(bt){if(typeof bt=="number"||typeof bt=="boolean"||typeof bt=="string")return!!bt;if(bt){if((0,et.isBigNumber)(bt))return!bt.isZero();if((0,et.isComplex)(bt))return!!(bt.re||bt.im);if((0,et.isUnit)(bt))return!!bt.value}if(bt==null)return!1;throw new TypeError('Unsupported type of condition "'+(0,et.typeOf)(bt)+'"')}return ht},{isClass:!0,isNode:!0});return ConditionalNode.createConditionalNode=st,ConditionalNode}var ConstantNode={},latex={},dist,hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1;var et=Object.assign||function(nt){for(var st=1;st<arguments.length;st++){var dt=arguments[st];for(var ft in dt)Object.prototype.hasOwnProperty.call(dt,ft)&&(nt[ft]=dt[ft])}return nt},_e={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},tt={"":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},rt=function(st,dt){return et({},st,dt)};return dist=function(nt){for(var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dt=st.preserveFormatting,ft=dt===void 0?!1:dt,ht=st.escapeMapFn,mt=ht===void 0?rt:ht,bt=String(nt),St="",Et=mt(et({},_e),ft?et({},tt):{}),Ct=Object.keys(Et),Rt=function(){var wt=!1;Ct.forEach(function(At,Nt){wt||bt.length>=At.length&&bt.slice(0,At.length)===At&&(St+=Et[Ct[Nt]],bt=bt.slice(At.length,bt.length),wt=!0)}),wt||(St+=bt.slice(0,1),bt=bt.slice(1,bt.length))};bt;)Rt();return St},dist}var hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex;hasRequiredLatex=1;var et=requireInteropRequireDefault();Object.defineProperty(latex,"__esModule",{value:!0}),latex.defaultTemplate=void 0,latex.escapeLatex=ht,latex.latexSymbols=latex.latexOperators=latex.latexFunctions=void 0,latex.toSymbol=mt;var _e=et(requireDist()),tt=requireObject(),rt={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"};latex.latexSymbols=rt;var nt={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"};latex.latexOperators=nt;var st={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(nt.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(nt.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(nt.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(nt.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(nt.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(nt.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(nt.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(nt.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(nt.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(nt.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(nt.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(nt.bitAnd,"${args[1]}\\right)")},bitNot:{1:nt.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(nt.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(nt.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(nt.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(nt.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(nt.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(nt.and,"${args[1]}\\right)")},not:{1:nt.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(nt.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(nt.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(nt.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(nt.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(nt.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(nt.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(nt.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(nt.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(nt.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(nt.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(nt.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(nt.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(nt.to,"${args[1]}\\right)")},numeric:function(St,Et){return St.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(rt.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}};latex.latexFunctions=st;var dt="\\mathrm{${name}}\\left(${args}\\right)";latex.defaultTemplate=dt;var ft={deg:"^\\circ"};function ht(bt){return(0,_e.default)(bt,{preserveFormatting:!0})}function mt(bt,St){return St=typeof St>"u"?!1:St,St?(0,tt.hasOwnProperty)(ft,bt)?ft[bt]:"\\mathrm{"+ht(bt)+"}":(0,tt.hasOwnProperty)(rt,bt)?rt[bt]:ht(bt)}return latex}var hasRequiredConstantNode;function requireConstantNode(){if(hasRequiredConstantNode)return ConstantNode;hasRequiredConstantNode=1,Object.defineProperty(ConstantNode,"__esModule",{value:!0}),ConstantNode.createConstantNode=void 0;var et=requireString$2(),_e=requireIs(),tt=requireLatex(),rt=requireFactory(),nt="ConstantNode",st=["Node"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.Node;function mt(bt){if(!(this instanceof mt))throw new SyntaxError("Constructor must be called with the new operator");this.value=bt}return mt.prototype=new ht,mt.prototype.type="ConstantNode",mt.prototype.isConstantNode=!0,mt.prototype._compile=function(bt,St){var Et=this.value;return function(){return Et}},mt.prototype.forEach=function(bt){},mt.prototype.map=function(bt){return this.clone()},mt.prototype.clone=function(){return new mt(this.value)},mt.prototype._toString=function(bt){return(0,et.format)(this.value,bt)},mt.prototype.toHTML=function(bt){var St=this._toString(bt);switch((0,_e.typeOf)(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+St+"</span>";case"string":return'<span class="math-string">'+St+"</span>";case"boolean":return'<span class="math-boolean">'+St+"</span>";case"null":return'<span class="math-null-symbol">'+St+"</span>";case"undefined":return'<span class="math-undefined">'+St+"</span>";default:return'<span class="math-symbol">'+St+"</span>"}},mt.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},mt.fromJSON=function(bt){return new mt(bt.value)},mt.prototype._toTex=function(bt){var St=this._toString(bt);switch((0,_e.typeOf)(this.value)){case"string":return"\\mathtt{"+(0,tt.escapeLatex)(St)+"}";case"number":case"BigNumber":{if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var Et=St.toLowerCase().indexOf("e");if(Et!==-1)return St.substring(0,Et)+"\\cdot10^{"+St.substring(Et+1)+"}"}return St;case"Fraction":return this.value.toLatex();default:return St}},mt},{isClass:!0,isNode:!0});return ConstantNode.createConstantNode=dt,ConstantNode}var FunctionAssignmentNode={},hasRequiredFunctionAssignmentNode;function requireFunctionAssignmentNode(){if(hasRequiredFunctionAssignmentNode)return FunctionAssignmentNode;hasRequiredFunctionAssignmentNode=1,Object.defineProperty(FunctionAssignmentNode,"__esModule",{value:!0}),FunctionAssignmentNode.createFunctionAssignmentNode=void 0;var et=requireIs(),_e=requireKeywords(),tt=requireString$2(),rt=requireArray(),nt=requireLatex(),st=requireOperators(),dt=requireFactory(),ft="FunctionAssignmentNode",ht=["typed","Node"],mt=(0,dt.factory)(ft,ht,function(bt){var St=bt.typed,Et=bt.Node;function Ct(Tt,wt,At){if(!(this instanceof Ct))throw new SyntaxError("Constructor must be called with the new operator");if(typeof Tt!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(wt))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!(0,et.isNode)(At))throw new TypeError('Node expected for parameter "expr"');if(_e.keywords.has(Tt))throw new Error('Illegal function name, "'+Tt+'" is a reserved keyword');this.name=Tt,this.params=wt.map(function(Nt){return Nt&&Nt.name||Nt}),this.types=wt.map(function(Nt){return Nt&&Nt.type||"any"}),this.expr=At}Ct.prototype=new Et,Ct.prototype.type="FunctionAssignmentNode",Ct.prototype.isFunctionAssignmentNode=!0,Ct.prototype._compile=function(Tt,wt){var At=Object.create(wt);(0,rt.forEach)(this.params,function(Vt){At[Vt]=!0});var Nt=this.expr._compile(Tt,At),Pt=this.name,It=this.params,Ft=(0,rt.join)(this.types,","),qt=Pt+"("+(0,rt.join)(this.params,", ")+")";return function(Kt,jt,Ut){var Ot={};Ot[Ft]=function(){for(var Bt=Object.create(jt),tr=0;tr<It.length;tr++)Bt[It[tr]]=arguments[tr];return Nt(Kt,Bt,Ut)};var Wt=St(Pt,Ot);return Wt.syntax=qt,Kt.set(Pt,Wt),Wt}},Ct.prototype.forEach=function(Tt){Tt(this.expr,"expr",this)},Ct.prototype.map=function(Tt){var wt=this._ifNode(Tt(this.expr,"expr",this));return new Ct(this.name,this.params.slice(0),wt)},Ct.prototype.clone=function(){return new Ct(this.name,this.params.slice(0),this.expr)};function Rt(Tt,wt){var At=(0,st.getPrecedence)(Tt,wt),Nt=(0,st.getPrecedence)(Tt.expr,wt);return wt==="all"||Nt!==null&&Nt<=At}return Ct.prototype._toString=function(Tt){var wt=Tt&&Tt.parenthesis?Tt.parenthesis:"keep",At=this.expr.toString(Tt);return Rt(this,wt)&&(At="("+At+")"),this.name+"("+this.params.join(", ")+") = "+At},Ct.prototype.toJSON=function(){var Tt=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map(function(wt,At){return{name:wt,type:Tt[At]}}),expr:this.expr}},Ct.fromJSON=function(Tt){return new Ct(Tt.name,Tt.params,Tt.expr)},Ct.prototype.toHTML=function(Tt){for(var wt=Tt&&Tt.parenthesis?Tt.parenthesis:"keep",At=[],Nt=0;Nt<this.params.length;Nt++)At.push('<span class="math-symbol math-parameter">'+(0,tt.escape)(this.params[Nt])+"</span>");var Pt=this.expr.toHTML(Tt);return Rt(this,wt)&&(Pt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Pt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+(0,tt.escape)(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+At.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+Pt},Ct.prototype._toTex=function(Tt){var wt=Tt&&Tt.parenthesis?Tt.parenthesis:"keep",At=this.expr.toTex(Tt);return Rt(this,wt)&&(At="\\left(".concat(At,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(nt.toSymbol).join(",")+"\\right):="+At},Ct},{isClass:!0,isNode:!0});return FunctionAssignmentNode.createFunctionAssignmentNode=mt,FunctionAssignmentNode}var IndexNode={},hasRequiredIndexNode;function requireIndexNode(){if(hasRequiredIndexNode)return IndexNode;hasRequiredIndexNode=1;var et=requireInteropRequireDefault();Object.defineProperty(IndexNode,"__esModule",{value:!0}),IndexNode.createIndexNode=void 0;var _e=et(requireToConsumableArray()),tt=requireArray(),rt=requireCustoms(),nt=requireFactory(),st=requireIs(),dt=requireString$2(),ft="IndexNode",ht=["Node","size"],mt=(0,nt.factory)(ft,ht,function(bt){var St=bt.Node,Et=bt.size;function Ct(Rt,Tt){if(!(this instanceof Ct))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=Rt,this.dotNotation=Tt||!1,!Array.isArray(Rt)||!Rt.every(st.isNode))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}return Ct.prototype=new St,Ct.prototype.type="IndexNode",Ct.prototype.isIndexNode=!0,Ct.prototype._compile=function(Rt,Tt){var wt=(0,tt.map)(this.dimensions,function(Nt,Pt){var It=Nt.filter(function(Vt){return Vt.isSymbolNode&&Vt.name==="end"}).length>0;if(It){var Ft=Object.create(Tt);Ft.end=!0;var qt=Nt._compile(Rt,Ft);return function(Kt,jt,Ut){if(!(0,st.isMatrix)(Ut)&&!(0,st.isArray)(Ut)&&!(0,st.isString)(Ut))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+(0,st.typeOf)(Ut));var Ot=Et(Ut).valueOf(),Wt=Object.create(jt);return Wt.end=Ot[Pt],qt(Kt,Wt,Ut)}}else return Nt._compile(Rt,Tt)}),At=(0,rt.getSafeProperty)(Rt,"index");return function(Pt,It,Ft){var qt=(0,tt.map)(wt,function(Vt){return Vt(Pt,It,Ft)});return At.apply(void 0,(0,_e.default)(qt))}},Ct.prototype.forEach=function(Rt){for(var Tt=0;Tt<this.dimensions.length;Tt++)Rt(this.dimensions[Tt],"dimensions["+Tt+"]",this)},Ct.prototype.map=function(Rt){for(var Tt=[],wt=0;wt<this.dimensions.length;wt++)Tt[wt]=this._ifNode(Rt(this.dimensions[wt],"dimensions["+wt+"]",this));return new Ct(Tt,this.dotNotation)},Ct.prototype.clone=function(){return new Ct(this.dimensions.slice(0),this.dotNotation)},Ct.prototype.isObjectProperty=function(){return this.dimensions.length===1&&(0,st.isConstantNode)(this.dimensions[0])&&typeof this.dimensions[0].value=="string"},Ct.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},Ct.prototype._toString=function(Rt){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},Ct.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},Ct.fromJSON=function(Rt){return new Ct(Rt.dimensions,Rt.dotNotation)},Ct.prototype.toHTML=function(Rt){for(var Tt=[],wt=0;wt<this.dimensions.length;wt++)Tt[wt]=this.dimensions[wt].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+(0,dt.escape)(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+Tt.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},Ct.prototype._toTex=function(Rt){var Tt=this.dimensions.map(function(wt){return wt.toTex(Rt)});return this.dotNotation?"."+this.getObjectProperty():"_{"+Tt.join(",")+"}"},Ct},{isClass:!0,isNode:!0});return IndexNode.createIndexNode=mt,IndexNode}var ObjectNode={},hasRequiredObjectNode;function requireObjectNode(){if(hasRequiredObjectNode)return ObjectNode;hasRequiredObjectNode=1;var et=requireInteropRequireDefault();Object.defineProperty(ObjectNode,"__esModule",{value:!0}),ObjectNode.createObjectNode=void 0;var _e=et(require_typeof()),tt=requireIs(),rt=requireString$2(),nt=requireCustoms(),st=requireObject(),dt=requireFactory(),ft="ObjectNode",ht=["Node"],mt=(0,dt.factory)(ft,ht,function(bt){var St=bt.Node;function Et(Ct){if(!(this instanceof Et))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=Ct||{},Ct&&((0,_e.default)(Ct)!=="object"||!Object.keys(Ct).every(function(Rt){return(0,tt.isNode)(Ct[Rt])})))throw new TypeError("Object containing Nodes expected")}return Et.prototype=new St,Et.prototype.type="ObjectNode",Et.prototype.isObjectNode=!0,Et.prototype._compile=function(Ct,Rt){var Tt={};for(var wt in this.properties)if((0,st.hasOwnProperty)(this.properties,wt)){var At=(0,rt.stringify)(wt),Nt=JSON.parse(At);if(!(0,nt.isSafeProperty)(this.properties,Nt))throw new Error('No access to property "'+Nt+'"');Tt[Nt]=this.properties[wt]._compile(Ct,Rt)}return function(It,Ft,qt){var Vt={};for(var Kt in Tt)(0,st.hasOwnProperty)(Tt,Kt)&&(Vt[Kt]=Tt[Kt](It,Ft,qt));return Vt}},Et.prototype.forEach=function(Ct){for(var Rt in this.properties)(0,st.hasOwnProperty)(this.properties,Rt)&&Ct(this.properties[Rt],"properties["+(0,rt.stringify)(Rt)+"]",this)},Et.prototype.map=function(Ct){var Rt={};for(var Tt in this.properties)(0,st.hasOwnProperty)(this.properties,Tt)&&(Rt[Tt]=this._ifNode(Ct(this.properties[Tt],"properties["+(0,rt.stringify)(Tt)+"]",this)));return new Et(Rt)},Et.prototype.clone=function(){var Ct={};for(var Rt in this.properties)(0,st.hasOwnProperty)(this.properties,Rt)&&(Ct[Rt]=this.properties[Rt]);return new Et(Ct)},Et.prototype._toString=function(Ct){var Rt=[];for(var Tt in this.properties)(0,st.hasOwnProperty)(this.properties,Tt)&&Rt.push((0,rt.stringify)(Tt)+": "+this.properties[Tt].toString(Ct));return"{"+Rt.join(", ")+"}"},Et.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},Et.fromJSON=function(Ct){return new Et(Ct.properties)},Et.prototype.toHTML=function(Ct){var Rt=[];for(var Tt in this.properties)(0,st.hasOwnProperty)(this.properties,Tt)&&Rt.push('<span class="math-symbol math-property">'+(0,rt.escape)(Tt)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[Tt].toHTML(Ct));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+Rt.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},Et.prototype._toTex=function(Ct){var Rt=[];for(var Tt in this.properties)(0,st.hasOwnProperty)(this.properties,Tt)&&Rt.push("\\mathbf{"+Tt+":} & "+this.properties[Tt].toTex(Ct)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(Rt.join(`
`),"\\end{array}\\right\\}")},Et},{isClass:!0,isNode:!0});return ObjectNode.createObjectNode=mt,ObjectNode}var OperatorNode={},hasRequiredOperatorNode;function requireOperatorNode(){if(hasRequiredOperatorNode)return OperatorNode;hasRequiredOperatorNode=1,Object.defineProperty(OperatorNode,"__esModule",{value:!0}),OperatorNode.createOperatorNode=void 0;var et=requireIs(),_e=requireArray(),tt=requireString$2(),rt=requireCustoms(),nt=requireOperators(),st=requireLatex(),dt=requireFactory(),ft="OperatorNode",ht=["Node"],mt=(0,dt.factory)(ft,ht,function(bt){var St=bt.Node;function Et(Rt,Tt,wt,At,Nt){if(!(this instanceof Et))throw new SyntaxError("Constructor must be called with the new operator");if(typeof Rt!="string")throw new TypeError('string expected for parameter "op"');if(typeof Tt!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(wt)||!wt.every(et.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=At===!0,this.isPercentage=Nt===!0,this.op=Rt,this.fn=Tt,this.args=wt||[]}Et.prototype=new St,Et.prototype.type="OperatorNode",Et.prototype.isOperatorNode=!0,Et.prototype._compile=function(Rt,Tt){if(typeof this.fn!="string"||!(0,rt.isSafeMethod)(Rt,this.fn))throw Rt[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var wt=(0,rt.getSafeProperty)(Rt,this.fn),At=(0,_e.map)(this.args,function(Ft){return Ft._compile(Rt,Tt)});if(At.length===1){var Nt=At[0];return function(qt,Vt,Kt){return wt(Nt(qt,Vt,Kt))}}else if(At.length===2){var Pt=At[0],It=At[1];return function(qt,Vt,Kt){return wt(Pt(qt,Vt,Kt),It(qt,Vt,Kt))}}else return function(qt,Vt,Kt){return wt.apply(null,(0,_e.map)(At,function(jt){return jt(qt,Vt,Kt)}))}},Et.prototype.forEach=function(Rt){for(var Tt=0;Tt<this.args.length;Tt++)Rt(this.args[Tt],"args["+Tt+"]",this)},Et.prototype.map=function(Rt){for(var Tt=[],wt=0;wt<this.args.length;wt++)Tt[wt]=this._ifNode(Rt(this.args[wt],"args["+wt+"]",this));return new Et(this.op,this.fn,Tt,this.implicit,this.isPercentage)},Et.prototype.clone=function(){return new Et(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)},Et.prototype.isUnary=function(){return this.args.length===1},Et.prototype.isBinary=function(){return this.args.length===2};function Ct(Rt,Tt,wt,At,Nt){var Pt=(0,nt.getPrecedence)(Rt,Tt),It=(0,nt.getAssociativity)(Rt,Tt);if(Tt==="all"||At.length>2&&Rt.getIdentifier()!=="OperatorNode:add"&&Rt.getIdentifier()!=="OperatorNode:multiply")return At.map(function(cr){switch(cr.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var Ft;switch(At.length){case 0:Ft=[];break;case 1:{var qt=(0,nt.getPrecedence)(At[0],Tt);if(Nt&&qt!==null){var Vt,Kt;if(Tt==="keep"?(Vt=At[0].getIdentifier(),Kt=Rt.getIdentifier()):(Vt=At[0].getContent().getIdentifier(),Kt=Rt.getContent().getIdentifier()),nt.properties[Pt][Kt].latexLeftParens===!1){Ft=[!1];break}if(nt.properties[qt][Vt].latexParens===!1){Ft=[!1];break}}if(qt===null){Ft=[!1];break}if(qt<=Pt){Ft=[!0];break}Ft=[!1]}break;case 2:{var jt,Ut=(0,nt.getPrecedence)(At[0],Tt),Ot=(0,nt.isAssociativeWith)(Rt,At[0],Tt);Ut===null?jt=!1:Ut===Pt&&It==="right"&&!Ot||Ut<Pt?jt=!0:jt=!1;var Wt,Bt=(0,nt.getPrecedence)(At[1],Tt),tr=(0,nt.isAssociativeWith)(Rt,At[1],Tt);if(Bt===null?Wt=!1:Bt===Pt&&It==="left"&&!tr||Bt<Pt?Wt=!0:Wt=!1,Nt){var Jt,ar,pr;Tt==="keep"?(Jt=Rt.getIdentifier(),ar=Rt.args[0].getIdentifier(),pr=Rt.args[1].getIdentifier()):(Jt=Rt.getContent().getIdentifier(),ar=Rt.args[0].getContent().getIdentifier(),pr=Rt.args[1].getContent().getIdentifier()),Ut!==null&&(nt.properties[Pt][Jt].latexLeftParens===!1&&(jt=!1),nt.properties[Ut][ar].latexParens===!1&&(jt=!1)),Bt!==null&&(nt.properties[Pt][Jt].latexRightParens===!1&&(Wt=!1),nt.properties[Bt][pr].latexParens===!1&&(Wt=!1))}Ft=[jt,Wt]}break;default:(Rt.getIdentifier()==="OperatorNode:add"||Rt.getIdentifier()==="OperatorNode:multiply")&&(Ft=At.map(function(cr){var gr=(0,nt.getPrecedence)(cr,Tt),Sr=(0,nt.isAssociativeWith)(Rt,cr,Tt),Er=(0,nt.getAssociativity)(cr,Tt);return gr===null?!1:Pt===gr&&It===Er&&!Sr?!0:gr<Pt}));break}return At.length>=2&&Rt.getIdentifier()==="OperatorNode:multiply"&&Rt.implicit&&Tt==="auto"&&wt==="hide"&&(Ft=At.map(function(cr,gr){var Sr=cr.getIdentifier()==="ParenthesisNode";return!!(Ft[gr]||Sr)})),Ft}return Et.prototype._toString=function(Rt){var Tt=Rt&&Rt.parenthesis?Rt.parenthesis:"keep",wt=Rt&&Rt.implicit?Rt.implicit:"hide",At=this.args,Nt=Ct(this,Tt,wt,At,!1);if(At.length===1){var Pt=(0,nt.getAssociativity)(this,Tt),It=At[0].toString(Rt);Nt[0]&&(It="("+It+")");var Ft=/[a-zA-Z]+/.test(this.op);return Pt==="right"?this.op+(Ft?" ":"")+It:Pt==="left"?It+(Ft?" ":"")+this.op:It+this.op}else if(At.length===2){var qt=At[0].toString(Rt),Vt=At[1].toString(Rt);return Nt[0]&&(qt="("+qt+")"),Nt[1]&&(Vt="("+Vt+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&wt==="hide"?qt+" "+Vt:qt+" "+this.op+" "+Vt}else if(At.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var Kt=At.map(function(jt,Ut){return jt=jt.toString(Rt),Nt[Ut]&&(jt="("+jt+")"),jt});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&wt==="hide"?Kt.join(" "):Kt.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"},Et.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}},Et.fromJSON=function(Rt){return new Et(Rt.op,Rt.fn,Rt.args,Rt.implicit,Rt.isPercentage)},Et.prototype.toHTML=function(Rt){var Tt=Rt&&Rt.parenthesis?Rt.parenthesis:"keep",wt=Rt&&Rt.implicit?Rt.implicit:"hide",At=this.args,Nt=Ct(this,Tt,wt,At,!1);if(At.length===1){var Pt=(0,nt.getAssociativity)(this,Tt),It=At[0].toHTML(Rt);return Nt[0]&&(It='<span class="math-parenthesis math-round-parenthesis">(</span>'+It+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Pt==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+(0,tt.escape)(this.op)+"</span>"+It:It+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+(0,tt.escape)(this.op)+"</span>"}else if(At.length===2){var Ft=At[0].toHTML(Rt),qt=At[1].toHTML(Rt);return Nt[0]&&(Ft='<span class="math-parenthesis math-round-parenthesis">(</span>'+Ft+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Nt[1]&&(qt='<span class="math-parenthesis math-round-parenthesis">(</span>'+qt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&wt==="hide"?Ft+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+qt:Ft+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+(0,tt.escape)(this.op)+"</span>"+qt}else{var Vt=At.map(function(Kt,jt){return Kt=Kt.toHTML(Rt),Nt[jt]&&(Kt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Kt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Kt});return At.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&wt==="hide"?Vt.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):Vt.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+(0,tt.escape)(this.op)+"</span>"):'<span class="math-function">'+(0,tt.escape)(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+Vt.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}},Et.prototype._toTex=function(Rt){var Tt=Rt&&Rt.parenthesis?Rt.parenthesis:"keep",wt=Rt&&Rt.implicit?Rt.implicit:"hide",At=this.args,Nt=Ct(this,Tt,wt,At,!0),Pt=st.latexOperators[this.fn];if(Pt=typeof Pt>"u"?this.op:Pt,At.length===1){var It=(0,nt.getAssociativity)(this,Tt),Ft=At[0].toTex(Rt);return Nt[0]&&(Ft="\\left(".concat(Ft,"\\right)")),It==="right"?Pt+Ft:Ft+Pt}else if(At.length===2){var qt=At[0],Vt=qt.toTex(Rt);Nt[0]&&(Vt="\\left(".concat(Vt,"\\right)"));var Kt=At[1],jt=Kt.toTex(Rt);Nt[1]&&(jt="\\left(".concat(jt,"\\right)"));var Ut;switch(Tt==="keep"?Ut=qt.getIdentifier():Ut=qt.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return Pt+"{"+Vt+"}{"+jt+"}";case"OperatorNode:pow":switch(Vt="{"+Vt+"}",jt="{"+jt+"}",Ut){case"ConditionalNode":case"OperatorNode:divide":Vt="\\left(".concat(Vt,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&wt==="hide")return Vt+"~"+jt}return Vt+Pt+jt}else if(At.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var Ot=At.map(function(Wt,Bt){return Wt=Wt.toTex(Rt),Nt[Bt]&&(Wt="\\left(".concat(Wt,"\\right)")),Wt});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit?Ot.join("~"):Ot.join(Pt)}else return"\\mathrm{"+this.fn+"}\\left("+At.map(function(Wt){return Wt.toTex(Rt)}).join(",")+"\\right)"},Et.prototype.getIdentifier=function(){return this.type+":"+this.fn},Et},{isClass:!0,isNode:!0});return OperatorNode.createOperatorNode=mt,OperatorNode}var ParenthesisNode={},hasRequiredParenthesisNode;function requireParenthesisNode(){if(hasRequiredParenthesisNode)return ParenthesisNode;hasRequiredParenthesisNode=1,Object.defineProperty(ParenthesisNode,"__esModule",{value:!0}),ParenthesisNode.createParenthesisNode=void 0;var et=requireIs(),_e=requireFactory(),tt="ParenthesisNode",rt=["Node"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.Node;function ft(ht){if(!(this instanceof ft))throw new SyntaxError("Constructor must be called with the new operator");if(!(0,et.isNode)(ht))throw new TypeError('Node expected for parameter "content"');this.content=ht}return ft.prototype=new dt,ft.prototype.type="ParenthesisNode",ft.prototype.isParenthesisNode=!0,ft.prototype._compile=function(ht,mt){return this.content._compile(ht,mt)},ft.prototype.getContent=function(){return this.content.getContent()},ft.prototype.forEach=function(ht){ht(this.content,"content",this)},ft.prototype.map=function(ht){var mt=ht(this.content,"content",this);return new ft(mt)},ft.prototype.clone=function(){return new ft(this.content)},ft.prototype._toString=function(ht){return!ht||ht&&!ht.parenthesis||ht&&ht.parenthesis==="keep"?"("+this.content.toString(ht)+")":this.content.toString(ht)},ft.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},ft.fromJSON=function(ht){return new ft(ht.content)},ft.prototype.toHTML=function(ht){return!ht||ht&&!ht.parenthesis||ht&&ht.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(ht)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(ht)},ft.prototype._toTex=function(ht){return!ht||ht&&!ht.parenthesis||ht&&ht.parenthesis==="keep"?"\\left(".concat(this.content.toTex(ht),"\\right)"):this.content.toTex(ht)},ft},{isClass:!0,isNode:!0});return ParenthesisNode.createParenthesisNode=nt,ParenthesisNode}var RangeNode={},hasRequiredRangeNode;function requireRangeNode(){if(hasRequiredRangeNode)return RangeNode;hasRequiredRangeNode=1,Object.defineProperty(RangeNode,"__esModule",{value:!0}),RangeNode.createRangeNode=void 0;var et=requireIs(),_e=requireFactory(),tt=requireOperators(),rt="RangeNode",nt=["Node"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.Node;function ht(bt,St,Et){if(!(this instanceof ht))throw new SyntaxError("Constructor must be called with the new operator");if(!(0,et.isNode)(bt))throw new TypeError("Node expected");if(!(0,et.isNode)(St))throw new TypeError("Node expected");if(Et&&!(0,et.isNode)(Et))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=bt,this.end=St,this.step=Et||null}ht.prototype=new ft,ht.prototype.type="RangeNode",ht.prototype.isRangeNode=!0,ht.prototype.needsEnd=function(){var bt=this.filter(function(St){return(0,et.isSymbolNode)(St)&&St.name==="end"});return bt.length>0},ht.prototype._compile=function(bt,St){var Et=bt.range,Ct=this.start._compile(bt,St),Rt=this.end._compile(bt,St);if(this.step){var Tt=this.step._compile(bt,St);return function(At,Nt,Pt){return Et(Ct(At,Nt,Pt),Rt(At,Nt,Pt),Tt(At,Nt,Pt))}}else return function(At,Nt,Pt){return Et(Ct(At,Nt,Pt),Rt(At,Nt,Pt))}},ht.prototype.forEach=function(bt){bt(this.start,"start",this),bt(this.end,"end",this),this.step&&bt(this.step,"step",this)},ht.prototype.map=function(bt){return new ht(this._ifNode(bt(this.start,"start",this)),this._ifNode(bt(this.end,"end",this)),this.step&&this._ifNode(bt(this.step,"step",this)))},ht.prototype.clone=function(){return new ht(this.start,this.end,this.step&&this.step)};function mt(bt,St){var Et=(0,tt.getPrecedence)(bt,St),Ct={},Rt=(0,tt.getPrecedence)(bt.start,St);if(Ct.start=Rt!==null&&Rt<=Et||St==="all",bt.step){var Tt=(0,tt.getPrecedence)(bt.step,St);Ct.step=Tt!==null&&Tt<=Et||St==="all"}var wt=(0,tt.getPrecedence)(bt.end,St);return Ct.end=wt!==null&&wt<=Et||St==="all",Ct}return ht.prototype._toString=function(bt){var St=bt&&bt.parenthesis?bt.parenthesis:"keep",Et=mt(this,St),Ct,Rt=this.start.toString(bt);if(Et.start&&(Rt="("+Rt+")"),Ct=Rt,this.step){var Tt=this.step.toString(bt);Et.step&&(Tt="("+Tt+")"),Ct+=":"+Tt}var wt=this.end.toString(bt);return Et.end&&(wt="("+wt+")"),Ct+=":"+wt,Ct},ht.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},ht.fromJSON=function(bt){return new ht(bt.start,bt.end,bt.step)},ht.prototype.toHTML=function(bt){var St=bt&&bt.parenthesis?bt.parenthesis:"keep",Et=mt(this,St),Ct,Rt=this.start.toHTML(bt);if(Et.start&&(Rt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Rt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Ct=Rt,this.step){var Tt=this.step.toHTML(bt);Et.step&&(Tt='<span class="math-parenthesis math-round-parenthesis">(</span>'+Tt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Ct+='<span class="math-operator math-range-operator">:</span>'+Tt}var wt=this.end.toHTML(bt);return Et.end&&(wt='<span class="math-parenthesis math-round-parenthesis">(</span>'+wt+'<span class="math-parenthesis math-round-parenthesis">)</span>'),Ct+='<span class="math-operator math-range-operator">:</span>'+wt,Ct},ht.prototype._toTex=function(bt){var St=bt&&bt.parenthesis?bt.parenthesis:"keep",Et=mt(this,St),Ct=this.start.toTex(bt);if(Et.start&&(Ct="\\left(".concat(Ct,"\\right)")),this.step){var Rt=this.step.toTex(bt);Et.step&&(Rt="\\left(".concat(Rt,"\\right)")),Ct+=":"+Rt}var Tt=this.end.toTex(bt);return Et.end&&(Tt="\\left(".concat(Tt,"\\right)")),Ct+=":"+Tt,Ct},ht},{isClass:!0,isNode:!0});return RangeNode.createRangeNode=st,RangeNode}var RelationalNode={},hasRequiredRelationalNode;function requireRelationalNode(){if(hasRequiredRelationalNode)return RelationalNode;hasRequiredRelationalNode=1,Object.defineProperty(RelationalNode,"__esModule",{value:!0}),RelationalNode.createRelationalNode=void 0;var et=requireOperators(),_e=requireString$2(),tt=requireCustoms(),rt=requireLatex(),nt=requireFactory(),st="RelationalNode",dt=["Node"],ft=(0,nt.factory)(st,dt,function(ht){var mt=ht.Node;function bt(St,Et){if(!(this instanceof bt))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(St))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(Et))throw new TypeError("Parameter params must be an array");if(St.length!==Et.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=St,this.params=Et}return bt.prototype=new mt,bt.prototype.type="RelationalNode",bt.prototype.isRelationalNode=!0,bt.prototype._compile=function(St,Et){var Ct=this,Rt=this.params.map(function(Tt){return Tt._compile(St,Et)});return function(wt,At,Nt){for(var Pt,It=Rt[0](wt,At,Nt),Ft=0;Ft<Ct.conditionals.length;Ft++){Pt=It,It=Rt[Ft+1](wt,At,Nt);var qt=(0,tt.getSafeProperty)(St,Ct.conditionals[Ft]);if(!qt(Pt,It))return!1}return!0}},bt.prototype.forEach=function(St){var Et=this;this.params.forEach(function(Ct,Rt){return St(Ct,"params["+Rt+"]",Et)},this)},bt.prototype.map=function(St){var Et=this;return new bt(this.conditionals.slice(),this.params.map(function(Ct,Rt){return Et._ifNode(St(Ct,"params["+Rt+"]",Et))},this))},bt.prototype.clone=function(){return new bt(this.conditionals,this.params)},bt.prototype._toString=function(St){for(var Et=St&&St.parenthesis?St.parenthesis:"keep",Ct=(0,et.getPrecedence)(this,Et),Rt=this.params.map(function(Nt,Pt){var It=(0,et.getPrecedence)(Nt,Et);return Et==="all"||It!==null&&It<=Ct?"("+Nt.toString(St)+")":Nt.toString(St)}),Tt={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},wt=Rt[0],At=0;At<this.conditionals.length;At++)wt+=" "+Tt[this.conditionals[At]]+" "+Rt[At+1];return wt},bt.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},bt.fromJSON=function(St){return new bt(St.conditionals,St.params)},bt.prototype.toHTML=function(St){for(var Et=St&&St.parenthesis?St.parenthesis:"keep",Ct=(0,et.getPrecedence)(this,Et),Rt=this.params.map(function(Nt,Pt){var It=(0,et.getPrecedence)(Nt,Et);return Et==="all"||It!==null&&It<=Ct?'<span class="math-parenthesis math-round-parenthesis">(</span>'+Nt.toHTML(St)+'<span class="math-parenthesis math-round-parenthesis">)</span>':Nt.toHTML(St)}),Tt={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},wt=Rt[0],At=0;At<this.conditionals.length;At++)wt+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+(0,_e.escape)(Tt[this.conditionals[At]])+"</span>"+Rt[At+1];return wt},bt.prototype._toTex=function(St){for(var Et=St&&St.parenthesis?St.parenthesis:"keep",Ct=(0,et.getPrecedence)(this,Et),Rt=this.params.map(function(At,Nt){var Pt=(0,et.getPrecedence)(At,Et);return Et==="all"||Pt!==null&&Pt<=Ct?"\\left("+At.toTex(St)+"\right)":At.toTex(St)}),Tt=Rt[0],wt=0;wt<this.conditionals.length;wt++)Tt+=rt.latexOperators[this.conditionals[wt]]+Rt[wt+1];return Tt},bt},{isClass:!0,isNode:!0});return RelationalNode.createRelationalNode=ft,RelationalNode}var SymbolNode={},hasRequiredSymbolNode;function requireSymbolNode(){if(hasRequiredSymbolNode)return SymbolNode;hasRequiredSymbolNode=1,Object.defineProperty(SymbolNode,"__esModule",{value:!0}),SymbolNode.createSymbolNode=void 0;var et=requireString$2(),_e=requireCustoms(),tt=requireFactory(),rt=requireLatex(),nt="SymbolNode",st=["math","?Unit","Node"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.math,mt=ft.Unit,bt=ft.Node;function St(Ct){return mt?mt.isValuelessUnit(Ct):!1}function Et(Ct){if(!(this instanceof Et))throw new SyntaxError("Constructor must be called with the new operator");if(typeof Ct!="string")throw new TypeError('String expected for parameter "name"');this.name=Ct}return Et.prototype=new bt,Et.prototype.type="SymbolNode",Et.prototype.isSymbolNode=!0,Et.prototype._compile=function(Ct,Rt){var Tt=this.name;if(Rt[Tt]===!0)return function(At,Nt,Pt){return Nt[Tt]};if(Tt in Ct)return function(At,Nt,Pt){return At.has(Tt)?At.get(Tt):(0,_e.getSafeProperty)(Ct,Tt)};var wt=St(Tt);return function(At,Nt,Pt){return At.has(Tt)?At.get(Tt):wt?new mt(null,Tt):Et.onUndefinedSymbol(Tt)}},Et.prototype.forEach=function(Ct){},Et.prototype.map=function(Ct){return this.clone()},Et.onUndefinedSymbol=function(Ct){throw new Error("Undefined symbol "+Ct)},Et.prototype.clone=function(){return new Et(this.name)},Et.prototype._toString=function(Ct){return this.name},Et.prototype.toHTML=function(Ct){var Rt=(0,et.escape)(this.name);return Rt==="true"||Rt==="false"?'<span class="math-symbol math-boolean">'+Rt+"</span>":Rt==="i"?'<span class="math-symbol math-imaginary-symbol">'+Rt+"</span>":Rt==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+Rt+"</span>":Rt==="NaN"?'<span class="math-symbol math-nan-symbol">'+Rt+"</span>":Rt==="null"?'<span class="math-symbol math-null-symbol">'+Rt+"</span>":Rt==="undefined"?'<span class="math-symbol math-undefined-symbol">'+Rt+"</span>":'<span class="math-symbol">'+Rt+"</span>"},Et.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},Et.fromJSON=function(Ct){return new Et(Ct.name)},Et.prototype._toTex=function(Ct){var Rt=!1;typeof ht[this.name]>"u"&&St(this.name)&&(Rt=!0);var Tt=(0,rt.toSymbol)(this.name,Rt);return Tt[0]==="\\"?Tt:" "+Tt},Et},{isClass:!0,isNode:!0});return SymbolNode.createSymbolNode=dt,SymbolNode}var FunctionNode={},scope={},hasRequiredScope;function requireScope(){if(hasRequiredScope)return scope;hasRequiredScope=1,Object.defineProperty(scope,"__esModule",{value:!0}),scope.createSubScope=_e;var et=requireMap$2();function _e(tt){for(var rt=arguments.length,nt=new Array(rt>1?rt-1:0),st=1;st<rt;st++)nt[st-1]=arguments[st];return typeof tt.createSubScope=="function"?et.assign.apply(void 0,[tt.createSubScope()].concat(nt)):et.assign.apply(void 0,[(0,et.createEmptyMap)(),tt].concat(nt))}return scope}var hasRequiredFunctionNode;function requireFunctionNode(){if(hasRequiredFunctionNode)return FunctionNode;hasRequiredFunctionNode=1;var et=requireInteropRequireDefault();Object.defineProperty(FunctionNode,"__esModule",{value:!0}),FunctionNode.createFunctionNode=void 0;var _e=et(require_typeof()),tt=et(requireToConsumableArray()),rt=requireIs(),nt=requireString$2(),st=requireObject(),dt=requireCustoms(),ft=requireScope(),ht=requireFactory(),mt=requireLatex(),bt="FunctionNode",St=["math","Node","SymbolNode"],Et=(0,ht.factory)(bt,St,function(Ct){var Rt=Ct.math,Tt=Ct.Node,wt=Ct.SymbolNode;function At(qt,Vt){if(!(this instanceof At))throw new SyntaxError("Constructor must be called with the new operator");if(typeof qt=="string"&&(qt=new wt(qt)),!(0,rt.isNode)(qt))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(Vt)||!Vt.every(rt.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=qt,this.args=Vt||[],Object.defineProperty(this,"name",{get:(function(){return this.fn.name||""}).bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}At.prototype=new Tt,At.prototype.type="FunctionNode",At.prototype.isFunctionNode=!0;var Nt=function(Vt){return(0,nt.format)(Vt,{truncate:78})};At.prototype._compile=function(qt,Vt){if(!(this instanceof At))throw new TypeError("No valid FunctionNode");var Kt=this.args.map(function(Er){return Er._compile(qt,Vt)});if((0,rt.isSymbolNode)(this.fn)){var jt=this.fn.name;if(Vt[jt]){var tr=this.args;return function(Vr,Wr,Mr){var Nr=Wr[jt];if(typeof Nr!="function")throw new TypeError("Argument '".concat(jt,"' was not a function; received: ").concat(Nt(Nr)));if(Nr.rawArgs)return Nr(tr,qt,(0,ft.createSubScope)(Vr,Wr),Vr);var Yr=Kt.map(function(Or){return Or(Vr,Wr,Mr)});return Nr.apply(Nr,Yr)}}else{var Ut=jt in qt?(0,dt.getSafeProperty)(qt,jt):void 0,Ot=typeof Ut=="function"&&Ut.rawArgs===!0,Wt=function(Vr){var Wr;if(Vr.has(jt))Wr=Vr.get(jt);else if(jt in qt)Wr=(0,dt.getSafeProperty)(qt,jt);else return At.onUndefinedFunction(jt);if(typeof Wr=="function")return Wr;throw new TypeError("'".concat(jt,`' is not a function; its value is:
`).concat(Nt(Wr)))};if(Ot){var Bt=this.args;return function(Vr,Wr,Mr){var Nr=Wt(Vr);return Nr(Bt,qt,(0,ft.createSubScope)(Vr,Wr),Vr)}}else switch(Kt.length){case 0:return function(Vr,Wr,Mr){var Nr=Wt(Vr);return Nr()};case 1:return function(Vr,Wr,Mr){var Nr=Wt(Vr),Yr=Kt[0];return Nr(Yr(Vr,Wr,Mr))};case 2:return function(Vr,Wr,Mr){var Nr=Wt(Vr),Yr=Kt[0],Or=Kt[1];return Nr(Yr(Vr,Wr,Mr),Or(Vr,Wr,Mr))};default:return function(Vr,Wr,Mr){var Nr=Wt(Vr),Yr=Kt.map(function(Or){return Or(Vr,Wr,Mr)});return Nr.apply(void 0,(0,tt.default)(Yr))}}}}else if((0,rt.isAccessorNode)(this.fn)&&(0,rt.isIndexNode)(this.fn.index)&&this.fn.index.isObjectProperty()){var Jt=this.fn.object._compile(qt,Vt),ar=this.fn.index.getObjectProperty(),pr=this.args;return function(Vr,Wr,Mr){var Nr=Jt(Vr,Wr,Mr);(0,dt.validateSafeMethod)(Nr,ar);var Yr=Nr[ar]&&Nr[ar].rawArgs;if(Yr)return Nr[ar](pr,qt,(0,ft.createSubScope)(Vr,Wr),Vr);var Or=Kt.map(function(Ar){return Ar(Vr,Wr,Mr)});return Nr[ar].apply(Nr,Or)}}else{var cr=this.fn.toString(),gr=this.fn._compile(qt,Vt),Sr=this.args;return function(Vr,Wr,Mr){var Nr=gr(Vr,Wr,Mr);if(typeof Nr!="function")throw new TypeError("Expression '".concat(cr,"' did not evaluate to a function; value is:")+`
`.concat(Nt(Nr)));if(Nr.rawArgs)return Nr(Sr,qt,(0,ft.createSubScope)(Vr,Wr),Vr);var Yr=Kt.map(function(Or){return Or(Vr,Wr,Mr)});return Nr.apply(Nr,Yr)}}},At.prototype.forEach=function(qt){qt(this.fn,"fn",this);for(var Vt=0;Vt<this.args.length;Vt++)qt(this.args[Vt],"args["+Vt+"]",this)},At.prototype.map=function(qt){for(var Vt=this._ifNode(qt(this.fn,"fn",this)),Kt=[],jt=0;jt<this.args.length;jt++)Kt[jt]=this._ifNode(qt(this.args[jt],"args["+jt+"]",this));return new At(Vt,Kt)},At.prototype.clone=function(){return new At(this.fn,this.args.slice(0))},At.onUndefinedFunction=function(qt){throw new Error("Undefined function "+qt)};var Pt=At.prototype.toString;At.prototype.toString=function(qt){var Vt,Kt=this.fn.toString(qt);return qt&&(0,_e.default)(qt.handler)==="object"&&(0,st.hasOwnProperty)(qt.handler,Kt)&&(Vt=qt.handler[Kt](this,qt)),typeof Vt<"u"?Vt:Pt.call(this,qt)},At.prototype._toString=function(qt){var Vt=this.args.map(function(jt){return jt.toString(qt)}),Kt=(0,rt.isFunctionAssignmentNode)(this.fn)?"("+this.fn.toString(qt)+")":this.fn.toString(qt);return Kt+"("+Vt.join(", ")+")"},At.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},At.fromJSON=function(qt){return new At(qt.fn,qt.args)},At.prototype.toHTML=function(qt){var Vt=this.args.map(function(Kt){return Kt.toHTML(qt)});return'<span class="math-function">'+(0,nt.escape)(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+Vt.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};function It(qt,Vt,Kt){for(var jt="",Ut=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,Ot=0,Wt;(Wt=Ut.exec(qt))!==null;)if(jt+=qt.substring(Ot,Wt.index),Ot=Wt.index,Wt[0]==="$$")jt+="$",Ot++;else{Ot+=Wt[0].length;var Bt=Vt[Wt[1]];if(!Bt)throw new ReferenceError("Template: Property "+Wt[1]+" does not exist.");if(Wt[2]===void 0)switch((0,_e.default)(Bt)){case"string":jt+=Bt;break;case"object":if((0,rt.isNode)(Bt))jt+=Bt.toTex(Kt);else if(Array.isArray(Bt))jt+=Bt.map(function(tr,Jt){if((0,rt.isNode)(tr))return tr.toTex(Kt);throw new TypeError("Template: "+Wt[1]+"["+Jt+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+Wt[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+Wt[1]+" has to be a Node, String or array of Nodes")}else if((0,rt.isNode)(Bt[Wt[2]]&&Bt[Wt[2]]))jt+=Bt[Wt[2]].toTex(Kt);else throw new TypeError("Template: "+Wt[1]+"["+Wt[2]+"] is not a Node.")}return jt+=qt.slice(Ot),jt}var Ft=At.prototype.toTex;return At.prototype.toTex=function(qt){var Vt;return qt&&(0,_e.default)(qt.handler)==="object"&&(0,st.hasOwnProperty)(qt.handler,this.name)&&(Vt=qt.handler[this.name](this,qt)),typeof Vt<"u"?Vt:Ft.call(this,qt)},At.prototype._toTex=function(qt){var Vt=this.args.map(function(Ut){return Ut.toTex(qt)}),Kt;mt.latexFunctions[this.name]&&(Kt=mt.latexFunctions[this.name]),Rt[this.name]&&(typeof Rt[this.name].toTex=="function"||(0,_e.default)(Rt[this.name].toTex)==="object"||typeof Rt[this.name].toTex=="string")&&(Kt=Rt[this.name].toTex);var jt;switch((0,_e.default)(Kt)){case"function":jt=Kt(this,qt);break;case"string":jt=It(Kt,this,qt);break;case"object":switch((0,_e.default)(Kt[Vt.length])){case"function":jt=Kt[Vt.length](this,qt);break;case"string":jt=It(Kt[Vt.length],this,qt);break}}return typeof jt<"u"?jt:It(mt.defaultTemplate,this,qt)},At.prototype.getIdentifier=function(){return this.type+":"+this.name},At},{isClass:!0,isNode:!0});return FunctionNode.createFunctionNode=Et,FunctionNode}var parse$1={},hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse$1;hasRequiredParse=1;var et=requireInteropRequireDefault();Object.defineProperty(parse$1,"__esModule",{value:!0}),parse$1.createParse=void 0;var _e=et(require_extends()),tt=requireFactory(),rt=requireIs(),nt=requireCollection(),st=requireObject(),dt="parse",ft=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],ht=(0,tt.factory)(dt,ft,function(mt){var bt=mt.typed,St=mt.numeric,Et=mt.config,Ct=mt.AccessorNode,Rt=mt.ArrayNode,Tt=mt.AssignmentNode,wt=mt.BlockNode,At=mt.ConditionalNode,Nt=mt.ConstantNode,Pt=mt.FunctionAssignmentNode,It=mt.FunctionNode,Ft=mt.IndexNode,qt=mt.ObjectNode,Vt=mt.OperatorNode,Kt=mt.ParenthesisNode,jt=mt.RangeNode,Ut=mt.RelationalNode,Ot=mt.SymbolNode,Wt=bt(dt,{string:function(es){return Qr(es,{})},"Array | Matrix":function(es){return Bt(es,{})},"string, Object":function(es,Gs){var Ro=Gs.nodes!==void 0?Gs.nodes:{};return Qr(es,Ro)},"Array | Matrix, Object":Bt});function Bt(rn){var es=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gs=es.nodes!==void 0?es.nodes:{};return(0,nt.deepMap)(rn,function(Ro){if(typeof Ro!="string")throw new TypeError("String expected");return Qr(Ro,Gs)})}var tr={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},Jt={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},ar={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},pr={true:!0,false:!1,null:null,undefined:void 0},cr=["NaN","Infinity"];function gr(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:tr.NULL,nestingLevel:0,conditionalLevel:null}}function Sr(rn,es){return rn.expression.substr(rn.index,es)}function Er(rn){return Sr(rn,1)}function Vr(rn){rn.index++}function Wr(rn){return rn.expression.charAt(rn.index-1)}function Mr(rn){return rn.expression.charAt(rn.index+1)}function Nr(rn){for(rn.tokenType=tr.NULL,rn.token="",rn.comment="";;){if(Er(rn)==="#")for(;Er(rn)!==`
`&&Er(rn)!=="";)rn.comment+=Er(rn),Vr(rn);if(Wt.isWhitespace(Er(rn),rn.nestingLevel))Vr(rn);else break}if(Er(rn)===""){rn.tokenType=tr.DELIMITER;return}if(Er(rn)===`
`&&!rn.nestingLevel){rn.tokenType=tr.DELIMITER,rn.token=Er(rn),Vr(rn);return}var es=Er(rn),Gs=Sr(rn,2),Ro=Sr(rn,3);if(Ro.length===3&&Jt[Ro]){rn.tokenType=tr.DELIMITER,rn.token=Ro,Vr(rn),Vr(rn),Vr(rn);return}if(Gs.length===2&&Jt[Gs]){rn.tokenType=tr.DELIMITER,rn.token=Gs,Vr(rn),Vr(rn);return}if(Jt[es]){rn.tokenType=tr.DELIMITER,rn.token=es,Vr(rn);return}if(Wt.isDigitDot(es)){rn.tokenType=tr.NUMBER;var ru=Sr(rn,2);if(ru==="0b"||ru==="0o"||ru==="0x"){for(rn.token+=Er(rn),Vr(rn),rn.token+=Er(rn),Vr(rn);Wt.isHexDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);if(Er(rn)===".")for(rn.token+=".",Vr(rn);Wt.isHexDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);else if(Er(rn)==="i")for(rn.token+="i",Vr(rn);Wt.isDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);return}if(Er(rn)==="."){if(rn.token+=Er(rn),Vr(rn),!Wt.isDigit(Er(rn))){rn.tokenType=tr.DELIMITER;return}}else{for(;Wt.isDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);Wt.isDecimalMark(Er(rn),Mr(rn))&&(rn.token+=Er(rn),Vr(rn))}for(;Wt.isDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);if(Er(rn)==="E"||Er(rn)==="e"){if(Wt.isDigit(Mr(rn))||Mr(rn)==="-"||Mr(rn)==="+"){if(rn.token+=Er(rn),Vr(rn),(Er(rn)==="+"||Er(rn)==="-")&&(rn.token+=Er(rn),Vr(rn)),!Wt.isDigit(Er(rn)))throw Ps(rn,'Digit expected, got "'+Er(rn)+'"');for(;Wt.isDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);if(Wt.isDecimalMark(Er(rn),Mr(rn)))throw Ps(rn,'Digit expected, got "'+Er(rn)+'"')}else if(Mr(rn)===".")throw Vr(rn),Ps(rn,'Digit expected, got "'+Er(rn)+'"')}return}if(Wt.isAlpha(Er(rn),Wr(rn),Mr(rn))){for(;Wt.isAlpha(Er(rn),Wr(rn),Mr(rn))||Wt.isDigit(Er(rn));)rn.token+=Er(rn),Vr(rn);(0,st.hasOwnProperty)(ar,rn.token)?rn.tokenType=tr.DELIMITER:rn.tokenType=tr.SYMBOL;return}for(rn.tokenType=tr.UNKNOWN;Er(rn)!=="";)rn.token+=Er(rn),Vr(rn);throw Ps(rn,'Syntax error in part "'+rn.token+'"')}function Yr(rn){do Nr(rn);while(rn.token===`
`)}function Or(rn){rn.nestingLevel++}function Ar(rn){rn.nestingLevel--}Wt.isAlpha=function(es,Gs,Ro){return Wt.isValidLatinOrGreek(es)||Wt.isValidMathSymbol(es,Ro)||Wt.isValidMathSymbol(Gs,es)},Wt.isValidLatinOrGreek=function(es){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(es)},Wt.isValidMathSymbol=function(es,Gs){return/^[\uD835]$/.test(es)&&/^[\uDC00-\uDFFF]$/.test(Gs)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(Gs)},Wt.isWhitespace=function(es,Gs){return es===" "||es===" "||es===`
`&&Gs>0},Wt.isDecimalMark=function(es,Gs){return es==="."&&Gs!=="/"&&Gs!=="*"&&Gs!=="^"},Wt.isDigitDot=function(es){return es>="0"&&es<="9"||es==="."},Wt.isDigit=function(es){return es>="0"&&es<="9"},Wt.isHexDigit=function(es){return es>="0"&&es<="9"||es>="a"&&es<="f"||es>="A"&&es<="F"};function Qr(rn,es){var Gs=gr();(0,_e.default)(Gs,{expression:rn,extraNodes:es}),Nr(Gs);var Ro=hn(Gs);if(Gs.token!=="")throw Gs.tokenType===tr.DELIMITER?yo(Gs,"Unexpected operator "+Gs.token):Ps(Gs,'Unexpected part "'+Gs.token+'"');return Ro}function hn(rn){var es,Gs=[],Ro;for(rn.token!==""&&rn.token!==`
`&&rn.token!==";"&&(es=Sn(rn),es.comment=rn.comment);rn.token===`
`||rn.token===";";)Gs.length===0&&es&&(Ro=rn.token!==";",Gs.push({node:es,visible:Ro})),Nr(rn),rn.token!==`
`&&rn.token!==";"&&rn.token!==""&&(es=Sn(rn),es.comment=rn.comment,Ro=rn.token!==";",Gs.push({node:es,visible:Ro}));return Gs.length>0?new wt(Gs):(es||(es=new Nt(void 0),es.comment=rn.comment),es)}function Sn(rn){var es,Gs,Ro,ru,du=Kr(rn);if(rn.token==="="){if((0,rt.isSymbolNode)(du))return es=du.name,Yr(rn),Ro=Sn(rn),new Tt(new Ot(es),Ro);if((0,rt.isAccessorNode)(du))return Yr(rn),Ro=Sn(rn),new Tt(du.object,du.index,Ro);if((0,rt.isFunctionNode)(du)&&(0,rt.isSymbolNode)(du.fn)&&(ru=!0,Gs=[],es=du.name,du.args.forEach(function(Iu,Sl){(0,rt.isSymbolNode)(Iu)?Gs[Sl]=Iu.name:ru=!1}),ru))return Yr(rn),Ro=Sn(rn),new Pt(es,Gs,Ro);throw Ps(rn,"Invalid left hand side of assignment operator =")}return du}function Kr(rn){for(var es=Hn(rn);rn.token==="?";){var Gs=rn.conditionalLevel;rn.conditionalLevel=rn.nestingLevel,Yr(rn);var Ro=es,ru=Sn(rn);if(rn.token!==":")throw Ps(rn,"False part of conditional expression expected");rn.conditionalLevel=null,Yr(rn);var du=Sn(rn);es=new At(Ro,ru,du),rn.conditionalLevel=Gs}return es}function Hn(rn){for(var es=ln(rn);rn.token==="or";)Yr(rn),es=new Vt("or","or",[es,ln(rn)]);return es}function ln(rn){for(var es=kn(rn);rn.token==="xor";)Yr(rn),es=new Vt("xor","xor",[es,kn(rn)]);return es}function kn(rn){for(var es=xn(rn);rn.token==="and";)Yr(rn),es=new Vt("and","and",[es,xn(rn)]);return es}function xn(rn){for(var es=An(rn);rn.token==="|";)Yr(rn),es=new Vt("|","bitOr",[es,An(rn)]);return es}function An(rn){for(var es=rs(rn);rn.token==="^|";)Yr(rn),es=new Vt("^|","bitXor",[es,rs(rn)]);return es}function rs(rn){for(var es=qs(rn);rn.token==="&";)Yr(rn),es=new Vt("&","bitAnd",[es,qs(rn)]);return es}function qs(rn){for(var es=[Ln(rn)],Gs=[],Ro={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};(0,st.hasOwnProperty)(Ro,rn.token);){var ru={name:rn.token,fn:Ro[rn.token]};Gs.push(ru),Yr(rn),es.push(Ln(rn))}return es.length===1?es[0]:es.length===2?new Vt(Gs[0].name,Gs[0].fn,es):new Ut(Gs.map(function(du){return du.fn}),es)}function Ln(rn){var es,Gs,Ro,ru;es=Cn(rn);for(var du={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};(0,st.hasOwnProperty)(du,rn.token);)Gs=rn.token,Ro=du[Gs],Yr(rn),ru=[es,Cn(rn)],es=new Vt(Gs,Ro,ru);return es}function Cn(rn){var es,Gs,Ro,ru;es=Nn(rn);for(var du={to:"to",in:"to"};(0,st.hasOwnProperty)(du,rn.token);)Gs=rn.token,Ro=du[Gs],Yr(rn),Gs==="in"&&rn.token===""?es=new Vt("*","multiply",[es,new Ot("in")],!0):(ru=[es,Nn(rn)],es=new Vt(Gs,Ro,ru));return es}function Nn(rn){var es,Gs=[];if(rn.token===":"?es=new Nt(1):es=Gr(rn),rn.token===":"&&rn.conditionalLevel!==rn.nestingLevel){for(Gs.push(es);rn.token===":"&&Gs.length<3;)Yr(rn),rn.token===")"||rn.token==="]"||rn.token===","||rn.token===""?Gs.push(new Ot("end")):Gs.push(Gr(rn));Gs.length===3?es=new jt(Gs[0],Gs[2],Gs[1]):es=new jt(Gs[0],Gs[1])}return es}function Gr(rn){var es,Gs,Ro,ru;es=tn(rn);for(var du={"+":"add","-":"subtract"};(0,st.hasOwnProperty)(du,rn.token);){Gs=rn.token,Ro=du[Gs],Yr(rn);var Iu=tn(rn);Iu.isPercentage?ru=[es,new Vt("*","multiply",[es,Iu])]:ru=[es,Iu],es=new Vt(Gs,Ro,ru)}return es}function tn(rn){var es,Gs,Ro,ru;es=dn(rn),Gs=es;for(var du={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};(0,st.hasOwnProperty)(du,rn.token);)Ro=rn.token,ru=du[Ro],Yr(rn),Gs=dn(rn),es=new Vt(Ro,ru,[es,Gs]);return es}function dn(rn){var es,Gs;for(es=Rn(rn),Gs=es;rn.tokenType===tr.SYMBOL||rn.token==="in"&&(0,rt.isConstantNode)(es)||rn.tokenType===tr.NUMBER&&!(0,rt.isConstantNode)(Gs)&&(!(0,rt.isOperatorNode)(Gs)||Gs.op==="!")||rn.token==="(";)Gs=Rn(rn),es=new Vt("*","multiply",[es,Gs],!0);return es}function Rn(rn){for(var es=wn(rn),Gs=es,Ro=[];rn.token==="/"&&(0,rt.isConstantNode)(Gs);)if(Ro.push((0,_e.default)({},rn)),Yr(rn),rn.tokenType===tr.NUMBER)if(Ro.push((0,_e.default)({},rn)),Yr(rn),rn.tokenType===tr.SYMBOL||rn.token==="(")(0,_e.default)(rn,Ro.pop()),Ro.pop(),Gs=wn(rn),es=new Vt("/","divide",[es,Gs]);else{Ro.pop(),(0,_e.default)(rn,Ro.pop());break}else{(0,_e.default)(rn,Ro.pop());break}return es}function wn(rn){var es,Gs,Ro,ru;es=Un(rn);for(var du={"%":"mod",mod:"mod"};(0,st.hasOwnProperty)(du,rn.token);)Gs=rn.token,Ro=du[Gs],Yr(rn),Gs==="%"&&rn.tokenType===tr.DELIMITER&&rn.token!=="("?es=new Vt("/","divide",[es,new Nt(100)],!1,!0):(ru=[es,Un(rn)],es=new Vt(Gs,Ro,ru));return es}function Un(rn){var es,Gs,Ro,ru={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return(0,st.hasOwnProperty)(ru,rn.token)?(Ro=ru[rn.token],es=rn.token,Yr(rn),Gs=[Un(rn)],new Vt(es,Ro,Gs)):Zn(rn)}function Zn(rn){var es,Gs,Ro,ru;return es=pn(rn),(rn.token==="^"||rn.token===".^")&&(Gs=rn.token,Ro=Gs==="^"?"pow":"dotPow",Yr(rn),ru=[es,Un(rn)],es=new Vt(Gs,Ro,ru)),es}function pn(rn){var es,Gs,Ro,ru;es=Dn(rn);for(var du={"!":"factorial","'":"ctranspose"};(0,st.hasOwnProperty)(du,rn.token);)Gs=rn.token,Ro=du[Gs],Nr(rn),ru=[es],es=new Vt(Gs,Ro,ru),es=_a(rn,es);return es}function Dn(rn){var es=[];if(rn.tokenType===tr.SYMBOL&&(0,st.hasOwnProperty)(rn.extraNodes,rn.token)){var Gs=rn.extraNodes[rn.token];if(Nr(rn),rn.token==="("){if(es=[],Or(rn),Nr(rn),rn.token!==")")for(es.push(Sn(rn));rn.token===",";)Nr(rn),es.push(Sn(rn));if(rn.token!==")")throw Ps(rn,"Parenthesis ) expected");Ar(rn),Nr(rn)}return new Gs(es)}return qn(rn)}function qn(rn){var es,Gs;return rn.tokenType===tr.SYMBOL||rn.tokenType===tr.DELIMITER&&rn.token in ar?(Gs=rn.token,Nr(rn),(0,st.hasOwnProperty)(pr,Gs)?es=new Nt(pr[Gs]):cr.indexOf(Gs)!==-1?es=new Nt(St(Gs,"number")):es=new Ot(Gs),es=_a(rn,es),es):Vn(rn)}function _a(rn,es,Gs){for(var Ro;rn.token==="("||rn.token==="["||rn.token===".";)if(Ro=[],rn.token==="(")if((0,rt.isSymbolNode)(es)||(0,rt.isAccessorNode)(es)){if(Or(rn),Nr(rn),rn.token!==")")for(Ro.push(Sn(rn));rn.token===",";)Nr(rn),Ro.push(Sn(rn));if(rn.token!==")")throw Ps(rn,"Parenthesis ) expected");Ar(rn),Nr(rn),es=new It(es,Ro)}else return es;else if(rn.token==="["){if(Or(rn),Nr(rn),rn.token!=="]")for(Ro.push(Sn(rn));rn.token===",";)Nr(rn),Ro.push(Sn(rn));if(rn.token!=="]")throw Ps(rn,"Parenthesis ] expected");Ar(rn),Nr(rn),es=new Ct(es,new Ft(Ro))}else{if(Nr(rn),rn.tokenType!==tr.SYMBOL)throw Ps(rn,"Property name expected after dot");Ro.push(new Nt(rn.token)),Nr(rn);var ru=!0;es=new Ct(es,new Ft(Ro,ru))}return es}function Vn(rn){var es,Gs;return rn.token==='"'?(Gs=bs(rn),es=new Nt(Gs),es=_a(rn,es),es):Is(rn)}function bs(rn){for(var es="";Er(rn)!==""&&Er(rn)!=='"';)Er(rn)==="\\"&&(es+=Er(rn),Vr(rn)),es+=Er(rn),Vr(rn);if(Nr(rn),rn.token!=='"')throw Ps(rn,'End of string " expected');return Nr(rn),JSON.parse('"'+es+'"')}function Is(rn){var es,Gs;return rn.token==="'"?(Gs=uo(rn),es=new Nt(Gs),es=_a(rn,es),es):Rs(rn)}function uo(rn){for(var es="";Er(rn)!==""&&Er(rn)!=="'";)Er(rn)==="\\"&&(es+=Er(rn),Vr(rn)),es+=Er(rn),Vr(rn);if(Nr(rn),rn.token!=="'")throw Ps(rn,"End of string ' expected");return Nr(rn),JSON.parse('"'+es+'"')}function Rs(rn){var es,Gs,Ro,ru;if(rn.token==="["){if(Or(rn),Nr(rn),rn.token!=="]"){var du=io(rn);if(rn.token===";"){for(Ro=1,Gs=[du];rn.token===";";)Nr(rn),Gs[Ro]=io(rn),Ro++;if(rn.token!=="]")throw Ps(rn,"End of matrix ] expected");Ar(rn),Nr(rn),ru=Gs[0].items.length;for(var Iu=1;Iu<Ro;Iu++)if(Gs[Iu].items.length!==ru)throw yo(rn,"Column dimensions mismatch ("+Gs[Iu].items.length+" !== "+ru+")");es=new Rt(Gs)}else{if(rn.token!=="]")throw Ps(rn,"End of matrix ] expected");Ar(rn),Nr(rn),es=du}}else Ar(rn),Nr(rn),es=new Rt([]);return _a(rn,es)}return vo(rn)}function io(rn){for(var es=[Sn(rn)],Gs=1;rn.token===",";)Nr(rn),es[Gs]=Sn(rn),Gs++;return new Rt(es)}function vo(rn){if(rn.token==="{"){Or(rn);var es,Gs={};do if(Nr(rn),rn.token!=="}"){if(rn.token==='"')es=bs(rn);else if(rn.token==="'")es=uo(rn);else if(rn.tokenType===tr.SYMBOL||rn.tokenType===tr.DELIMITER&&rn.token in ar)es=rn.token,Nr(rn);else throw Ps(rn,"Symbol or string expected as object key");if(rn.token!==":")throw Ps(rn,"Colon : expected after object key");Nr(rn),Gs[es]=Sn(rn)}while(rn.token===",");if(rn.token!=="}")throw Ps(rn,"Comma , or bracket } expected after object value");Ar(rn),Nr(rn);var Ro=new qt(Gs);return Ro=_a(rn,Ro),Ro}return Bo(rn)}function Bo(rn){var es;return rn.tokenType===tr.NUMBER?(es=rn.token,Nr(rn),new Nt(St(es,Et.number))):En(rn)}function En(rn){var es;if(rn.token==="("){if(Or(rn),Nr(rn),es=Sn(rn),rn.token!==")")throw Ps(rn,"Parenthesis ) expected");return Ar(rn),Nr(rn),es=new Kt(es),es=_a(rn,es),es}return In(rn)}function In(rn){throw rn.token===""?Ps(rn,"Unexpected end of expression"):Ps(rn,"Value expected")}function ds(rn){return rn.index-rn.token.length+1}function Ps(rn,es){var Gs=ds(rn),Ro=new SyntaxError(es+" (char "+Gs+")");return Ro.char=Gs,Ro}function yo(rn,es){var Gs=ds(rn),Ro=new SyntaxError(es+" (char "+Gs+")");return Ro.char=Gs,Ro}return Wt});return parse$1.createParse=ht,parse$1}var compile={},hasRequiredCompile;function requireCompile(){if(hasRequiredCompile)return compile;hasRequiredCompile=1,Object.defineProperty(compile,"__esModule",{value:!0}),compile.createCompile=void 0;var et=requireCollection(),_e=requireFactory(),tt="compile",rt=["typed","parse"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.parse;return dt(tt,{string:function(mt){return ft(mt).compile()},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,function(bt){return ft(bt).compile()})}})});return compile.createCompile=nt,compile}var evaluate$1={},hasRequiredEvaluate$1;function requireEvaluate$1(){if(hasRequiredEvaluate$1)return evaluate$1;hasRequiredEvaluate$1=1,Object.defineProperty(evaluate$1,"__esModule",{value:!0}),evaluate$1.createEvaluate=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireMap$2(),rt="evaluate",nt=["typed","parse"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.parse;return ft(rt,{string:function(bt){var St=(0,tt.createEmptyMap)();return ht(bt).compile().evaluate(St)},"string, Map | Object":function(bt,St){return ht(bt).compile().evaluate(St)},"Array | Matrix":function(bt){var St=(0,tt.createEmptyMap)();return(0,et.deepMap)(bt,function(Et){return ht(Et).compile().evaluate(St)})},"Array | Matrix, Map | Object":function(bt,St){return(0,et.deepMap)(bt,function(Et){return ht(Et).compile().evaluate(St)})}})});return evaluate$1.createEvaluate=st,evaluate$1}var Parser$1={},hasRequiredParser$1;function requireParser$1(){if(hasRequiredParser$1)return Parser$1;hasRequiredParser$1=1,Object.defineProperty(Parser$1,"__esModule",{value:!0}),Parser$1.createParserClass=void 0;var et=requireFactory(),_e=requireMap$2(),tt="Parser",rt=["evaluate"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.evaluate;function ft(){if(!(this instanceof ft))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:(0,_e.createEmptyMap)(),writable:!1})}return ft.prototype.type="Parser",ft.prototype.isParser=!0,ft.prototype.evaluate=function(ht){return dt(ht,this.scope)},ft.prototype.get=function(ht){if(this.scope.has(ht))return this.scope.get(ht)},ft.prototype.getAll=function(){return(0,_e.toObject)(this.scope)},ft.prototype.getAllAsMap=function(){return this.scope},ft.prototype.set=function(ht,mt){return this.scope.set(ht,mt),mt},ft.prototype.remove=function(ht){this.scope.delete(ht)},ft.prototype.clear=function(){this.scope.clear()},ft},{isClass:!0});return Parser$1.createParserClass=nt,Parser$1}var parser={},hasRequiredParser;function requireParser(){if(hasRequiredParser)return parser;hasRequiredParser=1,Object.defineProperty(parser,"__esModule",{value:!0}),parser.createParser=void 0;var et=requireFactory(),_e="parser",tt=["typed","Parser"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.Parser;return st(_e,{"":function(){return new dt}})});return parser.createParser=rt,parser}var lup$1={},hasRequiredLup$1;function requireLup$1(){if(hasRequiredLup$1)return lup$1;hasRequiredLup$1=1,Object.defineProperty(lup$1,"__esModule",{value:!0}),lup$1.createLup=void 0;var et=requireObject(),_e=requireFactory(),tt="lup",rt=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.matrix,ht=st.abs,mt=st.addScalar,bt=st.divideScalar,St=st.multiplyScalar,Et=st.subtract,Ct=st.larger,Rt=st.equalScalar,Tt=st.unaryMinus,wt=st.DenseMatrix,At=st.SparseMatrix,Nt=st.Spa;return dt(tt,{DenseMatrix:function(qt){return Pt(qt)},SparseMatrix:function(qt){return It(qt)},Array:function(qt){var Vt=ft(qt),Kt=Pt(Vt);return{L:Kt.L.valueOf(),U:Kt.U.valueOf(),p:Kt.p}}});function Pt(Ft){var qt=Ft._size[0],Vt=Ft._size[1],Kt=Math.min(qt,Vt),jt=(0,et.clone)(Ft._data),Ut=[],Ot=[qt,Kt],Wt=[],Bt=[Kt,Vt],tr,Jt,ar,pr=[];for(tr=0;tr<qt;tr++)pr[tr]=tr;for(Jt=0;Jt<Vt;Jt++){if(Jt>0)for(tr=0;tr<qt;tr++){var cr=Math.min(tr,Jt),gr=0;for(ar=0;ar<cr;ar++)gr=mt(gr,St(jt[tr][ar],jt[ar][Jt]));jt[tr][Jt]=Et(jt[tr][Jt],gr)}var Sr=Jt,Er=0,Vr=0;for(tr=Jt;tr<qt;tr++){var Wr=jt[tr][Jt],Mr=ht(Wr);Ct(Mr,Er)&&(Sr=tr,Er=Mr,Vr=Wr)}if(Jt!==Sr&&(pr[Jt]=[pr[Sr],pr[Sr]=pr[Jt]][0],wt._swapRows(Jt,Sr,jt)),Jt<qt)for(tr=Jt+1;tr<qt;tr++){var Nr=jt[tr][Jt];Rt(Nr,0)||(jt[tr][Jt]=bt(jt[tr][Jt],Vr))}}for(Jt=0;Jt<Vt;Jt++)for(tr=0;tr<qt;tr++){if(Jt===0&&(tr<Vt&&(Wt[tr]=[]),Ut[tr]=[]),tr<Jt){tr<Vt&&(Wt[tr][Jt]=jt[tr][Jt]),Jt<qt&&(Ut[tr][Jt]=0);continue}if(tr===Jt){tr<Vt&&(Wt[tr][Jt]=jt[tr][Jt]),Jt<qt&&(Ut[tr][Jt]=1);continue}tr<Vt&&(Wt[tr][Jt]=0),Jt<qt&&(Ut[tr][Jt]=jt[tr][Jt])}var Yr=new wt({data:Ut,size:Ot}),Or=new wt({data:Wt,size:Bt}),Ar=[];for(tr=0,Kt=pr.length;tr<Kt;tr++)Ar[pr[tr]]=tr;return{L:Yr,U:Or,p:Ar,toString:function(){return"L: "+this.L.toString()+`
U: `+this.U.toString()+`
P: `+this.p}}}function It(Ft){var qt=Ft._size[0],Vt=Ft._size[1],Kt=Math.min(qt,Vt),jt=Ft._values,Ut=Ft._index,Ot=Ft._ptr,Wt=[],Bt=[],tr=[],Jt=[qt,Kt],ar=[],pr=[],cr=[],gr=[Kt,Vt],Sr,Er,Vr,Wr=[],Mr=[];for(Sr=0;Sr<qt;Sr++)Wr[Sr]=Sr,Mr[Sr]=Sr;var Nr=function(Ar,Qr){var hn=Mr[Ar],Sn=Mr[Qr];Wr[hn]=Qr,Wr[Sn]=Ar,Mr[Ar]=Sn,Mr[Qr]=hn},Yr=function(){var Ar=new Nt;Er<qt&&(tr.push(Wt.length),Wt.push(1),Bt.push(Er)),cr.push(ar.length);var Qr=Ot[Er],hn=Ot[Er+1];for(Vr=Qr;Vr<hn;Vr++)Sr=Ut[Vr],Ar.set(Wr[Sr],jt[Vr]);Er>0&&Ar.forEach(0,Er-1,function(ln,kn){At._forEachRow(ln,Wt,Bt,tr,function(xn,An){xn>ln&&Ar.accumulate(xn,Tt(St(An,kn)))})});var Sn=Er,Kr=Ar.get(Er),Hn=ht(Kr);Ar.forEach(Er+1,qt-1,function(ln,kn){var xn=ht(kn);Ct(xn,Hn)&&(Sn=ln,Hn=xn,Kr=kn)}),Er!==Sn&&(At._swapRows(Er,Sn,Jt[1],Wt,Bt,tr),At._swapRows(Er,Sn,gr[1],ar,pr,cr),Ar.swap(Er,Sn),Nr(Er,Sn)),Ar.forEach(0,qt-1,function(ln,kn){ln<=Er?(ar.push(kn),pr.push(ln)):(kn=bt(kn,Kr),Rt(kn,0)||(Wt.push(kn),Bt.push(ln)))})};for(Er=0;Er<Vt;Er++)Yr();return cr.push(ar.length),tr.push(Wt.length),{L:new At({values:Wt,index:Bt,ptr:tr,size:Jt}),U:new At({values:ar,index:pr,ptr:cr,size:gr}),p:Wr,toString:function(){return"L: "+this.L.toString()+`
U: `+this.U.toString()+`
P: `+this.p}}}});return lup$1.createLup=nt,lup$1}var qr$1={},hasRequiredQr$1;function requireQr$1(){if(hasRequiredQr$1)return qr$1;hasRequiredQr$1=1;var et=requireInteropRequireDefault();Object.defineProperty(qr$1,"__esModule",{value:!0}),qr$1.createQr=void 0;var _e=et(require_extends()),tt=requireFactory(),rt="qr",nt=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtract","complex"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix,mt=dt.zeros,bt=dt.identity,St=dt.isZero,Et=dt.equal,Ct=dt.sign,Rt=dt.sqrt,Tt=dt.conj,wt=dt.unaryMinus,At=dt.addScalar,Nt=dt.divideScalar,Pt=dt.multiplyScalar,It=dt.subtract,Ft=dt.complex;return(0,_e.default)(ft(rt,{DenseMatrix:function(Ut){return Vt(Ut)},SparseMatrix:function(Ut){return Kt()},Array:function(Ut){var Ot=ht(Ut),Wt=Vt(Ot);return{Q:Wt.Q.valueOf(),R:Wt.R.valueOf()}}}),{_denseQRimpl:qt});function qt(jt){var Ut=jt._size[0],Ot=jt._size[1],Wt=bt([Ut],"dense"),Bt=Wt._data,tr=jt.clone(),Jt=tr._data,ar,pr,cr,gr=mt([Ut],"");for(cr=0;cr<Math.min(Ot,Ut);++cr){var Sr=Jt[cr][cr],Er=wt(Et(Sr,0)?1:Ct(Sr)),Vr=Tt(Er),Wr=0;for(ar=cr;ar<Ut;ar++)Wr=At(Wr,Pt(Jt[ar][cr],Tt(Jt[ar][cr])));var Mr=Pt(Er,Rt(Wr));if(!St(Mr)){var Nr=It(Sr,Mr);for(gr[cr]=1,ar=cr+1;ar<Ut;ar++)gr[ar]=Nt(Jt[ar][cr],Nr);var Yr=wt(Tt(Nt(Nr,Mr))),Or=void 0;for(pr=cr;pr<Ot;pr++){for(Or=0,ar=cr;ar<Ut;ar++)Or=At(Or,Pt(Tt(gr[ar]),Jt[ar][pr]));for(Or=Pt(Or,Yr),ar=cr;ar<Ut;ar++)Jt[ar][pr]=Pt(It(Jt[ar][pr],Pt(gr[ar],Or)),Vr)}for(ar=0;ar<Ut;ar++){for(Or=0,pr=cr;pr<Ut;pr++)Or=At(Or,Pt(Bt[ar][pr],gr[pr]));for(Or=Pt(Or,Yr),pr=cr;pr<Ut;++pr)Bt[ar][pr]=Nt(It(Bt[ar][pr],Pt(Or,Tt(gr[pr]))),Vr)}}}return{Q:Wt,R:tr,toString:function(){return"Q: "+this.Q.toString()+`
R: `+this.R.toString()}}}function Vt(jt){var Ut=qt(jt),Ot=Ut.R._data;if(jt._data.length>0)for(var Wt=Ot[0][0].type==="Complex"?Ft(0):0,Bt=0;Bt<Ot.length;++Bt)for(var tr=0;tr<Bt&&tr<(Ot[0]||[]).length;++tr)Ot[Bt][tr]=Wt;return Ut}function Kt(jt){throw new Error("qr not implemented for sparse matrices yet")}});return qr$1.createQr=st,qr$1}var slu$1={},csSqr={},csPermute={},hasRequiredCsPermute;function requireCsPermute(){if(hasRequiredCsPermute)return csPermute;hasRequiredCsPermute=1,Object.defineProperty(csPermute,"__esModule",{value:!0}),csPermute.csPermute=et;function et(_e,tt,rt,nt){for(var st=_e._values,dt=_e._index,ft=_e._ptr,ht=_e._size,mt=_e._datatype,bt=ht[0],St=ht[1],Et=nt&&_e._values?[]:null,Ct=[],Rt=[],Tt=0,wt=0;wt<St;wt++){Rt[wt]=Tt;for(var At=rt?rt[wt]:wt,Nt=ft[At],Pt=ft[At+1],It=Nt;It<Pt;It++){var Ft=tt?tt[dt[It]]:dt[It];Ct[Tt]=Ft,Et&&(Et[Tt]=st[It]),Tt++}}return Rt[St]=Tt,_e.createSparseMatrix({values:Et,index:Ct,ptr:Rt,size:[bt,St],datatype:mt})}return csPermute}var csPost={},csTdfs={},hasRequiredCsTdfs;function requireCsTdfs(){if(hasRequiredCsTdfs)return csTdfs;hasRequiredCsTdfs=1,Object.defineProperty(csTdfs,"__esModule",{value:!0}),csTdfs.csTdfs=et;function et(_e,tt,rt,nt,st,dt,ft){var ht=0;for(rt[ft]=_e;ht>=0;){var mt=rt[ft+ht],bt=rt[nt+mt];bt===-1?(ht--,dt[tt++]=mt):(rt[nt+mt]=rt[st+bt],++ht,rt[ft+ht]=bt)}return tt}return csTdfs}var hasRequiredCsPost;function requireCsPost(){if(hasRequiredCsPost)return csPost;hasRequiredCsPost=1,Object.defineProperty(csPost,"__esModule",{value:!0}),csPost.csPost=_e;var et=requireCsTdfs();function _e(tt,rt){if(!tt)return null;var nt=0,st,dt=[],ft=[],ht=0,mt=rt,bt=2*rt;for(st=0;st<rt;st++)ft[ht+st]=-1;for(st=rt-1;st>=0;st--)tt[st]!==-1&&(ft[mt+st]=ft[ht+tt[st]],ft[ht+tt[st]]=st);for(st=0;st<rt;st++)tt[st]===-1&&(nt=(0,et.csTdfs)(st,nt,ft,ht,mt,dt,bt));return dt}return csPost}var csEtree={},hasRequiredCsEtree;function requireCsEtree(){if(hasRequiredCsEtree)return csEtree;hasRequiredCsEtree=1,Object.defineProperty(csEtree,"__esModule",{value:!0}),csEtree.csEtree=et;function et(_e,tt){if(!_e)return null;var rt=_e._index,nt=_e._ptr,st=_e._size,dt=st[0],ft=st[1],ht=[],mt=[],bt=0,St=ft,Et,Ct;if(tt)for(Et=0;Et<dt;Et++)mt[St+Et]=-1;for(var Rt=0;Rt<ft;Rt++){ht[Rt]=-1,mt[bt+Rt]=-1;for(var Tt=nt[Rt],wt=nt[Rt+1],At=Tt;At<wt;At++){var Nt=rt[At];for(Et=tt?mt[St+Nt]:Nt;Et!==-1&&Et<Rt;Et=Ct)Ct=mt[bt+Et],mt[bt+Et]=Rt,Ct===-1&&(ht[Et]=Rt);tt&&(mt[St+Nt]=Rt)}}return ht}return csEtree}var csAmd={},csFkeep={},hasRequiredCsFkeep;function requireCsFkeep(){if(hasRequiredCsFkeep)return csFkeep;hasRequiredCsFkeep=1,Object.defineProperty(csFkeep,"__esModule",{value:!0}),csFkeep.csFkeep=et;function et(_e,tt,rt){for(var nt=_e._values,st=_e._index,dt=_e._ptr,ft=_e._size,ht=ft[1],mt=0,bt=0;bt<ht;bt++){var St=dt[bt];for(dt[bt]=mt;St<dt[bt+1];St++)tt(st[St],bt,nt?nt[St]:1,rt)&&(st[mt]=st[St],nt&&(nt[mt]=nt[St]),mt++)}return dt[ht]=mt,st.splice(mt,st.length-mt),nt&&nt.splice(mt,nt.length-mt),mt}return csFkeep}var csFlip={},hasRequiredCsFlip;function requireCsFlip(){if(hasRequiredCsFlip)return csFlip;hasRequiredCsFlip=1,Object.defineProperty(csFlip,"__esModule",{value:!0}),csFlip.csFlip=et;function et(_e){return-_e-2}return csFlip}var hasRequiredCsAmd;function requireCsAmd(){if(hasRequiredCsAmd)return csAmd;hasRequiredCsAmd=1,Object.defineProperty(csAmd,"__esModule",{value:!0}),csAmd.createCsAmd=void 0;var et=requireFactory(),_e=requireCsFkeep(),tt=requireCsFlip(),rt=requireCsTdfs(),nt="csAmd",st=["add","multiply","transpose"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.add,mt=ft.multiply,bt=ft.transpose;return function(At,Nt){if(!Nt||At<=0||At>3)return null;var Pt=Nt._size,It=Pt[0],Ft=Pt[1],qt=0,Vt=Math.max(16,10*Math.sqrt(Ft));Vt=Math.min(Ft-2,Vt);var Kt=St(At,Nt,It,Ft,Vt);(0,_e.csFkeep)(Kt,Tt,null);for(var jt=Kt._index,Ut=Kt._ptr,Ot=Ut[Ft],Wt=[],Bt=[],tr=0,Jt=Ft+1,ar=2*(Ft+1),pr=3*(Ft+1),cr=4*(Ft+1),gr=5*(Ft+1),Sr=6*(Ft+1),Er=7*(Ft+1),Vr=Wt,Wr=Et(Ft,Ut,Bt,tr,pr,Vr,ar,Er,Jt,Sr,cr,gr),Mr=Ct(Ft,Ut,Bt,gr,cr,Sr,Vt,Jt,pr,Vr,ar),Nr=0,Yr,Or,Ar,Qr,hn,Sn,Kr,Hn,ln,kn,xn,An,rs,qs,Ln,Cn;Mr<Ft;){for(Ar=-1;Nr<Ft&&(Ar=Bt[pr+Nr])===-1;Nr++);Bt[ar+Ar]!==-1&&(Vr[Bt[ar+Ar]]=-1),Bt[pr+Nr]=Bt[ar+Ar];var Nn=Bt[cr+Ar],Gr=Bt[Jt+Ar];Mr+=Gr;var tn=0;Bt[Jt+Ar]=-Gr;var dn=Ut[Ar],Rn=Nn===0?dn:Ot,wn=Rn;for(Qr=1;Qr<=Nn+1;Qr++){for(Qr>Nn?(Sn=Ar,Kr=dn,Hn=Bt[tr+Ar]-Nn):(Sn=jt[dn++],Kr=Ut[Sn],Hn=Bt[tr+Sn]),hn=1;hn<=Hn;hn++)Yr=jt[Kr++],!((ln=Bt[Jt+Yr])<=0)&&(tn+=ln,Bt[Jt+Yr]=-ln,jt[wn++]=Yr,Bt[ar+Yr]!==-1&&(Vr[Bt[ar+Yr]]=Vr[Yr]),Vr[Yr]!==-1?Bt[ar+Vr[Yr]]=Bt[ar+Yr]:Bt[pr+Bt[gr+Yr]]=Bt[ar+Yr]);Sn!==Ar&&(Ut[Sn]=(0,tt.csFlip)(Ar),Bt[Sr+Sn]=0)}for(Nn!==0&&(Ot=wn),Bt[gr+Ar]=tn,Ut[Ar]=Rn,Bt[tr+Ar]=wn-Rn,Bt[cr+Ar]=-2,Wr=Rt(Wr,qt,Bt,Sr,Ft),kn=Rn;kn<wn;kn++)if(Yr=jt[kn],!((xn=Bt[cr+Yr])<=0)){ln=-Bt[Jt+Yr];var Un=Wr-ln;for(dn=Ut[Yr],An=Ut[Yr]+xn-1;dn<=An;dn++)Sn=jt[dn],Bt[Sr+Sn]>=Wr?Bt[Sr+Sn]-=ln:Bt[Sr+Sn]!==0&&(Bt[Sr+Sn]=Bt[gr+Sn]+Un)}for(kn=Rn;kn<wn;kn++){for(Yr=jt[kn],An=Ut[Yr],rs=An+Bt[cr+Yr]-1,qs=An,Ln=0,Cn=0,dn=An;dn<=rs;dn++)if(Sn=jt[dn],Bt[Sr+Sn]!==0){var Zn=Bt[Sr+Sn]-Wr;Zn>0?(Cn+=Zn,jt[qs++]=Sn,Ln+=Sn):(Ut[Sn]=(0,tt.csFlip)(Ar),Bt[Sr+Sn]=0)}Bt[cr+Yr]=qs-An+1;var pn=qs,Dn=An+Bt[tr+Yr];for(dn=rs+1;dn<Dn;dn++){Or=jt[dn];var qn=Bt[Jt+Or];qn<=0||(Cn+=qn,jt[qs++]=Or,Ln+=Or)}Cn===0?(Ut[Yr]=(0,tt.csFlip)(Ar),ln=-Bt[Jt+Yr],tn-=ln,Gr+=ln,Mr+=ln,Bt[Jt+Yr]=0,Bt[cr+Yr]=-1):(Bt[gr+Yr]=Math.min(Bt[gr+Yr],Cn),jt[qs]=jt[pn],jt[pn]=jt[An],jt[An]=Ar,Bt[tr+Yr]=qs-An+1,Ln=(Ln<0?-Ln:Ln)%Ft,Bt[ar+Yr]=Bt[Er+Ln],Bt[Er+Ln]=Yr,Vr[Yr]=Ln)}for(Bt[gr+Ar]=tn,qt=Math.max(qt,tn),Wr=Rt(Wr+qt,qt,Bt,Sr,Ft),kn=Rn;kn<wn;kn++)if(Yr=jt[kn],!(Bt[Jt+Yr]>=0))for(Ln=Vr[Yr],Yr=Bt[Er+Ln],Bt[Er+Ln]=-1;Yr!==-1&&Bt[ar+Yr]!==-1;Yr=Bt[ar+Yr],Wr++){for(Hn=Bt[tr+Yr],xn=Bt[cr+Yr],dn=Ut[Yr]+1;dn<=Ut[Yr]+Hn-1;dn++)Bt[Sr+jt[dn]]=Wr;var _a=Yr;for(Or=Bt[ar+Yr];Or!==-1;){var Vn=Bt[tr+Or]===Hn&&Bt[cr+Or]===xn;for(dn=Ut[Or]+1;Vn&&dn<=Ut[Or]+Hn-1;dn++)Bt[Sr+jt[dn]]!==Wr&&(Vn=0);Vn?(Ut[Or]=(0,tt.csFlip)(Yr),Bt[Jt+Yr]+=Bt[Jt+Or],Bt[Jt+Or]=0,Bt[cr+Or]=-1,Or=Bt[ar+Or],Bt[ar+_a]=Or):(_a=Or,Or=Bt[ar+Or])}}for(dn=Rn,kn=Rn;kn<wn;kn++)Yr=jt[kn],!((ln=-Bt[Jt+Yr])<=0)&&(Bt[Jt+Yr]=ln,Cn=Bt[gr+Yr]+tn-ln,Cn=Math.min(Cn,Ft-Mr-ln),Bt[pr+Cn]!==-1&&(Vr[Bt[pr+Cn]]=Yr),Bt[ar+Yr]=Bt[pr+Cn],Vr[Yr]=-1,Bt[pr+Cn]=Yr,Nr=Math.min(Nr,Cn),Bt[gr+Yr]=Cn,jt[dn++]=Yr);Bt[Jt+Ar]=Gr,(Bt[tr+Ar]=dn-Rn)===0&&(Ut[Ar]=-1,Bt[Sr+Ar]=0),Nn!==0&&(Ot=dn)}for(Yr=0;Yr<Ft;Yr++)Ut[Yr]=(0,tt.csFlip)(Ut[Yr]);for(Or=0;Or<=Ft;Or++)Bt[pr+Or]=-1;for(Or=Ft;Or>=0;Or--)Bt[Jt+Or]>0||(Bt[ar+Or]=Bt[pr+Ut[Or]],Bt[pr+Ut[Or]]=Or);for(Sn=Ft;Sn>=0;Sn--)Bt[Jt+Sn]<=0||Ut[Sn]!==-1&&(Bt[ar+Sn]=Bt[pr+Ut[Sn]],Bt[pr+Ut[Sn]]=Sn);for(Ar=0,Yr=0;Yr<=Ft;Yr++)Ut[Yr]===-1&&(Ar=(0,rt.csTdfs)(Yr,Ar,Bt,pr,ar,Wt,Sr));return Wt.splice(Wt.length-1,1),Wt};function St(wt,At,Nt,Pt,It){var Ft=bt(At);if(wt===1&&Pt===Nt)return ht(At,Ft);if(wt===2){for(var qt=Ft._index,Vt=Ft._ptr,Kt=0,jt=0;jt<Nt;jt++){var Ut=Vt[jt];if(Vt[jt]=Kt,!(Vt[jt+1]-Ut>It))for(var Ot=Vt[jt+1];Ut<Ot;Ut++)qt[Kt++]=qt[Ut]}return Vt[Nt]=Kt,At=bt(Ft),mt(Ft,At)}return mt(Ft,At)}function Et(wt,At,Nt,Pt,It,Ft,qt,Vt,Kt,jt,Ut,Ot){for(var Wt=0;Wt<wt;Wt++)Nt[Pt+Wt]=At[Wt+1]-At[Wt];Nt[Pt+wt]=0;for(var Bt=0;Bt<=wt;Bt++)Nt[It+Bt]=-1,Ft[Bt]=-1,Nt[qt+Bt]=-1,Nt[Vt+Bt]=-1,Nt[Kt+Bt]=1,Nt[jt+Bt]=1,Nt[Ut+Bt]=0,Nt[Ot+Bt]=Nt[Pt+Bt];var tr=Rt(0,0,Nt,jt,wt);return Nt[Ut+wt]=-2,At[wt]=-1,Nt[jt+wt]=0,tr}function Ct(wt,At,Nt,Pt,It,Ft,qt,Vt,Kt,jt,Ut){for(var Ot=0,Wt=0;Wt<wt;Wt++){var Bt=Nt[Pt+Wt];if(Bt===0)Nt[It+Wt]=-2,Ot++,At[Wt]=-1,Nt[Ft+Wt]=0;else if(Bt>qt)Nt[Vt+Wt]=0,Nt[It+Wt]=-1,Ot++,At[Wt]=(0,tt.csFlip)(wt),Nt[Vt+wt]++;else{var tr=Nt[Kt+Bt];tr!==-1&&(jt[tr]=Wt),Nt[Ut+Wt]=Nt[Kt+Bt],Nt[Kt+Bt]=Wt}}return Ot}function Rt(wt,At,Nt,Pt,It){if(wt<2||wt+At<0){for(var Ft=0;Ft<It;Ft++)Nt[Pt+Ft]!==0&&(Nt[Pt+Ft]=1);wt=2}return wt}function Tt(wt,At){return wt!==At}});return csAmd.createCsAmd=dt,csAmd}var csCounts={},csLeaf={},hasRequiredCsLeaf;function requireCsLeaf(){if(hasRequiredCsLeaf)return csLeaf;hasRequiredCsLeaf=1,Object.defineProperty(csLeaf,"__esModule",{value:!0}),csLeaf.csLeaf=et;function et(_e,tt,rt,nt,st,dt,ft){var ht,mt,bt=0,St;if(_e<=tt||rt[nt+tt]<=rt[st+_e])return-1;rt[st+_e]=rt[nt+tt];var Et=rt[dt+_e];if(rt[dt+_e]=tt,Et===-1)bt=1,St=_e;else{for(bt=2,St=Et;St!==rt[ft+St];St=rt[ft+St]);for(ht=Et;ht!==St;ht=mt)mt=rt[ft+ht],rt[ft+ht]=St}return{jleaf:bt,q:St}}return csLeaf}var hasRequiredCsCounts;function requireCsCounts(){if(hasRequiredCsCounts)return csCounts;hasRequiredCsCounts=1,Object.defineProperty(csCounts,"__esModule",{value:!0}),csCounts.createCsCounts=void 0;var et=requireFactory(),_e=requireCsLeaf(),tt="csCounts",rt=["transpose"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.transpose;return function(ft,ht,mt,bt){if(!ft||!ht||!mt)return null;var St=ft._size,Et=St[0],Ct=St[1],Rt,Tt,wt,At,Nt,Pt,It,Ft=4*Ct+(bt?Ct+Et+1:0),qt=[],Vt=0,Kt=Ct,jt=2*Ct,Ut=3*Ct,Ot=4*Ct,Wt=5*Ct+1;for(wt=0;wt<Ft;wt++)qt[wt]=-1;var Bt=[],tr=dt(ft),Jt=tr._index,ar=tr._ptr;for(wt=0;wt<Ct;wt++)for(Tt=mt[wt],Bt[Tt]=qt[Ut+Tt]===-1?1:0;Tt!==-1&&qt[Ut+Tt]===-1;Tt=ht[Tt])qt[Ut+Tt]=wt;if(bt){for(wt=0;wt<Ct;wt++)qt[mt[wt]]=wt;for(Rt=0;Rt<Et;Rt++){for(wt=Ct,Pt=ar[Rt],It=ar[Rt+1],Nt=Pt;Nt<It;Nt++)wt=Math.min(wt,qt[Jt[Nt]]);qt[Wt+Rt]=qt[Ot+wt],qt[Ot+wt]=Rt}}for(Rt=0;Rt<Ct;Rt++)qt[Vt+Rt]=Rt;for(wt=0;wt<Ct;wt++){for(Tt=mt[wt],ht[Tt]!==-1&&Bt[ht[Tt]]--,At=bt?qt[Ot+wt]:Tt;At!==-1;At=bt?qt[Wt+At]:-1)for(Nt=ar[At];Nt<ar[At+1];Nt++){Rt=Jt[Nt];var pr=(0,_e.csLeaf)(Rt,Tt,qt,Ut,Kt,jt,Vt);pr.jleaf>=1&&Bt[Tt]++,pr.jleaf===2&&Bt[pr.q]--}ht[Tt]!==-1&&(qt[Vt+Tt]=ht[Tt])}for(Tt=0;Tt<Ct;Tt++)ht[Tt]!==-1&&(Bt[ht[Tt]]+=Bt[Tt]);return Bt}});return csCounts.createCsCounts=nt,csCounts}var hasRequiredCsSqr;function requireCsSqr(){if(hasRequiredCsSqr)return csSqr;hasRequiredCsSqr=1,Object.defineProperty(csSqr,"__esModule",{value:!0}),csSqr.createCsSqr=void 0;var et=requireCsPermute(),_e=requireCsPost(),tt=requireCsEtree(),rt=requireCsAmd(),nt=requireCsCounts(),st=requireFactory(),dt="csSqr",ft=["add","multiply","transpose"],ht=(0,st.factory)(dt,ft,function(mt){var bt=mt.add,St=mt.multiply,Et=mt.transpose,Ct=(0,rt.createCsAmd)({add:bt,multiply:St,transpose:Et}),Rt=(0,nt.createCsCounts)({transpose:Et});return function(At,Nt,Pt){var It=Nt._ptr,Ft=Nt._size,qt=Ft[1],Vt,Kt={};if(Kt.q=Ct(At,Nt),At&&!Kt.q)return null;if(Pt){var jt=At?(0,et.csPermute)(Nt,null,Kt.q,0):Nt;Kt.parent=(0,tt.csEtree)(jt,1);var Ut=(0,_e.csPost)(Kt.parent,qt);if(Kt.cp=Rt(jt,Kt.parent,Ut,1),jt&&Kt.parent&&Kt.cp&&Tt(jt,Kt))for(Kt.unz=0,Vt=0;Vt<qt;Vt++)Kt.unz+=Kt.cp[Vt]}else Kt.unz=4*It[qt]+qt,Kt.lnz=Kt.unz;return Kt};function Tt(wt,At){var Nt=wt._ptr,Pt=wt._index,It=wt._size,Ft=It[0],qt=It[1];At.pinv=[],At.leftmost=[];var Vt=At.parent,Kt=At.pinv,jt=At.leftmost,Ut=[],Ot=0,Wt=Ft,Bt=Ft+qt,tr=Ft+2*qt,Jt,ar,pr,cr,gr;for(ar=0;ar<qt;ar++)Ut[Wt+ar]=-1,Ut[Bt+ar]=-1,Ut[tr+ar]=0;for(Jt=0;Jt<Ft;Jt++)jt[Jt]=-1;for(ar=qt-1;ar>=0;ar--)for(cr=Nt[ar],gr=Nt[ar+1],pr=cr;pr<gr;pr++)jt[Pt[pr]]=ar;for(Jt=Ft-1;Jt>=0;Jt--)Kt[Jt]=-1,ar=jt[Jt],ar!==-1&&(Ut[tr+ar]++===0&&(Ut[Bt+ar]=Jt),Ut[Ot+Jt]=Ut[Wt+ar],Ut[Wt+ar]=Jt);for(At.lnz=0,At.m2=Ft,ar=0;ar<qt;ar++)if(Jt=Ut[Wt+ar],At.lnz++,Jt<0&&(Jt=At.m2++),Kt[Jt]=ar,!(--tr[ar]<=0)){At.lnz+=Ut[tr+ar];var Sr=Vt[ar];Sr!==-1&&(Ut[tr+Sr]===0&&(Ut[Bt+Sr]=Ut[Bt+ar]),Ut[Ot+Ut[Bt+ar]]=Ut[Wt+Sr],Ut[Wt+Sr]=Ut[Ot+Jt],Ut[tr+Sr]+=Ut[tr+ar])}for(Jt=0;Jt<Ft;Jt++)Kt[Jt]<0&&(Kt[Jt]=ar++);return!0}});return csSqr.createCsSqr=ht,csSqr}var csLu={},csSpsolve={},csReach={},csMarked={},hasRequiredCsMarked;function requireCsMarked(){if(hasRequiredCsMarked)return csMarked;hasRequiredCsMarked=1,Object.defineProperty(csMarked,"__esModule",{value:!0}),csMarked.csMarked=et;function et(_e,tt){return _e[tt]<0}return csMarked}var csMark={},hasRequiredCsMark;function requireCsMark(){if(hasRequiredCsMark)return csMark;hasRequiredCsMark=1,Object.defineProperty(csMark,"__esModule",{value:!0}),csMark.csMark=_e;var et=requireCsFlip();function _e(tt,rt){tt[rt]=(0,et.csFlip)(tt[rt])}return csMark}var csDfs={},csUnflip={},hasRequiredCsUnflip;function requireCsUnflip(){if(hasRequiredCsUnflip)return csUnflip;hasRequiredCsUnflip=1,Object.defineProperty(csUnflip,"__esModule",{value:!0}),csUnflip.csUnflip=_e;var et=requireCsFlip();function _e(tt){return tt<0?(0,et.csFlip)(tt):tt}return csUnflip}var hasRequiredCsDfs;function requireCsDfs(){if(hasRequiredCsDfs)return csDfs;hasRequiredCsDfs=1,Object.defineProperty(csDfs,"__esModule",{value:!0}),csDfs.csDfs=rt;var et=requireCsMarked(),_e=requireCsMark(),tt=requireCsUnflip();function rt(nt,st,dt,ft,ht){var mt=st._index,bt=st._ptr,St=st._size,Et=St[1],Ct,Rt,Tt,wt=0;for(ft[0]=nt;wt>=0;){nt=ft[wt];var At=ht?ht[nt]:nt;(0,et.csMarked)(bt,nt)||((0,_e.csMark)(bt,nt),ft[Et+wt]=At<0?0:(0,tt.csUnflip)(bt[At]));var Nt=1;for(Rt=ft[Et+wt],Tt=At<0?0:(0,tt.csUnflip)(bt[At+1]);Rt<Tt;Rt++)if(Ct=mt[Rt],!(0,et.csMarked)(bt,Ct)){ft[Et+wt]=Rt,ft[++wt]=Ct,Nt=0;break}Nt&&(wt--,ft[--dt]=nt)}return dt}return csDfs}var hasRequiredCsReach;function requireCsReach(){if(hasRequiredCsReach)return csReach;hasRequiredCsReach=1,Object.defineProperty(csReach,"__esModule",{value:!0}),csReach.csReach=rt;var et=requireCsMarked(),_e=requireCsMark(),tt=requireCsDfs();function rt(nt,st,dt,ft,ht){var mt=nt._ptr,bt=nt._size,St=st._index,Et=st._ptr,Ct=bt[1],Rt,Tt,wt,At=Ct;for(Tt=Et[dt],wt=Et[dt+1],Rt=Tt;Rt<wt;Rt++){var Nt=St[Rt];(0,et.csMarked)(mt,Nt)||(At=(0,tt.csDfs)(Nt,nt,At,ft,ht))}for(Rt=At;Rt<Ct;Rt++)(0,_e.csMark)(mt,ft[Rt]);return At}return csReach}var hasRequiredCsSpsolve;function requireCsSpsolve(){if(hasRequiredCsSpsolve)return csSpsolve;hasRequiredCsSpsolve=1,Object.defineProperty(csSpsolve,"__esModule",{value:!0}),csSpsolve.createCsSpsolve=void 0;var et=requireCsReach(),_e=requireFactory(),tt="csSpsolve",rt=["divideScalar","multiply","subtract"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.divideScalar,ft=st.multiply,ht=st.subtract;return function(bt,St,Et,Ct,Rt,Tt,wt){var At=bt._values,Nt=bt._index,Pt=bt._ptr,It=bt._size,Ft=It[1],qt=St._values,Vt=St._index,Kt=St._ptr,jt,Ut,Ot,Wt,Bt=(0,et.csReach)(bt,St,Et,Ct,Tt);for(jt=Bt;jt<Ft;jt++)Rt[Ct[jt]]=0;for(Ut=Kt[Et],Ot=Kt[Et+1],jt=Ut;jt<Ot;jt++)Rt[Vt[jt]]=qt[jt];for(var tr=Bt;tr<Ft;tr++){var Jt=Ct[tr],ar=Tt?Tt[Jt]:Jt;if(!(ar<0))for(Ut=Pt[ar],Ot=Pt[ar+1],Rt[Jt]=dt(Rt[Jt],At[wt?Ut:Ot-1]),jt=wt?Ut+1:Ut,Wt=wt?Ot:Ot-1;jt<Wt;jt++){var pr=Nt[jt];Rt[pr]=ht(Rt[pr],ft(At[jt],Rt[Jt]))}}return Bt}});return csSpsolve.createCsSpsolve=nt,csSpsolve}var hasRequiredCsLu;function requireCsLu(){if(hasRequiredCsLu)return csLu;hasRequiredCsLu=1,Object.defineProperty(csLu,"__esModule",{value:!0}),csLu.createCsLu=void 0;var et=requireFactory(),_e=requireCsSpsolve(),tt="csLu",rt=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.abs,ft=st.divideScalar,ht=st.multiply,mt=st.subtract,bt=st.larger,St=st.largerEq,Et=st.SparseMatrix,Ct=(0,_e.createCsSpsolve)({divideScalar:ft,multiply:ht,subtract:mt});return function(Tt,wt,At){if(!Tt)return null;var Nt=Tt._size,Pt=Nt[1],It,Ft=100,qt=100;wt&&(It=wt.q,Ft=wt.lnz||Ft,qt=wt.unz||qt);var Vt=[],Kt=[],jt=[],Ut=new Et({values:Vt,index:Kt,ptr:jt,size:[Pt,Pt]}),Ot=[],Wt=[],Bt=[],tr=new Et({values:Ot,index:Wt,ptr:Bt,size:[Pt,Pt]}),Jt=[],ar,pr,cr=[],gr=[];for(ar=0;ar<Pt;ar++)cr[ar]=0,Jt[ar]=-1,jt[ar+1]=0;Ft=0,qt=0;for(var Sr=0;Sr<Pt;Sr++){jt[Sr]=Ft,Bt[Sr]=qt;var Er=It?It[Sr]:Sr,Vr=Ct(Ut,Tt,Er,gr,cr,Jt,1),Wr=-1,Mr=-1;for(pr=Vr;pr<Pt;pr++)if(ar=gr[pr],Jt[ar]<0){var Nr=dt(cr[ar]);bt(Nr,Mr)&&(Mr=Nr,Wr=ar)}else Wt[qt]=Jt[ar],Ot[qt++]=cr[ar];if(Wr===-1||Mr<=0)return null;Jt[Er]<0&&St(dt(cr[Er]),ht(Mr,At))&&(Wr=Er);var Yr=cr[Wr];for(Wt[qt]=Sr,Ot[qt++]=Yr,Jt[Wr]=Sr,Kt[Ft]=Wr,Vt[Ft++]=1,pr=Vr;pr<Pt;pr++)ar=gr[pr],Jt[ar]<0&&(Kt[Ft]=ar,Vt[Ft++]=ft(cr[ar],Yr)),cr[ar]=0}for(jt[Pt]=Ft,Bt[Pt]=qt,pr=0;pr<Ft;pr++)Kt[pr]=Jt[Kt[pr]];return Vt.splice(Ft,Vt.length-Ft),Kt.splice(Ft,Kt.length-Ft),Ot.splice(qt,Ot.length-qt),Wt.splice(qt,Wt.length-qt),{L:Ut,U:tr,pinv:Jt}}});return csLu.createCsLu=nt,csLu}var hasRequiredSlu$1;function requireSlu$1(){if(hasRequiredSlu$1)return slu$1;hasRequiredSlu$1=1,Object.defineProperty(slu$1,"__esModule",{value:!0}),slu$1.createSlu=void 0;var et=requireNumber$3(),_e=requireFactory(),tt=requireCsSqr(),rt=requireCsLu(),nt="slu",st=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.abs,bt=ft.add,St=ft.multiply,Et=ft.transpose,Ct=ft.divideScalar,Rt=ft.subtract,Tt=ft.larger,wt=ft.largerEq,At=ft.SparseMatrix,Nt=(0,tt.createCsSqr)({add:bt,multiply:St,transpose:Et}),Pt=(0,rt.createCsLu)({abs:mt,divideScalar:Ct,multiply:St,subtract:Rt,larger:Tt,largerEq:wt,SparseMatrix:At});return ht(nt,{"SparseMatrix, number, number":function(Ft,qt,Vt){if(!(0,et.isInteger)(qt)||qt<0||qt>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(Vt<0||Vt>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var Kt=Nt(qt,Ft,!1),jt=Pt(Ft,Kt,Vt);return{L:jt.L,U:jt.U,p:jt.pinv,q:Kt.q,toString:function(){return"L: "+this.L.toString()+`
U: `+this.U.toString()+`
p: `+this.p.toString()+(this.q?`
q: `+this.q.toString():"")+`
`}}}})});return slu$1.createSlu=dt,slu$1}var lusolve$1={},csIpvec={},hasRequiredCsIpvec;function requireCsIpvec(){if(hasRequiredCsIpvec)return csIpvec;hasRequiredCsIpvec=1,Object.defineProperty(csIpvec,"__esModule",{value:!0}),csIpvec.csIpvec=et;function et(_e,tt){var rt,nt=tt.length,st=[];if(_e)for(rt=0;rt<nt;rt++)st[_e[rt]]=tt[rt];else for(rt=0;rt<nt;rt++)st[rt]=tt[rt];return st}return csIpvec}var hasRequiredLusolve$1;function requireLusolve$1(){if(hasRequiredLusolve$1)return lusolve$1;hasRequiredLusolve$1=1,Object.defineProperty(lusolve$1,"__esModule",{value:!0}),lusolve$1.createLusolve=void 0;var et=requireIs(),_e=requireFactory(),tt=requireSolveValidation(),rt=requireCsIpvec(),nt="lusolve",st=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.lup,St=ft.slu,Et=ft.usolve,Ct=ft.lsolve,Rt=ft.DenseMatrix,Tt=(0,tt.createSolveValidation)({DenseMatrix:Rt});return ht(nt,{"Array, Array | Matrix":function(Pt,It){Pt=mt(Pt);var Ft=bt(Pt),qt=At(Ft.L,Ft.U,Ft.p,null,It);return qt.valueOf()},"DenseMatrix, Array | Matrix":function(Pt,It){var Ft=bt(Pt);return At(Ft.L,Ft.U,Ft.p,null,It)},"SparseMatrix, Array | Matrix":function(Pt,It){var Ft=bt(Pt);return At(Ft.L,Ft.U,Ft.p,null,It)},"SparseMatrix, Array | Matrix, number, number":function(Pt,It,Ft,qt){var Vt=St(Pt,Ft,qt);return At(Vt.L,Vt.U,Vt.p,Vt.q,It)},"Object, Array | Matrix":function(Pt,It){return At(Pt.L,Pt.U,Pt.p,Pt.q,It)}});function wt(Nt){if((0,et.isMatrix)(Nt))return Nt;if((0,et.isArray)(Nt))return mt(Nt);throw new TypeError("Invalid Matrix LU decomposition")}function At(Nt,Pt,It,Ft,qt){Nt=wt(Nt),Pt=wt(Pt),It&&(qt=Tt(Nt,qt,!0),qt._data=(0,rt.csIpvec)(It,qt._data));var Vt=Ct(Nt,qt),Kt=Et(Pt,Vt);return Ft&&(Kt._data=(0,rt.csIpvec)(Ft,Kt._data)),Kt}});return lusolve$1.createLusolve=dt,lusolve$1}var Help={},hasRequiredHelp$2;function requireHelp$2(){if(hasRequiredHelp$2)return Help;hasRequiredHelp$2=1,Object.defineProperty(Help,"__esModule",{value:!0}),Help.createHelpClass=void 0;var et=requireIs(),_e=requireObject(),tt=requireString$2(),rt=requireFactory(),nt="Help",st=["parse"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.parse;function mt(bt){if(!(this instanceof mt))throw new SyntaxError("Constructor must be called with the new operator");if(!bt)throw new Error('Argument "doc" missing');this.doc=bt}return mt.prototype.type="Help",mt.prototype.isHelp=!0,mt.prototype.toString=function(){var bt=this.doc||{},St=`
`;if(bt.name&&(St+="Name: "+bt.name+`
`),bt.category&&(St+="Category: "+bt.category+`
`),bt.description&&(St+=`Description:
`+bt.description+`
`),bt.syntax&&(St+=`Syntax:
`+bt.syntax.join(`
`)+`
`),bt.examples){St+=`Examples:
`;for(var Et={},Ct=0;Ct<bt.examples.length;Ct++){var Rt=bt.examples[Ct];St+=" "+Rt+`
`;var Tt=void 0;try{Tt=ht(Rt).compile().evaluate(Et)}catch(wt){Tt=wt}Tt!==void 0&&!(0,et.isHelp)(Tt)&&(St+=" "+(0,tt.format)(Tt,{precision:14})+`
`)}St+=`
`}return bt.mayThrow&&bt.mayThrow.length&&(St+="Throws: "+bt.mayThrow.join(", ")+`
`),bt.seealso&&bt.seealso.length&&(St+="See also: "+bt.seealso.join(", ")+`
`),St},mt.prototype.toJSON=function(){var bt=(0,_e.clone)(this.doc);return bt.mathjs="Help",bt},mt.fromJSON=function(bt){var St={};return Object.keys(bt).filter(function(Et){return Et!=="mathjs"}).forEach(function(Et){St[Et]=bt[Et]}),new mt(St)},mt.prototype.valueOf=mt.prototype.toString,mt},{isClass:!0});return Help.createHelpClass=dt,Help}var Chain={},hasRequiredChain$1;function requireChain$1(){if(hasRequiredChain$1)return Chain;hasRequiredChain$1=1,Object.defineProperty(Chain,"__esModule",{value:!0}),Chain.createChainClass=void 0;var et=requireIs(),_e=requireString$2(),tt=requireObject(),rt=requireFactory(),nt="Chain",st=["?on","math"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.on,mt=ft.math;function bt(Tt){if(!(this instanceof bt))throw new SyntaxError("Constructor must be called with the new operator");(0,et.isChain)(Tt)?this.value=Tt.value:this.value=Tt}bt.prototype.type="Chain",bt.prototype.isChain=!0,bt.prototype.done=function(){return this.value},bt.prototype.valueOf=function(){return this.value},bt.prototype.toString=function(){return(0,_e.format)(this.value)},bt.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},bt.fromJSON=function(Tt){return new bt(Tt.value)};function St(Tt,wt){typeof wt=="function"&&(bt.prototype[Tt]=Ct(wt))}function Et(Tt,wt){(0,tt.lazy)(bt.prototype,Tt,function(){var Nt=wt();if(typeof Nt=="function")return Ct(Nt)})}function Ct(Tt){return function(){for(var wt=[this.value],At=0;At<arguments.length;At++)wt[At+1]=arguments[At];return new bt(Tt.apply(Tt,wt))}}bt.createProxy=function(Tt,wt){if(typeof Tt=="string")St(Tt,wt);else{var At=function(It){(0,tt.hasOwnProperty)(Tt,It)&&Rt[It]===void 0&&Et(It,function(){return Tt[It]})};for(var Nt in Tt)At(Nt)}};var Rt={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return bt.createProxy(mt),ht&&ht("import",function(Tt,wt,At){At||Et(Tt,wt)}),bt},{isClass:!0});return Chain.createChainClass=dt,Chain}var help$1={},embeddedDocs={},e$4={},hasRequiredE;function requireE(){if(hasRequiredE)return e$4;hasRequiredE=1,Object.defineProperty(e$4,"__esModule",{value:!0}),e$4.eDocs=void 0;var et={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]};return e$4.eDocs=et,e$4}var _false={},hasRequired_false;function require_false(){if(hasRequired_false)return _false;hasRequired_false=1,Object.defineProperty(_false,"__esModule",{value:!0}),_false.falseDocs=void 0;var et={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};return _false.falseDocs=et,_false}var i$2={},hasRequiredI;function requireI(){if(hasRequiredI)return i$2;hasRequiredI=1,Object.defineProperty(i$2,"__esModule",{value:!0}),i$2.iDocs=void 0;var et={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};return i$2.iDocs=et,i$2}var _Infinity={},hasRequired_Infinity;function require_Infinity(){if(hasRequired_Infinity)return _Infinity;hasRequired_Infinity=1,Object.defineProperty(_Infinity,"__esModule",{value:!0}),_Infinity.InfinityDocs=void 0;var et={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};return _Infinity.InfinityDocs=et,_Infinity}var LN10={},hasRequiredLN10;function requireLN10(){if(hasRequiredLN10)return LN10;hasRequiredLN10=1,Object.defineProperty(LN10,"__esModule",{value:!0}),LN10.LN10Docs=void 0;var et={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};return LN10.LN10Docs=et,LN10}var LN2={},hasRequiredLN2;function requireLN2(){if(hasRequiredLN2)return LN2;hasRequiredLN2=1,Object.defineProperty(LN2,"__esModule",{value:!0}),LN2.LN2Docs=void 0;var et={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};return LN2.LN2Docs=et,LN2}var LOG10E={},hasRequiredLOG10E;function requireLOG10E(){if(hasRequiredLOG10E)return LOG10E;hasRequiredLOG10E=1,Object.defineProperty(LOG10E,"__esModule",{value:!0}),LOG10E.LOG10EDocs=void 0;var et={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};return LOG10E.LOG10EDocs=et,LOG10E}var LOG2E={},hasRequiredLOG2E;function requireLOG2E(){if(hasRequiredLOG2E)return LOG2E;hasRequiredLOG2E=1,Object.defineProperty(LOG2E,"__esModule",{value:!0}),LOG2E.LOG2EDocs=void 0;var et={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};return LOG2E.LOG2EDocs=et,LOG2E}var _NaN={},hasRequired_NaN;function require_NaN(){if(hasRequired_NaN)return _NaN;hasRequired_NaN=1,Object.defineProperty(_NaN,"__esModule",{value:!0}),_NaN.NaNDocs=void 0;var et={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};return _NaN.NaNDocs=et,_NaN}var _null={},hasRequired_null;function require_null(){if(hasRequired_null)return _null;hasRequired_null=1,Object.defineProperty(_null,"__esModule",{value:!0}),_null.nullDocs=void 0;var et={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};return _null.nullDocs=et,_null}var phi={},hasRequiredPhi;function requirePhi(){if(hasRequiredPhi)return phi;hasRequiredPhi=1,Object.defineProperty(phi,"__esModule",{value:!0}),phi.phiDocs=void 0;var et={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]};return phi.phiDocs=et,phi}var pi$1={},hasRequiredPi;function requirePi(){if(hasRequiredPi)return pi$1;hasRequiredPi=1,Object.defineProperty(pi$1,"__esModule",{value:!0}),pi$1.piDocs=void 0;var et={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]};return pi$1.piDocs=et,pi$1}var SQRT1_2={},hasRequiredSQRT1_2;function requireSQRT1_2(){if(hasRequiredSQRT1_2)return SQRT1_2;hasRequiredSQRT1_2=1,Object.defineProperty(SQRT1_2,"__esModule",{value:!0}),SQRT1_2.SQRT12Docs=void 0;var et={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};return SQRT1_2.SQRT12Docs=et,SQRT1_2}var SQRT2={},hasRequiredSQRT2;function requireSQRT2(){if(hasRequiredSQRT2)return SQRT2;hasRequiredSQRT2=1,Object.defineProperty(SQRT2,"__esModule",{value:!0}),SQRT2.SQRT2Docs=void 0;var et={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};return SQRT2.SQRT2Docs=et,SQRT2}var tau={},hasRequiredTau;function requireTau(){if(hasRequiredTau)return tau;hasRequiredTau=1,Object.defineProperty(tau,"__esModule",{value:!0}),tau.tauDocs=void 0;var et={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]};return tau.tauDocs=et,tau}var _true={},hasRequired_true;function require_true(){if(hasRequired_true)return _true;hasRequired_true=1,Object.defineProperty(_true,"__esModule",{value:!0}),_true.trueDocs=void 0;var et={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};return _true.trueDocs=et,_true}var version$9={},hasRequiredVersion$1;function requireVersion$1(){if(hasRequiredVersion$1)return version$9;hasRequiredVersion$1=1,Object.defineProperty(version$9,"__esModule",{value:!0}),version$9.versionDocs=void 0;var et={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};return version$9.versionDocs=et,version$9}var bignumber={},hasRequiredBignumber;function requireBignumber(){if(hasRequiredBignumber)return bignumber;hasRequiredBignumber=1,Object.defineProperty(bignumber,"__esModule",{value:!0}),bignumber.bignumberDocs=void 0;var et={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};return bignumber.bignumberDocs=et,bignumber}var boolean={},hasRequiredBoolean;function requireBoolean(){if(hasRequiredBoolean)return boolean;hasRequiredBoolean=1,Object.defineProperty(boolean,"__esModule",{value:!0}),boolean.booleanDocs=void 0;var et={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};return boolean.booleanDocs=et,boolean}var complex={},hasRequiredComplex;function requireComplex(){if(hasRequiredComplex)return complex;hasRequiredComplex=1,Object.defineProperty(complex,"__esModule",{value:!0}),complex.complexDocs=void 0;var et={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]};return complex.complexDocs=et,complex}var createUnit={},hasRequiredCreateUnit;function requireCreateUnit(){if(hasRequiredCreateUnit)return createUnit;hasRequiredCreateUnit=1,Object.defineProperty(createUnit,"__esModule",{value:!0}),createUnit.createUnitDocs=void 0;var et={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]};return createUnit.createUnitDocs=et,createUnit}var fraction={},hasRequiredFraction;function requireFraction(){if(hasRequiredFraction)return fraction;hasRequiredFraction=1,Object.defineProperty(fraction,"__esModule",{value:!0}),fraction.fractionDocs=void 0;var et={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};return fraction.fractionDocs=et,fraction}var construction={},hasRequiredConstruction;function requireConstruction(){if(hasRequiredConstruction)return construction;hasRequiredConstruction=1,Object.defineProperty(construction,"__esModule",{value:!0}),construction.indexDocs=void 0;var et={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};return construction.indexDocs=et,construction}var matrix={},hasRequiredMatrix;function requireMatrix(){if(hasRequiredMatrix)return matrix;hasRequiredMatrix=1,Object.defineProperty(matrix,"__esModule",{value:!0}),matrix.matrixDocs=void 0;var et={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};return matrix.matrixDocs=et,matrix}var number$1={},hasRequiredNumber;function requireNumber(){if(hasRequiredNumber)return number$1;hasRequiredNumber=1,Object.defineProperty(number$1,"__esModule",{value:!0}),number$1.numberDocs=void 0;var et={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]};return number$1.numberDocs=et,number$1}var sparse={},hasRequiredSparse;function requireSparse(){if(hasRequiredSparse)return sparse;hasRequiredSparse=1,Object.defineProperty(sparse,"__esModule",{value:!0}),sparse.sparseDocs=void 0;var et={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]};return sparse.sparseDocs=et,sparse}var splitUnit={},hasRequiredSplitUnit;function requireSplitUnit(){if(hasRequiredSplitUnit)return splitUnit;hasRequiredSplitUnit=1,Object.defineProperty(splitUnit,"__esModule",{value:!0}),splitUnit.splitUnitDocs=void 0;var et={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]};return splitUnit.splitUnitDocs=et,splitUnit}var string={},hasRequiredString;function requireString(){if(hasRequiredString)return string;hasRequiredString=1,Object.defineProperty(string,"__esModule",{value:!0}),string.stringDocs=void 0;var et={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};return string.stringDocs=et,string}var unit={},hasRequiredUnit;function requireUnit(){if(hasRequiredUnit)return unit;hasRequiredUnit=1,Object.defineProperty(unit,"__esModule",{value:!0}),unit.unitDocs=void 0;var et={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};return unit.unitDocs=et,unit}var config={},hasRequiredConfig;function requireConfig(){if(hasRequiredConfig)return config;hasRequiredConfig=1,Object.defineProperty(config,"__esModule",{value:!0}),config.configDocs=void 0;var et={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]};return config.configDocs=et,config}var _import$1={},hasRequired_import$1;function require_import$1(){if(hasRequired_import$1)return _import$1;hasRequired_import$1=1,Object.defineProperty(_import$1,"__esModule",{value:!0}),_import$1.importDocs=void 0;var et={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]};return _import$1.importDocs=et,_import$1}var typed={},hasRequiredTyped;function requireTyped(){if(hasRequiredTyped)return typed;hasRequiredTyped=1,Object.defineProperty(typed,"__esModule",{value:!0}),typed.typedDocs=void 0;var et={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]};return typed.typedDocs=et,typed}var derivative$1={},hasRequiredDerivative$1;function requireDerivative$1(){if(hasRequiredDerivative$1)return derivative$1;hasRequiredDerivative$1=1,Object.defineProperty(derivative$1,"__esModule",{value:!0}),derivative$1.derivativeDocs=void 0;var et={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};return derivative$1.derivativeDocs=et,derivative$1}var leafCount$1={},hasRequiredLeafCount$1;function requireLeafCount$1(){if(hasRequiredLeafCount$1)return leafCount$1;hasRequiredLeafCount$1=1,Object.defineProperty(leafCount$1,"__esModule",{value:!0}),leafCount$1.leafCountDocs=void 0;var et={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};return leafCount$1.leafCountDocs=et,leafCount$1}var lsolve={},hasRequiredLsolve;function requireLsolve(){if(hasRequiredLsolve)return lsolve;hasRequiredLsolve=1,Object.defineProperty(lsolve,"__esModule",{value:!0}),lsolve.lsolveDocs=void 0;var et={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};return lsolve.lsolveDocs=et,lsolve}var lsolveAll={},hasRequiredLsolveAll;function requireLsolveAll(){if(hasRequiredLsolveAll)return lsolveAll;hasRequiredLsolveAll=1,Object.defineProperty(lsolveAll,"__esModule",{value:!0}),lsolveAll.lsolveAllDocs=void 0;var et={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};return lsolveAll.lsolveAllDocs=et,lsolveAll}var lup={},hasRequiredLup;function requireLup(){if(hasRequiredLup)return lup;hasRequiredLup=1,Object.defineProperty(lup,"__esModule",{value:!0}),lup.lupDocs=void 0;var et={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]};return lup.lupDocs=et,lup}var lusolve={},hasRequiredLusolve;function requireLusolve(){if(hasRequiredLusolve)return lusolve;hasRequiredLusolve=1,Object.defineProperty(lusolve,"__esModule",{value:!0}),lusolve.lusolveDocs=void 0;var et={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]};return lusolve.lusolveDocs=et,lusolve}var qr={},hasRequiredQr;function requireQr(){if(hasRequiredQr)return qr;hasRequiredQr=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.qrDocs=void 0;var et={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]};return qr.qrDocs=et,qr}var rationalize$1={},hasRequiredRationalize$1;function requireRationalize$1(){if(hasRequiredRationalize$1)return rationalize$1;hasRequiredRationalize$1=1,Object.defineProperty(rationalize$1,"__esModule",{value:!0}),rationalize$1.rationalizeDocs=void 0;var et={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};return rationalize$1.rationalizeDocs=et,rationalize$1}var resolve$1={},hasRequiredResolve$1;function requireResolve$1(){if(hasRequiredResolve$1)return resolve$1;hasRequiredResolve$1=1,Object.defineProperty(resolve$1,"__esModule",{value:!0}),resolve$1.resolveDocs=void 0;var et={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};return resolve$1.resolveDocs=et,resolve$1}var simplify$1={},hasRequiredSimplify$1;function requireSimplify$1(){if(hasRequiredSimplify$1)return simplify$1;hasRequiredSimplify$1=1,Object.defineProperty(simplify$1,"__esModule",{value:!0}),simplify$1.simplifyDocs=void 0;var et={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};return simplify$1.simplifyDocs=et,simplify$1}var simplifyCore$1={},hasRequiredSimplifyCore$1;function requireSimplifyCore$1(){if(hasRequiredSimplifyCore$1)return simplifyCore$1;hasRequiredSimplifyCore$1=1,Object.defineProperty(simplifyCore$1,"__esModule",{value:!0}),simplifyCore$1.simplifyCoreDocs=void 0;var et={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","evaluate"]};return simplifyCore$1.simplifyCoreDocs=et,simplifyCore$1}var slu={},hasRequiredSlu;function requireSlu(){if(hasRequiredSlu)return slu;hasRequiredSlu=1,Object.defineProperty(slu,"__esModule",{value:!0}),slu.sluDocs=void 0;var et={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]};return slu.sluDocs=et,slu}var symbolicEqual$1={},hasRequiredSymbolicEqual$1;function requireSymbolicEqual$1(){if(hasRequiredSymbolicEqual$1)return symbolicEqual$1;hasRequiredSymbolicEqual$1=1,Object.defineProperty(symbolicEqual$1,"__esModule",{value:!0}),symbolicEqual$1.symbolicEqualDocs=void 0;var et={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};return symbolicEqual$1.symbolicEqualDocs=et,symbolicEqual$1}var usolve={},hasRequiredUsolve;function requireUsolve(){if(hasRequiredUsolve)return usolve;hasRequiredUsolve=1,Object.defineProperty(usolve,"__esModule",{value:!0}),usolve.usolveDocs=void 0;var et={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};return usolve.usolveDocs=et,usolve}var usolveAll={},hasRequiredUsolveAll;function requireUsolveAll(){if(hasRequiredUsolveAll)return usolveAll;hasRequiredUsolveAll=1,Object.defineProperty(usolveAll,"__esModule",{value:!0}),usolveAll.usolveAllDocs=void 0;var et={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]};return usolveAll.usolveAllDocs=et,usolveAll}var abs={},hasRequiredAbs;function requireAbs(){if(hasRequiredAbs)return abs;hasRequiredAbs=1,Object.defineProperty(abs,"__esModule",{value:!0}),abs.absDocs=void 0;var et={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};return abs.absDocs=et,abs}var add={},hasRequiredAdd;function requireAdd(){if(hasRequiredAdd)return add;hasRequiredAdd=1,Object.defineProperty(add,"__esModule",{value:!0}),add.addDocs=void 0;var et={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};return add.addDocs=et,add}var cbrt={},hasRequiredCbrt;function requireCbrt(){if(hasRequiredCbrt)return cbrt;hasRequiredCbrt=1,Object.defineProperty(cbrt,"__esModule",{value:!0}),cbrt.cbrtDocs=void 0;var et={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]};return cbrt.cbrtDocs=et,cbrt}var ceil={},hasRequiredCeil;function requireCeil(){if(hasRequiredCeil)return ceil;hasRequiredCeil=1,Object.defineProperty(ceil,"__esModule",{value:!0}),ceil.ceilDocs=void 0;var et={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]};return ceil.ceilDocs=et,ceil}var cube={},hasRequiredCube;function requireCube(){if(hasRequiredCube)return cube;hasRequiredCube=1,Object.defineProperty(cube,"__esModule",{value:!0}),cube.cubeDocs=void 0;var et={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]};return cube.cubeDocs=et,cube}var divide$1={},hasRequiredDivide$1;function requireDivide$1(){if(hasRequiredDivide$1)return divide$1;hasRequiredDivide$1=1,Object.defineProperty(divide$1,"__esModule",{value:!0}),divide$1.divideDocs=void 0;var et={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};return divide$1.divideDocs=et,divide$1}var dotDivide={},hasRequiredDotDivide;function requireDotDivide(){if(hasRequiredDotDivide)return dotDivide;hasRequiredDotDivide=1,Object.defineProperty(dotDivide,"__esModule",{value:!0}),dotDivide.dotDivideDocs=void 0;var et={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]};return dotDivide.dotDivideDocs=et,dotDivide}var dotMultiply={},hasRequiredDotMultiply;function requireDotMultiply(){if(hasRequiredDotMultiply)return dotMultiply;hasRequiredDotMultiply=1,Object.defineProperty(dotMultiply,"__esModule",{value:!0}),dotMultiply.dotMultiplyDocs=void 0;var et={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};return dotMultiply.dotMultiplyDocs=et,dotMultiply}var dotPow={},hasRequiredDotPow;function requireDotPow(){if(hasRequiredDotPow)return dotPow;hasRequiredDotPow=1,Object.defineProperty(dotPow,"__esModule",{value:!0}),dotPow.dotPowDocs=void 0;var et={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]};return dotPow.dotPowDocs=et,dotPow}var exp={},hasRequiredExp;function requireExp(){if(hasRequiredExp)return exp;hasRequiredExp=1,Object.defineProperty(exp,"__esModule",{value:!0}),exp.expDocs=void 0;var et={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]};return exp.expDocs=et,exp}var expm$1={},hasRequiredExpm$1;function requireExpm$1(){if(hasRequiredExpm$1)return expm$1;hasRequiredExpm$1=1,Object.defineProperty(expm$1,"__esModule",{value:!0}),expm$1.expmDocs=void 0;var et={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]};return expm$1.expmDocs=et,expm$1}var expm1={},hasRequiredExpm1;function requireExpm1(){if(hasRequiredExpm1)return expm1;hasRequiredExpm1=1,Object.defineProperty(expm1,"__esModule",{value:!0}),expm1.expm1Docs=void 0;var et={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]};return expm1.expm1Docs=et,expm1}var fix={},hasRequiredFix;function requireFix(){if(hasRequiredFix)return fix;hasRequiredFix=1,Object.defineProperty(fix,"__esModule",{value:!0}),fix.fixDocs=void 0;var et={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]};return fix.fixDocs=et,fix}var floor={},hasRequiredFloor;function requireFloor(){if(hasRequiredFloor)return floor;hasRequiredFloor=1,Object.defineProperty(floor,"__esModule",{value:!0}),floor.floorDocs=void 0;var et={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]};return floor.floorDocs=et,floor}var gcd={},hasRequiredGcd;function requireGcd(){if(hasRequiredGcd)return gcd;hasRequiredGcd=1,Object.defineProperty(gcd,"__esModule",{value:!0}),gcd.gcdDocs=void 0;var et={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};return gcd.gcdDocs=et,gcd}var hypot={},hasRequiredHypot;function requireHypot(){if(hasRequiredHypot)return hypot;hasRequiredHypot=1,Object.defineProperty(hypot,"__esModule",{value:!0}),hypot.hypotDocs=void 0;var et={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]};return hypot.hypotDocs=et,hypot}var invmod={},hasRequiredInvmod;function requireInvmod(){if(hasRequiredInvmod)return invmod;hasRequiredInvmod=1,Object.defineProperty(invmod,"__esModule",{value:!0}),invmod.invmodDocs=void 0;var et={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)=NaN","invmod(7, 13)=2","math.invmod(15151, 15122)=10429"],seealso:["gcd","xgcd"]};return invmod.invmodDocs=et,invmod}var lcm={},hasRequiredLcm;function requireLcm(){if(hasRequiredLcm)return lcm;hasRequiredLcm=1,Object.defineProperty(lcm,"__esModule",{value:!0}),lcm.lcmDocs=void 0;var et={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};return lcm.lcmDocs=et,lcm}var log$3={},hasRequiredLog;function requireLog(){if(hasRequiredLog)return log$3;hasRequiredLog=1,Object.defineProperty(log$3,"__esModule",{value:!0}),log$3.logDocs=void 0;var et={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]};return log$3.logDocs=et,log$3}var log10={},hasRequiredLog10;function requireLog10(){if(hasRequiredLog10)return log10;hasRequiredLog10=1,Object.defineProperty(log10,"__esModule",{value:!0}),log10.log10Docs=void 0;var et={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};return log10.log10Docs=et,log10}var log1p={},hasRequiredLog1p;function requireLog1p(){if(hasRequiredLog1p)return log1p;hasRequiredLog1p=1,Object.defineProperty(log1p,"__esModule",{value:!0}),log1p.log1pDocs=void 0;var et={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]};return log1p.log1pDocs=et,log1p}var log2={},hasRequiredLog2;function requireLog2(){if(hasRequiredLog2)return log2;hasRequiredLog2=1,Object.defineProperty(log2,"__esModule",{value:!0}),log2.log2Docs=void 0;var et={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]};return log2.log2Docs=et,log2}var mod={},hasRequiredMod;function requireMod(){if(hasRequiredMod)return mod;hasRequiredMod=1,Object.defineProperty(mod,"__esModule",{value:!0}),mod.modDocs=void 0;var et={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]};return mod.modDocs=et,mod}var multiply={},hasRequiredMultiply;function requireMultiply(){if(hasRequiredMultiply)return multiply;hasRequiredMultiply=1,Object.defineProperty(multiply,"__esModule",{value:!0}),multiply.multiplyDocs=void 0;var et={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};return multiply.multiplyDocs=et,multiply}var norm={},hasRequiredNorm;function requireNorm(){if(hasRequiredNorm)return norm;hasRequiredNorm=1,Object.defineProperty(norm,"__esModule",{value:!0}),norm.normDocs=void 0;var et={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};return norm.normDocs=et,norm}var nthRoot={},hasRequiredNthRoot;function requireNthRoot(){if(hasRequiredNthRoot)return nthRoot;hasRequiredNthRoot=1,Object.defineProperty(nthRoot,"__esModule",{value:!0}),nthRoot.nthRootDocs=void 0;var et={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]};return nthRoot.nthRootDocs=et,nthRoot}var nthRoots={},hasRequiredNthRoots;function requireNthRoots(){if(hasRequiredNthRoots)return nthRoots;hasRequiredNthRoots=1,Object.defineProperty(nthRoots,"__esModule",{value:!0}),nthRoots.nthRootsDocs=void 0;var et={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};return nthRoots.nthRootsDocs=et,nthRoots}var pow={},hasRequiredPow;function requirePow(){if(hasRequiredPow)return pow;hasRequiredPow=1,Object.defineProperty(pow,"__esModule",{value:!0}),pow.powDocs=void 0;var et={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","math.pow([[1, 2], [4, 3]], 2)","math.pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};return pow.powDocs=et,pow}var round={},hasRequiredRound;function requireRound(){if(hasRequiredRound)return round;hasRequiredRound=1,Object.defineProperty(round,"__esModule",{value:!0}),round.roundDocs=void 0;var et={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]};return round.roundDocs=et,round}var sign={},hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign;hasRequiredSign=1,Object.defineProperty(sign,"__esModule",{value:!0}),sign.signDocs=void 0;var et={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]};return sign.signDocs=et,sign}var sqrt={},hasRequiredSqrt;function requireSqrt(){if(hasRequiredSqrt)return sqrt;hasRequiredSqrt=1,Object.defineProperty(sqrt,"__esModule",{value:!0}),sqrt.sqrtDocs=void 0;var et={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]};return sqrt.sqrtDocs=et,sqrt}var sqrtm$1={},hasRequiredSqrtm$1;function requireSqrtm$1(){if(hasRequiredSqrtm$1)return sqrtm$1;hasRequiredSqrtm$1=1,Object.defineProperty(sqrtm$1,"__esModule",{value:!0}),sqrtm$1.sqrtmDocs=void 0;var et={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]};return sqrtm$1.sqrtmDocs=et,sqrtm$1}var square={},hasRequiredSquare;function requireSquare(){if(hasRequiredSquare)return square;hasRequiredSquare=1,Object.defineProperty(square,"__esModule",{value:!0}),square.squareDocs=void 0;var et={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]};return square.squareDocs=et,square}var subtract={},hasRequiredSubtract;function requireSubtract(){if(hasRequiredSubtract)return subtract;hasRequiredSubtract=1,Object.defineProperty(subtract,"__esModule",{value:!0}),subtract.subtractDocs=void 0;var et={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};return subtract.subtractDocs=et,subtract}var unaryMinus={},hasRequiredUnaryMinus;function requireUnaryMinus(){if(hasRequiredUnaryMinus)return unaryMinus;hasRequiredUnaryMinus=1,Object.defineProperty(unaryMinus,"__esModule",{value:!0}),unaryMinus.unaryMinusDocs=void 0;var et={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};return unaryMinus.unaryMinusDocs=et,unaryMinus}var unaryPlus={},hasRequiredUnaryPlus;function requireUnaryPlus(){if(hasRequiredUnaryPlus)return unaryPlus;hasRequiredUnaryPlus=1,Object.defineProperty(unaryPlus,"__esModule",{value:!0}),unaryPlus.unaryPlusDocs=void 0;var et={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};return unaryPlus.unaryPlusDocs=et,unaryPlus}var xgcd={},hasRequiredXgcd;function requireXgcd(){if(hasRequiredXgcd)return xgcd;hasRequiredXgcd=1,Object.defineProperty(xgcd,"__esModule",{value:!0}),xgcd.xgcdDocs=void 0;var et={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};return xgcd.xgcdDocs=et,xgcd}var bitAnd={},hasRequiredBitAnd;function requireBitAnd(){if(hasRequiredBitAnd)return bitAnd;hasRequiredBitAnd=1,Object.defineProperty(bitAnd,"__esModule",{value:!0}),bitAnd.bitAndDocs=void 0;var et={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};return bitAnd.bitAndDocs=et,bitAnd}var bitNot={},hasRequiredBitNot;function requireBitNot(){if(hasRequiredBitNot)return bitNot;hasRequiredBitNot=1,Object.defineProperty(bitNot,"__esModule",{value:!0}),bitNot.bitNotDocs=void 0;var et={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};return bitNot.bitNotDocs=et,bitNot}var bitOr={},hasRequiredBitOr;function requireBitOr(){if(hasRequiredBitOr)return bitOr;hasRequiredBitOr=1,Object.defineProperty(bitOr,"__esModule",{value:!0}),bitOr.bitOrDocs=void 0;var et={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]};return bitOr.bitOrDocs=et,bitOr}var bitXor={},hasRequiredBitXor;function requireBitXor(){if(hasRequiredBitXor)return bitXor;hasRequiredBitXor=1,Object.defineProperty(bitXor,"__esModule",{value:!0}),bitXor.bitXorDocs=void 0;var et={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};return bitXor.bitXorDocs=et,bitXor}var leftShift={},hasRequiredLeftShift;function requireLeftShift(){if(hasRequiredLeftShift)return leftShift;hasRequiredLeftShift=1,Object.defineProperty(leftShift,"__esModule",{value:!0}),leftShift.leftShiftDocs=void 0;var et={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};return leftShift.leftShiftDocs=et,leftShift}var rightArithShift={},hasRequiredRightArithShift;function requireRightArithShift(){if(hasRequiredRightArithShift)return rightArithShift;hasRequiredRightArithShift=1,Object.defineProperty(rightArithShift,"__esModule",{value:!0}),rightArithShift.rightArithShiftDocs=void 0;var et={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]};return rightArithShift.rightArithShiftDocs=et,rightArithShift}var rightLogShift={},hasRequiredRightLogShift;function requireRightLogShift(){if(hasRequiredRightLogShift)return rightLogShift;hasRequiredRightLogShift=1,Object.defineProperty(rightLogShift,"__esModule",{value:!0}),rightLogShift.rightLogShiftDocs=void 0;var et={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]};return rightLogShift.rightLogShiftDocs=et,rightLogShift}var bellNumbers$1={},hasRequiredBellNumbers$1;function requireBellNumbers$1(){if(hasRequiredBellNumbers$1)return bellNumbers$1;hasRequiredBellNumbers$1=1,Object.defineProperty(bellNumbers$1,"__esModule",{value:!0}),bellNumbers$1.bellNumbersDocs=void 0;var et={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};return bellNumbers$1.bellNumbersDocs=et,bellNumbers$1}var catalan$1={},hasRequiredCatalan$1;function requireCatalan$1(){if(hasRequiredCatalan$1)return catalan$1;hasRequiredCatalan$1=1,Object.defineProperty(catalan$1,"__esModule",{value:!0}),catalan$1.catalanDocs=void 0;var et={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]};return catalan$1.catalanDocs=et,catalan$1}var composition$1={},hasRequiredComposition$1;function requireComposition$1(){if(hasRequiredComposition$1)return composition$1;hasRequiredComposition$1=1,Object.defineProperty(composition$1,"__esModule",{value:!0}),composition$1.compositionDocs=void 0;var et={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};return composition$1.compositionDocs=et,composition$1}var stirlingS2$1={},hasRequiredStirlingS2$1;function requireStirlingS2$1(){if(hasRequiredStirlingS2$1)return stirlingS2$1;hasRequiredStirlingS2$1=1,Object.defineProperty(stirlingS2$1,"__esModule",{value:!0}),stirlingS2$1.stirlingS2Docs=void 0;var et={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]};return stirlingS2$1.stirlingS2Docs=et,stirlingS2$1}var arg={},hasRequiredArg;function requireArg(){if(hasRequiredArg)return arg;hasRequiredArg=1,Object.defineProperty(arg,"__esModule",{value:!0}),arg.argDocs=void 0;var et={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]};return arg.argDocs=et,arg}var conj={},hasRequiredConj;function requireConj(){if(hasRequiredConj)return conj;hasRequiredConj=1,Object.defineProperty(conj,"__esModule",{value:!0}),conj.conjDocs=void 0;var et={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]};return conj.conjDocs=et,conj}var im={},hasRequiredIm;function requireIm(){if(hasRequiredIm)return im;hasRequiredIm=1,Object.defineProperty(im,"__esModule",{value:!0}),im.imDocs=void 0;var et={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};return im.imDocs=et,im}var re$1={},hasRequiredRe;function requireRe(){if(hasRequiredRe)return re$1;hasRequiredRe=1,Object.defineProperty(re$1,"__esModule",{value:!0}),re$1.reDocs=void 0;var et={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};return re$1.reDocs=et,re$1}var evaluate={},hasRequiredEvaluate;function requireEvaluate(){if(hasRequiredEvaluate)return evaluate;hasRequiredEvaluate=1,Object.defineProperty(evaluate,"__esModule",{value:!0}),evaluate.evaluateDocs=void 0;var et={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]};return evaluate.evaluateDocs=et,evaluate}var help={},hasRequiredHelp$1;function requireHelp$1(){if(hasRequiredHelp$1)return help;hasRequiredHelp$1=1,Object.defineProperty(help,"__esModule",{value:!0}),help.helpDocs=void 0;var et={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};return help.helpDocs=et,help}var distance$1={},hasRequiredDistance$1;function requireDistance$1(){if(hasRequiredDistance$1)return distance$1;hasRequiredDistance$1=1,Object.defineProperty(distance$1,"__esModule",{value:!0}),distance$1.distanceDocs=void 0;var et={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]};return distance$1.distanceDocs=et,distance$1}var intersect$1={},hasRequiredIntersect$1;function requireIntersect$1(){if(hasRequiredIntersect$1)return intersect$1;hasRequiredIntersect$1=1,Object.defineProperty(intersect$1,"__esModule",{value:!0}),intersect$1.intersectDocs=void 0;var et={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};return intersect$1.intersectDocs=et,intersect$1}var and={},hasRequiredAnd;function requireAnd(){if(hasRequiredAnd)return and;hasRequiredAnd=1,Object.defineProperty(and,"__esModule",{value:!0}),and.andDocs=void 0;var et={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};return and.andDocs=et,and}var not={},hasRequiredNot;function requireNot(){if(hasRequiredNot)return not;hasRequiredNot=1,Object.defineProperty(not,"__esModule",{value:!0}),not.notDocs=void 0;var et={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]};return not.notDocs=et,not}var or={},hasRequiredOr;function requireOr(){if(hasRequiredOr)return or;hasRequiredOr=1,Object.defineProperty(or,"__esModule",{value:!0}),or.orDocs=void 0;var et={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]};return or.orDocs=et,or}var xor={},hasRequiredXor;function requireXor(){if(hasRequiredXor)return xor;hasRequiredXor=1,Object.defineProperty(xor,"__esModule",{value:!0}),xor.xorDocs=void 0;var et={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]};return xor.xorDocs=et,xor}var column={},hasRequiredColumn;function requireColumn(){if(hasRequiredColumn)return column;hasRequiredColumn=1,Object.defineProperty(column,"__esModule",{value:!0}),column.columnDocs=void 0;var et={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]};return column.columnDocs=et,column}var concat$1={},hasRequiredConcat;function requireConcat(){if(hasRequiredConcat)return concat$1;hasRequiredConcat=1,Object.defineProperty(concat$1,"__esModule",{value:!0}),concat$1.concatDocs=void 0;var et={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};return concat$1.concatDocs=et,concat$1}var count={},hasRequiredCount;function requireCount(){if(hasRequiredCount)return count;hasRequiredCount=1,Object.defineProperty(count,"__esModule",{value:!0}),count.countDocs=void 0;var et={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};return count.countDocs=et,count}var cross={},hasRequiredCross;function requireCross(){if(hasRequiredCross)return cross;hasRequiredCross=1,Object.defineProperty(cross,"__esModule",{value:!0}),cross.crossDocs=void 0;var et={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};return cross.crossDocs=et,cross}var ctranspose={},hasRequiredCtranspose;function requireCtranspose(){if(hasRequiredCtranspose)return ctranspose;hasRequiredCtranspose=1,Object.defineProperty(ctranspose,"__esModule",{value:!0}),ctranspose.ctransposeDocs=void 0;var et={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};return ctranspose.ctransposeDocs=et,ctranspose}var det$1={},hasRequiredDet$1;function requireDet$1(){if(hasRequiredDet$1)return det$1;hasRequiredDet$1=1,Object.defineProperty(det$1,"__esModule",{value:!0}),det$1.detDocs=void 0;var et={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};return det$1.detDocs=et,det$1}var diag={},hasRequiredDiag;function requireDiag(){if(hasRequiredDiag)return diag;hasRequiredDiag=1,Object.defineProperty(diag,"__esModule",{value:!0}),diag.diagDocs=void 0;var et={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};return diag.diagDocs=et,diag}var diff={},hasRequiredDiff;function requireDiff(){if(hasRequiredDiff)return diff;hasRequiredDiff=1,Object.defineProperty(diff,"__esModule",{value:!0}),diff.diffDocs=void 0;var et={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["diff([1, 2, 4, 7, 0])","diff([1, 2, 4, 7, 0], 0)","diff(matrix([1, 2, 4, 7, 0]))","diff([[1, 2], [3, 4]])","diff([[1, 2], [3, 4]], 0)","diff([[1, 2], [3, 4]], 1)","diff([[1, 2], [3, 4]], bignumber(1))","diff(matrix([[1, 2], [3, 4]]), 1)","diff([[1, 2], matrix([3, 4])], 1)"],seealso:["subtract","partitionSelect"]};return diff.diffDocs=et,diff}var dot={},hasRequiredDot;function requireDot(){if(hasRequiredDot)return dot;hasRequiredDot=1,Object.defineProperty(dot,"__esModule",{value:!0}),dot.dotDocs=void 0;var et={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};return dot.dotDocs=et,dot}var eigs$1={},hasRequiredEigs$1;function requireEigs$1(){if(hasRequiredEigs$1)return eigs$1;hasRequiredEigs$1=1,Object.defineProperty(eigs$1,"__esModule",{value:!0}),eigs$1.eigsDocs=void 0;var et={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]};return eigs$1.eigsDocs=et,eigs$1}var filter={},hasRequiredFilter;function requireFilter(){if(hasRequiredFilter)return filter;hasRequiredFilter=1,Object.defineProperty(filter,"__esModule",{value:!0}),filter.filterDocs=void 0;var et={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]};return filter.filterDocs=et,filter}var flatten$1={},hasRequiredFlatten;function requireFlatten(){if(hasRequiredFlatten)return flatten$1;hasRequiredFlatten=1,Object.defineProperty(flatten$1,"__esModule",{value:!0}),flatten$1.flattenDocs=void 0;var et={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]};return flatten$1.flattenDocs=et,flatten$1}var forEach={},hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1,Object.defineProperty(forEach,"__esModule",{value:!0}),forEach.forEachDocs=void 0;var et={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};return forEach.forEachDocs=et,forEach}var getMatrixDataType={},hasRequiredGetMatrixDataType;function requireGetMatrixDataType(){if(hasRequiredGetMatrixDataType)return getMatrixDataType;hasRequiredGetMatrixDataType=1,Object.defineProperty(getMatrixDataType,"__esModule",{value:!0}),getMatrixDataType.getMatrixDataTypeDocs=void 0;var et={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};return getMatrixDataType.getMatrixDataTypeDocs=et,getMatrixDataType}var identity$1={},hasRequiredIdentity;function requireIdentity(){if(hasRequiredIdentity)return identity$1;hasRequiredIdentity=1,Object.defineProperty(identity$1,"__esModule",{value:!0}),identity$1.identityDocs=void 0;var et={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]};return identity$1.identityDocs=et,identity$1}var inv$1={},hasRequiredInv$1;function requireInv$1(){if(hasRequiredInv$1)return inv$1;hasRequiredInv$1=1,Object.defineProperty(inv$1,"__esModule",{value:!0}),inv$1.invDocs=void 0;var et={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]};return inv$1.invDocs=et,inv$1}var pinv$1={},hasRequiredPinv$1;function requirePinv$1(){if(hasRequiredPinv$1)return pinv$1;hasRequiredPinv$1=1,Object.defineProperty(pinv$1,"__esModule",{value:!0}),pinv$1.pinvDocs=void 0;var et={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the MoorePenrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};return pinv$1.pinvDocs=et,pinv$1}var kron={},hasRequiredKron;function requireKron(){if(hasRequiredKron)return kron;hasRequiredKron=1,Object.defineProperty(kron,"__esModule",{value:!0}),kron.kronDocs=void 0;var et={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};return kron.kronDocs=et,kron}var map={},hasRequiredMap;function requireMap(){if(hasRequiredMap)return map;hasRequiredMap=1,Object.defineProperty(map,"__esModule",{value:!0}),map.mapDocs=void 0;var et={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};return map.mapDocs=et,map}var matrixFromColumns={},hasRequiredMatrixFromColumns;function requireMatrixFromColumns(){if(hasRequiredMatrixFromColumns)return matrixFromColumns;hasRequiredMatrixFromColumns=1,Object.defineProperty(matrixFromColumns,"__esModule",{value:!0}),matrixFromColumns.matrixFromColumnsDocs=void 0;var et={name:"matrixFromColumns",category:"Matrix",syntax:["math.matrixFromColumns(...arr)","math.matrixFromColumns(row1, row2)","math.matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};return matrixFromColumns.matrixFromColumnsDocs=et,matrixFromColumns}var matrixFromFunction={},hasRequiredMatrixFromFunction;function requireMatrixFromFunction(){if(hasRequiredMatrixFromFunction)return matrixFromFunction;hasRequiredMatrixFromFunction=1,Object.defineProperty(matrixFromFunction,"__esModule",{value:!0}),matrixFromFunction.matrixFromFunctionDocs=void 0;var et={name:"matrixFromFunction",category:"Matrix",syntax:["math.matrixFromFunction(size, fn)","math.matrixFromFunction(size, fn, format)","math.matrixFromFunction(size, fn, format, datatype)","math.matrixFromFunction(size, format, fn)","math.matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};return matrixFromFunction.matrixFromFunctionDocs=et,matrixFromFunction}var matrixFromRows={},hasRequiredMatrixFromRows;function requireMatrixFromRows(){if(hasRequiredMatrixFromRows)return matrixFromRows;hasRequiredMatrixFromRows=1,Object.defineProperty(matrixFromRows,"__esModule",{value:!0}),matrixFromRows.matrixFromRowsDocs=void 0;var et={name:"matrixFromRows",category:"Matrix",syntax:["math.matrixFromRows(...arr)","math.matrixFromRows(row1, row2)","math.matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};return matrixFromRows.matrixFromRowsDocs=et,matrixFromRows}var ones={},hasRequiredOnes;function requireOnes(){if(hasRequiredOnes)return ones;hasRequiredOnes=1,Object.defineProperty(ones,"__esModule",{value:!0}),ones.onesDocs=void 0;var et={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]};return ones.onesDocs=et,ones}var partitionSelect={},hasRequiredPartitionSelect;function requirePartitionSelect(){if(hasRequiredPartitionSelect)return partitionSelect;hasRequiredPartitionSelect=1,Object.defineProperty(partitionSelect,"__esModule",{value:!0}),partitionSelect.partitionSelectDocs=void 0;var et={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]};return partitionSelect.partitionSelectDocs=et,partitionSelect}var range$1={},hasRequiredRange;function requireRange(){if(hasRequiredRange)return range$1;hasRequiredRange=1,Object.defineProperty(range$1,"__esModule",{value:!0}),range$1.rangeDocs=void 0;var et={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]};return range$1.rangeDocs=et,range$1}var reshape={},hasRequiredReshape;function requireReshape(){if(hasRequiredReshape)return reshape;hasRequiredReshape=1,Object.defineProperty(reshape,"__esModule",{value:!0}),reshape.reshapeDocs=void 0;var et={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]};return reshape.reshapeDocs=et,reshape}var resize={},hasRequiredResize;function requireResize(){if(hasRequiredResize)return resize;hasRequiredResize=1,Object.defineProperty(resize,"__esModule",{value:!0}),resize.resizeDocs=void 0;var et={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]};return resize.resizeDocs=et,resize}var rotate={},hasRequiredRotate;function requireRotate(){if(hasRequiredRotate)return rotate;hasRequiredRotate=1,Object.defineProperty(rotate,"__esModule",{value:!0}),rotate.rotateDocs=void 0;var et={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], math.pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};return rotate.rotateDocs=et,rotate}var rotationMatrix={},hasRequiredRotationMatrix;function requireRotationMatrix(){if(hasRequiredRotationMatrix)return rotationMatrix;hasRequiredRotationMatrix=1,Object.defineProperty(rotationMatrix,"__esModule",{value:!0}),rotationMatrix.rotationMatrixDocs=void 0;var et={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};return rotationMatrix.rotationMatrixDocs=et,rotationMatrix}var row={},hasRequiredRow;function requireRow(){if(hasRequiredRow)return row;hasRequiredRow=1,Object.defineProperty(row,"__esModule",{value:!0}),row.rowDocs=void 0;var et={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]};return row.rowDocs=et,row}var size$1={},hasRequiredSize;function requireSize(){if(hasRequiredSize)return size$1;hasRequiredSize=1,Object.defineProperty(size$1,"__esModule",{value:!0}),size$1.sizeDocs=void 0;var et={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};return size$1.sizeDocs=et,size$1}var sort={},hasRequiredSort;function requireSort(){if(hasRequiredSort)return sort;hasRequiredSort=1,Object.defineProperty(sort,"__esModule",{value:!0}),sort.sortDocs=void 0;var et={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};return sort.sortDocs=et,sort}var squeeze={},hasRequiredSqueeze;function requireSqueeze(){if(hasRequiredSqueeze)return squeeze;hasRequiredSqueeze=1,Object.defineProperty(squeeze,"__esModule",{value:!0}),squeeze.squeezeDocs=void 0;var et={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]};return squeeze.squeezeDocs=et,squeeze}var subset={},hasRequiredSubset;function requireSubset(){if(hasRequiredSubset)return subset;hasRequiredSubset=1,Object.defineProperty(subset,"__esModule",{value:!0}),subset.subsetDocs=void 0;var et={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};return subset.subsetDocs=et,subset}var trace={},hasRequiredTrace;function requireTrace(){if(hasRequiredTrace)return trace;hasRequiredTrace=1,Object.defineProperty(trace,"__esModule",{value:!0}),trace.traceDocs=void 0;var et={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};return trace.traceDocs=et,trace}var transpose={},hasRequiredTranspose;function requireTranspose(){if(hasRequiredTranspose)return transpose;hasRequiredTranspose=1,Object.defineProperty(transpose,"__esModule",{value:!0}),transpose.transposeDocs=void 0;var et={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};return transpose.transposeDocs=et,transpose}var zeros={},hasRequiredZeros;function requireZeros(){if(hasRequiredZeros)return zeros;hasRequiredZeros=1,Object.defineProperty(zeros,"__esModule",{value:!0}),zeros.zerosDocs=void 0;var et={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]};return zeros.zerosDocs=et,zeros}var fft={},hasRequiredFft;function requireFft(){if(hasRequiredFft)return fft;hasRequiredFft=1,Object.defineProperty(fft,"__esModule",{value:!0}),fft.fftDocs=void 0;var et={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};return fft.fftDocs=et,fft}var ifft={},hasRequiredIfft;function requireIfft(){if(hasRequiredIfft)return ifft;hasRequiredIfft=1,Object.defineProperty(ifft,"__esModule",{value:!0}),ifft.ifftDocs=void 0;var et={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};return ifft.ifftDocs=et,ifft}var combinations$1={},hasRequiredCombinations$1;function requireCombinations$1(){if(hasRequiredCombinations$1)return combinations$1;hasRequiredCombinations$1=1,Object.defineProperty(combinations$1,"__esModule",{value:!0}),combinations$1.combinationsDocs=void 0;var et={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};return combinations$1.combinationsDocs=et,combinations$1}var combinationsWithRep$1={},hasRequiredCombinationsWithRep$1;function requireCombinationsWithRep$1(){if(hasRequiredCombinationsWithRep$1)return combinationsWithRep$1;hasRequiredCombinationsWithRep$1=1,Object.defineProperty(combinationsWithRep$1,"__esModule",{value:!0}),combinationsWithRep$1.combinationsWithRepDocs=void 0;var et={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};return combinationsWithRep$1.combinationsWithRepDocs=et,combinationsWithRep$1}var factorial$1={},hasRequiredFactorial$1;function requireFactorial$1(){if(hasRequiredFactorial$1)return factorial$1;hasRequiredFactorial$1=1,Object.defineProperty(factorial$1,"__esModule",{value:!0}),factorial$1.factorialDocs=void 0;var et={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};return factorial$1.factorialDocs=et,factorial$1}var gamma$1={},hasRequiredGamma$1;function requireGamma$1(){if(hasRequiredGamma$1)return gamma$1;hasRequiredGamma$1=1,Object.defineProperty(gamma$1,"__esModule",{value:!0}),gamma$1.gammaDocs=void 0;var et={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]};return gamma$1.gammaDocs=et,gamma$1}var lgamma$1={},hasRequiredLgamma$1;function requireLgamma$1(){if(hasRequiredLgamma$1)return lgamma$1;hasRequiredLgamma$1=1,Object.defineProperty(lgamma$1,"__esModule",{value:!0}),lgamma$1.lgammaDocs=void 0;var et={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(math.i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};return lgamma$1.lgammaDocs=et,lgamma$1}var kldivergence$1={},hasRequiredKldivergence$1;function requireKldivergence$1(){if(hasRequiredKldivergence$1)return kldivergence$1;hasRequiredKldivergence$1=1,Object.defineProperty(kldivergence$1,"__esModule",{value:!0}),kldivergence$1.kldivergenceDocs=void 0;var et={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};return kldivergence$1.kldivergenceDocs=et,kldivergence$1}var multinomial$1={},hasRequiredMultinomial$1;function requireMultinomial$1(){if(hasRequiredMultinomial$1)return multinomial$1;hasRequiredMultinomial$1=1,Object.defineProperty(multinomial$1,"__esModule",{value:!0}),multinomial$1.multinomialDocs=void 0;var et={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]};return multinomial$1.multinomialDocs=et,multinomial$1}var permutations$1={},hasRequiredPermutations$1;function requirePermutations$1(){if(hasRequiredPermutations$1)return permutations$1;hasRequiredPermutations$1=1,Object.defineProperty(permutations$1,"__esModule",{value:!0}),permutations$1.permutationsDocs=void 0;var et={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};return permutations$1.permutationsDocs=et,permutations$1}var pickRandom$1={},hasRequiredPickRandom$1;function requirePickRandom$1(){if(hasRequiredPickRandom$1)return pickRandom$1;hasRequiredPickRandom$1=1,Object.defineProperty(pickRandom$1,"__esModule",{value:!0}),pickRandom$1.pickRandomDocs=void 0;var et={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};return pickRandom$1.pickRandomDocs=et,pickRandom$1}var random$1={},hasRequiredRandom$1;function requireRandom$1(){if(hasRequiredRandom$1)return random$1;hasRequiredRandom$1=1,Object.defineProperty(random$1,"__esModule",{value:!0}),random$1.randomDocs=void 0;var et={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]};return random$1.randomDocs=et,random$1}var randomInt$1={},hasRequiredRandomInt$1;function requireRandomInt$1(){if(hasRequiredRandomInt$1)return randomInt$1;hasRequiredRandomInt$1=1,Object.defineProperty(randomInt$1,"__esModule",{value:!0}),randomInt$1.randomIntDocs=void 0;var et={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};return randomInt$1.randomIntDocs=et,randomInt$1}var compare={},hasRequiredCompare;function requireCompare(){if(hasRequiredCompare)return compare;hasRequiredCompare=1,Object.defineProperty(compare,"__esModule",{value:!0}),compare.compareDocs=void 0;var et={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]};return compare.compareDocs=et,compare}var compareNatural={},hasRequiredCompareNatural;function requireCompareNatural(){if(hasRequiredCompareNatural)return compareNatural;hasRequiredCompareNatural=1,Object.defineProperty(compareNatural,"__esModule",{value:!0}),compareNatural.compareNaturalDocs=void 0;var et={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]};return compareNatural.compareNaturalDocs=et,compareNatural}var compareText={},hasRequiredCompareText;function requireCompareText(){if(hasRequiredCompareText)return compareText;hasRequiredCompareText=1,Object.defineProperty(compareText,"__esModule",{value:!0}),compareText.compareTextDocs=void 0;var et={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]};return compareText.compareTextDocs=et,compareText}var deepEqual={},hasRequiredDeepEqual;function requireDeepEqual(){if(hasRequiredDeepEqual)return deepEqual;hasRequiredDeepEqual=1,Object.defineProperty(deepEqual,"__esModule",{value:!0}),deepEqual.deepEqualDocs=void 0;var et={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]};return deepEqual.deepEqualDocs=et,deepEqual}var equal={},hasRequiredEqual;function requireEqual(){if(hasRequiredEqual)return equal;hasRequiredEqual=1,Object.defineProperty(equal,"__esModule",{value:!0}),equal.equalDocs=void 0;var et={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]};return equal.equalDocs=et,equal}var equalText={},hasRequiredEqualText;function requireEqualText(){if(hasRequiredEqualText)return equalText;hasRequiredEqualText=1,Object.defineProperty(equalText,"__esModule",{value:!0}),equalText.equalTextDocs=void 0;var et={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]};return equalText.equalTextDocs=et,equalText}var larger={},hasRequiredLarger;function requireLarger(){if(hasRequiredLarger)return larger;hasRequiredLarger=1,Object.defineProperty(larger,"__esModule",{value:!0}),larger.largerDocs=void 0;var et={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]};return larger.largerDocs=et,larger}var largerEq={},hasRequiredLargerEq;function requireLargerEq(){if(hasRequiredLargerEq)return largerEq;hasRequiredLargerEq=1,Object.defineProperty(largerEq,"__esModule",{value:!0}),largerEq.largerEqDocs=void 0;var et={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]};return largerEq.largerEqDocs=et,largerEq}var smaller={},hasRequiredSmaller;function requireSmaller(){if(hasRequiredSmaller)return smaller;hasRequiredSmaller=1,Object.defineProperty(smaller,"__esModule",{value:!0}),smaller.smallerDocs=void 0;var et={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]};return smaller.smallerDocs=et,smaller}var smallerEq={},hasRequiredSmallerEq;function requireSmallerEq(){if(hasRequiredSmallerEq)return smallerEq;hasRequiredSmallerEq=1,Object.defineProperty(smallerEq,"__esModule",{value:!0}),smallerEq.smallerEqDocs=void 0;var et={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]};return smallerEq.smallerEqDocs=et,smallerEq}var unequal={},hasRequiredUnequal;function requireUnequal(){if(hasRequiredUnequal)return unequal;hasRequiredUnequal=1,Object.defineProperty(unequal,"__esModule",{value:!0}),unequal.unequalDocs=void 0;var et={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};return unequal.unequalDocs=et,unequal}var setCartesian={},hasRequiredSetCartesian;function requireSetCartesian(){if(hasRequiredSetCartesian)return setCartesian;hasRequiredSetCartesian=1,Object.defineProperty(setCartesian,"__esModule",{value:!0}),setCartesian.setCartesianDocs=void 0;var et={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};return setCartesian.setCartesianDocs=et,setCartesian}var setDifference={},hasRequiredSetDifference;function requireSetDifference(){if(hasRequiredSetDifference)return setDifference;hasRequiredSetDifference=1,Object.defineProperty(setDifference,"__esModule",{value:!0}),setDifference.setDifferenceDocs=void 0;var et={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};return setDifference.setDifferenceDocs=et,setDifference}var setDistinct={},hasRequiredSetDistinct;function requireSetDistinct(){if(hasRequiredSetDistinct)return setDistinct;hasRequiredSetDistinct=1,Object.defineProperty(setDistinct,"__esModule",{value:!0}),setDistinct.setDistinctDocs=void 0;var et={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};return setDistinct.setDistinctDocs=et,setDistinct}var setIntersect={},hasRequiredSetIntersect;function requireSetIntersect(){if(hasRequiredSetIntersect)return setIntersect;hasRequiredSetIntersect=1,Object.defineProperty(setIntersect,"__esModule",{value:!0}),setIntersect.setIntersectDocs=void 0;var et={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};return setIntersect.setIntersectDocs=et,setIntersect}var setIsSubset={},hasRequiredSetIsSubset;function requireSetIsSubset(){if(hasRequiredSetIsSubset)return setIsSubset;hasRequiredSetIsSubset=1,Object.defineProperty(setIsSubset,"__esModule",{value:!0}),setIsSubset.setIsSubsetDocs=void 0;var et={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};return setIsSubset.setIsSubsetDocs=et,setIsSubset}var setMultiplicity={},hasRequiredSetMultiplicity;function requireSetMultiplicity(){if(hasRequiredSetMultiplicity)return setMultiplicity;hasRequiredSetMultiplicity=1,Object.defineProperty(setMultiplicity,"__esModule",{value:!0}),setMultiplicity.setMultiplicityDocs=void 0;var et={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};return setMultiplicity.setMultiplicityDocs=et,setMultiplicity}var setPowerset={},hasRequiredSetPowerset;function requireSetPowerset(){if(hasRequiredSetPowerset)return setPowerset;hasRequiredSetPowerset=1,Object.defineProperty(setPowerset,"__esModule",{value:!0}),setPowerset.setPowersetDocs=void 0;var et={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};return setPowerset.setPowersetDocs=et,setPowerset}var setSize={},hasRequiredSetSize;function requireSetSize(){if(hasRequiredSetSize)return setSize;hasRequiredSetSize=1,Object.defineProperty(setSize,"__esModule",{value:!0}),setSize.setSizeDocs=void 0;var et={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]};return setSize.setSizeDocs=et,setSize}var setSymDifference={},hasRequiredSetSymDifference;function requireSetSymDifference(){if(hasRequiredSetSymDifference)return setSymDifference;hasRequiredSetSymDifference=1,Object.defineProperty(setSymDifference,"__esModule",{value:!0}),setSymDifference.setSymDifferenceDocs=void 0;var et={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]};return setSymDifference.setSymDifferenceDocs=et,setSymDifference}var setUnion={},hasRequiredSetUnion;function requireSetUnion(){if(hasRequiredSetUnion)return setUnion;hasRequiredSetUnion=1,Object.defineProperty(setUnion,"__esModule",{value:!0}),setUnion.setUnionDocs=void 0;var et={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]};return setUnion.setUnionDocs=et,setUnion}var erf={},hasRequiredErf;function requireErf(){if(hasRequiredErf)return erf;hasRequiredErf=1,Object.defineProperty(erf,"__esModule",{value:!0}),erf.erfDocs=void 0;var et={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]};return erf.erfDocs=et,erf}var mad$1={},hasRequiredMad$1;function requireMad$1(){if(hasRequiredMad$1)return mad$1;hasRequiredMad$1=1,Object.defineProperty(mad$1,"__esModule",{value:!0}),mad$1.madDocs=void 0;var et={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]};return mad$1.madDocs=et,mad$1}var max={},hasRequiredMax;function requireMax(){if(hasRequiredMax)return max;hasRequiredMax=1,Object.defineProperty(max,"__esModule",{value:!0}),max.maxDocs=void 0;var et={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]};return max.maxDocs=et,max}var mean$1={},hasRequiredMean$1;function requireMean$1(){if(hasRequiredMean$1)return mean$1;hasRequiredMean$1=1,Object.defineProperty(mean$1,"__esModule",{value:!0}),mean$1.meanDocs=void 0;var et={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]};return mean$1.meanDocs=et,mean$1}var median$1={},hasRequiredMedian$1;function requireMedian$1(){if(hasRequiredMedian$1)return median$1;hasRequiredMedian$1=1,Object.defineProperty(median$1,"__esModule",{value:!0}),median$1.medianDocs=void 0;var et={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]};return median$1.medianDocs=et,median$1}var min={},hasRequiredMin;function requireMin(){if(hasRequiredMin)return min;hasRequiredMin=1,Object.defineProperty(min,"__esModule",{value:!0}),min.minDocs=void 0;var et={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dim)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};return min.minDocs=et,min}var mode={},hasRequiredMode;function requireMode(){if(hasRequiredMode)return mode;hasRequiredMode=1,Object.defineProperty(mode,"__esModule",{value:!0}),mode.modeDocs=void 0;var et={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]};return mode.modeDocs=et,mode}var prod={},hasRequiredProd;function requireProd(){if(hasRequiredProd)return prod;hasRequiredProd=1,Object.defineProperty(prod,"__esModule",{value:!0}),prod.prodDocs=void 0;var et={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]};return prod.prodDocs=et,prod}var quantileSeq$1={},hasRequiredQuantileSeq$1;function requireQuantileSeq$1(){if(hasRequiredQuantileSeq$1)return quantileSeq$1;hasRequiredQuantileSeq$1=1,Object.defineProperty(quantileSeq$1,"__esModule",{value:!0}),quantileSeq$1.quantileSeqDocs=void 0;var et={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber.
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};return quantileSeq$1.quantileSeqDocs=et,quantileSeq$1}var std$1={},hasRequiredStd$1;function requireStd$1(){if(hasRequiredStd$1)return std$1;hasRequiredStd$1=1,Object.defineProperty(std$1,"__esModule",{value:!0}),std$1.stdDocs=void 0;var et={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]};return std$1.stdDocs=et,std$1}var cumsum$1={},hasRequiredCumsum$1;function requireCumsum$1(){if(hasRequiredCumsum$1)return cumsum$1;hasRequiredCumsum$1=1,Object.defineProperty(cumsum$1,"__esModule",{value:!0}),cumsum$1.cumSumDocs=void 0;var et={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};return cumsum$1.cumSumDocs=et,cumsum$1}var sum$1={},hasRequiredSum$1;function requireSum$1(){if(hasRequiredSum$1)return sum$1;hasRequiredSum$1=1,Object.defineProperty(sum$1,"__esModule",{value:!0}),sum$1.sumDocs=void 0;var et={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]};return sum$1.sumDocs=et,sum$1}var variance$1={},hasRequiredVariance$1;function requireVariance$1(){if(hasRequiredVariance$1)return variance$1;hasRequiredVariance$1=1,Object.defineProperty(variance$1,"__esModule",{value:!0}),variance$1.varianceDocs=void 0;var et={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};return variance$1.varianceDocs=et,variance$1}var acos={},hasRequiredAcos;function requireAcos(){if(hasRequiredAcos)return acos;hasRequiredAcos=1,Object.defineProperty(acos,"__esModule",{value:!0}),acos.acosDocs=void 0;var et={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]};return acos.acosDocs=et,acos}var acosh={},hasRequiredAcosh;function requireAcosh(){if(hasRequiredAcosh)return acosh;hasRequiredAcosh=1,Object.defineProperty(acosh,"__esModule",{value:!0}),acosh.acoshDocs=void 0;var et={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]};return acosh.acoshDocs=et,acosh}var acot={},hasRequiredAcot;function requireAcot(){if(hasRequiredAcot)return acot;hasRequiredAcot=1,Object.defineProperty(acot,"__esModule",{value:!0}),acot.acotDocs=void 0;var et={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};return acot.acotDocs=et,acot}var acoth={},hasRequiredAcoth;function requireAcoth(){if(hasRequiredAcoth)return acoth;hasRequiredAcoth=1,Object.defineProperty(acoth,"__esModule",{value:!0}),acoth.acothDocs=void 0;var et={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]};return acoth.acothDocs=et,acoth}var acsc={},hasRequiredAcsc;function requireAcsc(){if(hasRequiredAcsc)return acsc;hasRequiredAcsc=1,Object.defineProperty(acsc,"__esModule",{value:!0}),acsc.acscDocs=void 0;var et={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};return acsc.acscDocs=et,acsc}var acsch={},hasRequiredAcsch;function requireAcsch(){if(hasRequiredAcsch)return acsch;hasRequiredAcsch=1,Object.defineProperty(acsch,"__esModule",{value:!0}),acsch.acschDocs=void 0;var et={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};return acsch.acschDocs=et,acsch}var asec={},hasRequiredAsec;function requireAsec(){if(hasRequiredAsec)return asec;hasRequiredAsec=1,Object.defineProperty(asec,"__esModule",{value:!0}),asec.asecDocs=void 0;var et={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]};return asec.asecDocs=et,asec}var asech={},hasRequiredAsech;function requireAsech(){if(hasRequiredAsech)return asech;hasRequiredAsech=1,Object.defineProperty(asech,"__esModule",{value:!0}),asech.asechDocs=void 0;var et={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};return asech.asechDocs=et,asech}var asin={},hasRequiredAsin;function requireAsin(){if(hasRequiredAsin)return asin;hasRequiredAsin=1,Object.defineProperty(asin,"__esModule",{value:!0}),asin.asinDocs=void 0;var et={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};return asin.asinDocs=et,asin}var asinh={},hasRequiredAsinh;function requireAsinh(){if(hasRequiredAsinh)return asinh;hasRequiredAsinh=1,Object.defineProperty(asinh,"__esModule",{value:!0}),asinh.asinhDocs=void 0;var et={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};return asinh.asinhDocs=et,asinh}var atan={},hasRequiredAtan;function requireAtan(){if(hasRequiredAtan)return atan;hasRequiredAtan=1,Object.defineProperty(atan,"__esModule",{value:!0}),atan.atanDocs=void 0;var et={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]};return atan.atanDocs=et,atan}var atan2={},hasRequiredAtan2;function requireAtan2(){if(hasRequiredAtan2)return atan2;hasRequiredAtan2=1,Object.defineProperty(atan2,"__esModule",{value:!0}),atan2.atan2Docs=void 0;var et={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]};return atan2.atan2Docs=et,atan2}var atanh={},hasRequiredAtanh;function requireAtanh(){if(hasRequiredAtanh)return atanh;hasRequiredAtanh=1,Object.defineProperty(atanh,"__esModule",{value:!0}),atanh.atanhDocs=void 0;var et={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};return atanh.atanhDocs=et,atanh}var cos={},hasRequiredCos;function requireCos(){if(hasRequiredCos)return cos;hasRequiredCos=1,Object.defineProperty(cos,"__esModule",{value:!0}),cos.cosDocs=void 0;var et={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]};return cos.cosDocs=et,cos}var cosh={},hasRequiredCosh;function requireCosh(){if(hasRequiredCosh)return cosh;hasRequiredCosh=1,Object.defineProperty(cosh,"__esModule",{value:!0}),cosh.coshDocs=void 0;var et={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};return cosh.coshDocs=et,cosh}var cot={},hasRequiredCot;function requireCot(){if(hasRequiredCot)return cot;hasRequiredCot=1,Object.defineProperty(cot,"__esModule",{value:!0}),cot.cotDocs=void 0;var et={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]};return cot.cotDocs=et,cot}var coth={},hasRequiredCoth;function requireCoth(){if(hasRequiredCoth)return coth;hasRequiredCoth=1,Object.defineProperty(coth,"__esModule",{value:!0}),coth.cothDocs=void 0;var et={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]};return coth.cothDocs=et,coth}var csc={},hasRequiredCsc;function requireCsc(){if(hasRequiredCsc)return csc;hasRequiredCsc=1,Object.defineProperty(csc,"__esModule",{value:!0}),csc.cscDocs=void 0;var et={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]};return csc.cscDocs=et,csc}var csch={},hasRequiredCsch;function requireCsch(){if(hasRequiredCsch)return csch;hasRequiredCsch=1,Object.defineProperty(csch,"__esModule",{value:!0}),csch.cschDocs=void 0;var et={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]};return csch.cschDocs=et,csch}var sec={},hasRequiredSec;function requireSec(){if(hasRequiredSec)return sec;hasRequiredSec=1,Object.defineProperty(sec,"__esModule",{value:!0}),sec.secDocs=void 0;var et={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};return sec.secDocs=et,sec}var sech={},hasRequiredSech;function requireSech(){if(hasRequiredSech)return sech;hasRequiredSech=1,Object.defineProperty(sech,"__esModule",{value:!0}),sech.sechDocs=void 0;var et={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};return sech.sechDocs=et,sech}var sin={},hasRequiredSin;function requireSin(){if(hasRequiredSin)return sin;hasRequiredSin=1,Object.defineProperty(sin,"__esModule",{value:!0}),sin.sinDocs=void 0;var et={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]};return sin.sinDocs=et,sin}var sinh={},hasRequiredSinh;function requireSinh(){if(hasRequiredSinh)return sinh;hasRequiredSinh=1,Object.defineProperty(sinh,"__esModule",{value:!0}),sinh.sinhDocs=void 0;var et={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};return sinh.sinhDocs=et,sinh}var tan={},hasRequiredTan;function requireTan(){if(hasRequiredTan)return tan;hasRequiredTan=1,Object.defineProperty(tan,"__esModule",{value:!0}),tan.tanDocs=void 0;var et={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};return tan.tanDocs=et,tan}var tanh={},hasRequiredTanh;function requireTanh(){if(hasRequiredTanh)return tanh;hasRequiredTanh=1,Object.defineProperty(tanh,"__esModule",{value:!0}),tanh.tanhDocs=void 0;var et={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]};return tanh.tanhDocs=et,tanh}var to={},hasRequiredTo;function requireTo(){if(hasRequiredTo)return to;hasRequiredTo=1,Object.defineProperty(to,"__esModule",{value:!0}),to.toDocs=void 0;var et={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]};return to.toDocs=et,to}var bin={},hasRequiredBin;function requireBin(){if(hasRequiredBin)return bin;hasRequiredBin=1,Object.defineProperty(bin,"__esModule",{value:!0}),bin.binDocs=void 0;var et={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};return bin.binDocs=et,bin}var clone={},hasRequiredClone;function requireClone(){if(hasRequiredClone)return clone;hasRequiredClone=1,Object.defineProperty(clone,"__esModule",{value:!0}),clone.cloneDocs=void 0;var et={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]};return clone.cloneDocs=et,clone}var format={},hasRequiredFormat;function requireFormat(){if(hasRequiredFormat)return format;hasRequiredFormat=1,Object.defineProperty(format,"__esModule",{value:!0}),format.formatDocs=void 0;var et={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]};return format.formatDocs=et,format}var hasNumericValue={},hasRequiredHasNumericValue;function requireHasNumericValue(){if(hasRequiredHasNumericValue)return hasNumericValue;hasRequiredHasNumericValue=1,Object.defineProperty(hasNumericValue,"__esModule",{value:!0}),hasNumericValue.hasNumericValueDocs=void 0;var et={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};return hasNumericValue.hasNumericValueDocs=et,hasNumericValue}var hex$1={},hasRequiredHex;function requireHex(){if(hasRequiredHex)return hex$1;hasRequiredHex=1,Object.defineProperty(hex$1,"__esModule",{value:!0}),hex$1.hexDocs=void 0;var et={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};return hex$1.hexDocs=et,hex$1}var isInteger={},hasRequiredIsInteger;function requireIsInteger(){if(hasRequiredIsInteger)return isInteger;hasRequiredIsInteger=1,Object.defineProperty(isInteger,"__esModule",{value:!0}),isInteger.isIntegerDocs=void 0;var et={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]};return isInteger.isIntegerDocs=et,isInteger}var _isNaN={},hasRequired_isNaN;function require_isNaN(){if(hasRequired_isNaN)return _isNaN;hasRequired_isNaN=1,Object.defineProperty(_isNaN,"__esModule",{value:!0}),_isNaN.isNaNDocs=void 0;var et={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};return _isNaN.isNaNDocs=et,_isNaN}var isNegative={},hasRequiredIsNegative;function requireIsNegative(){if(hasRequiredIsNegative)return isNegative;hasRequiredIsNegative=1,Object.defineProperty(isNegative,"__esModule",{value:!0}),isNegative.isNegativeDocs=void 0;var et={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]};return isNegative.isNegativeDocs=et,isNegative}var isNumeric={},hasRequiredIsNumeric;function requireIsNumeric(){if(hasRequiredIsNumeric)return isNumeric;hasRequiredIsNumeric=1,Object.defineProperty(isNumeric,"__esModule",{value:!0}),isNumeric.isNumericDocs=void 0;var et={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]};return isNumeric.isNumericDocs=et,isNumeric}var isPositive={},hasRequiredIsPositive;function requireIsPositive(){if(hasRequiredIsPositive)return isPositive;hasRequiredIsPositive=1,Object.defineProperty(isPositive,"__esModule",{value:!0}),isPositive.isPositiveDocs=void 0;var et={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};return isPositive.isPositiveDocs=et,isPositive}var isPrime={},hasRequiredIsPrime;function requireIsPrime(){if(hasRequiredIsPrime)return isPrime;hasRequiredIsPrime=1,Object.defineProperty(isPrime,"__esModule",{value:!0}),isPrime.isPrimeDocs=void 0;var et={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};return isPrime.isPrimeDocs=et,isPrime}var isZero={},hasRequiredIsZero;function requireIsZero(){if(hasRequiredIsZero)return isZero;hasRequiredIsZero=1,Object.defineProperty(isZero,"__esModule",{value:!0}),isZero.isZeroDocs=void 0;var et={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]};return isZero.isZeroDocs=et,isZero}var numeric={},hasRequiredNumeric;function requireNumeric(){if(hasRequiredNumeric)return numeric;hasRequiredNumeric=1,Object.defineProperty(numeric,"__esModule",{value:!0}),numeric.numericDocs=void 0;var et={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]};return numeric.numericDocs=et,numeric}var oct={},hasRequiredOct;function requireOct(){if(hasRequiredOct)return oct;hasRequiredOct=1,Object.defineProperty(oct,"__esModule",{value:!0}),oct.octDocs=void 0;var et={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};return oct.octDocs=et,oct}var print={},hasRequiredPrint;function requirePrint(){if(hasRequiredPrint)return print;hasRequiredPrint=1,Object.defineProperty(print,"__esModule",{value:!0}),print.printDocs=void 0;var et={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $0, $1, $2", [6, 9, 4])'],seealso:["format"]};return print.printDocs=et,print}var typeOf={},hasRequiredTypeOf;function requireTypeOf(){if(hasRequiredTypeOf)return typeOf;hasRequiredTypeOf=1,Object.defineProperty(typeOf,"__esModule",{value:!0}),typeOf.typeOfDocs=void 0;var et={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};return typeOf.typeOfDocs=et,typeOf}var hasRequiredEmbeddedDocs;function requireEmbeddedDocs(){if(hasRequiredEmbeddedDocs)return embeddedDocs;hasRequiredEmbeddedDocs=1,Object.defineProperty(embeddedDocs,"__esModule",{value:!0}),embeddedDocs.embeddedDocs=void 0;var et=requireE(),_e=require_false(),tt=requireI(),rt=require_Infinity(),nt=requireLN10(),st=requireLN2(),dt=requireLOG10E(),ft=requireLOG2E(),ht=require_NaN(),mt=require_null(),bt=requirePhi(),St=requirePi(),Et=requireSQRT1_2(),Ct=requireSQRT2(),Rt=requireTau(),Tt=require_true(),wt=requireVersion$1(),At=requireBignumber(),Nt=requireBoolean(),Pt=requireComplex(),It=requireCreateUnit(),Ft=requireFraction(),qt=requireConstruction(),Vt=requireMatrix(),Kt=requireNumber(),jt=requireSparse(),Ut=requireSplitUnit(),Ot=requireString(),Wt=requireUnit(),Bt=requireConfig(),tr=require_import$1(),Jt=requireTyped(),ar=requireDerivative$1(),pr=requireLeafCount$1(),cr=requireLsolve(),gr=requireLsolveAll(),Sr=requireLup(),Er=requireLusolve(),Vr=requireQr(),Wr=requireRationalize$1(),Mr=requireResolve$1(),Nr=requireSimplify$1(),Yr=requireSimplifyCore$1(),Or=requireSlu(),Ar=requireSymbolicEqual$1(),Qr=requireUsolve(),hn=requireUsolveAll(),Sn=requireAbs(),Kr=requireAdd(),Hn=requireCbrt(),ln=requireCeil(),kn=requireCube(),xn=requireDivide$1(),An=requireDotDivide(),rs=requireDotMultiply(),qs=requireDotPow(),Ln=requireExp(),Cn=requireExpm$1(),Nn=requireExpm1(),Gr=requireFix(),tn=requireFloor(),dn=requireGcd(),Rn=requireHypot(),wn=requireInvmod(),Un=requireLcm(),Zn=requireLog(),pn=requireLog10(),Dn=requireLog1p(),qn=requireLog2(),_a=requireMod(),Vn=requireMultiply(),bs=requireNorm(),Is=requireNthRoot(),uo=requireNthRoots(),Rs=requirePow(),io=requireRound(),vo=requireSign(),Bo=requireSqrt(),En=requireSqrtm$1(),In=requireSquare(),ds=requireSubtract(),Ps=requireUnaryMinus(),yo=requireUnaryPlus(),rn=requireXgcd(),es=requireBitAnd(),Gs=requireBitNot(),Ro=requireBitOr(),ru=requireBitXor(),du=requireLeftShift(),Iu=requireRightArithShift(),Sl=requireRightLogShift(),Ko=requireBellNumbers$1(),Fl=requireCatalan$1(),gl=requireComposition$1(),Gu=requireStirlingS2$1(),Lu=requireArg(),Ku=requireConj(),uu=requireIm(),en=requireRe(),Jr=requireEvaluate(),vn=requireHelp$1(),fn=requireDistance$1(),gn=requireIntersect$1(),mn=requireAnd(),ss=requireNot(),ga=requireOr(),Ns=requireXor(),vs=requireColumn(),Xs=requireConcat(),co=requireCount(),ls=requireCross(),Mo=requireCtranspose(),Nu=requireDet$1(),Ou=requireDiag(),$u=requireDiff(),Hu=requireDot(),kl=requireEigs$1(),Uu=requireFilter(),tl=requireFlatten(),rl=requireForEach(),Wu=requireGetMatrixDataType(),tp=requireIdentity(),Al=requireInv$1(),om=requirePinv$1(),Op=requireKron(),op=requireMap(),wl=requireMatrixFromColumns(),um=requireMatrixFromFunction(),Im=requireMatrixFromRows(),Il=requireOnes(),sn=requirePartitionSelect(),mr=requireRange(),fr=requireReshape(),yr=requireResize(),jr=requireRotate(),un=requireRotationMatrix(),$n=requireRow(),Yn=requireSize(),os=requireSort(),Vs=requireSqueeze(),eo=requireSubset(),qo=requireTrace(),Po=requireTranspose(),su=requireZeros(),mu=requireFft(),zu=requireIfft(),lu=requireCombinations$1(),vl=requireCombinationsWithRep$1(),up=requireFactorial$1(),_c=requireGamma$1(),Bl=requireLgamma$1(),rp=requireKldivergence$1(),Kp=requireMultinomial$1(),lp=requirePermutations$1(),qp=requirePickRandom$1(),lm=requireRandom$1(),dl=requireRandomInt$1(),el=requireCompare(),gv=requireCompareNatural(),Vm=requireCompareText(),nl=requireDeepEqual(),Xo=requireEqual(),xm=requireEqualText(),nm=requireLarger(),vv=requireLargerEq(),rv=requireSmaller(),Lp=requireSmallerEq(),cp=requireUnequal(),nv=requireSetCartesian(),Hm=requireSetDifference(),Rv=requireSetDistinct(),mm=requireSetIntersect(),Wm=requireSetIsSubset(),uy=requireSetMultiplicity(),Sm=requireSetPowerset(),wm=requireSetSize(),tm=requireSetSymDifference(),iv=requireSetUnion(),_d=requireErf(),Xm=requireMad$1(),Cl=requireMax(),Cy=requireMean$1(),zv=requireMedian$1(),Fp=requireMin(),Tm=requireMode(),yv=requireProd(),_l=requireQuantileSeq$1(),Wp=requireStd$1(),Zp=requireCumsum$1(),Xp=requireSum$1(),np=requireVariance$1(),Rm=requireAcos(),_0=requireAcosh(),bv=requireAcot(),Cr=requireAcoth(),ir=requireAcsc(),nr=requireAcsch(),dr=requireAsec(),Pr=requireAsech(),Hr=requireAsin(),bn=requireAsinh(),Pn=requireAtan(),Wn=requireAtan2(),ms=requireAtanh(),Es=requireCos(),ao=requireCosh(),Js=requireCot(),po=requireCoth(),So=requireCsc(),$o=requireCsch(),Zo=requireSec(),au=requireSech(),ou=requireSin(),Yo=requireSinh(),Ru=requireTan(),ku=requireTanh(),Vu=requireTo(),sl=requireBin(),nu=requireClone(),fu=requireFormat(),Vo=requireHasNumericValue(),ll=requireHex(),zl=requireIsInteger(),Gl=require_isNaN(),Dl=requireIsNegative(),dp=requireIsNumeric(),Bp=requireIsPositive(),cm=requireIsPrime(),Rl=requireIsZero(),hl=requireNumeric(),hp=requireOct(),Cp=requirePrint(),il=requireTypeOf(),Jp={bignumber:At.bignumberDocs,boolean:Nt.booleanDocs,complex:Pt.complexDocs,createUnit:It.createUnitDocs,fraction:Ft.fractionDocs,index:qt.indexDocs,matrix:Vt.matrixDocs,number:Kt.numberDocs,sparse:jt.sparseDocs,splitUnit:Ut.splitUnitDocs,string:Ot.stringDocs,unit:Wt.unitDocs,e:et.eDocs,E:et.eDocs,false:_e.falseDocs,i:tt.iDocs,Infinity:rt.InfinityDocs,LN2:st.LN2Docs,LN10:nt.LN10Docs,LOG2E:ft.LOG2EDocs,LOG10E:dt.LOG10EDocs,NaN:ht.NaNDocs,null:mt.nullDocs,pi:St.piDocs,PI:St.piDocs,phi:bt.phiDocs,SQRT1_2:Et.SQRT12Docs,SQRT2:Ct.SQRT2Docs,tau:Rt.tauDocs,true:Tt.trueDocs,version:wt.versionDocs,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:ar.derivativeDocs,lsolve:cr.lsolveDocs,lsolveAll:gr.lsolveAllDocs,lup:Sr.lupDocs,lusolve:Er.lusolveDocs,leafCount:pr.leafCountDocs,resolve:Mr.resolveDocs,simplify:Nr.simplifyDocs,simplifyCore:Yr.simplifyCoreDocs,symbolicEqual:Ar.symbolicEqualDocs,rationalize:Wr.rationalizeDocs,slu:Or.sluDocs,usolve:Qr.usolveDocs,usolveAll:hn.usolveAllDocs,qr:Vr.qrDocs,abs:Sn.absDocs,add:Kr.addDocs,cbrt:Hn.cbrtDocs,ceil:ln.ceilDocs,cube:kn.cubeDocs,divide:xn.divideDocs,dotDivide:An.dotDivideDocs,dotMultiply:rs.dotMultiplyDocs,dotPow:qs.dotPowDocs,exp:Ln.expDocs,expm:Cn.expmDocs,expm1:Nn.expm1Docs,fix:Gr.fixDocs,floor:tn.floorDocs,gcd:dn.gcdDocs,hypot:Rn.hypotDocs,lcm:Un.lcmDocs,log:Zn.logDocs,log2:qn.log2Docs,log1p:Dn.log1pDocs,log10:pn.log10Docs,mod:_a.modDocs,multiply:Vn.multiplyDocs,norm:bs.normDocs,nthRoot:Is.nthRootDocs,nthRoots:uo.nthRootsDocs,pow:Rs.powDocs,round:io.roundDocs,sign:vo.signDocs,sqrt:Bo.sqrtDocs,sqrtm:En.sqrtmDocs,square:In.squareDocs,subtract:ds.subtractDocs,unaryMinus:Ps.unaryMinusDocs,unaryPlus:yo.unaryPlusDocs,xgcd:rn.xgcdDocs,invmod:wn.invmodDocs,bitAnd:es.bitAndDocs,bitNot:Gs.bitNotDocs,bitOr:Ro.bitOrDocs,bitXor:ru.bitXorDocs,leftShift:du.leftShiftDocs,rightArithShift:Iu.rightArithShiftDocs,rightLogShift:Sl.rightLogShiftDocs,bellNumbers:Ko.bellNumbersDocs,catalan:Fl.catalanDocs,composition:gl.compositionDocs,stirlingS2:Gu.stirlingS2Docs,config:Bt.configDocs,import:tr.importDocs,typed:Jt.typedDocs,arg:Lu.argDocs,conj:Ku.conjDocs,re:en.reDocs,im:uu.imDocs,evaluate:Jr.evaluateDocs,help:vn.helpDocs,distance:fn.distanceDocs,intersect:gn.intersectDocs,and:mn.andDocs,not:ss.notDocs,or:ga.orDocs,xor:Ns.xorDocs,concat:Xs.concatDocs,count:co.countDocs,cross:ls.crossDocs,column:vs.columnDocs,ctranspose:Mo.ctransposeDocs,det:Nu.detDocs,diag:Ou.diagDocs,diff:$u.diffDocs,dot:Hu.dotDocs,getMatrixDataType:Wu.getMatrixDataTypeDocs,identity:tp.identityDocs,filter:Uu.filterDocs,flatten:tl.flattenDocs,forEach:rl.forEachDocs,inv:Al.invDocs,pinv:om.pinvDocs,eigs:kl.eigsDocs,kron:Op.kronDocs,matrixFromFunction:um.matrixFromFunctionDocs,matrixFromRows:Im.matrixFromRowsDocs,matrixFromColumns:wl.matrixFromColumnsDocs,map:op.mapDocs,ones:Il.onesDocs,partitionSelect:sn.partitionSelectDocs,range:mr.rangeDocs,resize:yr.resizeDocs,reshape:fr.reshapeDocs,rotate:jr.rotateDocs,rotationMatrix:un.rotationMatrixDocs,row:$n.rowDocs,size:Yn.sizeDocs,sort:os.sortDocs,squeeze:Vs.squeezeDocs,subset:eo.subsetDocs,trace:qo.traceDocs,transpose:Po.transposeDocs,zeros:su.zerosDocs,fft:mu.fftDocs,ifft:zu.ifftDocs,combinations:lu.combinationsDocs,combinationsWithRep:vl.combinationsWithRepDocs,factorial:up.factorialDocs,gamma:_c.gammaDocs,kldivergence:rp.kldivergenceDocs,lgamma:Bl.lgammaDocs,multinomial:Kp.multinomialDocs,permutations:lp.permutationsDocs,pickRandom:qp.pickRandomDocs,random:lm.randomDocs,randomInt:dl.randomIntDocs,compare:el.compareDocs,compareNatural:gv.compareNaturalDocs,compareText:Vm.compareTextDocs,deepEqual:nl.deepEqualDocs,equal:Xo.equalDocs,equalText:xm.equalTextDocs,larger:nm.largerDocs,largerEq:vv.largerEqDocs,smaller:rv.smallerDocs,smallerEq:Lp.smallerEqDocs,unequal:cp.unequalDocs,setCartesian:nv.setCartesianDocs,setDifference:Hm.setDifferenceDocs,setDistinct:Rv.setDistinctDocs,setIntersect:mm.setIntersectDocs,setIsSubset:Wm.setIsSubsetDocs,setMultiplicity:uy.setMultiplicityDocs,setPowerset:Sm.setPowersetDocs,setSize:wm.setSizeDocs,setSymDifference:tm.setSymDifferenceDocs,setUnion:iv.setUnionDocs,erf:_d.erfDocs,cumsum:Zp.cumSumDocs,mad:Xm.madDocs,max:Cl.maxDocs,mean:Cy.meanDocs,median:zv.medianDocs,min:Fp.minDocs,mode:Tm.modeDocs,prod:yv.prodDocs,quantileSeq:_l.quantileSeqDocs,std:Wp.stdDocs,sum:Xp.sumDocs,variance:np.varianceDocs,acos:Rm.acosDocs,acosh:_0.acoshDocs,acot:bv.acotDocs,acoth:Cr.acothDocs,acsc:ir.acscDocs,acsch:nr.acschDocs,asec:dr.asecDocs,asech:Pr.asechDocs,asin:Hr.asinDocs,asinh:bn.asinhDocs,atan:Pn.atanDocs,atanh:ms.atanhDocs,atan2:Wn.atan2Docs,cos:Es.cosDocs,cosh:ao.coshDocs,cot:Js.cotDocs,coth:po.cothDocs,csc:So.cscDocs,csch:$o.cschDocs,sec:Zo.secDocs,sech:au.sechDocs,sin:ou.sinDocs,sinh:Yo.sinhDocs,tan:Ru.tanDocs,tanh:ku.tanhDocs,to:Vu.toDocs,clone:nu.cloneDocs,format:fu.formatDocs,bin:sl.binDocs,oct:hp.octDocs,hex:ll.hexDocs,isNaN:Gl.isNaNDocs,isInteger:zl.isIntegerDocs,isNegative:Dl.isNegativeDocs,isNumeric:dp.isNumericDocs,hasNumericValue:Vo.hasNumericValueDocs,isPositive:Bp.isPositiveDocs,isPrime:cm.isPrimeDocs,isZero:Rl.isZeroDocs,print:Cp.printDocs,typeOf:il.typeOfDocs,numeric:hl.numericDocs};return embeddedDocs.embeddedDocs=Jp,embeddedDocs}var hasRequiredHelp;function requireHelp(){if(hasRequiredHelp)return help$1;hasRequiredHelp=1,Object.defineProperty(help$1,"__esModule",{value:!0}),help$1.createHelp=void 0;var et=requireFactory(),_e=requireCustoms(),tt=requireEmbeddedDocs(),rt=requireObject(),nt="help",st=["typed","mathWithTransform","Help"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.mathWithTransform,bt=ft.Help;return ht(nt,{any:function(Et){var Ct,Rt=Et;if(typeof Et!="string"){for(Ct in mt)if((0,rt.hasOwnProperty)(mt,Ct)&&Et===mt[Ct]){Rt=Ct;break}}var Tt=(0,_e.getSafeProperty)(tt.embeddedDocs,Rt);if(!Tt){var wt=typeof Rt=="function"?Rt.name:Rt;throw new Error('No documentation found on "'+wt+'"')}return new bt(Tt)}})});return help$1.createHelp=dt,help$1}var chain={},hasRequiredChain;function requireChain(){if(hasRequiredChain)return chain;hasRequiredChain=1,Object.defineProperty(chain,"__esModule",{value:!0}),chain.createChain=void 0;var et=requireFactory(),_e="chain",tt=["typed","Chain"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.Chain;return st(_e,{"":function(){return new dt},any:function(ht){return new dt(ht)}})});return chain.createChain=rt,chain}var det={},hasRequiredDet;function requireDet(){if(hasRequiredDet)return det;hasRequiredDet=1,Object.defineProperty(det,"__esModule",{value:!0}),det.createDet=void 0;var et=requireIs(),_e=requireObject(),tt=requireString$2(),rt=requireFactory(),nt="det",st=["typed","matrix","subtract","multiply","divideScalar","isZero","unaryMinus"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.subtract,St=ft.multiply,Et=ft.divideScalar,Ct=ft.isZero,Rt=ft.unaryMinus;return ht(nt,{any:function(At){return(0,_e.clone)(At)},"Array | Matrix":function(At){var Nt;switch((0,et.isMatrix)(At)?Nt=At.size():Array.isArray(At)?(At=mt(At),Nt=At.size()):Nt=[],Nt.length){case 0:return(0,_e.clone)(At);case 1:if(Nt[0]===1)return(0,_e.clone)(At.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+(0,tt.format)(Nt)+")");case 2:{var Pt=Nt[0],It=Nt[1];if(Pt===It)return Tt(At.clone().valueOf(),Pt);throw new RangeError("Matrix must be square (size: "+(0,tt.format)(Nt)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+(0,tt.format)(Nt)+")")}}});function Tt(wt,At,Nt){if(At===1)return(0,_e.clone)(wt[0][0]);if(At===2)return bt(St(wt[0][0],wt[1][1]),St(wt[1][0],wt[0][1]));for(var Pt=!1,It=new Array(At).fill(0).map(function(tr,Jt){return Jt}),Ft=0;Ft<At;Ft++){var qt=It[Ft];if(Ct(wt[qt][Ft])){var Vt=void 0;for(Vt=Ft+1;Vt<At;Vt++)if(!Ct(wt[It[Vt]][Ft])){qt=It[Vt],It[Vt]=It[Ft],It[Ft]=qt,Pt=!Pt;break}if(Vt===At)return wt[qt][Ft]}for(var Kt=wt[qt][Ft],jt=Ft===0?1:wt[It[Ft-1]][Ft-1],Ut=Ft+1;Ut<At;Ut++)for(var Ot=It[Ut],Wt=Ft+1;Wt<At;Wt++)wt[Ot][Wt]=Et(bt(St(wt[Ot][Wt],Kt),St(wt[Ot][Ft],wt[qt][Wt])),jt)}var Bt=wt[It[At-1]][At-1];return Pt?Rt(Bt):Bt}});return det.createDet=dt,det}var inv={},hasRequiredInv;function requireInv(){if(hasRequiredInv)return inv;hasRequiredInv=1,Object.defineProperty(inv,"__esModule",{value:!0}),inv.createInv=void 0;var et=requireIs(),_e=requireArray(),tt=requireFactory(),rt=requireString$2(),nt="inv",st=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.divideScalar,St=ft.addScalar,Et=ft.multiply,Ct=ft.unaryMinus,Rt=ft.det,Tt=ft.identity,wt=ft.abs;return ht(nt,{"Array | Matrix":function(Pt){var It=(0,et.isMatrix)(Pt)?Pt.size():(0,_e.arraySize)(Pt);switch(It.length){case 1:if(It[0]===1)return(0,et.isMatrix)(Pt)?mt([bt(1,Pt.valueOf()[0])]):[bt(1,Pt[0])];throw new RangeError("Matrix must be square (size: "+(0,rt.format)(It)+")");case 2:{var Ft=It[0],qt=It[1];if(Ft===qt)return(0,et.isMatrix)(Pt)?mt(At(Pt.valueOf(),Ft,qt),Pt.storage()):At(Pt,Ft,qt);throw new RangeError("Matrix must be square (size: "+(0,rt.format)(It)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+(0,rt.format)(It)+")")}},any:function(Pt){return bt(1,Pt)}});function At(Nt,Pt,It){var Ft,qt,Vt,Kt,jt;if(Pt===1){if(Kt=Nt[0][0],Kt===0)throw Error("Cannot calculate inverse, determinant is zero");return[[bt(1,Kt)]]}else if(Pt===2){var Ut=Rt(Nt);if(Ut===0)throw Error("Cannot calculate inverse, determinant is zero");return[[bt(Nt[1][1],Ut),bt(Ct(Nt[0][1]),Ut)],[bt(Ct(Nt[1][0]),Ut),bt(Nt[0][0],Ut)]]}else{var Ot=Nt.concat();for(Ft=0;Ft<Pt;Ft++)Ot[Ft]=Ot[Ft].concat();for(var Wt=Tt(Pt).valueOf(),Bt=0;Bt<It;Bt++){var tr=wt(Ot[Bt][Bt]),Jt=Bt;for(Ft=Bt+1;Ft<Pt;)wt(Ot[Ft][Bt])>tr&&(tr=wt(Ot[Ft][Bt]),Jt=Ft),Ft++;if(tr===0)throw Error("Cannot calculate inverse, determinant is zero");Ft=Jt,Ft!==Bt&&(jt=Ot[Bt],Ot[Bt]=Ot[Ft],Ot[Ft]=jt,jt=Wt[Bt],Wt[Bt]=Wt[Ft],Wt[Ft]=jt);var ar=Ot[Bt],pr=Wt[Bt];for(Ft=0;Ft<Pt;Ft++){var cr=Ot[Ft],gr=Wt[Ft];if(Ft!==Bt){if(cr[Bt]!==0){for(Vt=bt(Ct(cr[Bt]),ar[Bt]),qt=Bt;qt<It;qt++)cr[qt]=St(cr[qt],Et(Vt,ar[qt]));for(qt=0;qt<It;qt++)gr[qt]=St(gr[qt],Et(Vt,pr[qt]))}}else{for(Vt=ar[Bt],qt=Bt;qt<It;qt++)cr[qt]=bt(cr[qt],Vt);for(qt=0;qt<It;qt++)gr[qt]=bt(gr[qt],Vt)}}}return Wt}}});return inv.createInv=dt,inv}var pinv={},hasRequiredPinv;function requirePinv(){if(hasRequiredPinv)return pinv;hasRequiredPinv=1,Object.defineProperty(pinv,"__esModule",{value:!0}),pinv.createPinv=void 0;var et=requireIs(),_e=requireArray(),tt=requireFactory(),rt=requireString$2(),nt=requireObject(),st="pinv",dt=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],ft=(0,tt.factory)(st,dt,function(ht){var mt=ht.typed,bt=ht.matrix,St=ht.inv,Et=ht.deepEqual,Ct=ht.equal,Rt=ht.dotDivide,Tt=ht.dot,wt=ht.ctranspose,At=ht.divideScalar,Nt=ht.multiply,Pt=ht.add,It=ht.Complex;return mt(st,{"Array | Matrix":function(Ot){var Wt=(0,et.isMatrix)(Ot)?Ot.size():(0,_e.arraySize)(Ot);switch(Wt.length){case 1:return jt(Ot)?wt(Ot):Wt[0]===1?St(Ot):Rt(wt(Ot),Tt(Ot,Ot));case 2:{if(jt(Ot))return wt(Ot);var Bt=Wt[0],tr=Wt[1];if(Bt===tr)try{return St(Ot)}catch(Jt){if(!(Jt instanceof Error&&Jt.message.match(/Cannot calculate inverse, determinant is zero/)))throw Jt}return(0,et.isMatrix)(Ot)?bt(Ft(Ot.valueOf(),Bt,tr),Ot.storage()):Ft(Ot,Bt,tr)}default:throw new RangeError("Matrix must be two dimensional (size: "+(0,rt.format)(Wt)+")")}},any:function(Ot){return Ct(Ot,0)?(0,nt.clone)(Ot):At(1,Ot)}});function Ft(Ut,Ot,Wt){var Bt=Vt(Ut,Ot,Wt),tr=Bt.C,Jt=Bt.F,ar=Nt(St(Nt(wt(tr),tr)),wt(tr)),pr=Nt(wt(Jt),St(Nt(Jt,wt(Jt))));return Nt(pr,ar)}function qt(Ut,Ot,Wt){for(var Bt=(0,nt.clone)(Ut),tr=0,Jt=0;Jt<Ot;Jt++){if(Wt<=tr)return Bt;for(var ar=Jt;Kt(Bt[ar][tr]);)if(ar++,Ot===ar&&(ar=Jt,tr++,Wt===tr))return Bt;var pr=[Bt[Jt],Bt[ar]];Bt[ar]=pr[0],Bt[Jt]=pr[1];for(var cr=Bt[Jt][tr],gr=0;gr<Wt;gr++)Bt[Jt][gr]=Rt(Bt[Jt][gr],cr);for(var Sr=0;Sr<Ot;Sr++)if(Sr!==Jt){cr=Bt[Sr][tr];for(var Er=0;Er<Wt;Er++)Bt[Sr][Er]=Pt(Bt[Sr][Er],Nt(-1,Nt(cr,Bt[Jt][Er])))}tr++}return Bt}function Vt(Ut,Ot,Wt){var Bt=qt(Ut,Ot,Wt),tr=Ut.map(function(ar,pr){return ar.filter(function(cr,gr){return gr<Ot&&!Kt(Tt(Bt[gr],Bt[gr]))})}),Jt=Bt.filter(function(ar,pr){return!Kt(Tt(Bt[pr],Bt[pr]))});return{C:tr,F:Jt}}function Kt(Ut){return Ct(Pt(Ut,It(1,1)),Pt(0,It(1,1)))}function jt(Ut){return Et(Pt(Ut,It(1,1)),Pt(Nt(Ut,0),It(1,1)))}});return pinv.createPinv=ft,pinv}var eigs={},complexEigs={},hasRequiredComplexEigs;function requireComplexEigs(){if(hasRequiredComplexEigs)return complexEigs;hasRequiredComplexEigs=1;var et=requireInteropRequireDefault();Object.defineProperty(complexEigs,"__esModule",{value:!0}),complexEigs.createComplexEigs=dt;var _e=et(requireToConsumableArray()),tt=requireObject();function rt(ft,ht){var mt=typeof Symbol<"u"&&ft[Symbol.iterator]||ft["@@iterator"];if(!mt){if(Array.isArray(ft)||(mt=nt(ft))||ht){mt&&(ft=mt);var bt=0,St=function(){};return{s:St,n:function(){return bt>=ft.length?{done:!0}:{done:!1,value:ft[bt++]}},e:function(wt){throw wt},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Et=!0,Ct=!1,Rt;return{s:function(){mt=mt.call(ft)},n:function(){var wt=mt.next();return Et=wt.done,wt},e:function(wt){Ct=!0,Rt=wt},f:function(){try{!Et&&mt.return!=null&&mt.return()}finally{if(Ct)throw Rt}}}}function nt(ft,ht){if(ft){if(typeof ft=="string")return st(ft,ht);var mt=Object.prototype.toString.call(ft).slice(8,-1);if(mt==="Object"&&ft.constructor&&(mt=ft.constructor.name),mt==="Map"||mt==="Set")return Array.from(ft);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return st(ft,ht)}}function st(ft,ht){(ht==null||ht>ft.length)&&(ht=ft.length);for(var mt=0,bt=new Array(ht);mt<ht;mt++)bt[mt]=ft[mt];return bt}function dt(ft){var ht=ft.addScalar,mt=ft.subtract,bt=ft.flatten,St=ft.multiply,Et=ft.multiplyScalar,Ct=ft.divideScalar,Rt=ft.sqrt,Tt=ft.abs,wt=ft.bignumber,At=ft.diag,Nt=ft.inv,Pt=ft.qr,It=ft.usolve,Ft=ft.usolveAll,qt=ft.equal,Vt=ft.complex,Kt=ft.larger,jt=ft.smaller,Ut=ft.matrixFromColumns,Ot=ft.dot;function Wt(Or,Ar,Qr,hn,Sn){Sn===void 0&&(Sn=!0);var Kr=Bt(Or,Ar,Qr,hn,Sn);tr(Or,Ar,Qr,hn,Sn,Kr);var Hn=Jt(Or,Ar,Qr,hn,Sn),ln=Hn.values,kn=Hn.C,xn;return Sn&&(xn=ar(Or,Ar,kn,Kr,ln,Qr,hn),xn=Ut.apply(void 0,(0,_e.default)(xn))),{values:ln,vectors:xn}}function Bt(Or,Ar,Qr,hn,Sn){var Kr=hn==="BigNumber",Hn=hn==="Complex",ln=Kr?wt(0):0,kn=Kr?wt(1):Hn?Vt(1):1,xn=Kr?wt(1):1,An=Kr?wt(10):2,rs=Et(An,An),qs;Sn&&(qs=Array(Ar).fill(kn));for(var Ln=!1;!Ln;){Ln=!0;for(var Cn=0;Cn<Ar;Cn++){for(var Nn=ln,Gr=ln,tn=0;tn<Ar;tn++)if(Cn!==tn){var dn=Tt(Or[Cn][tn]);Nn=ht(Nn,dn),Gr=ht(Gr,dn)}if(!qt(Nn,0)&&!qt(Gr,0)){for(var Rn=xn,wn=Nn,Un=Ct(Gr,An),Zn=Et(Gr,An);jt(wn,Un);)wn=Et(wn,rs),Rn=Et(Rn,An);for(;Kt(wn,Zn);)wn=Ct(wn,rs),Rn=Ct(Rn,An);var pn=jt(Ct(ht(wn,Gr),Rn),Et(ht(Nn,Gr),.95));if(pn){Ln=!1;for(var Dn=Ct(1,Rn),qn=0;qn<Ar;qn++)Cn!==qn&&(Or[Cn][qn]=Et(Or[Cn][qn],Rn),Or[qn][Cn]=Et(Or[qn][Cn],Dn));Sn&&(qs[Cn]=Et(qs[Cn],Rn))}}}}return At(qs)}function tr(Or,Ar,Qr,hn,Sn,Kr){var Hn=hn==="BigNumber",ln=hn==="Complex",kn=Hn?wt(0):ln?Vt(0):0;Hn&&(Qr=wt(Qr));for(var xn=0;xn<Ar-2;xn++){for(var An=0,rs=kn,qs=xn+1;qs<Ar;qs++){var Ln=Or[qs][xn];jt(Tt(rs),Tt(Ln))&&(rs=Ln,An=qs)}if(!jt(Tt(rs),Qr)){if(An!==xn+1){var Cn=Or[An];Or[An]=Or[xn+1],Or[xn+1]=Cn;for(var Nn=0;Nn<Ar;Nn++){var Gr=Or[Nn][An];Or[Nn][An]=Or[Nn][xn+1],Or[Nn][xn+1]=Gr}if(Sn){var tn=Kr[An];Kr[An]=Kr[xn+1],Kr[xn+1]=tn}}for(var dn=xn+2;dn<Ar;dn++){var Rn=Ct(Or[dn][xn],rs);if(Rn!==0){for(var wn=0;wn<Ar;wn++)Or[dn][wn]=mt(Or[dn][wn],Et(Rn,Or[xn+1][wn]));for(var Un=0;Un<Ar;Un++)Or[Un][xn+1]=ht(Or[Un][xn+1],Et(Rn,Or[Un][dn]));if(Sn)for(var Zn=0;Zn<Ar;Zn++)Kr[dn][Zn]=mt(Kr[dn][Zn],Et(Rn,Kr[xn+1][Zn]))}}}}return Kr}function Jt(Or,Ar,Qr,hn,Sn){var Kr=hn==="BigNumber",Hn=hn==="Complex",ln=Kr?wt(1):Hn?Vt(1):1;Kr&&(Qr=wt(Qr));for(var kn=(0,tt.clone)(Or),xn=[],An=Ar,rs=[],qs=Sn?At(Array(Ar).fill(ln)):void 0,Ln=Sn?At(Array(An).fill(ln)):void 0,Cn=0;Cn<=100;){Cn+=1;for(var Nn=0,Gr=0;Gr<An;Gr++)kn[Gr][Gr]=mt(kn[Gr][Gr],Nn);var tn=Pt(kn),dn=tn.Q,Rn=tn.R;kn=St(Rn,dn);for(var wn=0;wn<An;wn++)kn[wn][wn]=ht(kn[wn][wn],Nn);if(Sn&&(Ln=St(Ln,dn)),An===1||jt(Tt(kn[An-1][An-2]),Qr)){Cn=0,xn.push(kn[An-1][An-1]),Sn&&(rs.unshift([[1]]),gr(Ln,Ar),qs=St(qs,Ln),An>1&&(Ln=At(Array(An-1).fill(ln)))),An-=1,kn.pop();for(var Un=0;Un<An;Un++)kn[Un].pop()}else if(An===2||jt(Tt(kn[An-2][An-3]),Qr)){Cn=0;var Zn=pr(kn[An-2][An-2],kn[An-2][An-1],kn[An-1][An-2],kn[An-1][An-1]);xn.push.apply(xn,(0,_e.default)(Zn)),Sn&&(rs.unshift(cr(kn[An-2][An-2],kn[An-2][An-1],kn[An-1][An-2],kn[An-1][An-1],Zn[0],Zn[1],Qr,hn)),gr(Ln,Ar),qs=St(qs,Ln),An>2&&(Ln=At(Array(An-2).fill(ln)))),An-=2,kn.pop(),kn.pop();for(var pn=0;pn<An;pn++)kn[pn].pop(),kn[pn].pop()}if(An===0)break}if(xn.sort(function(_a,Vn){return+mt(Tt(_a),Tt(Vn))}),Cn>100){var Dn=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+xn.join(", "));throw Dn.values=xn,Dn.vectors=[],Dn}var qn=Sn?St(qs,Sr(rs,Ar)):void 0;return{values:xn,C:qn}}function ar(Or,Ar,Qr,hn,Sn,Kr,Hn){var ln=Nt(Qr),kn=St(ln,Or,Qr),xn=Hn==="BigNumber",An=Hn==="Complex",rs=xn?wt(0):An?Vt(0):0,qs=xn?wt(1):An?Vt(1):1,Ln=[],Cn=[],Nn=rt(Sn),Gr;try{for(Nn.s();!(Gr=Nn.n()).done;){var tn=Gr.value,dn=Er(Ln,tn,qt);dn===-1?(Ln.push(tn),Cn.push(1)):Cn[dn]+=1}}catch(Vn){Nn.e(Vn)}finally{Nn.f()}for(var Rn=[],wn=Ln.length,Un=Array(Ar).fill(rs),Zn=At(Array(Ar).fill(qs)),pn=[],Dn=function(bs){var Is=Ln[bs],uo=mt(kn,St(Is,Zn)),Rs=Ft(uo,Un);for(Rs.shift();Rs.length<Cn[bs];){var io=Vr(uo,Ar,Rs,Kr,Hn);if(io==null){pn.push(Is);break}Rs.push(io)}var vo=St(Nt(hn),Qr);Rs=Rs.map(function(Bo){return St(vo,Bo)}),Rn.push.apply(Rn,(0,_e.default)(Rs.map(function(Bo){return bt(Bo)})))},qn=0;qn<wn;qn++)Dn(qn);if(pn.length!==0){var _a=new Error("Failed to find eigenvectors for the following eigenvalues: "+pn.join(", "));throw _a.values=Sn,_a.vectors=Rn,_a}return Rn}function pr(Or,Ar,Qr,hn){var Sn=ht(Or,hn),Kr=mt(Et(Or,hn),Et(Ar,Qr)),Hn=Et(Sn,.5),ln=Et(Rt(mt(Et(Sn,Sn),Et(4,Kr))),.5);return[ht(Hn,ln),mt(Hn,ln)]}function cr(Or,Ar,Qr,hn,Sn,Kr,Hn,ln){var kn=ln==="BigNumber",xn=ln==="Complex",An=kn?wt(0):xn?Vt(0):0,rs=kn?wt(1):xn?Vt(1):1;if(jt(Tt(Qr),Hn))return[[rs,An],[An,rs]];if(Kt(Tt(mt(Sn,Kr)),Hn))return[[mt(Sn,hn),mt(Kr,hn)],[Qr,Qr]];var qs=mt(Or,Sn),Ln=mt(Ar,Sn),Cn=mt(Qr,Sn),Nn=mt(hn,Sn);return jt(Tt(Ln),Hn)?[[qs,rs],[Cn,An]]:[[Ln,An],[Nn,rs]]}function gr(Or,Ar){for(var Qr=0;Qr<Or.length;Qr++){var hn;(hn=Or[Qr]).push.apply(hn,(0,_e.default)(Array(Ar-Or[Qr].length).fill(0)))}for(var Sn=Or.length;Sn<Ar;Sn++)Or.push(Array(Ar).fill(0)),Or[Sn][Sn]=1;return Or}function Sr(Or,Ar){for(var Qr=[],hn=0;hn<Ar;hn++)Qr[hn]=Array(Ar).fill(0);var Sn=0,Kr=rt(Or),Hn;try{for(Kr.s();!(Hn=Kr.n()).done;){for(var ln=Hn.value,kn=ln.length,xn=0;xn<kn;xn++)for(var An=0;An<kn;An++)Qr[Sn+xn][Sn+An]=ln[xn][An];Sn+=kn}}catch(rs){Kr.e(rs)}finally{Kr.f()}return Qr}function Er(Or,Ar,Qr){for(var hn=0;hn<Or.length;hn++)if(Qr(Or[hn],Ar))return hn;return-1}function Vr(Or,Ar,Qr,hn,Sn){for(var Kr=Sn==="BigNumber"?wt(1e3):1e3,Hn,ln=0;Hn=Wr(Ar,Qr,Sn),Hn=It(Or,Hn),!Kt(Nr(Hn),Kr);)if(++ln>=5)return null;for(ln=0;;){var kn=It(Or,Hn);if(jt(Nr(Mr(Hn,[kn])),hn))break;if(++ln>=10)return null;Hn=Yr(kn)}return Hn}function Wr(Or,Ar,Qr){var hn=Qr==="BigNumber",Sn=Qr==="Complex",Kr=Array(Or).fill(0).map(function(Hn){return 2*Math.random()-1});return hn&&(Kr=Kr.map(function(Hn){return wt(Hn)})),Sn&&(Kr=Kr.map(function(Hn){return Vt(Hn)})),Kr=Mr(Kr,Ar),Yr(Kr,Qr)}function Mr(Or,Ar){var Qr=rt(Ar),hn;try{for(Qr.s();!(hn=Qr.n()).done;){var Sn=hn.value;Or=mt(Or,St(Ct(Ot(Sn,Or),Ot(Sn,Sn)),Sn))}}catch(Kr){Qr.e(Kr)}finally{Qr.f()}return Or}function Nr(Or){return Tt(Rt(Ot(Or,Or)))}function Yr(Or,Ar){var Qr=Ar==="BigNumber",hn=Ar==="Complex",Sn=Qr?wt(1):hn?Vt(1):1;return St(Ct(Sn,Nr(Or)),Or)}return Wt}return complexEigs}var realSymetric={},hasRequiredRealSymetric;function requireRealSymetric(){if(hasRequiredRealSymetric)return realSymetric;hasRequiredRealSymetric=1,Object.defineProperty(realSymetric,"__esModule",{value:!0}),realSymetric.createRealSymmetric=_e;var et=requireObject();function _e(tt){var rt=tt.config,nt=tt.addScalar,st=tt.subtract,dt=tt.abs,ft=tt.atan,ht=tt.cos,mt=tt.sin,bt=tt.multiplyScalar,St=tt.inv,Et=tt.bignumber,Ct=tt.multiply,Rt=tt.add;function Tt(Wt,Bt){var tr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rt.epsilon,Jt=arguments.length>3?arguments[3]:void 0;if(Jt==="number")return wt(Wt,tr);if(Jt==="BigNumber")return At(Wt,tr);throw TypeError("Unsupported data type: "+Jt)}function wt(Wt,Bt){for(var tr=Wt.length,Jt=Math.abs(Bt/tr),ar,pr=new Array(tr),cr=0;cr<tr;cr++)pr[cr]=Ot(tr,0),pr[cr][cr]=1;for(var gr=Kt(Wt);Math.abs(gr[1])>=Math.abs(Jt);){var Sr=gr[0][0],Er=gr[0][1];ar=Nt(Wt[Sr][Sr],Wt[Er][Er],Wt[Sr][Er]),Wt=Vt(Wt,ar,Sr,Er),pr=It(pr,ar,Sr,Er),gr=Kt(Wt)}for(var Vr=Ot(tr,0),Wr=0;Wr<tr;Wr++)Vr[Wr]=Wt[Wr][Wr];return Ut((0,et.clone)(Vr),(0,et.clone)(pr))}function At(Wt,Bt){for(var tr=Wt.length,Jt=dt(Bt/tr),ar,pr=new Array(tr),cr=0;cr<tr;cr++)pr[cr]=Ot(tr,0),pr[cr][cr]=1;for(var gr=jt(Wt);dt(gr[1])>=dt(Jt);){var Sr=gr[0][0],Er=gr[0][1];ar=Pt(Wt[Sr][Sr],Wt[Er][Er],Wt[Sr][Er]),Wt=qt(Wt,ar,Sr,Er),pr=Ft(pr,ar,Sr,Er),gr=jt(Wt)}for(var Vr=Ot(tr,0),Wr=0;Wr<tr;Wr++)Vr[Wr]=Wt[Wr][Wr];return Ut((0,et.clone)(Vr),(0,et.clone)(pr))}function Nt(Wt,Bt,tr){var Jt=Bt-Wt;return Math.abs(Jt)<=rt.epsilon?Math.PI/4:.5*Math.atan(2*tr/(Bt-Wt))}function Pt(Wt,Bt,tr){var Jt=st(Bt,Wt);return dt(Jt)<=rt.epsilon?Et(-1).acos().div(4):bt(.5,ft(Ct(2,tr,St(Jt))))}function It(Wt,Bt,tr,Jt){for(var ar=Wt.length,pr=Math.cos(Bt),cr=Math.sin(Bt),gr=Ot(ar,0),Sr=Ot(ar,0),Er=0;Er<ar;Er++)gr[Er]=pr*Wt[Er][tr]-cr*Wt[Er][Jt],Sr[Er]=cr*Wt[Er][tr]+pr*Wt[Er][Jt];for(var Vr=0;Vr<ar;Vr++)Wt[Vr][tr]=gr[Vr],Wt[Vr][Jt]=Sr[Vr];return Wt}function Ft(Wt,Bt,tr,Jt){for(var ar=Wt.length,pr=ht(Bt),cr=mt(Bt),gr=Ot(ar,Et(0)),Sr=Ot(ar,Et(0)),Er=0;Er<ar;Er++)gr[Er]=st(bt(pr,Wt[Er][tr]),bt(cr,Wt[Er][Jt])),Sr[Er]=nt(bt(cr,Wt[Er][tr]),bt(pr,Wt[Er][Jt]));for(var Vr=0;Vr<ar;Vr++)Wt[Vr][tr]=gr[Vr],Wt[Vr][Jt]=Sr[Vr];return Wt}function qt(Wt,Bt,tr,Jt){for(var ar=Wt.length,pr=Et(ht(Bt)),cr=Et(mt(Bt)),gr=bt(pr,pr),Sr=bt(cr,cr),Er=Ot(ar,Et(0)),Vr=Ot(ar,Et(0)),Wr=Ct(Et(2),pr,cr,Wt[tr][Jt]),Mr=nt(st(bt(gr,Wt[tr][tr]),Wr),bt(Sr,Wt[Jt][Jt])),Nr=Rt(bt(Sr,Wt[tr][tr]),Wr,bt(gr,Wt[Jt][Jt])),Yr=0;Yr<ar;Yr++)Er[Yr]=st(bt(pr,Wt[tr][Yr]),bt(cr,Wt[Jt][Yr])),Vr[Yr]=nt(bt(cr,Wt[tr][Yr]),bt(pr,Wt[Jt][Yr]));Wt[tr][tr]=Mr,Wt[Jt][Jt]=Nr,Wt[tr][Jt]=Et(0),Wt[Jt][tr]=Et(0);for(var Or=0;Or<ar;Or++)Or!==tr&&Or!==Jt&&(Wt[tr][Or]=Er[Or],Wt[Or][tr]=Er[Or],Wt[Jt][Or]=Vr[Or],Wt[Or][Jt]=Vr[Or]);return Wt}function Vt(Wt,Bt,tr,Jt){for(var ar=Wt.length,pr=Math.cos(Bt),cr=Math.sin(Bt),gr=pr*pr,Sr=cr*cr,Er=Ot(ar,0),Vr=Ot(ar,0),Wr=gr*Wt[tr][tr]-2*pr*cr*Wt[tr][Jt]+Sr*Wt[Jt][Jt],Mr=Sr*Wt[tr][tr]+2*pr*cr*Wt[tr][Jt]+gr*Wt[Jt][Jt],Nr=0;Nr<ar;Nr++)Er[Nr]=pr*Wt[tr][Nr]-cr*Wt[Jt][Nr],Vr[Nr]=cr*Wt[tr][Nr]+pr*Wt[Jt][Nr];Wt[tr][tr]=Wr,Wt[Jt][Jt]=Mr,Wt[tr][Jt]=0,Wt[Jt][tr]=0;for(var Yr=0;Yr<ar;Yr++)Yr!==tr&&Yr!==Jt&&(Wt[tr][Yr]=Er[Yr],Wt[Yr][tr]=Er[Yr],Wt[Jt][Yr]=Vr[Yr],Wt[Yr][Jt]=Vr[Yr]);return Wt}function Kt(Wt){for(var Bt=Wt.length,tr=0,Jt=[0,1],ar=0;ar<Bt;ar++)for(var pr=ar+1;pr<Bt;pr++)Math.abs(tr)<Math.abs(Wt[ar][pr])&&(tr=Math.abs(Wt[ar][pr]),Jt=[ar,pr]);return[Jt,tr]}function jt(Wt){for(var Bt=Wt.length,tr=0,Jt=[0,1],ar=0;ar<Bt;ar++)for(var pr=ar+1;pr<Bt;pr++)dt(tr)<dt(Wt[ar][pr])&&(tr=dt(Wt[ar][pr]),Jt=[ar,pr]);return[Jt,tr]}function Ut(Wt,Bt){for(var tr=Wt.length,Jt=Array(tr),ar=Array(tr),pr=0;pr<tr;pr++)ar[pr]=Array(tr);for(var cr=0;cr<tr;cr++){for(var gr=0,Sr=Wt[0],Er=0;Er<Wt.length;Er++)dt(Wt[Er])<dt(Sr)&&(gr=Er,Sr=Wt[gr]);Jt[cr]=Wt.splice(gr,1)[0];for(var Vr=0;Vr<tr;Vr++)ar[Vr][cr]=Bt[Vr][gr],Bt[Vr].splice(gr,1)}return{values:Jt,vectors:ar}}function Ot(Wt,Bt){for(var tr=new Array(Wt),Jt=0;Jt<Wt;Jt++)tr[Jt]=Bt;return tr}return Tt}return realSymetric}var hasRequiredEigs;function requireEigs(){if(hasRequiredEigs)return eigs;hasRequiredEigs=1,Object.defineProperty(eigs,"__esModule",{value:!0}),eigs.createEigs=void 0;var et=requireFactory(),_e=requireString$2(),tt=requireComplexEigs(),rt=requireRealSymetric(),nt=requireIs(),st="eigs",dt=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],ft=(0,et.factory)(st,dt,function(ht){var mt=ht.config,bt=ht.typed,St=ht.matrix,Et=ht.addScalar,Ct=ht.subtract,Rt=ht.equal,Tt=ht.abs,wt=ht.atan,At=ht.cos,Nt=ht.sin,Pt=ht.multiplyScalar,It=ht.divideScalar,Ft=ht.inv,qt=ht.bignumber,Vt=ht.multiply,Kt=ht.add,jt=ht.larger,Ut=ht.column,Ot=ht.flatten,Wt=ht.number,Bt=ht.complex,tr=ht.sqrt,Jt=ht.diag,ar=ht.qr,pr=ht.usolve,cr=ht.usolveAll,gr=ht.im,Sr=ht.re,Er=ht.smaller,Vr=ht.matrixFromColumns,Wr=ht.dot,Mr=(0,rt.createRealSymmetric)({config:mt,addScalar:Et,subtract:Ct,column:Ut,flatten:Ot,equal:Rt,abs:Tt,atan:wt,cos:At,sin:Nt,multiplyScalar:Pt,inv:Ft,bignumber:qt,complex:Bt,multiply:Vt,add:Kt}),Nr=(0,tt.createComplexEigs)({config:mt,addScalar:Et,subtract:Ct,multiply:Vt,multiplyScalar:Pt,flatten:Ot,divideScalar:It,sqrt:tr,abs:Tt,bignumber:qt,diag:Jt,qr:ar,inv:Ft,usolve:pr,usolveAll:cr,equal:Rt,complex:Bt,larger:jt,smaller:Er,matrixFromColumns:Vr,dot:Wr});return bt("eigs",{Array:function(Kr){var Hn=St(Kr);return Yr(Hn)},"Array, number|BigNumber":function(Kr,Hn){var ln=St(Kr);return Yr(ln,Hn)},Matrix:function(Kr){var Hn=Yr(Kr),ln=Hn.values,kn=Hn.vectors;return{values:St(ln),vectors:St(kn)}},"Matrix, number|BigNumber":function(Kr,Hn){var ln=Yr(Kr,Hn),kn=ln.values,xn=ln.vectors;return{values:St(kn),vectors:St(xn)}}});function Yr(Sn,Kr){Kr===void 0&&(Kr=mt.epsilon);var Hn=Sn.size();if(Hn.length!==2||Hn[0]!==Hn[1])throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Hn)+")");var ln=Sn.toArray(),kn=Hn[0];if(Ar(ln,kn,Kr)&&(Qr(ln,kn),Or(ln,kn,Kr))){var xn=hn(Sn,ln,kn);return Mr(ln,kn,Kr,xn)}var An=hn(Sn,ln,kn);return Nr(ln,kn,Kr,An)}function Or(Sn,Kr,Hn){for(var ln=0;ln<Kr;ln++)for(var kn=ln;kn<Kr;kn++)if(jt(qt(Tt(Ct(Sn[ln][kn],Sn[kn][ln]))),Hn))return!1;return!0}function Ar(Sn,Kr,Hn){for(var ln=0;ln<Kr;ln++)for(var kn=0;kn<Kr;kn++)if(jt(qt(Tt(gr(Sn[ln][kn]))),Hn))return!1;return!0}function Qr(Sn,Kr){for(var Hn=0;Hn<Kr;Hn++)for(var ln=0;ln<Kr;ln++)Sn[Hn][ln]=Sr(Sn[Hn][ln])}function hn(Sn,Kr,Hn){var ln=Sn.datatype();if(ln==="number"||ln==="BigNumber"||ln==="Complex")return ln;for(var kn=!1,xn=!1,An=!1,rs=0;rs<Hn;rs++)for(var qs=0;qs<Hn;qs++){var Ln=Kr[rs][qs];if((0,nt.isNumber)(Ln)||(0,nt.isFraction)(Ln))kn=!0;else if((0,nt.isBigNumber)(Ln))xn=!0;else if((0,nt.isComplex)(Ln))An=!0;else throw TypeError("Unsupported type in Matrix: "+(0,nt.typeOf)(Ln))}if(xn&&An&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),An){for(var Cn=0;Cn<Hn;Cn++)for(var Nn=0;Nn<Hn;Nn++)Kr[Cn][Nn]=Bt(Kr[Cn][Nn]);return"Complex"}if(xn){for(var Gr=0;Gr<Hn;Gr++)for(var tn=0;tn<Hn;tn++)Kr[Gr][tn]=qt(Kr[Gr][tn]);return"BigNumber"}if(kn){for(var dn=0;dn<Hn;dn++)for(var Rn=0;Rn<Hn;Rn++)Kr[dn][Rn]=Wt(Kr[dn][Rn]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}});return eigs.createEigs=ft,eigs}var expm={},hasRequiredExpm;function requireExpm(){if(hasRequiredExpm)return expm;hasRequiredExpm=1,Object.defineProperty(expm,"__esModule",{value:!0}),expm.createExpm=void 0;var et=requireIs(),_e=requireString$2(),tt=requireFactory(),rt="expm",nt=["typed","abs","add","identity","inv","multiply"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.abs,mt=dt.add,bt=dt.identity,St=dt.inv,Et=dt.multiply;return ft(rt,{Matrix:function(At){var Nt=At.size();if(Nt.length!==2||Nt[0]!==Nt[1])throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Nt)+")");for(var Pt=Nt[0],It=1e-15,Ft=Ct(At),qt=Rt(Ft,It),Vt=qt.q,Kt=qt.j,jt=Et(At,Math.pow(2,-Kt)),Ut=bt(Pt),Ot=bt(Pt),Wt=1,Bt=jt,tr=-1,Jt=1;Jt<=Vt;Jt++)Jt>1&&(Bt=Et(Bt,jt),tr=-tr),Wt=Wt*(Vt-Jt+1)/((2*Vt-Jt+1)*Jt),Ut=mt(Ut,Et(Wt,Bt)),Ot=mt(Ot,Et(Wt*tr,Bt));for(var ar=Et(St(Ot),Ut),pr=0;pr<Kt;pr++)ar=Et(ar,ar);return(0,et.isSparseMatrix)(At)?At.createSparseMatrix(ar):ar}});function Ct(wt){for(var At=wt.size()[0],Nt=0,Pt=0;Pt<At;Pt++){for(var It=0,Ft=0;Ft<At;Ft++)It+=ht(wt.get([Pt,Ft]));Nt=Math.max(It,Nt)}return Nt}function Rt(wt,At){for(var Nt=30,Pt=0;Pt<Nt;Pt++)for(var It=0;It<=Pt;It++){var Ft=Pt-It;if(Tt(wt,It,Ft)<At)return{q:It,j:Ft}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function Tt(wt,At,Nt){for(var Pt=1,It=2;It<=At;It++)Pt*=It;for(var Ft=Pt,qt=At+1;qt<=2*At;qt++)Ft*=qt;var Vt=Ft*(2*At+1);return 8*Math.pow(wt/Math.pow(2,Nt),2*At)*Pt*Pt/(Ft*Vt)}});return expm.createExpm=st,expm}var sqrtm={},hasRequiredSqrtm;function requireSqrtm(){if(hasRequiredSqrtm)return sqrtm;hasRequiredSqrtm=1,Object.defineProperty(sqrtm,"__esModule",{value:!0}),sqrtm.createSqrtm=void 0;var et=requireIs(),_e=requireString$2(),tt=requireArray(),rt=requireFactory(),nt="sqrtm",st=["typed","abs","add","multiply","sqrt","subtract","inv","size","max","identity"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.abs,bt=ft.add,St=ft.multiply,Et=ft.sqrt,Ct=ft.subtract,Rt=ft.inv,Tt=ft.size,wt=ft.max,At=ft.identity,Nt=1e3,Pt=1e-6;function It(Ft){var qt,Vt=0,Kt=Ft,jt=At(Tt(Ft));do{var Ut=Kt;if(Kt=St(.5,bt(Ut,Rt(jt))),jt=St(.5,bt(jt,Rt(Ut))),qt=wt(mt(Ct(Kt,Ut))),qt>Pt&&++Vt>Nt)throw new Error("computing square root of matrix: iterative method could not converge")}while(qt>Pt);return Kt}return ht(nt,{"Array | Matrix":function(qt){var Vt=(0,et.isMatrix)(qt)?qt.size():(0,tt.arraySize)(qt);switch(Vt.length){case 1:if(Vt[0]===1)return Et(qt);throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Vt)+")");case 2:{var Kt=Vt[0],jt=Vt[1];if(Kt===jt)return It(qt);throw new RangeError("Matrix must be square (size: "+(0,_e.format)(Vt)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+(0,_e.format)(Vt)+")")}}})});return sqrtm.createSqrtm=dt,sqrtm}var divide={},hasRequiredDivide;function requireDivide(){if(hasRequiredDivide)return divide;hasRequiredDivide=1,Object.defineProperty(divide,"__esModule",{value:!0}),divide.createDivide=void 0;var et=requireFactory(),_e=requireObject(),tt=requireAlgorithm11(),rt=requireAlgorithm14(),nt="divide",st=["typed","matrix","multiply","equalScalar","divideScalar","inv"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.multiply,St=ft.equalScalar,Et=ft.divideScalar,Ct=ft.inv,Rt=(0,tt.createAlgorithm11)({typed:ht,equalScalar:St}),Tt=(0,rt.createAlgorithm14)({typed:ht});return ht("divide",(0,_e.extend)({"Array | Matrix, Array | Matrix":function(At,Nt){return bt(At,Ct(Nt))},"DenseMatrix, any":function(At,Nt){return Tt(At,Nt,Et,!1)},"SparseMatrix, any":function(At,Nt){return Rt(At,Nt,Et,!1)},"Array, any":function(At,Nt){return Tt(mt(At),Nt,Et,!1).valueOf()},"any, Array | Matrix":function(At,Nt){return bt(At,Ct(Nt))}},Et.signatures))});return divide.createDivide=dt,divide}var distance={},hasRequiredDistance;function requireDistance(){if(hasRequiredDistance)return distance;hasRequiredDistance=1,Object.defineProperty(distance,"__esModule",{value:!0}),distance.createDistance=void 0;var et=requireIs(),_e=requireFactory(),tt="distance",rt=["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.addScalar,ht=st.subtract,mt=st.multiplyScalar,bt=st.divideScalar,St=st.unaryMinus,Et=st.sqrt,Ct=st.abs;return dt(tt,{"Array, Array, Array":function(Ut,Ot,Wt){if(Ut.length===2&&Ot.length===2&&Wt.length===2){if(!Tt(Ut))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!Tt(Ot))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!Tt(Wt))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var Bt=bt(ht(Wt[1],Wt[0]),ht(Ot[1],Ot[0])),tr=mt(mt(Bt,Bt),Ot[0]),Jt=St(mt(Bt,Ot[0])),ar=Ut[1];return Ft(Ut[0],Ut[1],tr,Jt,ar)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(Ut,Ot,Wt){if(Object.keys(Ut).length===2&&Object.keys(Ot).length===2&&Object.keys(Wt).length===2){if(!Tt(Ut))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!Tt(Ot))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!Tt(Wt))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in Ut&&"pointY"in Ut&&"lineOnePtX"in Ot&&"lineOnePtY"in Ot&&"lineTwoPtX"in Wt&&"lineTwoPtY"in Wt){var Bt=bt(ht(Wt.lineTwoPtY,Wt.lineTwoPtX),ht(Ot.lineOnePtY,Ot.lineOnePtX)),tr=mt(mt(Bt,Bt),Ot.lineOnePtX),Jt=St(mt(Bt,Ot.lineOnePtX)),ar=Ut.pointX;return Ft(Ut.pointX,Ut.pointY,tr,Jt,ar)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(Ut,Ot){if(Ut.length===2&&Ot.length===3){if(!Tt(Ut))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!wt(Ot))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return Ft(Ut[0],Ut[1],Ot[0],Ot[1],Ot[2])}else if(Ut.length===3&&Ot.length===6){if(!wt(Ut))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!Nt(Ot))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return qt(Ut[0],Ut[1],Ut[2],Ot[0],Ot[1],Ot[2],Ot[3],Ot[4],Ot[5])}else if(Ut.length===Ot.length&&Ut.length>0){if(!At(Ut))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!At(Ot))throw new TypeError("All values of an array should be numbers or BigNumbers");return Vt(Ut,Ot)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(Ut,Ot){if(Object.keys(Ut).length===2&&Object.keys(Ot).length===3){if(!Tt(Ut))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!wt(Ot))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in Ut&&"pointY"in Ut&&"xCoeffLine"in Ot&&"yCoeffLine"in Ot&&"constant"in Ot)return Ft(Ut.pointX,Ut.pointY,Ot.xCoeffLine,Ot.yCoeffLine,Ot.constant);throw new TypeError("Key names do not match")}else if(Object.keys(Ut).length===3&&Object.keys(Ot).length===6){if(!wt(Ut))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!Nt(Ot))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in Ut&&"pointY"in Ut&&"x0"in Ot&&"y0"in Ot&&"z0"in Ot&&"a"in Ot&&"b"in Ot&&"c"in Ot)return qt(Ut.pointX,Ut.pointY,Ut.pointZ,Ot.x0,Ot.y0,Ot.z0,Ot.a,Ot.b,Ot.c);throw new TypeError("Key names do not match")}else if(Object.keys(Ut).length===2&&Object.keys(Ot).length===2){if(!Tt(Ut))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!Tt(Ot))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in Ut&&"pointOneY"in Ut&&"pointTwoX"in Ot&&"pointTwoY"in Ot)return Vt([Ut.pointOneX,Ut.pointOneY],[Ot.pointTwoX,Ot.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(Ut).length===3&&Object.keys(Ot).length===3){if(!wt(Ut))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!wt(Ot))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in Ut&&"pointOneY"in Ut&&"pointOneZ"in Ut&&"pointTwoX"in Ot&&"pointTwoY"in Ot&&"pointTwoZ"in Ot)return Vt([Ut.pointOneX,Ut.pointOneY,Ut.pointOneZ],[Ot.pointTwoX,Ot.pointTwoY,Ot.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(Ut){if(!It(Ut))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return Kt(Ut)}});function Rt(jt){return typeof jt=="number"||(0,et.isBigNumber)(jt)}function Tt(jt){return jt.constructor!==Array&&(jt=Pt(jt)),Rt(jt[0])&&Rt(jt[1])}function wt(jt){return jt.constructor!==Array&&(jt=Pt(jt)),Rt(jt[0])&&Rt(jt[1])&&Rt(jt[2])}function At(jt){return Array.isArray(jt)||(jt=Pt(jt)),jt.every(Rt)}function Nt(jt){return jt.constructor!==Array&&(jt=Pt(jt)),Rt(jt[0])&&Rt(jt[1])&&Rt(jt[2])&&Rt(jt[3])&&Rt(jt[4])&&Rt(jt[5])}function Pt(jt){for(var Ut=Object.keys(jt),Ot=[],Wt=0;Wt<Ut.length;Wt++)Ot.push(jt[Ut[Wt]]);return Ot}function It(jt){if(jt[0].length===2&&Rt(jt[0][0])&&Rt(jt[0][1])){if(jt.some(function(Ut){return Ut.length!==2||!Rt(Ut[0])||!Rt(Ut[1])}))return!1}else if(jt[0].length===3&&Rt(jt[0][0])&&Rt(jt[0][1])&&Rt(jt[0][2])){if(jt.some(function(Ut){return Ut.length!==3||!Rt(Ut[0])||!Rt(Ut[1])||!Rt(Ut[2])}))return!1}else return!1;return!0}function Ft(jt,Ut,Ot,Wt,Bt){var tr=Ct(ft(ft(mt(Ot,jt),mt(Wt,Ut)),Bt)),Jt=Et(ft(mt(Ot,Ot),mt(Wt,Wt)));return bt(tr,Jt)}function qt(jt,Ut,Ot,Wt,Bt,tr,Jt,ar,pr){var cr=[ht(mt(ht(Bt,Ut),pr),mt(ht(tr,Ot),ar)),ht(mt(ht(tr,Ot),Jt),mt(ht(Wt,jt),pr)),ht(mt(ht(Wt,jt),ar),mt(ht(Bt,Ut),Jt))];cr=Et(ft(ft(mt(cr[0],cr[0]),mt(cr[1],cr[1])),mt(cr[2],cr[2])));var gr=Et(ft(ft(mt(Jt,Jt),mt(ar,ar)),mt(pr,pr)));return bt(cr,gr)}function Vt(jt,Ut){for(var Ot=jt.length,Wt=0,Bt=0,tr=0;tr<Ot;tr++)Bt=ht(jt[tr],Ut[tr]),Wt=ft(mt(Bt,Bt),Wt);return Et(Wt)}function Kt(jt){for(var Ut=[],Ot=[],Wt=[],Bt=0;Bt<jt.length-1;Bt++)for(var tr=Bt+1;tr<jt.length;tr++)jt[0].length===2?(Ot=[jt[Bt][0],jt[Bt][1]],Wt=[jt[tr][0],jt[tr][1]]):jt[0].length===3&&(Ot=[jt[Bt][0],jt[Bt][1],jt[Bt][2]],Wt=[jt[tr][0],jt[tr][1],jt[tr][2]]),Ut.push(Vt(Ot,Wt));return Ut}});return distance.createDistance=nt,distance}var intersect={},hasRequiredIntersect;function requireIntersect(){if(hasRequiredIntersect)return intersect;hasRequiredIntersect=1,Object.defineProperty(intersect,"__esModule",{value:!0}),intersect.createIntersect=void 0;var et=requireFactory(),_e="intersect",tt=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.config,ft=nt.abs,ht=nt.add,mt=nt.addScalar,bt=nt.matrix,St=nt.multiply,Et=nt.multiplyScalar,Ct=nt.divideScalar,Rt=nt.subtract,Tt=nt.smaller,wt=nt.equalScalar,At=nt.flatten,Nt=nt.isZero,Pt=nt.isNumeric;return st("intersect",{"Array, Array, Array":It,"Array, Array, Array, Array":Ft,"Matrix, Matrix, Matrix":function(Jt,ar,pr){var cr=It(Jt.valueOf(),ar.valueOf(),pr.valueOf());return cr===null?null:bt(cr)},"Matrix, Matrix, Matrix, Matrix":function(Jt,ar,pr,cr){var gr=Ft(Jt.valueOf(),ar.valueOf(),pr.valueOf(),cr.valueOf());return gr===null?null:bt(gr)}});function It(tr,Jt,ar){if(tr=qt(tr),Jt=qt(Jt),ar=qt(ar),!Kt(tr))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!Kt(Jt))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!jt(ar))throw new TypeError("Array with 4 numbers expected as third argument");return Bt(tr[0],tr[1],tr[2],Jt[0],Jt[1],Jt[2],ar[0],ar[1],ar[2],ar[3])}function Ft(tr,Jt,ar,pr){if(tr=qt(tr),Jt=qt(Jt),ar=qt(ar),pr=qt(pr),tr.length===2){if(!Vt(tr))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!Vt(Jt))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!Vt(ar))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!Vt(pr))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return Ut(tr,Jt,ar,pr)}else if(tr.length===3){if(!Kt(tr))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!Kt(Jt))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!Kt(ar))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!Kt(pr))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return Wt(tr[0],tr[1],tr[2],Jt[0],Jt[1],Jt[2],ar[0],ar[1],ar[2],pr[0],pr[1],pr[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function qt(tr){return tr.length===1?tr[0]:tr.length>1&&Array.isArray(tr[0])&&tr.every(function(Jt){return Array.isArray(Jt)&&Jt.length===1})?At(tr):tr}function Vt(tr){return tr.length===2&&Pt(tr[0])&&Pt(tr[1])}function Kt(tr){return tr.length===3&&Pt(tr[0])&&Pt(tr[1])&&Pt(tr[2])}function jt(tr){return tr.length===4&&Pt(tr[0])&&Pt(tr[1])&&Pt(tr[2])&&Pt(tr[3])}function Ut(tr,Jt,ar,pr){var cr=tr,gr=ar,Sr=Rt(cr,Jt),Er=Rt(gr,pr),Vr=Rt(Et(Sr[0],Er[1]),Et(Er[0],Sr[1]));if(Nt(Vr)||Tt(ft(Vr),dt.epsilon))return null;var Wr=Et(Er[0],cr[1]),Mr=Et(Er[1],cr[0]),Nr=Et(Er[0],gr[1]),Yr=Et(Er[1],gr[0]),Or=Ct(mt(Rt(Rt(Wr,Mr),Nr),Yr),Vr);return ht(St(Sr,Or),cr)}function Ot(tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr,Mr,Nr){var Yr=Et(Rt(tr,Jt),Rt(ar,pr)),Or=Et(Rt(cr,gr),Rt(Sr,Er)),Ar=Et(Rt(Vr,Wr),Rt(Mr,Nr));return mt(mt(Yr,Or),Ar)}function Wt(tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr,Mr,Nr){var Yr=Ot(tr,Sr,Wr,Sr,Jt,Er,Mr,Er,ar,Vr,Nr,Vr),Or=Ot(Wr,Sr,pr,tr,Mr,Er,cr,Jt,Nr,Vr,gr,ar),Ar=Ot(tr,Sr,pr,tr,Jt,Er,cr,Jt,ar,Vr,gr,ar),Qr=Ot(Wr,Sr,Wr,Sr,Mr,Er,Mr,Er,Nr,Vr,Nr,Vr),hn=Ot(pr,tr,pr,tr,cr,Jt,cr,Jt,gr,ar,gr,ar),Sn=Rt(Et(Yr,Or),Et(Ar,Qr)),Kr=Rt(Et(hn,Qr),Et(Or,Or));if(Nt(Kr))return null;var Hn=Ct(Sn,Kr),ln=Ct(mt(Yr,Et(Hn,Or)),Qr),kn=mt(tr,Et(Hn,Rt(pr,tr))),xn=mt(Jt,Et(Hn,Rt(cr,Jt))),An=mt(ar,Et(Hn,Rt(gr,ar))),rs=mt(Sr,Et(ln,Rt(Wr,Sr))),qs=mt(Er,Et(ln,Rt(Mr,Er))),Ln=mt(Vr,Et(ln,Rt(Nr,Vr)));return wt(kn,rs)&&wt(xn,qs)&&wt(An,Ln)?[kn,xn,An]:null}function Bt(tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr){var Mr=Et(tr,Sr),Nr=Et(pr,Sr),Yr=Et(Jt,Er),Or=Et(cr,Er),Ar=Et(ar,Vr),Qr=Et(gr,Vr),hn=Rt(Rt(Rt(Wr,Mr),Yr),Ar),Sn=Rt(Rt(Rt(mt(mt(Nr,Or),Qr),Mr),Yr),Ar),Kr=Ct(hn,Sn),Hn=mt(tr,Et(Kr,Rt(pr,tr))),ln=mt(Jt,Et(Kr,Rt(cr,Jt))),kn=mt(ar,Et(Kr,Rt(gr,ar)));return[Hn,ln,kn]}});return intersect.createIntersect=rt,intersect}var sum={},hasRequiredSum;function requireSum(){if(hasRequiredSum)return sum;hasRequiredSum=1,Object.defineProperty(sum,"__esModule",{value:!0}),sum.createSum=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireImproveErrorMessage(),rt="sum",nt=["typed","config","add","numeric"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config,mt=dt.add,bt=dt.numeric;return ft(rt,{"Array | Matrix":St,"Array | Matrix, number | BigNumber":Et,"...":function(Rt){if((0,et.containsCollections)(Rt))throw new TypeError("Scalar values expected in function sum");return St(Rt)}});function St(Ct){var Rt;return(0,et.deepForEach)(Ct,function(Tt){try{Rt=Rt===void 0?Tt:mt(Rt,Tt)}catch(wt){throw(0,tt.improveErrorMessage)(wt,"sum",Tt)}}),Rt===void 0&&(Rt=bt(0,ht.number)),typeof Rt=="string"&&(Rt=bt(Rt,ht.number)),Rt}function Et(Ct,Rt){try{var Tt=(0,et.reduce)(Ct,Rt,mt);return Tt}catch(wt){throw(0,tt.improveErrorMessage)(wt,"sum")}}});return sum.createSum=st,sum}var cumsum={},hasRequiredCumsum;function requireCumsum(){if(hasRequiredCumsum)return cumsum;hasRequiredCumsum=1,Object.defineProperty(cumsum,"__esModule",{value:!0}),cumsum.createCumSum=void 0;var et=requireCollection(),_e=requireFactory(),tt=require_switch(),rt=requireImproveErrorMessage(),nt=requireArray(),st=requireIndexError(),dt="cumsum",ft=["typed","add","unaryPlus"],ht=(0,_e.factory)(dt,ft,function(mt){var bt=mt.typed,St=mt.add,Et=mt.unaryPlus;return bt(dt,{Array:Ct,Matrix:function(Nt){return Nt.create(Ct(Nt.valueOf()))},"Array, number | BigNumber":Tt,"Matrix, number | BigNumber":function(Nt,Pt){return Nt.create(Tt(Nt.valueOf(),Pt))},"...":function(Nt){if((0,et.containsCollections)(Nt))throw new TypeError("All values expected to be scalar in function cumsum");return Ct(Nt)}});function Ct(At){try{return Rt(At)}catch(Nt){throw(0,rt.improveErrorMessage)(Nt,dt)}}function Rt(At){if(At.length===0)return[];for(var Nt=[Et(At[0])],Pt=1;Pt<At.length;++Pt)Nt.push(St(Nt[Pt-1],At[Pt]));return Nt}function Tt(At,Nt){var Pt=(0,nt.arraySize)(At);if(Nt<0||Nt>=Pt.length)throw new st.IndexError(Nt,Pt.length);try{return wt(At,Nt)}catch(It){throw(0,rt.improveErrorMessage)(It,dt)}}function wt(At,Nt){var Pt,It,Ft;if(Nt<=0){var qt=At[0][0];if(Array.isArray(qt)){for(Ft=(0,tt._switch)(At),It=[],Pt=0;Pt<Ft.length;Pt++)It[Pt]=wt(Ft[Pt],Nt-1);return It}else return Rt(At)}else{for(It=[],Pt=0;Pt<At.length;Pt++)It[Pt]=wt(At[Pt],Nt-1);return It}}});return cumsum.createCumSum=ht,cumsum}var mean={},hasRequiredMean;function requireMean(){if(hasRequiredMean)return mean;hasRequiredMean=1,Object.defineProperty(mean,"__esModule",{value:!0}),mean.createMean=void 0;var et=requireCollection(),_e=requireArray(),tt=requireFactory(),rt=requireImproveErrorMessage(),nt="mean",st=["typed","add","divide"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.divide;return ht(nt,{"Array | Matrix":Et,"Array | Matrix, number | BigNumber":St,"...":function(Rt){if((0,et.containsCollections)(Rt))throw new TypeError("Scalar values expected in function mean");return Et(Rt)}});function St(Ct,Rt){try{var Tt=(0,et.reduce)(Ct,Rt,mt),wt=Array.isArray(Ct)?(0,_e.arraySize)(Ct):Ct.size();return bt(Tt,wt[Rt])}catch(At){throw(0,rt.improveErrorMessage)(At,"mean")}}function Et(Ct){var Rt,Tt=0;if((0,et.deepForEach)(Ct,function(wt){try{Rt=Rt===void 0?wt:mt(Rt,wt),Tt++}catch(At){throw(0,rt.improveErrorMessage)(At,"mean",wt)}}),Tt===0)throw new Error("Cannot calculate the mean of an empty array");return bt(Rt,Tt)}});return mean.createMean=dt,mean}var median={},hasRequiredMedian;function requireMedian(){if(hasRequiredMedian)return median;hasRequiredMedian=1,Object.defineProperty(median,"__esModule",{value:!0}),median.createMedian=void 0;var et=requireCollection(),_e=requireArray(),tt=requireFactory(),rt=requireImproveErrorMessage(),nt="median",st=["typed","add","divide","compare","partitionSelect"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.divide,St=ft.compare,Et=ft.partitionSelect;function Ct(wt){try{wt=(0,_e.flatten)(wt.valueOf());var At=wt.length;if(At===0)throw new Error("Cannot calculate median of an empty array");if(At%2===0){for(var Nt=At/2-1,Pt=Et(wt,Nt+1),It=wt[Nt],Ft=0;Ft<Nt;++Ft)St(wt[Ft],It)>0&&(It=wt[Ft]);return Tt(It,Pt)}else{var qt=Et(wt,(At-1)/2);return Rt(qt)}}catch(Vt){throw(0,rt.improveErrorMessage)(Vt,"median")}}var Rt=ht({"number | BigNumber | Complex | Unit":function(At){return At}}),Tt=ht({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(At,Nt){return bt(mt(At,Nt),2)}});return ht(nt,{"Array | Matrix":Ct,"Array | Matrix, number | BigNumber":function(At,Nt){throw new Error("median(A, dim) is not yet supported")},"...":function(At){if((0,et.containsCollections)(At))throw new TypeError("Scalar values expected in function median");return Ct(At)}})});return median.createMedian=dt,median}var mad={},hasRequiredMad;function requireMad(){if(hasRequiredMad)return mad;hasRequiredMad=1,Object.defineProperty(mad,"__esModule",{value:!0}),mad.createMad=void 0;var et=requireArray(),_e=requireFactory(),tt=requireImproveErrorMessage(),rt="mad",nt=["typed","abs","map","median","subtract"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.abs,mt=dt.map,bt=dt.median,St=dt.subtract;return ft(rt,{"Array | Matrix":Et,"...":function(Rt){return Et(Rt)}});function Et(Ct){if(Ct=(0,et.flatten)(Ct.valueOf()),Ct.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var Rt=bt(Ct);return bt(mt(Ct,function(Tt){return ht(St(Tt,Rt))}))}catch(Tt){throw Tt instanceof TypeError&&Tt.message.indexOf("median")!==-1?new TypeError(Tt.message.replace("median","mad")):(0,tt.improveErrorMessage)(Tt,"mad")}}});return mad.createMad=st,mad}var variance={},hasRequiredVariance;function requireVariance(){if(hasRequiredVariance)return variance;hasRequiredVariance=1,Object.defineProperty(variance,"__esModule",{value:!0}),variance.createVariance=void 0;var et=requireCollection(),_e=requireIs(),tt=requireFactory(),rt=requireImproveErrorMessage(),nt="unbiased",st="variance",dt=["typed","add","subtract","multiply","divide","apply","isNaN"],ft=(0,tt.factory)(st,dt,function(ht){var mt=ht.typed,bt=ht.add,St=ht.subtract,Et=ht.multiply,Ct=ht.divide,Rt=ht.apply,Tt=ht.isNaN;return mt(st,{"Array | Matrix":function(Pt){return wt(Pt,nt)},"Array | Matrix, string":wt,"Array | Matrix, number | BigNumber":function(Pt,It){return At(Pt,It,nt)},"Array | Matrix, number | BigNumber, string":At,"...":function(Pt){return wt(Pt,nt)}});function wt(Nt,Pt){var It,Ft=0;if(Nt.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if((0,et.deepForEach)(Nt,function(Kt){try{It=It===void 0?Kt:bt(It,Kt),Ft++}catch(jt){throw(0,rt.improveErrorMessage)(jt,"variance",Kt)}}),Ft===0)throw new Error("Cannot calculate variance of an empty array");var qt=Ct(It,Ft);if(It=void 0,(0,et.deepForEach)(Nt,function(Kt){var jt=St(Kt,qt);It=It===void 0?Et(jt,jt):bt(It,Et(jt,jt))}),Tt(It))return It;switch(Pt){case"uncorrected":return Ct(It,Ft);case"biased":return Ct(It,Ft+1);case"unbiased":{var Vt=(0,_e.isBigNumber)(It)?It.mul(0):0;return Ft===1?Vt:Ct(It,Ft-1)}default:throw new Error('Unknown normalization "'+Pt+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function At(Nt,Pt,It){try{if(Nt.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return Rt(Nt,Pt,function(Ft){return wt(Ft,It)})}catch(Ft){throw(0,rt.improveErrorMessage)(Ft,"variance")}}});return variance.createVariance=ft,variance}var quantileSeq={},hasRequiredQuantileSeq;function requireQuantileSeq(){if(hasRequiredQuantileSeq)return quantileSeq;hasRequiredQuantileSeq=1,Object.defineProperty(quantileSeq,"__esModule",{value:!0}),quantileSeq.createQuantileSeq=void 0;var et=requireIs(),_e=requireNumber$3(),tt=requireArray(),rt=requireFactory(),nt="quantileSeq",st=["typed","add","multiply","partitionSelect","compare"],dt=(0,rt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.multiply,St=ft.partitionSelect,Et=ft.compare;function Ct(wt,At,Nt){var Pt,It,Ft;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if((0,et.isCollection)(wt)){if(Nt=Nt||!1,typeof Nt=="boolean"){if(It=wt.valueOf(),(0,et.isNumber)(At)){if(At<0)throw new Error("N/prob must be non-negative");if(At<=1)return Rt(It,At,Nt);if(At>1){if(!(0,_e.isInteger)(At))throw new Error("N must be a positive integer");var qt=At+1;Pt=new Array(At);for(var Vt=0;Vt<At;)Pt[Vt]=Rt(It,++Vt/qt,Nt);return Pt}}if((0,et.isBigNumber)(At)){var Kt=At.constructor;if(At.isNegative())throw new Error("N/prob must be non-negative");if(Ft=new Kt(1),At.lte(Ft))return new Kt(Rt(It,At,Nt));if(At.gt(Ft)){if(!At.isInteger())throw new Error("N must be a positive integer");var jt=At.toNumber();if(jt>4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var Ut=new Kt(jt+1);Pt=new Array(jt);for(var Ot=0;Ot<jt;)Pt[Ot]=new Kt(Rt(It,new Kt(++Ot).div(Ut),Nt));return Pt}}if(Array.isArray(At)){Pt=new Array(At.length);for(var Wt=0;Wt<Pt.length;++Wt){var Bt=At[Wt];if((0,et.isNumber)(Bt)){if(Bt<0||Bt>1)throw new Error("Probability must be between 0 and 1, inclusive")}else if((0,et.isBigNumber)(Bt)){if(Ft=new Bt.constructor(1),Bt.isNegative()||Bt.gt(Ft))throw new Error("Probability must be between 0 and 1, inclusive")}else throw new TypeError("Unexpected type of argument in function quantileSeq");Pt[Wt]=Rt(It,Bt,Nt)}return Pt}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function Rt(wt,At,Nt){var Pt=(0,tt.flatten)(wt),It=Pt.length;if(It===0)throw new Error("Cannot calculate quantile of an empty sequence");if((0,et.isNumber)(At)){var Ft=At*(It-1),qt=Ft%1;if(qt===0){var Vt=Nt?Pt[Ft]:St(Pt,Ft);return Tt(Vt),Vt}var Kt=Math.floor(Ft),jt,Ut;if(Nt)jt=Pt[Kt],Ut=Pt[Kt+1];else{Ut=St(Pt,Kt+1),jt=Pt[Kt];for(var Ot=0;Ot<Kt;++Ot)Et(Pt[Ot],jt)>0&&(jt=Pt[Ot])}return Tt(jt),Tt(Ut),mt(bt(jt,1-qt),bt(Ut,qt))}var Wt=At.times(It-1);if(Wt.isInteger()){Wt=Wt.toNumber();var Bt=Nt?Pt[Wt]:St(Pt,Wt);return Tt(Bt),Bt}var tr=Wt.floor(),Jt=Wt.minus(tr),ar=tr.toNumber(),pr,cr;if(Nt)pr=Pt[ar],cr=Pt[ar+1];else{cr=St(Pt,ar+1),pr=Pt[ar];for(var gr=0;gr<ar;++gr)Et(Pt[gr],pr)>0&&(pr=Pt[gr])}Tt(pr),Tt(cr);var Sr=new Jt.constructor(1);return mt(bt(pr,Sr.minus(Jt)),bt(cr,Jt))}var Tt=ht({"number | BigNumber | Unit":function(At){return At}});return Ct});return quantileSeq.createQuantileSeq=dt,quantileSeq}var std={},hasRequiredStd;function requireStd(){if(hasRequiredStd)return std;hasRequiredStd=1,Object.defineProperty(std,"__esModule",{value:!0}),std.createStd=void 0;var et=requireFactory(),_e="std",tt=["typed","sqrt","variance"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.sqrt,ft=nt.variance;return st(_e,{"Array | Matrix":ht,"Array | Matrix, string":ht,"Array | Matrix, number | BigNumber":ht,"Array | Matrix, number | BigNumber, string":ht,"...":function(bt){return ht(bt)}});function ht(mt,bt){if(mt.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return dt(ft.apply(null,arguments))}catch(St){throw St instanceof TypeError&&St.message.indexOf(" variance")!==-1?new TypeError(St.message.replace(" variance"," std")):St}}});return std.createStd=rt,std}var combinations={},hasRequiredCombinations;function requireCombinations(){if(hasRequiredCombinations)return combinations;hasRequiredCombinations=1,Object.defineProperty(combinations,"__esModule",{value:!0}),combinations.createCombinations=void 0;var et=requireFactory(),_e=requireCombinations$2(),tt="combinations",rt=["typed"],nt=(0,et.factory)(tt,rt,function(dt){var ft=dt.typed;return ft(tt,{"number, number":_e.combinationsNumber,"BigNumber, BigNumber":function(mt,bt){var St=mt.constructor,Et,Ct,Rt=mt.minus(bt),Tt=new St(1);if(!st(mt)||!st(bt))throw new TypeError("Positive integer value expected in function combinations");if(bt.gt(mt))throw new TypeError("k must be less than n in function combinations");if(Et=Tt,bt.lt(Rt))for(Ct=Tt;Ct.lte(Rt);Ct=Ct.plus(Tt))Et=Et.times(bt.plus(Ct)).dividedBy(Ct);else for(Ct=Tt;Ct.lte(bt);Ct=Ct.plus(Tt))Et=Et.times(Rt.plus(Ct)).dividedBy(Ct);return Et}})});combinations.createCombinations=nt;function st(dt){return dt.isInteger()&&dt.gte(0)}return combinations}var combinationsWithRep={},hasRequiredCombinationsWithRep;function requireCombinationsWithRep(){if(hasRequiredCombinationsWithRep)return combinationsWithRep;hasRequiredCombinationsWithRep=1,Object.defineProperty(combinationsWithRep,"__esModule",{value:!0}),combinationsWithRep.createCombinationsWithRep=void 0;var et=requireFactory(),_e=requireNumber$3(),tt=requireProduct(),rt="combinationsWithRep",nt=["typed"],st=(0,et.factory)(rt,nt,function(ft){var ht=ft.typed;return ht(rt,{"number, number":function(bt,St){if(!(0,_e.isInteger)(bt)||bt<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!(0,_e.isInteger)(St)||St<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(bt<1)throw new TypeError("k must be less than or equal to n + k - 1");if(St<bt-1){var Et=(0,tt.product)(bt,bt+St-1);return Et/(0,tt.product)(1,St)}var Ct=(0,tt.product)(St+1,bt+St-1);return Ct/(0,tt.product)(1,bt-1)},"BigNumber, BigNumber":function(bt,St){var Et=bt.constructor,Ct,Rt,Tt=new Et(1),wt=bt.minus(Tt);if(!dt(bt)||!dt(St))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(bt.lt(Tt))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(Ct=Tt,St.lt(wt))for(Rt=Tt;Rt.lte(wt);Rt=Rt.plus(Tt))Ct=Ct.times(St.plus(Rt)).dividedBy(Rt);else for(Rt=Tt;Rt.lte(St);Rt=Rt.plus(Tt))Ct=Ct.times(wt.plus(Rt)).dividedBy(Rt);return Ct}})});combinationsWithRep.createCombinationsWithRep=st;function dt(ft){return ft.isInteger()&&ft.gte(0)}return combinationsWithRep}var gamma={},hasRequiredGamma;function requireGamma(){if(hasRequiredGamma)return gamma;hasRequiredGamma=1,Object.defineProperty(gamma,"__esModule",{value:!0}),gamma.createGamma=void 0;var et=requireCollection(),_e=requireFactory(),tt=requireNumber$2(),rt="gamma",nt=["typed","config","multiplyScalar","pow","BigNumber","Complex"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.config;dt.multiplyScalar,dt.pow;var mt=dt.BigNumber,bt=dt.Complex;return ft(rt,{number:tt.gammaNumber,Complex:function(Ct){if(Ct.im===0)return this(Ct.re);if(Ct.re<.5){var Rt=new bt(1-Ct.re,-Ct.im),Tt=new bt(Math.PI*Ct.re,Math.PI*Ct.im);return new bt(Math.PI).div(Tt.sin()).div(this(Rt))}Ct=new bt(Ct.re-1,Ct.im);for(var wt=new bt(tt.gammaP[0],0),At=1;At<tt.gammaP.length;++At){var Nt=new bt(tt.gammaP[At],0);wt=wt.add(Nt.div(Ct.add(At)))}var Pt=new bt(Ct.re+tt.gammaG+.5,Ct.im),It=Math.sqrt(2*Math.PI),Ft=Pt.pow(Ct.add(.5)),qt=Pt.neg().exp();return wt.mul(It).mul(Ft).mul(qt)},BigNumber:function(Ct){if(Ct.isInteger())return Ct.isNegative()||Ct.isZero()?new mt(1/0):St(Ct.minus(1));if(!Ct.isFinite())return new mt(Ct.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(Ct){return(0,et.deepMap)(Ct,this)}});function St(Et){if(Et<8)return new mt([1,1,2,6,24,120,720,5040][Et]);var Ct=ht.precision+(Math.log(Et.toNumber())|0),Rt=mt.clone({precision:Ct});if(Et%2===1)return Et.times(St(new mt(Et-1)));for(var Tt=Et,wt=new Rt(Et),At=Et.toNumber();Tt>2;)Tt-=2,At+=Tt,wt=wt.times(At);return new mt(wt.toPrecision(mt.precision))}});return gamma.createGamma=st,gamma}var lgamma={},hasRequiredLgamma;function requireLgamma(){if(hasRequiredLgamma)return lgamma;hasRequiredLgamma=1,Object.defineProperty(lgamma,"__esModule",{value:!0}),lgamma.createLgamma=void 0;var et=requireNumber$2(),_e=requireFactory(),tt=requireNumber$3(),rt="lgamma",nt=["Complex","typed"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.Complex,ht=dt.typed,mt=7,bt=7,St=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return ht(rt,{number:et.lgammaNumber,Complex:function(Tt){var wt=6.283185307179586,At=1.1447298858494002,Nt=.1;if(Tt.isNaN())return new ft(NaN,NaN);if(Tt.im===0)return new ft((0,et.lgammaNumber)(Tt.re),0);if(Tt.re>=mt||Math.abs(Tt.im)>=bt)return Et(Tt);if(Tt.re<=Nt){var Pt=(0,tt.copysign)(wt,Tt.im)*Math.floor(.5*Tt.re+.25),It=Tt.mul(Math.PI).sin().log(),Ft=this(new ft(1-Tt.re,-Tt.im));return new ft(At,Pt).sub(It).sub(Ft)}else return Tt.im>=0?Ct(Tt):Ct(Tt.conjugate()).conjugate()},BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function Et(Rt){for(var Tt=Rt.sub(.5).mul(Rt.log()).sub(Rt).add(et.lnSqrt2PI),wt=new ft(1,0).div(Rt),At=wt.div(Rt),Nt=St[0],Pt=St[1],It=2*At.re,Ft=At.re*At.re+At.im*At.im,qt=2;qt<8;qt++){var Vt=Pt;Pt=-Ft*Nt+St[qt],Nt=It*Nt+Vt}var Kt=wt.mul(At.mul(Nt).add(Pt));return Tt.add(Kt)}function Ct(Rt){var Tt=0,wt=0,At=Rt;for(Rt=Rt.add(1);Rt.re<=mt;){At=At.mul(Rt);var Nt=At.im<0?1:0;Nt!==0&&wt===0&&Tt++,wt=Nt,Rt=Rt.add(1)}return Et(Rt).sub(At.log()).sub(new ft(0,Tt*2*Math.PI*1))}});return lgamma.createLgamma=st,lgamma}var factorial={},hasRequiredFactorial;function requireFactorial(){if(hasRequiredFactorial)return factorial;hasRequiredFactorial=1,Object.defineProperty(factorial,"__esModule",{value:!0}),factorial.createFactorial=void 0;var et=requireCollection(),_e=requireFactory(),tt="factorial",rt=["typed","gamma"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.gamma;return dt(tt,{number:function(mt){if(mt<0)throw new Error("Value must be non-negative");return ft(mt+1)},BigNumber:function(mt){if(mt.isNegative())throw new Error("Value must be non-negative");return ft(mt.plus(1))},"Array | Matrix":function(mt){return(0,et.deepMap)(mt,this)}})});return factorial.createFactorial=nt,factorial}var kldivergence={},hasRequiredKldivergence;function requireKldivergence(){if(hasRequiredKldivergence)return kldivergence;hasRequiredKldivergence=1,Object.defineProperty(kldivergence,"__esModule",{value:!0}),kldivergence.createKldivergence=void 0;var et=requireFactory(),_e="kldivergence",tt=["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.matrix,ft=nt.divide,ht=nt.sum,mt=nt.multiply,bt=nt.dotDivide,St=nt.log,Et=nt.isNumeric;return st(_e,{"Array, Array":function(Tt,wt){return Ct(dt(Tt),dt(wt))},"Matrix, Array":function(Tt,wt){return Ct(Tt,dt(wt))},"Array, Matrix":function(Tt,wt){return Ct(dt(Tt),wt)},"Matrix, Matrix":function(Tt,wt){return Ct(Tt,wt)}});function Ct(Rt,Tt){var wt=Tt.size().length,At=Rt.size().length;if(wt>1)throw new Error("first object must be one dimensional");if(At>1)throw new Error("second object must be one dimensional");if(wt!==At)throw new Error("Length of two vectors must be equal");var Nt=ht(Rt);if(Nt===0)throw new Error("Sum of elements in first object must be non zero");var Pt=ht(Tt);if(Pt===0)throw new Error("Sum of elements in second object must be non zero");var It=ft(Rt,ht(Rt)),Ft=ft(Tt,ht(Tt)),qt=ht(mt(It,St(bt(It,Ft))));return Et(qt)?qt:Number.NaN}});return kldivergence.createKldivergence=rt,kldivergence}var multinomial={},hasRequiredMultinomial;function requireMultinomial(){if(hasRequiredMultinomial)return multinomial;hasRequiredMultinomial=1,Object.defineProperty(multinomial,"__esModule",{value:!0}),multinomial.createMultinomial=void 0;var et=requireCollection(),_e=requireFactory(),tt="multinomial",rt=["typed","add","divide","multiply","factorial","isInteger","isPositive"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.add,ht=st.divide,mt=st.multiply,bt=st.factorial,St=st.isInteger,Et=st.isPositive;return dt(tt,{"Array | Matrix":function(Rt){var Tt=0,wt=1;return(0,et.deepForEach)(Rt,function(At){if(!St(At)||!Et(At))throw new TypeError("Positive integer value expected in function multinomial");Tt=ft(Tt,At),wt=mt(wt,bt(At))}),ht(bt(Tt),wt)}})});return multinomial.createMultinomial=nt,multinomial}var permutations={},hasRequiredPermutations;function requirePermutations(){if(hasRequiredPermutations)return permutations;hasRequiredPermutations=1,Object.defineProperty(permutations,"__esModule",{value:!0}),permutations.createPermutations=void 0;var et=requireNumber$3(),_e=requireProduct(),tt=requireFactory(),rt="permutations",nt=["typed","factorial"],st=(0,tt.factory)(rt,nt,function(ft){var ht=ft.typed,mt=ft.factorial;return ht(rt,{"number | BigNumber":mt,"number, number":function(St,Et){if(!(0,et.isInteger)(St)||St<0)throw new TypeError("Positive integer value expected in function permutations");if(!(0,et.isInteger)(Et)||Et<0)throw new TypeError("Positive integer value expected in function permutations");if(Et>St)throw new TypeError("second argument k must be less than or equal to first argument n");return(0,_e.product)(St-Et+1,St)},"BigNumber, BigNumber":function(St,Et){var Ct,Rt;if(!dt(St)||!dt(Et))throw new TypeError("Positive integer value expected in function permutations");if(Et.gt(St))throw new TypeError("second argument k must be less than or equal to first argument n");var Tt=St.mul(0).add(1);for(Ct=Tt,Rt=St.minus(Et).plus(1);Rt.lte(St);Rt=Rt.plus(1))Ct=Ct.times(Rt);return Ct}})});permutations.createPermutations=st;function dt(ft){return ft.isInteger()&&ft.gte(0)}return permutations}var pickRandom={},seededRNG={},alea$1={exports:{}},alea=alea$1.exports,hasRequiredAlea;function requireAlea(){return hasRequiredAlea||(hasRequiredAlea=1,(function(et){(function(_e,tt,rt){function nt(ht){var mt=this,bt=ft();mt.next=function(){var St=2091639*mt.s0+mt.c*23283064365386963e-26;return mt.s0=mt.s1,mt.s1=mt.s2,mt.s2=St-(mt.c=St|0)},mt.c=1,mt.s0=bt(" "),mt.s1=bt(" "),mt.s2=bt(" "),mt.s0-=bt(ht),mt.s0<0&&(mt.s0+=1),mt.s1-=bt(ht),mt.s1<0&&(mt.s1+=1),mt.s2-=bt(ht),mt.s2<0&&(mt.s2+=1),bt=null}function st(ht,mt){return mt.c=ht.c,mt.s0=ht.s0,mt.s1=ht.s1,mt.s2=ht.s2,mt}function dt(ht,mt){var bt=new nt(ht),St=mt&&mt.state,Et=bt.next;return Et.int32=function(){return bt.next()*4294967296|0},Et.double=function(){return Et()+(Et()*2097152|0)*11102230246251565e-32},Et.quick=Et,St&&(typeof St=="object"&&st(St,bt),Et.state=function(){return st(bt,{})}),Et}function ft(){var ht=4022871197,mt=function(bt){bt=String(bt);for(var St=0;St<bt.length;St++){ht+=bt.charCodeAt(St);var Et=.02519603282416938*ht;ht=Et>>>0,Et-=ht,Et*=ht,ht=Et>>>0,Et-=ht,ht+=Et*4294967296}return(ht>>>0)*23283064365386963e-26};return mt}tt&&tt.exports?tt.exports=dt:this.alea=dt})(alea,et)})(alea$1)),alea$1.exports}var xor128$1={exports:{}},xor128=xor128$1.exports,hasRequiredXor128;function requireXor128(){return hasRequiredXor128||(hasRequiredXor128=1,(function(et){(function(_e,tt,rt){function nt(ft){var ht=this,mt="";ht.x=0,ht.y=0,ht.z=0,ht.w=0,ht.next=function(){var St=ht.x^ht.x<<11;return ht.x=ht.y,ht.y=ht.z,ht.z=ht.w,ht.w^=ht.w>>>19^St^St>>>8},ft===(ft|0)?ht.x=ft:mt+=ft;for(var bt=0;bt<mt.length+64;bt++)ht.x^=mt.charCodeAt(bt)|0,ht.next()}function st(ft,ht){return ht.x=ft.x,ht.y=ft.y,ht.z=ft.z,ht.w=ft.w,ht}function dt(ft,ht){var mt=new nt(ft),bt=ht&&ht.state,St=function(){return(mt.next()>>>0)/4294967296};return St.double=function(){do var Et=mt.next()>>>11,Ct=(mt.next()>>>0)/4294967296,Rt=(Et+Ct)/(1<<21);while(Rt===0);return Rt},St.int32=mt.next,St.quick=St,bt&&(typeof bt=="object"&&st(bt,mt),St.state=function(){return st(mt,{})}),St}tt&&tt.exports?tt.exports=dt:this.xor128=dt})(xor128,et)})(xor128$1)),xor128$1.exports}var xorwow$1={exports:{}},xorwow=xorwow$1.exports,hasRequiredXorwow;function requireXorwow(){return hasRequiredXorwow||(hasRequiredXorwow=1,(function(et){(function(_e,tt,rt){function nt(ft){var ht=this,mt="";ht.next=function(){var St=ht.x^ht.x>>>2;return ht.x=ht.y,ht.y=ht.z,ht.z=ht.w,ht.w=ht.v,(ht.d=ht.d+362437|0)+(ht.v=ht.v^ht.v<<4^(St^St<<1))|0},ht.x=0,ht.y=0,ht.z=0,ht.w=0,ht.v=0,ft===(ft|0)?ht.x=ft:mt+=ft;for(var bt=0;bt<mt.length+64;bt++)ht.x^=mt.charCodeAt(bt)|0,bt==mt.length&&(ht.d=ht.x<<10^ht.x>>>4),ht.next()}function st(ft,ht){return ht.x=ft.x,ht.y=ft.y,ht.z=ft.z,ht.w=ft.w,ht.v=ft.v,ht.d=ft.d,ht}function dt(ft,ht){var mt=new nt(ft),bt=ht&&ht.state,St=function(){return(mt.next()>>>0)/4294967296};return St.double=function(){do var Et=mt.next()>>>11,Ct=(mt.next()>>>0)/4294967296,Rt=(Et+Ct)/(1<<21);while(Rt===0);return Rt},St.int32=mt.next,St.quick=St,bt&&(typeof bt=="object"&&st(bt,mt),St.state=function(){return st(mt,{})}),St}tt&&tt.exports?tt.exports=dt:this.xorwow=dt})(xorwow,et)})(xorwow$1)),xorwow$1.exports}var xorshift7$1={exports:{}},xorshift7=xorshift7$1.exports,hasRequiredXorshift7;function requireXorshift7(){return hasRequiredXorshift7||(hasRequiredXorshift7=1,(function(et){(function(_e,tt,rt){function nt(ft){var ht=this;ht.next=function(){var bt=ht.x,St=ht.i,Et,Ct;return Et=bt[St],Et^=Et>>>7,Ct=Et^Et<<24,Et=bt[St+1&7],Ct^=Et^Et>>>10,Et=bt[St+3&7],Ct^=Et^Et>>>3,Et=bt[St+4&7],Ct^=Et^Et<<7,Et=bt[St+7&7],Et=Et^Et<<13,Ct^=Et^Et<<9,bt[St]=Ct,ht.i=St+1&7,Ct};function mt(bt,St){var Et,Ct=[];if(St===(St|0))Ct[0]=St;else for(St=""+St,Et=0;Et<St.length;++Et)Ct[Et&7]=Ct[Et&7]<<15^St.charCodeAt(Et)+Ct[Et+1&7]<<13;for(;Ct.length<8;)Ct.push(0);for(Et=0;Et<8&&Ct[Et]===0;++Et);for(Et==8?Ct[7]=-1:Ct[Et],bt.x=Ct,bt.i=0,Et=256;Et>0;--Et)bt.next()}mt(ht,ft)}function st(ft,ht){return ht.x=ft.x.slice(),ht.i=ft.i,ht}function dt(ft,ht){ft==null&&(ft=+new Date);var mt=new nt(ft),bt=ht&&ht.state,St=function(){return(mt.next()>>>0)/4294967296};return St.double=function(){do var Et=mt.next()>>>11,Ct=(mt.next()>>>0)/4294967296,Rt=(Et+Ct)/(1<<21);while(Rt===0);return Rt},St.int32=mt.next,St.quick=St,bt&&(bt.x&&st(bt,mt),St.state=function(){return st(mt,{})}),St}tt&&tt.exports?tt.exports=dt:this.xorshift7=dt})(xorshift7,et)})(xorshift7$1)),xorshift7$1.exports}var xor4096$1={exports:{}},xor4096=xor4096$1.exports,hasRequiredXor4096;function requireXor4096(){return hasRequiredXor4096||(hasRequiredXor4096=1,(function(et){(function(_e,tt,rt){function nt(ft){var ht=this;ht.next=function(){var bt=ht.w,St=ht.X,Et=ht.i,Ct,Rt;return ht.w=bt=bt+1640531527|0,Rt=St[Et+34&127],Ct=St[Et=Et+1&127],Rt^=Rt<<13,Ct^=Ct<<17,Rt^=Rt>>>15,Ct^=Ct>>>12,Rt=St[Et]=Rt^Ct,ht.i=Et,Rt+(bt^bt>>>16)|0};function mt(bt,St){var Et,Ct,Rt,Tt,wt,At=[],Nt=128;for(St===(St|0)?(Ct=St,St=null):(St=St+"\0",Ct=0,Nt=Math.max(Nt,St.length)),Rt=0,Tt=-32;Tt<Nt;++Tt)St&&(Ct^=St.charCodeAt((Tt+32)%St.length)),Tt===0&&(wt=Ct),Ct^=Ct<<10,Ct^=Ct>>>15,Ct^=Ct<<4,Ct^=Ct>>>13,Tt>=0&&(wt=wt+1640531527|0,Et=At[Tt&127]^=Ct+wt,Rt=Et==0?Rt+1:0);for(Rt>=128&&(At[(St&&St.length||0)&127]=-1),Rt=127,Tt=512;Tt>0;--Tt)Ct=At[Rt+34&127],Et=At[Rt=Rt+1&127],Ct^=Ct<<13,Et^=Et<<17,Ct^=Ct>>>15,Et^=Et>>>12,At[Rt]=Ct^Et;bt.w=wt,bt.X=At,bt.i=Rt}mt(ht,ft)}function st(ft,ht){return ht.i=ft.i,ht.w=ft.w,ht.X=ft.X.slice(),ht}function dt(ft,ht){ft==null&&(ft=+new Date);var mt=new nt(ft),bt=ht&&ht.state,St=function(){return(mt.next()>>>0)/4294967296};return St.double=function(){do var Et=mt.next()>>>11,Ct=(mt.next()>>>0)/4294967296,Rt=(Et+Ct)/(1<<21);while(Rt===0);return Rt},St.int32=mt.next,St.quick=St,bt&&(bt.X&&st(bt,mt),St.state=function(){return st(mt,{})}),St}tt&&tt.exports?tt.exports=dt:this.xor4096=dt})(xor4096,et)})(xor4096$1)),xor4096$1.exports}var tychei$1={exports:{}},tychei=tychei$1.exports,hasRequiredTychei;function requireTychei(){return hasRequiredTychei||(hasRequiredTychei=1,(function(et){(function(_e,tt,rt){function nt(ft){var ht=this,mt="";ht.next=function(){var St=ht.b,Et=ht.c,Ct=ht.d,Rt=ht.a;return St=St<<25^St>>>7^Et,Et=Et-Ct|0,Ct=Ct<<24^Ct>>>8^Rt,Rt=Rt-St|0,ht.b=St=St<<20^St>>>12^Et,ht.c=Et=Et-Ct|0,ht.d=Ct<<16^Et>>>16^Rt,ht.a=Rt-St|0},ht.a=0,ht.b=0,ht.c=-1640531527,ht.d=1367130551,ft===Math.floor(ft)?(ht.a=ft/4294967296|0,ht.b=ft|0):mt+=ft;for(var bt=0;bt<mt.length+20;bt++)ht.b^=mt.charCodeAt(bt)|0,ht.next()}function st(ft,ht){return ht.a=ft.a,ht.b=ft.b,ht.c=ft.c,ht.d=ft.d,ht}function dt(ft,ht){var mt=new nt(ft),bt=ht&&ht.state,St=function(){return(mt.next()>>>0)/4294967296};return St.double=function(){do var Et=mt.next()>>>11,Ct=(mt.next()>>>0)/4294967296,Rt=(Et+Ct)/(1<<21);while(Rt===0);return Rt},St.int32=mt.next,St.quick=St,bt&&(typeof bt=="object"&&st(bt,mt),St.state=function(){return st(mt,{})}),St}tt&&tt.exports?tt.exports=dt:this.tychei=dt})(tychei,et)})(tychei$1)),tychei$1.exports}var seedrandom$2={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace$1(__viteBrowserExternal$1);var seedrandom$1=seedrandom$2.exports,hasRequiredSeedrandom$1;function requireSeedrandom$1(){return hasRequiredSeedrandom$1||(hasRequiredSeedrandom$1=1,(function(et){(function(_e,tt,rt){var nt=256,st=6,dt=52,ft="random",ht=rt.pow(nt,st),mt=rt.pow(2,dt),bt=mt*2,St=nt-1,Et;function Ct(It,Ft,qt){var Vt=[];Ft=Ft==!0?{entropy:!0}:Ft||{};var Kt=At(wt(Ft.entropy?[It,Pt(tt)]:It??Nt(),3),Vt),jt=new Rt(Vt),Ut=function(){for(var Ot=jt.g(st),Wt=ht,Bt=0;Ot<mt;)Ot=(Ot+Bt)*nt,Wt*=nt,Bt=jt.g(1);for(;Ot>=bt;)Ot/=2,Wt/=2,Bt>>>=1;return(Ot+Bt)/Wt};return Ut.int32=function(){return jt.g(4)|0},Ut.quick=function(){return jt.g(4)/4294967296},Ut.double=Ut,At(Pt(jt.S),tt),(Ft.pass||qt||function(Ot,Wt,Bt,tr){return tr&&(tr.S&&Tt(tr,jt),Ot.state=function(){return Tt(jt,{})}),Bt?(rt[ft]=Ot,Wt):Ot})(Ut,Kt,"global"in Ft?Ft.global:this==rt,Ft.state)}function Rt(It){var Ft,qt=It.length,Vt=this,Kt=0,jt=Vt.i=Vt.j=0,Ut=Vt.S=[];for(qt||(It=[qt++]);Kt<nt;)Ut[Kt]=Kt++;for(Kt=0;Kt<nt;Kt++)Ut[Kt]=Ut[jt=St&jt+It[Kt%qt]+(Ft=Ut[Kt])],Ut[jt]=Ft;(Vt.g=function(Ot){for(var Wt,Bt=0,tr=Vt.i,Jt=Vt.j,ar=Vt.S;Ot--;)Wt=ar[tr=St&tr+1],Bt=Bt*nt+ar[St&(ar[tr]=ar[Jt=St&Jt+Wt])+(ar[Jt]=Wt)];return Vt.i=tr,Vt.j=Jt,Bt})(nt)}function Tt(It,Ft){return Ft.i=It.i,Ft.j=It.j,Ft.S=It.S.slice(),Ft}function wt(It,Ft){var qt=[],Vt=typeof It,Kt;if(Ft&&Vt=="object")for(Kt in It)try{qt.push(wt(It[Kt],Ft-1))}catch{}return qt.length?qt:Vt=="string"?It:It+"\0"}function At(It,Ft){for(var qt=It+"",Vt,Kt=0;Kt<qt.length;)Ft[St&Kt]=St&(Vt^=Ft[St&Kt]*19)+qt.charCodeAt(Kt++);return Pt(Ft)}function Nt(){try{var It;return Et&&(It=Et.randomBytes)?It=It(nt):(It=new Uint8Array(nt),(_e.crypto||_e.msCrypto).getRandomValues(It)),Pt(It)}catch{var Ft=_e.navigator,qt=Ft&&Ft.plugins;return[+new Date,_e,qt,_e.screen,Pt(tt)]}}function Pt(It){return String.fromCharCode.apply(0,It)}if(At(rt.random(),tt),et.exports){et.exports=Ct;try{Et=require$$0}catch{}}else rt["seed"+ft]=Ct})(typeof self<"u"?self:seedrandom$1,[],Math)})(seedrandom$2)),seedrandom$2.exports}var seedrandom,hasRequiredSeedrandom;function requireSeedrandom(){if(hasRequiredSeedrandom)return seedrandom;hasRequiredSeedrandom=1;var et=requireAlea(),_e=requireXor128(),tt=requireXorwow(),rt=requireXorshift7(),nt=requireXor4096(),st=requireTychei(),dt=requireSeedrandom$1();return dt.alea=et,dt.xor128=_e,dt.xorwow=tt,dt.xorshift7=rt,dt.xor4096=nt,dt.tychei=st,seedrandom=dt,seedrandom}var hasRequiredSeededRNG;function requireSeededRNG(){if(hasRequiredSeededRNG)return seededRNG;hasRequiredSeededRNG=1;var et=requireInteropRequireDefault();Object.defineProperty(seededRNG,"__esModule",{value:!0}),seededRNG.createRng=rt;var _e=et(requireSeedrandom()),tt=(0,_e.default)(Date.now());function rt(nt){var st;function dt(ht){st=ht===null?tt:(0,_e.default)(String(ht))}dt(nt);function ft(){return st()}return ft}return seededRNG}var hasRequiredPickRandom;function requirePickRandom(){if(hasRequiredPickRandom)return pickRandom;hasRequiredPickRandom=1,Object.defineProperty(pickRandom,"__esModule",{value:!0}),pickRandom.createPickRandom=void 0;var et=requireArray(),_e=requireFactory(),tt=requireIs(),rt=requireSeededRNG(),nt="pickRandom",st=["typed","config","?on"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.on,St=(0,rt.createRng)(mt.randomSeed);return bt&&bt("config",function(Ct,Rt){Ct.randomSeed!==Rt.randomSeed&&(St=(0,rt.createRng)(Ct.randomSeed))}),ht(nt,{"Array | Matrix":function(Rt){return Et(Rt,{})},"Array | Matrix, Object":function(Rt,Tt){return Et(Rt,Tt)},"Array | Matrix, number":function(Rt,Tt){return Et(Rt,{number:Tt})},"Array | Matrix, Array | Matrix":function(Rt,Tt){return Et(Rt,{weights:Tt})},"Array | Matrix, Array | Matrix, number":function(Rt,Tt,wt){return Et(Rt,{number:wt,weights:Tt})},"Array | Matrix, number, Array | Matrix":function(Rt,Tt,wt){return Et(Rt,{number:Tt,weights:wt})}});function Et(Ct,Rt){var Tt=Rt.number,wt=Rt.weights,At=Rt.elementWise,Nt=At===void 0?!0:At,Pt=typeof Tt>"u";Pt&&(Tt=1);var It=(0,tt.isMatrix)(Ct)?Ct.create:(0,tt.isMatrix)(wt)?wt.create:null;Ct=Ct.valueOf(),wt&&(wt=wt.valueOf()),Nt===!0&&(Ct=(0,et.flatten)(Ct),wt=(0,et.flatten)(wt));var Ft=0;if(typeof wt<"u"){if(wt.length!==Ct.length)throw new Error("Weights must have the same length as possibles");for(var qt=0,Vt=wt.length;qt<Vt;qt++){if(!(0,tt.isNumber)(wt[qt])||wt[qt]<0)throw new Error("Weights must be an array of positive numbers");Ft+=wt[qt]}}for(var Kt=Ct.length,jt=[],Ut;jt.length<Tt;){if(typeof wt>"u")Ut=Ct[Math.floor(St()*Kt)];else for(var Ot=St()*Ft,Wt=0,Bt=Ct.length;Wt<Bt;Wt++)if(Ot-=wt[Wt],Ot<0){Ut=Ct[Wt];break}jt.push(Ut)}return Pt?jt[0]:It?It(jt):jt}});return pickRandom.createPickRandom=dt,pickRandom}var random={},randomMatrix={},hasRequiredRandomMatrix;function requireRandomMatrix(){if(hasRequiredRandomMatrix)return randomMatrix;hasRequiredRandomMatrix=1,Object.defineProperty(randomMatrix,"__esModule",{value:!0}),randomMatrix.randomMatrix=et;function et(_e,tt){var rt=[];if(_e=_e.slice(0),_e.length>1)for(var nt=0,st=_e.shift();nt<st;nt++)rt.push(et(_e,tt));else for(var dt=0,ft=_e.shift();dt<ft;dt++)rt.push(tt());return rt}return randomMatrix}var hasRequiredRandom;function requireRandom(){if(hasRequiredRandom)return random;hasRequiredRandom=1,Object.defineProperty(random,"__esModule",{value:!0}),random.createRandomNumber=random.createRandom=void 0;var et=requireFactory(),_e=requireIs(),tt=requireSeededRNG(),rt=requireRandomMatrix(),nt="random",st=["typed","config","?on"],dt=(0,et.factory)(nt,st,function(ht){var mt=ht.typed,bt=ht.config,St=ht.on,Et=(0,tt.createRng)(bt.randomSeed);return St&&St("config",function(Tt,wt){Tt.randomSeed!==wt.randomSeed&&(Et=(0,tt.createRng)(Tt.randomSeed))}),mt(nt,{"":function(){return Rt(0,1)},number:function(wt){return Rt(0,wt)},"number, number":function(wt,At){return Rt(wt,At)},"Array | Matrix":function(wt){return Ct(wt,0,1)},"Array | Matrix, number":function(wt,At){return Ct(wt,0,At)},"Array | Matrix, number, number":function(wt,At,Nt){return Ct(wt,At,Nt)}});function Ct(Tt,wt,At){var Nt=(0,rt.randomMatrix)(Tt.valueOf(),function(){return Rt(wt,At)});return(0,_e.isMatrix)(Tt)?Tt.create(Nt):Nt}function Rt(Tt,wt){return Tt+Et()*(wt-Tt)}});random.createRandom=dt;var ft=(0,et.factory)(nt,["typed","config","?on"],function(ht){var mt=ht.typed,bt=ht.config,St=ht.on;ht.matrix;var Et=(0,tt.createRng)(bt.randomSeed);return St&&St("config",function(Rt,Tt){Rt.randomSeed!==Tt.randomSeed&&(Et=(0,tt.createRng)(Rt.randomSeed))}),mt(nt,{"":function(){return Ct(0,1)},number:function(Tt){return Ct(0,Tt)},"number, number":function(Tt,wt){return Ct(Tt,wt)}});function Ct(Rt,Tt){return Rt+Et()*(Tt-Rt)}});return random.createRandomNumber=ft,random}var randomInt={},hasRequiredRandomInt;function requireRandomInt(){if(hasRequiredRandomInt)return randomInt;hasRequiredRandomInt=1,Object.defineProperty(randomInt,"__esModule",{value:!0}),randomInt.createRandomInt=void 0;var et=requireFactory(),_e=requireRandomMatrix(),tt=requireSeededRNG(),rt=requireIs(),nt="randomInt",st=["typed","config","?on"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.on,St=(0,tt.createRng)(mt.randomSeed);return bt&&bt("config",function(Rt,Tt){Rt.randomSeed!==Tt.randomSeed&&(St=(0,tt.createRng)(Rt.randomSeed))}),ht(nt,{"":function(){return Ct(0,1)},number:function(Tt){return Ct(0,Tt)},"number, number":function(Tt,wt){return Ct(Tt,wt)},"Array | Matrix":function(Tt){return Et(Tt,0,1)},"Array | Matrix, number":function(Tt,wt){return Et(Tt,0,wt)},"Array | Matrix, number, number":function(Tt,wt,At){return Et(Tt,wt,At)}});function Et(Rt,Tt,wt){var At=(0,_e.randomMatrix)(Rt.valueOf(),function(){return Ct(Tt,wt)});return(0,rt.isMatrix)(Rt)?Rt.create(At):At}function Ct(Rt,Tt){return Math.floor(Rt+St()*(Tt-Rt))}});return randomInt.createRandomInt=dt,randomInt}var stirlingS2={},hasRequiredStirlingS2;function requireStirlingS2(){if(hasRequiredStirlingS2)return stirlingS2;hasRequiredStirlingS2=1,Object.defineProperty(stirlingS2,"__esModule",{value:!0}),stirlingS2.createStirlingS2=void 0;var et=requireFactory(),_e=requireIs(),tt="stirlingS2",rt=["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.addScalar;st.subtract;var ht=st.multiplyScalar;st.divideScalar,st.pow,st.factorial,st.combinations;var mt=st.isNegative,bt=st.isInteger,St=st.number,Et=st.bignumber,Ct=st.larger,Rt=[],Tt=[];return dt(tt,{"number | BigNumber, number | BigNumber":function(At,Nt){if(!bt(At)||mt(At)||!bt(Nt)||mt(Nt))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(Ct(Nt,At))throw new TypeError("k must be less than or equal to n in function stirlingS2");var Pt=!((0,_e.isNumber)(At)&&(0,_e.isNumber)(Nt)),It=Pt?Tt:Rt,Ft=Pt?Et:St,qt=St(At),Vt=St(Nt);if(It[qt]&&It[qt].length>Vt)return It[qt][Vt];for(var Kt=0;Kt<=qt;++Kt)if(It[Kt]||(It[Kt]=[Ft(Kt===0?1:0)]),Kt!==0)for(var jt=It[Kt],Ut=It[Kt-1],Ot=jt.length;Ot<=Kt&&Ot<=Vt;++Ot)Ot===Kt?jt[Ot]=1:jt[Ot]=ft(ht(Ft(Ot),Ut[Ot]),Ut[Ot-1]);return It[qt][Vt]}})});return stirlingS2.createStirlingS2=nt,stirlingS2}var bellNumbers={},hasRequiredBellNumbers;function requireBellNumbers(){if(hasRequiredBellNumbers)return bellNumbers;hasRequiredBellNumbers=1,Object.defineProperty(bellNumbers,"__esModule",{value:!0}),bellNumbers.createBellNumbers=void 0;var et=requireFactory(),_e="bellNumbers",tt=["typed","addScalar","isNegative","isInteger","stirlingS2"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.addScalar,ft=nt.isNegative,ht=nt.isInteger,mt=nt.stirlingS2;return st(_e,{"number | BigNumber":function(St){if(!ht(St)||ft(St))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var Et=0,Ct=0;Ct<=St;Ct++)Et=dt(Et,mt(St,Ct));return Et}})});return bellNumbers.createBellNumbers=rt,bellNumbers}var catalan={},hasRequiredCatalan;function requireCatalan(){if(hasRequiredCatalan)return catalan;hasRequiredCatalan=1,Object.defineProperty(catalan,"__esModule",{value:!0}),catalan.createCatalan=void 0;var et=requireFactory(),_e="catalan",tt=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.addScalar,ft=nt.divideScalar,ht=nt.multiplyScalar,mt=nt.combinations,bt=nt.isNegative,St=nt.isInteger;return st(_e,{"number | BigNumber":function(Ct){if(!St(Ct)||bt(Ct))throw new TypeError("Non-negative integer value expected in function catalan");return ft(mt(ht(Ct,2),Ct),dt(Ct,1))}})});return catalan.createCatalan=rt,catalan}var composition={},hasRequiredComposition;function requireComposition(){if(hasRequiredComposition)return composition;hasRequiredComposition=1,Object.defineProperty(composition,"__esModule",{value:!0}),composition.createComposition=void 0;var et=requireFactory(),_e="composition",tt=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.typed,dt=nt.addScalar,ft=nt.combinations,ht=nt.isPositive;nt.isNegative;var mt=nt.isInteger,bt=nt.larger;return st(_e,{"number | BigNumber, number | BigNumber":function(Et,Ct){if(!mt(Et)||!ht(Et)||!mt(Ct)||!ht(Ct))throw new TypeError("Positive integer value expected in function composition");if(bt(Ct,Et))throw new TypeError("k must be less than or equal to n in function composition");return ft(dt(Et,-1),dt(Ct,-1))}})});return composition.createComposition=rt,composition}var leafCount={},hasRequiredLeafCount;function requireLeafCount(){if(hasRequiredLeafCount)return leafCount;hasRequiredLeafCount=1,Object.defineProperty(leafCount,"__esModule",{value:!0}),leafCount.createLeafCount=void 0;var et=requireFactory(),_e="leafCount",tt=["parse","typed"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.parse,dt=nt.typed;function ft(ht){var mt=0;return ht.forEach(function(bt){mt+=ft(bt)}),mt||1}return dt(_e,{string:function(mt){return this(st(mt))},Node:function(mt){return ft(mt)}})});return leafCount.createLeafCount=rt,leafCount}var simplify={},util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;var et=requireInteropRequireDefault();Object.defineProperty(util,"__esModule",{value:!0}),util.createUtil=void 0;var _e=et(requireDefineProperty()),tt=requireIs(),rt=requireFactory(),nt=requireObject();function st(bt,St){var Et=Object.keys(bt);if(Object.getOwnPropertySymbols){var Ct=Object.getOwnPropertySymbols(bt);St&&(Ct=Ct.filter(function(Rt){return Object.getOwnPropertyDescriptor(bt,Rt).enumerable})),Et.push.apply(Et,Ct)}return Et}function dt(bt){for(var St=1;St<arguments.length;St++){var Et=arguments[St]!=null?arguments[St]:{};St%2?st(Object(Et),!0).forEach(function(Ct){(0,_e.default)(bt,Ct,Et[Ct])}):Object.getOwnPropertyDescriptors?Object.defineProperties(bt,Object.getOwnPropertyDescriptors(Et)):st(Object(Et)).forEach(function(Ct){Object.defineProperty(bt,Ct,Object.getOwnPropertyDescriptor(Et,Ct))})}return bt}var ft="simplifyUtil",ht=["FunctionNode","OperatorNode","SymbolNode"],mt=(0,rt.factory)(ft,ht,function(bt){var St=bt.FunctionNode,Et=bt.OperatorNode,Ct=bt.SymbolNode,Rt=!0,Tt=!1,wt="defaultF",At={add:{trivial:Rt,total:Rt,commutative:Rt,associative:Rt},unaryPlus:{trivial:Rt,total:Rt,commutative:Rt,associative:Rt},subtract:{trivial:Tt,total:Rt,commutative:Tt,associative:Tt},multiply:{trivial:Rt,total:Rt,commutative:Rt,associative:Rt},divide:{trivial:Tt,total:Rt,commutative:Tt,associative:Tt},paren:{trivial:Rt,total:Rt,commutative:Rt,associative:Tt},defaultF:{trivial:Tt,total:Rt,commutative:Tt,associative:Tt}},Nt={divide:{total:Tt},log:{total:Tt}},Pt={subtract:{total:Tt},abs:{trivial:Rt},log:{total:Rt}};function It(Bt,tr){var Jt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At,ar=wt;if(typeof Bt=="string"?ar=Bt:(0,tt.isOperatorNode)(Bt)?ar=Bt.fn.toString():(0,tt.isFunctionNode)(Bt)?ar=Bt.name:(0,tt.isParenthesisNode)(Bt)&&(ar="paren"),(0,nt.hasOwnProperty)(Jt,ar)){var pr=Jt[ar];if((0,nt.hasOwnProperty)(pr,tr))return pr[tr];if((0,nt.hasOwnProperty)(At,ar))return At[ar][tr]}if((0,nt.hasOwnProperty)(Jt,wt)){var cr=Jt[wt];return(0,nt.hasOwnProperty)(cr,tr)?cr[tr]:At[wt][tr]}if((0,nt.hasOwnProperty)(At,ar)){var gr=At[ar];if((0,nt.hasOwnProperty)(gr,tr))return gr[tr]}return At[wt][tr]}function Ft(Bt){var tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:At;return It(Bt,"commutative",tr)}function qt(Bt){var tr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:At;return It(Bt,"associative",tr)}function Vt(Bt,tr){var Jt=dt({},Bt);for(var ar in tr)(0,nt.hasOwnProperty)(Bt,ar)?Jt[ar]=dt(dt({},tr[ar]),Bt[ar]):Jt[ar]=tr[ar];return Jt}function Kt(Bt,tr){if(!Bt.args||Bt.args.length===0)return Bt;Bt.args=jt(Bt,tr);for(var Jt=0;Jt<Bt.args.length;Jt++)Kt(Bt.args[Jt],tr)}function jt(Bt,tr){var Jt,ar=[],pr=function cr(gr){for(var Sr=0;Sr<gr.args.length;Sr++){var Er=gr.args[Sr];(0,tt.isOperatorNode)(Er)&&Jt===Er.op?cr(Er):ar.push(Er)}};return qt(Bt,tr)?(Jt=Bt.op,pr(Bt),ar):Bt.args}function Ut(Bt,tr){if(!(!Bt.args||Bt.args.length===0)){for(var Jt=Wt(Bt),ar=Bt.args.length,pr=0;pr<ar;pr++)Ut(Bt.args[pr],tr);if(ar>2&&qt(Bt,tr)){for(var cr=Bt.args.pop();Bt.args.length>0;)cr=Jt([Bt.args.pop(),cr]);Bt.args=cr.args}}}function Ot(Bt,tr){if(!(!Bt.args||Bt.args.length===0)){for(var Jt=Wt(Bt),ar=Bt.args.length,pr=0;pr<ar;pr++)Ot(Bt.args[pr],tr);if(ar>2&&qt(Bt,tr)){for(var cr=Bt.args.shift();Bt.args.length>0;)cr=Jt([cr,Bt.args.shift()]);Bt.args=cr.args}}}function Wt(Bt){return(0,tt.isOperatorNode)(Bt)?function(tr){try{return new Et(Bt.op,Bt.fn,tr,Bt.implicit)}catch(Jt){return console.error(Jt),[]}}:function(tr){return new St(new Ct(Bt.name),tr)}}return{createMakeNodeFunction:Wt,hasProperty:It,isCommutative:Ft,isAssociative:qt,mergeContext:Vt,flatten:Kt,allChildren:jt,unflattenr:Ut,unflattenl:Ot,defaultContext:At,realContext:Nt,positiveContext:Pt}});return util.createUtil=mt,util}var simplifyConstant={},hasRequiredSimplifyConstant;function requireSimplifyConstant(){if(hasRequiredSimplifyConstant)return simplifyConstant;hasRequiredSimplifyConstant=1;var et=requireInteropRequireDefault();Object.defineProperty(simplifyConstant,"__esModule",{value:!0}),simplifyConstant.createSimplifyConstant=void 0;var _e=et(require_typeof()),tt=requireIs(),rt=requireFactory(),nt=requireUtil(),st=requireNoop();function dt(Et,Ct){var Rt=typeof Symbol<"u"&&Et[Symbol.iterator]||Et["@@iterator"];if(!Rt){if(Array.isArray(Et)||(Rt=ft(Et))||Ct){Rt&&(Et=Rt);var Tt=0,wt=function(){};return{s:wt,n:function(){return Tt>=Et.length?{done:!0}:{done:!1,value:Et[Tt++]}},e:function(Ft){throw Ft},f:wt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var At=!0,Nt=!1,Pt;return{s:function(){Rt=Rt.call(Et)},n:function(){var Ft=Rt.next();return At=Ft.done,Ft},e:function(Ft){Nt=!0,Pt=Ft},f:function(){try{!At&&Rt.return!=null&&Rt.return()}finally{if(Nt)throw Pt}}}}function ft(Et,Ct){if(Et){if(typeof Et=="string")return ht(Et,Ct);var Rt=Object.prototype.toString.call(Et).slice(8,-1);if(Rt==="Object"&&Et.constructor&&(Rt=Et.constructor.name),Rt==="Map"||Rt==="Set")return Array.from(Et);if(Rt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Rt))return ht(Et,Ct)}}function ht(Et,Ct){(Ct==null||Ct>Et.length)&&(Ct=Et.length);for(var Rt=0,Tt=new Array(Ct);Rt<Ct;Rt++)Tt[Rt]=Et[Rt];return Tt}var mt="simplifyConstant",bt=["typed","config","mathWithTransform","matrix","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],St=(0,rt.factory)(mt,bt,function(Et){var Ct=Et.typed,Rt=Et.config,Tt=Et.mathWithTransform,wt=Et.matrix,At=Et.fraction,Nt=Et.bignumber,Pt=Et.AccessorNode,It=Et.ArrayNode,Ft=Et.ConstantNode,qt=Et.FunctionNode,Vt=Et.IndexNode,Kt=Et.ObjectNode,jt=Et.OperatorNode,Ut=Et.SymbolNode,Ot=(0,nt.createUtil)({FunctionNode:qt,OperatorNode:jt,SymbolNode:Ut}),Wt=Ot.isCommutative,Bt=Ot.isAssociative,tr=Ot.allChildren,Jt=Ot.createMakeNodeFunction;function ar(Ar,Qr){return Sr(Or(Ar,Qr))}function pr(Ar){return(0,tt.isFraction)(Ar)?Ar.valueOf():Ar instanceof Array?Ar.map(pr):(0,tt.isMatrix)(Ar)?wt(pr(Ar.valueOf())):Ar}function cr(Ar,Qr,hn){try{return Tt[Ar].apply(null,Qr)}catch{return Qr=Qr.map(pr),Vr(Tt[Ar].apply(null,Qr),hn)}}var gr=Ct({Fraction:Mr,number:function(Qr){return Qr<0?Wr(new Ft(-Qr)):new Ft(Qr)},BigNumber:function(Qr){return Qr<0?Wr(new Ft(-Qr)):new Ft(Qr)},Complex:function(Qr){throw new Error("Cannot convert Complex number to Node")},string:function(Qr){return new Ft(Qr)},Matrix:function(Qr){return new It(Qr.valueOf().map(function(hn){return gr(hn)}))}});function Sr(Ar){return(0,tt.isNode)(Ar)?Ar:gr(Ar)}function Er(Ar,Qr){var hn=Qr&&Qr.exactFractions!==!1;if(hn&&isFinite(Ar)&&At){var Sn=At(Ar),Kr=Qr&&typeof Qr.fractionsLimit=="number"?Qr.fractionsLimit:1/0;if(Sn.valueOf()===Ar&&Sn.n<Kr&&Sn.d<Kr)return Sn}return Ar}var Vr=Ct({"string, Object":function(Qr,hn){if(Rt.number==="BigNumber")return Nt===void 0&&(0,st.noBignumber)(),Nt(Qr);if(Rt.number==="Fraction")return At===void 0&&(0,st.noFraction)(),At(Qr);var Sn=parseFloat(Qr);return Er(Sn,hn)},"Fraction, Object":function(Qr,hn){return Qr},"BigNumber, Object":function(Qr,hn){return Qr},"number, Object":function(Qr,hn){return Er(Qr,hn)},"Complex, Object":function(Qr,hn){return Qr.im!==0?Qr:Er(Qr.re,hn)},"Matrix, Object":function(Qr,hn){return wt(Er(Qr.valueOf()))},"Array, Object":function(Qr,hn){return Qr.map(Er)}});function Wr(Ar){return new jt("-","unaryMinus",[Ar])}function Mr(Ar){var Qr,hn=Ar.s*Ar.n;return hn<0?Qr=new jt("-","unaryMinus",[new Ft(-hn)]):Qr=new Ft(hn),Ar.d===1?Qr:new jt("/","divide",[Qr,new Ft(Ar.d)])}function Nr(Ar,Qr,hn){if(!(0,tt.isIndexNode)(Qr))return new Pt(Sr(Ar),Sr(Qr));if((0,tt.isArrayNode)(Ar)||(0,tt.isMatrix)(Ar)){for(var Sn=Array.from(Qr.dimensions);Sn.length>0;)if((0,tt.isConstantNode)(Sn[0])&&typeof Sn[0].value!="string"){var Kr=Vr(Sn.shift().value,hn);(0,tt.isArrayNode)(Ar)?Ar=Ar.items[Kr-1]:(Ar=Ar.valueOf()[Kr-1],Ar instanceof Array&&(Ar=wt(Ar)))}else if(Sn.length>1&&(0,tt.isConstantNode)(Sn[1])&&typeof Sn[1].value!="string"){var Hn=Vr(Sn[1].value,hn),ln=[],kn=(0,tt.isArrayNode)(Ar)?Ar.items:Ar.valueOf(),xn=dt(kn),An;try{for(xn.s();!(An=xn.n()).done;){var rs=An.value;if((0,tt.isArrayNode)(rs))ln.push(rs.items[Hn-1]);else if((0,tt.isMatrix)(Ar))ln.push(rs[Hn-1]);else break}}catch(Ln){xn.e(Ln)}finally{xn.f()}if(ln.length===kn.length)(0,tt.isArrayNode)(Ar)?Ar=new It(ln):Ar=wt(ln),Sn.splice(1,1);else break}else break;return Sn.length===Qr.dimensions.length?new Pt(Sr(Ar),Qr):Sn.length>0?(Qr=new Vt(Sn),new Pt(Sr(Ar),Qr)):Ar}if((0,tt.isObjectNode)(Ar)&&Qr.dimensions.length===1&&(0,tt.isConstantNode)(Qr.dimensions[0])){var qs=Qr.dimensions[0].value;return qs in Ar.properties?Ar.properties[qs]:new Ft}return new Pt(Sr(Ar),Qr)}function Yr(Ar,Qr,hn,Sn){return Qr.reduce(function(Kr,Hn){if(!(0,tt.isNode)(Kr)&&!(0,tt.isNode)(Hn)){try{return cr(Ar,[Kr,Hn],Sn)}catch{}Kr=gr(Kr),Hn=gr(Hn)}else(0,tt.isNode)(Kr)?(0,tt.isNode)(Hn)||(Hn=gr(Hn)):Kr=gr(Kr);return hn([Kr,Hn])})}function Or(Ar,Qr){switch(Ar.type){case"SymbolNode":return Ar;case"ConstantNode":switch((0,_e.default)(Ar.value)){case"number":return Vr(Ar.value,Qr);case"string":return Ar.value;default:if(!isNaN(Ar.value))return Vr(Ar.value,Qr)}return Ar;case"FunctionNode":if(Tt[Ar.name]&&Tt[Ar.name].rawArgs)return Ar;{var hn=["add","multiply"];if(hn.indexOf(Ar.name)===-1){var Sn=Ar.args.map(function(tn){return Or(tn,Qr)});if(!Sn.some(tt.isNode))try{return cr(Ar.name,Sn,Qr)}catch{}if(Ar.name==="size"&&Sn.length===1&&(0,tt.isArrayNode)(Sn[0])){for(var Kr=[],Hn=Sn[0];(0,tt.isArrayNode)(Hn);)Kr.push(Hn.items.length),Hn=Hn.items[0];return wt(Kr)}return new qt(Ar.name,Sn.map(Sr))}}case"OperatorNode":{var ln=Ar.fn.toString(),kn,xn,An=Jt(Ar);if((0,tt.isOperatorNode)(Ar)&&Ar.isUnary())kn=[Or(Ar.args[0],Qr)],(0,tt.isNode)(kn[0])?xn=An(kn):xn=cr(ln,kn,Qr);else if(Bt(Ar,Qr.context))if(kn=tr(Ar,Qr.context),kn=kn.map(function(tn){return Or(tn,Qr)}),Wt(ln,Qr.context)){for(var rs=[],qs=[],Ln=0;Ln<kn.length;Ln++)(0,tt.isNode)(kn[Ln])?qs.push(kn[Ln]):rs.push(kn[Ln]);rs.length>1?(xn=Yr(ln,rs,An,Qr),qs.unshift(xn),xn=Yr(ln,qs,An,Qr)):xn=Yr(ln,kn,An,Qr)}else xn=Yr(ln,kn,An,Qr);else kn=Ar.args.map(function(tn){return Or(tn,Qr)}),xn=Yr(ln,kn,An,Qr);return xn}case"ParenthesisNode":return Or(Ar.content,Qr);case"AccessorNode":return Nr(Or(Ar.object,Qr),Or(Ar.index,Qr),Qr);case"ArrayNode":{var Cn=Ar.items.map(function(tn){return Or(tn,Qr)});return Cn.some(tt.isNode)?new It(Cn.map(Sr)):wt(Cn)}case"IndexNode":return new Vt(Ar.dimensions.map(function(tn){return ar(tn,Qr)}));case"ObjectNode":{var Nn={};for(var Gr in Ar.properties)Nn[Gr]=ar(Ar.properties[Gr],Qr);return new Kt(Nn)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(Ar.type))}}return ar});return simplifyConstant.createSimplifyConstant=St,simplifyConstant}var hasRequiredSimplify;function requireSimplify(){if(hasRequiredSimplify)return simplify;hasRequiredSimplify=1;var et=requireInteropRequireDefault();Object.defineProperty(simplify,"__esModule",{value:!0}),simplify.createSimplify=void 0;var _e=et(require_typeof()),tt=requireIs(),rt=requireFactory(),nt=requireUtil(),st=requireSimplifyConstant(),dt=requireObject(),ft=requireMap$2(),ht="simplify",mt=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],bt=(0,rt.factory)(ht,mt,function(St){var Et=St.config,Ct=St.typed,Rt=St.parse;St.add,St.subtract,St.multiply,St.divide,St.pow,St.isZero;var Tt=St.equal,wt=St.resolve,At=St.simplifyCore,Nt=St.fraction,Pt=St.bignumber,It=St.mathWithTransform,Ft=St.matrix,qt=St.AccessorNode,Vt=St.ArrayNode,Kt=St.ConstantNode,jt=St.FunctionNode,Ut=St.IndexNode,Ot=St.ObjectNode,Wt=St.OperatorNode,Bt=St.ParenthesisNode,tr=St.SymbolNode,Jt=(0,st.createSimplifyConstant)({typed:Ct,config:Et,mathWithTransform:It,matrix:Ft,fraction:Nt,bignumber:Pt,AccessorNode:qt,ArrayNode:Vt,ConstantNode:Kt,FunctionNode:jt,IndexNode:Ut,ObjectNode:Ot,OperatorNode:Wt,SymbolNode:tr}),ar=(0,nt.createUtil)({FunctionNode:jt,OperatorNode:Wt,SymbolNode:tr}),pr=ar.hasProperty,cr=ar.isCommutative,gr=ar.isAssociative,Sr=ar.mergeContext,Er=ar.flatten,Vr=ar.unflattenr,Wr=ar.unflattenl,Mr=ar.createMakeNodeFunction,Nr=ar.defaultContext,Yr=ar.realContext,Or=ar.positiveContext,Ar=Ct("simplify",{string:function(tn){return this(Rt(tn),this.rules,(0,ft.createEmptyMap)(),{})},"string, Map | Object":function(tn,dn){return this(Rt(tn),this.rules,dn,{})},"string, Map | Object, Object":function(tn,dn,Rn){return this(Rt(tn),this.rules,dn,Rn)},"string, Array":function(tn,dn){return this(Rt(tn),dn,(0,ft.createEmptyMap)(),{})},"string, Array, Map | Object":function(tn,dn,Rn){return this(Rt(tn),dn,Rn,{})},"string, Array, Map | Object, Object":function(tn,dn,Rn,wn){return this(Rt(tn),dn,Rn,wn)},"Node, Map | Object":function(tn,dn){return this(tn,this.rules,dn,{})},"Node, Map | Object, Object":function(tn,dn,Rn){return this(tn,this.rules,dn,Rn)},Node:function(tn){return this(tn,this.rules,(0,ft.createEmptyMap)(),{})},"Node, Array":function(tn,dn){return this(tn,dn,(0,ft.createEmptyMap)(),{})},"Node, Array, Map | Object":function(tn,dn,Rn){return this(tn,dn,Rn,{})},"Node, Array, Object, Object":function(tn,dn,Rn,wn){return this(tn,dn,(0,ft.createMap)(Rn),wn)},"Node, Array, Map, Object":function(tn,dn,Rn,wn){var Un=wn.consoleDebug;dn=Kr(dn,wn.context);var Zn=wt(tn,Rn);Zn=Qr(Zn);for(var pn={},Dn=Zn.toString({parenthesis:"all"});!pn[Dn];){pn[Dn]=!0,Hn=0;var qn=Dn;Un&&console.log("Working on: ",Dn);for(var _a=0;_a<dn.length;_a++){var Vn="";if(typeof dn[_a]=="function"?(Zn=dn[_a](Zn,wn),Un&&(Vn=dn[_a].name)):(Er(Zn,wn.context),Zn=xn(Zn,dn[_a],wn.context),Un&&(Vn="".concat(dn[_a].l.toString()," -> ").concat(dn[_a].r.toString()))),Un){var bs=Zn.toString({parenthesis:"all"});bs!==qn&&(console.log("Applying",Vn,"produced",bs),qn=bs)}Wr(Zn,wn.context)}Dn=Zn.toString({parenthesis:"all"})}return Zn}});Ar.defaultContext=Nr,Ar.realContext=Yr,Ar.positiveContext=Or;function Qr(Gr){return Gr.transform(function(tn,dn,Rn){return(0,tt.isParenthesisNode)(tn)?Qr(tn.content):tn})}var hn={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};Ar.rules=[At,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(c*v) -> v * (-c)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(c*v) -> (-c) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*c) -> v * (-c)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" v * ( v * n1 + n2)",r:"v^2 * n1 + v * n2"},{s:" v * (v^n4 * n1 + n2) -> v^(1+n4) * n1 + v * n2",assuming:{divide:{total:!0}}},{s:"v^n3 * ( v * n1 + n2) -> v^(n3+1) * n1 + v^n3 * n2",assuming:{divide:{total:!0}}},{s:"v^n3 * (v^n4 * n1 + n2) -> v^(n3+n4) * n1 + v^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},Jt,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"v*n + v",r:"v*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*v + v -> (n+1)*v",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*c + c",r:"(n+1)*c"},{s:"c*n + c -> c*(n+1)",assuming:{multiply:{commutative:!1}}},Jt,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"c+v -> v+c",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"v*c -> c*v",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Sn(Gr,tn){var dn={};if(Gr.s){var Rn=Gr.s.split("->");if(Rn.length===2)dn.l=Rn[0],dn.r=Rn[1];else throw SyntaxError("Could not parse rule: "+Gr.s)}else dn.l=Gr.l,dn.r=Gr.r;dn.l=Qr(Rt(dn.l)),dn.r=Qr(Rt(dn.r));for(var wn=0,Un=["imposeContext","repeat","assuming"];wn<Un.length;wn++){var Zn=Un[wn];Zn in Gr&&(dn[Zn]=Gr[Zn])}if(Gr.evaluate&&(dn.evaluate=Rt(Gr.evaluate)),gr(dn.l,tn)){var pn=Mr(dn.l),Dn=ln();dn.expanded={},dn.expanded.l=pn([dn.l.clone(),Dn]),Er(dn.expanded.l,tn),Vr(dn.expanded.l,tn),dn.expanded.r=pn([dn.r,Dn])}return dn}function Kr(Gr,tn){for(var dn=[],Rn=0;Rn<Gr.length;Rn++){var wn=Gr[Rn],Un=void 0,Zn=(0,_e.default)(wn);switch(Zn){case"string":wn={s:wn};case"object":Un=Sn(wn,tn);break;case"function":Un=wn;break;default:throw TypeError("Unsupported type of rule: "+Zn)}dn.push(Un)}return dn}var Hn=0;function ln(){return new tr("_p"+Hn++)}function kn(Gr,tn,dn){var Rn=Gr;if(Gr)for(var wn=0;wn<Gr.length;++wn){var Un=xn(Gr[wn],tn,dn);Un!==Gr[wn]&&(Rn===Gr&&(Rn=Gr.slice()),Rn[wn]=Un)}return Rn}function xn(Gr,tn,dn){if(tn.assuming){for(var Rn in tn.assuming)for(var wn in tn.assuming[Rn])if(pr(Rn,wn,dn)!==tn.assuming[Rn][wn])return Gr}var Un=Sr(tn.imposeContext,dn),Zn=Gr;if(Zn instanceof Wt||Zn instanceof jt){var pn=kn(Zn.args,tn,dn);pn!==Zn.args&&(Zn=Zn.clone(),Zn.args=pn)}else if(Zn instanceof Bt){if(Zn.content){var Dn=xn(Zn.content,tn,dn);Dn!==Zn.content&&(Zn=new Bt(Dn))}}else if(Zn instanceof Vt){var qn=kn(Zn.items,tn,dn);qn!==Zn.items&&(Zn=new Vt(qn))}else if(Zn instanceof qt){var _a=Zn.object;Zn.object&&(_a=xn(Zn.object,tn,dn));var Vn=Zn.index;Zn.index&&(Vn=xn(Zn.index,tn,dn)),(_a!==Zn.object||Vn!==Zn.index)&&(Zn=new qt(_a,Vn))}else if(Zn instanceof Ut){var bs=kn(Zn.dimensions,tn,dn);bs!==Zn.dimensions&&(Zn=new Ut(bs))}else if(Zn instanceof Ot){var Is=!1,uo={};for(var Rs in Zn.properties)uo[Rs]=xn(Zn.properties[Rs],tn,dn),uo[Rs]!==Zn.properties[Rs]&&(Is=!0);Is&&(Zn=new Ot(uo))}var io=tn.r,vo=Cn(tn.l,Zn,Un)[0];if(!vo&&tn.expanded&&(io=tn.expanded.r,vo=Cn(tn.expanded.l,Zn,Un)[0]),vo){var Bo=Zn.implicit;Zn=io.clone(),Bo&&"implicit"in io&&(Zn.implicit=!0),Zn=Zn.transform(function(En){return En.isSymbolNode&&(0,dt.hasOwnProperty)(vo.placeholders,En.name)?vo.placeholders[En.name].clone():En})}return tn.repeat&&Zn!==Gr&&(Zn=xn(Zn,tn,dn)),Zn}function An(Gr,tn){var dn=[],Rn,wn,Un=Mr(Gr);if(cr(Gr,tn))for(var Zn=0;Zn<Gr.args.length;Zn++)wn=Gr.args.slice(0),wn.splice(Zn,1),Rn=wn.length===1?wn[0]:Un(wn),dn.push(Un([Gr.args[Zn],Rn]));else for(var pn=1;pn<Gr.args.length;pn++){var Dn=Gr.args[0];pn>1&&(Dn=Un(Gr.args.slice(0,pn))),wn=Gr.args.slice(pn),Rn=wn.length===1?wn[0]:Un(wn),dn.push(Un([Dn,Rn]))}return dn}function rs(Gr,tn){var dn={placeholders:{}};if(!Gr.placeholders&&!tn.placeholders)return dn;if(Gr.placeholders){if(!tn.placeholders)return Gr}else return tn;for(var Rn in Gr.placeholders)if((0,dt.hasOwnProperty)(Gr.placeholders,Rn)&&(dn.placeholders[Rn]=Gr.placeholders[Rn],(0,dt.hasOwnProperty)(tn.placeholders,Rn)&&!Nn(Gr.placeholders[Rn],tn.placeholders[Rn])))return null;for(var wn in tn.placeholders)(0,dt.hasOwnProperty)(tn.placeholders,wn)&&(dn.placeholders[wn]=tn.placeholders[wn]);return dn}function qs(Gr,tn){var dn=[];if(Gr.length===0||tn.length===0)return dn;for(var Rn,wn=0;wn<Gr.length;wn++)for(var Un=0;Un<tn.length;Un++)Rn=rs(Gr[wn],tn[Un]),Rn&&dn.push(Rn);return dn}function Ln(Gr){if(Gr.length===0)return Gr;for(var tn=Gr.reduce(qs),dn=[],Rn={},wn=0;wn<tn.length;wn++){var Un=JSON.stringify(tn[wn]);Rn[Un]||(Rn[Un]=!0,dn.push(tn[wn]))}return dn}function Cn(Gr,tn,dn,Rn){var wn=[{placeholders:{}}];if(Gr instanceof Wt&&tn instanceof Wt||Gr instanceof jt&&tn instanceof jt){if(Gr instanceof Wt){if(Gr.op!==tn.op||Gr.fn!==tn.fn)return[]}else if(Gr instanceof jt&&Gr.name!==tn.name)return[];if(tn.args.length===1&&Gr.args.length===1||!gr(tn,dn)&&tn.args.length===Gr.args.length||Rn){for(var Un=[],Zn=0;Zn<Gr.args.length;Zn++){var pn=Cn(Gr.args[Zn],tn.args[Zn],dn);if(pn.length===0)break;Un.push(pn)}if(Un.length!==Gr.args.length){if(!cr(tn,dn)||Gr.args.length===1)return[];if(Gr.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Dn=Cn(Gr.args[0],tn.args[1],dn);if(Dn.length===0)return[];var qn=Cn(Gr.args[1],tn.args[0],dn);if(qn.length===0)return[];Un=[Dn,qn]}wn=Ln(Un)}else if(tn.args.length>=2&&Gr.args.length===2){for(var _a=An(tn,dn),Vn=[],bs=0;bs<_a.length;bs++){var Is=Cn(Gr,_a[bs],dn,!0);Vn=Vn.concat(Is)}return Vn}else{if(Gr.args.length>2)throw Error("Unexpected non-binary associative function: "+Gr.toString());return[]}}else if(Gr instanceof tr){if(Gr.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(hn[Gr.name]){if(Gr.name!==tn.name)return[]}else if(Gr.name[0]==="n"||Gr.name.substring(0,2)==="_p")wn[0].placeholders[Gr.name]=tn;else if(Gr.name[0]==="v")if(!(0,tt.isConstantNode)(tn))wn[0].placeholders[Gr.name]=tn;else return[];else if(Gr.name[0]==="c")if(tn instanceof Kt)wn[0].placeholders[Gr.name]=tn;else return[];else throw new Error("Invalid symbol in rule: "+Gr.name)}else if(Gr instanceof Kt){if(!Tt(Gr.value,tn.value))return[]}else return[];return wn}function Nn(Gr,tn){if(Gr instanceof Kt&&tn instanceof Kt){if(!Tt(Gr.value,tn.value))return!1}else if(Gr instanceof tr&&tn instanceof tr){if(Gr.name!==tn.name)return!1}else if(Gr instanceof Wt&&tn instanceof Wt||Gr instanceof jt&&tn instanceof jt){if(Gr instanceof Wt){if(Gr.op!==tn.op||Gr.fn!==tn.fn)return!1}else if(Gr instanceof jt&&Gr.name!==tn.name)return!1;if(Gr.args.length!==tn.args.length)return!1;for(var dn=0;dn<Gr.args.length;dn++)if(!Nn(Gr.args[dn],tn.args[dn]))return!1}else return!1;return!0}return Ar});return simplify.createSimplify=bt,simplify}var simplifyCore={},hasRequiredSimplifyCore;function requireSimplifyCore(){if(hasRequiredSimplifyCore)return simplifyCore;hasRequiredSimplifyCore=1,Object.defineProperty(simplifyCore,"__esModule",{value:!0}),simplifyCore.createSimplifyCore=void 0;var et=requireIs(),_e=requireUtil(),tt=requireFactory(),rt="simplifyCore",nt=["equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.equal,ht=dt.isZero,mt=dt.add,bt=dt.subtract,St=dt.multiply,Et=dt.divide,Ct=dt.pow,Rt=dt.AccessorNode,Tt=dt.ArrayNode,wt=dt.ConstantNode,At=dt.FunctionNode,Nt=dt.IndexNode,Pt=dt.ObjectNode,It=dt.OperatorNode;dt.ParenthesisNode;var Ft=dt.SymbolNode,qt=new wt(0),Vt=new wt(1),Kt=(0,_e.createUtil)({FunctionNode:At,OperatorNode:It,SymbolNode:Ft}),jt=Kt.hasProperty,Ut=Kt.isCommutative;function Ot(Wt,Bt){var tr=Bt?Bt.context:void 0;if(jt(Wt,"trivial",tr)){if((0,et.isFunctionNode)(Wt)&&Wt.args.length===1)return Ot(Wt.args[0],Bt);var Jt=!1,ar=0;if(Wt.forEach(function(Nr){++ar,ar===1&&(Jt=Ot(Nr,Bt))}),ar===1)return Jt}if((0,et.isOperatorNode)(Wt)&&Wt.isUnary()){var pr=Ot(Wt.args[0],Bt);if(Wt.op==="-"){if((0,et.isOperatorNode)(pr)){if(pr.isUnary()&&pr.op==="-")return pr.args[0];if(pr.isBinary()&&pr.fn==="subtract")return new It("-","subtract",[pr.args[1],pr.args[0]])}return new It(Wt.op,Wt.fn,[pr])}}else if((0,et.isOperatorNode)(Wt)&&Wt.isBinary()){var cr=Ot(Wt.args[0],Bt),gr=Ot(Wt.args[1],Bt);if(Wt.op==="+"){if((0,et.isConstantNode)(cr)){if(ht(cr.value))return gr;if((0,et.isConstantNode)(gr))return new wt(mt(cr.value,gr.value))}return(0,et.isConstantNode)(gr)&&ht(gr.value)?cr:(0,et.isOperatorNode)(gr)&&gr.isUnary()&&gr.op==="-"?new It("-","subtract",[cr,gr.args[0]]):new It(Wt.op,Wt.fn,gr?[cr,gr]:[cr])}else if(Wt.op==="-"){if((0,et.isConstantNode)(cr)&&gr){if((0,et.isConstantNode)(gr))return new wt(bt(cr.value,gr.value));if(ht(cr.value))return new It("-","unaryMinus",[gr])}if(Wt.fn==="subtract")return(0,et.isConstantNode)(gr)&&ht(gr.value)?cr:(0,et.isOperatorNode)(gr)&&gr.isUnary()&&gr.op==="-"?Ot(new It("+","add",[cr,gr.args[0]]),Bt):new It(Wt.op,Wt.fn,[cr,gr])}else if(Wt.op==="*"){if((0,et.isConstantNode)(cr)){if(ht(cr.value))return qt;if(ft(cr.value,1))return gr;if((0,et.isConstantNode)(gr))return new wt(St(cr.value,gr.value))}if((0,et.isConstantNode)(gr)){if(ht(gr.value))return qt;if(ft(gr.value,1))return cr;if((0,et.isOperatorNode)(cr)&&cr.isBinary()&&cr.op===Wt.op&&Ut(Wt,tr)){var Sr=cr.args[0];if((0,et.isConstantNode)(Sr)){var Er=new wt(St(Sr.value,gr.value));return new It(Wt.op,Wt.fn,[Er,cr.args[1]],Wt.implicit)}}return Ut(Wt,tr)?new It(Wt.op,Wt.fn,[gr,cr],Wt.implicit):new It(Wt.op,Wt.fn,[cr,gr],Wt.implicit)}return new It(Wt.op,Wt.fn,[cr,gr],Wt.implicit)}else if(Wt.op==="/"){if((0,et.isConstantNode)(cr)){if(ht(cr.value))return qt;if((0,et.isConstantNode)(gr)&&(ft(gr.value,1)||ft(gr.value,2)||ft(gr.value,4)))return new wt(Et(cr.value,gr.value))}return new It(Wt.op,Wt.fn,[cr,gr])}else if(Wt.op==="^"&&(0,et.isConstantNode)(gr)){if(ht(gr.value))return Vt;if(ft(gr.value,1))return cr;if((0,et.isConstantNode)(cr))return new wt(Ct(cr.value,gr.value));if((0,et.isOperatorNode)(cr)&&cr.isBinary()&&cr.op==="^"){var Vr=cr.args[1];if((0,et.isConstantNode)(Vr))return new It(Wt.op,Wt.fn,[cr.args[0],new wt(St(Vr.value,gr.value))])}}return new It(Wt.op,Wt.fn,[cr,gr])}else{if((0,et.isFunctionNode)(Wt))return new At(Ot(Wt.fn),Wt.args.map(function(Nr){return Ot(Nr,Bt)}));if((0,et.isArrayNode)(Wt))return new Tt(Wt.items.map(function(Nr){return Ot(Nr,Bt)}));if((0,et.isAccessorNode)(Wt))return new Rt(Ot(Wt.object,Bt),Ot(Wt.index,Bt));if((0,et.isIndexNode)(Wt))return new Nt(Wt.dimensions.map(function(Nr){return Ot(Nr,Bt)}));if((0,et.isObjectNode)(Wt)){var Wr={};for(var Mr in Wt.properties)Wr[Mr]=Ot(Wt.properties[Mr],Bt);return new Pt(Wr)}}return Wt}return Ot});return simplifyCore.createSimplifyCore=st,simplifyCore}var resolve={},hasRequiredResolve;function requireResolve(){if(hasRequiredResolve)return resolve;hasRequiredResolve=1,Object.defineProperty(resolve,"__esModule",{value:!0}),resolve.createResolve=void 0;var et=requireMap$2(),_e=requireIs(),tt=requireFactory(),rt="resolve",nt=["parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],st=(0,tt.factory)(rt,nt,function(dt){var ft=dt.parse,ht=dt.ConstantNode,mt=dt.FunctionNode,bt=dt.OperatorNode,St=dt.ParenthesisNode;function Et(Ct,Rt){var Tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!Rt)return Ct;if((0,et.isMap)(Rt)||(Rt=(0,et.createMap)(Rt)),(0,_e.isSymbolNode)(Ct)){if(Tt.has(Ct.name)){var wt=Array.from(Tt).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(wt,"}"))}var At=Rt.get(Ct.name);if((0,_e.isNode)(At)){var Nt=new Set(Tt);return Nt.add(Ct.name),Et(At,Rt,Nt)}else return typeof At=="number"?ft(String(At)):At!==void 0?new ht(At):Ct}else if((0,_e.isOperatorNode)(Ct)){var Pt=Ct.args.map(function(Ft){return Et(Ft,Rt,Tt)});return new bt(Ct.op,Ct.fn,Pt,Ct.implicit)}else{if((0,_e.isParenthesisNode)(Ct))return new St(Et(Ct.content,Rt,Tt));if((0,_e.isFunctionNode)(Ct)){var It=Ct.args.map(function(Ft){return Et(Ft,Rt,Tt)});return new mt(Ct.name,It)}}return Ct.map(function(Ft){return Et(Ft,Rt,Tt)})}return Et});return resolve.createResolve=st,resolve}var symbolicEqual={},hasRequiredSymbolicEqual;function requireSymbolicEqual(){if(hasRequiredSymbolicEqual)return symbolicEqual;hasRequiredSymbolicEqual=1,Object.defineProperty(symbolicEqual,"__esModule",{value:!0}),symbolicEqual.createSymbolicEqual=void 0;var et=requireIs(),_e=requireFactory(),tt="symbolicEqual",rt=["parse","simplify","typed","OperatorNode"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.parse,ft=st.simplify,ht=st.typed,mt=st.OperatorNode;return ht(tt,{"string, string":function(St,Et){return this(dt(St),dt(Et),{})},"string, string, Object":function(St,Et,Ct){return this(dt(St),dt(Et),Ct)},"Node, string":function(St,Et){return this(St,dt(Et),{})},"Node, string, Object":function(St,Et,Ct){return this(St,dt(Et),Ct)},"string, Node":function(St,Et){return this(dt(St),Et,{})},"string, Node, Object":function(St,Et,Ct){return this(dt(St),Et,Ct)},"Node, Node":function(St,Et){return this(St,Et,{})},"Node, Node, Object":function(St,Et,Ct){var Rt=new mt("-","subtract",[St,Et]),Tt=ft(Rt,{},Ct);return(0,et.isConstantNode)(Tt)&&!Tt.value}})});return symbolicEqual.createSymbolicEqual=nt,symbolicEqual}var derivative={},hasRequiredDerivative;function requireDerivative(){if(hasRequiredDerivative)return derivative;hasRequiredDerivative=1,Object.defineProperty(derivative,"__esModule",{value:!0}),derivative.createDerivative=void 0;var et=requireIs(),_e=requireFactory(),tt="derivative",rt=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.parse,mt=st.simplify,bt=st.equal,St=st.isZero,Et=st.numeric,Ct=st.ConstantNode,Rt=st.FunctionNode,Tt=st.OperatorNode,wt=st.ParenthesisNode,At=st.SymbolNode,Nt=dt("derivative",{"Node, SymbolNode, Object":function(jt,Ut,Ot){var Wt={};It(Wt,jt,Ut.name);var Bt=Ft(jt,Wt);return Ot.simplify?mt(Bt):Bt},"Node, SymbolNode":function(jt,Ut){return this(jt,Ut,{simplify:!0})},"string, SymbolNode":function(jt,Ut){return this(ht(jt),Ut)},"string, SymbolNode, Object":function(jt,Ut,Ot){return this(ht(jt),Ut,Ot)},"string, string":function(jt,Ut){return this(ht(jt),ht(Ut))},"string, string, Object":function(jt,Ut,Ot){return this(ht(jt),ht(Ut),Ot)},"Node, string":function(jt,Ut){return this(jt,ht(Ut))},"Node, string, Object":function(jt,Ut,Ot){return this(jt,ht(Ut),Ot)}});Nt._simplify=!0,Nt.toTex=function(Kt){return Pt.apply(null,Kt.args)};var Pt=dt("_derivTex",{"Node, SymbolNode":function(jt,Ut){return(0,et.isConstantNode)(jt)&&(0,et.typeOf)(jt.value)==="string"?Pt(ht(jt.value).toString(),Ut.toString(),1):Pt(jt.toTex(),Ut.toString(),1)},"Node, ConstantNode":function(jt,Ut){if((0,et.typeOf)(Ut.value)==="string")return Pt(jt,ht(Ut.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(jt,Ut,Ot){return Pt(jt.toString(),Ut.name,Ot.value)},"string, string, number":function(jt,Ut,Ot){var Wt;return Ot===1?Wt="{d\\over d"+Ut+"}":Wt="{d^{"+Ot+"}\\over d"+Ut+"^{"+Ot+"}}",Wt+"\\left[".concat(jt,"\\right]")}}),It=dt("constTag",{"Object, ConstantNode, string":function(jt,Ut){return jt[Ut]=!0,!0},"Object, SymbolNode, string":function(jt,Ut,Ot){return Ut.name!==Ot?(jt[Ut]=!0,!0):!1},"Object, ParenthesisNode, string":function(jt,Ut,Ot){return It(jt,Ut.content,Ot)},"Object, FunctionAssignmentNode, string":function(jt,Ut,Ot){return Ut.params.indexOf(Ot)===-1?(jt[Ut]=!0,!0):It(jt,Ut.expr,Ot)},"Object, FunctionNode | OperatorNode, string":function(jt,Ut,Ot){if(Ut.args.length>0){for(var Wt=It(jt,Ut.args[0],Ot),Bt=1;Bt<Ut.args.length;++Bt)Wt=It(jt,Ut.args[Bt],Ot)&&Wt;if(Wt)return jt[Ut]=!0,!0}return!1}}),Ft=dt("_derivative",{"ConstantNode, Object":function(jt){return Vt(0)},"SymbolNode, Object":function(jt,Ut){return Ut[jt]!==void 0?Vt(0):Vt(1)},"ParenthesisNode, Object":function(jt,Ut){return new wt(Ft(jt.content,Ut))},"FunctionAssignmentNode, Object":function(jt,Ut){return Ut[jt]!==void 0?Vt(0):Ft(jt.expr,Ut)},"FunctionNode, Object":function(jt,Ut){if(jt.args.length!==1&&qt(jt),Ut[jt]!==void 0)return Vt(0);var Ot=jt.args[0],Wt,Bt=!1,tr=!1,Jt;switch(jt.name){case"cbrt":Bt=!0,Jt=new Tt("*","multiply",[Vt(3),new Tt("^","pow",[Ot,new Tt("/","divide",[Vt(2),Vt(3)])])]);break;case"sqrt":case"nthRoot":if(jt.args.length===1)Bt=!0,Jt=new Tt("*","multiply",[Vt(2),new Rt("sqrt",[Ot])]);else if(jt.args.length===2)return Wt=new Tt("/","divide",[Vt(1),jt.args[1]]),Ut[Wt]=Ut[jt.args[1]],Ft(new Tt("^","pow",[Ot,Wt]),Ut);break;case"log10":Wt=Vt(10);case"log":if(!Wt&&jt.args.length===1)Jt=Ot.clone(),Bt=!0;else if(jt.args.length===1&&Wt||jt.args.length===2&&Ut[jt.args[1]]!==void 0)Jt=new Tt("*","multiply",[Ot.clone(),new Rt("log",[Wt||jt.args[1]])]),Bt=!0;else if(jt.args.length===2)return Ft(new Tt("/","divide",[new Rt("log",[Ot]),new Rt("log",[jt.args[1]])]),Ut);break;case"pow":return Ut[Wt]=Ut[jt.args[1]],Ft(new Tt("^","pow",[Ot,jt.args[1]]),Ut);case"exp":Jt=new Rt("exp",[Ot.clone()]);break;case"sin":Jt=new Rt("cos",[Ot.clone()]);break;case"cos":Jt=new Tt("-","unaryMinus",[new Rt("sin",[Ot.clone()])]);break;case"tan":Jt=new Tt("^","pow",[new Rt("sec",[Ot.clone()]),Vt(2)]);break;case"sec":Jt=new Tt("*","multiply",[jt,new Rt("tan",[Ot.clone()])]);break;case"csc":tr=!0,Jt=new Tt("*","multiply",[jt,new Rt("cot",[Ot.clone()])]);break;case"cot":tr=!0,Jt=new Tt("^","pow",[new Rt("csc",[Ot.clone()]),Vt(2)]);break;case"asin":Bt=!0,Jt=new Rt("sqrt",[new Tt("-","subtract",[Vt(1),new Tt("^","pow",[Ot.clone(),Vt(2)])])]);break;case"acos":Bt=!0,tr=!0,Jt=new Rt("sqrt",[new Tt("-","subtract",[Vt(1),new Tt("^","pow",[Ot.clone(),Vt(2)])])]);break;case"atan":Bt=!0,Jt=new Tt("+","add",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)]);break;case"asec":Bt=!0,Jt=new Tt("*","multiply",[new Rt("abs",[Ot.clone()]),new Rt("sqrt",[new Tt("-","subtract",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)])])]);break;case"acsc":Bt=!0,tr=!0,Jt=new Tt("*","multiply",[new Rt("abs",[Ot.clone()]),new Rt("sqrt",[new Tt("-","subtract",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)])])]);break;case"acot":Bt=!0,tr=!0,Jt=new Tt("+","add",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)]);break;case"sinh":Jt=new Rt("cosh",[Ot.clone()]);break;case"cosh":Jt=new Rt("sinh",[Ot.clone()]);break;case"tanh":Jt=new Tt("^","pow",[new Rt("sech",[Ot.clone()]),Vt(2)]);break;case"sech":tr=!0,Jt=new Tt("*","multiply",[jt,new Rt("tanh",[Ot.clone()])]);break;case"csch":tr=!0,Jt=new Tt("*","multiply",[jt,new Rt("coth",[Ot.clone()])]);break;case"coth":tr=!0,Jt=new Tt("^","pow",[new Rt("csch",[Ot.clone()]),Vt(2)]);break;case"asinh":Bt=!0,Jt=new Rt("sqrt",[new Tt("+","add",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)])]);break;case"acosh":Bt=!0,Jt=new Rt("sqrt",[new Tt("-","subtract",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)])]);break;case"atanh":Bt=!0,Jt=new Tt("-","subtract",[Vt(1),new Tt("^","pow",[Ot.clone(),Vt(2)])]);break;case"asech":Bt=!0,tr=!0,Jt=new Tt("*","multiply",[Ot.clone(),new Rt("sqrt",[new Tt("-","subtract",[Vt(1),new Tt("^","pow",[Ot.clone(),Vt(2)])])])]);break;case"acsch":Bt=!0,tr=!0,Jt=new Tt("*","multiply",[new Rt("abs",[Ot.clone()]),new Rt("sqrt",[new Tt("+","add",[new Tt("^","pow",[Ot.clone(),Vt(2)]),Vt(1)])])]);break;case"acoth":Bt=!0,tr=!0,Jt=new Tt("-","subtract",[Vt(1),new Tt("^","pow",[Ot.clone(),Vt(2)])]);break;case"abs":Jt=new Tt("/","divide",[new Rt(new At("abs"),[Ot.clone()]),Ot.clone()]);break;case"gamma":default:throw new Error('Function "'+jt.name+'" is not supported by derivative, or a wrong number of arguments is passed')}var ar,pr;Bt?(ar="/",pr="divide"):(ar="*",pr="multiply");var cr=Ft(Ot,Ut);return tr&&(cr=new Tt("-","unaryMinus",[cr])),new Tt(ar,pr,[cr,Jt])},"OperatorNode, Object":function(jt,Ut){if(Ut[jt]!==void 0)return Vt(0);if(jt.op==="+")return new Tt(jt.op,jt.fn,jt.args.map(function(Sr){return Ft(Sr,Ut)}));if(jt.op==="-"){if(jt.isUnary())return new Tt(jt.op,jt.fn,[Ft(jt.args[0],Ut)]);if(jt.isBinary())return new Tt(jt.op,jt.fn,[Ft(jt.args[0],Ut),Ft(jt.args[1],Ut)])}if(jt.op==="*"){var Ot=jt.args.filter(function(Sr){return Ut[Sr]!==void 0});if(Ot.length>0){var Wt=jt.args.filter(function(Sr){return Ut[Sr]===void 0}),Bt=Wt.length===1?Wt[0]:new Tt("*","multiply",Wt),tr=Ot.concat(Ft(Bt,Ut));return new Tt("*","multiply",tr)}return new Tt("+","add",jt.args.map(function(Sr){return new Tt("*","multiply",jt.args.map(function(Er){return Er===Sr?Ft(Er,Ut):Er.clone()}))}))}if(jt.op==="/"&&jt.isBinary()){var Jt=jt.args[0],ar=jt.args[1];return Ut[ar]!==void 0?new Tt("/","divide",[Ft(Jt,Ut),ar]):Ut[Jt]!==void 0?new Tt("*","multiply",[new Tt("-","unaryMinus",[Jt]),new Tt("/","divide",[Ft(ar,Ut),new Tt("^","pow",[ar.clone(),Vt(2)])])]):new Tt("/","divide",[new Tt("-","subtract",[new Tt("*","multiply",[Ft(Jt,Ut),ar.clone()]),new Tt("*","multiply",[Jt.clone(),Ft(ar,Ut)])]),new Tt("^","pow",[ar.clone(),Vt(2)])])}if(jt.op==="^"&&jt.isBinary()){var pr=jt.args[0],cr=jt.args[1];if(Ut[pr]!==void 0)return(0,et.isConstantNode)(pr)&&(St(pr.value)||bt(pr.value,1))?Vt(0):new Tt("*","multiply",[jt,new Tt("*","multiply",[new Rt("log",[pr.clone()]),Ft(cr.clone(),Ut)])]);if(Ut[cr]!==void 0){if((0,et.isConstantNode)(cr)){if(St(cr.value))return Vt(0);if(bt(cr.value,1))return Ft(pr,Ut)}var gr=new Tt("^","pow",[pr.clone(),new Tt("-","subtract",[cr,Vt(1)])]);return new Tt("*","multiply",[cr.clone(),new Tt("*","multiply",[Ft(pr,Ut),gr])])}return new Tt("*","multiply",[new Tt("^","pow",[pr.clone(),cr.clone()]),new Tt("+","add",[new Tt("*","multiply",[Ft(pr,Ut),new Tt("/","divide",[cr.clone(),pr.clone()])]),new Tt("*","multiply",[Ft(cr,Ut),new Rt("log",[pr.clone()])])])])}throw new Error('Operator "'+jt.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function qt(Kt){if(!((Kt.name==="log"||Kt.name==="nthRoot"||Kt.name==="pow")&&Kt.args.length===2)){for(var jt=0;jt<Kt.args.length;++jt)Kt.args[jt]=Vt(0);throw Kt.compile().evaluate(),new Error("Expected TypeError, but none found")}}function Vt(Kt,jt){return new Ct(Et(Kt,ft.number))}return Nt});return derivative.createDerivative=nt,derivative}var rationalize={},hasRequiredRationalize;function requireRationalize(){if(hasRequiredRationalize)return rationalize;hasRequiredRationalize=1,Object.defineProperty(rationalize,"__esModule",{value:!0}),rationalize.createRationalize=void 0;var et=requireNumber$3(),_e=requireFactory(),tt=requireSimplifyConstant(),rt="rationalize",nt=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],st=(0,_e.factory)(rt,nt,function(dt){var ft=dt.config,ht=dt.typed;dt.equal,dt.isZero,dt.add,dt.subtract,dt.multiply,dt.divide,dt.pow;var mt=dt.parse,bt=dt.simplifyCore,St=dt.simplify,Et=dt.fraction,Ct=dt.bignumber,Rt=dt.mathWithTransform,Tt=dt.matrix,wt=dt.AccessorNode,At=dt.ArrayNode,Nt=dt.ConstantNode,Pt=dt.FunctionNode,It=dt.IndexNode,Ft=dt.ObjectNode,qt=dt.OperatorNode,Vt=dt.SymbolNode;dt.ParenthesisNode;var Kt=(0,tt.createSimplifyConstant)({typed:ht,config:ft,mathWithTransform:Rt,matrix:Tt,fraction:Et,bignumber:Ct,AccessorNode:wt,ArrayNode:At,ConstantNode:Nt,FunctionNode:Pt,IndexNode:It,ObjectNode:Ft,OperatorNode:qt,SymbolNode:Vt});return ht(rt,{string:function(tr){return this(mt(tr),{},!1)},"string, boolean":function(tr,Jt){return this(mt(tr),{},Jt)},"string, Object":function(tr,Jt){return this(mt(tr),Jt,!1)},"string, Object, boolean":function(tr,Jt,ar){return this(mt(tr),Jt,ar)},Node:function(tr){return this(tr,{},!1)},"Node, boolean":function(tr,Jt){return this(tr,{},Jt)},"Node, Object":function(tr,Jt){return this(tr,Jt,!1)},"Node, Object, boolean":function(tr,Jt,ar){var pr=Ut(),cr=jt(tr,Jt,!0,pr.firstRules),gr=cr.variables.length,Sr={exactFractions:!1},Er={exactFractions:!0};if(tr=cr.expression,gr>=1){tr=Ot(tr);var Vr,Wr,Mr=!0,Nr=!1;tr=St(tr,pr.firstRules,{},Sr);for(var Yr;Wr=Mr?pr.distrDivRules:pr.sucDivRules,tr=St(tr,Wr,{},Er),Mr=!Mr,Yr=tr.toString(),Yr!==Vr;)Nr=!0,Vr=Yr;Nr&&(tr=St(tr,pr.firstRulesAgain,{},Sr)),tr=St(tr,pr.finalRules,{},Sr)}var Or=[],Ar={};return tr.type==="OperatorNode"&&tr.isBinary()&&tr.op==="/"?(gr===1&&(tr.args[0]=Wt(tr.args[0],Or),tr.args[1]=Wt(tr.args[1])),ar&&(Ar.numerator=tr.args[0],Ar.denominator=tr.args[1])):(gr===1&&(tr=Wt(tr,Or)),ar&&(Ar.numerator=tr,Ar.denominator=null)),ar?(Ar.coefficients=Or,Ar.variables=cr.variables,Ar.expression=tr,Ar):tr}});function jt(Bt,tr,Jt,ar){var pr=[],cr=St(Bt,ar,tr,{exactFractions:!1});Jt=!!Jt;var gr="+-*"+(Jt?"/":"");Er(cr);var Sr={};return Sr.expression=cr,Sr.variables=pr,Sr;function Er(Vr){var Wr=Vr.type;if(Wr==="FunctionNode")throw new Error("There is an unsolved function call");if(Wr==="OperatorNode")if(Vr.op==="^"){if(Vr.args[1].type!=="ConstantNode"||!(0,et.isInteger)(parseFloat(Vr.args[1].value)))throw new Error("There is a non-integer exponent");Er(Vr.args[0])}else{if(gr.indexOf(Vr.op)===-1)throw new Error("Operator "+Vr.op+" invalid in polynomial expression");for(var Mr=0;Mr<Vr.args.length;Mr++)Er(Vr.args[Mr])}else if(Wr==="SymbolNode"){var Nr=Vr.name,Yr=pr.indexOf(Nr);Yr===-1&&pr.push(Nr)}else if(Wr==="ParenthesisNode")Er(Vr.content);else if(Wr!=="ConstantNode")throw new Error("type "+Wr+" is not allowed in polynomial expression")}}function Ut(){var Bt=[bt,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},Kt,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],tr=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],Jt=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],ar=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],pr={};return pr.firstRules=Bt.concat(tr,ar),pr.distrDivRules=Jt,pr.sucDivRules=ar,pr.firstRulesAgain=Bt.concat(tr),pr.finalRules=[bt,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},Kt,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],pr}function Ot(Bt,tr,Jt){var ar=Bt.type,pr=arguments.length>1;if(ar==="OperatorNode"&&Bt.isBinary()){var cr=!1,gr;if(Bt.op==="^"&&(Bt.args[0].type==="ParenthesisNode"||Bt.args[0].type==="OperatorNode")&&Bt.args[1].type==="ConstantNode"&&(gr=parseFloat(Bt.args[1].value),cr=gr>=2&&(0,et.isInteger)(gr)),cr){if(gr>2){var Sr=Bt.args[0],Er=new qt("^","pow",[Bt.args[0].cloneDeep(),new Nt(gr-1)]);Bt=new qt("*","multiply",[Sr,Er])}else Bt=new qt("*","multiply",[Bt.args[0],Bt.args[0].cloneDeep()]);pr&&(Jt==="content"?tr.content=Bt:tr.args[Jt]=Bt)}}if(ar==="ParenthesisNode")Ot(Bt.content,Bt,"content");else if(ar!=="ConstantNode"&&ar!=="SymbolNode")for(var Vr=0;Vr<Bt.args.length;Vr++)Ot(Bt.args[Vr],Bt,Vr);if(!pr)return Bt}function Wt(Bt,tr){tr===void 0&&(tr=[]),tr[0]=0;var Jt={};Jt.cte=1,Jt.oper="+",Jt.fire="";var ar=0,pr="";Nr(Bt,null,Jt),ar=tr.length-1;for(var cr=!0,gr,Sr=ar;Sr>=0;Sr--)if(tr[Sr]!==0){var Er=new Nt(cr?tr[Sr]:Math.abs(tr[Sr])),Vr=tr[Sr]<0?"-":"+";if(Sr>0){var Wr=new Vt(pr);if(Sr>1){var Mr=new Nt(Sr);Wr=new qt("^","pow",[Wr,Mr])}tr[Sr]===-1&&cr?Er=new qt("-","unaryMinus",[Wr]):Math.abs(tr[Sr])===1?Er=Wr:Er=new qt("*","multiply",[Er,Wr])}cr?gr=Er:Vr==="+"?gr=new qt("+","add",[gr,Er]):gr=new qt("-","subtract",[gr,Er]),cr=!1}if(cr)return new Nt(0);return gr;function Nr(Yr,Or,Ar){var Qr=Yr.type;if(Qr==="FunctionNode")throw new Error("There is an unsolved function call");if(Qr==="OperatorNode"){if("+-*^".indexOf(Yr.op)===-1)throw new Error("Operator "+Yr.op+" invalid");if(Or!==null){if((Yr.fn==="unaryMinus"||Yr.fn==="pow")&&Or.fn!=="add"&&Or.fn!=="subtract"&&Or.fn!=="multiply")throw new Error("Invalid "+Yr.op+" placing");if((Yr.fn==="subtract"||Yr.fn==="add"||Yr.fn==="multiply")&&Or.fn!=="add"&&Or.fn!=="subtract")throw new Error("Invalid "+Yr.op+" placing");if((Yr.fn==="subtract"||Yr.fn==="add"||Yr.fn==="unaryMinus")&&Ar.noFil!==0)throw new Error("Invalid "+Yr.op+" placing")}(Yr.op==="^"||Yr.op==="*")&&(Ar.fire=Yr.op);for(var hn=0;hn<Yr.args.length;hn++)Yr.fn==="unaryMinus"&&(Ar.oper="-"),(Yr.op==="+"||Yr.fn==="subtract")&&(Ar.fire="",Ar.cte=1,Ar.oper=hn===0?"+":Yr.op),Ar.noFil=hn,Nr(Yr.args[hn],Yr,Ar)}else if(Qr==="SymbolNode"){if(Yr.name!==pr&&pr!=="")throw new Error("There is more than one variable");if(pr=Yr.name,Or===null){tr[1]=1;return}if(Or.op==="^"&&Ar.noFil!==0)throw new Error("In power the variable should be the first parameter");if(Or.op==="*"&&Ar.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(Ar.fire===""||Ar.fire==="*")&&(ar<1&&(tr[1]=0),tr[1]+=Ar.cte*(Ar.oper==="+"?1:-1),ar=Math.max(1,ar))}else if(Qr==="ConstantNode"){var Sn=parseFloat(Yr.value);if(Or===null){tr[0]=Sn;return}if(Or.op==="^"){if(Ar.noFil!==1)throw new Error("Constant cannot be powered");if(!(0,et.isInteger)(Sn)||Sn<=0)throw new Error("Non-integer exponent is not allowed");for(var Kr=ar+1;Kr<Sn;Kr++)tr[Kr]=0;Sn>ar&&(tr[Sn]=0),tr[Sn]+=Ar.cte*(Ar.oper==="+"?1:-1),ar=Math.max(Sn,ar);return}Ar.cte=Sn,Ar.fire===""&&(tr[0]+=Ar.cte*(Ar.oper==="+"?1:-1))}else throw new Error("Type "+Qr+" is not allowed")}}});return rationalize.createRationalize=st,rationalize}var reviver={},hasRequiredReviver;function requireReviver(){if(hasRequiredReviver)return reviver;hasRequiredReviver=1,Object.defineProperty(reviver,"__esModule",{value:!0}),reviver.createReviver=void 0;var et=requireFactory(),_e="reviver",tt=["classes"],rt=(0,et.factory)(_e,tt,function(nt){var st=nt.classes;return function(ft,ht){var mt=st[ht&&ht.mathjs];return mt&&typeof mt.fromJSON=="function"?mt.fromJSON(ht):ht}});return reviver.createReviver=rt,reviver}var replacer={},hasRequiredReplacer;function requireReplacer(){if(hasRequiredReplacer)return replacer;hasRequiredReplacer=1,Object.defineProperty(replacer,"__esModule",{value:!0}),replacer.createReplacer=void 0;var et=requireFactory(),_e="replacer",tt=[],rt=(0,et.factory)(_e,tt,function(){return function(st,dt){return typeof dt=="number"&&(!isFinite(dt)||isNaN(dt))?{mathjs:"number",value:String(dt)}:dt}});return replacer.createReplacer=rt,replacer}var constants={},version$8={},hasRequiredVersion;function requireVersion(){if(hasRequiredVersion)return version$8;hasRequiredVersion=1,Object.defineProperty(version$8,"__esModule",{value:!0}),version$8.version=void 0;var et="10.6.4";return version$8.version=et,version$8}var hasRequiredConstants;function requireConstants(){if(hasRequiredConstants)return constants;hasRequiredConstants=1,Object.defineProperty(constants,"__esModule",{value:!0}),constants.createVersion=constants.createUppercasePi=constants.createUppercaseE=constants.createTrue=constants.createTau=constants.createSQRT2=constants.createSQRT1_2=constants.createPi=constants.createPhi=constants.createNull=constants.createNaN=constants.createLOG2E=constants.createLOG10E=constants.createLN2=constants.createLN10=constants.createInfinity=constants.createI=constants.createFalse=constants.createE=void 0;var et=requireFactory(),_e=requireVersion(),tt=requireConstants$1(),rt=requireNumber$2(),nt=(0,et.factory)("true",[],function(){return!0});constants.createTrue=nt;var st=(0,et.factory)("false",[],function(){return!1});constants.createFalse=st;var dt=(0,et.factory)("null",[],function(){return null});constants.createNull=dt;var ft=Vt("Infinity",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(1/0):1/0});constants.createInfinity=ft;var ht=Vt("NaN",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(NaN):NaN});constants.createNaN=ht;var mt=Vt("pi",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?(0,tt.createBigNumberPi)(Ut):rt.pi});constants.createPi=mt;var bt=Vt("tau",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?(0,tt.createBigNumberTau)(Ut):rt.tau});constants.createTau=bt;var St=Vt("e",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?(0,tt.createBigNumberE)(Ut):rt.e});constants.createE=St;var Et=Vt("phi",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?(0,tt.createBigNumberPhi)(Ut):rt.phi});constants.createPhi=Et;var Ct=Vt("LN2",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(2).ln():Math.LN2});constants.createLN2=Ct;var Rt=Vt("LN10",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(10).ln():Math.LN10});constants.createLN10=Rt;var Tt=Vt("LOG2E",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(1).div(new Ut(2).ln()):Math.LOG2E});constants.createLOG2E=Tt;var wt=Vt("LOG10E",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(1).div(new Ut(10).ln()):Math.LOG10E});constants.createLOG10E=wt;var At=Vt("SQRT1_2",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut("0.5").sqrt():Math.SQRT1_2});constants.createSQRT1_2=At;var Nt=Vt("SQRT2",["config","?BigNumber"],function(Kt){var jt=Kt.config,Ut=Kt.BigNumber;return jt.number==="BigNumber"?new Ut(2).sqrt():Math.SQRT2});constants.createSQRT2=Nt;var Pt=Vt("i",["Complex"],function(Kt){var jt=Kt.Complex;return jt.I});constants.createI=Pt;var It=(0,et.factory)("PI",["pi"],function(Kt){var jt=Kt.pi;return jt});constants.createUppercasePi=It;var Ft=(0,et.factory)("E",["e"],function(Kt){var jt=Kt.e;return jt});constants.createUppercaseE=Ft;var qt=(0,et.factory)("version",[],function(){return _e.version});constants.createVersion=qt;function Vt(Kt,jt,Ut){return(0,et.factory)(Kt,jt,Ut,{recreateOnConfigChange:!0})}return constants}var physicalConstants={},hasRequiredPhysicalConstants;function requirePhysicalConstants(){if(hasRequiredPhysicalConstants)return physicalConstants;hasRequiredPhysicalConstants=1,Object.defineProperty(physicalConstants,"__esModule",{value:!0}),physicalConstants.createWienDisplacement=physicalConstants.createWeakMixingAngle=physicalConstants.createVacuumImpedance=physicalConstants.createThomsonCrossSection=physicalConstants.createStefanBoltzmann=physicalConstants.createSpeedOfLight=physicalConstants.createSecondRadiation=physicalConstants.createSackurTetrode=physicalConstants.createRydberg=physicalConstants.createReducedPlanckConstant=physicalConstants.createQuantumOfCirculation=physicalConstants.createProtonMass=physicalConstants.createPlanckTime=physicalConstants.createPlanckTemperature=physicalConstants.createPlanckMass=physicalConstants.createPlanckLength=physicalConstants.createPlanckConstant=physicalConstants.createPlanckCharge=physicalConstants.createNuclearMagneton=physicalConstants.createNeutronMass=physicalConstants.createMolarVolume=physicalConstants.createMolarPlanckConstant=physicalConstants.createMolarMassC12=physicalConstants.createMolarMass=physicalConstants.createMagneticFluxQuantum=physicalConstants.createMagneticConstant=physicalConstants.createLoschmidt=physicalConstants.createKlitzing=physicalConstants.createJosephson=physicalConstants.createInverseConductanceQuantum=physicalConstants.createHartreeEnergy=physicalConstants.createGravity=physicalConstants.createGravitationConstant=physicalConstants.createGasConstant=physicalConstants.createFirstRadiation=physicalConstants.createFineStructure=physicalConstants.createFermiCoupling=physicalConstants.createFaraday=physicalConstants.createElementaryCharge=physicalConstants.createElectronMass=physicalConstants.createElectricConstant=physicalConstants.createEfimovFactor=physicalConstants.createDeuteronMass=physicalConstants.createCoulomb=physicalConstants.createConductanceQuantum=physicalConstants.createClassicalElectronRadius=physicalConstants.createBoltzmann=physicalConstants.createBohrRadius=physicalConstants.createBohrMagneton=physicalConstants.createAvogadro=physicalConstants.createAtomicMass=void 0;var et=requireFactory(),_e=xn("speedOfLight","299792458","m s^-1");physicalConstants.createSpeedOfLight=_e;var tt=xn("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2");physicalConstants.createGravitationConstant=tt;var rt=xn("planckConstant","6.62607015e-34","J s");physicalConstants.createPlanckConstant=rt;var nt=xn("reducedPlanckConstant","1.0545718176461565e-34","J s");physicalConstants.createReducedPlanckConstant=nt;var st=xn("magneticConstant","1.25663706212e-6","N A^-2");physicalConstants.createMagneticConstant=st;var dt=xn("electricConstant","8.8541878128e-12","F m^-1");physicalConstants.createElectricConstant=dt;var ft=xn("vacuumImpedance","376.730313667","ohm");physicalConstants.createVacuumImpedance=ft;var ht=xn("coulomb","8.987551792261171e9","N m^2 C^-2");physicalConstants.createCoulomb=ht;var mt=xn("elementaryCharge","1.602176634e-19","C");physicalConstants.createElementaryCharge=mt;var bt=xn("bohrMagneton","9.2740100783e-24","J T^-1");physicalConstants.createBohrMagneton=bt;var St=xn("conductanceQuantum","7.748091729863649e-5","S");physicalConstants.createConductanceQuantum=St;var Et=xn("inverseConductanceQuantum","12906.403729652257","ohm");physicalConstants.createInverseConductanceQuantum=Et;var Ct=xn("magneticFluxQuantum","2.0678338484619295e-15","Wb");physicalConstants.createMagneticFluxQuantum=Ct;var Rt=xn("nuclearMagneton","5.0507837461e-27","J T^-1");physicalConstants.createNuclearMagneton=Rt;var Tt=xn("klitzing","25812.807459304513","ohm");physicalConstants.createKlitzing=Tt;var wt=xn("josephson","4.835978484169836e14 Hz V","Hz V^-1");physicalConstants.createJosephson=wt;var At=xn("bohrRadius","5.29177210903e-11","m");physicalConstants.createBohrRadius=At;var Nt=xn("classicalElectronRadius","2.8179403262e-15","m");physicalConstants.createClassicalElectronRadius=Nt;var Pt=xn("electronMass","9.1093837015e-31","kg");physicalConstants.createElectronMass=Pt;var It=xn("fermiCoupling","1.1663787e-5","GeV^-2");physicalConstants.createFermiCoupling=It;var Ft=An("fineStructure",.0072973525693);physicalConstants.createFineStructure=Ft;var qt=xn("hartreeEnergy","4.3597447222071e-18","J");physicalConstants.createHartreeEnergy=qt;var Vt=xn("protonMass","1.67262192369e-27","kg");physicalConstants.createProtonMass=Vt;var Kt=xn("deuteronMass","3.3435830926e-27","kg");physicalConstants.createDeuteronMass=Kt;var jt=xn("neutronMass","1.6749271613e-27","kg");physicalConstants.createNeutronMass=jt;var Ut=xn("quantumOfCirculation","3.6369475516e-4","m^2 s^-1");physicalConstants.createQuantumOfCirculation=Ut;var Ot=xn("rydberg","10973731.568160","m^-1");physicalConstants.createRydberg=Ot;var Wt=xn("thomsonCrossSection","6.6524587321e-29","m^2");physicalConstants.createThomsonCrossSection=Wt;var Bt=An("weakMixingAngle",.2229);physicalConstants.createWeakMixingAngle=Bt;var tr=An("efimovFactor",22.7);physicalConstants.createEfimovFactor=tr;var Jt=xn("atomicMass","1.66053906660e-27","kg");physicalConstants.createAtomicMass=Jt;var ar=xn("avogadro","6.02214076e23","mol^-1");physicalConstants.createAvogadro=ar;var pr=xn("boltzmann","1.380649e-23","J K^-1");physicalConstants.createBoltzmann=pr;var cr=xn("faraday","96485.33212331001","C mol^-1");physicalConstants.createFaraday=cr;var gr=xn("firstRadiation","3.7417718521927573e-16","W m^2");physicalConstants.createFirstRadiation=gr;var Sr=xn("loschmidt","2.686780111798444e25","m^-3");physicalConstants.createLoschmidt=Sr;var Er=xn("gasConstant","8.31446261815324","J K^-1 mol^-1");physicalConstants.createGasConstant=Er;var Vr=xn("molarPlanckConstant","3.990312712893431e-10","J s mol^-1");physicalConstants.createMolarPlanckConstant=Vr;var Wr=xn("molarVolume","0.022413969545014137","m^3 mol^-1");physicalConstants.createMolarVolume=Wr;var Mr=An("sackurTetrode",-1.16487052358);physicalConstants.createSackurTetrode=Mr;var Nr=xn("secondRadiation","0.014387768775039337","m K");physicalConstants.createSecondRadiation=Nr;var Yr=xn("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4");physicalConstants.createStefanBoltzmann=Yr;var Or=xn("wienDisplacement","2.897771955e-3","m K");physicalConstants.createWienDisplacement=Or;var Ar=xn("molarMass","0.99999999965e-3","kg mol^-1");physicalConstants.createMolarMass=Ar;var Qr=xn("molarMassC12","11.9999999958e-3","kg mol^-1");physicalConstants.createMolarMassC12=Qr;var hn=xn("gravity","9.80665","m s^-2");physicalConstants.createGravity=hn;var Sn=xn("planckLength","1.616255e-35","m");physicalConstants.createPlanckLength=Sn;var Kr=xn("planckMass","2.176435e-8","kg");physicalConstants.createPlanckMass=Kr;var Hn=xn("planckTime","5.391245e-44","s");physicalConstants.createPlanckTime=Hn;var ln=xn("planckCharge","1.87554603778e-18","C");physicalConstants.createPlanckCharge=ln;var kn=xn("planckTemperature","1.416785e+32","K");physicalConstants.createPlanckTemperature=kn;function xn(rs,qs,Ln){var Cn=["config","Unit","BigNumber"];return(0,et.factory)(rs,Cn,function(Nn){var Gr=Nn.config,tn=Nn.Unit,dn=Nn.BigNumber,Rn=Gr.number==="BigNumber"?new dn(qs):parseFloat(qs),wn=new tn(Rn,Ln);return wn.fixPrefix=!0,wn})}function An(rs,qs){var Ln=["config","BigNumber"];return(0,et.factory)(rs,Ln,function(Cn){var Nn=Cn.config,Gr=Cn.BigNumber;return Nn.number==="BigNumber"?new Gr(qs):qs})}return physicalConstants}var apply_transform={},hasRequiredApply_transform;function requireApply_transform(){if(hasRequiredApply_transform)return apply_transform;hasRequiredApply_transform=1,Object.defineProperty(apply_transform,"__esModule",{value:!0}),apply_transform.createApplyTransform=void 0;var et=requireErrorTransform(),_e=requireFactory(),tt=requireApply(),rt=requireIs(),nt="apply",st=["typed","isInteger"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.isInteger,bt=(0,tt.createApply)({typed:ht,isInteger:mt});return ht("apply",{"...any":function(Et){var Ct=Et[1];(0,rt.isNumber)(Ct)?Et[1]=Ct-1:(0,rt.isBigNumber)(Ct)&&(Et[1]=Ct.minus(1));try{return bt.apply(null,Et)}catch(Rt){throw(0,et.errorTransform)(Rt)}}})},{isTransformFunction:!0});return apply_transform.createApplyTransform=dt,apply_transform}var column_transform={},hasRequiredColumn_transform;function requireColumn_transform(){if(hasRequiredColumn_transform)return column_transform;hasRequiredColumn_transform=1,Object.defineProperty(column_transform,"__esModule",{value:!0}),column_transform.createColumnTransform=void 0;var et=requireErrorTransform(),_e=requireFactory(),tt=requireColumn$1(),rt=requireIs(),nt="column",st=["typed","Index","matrix","range"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.Index,bt=ft.matrix,St=ft.range,Et=(0,tt.createColumn)({typed:ht,Index:mt,matrix:bt,range:St});return ht("column",{"...any":function(Rt){var Tt=Rt.length-1,wt=Rt[Tt];(0,rt.isNumber)(wt)&&(Rt[Tt]=wt-1);try{return Et.apply(null,Rt)}catch(At){throw(0,et.errorTransform)(At)}}})},{isTransformFunction:!0});return column_transform.createColumnTransform=dt,column_transform}var filter_transform={},compileInlineExpression={},hasRequiredCompileInlineExpression;function requireCompileInlineExpression(){if(hasRequiredCompileInlineExpression)return compileInlineExpression;hasRequiredCompileInlineExpression=1,Object.defineProperty(compileInlineExpression,"__esModule",{value:!0}),compileInlineExpression.compileInlineExpression=tt;var et=requireIs(),_e=requireScope();function tt(rt,nt,st){var dt=rt.filter(function(bt){return(0,et.isSymbolNode)(bt)&&!(bt.name in nt)&&!st.has(bt.name)})[0];if(!dt)throw new Error('No undefined variable found in inline expression "'+rt+'"');var ft=dt.name,ht=(0,_e.createSubScope)(st),mt=rt.compile();return function(St){return ht.set(ft,St),mt.evaluate(ht)}}return compileInlineExpression}var hasRequiredFilter_transform;function requireFilter_transform(){if(hasRequiredFilter_transform)return filter_transform;hasRequiredFilter_transform=1,Object.defineProperty(filter_transform,"__esModule",{value:!0}),filter_transform.createFilterTransform=void 0;var et=requireIs(),_e=requireArray(),tt=require_function$1(),rt=requireCompileInlineExpression(),nt=requireFactory(),st="filter",dt=["typed"],ft=(0,nt.factory)(st,dt,function(mt){var bt=mt.typed;function St(Ct,Rt,Tt){var wt,At;return Ct[0]&&(wt=Ct[0].compile().evaluate(Tt)),Ct[1]&&((0,et.isSymbolNode)(Ct[1])||(0,et.isFunctionAssignmentNode)(Ct[1])?At=Ct[1].compile().evaluate(Tt):At=(0,rt.compileInlineExpression)(Ct[1],Rt,Tt)),Et(wt,At)}St.rawArgs=!0;var Et=bt("filter",{"Array, function":ht,"Matrix, function":function(Rt,Tt){return Rt.create(ht(Rt.toArray(),Tt))},"Array, RegExp":_e.filterRegExp,"Matrix, RegExp":function(Rt,Tt){return Rt.create((0,_e.filterRegExp)(Rt.toArray(),Tt))}});return St},{isTransformFunction:!0});filter_transform.createFilterTransform=ft;function ht(mt,bt){var St=(0,tt.maxArgumentCount)(bt);return(0,_e.filter)(mt,function(Et,Ct,Rt){return St===1?bt(Et):St===2?bt(Et,[Ct+1]):bt(Et,[Ct+1],Rt)})}return filter_transform}var forEach_transform={},hasRequiredForEach_transform;function requireForEach_transform(){if(hasRequiredForEach_transform)return forEach_transform;hasRequiredForEach_transform=1,Object.defineProperty(forEach_transform,"__esModule",{value:!0}),forEach_transform.createForEachTransform=void 0;var et=requireIs(),_e=require_function$1(),tt=requireArray(),rt=requireFactory(),nt=requireCompileInlineExpression(),st="forEach",dt=["typed"],ft=(0,rt.factory)(st,dt,function(ht){var mt=ht.typed;function bt(Et,Ct,Rt){var Tt,wt;return Et[0]&&(Tt=Et[0].compile().evaluate(Rt)),Et[1]&&((0,et.isSymbolNode)(Et[1])||(0,et.isFunctionAssignmentNode)(Et[1])?wt=Et[1].compile().evaluate(Rt):wt=(0,nt.compileInlineExpression)(Et[1],Ct,Rt)),St(Tt,wt)}bt.rawArgs=!0;var St=mt("forEach",{"Array | Matrix, function":function(Ct,Rt){var Tt=(0,_e.maxArgumentCount)(Rt),wt=function At(Nt,Pt){Array.isArray(Nt)?(0,tt.forEach)(Nt,function(It,Ft){At(It,Pt.concat(Ft+1))}):Tt===1?Rt(Nt):Tt===2?Rt(Nt,Pt):Rt(Nt,Pt,Ct)};wt(Ct.valueOf(),[])}});return bt},{isTransformFunction:!0});return forEach_transform.createForEachTransform=ft,forEach_transform}var index_transform={},hasRequiredIndex_transform;function requireIndex_transform(){if(hasRequiredIndex_transform)return index_transform;hasRequiredIndex_transform=1,Object.defineProperty(index_transform,"__esModule",{value:!0}),index_transform.createIndexTransform=void 0;var et=requireIs(),_e=requireFactory(),tt="index",rt=["Index"],nt=(0,_e.factory)(tt,rt,function(st){var dt=st.Index;return function(){for(var ht=[],mt=0,bt=arguments.length;mt<bt;mt++){var St=arguments[mt];if((0,et.isRange)(St))St.start--,St.end-=St.step>0?0:2;else if(St&&St.isSet===!0)St=St.map(function(Ct){return Ct-1});else if((0,et.isArray)(St)||(0,et.isMatrix)(St))St=St.map(function(Ct){return Ct-1});else if((0,et.isNumber)(St))St--;else if((0,et.isBigNumber)(St))St=St.toNumber()-1;else if(typeof St!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");ht[mt]=St}var Et=new dt;return dt.apply(Et,ht),Et}},{isTransformFunction:!0});return index_transform.createIndexTransform=nt,index_transform}var map_transform={},hasRequiredMap_transform;function requireMap_transform(){if(hasRequiredMap_transform)return map_transform;hasRequiredMap_transform=1,Object.defineProperty(map_transform,"__esModule",{value:!0}),map_transform.createMapTransform=void 0;var et=requireIs(),_e=require_function$1(),tt=requireArray(),rt=requireFactory(),nt=requireCompileInlineExpression(),st="map",dt=["typed"],ft=(0,rt.factory)(st,dt,function(mt){var bt=mt.typed;function St(Ct,Rt,Tt){var wt,At;return Ct[0]&&(wt=Ct[0].compile().evaluate(Tt)),Ct[1]&&((0,et.isSymbolNode)(Ct[1])||(0,et.isFunctionAssignmentNode)(Ct[1])?At=Ct[1].compile().evaluate(Tt):At=(0,nt.compileInlineExpression)(Ct[1],Rt,Tt)),Et(wt,At)}St.rawArgs=!0;var Et=bt("map",{"Array, function":function(Rt,Tt){return ht(Rt,Tt,Rt)},"Matrix, function":function(Rt,Tt){return Rt.create(ht(Rt.valueOf(),Tt,Rt))}});return St},{isTransformFunction:!0});map_transform.createMapTransform=ft;function ht(mt,bt,St){var Et=(0,_e.maxArgumentCount)(bt);function Ct(Rt,Tt){return Array.isArray(Rt)?(0,tt.map)(Rt,function(wt,At){return Ct(wt,Tt.concat(At+1))}):Et===1?bt(Rt):Et===2?bt(Rt,Tt):bt(Rt,Tt,St)}return Ct(mt,[])}return map_transform}var max_transform={},lastDimToZeroBase={},hasRequiredLastDimToZeroBase;function requireLastDimToZeroBase(){if(hasRequiredLastDimToZeroBase)return lastDimToZeroBase;hasRequiredLastDimToZeroBase=1,Object.defineProperty(lastDimToZeroBase,"__esModule",{value:!0}),lastDimToZeroBase.lastDimToZeroBase=_e;var et=requireIs();function _e(tt){if(tt.length===2&&(0,et.isCollection)(tt[0])){tt=tt.slice();var rt=tt[1];(0,et.isNumber)(rt)?tt[1]=rt-1:(0,et.isBigNumber)(rt)&&(tt[1]=rt.minus(1))}return tt}return lastDimToZeroBase}var hasRequiredMax_transform;function requireMax_transform(){if(hasRequiredMax_transform)return max_transform;hasRequiredMax_transform=1,Object.defineProperty(max_transform,"__esModule",{value:!0}),max_transform.createMaxTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireMax$1(),rt=requireLastDimToZeroBase(),nt="max",st=["typed","config","numeric","larger"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.numeric,St=ft.larger,Et=(0,tt.createMax)({typed:ht,config:mt,numeric:bt,larger:St});return ht("max",{"...any":function(Rt){Rt=(0,rt.lastDimToZeroBase)(Rt);try{return Et.apply(null,Rt)}catch(Tt){throw(0,_e.errorTransform)(Tt)}}})},{isTransformFunction:!0});return max_transform.createMaxTransform=dt,max_transform}var mean_transform={},hasRequiredMean_transform;function requireMean_transform(){if(hasRequiredMean_transform)return mean_transform;hasRequiredMean_transform=1,Object.defineProperty(mean_transform,"__esModule",{value:!0}),mean_transform.createMeanTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireMean(),rt=requireLastDimToZeroBase(),nt="mean",st=["typed","add","divide"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.divide,St=(0,tt.createMean)({typed:ht,add:mt,divide:bt});return ht("mean",{"...any":function(Ct){Ct=(0,rt.lastDimToZeroBase)(Ct);try{return St.apply(null,Ct)}catch(Rt){throw(0,_e.errorTransform)(Rt)}}})},{isTransformFunction:!0});return mean_transform.createMeanTransform=dt,mean_transform}var min_transform={},hasRequiredMin_transform;function requireMin_transform(){if(hasRequiredMin_transform)return min_transform;hasRequiredMin_transform=1,Object.defineProperty(min_transform,"__esModule",{value:!0}),min_transform.createMinTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireMin$1(),rt=requireLastDimToZeroBase(),nt="min",st=["typed","config","numeric","smaller"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.numeric,St=ft.smaller,Et=(0,tt.createMin)({typed:ht,config:mt,numeric:bt,smaller:St});return ht("min",{"...any":function(Rt){Rt=(0,rt.lastDimToZeroBase)(Rt);try{return Et.apply(null,Rt)}catch(Tt){throw(0,_e.errorTransform)(Tt)}}})},{isTransformFunction:!0});return min_transform.createMinTransform=dt,min_transform}var range_transform={},hasRequiredRange_transform;function requireRange_transform(){if(hasRequiredRange_transform)return range_transform;hasRequiredRange_transform=1,Object.defineProperty(range_transform,"__esModule",{value:!0}),range_transform.createRangeTransform=void 0;var et=requireFactory(),_e=requireRange$1(),tt="range",rt=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],nt=(0,et.factory)(tt,rt,function(st){var dt=st.typed,ft=st.config,ht=st.matrix,mt=st.bignumber,bt=st.smaller,St=st.smallerEq,Et=st.larger,Ct=st.largerEq,Rt=(0,_e.createRange)({typed:dt,config:ft,matrix:ht,bignumber:mt,smaller:bt,smallerEq:St,larger:Et,largerEq:Ct});return dt("range",{"...any":function(wt){var At=wt.length-1,Nt=wt[At];return typeof Nt!="boolean"&&wt.push(!0),Rt.apply(null,wt)}})},{isTransformFunction:!0});return range_transform.createRangeTransform=nt,range_transform}var row_transform={},hasRequiredRow_transform;function requireRow_transform(){if(hasRequiredRow_transform)return row_transform;hasRequiredRow_transform=1,Object.defineProperty(row_transform,"__esModule",{value:!0}),row_transform.createRowTransform=void 0;var et=requireFactory(),_e=requireRow$1(),tt=requireErrorTransform(),rt=requireIs(),nt="row",st=["typed","Index","matrix","range"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.Index,bt=ft.matrix,St=ft.range,Et=(0,_e.createRow)({typed:ht,Index:mt,matrix:bt,range:St});return ht("row",{"...any":function(Rt){var Tt=Rt.length-1,wt=Rt[Tt];(0,rt.isNumber)(wt)&&(Rt[Tt]=wt-1);try{return Et.apply(null,Rt)}catch(At){throw(0,tt.errorTransform)(At)}}})},{isTransformFunction:!0});return row_transform.createRowTransform=dt,row_transform}var subset_transform={},hasRequiredSubset_transform;function requireSubset_transform(){if(hasRequiredSubset_transform)return subset_transform;hasRequiredSubset_transform=1,Object.defineProperty(subset_transform,"__esModule",{value:!0}),subset_transform.createSubsetTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireSubset$1(),rt="subset",nt=["typed","matrix"],st=(0,et.factory)(rt,nt,function(dt){var ft=dt.typed,ht=dt.matrix,mt=(0,tt.createSubset)({typed:ft,matrix:ht});return ft("subset",{"...any":function(St){try{return mt.apply(null,St)}catch(Et){throw(0,_e.errorTransform)(Et)}}})},{isTransformFunction:!0});return subset_transform.createSubsetTransform=st,subset_transform}var concat_transform={},hasRequiredConcat_transform;function requireConcat_transform(){if(hasRequiredConcat_transform)return concat_transform;hasRequiredConcat_transform=1,Object.defineProperty(concat_transform,"__esModule",{value:!0}),concat_transform.createConcatTransform=void 0;var et=requireIs(),_e=requireErrorTransform(),tt=requireFactory(),rt=requireConcat$1(),nt="concat",st=["typed","matrix","isInteger"],dt=(0,tt.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.isInteger,St=(0,rt.createConcat)({typed:ht,matrix:mt,isInteger:bt});return ht("concat",{"...any":function(Ct){var Rt=Ct.length-1,Tt=Ct[Rt];(0,et.isNumber)(Tt)?Ct[Rt]=Tt-1:(0,et.isBigNumber)(Tt)&&(Ct[Rt]=Tt.minus(1));try{return St.apply(null,Ct)}catch(wt){throw(0,_e.errorTransform)(wt)}}})},{isTransformFunction:!0});return concat_transform.createConcatTransform=dt,concat_transform}var diff_transform={},hasRequiredDiff_transform;function requireDiff_transform(){if(hasRequiredDiff_transform)return diff_transform;hasRequiredDiff_transform=1,Object.defineProperty(diff_transform,"__esModule",{value:!0}),diff_transform.createDiffTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireDiff$1(),rt=requireLastDimToZeroBase(),nt="diff",st=["typed","matrix","subtract","number","bignumber"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.matrix,bt=ft.subtract,St=ft.number,Et=ft.bignumber,Ct=(0,tt.createDiff)({typed:ht,matrix:mt,subtract:bt,number:St,bignumber:Et});return ht(nt,{"...any":function(Tt){Tt=(0,rt.lastDimToZeroBase)(Tt);try{return Ct.apply(null,Tt)}catch(wt){throw(0,_e.errorTransform)(wt)}}})},{isTransformFunction:!0});return diff_transform.createDiffTransform=dt,diff_transform}var std_transform={},hasRequiredStd_transform;function requireStd_transform(){if(hasRequiredStd_transform)return std_transform;hasRequiredStd_transform=1,Object.defineProperty(std_transform,"__esModule",{value:!0}),std_transform.createStdTransform=void 0;var et=requireFactory(),_e=requireStd(),tt=requireErrorTransform(),rt=requireLastDimToZeroBase(),nt="std",st=["typed","sqrt","variance"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.sqrt,bt=ft.variance,St=(0,_e.createStd)({typed:ht,sqrt:mt,variance:bt});return ht("std",{"...any":function(Ct){Ct=(0,rt.lastDimToZeroBase)(Ct);try{return St.apply(null,Ct)}catch(Rt){throw(0,tt.errorTransform)(Rt)}}})},{isTransformFunction:!0});return std_transform.createStdTransform=dt,std_transform}var sum_transform={},hasRequiredSum_transform;function requireSum_transform(){if(hasRequiredSum_transform)return sum_transform;hasRequiredSum_transform=1,Object.defineProperty(sum_transform,"__esModule",{value:!0}),sum_transform.createSumTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireSum(),rt=requireLastDimToZeroBase(),nt="sum",st=["typed","config","add","numeric"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.config,bt=ft.add,St=ft.numeric,Et=(0,tt.createSum)({typed:ht,config:mt,add:bt,numeric:St});return ht(nt,{"...any":function(Rt){Rt=(0,rt.lastDimToZeroBase)(Rt);try{return Et.apply(null,Rt)}catch(Tt){throw(0,_e.errorTransform)(Tt)}}})},{isTransformFunction:!0});return sum_transform.createSumTransform=dt,sum_transform}var cumsum_transform={},hasRequiredCumsum_transform;function requireCumsum_transform(){if(hasRequiredCumsum_transform)return cumsum_transform;hasRequiredCumsum_transform=1,Object.defineProperty(cumsum_transform,"__esModule",{value:!0}),cumsum_transform.createCumSumTransform=void 0;var et=requireIs(),_e=requireFactory(),tt=requireErrorTransform(),rt=requireCumsum(),nt="cumsum",st=["typed","add","unaryPlus"],dt=(0,_e.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.unaryPlus,St=(0,rt.createCumSum)({typed:ht,add:mt,unaryPlus:bt});return ht(nt,{"...any":function(Ct){if(Ct.length===2&&(0,et.isCollection)(Ct[0])){var Rt=Ct[1];(0,et.isNumber)(Rt)?Ct[1]=Rt-1:(0,et.isBigNumber)(Rt)&&(Ct[1]=Rt.minus(1))}try{return St.apply(null,Ct)}catch(Tt){throw(0,tt.errorTransform)(Tt)}}})},{isTransformFunction:!0});return cumsum_transform.createCumSumTransform=dt,cumsum_transform}var variance_transform={},hasRequiredVariance_transform;function requireVariance_transform(){if(hasRequiredVariance_transform)return variance_transform;hasRequiredVariance_transform=1,Object.defineProperty(variance_transform,"__esModule",{value:!0}),variance_transform.createVarianceTransform=void 0;var et=requireFactory(),_e=requireErrorTransform(),tt=requireVariance(),rt=requireLastDimToZeroBase(),nt="variance",st=["typed","add","subtract","multiply","divide","apply","isNaN"],dt=(0,et.factory)(nt,st,function(ft){var ht=ft.typed,mt=ft.add,bt=ft.subtract,St=ft.multiply,Et=ft.divide,Ct=ft.apply,Rt=ft.isNaN,Tt=(0,tt.createVariance)({typed:ht,add:mt,subtract:bt,multiply:St,divide:Et,apply:Ct,isNaN:Rt});return ht(nt,{"...any":function(At){At=(0,rt.lastDimToZeroBase)(At);try{return Tt.apply(null,At)}catch(Nt){throw(0,_e.errorTransform)(Nt)}}})},{isTransformFunction:!0});return variance_transform.createVarianceTransform=dt,variance_transform}var hasRequiredFactoriesAny;function requireFactoriesAny(){return hasRequiredFactoriesAny||(hasRequiredFactoriesAny=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"createAbs",{enumerable:!0,get:function(){return pr.createAbs}}),Object.defineProperty(et,"createAccessorNode",{enumerable:!0,get:function(){return Xp.createAccessorNode}}),Object.defineProperty(et,"createAcos",{enumerable:!0,get:function(){return vl.createAcos}}),Object.defineProperty(et,"createAcosh",{enumerable:!0,get:function(){return up.createAcosh}}),Object.defineProperty(et,"createAcot",{enumerable:!0,get:function(){return _c.createAcot}}),Object.defineProperty(et,"createAcoth",{enumerable:!0,get:function(){return Bl.createAcoth}}),Object.defineProperty(et,"createAcsc",{enumerable:!0,get:function(){return rp.createAcsc}}),Object.defineProperty(et,"createAcsch",{enumerable:!0,get:function(){return Kp.createAcsch}}),Object.defineProperty(et,"createAdd",{enumerable:!0,get:function(){return zv.createAdd}}),Object.defineProperty(et,"createAddScalar",{enumerable:!0,get:function(){return gr.createAddScalar}}),Object.defineProperty(et,"createAnd",{enumerable:!0,get:function(){return om.createAnd}}),Object.defineProperty(et,"createApply",{enumerable:!0,get:function(){return cr.createApply}}),Object.defineProperty(et,"createApplyTransform",{enumerable:!0,get:function(){return Zv.createApplyTransform}}),Object.defineProperty(et,"createArg",{enumerable:!0,get:function(){return Rn.createArg}}),Object.defineProperty(et,"createArrayNode",{enumerable:!0,get:function(){return np.createArrayNode}}),Object.defineProperty(et,"createAsec",{enumerable:!0,get:function(){return lp.createAsec}}),Object.defineProperty(et,"createAsech",{enumerable:!0,get:function(){return qp.createAsech}}),Object.defineProperty(et,"createAsin",{enumerable:!0,get:function(){return lm.createAsin}}),Object.defineProperty(et,"createAsinh",{enumerable:!0,get:function(){return dl.createAsinh}}),Object.defineProperty(et,"createAssignmentNode",{enumerable:!0,get:function(){return Rm.createAssignmentNode}}),Object.defineProperty(et,"createAtan",{enumerable:!0,get:function(){return el.createAtan}}),Object.defineProperty(et,"createAtan2",{enumerable:!0,get:function(){return gv.createAtan2}}),Object.defineProperty(et,"createAtanh",{enumerable:!0,get:function(){return Vm.createAtanh}}),Object.defineProperty(et,"createAtomicMass",{enumerable:!0,get:function(){return Fu.createAtomicMass}}),Object.defineProperty(et,"createAvogadro",{enumerable:!0,get:function(){return Fu.createAvogadro}}),Object.defineProperty(et,"createBellNumbers",{enumerable:!0,get:function(){return Lm.createBellNumbers}}),Object.defineProperty(et,"createBigNumberClass",{enumerable:!0,get:function(){return rt.createBigNumberClass}}),Object.defineProperty(et,"createBignumber",{enumerable:!0,get:function(){return Vt.createBignumber}}),Object.defineProperty(et,"createBin",{enumerable:!0,get:function(){return fn.createBin}}),Object.defineProperty(et,"createBitAnd",{enumerable:!0,get:function(){return Nn.createBitAnd}}),Object.defineProperty(et,"createBitNot",{enumerable:!0,get:function(){return Gr.createBitNot}}),Object.defineProperty(et,"createBitOr",{enumerable:!0,get:function(){return tn.createBitOr}}),Object.defineProperty(et,"createBitXor",{enumerable:!0,get:function(){return dn.createBitXor}}),Object.defineProperty(et,"createBlockNode",{enumerable:!0,get:function(){return _0.createBlockNode}}),Object.defineProperty(et,"createBohrMagneton",{enumerable:!0,get:function(){return Fu.createBohrMagneton}}),Object.defineProperty(et,"createBohrRadius",{enumerable:!0,get:function(){return Fu.createBohrRadius}}),Object.defineProperty(et,"createBoltzmann",{enumerable:!0,get:function(){return Fu.createBoltzmann}}),Object.defineProperty(et,"createBoolean",{enumerable:!0,get:function(){return qt.createBoolean}}),Object.defineProperty(et,"createCatalan",{enumerable:!0,get:function(){return _v.createCatalan}}),Object.defineProperty(et,"createCbrt",{enumerable:!0,get:function(){return Sr.createCbrt}}),Object.defineProperty(et,"createCeil",{enumerable:!0,get:function(){return Er.createCeil}}),Object.defineProperty(et,"createChain",{enumerable:!0,get:function(){return Vu.createChain}}),Object.defineProperty(et,"createChainClass",{enumerable:!0,get:function(){return Ru.createChainClass}}),Object.defineProperty(et,"createClassicalElectronRadius",{enumerable:!0,get:function(){return Fu.createClassicalElectronRadius}}),Object.defineProperty(et,"createClone",{enumerable:!0,get:function(){return mt.createClone}}),Object.defineProperty(et,"createColumn",{enumerable:!0,get:function(){return Vn.createColumn}}),Object.defineProperty(et,"createColumnTransform",{enumerable:!0,get:function(){return Nv.createColumnTransform}}),Object.defineProperty(et,"createCombinations",{enumerable:!0,get:function(){return fp.createCombinations}}),Object.defineProperty(et,"createCombinationsWithRep",{enumerable:!0,get:function(){return Jy.createCombinationsWithRep}}),Object.defineProperty(et,"createCompare",{enumerable:!0,get:function(){return Op.createCompare}}),Object.defineProperty(et,"createCompareNatural",{enumerable:!0,get:function(){return op.createCompareNatural}}),Object.defineProperty(et,"createCompareText",{enumerable:!0,get:function(){return wl.createCompareText}}),Object.defineProperty(et,"createCompile",{enumerable:!0,get:function(){return ao.createCompile}}),Object.defineProperty(et,"createComplex",{enumerable:!0,get:function(){return Kt.createComplex}}),Object.defineProperty(et,"createComplexClass",{enumerable:!0,get:function(){return nt.createComplexClass}}),Object.defineProperty(et,"createComposition",{enumerable:!0,get:function(){return gp.createComposition}}),Object.defineProperty(et,"createConcat",{enumerable:!0,get:function(){return _a.createConcat}}),Object.defineProperty(et,"createConcatTransform",{enumerable:!0,get:function(){return l_.createConcatTransform}}),Object.defineProperty(et,"createConditionalNode",{enumerable:!0,get:function(){return bv.createConditionalNode}}),Object.defineProperty(et,"createConductanceQuantum",{enumerable:!0,get:function(){return Fu.createConductanceQuantum}}),Object.defineProperty(et,"createConj",{enumerable:!0,get:function(){return wn.createConj}}),Object.defineProperty(et,"createConstantNode",{enumerable:!0,get:function(){return Cr.createConstantNode}}),Object.defineProperty(et,"createCos",{enumerable:!0,get:function(){return nl.createCos}}),Object.defineProperty(et,"createCosh",{enumerable:!0,get:function(){return Xo.createCosh}}),Object.defineProperty(et,"createCot",{enumerable:!0,get:function(){return xm.createCot}}),Object.defineProperty(et,"createCoth",{enumerable:!0,get:function(){return nm.createCoth}}),Object.defineProperty(et,"createCoulomb",{enumerable:!0,get:function(){return Fu.createCoulomb}}),Object.defineProperty(et,"createCount",{enumerable:!0,get:function(){return bs.createCount}}),Object.defineProperty(et,"createCreateUnit",{enumerable:!0,get:function(){return lu.createCreateUnit}}),Object.defineProperty(et,"createCross",{enumerable:!0,get:function(){return Is.createCross}}),Object.defineProperty(et,"createCsc",{enumerable:!0,get:function(){return vv.createCsc}}),Object.defineProperty(et,"createCsch",{enumerable:!0,get:function(){return rv.createCsch}}),Object.defineProperty(et,"createCtranspose",{enumerable:!0,get:function(){return gl.createCtranspose}}),Object.defineProperty(et,"createCube",{enumerable:!0,get:function(){return Vr.createCube}}),Object.defineProperty(et,"createCumSum",{enumerable:!0,get:function(){return cm.createCumSum}}),Object.defineProperty(et,"createCumSumTransform",{enumerable:!0,get:function(){return hy.createCumSumTransform}}),Object.defineProperty(et,"createDeepEqual",{enumerable:!0,get:function(){return yr.createDeepEqual}}),Object.defineProperty(et,"createDenseMatrixClass",{enumerable:!0,get:function(){return ht.createDenseMatrixClass}}),Object.defineProperty(et,"createDerivative",{enumerable:!0,get:function(){return N_.createDerivative}}),Object.defineProperty(et,"createDet",{enumerable:!0,get:function(){return sl.createDet}}),Object.defineProperty(et,"createDeuteronMass",{enumerable:!0,get:function(){return Fu.createDeuteronMass}}),Object.defineProperty(et,"createDiag",{enumerable:!0,get:function(){return uo.createDiag}}),Object.defineProperty(et,"createDiff",{enumerable:!0,get:function(){return Ps.createDiff}}),Object.defineProperty(et,"createDiffTransform",{enumerable:!0,get:function(){return e0.createDiffTransform}}),Object.defineProperty(et,"createDistance",{enumerable:!0,get:function(){return Dl.createDistance}}),Object.defineProperty(et,"createDivide",{enumerable:!0,get:function(){return Gl.createDivide}}),Object.defineProperty(et,"createDivideScalar",{enumerable:!0,get:function(){return Xs.createDivideScalar}}),Object.defineProperty(et,"createDot",{enumerable:!0,get:function(){return yv.createDot}}),Object.defineProperty(et,"createDotDivide",{enumerable:!0,get:function(){return Hu.createDotDivide}}),Object.defineProperty(et,"createDotMultiply",{enumerable:!0,get:function(){return Cn.createDotMultiply}}),Object.defineProperty(et,"createDotPow",{enumerable:!0,get:function(){return $u.createDotPow}}),Object.defineProperty(et,"createE",{enumerable:!0,get:function(){return vp.createE}}),Object.defineProperty(et,"createEfimovFactor",{enumerable:!0,get:function(){return Fu.createEfimovFactor}}),Object.defineProperty(et,"createEigs",{enumerable:!0,get:function(){return Vo.createEigs}}),Object.defineProperty(et,"createElectricConstant",{enumerable:!0,get:function(){return Fu.createElectricConstant}}),Object.defineProperty(et,"createElectronMass",{enumerable:!0,get:function(){return Fu.createElectronMass}}),Object.defineProperty(et,"createElementaryCharge",{enumerable:!0,get:function(){return Fu.createElementaryCharge}}),Object.defineProperty(et,"createEqual",{enumerable:!0,get:function(){return um.createEqual}}),Object.defineProperty(et,"createEqualScalar",{enumerable:!0,get:function(){return Nt.createEqualScalar}}),Object.defineProperty(et,"createEqualText",{enumerable:!0,get:function(){return Im.createEqualText}}),Object.defineProperty(et,"createErf",{enumerable:!0,get:function(){return uu.createErf}}),Object.defineProperty(et,"createEvaluate",{enumerable:!0,get:function(){return Js.createEvaluate}}),Object.defineProperty(et,"createExp",{enumerable:!0,get:function(){return Wr.createExp}}),Object.defineProperty(et,"createExpm",{enumerable:!0,get:function(){return ll.createExpm}}),Object.defineProperty(et,"createExpm1",{enumerable:!0,get:function(){return Mr.createExpm1}}),Object.defineProperty(et,"createFactorial",{enumerable:!0,get:function(){return Do.createFactorial}}),Object.defineProperty(et,"createFalse",{enumerable:!0,get:function(){return vp.createFalse}}),Object.defineProperty(et,"createFaraday",{enumerable:!0,get:function(){return Fu.createFaraday}}),Object.defineProperty(et,"createFermiCoupling",{enumerable:!0,get:function(){return Fu.createFermiCoupling}}),Object.defineProperty(et,"createFft",{enumerable:!0,get:function(){return Lu.createFft}}),Object.defineProperty(et,"createFibonacciHeapClass",{enumerable:!0,get:function(){return qo.createFibonacciHeapClass}}),Object.defineProperty(et,"createFilter",{enumerable:!0,get:function(){return Rs.createFilter}}),Object.defineProperty(et,"createFilterTransform",{enumerable:!0,get:function(){return av.createFilterTransform}}),Object.defineProperty(et,"createFineStructure",{enumerable:!0,get:function(){return Fu.createFineStructure}}),Object.defineProperty(et,"createFirstRadiation",{enumerable:!0,get:function(){return Fu.createFirstRadiation}}),Object.defineProperty(et,"createFix",{enumerable:!0,get:function(){return Nr.createFix}}),Object.defineProperty(et,"createFlatten",{enumerable:!0,get:function(){return io.createFlatten}}),Object.defineProperty(et,"createFloor",{enumerable:!0,get:function(){return Yr.createFloor}}),Object.defineProperty(et,"createForEach",{enumerable:!0,get:function(){return vo.createForEach}}),Object.defineProperty(et,"createForEachTransform",{enumerable:!0,get:function(){return Gy.createForEachTransform}}),Object.defineProperty(et,"createFormat",{enumerable:!0,get:function(){return vn.createFormat}}),Object.defineProperty(et,"createFraction",{enumerable:!0,get:function(){return jt.createFraction}}),Object.defineProperty(et,"createFractionClass",{enumerable:!0,get:function(){return st.createFractionClass}}),Object.defineProperty(et,"createFunctionAssignmentNode",{enumerable:!0,get:function(){return ir.createFunctionAssignmentNode}}),Object.defineProperty(et,"createFunctionNode",{enumerable:!0,get:function(){return ms.createFunctionNode}}),Object.defineProperty(et,"createGamma",{enumerable:!0,get:function(){return ip.createGamma}}),Object.defineProperty(et,"createGasConstant",{enumerable:!0,get:function(){return Fu.createGasConstant}}),Object.defineProperty(et,"createGcd",{enumerable:!0,get:function(){return Or.createGcd}}),Object.defineProperty(et,"createGetMatrixDataType",{enumerable:!0,get:function(){return Bo.createGetMatrixDataType}}),Object.defineProperty(et,"createGravitationConstant",{enumerable:!0,get:function(){return Fu.createGravitationConstant}}),Object.defineProperty(et,"createGravity",{enumerable:!0,get:function(){return Fu.createGravity}}),Object.defineProperty(et,"createHartreeEnergy",{enumerable:!0,get:function(){return Fu.createHartreeEnergy}}),Object.defineProperty(et,"createHasNumericValue",{enumerable:!0,get:function(){return Ct.createHasNumericValue}}),Object.defineProperty(et,"createHelp",{enumerable:!0,get:function(){return ku.createHelp}}),Object.defineProperty(et,"createHelpClass",{enumerable:!0,get:function(){return Yo.createHelpClass}}),Object.defineProperty(et,"createHex",{enumerable:!0,get:function(){return mn.createHex}}),Object.defineProperty(et,"createHypot",{enumerable:!0,get:function(){return Fp.createHypot}}),Object.defineProperty(et,"createI",{enumerable:!0,get:function(){return vp.createI}}),Object.defineProperty(et,"createIdentity",{enumerable:!0,get:function(){return En.createIdentity}}),Object.defineProperty(et,"createIfft",{enumerable:!0,get:function(){return Ku.createIfft}}),Object.defineProperty(et,"createIm",{enumerable:!0,get:function(){return Un.createIm}}),Object.defineProperty(et,"createImmutableDenseMatrixClass",{enumerable:!0,get:function(){return Vs.createImmutableDenseMatrixClass}}),Object.defineProperty(et,"createIndex",{enumerable:!0,get:function(){return Wp.createIndex}}),Object.defineProperty(et,"createIndexClass",{enumerable:!0,get:function(){return eo.createIndexClass}}),Object.defineProperty(et,"createIndexNode",{enumerable:!0,get:function(){return nr.createIndexNode}}),Object.defineProperty(et,"createIndexTransform",{enumerable:!0,get:function(){return My.createIndexTransform}}),Object.defineProperty(et,"createInfinity",{enumerable:!0,get:function(){return vp.createInfinity}}),Object.defineProperty(et,"createIntersect",{enumerable:!0,get:function(){return dp.createIntersect}}),Object.defineProperty(et,"createInv",{enumerable:!0,get:function(){return nu.createInv}}),Object.defineProperty(et,"createInverseConductanceQuantum",{enumerable:!0,get:function(){return Fu.createInverseConductanceQuantum}}),Object.defineProperty(et,"createInvmod",{enumerable:!0,get:function(){return Ln.createInvmod}}),Object.defineProperty(et,"createIsInteger",{enumerable:!0,get:function(){return bt.createIsInteger}}),Object.defineProperty(et,"createIsNaN",{enumerable:!0,get:function(){return wt.createIsNaN}}),Object.defineProperty(et,"createIsNegative",{enumerable:!0,get:function(){return St.createIsNegative}}),Object.defineProperty(et,"createIsNumeric",{enumerable:!0,get:function(){return Et.createIsNumeric}}),Object.defineProperty(et,"createIsPositive",{enumerable:!0,get:function(){return Rt.createIsPositive}}),Object.defineProperty(et,"createIsPrime",{enumerable:!0,get:function(){return Ns.createIsPrime}}),Object.defineProperty(et,"createIsZero",{enumerable:!0,get:function(){return Tt.createIsZero}}),Object.defineProperty(et,"createKldivergence",{enumerable:!0,get:function(){return fo.createKldivergence}}),Object.defineProperty(et,"createKlitzing",{enumerable:!0,get:function(){return Fu.createKlitzing}}),Object.defineProperty(et,"createKron",{enumerable:!0,get:function(){return In.createKron}}),Object.defineProperty(et,"createLN10",{enumerable:!0,get:function(){return vp.createLN10}}),Object.defineProperty(et,"createLN2",{enumerable:!0,get:function(){return vp.createLN2}}),Object.defineProperty(et,"createLOG10E",{enumerable:!0,get:function(){return vp.createLOG10E}}),Object.defineProperty(et,"createLOG2E",{enumerable:!0,get:function(){return vp.createLOG2E}}),Object.defineProperty(et,"createLarger",{enumerable:!0,get:function(){return mr.createLarger}}),Object.defineProperty(et,"createLargerEq",{enumerable:!0,get:function(){return fr.createLargerEq}}),Object.defineProperty(et,"createLcm",{enumerable:!0,get:function(){return Ar.createLcm}}),Object.defineProperty(et,"createLeafCount",{enumerable:!0,get:function(){return o_.createLeafCount}}),Object.defineProperty(et,"createLeftShift",{enumerable:!0,get:function(){return Wu.createLeftShift}}),Object.defineProperty(et,"createLgamma",{enumerable:!0,get:function(){return Bs.createLgamma}}),Object.defineProperty(et,"createLog",{enumerable:!0,get:function(){return Mo.createLog}}),Object.defineProperty(et,"createLog10",{enumerable:!0,get:function(){return Qr.createLog10}}),Object.defineProperty(et,"createLog1p",{enumerable:!0,get:function(){return Nu.createLog1p}}),Object.defineProperty(et,"createLog2",{enumerable:!0,get:function(){return hn.createLog2}}),Object.defineProperty(et,"createLoschmidt",{enumerable:!0,get:function(){return Fu.createLoschmidt}}),Object.defineProperty(et,"createLsolve",{enumerable:!0,get:function(){return kl.createLsolve}}),Object.defineProperty(et,"createLsolveAll",{enumerable:!0,get:function(){return tl.createLsolveAll}}),Object.defineProperty(et,"createLup",{enumerable:!0,get:function(){return $o.createLup}}),Object.defineProperty(et,"createLusolve",{enumerable:!0,get:function(){return ou.createLusolve}}),Object.defineProperty(et,"createMad",{enumerable:!0,get:function(){return hp.createMad}}),Object.defineProperty(et,"createMagneticConstant",{enumerable:!0,get:function(){return Fu.createMagneticConstant}}),Object.defineProperty(et,"createMagneticFluxQuantum",{enumerable:!0,get:function(){return Fu.createMagneticFluxQuantum}}),Object.defineProperty(et,"createMap",{enumerable:!0,get:function(){return ds.createMap}}),Object.defineProperty(et,"createMapTransform",{enumerable:!0,get:function(){return $0.createMapTransform}}),Object.defineProperty(et,"createMatrix",{enumerable:!0,get:function(){return Ut.createMatrix}}),Object.defineProperty(et,"createMatrixClass",{enumerable:!0,get:function(){return ft.createMatrixClass}}),Object.defineProperty(et,"createMatrixFromColumns",{enumerable:!0,get:function(){return Bt.createMatrixFromColumns}}),Object.defineProperty(et,"createMatrixFromFunction",{enumerable:!0,get:function(){return Ot.createMatrixFromFunction}}),Object.defineProperty(et,"createMatrixFromRows",{enumerable:!0,get:function(){return Wt.createMatrixFromRows}}),Object.defineProperty(et,"createMax",{enumerable:!0,get:function(){return Yn.createMax}}),Object.defineProperty(et,"createMaxTransform",{enumerable:!0,get:function(){return Iy.createMaxTransform}}),Object.defineProperty(et,"createMean",{enumerable:!0,get:function(){return Rl.createMean}}),Object.defineProperty(et,"createMeanTransform",{enumerable:!0,get:function(){return Ym.createMeanTransform}}),Object.defineProperty(et,"createMedian",{enumerable:!0,get:function(){return hl.createMedian}}),Object.defineProperty(et,"createMin",{enumerable:!0,get:function(){return os.createMin}}),Object.defineProperty(et,"createMinTransform",{enumerable:!0,get:function(){return yp.createMinTransform}}),Object.defineProperty(et,"createMod",{enumerable:!0,get:function(){return Sn.createMod}}),Object.defineProperty(et,"createMode",{enumerable:!0,get:function(){return en.createMode}}),Object.defineProperty(et,"createMolarMass",{enumerable:!0,get:function(){return Fu.createMolarMass}}),Object.defineProperty(et,"createMolarMassC12",{enumerable:!0,get:function(){return Fu.createMolarMassC12}}),Object.defineProperty(et,"createMolarPlanckConstant",{enumerable:!0,get:function(){return Fu.createMolarPlanckConstant}}),Object.defineProperty(et,"createMolarVolume",{enumerable:!0,get:function(){return Fu.createMolarVolume}}),Object.defineProperty(et,"createMultinomial",{enumerable:!0,get:function(){return bu.createMultinomial}}),Object.defineProperty(et,"createMultiply",{enumerable:!0,get:function(){return Hn.createMultiply}}),Object.defineProperty(et,"createMultiplyScalar",{enumerable:!0,get:function(){return Kr.createMultiplyScalar}}),Object.defineProperty(et,"createNaN",{enumerable:!0,get:function(){return vp.createNaN}}),Object.defineProperty(et,"createNeutronMass",{enumerable:!0,get:function(){return Fu.createNeutronMass}}),Object.defineProperty(et,"createNode",{enumerable:!0,get:function(){return Zp.createNode}}),Object.defineProperty(et,"createNorm",{enumerable:!0,get:function(){return Tm.createNorm}}),Object.defineProperty(et,"createNot",{enumerable:!0,get:function(){return pn.createNot}}),Object.defineProperty(et,"createNthRoot",{enumerable:!0,get:function(){return ln.createNthRoot}}),Object.defineProperty(et,"createNthRoots",{enumerable:!0,get:function(){return Ou.createNthRoots}}),Object.defineProperty(et,"createNuclearMagneton",{enumerable:!0,get:function(){return Fu.createNuclearMagneton}}),Object.defineProperty(et,"createNull",{enumerable:!0,get:function(){return vp.createNull}}),Object.defineProperty(et,"createNumber",{enumerable:!0,get:function(){return It.createNumber}}),Object.defineProperty(et,"createNumeric",{enumerable:!0,get:function(){return vs.createNumeric}}),Object.defineProperty(et,"createObjectNode",{enumerable:!0,get:function(){return dr.createObjectNode}}),Object.defineProperty(et,"createOct",{enumerable:!0,get:function(){return gn.createOct}}),Object.defineProperty(et,"createOnes",{enumerable:!0,get:function(){return yo.createOnes}}),Object.defineProperty(et,"createOperatorNode",{enumerable:!0,get:function(){return Pr.createOperatorNode}}),Object.defineProperty(et,"createOr",{enumerable:!0,get:function(){return Dn.createOr}}),Object.defineProperty(et,"createParenthesisNode",{enumerable:!0,get:function(){return Hr.createParenthesisNode}}),Object.defineProperty(et,"createParse",{enumerable:!0,get:function(){return Es.createParse}}),Object.defineProperty(et,"createParser",{enumerable:!0,get:function(){return So.createParser}}),Object.defineProperty(et,"createParserClass",{enumerable:!0,get:function(){return po.createParserClass}}),Object.defineProperty(et,"createPartitionSelect",{enumerable:!0,get:function(){return un.createPartitionSelect}}),Object.defineProperty(et,"createPermutations",{enumerable:!0,get:function(){return Qu.createPermutations}}),Object.defineProperty(et,"createPhi",{enumerable:!0,get:function(){return vp.createPhi}}),Object.defineProperty(et,"createPi",{enumerable:!0,get:function(){return vp.createPi}}),Object.defineProperty(et,"createPickRandom",{enumerable:!0,get:function(){return jl.createPickRandom}}),Object.defineProperty(et,"createPinv",{enumerable:!0,get:function(){return fu.createPinv}}),Object.defineProperty(et,"createPlanckCharge",{enumerable:!0,get:function(){return Fu.createPlanckCharge}}),Object.defineProperty(et,"createPlanckConstant",{enumerable:!0,get:function(){return Fu.createPlanckConstant}}),Object.defineProperty(et,"createPlanckLength",{enumerable:!0,get:function(){return Fu.createPlanckLength}}),Object.defineProperty(et,"createPlanckMass",{enumerable:!0,get:function(){return Fu.createPlanckMass}}),Object.defineProperty(et,"createPlanckTemperature",{enumerable:!0,get:function(){return Fu.createPlanckTemperature}}),Object.defineProperty(et,"createPlanckTime",{enumerable:!0,get:function(){return Fu.createPlanckTime}}),Object.defineProperty(et,"createPow",{enumerable:!0,get:function(){return co.createPow}}),Object.defineProperty(et,"createPrint",{enumerable:!0,get:function(){return ss.createPrint}}),Object.defineProperty(et,"createProd",{enumerable:!0,get:function(){return Jr.createProd}}),Object.defineProperty(et,"createProtonMass",{enumerable:!0,get:function(){return Fu.createProtonMass}}),Object.defineProperty(et,"createQr",{enumerable:!0,get:function(){return Zo.createQr}}),Object.defineProperty(et,"createQuantileSeq",{enumerable:!0,get:function(){return il.createQuantileSeq}}),Object.defineProperty(et,"createQuantumOfCirculation",{enumerable:!0,get:function(){return Fu.createQuantumOfCirculation}}),Object.defineProperty(et,"createRandom",{enumerable:!0,get:function(){return Yp.createRandom}}),Object.defineProperty(et,"createRandomInt",{enumerable:!0,get:function(){return _h.createRandomInt}}),Object.defineProperty(et,"createRange",{enumerable:!0,get:function(){return rn.createRange}}),Object.defineProperty(et,"createRangeClass",{enumerable:!0,get:function(){return dt.createRangeClass}}),Object.defineProperty(et,"createRangeNode",{enumerable:!0,get:function(){return bn.createRangeNode}}),Object.defineProperty(et,"createRangeTransform",{enumerable:!0,get:function(){return pp.createRangeTransform}}),Object.defineProperty(et,"createRationalize",{enumerable:!0,get:function(){return u_.createRationalize}}),Object.defineProperty(et,"createRe",{enumerable:!0,get:function(){return Zn.createRe}}),Object.defineProperty(et,"createReducedPlanckConstant",{enumerable:!0,get:function(){return Fu.createReducedPlanckConstant}}),Object.defineProperty(et,"createRelationalNode",{enumerable:!0,get:function(){return Pn.createRelationalNode}}),Object.defineProperty(et,"createReplacer",{enumerable:!0,get:function(){return Pv.createReplacer}}),Object.defineProperty(et,"createReshape",{enumerable:!0,get:function(){return es.createReshape}}),Object.defineProperty(et,"createResize",{enumerable:!0,get:function(){return Gs.createResize}}),Object.defineProperty(et,"createResolve",{enumerable:!0,get:function(){return Dy.createResolve}}),Object.defineProperty(et,"createResultSet",{enumerable:!0,get:function(){return tt.createResultSet}}),Object.defineProperty(et,"createReviver",{enumerable:!0,get:function(){return cy.createReviver}}),Object.defineProperty(et,"createRightArithShift",{enumerable:!0,get:function(){return tp.createRightArithShift}}),Object.defineProperty(et,"createRightLogShift",{enumerable:!0,get:function(){return Al.createRightLogShift}}),Object.defineProperty(et,"createRotate",{enumerable:!0,get:function(){return Ro.createRotate}}),Object.defineProperty(et,"createRotationMatrix",{enumerable:!0,get:function(){return ru.createRotationMatrix}}),Object.defineProperty(et,"createRound",{enumerable:!0,get:function(){return ls.createRound}}),Object.defineProperty(et,"createRow",{enumerable:!0,get:function(){return du.createRow}}),Object.defineProperty(et,"createRowTransform",{enumerable:!0,get:function(){return xv.createRowTransform}}),Object.defineProperty(et,"createRydberg",{enumerable:!0,get:function(){return Fu.createRydberg}}),Object.defineProperty(et,"createSQRT1_2",{enumerable:!0,get:function(){return vp.createSQRT1_2}}),Object.defineProperty(et,"createSQRT2",{enumerable:!0,get:function(){return vp.createSQRT2}}),Object.defineProperty(et,"createSackurTetrode",{enumerable:!0,get:function(){return Fu.createSackurTetrode}}),Object.defineProperty(et,"createSec",{enumerable:!0,get:function(){return Lp.createSec}}),Object.defineProperty(et,"createSech",{enumerable:!0,get:function(){return cp.createSech}}),Object.defineProperty(et,"createSecondRadiation",{enumerable:!0,get:function(){return Fu.createSecondRadiation}}),Object.defineProperty(et,"createSetCartesian",{enumerable:!0,get:function(){return Wm.createSetCartesian}}),Object.defineProperty(et,"createSetDifference",{enumerable:!0,get:function(){return uy.createSetDifference}}),Object.defineProperty(et,"createSetDistinct",{enumerable:!0,get:function(){return Sm.createSetDistinct}}),Object.defineProperty(et,"createSetIntersect",{enumerable:!0,get:function(){return wm.createSetIntersect}}),Object.defineProperty(et,"createSetIsSubset",{enumerable:!0,get:function(){return tm.createSetIsSubset}}),Object.defineProperty(et,"createSetMultiplicity",{enumerable:!0,get:function(){return iv.createSetMultiplicity}}),Object.defineProperty(et,"createSetPowerset",{enumerable:!0,get:function(){return _d.createSetPowerset}}),Object.defineProperty(et,"createSetSize",{enumerable:!0,get:function(){return Xm.createSetSize}}),Object.defineProperty(et,"createSetSymDifference",{enumerable:!0,get:function(){return Cl.createSetSymDifference}}),Object.defineProperty(et,"createSetUnion",{enumerable:!0,get:function(){return Cy.createSetUnion}}),Object.defineProperty(et,"createSign",{enumerable:!0,get:function(){return kn.createSign}}),Object.defineProperty(et,"createSimplify",{enumerable:!0,get:function(){return Gv.createSimplify}}),Object.defineProperty(et,"createSimplifyCore",{enumerable:!0,get:function(){return ly.createSimplifyCore}}),Object.defineProperty(et,"createSin",{enumerable:!0,get:function(){return nv.createSin}}),Object.defineProperty(et,"createSinh",{enumerable:!0,get:function(){return Hm.createSinh}}),Object.defineProperty(et,"createSize",{enumerable:!0,get:function(){return Iu.createSize}}),Object.defineProperty(et,"createSlu",{enumerable:!0,get:function(){return au.createSlu}}),Object.defineProperty(et,"createSmaller",{enumerable:!0,get:function(){return Il.createSmaller}}),Object.defineProperty(et,"createSmallerEq",{enumerable:!0,get:function(){return sn.createSmallerEq}}),Object.defineProperty(et,"createSort",{enumerable:!0,get:function(){return $n.createSort}}),Object.defineProperty(et,"createSpaClass",{enumerable:!0,get:function(){return Po.createSpaClass}}),Object.defineProperty(et,"createSparse",{enumerable:!0,get:function(){return zu.createSparse}}),Object.defineProperty(et,"createSparseMatrixClass",{enumerable:!0,get:function(){return Pt.createSparseMatrixClass}}),Object.defineProperty(et,"createSpeedOfLight",{enumerable:!0,get:function(){return Fu.createSpeedOfLight}}),Object.defineProperty(et,"createSplitUnit",{enumerable:!0,get:function(){return tr.createSplitUnit}}),Object.defineProperty(et,"createSqrt",{enumerable:!0,get:function(){return xn.createSqrt}}),Object.defineProperty(et,"createSqrtm",{enumerable:!0,get:function(){return zl.createSqrtm}}),Object.defineProperty(et,"createSquare",{enumerable:!0,get:function(){return An.createSquare}}),Object.defineProperty(et,"createSqueeze",{enumerable:!0,get:function(){return Sl.createSqueeze}}),Object.defineProperty(et,"createStd",{enumerable:!0,get:function(){return Jp.createStd}}),Object.defineProperty(et,"createStdTransform",{enumerable:!0,get:function(){return Vv.createStdTransform}}),Object.defineProperty(et,"createStefanBoltzmann",{enumerable:!0,get:function(){return Fu.createStefanBoltzmann}}),Object.defineProperty(et,"createStirlingS2",{enumerable:!0,get:function(){return Pm.createStirlingS2}}),Object.defineProperty(et,"createString",{enumerable:!0,get:function(){return Ft.createString}}),Object.defineProperty(et,"createSubset",{enumerable:!0,get:function(){return Ko.createSubset}}),Object.defineProperty(et,"createSubsetTransform",{enumerable:!0,get:function(){return Yl.createSubsetTransform}}),Object.defineProperty(et,"createSubtract",{enumerable:!0,get:function(){return rs.createSubtract}}),Object.defineProperty(et,"createSum",{enumerable:!0,get:function(){return Bp.createSum}}),Object.defineProperty(et,"createSumTransform",{enumerable:!0,get:function(){return dy.createSumTransform}}),Object.defineProperty(et,"createSymbolNode",{enumerable:!0,get:function(){return Wn.createSymbolNode}}),Object.defineProperty(et,"createSymbolicEqual",{enumerable:!0,get:function(){return Zu.createSymbolicEqual}}),Object.defineProperty(et,"createTan",{enumerable:!0,get:function(){return Rv.createTan}}),Object.defineProperty(et,"createTanh",{enumerable:!0,get:function(){return mm.createTanh}}),Object.defineProperty(et,"createTau",{enumerable:!0,get:function(){return vp.createTau}}),Object.defineProperty(et,"createThomsonCrossSection",{enumerable:!0,get:function(){return Fu.createThomsonCrossSection}}),Object.defineProperty(et,"createTo",{enumerable:!0,get:function(){return ga.createTo}}),Object.defineProperty(et,"createTrace",{enumerable:!0,get:function(){return _l.createTrace}}),Object.defineProperty(et,"createTranspose",{enumerable:!0,get:function(){return Fl.createTranspose}}),Object.defineProperty(et,"createTrue",{enumerable:!0,get:function(){return vp.createTrue}}),Object.defineProperty(et,"createTypeOf",{enumerable:!0,get:function(){return At.createTypeOf}}),Object.defineProperty(et,"createTyped",{enumerable:!0,get:function(){return _e.createTyped}}),Object.defineProperty(et,"createUnaryMinus",{enumerable:!0,get:function(){return Jt.createUnaryMinus}}),Object.defineProperty(et,"createUnaryPlus",{enumerable:!0,get:function(){return ar.createUnaryPlus}}),Object.defineProperty(et,"createUnequal",{enumerable:!0,get:function(){return jr.createUnequal}}),Object.defineProperty(et,"createUnitClass",{enumerable:!0,get:function(){return su.createUnitClass}}),Object.defineProperty(et,"createUnitFunction",{enumerable:!0,get:function(){return mu.createUnitFunction}}),Object.defineProperty(et,"createUppercaseE",{enumerable:!0,get:function(){return vp.createUppercaseE}}),Object.defineProperty(et,"createUppercasePi",{enumerable:!0,get:function(){return vp.createUppercasePi}}),Object.defineProperty(et,"createUsolve",{enumerable:!0,get:function(){return Uu.createUsolve}}),Object.defineProperty(et,"createUsolveAll",{enumerable:!0,get:function(){return rl.createUsolveAll}}),Object.defineProperty(et,"createVacuumImpedance",{enumerable:!0,get:function(){return Fu.createVacuumImpedance}}),Object.defineProperty(et,"createVariance",{enumerable:!0,get:function(){return Cp.createVariance}}),Object.defineProperty(et,"createVarianceTransform",{enumerable:!0,get:function(){return Jv.createVarianceTransform}}),Object.defineProperty(et,"createVersion",{enumerable:!0,get:function(){return vp.createVersion}}),Object.defineProperty(et,"createWeakMixingAngle",{enumerable:!0,get:function(){return Fu.createWeakMixingAngle}}),Object.defineProperty(et,"createWienDisplacement",{enumerable:!0,get:function(){return Fu.createWienDisplacement}}),Object.defineProperty(et,"createXgcd",{enumerable:!0,get:function(){return qs.createXgcd}}),Object.defineProperty(et,"createXor",{enumerable:!0,get:function(){return qn.createXor}}),Object.defineProperty(et,"createZeros",{enumerable:!0,get:function(){return Gu.createZeros}});var _e=requireTyped$1(),tt=requireResultSet(),rt=requireBigNumber(),nt=requireComplex$3(),st=requireFraction$2(),dt=requireRange$2(),ft=requireMatrix$2(),ht=requireDenseMatrix(),mt=requireClone$1(),bt=requireIsInteger$1(),St=requireIsNegative$1(),Et=requireIsNumeric$1(),Ct=requireHasNumericValue$1(),Rt=requireIsPositive$1(),Tt=requireIsZero$1(),wt=require_isNaN$1(),At=requireTypeOf$1(),Nt=requireEqualScalar(),Pt=requireSparseMatrix(),It=requireNumber$1(),Ft=requireString$1(),qt=requireBoolean$1(),Vt=requireBignumber$1(),Kt=requireComplex$1(),jt=requireFraction$1(),Ut=requireMatrix$1(),Ot=requireMatrixFromFunction$1(),Wt=requireMatrixFromRows$1(),Bt=requireMatrixFromColumns$1(),tr=requireSplitUnit$1(),Jt=requireUnaryMinus$1(),ar=requireUnaryPlus$1(),pr=requireAbs$1(),cr=requireApply(),gr=requireAddScalar(),Sr=requireCbrt$1(),Er=requireCeil$1(),Vr=requireCube$1(),Wr=requireExp$1(),Mr=requireExpm1$1(),Nr=requireFix$1(),Yr=requireFloor$1(),Or=requireGcd$1(),Ar=requireLcm$1(),Qr=requireLog10$1(),hn=requireLog2$1(),Sn=requireMod$1(),Kr=requireMultiplyScalar(),Hn=requireMultiply$1(),ln=requireNthRoot$1(),kn=requireSign$1(),xn=requireSqrt$1(),An=requireSquare$1(),rs=requireSubtract$1(),qs=requireXgcd$1(),Ln=requireInvmod$1(),Cn=requireDotMultiply$1(),Nn=requireBitAnd$1(),Gr=requireBitNot$1(),tn=requireBitOr$1(),dn=requireBitXor$1(),Rn=requireArg$1(),wn=requireConj$1(),Un=requireIm$1(),Zn=requireRe$1(),pn=requireNot$1(),Dn=requireOr$1(),qn=requireXor$1(),_a=requireConcat$1(),Vn=requireColumn$1(),bs=requireCount$1(),Is=requireCross$1(),uo=requireDiag$1(),Rs=requireFilter$1(),io=requireFlatten$1(),vo=requireForEach$1(),Bo=requireGetMatrixDataType$1(),En=requireIdentity$1(),In=requireKron$1(),ds=requireMap$1(),Ps=requireDiff$1(),yo=requireOnes$1(),rn=requireRange$1(),es=requireReshape$1(),Gs=requireResize$1(),Ro=requireRotate$1(),ru=requireRotationMatrix$1(),du=requireRow$1(),Iu=requireSize$1(),Sl=requireSqueeze$1(),Ko=requireSubset$1(),Fl=requireTranspose$1(),gl=requireCtranspose$1(),Gu=requireZeros$1(),Lu=requireFft$1(),Ku=requireIfft$1(),uu=requireErf$1(),en=requireMode$1(),Jr=requireProd$1(),vn=requireFormat$1(),fn=requireBin$1(),gn=requireOct$1(),mn=requireHex$1(),ss=requirePrint$1(),ga=requireTo$1(),Ns=requireIsPrime$1(),vs=requireNumeric$1(),Xs=requireDivideScalar(),co=requirePow$1(),ls=requireRound$1(),Mo=requireLog$1(),Nu=requireLog1p$1(),Ou=requireNthRoots$1(),$u=requireDotPow$1(),Hu=requireDotDivide$1(),kl=requireLsolve$1(),Uu=requireUsolve$1(),tl=requireLsolveAll$1(),rl=requireUsolveAll$1(),Wu=requireLeftShift$1(),tp=requireRightArithShift$1(),Al=requireRightLogShift$1(),om=requireAnd$1(),Op=requireCompare$1(),op=requireCompareNatural$1(),wl=requireCompareText$1(),um=requireEqual$1(),Im=requireEqualText$1(),Il=requireSmaller$1(),sn=requireSmallerEq$1(),mr=requireLarger$1(),fr=requireLargerEq$1(),yr=requireDeepEqual$1(),jr=requireUnequal$1(),un=requirePartitionSelect$1(),$n=requireSort$1(),Yn=requireMax$1(),os=requireMin$1(),Vs=requireImmutableDenseMatrix(),eo=requireMatrixIndex(),qo=requireFibonacciHeap(),Po=requireSpa(),su=requireUnit$2(),mu=requireUnit$1(),zu=requireSparse$1(),lu=requireCreateUnit$1(),vl=requireAcos$1(),up=requireAcosh$1(),_c=requireAcot$1(),Bl=requireAcoth$1(),rp=requireAcsc$1(),Kp=requireAcsch$1(),lp=requireAsec$1(),qp=requireAsech$1(),lm=requireAsin$1(),dl=requireAsinh$1(),el=requireAtan$1(),gv=requireAtan2$1(),Vm=requireAtanh$1(),nl=requireCos$1(),Xo=requireCosh$1(),xm=requireCot$1(),nm=requireCoth$1(),vv=requireCsc$1(),rv=requireCsch$1(),Lp=requireSec$1(),cp=requireSech$1(),nv=requireSin$1(),Hm=requireSinh$1(),Rv=requireTan$1(),mm=requireTanh$1(),Wm=requireSetCartesian$1(),uy=requireSetDifference$1(),Sm=requireSetDistinct$1(),wm=requireSetIntersect$1(),tm=requireSetIsSubset$1(),iv=requireSetMultiplicity$1(),_d=requireSetPowerset$1(),Xm=requireSetSize$1(),Cl=requireSetSymDifference$1(),Cy=requireSetUnion$1(),zv=requireAdd$1(),Fp=requireHypot$1(),Tm=requireNorm$1(),yv=requireDot$1(),_l=requireTrace$1(),Wp=require_function(),Zp=requireNode(),Xp=requireAccessorNode(),np=requireArrayNode(),Rm=requireAssignmentNode(),_0=requireBlockNode(),bv=requireConditionalNode(),Cr=requireConstantNode(),ir=requireFunctionAssignmentNode(),nr=requireIndexNode(),dr=requireObjectNode(),Pr=requireOperatorNode(),Hr=requireParenthesisNode(),bn=requireRangeNode(),Pn=requireRelationalNode(),Wn=requireSymbolNode(),ms=requireFunctionNode(),Es=requireParse(),ao=requireCompile(),Js=requireEvaluate$1(),po=requireParser$1(),So=requireParser(),$o=requireLup$1(),Zo=requireQr$1(),au=requireSlu$1(),ou=requireLusolve$1(),Yo=requireHelp$2(),Ru=requireChain$1(),ku=requireHelp(),Vu=requireChain(),sl=requireDet(),nu=requireInv(),fu=requirePinv(),Vo=requireEigs(),ll=requireExpm(),zl=requireSqrtm(),Gl=requireDivide(),Dl=requireDistance(),dp=requireIntersect(),Bp=requireSum(),cm=requireCumsum(),Rl=requireMean(),hl=requireMedian(),hp=requireMad(),Cp=requireVariance(),il=requireQuantileSeq(),Jp=requireStd(),fp=requireCombinations(),Jy=requireCombinationsWithRep(),ip=requireGamma(),Bs=requireLgamma(),Do=requireFactorial(),fo=requireKldivergence(),bu=requireMultinomial(),Qu=requirePermutations(),jl=requirePickRandom(),Yp=requireRandom(),_h=requireRandomInt(),Pm=requireStirlingS2(),Lm=requireBellNumbers(),_v=requireCatalan(),gp=requireComposition(),o_=requireLeafCount(),Gv=requireSimplify(),ly=requireSimplifyCore(),Dy=requireResolve(),Zu=requireSymbolicEqual(),N_=requireDerivative(),u_=requireRationalize(),cy=requireReviver(),Pv=requireReplacer(),vp=requireConstants(),Fu=requirePhysicalConstants(),Zv=requireApply_transform(),Nv=requireColumn_transform(),av=requireFilter_transform(),Gy=requireForEach_transform(),My=requireIndex_transform(),$0=requireMap_transform(),Iy=requireMax_transform(),Ym=requireMean_transform(),yp=requireMin_transform(),pp=requireRange_transform(),xv=requireRow_transform(),Yl=requireSubset_transform(),l_=requireConcat_transform(),e0=requireDiff_transform(),Vv=requireStd_transform(),dy=requireSum_transform(),hy=requireCumsum_transform(),Jv=requireVariance_transform()})(factoriesAny)),factoriesAny}var hasRequiredPureFunctionsAny_generated;function requirePureFunctionsAny_generated(){if(hasRequiredPureFunctionsAny_generated)return pureFunctionsAny_generated;hasRequiredPureFunctionsAny_generated=1,Object.defineProperty(pureFunctionsAny_generated,"__esModule",{value:!0}),pureFunctionsAny_generated.eigs=pureFunctionsAny_generated.efimovFactor=pureFunctionsAny_generated.e=pureFunctionsAny_generated.dotPow=pureFunctionsAny_generated.dotMultiply=pureFunctionsAny_generated.dotDivide=pureFunctionsAny_generated.dot=pureFunctionsAny_generated.divideScalar=pureFunctionsAny_generated.divide=pureFunctionsAny_generated.distance=pureFunctionsAny_generated.diff=pureFunctionsAny_generated.diag=pureFunctionsAny_generated.deuteronMass=pureFunctionsAny_generated.det=pureFunctionsAny_generated.deepEqual=pureFunctionsAny_generated.cumsum=pureFunctionsAny_generated.cube=pureFunctionsAny_generated.ctranspose=pureFunctionsAny_generated.csch=pureFunctionsAny_generated.csc=pureFunctionsAny_generated.cross=pureFunctionsAny_generated.createUnit=pureFunctionsAny_generated.count=pureFunctionsAny_generated.coulomb=pureFunctionsAny_generated.coth=pureFunctionsAny_generated.cot=pureFunctionsAny_generated.cosh=pureFunctionsAny_generated.cos=pureFunctionsAny_generated.conj=pureFunctionsAny_generated.conductanceQuantum=pureFunctionsAny_generated.concat=pureFunctionsAny_generated.composition=pureFunctionsAny_generated.complex=pureFunctionsAny_generated.compareText=pureFunctionsAny_generated.compareNatural=pureFunctionsAny_generated.compare=pureFunctionsAny_generated.combinationsWithRep=pureFunctionsAny_generated.combinations=pureFunctionsAny_generated.column=pureFunctionsAny_generated.clone=pureFunctionsAny_generated.classicalElectronRadius=pureFunctionsAny_generated.ceil=pureFunctionsAny_generated.cbrt=pureFunctionsAny_generated.catalan=pureFunctionsAny_generated.boolean=pureFunctionsAny_generated.boltzmann=pureFunctionsAny_generated.bohrRadius=pureFunctionsAny_generated.bohrMagneton=pureFunctionsAny_generated.bitXor=pureFunctionsAny_generated.bitOr=pureFunctionsAny_generated.bitNot=pureFunctionsAny_generated.bitAnd=pureFunctionsAny_generated.bin=pureFunctionsAny_generated.bignumber=pureFunctionsAny_generated.bellNumbers=pureFunctionsAny_generated.avogadro=pureFunctionsAny_generated.atomicMass=pureFunctionsAny_generated.atanh=pureFunctionsAny_generated.atan2=pureFunctionsAny_generated.atan=pureFunctionsAny_generated.asinh=pureFunctionsAny_generated.asin=pureFunctionsAny_generated.asech=pureFunctionsAny_generated.asec=pureFunctionsAny_generated.arg=pureFunctionsAny_generated.apply=pureFunctionsAny_generated.and=pureFunctionsAny_generated.addScalar=pureFunctionsAny_generated.add=pureFunctionsAny_generated.acsch=pureFunctionsAny_generated.acsc=pureFunctionsAny_generated.acoth=pureFunctionsAny_generated.acot=pureFunctionsAny_generated.acosh=pureFunctionsAny_generated.acos=pureFunctionsAny_generated.abs=pureFunctionsAny_generated._true=pureFunctionsAny_generated._null=pureFunctionsAny_generated._false=pureFunctionsAny_generated._NaN=pureFunctionsAny_generated._Infinity=pureFunctionsAny_generated.Unit=pureFunctionsAny_generated.SparseMatrix=pureFunctionsAny_generated.Spa=pureFunctionsAny_generated.SQRT2=pureFunctionsAny_generated.SQRT1_2=pureFunctionsAny_generated.ResultSet=pureFunctionsAny_generated.Range=pureFunctionsAny_generated.Matrix=pureFunctionsAny_generated.LOG2E=pureFunctionsAny_generated.LOG10E=pureFunctionsAny_generated.LN2=pureFunctionsAny_generated.LN10=pureFunctionsAny_generated.Index=pureFunctionsAny_generated.ImmutableDenseMatrix=pureFunctionsAny_generated.Fraction=pureFunctionsAny_generated.FibonacciHeap=pureFunctionsAny_generated.DenseMatrix=pureFunctionsAny_generated.Complex=pureFunctionsAny_generated.BigNumber=void 0,pureFunctionsAny_generated.permutations=pureFunctionsAny_generated.partitionSelect=pureFunctionsAny_generated.or=pureFunctionsAny_generated.ones=pureFunctionsAny_generated.oct=pureFunctionsAny_generated.numeric=pureFunctionsAny_generated.number=pureFunctionsAny_generated.nuclearMagneton=pureFunctionsAny_generated.nthRoots=pureFunctionsAny_generated.nthRoot=pureFunctionsAny_generated.not=pureFunctionsAny_generated.norm=pureFunctionsAny_generated.neutronMass=pureFunctionsAny_generated.multiplyScalar=pureFunctionsAny_generated.multiply=pureFunctionsAny_generated.multinomial=pureFunctionsAny_generated.molarVolume=pureFunctionsAny_generated.molarPlanckConstant=pureFunctionsAny_generated.molarMassC12=pureFunctionsAny_generated.molarMass=pureFunctionsAny_generated.mode=pureFunctionsAny_generated.mod=pureFunctionsAny_generated.min=pureFunctionsAny_generated.median=pureFunctionsAny_generated.mean=pureFunctionsAny_generated.max=pureFunctionsAny_generated.matrixFromRows=pureFunctionsAny_generated.matrixFromFunction=pureFunctionsAny_generated.matrixFromColumns=pureFunctionsAny_generated.matrix=pureFunctionsAny_generated.map=pureFunctionsAny_generated.magneticFluxQuantum=pureFunctionsAny_generated.magneticConstant=pureFunctionsAny_generated.mad=pureFunctionsAny_generated.lusolve=pureFunctionsAny_generated.lup=pureFunctionsAny_generated.lsolveAll=pureFunctionsAny_generated.lsolve=pureFunctionsAny_generated.loschmidt=pureFunctionsAny_generated.log2=pureFunctionsAny_generated.log1p=pureFunctionsAny_generated.log10=pureFunctionsAny_generated.log=pureFunctionsAny_generated.lgamma=pureFunctionsAny_generated.leftShift=pureFunctionsAny_generated.lcm=pureFunctionsAny_generated.largerEq=pureFunctionsAny_generated.larger=pureFunctionsAny_generated.kron=pureFunctionsAny_generated.klitzing=pureFunctionsAny_generated.kldivergence=pureFunctionsAny_generated.isZero=pureFunctionsAny_generated.isPrime=pureFunctionsAny_generated.isPositive=pureFunctionsAny_generated.isNumeric=pureFunctionsAny_generated.isNegative=pureFunctionsAny_generated.isNaN=pureFunctionsAny_generated.isInteger=pureFunctionsAny_generated.invmod=pureFunctionsAny_generated.inverseConductanceQuantum=pureFunctionsAny_generated.inv=pureFunctionsAny_generated.intersect=pureFunctionsAny_generated.index=pureFunctionsAny_generated.im=pureFunctionsAny_generated.ifft=pureFunctionsAny_generated.identity=pureFunctionsAny_generated.i=pureFunctionsAny_generated.hypot=pureFunctionsAny_generated.hex=pureFunctionsAny_generated.hasNumericValue=pureFunctionsAny_generated.hartreeEnergy=pureFunctionsAny_generated.gravity=pureFunctionsAny_generated.gravitationConstant=pureFunctionsAny_generated.getMatrixDataType=pureFunctionsAny_generated.gcd=pureFunctionsAny_generated.gasConstant=pureFunctionsAny_generated.gamma=pureFunctionsAny_generated.fraction=pureFunctionsAny_generated.format=pureFunctionsAny_generated.forEach=pureFunctionsAny_generated.floor=pureFunctionsAny_generated.flatten=pureFunctionsAny_generated.fix=pureFunctionsAny_generated.firstRadiation=pureFunctionsAny_generated.fineStructure=pureFunctionsAny_generated.filter=pureFunctionsAny_generated.fft=pureFunctionsAny_generated.fermiCoupling=pureFunctionsAny_generated.faraday=pureFunctionsAny_generated.factorial=pureFunctionsAny_generated.expm1=pureFunctionsAny_generated.expm=pureFunctionsAny_generated.exp=pureFunctionsAny_generated.erf=pureFunctionsAny_generated.equalText=pureFunctionsAny_generated.equalScalar=pureFunctionsAny_generated.equal=pureFunctionsAny_generated.elementaryCharge=pureFunctionsAny_generated.electronMass=pureFunctionsAny_generated.electricConstant=void 0,pureFunctionsAny_generated.zeros=pureFunctionsAny_generated.xor=pureFunctionsAny_generated.xgcd=pureFunctionsAny_generated.wienDisplacement=pureFunctionsAny_generated.weakMixingAngle=pureFunctionsAny_generated.version=pureFunctionsAny_generated.variance=pureFunctionsAny_generated.vacuumImpedance=pureFunctionsAny_generated.usolveAll=pureFunctionsAny_generated.usolve=pureFunctionsAny_generated.unit=pureFunctionsAny_generated.unequal=pureFunctionsAny_generated.unaryPlus=pureFunctionsAny_generated.unaryMinus=pureFunctionsAny_generated.typed=pureFunctionsAny_generated.typeOf=pureFunctionsAny_generated.transpose=pureFunctionsAny_generated.trace=pureFunctionsAny_generated.to=pureFunctionsAny_generated.thomsonCrossSection=pureFunctionsAny_generated.tau=pureFunctionsAny_generated.tanh=pureFunctionsAny_generated.tan=pureFunctionsAny_generated.sum=pureFunctionsAny_generated.subtract=pureFunctionsAny_generated.subset=pureFunctionsAny_generated.string=pureFunctionsAny_generated.stirlingS2=pureFunctionsAny_generated.stefanBoltzmann=pureFunctionsAny_generated.std=pureFunctionsAny_generated.squeeze=pureFunctionsAny_generated.square=pureFunctionsAny_generated.sqrtm=pureFunctionsAny_generated.sqrt=pureFunctionsAny_generated.splitUnit=pureFunctionsAny_generated.speedOfLight=pureFunctionsAny_generated.sparse=pureFunctionsAny_generated.sort=pureFunctionsAny_generated.smallerEq=pureFunctionsAny_generated.smaller=pureFunctionsAny_generated.slu=pureFunctionsAny_generated.size=pureFunctionsAny_generated.sinh=pureFunctionsAny_generated.sin=pureFunctionsAny_generated.sign=pureFunctionsAny_generated.setUnion=pureFunctionsAny_generated.setSymDifference=pureFunctionsAny_generated.setSize=pureFunctionsAny_generated.setPowerset=pureFunctionsAny_generated.setMultiplicity=pureFunctionsAny_generated.setIsSubset=pureFunctionsAny_generated.setIntersect=pureFunctionsAny_generated.setDistinct=pureFunctionsAny_generated.setDifference=pureFunctionsAny_generated.setCartesian=pureFunctionsAny_generated.secondRadiation=pureFunctionsAny_generated.sech=pureFunctionsAny_generated.sec=pureFunctionsAny_generated.sackurTetrode=pureFunctionsAny_generated.rydberg=pureFunctionsAny_generated.row=pureFunctionsAny_generated.round=pureFunctionsAny_generated.rotationMatrix=pureFunctionsAny_generated.rotate=pureFunctionsAny_generated.rightLogShift=pureFunctionsAny_generated.rightArithShift=pureFunctionsAny_generated.resize=pureFunctionsAny_generated.reshape=pureFunctionsAny_generated.replacer=pureFunctionsAny_generated.reducedPlanckConstant=pureFunctionsAny_generated.re=pureFunctionsAny_generated.range=pureFunctionsAny_generated.randomInt=pureFunctionsAny_generated.random=pureFunctionsAny_generated.quantumOfCirculation=pureFunctionsAny_generated.quantileSeq=pureFunctionsAny_generated.qr=pureFunctionsAny_generated.protonMass=pureFunctionsAny_generated.prod=pureFunctionsAny_generated.print=pureFunctionsAny_generated.pow=pureFunctionsAny_generated.planckTime=pureFunctionsAny_generated.planckTemperature=pureFunctionsAny_generated.planckMass=pureFunctionsAny_generated.planckLength=pureFunctionsAny_generated.planckConstant=pureFunctionsAny_generated.planckCharge=pureFunctionsAny_generated.pinv=pureFunctionsAny_generated.pickRandom=pureFunctionsAny_generated.pi=pureFunctionsAny_generated.phi=void 0;var et=requireConfigReadonly(),_e=requireFactoriesAny(),tt=(0,_e.createBigNumberClass)({config:et.config});pureFunctionsAny_generated.BigNumber=tt;var rt=(0,_e.createComplexClass)({});pureFunctionsAny_generated.Complex=rt;var nt=(0,_e.createE)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.e=nt;var st=(0,_e.createFalse)({});pureFunctionsAny_generated._false=st;var dt=(0,_e.createFineStructure)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.fineStructure=dt;var ft=(0,_e.createFractionClass)({});pureFunctionsAny_generated.Fraction=ft;var ht=(0,_e.createI)({Complex:rt});pureFunctionsAny_generated.i=ht;var mt=(0,_e.createInfinity)({BigNumber:tt,config:et.config});pureFunctionsAny_generated._Infinity=mt;var bt=(0,_e.createLN10)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.LN10=bt;var St=(0,_e.createLOG10E)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.LOG10E=St;var Et=(0,_e.createMatrixClass)({});pureFunctionsAny_generated.Matrix=Et;var Ct=(0,_e.createNaN)({BigNumber:tt,config:et.config});pureFunctionsAny_generated._NaN=Ct;var Rt=(0,_e.createNull)({});pureFunctionsAny_generated._null=Rt;var Tt=(0,_e.createPhi)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.phi=Tt;var wt=(0,_e.createRangeClass)({});pureFunctionsAny_generated.Range=wt;var At=(0,_e.createResultSet)({});pureFunctionsAny_generated.ResultSet=At;var Nt=(0,_e.createSQRT1_2)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.SQRT1_2=Nt;var Pt=(0,_e.createSackurTetrode)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.sackurTetrode=Pt;var It=(0,_e.createTau)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.tau=It;var Ft=(0,_e.createTrue)({});pureFunctionsAny_generated._true=Ft;var qt=(0,_e.createVersion)({});pureFunctionsAny_generated.version=qt;var Vt=(0,_e.createDenseMatrixClass)({Matrix:Et});pureFunctionsAny_generated.DenseMatrix=Vt;var Kt=(0,_e.createEfimovFactor)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.efimovFactor=Kt;var jt=(0,_e.createLN2)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.LN2=jt;var Ut=(0,_e.createPi)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.pi=Ut;var Ot=(0,_e.createReplacer)({});pureFunctionsAny_generated.replacer=Ot;var Wt=(0,_e.createSQRT2)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.SQRT2=Wt;var Bt=(0,_e.createTyped)({BigNumber:tt,Complex:rt,DenseMatrix:Vt,Fraction:ft});pureFunctionsAny_generated.typed=Bt;var tr=(0,_e.createUnaryPlus)({BigNumber:tt,config:et.config,typed:Bt});pureFunctionsAny_generated.unaryPlus=tr;var Jt=(0,_e.createWeakMixingAngle)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.weakMixingAngle=Jt;var ar=(0,_e.createAbs)({typed:Bt});pureFunctionsAny_generated.abs=ar;var pr=(0,_e.createAcos)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.acos=pr;var cr=(0,_e.createAcot)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.acot=cr;var gr=(0,_e.createAcsc)({BigNumber:tt,Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.acsc=gr;var Sr=(0,_e.createAddScalar)({typed:Bt});pureFunctionsAny_generated.addScalar=Sr;var Er=(0,_e.createArg)({typed:Bt});pureFunctionsAny_generated.arg=Er;var Vr=(0,_e.createAsech)({BigNumber:tt,Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.asech=Vr;var Wr=(0,_e.createAsinh)({typed:Bt});pureFunctionsAny_generated.asinh=Wr;var Mr=(0,_e.createAtan)({typed:Bt});pureFunctionsAny_generated.atan=Mr;var Nr=(0,_e.createAtanh)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.atanh=Nr;var Yr=(0,_e.createBignumber)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.bignumber=Yr;var Or=(0,_e.createBitNot)({typed:Bt});pureFunctionsAny_generated.bitNot=Or;var Ar=(0,_e.createBoolean)({typed:Bt});pureFunctionsAny_generated.boolean=Ar;var Qr=(0,_e.createClone)({typed:Bt});pureFunctionsAny_generated.clone=Qr;var hn=(0,_e.createCombinations)({typed:Bt});pureFunctionsAny_generated.combinations=hn;var Sn=(0,_e.createComplex)({Complex:rt,typed:Bt});pureFunctionsAny_generated.complex=Sn;var Kr=(0,_e.createConj)({typed:Bt});pureFunctionsAny_generated.conj=Kr;var Hn=(0,_e.createCosh)({typed:Bt});pureFunctionsAny_generated.cosh=Hn;var ln=(0,_e.createCoth)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.coth=ln;var kn=(0,_e.createCsc)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.csc=kn;var xn=(0,_e.createCube)({typed:Bt});pureFunctionsAny_generated.cube=xn;var An=(0,_e.createEqualScalar)({config:et.config,typed:Bt});pureFunctionsAny_generated.equalScalar=An;var rs=(0,_e.createErf)({typed:Bt});pureFunctionsAny_generated.erf=rs;var qs=(0,_e.createExp)({typed:Bt});pureFunctionsAny_generated.exp=qs;var Ln=(0,_e.createExpm1)({Complex:rt,typed:Bt});pureFunctionsAny_generated.expm1=Ln;var Cn=(0,_e.createFilter)({typed:Bt});pureFunctionsAny_generated.filter=Cn;var Nn=(0,_e.createForEach)({typed:Bt});pureFunctionsAny_generated.forEach=Nn;var Gr=(0,_e.createFormat)({typed:Bt});pureFunctionsAny_generated.format=Gr;var tn=(0,_e.createGetMatrixDataType)({typed:Bt});pureFunctionsAny_generated.getMatrixDataType=tn;var dn=(0,_e.createHex)({format:Gr,typed:Bt});pureFunctionsAny_generated.hex=dn;var Rn=(0,_e.createIm)({typed:Bt});pureFunctionsAny_generated.im=Rn;var wn=(0,_e.createIsInteger)({typed:Bt});pureFunctionsAny_generated.isInteger=wn;var Un=(0,_e.createIsNegative)({typed:Bt});pureFunctionsAny_generated.isNegative=Un;var Zn=(0,_e.createIsPositive)({typed:Bt});pureFunctionsAny_generated.isPositive=Zn;var pn=(0,_e.createIsZero)({typed:Bt});pureFunctionsAny_generated.isZero=pn;var Dn=(0,_e.createLOG2E)({BigNumber:tt,config:et.config});pureFunctionsAny_generated.LOG2E=Dn;var qn=(0,_e.createLgamma)({Complex:rt,typed:Bt});pureFunctionsAny_generated.lgamma=qn;var _a=(0,_e.createLog10)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.log10=_a;var Vn=(0,_e.createLog2)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.log2=Vn;var bs=(0,_e.createMap)({typed:Bt});pureFunctionsAny_generated.map=bs;var Is=(0,_e.createMultiplyScalar)({typed:Bt});pureFunctionsAny_generated.multiplyScalar=Is;var uo=(0,_e.createNot)({typed:Bt});pureFunctionsAny_generated.not=uo;var Rs=(0,_e.createNumber)({typed:Bt});pureFunctionsAny_generated.number=Rs;var io=(0,_e.createOct)({format:Gr,typed:Bt});pureFunctionsAny_generated.oct=io;var vo=(0,_e.createPickRandom)({config:et.config,typed:Bt});pureFunctionsAny_generated.pickRandom=vo;var Bo=(0,_e.createPrint)({typed:Bt});pureFunctionsAny_generated.print=Bo;var En=(0,_e.createRandom)({config:et.config,typed:Bt});pureFunctionsAny_generated.random=En;var In=(0,_e.createRe)({typed:Bt});pureFunctionsAny_generated.re=In;var ds=(0,_e.createSec)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.sec=ds;var Ps=(0,_e.createSign)({BigNumber:tt,Fraction:ft,complex:Sn,typed:Bt});pureFunctionsAny_generated.sign=Ps;var yo=(0,_e.createSin)({typed:Bt});pureFunctionsAny_generated.sin=yo;var rn=(0,_e.createSparseMatrixClass)({Matrix:Et,equalScalar:An,typed:Bt});pureFunctionsAny_generated.SparseMatrix=rn;var es=(0,_e.createSplitUnit)({typed:Bt});pureFunctionsAny_generated.splitUnit=es;var Gs=(0,_e.createSquare)({typed:Bt});pureFunctionsAny_generated.square=Gs;var Ro=(0,_e.createString)({typed:Bt});pureFunctionsAny_generated.string=Ro;var ru=(0,_e.createTan)({typed:Bt});pureFunctionsAny_generated.tan=ru;var du=(0,_e.createTypeOf)({typed:Bt});pureFunctionsAny_generated.typeOf=du;var Iu=(0,_e.createAcosh)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.acosh=Iu;var Sl=(0,_e.createAcsch)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.acsch=Sl;var Ko=(0,_e.createApply)({isInteger:wn,typed:Bt});pureFunctionsAny_generated.apply=Ko;var Fl=(0,_e.createAsec)({BigNumber:tt,Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.asec=Fl;var gl=(0,_e.createBin)({format:Gr,typed:Bt});pureFunctionsAny_generated.bin=gl;var Gu=(0,_e.createCombinationsWithRep)({typed:Bt});pureFunctionsAny_generated.combinationsWithRep=Gu;var Lu=(0,_e.createCos)({typed:Bt});pureFunctionsAny_generated.cos=Lu;var Ku=(0,_e.createCsch)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.csch=Ku;var uu=(0,_e.createIsNaN)({typed:Bt});pureFunctionsAny_generated.isNaN=uu;var en=(0,_e.createIsPrime)({typed:Bt});pureFunctionsAny_generated.isPrime=en;var Jr=(0,_e.createRandomInt)({config:et.config,typed:Bt});pureFunctionsAny_generated.randomInt=Jr;var vn=(0,_e.createSech)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.sech=vn;var fn=(0,_e.createSinh)({typed:Bt});pureFunctionsAny_generated.sinh=fn;var gn=(0,_e.createSparse)({SparseMatrix:rn,typed:Bt});pureFunctionsAny_generated.sparse=gn;var mn=(0,_e.createSqrt)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.sqrt=mn;var ss=(0,_e.createTanh)({typed:Bt});pureFunctionsAny_generated.tanh=ss;var ga=(0,_e.createUnaryMinus)({typed:Bt});pureFunctionsAny_generated.unaryMinus=ga;var Ns=(0,_e.createAcoth)({BigNumber:tt,Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.acoth=Ns;var vs=(0,_e.createCot)({BigNumber:tt,typed:Bt});pureFunctionsAny_generated.cot=vs;var Xs=(0,_e.createFraction)({Fraction:ft,typed:Bt});pureFunctionsAny_generated.fraction=Xs;var co=(0,_e.createIsNumeric)({typed:Bt});pureFunctionsAny_generated.isNumeric=co;var ls=(0,_e.createMatrix)({DenseMatrix:Vt,Matrix:Et,SparseMatrix:rn,typed:Bt});pureFunctionsAny_generated.matrix=ls;var Mo=(0,_e.createMatrixFromFunction)({isZero:pn,matrix:ls,typed:Bt});pureFunctionsAny_generated.matrixFromFunction=Mo;var Nu=(0,_e.createMod)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.mod=Nu;var Ou=(0,_e.createNthRoot)({BigNumber:tt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.nthRoot=Ou;var $u=(0,_e.createNumeric)({bignumber:Yr,fraction:Xs,number:Rs});pureFunctionsAny_generated.numeric=$u;var Hu=(0,_e.createOr)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.or=Hu;var kl=(0,_e.createProd)({config:et.config,multiplyScalar:Is,numeric:$u,typed:Bt});pureFunctionsAny_generated.prod=kl;var Uu=(0,_e.createReshape)({isInteger:wn,matrix:ls,typed:Bt});pureFunctionsAny_generated.reshape=Uu;var tl=(0,_e.createSize)({matrix:ls,config:et.config,typed:Bt});pureFunctionsAny_generated.size=tl;var rl=(0,_e.createSmaller)({DenseMatrix:Vt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.smaller=rl;var Wu=(0,_e.createSqueeze)({matrix:ls,typed:Bt});pureFunctionsAny_generated.squeeze=Wu;var tp=(0,_e.createSubset)({matrix:ls,typed:Bt});pureFunctionsAny_generated.subset=tp;var Al=(0,_e.createSubtract)({DenseMatrix:Vt,addScalar:Sr,equalScalar:An,matrix:ls,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.subtract=Al;var om=(0,_e.createTo)({matrix:ls,typed:Bt});pureFunctionsAny_generated.to=om;var Op=(0,_e.createTranspose)({matrix:ls,typed:Bt});pureFunctionsAny_generated.transpose=Op;var op=(0,_e.createXgcd)({BigNumber:tt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.xgcd=op;var wl=(0,_e.createZeros)({BigNumber:tt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.zeros=wl;var um=(0,_e.createAnd)({equalScalar:An,matrix:ls,not:uo,typed:Bt,zeros:wl});pureFunctionsAny_generated.and=um;var Im=(0,_e.createBitAnd)({equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.bitAnd=Im;var Il=(0,_e.createBitXor)({DenseMatrix:Vt,matrix:ls,typed:Bt});pureFunctionsAny_generated.bitXor=Il;var sn=(0,_e.createCbrt)({BigNumber:tt,Complex:rt,Fraction:ft,config:et.config,isNegative:Un,matrix:ls,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.cbrt=sn;var mr=(0,_e.createCompare)({BigNumber:tt,DenseMatrix:Vt,Fraction:ft,config:et.config,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.compare=mr;var fr=(0,_e.createCompareText)({matrix:ls,typed:Bt});pureFunctionsAny_generated.compareText=fr;var yr=(0,_e.createConcat)({isInteger:wn,matrix:ls,typed:Bt});pureFunctionsAny_generated.concat=yr;var jr=(0,_e.createCount)({prod:kl,size:tl,typed:Bt});pureFunctionsAny_generated.count=jr;var un=(0,_e.createCtranspose)({conj:Kr,transpose:Op,typed:Bt});pureFunctionsAny_generated.ctranspose=un;var $n=(0,_e.createDiag)({DenseMatrix:Vt,SparseMatrix:rn,matrix:ls,typed:Bt});pureFunctionsAny_generated.diag=$n;var Yn=(0,_e.createDivideScalar)({numeric:$u,typed:Bt});pureFunctionsAny_generated.divideScalar=Yn;var os=(0,_e.createDotDivide)({DenseMatrix:Vt,divideScalar:Yn,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.dotDivide=os;var Vs=(0,_e.createEqual)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.equal=Vs;var eo=(0,_e.createFft)({addScalar:Sr,divideScalar:Yn,exp:qs,i:ht,matrix:ls,multiplyScalar:Is,tau:It,typed:Bt});pureFunctionsAny_generated.fft=eo;var qo=(0,_e.createFlatten)({matrix:ls,typed:Bt});pureFunctionsAny_generated.flatten=qo;var Po=(0,_e.createGcd)({BigNumber:tt,DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.gcd=Po;var su=(0,_e.createHasNumericValue)({isNumeric:co,typed:Bt});pureFunctionsAny_generated.hasNumericValue=su;var mu=(0,_e.createHypot)({abs:ar,addScalar:Sr,divideScalar:Yn,isPositive:Zn,multiplyScalar:Is,smaller:rl,sqrt:mn,typed:Bt});pureFunctionsAny_generated.hypot=mu;var zu=(0,_e.createIfft)({conj:Kr,dotDivide:os,fft:eo,typed:Bt});pureFunctionsAny_generated.ifft=zu;var lu=(0,_e.createKron)({matrix:ls,multiplyScalar:Is,typed:Bt});pureFunctionsAny_generated.kron=lu;var vl=(0,_e.createLargerEq)({DenseMatrix:Vt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.largerEq=vl;var up=(0,_e.createLeftShift)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt,zeros:wl});pureFunctionsAny_generated.leftShift=up;var _c=(0,_e.createLsolve)({DenseMatrix:Vt,divideScalar:Yn,equalScalar:An,matrix:ls,multiplyScalar:Is,subtract:Al,typed:Bt});pureFunctionsAny_generated.lsolve=_c;var Bl=(0,_e.createMatrixFromColumns)({flatten:qo,matrix:ls,size:tl,typed:Bt});pureFunctionsAny_generated.matrixFromColumns=Bl;var rp=(0,_e.createMin)({config:et.config,numeric:$u,smaller:rl,typed:Bt});pureFunctionsAny_generated.min=rp;var Kp=(0,_e.createMode)({isNaN:uu,isNumeric:co,typed:Bt});pureFunctionsAny_generated.mode=Kp;var lp=(0,_e.createNthRoots)({Complex:rt,config:et.config,divideScalar:Yn,typed:Bt});pureFunctionsAny_generated.nthRoots=lp;var qp=(0,_e.createOnes)({BigNumber:tt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.ones=qp;var lm=(0,_e.createPartitionSelect)({compare:mr,isNaN:uu,isNumeric:co,typed:Bt});pureFunctionsAny_generated.partitionSelect=lm;var dl=(0,_e.createResize)({config:et.config,matrix:ls});pureFunctionsAny_generated.resize=dl;var el=(0,_e.createRightArithShift)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt,zeros:wl});pureFunctionsAny_generated.rightArithShift=el;var gv=(0,_e.createRound)({BigNumber:tt,DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt,zeros:wl});pureFunctionsAny_generated.round=gv;var Vm=(0,_e.createSmallerEq)({DenseMatrix:Vt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.smallerEq=Vm;var nl=(0,_e.createUnequal)({DenseMatrix:Vt,config:et.config,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.unequal=nl;var Xo=(0,_e.createUsolve)({DenseMatrix:Vt,divideScalar:Yn,equalScalar:An,matrix:ls,multiplyScalar:Is,subtract:Al,typed:Bt});pureFunctionsAny_generated.usolve=Xo;var xm=(0,_e.createXor)({DenseMatrix:Vt,matrix:ls,typed:Bt});pureFunctionsAny_generated.xor=xm;var nm=(0,_e.createAdd)({DenseMatrix:Vt,SparseMatrix:rn,addScalar:Sr,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.add=nm;var vv=(0,_e.createAtan2)({BigNumber:tt,DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.atan2=vv;var rv=(0,_e.createBitOr)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.bitOr=rv;var Lp=(0,_e.createCatalan)({addScalar:Sr,combinations:hn,divideScalar:Yn,isInteger:wn,isNegative:Un,multiplyScalar:Is,typed:Bt});pureFunctionsAny_generated.catalan=Lp;var cp=(0,_e.createCompareNatural)({compare:mr,typed:Bt});pureFunctionsAny_generated.compareNatural=cp;var nv=(0,_e.createCumSum)({add:nm,typed:Bt,unaryPlus:tr});pureFunctionsAny_generated.cumsum=nv;var Hm=(0,_e.createDeepEqual)({equal:Vs,typed:Bt});pureFunctionsAny_generated.deepEqual=Hm;var Rv=(0,_e.createDiff)({matrix:ls,number:Rs,subtract:Al,typed:Bt});pureFunctionsAny_generated.diff=Rv;var mm=(0,_e.createDot)({addScalar:Sr,conj:Kr,multiplyScalar:Is,size:tl,typed:Bt});pureFunctionsAny_generated.dot=mm;var Wm=(0,_e.createEqualText)({compareText:fr,isZero:pn,typed:Bt});pureFunctionsAny_generated.equalText=Wm;var uy=(0,_e.createFloor)({DenseMatrix:Vt,config:et.config,equalScalar:An,matrix:ls,round:gv,typed:Bt,zeros:wl});pureFunctionsAny_generated.floor=uy;var Sm=(0,_e.createIdentity)({BigNumber:tt,DenseMatrix:Vt,SparseMatrix:rn,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.identity=Sm;var wm=(0,_e.createInvmod)({BigNumber:tt,add:nm,config:et.config,equal:Vs,isInteger:wn,mod:Nu,smaller:rl,typed:Bt,xgcd:op});pureFunctionsAny_generated.invmod=wm;var tm=(0,_e.createLarger)({DenseMatrix:Vt,config:et.config,matrix:ls,typed:Bt});pureFunctionsAny_generated.larger=tm;var iv=(0,_e.createLog)({Complex:rt,config:et.config,divideScalar:Yn,typed:Bt});pureFunctionsAny_generated.log=iv;var _d=(0,_e.createLsolveAll)({DenseMatrix:Vt,divideScalar:Yn,equalScalar:An,matrix:ls,multiplyScalar:Is,subtract:Al,typed:Bt});pureFunctionsAny_generated.lsolveAll=_d;var Xm=(0,_e.createMatrixFromRows)({flatten:qo,matrix:ls,size:tl,typed:Bt});pureFunctionsAny_generated.matrixFromRows=Xm;var Cl=(0,_e.createMultiply)({addScalar:Sr,dot:mm,equalScalar:An,matrix:ls,multiplyScalar:Is,typed:Bt});pureFunctionsAny_generated.multiply=Cl;var Cy=(0,_e.createQr)({addScalar:Sr,complex:Sn,conj:Kr,divideScalar:Yn,equal:Vs,identity:Sm,isZero:pn,matrix:ls,multiplyScalar:Is,sign:Ps,sqrt:mn,subtract:Al,typed:Bt,unaryMinus:ga,zeros:wl});pureFunctionsAny_generated.qr=Cy;var zv=(0,_e.createRange)({bignumber:Yr,matrix:ls,config:et.config,larger:tm,largerEq:vl,smaller:rl,smallerEq:Vm,typed:Bt});pureFunctionsAny_generated.range=zv;var Fp=(0,_e.createRightLogShift)({DenseMatrix:Vt,equalScalar:An,matrix:ls,typed:Bt,zeros:wl});pureFunctionsAny_generated.rightLogShift=Fp;var Tm=(0,_e.createSetSize)({compareNatural:cp,typed:Bt});pureFunctionsAny_generated.setSize=Tm;var yv=(0,_e.createSlu)({SparseMatrix:rn,abs:ar,add:nm,divideScalar:Yn,larger:tm,largerEq:vl,multiply:Cl,subtract:Al,transpose:Op,typed:Bt});pureFunctionsAny_generated.slu=yv;var _l=(0,_e.createSum)({add:nm,config:et.config,numeric:$u,typed:Bt});pureFunctionsAny_generated.sum=_l;var Wp=(0,_e.createTrace)({add:nm,matrix:ls,typed:Bt});pureFunctionsAny_generated.trace=Wp;var Zp=(0,_e.createUsolveAll)({DenseMatrix:Vt,divideScalar:Yn,equalScalar:An,matrix:ls,multiplyScalar:Is,subtract:Al,typed:Bt});pureFunctionsAny_generated.usolveAll=Zp;var Xp=(0,_e.createAsin)({Complex:rt,config:et.config,typed:Bt});pureFunctionsAny_generated.asin=Xp;var np=(0,_e.createCeil)({DenseMatrix:Vt,config:et.config,equalScalar:An,matrix:ls,round:gv,typed:Bt,zeros:wl});pureFunctionsAny_generated.ceil=np;var Rm=(0,_e.createComposition)({addScalar:Sr,combinations:hn,isInteger:wn,isNegative:Un,isPositive:Zn,larger:tm,typed:Bt});pureFunctionsAny_generated.composition=Rm;var _0=(0,_e.createCross)({matrix:ls,multiply:Cl,subtract:Al,typed:Bt});pureFunctionsAny_generated.cross=_0;var bv=(0,_e.createDet)({divideScalar:Yn,isZero:pn,matrix:ls,multiply:Cl,subtract:Al,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.det=bv;var Cr=(0,_e.createDistance)({abs:ar,addScalar:Sr,divideScalar:Yn,multiplyScalar:Is,sqrt:mn,subtract:Al,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.distance=Cr;var ir=(0,_e.createDotMultiply)({equalScalar:An,matrix:ls,multiplyScalar:Is,typed:Bt});pureFunctionsAny_generated.dotMultiply=ir;var nr=(0,_e.createFibonacciHeapClass)({larger:tm,smaller:rl});pureFunctionsAny_generated.FibonacciHeap=nr;var dr=(0,_e.createFix)({Complex:rt,DenseMatrix:Vt,ceil:np,equalScalar:An,floor:uy,matrix:ls,typed:Bt,zeros:wl});pureFunctionsAny_generated.fix=dr;var Pr=(0,_e.createImmutableDenseMatrixClass)({DenseMatrix:Vt,smaller:rl});pureFunctionsAny_generated.ImmutableDenseMatrix=Pr;var Hr=(0,_e.createIndexClass)({ImmutableDenseMatrix:Pr});pureFunctionsAny_generated.Index=Hr;var bn=(0,_e.createIntersect)({abs:ar,add:nm,addScalar:Sr,config:et.config,divideScalar:Yn,equalScalar:An,flatten:qo,isNumeric:co,isZero:pn,matrix:ls,multiply:Cl,multiplyScalar:Is,smaller:rl,subtract:Al,typed:Bt});pureFunctionsAny_generated.intersect=bn;var Pn=(0,_e.createLcm)({equalScalar:An,matrix:ls,typed:Bt});pureFunctionsAny_generated.lcm=Pn;var Wn=(0,_e.createLog1p)({Complex:rt,config:et.config,divideScalar:Yn,log:iv,typed:Bt});pureFunctionsAny_generated.log1p=Wn;var ms=(0,_e.createMax)({config:et.config,larger:tm,numeric:$u,typed:Bt});pureFunctionsAny_generated.max=ms;var Es=(0,_e.createQuantileSeq)({add:nm,compare:mr,multiply:Cl,partitionSelect:lm,typed:Bt});pureFunctionsAny_generated.quantileSeq=Es;var ao=(0,_e.createRow)({Index:Hr,matrix:ls,range:zv,typed:Bt});pureFunctionsAny_generated.row=ao;var Js=(0,_e.createSetCartesian)({DenseMatrix:Vt,Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setCartesian=Js;var po=(0,_e.createSetDistinct)({DenseMatrix:Vt,Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setDistinct=po;var So=(0,_e.createSetIsSubset)({Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setIsSubset=So;var $o=(0,_e.createSetPowerset)({Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setPowerset=$o;var Zo=(0,_e.createSort)({compare:mr,compareNatural:cp,matrix:ls,typed:Bt});pureFunctionsAny_generated.sort=Zo;var au=(0,_e.createColumn)({Index:Hr,matrix:ls,range:zv,typed:Bt});pureFunctionsAny_generated.column=au;var ou=(0,_e.createIndex)({Index:Hr,typed:Bt});pureFunctionsAny_generated.index=ou;var Yo=(0,_e.createInv)({abs:ar,addScalar:Sr,det:bv,divideScalar:Yn,identity:Sm,matrix:ls,multiply:Cl,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.inv=Yo;var Ru=(0,_e.createPinv)({Complex:rt,add:nm,ctranspose:un,deepEqual:Hm,divideScalar:Yn,dot:mm,dotDivide:os,equal:Vs,inv:Yo,matrix:ls,multiply:Cl,typed:Bt});pureFunctionsAny_generated.pinv=Ru;var ku=(0,_e.createPow)({Complex:rt,config:et.config,fraction:Xs,identity:Sm,inv:Yo,matrix:ls,multiply:Cl,number:Rs,typed:Bt});pureFunctionsAny_generated.pow=ku;var Vu=(0,_e.createSetDifference)({DenseMatrix:Vt,Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setDifference=Vu;var sl=(0,_e.createSetMultiplicity)({Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setMultiplicity=sl;var nu=(0,_e.createSpaClass)({FibonacciHeap:nr,addScalar:Sr,equalScalar:An});pureFunctionsAny_generated.Spa=nu;var fu=(0,_e.createSqrtm)({abs:ar,add:nm,identity:Sm,inv:Yo,max:ms,multiply:Cl,size:tl,sqrt:mn,subtract:Al,typed:Bt});pureFunctionsAny_generated.sqrtm=fu;var Vo=(0,_e.createUnitClass)({BigNumber:tt,Complex:rt,Fraction:ft,abs:ar,addScalar:Sr,config:et.config,divideScalar:Yn,equal:Vs,fix:dr,format:Gr,isNumeric:co,multiplyScalar:Is,number:Rs,pow:ku,round:gv,subtract:Al});pureFunctionsAny_generated.Unit=Vo;var ll=(0,_e.createVacuumImpedance)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.vacuumImpedance=ll;var zl=(0,_e.createWienDisplacement)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.wienDisplacement=zl;var Gl=(0,_e.createAtomicMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.atomicMass=Gl;var Dl=(0,_e.createBohrMagneton)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.bohrMagneton=Dl;var dp=(0,_e.createBoltzmann)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.boltzmann=dp;var Bp=(0,_e.createConductanceQuantum)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.conductanceQuantum=Bp;var cm=(0,_e.createCreateUnit)({Unit:Vo,typed:Bt});pureFunctionsAny_generated.createUnit=cm;var Rl=(0,_e.createDeuteronMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.deuteronMass=Rl;var hl=(0,_e.createDotPow)({DenseMatrix:Vt,equalScalar:An,matrix:ls,pow:ku,typed:Bt});pureFunctionsAny_generated.dotPow=hl;var hp=(0,_e.createElectricConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.electricConstant=hp;var Cp=(0,_e.createElementaryCharge)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.elementaryCharge=Cp;var il=(0,_e.createExpm)({abs:ar,add:nm,identity:Sm,inv:Yo,multiply:Cl,typed:Bt});pureFunctionsAny_generated.expm=il;var Jp=(0,_e.createFaraday)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.faraday=Jp;var fp=(0,_e.createFirstRadiation)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.firstRadiation=fp;var Jy=(0,_e.createGamma)({BigNumber:tt,Complex:rt,config:et.config,multiplyScalar:Is,pow:ku,typed:Bt});pureFunctionsAny_generated.gamma=Jy;var ip=(0,_e.createGravitationConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.gravitationConstant=ip;var Bs=(0,_e.createHartreeEnergy)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.hartreeEnergy=Bs;var Do=(0,_e.createKlitzing)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.klitzing=Do;var fo=(0,_e.createLoschmidt)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.loschmidt=fo;var bu=(0,_e.createMagneticConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.magneticConstant=bu;var Qu=(0,_e.createMolarMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.molarMass=Qu;var jl=(0,_e.createMolarPlanckConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.molarPlanckConstant=jl;var Yp=(0,_e.createNeutronMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.neutronMass=Yp;var _h=(0,_e.createNuclearMagneton)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.nuclearMagneton=_h;var Pm=(0,_e.createPlanckCharge)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckCharge=Pm;var Lm=(0,_e.createPlanckLength)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckLength=Lm;var _v=(0,_e.createPlanckTemperature)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckTemperature=_v;var gp=(0,_e.createProtonMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.protonMass=gp;var o_=(0,_e.createReducedPlanckConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.reducedPlanckConstant=o_;var Gv=(0,_e.createRydberg)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.rydberg=Gv;var ly=(0,_e.createSetIntersect)({DenseMatrix:Vt,Index:Hr,compareNatural:cp,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setIntersect=ly;var Dy=(0,_e.createSpeedOfLight)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.speedOfLight=Dy;var Zu=(0,_e.createStefanBoltzmann)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.stefanBoltzmann=Zu;var N_=(0,_e.createThomsonCrossSection)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.thomsonCrossSection=N_;var u_=(0,_e.createAvogadro)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.avogadro=u_;var cy=(0,_e.createBohrRadius)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.bohrRadius=cy;var Pv=(0,_e.createCoulomb)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.coulomb=Pv;var vp=(0,_e.createDivide)({divideScalar:Yn,equalScalar:An,inv:Yo,matrix:ls,multiply:Cl,typed:Bt});pureFunctionsAny_generated.divide=vp;var Fu=(0,_e.createElectronMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.electronMass=Fu;var Zv=(0,_e.createFactorial)({gamma:Jy,typed:Bt});pureFunctionsAny_generated.factorial=Zv;var Nv=(0,_e.createGravity)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.gravity=Nv;var av=(0,_e.createInverseConductanceQuantum)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.inverseConductanceQuantum=av;var Gy=(0,_e.createLup)({DenseMatrix:Vt,Spa:nu,SparseMatrix:rn,abs:ar,addScalar:Sr,divideScalar:Yn,equalScalar:An,larger:tm,matrix:ls,multiplyScalar:Is,subtract:Al,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.lup=Gy;var My=(0,_e.createMagneticFluxQuantum)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.magneticFluxQuantum=My;var $0=(0,_e.createMolarMassC12)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.molarMassC12=$0;var Iy=(0,_e.createMultinomial)({add:nm,divide:vp,factorial:Zv,isInteger:wn,isPositive:Zn,multiply:Cl,typed:Bt});pureFunctionsAny_generated.multinomial=Iy;var Ym=(0,_e.createPermutations)({factorial:Zv,typed:Bt});pureFunctionsAny_generated.permutations=Ym;var yp=(0,_e.createPlanckMass)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckMass=yp;var pp=(0,_e.createQuantumOfCirculation)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.quantumOfCirculation=pp;var xv=(0,_e.createSecondRadiation)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.secondRadiation=xv;var Yl=(0,_e.createStirlingS2)({bignumber:Yr,addScalar:Sr,combinations:hn,divideScalar:Yn,factorial:Zv,isInteger:wn,isNegative:Un,larger:tm,multiplyScalar:Is,number:Rs,pow:ku,subtract:Al,typed:Bt});pureFunctionsAny_generated.stirlingS2=Yl;var l_=(0,_e.createUnitFunction)({Unit:Vo,typed:Bt});pureFunctionsAny_generated.unit=l_;var e0=(0,_e.createBellNumbers)({addScalar:Sr,isInteger:wn,isNegative:Un,stirlingS2:Yl,typed:Bt});pureFunctionsAny_generated.bellNumbers=e0;var Vv=(0,_e.createEigs)({abs:ar,add:nm,addScalar:Sr,atan:Mr,bignumber:Yr,column:au,complex:Sn,config:et.config,cos:Lu,diag:$n,divideScalar:Yn,dot:mm,equal:Vs,flatten:qo,im:Rn,inv:Yo,larger:tm,matrix:ls,matrixFromColumns:Bl,multiply:Cl,multiplyScalar:Is,number:Rs,qr:Cy,re:In,sin:yo,smaller:rl,sqrt:mn,subtract:Al,typed:Bt,usolve:Xo,usolveAll:Zp});pureFunctionsAny_generated.eigs=Vv;var dy=(0,_e.createFermiCoupling)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.fermiCoupling=dy;var hy=(0,_e.createMean)({add:nm,divide:vp,typed:Bt});pureFunctionsAny_generated.mean=hy;var Jv=(0,_e.createMolarVolume)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.molarVolume=Jv;var Jn=(0,_e.createPlanckConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckConstant=Jn;var Ql=(0,_e.createSetSymDifference)({Index:Hr,concat:yr,setDifference:Vu,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setSymDifference=Ql;var fy=(0,_e.createClassicalElectronRadius)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.classicalElectronRadius=fy;var U0=(0,_e.createLusolve)({DenseMatrix:Vt,lsolve:_c,lup:Gy,matrix:ls,slu:yv,typed:Bt,usolve:Xo});pureFunctionsAny_generated.lusolve=U0;var Pl=(0,_e.createMedian)({add:nm,compare:mr,divide:vp,partitionSelect:lm,typed:Bt});pureFunctionsAny_generated.median=Pl;var gm=(0,_e.createSetUnion)({Index:Hr,concat:yr,setIntersect:ly,setSymDifference:Ql,size:tl,subset:tp,typed:Bt});pureFunctionsAny_generated.setUnion=gm;var z0=(0,_e.createVariance)({add:nm,apply:Ko,divide:vp,isNaN:uu,multiply:Cl,subtract:Al,typed:Bt});pureFunctionsAny_generated.variance=z0;var G0=(0,_e.createKldivergence)({divide:vp,dotDivide:os,isNumeric:co,log:iv,matrix:ls,multiply:Cl,sum:_l,typed:Bt});pureFunctionsAny_generated.kldivergence=G0;var Nm=(0,_e.createNorm)({abs:ar,add:nm,conj:Kr,ctranspose:un,eigs:Vv,equalScalar:An,larger:tm,matrix:ls,multiply:Cl,pow:ku,smaller:rl,sqrt:mn,typed:Bt});pureFunctionsAny_generated.norm=Nm;var x0=(0,_e.createPlanckTime)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.planckTime=x0;var kv=(0,_e.createRotationMatrix)({BigNumber:tt,DenseMatrix:Vt,SparseMatrix:rn,addScalar:Sr,config:et.config,cos:Lu,matrix:ls,multiplyScalar:Is,norm:Nm,sin:yo,typed:Bt,unaryMinus:ga});pureFunctionsAny_generated.rotationMatrix=kv;var $l=(0,_e.createGasConstant)({BigNumber:tt,Unit:Vo,config:et.config});pureFunctionsAny_generated.gasConstant=$l;var sv=(0,_e.createStd)({sqrt:mn,typed:Bt,variance:z0});pureFunctionsAny_generated.std=sv;var wp=(0,_e.createMad)({abs:ar,map:bs,median:Pl,subtract:Al,typed:Bt});pureFunctionsAny_generated.mad=wp;var yl=(0,_e.createRotate)({multiply:Cl,rotationMatrix:kv,typed:Bt});return pureFunctionsAny_generated.rotate=yl,pureFunctionsAny_generated}var impureFunctionsAny_generated={},hasRequiredImpureFunctionsAny_generated;function requireImpureFunctionsAny_generated(){return hasRequiredImpureFunctionsAny_generated||(hasRequiredImpureFunctionsAny_generated=1,(function(et){var _e=requireInteropRequireDefault();Object.defineProperty(et,"__esModule",{value:!0}),et.derivative=et.compile=et.chain=et.SymbolNode=et.RelationalNode=et.RangeNode=et.Parser=et.ParenthesisNode=et.OperatorNode=et.ObjectNode=et.Node=et.IndexNode=et.Help=et.FunctionNode=et.FunctionAssignmentNode=et.ConstantNode=et.ConditionalNode=et.Chain=et.BlockNode=et.AssignmentNode=et.ArrayNode=et.AccessorNode=void 0,Object.defineProperty(et,"docs",{enumerable:!0,get:function(){return dt.embeddedDocs}}),et.symbolicEqual=et.simplifyCore=et.simplify=et.reviver=et.resolve=et.rationalize=et.parser=et.parse=et.leafCount=et.help=et.evaluate=void 0;var tt=_e(require_extends()),rt=requireConfigReadonly(),nt=requireFactoriesAny(),st=requirePureFunctionsAny_generated(),dt=requireEmbeddedDocs(),ft={},ht={},mt={},bt=(0,nt.createChainClass)({math:ft});et.Chain=bt;var St=(0,nt.createNode)({mathWithTransform:ht});et.Node=St;var Et=(0,nt.createObjectNode)({Node:St});et.ObjectNode=Et;var Ct=(0,nt.createOperatorNode)({Node:St});et.OperatorNode=Ct;var Rt=(0,nt.createParenthesisNode)({Node:St});et.ParenthesisNode=Rt;var Tt=(0,nt.createRelationalNode)({Node:St});et.RelationalNode=Tt;var wt=(0,nt.createArrayNode)({Node:St});et.ArrayNode=wt;var At=(0,nt.createBlockNode)({Node:St,ResultSet:st.ResultSet});et.BlockNode=At;var Nt=(0,nt.createConditionalNode)({Node:St});et.ConditionalNode=Nt;var Pt=(0,nt.createConstantNode)({Node:St});et.ConstantNode=Pt;var It=(0,nt.createRangeNode)({Node:St});et.RangeNode=It;var Ft=(0,nt.createReviver)({classes:mt});et.reviver=Ft;var qt=(0,nt.createChain)({Chain:bt,typed:st.typed});et.chain=qt;var Vt=(0,nt.createFunctionAssignmentNode)({Node:St,typed:st.typed});et.FunctionAssignmentNode=Vt;var Kt=(0,nt.createAccessorNode)({Node:St,subset:st.subset});et.AccessorNode=Kt;var jt=(0,nt.createAssignmentNode)({matrix:st.matrix,Node:St,subset:st.subset});et.AssignmentNode=jt;var Ut=(0,nt.createIndexNode)({Node:St,size:st.size});et.IndexNode=Ut;var Ot=(0,nt.createSymbolNode)({Unit:st.Unit,Node:St,math:ft});et.SymbolNode=Ot;var Wt=(0,nt.createFunctionNode)({Node:St,SymbolNode:Ot,math:ft});et.FunctionNode=Wt;var Bt=(0,nt.createParse)({AccessorNode:Kt,ArrayNode:wt,AssignmentNode:jt,BlockNode:At,ConditionalNode:Nt,ConstantNode:Pt,FunctionAssignmentNode:Vt,FunctionNode:Wt,IndexNode:Ut,ObjectNode:Et,OperatorNode:Ct,ParenthesisNode:Rt,RangeNode:It,RelationalNode:Tt,SymbolNode:Ot,config:rt.config,numeric:st.numeric,typed:st.typed});et.parse=Bt;var tr=(0,nt.createResolve)({ConstantNode:Pt,FunctionNode:Wt,OperatorNode:Ct,ParenthesisNode:Rt,parse:Bt});et.resolve=tr;var Jt=(0,nt.createSimplifyCore)({AccessorNode:Kt,ArrayNode:wt,ConstantNode:Pt,FunctionNode:Wt,IndexNode:Ut,ObjectNode:Et,OperatorNode:Ct,ParenthesisNode:Rt,SymbolNode:Ot,add:st.add,divide:st.divide,equal:st.equal,isZero:st.isZero,multiply:st.multiply,pow:st.pow,subtract:st.subtract});et.simplifyCore=Jt;var ar=(0,nt.createCompile)({parse:Bt,typed:st.typed});et.compile=ar;var pr=(0,nt.createHelpClass)({parse:Bt});et.Help=pr;var cr=(0,nt.createLeafCount)({parse:Bt,typed:st.typed});et.leafCount=cr;var gr=(0,nt.createSimplify)({bignumber:st.bignumber,fraction:st.fraction,AccessorNode:Kt,ArrayNode:wt,ConstantNode:Pt,FunctionNode:Wt,IndexNode:Ut,ObjectNode:Et,OperatorNode:Ct,ParenthesisNode:Rt,SymbolNode:Ot,add:st.add,config:rt.config,divide:st.divide,equal:st.equal,isZero:st.isZero,mathWithTransform:ht,matrix:st.matrix,multiply:st.multiply,parse:Bt,pow:st.pow,resolve:tr,simplifyCore:Jt,subtract:st.subtract,typed:st.typed});et.simplify=gr;var Sr=(0,nt.createSymbolicEqual)({OperatorNode:Ct,parse:Bt,simplify:gr,typed:st.typed});et.symbolicEqual=Sr;var Er=(0,nt.createEvaluate)({parse:Bt,typed:st.typed});et.evaluate=Er;var Vr=(0,nt.createHelp)({Help:pr,mathWithTransform:ht,typed:st.typed});et.help=Vr;var Wr=(0,nt.createParserClass)({evaluate:Er});et.Parser=Wr;var Mr=(0,nt.createRationalize)({bignumber:st.bignumber,fraction:st.fraction,AccessorNode:Kt,ArrayNode:wt,ConstantNode:Pt,FunctionNode:Wt,IndexNode:Ut,ObjectNode:Et,OperatorNode:Ct,ParenthesisNode:Rt,SymbolNode:Ot,add:st.add,config:rt.config,divide:st.divide,equal:st.equal,isZero:st.isZero,mathWithTransform:ht,matrix:st.matrix,multiply:st.multiply,parse:Bt,pow:st.pow,simplify:gr,simplifyCore:Jt,subtract:st.subtract,typed:st.typed});et.rationalize=Mr;var Nr=(0,nt.createDerivative)({ConstantNode:Pt,FunctionNode:Wt,OperatorNode:Ct,ParenthesisNode:Rt,SymbolNode:Ot,config:rt.config,equal:st.equal,isZero:st.isZero,numeric:st.numeric,parse:Bt,simplify:gr,typed:st.typed});et.derivative=Nr;var Yr=(0,nt.createParser)({Parser:Wr,typed:st.typed});et.parser=Yr,(0,tt.default)(ft,{e:st.e,false:st._false,fineStructure:st.fineStructure,i:st.i,Infinity:st._Infinity,LN10:st.LN10,LOG10E:st.LOG10E,NaN:st._NaN,null:st._null,phi:st.phi,SQRT1_2:st.SQRT1_2,sackurTetrode:st.sackurTetrode,tau:st.tau,true:st._true,E:st.e,version:st.version,efimovFactor:st.efimovFactor,LN2:st.LN2,pi:st.pi,replacer:st.replacer,reviver:Ft,SQRT2:st.SQRT2,typed:st.typed,unaryPlus:st.unaryPlus,PI:st.pi,weakMixingAngle:st.weakMixingAngle,abs:st.abs,acos:st.acos,acot:st.acot,acsc:st.acsc,addScalar:st.addScalar,arg:st.arg,asech:st.asech,asinh:st.asinh,atan:st.atan,atanh:st.atanh,bignumber:st.bignumber,bitNot:st.bitNot,boolean:st.boolean,chain:qt,clone:st.clone,combinations:st.combinations,complex:st.complex,conj:st.conj,cosh:st.cosh,coth:st.coth,csc:st.csc,cube:st.cube,equalScalar:st.equalScalar,erf:st.erf,exp:st.exp,expm1:st.expm1,filter:st.filter,forEach:st.forEach,format:st.format,getMatrixDataType:st.getMatrixDataType,hex:st.hex,im:st.im,isInteger:st.isInteger,isNegative:st.isNegative,isPositive:st.isPositive,isZero:st.isZero,LOG2E:st.LOG2E,lgamma:st.lgamma,log10:st.log10,log2:st.log2,map:st.map,multiplyScalar:st.multiplyScalar,not:st.not,number:st.number,oct:st.oct,pickRandom:st.pickRandom,print:st.print,random:st.random,re:st.re,sec:st.sec,sign:st.sign,sin:st.sin,splitUnit:st.splitUnit,square:st.square,string:st.string,tan:st.tan,typeOf:st.typeOf,acosh:st.acosh,acsch:st.acsch,apply:st.apply,asec:st.asec,bin:st.bin,combinationsWithRep:st.combinationsWithRep,cos:st.cos,csch:st.csch,isNaN:st.isNaN,isPrime:st.isPrime,randomInt:st.randomInt,sech:st.sech,sinh:st.sinh,sparse:st.sparse,sqrt:st.sqrt,tanh:st.tanh,unaryMinus:st.unaryMinus,acoth:st.acoth,cot:st.cot,fraction:st.fraction,isNumeric:st.isNumeric,matrix:st.matrix,matrixFromFunction:st.matrixFromFunction,mod:st.mod,nthRoot:st.nthRoot,numeric:st.numeric,or:st.or,prod:st.prod,reshape:st.reshape,size:st.size,smaller:st.smaller,squeeze:st.squeeze,subset:st.subset,subtract:st.subtract,to:st.to,transpose:st.transpose,xgcd:st.xgcd,zeros:st.zeros,and:st.and,bitAnd:st.bitAnd,bitXor:st.bitXor,cbrt:st.cbrt,compare:st.compare,compareText:st.compareText,concat:st.concat,count:st.count,ctranspose:st.ctranspose,diag:st.diag,divideScalar:st.divideScalar,dotDivide:st.dotDivide,equal:st.equal,fft:st.fft,flatten:st.flatten,gcd:st.gcd,hasNumericValue:st.hasNumericValue,hypot:st.hypot,ifft:st.ifft,kron:st.kron,largerEq:st.largerEq,leftShift:st.leftShift,lsolve:st.lsolve,matrixFromColumns:st.matrixFromColumns,min:st.min,mode:st.mode,nthRoots:st.nthRoots,ones:st.ones,partitionSelect:st.partitionSelect,resize:st.resize,rightArithShift:st.rightArithShift,round:st.round,smallerEq:st.smallerEq,unequal:st.unequal,usolve:st.usolve,xor:st.xor,add:st.add,atan2:st.atan2,bitOr:st.bitOr,catalan:st.catalan,compareNatural:st.compareNatural,cumsum:st.cumsum,deepEqual:st.deepEqual,diff:st.diff,dot:st.dot,equalText:st.equalText,floor:st.floor,identity:st.identity,invmod:st.invmod,larger:st.larger,log:st.log,lsolveAll:st.lsolveAll,matrixFromRows:st.matrixFromRows,multiply:st.multiply,qr:st.qr,range:st.range,rightLogShift:st.rightLogShift,setSize:st.setSize,slu:st.slu,sum:st.sum,trace:st.trace,usolveAll:st.usolveAll,asin:st.asin,ceil:st.ceil,composition:st.composition,cross:st.cross,det:st.det,distance:st.distance,dotMultiply:st.dotMultiply,fix:st.fix,intersect:st.intersect,lcm:st.lcm,log1p:st.log1p,max:st.max,quantileSeq:st.quantileSeq,row:st.row,setCartesian:st.setCartesian,setDistinct:st.setDistinct,setIsSubset:st.setIsSubset,setPowerset:st.setPowerset,sort:st.sort,column:st.column,index:st.index,inv:st.inv,pinv:st.pinv,pow:st.pow,setDifference:st.setDifference,setMultiplicity:st.setMultiplicity,sqrtm:st.sqrtm,vacuumImpedance:st.vacuumImpedance,wienDisplacement:st.wienDisplacement,atomicMass:st.atomicMass,bohrMagneton:st.bohrMagneton,boltzmann:st.boltzmann,conductanceQuantum:st.conductanceQuantum,createUnit:st.createUnit,deuteronMass:st.deuteronMass,dotPow:st.dotPow,electricConstant:st.electricConstant,elementaryCharge:st.elementaryCharge,expm:st.expm,faraday:st.faraday,firstRadiation:st.firstRadiation,gamma:st.gamma,gravitationConstant:st.gravitationConstant,hartreeEnergy:st.hartreeEnergy,klitzing:st.klitzing,loschmidt:st.loschmidt,magneticConstant:st.magneticConstant,molarMass:st.molarMass,molarPlanckConstant:st.molarPlanckConstant,neutronMass:st.neutronMass,nuclearMagneton:st.nuclearMagneton,planckCharge:st.planckCharge,planckLength:st.planckLength,planckTemperature:st.planckTemperature,protonMass:st.protonMass,reducedPlanckConstant:st.reducedPlanckConstant,rydberg:st.rydberg,setIntersect:st.setIntersect,speedOfLight:st.speedOfLight,stefanBoltzmann:st.stefanBoltzmann,thomsonCrossSection:st.thomsonCrossSection,avogadro:st.avogadro,bohrRadius:st.bohrRadius,coulomb:st.coulomb,divide:st.divide,electronMass:st.electronMass,factorial:st.factorial,gravity:st.gravity,inverseConductanceQuantum:st.inverseConductanceQuantum,lup:st.lup,magneticFluxQuantum:st.magneticFluxQuantum,molarMassC12:st.molarMassC12,multinomial:st.multinomial,parse:Bt,permutations:st.permutations,planckMass:st.planckMass,quantumOfCirculation:st.quantumOfCirculation,resolve:tr,secondRadiation:st.secondRadiation,simplifyCore:Jt,stirlingS2:st.stirlingS2,unit:st.unit,bellNumbers:st.bellNumbers,compile:ar,eigs:st.eigs,fermiCoupling:st.fermiCoupling,leafCount:cr,mean:st.mean,molarVolume:st.molarVolume,planckConstant:st.planckConstant,setSymDifference:st.setSymDifference,simplify:gr,symbolicEqual:Sr,classicalElectronRadius:st.classicalElectronRadius,evaluate:Er,help:Vr,lusolve:st.lusolve,median:st.median,rationalize:Mr,setUnion:st.setUnion,variance:st.variance,derivative:Nr,kldivergence:st.kldivergence,norm:st.norm,planckTime:st.planckTime,rotationMatrix:st.rotationMatrix,gasConstant:st.gasConstant,parser:Yr,std:st.std,mad:st.mad,rotate:st.rotate,config:rt.config}),(0,tt.default)(ht,ft,{filter:(0,nt.createFilterTransform)({typed:st.typed}),forEach:(0,nt.createForEachTransform)({typed:st.typed}),map:(0,nt.createMapTransform)({typed:st.typed}),apply:(0,nt.createApplyTransform)({isInteger:st.isInteger,typed:st.typed}),diff:(0,nt.createDiffTransform)({bignumber:st.bignumber,matrix:st.matrix,number:st.number,subtract:st.subtract,typed:st.typed}),subset:(0,nt.createSubsetTransform)({matrix:st.matrix,typed:st.typed}),concat:(0,nt.createConcatTransform)({isInteger:st.isInteger,matrix:st.matrix,typed:st.typed}),max:(0,nt.createMaxTransform)({config:rt.config,larger:st.larger,numeric:st.numeric,typed:st.typed}),min:(0,nt.createMinTransform)({config:rt.config,numeric:st.numeric,smaller:st.smaller,typed:st.typed}),range:(0,nt.createRangeTransform)({bignumber:st.bignumber,matrix:st.matrix,config:rt.config,larger:st.larger,largerEq:st.largerEq,smaller:st.smaller,smallerEq:st.smallerEq,typed:st.typed}),sum:(0,nt.createSumTransform)({add:st.add,config:rt.config,numeric:st.numeric,typed:st.typed}),cumsum:(0,nt.createCumSumTransform)({add:st.add,typed:st.typed,unaryPlus:st.unaryPlus}),row:(0,nt.createRowTransform)({Index:st.Index,matrix:st.matrix,range:st.range,typed:st.typed}),column:(0,nt.createColumnTransform)({Index:st.Index,matrix:st.matrix,range:st.range,typed:st.typed}),index:(0,nt.createIndexTransform)({Index:st.Index}),mean:(0,nt.createMeanTransform)({add:st.add,divide:st.divide,typed:st.typed}),variance:(0,nt.createVarianceTransform)({add:st.add,apply:st.apply,divide:st.divide,isNaN:st.isNaN,multiply:st.multiply,subtract:st.subtract,typed:st.typed}),std:(0,nt.createStdTransform)({sqrt:st.sqrt,typed:st.typed,variance:st.variance})}),(0,tt.default)(mt,{BigNumber:st.BigNumber,Chain:bt,Complex:st.Complex,Fraction:st.Fraction,Matrix:st.Matrix,Node:St,ObjectNode:Et,OperatorNode:Ct,ParenthesisNode:Rt,Range:st.Range,RelationalNode:Tt,ResultSet:st.ResultSet,ArrayNode:wt,BlockNode:At,ConditionalNode:Nt,ConstantNode:Pt,DenseMatrix:st.DenseMatrix,RangeNode:It,FunctionAssignmentNode:Vt,SparseMatrix:st.SparseMatrix,AccessorNode:Kt,AssignmentNode:jt,IndexNode:Ut,FibonacciHeap:st.FibonacciHeap,ImmutableDenseMatrix:st.ImmutableDenseMatrix,Index:st.Index,Spa:st.Spa,Unit:st.Unit,SymbolNode:Ot,FunctionNode:Wt,Help:pr,Parser:Wr}),bt.createProxy(ft)})(impureFunctionsAny_generated)),impureFunctionsAny_generated}var typeChecks={},hasRequiredTypeChecks;function requireTypeChecks(){return hasRequiredTypeChecks||(hasRequiredTypeChecks=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"isAccessorNode",{enumerable:!0,get:function(){return _e.isAccessorNode}}),Object.defineProperty(et,"isArray",{enumerable:!0,get:function(){return _e.isArray}}),Object.defineProperty(et,"isArrayNode",{enumerable:!0,get:function(){return _e.isArrayNode}}),Object.defineProperty(et,"isAssignmentNode",{enumerable:!0,get:function(){return _e.isAssignmentNode}}),Object.defineProperty(et,"isBigNumber",{enumerable:!0,get:function(){return _e.isBigNumber}}),Object.defineProperty(et,"isBlockNode",{enumerable:!0,get:function(){return _e.isBlockNode}}),Object.defineProperty(et,"isBoolean",{enumerable:!0,get:function(){return _e.isBoolean}}),Object.defineProperty(et,"isChain",{enumerable:!0,get:function(){return _e.isChain}}),Object.defineProperty(et,"isCollection",{enumerable:!0,get:function(){return _e.isCollection}}),Object.defineProperty(et,"isComplex",{enumerable:!0,get:function(){return _e.isComplex}}),Object.defineProperty(et,"isConditionalNode",{enumerable:!0,get:function(){return _e.isConditionalNode}}),Object.defineProperty(et,"isConstantNode",{enumerable:!0,get:function(){return _e.isConstantNode}}),Object.defineProperty(et,"isDate",{enumerable:!0,get:function(){return _e.isDate}}),Object.defineProperty(et,"isDenseMatrix",{enumerable:!0,get:function(){return _e.isDenseMatrix}}),Object.defineProperty(et,"isFraction",{enumerable:!0,get:function(){return _e.isFraction}}),Object.defineProperty(et,"isFunction",{enumerable:!0,get:function(){return _e.isFunction}}),Object.defineProperty(et,"isFunctionAssignmentNode",{enumerable:!0,get:function(){return _e.isFunctionAssignmentNode}}),Object.defineProperty(et,"isFunctionNode",{enumerable:!0,get:function(){return _e.isFunctionNode}}),Object.defineProperty(et,"isHelp",{enumerable:!0,get:function(){return _e.isHelp}}),Object.defineProperty(et,"isIndex",{enumerable:!0,get:function(){return _e.isIndex}}),Object.defineProperty(et,"isIndexNode",{enumerable:!0,get:function(){return _e.isIndexNode}}),Object.defineProperty(et,"isMatrix",{enumerable:!0,get:function(){return _e.isMatrix}}),Object.defineProperty(et,"isNode",{enumerable:!0,get:function(){return _e.isNode}}),Object.defineProperty(et,"isNull",{enumerable:!0,get:function(){return _e.isNull}}),Object.defineProperty(et,"isNumber",{enumerable:!0,get:function(){return _e.isNumber}}),Object.defineProperty(et,"isObject",{enumerable:!0,get:function(){return _e.isObject}}),Object.defineProperty(et,"isObjectNode",{enumerable:!0,get:function(){return _e.isObjectNode}}),Object.defineProperty(et,"isOperatorNode",{enumerable:!0,get:function(){return _e.isOperatorNode}}),Object.defineProperty(et,"isParenthesisNode",{enumerable:!0,get:function(){return _e.isParenthesisNode}}),Object.defineProperty(et,"isRange",{enumerable:!0,get:function(){return _e.isRange}}),Object.defineProperty(et,"isRangeNode",{enumerable:!0,get:function(){return _e.isRangeNode}}),Object.defineProperty(et,"isRegExp",{enumerable:!0,get:function(){return _e.isRegExp}}),Object.defineProperty(et,"isResultSet",{enumerable:!0,get:function(){return _e.isResultSet}}),Object.defineProperty(et,"isSparseMatrix",{enumerable:!0,get:function(){return _e.isSparseMatrix}}),Object.defineProperty(et,"isString",{enumerable:!0,get:function(){return _e.isString}}),Object.defineProperty(et,"isSymbolNode",{enumerable:!0,get:function(){return _e.isSymbolNode}}),Object.defineProperty(et,"isUndefined",{enumerable:!0,get:function(){return _e.isUndefined}}),Object.defineProperty(et,"isUnit",{enumerable:!0,get:function(){return _e.isUnit}});var _e=requireIs()})(typeChecks)),typeChecks}var dependenciesAny_generated={},dependenciesAbs_generated={},dependenciesTyped_generated={},dependenciesBigNumberClass_generated={},hasRequiredDependenciesBigNumberClass_generated;function requireDependenciesBigNumberClass_generated(){if(hasRequiredDependenciesBigNumberClass_generated)return dependenciesBigNumberClass_generated;hasRequiredDependenciesBigNumberClass_generated=1,Object.defineProperty(dependenciesBigNumberClass_generated,"__esModule",{value:!0}),dependenciesBigNumberClass_generated.BigNumberDependencies=void 0;var et=requireFactoriesAny(),_e={createBigNumberClass:et.createBigNumberClass};return dependenciesBigNumberClass_generated.BigNumberDependencies=_e,dependenciesBigNumberClass_generated}var dependenciesComplexClass_generated={},hasRequiredDependenciesComplexClass_generated;function requireDependenciesComplexClass_generated(){if(hasRequiredDependenciesComplexClass_generated)return dependenciesComplexClass_generated;hasRequiredDependenciesComplexClass_generated=1,Object.defineProperty(dependenciesComplexClass_generated,"__esModule",{value:!0}),dependenciesComplexClass_generated.ComplexDependencies=void 0;var et=requireFactoriesAny(),_e={createComplexClass:et.createComplexClass};return dependenciesComplexClass_generated.ComplexDependencies=_e,dependenciesComplexClass_generated}var dependenciesDenseMatrixClass_generated={},dependenciesMatrixClass_generated={},hasRequiredDependenciesMatrixClass_generated;function requireDependenciesMatrixClass_generated(){if(hasRequiredDependenciesMatrixClass_generated)return dependenciesMatrixClass_generated;hasRequiredDependenciesMatrixClass_generated=1,Object.defineProperty(dependenciesMatrixClass_generated,"__esModule",{value:!0}),dependenciesMatrixClass_generated.MatrixDependencies=void 0;var et=requireFactoriesAny(),_e={createMatrixClass:et.createMatrixClass};return dependenciesMatrixClass_generated.MatrixDependencies=_e,dependenciesMatrixClass_generated}var hasRequiredDependenciesDenseMatrixClass_generated;function requireDependenciesDenseMatrixClass_generated(){if(hasRequiredDependenciesDenseMatrixClass_generated)return dependenciesDenseMatrixClass_generated;hasRequiredDependenciesDenseMatrixClass_generated=1,Object.defineProperty(dependenciesDenseMatrixClass_generated,"__esModule",{value:!0}),dependenciesDenseMatrixClass_generated.DenseMatrixDependencies=void 0;var et=requireDependenciesMatrixClass_generated(),_e=requireFactoriesAny(),tt={MatrixDependencies:et.MatrixDependencies,createDenseMatrixClass:_e.createDenseMatrixClass};return dependenciesDenseMatrixClass_generated.DenseMatrixDependencies=tt,dependenciesDenseMatrixClass_generated}var dependenciesFractionClass_generated={},hasRequiredDependenciesFractionClass_generated;function requireDependenciesFractionClass_generated(){if(hasRequiredDependenciesFractionClass_generated)return dependenciesFractionClass_generated;hasRequiredDependenciesFractionClass_generated=1,Object.defineProperty(dependenciesFractionClass_generated,"__esModule",{value:!0}),dependenciesFractionClass_generated.FractionDependencies=void 0;var et=requireFactoriesAny(),_e={createFractionClass:et.createFractionClass};return dependenciesFractionClass_generated.FractionDependencies=_e,dependenciesFractionClass_generated}var hasRequiredDependenciesTyped_generated;function requireDependenciesTyped_generated(){if(hasRequiredDependenciesTyped_generated)return dependenciesTyped_generated;hasRequiredDependenciesTyped_generated=1,Object.defineProperty(dependenciesTyped_generated,"__esModule",{value:!0}),dependenciesTyped_generated.typedDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesDenseMatrixClass_generated(),rt=requireDependenciesFractionClass_generated(),nt=requireFactoriesAny(),st={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,DenseMatrixDependencies:tt.DenseMatrixDependencies,FractionDependencies:rt.FractionDependencies,createTyped:nt.createTyped};return dependenciesTyped_generated.typedDependencies=st,dependenciesTyped_generated}var hasRequiredDependenciesAbs_generated;function requireDependenciesAbs_generated(){if(hasRequiredDependenciesAbs_generated)return dependenciesAbs_generated;hasRequiredDependenciesAbs_generated=1,Object.defineProperty(dependenciesAbs_generated,"__esModule",{value:!0}),dependenciesAbs_generated.absDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createAbs:_e.createAbs};return dependenciesAbs_generated.absDependencies=tt,dependenciesAbs_generated}var dependenciesAccessorNode_generated={},dependenciesNode_generated={},hasRequiredDependenciesNode_generated;function requireDependenciesNode_generated(){if(hasRequiredDependenciesNode_generated)return dependenciesNode_generated;hasRequiredDependenciesNode_generated=1,Object.defineProperty(dependenciesNode_generated,"__esModule",{value:!0}),dependenciesNode_generated.NodeDependencies=void 0;var et=requireFactoriesAny(),_e={createNode:et.createNode};return dependenciesNode_generated.NodeDependencies=_e,dependenciesNode_generated}var dependenciesSubset_generated={},dependenciesMatrix_generated={},dependenciesSparseMatrixClass_generated={},dependenciesEqualScalar_generated={},hasRequiredDependenciesEqualScalar_generated;function requireDependenciesEqualScalar_generated(){if(hasRequiredDependenciesEqualScalar_generated)return dependenciesEqualScalar_generated;hasRequiredDependenciesEqualScalar_generated=1,Object.defineProperty(dependenciesEqualScalar_generated,"__esModule",{value:!0}),dependenciesEqualScalar_generated.equalScalarDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createEqualScalar:_e.createEqualScalar};return dependenciesEqualScalar_generated.equalScalarDependencies=tt,dependenciesEqualScalar_generated}var hasRequiredDependenciesSparseMatrixClass_generated;function requireDependenciesSparseMatrixClass_generated(){if(hasRequiredDependenciesSparseMatrixClass_generated)return dependenciesSparseMatrixClass_generated;hasRequiredDependenciesSparseMatrixClass_generated=1,Object.defineProperty(dependenciesSparseMatrixClass_generated,"__esModule",{value:!0}),dependenciesSparseMatrixClass_generated.SparseMatrixDependencies=void 0;var et=requireDependenciesMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={MatrixDependencies:et.MatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,typedDependencies:tt.typedDependencies,createSparseMatrixClass:rt.createSparseMatrixClass};return dependenciesSparseMatrixClass_generated.SparseMatrixDependencies=nt,dependenciesSparseMatrixClass_generated}var hasRequiredDependenciesMatrix_generated;function requireDependenciesMatrix_generated(){if(hasRequiredDependenciesMatrix_generated)return dependenciesMatrix_generated;hasRequiredDependenciesMatrix_generated=1,Object.defineProperty(dependenciesMatrix_generated,"__esModule",{value:!0}),dependenciesMatrix_generated.matrixDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrixClass_generated(),tt=requireDependenciesSparseMatrixClass_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,MatrixDependencies:_e.MatrixDependencies,SparseMatrixDependencies:tt.SparseMatrixDependencies,typedDependencies:rt.typedDependencies,createMatrix:nt.createMatrix};return dependenciesMatrix_generated.matrixDependencies=st,dependenciesMatrix_generated}var hasRequiredDependenciesSubset_generated;function requireDependenciesSubset_generated(){if(hasRequiredDependenciesSubset_generated)return dependenciesSubset_generated;hasRequiredDependenciesSubset_generated=1,Object.defineProperty(dependenciesSubset_generated,"__esModule",{value:!0}),dependenciesSubset_generated.subsetDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createSubset:tt.createSubset};return dependenciesSubset_generated.subsetDependencies=rt,dependenciesSubset_generated}var hasRequiredDependenciesAccessorNode_generated;function requireDependenciesAccessorNode_generated(){if(hasRequiredDependenciesAccessorNode_generated)return dependenciesAccessorNode_generated;hasRequiredDependenciesAccessorNode_generated=1,Object.defineProperty(dependenciesAccessorNode_generated,"__esModule",{value:!0}),dependenciesAccessorNode_generated.AccessorNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireDependenciesSubset_generated(),tt=requireFactoriesAny(),rt={NodeDependencies:et.NodeDependencies,subsetDependencies:_e.subsetDependencies,createAccessorNode:tt.createAccessorNode};return dependenciesAccessorNode_generated.AccessorNodeDependencies=rt,dependenciesAccessorNode_generated}var dependenciesAcos_generated={},hasRequiredDependenciesAcos_generated;function requireDependenciesAcos_generated(){if(hasRequiredDependenciesAcos_generated)return dependenciesAcos_generated;hasRequiredDependenciesAcos_generated=1,Object.defineProperty(dependenciesAcos_generated,"__esModule",{value:!0}),dependenciesAcos_generated.acosDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createAcos:tt.createAcos};return dependenciesAcos_generated.acosDependencies=rt,dependenciesAcos_generated}var dependenciesAcosh_generated={},hasRequiredDependenciesAcosh_generated;function requireDependenciesAcosh_generated(){if(hasRequiredDependenciesAcosh_generated)return dependenciesAcosh_generated;hasRequiredDependenciesAcosh_generated=1,Object.defineProperty(dependenciesAcosh_generated,"__esModule",{value:!0}),dependenciesAcosh_generated.acoshDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createAcosh:tt.createAcosh};return dependenciesAcosh_generated.acoshDependencies=rt,dependenciesAcosh_generated}var dependenciesAcot_generated={},hasRequiredDependenciesAcot_generated;function requireDependenciesAcot_generated(){if(hasRequiredDependenciesAcot_generated)return dependenciesAcot_generated;hasRequiredDependenciesAcot_generated=1,Object.defineProperty(dependenciesAcot_generated,"__esModule",{value:!0}),dependenciesAcot_generated.acotDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createAcot:tt.createAcot};return dependenciesAcot_generated.acotDependencies=rt,dependenciesAcot_generated}var dependenciesAcoth_generated={},hasRequiredDependenciesAcoth_generated;function requireDependenciesAcoth_generated(){if(hasRequiredDependenciesAcoth_generated)return dependenciesAcoth_generated;hasRequiredDependenciesAcoth_generated=1,Object.defineProperty(dependenciesAcoth_generated,"__esModule",{value:!0}),dependenciesAcoth_generated.acothDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,typedDependencies:tt.typedDependencies,createAcoth:rt.createAcoth};return dependenciesAcoth_generated.acothDependencies=nt,dependenciesAcoth_generated}var dependenciesAcsc_generated={},hasRequiredDependenciesAcsc_generated;function requireDependenciesAcsc_generated(){if(hasRequiredDependenciesAcsc_generated)return dependenciesAcsc_generated;hasRequiredDependenciesAcsc_generated=1,Object.defineProperty(dependenciesAcsc_generated,"__esModule",{value:!0}),dependenciesAcsc_generated.acscDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,typedDependencies:tt.typedDependencies,createAcsc:rt.createAcsc};return dependenciesAcsc_generated.acscDependencies=nt,dependenciesAcsc_generated}var dependenciesAcsch_generated={},hasRequiredDependenciesAcsch_generated;function requireDependenciesAcsch_generated(){if(hasRequiredDependenciesAcsch_generated)return dependenciesAcsch_generated;hasRequiredDependenciesAcsch_generated=1,Object.defineProperty(dependenciesAcsch_generated,"__esModule",{value:!0}),dependenciesAcsch_generated.acschDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createAcsch:tt.createAcsch};return dependenciesAcsch_generated.acschDependencies=rt,dependenciesAcsch_generated}var dependenciesAdd_generated={},dependenciesAddScalar_generated={},hasRequiredDependenciesAddScalar_generated;function requireDependenciesAddScalar_generated(){if(hasRequiredDependenciesAddScalar_generated)return dependenciesAddScalar_generated;hasRequiredDependenciesAddScalar_generated=1,Object.defineProperty(dependenciesAddScalar_generated,"__esModule",{value:!0}),dependenciesAddScalar_generated.addScalarDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createAddScalar:_e.createAddScalar};return dependenciesAddScalar_generated.addScalarDependencies=tt,dependenciesAddScalar_generated}var hasRequiredDependenciesAdd_generated;function requireDependenciesAdd_generated(){if(hasRequiredDependenciesAdd_generated)return dependenciesAdd_generated;hasRequiredDependenciesAdd_generated=1,Object.defineProperty(dependenciesAdd_generated,"__esModule",{value:!0}),dependenciesAdd_generated.addDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesSparseMatrixClass_generated(),tt=requireDependenciesAddScalar_generated(),rt=requireDependenciesEqualScalar_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,SparseMatrixDependencies:_e.SparseMatrixDependencies,addScalarDependencies:tt.addScalarDependencies,equalScalarDependencies:rt.equalScalarDependencies,matrixDependencies:nt.matrixDependencies,typedDependencies:st.typedDependencies,createAdd:dt.createAdd};return dependenciesAdd_generated.addDependencies=ft,dependenciesAdd_generated}var dependenciesAnd_generated={},dependenciesNot_generated={},hasRequiredDependenciesNot_generated;function requireDependenciesNot_generated(){if(hasRequiredDependenciesNot_generated)return dependenciesNot_generated;hasRequiredDependenciesNot_generated=1,Object.defineProperty(dependenciesNot_generated,"__esModule",{value:!0}),dependenciesNot_generated.notDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createNot:_e.createNot};return dependenciesNot_generated.notDependencies=tt,dependenciesNot_generated}var dependenciesZeros_generated={},hasRequiredDependenciesZeros_generated;function requireDependenciesZeros_generated(){if(hasRequiredDependenciesZeros_generated)return dependenciesZeros_generated;hasRequiredDependenciesZeros_generated=1,Object.defineProperty(dependenciesZeros_generated,"__esModule",{value:!0}),dependenciesZeros_generated.zerosDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createZeros:rt.createZeros};return dependenciesZeros_generated.zerosDependencies=nt,dependenciesZeros_generated}var hasRequiredDependenciesAnd_generated;function requireDependenciesAnd_generated(){if(hasRequiredDependenciesAnd_generated)return dependenciesAnd_generated;hasRequiredDependenciesAnd_generated=1,Object.defineProperty(dependenciesAnd_generated,"__esModule",{value:!0}),dependenciesAnd_generated.andDependencies=void 0;var et=requireDependenciesEqualScalar_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesNot_generated(),rt=requireDependenciesTyped_generated(),nt=requireDependenciesZeros_generated(),st=requireFactoriesAny(),dt={equalScalarDependencies:et.equalScalarDependencies,matrixDependencies:_e.matrixDependencies,notDependencies:tt.notDependencies,typedDependencies:rt.typedDependencies,zerosDependencies:nt.zerosDependencies,createAnd:st.createAnd};return dependenciesAnd_generated.andDependencies=dt,dependenciesAnd_generated}var dependenciesApply_generated={},dependenciesIsInteger_generated={},hasRequiredDependenciesIsInteger_generated;function requireDependenciesIsInteger_generated(){if(hasRequiredDependenciesIsInteger_generated)return dependenciesIsInteger_generated;hasRequiredDependenciesIsInteger_generated=1,Object.defineProperty(dependenciesIsInteger_generated,"__esModule",{value:!0}),dependenciesIsInteger_generated.isIntegerDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsInteger:_e.createIsInteger};return dependenciesIsInteger_generated.isIntegerDependencies=tt,dependenciesIsInteger_generated}var hasRequiredDependenciesApply_generated;function requireDependenciesApply_generated(){if(hasRequiredDependenciesApply_generated)return dependenciesApply_generated;hasRequiredDependenciesApply_generated=1,Object.defineProperty(dependenciesApply_generated,"__esModule",{value:!0}),dependenciesApply_generated.applyDependencies=void 0;var et=requireDependenciesIsInteger_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={isIntegerDependencies:et.isIntegerDependencies,typedDependencies:_e.typedDependencies,createApply:tt.createApply};return dependenciesApply_generated.applyDependencies=rt,dependenciesApply_generated}var dependenciesApplyTransform_generated={},hasRequiredDependenciesApplyTransform_generated;function requireDependenciesApplyTransform_generated(){if(hasRequiredDependenciesApplyTransform_generated)return dependenciesApplyTransform_generated;hasRequiredDependenciesApplyTransform_generated=1,Object.defineProperty(dependenciesApplyTransform_generated,"__esModule",{value:!0}),dependenciesApplyTransform_generated.applyTransformDependencies=void 0;var et=requireDependenciesIsInteger_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={isIntegerDependencies:et.isIntegerDependencies,typedDependencies:_e.typedDependencies,createApplyTransform:tt.createApplyTransform};return dependenciesApplyTransform_generated.applyTransformDependencies=rt,dependenciesApplyTransform_generated}var dependenciesArg_generated={},hasRequiredDependenciesArg_generated;function requireDependenciesArg_generated(){if(hasRequiredDependenciesArg_generated)return dependenciesArg_generated;hasRequiredDependenciesArg_generated=1,Object.defineProperty(dependenciesArg_generated,"__esModule",{value:!0}),dependenciesArg_generated.argDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createArg:_e.createArg};return dependenciesArg_generated.argDependencies=tt,dependenciesArg_generated}var dependenciesArrayNode_generated={},hasRequiredDependenciesArrayNode_generated;function requireDependenciesArrayNode_generated(){if(hasRequiredDependenciesArrayNode_generated)return dependenciesArrayNode_generated;hasRequiredDependenciesArrayNode_generated=1,Object.defineProperty(dependenciesArrayNode_generated,"__esModule",{value:!0}),dependenciesArrayNode_generated.ArrayNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createArrayNode:_e.createArrayNode};return dependenciesArrayNode_generated.ArrayNodeDependencies=tt,dependenciesArrayNode_generated}var dependenciesAsec_generated={},hasRequiredDependenciesAsec_generated;function requireDependenciesAsec_generated(){if(hasRequiredDependenciesAsec_generated)return dependenciesAsec_generated;hasRequiredDependenciesAsec_generated=1,Object.defineProperty(dependenciesAsec_generated,"__esModule",{value:!0}),dependenciesAsec_generated.asecDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,typedDependencies:tt.typedDependencies,createAsec:rt.createAsec};return dependenciesAsec_generated.asecDependencies=nt,dependenciesAsec_generated}var dependenciesAsech_generated={},hasRequiredDependenciesAsech_generated;function requireDependenciesAsech_generated(){if(hasRequiredDependenciesAsech_generated)return dependenciesAsech_generated;hasRequiredDependenciesAsech_generated=1,Object.defineProperty(dependenciesAsech_generated,"__esModule",{value:!0}),dependenciesAsech_generated.asechDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,typedDependencies:tt.typedDependencies,createAsech:rt.createAsech};return dependenciesAsech_generated.asechDependencies=nt,dependenciesAsech_generated}var dependenciesAsin_generated={},hasRequiredDependenciesAsin_generated;function requireDependenciesAsin_generated(){if(hasRequiredDependenciesAsin_generated)return dependenciesAsin_generated;hasRequiredDependenciesAsin_generated=1,Object.defineProperty(dependenciesAsin_generated,"__esModule",{value:!0}),dependenciesAsin_generated.asinDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createAsin:tt.createAsin};return dependenciesAsin_generated.asinDependencies=rt,dependenciesAsin_generated}var dependenciesAsinh_generated={},hasRequiredDependenciesAsinh_generated;function requireDependenciesAsinh_generated(){if(hasRequiredDependenciesAsinh_generated)return dependenciesAsinh_generated;hasRequiredDependenciesAsinh_generated=1,Object.defineProperty(dependenciesAsinh_generated,"__esModule",{value:!0}),dependenciesAsinh_generated.asinhDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createAsinh:_e.createAsinh};return dependenciesAsinh_generated.asinhDependencies=tt,dependenciesAsinh_generated}var dependenciesAssignmentNode_generated={},hasRequiredDependenciesAssignmentNode_generated;function requireDependenciesAssignmentNode_generated(){if(hasRequiredDependenciesAssignmentNode_generated)return dependenciesAssignmentNode_generated;hasRequiredDependenciesAssignmentNode_generated=1,Object.defineProperty(dependenciesAssignmentNode_generated,"__esModule",{value:!0}),dependenciesAssignmentNode_generated.AssignmentNodeDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesNode_generated(),tt=requireDependenciesSubset_generated(),rt=requireFactoriesAny(),nt={matrixDependencies:et.matrixDependencies,NodeDependencies:_e.NodeDependencies,subsetDependencies:tt.subsetDependencies,createAssignmentNode:rt.createAssignmentNode};return dependenciesAssignmentNode_generated.AssignmentNodeDependencies=nt,dependenciesAssignmentNode_generated}var dependenciesAtan_generated={},hasRequiredDependenciesAtan_generated;function requireDependenciesAtan_generated(){if(hasRequiredDependenciesAtan_generated)return dependenciesAtan_generated;hasRequiredDependenciesAtan_generated=1,Object.defineProperty(dependenciesAtan_generated,"__esModule",{value:!0}),dependenciesAtan_generated.atanDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createAtan:_e.createAtan};return dependenciesAtan_generated.atanDependencies=tt,dependenciesAtan_generated}var dependenciesAtan2_generated={},hasRequiredDependenciesAtan2_generated;function requireDependenciesAtan2_generated(){if(hasRequiredDependenciesAtan2_generated)return dependenciesAtan2_generated;hasRequiredDependenciesAtan2_generated=1,Object.defineProperty(dependenciesAtan2_generated,"__esModule",{value:!0}),dependenciesAtan2_generated.atan2Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,createAtan2:st.createAtan2};return dependenciesAtan2_generated.atan2Dependencies=dt,dependenciesAtan2_generated}var dependenciesAtanh_generated={},hasRequiredDependenciesAtanh_generated;function requireDependenciesAtanh_generated(){if(hasRequiredDependenciesAtanh_generated)return dependenciesAtanh_generated;hasRequiredDependenciesAtanh_generated=1,Object.defineProperty(dependenciesAtanh_generated,"__esModule",{value:!0}),dependenciesAtanh_generated.atanhDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createAtanh:tt.createAtanh};return dependenciesAtanh_generated.atanhDependencies=rt,dependenciesAtanh_generated}var dependenciesAtomicMass_generated={},dependenciesUnitClass_generated={},dependenciesDivideScalar_generated={},dependenciesNumeric_generated={},dependenciesBignumber_generated={},hasRequiredDependenciesBignumber_generated;function requireDependenciesBignumber_generated(){if(hasRequiredDependenciesBignumber_generated)return dependenciesBignumber_generated;hasRequiredDependenciesBignumber_generated=1,Object.defineProperty(dependenciesBignumber_generated,"__esModule",{value:!0}),dependenciesBignumber_generated.bignumberDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createBignumber:tt.createBignumber};return dependenciesBignumber_generated.bignumberDependencies=rt,dependenciesBignumber_generated}var dependenciesFraction_generated={},hasRequiredDependenciesFraction_generated;function requireDependenciesFraction_generated(){if(hasRequiredDependenciesFraction_generated)return dependenciesFraction_generated;hasRequiredDependenciesFraction_generated=1,Object.defineProperty(dependenciesFraction_generated,"__esModule",{value:!0}),dependenciesFraction_generated.fractionDependencies=void 0;var et=requireDependenciesFractionClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={FractionDependencies:et.FractionDependencies,typedDependencies:_e.typedDependencies,createFraction:tt.createFraction};return dependenciesFraction_generated.fractionDependencies=rt,dependenciesFraction_generated}var dependenciesNumber_generated={},hasRequiredDependenciesNumber_generated;function requireDependenciesNumber_generated(){if(hasRequiredDependenciesNumber_generated)return dependenciesNumber_generated;hasRequiredDependenciesNumber_generated=1,Object.defineProperty(dependenciesNumber_generated,"__esModule",{value:!0}),dependenciesNumber_generated.numberDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createNumber:_e.createNumber};return dependenciesNumber_generated.numberDependencies=tt,dependenciesNumber_generated}var hasRequiredDependenciesNumeric_generated;function requireDependenciesNumeric_generated(){if(hasRequiredDependenciesNumeric_generated)return dependenciesNumeric_generated;hasRequiredDependenciesNumeric_generated=1,Object.defineProperty(dependenciesNumeric_generated,"__esModule",{value:!0}),dependenciesNumeric_generated.numericDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesFraction_generated(),tt=requireDependenciesNumber_generated(),rt=requireFactoriesAny(),nt={bignumberDependencies:et.bignumberDependencies,fractionDependencies:_e.fractionDependencies,numberDependencies:tt.numberDependencies,createNumeric:rt.createNumeric};return dependenciesNumeric_generated.numericDependencies=nt,dependenciesNumeric_generated}var hasRequiredDependenciesDivideScalar_generated;function requireDependenciesDivideScalar_generated(){if(hasRequiredDependenciesDivideScalar_generated)return dependenciesDivideScalar_generated;hasRequiredDependenciesDivideScalar_generated=1,Object.defineProperty(dependenciesDivideScalar_generated,"__esModule",{value:!0}),dependenciesDivideScalar_generated.divideScalarDependencies=void 0;var et=requireDependenciesNumeric_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={numericDependencies:et.numericDependencies,typedDependencies:_e.typedDependencies,createDivideScalar:tt.createDivideScalar};return dependenciesDivideScalar_generated.divideScalarDependencies=rt,dependenciesDivideScalar_generated}var dependenciesEqual_generated={},hasRequiredDependenciesEqual_generated;function requireDependenciesEqual_generated(){if(hasRequiredDependenciesEqual_generated)return dependenciesEqual_generated;hasRequiredDependenciesEqual_generated=1,Object.defineProperty(dependenciesEqual_generated,"__esModule",{value:!0}),dependenciesEqual_generated.equalDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createEqual:nt.createEqual};return dependenciesEqual_generated.equalDependencies=st,dependenciesEqual_generated}var dependenciesFix_generated={},dependenciesCeil_generated={},dependenciesRound_generated={},hasRequiredDependenciesRound_generated;function requireDependenciesRound_generated(){if(hasRequiredDependenciesRound_generated)return dependenciesRound_generated;hasRequiredDependenciesRound_generated=1,Object.defineProperty(dependenciesRound_generated,"__esModule",{value:!0}),dependenciesRound_generated.roundDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireDependenciesZeros_generated(),dt=requireFactoriesAny(),ft={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,zerosDependencies:st.zerosDependencies,createRound:dt.createRound};return dependenciesRound_generated.roundDependencies=ft,dependenciesRound_generated}var hasRequiredDependenciesCeil_generated;function requireDependenciesCeil_generated(){if(hasRequiredDependenciesCeil_generated)return dependenciesCeil_generated;hasRequiredDependenciesCeil_generated=1,Object.defineProperty(dependenciesCeil_generated,"__esModule",{value:!0}),dependenciesCeil_generated.ceilDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesRound_generated(),nt=requireDependenciesTyped_generated(),st=requireDependenciesZeros_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,roundDependencies:rt.roundDependencies,typedDependencies:nt.typedDependencies,zerosDependencies:st.zerosDependencies,createCeil:dt.createCeil};return dependenciesCeil_generated.ceilDependencies=ft,dependenciesCeil_generated}var dependenciesFloor_generated={},hasRequiredDependenciesFloor_generated;function requireDependenciesFloor_generated(){if(hasRequiredDependenciesFloor_generated)return dependenciesFloor_generated;hasRequiredDependenciesFloor_generated=1,Object.defineProperty(dependenciesFloor_generated,"__esModule",{value:!0}),dependenciesFloor_generated.floorDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesRound_generated(),nt=requireDependenciesTyped_generated(),st=requireDependenciesZeros_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,roundDependencies:rt.roundDependencies,typedDependencies:nt.typedDependencies,zerosDependencies:st.zerosDependencies,createFloor:dt.createFloor};return dependenciesFloor_generated.floorDependencies=ft,dependenciesFloor_generated}var hasRequiredDependenciesFix_generated;function requireDependenciesFix_generated(){if(hasRequiredDependenciesFix_generated)return dependenciesFix_generated;hasRequiredDependenciesFix_generated=1,Object.defineProperty(dependenciesFix_generated,"__esModule",{value:!0}),dependenciesFix_generated.fixDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesCeil_generated(),rt=requireDependenciesEqualScalar_generated(),nt=requireDependenciesFloor_generated(),st=requireDependenciesMatrix_generated(),dt=requireDependenciesTyped_generated(),ft=requireDependenciesZeros_generated(),ht=requireFactoriesAny(),mt={ComplexDependencies:et.ComplexDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,ceilDependencies:tt.ceilDependencies,equalScalarDependencies:rt.equalScalarDependencies,floorDependencies:nt.floorDependencies,matrixDependencies:st.matrixDependencies,typedDependencies:dt.typedDependencies,zerosDependencies:ft.zerosDependencies,createFix:ht.createFix};return dependenciesFix_generated.fixDependencies=mt,dependenciesFix_generated}var dependenciesFormat_generated={},hasRequiredDependenciesFormat_generated;function requireDependenciesFormat_generated(){if(hasRequiredDependenciesFormat_generated)return dependenciesFormat_generated;hasRequiredDependenciesFormat_generated=1,Object.defineProperty(dependenciesFormat_generated,"__esModule",{value:!0}),dependenciesFormat_generated.formatDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createFormat:_e.createFormat};return dependenciesFormat_generated.formatDependencies=tt,dependenciesFormat_generated}var dependenciesIsNumeric_generated={},hasRequiredDependenciesIsNumeric_generated;function requireDependenciesIsNumeric_generated(){if(hasRequiredDependenciesIsNumeric_generated)return dependenciesIsNumeric_generated;hasRequiredDependenciesIsNumeric_generated=1,Object.defineProperty(dependenciesIsNumeric_generated,"__esModule",{value:!0}),dependenciesIsNumeric_generated.isNumericDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsNumeric:_e.createIsNumeric};return dependenciesIsNumeric_generated.isNumericDependencies=tt,dependenciesIsNumeric_generated}var dependenciesMultiplyScalar_generated={},hasRequiredDependenciesMultiplyScalar_generated;function requireDependenciesMultiplyScalar_generated(){if(hasRequiredDependenciesMultiplyScalar_generated)return dependenciesMultiplyScalar_generated;hasRequiredDependenciesMultiplyScalar_generated=1,Object.defineProperty(dependenciesMultiplyScalar_generated,"__esModule",{value:!0}),dependenciesMultiplyScalar_generated.multiplyScalarDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createMultiplyScalar:_e.createMultiplyScalar};return dependenciesMultiplyScalar_generated.multiplyScalarDependencies=tt,dependenciesMultiplyScalar_generated}var dependenciesPow_generated={},dependenciesIdentity_generated={},hasRequiredDependenciesIdentity_generated;function requireDependenciesIdentity_generated(){if(hasRequiredDependenciesIdentity_generated)return dependenciesIdentity_generated;hasRequiredDependenciesIdentity_generated=1,Object.defineProperty(dependenciesIdentity_generated,"__esModule",{value:!0}),dependenciesIdentity_generated.identityDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesSparseMatrixClass_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,SparseMatrixDependencies:tt.SparseMatrixDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,createIdentity:st.createIdentity};return dependenciesIdentity_generated.identityDependencies=dt,dependenciesIdentity_generated}var dependenciesInv_generated={},dependenciesDet_generated={},dependenciesIsZero_generated={},hasRequiredDependenciesIsZero_generated;function requireDependenciesIsZero_generated(){if(hasRequiredDependenciesIsZero_generated)return dependenciesIsZero_generated;hasRequiredDependenciesIsZero_generated=1,Object.defineProperty(dependenciesIsZero_generated,"__esModule",{value:!0}),dependenciesIsZero_generated.isZeroDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsZero:_e.createIsZero};return dependenciesIsZero_generated.isZeroDependencies=tt,dependenciesIsZero_generated}var dependenciesMultiply_generated={},dependenciesDot_generated={},dependenciesConj_generated={},hasRequiredDependenciesConj_generated;function requireDependenciesConj_generated(){if(hasRequiredDependenciesConj_generated)return dependenciesConj_generated;hasRequiredDependenciesConj_generated=1,Object.defineProperty(dependenciesConj_generated,"__esModule",{value:!0}),dependenciesConj_generated.conjDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createConj:_e.createConj};return dependenciesConj_generated.conjDependencies=tt,dependenciesConj_generated}var dependenciesSize_generated={},hasRequiredDependenciesSize_generated;function requireDependenciesSize_generated(){if(hasRequiredDependenciesSize_generated)return dependenciesSize_generated;hasRequiredDependenciesSize_generated=1,Object.defineProperty(dependenciesSize_generated,"__esModule",{value:!0}),dependenciesSize_generated.sizeDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createSize:tt.createSize};return dependenciesSize_generated.sizeDependencies=rt,dependenciesSize_generated}var hasRequiredDependenciesDot_generated;function requireDependenciesDot_generated(){if(hasRequiredDependenciesDot_generated)return dependenciesDot_generated;hasRequiredDependenciesDot_generated=1,Object.defineProperty(dependenciesDot_generated,"__esModule",{value:!0}),dependenciesDot_generated.dotDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesConj_generated(),tt=requireDependenciesMultiplyScalar_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={addScalarDependencies:et.addScalarDependencies,conjDependencies:_e.conjDependencies,multiplyScalarDependencies:tt.multiplyScalarDependencies,sizeDependencies:rt.sizeDependencies,typedDependencies:nt.typedDependencies,createDot:st.createDot};return dependenciesDot_generated.dotDependencies=dt,dependenciesDot_generated}var hasRequiredDependenciesMultiply_generated;function requireDependenciesMultiply_generated(){if(hasRequiredDependenciesMultiply_generated)return dependenciesMultiply_generated;hasRequiredDependenciesMultiply_generated=1,Object.defineProperty(dependenciesMultiply_generated,"__esModule",{value:!0}),dependenciesMultiply_generated.multiplyDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesDot_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={addScalarDependencies:et.addScalarDependencies,dotDependencies:_e.dotDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,typedDependencies:st.typedDependencies,createMultiply:dt.createMultiply};return dependenciesMultiply_generated.multiplyDependencies=ft,dependenciesMultiply_generated}var dependenciesSubtract_generated={},dependenciesUnaryMinus_generated={},hasRequiredDependenciesUnaryMinus_generated;function requireDependenciesUnaryMinus_generated(){if(hasRequiredDependenciesUnaryMinus_generated)return dependenciesUnaryMinus_generated;hasRequiredDependenciesUnaryMinus_generated=1,Object.defineProperty(dependenciesUnaryMinus_generated,"__esModule",{value:!0}),dependenciesUnaryMinus_generated.unaryMinusDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createUnaryMinus:_e.createUnaryMinus};return dependenciesUnaryMinus_generated.unaryMinusDependencies=tt,dependenciesUnaryMinus_generated}var hasRequiredDependenciesSubtract_generated;function requireDependenciesSubtract_generated(){if(hasRequiredDependenciesSubtract_generated)return dependenciesSubtract_generated;hasRequiredDependenciesSubtract_generated=1,Object.defineProperty(dependenciesSubtract_generated,"__esModule",{value:!0}),dependenciesSubtract_generated.subtractDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireDependenciesUnaryMinus_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,addScalarDependencies:_e.addScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,unaryMinusDependencies:st.unaryMinusDependencies,createSubtract:dt.createSubtract};return dependenciesSubtract_generated.subtractDependencies=ft,dependenciesSubtract_generated}var hasRequiredDependenciesDet_generated;function requireDependenciesDet_generated(){if(hasRequiredDependenciesDet_generated)return dependenciesDet_generated;hasRequiredDependenciesDet_generated=1,Object.defineProperty(dependenciesDet_generated,"__esModule",{value:!0}),dependenciesDet_generated.detDependencies=void 0;var et=requireDependenciesDivideScalar_generated(),_e=requireDependenciesIsZero_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesMultiply_generated(),nt=requireDependenciesSubtract_generated(),st=requireDependenciesTyped_generated(),dt=requireDependenciesUnaryMinus_generated(),ft=requireFactoriesAny(),ht={divideScalarDependencies:et.divideScalarDependencies,isZeroDependencies:_e.isZeroDependencies,matrixDependencies:tt.matrixDependencies,multiplyDependencies:rt.multiplyDependencies,subtractDependencies:nt.subtractDependencies,typedDependencies:st.typedDependencies,unaryMinusDependencies:dt.unaryMinusDependencies,createDet:ft.createDet};return dependenciesDet_generated.detDependencies=ht,dependenciesDet_generated}var hasRequiredDependenciesInv_generated;function requireDependenciesInv_generated(){if(hasRequiredDependenciesInv_generated)return dependenciesInv_generated;hasRequiredDependenciesInv_generated=1,Object.defineProperty(dependenciesInv_generated,"__esModule",{value:!0}),dependenciesInv_generated.invDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesDet_generated(),rt=requireDependenciesDivideScalar_generated(),nt=requireDependenciesIdentity_generated(),st=requireDependenciesMatrix_generated(),dt=requireDependenciesMultiply_generated(),ft=requireDependenciesTyped_generated(),ht=requireDependenciesUnaryMinus_generated(),mt=requireFactoriesAny(),bt={absDependencies:et.absDependencies,addScalarDependencies:_e.addScalarDependencies,detDependencies:tt.detDependencies,divideScalarDependencies:rt.divideScalarDependencies,identityDependencies:nt.identityDependencies,matrixDependencies:st.matrixDependencies,multiplyDependencies:dt.multiplyDependencies,typedDependencies:ft.typedDependencies,unaryMinusDependencies:ht.unaryMinusDependencies,createInv:mt.createInv};return dependenciesInv_generated.invDependencies=bt,dependenciesInv_generated}var hasRequiredDependenciesPow_generated;function requireDependenciesPow_generated(){if(hasRequiredDependenciesPow_generated)return dependenciesPow_generated;hasRequiredDependenciesPow_generated=1,Object.defineProperty(dependenciesPow_generated,"__esModule",{value:!0}),dependenciesPow_generated.powDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesFraction_generated(),tt=requireDependenciesIdentity_generated(),rt=requireDependenciesInv_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesMultiply_generated(),dt=requireDependenciesNumber_generated(),ft=requireDependenciesTyped_generated(),ht=requireFactoriesAny(),mt={ComplexDependencies:et.ComplexDependencies,fractionDependencies:_e.fractionDependencies,identityDependencies:tt.identityDependencies,invDependencies:rt.invDependencies,matrixDependencies:nt.matrixDependencies,multiplyDependencies:st.multiplyDependencies,numberDependencies:dt.numberDependencies,typedDependencies:ft.typedDependencies,createPow:ht.createPow};return dependenciesPow_generated.powDependencies=mt,dependenciesPow_generated}var hasRequiredDependenciesUnitClass_generated;function requireDependenciesUnitClass_generated(){if(hasRequiredDependenciesUnitClass_generated)return dependenciesUnitClass_generated;hasRequiredDependenciesUnitClass_generated=1,Object.defineProperty(dependenciesUnitClass_generated,"__esModule",{value:!0}),dependenciesUnitClass_generated.UnitDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesFractionClass_generated(),rt=requireDependenciesAbs_generated(),nt=requireDependenciesAddScalar_generated(),st=requireDependenciesDivideScalar_generated(),dt=requireDependenciesEqual_generated(),ft=requireDependenciesFix_generated(),ht=requireDependenciesFormat_generated(),mt=requireDependenciesIsNumeric_generated(),bt=requireDependenciesMultiplyScalar_generated(),St=requireDependenciesNumber_generated(),Et=requireDependenciesPow_generated(),Ct=requireDependenciesRound_generated(),Rt=requireDependenciesSubtract_generated(),Tt=requireFactoriesAny(),wt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,FractionDependencies:tt.FractionDependencies,absDependencies:rt.absDependencies,addScalarDependencies:nt.addScalarDependencies,divideScalarDependencies:st.divideScalarDependencies,equalDependencies:dt.equalDependencies,fixDependencies:ft.fixDependencies,formatDependencies:ht.formatDependencies,isNumericDependencies:mt.isNumericDependencies,multiplyScalarDependencies:bt.multiplyScalarDependencies,numberDependencies:St.numberDependencies,powDependencies:Et.powDependencies,roundDependencies:Ct.roundDependencies,subtractDependencies:Rt.subtractDependencies,createUnitClass:Tt.createUnitClass};return dependenciesUnitClass_generated.UnitDependencies=wt,dependenciesUnitClass_generated}var hasRequiredDependenciesAtomicMass_generated;function requireDependenciesAtomicMass_generated(){if(hasRequiredDependenciesAtomicMass_generated)return dependenciesAtomicMass_generated;hasRequiredDependenciesAtomicMass_generated=1,Object.defineProperty(dependenciesAtomicMass_generated,"__esModule",{value:!0}),dependenciesAtomicMass_generated.atomicMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createAtomicMass:tt.createAtomicMass};return dependenciesAtomicMass_generated.atomicMassDependencies=rt,dependenciesAtomicMass_generated}var dependenciesAvogadro_generated={},hasRequiredDependenciesAvogadro_generated;function requireDependenciesAvogadro_generated(){if(hasRequiredDependenciesAvogadro_generated)return dependenciesAvogadro_generated;hasRequiredDependenciesAvogadro_generated=1,Object.defineProperty(dependenciesAvogadro_generated,"__esModule",{value:!0}),dependenciesAvogadro_generated.avogadroDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createAvogadro:tt.createAvogadro};return dependenciesAvogadro_generated.avogadroDependencies=rt,dependenciesAvogadro_generated}var dependenciesBellNumbers_generated={},dependenciesIsNegative_generated={},hasRequiredDependenciesIsNegative_generated;function requireDependenciesIsNegative_generated(){if(hasRequiredDependenciesIsNegative_generated)return dependenciesIsNegative_generated;hasRequiredDependenciesIsNegative_generated=1,Object.defineProperty(dependenciesIsNegative_generated,"__esModule",{value:!0}),dependenciesIsNegative_generated.isNegativeDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsNegative:_e.createIsNegative};return dependenciesIsNegative_generated.isNegativeDependencies=tt,dependenciesIsNegative_generated}var dependenciesStirlingS2_generated={},dependenciesCombinations_generated={},hasRequiredDependenciesCombinations_generated;function requireDependenciesCombinations_generated(){if(hasRequiredDependenciesCombinations_generated)return dependenciesCombinations_generated;hasRequiredDependenciesCombinations_generated=1,Object.defineProperty(dependenciesCombinations_generated,"__esModule",{value:!0}),dependenciesCombinations_generated.combinationsDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createCombinations:_e.createCombinations};return dependenciesCombinations_generated.combinationsDependencies=tt,dependenciesCombinations_generated}var dependenciesFactorial_generated={},dependenciesGamma_generated={},hasRequiredDependenciesGamma_generated;function requireDependenciesGamma_generated(){if(hasRequiredDependenciesGamma_generated)return dependenciesGamma_generated;hasRequiredDependenciesGamma_generated=1,Object.defineProperty(dependenciesGamma_generated,"__esModule",{value:!0}),dependenciesGamma_generated.gammaDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesMultiplyScalar_generated(),rt=requireDependenciesPow_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,multiplyScalarDependencies:tt.multiplyScalarDependencies,powDependencies:rt.powDependencies,typedDependencies:nt.typedDependencies,createGamma:st.createGamma};return dependenciesGamma_generated.gammaDependencies=dt,dependenciesGamma_generated}var hasRequiredDependenciesFactorial_generated;function requireDependenciesFactorial_generated(){if(hasRequiredDependenciesFactorial_generated)return dependenciesFactorial_generated;hasRequiredDependenciesFactorial_generated=1,Object.defineProperty(dependenciesFactorial_generated,"__esModule",{value:!0}),dependenciesFactorial_generated.factorialDependencies=void 0;var et=requireDependenciesGamma_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={gammaDependencies:et.gammaDependencies,typedDependencies:_e.typedDependencies,createFactorial:tt.createFactorial};return dependenciesFactorial_generated.factorialDependencies=rt,dependenciesFactorial_generated}var dependenciesLarger_generated={},hasRequiredDependenciesLarger_generated;function requireDependenciesLarger_generated(){if(hasRequiredDependenciesLarger_generated)return dependenciesLarger_generated;hasRequiredDependenciesLarger_generated=1,Object.defineProperty(dependenciesLarger_generated,"__esModule",{value:!0}),dependenciesLarger_generated.largerDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createLarger:rt.createLarger};return dependenciesLarger_generated.largerDependencies=nt,dependenciesLarger_generated}var hasRequiredDependenciesStirlingS2_generated;function requireDependenciesStirlingS2_generated(){if(hasRequiredDependenciesStirlingS2_generated)return dependenciesStirlingS2_generated;hasRequiredDependenciesStirlingS2_generated=1,Object.defineProperty(dependenciesStirlingS2_generated,"__esModule",{value:!0}),dependenciesStirlingS2_generated.stirlingS2Dependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesCombinations_generated(),rt=requireDependenciesDivideScalar_generated(),nt=requireDependenciesFactorial_generated(),st=requireDependenciesIsInteger_generated(),dt=requireDependenciesIsNegative_generated(),ft=requireDependenciesLarger_generated(),ht=requireDependenciesMultiplyScalar_generated(),mt=requireDependenciesNumber_generated(),bt=requireDependenciesPow_generated(),St=requireDependenciesSubtract_generated(),Et=requireDependenciesTyped_generated(),Ct=requireFactoriesAny(),Rt={bignumberDependencies:et.bignumberDependencies,addScalarDependencies:_e.addScalarDependencies,combinationsDependencies:tt.combinationsDependencies,divideScalarDependencies:rt.divideScalarDependencies,factorialDependencies:nt.factorialDependencies,isIntegerDependencies:st.isIntegerDependencies,isNegativeDependencies:dt.isNegativeDependencies,largerDependencies:ft.largerDependencies,multiplyScalarDependencies:ht.multiplyScalarDependencies,numberDependencies:mt.numberDependencies,powDependencies:bt.powDependencies,subtractDependencies:St.subtractDependencies,typedDependencies:Et.typedDependencies,createStirlingS2:Ct.createStirlingS2};return dependenciesStirlingS2_generated.stirlingS2Dependencies=Rt,dependenciesStirlingS2_generated}var hasRequiredDependenciesBellNumbers_generated;function requireDependenciesBellNumbers_generated(){if(hasRequiredDependenciesBellNumbers_generated)return dependenciesBellNumbers_generated;hasRequiredDependenciesBellNumbers_generated=1,Object.defineProperty(dependenciesBellNumbers_generated,"__esModule",{value:!0}),dependenciesBellNumbers_generated.bellNumbersDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesIsInteger_generated(),tt=requireDependenciesIsNegative_generated(),rt=requireDependenciesStirlingS2_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={addScalarDependencies:et.addScalarDependencies,isIntegerDependencies:_e.isIntegerDependencies,isNegativeDependencies:tt.isNegativeDependencies,stirlingS2Dependencies:rt.stirlingS2Dependencies,typedDependencies:nt.typedDependencies,createBellNumbers:st.createBellNumbers};return dependenciesBellNumbers_generated.bellNumbersDependencies=dt,dependenciesBellNumbers_generated}var dependenciesBin_generated={},hasRequiredDependenciesBin_generated;function requireDependenciesBin_generated(){if(hasRequiredDependenciesBin_generated)return dependenciesBin_generated;hasRequiredDependenciesBin_generated=1,Object.defineProperty(dependenciesBin_generated,"__esModule",{value:!0}),dependenciesBin_generated.binDependencies=void 0;var et=requireDependenciesFormat_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={formatDependencies:et.formatDependencies,typedDependencies:_e.typedDependencies,createBin:tt.createBin};return dependenciesBin_generated.binDependencies=rt,dependenciesBin_generated}var dependenciesBitAnd_generated={},hasRequiredDependenciesBitAnd_generated;function requireDependenciesBitAnd_generated(){if(hasRequiredDependenciesBitAnd_generated)return dependenciesBitAnd_generated;hasRequiredDependenciesBitAnd_generated=1,Object.defineProperty(dependenciesBitAnd_generated,"__esModule",{value:!0}),dependenciesBitAnd_generated.bitAndDependencies=void 0;var et=requireDependenciesEqualScalar_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={equalScalarDependencies:et.equalScalarDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createBitAnd:rt.createBitAnd};return dependenciesBitAnd_generated.bitAndDependencies=nt,dependenciesBitAnd_generated}var dependenciesBitNot_generated={},hasRequiredDependenciesBitNot_generated;function requireDependenciesBitNot_generated(){if(hasRequiredDependenciesBitNot_generated)return dependenciesBitNot_generated;hasRequiredDependenciesBitNot_generated=1,Object.defineProperty(dependenciesBitNot_generated,"__esModule",{value:!0}),dependenciesBitNot_generated.bitNotDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createBitNot:_e.createBitNot};return dependenciesBitNot_generated.bitNotDependencies=tt,dependenciesBitNot_generated}var dependenciesBitOr_generated={},hasRequiredDependenciesBitOr_generated;function requireDependenciesBitOr_generated(){if(hasRequiredDependenciesBitOr_generated)return dependenciesBitOr_generated;hasRequiredDependenciesBitOr_generated=1,Object.defineProperty(dependenciesBitOr_generated,"__esModule",{value:!0}),dependenciesBitOr_generated.bitOrDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createBitOr:nt.createBitOr};return dependenciesBitOr_generated.bitOrDependencies=st,dependenciesBitOr_generated}var dependenciesBitXor_generated={},hasRequiredDependenciesBitXor_generated;function requireDependenciesBitXor_generated(){if(hasRequiredDependenciesBitXor_generated)return dependenciesBitXor_generated;hasRequiredDependenciesBitXor_generated=1,Object.defineProperty(dependenciesBitXor_generated,"__esModule",{value:!0}),dependenciesBitXor_generated.bitXorDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createBitXor:rt.createBitXor};return dependenciesBitXor_generated.bitXorDependencies=nt,dependenciesBitXor_generated}var dependenciesBlockNode_generated={},dependenciesResultSet_generated={},hasRequiredDependenciesResultSet_generated;function requireDependenciesResultSet_generated(){if(hasRequiredDependenciesResultSet_generated)return dependenciesResultSet_generated;hasRequiredDependenciesResultSet_generated=1,Object.defineProperty(dependenciesResultSet_generated,"__esModule",{value:!0}),dependenciesResultSet_generated.ResultSetDependencies=void 0;var et=requireFactoriesAny(),_e={createResultSet:et.createResultSet};return dependenciesResultSet_generated.ResultSetDependencies=_e,dependenciesResultSet_generated}var hasRequiredDependenciesBlockNode_generated;function requireDependenciesBlockNode_generated(){if(hasRequiredDependenciesBlockNode_generated)return dependenciesBlockNode_generated;hasRequiredDependenciesBlockNode_generated=1,Object.defineProperty(dependenciesBlockNode_generated,"__esModule",{value:!0}),dependenciesBlockNode_generated.BlockNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireDependenciesResultSet_generated(),tt=requireFactoriesAny(),rt={NodeDependencies:et.NodeDependencies,ResultSetDependencies:_e.ResultSetDependencies,createBlockNode:tt.createBlockNode};return dependenciesBlockNode_generated.BlockNodeDependencies=rt,dependenciesBlockNode_generated}var dependenciesBohrMagneton_generated={},hasRequiredDependenciesBohrMagneton_generated;function requireDependenciesBohrMagneton_generated(){if(hasRequiredDependenciesBohrMagneton_generated)return dependenciesBohrMagneton_generated;hasRequiredDependenciesBohrMagneton_generated=1,Object.defineProperty(dependenciesBohrMagneton_generated,"__esModule",{value:!0}),dependenciesBohrMagneton_generated.bohrMagnetonDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createBohrMagneton:tt.createBohrMagneton};return dependenciesBohrMagneton_generated.bohrMagnetonDependencies=rt,dependenciesBohrMagneton_generated}var dependenciesBohrRadius_generated={},hasRequiredDependenciesBohrRadius_generated;function requireDependenciesBohrRadius_generated(){if(hasRequiredDependenciesBohrRadius_generated)return dependenciesBohrRadius_generated;hasRequiredDependenciesBohrRadius_generated=1,Object.defineProperty(dependenciesBohrRadius_generated,"__esModule",{value:!0}),dependenciesBohrRadius_generated.bohrRadiusDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createBohrRadius:tt.createBohrRadius};return dependenciesBohrRadius_generated.bohrRadiusDependencies=rt,dependenciesBohrRadius_generated}var dependenciesBoltzmann_generated={},hasRequiredDependenciesBoltzmann_generated;function requireDependenciesBoltzmann_generated(){if(hasRequiredDependenciesBoltzmann_generated)return dependenciesBoltzmann_generated;hasRequiredDependenciesBoltzmann_generated=1,Object.defineProperty(dependenciesBoltzmann_generated,"__esModule",{value:!0}),dependenciesBoltzmann_generated.boltzmannDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createBoltzmann:tt.createBoltzmann};return dependenciesBoltzmann_generated.boltzmannDependencies=rt,dependenciesBoltzmann_generated}var dependenciesBoolean_generated={},hasRequiredDependenciesBoolean_generated;function requireDependenciesBoolean_generated(){if(hasRequiredDependenciesBoolean_generated)return dependenciesBoolean_generated;hasRequiredDependenciesBoolean_generated=1,Object.defineProperty(dependenciesBoolean_generated,"__esModule",{value:!0}),dependenciesBoolean_generated.booleanDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createBoolean:_e.createBoolean};return dependenciesBoolean_generated.booleanDependencies=tt,dependenciesBoolean_generated}var dependenciesCatalan_generated={},hasRequiredDependenciesCatalan_generated;function requireDependenciesCatalan_generated(){if(hasRequiredDependenciesCatalan_generated)return dependenciesCatalan_generated;hasRequiredDependenciesCatalan_generated=1,Object.defineProperty(dependenciesCatalan_generated,"__esModule",{value:!0}),dependenciesCatalan_generated.catalanDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesCombinations_generated(),tt=requireDependenciesDivideScalar_generated(),rt=requireDependenciesIsInteger_generated(),nt=requireDependenciesIsNegative_generated(),st=requireDependenciesMultiplyScalar_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={addScalarDependencies:et.addScalarDependencies,combinationsDependencies:_e.combinationsDependencies,divideScalarDependencies:tt.divideScalarDependencies,isIntegerDependencies:rt.isIntegerDependencies,isNegativeDependencies:nt.isNegativeDependencies,multiplyScalarDependencies:st.multiplyScalarDependencies,typedDependencies:dt.typedDependencies,createCatalan:ft.createCatalan};return dependenciesCatalan_generated.catalanDependencies=ht,dependenciesCatalan_generated}var dependenciesCbrt_generated={},hasRequiredDependenciesCbrt_generated;function requireDependenciesCbrt_generated(){if(hasRequiredDependenciesCbrt_generated)return dependenciesCbrt_generated;hasRequiredDependenciesCbrt_generated=1,Object.defineProperty(dependenciesCbrt_generated,"__esModule",{value:!0}),dependenciesCbrt_generated.cbrtDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesComplexClass_generated(),tt=requireDependenciesFractionClass_generated(),rt=requireDependenciesIsNegative_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesTyped_generated(),dt=requireDependenciesUnaryMinus_generated(),ft=requireFactoriesAny(),ht={BigNumberDependencies:et.BigNumberDependencies,ComplexDependencies:_e.ComplexDependencies,FractionDependencies:tt.FractionDependencies,isNegativeDependencies:rt.isNegativeDependencies,matrixDependencies:nt.matrixDependencies,typedDependencies:st.typedDependencies,unaryMinusDependencies:dt.unaryMinusDependencies,createCbrt:ft.createCbrt};return dependenciesCbrt_generated.cbrtDependencies=ht,dependenciesCbrt_generated}var dependenciesChain_generated={},dependenciesChainClass_generated={},hasRequiredDependenciesChainClass_generated;function requireDependenciesChainClass_generated(){if(hasRequiredDependenciesChainClass_generated)return dependenciesChainClass_generated;hasRequiredDependenciesChainClass_generated=1,Object.defineProperty(dependenciesChainClass_generated,"__esModule",{value:!0}),dependenciesChainClass_generated.ChainDependencies=void 0;var et=requireFactoriesAny(),_e={createChainClass:et.createChainClass};return dependenciesChainClass_generated.ChainDependencies=_e,dependenciesChainClass_generated}var hasRequiredDependenciesChain_generated;function requireDependenciesChain_generated(){if(hasRequiredDependenciesChain_generated)return dependenciesChain_generated;hasRequiredDependenciesChain_generated=1,Object.defineProperty(dependenciesChain_generated,"__esModule",{value:!0}),dependenciesChain_generated.chainDependencies=void 0;var et=requireDependenciesChainClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ChainDependencies:et.ChainDependencies,typedDependencies:_e.typedDependencies,createChain:tt.createChain};return dependenciesChain_generated.chainDependencies=rt,dependenciesChain_generated}var dependenciesClassicalElectronRadius_generated={},hasRequiredDependenciesClassicalElectronRadius_generated;function requireDependenciesClassicalElectronRadius_generated(){if(hasRequiredDependenciesClassicalElectronRadius_generated)return dependenciesClassicalElectronRadius_generated;hasRequiredDependenciesClassicalElectronRadius_generated=1,Object.defineProperty(dependenciesClassicalElectronRadius_generated,"__esModule",{value:!0}),dependenciesClassicalElectronRadius_generated.classicalElectronRadiusDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createClassicalElectronRadius:tt.createClassicalElectronRadius};return dependenciesClassicalElectronRadius_generated.classicalElectronRadiusDependencies=rt,dependenciesClassicalElectronRadius_generated}var dependenciesClone_generated={},hasRequiredDependenciesClone_generated;function requireDependenciesClone_generated(){if(hasRequiredDependenciesClone_generated)return dependenciesClone_generated;hasRequiredDependenciesClone_generated=1,Object.defineProperty(dependenciesClone_generated,"__esModule",{value:!0}),dependenciesClone_generated.cloneDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createClone:_e.createClone};return dependenciesClone_generated.cloneDependencies=tt,dependenciesClone_generated}var dependenciesColumn_generated={},dependenciesIndexClass_generated={},dependenciesImmutableDenseMatrixClass_generated={},dependenciesSmaller_generated={},hasRequiredDependenciesSmaller_generated;function requireDependenciesSmaller_generated(){if(hasRequiredDependenciesSmaller_generated)return dependenciesSmaller_generated;hasRequiredDependenciesSmaller_generated=1,Object.defineProperty(dependenciesSmaller_generated,"__esModule",{value:!0}),dependenciesSmaller_generated.smallerDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createSmaller:rt.createSmaller};return dependenciesSmaller_generated.smallerDependencies=nt,dependenciesSmaller_generated}var hasRequiredDependenciesImmutableDenseMatrixClass_generated;function requireDependenciesImmutableDenseMatrixClass_generated(){if(hasRequiredDependenciesImmutableDenseMatrixClass_generated)return dependenciesImmutableDenseMatrixClass_generated;hasRequiredDependenciesImmutableDenseMatrixClass_generated=1,Object.defineProperty(dependenciesImmutableDenseMatrixClass_generated,"__esModule",{value:!0}),dependenciesImmutableDenseMatrixClass_generated.ImmutableDenseMatrixDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesSmaller_generated(),tt=requireFactoriesAny(),rt={DenseMatrixDependencies:et.DenseMatrixDependencies,smallerDependencies:_e.smallerDependencies,createImmutableDenseMatrixClass:tt.createImmutableDenseMatrixClass};return dependenciesImmutableDenseMatrixClass_generated.ImmutableDenseMatrixDependencies=rt,dependenciesImmutableDenseMatrixClass_generated}var hasRequiredDependenciesIndexClass_generated;function requireDependenciesIndexClass_generated(){if(hasRequiredDependenciesIndexClass_generated)return dependenciesIndexClass_generated;hasRequiredDependenciesIndexClass_generated=1,Object.defineProperty(dependenciesIndexClass_generated,"__esModule",{value:!0}),dependenciesIndexClass_generated.IndexDependencies=void 0;var et=requireDependenciesImmutableDenseMatrixClass_generated(),_e=requireFactoriesAny(),tt={ImmutableDenseMatrixDependencies:et.ImmutableDenseMatrixDependencies,createIndexClass:_e.createIndexClass};return dependenciesIndexClass_generated.IndexDependencies=tt,dependenciesIndexClass_generated}var dependenciesRange_generated={},dependenciesLargerEq_generated={},hasRequiredDependenciesLargerEq_generated;function requireDependenciesLargerEq_generated(){if(hasRequiredDependenciesLargerEq_generated)return dependenciesLargerEq_generated;hasRequiredDependenciesLargerEq_generated=1,Object.defineProperty(dependenciesLargerEq_generated,"__esModule",{value:!0}),dependenciesLargerEq_generated.largerEqDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createLargerEq:rt.createLargerEq};return dependenciesLargerEq_generated.largerEqDependencies=nt,dependenciesLargerEq_generated}var dependenciesSmallerEq_generated={},hasRequiredDependenciesSmallerEq_generated;function requireDependenciesSmallerEq_generated(){if(hasRequiredDependenciesSmallerEq_generated)return dependenciesSmallerEq_generated;hasRequiredDependenciesSmallerEq_generated=1,Object.defineProperty(dependenciesSmallerEq_generated,"__esModule",{value:!0}),dependenciesSmallerEq_generated.smallerEqDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createSmallerEq:rt.createSmallerEq};return dependenciesSmallerEq_generated.smallerEqDependencies=nt,dependenciesSmallerEq_generated}var hasRequiredDependenciesRange_generated;function requireDependenciesRange_generated(){if(hasRequiredDependenciesRange_generated)return dependenciesRange_generated;hasRequiredDependenciesRange_generated=1,Object.defineProperty(dependenciesRange_generated,"__esModule",{value:!0}),dependenciesRange_generated.rangeDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesLarger_generated(),rt=requireDependenciesLargerEq_generated(),nt=requireDependenciesSmaller_generated(),st=requireDependenciesSmallerEq_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={bignumberDependencies:et.bignumberDependencies,matrixDependencies:_e.matrixDependencies,largerDependencies:tt.largerDependencies,largerEqDependencies:rt.largerEqDependencies,smallerDependencies:nt.smallerDependencies,smallerEqDependencies:st.smallerEqDependencies,typedDependencies:dt.typedDependencies,createRange:ft.createRange};return dependenciesRange_generated.rangeDependencies=ht,dependenciesRange_generated}var hasRequiredDependenciesColumn_generated;function requireDependenciesColumn_generated(){if(hasRequiredDependenciesColumn_generated)return dependenciesColumn_generated;hasRequiredDependenciesColumn_generated=1,Object.defineProperty(dependenciesColumn_generated,"__esModule",{value:!0}),dependenciesColumn_generated.columnDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesRange_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={IndexDependencies:et.IndexDependencies,matrixDependencies:_e.matrixDependencies,rangeDependencies:tt.rangeDependencies,typedDependencies:rt.typedDependencies,createColumn:nt.createColumn};return dependenciesColumn_generated.columnDependencies=st,dependenciesColumn_generated}var dependenciesColumnTransform_generated={},hasRequiredDependenciesColumnTransform_generated;function requireDependenciesColumnTransform_generated(){if(hasRequiredDependenciesColumnTransform_generated)return dependenciesColumnTransform_generated;hasRequiredDependenciesColumnTransform_generated=1,Object.defineProperty(dependenciesColumnTransform_generated,"__esModule",{value:!0}),dependenciesColumnTransform_generated.columnTransformDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesRange_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={IndexDependencies:et.IndexDependencies,matrixDependencies:_e.matrixDependencies,rangeDependencies:tt.rangeDependencies,typedDependencies:rt.typedDependencies,createColumnTransform:nt.createColumnTransform};return dependenciesColumnTransform_generated.columnTransformDependencies=st,dependenciesColumnTransform_generated}var dependenciesCombinationsWithRep_generated={},hasRequiredDependenciesCombinationsWithRep_generated;function requireDependenciesCombinationsWithRep_generated(){if(hasRequiredDependenciesCombinationsWithRep_generated)return dependenciesCombinationsWithRep_generated;hasRequiredDependenciesCombinationsWithRep_generated=1,Object.defineProperty(dependenciesCombinationsWithRep_generated,"__esModule",{value:!0}),dependenciesCombinationsWithRep_generated.combinationsWithRepDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createCombinationsWithRep:_e.createCombinationsWithRep};return dependenciesCombinationsWithRep_generated.combinationsWithRepDependencies=tt,dependenciesCombinationsWithRep_generated}var dependenciesCompare_generated={},hasRequiredDependenciesCompare_generated;function requireDependenciesCompare_generated(){if(hasRequiredDependenciesCompare_generated)return dependenciesCompare_generated;hasRequiredDependenciesCompare_generated=1,Object.defineProperty(dependenciesCompare_generated,"__esModule",{value:!0}),dependenciesCompare_generated.compareDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesFractionClass_generated(),rt=requireDependenciesEqualScalar_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,FractionDependencies:tt.FractionDependencies,equalScalarDependencies:rt.equalScalarDependencies,matrixDependencies:nt.matrixDependencies,typedDependencies:st.typedDependencies,createCompare:dt.createCompare};return dependenciesCompare_generated.compareDependencies=ft,dependenciesCompare_generated}var dependenciesCompareNatural_generated={},hasRequiredDependenciesCompareNatural_generated;function requireDependenciesCompareNatural_generated(){if(hasRequiredDependenciesCompareNatural_generated)return dependenciesCompareNatural_generated;hasRequiredDependenciesCompareNatural_generated=1,Object.defineProperty(dependenciesCompareNatural_generated,"__esModule",{value:!0}),dependenciesCompareNatural_generated.compareNaturalDependencies=void 0;var et=requireDependenciesCompare_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={compareDependencies:et.compareDependencies,typedDependencies:_e.typedDependencies,createCompareNatural:tt.createCompareNatural};return dependenciesCompareNatural_generated.compareNaturalDependencies=rt,dependenciesCompareNatural_generated}var dependenciesCompareText_generated={},hasRequiredDependenciesCompareText_generated;function requireDependenciesCompareText_generated(){if(hasRequiredDependenciesCompareText_generated)return dependenciesCompareText_generated;hasRequiredDependenciesCompareText_generated=1,Object.defineProperty(dependenciesCompareText_generated,"__esModule",{value:!0}),dependenciesCompareText_generated.compareTextDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createCompareText:tt.createCompareText};return dependenciesCompareText_generated.compareTextDependencies=rt,dependenciesCompareText_generated}var dependenciesCompile_generated={},dependenciesParse_generated={},dependenciesConditionalNode_generated={},hasRequiredDependenciesConditionalNode_generated;function requireDependenciesConditionalNode_generated(){if(hasRequiredDependenciesConditionalNode_generated)return dependenciesConditionalNode_generated;hasRequiredDependenciesConditionalNode_generated=1,Object.defineProperty(dependenciesConditionalNode_generated,"__esModule",{value:!0}),dependenciesConditionalNode_generated.ConditionalNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createConditionalNode:_e.createConditionalNode};return dependenciesConditionalNode_generated.ConditionalNodeDependencies=tt,dependenciesConditionalNode_generated}var dependenciesConstantNode_generated={},hasRequiredDependenciesConstantNode_generated;function requireDependenciesConstantNode_generated(){if(hasRequiredDependenciesConstantNode_generated)return dependenciesConstantNode_generated;hasRequiredDependenciesConstantNode_generated=1,Object.defineProperty(dependenciesConstantNode_generated,"__esModule",{value:!0}),dependenciesConstantNode_generated.ConstantNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createConstantNode:_e.createConstantNode};return dependenciesConstantNode_generated.ConstantNodeDependencies=tt,dependenciesConstantNode_generated}var dependenciesFunctionAssignmentNode_generated={},hasRequiredDependenciesFunctionAssignmentNode_generated;function requireDependenciesFunctionAssignmentNode_generated(){if(hasRequiredDependenciesFunctionAssignmentNode_generated)return dependenciesFunctionAssignmentNode_generated;hasRequiredDependenciesFunctionAssignmentNode_generated=1,Object.defineProperty(dependenciesFunctionAssignmentNode_generated,"__esModule",{value:!0}),dependenciesFunctionAssignmentNode_generated.FunctionAssignmentNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={NodeDependencies:et.NodeDependencies,typedDependencies:_e.typedDependencies,createFunctionAssignmentNode:tt.createFunctionAssignmentNode};return dependenciesFunctionAssignmentNode_generated.FunctionAssignmentNodeDependencies=rt,dependenciesFunctionAssignmentNode_generated}var dependenciesFunctionNode_generated={},dependenciesSymbolNode_generated={},hasRequiredDependenciesSymbolNode_generated;function requireDependenciesSymbolNode_generated(){if(hasRequiredDependenciesSymbolNode_generated)return dependenciesSymbolNode_generated;hasRequiredDependenciesSymbolNode_generated=1,Object.defineProperty(dependenciesSymbolNode_generated,"__esModule",{value:!0}),dependenciesSymbolNode_generated.SymbolNodeDependencies=void 0;var et=requireDependenciesUnitClass_generated(),_e=requireDependenciesNode_generated(),tt=requireFactoriesAny(),rt={UnitDependencies:et.UnitDependencies,NodeDependencies:_e.NodeDependencies,createSymbolNode:tt.createSymbolNode};return dependenciesSymbolNode_generated.SymbolNodeDependencies=rt,dependenciesSymbolNode_generated}var hasRequiredDependenciesFunctionNode_generated;function requireDependenciesFunctionNode_generated(){if(hasRequiredDependenciesFunctionNode_generated)return dependenciesFunctionNode_generated;hasRequiredDependenciesFunctionNode_generated=1,Object.defineProperty(dependenciesFunctionNode_generated,"__esModule",{value:!0}),dependenciesFunctionNode_generated.FunctionNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireDependenciesSymbolNode_generated(),tt=requireFactoriesAny(),rt={NodeDependencies:et.NodeDependencies,SymbolNodeDependencies:_e.SymbolNodeDependencies,createFunctionNode:tt.createFunctionNode};return dependenciesFunctionNode_generated.FunctionNodeDependencies=rt,dependenciesFunctionNode_generated}var dependenciesIndexNode_generated={},hasRequiredDependenciesIndexNode_generated;function requireDependenciesIndexNode_generated(){if(hasRequiredDependenciesIndexNode_generated)return dependenciesIndexNode_generated;hasRequiredDependenciesIndexNode_generated=1,Object.defineProperty(dependenciesIndexNode_generated,"__esModule",{value:!0}),dependenciesIndexNode_generated.IndexNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireDependenciesSize_generated(),tt=requireFactoriesAny(),rt={NodeDependencies:et.NodeDependencies,sizeDependencies:_e.sizeDependencies,createIndexNode:tt.createIndexNode};return dependenciesIndexNode_generated.IndexNodeDependencies=rt,dependenciesIndexNode_generated}var dependenciesObjectNode_generated={},hasRequiredDependenciesObjectNode_generated;function requireDependenciesObjectNode_generated(){if(hasRequiredDependenciesObjectNode_generated)return dependenciesObjectNode_generated;hasRequiredDependenciesObjectNode_generated=1,Object.defineProperty(dependenciesObjectNode_generated,"__esModule",{value:!0}),dependenciesObjectNode_generated.ObjectNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createObjectNode:_e.createObjectNode};return dependenciesObjectNode_generated.ObjectNodeDependencies=tt,dependenciesObjectNode_generated}var dependenciesOperatorNode_generated={},hasRequiredDependenciesOperatorNode_generated;function requireDependenciesOperatorNode_generated(){if(hasRequiredDependenciesOperatorNode_generated)return dependenciesOperatorNode_generated;hasRequiredDependenciesOperatorNode_generated=1,Object.defineProperty(dependenciesOperatorNode_generated,"__esModule",{value:!0}),dependenciesOperatorNode_generated.OperatorNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createOperatorNode:_e.createOperatorNode};return dependenciesOperatorNode_generated.OperatorNodeDependencies=tt,dependenciesOperatorNode_generated}var dependenciesParenthesisNode_generated={},hasRequiredDependenciesParenthesisNode_generated;function requireDependenciesParenthesisNode_generated(){if(hasRequiredDependenciesParenthesisNode_generated)return dependenciesParenthesisNode_generated;hasRequiredDependenciesParenthesisNode_generated=1,Object.defineProperty(dependenciesParenthesisNode_generated,"__esModule",{value:!0}),dependenciesParenthesisNode_generated.ParenthesisNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createParenthesisNode:_e.createParenthesisNode};return dependenciesParenthesisNode_generated.ParenthesisNodeDependencies=tt,dependenciesParenthesisNode_generated}var dependenciesRangeNode_generated={},hasRequiredDependenciesRangeNode_generated;function requireDependenciesRangeNode_generated(){if(hasRequiredDependenciesRangeNode_generated)return dependenciesRangeNode_generated;hasRequiredDependenciesRangeNode_generated=1,Object.defineProperty(dependenciesRangeNode_generated,"__esModule",{value:!0}),dependenciesRangeNode_generated.RangeNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createRangeNode:_e.createRangeNode};return dependenciesRangeNode_generated.RangeNodeDependencies=tt,dependenciesRangeNode_generated}var dependenciesRelationalNode_generated={},hasRequiredDependenciesRelationalNode_generated;function requireDependenciesRelationalNode_generated(){if(hasRequiredDependenciesRelationalNode_generated)return dependenciesRelationalNode_generated;hasRequiredDependenciesRelationalNode_generated=1,Object.defineProperty(dependenciesRelationalNode_generated,"__esModule",{value:!0}),dependenciesRelationalNode_generated.RelationalNodeDependencies=void 0;var et=requireDependenciesNode_generated(),_e=requireFactoriesAny(),tt={NodeDependencies:et.NodeDependencies,createRelationalNode:_e.createRelationalNode};return dependenciesRelationalNode_generated.RelationalNodeDependencies=tt,dependenciesRelationalNode_generated}var hasRequiredDependenciesParse_generated;function requireDependenciesParse_generated(){if(hasRequiredDependenciesParse_generated)return dependenciesParse_generated;hasRequiredDependenciesParse_generated=1,Object.defineProperty(dependenciesParse_generated,"__esModule",{value:!0}),dependenciesParse_generated.parseDependencies=void 0;var et=requireDependenciesAccessorNode_generated(),_e=requireDependenciesArrayNode_generated(),tt=requireDependenciesAssignmentNode_generated(),rt=requireDependenciesBlockNode_generated(),nt=requireDependenciesConditionalNode_generated(),st=requireDependenciesConstantNode_generated(),dt=requireDependenciesFunctionAssignmentNode_generated(),ft=requireDependenciesFunctionNode_generated(),ht=requireDependenciesIndexNode_generated(),mt=requireDependenciesObjectNode_generated(),bt=requireDependenciesOperatorNode_generated(),St=requireDependenciesParenthesisNode_generated(),Et=requireDependenciesRangeNode_generated(),Ct=requireDependenciesRelationalNode_generated(),Rt=requireDependenciesSymbolNode_generated(),Tt=requireDependenciesNumeric_generated(),wt=requireDependenciesTyped_generated(),At=requireFactoriesAny(),Nt={AccessorNodeDependencies:et.AccessorNodeDependencies,ArrayNodeDependencies:_e.ArrayNodeDependencies,AssignmentNodeDependencies:tt.AssignmentNodeDependencies,BlockNodeDependencies:rt.BlockNodeDependencies,ConditionalNodeDependencies:nt.ConditionalNodeDependencies,ConstantNodeDependencies:st.ConstantNodeDependencies,FunctionAssignmentNodeDependencies:dt.FunctionAssignmentNodeDependencies,FunctionNodeDependencies:ft.FunctionNodeDependencies,IndexNodeDependencies:ht.IndexNodeDependencies,ObjectNodeDependencies:mt.ObjectNodeDependencies,OperatorNodeDependencies:bt.OperatorNodeDependencies,ParenthesisNodeDependencies:St.ParenthesisNodeDependencies,RangeNodeDependencies:Et.RangeNodeDependencies,RelationalNodeDependencies:Ct.RelationalNodeDependencies,SymbolNodeDependencies:Rt.SymbolNodeDependencies,numericDependencies:Tt.numericDependencies,typedDependencies:wt.typedDependencies,createParse:At.createParse};return dependenciesParse_generated.parseDependencies=Nt,dependenciesParse_generated}var hasRequiredDependenciesCompile_generated;function requireDependenciesCompile_generated(){if(hasRequiredDependenciesCompile_generated)return dependenciesCompile_generated;hasRequiredDependenciesCompile_generated=1,Object.defineProperty(dependenciesCompile_generated,"__esModule",{value:!0}),dependenciesCompile_generated.compileDependencies=void 0;var et=requireDependenciesParse_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={parseDependencies:et.parseDependencies,typedDependencies:_e.typedDependencies,createCompile:tt.createCompile};return dependenciesCompile_generated.compileDependencies=rt,dependenciesCompile_generated}var dependenciesComplex_generated={},hasRequiredDependenciesComplex_generated;function requireDependenciesComplex_generated(){if(hasRequiredDependenciesComplex_generated)return dependenciesComplex_generated;hasRequiredDependenciesComplex_generated=1,Object.defineProperty(dependenciesComplex_generated,"__esModule",{value:!0}),dependenciesComplex_generated.complexDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createComplex:tt.createComplex};return dependenciesComplex_generated.complexDependencies=rt,dependenciesComplex_generated}var dependenciesComposition_generated={},dependenciesIsPositive_generated={},hasRequiredDependenciesIsPositive_generated;function requireDependenciesIsPositive_generated(){if(hasRequiredDependenciesIsPositive_generated)return dependenciesIsPositive_generated;hasRequiredDependenciesIsPositive_generated=1,Object.defineProperty(dependenciesIsPositive_generated,"__esModule",{value:!0}),dependenciesIsPositive_generated.isPositiveDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsPositive:_e.createIsPositive};return dependenciesIsPositive_generated.isPositiveDependencies=tt,dependenciesIsPositive_generated}var hasRequiredDependenciesComposition_generated;function requireDependenciesComposition_generated(){if(hasRequiredDependenciesComposition_generated)return dependenciesComposition_generated;hasRequiredDependenciesComposition_generated=1,Object.defineProperty(dependenciesComposition_generated,"__esModule",{value:!0}),dependenciesComposition_generated.compositionDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesCombinations_generated(),tt=requireDependenciesIsInteger_generated(),rt=requireDependenciesIsNegative_generated(),nt=requireDependenciesIsPositive_generated(),st=requireDependenciesLarger_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={addScalarDependencies:et.addScalarDependencies,combinationsDependencies:_e.combinationsDependencies,isIntegerDependencies:tt.isIntegerDependencies,isNegativeDependencies:rt.isNegativeDependencies,isPositiveDependencies:nt.isPositiveDependencies,largerDependencies:st.largerDependencies,typedDependencies:dt.typedDependencies,createComposition:ft.createComposition};return dependenciesComposition_generated.compositionDependencies=ht,dependenciesComposition_generated}var dependenciesConcat_generated={},hasRequiredDependenciesConcat_generated;function requireDependenciesConcat_generated(){if(hasRequiredDependenciesConcat_generated)return dependenciesConcat_generated;hasRequiredDependenciesConcat_generated=1,Object.defineProperty(dependenciesConcat_generated,"__esModule",{value:!0}),dependenciesConcat_generated.concatDependencies=void 0;var et=requireDependenciesIsInteger_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={isIntegerDependencies:et.isIntegerDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createConcat:rt.createConcat};return dependenciesConcat_generated.concatDependencies=nt,dependenciesConcat_generated}var dependenciesConcatTransform_generated={},hasRequiredDependenciesConcatTransform_generated;function requireDependenciesConcatTransform_generated(){if(hasRequiredDependenciesConcatTransform_generated)return dependenciesConcatTransform_generated;hasRequiredDependenciesConcatTransform_generated=1,Object.defineProperty(dependenciesConcatTransform_generated,"__esModule",{value:!0}),dependenciesConcatTransform_generated.concatTransformDependencies=void 0;var et=requireDependenciesIsInteger_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={isIntegerDependencies:et.isIntegerDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createConcatTransform:rt.createConcatTransform};return dependenciesConcatTransform_generated.concatTransformDependencies=nt,dependenciesConcatTransform_generated}var dependenciesConductanceQuantum_generated={},hasRequiredDependenciesConductanceQuantum_generated;function requireDependenciesConductanceQuantum_generated(){if(hasRequiredDependenciesConductanceQuantum_generated)return dependenciesConductanceQuantum_generated;hasRequiredDependenciesConductanceQuantum_generated=1,Object.defineProperty(dependenciesConductanceQuantum_generated,"__esModule",{value:!0}),dependenciesConductanceQuantum_generated.conductanceQuantumDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createConductanceQuantum:tt.createConductanceQuantum};return dependenciesConductanceQuantum_generated.conductanceQuantumDependencies=rt,dependenciesConductanceQuantum_generated}var dependenciesCos_generated={},hasRequiredDependenciesCos_generated;function requireDependenciesCos_generated(){if(hasRequiredDependenciesCos_generated)return dependenciesCos_generated;hasRequiredDependenciesCos_generated=1,Object.defineProperty(dependenciesCos_generated,"__esModule",{value:!0}),dependenciesCos_generated.cosDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createCos:_e.createCos};return dependenciesCos_generated.cosDependencies=tt,dependenciesCos_generated}var dependenciesCosh_generated={},hasRequiredDependenciesCosh_generated;function requireDependenciesCosh_generated(){if(hasRequiredDependenciesCosh_generated)return dependenciesCosh_generated;hasRequiredDependenciesCosh_generated=1,Object.defineProperty(dependenciesCosh_generated,"__esModule",{value:!0}),dependenciesCosh_generated.coshDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createCosh:_e.createCosh};return dependenciesCosh_generated.coshDependencies=tt,dependenciesCosh_generated}var dependenciesCot_generated={},hasRequiredDependenciesCot_generated;function requireDependenciesCot_generated(){if(hasRequiredDependenciesCot_generated)return dependenciesCot_generated;hasRequiredDependenciesCot_generated=1,Object.defineProperty(dependenciesCot_generated,"__esModule",{value:!0}),dependenciesCot_generated.cotDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createCot:tt.createCot};return dependenciesCot_generated.cotDependencies=rt,dependenciesCot_generated}var dependenciesCoth_generated={},hasRequiredDependenciesCoth_generated;function requireDependenciesCoth_generated(){if(hasRequiredDependenciesCoth_generated)return dependenciesCoth_generated;hasRequiredDependenciesCoth_generated=1,Object.defineProperty(dependenciesCoth_generated,"__esModule",{value:!0}),dependenciesCoth_generated.cothDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createCoth:tt.createCoth};return dependenciesCoth_generated.cothDependencies=rt,dependenciesCoth_generated}var dependenciesCoulomb_generated={},hasRequiredDependenciesCoulomb_generated;function requireDependenciesCoulomb_generated(){if(hasRequiredDependenciesCoulomb_generated)return dependenciesCoulomb_generated;hasRequiredDependenciesCoulomb_generated=1,Object.defineProperty(dependenciesCoulomb_generated,"__esModule",{value:!0}),dependenciesCoulomb_generated.coulombDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createCoulomb:tt.createCoulomb};return dependenciesCoulomb_generated.coulombDependencies=rt,dependenciesCoulomb_generated}var dependenciesCount_generated={},dependenciesProd_generated={},hasRequiredDependenciesProd_generated;function requireDependenciesProd_generated(){if(hasRequiredDependenciesProd_generated)return dependenciesProd_generated;hasRequiredDependenciesProd_generated=1,Object.defineProperty(dependenciesProd_generated,"__esModule",{value:!0}),dependenciesProd_generated.prodDependencies=void 0;var et=requireDependenciesMultiplyScalar_generated(),_e=requireDependenciesNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={multiplyScalarDependencies:et.multiplyScalarDependencies,numericDependencies:_e.numericDependencies,typedDependencies:tt.typedDependencies,createProd:rt.createProd};return dependenciesProd_generated.prodDependencies=nt,dependenciesProd_generated}var hasRequiredDependenciesCount_generated;function requireDependenciesCount_generated(){if(hasRequiredDependenciesCount_generated)return dependenciesCount_generated;hasRequiredDependenciesCount_generated=1,Object.defineProperty(dependenciesCount_generated,"__esModule",{value:!0}),dependenciesCount_generated.countDependencies=void 0;var et=requireDependenciesProd_generated(),_e=requireDependenciesSize_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={prodDependencies:et.prodDependencies,sizeDependencies:_e.sizeDependencies,typedDependencies:tt.typedDependencies,createCount:rt.createCount};return dependenciesCount_generated.countDependencies=nt,dependenciesCount_generated}var dependenciesCreateUnit_generated={},hasRequiredDependenciesCreateUnit_generated;function requireDependenciesCreateUnit_generated(){if(hasRequiredDependenciesCreateUnit_generated)return dependenciesCreateUnit_generated;hasRequiredDependenciesCreateUnit_generated=1,Object.defineProperty(dependenciesCreateUnit_generated,"__esModule",{value:!0}),dependenciesCreateUnit_generated.createUnitDependencies=void 0;var et=requireDependenciesUnitClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={UnitDependencies:et.UnitDependencies,typedDependencies:_e.typedDependencies,createCreateUnit:tt.createCreateUnit};return dependenciesCreateUnit_generated.createUnitDependencies=rt,dependenciesCreateUnit_generated}var dependenciesCross_generated={},hasRequiredDependenciesCross_generated;function requireDependenciesCross_generated(){if(hasRequiredDependenciesCross_generated)return dependenciesCross_generated;hasRequiredDependenciesCross_generated=1,Object.defineProperty(dependenciesCross_generated,"__esModule",{value:!0}),dependenciesCross_generated.crossDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesMultiply_generated(),tt=requireDependenciesSubtract_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={matrixDependencies:et.matrixDependencies,multiplyDependencies:_e.multiplyDependencies,subtractDependencies:tt.subtractDependencies,typedDependencies:rt.typedDependencies,createCross:nt.createCross};return dependenciesCross_generated.crossDependencies=st,dependenciesCross_generated}var dependenciesCsc_generated={},hasRequiredDependenciesCsc_generated;function requireDependenciesCsc_generated(){if(hasRequiredDependenciesCsc_generated)return dependenciesCsc_generated;hasRequiredDependenciesCsc_generated=1,Object.defineProperty(dependenciesCsc_generated,"__esModule",{value:!0}),dependenciesCsc_generated.cscDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createCsc:tt.createCsc};return dependenciesCsc_generated.cscDependencies=rt,dependenciesCsc_generated}var dependenciesCsch_generated={},hasRequiredDependenciesCsch_generated;function requireDependenciesCsch_generated(){if(hasRequiredDependenciesCsch_generated)return dependenciesCsch_generated;hasRequiredDependenciesCsch_generated=1,Object.defineProperty(dependenciesCsch_generated,"__esModule",{value:!0}),dependenciesCsch_generated.cschDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createCsch:tt.createCsch};return dependenciesCsch_generated.cschDependencies=rt,dependenciesCsch_generated}var dependenciesCtranspose_generated={},dependenciesTranspose_generated={},hasRequiredDependenciesTranspose_generated;function requireDependenciesTranspose_generated(){if(hasRequiredDependenciesTranspose_generated)return dependenciesTranspose_generated;hasRequiredDependenciesTranspose_generated=1,Object.defineProperty(dependenciesTranspose_generated,"__esModule",{value:!0}),dependenciesTranspose_generated.transposeDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createTranspose:tt.createTranspose};return dependenciesTranspose_generated.transposeDependencies=rt,dependenciesTranspose_generated}var hasRequiredDependenciesCtranspose_generated;function requireDependenciesCtranspose_generated(){if(hasRequiredDependenciesCtranspose_generated)return dependenciesCtranspose_generated;hasRequiredDependenciesCtranspose_generated=1,Object.defineProperty(dependenciesCtranspose_generated,"__esModule",{value:!0}),dependenciesCtranspose_generated.ctransposeDependencies=void 0;var et=requireDependenciesConj_generated(),_e=requireDependenciesTranspose_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={conjDependencies:et.conjDependencies,transposeDependencies:_e.transposeDependencies,typedDependencies:tt.typedDependencies,createCtranspose:rt.createCtranspose};return dependenciesCtranspose_generated.ctransposeDependencies=nt,dependenciesCtranspose_generated}var dependenciesCube_generated={},hasRequiredDependenciesCube_generated;function requireDependenciesCube_generated(){if(hasRequiredDependenciesCube_generated)return dependenciesCube_generated;hasRequiredDependenciesCube_generated=1,Object.defineProperty(dependenciesCube_generated,"__esModule",{value:!0}),dependenciesCube_generated.cubeDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createCube:_e.createCube};return dependenciesCube_generated.cubeDependencies=tt,dependenciesCube_generated}var dependenciesCumSum_generated={},dependenciesUnaryPlus_generated={},hasRequiredDependenciesUnaryPlus_generated;function requireDependenciesUnaryPlus_generated(){if(hasRequiredDependenciesUnaryPlus_generated)return dependenciesUnaryPlus_generated;hasRequiredDependenciesUnaryPlus_generated=1,Object.defineProperty(dependenciesUnaryPlus_generated,"__esModule",{value:!0}),dependenciesUnaryPlus_generated.unaryPlusDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createUnaryPlus:tt.createUnaryPlus};return dependenciesUnaryPlus_generated.unaryPlusDependencies=rt,dependenciesUnaryPlus_generated}var hasRequiredDependenciesCumSum_generated;function requireDependenciesCumSum_generated(){if(hasRequiredDependenciesCumSum_generated)return dependenciesCumSum_generated;hasRequiredDependenciesCumSum_generated=1,Object.defineProperty(dependenciesCumSum_generated,"__esModule",{value:!0}),dependenciesCumSum_generated.cumsumDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesTyped_generated(),tt=requireDependenciesUnaryPlus_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,typedDependencies:_e.typedDependencies,unaryPlusDependencies:tt.unaryPlusDependencies,createCumSum:rt.createCumSum};return dependenciesCumSum_generated.cumsumDependencies=nt,dependenciesCumSum_generated}var dependenciesCumSumTransform_generated={},hasRequiredDependenciesCumSumTransform_generated;function requireDependenciesCumSumTransform_generated(){if(hasRequiredDependenciesCumSumTransform_generated)return dependenciesCumSumTransform_generated;hasRequiredDependenciesCumSumTransform_generated=1,Object.defineProperty(dependenciesCumSumTransform_generated,"__esModule",{value:!0}),dependenciesCumSumTransform_generated.cumsumTransformDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesTyped_generated(),tt=requireDependenciesUnaryPlus_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,typedDependencies:_e.typedDependencies,unaryPlusDependencies:tt.unaryPlusDependencies,createCumSumTransform:rt.createCumSumTransform};return dependenciesCumSumTransform_generated.cumsumTransformDependencies=nt,dependenciesCumSumTransform_generated}var dependenciesDeepEqual_generated={},hasRequiredDependenciesDeepEqual_generated;function requireDependenciesDeepEqual_generated(){if(hasRequiredDependenciesDeepEqual_generated)return dependenciesDeepEqual_generated;hasRequiredDependenciesDeepEqual_generated=1,Object.defineProperty(dependenciesDeepEqual_generated,"__esModule",{value:!0}),dependenciesDeepEqual_generated.deepEqualDependencies=void 0;var et=requireDependenciesEqual_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={equalDependencies:et.equalDependencies,typedDependencies:_e.typedDependencies,createDeepEqual:tt.createDeepEqual};return dependenciesDeepEqual_generated.deepEqualDependencies=rt,dependenciesDeepEqual_generated}var dependenciesDerivative_generated={},dependenciesSimplify_generated={},dependenciesDivide_generated={},hasRequiredDependenciesDivide_generated;function requireDependenciesDivide_generated(){if(hasRequiredDependenciesDivide_generated)return dependenciesDivide_generated;hasRequiredDependenciesDivide_generated=1,Object.defineProperty(dependenciesDivide_generated,"__esModule",{value:!0}),dependenciesDivide_generated.divideDependencies=void 0;var et=requireDependenciesDivideScalar_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesInv_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiply_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={divideScalarDependencies:et.divideScalarDependencies,equalScalarDependencies:_e.equalScalarDependencies,invDependencies:tt.invDependencies,matrixDependencies:rt.matrixDependencies,multiplyDependencies:nt.multiplyDependencies,typedDependencies:st.typedDependencies,createDivide:dt.createDivide};return dependenciesDivide_generated.divideDependencies=ft,dependenciesDivide_generated}var dependenciesResolve_generated={},hasRequiredDependenciesResolve_generated;function requireDependenciesResolve_generated(){if(hasRequiredDependenciesResolve_generated)return dependenciesResolve_generated;hasRequiredDependenciesResolve_generated=1,Object.defineProperty(dependenciesResolve_generated,"__esModule",{value:!0}),dependenciesResolve_generated.resolveDependencies=void 0;var et=requireDependenciesConstantNode_generated(),_e=requireDependenciesFunctionNode_generated(),tt=requireDependenciesOperatorNode_generated(),rt=requireDependenciesParenthesisNode_generated(),nt=requireDependenciesParse_generated(),st=requireFactoriesAny(),dt={ConstantNodeDependencies:et.ConstantNodeDependencies,FunctionNodeDependencies:_e.FunctionNodeDependencies,OperatorNodeDependencies:tt.OperatorNodeDependencies,ParenthesisNodeDependencies:rt.ParenthesisNodeDependencies,parseDependencies:nt.parseDependencies,createResolve:st.createResolve};return dependenciesResolve_generated.resolveDependencies=dt,dependenciesResolve_generated}var dependenciesSimplifyCore_generated={},hasRequiredDependenciesSimplifyCore_generated;function requireDependenciesSimplifyCore_generated(){if(hasRequiredDependenciesSimplifyCore_generated)return dependenciesSimplifyCore_generated;hasRequiredDependenciesSimplifyCore_generated=1,Object.defineProperty(dependenciesSimplifyCore_generated,"__esModule",{value:!0}),dependenciesSimplifyCore_generated.simplifyCoreDependencies=void 0;var et=requireDependenciesAccessorNode_generated(),_e=requireDependenciesArrayNode_generated(),tt=requireDependenciesConstantNode_generated(),rt=requireDependenciesFunctionNode_generated(),nt=requireDependenciesIndexNode_generated(),st=requireDependenciesObjectNode_generated(),dt=requireDependenciesOperatorNode_generated(),ft=requireDependenciesParenthesisNode_generated(),ht=requireDependenciesSymbolNode_generated(),mt=requireDependenciesAdd_generated(),bt=requireDependenciesDivide_generated(),St=requireDependenciesEqual_generated(),Et=requireDependenciesIsZero_generated(),Ct=requireDependenciesMultiply_generated(),Rt=requireDependenciesPow_generated(),Tt=requireDependenciesSubtract_generated(),wt=requireFactoriesAny(),At={AccessorNodeDependencies:et.AccessorNodeDependencies,ArrayNodeDependencies:_e.ArrayNodeDependencies,ConstantNodeDependencies:tt.ConstantNodeDependencies,FunctionNodeDependencies:rt.FunctionNodeDependencies,IndexNodeDependencies:nt.IndexNodeDependencies,ObjectNodeDependencies:st.ObjectNodeDependencies,OperatorNodeDependencies:dt.OperatorNodeDependencies,ParenthesisNodeDependencies:ft.ParenthesisNodeDependencies,SymbolNodeDependencies:ht.SymbolNodeDependencies,addDependencies:mt.addDependencies,divideDependencies:bt.divideDependencies,equalDependencies:St.equalDependencies,isZeroDependencies:Et.isZeroDependencies,multiplyDependencies:Ct.multiplyDependencies,powDependencies:Rt.powDependencies,subtractDependencies:Tt.subtractDependencies,createSimplifyCore:wt.createSimplifyCore};return dependenciesSimplifyCore_generated.simplifyCoreDependencies=At,dependenciesSimplifyCore_generated}var hasRequiredDependenciesSimplify_generated;function requireDependenciesSimplify_generated(){if(hasRequiredDependenciesSimplify_generated)return dependenciesSimplify_generated;hasRequiredDependenciesSimplify_generated=1,Object.defineProperty(dependenciesSimplify_generated,"__esModule",{value:!0}),dependenciesSimplify_generated.simplifyDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesFraction_generated(),tt=requireDependenciesAccessorNode_generated(),rt=requireDependenciesArrayNode_generated(),nt=requireDependenciesConstantNode_generated(),st=requireDependenciesFunctionNode_generated(),dt=requireDependenciesIndexNode_generated(),ft=requireDependenciesObjectNode_generated(),ht=requireDependenciesOperatorNode_generated(),mt=requireDependenciesParenthesisNode_generated(),bt=requireDependenciesSymbolNode_generated(),St=requireDependenciesAdd_generated(),Et=requireDependenciesDivide_generated(),Ct=requireDependenciesEqual_generated(),Rt=requireDependenciesIsZero_generated(),Tt=requireDependenciesMatrix_generated(),wt=requireDependenciesMultiply_generated(),At=requireDependenciesParse_generated(),Nt=requireDependenciesPow_generated(),Pt=requireDependenciesResolve_generated(),It=requireDependenciesSimplifyCore_generated(),Ft=requireDependenciesSubtract_generated(),qt=requireDependenciesTyped_generated(),Vt=requireFactoriesAny(),Kt={bignumberDependencies:et.bignumberDependencies,fractionDependencies:_e.fractionDependencies,AccessorNodeDependencies:tt.AccessorNodeDependencies,ArrayNodeDependencies:rt.ArrayNodeDependencies,ConstantNodeDependencies:nt.ConstantNodeDependencies,FunctionNodeDependencies:st.FunctionNodeDependencies,IndexNodeDependencies:dt.IndexNodeDependencies,ObjectNodeDependencies:ft.ObjectNodeDependencies,OperatorNodeDependencies:ht.OperatorNodeDependencies,ParenthesisNodeDependencies:mt.ParenthesisNodeDependencies,SymbolNodeDependencies:bt.SymbolNodeDependencies,addDependencies:St.addDependencies,divideDependencies:Et.divideDependencies,equalDependencies:Ct.equalDependencies,isZeroDependencies:Rt.isZeroDependencies,matrixDependencies:Tt.matrixDependencies,multiplyDependencies:wt.multiplyDependencies,parseDependencies:At.parseDependencies,powDependencies:Nt.powDependencies,resolveDependencies:Pt.resolveDependencies,simplifyCoreDependencies:It.simplifyCoreDependencies,subtractDependencies:Ft.subtractDependencies,typedDependencies:qt.typedDependencies,createSimplify:Vt.createSimplify};return dependenciesSimplify_generated.simplifyDependencies=Kt,dependenciesSimplify_generated}var hasRequiredDependenciesDerivative_generated;function requireDependenciesDerivative_generated(){if(hasRequiredDependenciesDerivative_generated)return dependenciesDerivative_generated;hasRequiredDependenciesDerivative_generated=1,Object.defineProperty(dependenciesDerivative_generated,"__esModule",{value:!0}),dependenciesDerivative_generated.derivativeDependencies=void 0;var et=requireDependenciesConstantNode_generated(),_e=requireDependenciesFunctionNode_generated(),tt=requireDependenciesOperatorNode_generated(),rt=requireDependenciesParenthesisNode_generated(),nt=requireDependenciesSymbolNode_generated(),st=requireDependenciesEqual_generated(),dt=requireDependenciesIsZero_generated(),ft=requireDependenciesNumeric_generated(),ht=requireDependenciesParse_generated(),mt=requireDependenciesSimplify_generated(),bt=requireDependenciesTyped_generated(),St=requireFactoriesAny(),Et={ConstantNodeDependencies:et.ConstantNodeDependencies,FunctionNodeDependencies:_e.FunctionNodeDependencies,OperatorNodeDependencies:tt.OperatorNodeDependencies,ParenthesisNodeDependencies:rt.ParenthesisNodeDependencies,SymbolNodeDependencies:nt.SymbolNodeDependencies,equalDependencies:st.equalDependencies,isZeroDependencies:dt.isZeroDependencies,numericDependencies:ft.numericDependencies,parseDependencies:ht.parseDependencies,simplifyDependencies:mt.simplifyDependencies,typedDependencies:bt.typedDependencies,createDerivative:St.createDerivative};return dependenciesDerivative_generated.derivativeDependencies=Et,dependenciesDerivative_generated}var dependenciesDeuteronMass_generated={},hasRequiredDependenciesDeuteronMass_generated;function requireDependenciesDeuteronMass_generated(){if(hasRequiredDependenciesDeuteronMass_generated)return dependenciesDeuteronMass_generated;hasRequiredDependenciesDeuteronMass_generated=1,Object.defineProperty(dependenciesDeuteronMass_generated,"__esModule",{value:!0}),dependenciesDeuteronMass_generated.deuteronMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createDeuteronMass:tt.createDeuteronMass};return dependenciesDeuteronMass_generated.deuteronMassDependencies=rt,dependenciesDeuteronMass_generated}var dependenciesDiag_generated={},hasRequiredDependenciesDiag_generated;function requireDependenciesDiag_generated(){if(hasRequiredDependenciesDiag_generated)return dependenciesDiag_generated;hasRequiredDependenciesDiag_generated=1,Object.defineProperty(dependenciesDiag_generated,"__esModule",{value:!0}),dependenciesDiag_generated.diagDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesSparseMatrixClass_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,SparseMatrixDependencies:_e.SparseMatrixDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createDiag:nt.createDiag};return dependenciesDiag_generated.diagDependencies=st,dependenciesDiag_generated}var dependenciesDiff_generated={},hasRequiredDependenciesDiff_generated;function requireDependenciesDiff_generated(){if(hasRequiredDependenciesDiff_generated)return dependenciesDiff_generated;hasRequiredDependenciesDiff_generated=1,Object.defineProperty(dependenciesDiff_generated,"__esModule",{value:!0}),dependenciesDiff_generated.diffDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesNumber_generated(),tt=requireDependenciesSubtract_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={matrixDependencies:et.matrixDependencies,numberDependencies:_e.numberDependencies,subtractDependencies:tt.subtractDependencies,typedDependencies:rt.typedDependencies,createDiff:nt.createDiff};return dependenciesDiff_generated.diffDependencies=st,dependenciesDiff_generated}var dependenciesDiffTransform_generated={},hasRequiredDependenciesDiffTransform_generated;function requireDependenciesDiffTransform_generated(){if(hasRequiredDependenciesDiffTransform_generated)return dependenciesDiffTransform_generated;hasRequiredDependenciesDiffTransform_generated=1,Object.defineProperty(dependenciesDiffTransform_generated,"__esModule",{value:!0}),dependenciesDiffTransform_generated.diffTransformDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesNumber_generated(),rt=requireDependenciesSubtract_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={bignumberDependencies:et.bignumberDependencies,matrixDependencies:_e.matrixDependencies,numberDependencies:tt.numberDependencies,subtractDependencies:rt.subtractDependencies,typedDependencies:nt.typedDependencies,createDiffTransform:st.createDiffTransform};return dependenciesDiffTransform_generated.diffTransformDependencies=dt,dependenciesDiffTransform_generated}var dependenciesDistance_generated={},dependenciesSqrt_generated={},hasRequiredDependenciesSqrt_generated;function requireDependenciesSqrt_generated(){if(hasRequiredDependenciesSqrt_generated)return dependenciesSqrt_generated;hasRequiredDependenciesSqrt_generated=1,Object.defineProperty(dependenciesSqrt_generated,"__esModule",{value:!0}),dependenciesSqrt_generated.sqrtDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createSqrt:tt.createSqrt};return dependenciesSqrt_generated.sqrtDependencies=rt,dependenciesSqrt_generated}var hasRequiredDependenciesDistance_generated;function requireDependenciesDistance_generated(){if(hasRequiredDependenciesDistance_generated)return dependenciesDistance_generated;hasRequiredDependenciesDistance_generated=1,Object.defineProperty(dependenciesDistance_generated,"__esModule",{value:!0}),dependenciesDistance_generated.distanceDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesDivideScalar_generated(),rt=requireDependenciesMultiplyScalar_generated(),nt=requireDependenciesSqrt_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireDependenciesUnaryMinus_generated(),ht=requireFactoriesAny(),mt={absDependencies:et.absDependencies,addScalarDependencies:_e.addScalarDependencies,divideScalarDependencies:tt.divideScalarDependencies,multiplyScalarDependencies:rt.multiplyScalarDependencies,sqrtDependencies:nt.sqrtDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,unaryMinusDependencies:ft.unaryMinusDependencies,createDistance:ht.createDistance};return dependenciesDistance_generated.distanceDependencies=mt,dependenciesDistance_generated}var dependenciesDotDivide_generated={},hasRequiredDependenciesDotDivide_generated;function requireDependenciesDotDivide_generated(){if(hasRequiredDependenciesDotDivide_generated)return dependenciesDotDivide_generated;hasRequiredDependenciesDotDivide_generated=1,Object.defineProperty(dependenciesDotDivide_generated,"__esModule",{value:!0}),dependenciesDotDivide_generated.dotDivideDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={DenseMatrixDependencies:et.DenseMatrixDependencies,divideScalarDependencies:_e.divideScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,createDotDivide:st.createDotDivide};return dependenciesDotDivide_generated.dotDivideDependencies=dt,dependenciesDotDivide_generated}var dependenciesDotMultiply_generated={},hasRequiredDependenciesDotMultiply_generated;function requireDependenciesDotMultiply_generated(){if(hasRequiredDependenciesDotMultiply_generated)return dependenciesDotMultiply_generated;hasRequiredDependenciesDotMultiply_generated=1,Object.defineProperty(dependenciesDotMultiply_generated,"__esModule",{value:!0}),dependenciesDotMultiply_generated.dotMultiplyDependencies=void 0;var et=requireDependenciesEqualScalar_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesMultiplyScalar_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={equalScalarDependencies:et.equalScalarDependencies,matrixDependencies:_e.matrixDependencies,multiplyScalarDependencies:tt.multiplyScalarDependencies,typedDependencies:rt.typedDependencies,createDotMultiply:nt.createDotMultiply};return dependenciesDotMultiply_generated.dotMultiplyDependencies=st,dependenciesDotMultiply_generated}var dependenciesDotPow_generated={},hasRequiredDependenciesDotPow_generated;function requireDependenciesDotPow_generated(){if(hasRequiredDependenciesDotPow_generated)return dependenciesDotPow_generated;hasRequiredDependenciesDotPow_generated=1,Object.defineProperty(dependenciesDotPow_generated,"__esModule",{value:!0}),dependenciesDotPow_generated.dotPowDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesPow_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,powDependencies:rt.powDependencies,typedDependencies:nt.typedDependencies,createDotPow:st.createDotPow};return dependenciesDotPow_generated.dotPowDependencies=dt,dependenciesDotPow_generated}var dependenciesE_generated={},hasRequiredDependenciesE_generated;function requireDependenciesE_generated(){if(hasRequiredDependenciesE_generated)return dependenciesE_generated;hasRequiredDependenciesE_generated=1,Object.defineProperty(dependenciesE_generated,"__esModule",{value:!0}),dependenciesE_generated.eDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createE:_e.createE};return dependenciesE_generated.eDependencies=tt,dependenciesE_generated}var dependenciesEfimovFactor_generated={},hasRequiredDependenciesEfimovFactor_generated;function requireDependenciesEfimovFactor_generated(){if(hasRequiredDependenciesEfimovFactor_generated)return dependenciesEfimovFactor_generated;hasRequiredDependenciesEfimovFactor_generated=1,Object.defineProperty(dependenciesEfimovFactor_generated,"__esModule",{value:!0}),dependenciesEfimovFactor_generated.efimovFactorDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createEfimovFactor:_e.createEfimovFactor};return dependenciesEfimovFactor_generated.efimovFactorDependencies=tt,dependenciesEfimovFactor_generated}var dependenciesEigs_generated={},dependenciesFlatten_generated={},hasRequiredDependenciesFlatten_generated;function requireDependenciesFlatten_generated(){if(hasRequiredDependenciesFlatten_generated)return dependenciesFlatten_generated;hasRequiredDependenciesFlatten_generated=1,Object.defineProperty(dependenciesFlatten_generated,"__esModule",{value:!0}),dependenciesFlatten_generated.flattenDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createFlatten:tt.createFlatten};return dependenciesFlatten_generated.flattenDependencies=rt,dependenciesFlatten_generated}var dependenciesIm_generated={},hasRequiredDependenciesIm_generated;function requireDependenciesIm_generated(){if(hasRequiredDependenciesIm_generated)return dependenciesIm_generated;hasRequiredDependenciesIm_generated=1,Object.defineProperty(dependenciesIm_generated,"__esModule",{value:!0}),dependenciesIm_generated.imDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIm:_e.createIm};return dependenciesIm_generated.imDependencies=tt,dependenciesIm_generated}var dependenciesMatrixFromColumns_generated={},hasRequiredDependenciesMatrixFromColumns_generated;function requireDependenciesMatrixFromColumns_generated(){if(hasRequiredDependenciesMatrixFromColumns_generated)return dependenciesMatrixFromColumns_generated;hasRequiredDependenciesMatrixFromColumns_generated=1,Object.defineProperty(dependenciesMatrixFromColumns_generated,"__esModule",{value:!0}),dependenciesMatrixFromColumns_generated.matrixFromColumnsDependencies=void 0;var et=requireDependenciesFlatten_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesSize_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={flattenDependencies:et.flattenDependencies,matrixDependencies:_e.matrixDependencies,sizeDependencies:tt.sizeDependencies,typedDependencies:rt.typedDependencies,createMatrixFromColumns:nt.createMatrixFromColumns};return dependenciesMatrixFromColumns_generated.matrixFromColumnsDependencies=st,dependenciesMatrixFromColumns_generated}var dependenciesQr_generated={},dependenciesSign_generated={},hasRequiredDependenciesSign_generated;function requireDependenciesSign_generated(){if(hasRequiredDependenciesSign_generated)return dependenciesSign_generated;hasRequiredDependenciesSign_generated=1,Object.defineProperty(dependenciesSign_generated,"__esModule",{value:!0}),dependenciesSign_generated.signDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesFractionClass_generated(),tt=requireDependenciesComplex_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={BigNumberDependencies:et.BigNumberDependencies,FractionDependencies:_e.FractionDependencies,complexDependencies:tt.complexDependencies,typedDependencies:rt.typedDependencies,createSign:nt.createSign};return dependenciesSign_generated.signDependencies=st,dependenciesSign_generated}var hasRequiredDependenciesQr_generated;function requireDependenciesQr_generated(){if(hasRequiredDependenciesQr_generated)return dependenciesQr_generated;hasRequiredDependenciesQr_generated=1,Object.defineProperty(dependenciesQr_generated,"__esModule",{value:!0}),dependenciesQr_generated.qrDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesComplex_generated(),tt=requireDependenciesConj_generated(),rt=requireDependenciesDivideScalar_generated(),nt=requireDependenciesEqual_generated(),st=requireDependenciesIdentity_generated(),dt=requireDependenciesIsZero_generated(),ft=requireDependenciesMatrix_generated(),ht=requireDependenciesMultiplyScalar_generated(),mt=requireDependenciesSign_generated(),bt=requireDependenciesSqrt_generated(),St=requireDependenciesSubtract_generated(),Et=requireDependenciesTyped_generated(),Ct=requireDependenciesUnaryMinus_generated(),Rt=requireDependenciesZeros_generated(),Tt=requireFactoriesAny(),wt={addScalarDependencies:et.addScalarDependencies,complexDependencies:_e.complexDependencies,conjDependencies:tt.conjDependencies,divideScalarDependencies:rt.divideScalarDependencies,equalDependencies:nt.equalDependencies,identityDependencies:st.identityDependencies,isZeroDependencies:dt.isZeroDependencies,matrixDependencies:ft.matrixDependencies,multiplyScalarDependencies:ht.multiplyScalarDependencies,signDependencies:mt.signDependencies,sqrtDependencies:bt.sqrtDependencies,subtractDependencies:St.subtractDependencies,typedDependencies:Et.typedDependencies,unaryMinusDependencies:Ct.unaryMinusDependencies,zerosDependencies:Rt.zerosDependencies,createQr:Tt.createQr};return dependenciesQr_generated.qrDependencies=wt,dependenciesQr_generated}var dependenciesRe_generated={},hasRequiredDependenciesRe_generated;function requireDependenciesRe_generated(){if(hasRequiredDependenciesRe_generated)return dependenciesRe_generated;hasRequiredDependenciesRe_generated=1,Object.defineProperty(dependenciesRe_generated,"__esModule",{value:!0}),dependenciesRe_generated.reDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createRe:_e.createRe};return dependenciesRe_generated.reDependencies=tt,dependenciesRe_generated}var dependenciesSin_generated={},hasRequiredDependenciesSin_generated;function requireDependenciesSin_generated(){if(hasRequiredDependenciesSin_generated)return dependenciesSin_generated;hasRequiredDependenciesSin_generated=1,Object.defineProperty(dependenciesSin_generated,"__esModule",{value:!0}),dependenciesSin_generated.sinDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createSin:_e.createSin};return dependenciesSin_generated.sinDependencies=tt,dependenciesSin_generated}var dependenciesUsolve_generated={},hasRequiredDependenciesUsolve_generated;function requireDependenciesUsolve_generated(){if(hasRequiredDependenciesUsolve_generated)return dependenciesUsolve_generated;hasRequiredDependenciesUsolve_generated=1,Object.defineProperty(dependenciesUsolve_generated,"__esModule",{value:!0}),dependenciesUsolve_generated.usolveDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={DenseMatrixDependencies:et.DenseMatrixDependencies,divideScalarDependencies:_e.divideScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createUsolve:ft.createUsolve};return dependenciesUsolve_generated.usolveDependencies=ht,dependenciesUsolve_generated}var dependenciesUsolveAll_generated={},hasRequiredDependenciesUsolveAll_generated;function requireDependenciesUsolveAll_generated(){if(hasRequiredDependenciesUsolveAll_generated)return dependenciesUsolveAll_generated;hasRequiredDependenciesUsolveAll_generated=1,Object.defineProperty(dependenciesUsolveAll_generated,"__esModule",{value:!0}),dependenciesUsolveAll_generated.usolveAllDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={DenseMatrixDependencies:et.DenseMatrixDependencies,divideScalarDependencies:_e.divideScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createUsolveAll:ft.createUsolveAll};return dependenciesUsolveAll_generated.usolveAllDependencies=ht,dependenciesUsolveAll_generated}var hasRequiredDependenciesEigs_generated;function requireDependenciesEigs_generated(){if(hasRequiredDependenciesEigs_generated)return dependenciesEigs_generated;hasRequiredDependenciesEigs_generated=1,Object.defineProperty(dependenciesEigs_generated,"__esModule",{value:!0}),dependenciesEigs_generated.eigsDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesAddScalar_generated(),rt=requireDependenciesAtan_generated(),nt=requireDependenciesBignumber_generated(),st=requireDependenciesColumn_generated(),dt=requireDependenciesComplex_generated(),ft=requireDependenciesCos_generated(),ht=requireDependenciesDiag_generated(),mt=requireDependenciesDivideScalar_generated(),bt=requireDependenciesDot_generated(),St=requireDependenciesEqual_generated(),Et=requireDependenciesFlatten_generated(),Ct=requireDependenciesIm_generated(),Rt=requireDependenciesInv_generated(),Tt=requireDependenciesLarger_generated(),wt=requireDependenciesMatrix_generated(),At=requireDependenciesMatrixFromColumns_generated(),Nt=requireDependenciesMultiply_generated(),Pt=requireDependenciesMultiplyScalar_generated(),It=requireDependenciesNumber_generated(),Ft=requireDependenciesQr_generated(),qt=requireDependenciesRe_generated(),Vt=requireDependenciesSin_generated(),Kt=requireDependenciesSmaller_generated(),jt=requireDependenciesSqrt_generated(),Ut=requireDependenciesSubtract_generated(),Ot=requireDependenciesTyped_generated(),Wt=requireDependenciesUsolve_generated(),Bt=requireDependenciesUsolveAll_generated(),tr=requireFactoriesAny(),Jt={absDependencies:et.absDependencies,addDependencies:_e.addDependencies,addScalarDependencies:tt.addScalarDependencies,atanDependencies:rt.atanDependencies,bignumberDependencies:nt.bignumberDependencies,columnDependencies:st.columnDependencies,complexDependencies:dt.complexDependencies,cosDependencies:ft.cosDependencies,diagDependencies:ht.diagDependencies,divideScalarDependencies:mt.divideScalarDependencies,dotDependencies:bt.dotDependencies,equalDependencies:St.equalDependencies,flattenDependencies:Et.flattenDependencies,imDependencies:Ct.imDependencies,invDependencies:Rt.invDependencies,largerDependencies:Tt.largerDependencies,matrixDependencies:wt.matrixDependencies,matrixFromColumnsDependencies:At.matrixFromColumnsDependencies,multiplyDependencies:Nt.multiplyDependencies,multiplyScalarDependencies:Pt.multiplyScalarDependencies,numberDependencies:It.numberDependencies,qrDependencies:Ft.qrDependencies,reDependencies:qt.reDependencies,sinDependencies:Vt.sinDependencies,smallerDependencies:Kt.smallerDependencies,sqrtDependencies:jt.sqrtDependencies,subtractDependencies:Ut.subtractDependencies,typedDependencies:Ot.typedDependencies,usolveDependencies:Wt.usolveDependencies,usolveAllDependencies:Bt.usolveAllDependencies,createEigs:tr.createEigs};return dependenciesEigs_generated.eigsDependencies=Jt,dependenciesEigs_generated}var dependenciesElectricConstant_generated={},hasRequiredDependenciesElectricConstant_generated;function requireDependenciesElectricConstant_generated(){if(hasRequiredDependenciesElectricConstant_generated)return dependenciesElectricConstant_generated;hasRequiredDependenciesElectricConstant_generated=1,Object.defineProperty(dependenciesElectricConstant_generated,"__esModule",{value:!0}),dependenciesElectricConstant_generated.electricConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createElectricConstant:tt.createElectricConstant};return dependenciesElectricConstant_generated.electricConstantDependencies=rt,dependenciesElectricConstant_generated}var dependenciesElectronMass_generated={},hasRequiredDependenciesElectronMass_generated;function requireDependenciesElectronMass_generated(){if(hasRequiredDependenciesElectronMass_generated)return dependenciesElectronMass_generated;hasRequiredDependenciesElectronMass_generated=1,Object.defineProperty(dependenciesElectronMass_generated,"__esModule",{value:!0}),dependenciesElectronMass_generated.electronMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createElectronMass:tt.createElectronMass};return dependenciesElectronMass_generated.electronMassDependencies=rt,dependenciesElectronMass_generated}var dependenciesElementaryCharge_generated={},hasRequiredDependenciesElementaryCharge_generated;function requireDependenciesElementaryCharge_generated(){if(hasRequiredDependenciesElementaryCharge_generated)return dependenciesElementaryCharge_generated;hasRequiredDependenciesElementaryCharge_generated=1,Object.defineProperty(dependenciesElementaryCharge_generated,"__esModule",{value:!0}),dependenciesElementaryCharge_generated.elementaryChargeDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createElementaryCharge:tt.createElementaryCharge};return dependenciesElementaryCharge_generated.elementaryChargeDependencies=rt,dependenciesElementaryCharge_generated}var dependenciesEqualText_generated={},hasRequiredDependenciesEqualText_generated;function requireDependenciesEqualText_generated(){if(hasRequiredDependenciesEqualText_generated)return dependenciesEqualText_generated;hasRequiredDependenciesEqualText_generated=1,Object.defineProperty(dependenciesEqualText_generated,"__esModule",{value:!0}),dependenciesEqualText_generated.equalTextDependencies=void 0;var et=requireDependenciesCompareText_generated(),_e=requireDependenciesIsZero_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={compareTextDependencies:et.compareTextDependencies,isZeroDependencies:_e.isZeroDependencies,typedDependencies:tt.typedDependencies,createEqualText:rt.createEqualText};return dependenciesEqualText_generated.equalTextDependencies=nt,dependenciesEqualText_generated}var dependenciesErf_generated={},hasRequiredDependenciesErf_generated;function requireDependenciesErf_generated(){if(hasRequiredDependenciesErf_generated)return dependenciesErf_generated;hasRequiredDependenciesErf_generated=1,Object.defineProperty(dependenciesErf_generated,"__esModule",{value:!0}),dependenciesErf_generated.erfDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createErf:_e.createErf};return dependenciesErf_generated.erfDependencies=tt,dependenciesErf_generated}var dependenciesEvaluate_generated={},hasRequiredDependenciesEvaluate_generated;function requireDependenciesEvaluate_generated(){if(hasRequiredDependenciesEvaluate_generated)return dependenciesEvaluate_generated;hasRequiredDependenciesEvaluate_generated=1,Object.defineProperty(dependenciesEvaluate_generated,"__esModule",{value:!0}),dependenciesEvaluate_generated.evaluateDependencies=void 0;var et=requireDependenciesParse_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={parseDependencies:et.parseDependencies,typedDependencies:_e.typedDependencies,createEvaluate:tt.createEvaluate};return dependenciesEvaluate_generated.evaluateDependencies=rt,dependenciesEvaluate_generated}var dependenciesExp_generated={},hasRequiredDependenciesExp_generated;function requireDependenciesExp_generated(){if(hasRequiredDependenciesExp_generated)return dependenciesExp_generated;hasRequiredDependenciesExp_generated=1,Object.defineProperty(dependenciesExp_generated,"__esModule",{value:!0}),dependenciesExp_generated.expDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createExp:_e.createExp};return dependenciesExp_generated.expDependencies=tt,dependenciesExp_generated}var dependenciesExpm_generated={},hasRequiredDependenciesExpm_generated;function requireDependenciesExpm_generated(){if(hasRequiredDependenciesExpm_generated)return dependenciesExpm_generated;hasRequiredDependenciesExpm_generated=1,Object.defineProperty(dependenciesExpm_generated,"__esModule",{value:!0}),dependenciesExpm_generated.expmDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesIdentity_generated(),rt=requireDependenciesInv_generated(),nt=requireDependenciesMultiply_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={absDependencies:et.absDependencies,addDependencies:_e.addDependencies,identityDependencies:tt.identityDependencies,invDependencies:rt.invDependencies,multiplyDependencies:nt.multiplyDependencies,typedDependencies:st.typedDependencies,createExpm:dt.createExpm};return dependenciesExpm_generated.expmDependencies=ft,dependenciesExpm_generated}var dependenciesExpm1_generated={},hasRequiredDependenciesExpm1_generated;function requireDependenciesExpm1_generated(){if(hasRequiredDependenciesExpm1_generated)return dependenciesExpm1_generated;hasRequiredDependenciesExpm1_generated=1,Object.defineProperty(dependenciesExpm1_generated,"__esModule",{value:!0}),dependenciesExpm1_generated.expm1Dependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createExpm1:tt.createExpm1};return dependenciesExpm1_generated.expm1Dependencies=rt,dependenciesExpm1_generated}var dependenciesFalse_generated={},hasRequiredDependenciesFalse_generated;function requireDependenciesFalse_generated(){if(hasRequiredDependenciesFalse_generated)return dependenciesFalse_generated;hasRequiredDependenciesFalse_generated=1,Object.defineProperty(dependenciesFalse_generated,"__esModule",{value:!0}),dependenciesFalse_generated.falseDependencies=void 0;var et=requireFactoriesAny(),_e={createFalse:et.createFalse};return dependenciesFalse_generated.falseDependencies=_e,dependenciesFalse_generated}var dependenciesFaraday_generated={},hasRequiredDependenciesFaraday_generated;function requireDependenciesFaraday_generated(){if(hasRequiredDependenciesFaraday_generated)return dependenciesFaraday_generated;hasRequiredDependenciesFaraday_generated=1,Object.defineProperty(dependenciesFaraday_generated,"__esModule",{value:!0}),dependenciesFaraday_generated.faradayDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createFaraday:tt.createFaraday};return dependenciesFaraday_generated.faradayDependencies=rt,dependenciesFaraday_generated}var dependenciesFermiCoupling_generated={},hasRequiredDependenciesFermiCoupling_generated;function requireDependenciesFermiCoupling_generated(){if(hasRequiredDependenciesFermiCoupling_generated)return dependenciesFermiCoupling_generated;hasRequiredDependenciesFermiCoupling_generated=1,Object.defineProperty(dependenciesFermiCoupling_generated,"__esModule",{value:!0}),dependenciesFermiCoupling_generated.fermiCouplingDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createFermiCoupling:tt.createFermiCoupling};return dependenciesFermiCoupling_generated.fermiCouplingDependencies=rt,dependenciesFermiCoupling_generated}var dependenciesFft_generated={},dependenciesI_generated={},hasRequiredDependenciesI_generated;function requireDependenciesI_generated(){if(hasRequiredDependenciesI_generated)return dependenciesI_generated;hasRequiredDependenciesI_generated=1,Object.defineProperty(dependenciesI_generated,"__esModule",{value:!0}),dependenciesI_generated.iDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireFactoriesAny(),tt={ComplexDependencies:et.ComplexDependencies,createI:_e.createI};return dependenciesI_generated.iDependencies=tt,dependenciesI_generated}var dependenciesTau_generated={},hasRequiredDependenciesTau_generated;function requireDependenciesTau_generated(){if(hasRequiredDependenciesTau_generated)return dependenciesTau_generated;hasRequiredDependenciesTau_generated=1,Object.defineProperty(dependenciesTau_generated,"__esModule",{value:!0}),dependenciesTau_generated.tauDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createTau:_e.createTau};return dependenciesTau_generated.tauDependencies=tt,dependenciesTau_generated}var hasRequiredDependenciesFft_generated;function requireDependenciesFft_generated(){if(hasRequiredDependenciesFft_generated)return dependenciesFft_generated;hasRequiredDependenciesFft_generated=1,Object.defineProperty(dependenciesFft_generated,"__esModule",{value:!0}),dependenciesFft_generated.fftDependencies=void 0;var et=requireDependenciesAddScalar_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesExp_generated(),rt=requireDependenciesI_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesMultiplyScalar_generated(),dt=requireDependenciesTau_generated(),ft=requireDependenciesTyped_generated(),ht=requireFactoriesAny(),mt={addScalarDependencies:et.addScalarDependencies,divideScalarDependencies:_e.divideScalarDependencies,expDependencies:tt.expDependencies,iDependencies:rt.iDependencies,matrixDependencies:nt.matrixDependencies,multiplyScalarDependencies:st.multiplyScalarDependencies,tauDependencies:dt.tauDependencies,typedDependencies:ft.typedDependencies,createFft:ht.createFft};return dependenciesFft_generated.fftDependencies=mt,dependenciesFft_generated}var dependenciesFibonacciHeapClass_generated={},hasRequiredDependenciesFibonacciHeapClass_generated;function requireDependenciesFibonacciHeapClass_generated(){if(hasRequiredDependenciesFibonacciHeapClass_generated)return dependenciesFibonacciHeapClass_generated;hasRequiredDependenciesFibonacciHeapClass_generated=1,Object.defineProperty(dependenciesFibonacciHeapClass_generated,"__esModule",{value:!0}),dependenciesFibonacciHeapClass_generated.FibonacciHeapDependencies=void 0;var et=requireDependenciesLarger_generated(),_e=requireDependenciesSmaller_generated(),tt=requireFactoriesAny(),rt={largerDependencies:et.largerDependencies,smallerDependencies:_e.smallerDependencies,createFibonacciHeapClass:tt.createFibonacciHeapClass};return dependenciesFibonacciHeapClass_generated.FibonacciHeapDependencies=rt,dependenciesFibonacciHeapClass_generated}var dependenciesFilter_generated={},hasRequiredDependenciesFilter_generated;function requireDependenciesFilter_generated(){if(hasRequiredDependenciesFilter_generated)return dependenciesFilter_generated;hasRequiredDependenciesFilter_generated=1,Object.defineProperty(dependenciesFilter_generated,"__esModule",{value:!0}),dependenciesFilter_generated.filterDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createFilter:_e.createFilter};return dependenciesFilter_generated.filterDependencies=tt,dependenciesFilter_generated}var dependenciesFilterTransform_generated={},hasRequiredDependenciesFilterTransform_generated;function requireDependenciesFilterTransform_generated(){if(hasRequiredDependenciesFilterTransform_generated)return dependenciesFilterTransform_generated;hasRequiredDependenciesFilterTransform_generated=1,Object.defineProperty(dependenciesFilterTransform_generated,"__esModule",{value:!0}),dependenciesFilterTransform_generated.filterTransformDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createFilterTransform:_e.createFilterTransform};return dependenciesFilterTransform_generated.filterTransformDependencies=tt,dependenciesFilterTransform_generated}var dependenciesFineStructure_generated={},hasRequiredDependenciesFineStructure_generated;function requireDependenciesFineStructure_generated(){if(hasRequiredDependenciesFineStructure_generated)return dependenciesFineStructure_generated;hasRequiredDependenciesFineStructure_generated=1,Object.defineProperty(dependenciesFineStructure_generated,"__esModule",{value:!0}),dependenciesFineStructure_generated.fineStructureDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createFineStructure:_e.createFineStructure};return dependenciesFineStructure_generated.fineStructureDependencies=tt,dependenciesFineStructure_generated}var dependenciesFirstRadiation_generated={},hasRequiredDependenciesFirstRadiation_generated;function requireDependenciesFirstRadiation_generated(){if(hasRequiredDependenciesFirstRadiation_generated)return dependenciesFirstRadiation_generated;hasRequiredDependenciesFirstRadiation_generated=1,Object.defineProperty(dependenciesFirstRadiation_generated,"__esModule",{value:!0}),dependenciesFirstRadiation_generated.firstRadiationDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createFirstRadiation:tt.createFirstRadiation};return dependenciesFirstRadiation_generated.firstRadiationDependencies=rt,dependenciesFirstRadiation_generated}var dependenciesForEach_generated={},hasRequiredDependenciesForEach_generated;function requireDependenciesForEach_generated(){if(hasRequiredDependenciesForEach_generated)return dependenciesForEach_generated;hasRequiredDependenciesForEach_generated=1,Object.defineProperty(dependenciesForEach_generated,"__esModule",{value:!0}),dependenciesForEach_generated.forEachDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createForEach:_e.createForEach};return dependenciesForEach_generated.forEachDependencies=tt,dependenciesForEach_generated}var dependenciesForEachTransform_generated={},hasRequiredDependenciesForEachTransform_generated;function requireDependenciesForEachTransform_generated(){if(hasRequiredDependenciesForEachTransform_generated)return dependenciesForEachTransform_generated;hasRequiredDependenciesForEachTransform_generated=1,Object.defineProperty(dependenciesForEachTransform_generated,"__esModule",{value:!0}),dependenciesForEachTransform_generated.forEachTransformDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createForEachTransform:_e.createForEachTransform};return dependenciesForEachTransform_generated.forEachTransformDependencies=tt,dependenciesForEachTransform_generated}var dependenciesGasConstant_generated={},hasRequiredDependenciesGasConstant_generated;function requireDependenciesGasConstant_generated(){if(hasRequiredDependenciesGasConstant_generated)return dependenciesGasConstant_generated;hasRequiredDependenciesGasConstant_generated=1,Object.defineProperty(dependenciesGasConstant_generated,"__esModule",{value:!0}),dependenciesGasConstant_generated.gasConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createGasConstant:tt.createGasConstant};return dependenciesGasConstant_generated.gasConstantDependencies=rt,dependenciesGasConstant_generated}var dependenciesGcd_generated={},hasRequiredDependenciesGcd_generated;function requireDependenciesGcd_generated(){if(hasRequiredDependenciesGcd_generated)return dependenciesGcd_generated;hasRequiredDependenciesGcd_generated=1,Object.defineProperty(dependenciesGcd_generated,"__esModule",{value:!0}),dependenciesGcd_generated.gcdDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,typedDependencies:nt.typedDependencies,createGcd:st.createGcd};return dependenciesGcd_generated.gcdDependencies=dt,dependenciesGcd_generated}var dependenciesGetMatrixDataType_generated={},hasRequiredDependenciesGetMatrixDataType_generated;function requireDependenciesGetMatrixDataType_generated(){if(hasRequiredDependenciesGetMatrixDataType_generated)return dependenciesGetMatrixDataType_generated;hasRequiredDependenciesGetMatrixDataType_generated=1,Object.defineProperty(dependenciesGetMatrixDataType_generated,"__esModule",{value:!0}),dependenciesGetMatrixDataType_generated.getMatrixDataTypeDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createGetMatrixDataType:_e.createGetMatrixDataType};return dependenciesGetMatrixDataType_generated.getMatrixDataTypeDependencies=tt,dependenciesGetMatrixDataType_generated}var dependenciesGravitationConstant_generated={},hasRequiredDependenciesGravitationConstant_generated;function requireDependenciesGravitationConstant_generated(){if(hasRequiredDependenciesGravitationConstant_generated)return dependenciesGravitationConstant_generated;hasRequiredDependenciesGravitationConstant_generated=1,Object.defineProperty(dependenciesGravitationConstant_generated,"__esModule",{value:!0}),dependenciesGravitationConstant_generated.gravitationConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createGravitationConstant:tt.createGravitationConstant};return dependenciesGravitationConstant_generated.gravitationConstantDependencies=rt,dependenciesGravitationConstant_generated}var dependenciesGravity_generated={},hasRequiredDependenciesGravity_generated;function requireDependenciesGravity_generated(){if(hasRequiredDependenciesGravity_generated)return dependenciesGravity_generated;hasRequiredDependenciesGravity_generated=1,Object.defineProperty(dependenciesGravity_generated,"__esModule",{value:!0}),dependenciesGravity_generated.gravityDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createGravity:tt.createGravity};return dependenciesGravity_generated.gravityDependencies=rt,dependenciesGravity_generated}var dependenciesHartreeEnergy_generated={},hasRequiredDependenciesHartreeEnergy_generated;function requireDependenciesHartreeEnergy_generated(){if(hasRequiredDependenciesHartreeEnergy_generated)return dependenciesHartreeEnergy_generated;hasRequiredDependenciesHartreeEnergy_generated=1,Object.defineProperty(dependenciesHartreeEnergy_generated,"__esModule",{value:!0}),dependenciesHartreeEnergy_generated.hartreeEnergyDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createHartreeEnergy:tt.createHartreeEnergy};return dependenciesHartreeEnergy_generated.hartreeEnergyDependencies=rt,dependenciesHartreeEnergy_generated}var dependenciesHasNumericValue_generated={},hasRequiredDependenciesHasNumericValue_generated;function requireDependenciesHasNumericValue_generated(){if(hasRequiredDependenciesHasNumericValue_generated)return dependenciesHasNumericValue_generated;hasRequiredDependenciesHasNumericValue_generated=1,Object.defineProperty(dependenciesHasNumericValue_generated,"__esModule",{value:!0}),dependenciesHasNumericValue_generated.hasNumericValueDependencies=void 0;var et=requireDependenciesIsNumeric_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={isNumericDependencies:et.isNumericDependencies,typedDependencies:_e.typedDependencies,createHasNumericValue:tt.createHasNumericValue};return dependenciesHasNumericValue_generated.hasNumericValueDependencies=rt,dependenciesHasNumericValue_generated}var dependenciesHelp_generated={},dependenciesHelpClass_generated={},hasRequiredDependenciesHelpClass_generated;function requireDependenciesHelpClass_generated(){if(hasRequiredDependenciesHelpClass_generated)return dependenciesHelpClass_generated;hasRequiredDependenciesHelpClass_generated=1,Object.defineProperty(dependenciesHelpClass_generated,"__esModule",{value:!0}),dependenciesHelpClass_generated.HelpDependencies=void 0;var et=requireDependenciesParse_generated(),_e=requireFactoriesAny(),tt={parseDependencies:et.parseDependencies,createHelpClass:_e.createHelpClass};return dependenciesHelpClass_generated.HelpDependencies=tt,dependenciesHelpClass_generated}var hasRequiredDependenciesHelp_generated;function requireDependenciesHelp_generated(){if(hasRequiredDependenciesHelp_generated)return dependenciesHelp_generated;hasRequiredDependenciesHelp_generated=1,Object.defineProperty(dependenciesHelp_generated,"__esModule",{value:!0}),dependenciesHelp_generated.helpDependencies=void 0;var et=requireDependenciesHelpClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={HelpDependencies:et.HelpDependencies,typedDependencies:_e.typedDependencies,createHelp:tt.createHelp};return dependenciesHelp_generated.helpDependencies=rt,dependenciesHelp_generated}var dependenciesHex_generated={},hasRequiredDependenciesHex_generated;function requireDependenciesHex_generated(){if(hasRequiredDependenciesHex_generated)return dependenciesHex_generated;hasRequiredDependenciesHex_generated=1,Object.defineProperty(dependenciesHex_generated,"__esModule",{value:!0}),dependenciesHex_generated.hexDependencies=void 0;var et=requireDependenciesFormat_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={formatDependencies:et.formatDependencies,typedDependencies:_e.typedDependencies,createHex:tt.createHex};return dependenciesHex_generated.hexDependencies=rt,dependenciesHex_generated}var dependenciesHypot_generated={},hasRequiredDependenciesHypot_generated;function requireDependenciesHypot_generated(){if(hasRequiredDependenciesHypot_generated)return dependenciesHypot_generated;hasRequiredDependenciesHypot_generated=1,Object.defineProperty(dependenciesHypot_generated,"__esModule",{value:!0}),dependenciesHypot_generated.hypotDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesDivideScalar_generated(),rt=requireDependenciesIsPositive_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesSmaller_generated(),dt=requireDependenciesSqrt_generated(),ft=requireDependenciesTyped_generated(),ht=requireFactoriesAny(),mt={absDependencies:et.absDependencies,addScalarDependencies:_e.addScalarDependencies,divideScalarDependencies:tt.divideScalarDependencies,isPositiveDependencies:rt.isPositiveDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,smallerDependencies:st.smallerDependencies,sqrtDependencies:dt.sqrtDependencies,typedDependencies:ft.typedDependencies,createHypot:ht.createHypot};return dependenciesHypot_generated.hypotDependencies=mt,dependenciesHypot_generated}var dependenciesIfft_generated={},hasRequiredDependenciesIfft_generated;function requireDependenciesIfft_generated(){if(hasRequiredDependenciesIfft_generated)return dependenciesIfft_generated;hasRequiredDependenciesIfft_generated=1,Object.defineProperty(dependenciesIfft_generated,"__esModule",{value:!0}),dependenciesIfft_generated.ifftDependencies=void 0;var et=requireDependenciesConj_generated(),_e=requireDependenciesDotDivide_generated(),tt=requireDependenciesFft_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={conjDependencies:et.conjDependencies,dotDivideDependencies:_e.dotDivideDependencies,fftDependencies:tt.fftDependencies,typedDependencies:rt.typedDependencies,createIfft:nt.createIfft};return dependenciesIfft_generated.ifftDependencies=st,dependenciesIfft_generated}var dependenciesIndex_generated={},hasRequiredDependenciesIndex_generated;function requireDependenciesIndex_generated(){if(hasRequiredDependenciesIndex_generated)return dependenciesIndex_generated;hasRequiredDependenciesIndex_generated=1,Object.defineProperty(dependenciesIndex_generated,"__esModule",{value:!0}),dependenciesIndex_generated.indexDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={IndexDependencies:et.IndexDependencies,typedDependencies:_e.typedDependencies,createIndex:tt.createIndex};return dependenciesIndex_generated.indexDependencies=rt,dependenciesIndex_generated}var dependenciesIndexTransform_generated={},hasRequiredDependenciesIndexTransform_generated;function requireDependenciesIndexTransform_generated(){if(hasRequiredDependenciesIndexTransform_generated)return dependenciesIndexTransform_generated;hasRequiredDependenciesIndexTransform_generated=1,Object.defineProperty(dependenciesIndexTransform_generated,"__esModule",{value:!0}),dependenciesIndexTransform_generated.indexTransformDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireFactoriesAny(),tt={IndexDependencies:et.IndexDependencies,createIndexTransform:_e.createIndexTransform};return dependenciesIndexTransform_generated.indexTransformDependencies=tt,dependenciesIndexTransform_generated}var dependenciesInfinity_generated={},hasRequiredDependenciesInfinity_generated;function requireDependenciesInfinity_generated(){if(hasRequiredDependenciesInfinity_generated)return dependenciesInfinity_generated;hasRequiredDependenciesInfinity_generated=1,Object.defineProperty(dependenciesInfinity_generated,"__esModule",{value:!0}),dependenciesInfinity_generated.InfinityDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createInfinity:_e.createInfinity};return dependenciesInfinity_generated.InfinityDependencies=tt,dependenciesInfinity_generated}var dependenciesIntersect_generated={},hasRequiredDependenciesIntersect_generated;function requireDependenciesIntersect_generated(){if(hasRequiredDependenciesIntersect_generated)return dependenciesIntersect_generated;hasRequiredDependenciesIntersect_generated=1,Object.defineProperty(dependenciesIntersect_generated,"__esModule",{value:!0}),dependenciesIntersect_generated.intersectDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesAddScalar_generated(),rt=requireDependenciesDivideScalar_generated(),nt=requireDependenciesEqualScalar_generated(),st=requireDependenciesFlatten_generated(),dt=requireDependenciesIsNumeric_generated(),ft=requireDependenciesIsZero_generated(),ht=requireDependenciesMatrix_generated(),mt=requireDependenciesMultiply_generated(),bt=requireDependenciesMultiplyScalar_generated(),St=requireDependenciesSmaller_generated(),Et=requireDependenciesSubtract_generated(),Ct=requireDependenciesTyped_generated(),Rt=requireFactoriesAny(),Tt={absDependencies:et.absDependencies,addDependencies:_e.addDependencies,addScalarDependencies:tt.addScalarDependencies,divideScalarDependencies:rt.divideScalarDependencies,equalScalarDependencies:nt.equalScalarDependencies,flattenDependencies:st.flattenDependencies,isNumericDependencies:dt.isNumericDependencies,isZeroDependencies:ft.isZeroDependencies,matrixDependencies:ht.matrixDependencies,multiplyDependencies:mt.multiplyDependencies,multiplyScalarDependencies:bt.multiplyScalarDependencies,smallerDependencies:St.smallerDependencies,subtractDependencies:Et.subtractDependencies,typedDependencies:Ct.typedDependencies,createIntersect:Rt.createIntersect};return dependenciesIntersect_generated.intersectDependencies=Tt,dependenciesIntersect_generated}var dependenciesInverseConductanceQuantum_generated={},hasRequiredDependenciesInverseConductanceQuantum_generated;function requireDependenciesInverseConductanceQuantum_generated(){if(hasRequiredDependenciesInverseConductanceQuantum_generated)return dependenciesInverseConductanceQuantum_generated;hasRequiredDependenciesInverseConductanceQuantum_generated=1,Object.defineProperty(dependenciesInverseConductanceQuantum_generated,"__esModule",{value:!0}),dependenciesInverseConductanceQuantum_generated.inverseConductanceQuantumDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createInverseConductanceQuantum:tt.createInverseConductanceQuantum};return dependenciesInverseConductanceQuantum_generated.inverseConductanceQuantumDependencies=rt,dependenciesInverseConductanceQuantum_generated}var dependenciesInvmod_generated={},dependenciesMod_generated={},hasRequiredDependenciesMod_generated;function requireDependenciesMod_generated(){if(hasRequiredDependenciesMod_generated)return dependenciesMod_generated;hasRequiredDependenciesMod_generated=1,Object.defineProperty(dependenciesMod_generated,"__esModule",{value:!0}),dependenciesMod_generated.modDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createMod:nt.createMod};return dependenciesMod_generated.modDependencies=st,dependenciesMod_generated}var dependenciesXgcd_generated={},hasRequiredDependenciesXgcd_generated;function requireDependenciesXgcd_generated(){if(hasRequiredDependenciesXgcd_generated)return dependenciesXgcd_generated;hasRequiredDependenciesXgcd_generated=1,Object.defineProperty(dependenciesXgcd_generated,"__esModule",{value:!0}),dependenciesXgcd_generated.xgcdDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createXgcd:rt.createXgcd};return dependenciesXgcd_generated.xgcdDependencies=nt,dependenciesXgcd_generated}var hasRequiredDependenciesInvmod_generated;function requireDependenciesInvmod_generated(){if(hasRequiredDependenciesInvmod_generated)return dependenciesInvmod_generated;hasRequiredDependenciesInvmod_generated=1,Object.defineProperty(dependenciesInvmod_generated,"__esModule",{value:!0}),dependenciesInvmod_generated.invmodDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesEqual_generated(),rt=requireDependenciesIsInteger_generated(),nt=requireDependenciesMod_generated(),st=requireDependenciesSmaller_generated(),dt=requireDependenciesTyped_generated(),ft=requireDependenciesXgcd_generated(),ht=requireFactoriesAny(),mt={BigNumberDependencies:et.BigNumberDependencies,addDependencies:_e.addDependencies,equalDependencies:tt.equalDependencies,isIntegerDependencies:rt.isIntegerDependencies,modDependencies:nt.modDependencies,smallerDependencies:st.smallerDependencies,typedDependencies:dt.typedDependencies,xgcdDependencies:ft.xgcdDependencies,createInvmod:ht.createInvmod};return dependenciesInvmod_generated.invmodDependencies=mt,dependenciesInvmod_generated}var dependenciesIsNaN_generated={},hasRequiredDependenciesIsNaN_generated;function requireDependenciesIsNaN_generated(){if(hasRequiredDependenciesIsNaN_generated)return dependenciesIsNaN_generated;hasRequiredDependenciesIsNaN_generated=1,Object.defineProperty(dependenciesIsNaN_generated,"__esModule",{value:!0}),dependenciesIsNaN_generated.isNaNDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsNaN:_e.createIsNaN};return dependenciesIsNaN_generated.isNaNDependencies=tt,dependenciesIsNaN_generated}var dependenciesIsPrime_generated={},hasRequiredDependenciesIsPrime_generated;function requireDependenciesIsPrime_generated(){if(hasRequiredDependenciesIsPrime_generated)return dependenciesIsPrime_generated;hasRequiredDependenciesIsPrime_generated=1,Object.defineProperty(dependenciesIsPrime_generated,"__esModule",{value:!0}),dependenciesIsPrime_generated.isPrimeDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createIsPrime:_e.createIsPrime};return dependenciesIsPrime_generated.isPrimeDependencies=tt,dependenciesIsPrime_generated}var dependenciesKldivergence_generated={},dependenciesLog_generated={},hasRequiredDependenciesLog_generated;function requireDependenciesLog_generated(){if(hasRequiredDependenciesLog_generated)return dependenciesLog_generated;hasRequiredDependenciesLog_generated=1,Object.defineProperty(dependenciesLog_generated,"__esModule",{value:!0}),dependenciesLog_generated.logDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={ComplexDependencies:et.ComplexDependencies,divideScalarDependencies:_e.divideScalarDependencies,typedDependencies:tt.typedDependencies,createLog:rt.createLog};return dependenciesLog_generated.logDependencies=nt,dependenciesLog_generated}var dependenciesSum_generated={},hasRequiredDependenciesSum_generated;function requireDependenciesSum_generated(){if(hasRequiredDependenciesSum_generated)return dependenciesSum_generated;hasRequiredDependenciesSum_generated=1,Object.defineProperty(dependenciesSum_generated,"__esModule",{value:!0}),dependenciesSum_generated.sumDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,numericDependencies:_e.numericDependencies,typedDependencies:tt.typedDependencies,createSum:rt.createSum};return dependenciesSum_generated.sumDependencies=nt,dependenciesSum_generated}var hasRequiredDependenciesKldivergence_generated;function requireDependenciesKldivergence_generated(){if(hasRequiredDependenciesKldivergence_generated)return dependenciesKldivergence_generated;hasRequiredDependenciesKldivergence_generated=1,Object.defineProperty(dependenciesKldivergence_generated,"__esModule",{value:!0}),dependenciesKldivergence_generated.kldivergenceDependencies=void 0;var et=requireDependenciesDivide_generated(),_e=requireDependenciesDotDivide_generated(),tt=requireDependenciesIsNumeric_generated(),rt=requireDependenciesLog_generated(),nt=requireDependenciesMatrix_generated(),st=requireDependenciesMultiply_generated(),dt=requireDependenciesSum_generated(),ft=requireDependenciesTyped_generated(),ht=requireFactoriesAny(),mt={divideDependencies:et.divideDependencies,dotDivideDependencies:_e.dotDivideDependencies,isNumericDependencies:tt.isNumericDependencies,logDependencies:rt.logDependencies,matrixDependencies:nt.matrixDependencies,multiplyDependencies:st.multiplyDependencies,sumDependencies:dt.sumDependencies,typedDependencies:ft.typedDependencies,createKldivergence:ht.createKldivergence};return dependenciesKldivergence_generated.kldivergenceDependencies=mt,dependenciesKldivergence_generated}var dependenciesKlitzing_generated={},hasRequiredDependenciesKlitzing_generated;function requireDependenciesKlitzing_generated(){if(hasRequiredDependenciesKlitzing_generated)return dependenciesKlitzing_generated;hasRequiredDependenciesKlitzing_generated=1,Object.defineProperty(dependenciesKlitzing_generated,"__esModule",{value:!0}),dependenciesKlitzing_generated.klitzingDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createKlitzing:tt.createKlitzing};return dependenciesKlitzing_generated.klitzingDependencies=rt,dependenciesKlitzing_generated}var dependenciesKron_generated={},hasRequiredDependenciesKron_generated;function requireDependenciesKron_generated(){if(hasRequiredDependenciesKron_generated)return dependenciesKron_generated;hasRequiredDependenciesKron_generated=1,Object.defineProperty(dependenciesKron_generated,"__esModule",{value:!0}),dependenciesKron_generated.kronDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesMultiplyScalar_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={matrixDependencies:et.matrixDependencies,multiplyScalarDependencies:_e.multiplyScalarDependencies,typedDependencies:tt.typedDependencies,createKron:rt.createKron};return dependenciesKron_generated.kronDependencies=nt,dependenciesKron_generated}var dependenciesLN10_generated={},hasRequiredDependenciesLN10_generated;function requireDependenciesLN10_generated(){if(hasRequiredDependenciesLN10_generated)return dependenciesLN10_generated;hasRequiredDependenciesLN10_generated=1,Object.defineProperty(dependenciesLN10_generated,"__esModule",{value:!0}),dependenciesLN10_generated.LN10Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createLN10:_e.createLN10};return dependenciesLN10_generated.LN10Dependencies=tt,dependenciesLN10_generated}var dependenciesLN2_generated={},hasRequiredDependenciesLN2_generated;function requireDependenciesLN2_generated(){if(hasRequiredDependenciesLN2_generated)return dependenciesLN2_generated;hasRequiredDependenciesLN2_generated=1,Object.defineProperty(dependenciesLN2_generated,"__esModule",{value:!0}),dependenciesLN2_generated.LN2Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createLN2:_e.createLN2};return dependenciesLN2_generated.LN2Dependencies=tt,dependenciesLN2_generated}var dependenciesLOG10E_generated={},hasRequiredDependenciesLOG10E_generated;function requireDependenciesLOG10E_generated(){if(hasRequiredDependenciesLOG10E_generated)return dependenciesLOG10E_generated;hasRequiredDependenciesLOG10E_generated=1,Object.defineProperty(dependenciesLOG10E_generated,"__esModule",{value:!0}),dependenciesLOG10E_generated.LOG10EDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createLOG10E:_e.createLOG10E};return dependenciesLOG10E_generated.LOG10EDependencies=tt,dependenciesLOG10E_generated}var dependenciesLOG2E_generated={},hasRequiredDependenciesLOG2E_generated;function requireDependenciesLOG2E_generated(){if(hasRequiredDependenciesLOG2E_generated)return dependenciesLOG2E_generated;hasRequiredDependenciesLOG2E_generated=1,Object.defineProperty(dependenciesLOG2E_generated,"__esModule",{value:!0}),dependenciesLOG2E_generated.LOG2EDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createLOG2E:_e.createLOG2E};return dependenciesLOG2E_generated.LOG2EDependencies=tt,dependenciesLOG2E_generated}var dependenciesLcm_generated={},hasRequiredDependenciesLcm_generated;function requireDependenciesLcm_generated(){if(hasRequiredDependenciesLcm_generated)return dependenciesLcm_generated;hasRequiredDependenciesLcm_generated=1,Object.defineProperty(dependenciesLcm_generated,"__esModule",{value:!0}),dependenciesLcm_generated.lcmDependencies=void 0;var et=requireDependenciesEqualScalar_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={equalScalarDependencies:et.equalScalarDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createLcm:rt.createLcm};return dependenciesLcm_generated.lcmDependencies=nt,dependenciesLcm_generated}var dependenciesLeafCount_generated={},hasRequiredDependenciesLeafCount_generated;function requireDependenciesLeafCount_generated(){if(hasRequiredDependenciesLeafCount_generated)return dependenciesLeafCount_generated;hasRequiredDependenciesLeafCount_generated=1,Object.defineProperty(dependenciesLeafCount_generated,"__esModule",{value:!0}),dependenciesLeafCount_generated.leafCountDependencies=void 0;var et=requireDependenciesParse_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={parseDependencies:et.parseDependencies,typedDependencies:_e.typedDependencies,createLeafCount:tt.createLeafCount};return dependenciesLeafCount_generated.leafCountDependencies=rt,dependenciesLeafCount_generated}var dependenciesLeftShift_generated={},hasRequiredDependenciesLeftShift_generated;function requireDependenciesLeftShift_generated(){if(hasRequiredDependenciesLeftShift_generated)return dependenciesLeftShift_generated;hasRequiredDependenciesLeftShift_generated=1,Object.defineProperty(dependenciesLeftShift_generated,"__esModule",{value:!0}),dependenciesLeftShift_generated.leftShiftDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireDependenciesZeros_generated(),st=requireFactoriesAny(),dt={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,zerosDependencies:nt.zerosDependencies,createLeftShift:st.createLeftShift};return dependenciesLeftShift_generated.leftShiftDependencies=dt,dependenciesLeftShift_generated}var dependenciesLgamma_generated={},hasRequiredDependenciesLgamma_generated;function requireDependenciesLgamma_generated(){if(hasRequiredDependenciesLgamma_generated)return dependenciesLgamma_generated;hasRequiredDependenciesLgamma_generated=1,Object.defineProperty(dependenciesLgamma_generated,"__esModule",{value:!0}),dependenciesLgamma_generated.lgammaDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createLgamma:tt.createLgamma};return dependenciesLgamma_generated.lgammaDependencies=rt,dependenciesLgamma_generated}var dependenciesLog10_generated={},hasRequiredDependenciesLog10_generated;function requireDependenciesLog10_generated(){if(hasRequiredDependenciesLog10_generated)return dependenciesLog10_generated;hasRequiredDependenciesLog10_generated=1,Object.defineProperty(dependenciesLog10_generated,"__esModule",{value:!0}),dependenciesLog10_generated.log10Dependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createLog10:tt.createLog10};return dependenciesLog10_generated.log10Dependencies=rt,dependenciesLog10_generated}var dependenciesLog1p_generated={},hasRequiredDependenciesLog1p_generated;function requireDependenciesLog1p_generated(){if(hasRequiredDependenciesLog1p_generated)return dependenciesLog1p_generated;hasRequiredDependenciesLog1p_generated=1,Object.defineProperty(dependenciesLog1p_generated,"__esModule",{value:!0}),dependenciesLog1p_generated.log1pDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesLog_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={ComplexDependencies:et.ComplexDependencies,divideScalarDependencies:_e.divideScalarDependencies,logDependencies:tt.logDependencies,typedDependencies:rt.typedDependencies,createLog1p:nt.createLog1p};return dependenciesLog1p_generated.log1pDependencies=st,dependenciesLog1p_generated}var dependenciesLog2_generated={},hasRequiredDependenciesLog2_generated;function requireDependenciesLog2_generated(){if(hasRequiredDependenciesLog2_generated)return dependenciesLog2_generated;hasRequiredDependenciesLog2_generated=1,Object.defineProperty(dependenciesLog2_generated,"__esModule",{value:!0}),dependenciesLog2_generated.log2Dependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ComplexDependencies:et.ComplexDependencies,typedDependencies:_e.typedDependencies,createLog2:tt.createLog2};return dependenciesLog2_generated.log2Dependencies=rt,dependenciesLog2_generated}var dependenciesLoschmidt_generated={},hasRequiredDependenciesLoschmidt_generated;function requireDependenciesLoschmidt_generated(){if(hasRequiredDependenciesLoschmidt_generated)return dependenciesLoschmidt_generated;hasRequiredDependenciesLoschmidt_generated=1,Object.defineProperty(dependenciesLoschmidt_generated,"__esModule",{value:!0}),dependenciesLoschmidt_generated.loschmidtDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createLoschmidt:tt.createLoschmidt};return dependenciesLoschmidt_generated.loschmidtDependencies=rt,dependenciesLoschmidt_generated}var dependenciesLsolve_generated={},hasRequiredDependenciesLsolve_generated;function requireDependenciesLsolve_generated(){if(hasRequiredDependenciesLsolve_generated)return dependenciesLsolve_generated;hasRequiredDependenciesLsolve_generated=1,Object.defineProperty(dependenciesLsolve_generated,"__esModule",{value:!0}),dependenciesLsolve_generated.lsolveDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={DenseMatrixDependencies:et.DenseMatrixDependencies,divideScalarDependencies:_e.divideScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createLsolve:ft.createLsolve};return dependenciesLsolve_generated.lsolveDependencies=ht,dependenciesLsolve_generated}var dependenciesLsolveAll_generated={},hasRequiredDependenciesLsolveAll_generated;function requireDependenciesLsolveAll_generated(){if(hasRequiredDependenciesLsolveAll_generated)return dependenciesLsolveAll_generated;hasRequiredDependenciesLsolveAll_generated=1,Object.defineProperty(dependenciesLsolveAll_generated,"__esModule",{value:!0}),dependenciesLsolveAll_generated.lsolveAllDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesMultiplyScalar_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={DenseMatrixDependencies:et.DenseMatrixDependencies,divideScalarDependencies:_e.divideScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,matrixDependencies:rt.matrixDependencies,multiplyScalarDependencies:nt.multiplyScalarDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createLsolveAll:ft.createLsolveAll};return dependenciesLsolveAll_generated.lsolveAllDependencies=ht,dependenciesLsolveAll_generated}var dependenciesLup_generated={},dependenciesSpaClass_generated={},hasRequiredDependenciesSpaClass_generated;function requireDependenciesSpaClass_generated(){if(hasRequiredDependenciesSpaClass_generated)return dependenciesSpaClass_generated;hasRequiredDependenciesSpaClass_generated=1,Object.defineProperty(dependenciesSpaClass_generated,"__esModule",{value:!0}),dependenciesSpaClass_generated.SpaDependencies=void 0;var et=requireDependenciesFibonacciHeapClass_generated(),_e=requireDependenciesAddScalar_generated(),tt=requireDependenciesEqualScalar_generated(),rt=requireFactoriesAny(),nt={FibonacciHeapDependencies:et.FibonacciHeapDependencies,addScalarDependencies:_e.addScalarDependencies,equalScalarDependencies:tt.equalScalarDependencies,createSpaClass:rt.createSpaClass};return dependenciesSpaClass_generated.SpaDependencies=nt,dependenciesSpaClass_generated}var hasRequiredDependenciesLup_generated;function requireDependenciesLup_generated(){if(hasRequiredDependenciesLup_generated)return dependenciesLup_generated;hasRequiredDependenciesLup_generated=1,Object.defineProperty(dependenciesLup_generated,"__esModule",{value:!0}),dependenciesLup_generated.lupDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesSpaClass_generated(),tt=requireDependenciesSparseMatrixClass_generated(),rt=requireDependenciesAbs_generated(),nt=requireDependenciesAddScalar_generated(),st=requireDependenciesDivideScalar_generated(),dt=requireDependenciesEqualScalar_generated(),ft=requireDependenciesLarger_generated(),ht=requireDependenciesMatrix_generated(),mt=requireDependenciesMultiplyScalar_generated(),bt=requireDependenciesSubtract_generated(),St=requireDependenciesTyped_generated(),Et=requireDependenciesUnaryMinus_generated(),Ct=requireFactoriesAny(),Rt={DenseMatrixDependencies:et.DenseMatrixDependencies,SpaDependencies:_e.SpaDependencies,SparseMatrixDependencies:tt.SparseMatrixDependencies,absDependencies:rt.absDependencies,addScalarDependencies:nt.addScalarDependencies,divideScalarDependencies:st.divideScalarDependencies,equalScalarDependencies:dt.equalScalarDependencies,largerDependencies:ft.largerDependencies,matrixDependencies:ht.matrixDependencies,multiplyScalarDependencies:mt.multiplyScalarDependencies,subtractDependencies:bt.subtractDependencies,typedDependencies:St.typedDependencies,unaryMinusDependencies:Et.unaryMinusDependencies,createLup:Ct.createLup};return dependenciesLup_generated.lupDependencies=Rt,dependenciesLup_generated}var dependenciesLusolve_generated={},dependenciesSlu_generated={},hasRequiredDependenciesSlu_generated;function requireDependenciesSlu_generated(){if(hasRequiredDependenciesSlu_generated)return dependenciesSlu_generated;hasRequiredDependenciesSlu_generated=1,Object.defineProperty(dependenciesSlu_generated,"__esModule",{value:!0}),dependenciesSlu_generated.sluDependencies=void 0;var et=requireDependenciesSparseMatrixClass_generated(),_e=requireDependenciesAbs_generated(),tt=requireDependenciesAdd_generated(),rt=requireDependenciesDivideScalar_generated(),nt=requireDependenciesLarger_generated(),st=requireDependenciesLargerEq_generated(),dt=requireDependenciesMultiply_generated(),ft=requireDependenciesSubtract_generated(),ht=requireDependenciesTranspose_generated(),mt=requireDependenciesTyped_generated(),bt=requireFactoriesAny(),St={SparseMatrixDependencies:et.SparseMatrixDependencies,absDependencies:_e.absDependencies,addDependencies:tt.addDependencies,divideScalarDependencies:rt.divideScalarDependencies,largerDependencies:nt.largerDependencies,largerEqDependencies:st.largerEqDependencies,multiplyDependencies:dt.multiplyDependencies,subtractDependencies:ft.subtractDependencies,transposeDependencies:ht.transposeDependencies,typedDependencies:mt.typedDependencies,createSlu:bt.createSlu};return dependenciesSlu_generated.sluDependencies=St,dependenciesSlu_generated}var hasRequiredDependenciesLusolve_generated;function requireDependenciesLusolve_generated(){if(hasRequiredDependenciesLusolve_generated)return dependenciesLusolve_generated;hasRequiredDependenciesLusolve_generated=1,Object.defineProperty(dependenciesLusolve_generated,"__esModule",{value:!0}),dependenciesLusolve_generated.lusolveDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesLsolve_generated(),tt=requireDependenciesLup_generated(),rt=requireDependenciesMatrix_generated(),nt=requireDependenciesSlu_generated(),st=requireDependenciesTyped_generated(),dt=requireDependenciesUsolve_generated(),ft=requireFactoriesAny(),ht={DenseMatrixDependencies:et.DenseMatrixDependencies,lsolveDependencies:_e.lsolveDependencies,lupDependencies:tt.lupDependencies,matrixDependencies:rt.matrixDependencies,sluDependencies:nt.sluDependencies,typedDependencies:st.typedDependencies,usolveDependencies:dt.usolveDependencies,createLusolve:ft.createLusolve};return dependenciesLusolve_generated.lusolveDependencies=ht,dependenciesLusolve_generated}var dependenciesMad_generated={},dependenciesMap_generated={},hasRequiredDependenciesMap_generated;function requireDependenciesMap_generated(){if(hasRequiredDependenciesMap_generated)return dependenciesMap_generated;hasRequiredDependenciesMap_generated=1,Object.defineProperty(dependenciesMap_generated,"__esModule",{value:!0}),dependenciesMap_generated.mapDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createMap:_e.createMap};return dependenciesMap_generated.mapDependencies=tt,dependenciesMap_generated}var dependenciesMedian_generated={},dependenciesPartitionSelect_generated={},hasRequiredDependenciesPartitionSelect_generated;function requireDependenciesPartitionSelect_generated(){if(hasRequiredDependenciesPartitionSelect_generated)return dependenciesPartitionSelect_generated;hasRequiredDependenciesPartitionSelect_generated=1,Object.defineProperty(dependenciesPartitionSelect_generated,"__esModule",{value:!0}),dependenciesPartitionSelect_generated.partitionSelectDependencies=void 0;var et=requireDependenciesCompare_generated(),_e=requireDependenciesIsNaN_generated(),tt=requireDependenciesIsNumeric_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={compareDependencies:et.compareDependencies,isNaNDependencies:_e.isNaNDependencies,isNumericDependencies:tt.isNumericDependencies,typedDependencies:rt.typedDependencies,createPartitionSelect:nt.createPartitionSelect};return dependenciesPartitionSelect_generated.partitionSelectDependencies=st,dependenciesPartitionSelect_generated}var hasRequiredDependenciesMedian_generated;function requireDependenciesMedian_generated(){if(hasRequiredDependenciesMedian_generated)return dependenciesMedian_generated;hasRequiredDependenciesMedian_generated=1,Object.defineProperty(dependenciesMedian_generated,"__esModule",{value:!0}),dependenciesMedian_generated.medianDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesCompare_generated(),tt=requireDependenciesDivide_generated(),rt=requireDependenciesPartitionSelect_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={addDependencies:et.addDependencies,compareDependencies:_e.compareDependencies,divideDependencies:tt.divideDependencies,partitionSelectDependencies:rt.partitionSelectDependencies,typedDependencies:nt.typedDependencies,createMedian:st.createMedian};return dependenciesMedian_generated.medianDependencies=dt,dependenciesMedian_generated}var hasRequiredDependenciesMad_generated;function requireDependenciesMad_generated(){if(hasRequiredDependenciesMad_generated)return dependenciesMad_generated;hasRequiredDependenciesMad_generated=1,Object.defineProperty(dependenciesMad_generated,"__esModule",{value:!0}),dependenciesMad_generated.madDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesMap_generated(),tt=requireDependenciesMedian_generated(),rt=requireDependenciesSubtract_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={absDependencies:et.absDependencies,mapDependencies:_e.mapDependencies,medianDependencies:tt.medianDependencies,subtractDependencies:rt.subtractDependencies,typedDependencies:nt.typedDependencies,createMad:st.createMad};return dependenciesMad_generated.madDependencies=dt,dependenciesMad_generated}var dependenciesMagneticConstant_generated={},hasRequiredDependenciesMagneticConstant_generated;function requireDependenciesMagneticConstant_generated(){if(hasRequiredDependenciesMagneticConstant_generated)return dependenciesMagneticConstant_generated;hasRequiredDependenciesMagneticConstant_generated=1,Object.defineProperty(dependenciesMagneticConstant_generated,"__esModule",{value:!0}),dependenciesMagneticConstant_generated.magneticConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMagneticConstant:tt.createMagneticConstant};return dependenciesMagneticConstant_generated.magneticConstantDependencies=rt,dependenciesMagneticConstant_generated}var dependenciesMagneticFluxQuantum_generated={},hasRequiredDependenciesMagneticFluxQuantum_generated;function requireDependenciesMagneticFluxQuantum_generated(){if(hasRequiredDependenciesMagneticFluxQuantum_generated)return dependenciesMagneticFluxQuantum_generated;hasRequiredDependenciesMagneticFluxQuantum_generated=1,Object.defineProperty(dependenciesMagneticFluxQuantum_generated,"__esModule",{value:!0}),dependenciesMagneticFluxQuantum_generated.magneticFluxQuantumDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMagneticFluxQuantum:tt.createMagneticFluxQuantum};return dependenciesMagneticFluxQuantum_generated.magneticFluxQuantumDependencies=rt,dependenciesMagneticFluxQuantum_generated}var dependenciesMapTransform_generated={},hasRequiredDependenciesMapTransform_generated;function requireDependenciesMapTransform_generated(){if(hasRequiredDependenciesMapTransform_generated)return dependenciesMapTransform_generated;hasRequiredDependenciesMapTransform_generated=1,Object.defineProperty(dependenciesMapTransform_generated,"__esModule",{value:!0}),dependenciesMapTransform_generated.mapTransformDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createMapTransform:_e.createMapTransform};return dependenciesMapTransform_generated.mapTransformDependencies=tt,dependenciesMapTransform_generated}var dependenciesMatrixFromFunction_generated={},hasRequiredDependenciesMatrixFromFunction_generated;function requireDependenciesMatrixFromFunction_generated(){if(hasRequiredDependenciesMatrixFromFunction_generated)return dependenciesMatrixFromFunction_generated;hasRequiredDependenciesMatrixFromFunction_generated=1,Object.defineProperty(dependenciesMatrixFromFunction_generated,"__esModule",{value:!0}),dependenciesMatrixFromFunction_generated.matrixFromFunctionDependencies=void 0;var et=requireDependenciesIsZero_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={isZeroDependencies:et.isZeroDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createMatrixFromFunction:rt.createMatrixFromFunction};return dependenciesMatrixFromFunction_generated.matrixFromFunctionDependencies=nt,dependenciesMatrixFromFunction_generated}var dependenciesMatrixFromRows_generated={},hasRequiredDependenciesMatrixFromRows_generated;function requireDependenciesMatrixFromRows_generated(){if(hasRequiredDependenciesMatrixFromRows_generated)return dependenciesMatrixFromRows_generated;hasRequiredDependenciesMatrixFromRows_generated=1,Object.defineProperty(dependenciesMatrixFromRows_generated,"__esModule",{value:!0}),dependenciesMatrixFromRows_generated.matrixFromRowsDependencies=void 0;var et=requireDependenciesFlatten_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesSize_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={flattenDependencies:et.flattenDependencies,matrixDependencies:_e.matrixDependencies,sizeDependencies:tt.sizeDependencies,typedDependencies:rt.typedDependencies,createMatrixFromRows:nt.createMatrixFromRows};return dependenciesMatrixFromRows_generated.matrixFromRowsDependencies=st,dependenciesMatrixFromRows_generated}var dependenciesMax_generated={},hasRequiredDependenciesMax_generated;function requireDependenciesMax_generated(){if(hasRequiredDependenciesMax_generated)return dependenciesMax_generated;hasRequiredDependenciesMax_generated=1,Object.defineProperty(dependenciesMax_generated,"__esModule",{value:!0}),dependenciesMax_generated.maxDependencies=void 0;var et=requireDependenciesLarger_generated(),_e=requireDependenciesNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={largerDependencies:et.largerDependencies,numericDependencies:_e.numericDependencies,typedDependencies:tt.typedDependencies,createMax:rt.createMax};return dependenciesMax_generated.maxDependencies=nt,dependenciesMax_generated}var dependenciesMaxTransform_generated={},hasRequiredDependenciesMaxTransform_generated;function requireDependenciesMaxTransform_generated(){if(hasRequiredDependenciesMaxTransform_generated)return dependenciesMaxTransform_generated;hasRequiredDependenciesMaxTransform_generated=1,Object.defineProperty(dependenciesMaxTransform_generated,"__esModule",{value:!0}),dependenciesMaxTransform_generated.maxTransformDependencies=void 0;var et=requireDependenciesLarger_generated(),_e=requireDependenciesNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={largerDependencies:et.largerDependencies,numericDependencies:_e.numericDependencies,typedDependencies:tt.typedDependencies,createMaxTransform:rt.createMaxTransform};return dependenciesMaxTransform_generated.maxTransformDependencies=nt,dependenciesMaxTransform_generated}var dependenciesMean_generated={},hasRequiredDependenciesMean_generated;function requireDependenciesMean_generated(){if(hasRequiredDependenciesMean_generated)return dependenciesMean_generated;hasRequiredDependenciesMean_generated=1,Object.defineProperty(dependenciesMean_generated,"__esModule",{value:!0}),dependenciesMean_generated.meanDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesDivide_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,divideDependencies:_e.divideDependencies,typedDependencies:tt.typedDependencies,createMean:rt.createMean};return dependenciesMean_generated.meanDependencies=nt,dependenciesMean_generated}var dependenciesMeanTransform_generated={},hasRequiredDependenciesMeanTransform_generated;function requireDependenciesMeanTransform_generated(){if(hasRequiredDependenciesMeanTransform_generated)return dependenciesMeanTransform_generated;hasRequiredDependenciesMeanTransform_generated=1,Object.defineProperty(dependenciesMeanTransform_generated,"__esModule",{value:!0}),dependenciesMeanTransform_generated.meanTransformDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesDivide_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,divideDependencies:_e.divideDependencies,typedDependencies:tt.typedDependencies,createMeanTransform:rt.createMeanTransform};return dependenciesMeanTransform_generated.meanTransformDependencies=nt,dependenciesMeanTransform_generated}var dependenciesMin_generated={},hasRequiredDependenciesMin_generated;function requireDependenciesMin_generated(){if(hasRequiredDependenciesMin_generated)return dependenciesMin_generated;hasRequiredDependenciesMin_generated=1,Object.defineProperty(dependenciesMin_generated,"__esModule",{value:!0}),dependenciesMin_generated.minDependencies=void 0;var et=requireDependenciesNumeric_generated(),_e=requireDependenciesSmaller_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={numericDependencies:et.numericDependencies,smallerDependencies:_e.smallerDependencies,typedDependencies:tt.typedDependencies,createMin:rt.createMin};return dependenciesMin_generated.minDependencies=nt,dependenciesMin_generated}var dependenciesMinTransform_generated={},hasRequiredDependenciesMinTransform_generated;function requireDependenciesMinTransform_generated(){if(hasRequiredDependenciesMinTransform_generated)return dependenciesMinTransform_generated;hasRequiredDependenciesMinTransform_generated=1,Object.defineProperty(dependenciesMinTransform_generated,"__esModule",{value:!0}),dependenciesMinTransform_generated.minTransformDependencies=void 0;var et=requireDependenciesNumeric_generated(),_e=requireDependenciesSmaller_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={numericDependencies:et.numericDependencies,smallerDependencies:_e.smallerDependencies,typedDependencies:tt.typedDependencies,createMinTransform:rt.createMinTransform};return dependenciesMinTransform_generated.minTransformDependencies=nt,dependenciesMinTransform_generated}var dependenciesMode_generated={},hasRequiredDependenciesMode_generated;function requireDependenciesMode_generated(){if(hasRequiredDependenciesMode_generated)return dependenciesMode_generated;hasRequiredDependenciesMode_generated=1,Object.defineProperty(dependenciesMode_generated,"__esModule",{value:!0}),dependenciesMode_generated.modeDependencies=void 0;var et=requireDependenciesIsNaN_generated(),_e=requireDependenciesIsNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={isNaNDependencies:et.isNaNDependencies,isNumericDependencies:_e.isNumericDependencies,typedDependencies:tt.typedDependencies,createMode:rt.createMode};return dependenciesMode_generated.modeDependencies=nt,dependenciesMode_generated}var dependenciesMolarMass_generated={},hasRequiredDependenciesMolarMass_generated;function requireDependenciesMolarMass_generated(){if(hasRequiredDependenciesMolarMass_generated)return dependenciesMolarMass_generated;hasRequiredDependenciesMolarMass_generated=1,Object.defineProperty(dependenciesMolarMass_generated,"__esModule",{value:!0}),dependenciesMolarMass_generated.molarMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMolarMass:tt.createMolarMass};return dependenciesMolarMass_generated.molarMassDependencies=rt,dependenciesMolarMass_generated}var dependenciesMolarMassC12_generated={},hasRequiredDependenciesMolarMassC12_generated;function requireDependenciesMolarMassC12_generated(){if(hasRequiredDependenciesMolarMassC12_generated)return dependenciesMolarMassC12_generated;hasRequiredDependenciesMolarMassC12_generated=1,Object.defineProperty(dependenciesMolarMassC12_generated,"__esModule",{value:!0}),dependenciesMolarMassC12_generated.molarMassC12Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMolarMassC12:tt.createMolarMassC12};return dependenciesMolarMassC12_generated.molarMassC12Dependencies=rt,dependenciesMolarMassC12_generated}var dependenciesMolarPlanckConstant_generated={},hasRequiredDependenciesMolarPlanckConstant_generated;function requireDependenciesMolarPlanckConstant_generated(){if(hasRequiredDependenciesMolarPlanckConstant_generated)return dependenciesMolarPlanckConstant_generated;hasRequiredDependenciesMolarPlanckConstant_generated=1,Object.defineProperty(dependenciesMolarPlanckConstant_generated,"__esModule",{value:!0}),dependenciesMolarPlanckConstant_generated.molarPlanckConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMolarPlanckConstant:tt.createMolarPlanckConstant};return dependenciesMolarPlanckConstant_generated.molarPlanckConstantDependencies=rt,dependenciesMolarPlanckConstant_generated}var dependenciesMolarVolume_generated={},hasRequiredDependenciesMolarVolume_generated;function requireDependenciesMolarVolume_generated(){if(hasRequiredDependenciesMolarVolume_generated)return dependenciesMolarVolume_generated;hasRequiredDependenciesMolarVolume_generated=1,Object.defineProperty(dependenciesMolarVolume_generated,"__esModule",{value:!0}),dependenciesMolarVolume_generated.molarVolumeDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createMolarVolume:tt.createMolarVolume};return dependenciesMolarVolume_generated.molarVolumeDependencies=rt,dependenciesMolarVolume_generated}var dependenciesMultinomial_generated={},hasRequiredDependenciesMultinomial_generated;function requireDependenciesMultinomial_generated(){if(hasRequiredDependenciesMultinomial_generated)return dependenciesMultinomial_generated;hasRequiredDependenciesMultinomial_generated=1,Object.defineProperty(dependenciesMultinomial_generated,"__esModule",{value:!0}),dependenciesMultinomial_generated.multinomialDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesDivide_generated(),tt=requireDependenciesFactorial_generated(),rt=requireDependenciesIsInteger_generated(),nt=requireDependenciesIsPositive_generated(),st=requireDependenciesMultiply_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={addDependencies:et.addDependencies,divideDependencies:_e.divideDependencies,factorialDependencies:tt.factorialDependencies,isIntegerDependencies:rt.isIntegerDependencies,isPositiveDependencies:nt.isPositiveDependencies,multiplyDependencies:st.multiplyDependencies,typedDependencies:dt.typedDependencies,createMultinomial:ft.createMultinomial};return dependenciesMultinomial_generated.multinomialDependencies=ht,dependenciesMultinomial_generated}var dependenciesNaN_generated={},hasRequiredDependenciesNaN_generated;function requireDependenciesNaN_generated(){if(hasRequiredDependenciesNaN_generated)return dependenciesNaN_generated;hasRequiredDependenciesNaN_generated=1,Object.defineProperty(dependenciesNaN_generated,"__esModule",{value:!0}),dependenciesNaN_generated.NaNDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createNaN:_e.createNaN};return dependenciesNaN_generated.NaNDependencies=tt,dependenciesNaN_generated}var dependenciesNeutronMass_generated={},hasRequiredDependenciesNeutronMass_generated;function requireDependenciesNeutronMass_generated(){if(hasRequiredDependenciesNeutronMass_generated)return dependenciesNeutronMass_generated;hasRequiredDependenciesNeutronMass_generated=1,Object.defineProperty(dependenciesNeutronMass_generated,"__esModule",{value:!0}),dependenciesNeutronMass_generated.neutronMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createNeutronMass:tt.createNeutronMass};return dependenciesNeutronMass_generated.neutronMassDependencies=rt,dependenciesNeutronMass_generated}var dependenciesNorm_generated={},hasRequiredDependenciesNorm_generated;function requireDependenciesNorm_generated(){if(hasRequiredDependenciesNorm_generated)return dependenciesNorm_generated;hasRequiredDependenciesNorm_generated=1,Object.defineProperty(dependenciesNorm_generated,"__esModule",{value:!0}),dependenciesNorm_generated.normDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesConj_generated(),rt=requireDependenciesCtranspose_generated(),nt=requireDependenciesEigs_generated(),st=requireDependenciesEqualScalar_generated(),dt=requireDependenciesLarger_generated(),ft=requireDependenciesMatrix_generated(),ht=requireDependenciesMultiply_generated(),mt=requireDependenciesPow_generated(),bt=requireDependenciesSmaller_generated(),St=requireDependenciesSqrt_generated(),Et=requireDependenciesTyped_generated(),Ct=requireFactoriesAny(),Rt={absDependencies:et.absDependencies,addDependencies:_e.addDependencies,conjDependencies:tt.conjDependencies,ctransposeDependencies:rt.ctransposeDependencies,eigsDependencies:nt.eigsDependencies,equalScalarDependencies:st.equalScalarDependencies,largerDependencies:dt.largerDependencies,matrixDependencies:ft.matrixDependencies,multiplyDependencies:ht.multiplyDependencies,powDependencies:mt.powDependencies,smallerDependencies:bt.smallerDependencies,sqrtDependencies:St.sqrtDependencies,typedDependencies:Et.typedDependencies,createNorm:Ct.createNorm};return dependenciesNorm_generated.normDependencies=Rt,dependenciesNorm_generated}var dependenciesNthRoot_generated={},hasRequiredDependenciesNthRoot_generated;function requireDependenciesNthRoot_generated(){if(hasRequiredDependenciesNthRoot_generated)return dependenciesNthRoot_generated;hasRequiredDependenciesNthRoot_generated=1,Object.defineProperty(dependenciesNthRoot_generated,"__esModule",{value:!0}),dependenciesNthRoot_generated.nthRootDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={BigNumberDependencies:et.BigNumberDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createNthRoot:nt.createNthRoot};return dependenciesNthRoot_generated.nthRootDependencies=st,dependenciesNthRoot_generated}var dependenciesNthRoots_generated={},hasRequiredDependenciesNthRoots_generated;function requireDependenciesNthRoots_generated(){if(hasRequiredDependenciesNthRoots_generated)return dependenciesNthRoots_generated;hasRequiredDependenciesNthRoots_generated=1,Object.defineProperty(dependenciesNthRoots_generated,"__esModule",{value:!0}),dependenciesNthRoots_generated.nthRootsDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesDivideScalar_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={ComplexDependencies:et.ComplexDependencies,divideScalarDependencies:_e.divideScalarDependencies,typedDependencies:tt.typedDependencies,createNthRoots:rt.createNthRoots};return dependenciesNthRoots_generated.nthRootsDependencies=nt,dependenciesNthRoots_generated}var dependenciesNuclearMagneton_generated={},hasRequiredDependenciesNuclearMagneton_generated;function requireDependenciesNuclearMagneton_generated(){if(hasRequiredDependenciesNuclearMagneton_generated)return dependenciesNuclearMagneton_generated;hasRequiredDependenciesNuclearMagneton_generated=1,Object.defineProperty(dependenciesNuclearMagneton_generated,"__esModule",{value:!0}),dependenciesNuclearMagneton_generated.nuclearMagnetonDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createNuclearMagneton:tt.createNuclearMagneton};return dependenciesNuclearMagneton_generated.nuclearMagnetonDependencies=rt,dependenciesNuclearMagneton_generated}var dependenciesNull_generated={},hasRequiredDependenciesNull_generated;function requireDependenciesNull_generated(){if(hasRequiredDependenciesNull_generated)return dependenciesNull_generated;hasRequiredDependenciesNull_generated=1,Object.defineProperty(dependenciesNull_generated,"__esModule",{value:!0}),dependenciesNull_generated.nullDependencies=void 0;var et=requireFactoriesAny(),_e={createNull:et.createNull};return dependenciesNull_generated.nullDependencies=_e,dependenciesNull_generated}var dependenciesOct_generated={},hasRequiredDependenciesOct_generated;function requireDependenciesOct_generated(){if(hasRequiredDependenciesOct_generated)return dependenciesOct_generated;hasRequiredDependenciesOct_generated=1,Object.defineProperty(dependenciesOct_generated,"__esModule",{value:!0}),dependenciesOct_generated.octDependencies=void 0;var et=requireDependenciesFormat_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={formatDependencies:et.formatDependencies,typedDependencies:_e.typedDependencies,createOct:tt.createOct};return dependenciesOct_generated.octDependencies=rt,dependenciesOct_generated}var dependenciesOnes_generated={},hasRequiredDependenciesOnes_generated;function requireDependenciesOnes_generated(){if(hasRequiredDependenciesOnes_generated)return dependenciesOnes_generated;hasRequiredDependenciesOnes_generated=1,Object.defineProperty(dependenciesOnes_generated,"__esModule",{value:!0}),dependenciesOnes_generated.onesDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={BigNumberDependencies:et.BigNumberDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createOnes:rt.createOnes};return dependenciesOnes_generated.onesDependencies=nt,dependenciesOnes_generated}var dependenciesOr_generated={},hasRequiredDependenciesOr_generated;function requireDependenciesOr_generated(){if(hasRequiredDependenciesOr_generated)return dependenciesOr_generated;hasRequiredDependenciesOr_generated=1,Object.defineProperty(dependenciesOr_generated,"__esModule",{value:!0}),dependenciesOr_generated.orDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createOr:nt.createOr};return dependenciesOr_generated.orDependencies=st,dependenciesOr_generated}var dependenciesParser_generated={},dependenciesParserClass_generated={},hasRequiredDependenciesParserClass_generated;function requireDependenciesParserClass_generated(){if(hasRequiredDependenciesParserClass_generated)return dependenciesParserClass_generated;hasRequiredDependenciesParserClass_generated=1,Object.defineProperty(dependenciesParserClass_generated,"__esModule",{value:!0}),dependenciesParserClass_generated.ParserDependencies=void 0;var et=requireDependenciesEvaluate_generated(),_e=requireFactoriesAny(),tt={evaluateDependencies:et.evaluateDependencies,createParserClass:_e.createParserClass};return dependenciesParserClass_generated.ParserDependencies=tt,dependenciesParserClass_generated}var hasRequiredDependenciesParser_generated;function requireDependenciesParser_generated(){if(hasRequiredDependenciesParser_generated)return dependenciesParser_generated;hasRequiredDependenciesParser_generated=1,Object.defineProperty(dependenciesParser_generated,"__esModule",{value:!0}),dependenciesParser_generated.parserDependencies=void 0;var et=requireDependenciesParserClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={ParserDependencies:et.ParserDependencies,typedDependencies:_e.typedDependencies,createParser:tt.createParser};return dependenciesParser_generated.parserDependencies=rt,dependenciesParser_generated}var dependenciesPermutations_generated={},hasRequiredDependenciesPermutations_generated;function requireDependenciesPermutations_generated(){if(hasRequiredDependenciesPermutations_generated)return dependenciesPermutations_generated;hasRequiredDependenciesPermutations_generated=1,Object.defineProperty(dependenciesPermutations_generated,"__esModule",{value:!0}),dependenciesPermutations_generated.permutationsDependencies=void 0;var et=requireDependenciesFactorial_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={factorialDependencies:et.factorialDependencies,typedDependencies:_e.typedDependencies,createPermutations:tt.createPermutations};return dependenciesPermutations_generated.permutationsDependencies=rt,dependenciesPermutations_generated}var dependenciesPhi_generated={},hasRequiredDependenciesPhi_generated;function requireDependenciesPhi_generated(){if(hasRequiredDependenciesPhi_generated)return dependenciesPhi_generated;hasRequiredDependenciesPhi_generated=1,Object.defineProperty(dependenciesPhi_generated,"__esModule",{value:!0}),dependenciesPhi_generated.phiDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createPhi:_e.createPhi};return dependenciesPhi_generated.phiDependencies=tt,dependenciesPhi_generated}var dependenciesPi_generated={},hasRequiredDependenciesPi_generated;function requireDependenciesPi_generated(){if(hasRequiredDependenciesPi_generated)return dependenciesPi_generated;hasRequiredDependenciesPi_generated=1,Object.defineProperty(dependenciesPi_generated,"__esModule",{value:!0}),dependenciesPi_generated.piDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createPi:_e.createPi};return dependenciesPi_generated.piDependencies=tt,dependenciesPi_generated}var dependenciesPickRandom_generated={},hasRequiredDependenciesPickRandom_generated;function requireDependenciesPickRandom_generated(){if(hasRequiredDependenciesPickRandom_generated)return dependenciesPickRandom_generated;hasRequiredDependenciesPickRandom_generated=1,Object.defineProperty(dependenciesPickRandom_generated,"__esModule",{value:!0}),dependenciesPickRandom_generated.pickRandomDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createPickRandom:_e.createPickRandom};return dependenciesPickRandom_generated.pickRandomDependencies=tt,dependenciesPickRandom_generated}var dependenciesPinv_generated={},hasRequiredDependenciesPinv_generated;function requireDependenciesPinv_generated(){if(hasRequiredDependenciesPinv_generated)return dependenciesPinv_generated;hasRequiredDependenciesPinv_generated=1,Object.defineProperty(dependenciesPinv_generated,"__esModule",{value:!0}),dependenciesPinv_generated.pinvDependencies=void 0;var et=requireDependenciesComplexClass_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesCtranspose_generated(),rt=requireDependenciesDeepEqual_generated(),nt=requireDependenciesDivideScalar_generated(),st=requireDependenciesDot_generated(),dt=requireDependenciesDotDivide_generated(),ft=requireDependenciesEqual_generated(),ht=requireDependenciesInv_generated(),mt=requireDependenciesMatrix_generated(),bt=requireDependenciesMultiply_generated(),St=requireDependenciesTyped_generated(),Et=requireFactoriesAny(),Ct={ComplexDependencies:et.ComplexDependencies,addDependencies:_e.addDependencies,ctransposeDependencies:tt.ctransposeDependencies,deepEqualDependencies:rt.deepEqualDependencies,divideScalarDependencies:nt.divideScalarDependencies,dotDependencies:st.dotDependencies,dotDivideDependencies:dt.dotDivideDependencies,equalDependencies:ft.equalDependencies,invDependencies:ht.invDependencies,matrixDependencies:mt.matrixDependencies,multiplyDependencies:bt.multiplyDependencies,typedDependencies:St.typedDependencies,createPinv:Et.createPinv};return dependenciesPinv_generated.pinvDependencies=Ct,dependenciesPinv_generated}var dependenciesPlanckCharge_generated={},hasRequiredDependenciesPlanckCharge_generated;function requireDependenciesPlanckCharge_generated(){if(hasRequiredDependenciesPlanckCharge_generated)return dependenciesPlanckCharge_generated;hasRequiredDependenciesPlanckCharge_generated=1,Object.defineProperty(dependenciesPlanckCharge_generated,"__esModule",{value:!0}),dependenciesPlanckCharge_generated.planckChargeDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckCharge:tt.createPlanckCharge};return dependenciesPlanckCharge_generated.planckChargeDependencies=rt,dependenciesPlanckCharge_generated}var dependenciesPlanckConstant_generated={},hasRequiredDependenciesPlanckConstant_generated;function requireDependenciesPlanckConstant_generated(){if(hasRequiredDependenciesPlanckConstant_generated)return dependenciesPlanckConstant_generated;hasRequiredDependenciesPlanckConstant_generated=1,Object.defineProperty(dependenciesPlanckConstant_generated,"__esModule",{value:!0}),dependenciesPlanckConstant_generated.planckConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckConstant:tt.createPlanckConstant};return dependenciesPlanckConstant_generated.planckConstantDependencies=rt,dependenciesPlanckConstant_generated}var dependenciesPlanckLength_generated={},hasRequiredDependenciesPlanckLength_generated;function requireDependenciesPlanckLength_generated(){if(hasRequiredDependenciesPlanckLength_generated)return dependenciesPlanckLength_generated;hasRequiredDependenciesPlanckLength_generated=1,Object.defineProperty(dependenciesPlanckLength_generated,"__esModule",{value:!0}),dependenciesPlanckLength_generated.planckLengthDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckLength:tt.createPlanckLength};return dependenciesPlanckLength_generated.planckLengthDependencies=rt,dependenciesPlanckLength_generated}var dependenciesPlanckMass_generated={},hasRequiredDependenciesPlanckMass_generated;function requireDependenciesPlanckMass_generated(){if(hasRequiredDependenciesPlanckMass_generated)return dependenciesPlanckMass_generated;hasRequiredDependenciesPlanckMass_generated=1,Object.defineProperty(dependenciesPlanckMass_generated,"__esModule",{value:!0}),dependenciesPlanckMass_generated.planckMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckMass:tt.createPlanckMass};return dependenciesPlanckMass_generated.planckMassDependencies=rt,dependenciesPlanckMass_generated}var dependenciesPlanckTemperature_generated={},hasRequiredDependenciesPlanckTemperature_generated;function requireDependenciesPlanckTemperature_generated(){if(hasRequiredDependenciesPlanckTemperature_generated)return dependenciesPlanckTemperature_generated;hasRequiredDependenciesPlanckTemperature_generated=1,Object.defineProperty(dependenciesPlanckTemperature_generated,"__esModule",{value:!0}),dependenciesPlanckTemperature_generated.planckTemperatureDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckTemperature:tt.createPlanckTemperature};return dependenciesPlanckTemperature_generated.planckTemperatureDependencies=rt,dependenciesPlanckTemperature_generated}var dependenciesPlanckTime_generated={},hasRequiredDependenciesPlanckTime_generated;function requireDependenciesPlanckTime_generated(){if(hasRequiredDependenciesPlanckTime_generated)return dependenciesPlanckTime_generated;hasRequiredDependenciesPlanckTime_generated=1,Object.defineProperty(dependenciesPlanckTime_generated,"__esModule",{value:!0}),dependenciesPlanckTime_generated.planckTimeDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createPlanckTime:tt.createPlanckTime};return dependenciesPlanckTime_generated.planckTimeDependencies=rt,dependenciesPlanckTime_generated}var dependenciesPrint_generated={},hasRequiredDependenciesPrint_generated;function requireDependenciesPrint_generated(){if(hasRequiredDependenciesPrint_generated)return dependenciesPrint_generated;hasRequiredDependenciesPrint_generated=1,Object.defineProperty(dependenciesPrint_generated,"__esModule",{value:!0}),dependenciesPrint_generated.printDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createPrint:_e.createPrint};return dependenciesPrint_generated.printDependencies=tt,dependenciesPrint_generated}var dependenciesProtonMass_generated={},hasRequiredDependenciesProtonMass_generated;function requireDependenciesProtonMass_generated(){if(hasRequiredDependenciesProtonMass_generated)return dependenciesProtonMass_generated;hasRequiredDependenciesProtonMass_generated=1,Object.defineProperty(dependenciesProtonMass_generated,"__esModule",{value:!0}),dependenciesProtonMass_generated.protonMassDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createProtonMass:tt.createProtonMass};return dependenciesProtonMass_generated.protonMassDependencies=rt,dependenciesProtonMass_generated}var dependenciesQuantileSeq_generated={},hasRequiredDependenciesQuantileSeq_generated;function requireDependenciesQuantileSeq_generated(){if(hasRequiredDependenciesQuantileSeq_generated)return dependenciesQuantileSeq_generated;hasRequiredDependenciesQuantileSeq_generated=1,Object.defineProperty(dependenciesQuantileSeq_generated,"__esModule",{value:!0}),dependenciesQuantileSeq_generated.quantileSeqDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesCompare_generated(),tt=requireDependenciesMultiply_generated(),rt=requireDependenciesPartitionSelect_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={addDependencies:et.addDependencies,compareDependencies:_e.compareDependencies,multiplyDependencies:tt.multiplyDependencies,partitionSelectDependencies:rt.partitionSelectDependencies,typedDependencies:nt.typedDependencies,createQuantileSeq:st.createQuantileSeq};return dependenciesQuantileSeq_generated.quantileSeqDependencies=dt,dependenciesQuantileSeq_generated}var dependenciesQuantumOfCirculation_generated={},hasRequiredDependenciesQuantumOfCirculation_generated;function requireDependenciesQuantumOfCirculation_generated(){if(hasRequiredDependenciesQuantumOfCirculation_generated)return dependenciesQuantumOfCirculation_generated;hasRequiredDependenciesQuantumOfCirculation_generated=1,Object.defineProperty(dependenciesQuantumOfCirculation_generated,"__esModule",{value:!0}),dependenciesQuantumOfCirculation_generated.quantumOfCirculationDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createQuantumOfCirculation:tt.createQuantumOfCirculation};return dependenciesQuantumOfCirculation_generated.quantumOfCirculationDependencies=rt,dependenciesQuantumOfCirculation_generated}var dependenciesRandom_generated={},hasRequiredDependenciesRandom_generated;function requireDependenciesRandom_generated(){if(hasRequiredDependenciesRandom_generated)return dependenciesRandom_generated;hasRequiredDependenciesRandom_generated=1,Object.defineProperty(dependenciesRandom_generated,"__esModule",{value:!0}),dependenciesRandom_generated.randomDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createRandom:_e.createRandom};return dependenciesRandom_generated.randomDependencies=tt,dependenciesRandom_generated}var dependenciesRandomInt_generated={},hasRequiredDependenciesRandomInt_generated;function requireDependenciesRandomInt_generated(){if(hasRequiredDependenciesRandomInt_generated)return dependenciesRandomInt_generated;hasRequiredDependenciesRandomInt_generated=1,Object.defineProperty(dependenciesRandomInt_generated,"__esModule",{value:!0}),dependenciesRandomInt_generated.randomIntDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createRandomInt:_e.createRandomInt};return dependenciesRandomInt_generated.randomIntDependencies=tt,dependenciesRandomInt_generated}var dependenciesRangeClass_generated={},hasRequiredDependenciesRangeClass_generated;function requireDependenciesRangeClass_generated(){if(hasRequiredDependenciesRangeClass_generated)return dependenciesRangeClass_generated;hasRequiredDependenciesRangeClass_generated=1,Object.defineProperty(dependenciesRangeClass_generated,"__esModule",{value:!0}),dependenciesRangeClass_generated.RangeDependencies=void 0;var et=requireFactoriesAny(),_e={createRangeClass:et.createRangeClass};return dependenciesRangeClass_generated.RangeDependencies=_e,dependenciesRangeClass_generated}var dependenciesRangeTransform_generated={},hasRequiredDependenciesRangeTransform_generated;function requireDependenciesRangeTransform_generated(){if(hasRequiredDependenciesRangeTransform_generated)return dependenciesRangeTransform_generated;hasRequiredDependenciesRangeTransform_generated=1,Object.defineProperty(dependenciesRangeTransform_generated,"__esModule",{value:!0}),dependenciesRangeTransform_generated.rangeTransformDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesLarger_generated(),rt=requireDependenciesLargerEq_generated(),nt=requireDependenciesSmaller_generated(),st=requireDependenciesSmallerEq_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={bignumberDependencies:et.bignumberDependencies,matrixDependencies:_e.matrixDependencies,largerDependencies:tt.largerDependencies,largerEqDependencies:rt.largerEqDependencies,smallerDependencies:nt.smallerDependencies,smallerEqDependencies:st.smallerEqDependencies,typedDependencies:dt.typedDependencies,createRangeTransform:ft.createRangeTransform};return dependenciesRangeTransform_generated.rangeTransformDependencies=ht,dependenciesRangeTransform_generated}var dependenciesRationalize_generated={},hasRequiredDependenciesRationalize_generated;function requireDependenciesRationalize_generated(){if(hasRequiredDependenciesRationalize_generated)return dependenciesRationalize_generated;hasRequiredDependenciesRationalize_generated=1,Object.defineProperty(dependenciesRationalize_generated,"__esModule",{value:!0}),dependenciesRationalize_generated.rationalizeDependencies=void 0;var et=requireDependenciesBignumber_generated(),_e=requireDependenciesFraction_generated(),tt=requireDependenciesAccessorNode_generated(),rt=requireDependenciesArrayNode_generated(),nt=requireDependenciesConstantNode_generated(),st=requireDependenciesFunctionNode_generated(),dt=requireDependenciesIndexNode_generated(),ft=requireDependenciesObjectNode_generated(),ht=requireDependenciesOperatorNode_generated(),mt=requireDependenciesParenthesisNode_generated(),bt=requireDependenciesSymbolNode_generated(),St=requireDependenciesAdd_generated(),Et=requireDependenciesDivide_generated(),Ct=requireDependenciesEqual_generated(),Rt=requireDependenciesIsZero_generated(),Tt=requireDependenciesMatrix_generated(),wt=requireDependenciesMultiply_generated(),At=requireDependenciesParse_generated(),Nt=requireDependenciesPow_generated(),Pt=requireDependenciesSimplify_generated(),It=requireDependenciesSimplifyCore_generated(),Ft=requireDependenciesSubtract_generated(),qt=requireDependenciesTyped_generated(),Vt=requireFactoriesAny(),Kt={bignumberDependencies:et.bignumberDependencies,fractionDependencies:_e.fractionDependencies,AccessorNodeDependencies:tt.AccessorNodeDependencies,ArrayNodeDependencies:rt.ArrayNodeDependencies,ConstantNodeDependencies:nt.ConstantNodeDependencies,FunctionNodeDependencies:st.FunctionNodeDependencies,IndexNodeDependencies:dt.IndexNodeDependencies,ObjectNodeDependencies:ft.ObjectNodeDependencies,OperatorNodeDependencies:ht.OperatorNodeDependencies,ParenthesisNodeDependencies:mt.ParenthesisNodeDependencies,SymbolNodeDependencies:bt.SymbolNodeDependencies,addDependencies:St.addDependencies,divideDependencies:Et.divideDependencies,equalDependencies:Ct.equalDependencies,isZeroDependencies:Rt.isZeroDependencies,matrixDependencies:Tt.matrixDependencies,multiplyDependencies:wt.multiplyDependencies,parseDependencies:At.parseDependencies,powDependencies:Nt.powDependencies,simplifyDependencies:Pt.simplifyDependencies,simplifyCoreDependencies:It.simplifyCoreDependencies,subtractDependencies:Ft.subtractDependencies,typedDependencies:qt.typedDependencies,createRationalize:Vt.createRationalize};return dependenciesRationalize_generated.rationalizeDependencies=Kt,dependenciesRationalize_generated}var dependenciesReducedPlanckConstant_generated={},hasRequiredDependenciesReducedPlanckConstant_generated;function requireDependenciesReducedPlanckConstant_generated(){if(hasRequiredDependenciesReducedPlanckConstant_generated)return dependenciesReducedPlanckConstant_generated;hasRequiredDependenciesReducedPlanckConstant_generated=1,Object.defineProperty(dependenciesReducedPlanckConstant_generated,"__esModule",{value:!0}),dependenciesReducedPlanckConstant_generated.reducedPlanckConstantDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createReducedPlanckConstant:tt.createReducedPlanckConstant};return dependenciesReducedPlanckConstant_generated.reducedPlanckConstantDependencies=rt,dependenciesReducedPlanckConstant_generated}var dependenciesReplacer_generated={},hasRequiredDependenciesReplacer_generated;function requireDependenciesReplacer_generated(){if(hasRequiredDependenciesReplacer_generated)return dependenciesReplacer_generated;hasRequiredDependenciesReplacer_generated=1,Object.defineProperty(dependenciesReplacer_generated,"__esModule",{value:!0}),dependenciesReplacer_generated.replacerDependencies=void 0;var et=requireFactoriesAny(),_e={createReplacer:et.createReplacer};return dependenciesReplacer_generated.replacerDependencies=_e,dependenciesReplacer_generated}var dependenciesReshape_generated={},hasRequiredDependenciesReshape_generated;function requireDependenciesReshape_generated(){if(hasRequiredDependenciesReshape_generated)return dependenciesReshape_generated;hasRequiredDependenciesReshape_generated=1,Object.defineProperty(dependenciesReshape_generated,"__esModule",{value:!0}),dependenciesReshape_generated.reshapeDependencies=void 0;var et=requireDependenciesIsInteger_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={isIntegerDependencies:et.isIntegerDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createReshape:rt.createReshape};return dependenciesReshape_generated.reshapeDependencies=nt,dependenciesReshape_generated}var dependenciesResize_generated={},hasRequiredDependenciesResize_generated;function requireDependenciesResize_generated(){if(hasRequiredDependenciesResize_generated)return dependenciesResize_generated;hasRequiredDependenciesResize_generated=1,Object.defineProperty(dependenciesResize_generated,"__esModule",{value:!0}),dependenciesResize_generated.resizeDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireFactoriesAny(),tt={matrixDependencies:et.matrixDependencies,createResize:_e.createResize};return dependenciesResize_generated.resizeDependencies=tt,dependenciesResize_generated}var dependenciesReviver_generated={},hasRequiredDependenciesReviver_generated;function requireDependenciesReviver_generated(){if(hasRequiredDependenciesReviver_generated)return dependenciesReviver_generated;hasRequiredDependenciesReviver_generated=1,Object.defineProperty(dependenciesReviver_generated,"__esModule",{value:!0}),dependenciesReviver_generated.reviverDependencies=void 0;var et=requireFactoriesAny(),_e={createReviver:et.createReviver};return dependenciesReviver_generated.reviverDependencies=_e,dependenciesReviver_generated}var dependenciesRightArithShift_generated={},hasRequiredDependenciesRightArithShift_generated;function requireDependenciesRightArithShift_generated(){if(hasRequiredDependenciesRightArithShift_generated)return dependenciesRightArithShift_generated;hasRequiredDependenciesRightArithShift_generated=1,Object.defineProperty(dependenciesRightArithShift_generated,"__esModule",{value:!0}),dependenciesRightArithShift_generated.rightArithShiftDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireDependenciesZeros_generated(),st=requireFactoriesAny(),dt={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,zerosDependencies:nt.zerosDependencies,createRightArithShift:st.createRightArithShift};return dependenciesRightArithShift_generated.rightArithShiftDependencies=dt,dependenciesRightArithShift_generated}var dependenciesRightLogShift_generated={},hasRequiredDependenciesRightLogShift_generated;function requireDependenciesRightLogShift_generated(){if(hasRequiredDependenciesRightLogShift_generated)return dependenciesRightLogShift_generated;hasRequiredDependenciesRightLogShift_generated=1,Object.defineProperty(dependenciesRightLogShift_generated,"__esModule",{value:!0}),dependenciesRightLogShift_generated.rightLogShiftDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireDependenciesZeros_generated(),st=requireFactoriesAny(),dt={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,zerosDependencies:nt.zerosDependencies,createRightLogShift:st.createRightLogShift};return dependenciesRightLogShift_generated.rightLogShiftDependencies=dt,dependenciesRightLogShift_generated}var dependenciesRotate_generated={},dependenciesRotationMatrix_generated={},hasRequiredDependenciesRotationMatrix_generated;function requireDependenciesRotationMatrix_generated(){if(hasRequiredDependenciesRotationMatrix_generated)return dependenciesRotationMatrix_generated;hasRequiredDependenciesRotationMatrix_generated=1,Object.defineProperty(dependenciesRotationMatrix_generated,"__esModule",{value:!0}),dependenciesRotationMatrix_generated.rotationMatrixDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesDenseMatrixClass_generated(),tt=requireDependenciesSparseMatrixClass_generated(),rt=requireDependenciesAddScalar_generated(),nt=requireDependenciesCos_generated(),st=requireDependenciesMatrix_generated(),dt=requireDependenciesMultiplyScalar_generated(),ft=requireDependenciesNorm_generated(),ht=requireDependenciesSin_generated(),mt=requireDependenciesTyped_generated(),bt=requireDependenciesUnaryMinus_generated(),St=requireFactoriesAny(),Et={BigNumberDependencies:et.BigNumberDependencies,DenseMatrixDependencies:_e.DenseMatrixDependencies,SparseMatrixDependencies:tt.SparseMatrixDependencies,addScalarDependencies:rt.addScalarDependencies,cosDependencies:nt.cosDependencies,matrixDependencies:st.matrixDependencies,multiplyScalarDependencies:dt.multiplyScalarDependencies,normDependencies:ft.normDependencies,sinDependencies:ht.sinDependencies,typedDependencies:mt.typedDependencies,unaryMinusDependencies:bt.unaryMinusDependencies,createRotationMatrix:St.createRotationMatrix};return dependenciesRotationMatrix_generated.rotationMatrixDependencies=Et,dependenciesRotationMatrix_generated}var hasRequiredDependenciesRotate_generated;function requireDependenciesRotate_generated(){if(hasRequiredDependenciesRotate_generated)return dependenciesRotate_generated;hasRequiredDependenciesRotate_generated=1,Object.defineProperty(dependenciesRotate_generated,"__esModule",{value:!0}),dependenciesRotate_generated.rotateDependencies=void 0;var et=requireDependenciesMultiply_generated(),_e=requireDependenciesRotationMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={multiplyDependencies:et.multiplyDependencies,rotationMatrixDependencies:_e.rotationMatrixDependencies,typedDependencies:tt.typedDependencies,createRotate:rt.createRotate};return dependenciesRotate_generated.rotateDependencies=nt,dependenciesRotate_generated}var dependenciesRow_generated={},hasRequiredDependenciesRow_generated;function requireDependenciesRow_generated(){if(hasRequiredDependenciesRow_generated)return dependenciesRow_generated;hasRequiredDependenciesRow_generated=1,Object.defineProperty(dependenciesRow_generated,"__esModule",{value:!0}),dependenciesRow_generated.rowDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesRange_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={IndexDependencies:et.IndexDependencies,matrixDependencies:_e.matrixDependencies,rangeDependencies:tt.rangeDependencies,typedDependencies:rt.typedDependencies,createRow:nt.createRow};return dependenciesRow_generated.rowDependencies=st,dependenciesRow_generated}var dependenciesRowTransform_generated={},hasRequiredDependenciesRowTransform_generated;function requireDependenciesRowTransform_generated(){if(hasRequiredDependenciesRowTransform_generated)return dependenciesRowTransform_generated;hasRequiredDependenciesRowTransform_generated=1,Object.defineProperty(dependenciesRowTransform_generated,"__esModule",{value:!0}),dependenciesRowTransform_generated.rowTransformDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesRange_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={IndexDependencies:et.IndexDependencies,matrixDependencies:_e.matrixDependencies,rangeDependencies:tt.rangeDependencies,typedDependencies:rt.typedDependencies,createRowTransform:nt.createRowTransform};return dependenciesRowTransform_generated.rowTransformDependencies=st,dependenciesRowTransform_generated}var dependenciesRydberg_generated={},hasRequiredDependenciesRydberg_generated;function requireDependenciesRydberg_generated(){if(hasRequiredDependenciesRydberg_generated)return dependenciesRydberg_generated;hasRequiredDependenciesRydberg_generated=1,Object.defineProperty(dependenciesRydberg_generated,"__esModule",{value:!0}),dependenciesRydberg_generated.rydbergDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createRydberg:tt.createRydberg};return dependenciesRydberg_generated.rydbergDependencies=rt,dependenciesRydberg_generated}var dependenciesSQRT1_2_generated={},hasRequiredDependenciesSQRT1_2_generated;function requireDependenciesSQRT1_2_generated(){if(hasRequiredDependenciesSQRT1_2_generated)return dependenciesSQRT1_2_generated;hasRequiredDependenciesSQRT1_2_generated=1,Object.defineProperty(dependenciesSQRT1_2_generated,"__esModule",{value:!0}),dependenciesSQRT1_2_generated.SQRT1_2Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createSQRT1_2:_e.createSQRT1_2};return dependenciesSQRT1_2_generated.SQRT1_2Dependencies=tt,dependenciesSQRT1_2_generated}var dependenciesSQRT2_generated={},hasRequiredDependenciesSQRT2_generated;function requireDependenciesSQRT2_generated(){if(hasRequiredDependenciesSQRT2_generated)return dependenciesSQRT2_generated;hasRequiredDependenciesSQRT2_generated=1,Object.defineProperty(dependenciesSQRT2_generated,"__esModule",{value:!0}),dependenciesSQRT2_generated.SQRT2Dependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createSQRT2:_e.createSQRT2};return dependenciesSQRT2_generated.SQRT2Dependencies=tt,dependenciesSQRT2_generated}var dependenciesSackurTetrode_generated={},hasRequiredDependenciesSackurTetrode_generated;function requireDependenciesSackurTetrode_generated(){if(hasRequiredDependenciesSackurTetrode_generated)return dependenciesSackurTetrode_generated;hasRequiredDependenciesSackurTetrode_generated=1,Object.defineProperty(dependenciesSackurTetrode_generated,"__esModule",{value:!0}),dependenciesSackurTetrode_generated.sackurTetrodeDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createSackurTetrode:_e.createSackurTetrode};return dependenciesSackurTetrode_generated.sackurTetrodeDependencies=tt,dependenciesSackurTetrode_generated}var dependenciesSec_generated={},hasRequiredDependenciesSec_generated;function requireDependenciesSec_generated(){if(hasRequiredDependenciesSec_generated)return dependenciesSec_generated;hasRequiredDependenciesSec_generated=1,Object.defineProperty(dependenciesSec_generated,"__esModule",{value:!0}),dependenciesSec_generated.secDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createSec:tt.createSec};return dependenciesSec_generated.secDependencies=rt,dependenciesSec_generated}var dependenciesSech_generated={},hasRequiredDependenciesSech_generated;function requireDependenciesSech_generated(){if(hasRequiredDependenciesSech_generated)return dependenciesSech_generated;hasRequiredDependenciesSech_generated=1,Object.defineProperty(dependenciesSech_generated,"__esModule",{value:!0}),dependenciesSech_generated.sechDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,typedDependencies:_e.typedDependencies,createSech:tt.createSech};return dependenciesSech_generated.sechDependencies=rt,dependenciesSech_generated}var dependenciesSecondRadiation_generated={},hasRequiredDependenciesSecondRadiation_generated;function requireDependenciesSecondRadiation_generated(){if(hasRequiredDependenciesSecondRadiation_generated)return dependenciesSecondRadiation_generated;hasRequiredDependenciesSecondRadiation_generated=1,Object.defineProperty(dependenciesSecondRadiation_generated,"__esModule",{value:!0}),dependenciesSecondRadiation_generated.secondRadiationDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createSecondRadiation:tt.createSecondRadiation};return dependenciesSecondRadiation_generated.secondRadiationDependencies=rt,dependenciesSecondRadiation_generated}var dependenciesSetCartesian_generated={},hasRequiredDependenciesSetCartesian_generated;function requireDependenciesSetCartesian_generated(){if(hasRequiredDependenciesSetCartesian_generated)return dependenciesSetCartesian_generated;hasRequiredDependenciesSetCartesian_generated=1,Object.defineProperty(dependenciesSetCartesian_generated,"__esModule",{value:!0}),dependenciesSetCartesian_generated.setCartesianDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesIndexClass_generated(),tt=requireDependenciesCompareNatural_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesSubset_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,IndexDependencies:_e.IndexDependencies,compareNaturalDependencies:tt.compareNaturalDependencies,sizeDependencies:rt.sizeDependencies,subsetDependencies:nt.subsetDependencies,typedDependencies:st.typedDependencies,createSetCartesian:dt.createSetCartesian};return dependenciesSetCartesian_generated.setCartesianDependencies=ft,dependenciesSetCartesian_generated}var dependenciesSetDifference_generated={},hasRequiredDependenciesSetDifference_generated;function requireDependenciesSetDifference_generated(){if(hasRequiredDependenciesSetDifference_generated)return dependenciesSetDifference_generated;hasRequiredDependenciesSetDifference_generated=1,Object.defineProperty(dependenciesSetDifference_generated,"__esModule",{value:!0}),dependenciesSetDifference_generated.setDifferenceDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesIndexClass_generated(),tt=requireDependenciesCompareNatural_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesSubset_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,IndexDependencies:_e.IndexDependencies,compareNaturalDependencies:tt.compareNaturalDependencies,sizeDependencies:rt.sizeDependencies,subsetDependencies:nt.subsetDependencies,typedDependencies:st.typedDependencies,createSetDifference:dt.createSetDifference};return dependenciesSetDifference_generated.setDifferenceDependencies=ft,dependenciesSetDifference_generated}var dependenciesSetDistinct_generated={},hasRequiredDependenciesSetDistinct_generated;function requireDependenciesSetDistinct_generated(){if(hasRequiredDependenciesSetDistinct_generated)return dependenciesSetDistinct_generated;hasRequiredDependenciesSetDistinct_generated=1,Object.defineProperty(dependenciesSetDistinct_generated,"__esModule",{value:!0}),dependenciesSetDistinct_generated.setDistinctDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesIndexClass_generated(),tt=requireDependenciesCompareNatural_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesSubset_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,IndexDependencies:_e.IndexDependencies,compareNaturalDependencies:tt.compareNaturalDependencies,sizeDependencies:rt.sizeDependencies,subsetDependencies:nt.subsetDependencies,typedDependencies:st.typedDependencies,createSetDistinct:dt.createSetDistinct};return dependenciesSetDistinct_generated.setDistinctDependencies=ft,dependenciesSetDistinct_generated}var dependenciesSetIntersect_generated={},hasRequiredDependenciesSetIntersect_generated;function requireDependenciesSetIntersect_generated(){if(hasRequiredDependenciesSetIntersect_generated)return dependenciesSetIntersect_generated;hasRequiredDependenciesSetIntersect_generated=1,Object.defineProperty(dependenciesSetIntersect_generated,"__esModule",{value:!0}),dependenciesSetIntersect_generated.setIntersectDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesIndexClass_generated(),tt=requireDependenciesCompareNatural_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesSubset_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={DenseMatrixDependencies:et.DenseMatrixDependencies,IndexDependencies:_e.IndexDependencies,compareNaturalDependencies:tt.compareNaturalDependencies,sizeDependencies:rt.sizeDependencies,subsetDependencies:nt.subsetDependencies,typedDependencies:st.typedDependencies,createSetIntersect:dt.createSetIntersect};return dependenciesSetIntersect_generated.setIntersectDependencies=ft,dependenciesSetIntersect_generated}var dependenciesSetIsSubset_generated={},hasRequiredDependenciesSetIsSubset_generated;function requireDependenciesSetIsSubset_generated(){if(hasRequiredDependenciesSetIsSubset_generated)return dependenciesSetIsSubset_generated;hasRequiredDependenciesSetIsSubset_generated=1,Object.defineProperty(dependenciesSetIsSubset_generated,"__esModule",{value:!0}),dependenciesSetIsSubset_generated.setIsSubsetDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesCompareNatural_generated(),tt=requireDependenciesSize_generated(),rt=requireDependenciesSubset_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={IndexDependencies:et.IndexDependencies,compareNaturalDependencies:_e.compareNaturalDependencies,sizeDependencies:tt.sizeDependencies,subsetDependencies:rt.subsetDependencies,typedDependencies:nt.typedDependencies,createSetIsSubset:st.createSetIsSubset};return dependenciesSetIsSubset_generated.setIsSubsetDependencies=dt,dependenciesSetIsSubset_generated}var dependenciesSetMultiplicity_generated={},hasRequiredDependenciesSetMultiplicity_generated;function requireDependenciesSetMultiplicity_generated(){if(hasRequiredDependenciesSetMultiplicity_generated)return dependenciesSetMultiplicity_generated;hasRequiredDependenciesSetMultiplicity_generated=1,Object.defineProperty(dependenciesSetMultiplicity_generated,"__esModule",{value:!0}),dependenciesSetMultiplicity_generated.setMultiplicityDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesCompareNatural_generated(),tt=requireDependenciesSize_generated(),rt=requireDependenciesSubset_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={IndexDependencies:et.IndexDependencies,compareNaturalDependencies:_e.compareNaturalDependencies,sizeDependencies:tt.sizeDependencies,subsetDependencies:rt.subsetDependencies,typedDependencies:nt.typedDependencies,createSetMultiplicity:st.createSetMultiplicity};return dependenciesSetMultiplicity_generated.setMultiplicityDependencies=dt,dependenciesSetMultiplicity_generated}var dependenciesSetPowerset_generated={},hasRequiredDependenciesSetPowerset_generated;function requireDependenciesSetPowerset_generated(){if(hasRequiredDependenciesSetPowerset_generated)return dependenciesSetPowerset_generated;hasRequiredDependenciesSetPowerset_generated=1,Object.defineProperty(dependenciesSetPowerset_generated,"__esModule",{value:!0}),dependenciesSetPowerset_generated.setPowersetDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesCompareNatural_generated(),tt=requireDependenciesSize_generated(),rt=requireDependenciesSubset_generated(),nt=requireDependenciesTyped_generated(),st=requireFactoriesAny(),dt={IndexDependencies:et.IndexDependencies,compareNaturalDependencies:_e.compareNaturalDependencies,sizeDependencies:tt.sizeDependencies,subsetDependencies:rt.subsetDependencies,typedDependencies:nt.typedDependencies,createSetPowerset:st.createSetPowerset};return dependenciesSetPowerset_generated.setPowersetDependencies=dt,dependenciesSetPowerset_generated}var dependenciesSetSize_generated={},hasRequiredDependenciesSetSize_generated;function requireDependenciesSetSize_generated(){if(hasRequiredDependenciesSetSize_generated)return dependenciesSetSize_generated;hasRequiredDependenciesSetSize_generated=1,Object.defineProperty(dependenciesSetSize_generated,"__esModule",{value:!0}),dependenciesSetSize_generated.setSizeDependencies=void 0;var et=requireDependenciesCompareNatural_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={compareNaturalDependencies:et.compareNaturalDependencies,typedDependencies:_e.typedDependencies,createSetSize:tt.createSetSize};return dependenciesSetSize_generated.setSizeDependencies=rt,dependenciesSetSize_generated}var dependenciesSetSymDifference_generated={},hasRequiredDependenciesSetSymDifference_generated;function requireDependenciesSetSymDifference_generated(){if(hasRequiredDependenciesSetSymDifference_generated)return dependenciesSetSymDifference_generated;hasRequiredDependenciesSetSymDifference_generated=1,Object.defineProperty(dependenciesSetSymDifference_generated,"__esModule",{value:!0}),dependenciesSetSymDifference_generated.setSymDifferenceDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesConcat_generated(),tt=requireDependenciesSetDifference_generated(),rt=requireDependenciesSize_generated(),nt=requireDependenciesSubset_generated(),st=requireDependenciesTyped_generated(),dt=requireFactoriesAny(),ft={IndexDependencies:et.IndexDependencies,concatDependencies:_e.concatDependencies,setDifferenceDependencies:tt.setDifferenceDependencies,sizeDependencies:rt.sizeDependencies,subsetDependencies:nt.subsetDependencies,typedDependencies:st.typedDependencies,createSetSymDifference:dt.createSetSymDifference};return dependenciesSetSymDifference_generated.setSymDifferenceDependencies=ft,dependenciesSetSymDifference_generated}var dependenciesSetUnion_generated={},hasRequiredDependenciesSetUnion_generated;function requireDependenciesSetUnion_generated(){if(hasRequiredDependenciesSetUnion_generated)return dependenciesSetUnion_generated;hasRequiredDependenciesSetUnion_generated=1,Object.defineProperty(dependenciesSetUnion_generated,"__esModule",{value:!0}),dependenciesSetUnion_generated.setUnionDependencies=void 0;var et=requireDependenciesIndexClass_generated(),_e=requireDependenciesConcat_generated(),tt=requireDependenciesSetIntersect_generated(),rt=requireDependenciesSetSymDifference_generated(),nt=requireDependenciesSize_generated(),st=requireDependenciesSubset_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={IndexDependencies:et.IndexDependencies,concatDependencies:_e.concatDependencies,setIntersectDependencies:tt.setIntersectDependencies,setSymDifferenceDependencies:rt.setSymDifferenceDependencies,sizeDependencies:nt.sizeDependencies,subsetDependencies:st.subsetDependencies,typedDependencies:dt.typedDependencies,createSetUnion:ft.createSetUnion};return dependenciesSetUnion_generated.setUnionDependencies=ht,dependenciesSetUnion_generated}var dependenciesSinh_generated={},hasRequiredDependenciesSinh_generated;function requireDependenciesSinh_generated(){if(hasRequiredDependenciesSinh_generated)return dependenciesSinh_generated;hasRequiredDependenciesSinh_generated=1,Object.defineProperty(dependenciesSinh_generated,"__esModule",{value:!0}),dependenciesSinh_generated.sinhDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createSinh:_e.createSinh};return dependenciesSinh_generated.sinhDependencies=tt,dependenciesSinh_generated}var dependenciesSort_generated={},hasRequiredDependenciesSort_generated;function requireDependenciesSort_generated(){if(hasRequiredDependenciesSort_generated)return dependenciesSort_generated;hasRequiredDependenciesSort_generated=1,Object.defineProperty(dependenciesSort_generated,"__esModule",{value:!0}),dependenciesSort_generated.sortDependencies=void 0;var et=requireDependenciesCompare_generated(),_e=requireDependenciesCompareNatural_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={compareDependencies:et.compareDependencies,compareNaturalDependencies:_e.compareNaturalDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createSort:nt.createSort};return dependenciesSort_generated.sortDependencies=st,dependenciesSort_generated}var dependenciesSparse_generated={},hasRequiredDependenciesSparse_generated;function requireDependenciesSparse_generated(){if(hasRequiredDependenciesSparse_generated)return dependenciesSparse_generated;hasRequiredDependenciesSparse_generated=1,Object.defineProperty(dependenciesSparse_generated,"__esModule",{value:!0}),dependenciesSparse_generated.sparseDependencies=void 0;var et=requireDependenciesSparseMatrixClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={SparseMatrixDependencies:et.SparseMatrixDependencies,typedDependencies:_e.typedDependencies,createSparse:tt.createSparse};return dependenciesSparse_generated.sparseDependencies=rt,dependenciesSparse_generated}var dependenciesSpeedOfLight_generated={},hasRequiredDependenciesSpeedOfLight_generated;function requireDependenciesSpeedOfLight_generated(){if(hasRequiredDependenciesSpeedOfLight_generated)return dependenciesSpeedOfLight_generated;hasRequiredDependenciesSpeedOfLight_generated=1,Object.defineProperty(dependenciesSpeedOfLight_generated,"__esModule",{value:!0}),dependenciesSpeedOfLight_generated.speedOfLightDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createSpeedOfLight:tt.createSpeedOfLight};return dependenciesSpeedOfLight_generated.speedOfLightDependencies=rt,dependenciesSpeedOfLight_generated}var dependenciesSplitUnit_generated={},hasRequiredDependenciesSplitUnit_generated;function requireDependenciesSplitUnit_generated(){if(hasRequiredDependenciesSplitUnit_generated)return dependenciesSplitUnit_generated;hasRequiredDependenciesSplitUnit_generated=1,Object.defineProperty(dependenciesSplitUnit_generated,"__esModule",{value:!0}),dependenciesSplitUnit_generated.splitUnitDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createSplitUnit:_e.createSplitUnit};return dependenciesSplitUnit_generated.splitUnitDependencies=tt,dependenciesSplitUnit_generated}var dependenciesSqrtm_generated={},hasRequiredDependenciesSqrtm_generated;function requireDependenciesSqrtm_generated(){if(hasRequiredDependenciesSqrtm_generated)return dependenciesSqrtm_generated;hasRequiredDependenciesSqrtm_generated=1,Object.defineProperty(dependenciesSqrtm_generated,"__esModule",{value:!0}),dependenciesSqrtm_generated.sqrtmDependencies=void 0;var et=requireDependenciesAbs_generated(),_e=requireDependenciesAdd_generated(),tt=requireDependenciesIdentity_generated(),rt=requireDependenciesInv_generated(),nt=requireDependenciesMax_generated(),st=requireDependenciesMultiply_generated(),dt=requireDependenciesSize_generated(),ft=requireDependenciesSqrt_generated(),ht=requireDependenciesSubtract_generated(),mt=requireDependenciesTyped_generated(),bt=requireFactoriesAny(),St={absDependencies:et.absDependencies,addDependencies:_e.addDependencies,identityDependencies:tt.identityDependencies,invDependencies:rt.invDependencies,maxDependencies:nt.maxDependencies,multiplyDependencies:st.multiplyDependencies,sizeDependencies:dt.sizeDependencies,sqrtDependencies:ft.sqrtDependencies,subtractDependencies:ht.subtractDependencies,typedDependencies:mt.typedDependencies,createSqrtm:bt.createSqrtm};return dependenciesSqrtm_generated.sqrtmDependencies=St,dependenciesSqrtm_generated}var dependenciesSquare_generated={},hasRequiredDependenciesSquare_generated;function requireDependenciesSquare_generated(){if(hasRequiredDependenciesSquare_generated)return dependenciesSquare_generated;hasRequiredDependenciesSquare_generated=1,Object.defineProperty(dependenciesSquare_generated,"__esModule",{value:!0}),dependenciesSquare_generated.squareDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createSquare:_e.createSquare};return dependenciesSquare_generated.squareDependencies=tt,dependenciesSquare_generated}var dependenciesSqueeze_generated={},hasRequiredDependenciesSqueeze_generated;function requireDependenciesSqueeze_generated(){if(hasRequiredDependenciesSqueeze_generated)return dependenciesSqueeze_generated;hasRequiredDependenciesSqueeze_generated=1,Object.defineProperty(dependenciesSqueeze_generated,"__esModule",{value:!0}),dependenciesSqueeze_generated.squeezeDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createSqueeze:tt.createSqueeze};return dependenciesSqueeze_generated.squeezeDependencies=rt,dependenciesSqueeze_generated}var dependenciesStd_generated={},dependenciesVariance_generated={},hasRequiredDependenciesVariance_generated;function requireDependenciesVariance_generated(){if(hasRequiredDependenciesVariance_generated)return dependenciesVariance_generated;hasRequiredDependenciesVariance_generated=1,Object.defineProperty(dependenciesVariance_generated,"__esModule",{value:!0}),dependenciesVariance_generated.varianceDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesApply_generated(),tt=requireDependenciesDivide_generated(),rt=requireDependenciesIsNaN_generated(),nt=requireDependenciesMultiply_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={addDependencies:et.addDependencies,applyDependencies:_e.applyDependencies,divideDependencies:tt.divideDependencies,isNaNDependencies:rt.isNaNDependencies,multiplyDependencies:nt.multiplyDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createVariance:ft.createVariance};return dependenciesVariance_generated.varianceDependencies=ht,dependenciesVariance_generated}var hasRequiredDependenciesStd_generated;function requireDependenciesStd_generated(){if(hasRequiredDependenciesStd_generated)return dependenciesStd_generated;hasRequiredDependenciesStd_generated=1,Object.defineProperty(dependenciesStd_generated,"__esModule",{value:!0}),dependenciesStd_generated.stdDependencies=void 0;var et=requireDependenciesSqrt_generated(),_e=requireDependenciesTyped_generated(),tt=requireDependenciesVariance_generated(),rt=requireFactoriesAny(),nt={sqrtDependencies:et.sqrtDependencies,typedDependencies:_e.typedDependencies,varianceDependencies:tt.varianceDependencies,createStd:rt.createStd};return dependenciesStd_generated.stdDependencies=nt,dependenciesStd_generated}var dependenciesStdTransform_generated={},hasRequiredDependenciesStdTransform_generated;function requireDependenciesStdTransform_generated(){if(hasRequiredDependenciesStdTransform_generated)return dependenciesStdTransform_generated;hasRequiredDependenciesStdTransform_generated=1,Object.defineProperty(dependenciesStdTransform_generated,"__esModule",{value:!0}),dependenciesStdTransform_generated.stdTransformDependencies=void 0;var et=requireDependenciesSqrt_generated(),_e=requireDependenciesTyped_generated(),tt=requireDependenciesVariance_generated(),rt=requireFactoriesAny(),nt={sqrtDependencies:et.sqrtDependencies,typedDependencies:_e.typedDependencies,varianceDependencies:tt.varianceDependencies,createStdTransform:rt.createStdTransform};return dependenciesStdTransform_generated.stdTransformDependencies=nt,dependenciesStdTransform_generated}var dependenciesStefanBoltzmann_generated={},hasRequiredDependenciesStefanBoltzmann_generated;function requireDependenciesStefanBoltzmann_generated(){if(hasRequiredDependenciesStefanBoltzmann_generated)return dependenciesStefanBoltzmann_generated;hasRequiredDependenciesStefanBoltzmann_generated=1,Object.defineProperty(dependenciesStefanBoltzmann_generated,"__esModule",{value:!0}),dependenciesStefanBoltzmann_generated.stefanBoltzmannDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createStefanBoltzmann:tt.createStefanBoltzmann};return dependenciesStefanBoltzmann_generated.stefanBoltzmannDependencies=rt,dependenciesStefanBoltzmann_generated}var dependenciesString_generated={},hasRequiredDependenciesString_generated;function requireDependenciesString_generated(){if(hasRequiredDependenciesString_generated)return dependenciesString_generated;hasRequiredDependenciesString_generated=1,Object.defineProperty(dependenciesString_generated,"__esModule",{value:!0}),dependenciesString_generated.stringDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createString:_e.createString};return dependenciesString_generated.stringDependencies=tt,dependenciesString_generated}var dependenciesSubsetTransform_generated={},hasRequiredDependenciesSubsetTransform_generated;function requireDependenciesSubsetTransform_generated(){if(hasRequiredDependenciesSubsetTransform_generated)return dependenciesSubsetTransform_generated;hasRequiredDependenciesSubsetTransform_generated=1,Object.defineProperty(dependenciesSubsetTransform_generated,"__esModule",{value:!0}),dependenciesSubsetTransform_generated.subsetTransformDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createSubsetTransform:tt.createSubsetTransform};return dependenciesSubsetTransform_generated.subsetTransformDependencies=rt,dependenciesSubsetTransform_generated}var dependenciesSumTransform_generated={},hasRequiredDependenciesSumTransform_generated;function requireDependenciesSumTransform_generated(){if(hasRequiredDependenciesSumTransform_generated)return dependenciesSumTransform_generated;hasRequiredDependenciesSumTransform_generated=1,Object.defineProperty(dependenciesSumTransform_generated,"__esModule",{value:!0}),dependenciesSumTransform_generated.sumTransformDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesNumeric_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,numericDependencies:_e.numericDependencies,typedDependencies:tt.typedDependencies,createSumTransform:rt.createSumTransform};return dependenciesSumTransform_generated.sumTransformDependencies=nt,dependenciesSumTransform_generated}var dependenciesSymbolicEqual_generated={},hasRequiredDependenciesSymbolicEqual_generated;function requireDependenciesSymbolicEqual_generated(){if(hasRequiredDependenciesSymbolicEqual_generated)return dependenciesSymbolicEqual_generated;hasRequiredDependenciesSymbolicEqual_generated=1,Object.defineProperty(dependenciesSymbolicEqual_generated,"__esModule",{value:!0}),dependenciesSymbolicEqual_generated.symbolicEqualDependencies=void 0;var et=requireDependenciesOperatorNode_generated(),_e=requireDependenciesParse_generated(),tt=requireDependenciesSimplify_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={OperatorNodeDependencies:et.OperatorNodeDependencies,parseDependencies:_e.parseDependencies,simplifyDependencies:tt.simplifyDependencies,typedDependencies:rt.typedDependencies,createSymbolicEqual:nt.createSymbolicEqual};return dependenciesSymbolicEqual_generated.symbolicEqualDependencies=st,dependenciesSymbolicEqual_generated}var dependenciesTan_generated={},hasRequiredDependenciesTan_generated;function requireDependenciesTan_generated(){if(hasRequiredDependenciesTan_generated)return dependenciesTan_generated;hasRequiredDependenciesTan_generated=1,Object.defineProperty(dependenciesTan_generated,"__esModule",{value:!0}),dependenciesTan_generated.tanDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createTan:_e.createTan};return dependenciesTan_generated.tanDependencies=tt,dependenciesTan_generated}var dependenciesTanh_generated={},hasRequiredDependenciesTanh_generated;function requireDependenciesTanh_generated(){if(hasRequiredDependenciesTanh_generated)return dependenciesTanh_generated;hasRequiredDependenciesTanh_generated=1,Object.defineProperty(dependenciesTanh_generated,"__esModule",{value:!0}),dependenciesTanh_generated.tanhDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createTanh:_e.createTanh};return dependenciesTanh_generated.tanhDependencies=tt,dependenciesTanh_generated}var dependenciesThomsonCrossSection_generated={},hasRequiredDependenciesThomsonCrossSection_generated;function requireDependenciesThomsonCrossSection_generated(){if(hasRequiredDependenciesThomsonCrossSection_generated)return dependenciesThomsonCrossSection_generated;hasRequiredDependenciesThomsonCrossSection_generated=1,Object.defineProperty(dependenciesThomsonCrossSection_generated,"__esModule",{value:!0}),dependenciesThomsonCrossSection_generated.thomsonCrossSectionDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createThomsonCrossSection:tt.createThomsonCrossSection};return dependenciesThomsonCrossSection_generated.thomsonCrossSectionDependencies=rt,dependenciesThomsonCrossSection_generated}var dependenciesTo_generated={},hasRequiredDependenciesTo_generated;function requireDependenciesTo_generated(){if(hasRequiredDependenciesTo_generated)return dependenciesTo_generated;hasRequiredDependenciesTo_generated=1,Object.defineProperty(dependenciesTo_generated,"__esModule",{value:!0}),dependenciesTo_generated.toDependencies=void 0;var et=requireDependenciesMatrix_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={matrixDependencies:et.matrixDependencies,typedDependencies:_e.typedDependencies,createTo:tt.createTo};return dependenciesTo_generated.toDependencies=rt,dependenciesTo_generated}var dependenciesTrace_generated={},hasRequiredDependenciesTrace_generated;function requireDependenciesTrace_generated(){if(hasRequiredDependenciesTrace_generated)return dependenciesTrace_generated;hasRequiredDependenciesTrace_generated=1,Object.defineProperty(dependenciesTrace_generated,"__esModule",{value:!0}),dependenciesTrace_generated.traceDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={addDependencies:et.addDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createTrace:rt.createTrace};return dependenciesTrace_generated.traceDependencies=nt,dependenciesTrace_generated}var dependenciesTrue_generated={},hasRequiredDependenciesTrue_generated;function requireDependenciesTrue_generated(){if(hasRequiredDependenciesTrue_generated)return dependenciesTrue_generated;hasRequiredDependenciesTrue_generated=1,Object.defineProperty(dependenciesTrue_generated,"__esModule",{value:!0}),dependenciesTrue_generated.trueDependencies=void 0;var et=requireFactoriesAny(),_e={createTrue:et.createTrue};return dependenciesTrue_generated.trueDependencies=_e,dependenciesTrue_generated}var dependenciesTypeOf_generated={},hasRequiredDependenciesTypeOf_generated;function requireDependenciesTypeOf_generated(){if(hasRequiredDependenciesTypeOf_generated)return dependenciesTypeOf_generated;hasRequiredDependenciesTypeOf_generated=1,Object.defineProperty(dependenciesTypeOf_generated,"__esModule",{value:!0}),dependenciesTypeOf_generated.typeOfDependencies=void 0;var et=requireDependenciesTyped_generated(),_e=requireFactoriesAny(),tt={typedDependencies:et.typedDependencies,createTypeOf:_e.createTypeOf};return dependenciesTypeOf_generated.typeOfDependencies=tt,dependenciesTypeOf_generated}var dependenciesUnequal_generated={},hasRequiredDependenciesUnequal_generated;function requireDependenciesUnequal_generated(){if(hasRequiredDependenciesUnequal_generated)return dependenciesUnequal_generated;hasRequiredDependenciesUnequal_generated=1,Object.defineProperty(dependenciesUnequal_generated,"__esModule",{value:!0}),dependenciesUnequal_generated.unequalDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesEqualScalar_generated(),tt=requireDependenciesMatrix_generated(),rt=requireDependenciesTyped_generated(),nt=requireFactoriesAny(),st={DenseMatrixDependencies:et.DenseMatrixDependencies,equalScalarDependencies:_e.equalScalarDependencies,matrixDependencies:tt.matrixDependencies,typedDependencies:rt.typedDependencies,createUnequal:nt.createUnequal};return dependenciesUnequal_generated.unequalDependencies=st,dependenciesUnequal_generated}var dependenciesUnitFunction_generated={},hasRequiredDependenciesUnitFunction_generated;function requireDependenciesUnitFunction_generated(){if(hasRequiredDependenciesUnitFunction_generated)return dependenciesUnitFunction_generated;hasRequiredDependenciesUnitFunction_generated=1,Object.defineProperty(dependenciesUnitFunction_generated,"__esModule",{value:!0}),dependenciesUnitFunction_generated.unitDependencies=void 0;var et=requireDependenciesUnitClass_generated(),_e=requireDependenciesTyped_generated(),tt=requireFactoriesAny(),rt={UnitDependencies:et.UnitDependencies,typedDependencies:_e.typedDependencies,createUnitFunction:tt.createUnitFunction};return dependenciesUnitFunction_generated.unitDependencies=rt,dependenciesUnitFunction_generated}var dependenciesUppercaseE_generated={},hasRequiredDependenciesUppercaseE_generated;function requireDependenciesUppercaseE_generated(){if(hasRequiredDependenciesUppercaseE_generated)return dependenciesUppercaseE_generated;hasRequiredDependenciesUppercaseE_generated=1,Object.defineProperty(dependenciesUppercaseE_generated,"__esModule",{value:!0}),dependenciesUppercaseE_generated.EDependencies=void 0;var et=requireDependenciesE_generated(),_e=requireFactoriesAny(),tt={eDependencies:et.eDependencies,createUppercaseE:_e.createUppercaseE};return dependenciesUppercaseE_generated.EDependencies=tt,dependenciesUppercaseE_generated}var dependenciesUppercasePi_generated={},hasRequiredDependenciesUppercasePi_generated;function requireDependenciesUppercasePi_generated(){if(hasRequiredDependenciesUppercasePi_generated)return dependenciesUppercasePi_generated;hasRequiredDependenciesUppercasePi_generated=1,Object.defineProperty(dependenciesUppercasePi_generated,"__esModule",{value:!0}),dependenciesUppercasePi_generated.PIDependencies=void 0;var et=requireDependenciesPi_generated(),_e=requireFactoriesAny(),tt={piDependencies:et.piDependencies,createUppercasePi:_e.createUppercasePi};return dependenciesUppercasePi_generated.PIDependencies=tt,dependenciesUppercasePi_generated}var dependenciesVacuumImpedance_generated={},hasRequiredDependenciesVacuumImpedance_generated;function requireDependenciesVacuumImpedance_generated(){if(hasRequiredDependenciesVacuumImpedance_generated)return dependenciesVacuumImpedance_generated;hasRequiredDependenciesVacuumImpedance_generated=1,Object.defineProperty(dependenciesVacuumImpedance_generated,"__esModule",{value:!0}),dependenciesVacuumImpedance_generated.vacuumImpedanceDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createVacuumImpedance:tt.createVacuumImpedance};return dependenciesVacuumImpedance_generated.vacuumImpedanceDependencies=rt,dependenciesVacuumImpedance_generated}var dependenciesVarianceTransform_generated={},hasRequiredDependenciesVarianceTransform_generated;function requireDependenciesVarianceTransform_generated(){if(hasRequiredDependenciesVarianceTransform_generated)return dependenciesVarianceTransform_generated;hasRequiredDependenciesVarianceTransform_generated=1,Object.defineProperty(dependenciesVarianceTransform_generated,"__esModule",{value:!0}),dependenciesVarianceTransform_generated.varianceTransformDependencies=void 0;var et=requireDependenciesAdd_generated(),_e=requireDependenciesApply_generated(),tt=requireDependenciesDivide_generated(),rt=requireDependenciesIsNaN_generated(),nt=requireDependenciesMultiply_generated(),st=requireDependenciesSubtract_generated(),dt=requireDependenciesTyped_generated(),ft=requireFactoriesAny(),ht={addDependencies:et.addDependencies,applyDependencies:_e.applyDependencies,divideDependencies:tt.divideDependencies,isNaNDependencies:rt.isNaNDependencies,multiplyDependencies:nt.multiplyDependencies,subtractDependencies:st.subtractDependencies,typedDependencies:dt.typedDependencies,createVarianceTransform:ft.createVarianceTransform};return dependenciesVarianceTransform_generated.varianceTransformDependencies=ht,dependenciesVarianceTransform_generated}var dependenciesVersion_generated={},hasRequiredDependenciesVersion_generated;function requireDependenciesVersion_generated(){if(hasRequiredDependenciesVersion_generated)return dependenciesVersion_generated;hasRequiredDependenciesVersion_generated=1,Object.defineProperty(dependenciesVersion_generated,"__esModule",{value:!0}),dependenciesVersion_generated.versionDependencies=void 0;var et=requireFactoriesAny(),_e={createVersion:et.createVersion};return dependenciesVersion_generated.versionDependencies=_e,dependenciesVersion_generated}var dependenciesWeakMixingAngle_generated={},hasRequiredDependenciesWeakMixingAngle_generated;function requireDependenciesWeakMixingAngle_generated(){if(hasRequiredDependenciesWeakMixingAngle_generated)return dependenciesWeakMixingAngle_generated;hasRequiredDependenciesWeakMixingAngle_generated=1,Object.defineProperty(dependenciesWeakMixingAngle_generated,"__esModule",{value:!0}),dependenciesWeakMixingAngle_generated.weakMixingAngleDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireFactoriesAny(),tt={BigNumberDependencies:et.BigNumberDependencies,createWeakMixingAngle:_e.createWeakMixingAngle};return dependenciesWeakMixingAngle_generated.weakMixingAngleDependencies=tt,dependenciesWeakMixingAngle_generated}var dependenciesWienDisplacement_generated={},hasRequiredDependenciesWienDisplacement_generated;function requireDependenciesWienDisplacement_generated(){if(hasRequiredDependenciesWienDisplacement_generated)return dependenciesWienDisplacement_generated;hasRequiredDependenciesWienDisplacement_generated=1,Object.defineProperty(dependenciesWienDisplacement_generated,"__esModule",{value:!0}),dependenciesWienDisplacement_generated.wienDisplacementDependencies=void 0;var et=requireDependenciesBigNumberClass_generated(),_e=requireDependenciesUnitClass_generated(),tt=requireFactoriesAny(),rt={BigNumberDependencies:et.BigNumberDependencies,UnitDependencies:_e.UnitDependencies,createWienDisplacement:tt.createWienDisplacement};return dependenciesWienDisplacement_generated.wienDisplacementDependencies=rt,dependenciesWienDisplacement_generated}var dependenciesXor_generated={},hasRequiredDependenciesXor_generated;function requireDependenciesXor_generated(){if(hasRequiredDependenciesXor_generated)return dependenciesXor_generated;hasRequiredDependenciesXor_generated=1,Object.defineProperty(dependenciesXor_generated,"__esModule",{value:!0}),dependenciesXor_generated.xorDependencies=void 0;var et=requireDependenciesDenseMatrixClass_generated(),_e=requireDependenciesMatrix_generated(),tt=requireDependenciesTyped_generated(),rt=requireFactoriesAny(),nt={DenseMatrixDependencies:et.DenseMatrixDependencies,matrixDependencies:_e.matrixDependencies,typedDependencies:tt.typedDependencies,createXor:rt.createXor};return dependenciesXor_generated.xorDependencies=nt,dependenciesXor_generated}var allFactoriesAny={},hasRequiredAllFactoriesAny;function requireAllFactoriesAny(){if(hasRequiredAllFactoriesAny)return allFactoriesAny;hasRequiredAllFactoriesAny=1;var et=require_typeof();Object.defineProperty(allFactoriesAny,"__esModule",{value:!0}),allFactoriesAny.all=void 0;var _e=rt(requireFactoriesAny());function tt(st){if(typeof WeakMap!="function")return null;var dt=new WeakMap,ft=new WeakMap;return(tt=function(mt){return mt?ft:dt})(st)}function rt(st,dt){if(st&&st.__esModule)return st;if(st===null||et(st)!=="object"&&typeof st!="function")return{default:st};var ft=tt(dt);if(ft&&ft.has(st))return ft.get(st);var ht={},mt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var bt in st)if(bt!=="default"&&Object.prototype.hasOwnProperty.call(st,bt)){var St=mt?Object.getOwnPropertyDescriptor(st,bt):null;St&&(St.get||St.set)?Object.defineProperty(ht,bt,St):ht[bt]=st[bt]}return ht.default=st,ft&&ft.set(st,ht),ht}var nt=_e;return allFactoriesAny.all=nt,allFactoriesAny}var hasRequiredDependenciesAny_generated;function requireDependenciesAny_generated(){return hasRequiredDependenciesAny_generated||(hasRequiredDependenciesAny_generated=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0}),Object.defineProperty(et,"AccessorNodeDependencies",{enumerable:!0,get:function(){return tt.AccessorNodeDependencies}}),Object.defineProperty(et,"ArrayNodeDependencies",{enumerable:!0,get:function(){return Tt.ArrayNodeDependencies}}),Object.defineProperty(et,"AssignmentNodeDependencies",{enumerable:!0,get:function(){return It.AssignmentNodeDependencies}}),Object.defineProperty(et,"BigNumberDependencies",{enumerable:!0,get:function(){return Ot.BigNumberDependencies}}),Object.defineProperty(et,"BlockNodeDependencies",{enumerable:!0,get:function(){return cr.BlockNodeDependencies}}),Object.defineProperty(et,"ChainDependencies",{enumerable:!0,get:function(){return Or.ChainDependencies}}),Object.defineProperty(et,"ComplexDependencies",{enumerable:!0,get:function(){return qs.ComplexDependencies}}),Object.defineProperty(et,"ConditionalNodeDependencies",{enumerable:!0,get:function(){return Gr.ConditionalNodeDependencies}}),Object.defineProperty(et,"ConstantNodeDependencies",{enumerable:!0,get:function(){return Rn.ConstantNodeDependencies}}),Object.defineProperty(et,"DenseMatrixDependencies",{enumerable:!0,get:function(){return En.DenseMatrixDependencies}}),Object.defineProperty(et,"EDependencies",{enumerable:!0,get:function(){return am.EDependencies}}),Object.defineProperty(et,"FibonacciHeapDependencies",{enumerable:!0,get:function(){return Mo.FibonacciHeapDependencies}}),Object.defineProperty(et,"FractionDependencies",{enumerable:!0,get:function(){return om.FractionDependencies}}),Object.defineProperty(et,"FunctionAssignmentNodeDependencies",{enumerable:!0,get:function(){return Op.FunctionAssignmentNodeDependencies}}),Object.defineProperty(et,"FunctionNodeDependencies",{enumerable:!0,get:function(){return op.FunctionNodeDependencies}}),Object.defineProperty(et,"HelpDependencies",{enumerable:!0,get:function(){return un.HelpDependencies}}),Object.defineProperty(et,"ImmutableDenseMatrixDependencies",{enumerable:!0,get:function(){return Po.ImmutableDenseMatrixDependencies}}),Object.defineProperty(et,"IndexDependencies",{enumerable:!0,get:function(){return mu.IndexDependencies}}),Object.defineProperty(et,"IndexNodeDependencies",{enumerable:!0,get:function(){return zu.IndexNodeDependencies}}),Object.defineProperty(et,"InfinityDependencies",{enumerable:!0,get:function(){return vl.InfinityDependencies}}),Object.defineProperty(et,"LN10Dependencies",{enumerable:!0,get:function(){return xm.LN10Dependencies}}),Object.defineProperty(et,"LN2Dependencies",{enumerable:!0,get:function(){return nm.LN2Dependencies}}),Object.defineProperty(et,"LOG10EDependencies",{enumerable:!0,get:function(){return vv.LOG10EDependencies}}),Object.defineProperty(et,"LOG2EDependencies",{enumerable:!0,get:function(){return rv.LOG2EDependencies}}),Object.defineProperty(et,"MatrixDependencies",{enumerable:!0,get:function(){return Wp.MatrixDependencies}}),Object.defineProperty(et,"NaNDependencies",{enumerable:!0,get:function(){return po.NaNDependencies}}),Object.defineProperty(et,"NodeDependencies",{enumerable:!0,get:function(){return $o.NodeDependencies}}),Object.defineProperty(et,"ObjectNodeDependencies",{enumerable:!0,get:function(){return nu.ObjectNodeDependencies}}),Object.defineProperty(et,"OperatorNodeDependencies",{enumerable:!0,get:function(){return ll.OperatorNodeDependencies}}),Object.defineProperty(et,"PIDependencies",{enumerable:!0,get:function(){return _p.PIDependencies}}),Object.defineProperty(et,"ParenthesisNodeDependencies",{enumerable:!0,get:function(){return Gl.ParenthesisNodeDependencies}}),Object.defineProperty(et,"ParserDependencies",{enumerable:!0,get:function(){return Bp.ParserDependencies}}),Object.defineProperty(et,"RangeDependencies",{enumerable:!0,get:function(){return o_.RangeDependencies}}),Object.defineProperty(et,"RangeNodeDependencies",{enumerable:!0,get:function(){return Gv.RangeNodeDependencies}}),Object.defineProperty(et,"RelationalNodeDependencies",{enumerable:!0,get:function(){return u_.RelationalNodeDependencies}}),Object.defineProperty(et,"ResultSetDependencies",{enumerable:!0,get:function(){return Zv.ResultSetDependencies}}),Object.defineProperty(et,"SQRT1_2Dependencies",{enumerable:!0,get:function(){return xv.SQRT1_2Dependencies}}),Object.defineProperty(et,"SQRT2Dependencies",{enumerable:!0,get:function(){return Yl.SQRT2Dependencies}}),Object.defineProperty(et,"SpaDependencies",{enumerable:!0,get:function(){return Qm.SpaDependencies}}),Object.defineProperty(et,"SparseMatrixDependencies",{enumerable:!0,get:function(){return Ov.SparseMatrixDependencies}}),Object.defineProperty(et,"SymbolNodeDependencies",{enumerable:!0,get:function(){return hu.SymbolNodeDependencies}}),Object.defineProperty(et,"UnitDependencies",{enumerable:!0,get:function(){return H0.UnitDependencies}}),Object.defineProperty(et,"absDependencies",{enumerable:!0,get:function(){return _e.absDependencies}}),Object.defineProperty(et,"acosDependencies",{enumerable:!0,get:function(){return rt.acosDependencies}}),Object.defineProperty(et,"acoshDependencies",{enumerable:!0,get:function(){return nt.acoshDependencies}}),Object.defineProperty(et,"acotDependencies",{enumerable:!0,get:function(){return st.acotDependencies}}),Object.defineProperty(et,"acothDependencies",{enumerable:!0,get:function(){return dt.acothDependencies}}),Object.defineProperty(et,"acscDependencies",{enumerable:!0,get:function(){return ft.acscDependencies}}),Object.defineProperty(et,"acschDependencies",{enumerable:!0,get:function(){return ht.acschDependencies}}),Object.defineProperty(et,"addDependencies",{enumerable:!0,get:function(){return mt.addDependencies}}),Object.defineProperty(et,"addScalarDependencies",{enumerable:!0,get:function(){return bt.addScalarDependencies}}),Object.defineProperty(et,"all",{enumerable:!0,get:function(){return t0.all}}),Object.defineProperty(et,"andDependencies",{enumerable:!0,get:function(){return St.andDependencies}}),Object.defineProperty(et,"applyDependencies",{enumerable:!0,get:function(){return Et.applyDependencies}}),Object.defineProperty(et,"applyTransformDependencies",{enumerable:!0,get:function(){return Ct.applyTransformDependencies}}),Object.defineProperty(et,"argDependencies",{enumerable:!0,get:function(){return Rt.argDependencies}}),Object.defineProperty(et,"asecDependencies",{enumerable:!0,get:function(){return wt.asecDependencies}}),Object.defineProperty(et,"asechDependencies",{enumerable:!0,get:function(){return At.asechDependencies}}),Object.defineProperty(et,"asinDependencies",{enumerable:!0,get:function(){return Nt.asinDependencies}}),Object.defineProperty(et,"asinhDependencies",{enumerable:!0,get:function(){return Pt.asinhDependencies}}),Object.defineProperty(et,"atan2Dependencies",{enumerable:!0,get:function(){return qt.atan2Dependencies}}),Object.defineProperty(et,"atanDependencies",{enumerable:!0,get:function(){return Ft.atanDependencies}}),Object.defineProperty(et,"atanhDependencies",{enumerable:!0,get:function(){return Vt.atanhDependencies}}),Object.defineProperty(et,"atomicMassDependencies",{enumerable:!0,get:function(){return Kt.atomicMassDependencies}}),Object.defineProperty(et,"avogadroDependencies",{enumerable:!0,get:function(){return jt.avogadroDependencies}}),Object.defineProperty(et,"bellNumbersDependencies",{enumerable:!0,get:function(){return Ut.bellNumbersDependencies}}),Object.defineProperty(et,"bignumberDependencies",{enumerable:!0,get:function(){return Wt.bignumberDependencies}}),Object.defineProperty(et,"binDependencies",{enumerable:!0,get:function(){return Bt.binDependencies}}),Object.defineProperty(et,"bitAndDependencies",{enumerable:!0,get:function(){return tr.bitAndDependencies}}),Object.defineProperty(et,"bitNotDependencies",{enumerable:!0,get:function(){return Jt.bitNotDependencies}}),Object.defineProperty(et,"bitOrDependencies",{enumerable:!0,get:function(){return ar.bitOrDependencies}}),Object.defineProperty(et,"bitXorDependencies",{enumerable:!0,get:function(){return pr.bitXorDependencies}}),Object.defineProperty(et,"bohrMagnetonDependencies",{enumerable:!0,get:function(){return gr.bohrMagnetonDependencies}}),Object.defineProperty(et,"bohrRadiusDependencies",{enumerable:!0,get:function(){return Sr.bohrRadiusDependencies}}),Object.defineProperty(et,"boltzmannDependencies",{enumerable:!0,get:function(){return Er.boltzmannDependencies}}),Object.defineProperty(et,"booleanDependencies",{enumerable:!0,get:function(){return Vr.booleanDependencies}}),Object.defineProperty(et,"catalanDependencies",{enumerable:!0,get:function(){return Wr.catalanDependencies}}),Object.defineProperty(et,"cbrtDependencies",{enumerable:!0,get:function(){return Mr.cbrtDependencies}}),Object.defineProperty(et,"ceilDependencies",{enumerable:!0,get:function(){return Nr.ceilDependencies}}),Object.defineProperty(et,"chainDependencies",{enumerable:!0,get:function(){return Yr.chainDependencies}}),Object.defineProperty(et,"classicalElectronRadiusDependencies",{enumerable:!0,get:function(){return Ar.classicalElectronRadiusDependencies}}),Object.defineProperty(et,"cloneDependencies",{enumerable:!0,get:function(){return Qr.cloneDependencies}}),Object.defineProperty(et,"columnDependencies",{enumerable:!0,get:function(){return hn.columnDependencies}}),Object.defineProperty(et,"columnTransformDependencies",{enumerable:!0,get:function(){return Sn.columnTransformDependencies}}),Object.defineProperty(et,"combinationsDependencies",{enumerable:!0,get:function(){return Kr.combinationsDependencies}}),Object.defineProperty(et,"combinationsWithRepDependencies",{enumerable:!0,get:function(){return Hn.combinationsWithRepDependencies}}),Object.defineProperty(et,"compareDependencies",{enumerable:!0,get:function(){return ln.compareDependencies}}),Object.defineProperty(et,"compareNaturalDependencies",{enumerable:!0,get:function(){return kn.compareNaturalDependencies}}),Object.defineProperty(et,"compareTextDependencies",{enumerable:!0,get:function(){return xn.compareTextDependencies}}),Object.defineProperty(et,"compileDependencies",{enumerable:!0,get:function(){return An.compileDependencies}}),Object.defineProperty(et,"complexDependencies",{enumerable:!0,get:function(){return rs.complexDependencies}}),Object.defineProperty(et,"compositionDependencies",{enumerable:!0,get:function(){return Ln.compositionDependencies}}),Object.defineProperty(et,"concatDependencies",{enumerable:!0,get:function(){return Cn.concatDependencies}}),Object.defineProperty(et,"concatTransformDependencies",{enumerable:!0,get:function(){return Nn.concatTransformDependencies}}),Object.defineProperty(et,"conductanceQuantumDependencies",{enumerable:!0,get:function(){return tn.conductanceQuantumDependencies}}),Object.defineProperty(et,"conjDependencies",{enumerable:!0,get:function(){return dn.conjDependencies}}),Object.defineProperty(et,"cosDependencies",{enumerable:!0,get:function(){return wn.cosDependencies}}),Object.defineProperty(et,"coshDependencies",{enumerable:!0,get:function(){return Un.coshDependencies}}),Object.defineProperty(et,"cotDependencies",{enumerable:!0,get:function(){return Zn.cotDependencies}}),Object.defineProperty(et,"cothDependencies",{enumerable:!0,get:function(){return pn.cothDependencies}}),Object.defineProperty(et,"coulombDependencies",{enumerable:!0,get:function(){return Dn.coulombDependencies}}),Object.defineProperty(et,"countDependencies",{enumerable:!0,get:function(){return qn.countDependencies}}),Object.defineProperty(et,"createUnitDependencies",{enumerable:!0,get:function(){return _a.createUnitDependencies}}),Object.defineProperty(et,"crossDependencies",{enumerable:!0,get:function(){return Vn.crossDependencies}}),Object.defineProperty(et,"cscDependencies",{enumerable:!0,get:function(){return bs.cscDependencies}}),Object.defineProperty(et,"cschDependencies",{enumerable:!0,get:function(){return Is.cschDependencies}}),Object.defineProperty(et,"ctransposeDependencies",{enumerable:!0,get:function(){return uo.ctransposeDependencies}}),Object.defineProperty(et,"cubeDependencies",{enumerable:!0,get:function(){return Rs.cubeDependencies}}),Object.defineProperty(et,"cumsumDependencies",{enumerable:!0,get:function(){return io.cumsumDependencies}}),Object.defineProperty(et,"cumsumTransformDependencies",{enumerable:!0,get:function(){return vo.cumsumTransformDependencies}}),Object.defineProperty(et,"deepEqualDependencies",{enumerable:!0,get:function(){return Bo.deepEqualDependencies}}),Object.defineProperty(et,"derivativeDependencies",{enumerable:!0,get:function(){return In.derivativeDependencies}}),Object.defineProperty(et,"detDependencies",{enumerable:!0,get:function(){return ds.detDependencies}}),Object.defineProperty(et,"deuteronMassDependencies",{enumerable:!0,get:function(){return Ps.deuteronMassDependencies}}),Object.defineProperty(et,"diagDependencies",{enumerable:!0,get:function(){return yo.diagDependencies}}),Object.defineProperty(et,"diffDependencies",{enumerable:!0,get:function(){return rn.diffDependencies}}),Object.defineProperty(et,"diffTransformDependencies",{enumerable:!0,get:function(){return es.diffTransformDependencies}}),Object.defineProperty(et,"distanceDependencies",{enumerable:!0,get:function(){return Gs.distanceDependencies}}),Object.defineProperty(et,"divideDependencies",{enumerable:!0,get:function(){return Ro.divideDependencies}}),Object.defineProperty(et,"divideScalarDependencies",{enumerable:!0,get:function(){return ru.divideScalarDependencies}}),Object.defineProperty(et,"dotDependencies",{enumerable:!0,get:function(){return du.dotDependencies}}),Object.defineProperty(et,"dotDivideDependencies",{enumerable:!0,get:function(){return Iu.dotDivideDependencies}}),Object.defineProperty(et,"dotMultiplyDependencies",{enumerable:!0,get:function(){return Sl.dotMultiplyDependencies}}),Object.defineProperty(et,"dotPowDependencies",{enumerable:!0,get:function(){return Ko.dotPowDependencies}}),Object.defineProperty(et,"eDependencies",{enumerable:!0,get:function(){return Fl.eDependencies}}),Object.defineProperty(et,"efimovFactorDependencies",{enumerable:!0,get:function(){return gl.efimovFactorDependencies}}),Object.defineProperty(et,"eigsDependencies",{enumerable:!0,get:function(){return Gu.eigsDependencies}}),Object.defineProperty(et,"electricConstantDependencies",{enumerable:!0,get:function(){return Lu.electricConstantDependencies}}),Object.defineProperty(et,"electronMassDependencies",{enumerable:!0,get:function(){return Ku.electronMassDependencies}}),Object.defineProperty(et,"elementaryChargeDependencies",{enumerable:!0,get:function(){return uu.elementaryChargeDependencies}}),Object.defineProperty(et,"equalDependencies",{enumerable:!0,get:function(){return en.equalDependencies}}),Object.defineProperty(et,"equalScalarDependencies",{enumerable:!0,get:function(){return Jr.equalScalarDependencies}}),Object.defineProperty(et,"equalTextDependencies",{enumerable:!0,get:function(){return vn.equalTextDependencies}}),Object.defineProperty(et,"erfDependencies",{enumerable:!0,get:function(){return fn.erfDependencies}}),Object.defineProperty(et,"evaluateDependencies",{enumerable:!0,get:function(){return gn.evaluateDependencies}}),Object.defineProperty(et,"expDependencies",{enumerable:!0,get:function(){return mn.expDependencies}}),Object.defineProperty(et,"expm1Dependencies",{enumerable:!0,get:function(){return ga.expm1Dependencies}}),Object.defineProperty(et,"expmDependencies",{enumerable:!0,get:function(){return ss.expmDependencies}}),Object.defineProperty(et,"factorialDependencies",{enumerable:!0,get:function(){return Ns.factorialDependencies}}),Object.defineProperty(et,"falseDependencies",{enumerable:!0,get:function(){return vs.falseDependencies}}),Object.defineProperty(et,"faradayDependencies",{enumerable:!0,get:function(){return Xs.faradayDependencies}}),Object.defineProperty(et,"fermiCouplingDependencies",{enumerable:!0,get:function(){return co.fermiCouplingDependencies}}),Object.defineProperty(et,"fftDependencies",{enumerable:!0,get:function(){return ls.fftDependencies}}),Object.defineProperty(et,"filterDependencies",{enumerable:!0,get:function(){return Nu.filterDependencies}}),Object.defineProperty(et,"filterTransformDependencies",{enumerable:!0,get:function(){return Ou.filterTransformDependencies}}),Object.defineProperty(et,"fineStructureDependencies",{enumerable:!0,get:function(){return $u.fineStructureDependencies}}),Object.defineProperty(et,"firstRadiationDependencies",{enumerable:!0,get:function(){return Hu.firstRadiationDependencies}}),Object.defineProperty(et,"fixDependencies",{enumerable:!0,get:function(){return kl.fixDependencies}}),Object.defineProperty(et,"flattenDependencies",{enumerable:!0,get:function(){return Uu.flattenDependencies}}),Object.defineProperty(et,"floorDependencies",{enumerable:!0,get:function(){return tl.floorDependencies}}),Object.defineProperty(et,"forEachDependencies",{enumerable:!0,get:function(){return rl.forEachDependencies}}),Object.defineProperty(et,"forEachTransformDependencies",{enumerable:!0,get:function(){return Wu.forEachTransformDependencies}}),Object.defineProperty(et,"formatDependencies",{enumerable:!0,get:function(){return tp.formatDependencies}}),Object.defineProperty(et,"fractionDependencies",{enumerable:!0,get:function(){return Al.fractionDependencies}}),Object.defineProperty(et,"gammaDependencies",{enumerable:!0,get:function(){return wl.gammaDependencies}}),Object.defineProperty(et,"gasConstantDependencies",{enumerable:!0,get:function(){return um.gasConstantDependencies}}),Object.defineProperty(et,"gcdDependencies",{enumerable:!0,get:function(){return Im.gcdDependencies}}),Object.defineProperty(et,"getMatrixDataTypeDependencies",{enumerable:!0,get:function(){return Il.getMatrixDataTypeDependencies}}),Object.defineProperty(et,"gravitationConstantDependencies",{enumerable:!0,get:function(){return sn.gravitationConstantDependencies}}),Object.defineProperty(et,"gravityDependencies",{enumerable:!0,get:function(){return mr.gravityDependencies}}),Object.defineProperty(et,"hartreeEnergyDependencies",{enumerable:!0,get:function(){return fr.hartreeEnergyDependencies}}),Object.defineProperty(et,"hasNumericValueDependencies",{enumerable:!0,get:function(){return yr.hasNumericValueDependencies}}),Object.defineProperty(et,"helpDependencies",{enumerable:!0,get:function(){return jr.helpDependencies}}),Object.defineProperty(et,"hexDependencies",{enumerable:!0,get:function(){return $n.hexDependencies}}),Object.defineProperty(et,"hypotDependencies",{enumerable:!0,get:function(){return Yn.hypotDependencies}}),Object.defineProperty(et,"iDependencies",{enumerable:!0,get:function(){return os.iDependencies}}),Object.defineProperty(et,"identityDependencies",{enumerable:!0,get:function(){return Vs.identityDependencies}}),Object.defineProperty(et,"ifftDependencies",{enumerable:!0,get:function(){return eo.ifftDependencies}}),Object.defineProperty(et,"imDependencies",{enumerable:!0,get:function(){return qo.imDependencies}}),Object.defineProperty(et,"indexDependencies",{enumerable:!0,get:function(){return su.indexDependencies}}),Object.defineProperty(et,"indexTransformDependencies",{enumerable:!0,get:function(){return lu.indexTransformDependencies}}),Object.defineProperty(et,"intersectDependencies",{enumerable:!0,get:function(){return up.intersectDependencies}}),Object.defineProperty(et,"invDependencies",{enumerable:!0,get:function(){return _c.invDependencies}}),Object.defineProperty(et,"inverseConductanceQuantumDependencies",{enumerable:!0,get:function(){return Bl.inverseConductanceQuantumDependencies}}),Object.defineProperty(et,"invmodDependencies",{enumerable:!0,get:function(){return rp.invmodDependencies}}),Object.defineProperty(et,"isIntegerDependencies",{enumerable:!0,get:function(){return Kp.isIntegerDependencies}}),Object.defineProperty(et,"isNaNDependencies",{enumerable:!0,get:function(){return lp.isNaNDependencies}}),Object.defineProperty(et,"isNegativeDependencies",{enumerable:!0,get:function(){return qp.isNegativeDependencies}}),Object.defineProperty(et,"isNumericDependencies",{enumerable:!0,get:function(){return lm.isNumericDependencies}}),Object.defineProperty(et,"isPositiveDependencies",{enumerable:!0,get:function(){return dl.isPositiveDependencies}}),Object.defineProperty(et,"isPrimeDependencies",{enumerable:!0,get:function(){return el.isPrimeDependencies}}),Object.defineProperty(et,"isZeroDependencies",{enumerable:!0,get:function(){return gv.isZeroDependencies}}),Object.defineProperty(et,"kldivergenceDependencies",{enumerable:!0,get:function(){return Vm.kldivergenceDependencies}}),Object.defineProperty(et,"klitzingDependencies",{enumerable:!0,get:function(){return nl.klitzingDependencies}}),Object.defineProperty(et,"kronDependencies",{enumerable:!0,get:function(){return Xo.kronDependencies}}),Object.defineProperty(et,"largerDependencies",{enumerable:!0,get:function(){return Lp.largerDependencies}}),Object.defineProperty(et,"largerEqDependencies",{enumerable:!0,get:function(){return cp.largerEqDependencies}}),Object.defineProperty(et,"lcmDependencies",{enumerable:!0,get:function(){return nv.lcmDependencies}}),Object.defineProperty(et,"leafCountDependencies",{enumerable:!0,get:function(){return Hm.leafCountDependencies}}),Object.defineProperty(et,"leftShiftDependencies",{enumerable:!0,get:function(){return Rv.leftShiftDependencies}}),Object.defineProperty(et,"lgammaDependencies",{enumerable:!0,get:function(){return mm.lgammaDependencies}}),Object.defineProperty(et,"log10Dependencies",{enumerable:!0,get:function(){return uy.log10Dependencies}}),Object.defineProperty(et,"log1pDependencies",{enumerable:!0,get:function(){return Sm.log1pDependencies}}),Object.defineProperty(et,"log2Dependencies",{enumerable:!0,get:function(){return wm.log2Dependencies}}),Object.defineProperty(et,"logDependencies",{enumerable:!0,get:function(){return Wm.logDependencies}}),Object.defineProperty(et,"loschmidtDependencies",{enumerable:!0,get:function(){return tm.loschmidtDependencies}}),Object.defineProperty(et,"lsolveAllDependencies",{enumerable:!0,get:function(){return _d.lsolveAllDependencies}}),Object.defineProperty(et,"lsolveDependencies",{enumerable:!0,get:function(){return iv.lsolveDependencies}}),Object.defineProperty(et,"lupDependencies",{enumerable:!0,get:function(){return Xm.lupDependencies}}),Object.defineProperty(et,"lusolveDependencies",{enumerable:!0,get:function(){return Cl.lusolveDependencies}}),Object.defineProperty(et,"madDependencies",{enumerable:!0,get:function(){return Cy.madDependencies}}),Object.defineProperty(et,"magneticConstantDependencies",{enumerable:!0,get:function(){return zv.magneticConstantDependencies}}),Object.defineProperty(et,"magneticFluxQuantumDependencies",{enumerable:!0,get:function(){return Fp.magneticFluxQuantumDependencies}}),Object.defineProperty(et,"mapDependencies",{enumerable:!0,get:function(){return Tm.mapDependencies}}),Object.defineProperty(et,"mapTransformDependencies",{enumerable:!0,get:function(){return yv.mapTransformDependencies}}),Object.defineProperty(et,"matrixDependencies",{enumerable:!0,get:function(){return _l.matrixDependencies}}),Object.defineProperty(et,"matrixFromColumnsDependencies",{enumerable:!0,get:function(){return Zp.matrixFromColumnsDependencies}}),Object.defineProperty(et,"matrixFromFunctionDependencies",{enumerable:!0,get:function(){return Xp.matrixFromFunctionDependencies}}),Object.defineProperty(et,"matrixFromRowsDependencies",{enumerable:!0,get:function(){return np.matrixFromRowsDependencies}}),Object.defineProperty(et,"maxDependencies",{enumerable:!0,get:function(){return Rm.maxDependencies}}),Object.defineProperty(et,"maxTransformDependencies",{enumerable:!0,get:function(){return _0.maxTransformDependencies}}),Object.defineProperty(et,"meanDependencies",{enumerable:!0,get:function(){return bv.meanDependencies}}),Object.defineProperty(et,"meanTransformDependencies",{enumerable:!0,get:function(){return Cr.meanTransformDependencies}}),Object.defineProperty(et,"medianDependencies",{enumerable:!0,get:function(){return ir.medianDependencies}}),Object.defineProperty(et,"minDependencies",{enumerable:!0,get:function(){return nr.minDependencies}}),Object.defineProperty(et,"minTransformDependencies",{enumerable:!0,get:function(){return dr.minTransformDependencies}}),Object.defineProperty(et,"modDependencies",{enumerable:!0,get:function(){return Pr.modDependencies}}),Object.defineProperty(et,"modeDependencies",{enumerable:!0,get:function(){return Hr.modeDependencies}}),Object.defineProperty(et,"molarMassC12Dependencies",{enumerable:!0,get:function(){return Pn.molarMassC12Dependencies}}),Object.defineProperty(et,"molarMassDependencies",{enumerable:!0,get:function(){return bn.molarMassDependencies}}),Object.defineProperty(et,"molarPlanckConstantDependencies",{enumerable:!0,get:function(){return Wn.molarPlanckConstantDependencies}}),Object.defineProperty(et,"molarVolumeDependencies",{enumerable:!0,get:function(){return ms.molarVolumeDependencies}}),Object.defineProperty(et,"multinomialDependencies",{enumerable:!0,get:function(){return Es.multinomialDependencies}}),Object.defineProperty(et,"multiplyDependencies",{enumerable:!0,get:function(){return ao.multiplyDependencies}}),Object.defineProperty(et,"multiplyScalarDependencies",{enumerable:!0,get:function(){return Js.multiplyScalarDependencies}}),Object.defineProperty(et,"neutronMassDependencies",{enumerable:!0,get:function(){return So.neutronMassDependencies}}),Object.defineProperty(et,"normDependencies",{enumerable:!0,get:function(){return Zo.normDependencies}}),Object.defineProperty(et,"notDependencies",{enumerable:!0,get:function(){return au.notDependencies}}),Object.defineProperty(et,"nthRootDependencies",{enumerable:!0,get:function(){return ou.nthRootDependencies}}),Object.defineProperty(et,"nthRootsDependencies",{enumerable:!0,get:function(){return Yo.nthRootsDependencies}}),Object.defineProperty(et,"nuclearMagnetonDependencies",{enumerable:!0,get:function(){return Ru.nuclearMagnetonDependencies}}),Object.defineProperty(et,"nullDependencies",{enumerable:!0,get:function(){return ku.nullDependencies}}),Object.defineProperty(et,"numberDependencies",{enumerable:!0,get:function(){return Vu.numberDependencies}}),Object.defineProperty(et,"numericDependencies",{enumerable:!0,get:function(){return sl.numericDependencies}}),Object.defineProperty(et,"octDependencies",{enumerable:!0,get:function(){return fu.octDependencies}}),Object.defineProperty(et,"onesDependencies",{enumerable:!0,get:function(){return Vo.onesDependencies}}),Object.defineProperty(et,"orDependencies",{enumerable:!0,get:function(){return zl.orDependencies}}),Object.defineProperty(et,"parseDependencies",{enumerable:!0,get:function(){return Dl.parseDependencies}}),Object.defineProperty(et,"parserDependencies",{enumerable:!0,get:function(){return dp.parserDependencies}}),Object.defineProperty(et,"partitionSelectDependencies",{enumerable:!0,get:function(){return cm.partitionSelectDependencies}}),Object.defineProperty(et,"permutationsDependencies",{enumerable:!0,get:function(){return Rl.permutationsDependencies}}),Object.defineProperty(et,"phiDependencies",{enumerable:!0,get:function(){return hl.phiDependencies}}),Object.defineProperty(et,"piDependencies",{enumerable:!0,get:function(){return hp.piDependencies}}),Object.defineProperty(et,"pickRandomDependencies",{enumerable:!0,get:function(){return Cp.pickRandomDependencies}}),Object.defineProperty(et,"pinvDependencies",{enumerable:!0,get:function(){return il.pinvDependencies}}),Object.defineProperty(et,"planckChargeDependencies",{enumerable:!0,get:function(){return Jp.planckChargeDependencies}}),Object.defineProperty(et,"planckConstantDependencies",{enumerable:!0,get:function(){return fp.planckConstantDependencies}}),Object.defineProperty(et,"planckLengthDependencies",{enumerable:!0,get:function(){return Jy.planckLengthDependencies}}),Object.defineProperty(et,"planckMassDependencies",{enumerable:!0,get:function(){return ip.planckMassDependencies}}),Object.defineProperty(et,"planckTemperatureDependencies",{enumerable:!0,get:function(){return Bs.planckTemperatureDependencies}}),Object.defineProperty(et,"planckTimeDependencies",{enumerable:!0,get:function(){return Do.planckTimeDependencies}}),Object.defineProperty(et,"powDependencies",{enumerable:!0,get:function(){return fo.powDependencies}}),Object.defineProperty(et,"printDependencies",{enumerable:!0,get:function(){return bu.printDependencies}}),Object.defineProperty(et,"prodDependencies",{enumerable:!0,get:function(){return Qu.prodDependencies}}),Object.defineProperty(et,"protonMassDependencies",{enumerable:!0,get:function(){return jl.protonMassDependencies}}),Object.defineProperty(et,"qrDependencies",{enumerable:!0,get:function(){return Yp.qrDependencies}}),Object.defineProperty(et,"quantileSeqDependencies",{enumerable:!0,get:function(){return _h.quantileSeqDependencies}}),Object.defineProperty(et,"quantumOfCirculationDependencies",{enumerable:!0,get:function(){return Pm.quantumOfCirculationDependencies}}),Object.defineProperty(et,"randomDependencies",{enumerable:!0,get:function(){return Lm.randomDependencies}}),Object.defineProperty(et,"randomIntDependencies",{enumerable:!0,get:function(){return _v.randomIntDependencies}}),Object.defineProperty(et,"rangeDependencies",{enumerable:!0,get:function(){return gp.rangeDependencies}}),Object.defineProperty(et,"rangeTransformDependencies",{enumerable:!0,get:function(){return ly.rangeTransformDependencies}}),Object.defineProperty(et,"rationalizeDependencies",{enumerable:!0,get:function(){return Dy.rationalizeDependencies}}),Object.defineProperty(et,"reDependencies",{enumerable:!0,get:function(){return Zu.reDependencies}}),Object.defineProperty(et,"reducedPlanckConstantDependencies",{enumerable:!0,get:function(){return N_.reducedPlanckConstantDependencies}}),Object.defineProperty(et,"replacerDependencies",{enumerable:!0,get:function(){return cy.replacerDependencies}}),Object.defineProperty(et,"reshapeDependencies",{enumerable:!0,get:function(){return Pv.reshapeDependencies}}),Object.defineProperty(et,"resizeDependencies",{enumerable:!0,get:function(){return vp.resizeDependencies}}),Object.defineProperty(et,"resolveDependencies",{enumerable:!0,get:function(){return Fu.resolveDependencies}}),Object.defineProperty(et,"reviverDependencies",{enumerable:!0,get:function(){return Nv.reviverDependencies}}),Object.defineProperty(et,"rightArithShiftDependencies",{enumerable:!0,get:function(){return av.rightArithShiftDependencies}}),Object.defineProperty(et,"rightLogShiftDependencies",{enumerable:!0,get:function(){return Gy.rightLogShiftDependencies}}),Object.defineProperty(et,"rotateDependencies",{enumerable:!0,get:function(){return My.rotateDependencies}}),Object.defineProperty(et,"rotationMatrixDependencies",{enumerable:!0,get:function(){return $0.rotationMatrixDependencies}}),Object.defineProperty(et,"roundDependencies",{enumerable:!0,get:function(){return Iy.roundDependencies}}),Object.defineProperty(et,"rowDependencies",{enumerable:!0,get:function(){return Ym.rowDependencies}}),Object.defineProperty(et,"rowTransformDependencies",{enumerable:!0,get:function(){return yp.rowTransformDependencies}}),Object.defineProperty(et,"rydbergDependencies",{enumerable:!0,get:function(){return pp.rydbergDependencies}}),Object.defineProperty(et,"sackurTetrodeDependencies",{enumerable:!0,get:function(){return l_.sackurTetrodeDependencies}}),Object.defineProperty(et,"secDependencies",{enumerable:!0,get:function(){return e0.secDependencies}}),Object.defineProperty(et,"sechDependencies",{enumerable:!0,get:function(){return Vv.sechDependencies}}),Object.defineProperty(et,"secondRadiationDependencies",{enumerable:!0,get:function(){return dy.secondRadiationDependencies}}),Object.defineProperty(et,"setCartesianDependencies",{enumerable:!0,get:function(){return hy.setCartesianDependencies}}),Object.defineProperty(et,"setDifferenceDependencies",{enumerable:!0,get:function(){return Jv.setDifferenceDependencies}}),Object.defineProperty(et,"setDistinctDependencies",{enumerable:!0,get:function(){return Jn.setDistinctDependencies}}),Object.defineProperty(et,"setIntersectDependencies",{enumerable:!0,get:function(){return Ql.setIntersectDependencies}}),Object.defineProperty(et,"setIsSubsetDependencies",{enumerable:!0,get:function(){return fy.setIsSubsetDependencies}}),Object.defineProperty(et,"setMultiplicityDependencies",{enumerable:!0,get:function(){return U0.setMultiplicityDependencies}}),Object.defineProperty(et,"setPowersetDependencies",{enumerable:!0,get:function(){return Pl.setPowersetDependencies}}),Object.defineProperty(et,"setSizeDependencies",{enumerable:!0,get:function(){return gm.setSizeDependencies}}),Object.defineProperty(et,"setSymDifferenceDependencies",{enumerable:!0,get:function(){return z0.setSymDifferenceDependencies}}),Object.defineProperty(et,"setUnionDependencies",{enumerable:!0,get:function(){return G0.setUnionDependencies}}),Object.defineProperty(et,"signDependencies",{enumerable:!0,get:function(){return Nm.signDependencies}}),Object.defineProperty(et,"simplifyCoreDependencies",{enumerable:!0,get:function(){return kv.simplifyCoreDependencies}}),Object.defineProperty(et,"simplifyDependencies",{enumerable:!0,get:function(){return x0.simplifyDependencies}}),Object.defineProperty(et,"sinDependencies",{enumerable:!0,get:function(){return $l.sinDependencies}}),Object.defineProperty(et,"sinhDependencies",{enumerable:!0,get:function(){return sv.sinhDependencies}}),Object.defineProperty(et,"sizeDependencies",{enumerable:!0,get:function(){return wp.sizeDependencies}}),Object.defineProperty(et,"sluDependencies",{enumerable:!0,get:function(){return yl.sluDependencies}}),Object.defineProperty(et,"smallerDependencies",{enumerable:!0,get:function(){return Tp.smallerDependencies}}),Object.defineProperty(et,"smallerEqDependencies",{enumerable:!0,get:function(){return Hv.smallerEqDependencies}}),Object.defineProperty(et,"sortDependencies",{enumerable:!0,get:function(){return vm.sortDependencies}}),Object.defineProperty(et,"sparseDependencies",{enumerable:!0,get:function(){return V0.sparseDependencies}}),Object.defineProperty(et,"speedOfLightDependencies",{enumerable:!0,get:function(){return Sv.speedOfLightDependencies}}),Object.defineProperty(et,"splitUnitDependencies",{enumerable:!0,get:function(){return c_.splitUnitDependencies}}),Object.defineProperty(et,"sqrtDependencies",{enumerable:!0,get:function(){return ey.sqrtDependencies}}),Object.defineProperty(et,"sqrtmDependencies",{enumerable:!0,get:function(){return py.sqrtmDependencies}}),Object.defineProperty(et,"squareDependencies",{enumerable:!0,get:function(){return Tr.squareDependencies}}),Object.defineProperty(et,"squeezeDependencies",{enumerable:!0,get:function(){return br.squeezeDependencies}}),Object.defineProperty(et,"stdDependencies",{enumerable:!0,get:function(){return zr.stdDependencies}}),Object.defineProperty(et,"stdTransformDependencies",{enumerable:!0,get:function(){return $r.stdTransformDependencies}}),Object.defineProperty(et,"stefanBoltzmannDependencies",{enumerable:!0,get:function(){return an.stefanBoltzmannDependencies}}),Object.defineProperty(et,"stirlingS2Dependencies",{enumerable:!0,get:function(){return yn.stirlingS2Dependencies}}),Object.defineProperty(et,"stringDependencies",{enumerable:!0,get:function(){return as.stringDependencies}}),Object.defineProperty(et,"subsetDependencies",{enumerable:!0,get:function(){return hs.subsetDependencies}}),Object.defineProperty(et,"subsetTransformDependencies",{enumerable:!0,get:function(){return ys.subsetTransformDependencies}}),Object.defineProperty(et,"subtractDependencies",{enumerable:!0,get:function(){return Ss.subtractDependencies}}),Object.defineProperty(et,"sumDependencies",{enumerable:!0,get:function(){return zs.sumDependencies}}),Object.defineProperty(et,"sumTransformDependencies",{enumerable:!0,get:function(){return wo.sumTransformDependencies}}),Object.defineProperty(et,"symbolicEqualDependencies",{enumerable:!0,get:function(){return ko.symbolicEqualDependencies}}),Object.defineProperty(et,"tanDependencies",{enumerable:!0,get:function(){return Xu.tanDependencies}}),Object.defineProperty(et,"tanhDependencies",{enumerable:!0,get:function(){return Ju.tanhDependencies}}),Object.defineProperty(et,"tauDependencies",{enumerable:!0,get:function(){return jp.tauDependencies}}),Object.defineProperty(et,"thomsonCrossSectionDependencies",{enumerable:!0,get:function(){return wv.thomsonCrossSectionDependencies}}),Object.defineProperty(et,"toDependencies",{enumerable:!0,get:function(){return Vy.toDependencies}}),Object.defineProperty(et,"traceDependencies",{enumerable:!0,get:function(){return S0.traceDependencies}}),Object.defineProperty(et,"transposeDependencies",{enumerable:!0,get:function(){return Tv.transposeDependencies}}),Object.defineProperty(et,"trueDependencies",{enumerable:!0,get:function(){return Fm.trueDependencies}}),Object.defineProperty(et,"typeOfDependencies",{enumerable:!0,get:function(){return w0.typeOfDependencies}}),Object.defineProperty(et,"typedDependencies",{enumerable:!0,get:function(){return qv.typedDependencies}}),Object.defineProperty(et,"unaryMinusDependencies",{enumerable:!0,get:function(){return bp.unaryMinusDependencies}}),Object.defineProperty(et,"unaryPlusDependencies",{enumerable:!0,get:function(){return T0.unaryPlusDependencies}}),Object.defineProperty(et,"unequalDependencies",{enumerable:!0,get:function(){return Bm.unequalDependencies}}),Object.defineProperty(et,"unitDependencies",{enumerable:!0,get:function(){return jx.unitDependencies}}),Object.defineProperty(et,"usolveAllDependencies",{enumerable:!0,get:function(){return k_.usolveAllDependencies}}),Object.defineProperty(et,"usolveDependencies",{enumerable:!0,get:function(){return ux.usolveDependencies}}),Object.defineProperty(et,"vacuumImpedanceDependencies",{enumerable:!0,get:function(){return i1.vacuumImpedanceDependencies}}),Object.defineProperty(et,"varianceDependencies",{enumerable:!0,get:function(){return lx.varianceDependencies}}),Object.defineProperty(et,"varianceTransformDependencies",{enumerable:!0,get:function(){return cx.varianceTransformDependencies}}),Object.defineProperty(et,"versionDependencies",{enumerable:!0,get:function(){return dx.versionDependencies}}),Object.defineProperty(et,"weakMixingAngleDependencies",{enumerable:!0,get:function(){return O_.weakMixingAngleDependencies}}),Object.defineProperty(et,"wienDisplacementDependencies",{enumerable:!0,get:function(){return Hy.wienDisplacementDependencies}}),Object.defineProperty(et,"xgcdDependencies",{enumerable:!0,get:function(){return Ev.xgcdDependencies}}),Object.defineProperty(et,"xorDependencies",{enumerable:!0,get:function(){return Ry.xorDependencies}}),Object.defineProperty(et,"zerosDependencies",{enumerable:!0,get:function(){return fl.zerosDependencies}});var _e=requireDependenciesAbs_generated(),tt=requireDependenciesAccessorNode_generated(),rt=requireDependenciesAcos_generated(),nt=requireDependenciesAcosh_generated(),st=requireDependenciesAcot_generated(),dt=requireDependenciesAcoth_generated(),ft=requireDependenciesAcsc_generated(),ht=requireDependenciesAcsch_generated(),mt=requireDependenciesAdd_generated(),bt=requireDependenciesAddScalar_generated(),St=requireDependenciesAnd_generated(),Et=requireDependenciesApply_generated(),Ct=requireDependenciesApplyTransform_generated(),Rt=requireDependenciesArg_generated(),Tt=requireDependenciesArrayNode_generated(),wt=requireDependenciesAsec_generated(),At=requireDependenciesAsech_generated(),Nt=requireDependenciesAsin_generated(),Pt=requireDependenciesAsinh_generated(),It=requireDependenciesAssignmentNode_generated(),Ft=requireDependenciesAtan_generated(),qt=requireDependenciesAtan2_generated(),Vt=requireDependenciesAtanh_generated(),Kt=requireDependenciesAtomicMass_generated(),jt=requireDependenciesAvogadro_generated(),Ut=requireDependenciesBellNumbers_generated(),Ot=requireDependenciesBigNumberClass_generated(),Wt=requireDependenciesBignumber_generated(),Bt=requireDependenciesBin_generated(),tr=requireDependenciesBitAnd_generated(),Jt=requireDependenciesBitNot_generated(),ar=requireDependenciesBitOr_generated(),pr=requireDependenciesBitXor_generated(),cr=requireDependenciesBlockNode_generated(),gr=requireDependenciesBohrMagneton_generated(),Sr=requireDependenciesBohrRadius_generated(),Er=requireDependenciesBoltzmann_generated(),Vr=requireDependenciesBoolean_generated(),Wr=requireDependenciesCatalan_generated(),Mr=requireDependenciesCbrt_generated(),Nr=requireDependenciesCeil_generated(),Yr=requireDependenciesChain_generated(),Or=requireDependenciesChainClass_generated(),Ar=requireDependenciesClassicalElectronRadius_generated(),Qr=requireDependenciesClone_generated(),hn=requireDependenciesColumn_generated(),Sn=requireDependenciesColumnTransform_generated(),Kr=requireDependenciesCombinations_generated(),Hn=requireDependenciesCombinationsWithRep_generated(),ln=requireDependenciesCompare_generated(),kn=requireDependenciesCompareNatural_generated(),xn=requireDependenciesCompareText_generated(),An=requireDependenciesCompile_generated(),rs=requireDependenciesComplex_generated(),qs=requireDependenciesComplexClass_generated(),Ln=requireDependenciesComposition_generated(),Cn=requireDependenciesConcat_generated(),Nn=requireDependenciesConcatTransform_generated(),Gr=requireDependenciesConditionalNode_generated(),tn=requireDependenciesConductanceQuantum_generated(),dn=requireDependenciesConj_generated(),Rn=requireDependenciesConstantNode_generated(),wn=requireDependenciesCos_generated(),Un=requireDependenciesCosh_generated(),Zn=requireDependenciesCot_generated(),pn=requireDependenciesCoth_generated(),Dn=requireDependenciesCoulomb_generated(),qn=requireDependenciesCount_generated(),_a=requireDependenciesCreateUnit_generated(),Vn=requireDependenciesCross_generated(),bs=requireDependenciesCsc_generated(),Is=requireDependenciesCsch_generated(),uo=requireDependenciesCtranspose_generated(),Rs=requireDependenciesCube_generated(),io=requireDependenciesCumSum_generated(),vo=requireDependenciesCumSumTransform_generated(),Bo=requireDependenciesDeepEqual_generated(),En=requireDependenciesDenseMatrixClass_generated(),In=requireDependenciesDerivative_generated(),ds=requireDependenciesDet_generated(),Ps=requireDependenciesDeuteronMass_generated(),yo=requireDependenciesDiag_generated(),rn=requireDependenciesDiff_generated(),es=requireDependenciesDiffTransform_generated(),Gs=requireDependenciesDistance_generated(),Ro=requireDependenciesDivide_generated(),ru=requireDependenciesDivideScalar_generated(),du=requireDependenciesDot_generated(),Iu=requireDependenciesDotDivide_generated(),Sl=requireDependenciesDotMultiply_generated(),Ko=requireDependenciesDotPow_generated(),Fl=requireDependenciesE_generated(),gl=requireDependenciesEfimovFactor_generated(),Gu=requireDependenciesEigs_generated(),Lu=requireDependenciesElectricConstant_generated(),Ku=requireDependenciesElectronMass_generated(),uu=requireDependenciesElementaryCharge_generated(),en=requireDependenciesEqual_generated(),Jr=requireDependenciesEqualScalar_generated(),vn=requireDependenciesEqualText_generated(),fn=requireDependenciesErf_generated(),gn=requireDependenciesEvaluate_generated(),mn=requireDependenciesExp_generated(),ss=requireDependenciesExpm_generated(),ga=requireDependenciesExpm1_generated(),Ns=requireDependenciesFactorial_generated(),vs=requireDependenciesFalse_generated(),Xs=requireDependenciesFaraday_generated(),co=requireDependenciesFermiCoupling_generated(),ls=requireDependenciesFft_generated(),Mo=requireDependenciesFibonacciHeapClass_generated(),Nu=requireDependenciesFilter_generated(),Ou=requireDependenciesFilterTransform_generated(),$u=requireDependenciesFineStructure_generated(),Hu=requireDependenciesFirstRadiation_generated(),kl=requireDependenciesFix_generated(),Uu=requireDependenciesFlatten_generated(),tl=requireDependenciesFloor_generated(),rl=requireDependenciesForEach_generated(),Wu=requireDependenciesForEachTransform_generated(),tp=requireDependenciesFormat_generated(),Al=requireDependenciesFraction_generated(),om=requireDependenciesFractionClass_generated(),Op=requireDependenciesFunctionAssignmentNode_generated(),op=requireDependenciesFunctionNode_generated(),wl=requireDependenciesGamma_generated(),um=requireDependenciesGasConstant_generated(),Im=requireDependenciesGcd_generated(),Il=requireDependenciesGetMatrixDataType_generated(),sn=requireDependenciesGravitationConstant_generated(),mr=requireDependenciesGravity_generated(),fr=requireDependenciesHartreeEnergy_generated(),yr=requireDependenciesHasNumericValue_generated(),jr=requireDependenciesHelp_generated(),un=requireDependenciesHelpClass_generated(),$n=requireDependenciesHex_generated(),Yn=requireDependenciesHypot_generated(),os=requireDependenciesI_generated(),Vs=requireDependenciesIdentity_generated(),eo=requireDependenciesIfft_generated(),qo=requireDependenciesIm_generated(),Po=requireDependenciesImmutableDenseMatrixClass_generated(),su=requireDependenciesIndex_generated(),mu=requireDependenciesIndexClass_generated(),zu=requireDependenciesIndexNode_generated(),lu=requireDependenciesIndexTransform_generated(),vl=requireDependenciesInfinity_generated(),up=requireDependenciesIntersect_generated(),_c=requireDependenciesInv_generated(),Bl=requireDependenciesInverseConductanceQuantum_generated(),rp=requireDependenciesInvmod_generated(),Kp=requireDependenciesIsInteger_generated(),lp=requireDependenciesIsNaN_generated(),qp=requireDependenciesIsNegative_generated(),lm=requireDependenciesIsNumeric_generated(),dl=requireDependenciesIsPositive_generated(),el=requireDependenciesIsPrime_generated(),gv=requireDependenciesIsZero_generated(),Vm=requireDependenciesKldivergence_generated(),nl=requireDependenciesKlitzing_generated(),Xo=requireDependenciesKron_generated(),xm=requireDependenciesLN10_generated(),nm=requireDependenciesLN2_generated(),vv=requireDependenciesLOG10E_generated(),rv=requireDependenciesLOG2E_generated(),Lp=requireDependenciesLarger_generated(),cp=requireDependenciesLargerEq_generated(),nv=requireDependenciesLcm_generated(),Hm=requireDependenciesLeafCount_generated(),Rv=requireDependenciesLeftShift_generated(),mm=requireDependenciesLgamma_generated(),Wm=requireDependenciesLog_generated(),uy=requireDependenciesLog10_generated(),Sm=requireDependenciesLog1p_generated(),wm=requireDependenciesLog2_generated(),tm=requireDependenciesLoschmidt_generated(),iv=requireDependenciesLsolve_generated(),_d=requireDependenciesLsolveAll_generated(),Xm=requireDependenciesLup_generated(),Cl=requireDependenciesLusolve_generated(),Cy=requireDependenciesMad_generated(),zv=requireDependenciesMagneticConstant_generated(),Fp=requireDependenciesMagneticFluxQuantum_generated(),Tm=requireDependenciesMap_generated(),yv=requireDependenciesMapTransform_generated(),_l=requireDependenciesMatrix_generated(),Wp=requireDependenciesMatrixClass_generated(),Zp=requireDependenciesMatrixFromColumns_generated(),Xp=requireDependenciesMatrixFromFunction_generated(),np=requireDependenciesMatrixFromRows_generated(),Rm=requireDependenciesMax_generated(),_0=requireDependenciesMaxTransform_generated(),bv=requireDependenciesMean_generated(),Cr=requireDependenciesMeanTransform_generated(),ir=requireDependenciesMedian_generated(),nr=requireDependenciesMin_generated(),dr=requireDependenciesMinTransform_generated(),Pr=requireDependenciesMod_generated(),Hr=requireDependenciesMode_generated(),bn=requireDependenciesMolarMass_generated(),Pn=requireDependenciesMolarMassC12_generated(),Wn=requireDependenciesMolarPlanckConstant_generated(),ms=requireDependenciesMolarVolume_generated(),Es=requireDependenciesMultinomial_generated(),ao=requireDependenciesMultiply_generated(),Js=requireDependenciesMultiplyScalar_generated(),po=requireDependenciesNaN_generated(),So=requireDependenciesNeutronMass_generated(),$o=requireDependenciesNode_generated(),Zo=requireDependenciesNorm_generated(),au=requireDependenciesNot_generated(),ou=requireDependenciesNthRoot_generated(),Yo=requireDependenciesNthRoots_generated(),Ru=requireDependenciesNuclearMagneton_generated(),ku=requireDependenciesNull_generated(),Vu=requireDependenciesNumber_generated(),sl=requireDependenciesNumeric_generated(),nu=requireDependenciesObjectNode_generated(),fu=requireDependenciesOct_generated(),Vo=requireDependenciesOnes_generated(),ll=requireDependenciesOperatorNode_generated(),zl=requireDependenciesOr_generated(),Gl=requireDependenciesParenthesisNode_generated(),Dl=requireDependenciesParse_generated(),dp=requireDependenciesParser_generated(),Bp=requireDependenciesParserClass_generated(),cm=requireDependenciesPartitionSelect_generated(),Rl=requireDependenciesPermutations_generated(),hl=requireDependenciesPhi_generated(),hp=requireDependenciesPi_generated(),Cp=requireDependenciesPickRandom_generated(),il=requireDependenciesPinv_generated(),Jp=requireDependenciesPlanckCharge_generated(),fp=requireDependenciesPlanckConstant_generated(),Jy=requireDependenciesPlanckLength_generated(),ip=requireDependenciesPlanckMass_generated(),Bs=requireDependenciesPlanckTemperature_generated(),Do=requireDependenciesPlanckTime_generated(),fo=requireDependenciesPow_generated(),bu=requireDependenciesPrint_generated(),Qu=requireDependenciesProd_generated(),jl=requireDependenciesProtonMass_generated(),Yp=requireDependenciesQr_generated(),_h=requireDependenciesQuantileSeq_generated(),Pm=requireDependenciesQuantumOfCirculation_generated(),Lm=requireDependenciesRandom_generated(),_v=requireDependenciesRandomInt_generated(),gp=requireDependenciesRange_generated(),o_=requireDependenciesRangeClass_generated(),Gv=requireDependenciesRangeNode_generated(),ly=requireDependenciesRangeTransform_generated(),Dy=requireDependenciesRationalize_generated(),Zu=requireDependenciesRe_generated(),N_=requireDependenciesReducedPlanckConstant_generated(),u_=requireDependenciesRelationalNode_generated(),cy=requireDependenciesReplacer_generated(),Pv=requireDependenciesReshape_generated(),vp=requireDependenciesResize_generated(),Fu=requireDependenciesResolve_generated(),Zv=requireDependenciesResultSet_generated(),Nv=requireDependenciesReviver_generated(),av=requireDependenciesRightArithShift_generated(),Gy=requireDependenciesRightLogShift_generated(),My=requireDependenciesRotate_generated(),$0=requireDependenciesRotationMatrix_generated(),Iy=requireDependenciesRound_generated(),Ym=requireDependenciesRow_generated(),yp=requireDependenciesRowTransform_generated(),pp=requireDependenciesRydberg_generated(),xv=requireDependenciesSQRT1_2_generated(),Yl=requireDependenciesSQRT2_generated(),l_=requireDependenciesSackurTetrode_generated(),e0=requireDependenciesSec_generated(),Vv=requireDependenciesSech_generated(),dy=requireDependenciesSecondRadiation_generated(),hy=requireDependenciesSetCartesian_generated(),Jv=requireDependenciesSetDifference_generated(),Jn=requireDependenciesSetDistinct_generated(),Ql=requireDependenciesSetIntersect_generated(),fy=requireDependenciesSetIsSubset_generated(),U0=requireDependenciesSetMultiplicity_generated(),Pl=requireDependenciesSetPowerset_generated(),gm=requireDependenciesSetSize_generated(),z0=requireDependenciesSetSymDifference_generated(),G0=requireDependenciesSetUnion_generated(),Nm=requireDependenciesSign_generated(),x0=requireDependenciesSimplify_generated(),kv=requireDependenciesSimplifyCore_generated(),$l=requireDependenciesSin_generated(),sv=requireDependenciesSinh_generated(),wp=requireDependenciesSize_generated(),yl=requireDependenciesSlu_generated(),Tp=requireDependenciesSmaller_generated(),Hv=requireDependenciesSmallerEq_generated(),vm=requireDependenciesSort_generated(),Qm=requireDependenciesSpaClass_generated(),V0=requireDependenciesSparse_generated(),Ov=requireDependenciesSparseMatrixClass_generated(),Sv=requireDependenciesSpeedOfLight_generated(),c_=requireDependenciesSplitUnit_generated(),ey=requireDependenciesSqrt_generated(),py=requireDependenciesSqrtm_generated(),Tr=requireDependenciesSquare_generated(),br=requireDependenciesSqueeze_generated(),zr=requireDependenciesStd_generated(),$r=requireDependenciesStdTransform_generated(),an=requireDependenciesStefanBoltzmann_generated(),yn=requireDependenciesStirlingS2_generated(),as=requireDependenciesString_generated(),hs=requireDependenciesSubset_generated(),ys=requireDependenciesSubsetTransform_generated(),Ss=requireDependenciesSubtract_generated(),zs=requireDependenciesSum_generated(),wo=requireDependenciesSumTransform_generated(),hu=requireDependenciesSymbolNode_generated(),ko=requireDependenciesSymbolicEqual_generated(),Xu=requireDependenciesTan_generated(),Ju=requireDependenciesTanh_generated(),jp=requireDependenciesTau_generated(),wv=requireDependenciesThomsonCrossSection_generated(),Vy=requireDependenciesTo_generated(),S0=requireDependenciesTrace_generated(),Tv=requireDependenciesTranspose_generated(),Fm=requireDependenciesTrue_generated(),w0=requireDependenciesTypeOf_generated(),qv=requireDependenciesTyped_generated(),bp=requireDependenciesUnaryMinus_generated(),T0=requireDependenciesUnaryPlus_generated(),Bm=requireDependenciesUnequal_generated(),H0=requireDependenciesUnitClass_generated(),jx=requireDependenciesUnitFunction_generated(),am=requireDependenciesUppercaseE_generated(),_p=requireDependenciesUppercasePi_generated(),ux=requireDependenciesUsolve_generated(),k_=requireDependenciesUsolveAll_generated(),i1=requireDependenciesVacuumImpedance_generated(),lx=requireDependenciesVariance_generated(),cx=requireDependenciesVarianceTransform_generated(),dx=requireDependenciesVersion_generated(),O_=requireDependenciesWeakMixingAngle_generated(),Hy=requireDependenciesWienDisplacement_generated(),Ev=requireDependenciesXgcd_generated(),Ry=requireDependenciesXor_generated(),fl=requireDependenciesZeros_generated(),t0=requireAllFactoriesAny()})(dependenciesAny_generated)),dependenciesAny_generated}var create={},polyfills={},hasRequiredPolyfills;function requirePolyfills(){return hasRequiredPolyfills||(hasRequiredPolyfills=1,Number.isFinite=Number.isFinite||function(et){return typeof et=="number"&&isFinite(et)},Number.isNaN=Number.isNaN||function(et){return et!==et}),polyfills}var emitter={},tinyEmitter={exports:{}},hasRequiredTinyEmitter;function requireTinyEmitter(){if(hasRequiredTinyEmitter)return tinyEmitter.exports;hasRequiredTinyEmitter=1;function et(){}return et.prototype={on:function(_e,tt,rt){var nt=this.e||(this.e={});return(nt[_e]||(nt[_e]=[])).push({fn:tt,ctx:rt}),this},once:function(_e,tt,rt){var nt=this;function st(){nt.off(_e,st),tt.apply(rt,arguments)}return st._=tt,this.on(_e,st,rt)},emit:function(_e){var tt=[].slice.call(arguments,1),rt=((this.e||(this.e={}))[_e]||[]).slice(),nt=0,st=rt.length;for(nt;nt<st;nt++)rt[nt].fn.apply(rt[nt].ctx,tt);return this},off:function(_e,tt){var rt=this.e||(this.e={}),nt=rt[_e],st=[];if(nt&&tt)for(var dt=0,ft=nt.length;dt<ft;dt++)nt[dt].fn!==tt&&nt[dt].fn._!==tt&&st.push(nt[dt]);return st.length?rt[_e]=st:delete rt[_e],this}},tinyEmitter.exports=et,tinyEmitter.exports.TinyEmitter=et,tinyEmitter.exports}var hasRequiredEmitter;function requireEmitter(){if(hasRequiredEmitter)return emitter;hasRequiredEmitter=1;var et=requireInteropRequireDefault();Object.defineProperty(emitter,"__esModule",{value:!0}),emitter.mixin=tt;var _e=et(requireTinyEmitter());function tt(rt){var nt=new _e.default;return rt.on=nt.on.bind(nt),rt.off=nt.off.bind(nt),rt.once=nt.once.bind(nt),rt.emit=nt.emit.bind(nt),rt}return emitter}var _import={},hasRequired_import;function require_import(){if(hasRequired_import)return _import;hasRequired_import=1;var et=requireInteropRequireDefault();Object.defineProperty(_import,"__esModule",{value:!0}),_import.importFactory=ht;var _e=et(requireDefineProperty()),tt=et(require_typeof()),rt=requireIs(),nt=requireFactory(),st=requireObject(),dt=requireArray(),ft=requireArgumentsError();function ht(mt,bt,St,Et){function Ct(Ut,Ot){var Wt=arguments.length;if(Wt!==1&&Wt!==2)throw new ft.ArgumentsError("import",Wt,1,2);Ot||(Ot={});function Bt(pr,cr,gr){if(Array.isArray(cr))cr.forEach(function(Vr){return Bt(pr,Vr)});else if((0,tt.default)(cr)==="object")for(var Sr in cr)(0,st.hasOwnProperty)(cr,Sr)&&Bt(pr,cr[Sr],Sr);else if((0,nt.isFactory)(cr)||gr!==void 0){var Er=(0,nt.isFactory)(cr)?Kt(cr)?cr.fn+".transform":cr.fn:gr;if((0,st.hasOwnProperty)(pr,Er)&&pr[Er]!==cr&&!Ot.silent)throw new Error('Cannot import "'+Er+'" twice');pr[Er]=cr}else if(!Ot.silent)throw new TypeError("Factory, Object, or Array expected")}var tr={};Bt(tr,Ut);for(var Jt in tr)if((0,st.hasOwnProperty)(tr,Jt)){var ar=tr[Jt];if((0,nt.isFactory)(ar))Nt(ar,Ot);else if(Pt(ar))Rt(Jt,ar,Ot);else if(!Ot.silent)throw new TypeError("Factory, Object, or Array expected")}}function Rt(Ut,Ot,Wt){if(Wt.wrap&&typeof Ot=="function"&&(Ot=At(Ot)),Ft(Ot)&&(Ot=mt(Ut,(0,_e.default)({},Ot.signature,Ot))),It(St[Ut])&&It(Ot)){Wt.override?Ot=mt(Ut,Ot.signatures):Ot=mt(St[Ut],Ot),St[Ut]=Ot,delete Et[Ut],Tt(Ut,Ot),St.emit("import",Ut,function(){return Ot});return}if(St[Ut]===void 0||Wt.override){St[Ut]=Ot,delete Et[Ut],Tt(Ut,Ot),St.emit("import",Ut,function(){return Ot});return}if(!Wt.silent)throw new Error('Cannot import "'+Ut+'": already exists')}function Tt(Ut,Ot){Ot&&typeof Ot.transform=="function"?(St.expression.transform[Ut]=Ot.transform,qt(Ut)&&(St.expression.mathWithTransform[Ut]=Ot.transform)):(delete St.expression.transform[Ut],qt(Ut)&&(St.expression.mathWithTransform[Ut]=Ot))}function wt(Ut){delete St.expression.transform[Ut],qt(Ut)?St.expression.mathWithTransform[Ut]=St[Ut]:delete St.expression.mathWithTransform[Ut]}function At(Ut){var Ot=function(){for(var Bt=[],tr=0,Jt=arguments.length;tr<Jt;tr++){var ar=arguments[tr];Bt[tr]=ar&&ar.valueOf()}return Ut.apply(St,Bt)};return Ut.transform&&(Ot.transform=Ut.transform),Ot}function Nt(Ut,Ot){var Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ut.fn;if((0,dt.contains)(Wt,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(Wt));var Bt=Kt(Ut)?St.expression.transform:St,tr=Wt in St.expression.transform,Jt=(0,st.hasOwnProperty)(Bt,Wt)?Bt[Wt]:void 0,ar=function(){var cr={};Ut.dependencies.map(nt.stripOptionalNotation).forEach(function(Sr){if((0,dt.contains)(Sr,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(Sr));Sr==="math"?cr.math=St:Sr==="mathWithTransform"?cr.mathWithTransform=St.expression.mathWithTransform:Sr==="classes"?cr.classes=St:cr[Sr]=St[Sr]});var gr=Ut(cr);if(gr&&typeof gr.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(Jt===void 0||Ot.override)return gr;if(It(Jt)&&It(gr))return mt(Jt,gr);if(Ot.silent)return Jt;throw new Error('Cannot import "'+Wt+'": already exists')};!Ut.meta||Ut.meta.lazy!==!1?((0,st.lazy)(Bt,Wt,ar),Jt&&tr?wt(Wt):(Kt(Ut)||Vt(Ut))&&(0,st.lazy)(St.expression.mathWithTransform,Wt,function(){return Bt[Wt]})):(Bt[Wt]=ar(),Jt&&tr?wt(Wt):(Kt(Ut)||Vt(Ut))&&(0,st.lazy)(St.expression.mathWithTransform,Wt,function(){return Bt[Wt]})),Et[Wt]=Ut,St.emit("import",Wt,ar)}function Pt(Ut){return typeof Ut=="function"||typeof Ut=="number"||typeof Ut=="string"||typeof Ut=="boolean"||Ut===null||(0,rt.isUnit)(Ut)||(0,rt.isComplex)(Ut)||(0,rt.isBigNumber)(Ut)||(0,rt.isFraction)(Ut)||(0,rt.isMatrix)(Ut)||Array.isArray(Ut)}function It(Ut){return typeof Ut=="function"&&(0,tt.default)(Ut.signatures)==="object"}function Ft(Ut){return typeof Ut=="function"&&typeof Ut.signature=="string"}function qt(Ut){return!(0,st.hasOwnProperty)(jt,Ut)}function Vt(Ut){return Ut.fn.indexOf(".")===-1&&!(0,st.hasOwnProperty)(jt,Ut.fn)&&(!Ut.meta||!Ut.meta.isClass)}function Kt(Ut){return Ut!==void 0&&Ut.meta!==void 0&&Ut.meta.isTransformFunction===!0||!1}var jt={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return Ct}return _import}var hasRequiredCreate;function requireCreate(){if(hasRequiredCreate)return create;hasRequiredCreate=1;var et=requireInteropRequireDefault(),_e=require_typeof();Object.defineProperty(create,"__esModule",{value:!0}),create.create=Tt;var tt=et(require_extends());requirePolyfills();var rt=requireObject(),nt=Rt(requireEmitter()),st=require_import(),dt=requireConfig$1(),ft=requireFactory(),ht=requireIs(),mt=requireArgumentsError(),bt=requireDimensionError(),St=requireIndexError(),Et=requireConfig$2();function Ct(wt){if(typeof WeakMap!="function")return null;var At=new WeakMap,Nt=new WeakMap;return(Ct=function(It){return It?Nt:At})(wt)}function Rt(wt,At){if(wt&&wt.__esModule)return wt;if(wt===null||_e(wt)!=="object"&&typeof wt!="function")return{default:wt};var Nt=Ct(At);if(Nt&&Nt.has(wt))return Nt.get(wt);var Pt={},It=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ft in wt)if(Ft!=="default"&&Object.prototype.hasOwnProperty.call(wt,Ft)){var qt=It?Object.getOwnPropertyDescriptor(wt,Ft):null;qt&&(qt.get||qt.set)?Object.defineProperty(Pt,Ft,qt):Pt[Ft]=wt[Ft]}return Pt.default=wt,Nt&&Nt.set(wt,Pt),Pt}function Tt(wt,At){var Nt=(0,tt.default)({},Et.DEFAULT_CONFIG,At);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var Pt=nt.mixin({isNumber:ht.isNumber,isComplex:ht.isComplex,isBigNumber:ht.isBigNumber,isFraction:ht.isFraction,isUnit:ht.isUnit,isString:ht.isString,isArray:ht.isArray,isMatrix:ht.isMatrix,isCollection:ht.isCollection,isDenseMatrix:ht.isDenseMatrix,isSparseMatrix:ht.isSparseMatrix,isRange:ht.isRange,isIndex:ht.isIndex,isBoolean:ht.isBoolean,isResultSet:ht.isResultSet,isHelp:ht.isHelp,isFunction:ht.isFunction,isDate:ht.isDate,isRegExp:ht.isRegExp,isObject:ht.isObject,isNull:ht.isNull,isUndefined:ht.isUndefined,isAccessorNode:ht.isAccessorNode,isArrayNode:ht.isArrayNode,isAssignmentNode:ht.isAssignmentNode,isBlockNode:ht.isBlockNode,isConditionalNode:ht.isConditionalNode,isConstantNode:ht.isConstantNode,isFunctionAssignmentNode:ht.isFunctionAssignmentNode,isFunctionNode:ht.isFunctionNode,isIndexNode:ht.isIndexNode,isNode:ht.isNode,isObjectNode:ht.isObjectNode,isOperatorNode:ht.isOperatorNode,isParenthesisNode:ht.isParenthesisNode,isRangeNode:ht.isRangeNode,isSymbolNode:ht.isSymbolNode,isChain:ht.isChain});Pt.config=(0,dt.configFactory)(Nt,Pt.emit),Pt.expression={transform:{},mathWithTransform:{config:Pt.config}};var It=[],Ft=[];function qt(Ut){if((0,ft.isFactory)(Ut))return Ut(Pt);var Ot=Ut[Object.keys(Ut)[0]];if((0,ft.isFactory)(Ot))return Ot(Pt);if(!(0,rt.isLegacyFactory)(Ut))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",Ut),new Error("Factory object with properties `type`, `name`, and `factory` expected");var Wt=It.indexOf(Ut),Bt;return Wt===-1?(Ut.math===!0?Bt=Ut.factory(Pt.type,Nt,qt,Pt.typed,Pt):Bt=Ut.factory(Pt.type,Nt,qt,Pt.typed),It.push(Ut),Ft.push(Bt)):Bt=Ft[Wt],Bt}var Vt={};function Kt(){for(var Ut=arguments.length,Ot=new Array(Ut),Wt=0;Wt<Ut;Wt++)Ot[Wt]=arguments[Wt];return Pt.typed.apply(Pt.typed,Ot)}var jt=(0,st.importFactory)(Kt,qt,Pt,Vt);return Pt.import=jt,Pt.on("config",function(){(0,rt.values)(Vt).forEach(function(Ut){Ut&&Ut.meta&&Ut.meta.recreateOnConfigChange&&jt(Ut,{override:!0})})}),Pt.create=Tt.bind(null,wt),Pt.factory=ft.factory,Pt.import((0,rt.values)((0,rt.deepFlatten)(wt))),Pt.ArgumentsError=mt.ArgumentsError,Pt.DimensionError=bt.DimensionError,Pt.IndexError=St.IndexError,Pt}return create}var hasRequiredMainAny;function requireMainAny(){return hasRequiredMainAny||(hasRequiredMainAny=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0});var _e={config:!0,IndexError:!0,DimensionError:!0,ArgumentsError:!0,create:!0,factory:!0};Object.defineProperty(et,"ArgumentsError",{enumerable:!0,get:function(){return ht.ArgumentsError}}),Object.defineProperty(et,"DimensionError",{enumerable:!0,get:function(){return ft.DimensionError}}),Object.defineProperty(et,"IndexError",{enumerable:!0,get:function(){return dt.IndexError}}),Object.defineProperty(et,"config",{enumerable:!0,get:function(){return tt.config}}),Object.defineProperty(et,"create",{enumerable:!0,get:function(){return St.create}}),Object.defineProperty(et,"factory",{enumerable:!0,get:function(){return Et.factory}});var tt=requireConfigReadonly(),rt=requirePureFunctionsAny_generated();Object.keys(rt).forEach(function(Ct){Ct==="default"||Ct==="__esModule"||Object.prototype.hasOwnProperty.call(_e,Ct)||Ct in et&&et[Ct]===rt[Ct]||Object.defineProperty(et,Ct,{enumerable:!0,get:function(){return rt[Ct]}})});var nt=requireImpureFunctionsAny_generated();Object.keys(nt).forEach(function(Ct){Ct==="default"||Ct==="__esModule"||Object.prototype.hasOwnProperty.call(_e,Ct)||Ct in et&&et[Ct]===nt[Ct]||Object.defineProperty(et,Ct,{enumerable:!0,get:function(){return nt[Ct]}})});var st=requireTypeChecks();Object.keys(st).forEach(function(Ct){Ct==="default"||Ct==="__esModule"||Object.prototype.hasOwnProperty.call(_e,Ct)||Ct in et&&et[Ct]===st[Ct]||Object.defineProperty(et,Ct,{enumerable:!0,get:function(){return st[Ct]}})});var dt=requireIndexError(),ft=requireDimensionError(),ht=requireArgumentsError(),mt=requireDependenciesAny_generated();Object.keys(mt).forEach(function(Ct){Ct==="default"||Ct==="__esModule"||Object.prototype.hasOwnProperty.call(_e,Ct)||Ct in et&&et[Ct]===mt[Ct]||Object.defineProperty(et,Ct,{enumerable:!0,get:function(){return mt[Ct]}})});var bt=requireFactoriesAny();Object.keys(bt).forEach(function(Ct){Ct==="default"||Ct==="__esModule"||Object.prototype.hasOwnProperty.call(_e,Ct)||Ct in et&&et[Ct]===bt[Ct]||Object.defineProperty(et,Ct,{enumerable:!0,get:function(){return bt[Ct]}})});var St=requireCreate(),Et=requireFactory()})(mainAny)),mainAny}var hasRequiredCjs;function requireCjs(){return hasRequiredCjs||(hasRequiredCjs=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0});var _e=requireMainAny();Object.keys(_e).forEach(function(tt){tt==="default"||tt==="__esModule"||tt in et&&et[tt]===_e[tt]||Object.defineProperty(et,tt,{enumerable:!0,get:function(){return _e[tt]}})})})(cjs)),cjs}var bezier={exports:{}},utils$1={exports:{}},hasRequiredUtils;function requireUtils(){return hasRequiredUtils||(hasRequiredUtils=1,(function(){var et=Math.abs,_e=Math.cos,tt=Math.sin,rt=Math.acos,nt=Math.atan2,st=Math.sqrt,dt=Math.pow,ft=function(wt){return wt<0?-dt(-wt,1/3):dt(wt,1/3)},ht=Math.PI,mt=2*ht,bt=ht/2,St=1e-6,Et=Number.MAX_SAFE_INTEGER||9007199254740991,Ct=Number.MIN_SAFE_INTEGER||-9007199254740991,Rt={x:0,y:0,z:0},Tt={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(wt,At){var Nt=At(wt),Pt=Nt.x*Nt.x+Nt.y*Nt.y;return typeof Nt.z<"u"&&(Pt+=Nt.z*Nt.z),st(Pt)},compute:function(wt,At,Nt){if(wt===0)return At[0];var Pt=At.length-1;if(wt===1)return At[Pt];var It=At,Ft=1-wt;if(Pt===0)return At[0];if(Pt===1)return Wt={x:Ft*It[0].x+wt*It[1].x,y:Ft*It[0].y+wt*It[1].y},Nt&&(Wt.z=Ft*It[0].z+wt*It[1].z),Wt;if(Pt<4){var qt=Ft*Ft,Vt=wt*wt,Kt,jt,Ut,Ot=0;Pt===2?(It=[It[0],It[1],It[2],Rt],Kt=qt,jt=Ft*wt*2,Ut=Vt):Pt===3&&(Kt=qt*Ft,jt=qt*wt*3,Ut=Ft*Vt*3,Ot=wt*Vt);var Wt={x:Kt*It[0].x+jt*It[1].x+Ut*It[2].x+Ot*It[3].x,y:Kt*It[0].y+jt*It[1].y+Ut*It[2].y+Ot*It[3].y};return Nt&&(Wt.z=Kt*It[0].z+jt*It[1].z+Ut*It[2].z+Ot*It[3].z),Wt}for(var Bt=JSON.parse(JSON.stringify(At));Bt.length>1;){for(var tr=0;tr<Bt.length-1;tr++)Bt[tr]={x:Bt[tr].x+(Bt[tr+1].x-Bt[tr].x)*wt,y:Bt[tr].y+(Bt[tr+1].y-Bt[tr].y)*wt},typeof Bt[tr].z<"u"&&(Bt[tr]=Bt[tr].z+(Bt[tr+1].z-Bt[tr].z)*wt);Bt.splice(Bt.length-1,1)}return Bt[0]},computeWithRatios:function(wt,At,Nt,Pt){var It=1-wt,Ft=Nt,qt=At,Vt,Kt=Ft[0],jt=Ft[1],Ut=Ft[2],Ot=Ft[3];if(Kt*=It,jt*=wt,qt.length===2)return Vt=Kt+jt,{x:(Kt*qt[0].x+jt*qt[1].x)/Vt,y:(Kt*qt[0].y+jt*qt[1].y)/Vt,z:Pt?(Kt*qt[0].z+jt*qt[1].z)/Vt:!1};if(Kt*=It,jt*=2*It,Ut*=wt*wt,qt.length===3)return Vt=Kt+jt+Ut,{x:(Kt*qt[0].x+jt*qt[1].x+Ut*qt[2].x)/Vt,y:(Kt*qt[0].y+jt*qt[1].y+Ut*qt[2].y)/Vt,z:Pt?(Kt*qt[0].z+jt*qt[1].z+Ut*qt[2].z)/Vt:!1};if(Kt*=It,jt*=1.5*It,Ut*=3*It,Ot*=wt*wt*wt,qt.length===4)return Vt=Kt+jt+Ut+Ot,{x:(Kt*qt[0].x+jt*qt[1].x+Ut*qt[2].x+Ot*qt[3].x)/Vt,y:(Kt*qt[0].y+jt*qt[1].y+Ut*qt[2].y+Ot*qt[3].y)/Vt,z:Pt?(Kt*qt[0].z+jt*qt[1].z+Ut*qt[2].z+Ot*qt[3].z)/Vt:!1}},derive:function(wt,At){for(var Nt=[],Pt=wt,It=Pt.length,Ft=It-1;It>1;It--,Ft--){for(var qt=[],Vt=0,Kt;Vt<Ft;Vt++)Kt={x:Ft*(Pt[Vt+1].x-Pt[Vt].x),y:Ft*(Pt[Vt+1].y-Pt[Vt].y)},At&&(Kt.z=Ft*(Pt[Vt+1].z-Pt[Vt].z)),qt.push(Kt);Nt.push(qt),Pt=qt}return Nt},between:function(wt,At,Nt){return At<=wt&&wt<=Nt||Tt.approximately(wt,At)||Tt.approximately(wt,Nt)},approximately:function(wt,At,Nt){return et(wt-At)<=(Nt||St)},length:function(wt){var At=.5,Nt=0,Pt=Tt.Tvalues.length,It,Ft;for(It=0;It<Pt;It++)Ft=At*Tt.Tvalues[It]+At,Nt+=Tt.Cvalues[It]*Tt.arcfn(Ft,wt);return At*Nt},map:function(wt,At,Nt,Pt,It){var Ft=Nt-At,qt=It-Pt,Vt=wt-At,Kt=Vt/Ft;return Pt+qt*Kt},lerp:function(wt,At,Nt){var Pt={x:At.x+wt*(Nt.x-At.x),y:At.y+wt*(Nt.y-At.y)};return At.z&&Nt.z&&(Pt.z=At.z+wt*(Nt.z-At.z)),Pt},pointToString:function(wt){var At=wt.x+"/"+wt.y;return typeof wt.z<"u"&&(At+="/"+wt.z),At},pointsToString:function(wt){return"["+wt.map(Tt.pointToString).join(", ")+"]"},copy:function(wt){return JSON.parse(JSON.stringify(wt))},angle:function(wt,At,Nt){var Pt=At.x-wt.x,It=At.y-wt.y,Ft=Nt.x-wt.x,qt=Nt.y-wt.y,Vt=Pt*qt-It*Ft,Kt=Pt*Ft+It*qt;return nt(Vt,Kt)},round:function(wt,At){var Nt=""+wt,Pt=Nt.indexOf(".");return parseFloat(Nt.substring(0,Pt+1+At))},dist:function(wt,At){var Nt=wt.x-At.x,Pt=wt.y-At.y;return st(Nt*Nt+Pt*Pt)},closest:function(wt,At){var Nt=dt(2,63),Pt,It;return wt.forEach(function(Ft,qt){It=Tt.dist(At,Ft),It<Nt&&(Nt=It,Pt=qt)}),{mdist:Nt,mpos:Pt}},abcratio:function(wt,At){if(At!==2&&At!==3)return!1;if(typeof wt>"u")wt=.5;else if(wt===0||wt===1)return wt;var Nt=dt(wt,At)+dt(1-wt,At),Pt=Nt-1;return et(Pt/Nt)},projectionratio:function(wt,At){if(At!==2&&At!==3)return!1;if(typeof wt>"u")wt=.5;else if(wt===0||wt===1)return wt;var Nt=dt(1-wt,At),Pt=dt(wt,At)+Nt;return Nt/Pt},lli8:function(wt,At,Nt,Pt,It,Ft,qt,Vt){var Kt=(wt*Pt-At*Nt)*(It-qt)-(wt-Nt)*(It*Vt-Ft*qt),jt=(wt*Pt-At*Nt)*(Ft-Vt)-(At-Pt)*(It*Vt-Ft*qt),Ut=(wt-Nt)*(Ft-Vt)-(At-Pt)*(It-qt);return Ut==0?!1:{x:Kt/Ut,y:jt/Ut}},lli4:function(wt,At,Nt,Pt){var It=wt.x,Ft=wt.y,qt=At.x,Vt=At.y,Kt=Nt.x,jt=Nt.y,Ut=Pt.x,Ot=Pt.y;return Tt.lli8(It,Ft,qt,Vt,Kt,jt,Ut,Ot)},lli:function(wt,At){return Tt.lli4(wt,wt.c,At,At.c)},makeline:function(wt,At){var Nt=requireBezier(),Pt=wt.x,It=wt.y,Ft=At.x,qt=At.y,Vt=(Ft-Pt)/3,Kt=(qt-It)/3;return new Nt(Pt,It,Pt+Vt,It+Kt,Pt+2*Vt,It+2*Kt,Ft,qt)},findbbox:function(wt){var At=Et,Nt=Et,Pt=Ct,It=Ct;return wt.forEach(function(Ft){var qt=Ft.bbox();At>qt.x.min&&(At=qt.x.min),Nt>qt.y.min&&(Nt=qt.y.min),Pt<qt.x.max&&(Pt=qt.x.max),It<qt.y.max&&(It=qt.y.max)}),{x:{min:At,mid:(At+Pt)/2,max:Pt,size:Pt-At},y:{min:Nt,mid:(Nt+It)/2,max:It,size:It-Nt}}},shapeintersections:function(wt,At,Nt,Pt,It){if(!Tt.bboxoverlap(At,Pt))return[];var Ft=[],qt=[wt.startcap,wt.forward,wt.back,wt.endcap],Vt=[Nt.startcap,Nt.forward,Nt.back,Nt.endcap];return qt.forEach(function(Kt){Kt.virtual||Vt.forEach(function(jt){if(!jt.virtual){var Ut=Kt.intersects(jt,It);Ut.length>0&&(Ut.c1=Kt,Ut.c2=jt,Ut.s1=wt,Ut.s2=Nt,Ft.push(Ut))}})}),Ft},makeshape:function(wt,At,Nt){var Pt=At.points.length,It=wt.points.length,Ft=Tt.makeline(At.points[Pt-1],wt.points[0]),qt=Tt.makeline(wt.points[It-1],At.points[0]),Vt={startcap:Ft,forward:wt,back:At,endcap:qt,bbox:Tt.findbbox([Ft,wt,At,qt])},Kt=Tt;return Vt.intersections=function(jt){return Kt.shapeintersections(Vt,Vt.bbox,jt,jt.bbox,Nt)},Vt},getminmax:function(wt,At,Nt){if(!Nt)return{min:0,max:0};var Pt=Et,It=Ct,Ft,qt;Nt.indexOf(0)===-1&&(Nt=[0].concat(Nt)),Nt.indexOf(1)===-1&&Nt.push(1);for(var Vt=0,Kt=Nt.length;Vt<Kt;Vt++)Ft=Nt[Vt],qt=wt.get(Ft),qt[At]<Pt&&(Pt=qt[At]),qt[At]>It&&(It=qt[At]);return{min:Pt,mid:(Pt+It)/2,max:It,size:It-Pt}},align:function(wt,At){var Nt=At.p1.x,Pt=At.p1.y,It=-nt(At.p2.y-Pt,At.p2.x-Nt),Ft=function(qt){return{x:(qt.x-Nt)*_e(It)-(qt.y-Pt)*tt(It),y:(qt.x-Nt)*tt(It)+(qt.y-Pt)*_e(It)}};return wt.map(Ft)},roots:function(wt,At){At=At||{p1:{x:0,y:0},p2:{x:1,y:0}};var Nt=wt.length-1,ar=Tt.align(wt,At),Pt=function(kn){return 0<=kn&&kn<=1};if(Nt===2){var Wt=ar[0].y,Bt=ar[1].y,tr=ar[2].y,Ot=Wt-2*Bt+tr;if(Ot!==0){var It=-st(Bt*Bt-Wt*tr),Ft=-Wt+Bt,Vr=-(It+Ft)/Ot,qt=-(-It+Ft)/Ot;return[Vr,qt].filter(Pt)}else if(Bt!==tr&&Ot===0)return[(2*Bt-tr)/(2*Bt-2*tr)].filter(Pt);return[]}var Vt=ar[0].y,Kt=ar[1].y,jt=ar[2].y,Ut=ar[3].y,Ot=-Vt+3*Kt-3*jt+Ut,Wt=3*Vt-6*Kt+3*jt,Bt=-3*Vt+3*Kt,tr=Vt;if(Tt.approximately(Ot,0)){if(Tt.approximately(Wt,0))return Tt.approximately(Bt,0)?[]:[-tr/Bt].filter(Pt);var cr=st(Bt*Bt-4*Wt*tr),Jt=2*Wt;return[(cr-Bt)/Jt,(-Bt-cr)/Jt].filter(Pt)}Wt/=Ot,Bt/=Ot,tr/=Ot;var ar=(3*Bt-Wt*Wt)/3,pr=ar/3,cr=(2*Wt*Wt*Wt-9*Wt*Bt+27*tr)/27,gr=cr/2,Sr=gr*gr+pr*pr*pr,Er,Vr,Wr,Mr,Nr;if(Sr<0){var Yr=-ar/3,Or=Yr*Yr*Yr,Ar=st(Or),Qr=-cr/(2*Ar),hn=Qr<-1?-1:Qr>1?1:Qr,Sn=rt(hn),Kr=ft(Ar),Hn=2*Kr;return Wr=Hn*_e(Sn/3)-Wt/3,Mr=Hn*_e((Sn+mt)/3)-Wt/3,Nr=Hn*_e((Sn+2*mt)/3)-Wt/3,[Wr,Mr,Nr].filter(Pt)}else{if(Sr===0)return Er=gr<0?ft(-gr):-ft(gr),Wr=2*Er-Wt/3,Mr=-Er-Wt/3,[Wr,Mr].filter(Pt);var ln=st(Sr);return Er=ft(-gr+ln),Vr=ft(gr+ln),[Er-Vr-Wt/3].filter(Pt)}},droots:function(wt){if(wt.length===3){var At=wt[0],Nt=wt[1],Pt=wt[2],It=At-2*Nt+Pt;if(It!==0){var Ft=-st(Nt*Nt-At*Pt),qt=-At+Nt,Vt=-(Ft+qt)/It,Kt=-(-Ft+qt)/It;return[Vt,Kt]}else if(Nt!==Pt&&It===0)return[(2*Nt-Pt)/(2*(Nt-Pt))];return[]}if(wt.length===2){var At=wt[0],Nt=wt[1];return At!==Nt?[At/(At-Nt)]:[]}},curvature:function(wt,At,Nt,Pt){var It=Tt.derive(At),Ft=It[0],qt=It[1],Vt,Kt,jt,Ut,Ot=0,Wt=0,Bt=Tt.compute(wt,Ft),tr=Tt.compute(wt,qt),Jt=Bt.x*Bt.x+Bt.y*Bt.y;if(Nt?(Vt=st(dt(Bt.y*tr.z-tr.y*Bt.z,2)+dt(Bt.z*tr.x-tr.z*Bt.x,2)+dt(Bt.x*tr.y-tr.x*Bt.y,2)),Kt=dt(Jt+Bt.z*Bt.z,3/2)):(Vt=Bt.x*tr.y-Bt.y*tr.x,Kt=dt(Jt,3/2)),Vt===0||Kt===0)return{k:0,r:0};if(Ot=Vt/Kt,Wt=Kt/Vt,!Pt){var ar=Tt.curvature(wt-.001,At,Nt,!0).k,pr=Tt.curvature(wt+.001,At,Nt,!0).k;Ut=(pr-Ot+(Ot-ar))/2,jt=(et(pr-Ot)+et(Ot-ar))/2}return{k:Ot,r:Wt,dk:Ut,adk:jt}},inflections:function(wt){if(wt.length<4)return[];var At=Tt.align(wt,{p1:wt[0],p2:wt.slice(-1)[0]}),Nt=At[2].x*At[1].y,Pt=At[3].x*At[1].y,It=At[1].x*At[2].y,Ot=At[3].x*At[2].y,Ft=18*(-3*Nt+2*Pt+3*It-Ot),qt=18*(3*Nt-Pt-3*It),Vt=18*(It-Nt);if(Tt.approximately(Ft,0)){if(!Tt.approximately(qt,0)){var Kt=-Vt/qt;if(0<=Kt&&Kt<=1)return[Kt]}return[]}var jt=qt*qt-4*Ft*Vt,Ut=Math.sqrt(jt),Ot=2*Ft;return Tt.approximately(Ot,0)?[]:[(Ut-qt)/Ot,-(qt+Ut)/Ot].filter(function(Wt){return 0<=Wt&&Wt<=1})},bboxoverlap:function(wt,At){var Nt=["x","y"],Pt=Nt.length,It,Ft,qt,Vt,Kt;for(It=0;It<Pt;It++)if(Ft=Nt[It],qt=wt[Ft].mid,Vt=At[Ft].mid,Kt=(wt[Ft].size+At[Ft].size)/2,et(qt-Vt)>=Kt)return!1;return!0},expandbox:function(wt,At){At.x.min<wt.x.min&&(wt.x.min=At.x.min),At.y.min<wt.y.min&&(wt.y.min=At.y.min),At.z&&At.z.min<wt.z.min&&(wt.z.min=At.z.min),At.x.max>wt.x.max&&(wt.x.max=At.x.max),At.y.max>wt.y.max&&(wt.y.max=At.y.max),At.z&&At.z.max>wt.z.max&&(wt.z.max=At.z.max),wt.x.mid=(wt.x.min+wt.x.max)/2,wt.y.mid=(wt.y.min+wt.y.max)/2,wt.z&&(wt.z.mid=(wt.z.min+wt.z.max)/2),wt.x.size=wt.x.max-wt.x.min,wt.y.size=wt.y.max-wt.y.min,wt.z&&(wt.z.size=wt.z.max-wt.z.min)},pairiteration:function(wt,At,Nt){var Pt=wt.bbox(),It=At.bbox(),Ft=1e5,qt=Nt||.5;if(Pt.x.size+Pt.y.size<qt&&It.x.size+It.y.size<qt)return[(Ft*(wt._t1+wt._t2)/2|0)/Ft+"/"+(Ft*(At._t1+At._t2)/2|0)/Ft];var Vt=wt.split(.5),Kt=At.split(.5),jt=[{left:Vt.left,right:Kt.left},{left:Vt.left,right:Kt.right},{left:Vt.right,right:Kt.right},{left:Vt.right,right:Kt.left}];jt=jt.filter(function(Ot){return Tt.bboxoverlap(Ot.left.bbox(),Ot.right.bbox())});var Ut=[];return jt.length===0||(jt.forEach(function(Ot){Ut=Ut.concat(Tt.pairiteration(Ot.left,Ot.right,qt))}),Ut=Ut.filter(function(Ot,Wt){return Ut.indexOf(Ot)===Wt})),Ut},getccenter:function(wt,At,Nt){var Pt=At.x-wt.x,It=At.y-wt.y,Ft=Nt.x-At.x,qt=Nt.y-At.y,Vt=Pt*_e(bt)-It*tt(bt),Kt=Pt*tt(bt)+It*_e(bt),jt=Ft*_e(bt)-qt*tt(bt),Ut=Ft*tt(bt)+qt*_e(bt),Ot=(wt.x+At.x)/2,Wt=(wt.y+At.y)/2,Bt=(At.x+Nt.x)/2,tr=(At.y+Nt.y)/2,Jt=Ot+Vt,ar=Wt+Kt,pr=Bt+jt,cr=tr+Ut,gr=Tt.lli8(Ot,Wt,Jt,ar,Bt,tr,pr,cr),Sr=Tt.dist(gr,wt),Er=nt(wt.y-gr.y,wt.x-gr.x),Vr=nt(At.y-gr.y,At.x-gr.x),Wr=nt(Nt.y-gr.y,Nt.x-gr.x),Mr;return Er<Wr?((Er>Vr||Vr>Wr)&&(Er+=mt),Er>Wr&&(Mr=Wr,Wr=Er,Er=Mr)):Wr<Vr&&Vr<Er?(Mr=Wr,Wr=Er,Er=Mr):Wr+=mt,gr.s=Er,gr.e=Wr,gr.r=Sr,gr},numberSort:function(wt,At){return wt-At}};utils$1.exports=Tt})()),utils$1.exports}var polyBezier={exports:{}},hasRequiredPolyBezier;function requirePolyBezier(){return hasRequiredPolyBezier||(hasRequiredPolyBezier=1,(function(){var et=requireUtils(),_e=function(tt){this.curves=[],this._3d=!1,tt&&(this.curves=tt,this._3d=this.curves[0]._3d)};_e.prototype={valueOf:function(){return this.toString()},toString:function(){return"["+this.curves.map(function(tt){return et.pointsToString(tt.points)}).join(", ")+"]"},addCurve:function(tt){this.curves.push(tt),this._3d=this._3d||tt._3d},length:function(){return this.curves.map(function(tt){return tt.length()}).reduce(function(tt,rt){return tt+rt})},curve:function(tt){return this.curves[tt]},bbox:function(){for(var tt=this.curves,rt=tt[0].bbox(),nt=1;nt<tt.length;nt++)et.expandbox(rt,tt[nt].bbox());return rt},offset:function(tt){var rt=[];return this.curves.forEach(function(nt){rt=rt.concat(nt.offset(tt))}),new _e(rt)}},polyBezier.exports=_e})()),polyBezier.exports}var normaliseSvg,hasRequiredNormaliseSvg;function requireNormaliseSvg(){if(hasRequiredNormaliseSvg)return normaliseSvg;hasRequiredNormaliseSvg=1;function et(_e){_e=_e.replace(/,/g," ").replace(/-/g," - ").replace(/-\s+/g,"-").replace(/([a-zA-Z])/g," $1 ");var tt=_e.replace(/([a-zA-Z])\s?/g,"|$1").split("|"),rt=tt.length,nt,st,dt,ft,ht=[],mt,bt,St=0,Et=0,Ct=0,Rt=0,Tt=0,wt=0,At=0,Nt=0,Pt="";for(nt=1;nt<rt;nt++)if(st=tt[nt],dt=st.substring(0,1),ft=dt.toLowerCase(),ht=st.replace(dt,"").trim().split(" "),ht=ht.filter(function(It){return It!==""}).map(parseFloat),mt=ht.length,ft==="m"){if(Pt+="M ",dt==="m"?(Ct+=ht[0],Rt+=ht[1]):(Ct=ht[0],Rt=ht[1]),St=Ct,Et=Rt,Pt+=Ct+" "+Rt+" ",mt>2)for(bt=0;bt<mt;bt+=2)dt==="m"?(Ct+=ht[bt],Rt+=ht[bt+1]):(Ct=ht[bt],Rt=ht[bt+1]),Pt+=["L",Ct,Rt,""].join(" ")}else if(ft==="l")for(bt=0;bt<mt;bt+=2)dt==="l"?(Ct+=ht[bt],Rt+=ht[bt+1]):(Ct=ht[bt],Rt=ht[bt+1]),Pt+=["L",Ct,Rt,""].join(" ");else if(ft==="h")for(bt=0;bt<mt;bt++)dt==="h"?Ct+=ht[bt]:Ct=ht[bt],Pt+=["L",Ct,Rt,""].join(" ");else if(ft==="v")for(bt=0;bt<mt;bt++)dt==="v"?Rt+=ht[bt]:Rt=ht[bt],Pt+=["L",Ct,Rt,""].join(" ");else if(ft==="q")for(bt=0;bt<mt;bt+=4)dt==="q"?(Tt=Ct+ht[bt],wt=Rt+ht[bt+1],Ct+=ht[bt+2],Rt+=ht[bt+3]):(Tt=ht[bt],wt=ht[bt+1],Ct=ht[bt+2],Rt=ht[bt+3]),Pt+=["Q",Tt,wt,Ct,Rt,""].join(" ");else if(ft==="t")for(bt=0;bt<mt;bt+=2)Tt=Ct+(Ct-Tt),wt=Rt+(Rt-wt),dt==="t"?(Ct+=ht[bt],Rt+=ht[bt+1]):(Ct=ht[bt],Rt=ht[bt+1]),Pt+=["Q",Tt,wt,Ct,Rt,""].join(" ");else if(ft==="c")for(bt=0;bt<mt;bt+=6)dt==="c"?(Tt=Ct+ht[bt],wt=Rt+ht[bt+1],At=Ct+ht[bt+2],Nt=Rt+ht[bt+3],Ct+=ht[bt+4],Rt+=ht[bt+5]):(Tt=ht[bt],wt=ht[bt+1],At=ht[bt+2],Nt=ht[bt+3],Ct=ht[bt+4],Rt=ht[bt+5]),Pt+=["C",Tt,wt,At,Nt,Ct,Rt,""].join(" ");else if(ft==="s")for(bt=0;bt<mt;bt+=4)Tt=Ct+(Ct-At),wt=Rt+(Rt-Nt),dt==="s"?(At=Ct+ht[bt],Nt=Rt+ht[bt+1],Ct+=ht[bt+2],Rt+=ht[bt+3]):(At=ht[bt],Nt=ht[bt+1],Ct=ht[bt+2],Rt=ht[bt+3]),Pt+=["C",Tt,wt,At,Nt,Ct,Rt,""].join(" ");else ft==="z"&&(Pt+="Z ",Ct=St,Rt=Et);return Pt.trim()}return normaliseSvg=et,normaliseSvg}var svgToBeziers,hasRequiredSvgToBeziers;function requireSvgToBeziers(){if(hasRequiredSvgToBeziers)return svgToBeziers;hasRequiredSvgToBeziers=1;var et=requireNormaliseSvg(),_e={x:!1,y:!1};function tt(nt,st,dt){if(st!=="Z"){if(st==="M"){_e={x:dt[0],y:dt[1]};return}var ft=[!1,_e.x,_e.y].concat(dt),ht=nt.bind.apply(nt,ft),mt=new ht,bt=dt.slice(-2);return _e={x:bt[0],y:bt[1]},mt}}function rt(nt,st){for(var dt=et(st).split(" "),ft,ht=new RegExp("[MLCQZ]",""),mt,bt,St=[],Et={C:6,Q:4,L:2,M:2};dt.length;)ft=dt.splice(0,1)[0],ht.test(ft)&&(bt=dt.splice(0,Et[ft]).map(parseFloat),mt=tt(nt,ft,bt),mt&&St.push(mt));return new nt.PolyBezier(St)}return svgToBeziers=rt,svgToBeziers}var hasRequiredBezier;function requireBezier(){return hasRequiredBezier||(hasRequiredBezier=1,(function(){var et=Math.abs,_e=Math.min,tt=Math.max,rt=Math.cos,nt=Math.sin,st=Math.acos,dt=Math.sqrt,ft=Math.PI,ht={x:0,y:0,z:0},mt=requireUtils(),bt=requirePolyBezier(),St=function(Tt){var wt=Tt&&Tt.forEach?Tt:[].slice.call(arguments),At=!1;if(typeof wt[0]=="object"){At=wt.length;var Nt=[];wt.forEach(function(Ot){["x","y","z"].forEach(function(Wt){typeof Ot[Wt]<"u"&&Nt.push(Ot[Wt])})}),wt=Nt}var Pt=!1,It=wt.length;if(At){if(At>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");Pt=!0}}else if(It!==6&&It!==8&&It!==9&&It!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var Ft=!Pt&&(It===9||It===12)||Tt&&Tt[0]&&typeof Tt[0].z<"u";this._3d=Ft;for(var qt=[],Vt=0,Kt=Ft?3:2;Vt<It;Vt+=Kt){var jt={x:wt[Vt],y:wt[Vt+1]};Ft&&(jt.z=wt[Vt+2]),qt.push(jt)}this.order=qt.length-1,this.points=qt;var Ut=["x","y"];Ft&&Ut.push("z"),this.dims=Ut,this.dimlen=Ut.length,(function(Ot){for(var Wt=Ot.order,Bt=Ot.points,tr=mt.align(Bt,{p1:Bt[0],p2:Bt[Wt]}),Jt=0;Jt<tr.length;Jt++)if(et(tr[Jt].y)>1e-4){Ot._linear=!1;return}Ot._linear=!0})(this),this._t1=0,this._t2=1,this.update()},Et=requireSvgToBeziers();St.SVGtoBeziers=function(Tt){return Et(St,Tt)};function Ct(Tt,wt,At,Nt,Pt){typeof Pt>"u"&&(Pt=.5);var It=mt.projectionratio(Pt,Tt),Ft=1-It,qt={x:It*wt.x+Ft*Nt.x,y:It*wt.y+Ft*Nt.y},Vt=mt.abcratio(Pt,Tt),Kt={x:At.x+(At.x-qt.x)/Vt,y:At.y+(At.y-qt.y)/Vt};return{A:Kt,B:At,C:qt}}St.quadraticFromPoints=function(Tt,wt,At,Nt){if(typeof Nt>"u"&&(Nt=.5),Nt===0)return new St(wt,wt,At);if(Nt===1)return new St(Tt,wt,wt);var Pt=Ct(2,Tt,wt,At,Nt);return new St(Tt,Pt.A,At)},St.cubicFromPoints=function(Tt,wt,At,Nt,Pt){typeof Nt>"u"&&(Nt=.5);var It=Ct(3,Tt,wt,At,Nt);typeof Pt>"u"&&(Pt=mt.dist(wt,It.C));var Ft=Pt*(1-Nt)/Nt,qt=mt.dist(Tt,At),Vt=(At.x-Tt.x)/qt,Kt=(At.y-Tt.y)/qt,jt=Pt*Vt,Ut=Pt*Kt,Ot=Ft*Vt,Wt=Ft*Kt,Bt={x:wt.x-jt,y:wt.y-Ut},tr={x:wt.x+Ot,y:wt.y+Wt},Jt=It.A,ar={x:Jt.x+(Bt.x-Jt.x)/(1-Nt),y:Jt.y+(Bt.y-Jt.y)/(1-Nt)},pr={x:Jt.x+(tr.x-Jt.x)/Nt,y:Jt.y+(tr.y-Jt.y)/Nt},cr={x:Tt.x+(ar.x-Tt.x)/Nt,y:Tt.y+(ar.y-Tt.y)/Nt},gr={x:At.x+(pr.x-At.x)/(1-Nt),y:At.y+(pr.y-At.y)/(1-Nt)};return new St(Tt,cr,gr,At)};var Rt=function(){return mt};St.getUtils=Rt,St.PolyBezier=bt,St.prototype={getUtils:Rt,valueOf:function(){return this.toString()},toString:function(){return mt.pointsToString(this.points)},toSVG:function(Tt){if(this._3d)return!1;for(var wt=this.points,At=wt[0].x,Nt=wt[0].y,Pt=["M",At,Nt,this.order===2?"Q":"C"],It=1,Ft=wt.length;It<Ft;It++)Pt.push(wt[It].x),Pt.push(wt[It].y);return Pt.join(" ")},setRatios:function(Tt){if(Tt.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=Tt,this._lut=[]},verify:function(){var Tt=this.coordDigest();Tt!==this._print&&(this._print=Tt,this.update())},coordDigest:function(){return this.points.map(function(Tt,wt){return""+wt+Tt.x+Tt.y+(Tt.z?Tt.z:0)}).join("")},update:function(Tt){this._lut=[],this.dpoints=mt.derive(this.points,this._3d),this.computedirection()},computedirection:function(){var Tt=this.points,wt=mt.angle(Tt[0],Tt[this.order],Tt[1]);this.clockwise=wt>0},length:function(){return mt.length(this.derivative.bind(this))},_lut:[],getLUT:function(Tt){if(this.verify(),Tt=Tt||100,this._lut.length===Tt)return this._lut;this._lut=[],Tt--;for(var wt=0;wt<=Tt;wt++)this._lut.push(this.compute(wt/Tt));return this._lut},on:function(Tt,wt){wt=wt||5;for(var At=this.getLUT(),Nt=[],Pt,It=0,Ft=0;Ft<At.length;Ft++)Pt=At[Ft],mt.dist(Pt,Tt)<wt&&(Nt.push(Pt),It+=Ft/At.length);return Nt.length?It/=Nt.length:!1},project:function(Tt){var wt=this.getLUT(),At=wt.length-1,Nt=mt.closest(wt,Tt),Pt=Nt.mdist,It=Nt.mpos,Ft,qt,Vt,Kt,jt=(It-1)/At,Ut=(It+1)/At,Ot=.1/At;for(Pt+=1,qt=jt,Ft=qt;qt<Ut+Ot;qt+=Ot)Vt=this.compute(qt),Kt=mt.dist(Tt,Vt),Kt<Pt&&(Pt=Kt,Ft=qt);return Vt=this.compute(Ft),Vt.t=Ft,Vt.d=Pt,Vt},get:function(Tt){return this.compute(Tt)},point:function(Tt){return this.points[Tt]},compute:function(Tt){return this.ratios?mt.computeWithRatios(Tt,this.points,this.ratios,this._3d):mt.compute(Tt,this.points,this._3d,this.ratios)},raise:function(){for(var Tt=this.points,wt=[Tt[0]],At,Nt=Tt.length,Pt,It,At=1;At<Nt;At++)Pt=Tt[At],It=Tt[At-1],wt[At]={x:(Nt-At)/Nt*Pt.x+At/Nt*It.x,y:(Nt-At)/Nt*Pt.y+At/Nt*It.y};return wt[Nt]=Tt[Nt-1],new St(wt)},derivative:function(Tt){var wt=1-Tt,At,Nt,Pt=0,It=this.dpoints[0];this.order===2&&(It=[It[0],It[1],ht],At=wt,Nt=Tt),this.order===3&&(At=wt*wt,Nt=wt*Tt*2,Pt=Tt*Tt);var Ft={x:At*It[0].x+Nt*It[1].x+Pt*It[2].x,y:At*It[0].y+Nt*It[1].y+Pt*It[2].y};return this._3d&&(Ft.z=At*It[0].z+Nt*It[1].z+Pt*It[2].z),Ft},curvature:function(Tt){return mt.curvature(Tt,this.points,this._3d)},inflections:function(){return mt.inflections(this.points)},normal:function(Tt){return this._3d?this.__normal3(Tt):this.__normal2(Tt)},__normal2:function(Tt){var wt=this.derivative(Tt),At=dt(wt.x*wt.x+wt.y*wt.y);return{x:-wt.y/At,y:wt.x/At}},__normal3:function(Tt){var wt=this.derivative(Tt),At=this.derivative(Tt+.01),Nt=dt(wt.x*wt.x+wt.y*wt.y+wt.z*wt.z),Pt=dt(At.x*At.x+At.y*At.y+At.z*At.z);wt.x/=Nt,wt.y/=Nt,wt.z/=Nt,At.x/=Pt,At.y/=Pt,At.z/=Pt;var It={x:At.y*wt.z-At.z*wt.y,y:At.z*wt.x-At.x*wt.z,z:At.x*wt.y-At.y*wt.x},Ft=dt(It.x*It.x+It.y*It.y+It.z*It.z);It.x/=Ft,It.y/=Ft,It.z/=Ft;var qt=[It.x*It.x,It.x*It.y-It.z,It.x*It.z+It.y,It.x*It.y+It.z,It.y*It.y,It.y*It.z-It.x,It.x*It.z-It.y,It.y*It.z+It.x,It.z*It.z],Vt={x:qt[0]*wt.x+qt[1]*wt.y+qt[2]*wt.z,y:qt[3]*wt.x+qt[4]*wt.y+qt[5]*wt.z,z:qt[6]*wt.x+qt[7]*wt.y+qt[8]*wt.z};return Vt},hull:function(Tt){var wt=this.points,At=[],Nt,Pt=[],It=0,Ft=0,qt=0;for(Pt[It++]=wt[0],Pt[It++]=wt[1],Pt[It++]=wt[2],this.order===3&&(Pt[It++]=wt[3]);wt.length>1;){for(At=[],Ft=0,qt=wt.length-1;Ft<qt;Ft++)Nt=mt.lerp(Tt,wt[Ft],wt[Ft+1]),Pt[It++]=Nt,At.push(Nt);wt=At}return Pt},split:function(Tt,wt){if(Tt===0&&wt)return this.split(wt).left;if(wt===1)return this.split(Tt).right;var At=this.hull(Tt),Nt={left:this.order===2?new St([At[0],At[3],At[5]]):new St([At[0],At[4],At[7],At[9]]),right:this.order===2?new St([At[5],At[4],At[2]]):new St([At[9],At[8],At[6],At[3]]),span:At};if(Nt.left._t1=mt.map(0,0,1,this._t1,this._t2),Nt.left._t2=mt.map(Tt,0,1,this._t1,this._t2),Nt.right._t1=mt.map(Tt,0,1,this._t1,this._t2),Nt.right._t2=mt.map(1,0,1,this._t1,this._t2),!wt)return Nt;wt=mt.map(wt,Tt,1,0,1);var Pt=Nt.right.split(wt);return Pt.left},extrema:function(){var Tt=this.dims,wt={},At=[],Nt,Pt;return Tt.forEach((function(It){Pt=function(Ft){return Ft[It]},Nt=this.dpoints[0].map(Pt),wt[It]=mt.droots(Nt),this.order===3&&(Nt=this.dpoints[1].map(Pt),wt[It]=wt[It].concat(mt.droots(Nt))),wt[It]=wt[It].filter(function(Ft){return Ft>=0&&Ft<=1}),At=At.concat(wt[It].sort(mt.numberSort))}).bind(this)),At=At.sort(mt.numberSort).filter(function(It,Ft){return At.indexOf(It)===Ft}),wt.values=At,wt},bbox:function(){var Tt=this.extrema(),wt={};return this.dims.forEach((function(At){wt[At]=mt.getminmax(this,At,Tt[At])}).bind(this)),wt},overlaps:function(Tt){var wt=this.bbox(),At=Tt.bbox();return mt.bboxoverlap(wt,At)},offset:function(Tt,wt){if(typeof wt<"u"){var At=this.get(Tt),Nt=this.normal(Tt),Pt={c:At,n:Nt,x:At.x+Nt.x*wt,y:At.y+Nt.y*wt};return this._3d&&(Pt.z=At.z+Nt.z*wt),Pt}if(this._linear){var It=this.normal(0),Ft=this.points.map(function(Vt){var Kt={x:Vt.x+Tt*It.x,y:Vt.y+Tt*It.y};return Vt.z&&Nt.z&&(Kt.z=Vt.z+Tt*It.z),Kt});return[new St(Ft)]}var qt=this.reduce();return qt.map(function(Vt){return Vt._linear?Vt.offset(Tt)[0]:Vt.scale(Tt)})},simple:function(){if(this.order===3){var Tt=mt.angle(this.points[0],this.points[3],this.points[1]),wt=mt.angle(this.points[0],this.points[3],this.points[2]);if(Tt>0&&wt<0||Tt<0&&wt>0)return!1}var At=this.normal(0),Nt=this.normal(1),Pt=At.x*Nt.x+At.y*Nt.y;this._3d&&(Pt+=At.z*Nt.z);var It=et(st(Pt));return It<ft/3},reduce:function(){var Tt,wt=0,At=0,Nt=.01,Pt,It=[],Ft=[],qt=this.extrema().values;for(qt.indexOf(0)===-1&&(qt=[0].concat(qt)),qt.indexOf(1)===-1&&qt.push(1),wt=qt[0],Tt=1;Tt<qt.length;Tt++)At=qt[Tt],Pt=this.split(wt,At),Pt._t1=wt,Pt._t2=At,It.push(Pt),wt=At;return It.forEach(function(Vt){for(wt=0,At=0;At<=1;)for(At=wt+Nt;At<=1+Nt;At+=Nt)if(Pt=Vt.split(wt,At),!Pt.simple()){if(At-=Nt,et(wt-At)<Nt)return[];Pt=Vt.split(wt,At),Pt._t1=mt.map(wt,0,1,Vt._t1,Vt._t2),Pt._t2=mt.map(At,0,1,Vt._t1,Vt._t2),Ft.push(Pt),wt=At;break}wt<1&&(Pt=Vt.split(wt,1),Pt._t1=mt.map(wt,0,1,Vt._t1,Vt._t2),Pt._t2=Vt._t2,Ft.push(Pt))}),Ft},scale:function(Tt){var wt=this.order,At=!1;if(typeof Tt=="function"&&(At=Tt),At&&wt===2)return this.raise().scale(At);var Nt=this.clockwise,Pt=At?At(0):Tt,It=At?At(1):Tt,Ft=[this.offset(0,10),this.offset(1,10)],qt=mt.lli4(Ft[0],Ft[0].c,Ft[1],Ft[1].c);if(!qt)throw new Error("cannot scale this curve. Try reducing it first.");var Vt=this.points,Kt=[];return[0,1].forEach((function(jt){var Ut=Kt[jt*wt]=mt.copy(Vt[jt*wt]);Ut.x+=(jt?It:Pt)*Ft[jt].n.x,Ut.y+=(jt?It:Pt)*Ft[jt].n.y}).bind(this)),At?([0,1].forEach((function(jt){if(!(this.order===2&&jt)){var Ut=Vt[jt+1],Ot={x:Ut.x-qt.x,y:Ut.y-qt.y},Wt=At?At((jt+1)/wt):Tt;At&&!Nt&&(Wt=-Wt);var Bt=dt(Ot.x*Ot.x+Ot.y*Ot.y);Ot.x/=Bt,Ot.y/=Bt,Kt[jt+1]={x:Ut.x+Wt*Ot.x,y:Ut.y+Wt*Ot.y}}}).bind(this)),new St(Kt)):([0,1].forEach((function(jt){if(!(this.order===2&&jt)){var Ut=Kt[jt*wt],Ot=this.derivative(jt),Wt={x:Ut.x+Ot.x,y:Ut.y+Ot.y};Kt[jt+1]=mt.lli4(Ut,Wt,qt,Vt[jt+1])}}).bind(this)),new St(Kt))},outline:function(Tt,wt,At,Nt){wt=typeof wt>"u"?Tt:wt;var Pt=this.reduce(),It=Pt.length,Ft=[],qt=[],Vt,Kt=0,jt=this.length(),Ut=typeof At<"u"&&typeof Nt<"u";function Ot(Sr,Er,Vr,Wr,Mr){return function(Nr){var Yr=Wr/Vr,Or=(Wr+Mr)/Vr,Ar=Er-Sr;return mt.map(Nr,0,1,Sr+Yr*Ar,Sr+Or*Ar)}}Pt.forEach(function(Sr){gr=Sr.length(),Ut?(Ft.push(Sr.scale(Ot(Tt,At,jt,Kt,gr))),qt.push(Sr.scale(Ot(-wt,-Nt,jt,Kt,gr)))):(Ft.push(Sr.scale(Tt)),qt.push(Sr.scale(-wt))),Kt+=gr}),qt=qt.map(function(Sr){return Vt=Sr.points,Vt[3]?Sr.points=[Vt[3],Vt[2],Vt[1],Vt[0]]:Sr.points=[Vt[2],Vt[1],Vt[0]],Sr}).reverse();var Wt=Ft[0].points[0],Bt=Ft[It-1].points[Ft[It-1].points.length-1],tr=qt[It-1].points[qt[It-1].points.length-1],Jt=qt[0].points[0],ar=mt.makeline(tr,Wt),pr=mt.makeline(Bt,Jt),cr=[ar].concat(Ft).concat([pr]).concat(qt),gr=cr.length;return new bt(cr)},outlineshapes:function(Tt,wt,At){wt=wt||Tt;for(var Nt=this.outline(Tt,wt).curves,Pt=[],It=1,Ft=Nt.length;It<Ft/2;It++){var qt=mt.makeshape(Nt[It],Nt[Ft-It],At);qt.startcap.virtual=It>1,qt.endcap.virtual=It<Ft/2-1,Pt.push(qt)}return Pt},intersects:function(Tt,wt){return Tt?Tt.p1&&Tt.p2?this.lineIntersects(Tt):(Tt instanceof St&&(Tt=Tt.reduce()),this.curveintersects(this.reduce(),Tt,wt)):this.selfintersects(wt)},lineIntersects:function(Tt){var wt=_e(Tt.p1.x,Tt.p2.x),At=_e(Tt.p1.y,Tt.p2.y),Nt=tt(Tt.p1.x,Tt.p2.x),Pt=tt(Tt.p1.y,Tt.p2.y),It=this;return mt.roots(this.points,Tt).filter(function(Ft){var qt=It.get(Ft);return mt.between(qt.x,wt,Nt)&&mt.between(qt.y,At,Pt)})},selfintersects:function(Tt){var wt=this.reduce(),At,Nt=wt.length-2,Pt=[],It,Ft,qt;for(At=0;At<Nt;At++)Ft=wt.slice(At,At+1),qt=wt.slice(At+2),It=this.curveintersects(Ft,qt,Tt),Pt=Pt.concat(It);return Pt},curveintersects:function(Tt,wt,At){var Nt=[];Tt.forEach(function(It){wt.forEach(function(Ft){It.overlaps(Ft)&&Nt.push({left:It,right:Ft})})});var Pt=[];return Nt.forEach(function(It){var Ft=mt.pairiteration(It.left,It.right,At);Ft.length>0&&(Pt=Pt.concat(Ft))}),Pt},arcs:function(Tt){Tt=Tt||.5;var wt=[];return this._iterate(Tt,wt)},_error:function(Tt,wt,At,Nt){var Pt=(Nt-At)/4,It=this.get(At+Pt),Ft=this.get(Nt-Pt),qt=mt.dist(Tt,wt),Vt=mt.dist(Tt,It),Kt=mt.dist(Tt,Ft);return et(Vt-qt)+et(Kt-qt)},_iterate:function(Tt,wt){var At=0,Nt=1,Pt;do{Pt=0,Nt=1;var It=this.get(At),Ft,qt,Vt,Kt,jt=!1,Ut=!1,Ot,Wt=Nt,Bt=1;do{Ut=jt,Kt=Vt,Wt=(At+Nt)/2,Ft=this.get(Wt),qt=this.get(Nt),Vt=mt.getccenter(It,Ft,qt),Vt.interval={start:At,end:Nt};var tr=this._error(Vt,It,At,Nt);if(jt=tr<=Tt,Ot=Ut&&!jt,Ot||(Bt=Nt),jt){if(Nt>=1){if(Vt.interval.end=Bt=1,Kt=Vt,Nt>1){var Jt={x:Vt.x+Vt.r*rt(Vt.e),y:Vt.y+Vt.r*nt(Vt.e)};Vt.e+=mt.angle({x:Vt.x,y:Vt.y},Jt,this.get(1))}break}Nt=Nt+(Nt-At)/2}else Nt=Wt}while(!Ot&&Pt++<100);if(Pt>=100)break;Kt=Kt||Vt,wt.push(Kt),At=Bt}while(Nt<1);return wt}},bezier.exports=St})()),bezier.exports}var bezierJs,hasRequiredBezierJs;function requireBezierJs(){return hasRequiredBezierJs||(hasRequiredBezierJs=1,bezierJs=requireBezier()),bezierJs}var requiresPort,hasRequiredRequiresPort;function requireRequiresPort(){return hasRequiredRequiresPort||(hasRequiredRequiresPort=1,requiresPort=function(_e,tt){if(tt=tt.split(":")[0],_e=+_e,!_e)return!1;switch(tt){case"http":case"ws":return _e!==80;case"https":case"wss":return _e!==443;case"ftp":return _e!==21;case"gopher":return _e!==70;case"file":return!1}return _e!==0}),requiresPort}var querystringify={},hasRequiredQuerystringify;function requireQuerystringify(){if(hasRequiredQuerystringify)return querystringify;hasRequiredQuerystringify=1;var et=Object.prototype.hasOwnProperty,_e;function tt(dt){try{return decodeURIComponent(dt.replace(/\+/g," "))}catch{return null}}function rt(dt){try{return encodeURIComponent(dt)}catch{return null}}function nt(dt){for(var ft=/([^=?#&]+)=?([^&]*)/g,ht={},mt;mt=ft.exec(dt);){var bt=tt(mt[1]),St=tt(mt[2]);bt===null||St===null||bt in ht||(ht[bt]=St)}return ht}function st(dt,ft){ft=ft||"";var ht=[],mt,bt;typeof ft!="string"&&(ft="?");for(bt in dt)if(et.call(dt,bt)){if(mt=dt[bt],!mt&&(mt===null||mt===_e||isNaN(mt))&&(mt=""),bt=rt(bt),mt=rt(mt),bt===null||mt===null)continue;ht.push(bt+"="+mt)}return ht.length?ft+ht.join("&"):""}return querystringify.stringify=st,querystringify.parse=nt,querystringify}var urlParse,hasRequiredUrlParse;function requireUrlParse(){if(hasRequiredUrlParse)return urlParse;hasRequiredUrlParse=1;var et=requireRequiresPort(),_e=requireQuerystringify(),tt=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,rt=/[\n\r\t]/g,nt=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,st=/:\d+$/,dt=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,ft=/^[a-zA-Z]:/;function ht(Nt){return(Nt||"").toString().replace(tt,"")}var mt=[["#","hash"],["?","query"],function(Pt,It){return Et(It.protocol)?Pt.replace(/\\/g,"/"):Pt},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],bt={hash:1,query:1};function St(Nt){var Pt;typeof window<"u"?Pt=window:typeof commonjsGlobal<"u"?Pt=commonjsGlobal:typeof self<"u"?Pt=self:Pt={};var It=Pt.location||{};Nt=Nt||It;var Ft={},qt=typeof Nt,Vt;if(Nt.protocol==="blob:")Ft=new Tt(unescape(Nt.pathname),{});else if(qt==="string"){Ft=new Tt(Nt,{});for(Vt in bt)delete Ft[Vt]}else if(qt==="object"){for(Vt in Nt)Vt in bt||(Ft[Vt]=Nt[Vt]);Ft.slashes===void 0&&(Ft.slashes=nt.test(Nt.href))}return Ft}function Et(Nt){return Nt==="file:"||Nt==="ftp:"||Nt==="http:"||Nt==="https:"||Nt==="ws:"||Nt==="wss:"}function Ct(Nt,Pt){Nt=ht(Nt),Nt=Nt.replace(rt,""),Pt=Pt||{};var It=dt.exec(Nt),Ft=It[1]?It[1].toLowerCase():"",qt=!!It[2],Vt=!!It[3],Kt=0,jt;return qt?Vt?(jt=It[2]+It[3]+It[4],Kt=It[2].length+It[3].length):(jt=It[2]+It[4],Kt=It[2].length):Vt?(jt=It[3]+It[4],Kt=It[3].length):jt=It[4],Ft==="file:"?Kt>=2&&(jt=jt.slice(2)):Et(Ft)?jt=It[4]:Ft?qt&&(jt=jt.slice(2)):Kt>=2&&Et(Pt.protocol)&&(jt=It[4]),{protocol:Ft,slashes:qt||Et(Ft),slashesCount:Kt,rest:jt}}function Rt(Nt,Pt){if(Nt==="")return Pt;for(var It=(Pt||"/").split("/").slice(0,-1).concat(Nt.split("/")),Ft=It.length,qt=It[Ft-1],Vt=!1,Kt=0;Ft--;)It[Ft]==="."?It.splice(Ft,1):It[Ft]===".."?(It.splice(Ft,1),Kt++):Kt&&(Ft===0&&(Vt=!0),It.splice(Ft,1),Kt--);return Vt&&It.unshift(""),(qt==="."||qt==="..")&&It.push(""),It.join("/")}function Tt(Nt,Pt,It){if(Nt=ht(Nt),Nt=Nt.replace(rt,""),!(this instanceof Tt))return new Tt(Nt,Pt,It);var Ft,qt,Vt,Kt,jt,Ut,Ot=mt.slice(),Wt=typeof Pt,Bt=this,tr=0;for(Wt!=="object"&&Wt!=="string"&&(It=Pt,Pt=null),It&&typeof It!="function"&&(It=_e.parse),Pt=St(Pt),qt=Ct(Nt||"",Pt),Ft=!qt.protocol&&!qt.slashes,Bt.slashes=qt.slashes||Ft&&Pt.slashes,Bt.protocol=qt.protocol||Pt.protocol||"",Nt=qt.rest,(qt.protocol==="file:"&&(qt.slashesCount!==2||ft.test(Nt))||!qt.slashes&&(qt.protocol||qt.slashesCount<2||!Et(Bt.protocol)))&&(Ot[3]=[/(.*)/,"pathname"]);tr<Ot.length;tr++){if(Kt=Ot[tr],typeof Kt=="function"){Nt=Kt(Nt,Bt);continue}Vt=Kt[0],Ut=Kt[1],Vt!==Vt?Bt[Ut]=Nt:typeof Vt=="string"?(jt=Vt==="@"?Nt.lastIndexOf(Vt):Nt.indexOf(Vt),~jt&&(typeof Kt[2]=="number"?(Bt[Ut]=Nt.slice(0,jt),Nt=Nt.slice(jt+Kt[2])):(Bt[Ut]=Nt.slice(jt),Nt=Nt.slice(0,jt)))):(jt=Vt.exec(Nt))&&(Bt[Ut]=jt[1],Nt=Nt.slice(0,jt.index)),Bt[Ut]=Bt[Ut]||Ft&&Kt[3]&&Pt[Ut]||"",Kt[4]&&(Bt[Ut]=Bt[Ut].toLowerCase())}It&&(Bt.query=It(Bt.query)),Ft&&Pt.slashes&&Bt.pathname.charAt(0)!=="/"&&(Bt.pathname!==""||Pt.pathname!=="")&&(Bt.pathname=Rt(Bt.pathname,Pt.pathname)),Bt.pathname.charAt(0)!=="/"&&Et(Bt.protocol)&&(Bt.pathname="/"+Bt.pathname),et(Bt.port,Bt.protocol)||(Bt.host=Bt.hostname,Bt.port=""),Bt.username=Bt.password="",Bt.auth&&(jt=Bt.auth.indexOf(":"),~jt?(Bt.username=Bt.auth.slice(0,jt),Bt.username=encodeURIComponent(decodeURIComponent(Bt.username)),Bt.password=Bt.auth.slice(jt+1),Bt.password=encodeURIComponent(decodeURIComponent(Bt.password))):Bt.username=encodeURIComponent(decodeURIComponent(Bt.auth)),Bt.auth=Bt.password?Bt.username+":"+Bt.password:Bt.username),Bt.origin=Bt.protocol!=="file:"&&Et(Bt.protocol)&&Bt.host?Bt.protocol+"//"+Bt.host:"null",Bt.href=Bt.toString()}function wt(Nt,Pt,It){var Ft=this;switch(Nt){case"query":typeof Pt=="string"&&Pt.length&&(Pt=(It||_e.parse)(Pt)),Ft[Nt]=Pt;break;case"port":Ft[Nt]=Pt,et(Pt,Ft.protocol)?Pt&&(Ft.host=Ft.hostname+":"+Pt):(Ft.host=Ft.hostname,Ft[Nt]="");break;case"hostname":Ft[Nt]=Pt,Ft.port&&(Pt+=":"+Ft.port),Ft.host=Pt;break;case"host":Ft[Nt]=Pt,st.test(Pt)?(Pt=Pt.split(":"),Ft.port=Pt.pop(),Ft.hostname=Pt.join(":")):(Ft.hostname=Pt,Ft.port="");break;case"protocol":Ft.protocol=Pt.toLowerCase(),Ft.slashes=!It;break;case"pathname":case"hash":if(Pt){var qt=Nt==="pathname"?"/":"#";Ft[Nt]=Pt.charAt(0)!==qt?qt+Pt:Pt}else Ft[Nt]=Pt;break;case"username":case"password":Ft[Nt]=encodeURIComponent(Pt);break;case"auth":var Vt=Pt.indexOf(":");~Vt?(Ft.username=Pt.slice(0,Vt),Ft.username=encodeURIComponent(decodeURIComponent(Ft.username)),Ft.password=Pt.slice(Vt+1),Ft.password=encodeURIComponent(decodeURIComponent(Ft.password))):Ft.username=encodeURIComponent(decodeURIComponent(Pt))}for(var Kt=0;Kt<mt.length;Kt++){var jt=mt[Kt];jt[4]&&(Ft[jt[1]]=Ft[jt[1]].toLowerCase())}return Ft.auth=Ft.password?Ft.username+":"+Ft.password:Ft.username,Ft.origin=Ft.protocol!=="file:"&&Et(Ft.protocol)&&Ft.host?Ft.protocol+"//"+Ft.host:"null",Ft.href=Ft.toString(),Ft}function At(Nt){(!Nt||typeof Nt!="function")&&(Nt=_e.stringify);var Pt,It=this,Ft=It.host,qt=It.protocol;qt&&qt.charAt(qt.length-1)!==":"&&(qt+=":");var Vt=qt+(It.protocol&&It.slashes||Et(It.protocol)?"//":"");return It.username?(Vt+=It.username,It.password&&(Vt+=":"+It.password),Vt+="@"):It.password?(Vt+=":"+It.password,Vt+="@"):It.protocol!=="file:"&&Et(It.protocol)&&!Ft&&It.pathname!=="/"&&(Vt+="@"),(Ft[Ft.length-1]===":"||st.test(It.hostname)&&!It.port)&&(Ft+=":"),Vt+=Ft+It.pathname,Pt=typeof It.query=="object"?Nt(It.query):It.query,Pt&&(Vt+=Pt.charAt(0)!=="?"?"?"+Pt:Pt),It.hash&&(Vt+=It.hash),Vt}return Tt.prototype={set:wt,toString:At},Tt.extractProtocol=Ct,Tt.location=St,Tt.trimLeft=ht,Tt.qs=_e,urlParse=Tt,urlParse}var textareaCaretTs={},hasRequiredTextareaCaretTs;function requireTextareaCaretTs(){return hasRequiredTextareaCaretTs||(hasRequiredTextareaCaretTs=1,(function(et){Object.defineProperty(et,"__esModule",{value:!0});var _e;(function(tt){function rt(dt){var ft=nt(dt);return{left:window.scrollX+dt.getBoundingClientRect().left+ft.left,top:window.scrollY+dt.getBoundingClientRect().top+ft.top,absolute:!0,height:ft.height}}tt.getAbsolutePosition=rt;function nt(dt,ft){ft===void 0&&(ft={debug:!1,useSelectionEnd:!1,checkWidthOverflow:!0});var ht=dt.selectionStart!==null?dt.selectionStart:0,mt=dt.selectionEnd!==null?dt.selectionEnd:0,bt=ft.useSelectionEnd?mt:ht,St=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],Et=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Ct=typeof window<"u";if(!Ct)throw new Error("textarea-caret-position#getCaretPosition should only be called in a browser");var Rt=ft&&ft.debug||!1;if(Rt){var Tt=document.querySelector("#input-textarea-caret-position-mirror-div");Tt&&Tt.parentNode&&Tt.parentNode.removeChild(Tt)}var wt=document.createElement("div");wt.id="input-textarea-caret-position-mirror-div",document.body.appendChild(wt);var At=wt.style,Nt=window.getComputedStyle?window.getComputedStyle(dt):dt.currentStyle,Pt=dt.nodeName==="INPUT";At.whiteSpace="pre-wrap",Pt||(At.wordWrap="break-word"),At.position="absolute",Rt||(At.visibility="hidden"),St.forEach(function(qt){if(Pt&&qt==="lineHeight")if(Nt.boxSizing==="border-box"){var Vt=parseInt(Nt.height),Kt=parseInt(Nt.paddingTop)+parseInt(Nt.paddingBottom)+parseInt(Nt.borderTopWidth)+parseInt(Nt.borderBottomWidth),jt=Kt+parseInt(Nt.lineHeight);Vt>jt?At.lineHeight=Vt-Kt+"px":Vt===jt?At.lineHeight=Nt.lineHeight:At.lineHeight="0"}else At.lineHeight=Nt.height;else At[qt]=Nt[qt]}),Et?dt.scrollHeight>parseInt(Nt.height)&&(At.overflowY="scroll"):At.overflow="hidden",wt.textContent=dt.value.substring(0,bt),Pt&&wt.textContent&&(wt.textContent=wt.textContent.replace(/\s/g," "));var It=document.createElement("span");It.textContent=dt.value.substring(bt)||".",wt.appendChild(It);var Ft={top:It.offsetTop+parseInt(Nt.borderTopWidth),left:It.offsetLeft+parseInt(Nt.borderLeftWidth),absolute:!1,height:parseInt(Nt.lineHeight)};return Rt?It.style.backgroundColor="#aaa":document.body.removeChild(wt),Ft.left>=dt.clientWidth&&ft.checkWidthOverflow&&(Ft.left=dt.clientWidth),Ft}tt.getRelativePosition=nt;function st(dt,ft,ht,mt,bt,St){ht===void 0&&(ht={top:0,left:0}),mt===void 0&&(mt=2),bt===void 0&&(bt=!0),St===void 0&&(St=!1);var Et=rt(ft);return bt?(Et.left=Et.left+(dt.clientWidth+mt)+ht.left>window.scrollX+window.innerWidth?Et.left=window.scrollX+window.innerWidth-(dt.clientWidth+mt):Et.left+=ht.left,Et.top=Et.top+(dt.clientWidth+mt)+ht.top>window.scrollY+window.innerHeight?Et.top-=dt.clientWidth+mt:Et.top+=ht.top):(Et.top+=ht.top,Et.left+=ht.left),St||(dt.style.top=Et.top+"px",dt.style.left=Et.left+"px"),Et}tt.setElementPositionBasedOnCaret=st})(_e=et.Caret||(et.Caret={})),et.getCaretCoordinates=function(tt,rt,nt){return nt===void 0&&(nt={debug:!1}),_e.getRelativePosition(tt,nt)}})(textareaCaretTs)),textareaCaretTs}var lib$6={},lib$5={},hasRequiredLib$6;function requireLib$6(){if(hasRequiredLib$6)return lib$5;hasRequiredLib$6=1,Object.defineProperty(lib$5,"__esModule",{value:!0});var et={update:function(){typeof window<"u"&&typeof window.matchMedia=="function"&&(et.hover=window.matchMedia("(hover: hover)").matches,et.none=window.matchMedia("(hover: none)").matches||window.matchMedia("(hover: on-demand)").matches,et.anyHover=window.matchMedia("(any-hover: hover)").matches,et.anyNone=window.matchMedia("(any-hover: none)").matches||window.matchMedia("(any-hover: on-demand)").matches)}};return et.update(),lib$5.default=et,lib$5}var lib$4={},hasRequiredLib$5;function requireLib$5(){if(hasRequiredLib$5)return lib$4;hasRequiredLib$5=1,Object.defineProperty(lib$4,"__esModule",{value:!0});var et={update:function(){typeof window<"u"&&typeof window.matchMedia=="function"&&(et.fine=window.matchMedia("(pointer: fine)").matches,et.coarse=window.matchMedia("(pointer: coarse)").matches,et.none=window.matchMedia("(pointer: none)").matches,et.anyFine=window.matchMedia("(any-pointer: fine)").matches,et.anyCoarse=window.matchMedia("(any-pointer: coarse)").matches,et.anyNone=window.matchMedia("(any-pointer: none)").matches)}};return et.update(),lib$4.default=et,lib$4}var lib$3={},hasRequiredLib$4;function requireLib$4(){if(hasRequiredLib$4)return lib$3;hasRequiredLib$4=1,Object.defineProperty(lib$3,"__esModule",{value:!0});var et={update:function(){typeof window<"u"&&(et.hasSupport="ontouchstart"in window,et.browserSupportsApi=!!window.TouchEvent)}};return et.update(),lib$3.default=et,lib$3}var lib$2={},hasRequiredLib$3;function requireLib$3(){if(hasRequiredLib$3)return lib$2;hasRequiredLib$3=1,Object.defineProperty(lib$2,"__esModule",{value:!0});var et={update:function(){if(typeof window<"u"&&typeof window.addEventListener=="function"){var tt=!1,rt=Object.defineProperty({},"passive",{get:function(){tt=!0}}),nt=function(){};window.addEventListener("testPassiveEventSupport",nt,rt),window.removeEventListener("testPassiveEventSupport",nt,rt),et.hasSupport=tt}}};return et.update(),lib$2.default=et,lib$2}var hasRequiredLib$2;function requireLib$2(){if(hasRequiredLib$2)return lib$6;hasRequiredLib$2=1,Object.defineProperty(lib$6,"__esModule",{value:!0});var et=requireLib$6(),_e=ht(et),tt=requireLib$5(),rt=ht(tt),nt=requireLib$4(),st=ht(nt),dt=requireLib$3(),ft=ht(dt);function ht(St){return St&&St.__esModule?St:{default:St}}function mt(St,Et,Ct,Rt){return St&&(Et||Ct)?"hybrid":St&&Object.keys(Rt.detectHover).filter(function(Tt){return Tt!=="update"}).every(function(Tt){return Rt.detectHover[Tt]===!1})&&Object.keys(Rt.detectPointer).filter(function(Tt){return Tt!=="update"}).every(function(Tt){return Rt.detectPointer[Tt]===!1})?window.navigator&&/android/.test(window.navigator.userAgent.toLowerCase())?"touchOnly":"hybrid":St?"touchOnly":"mouseOnly"}var bt={state:{detectHover:_e.default,detectPointer:rt.default,detectTouchEvents:st.default,detectPassiveEvents:ft.default},update:function(){bt.state.detectHover.update(),bt.state.detectPointer.update(),bt.state.detectTouchEvents.update(),bt.state.detectPassiveEvents.update(),bt.updateOnlyOwnProperties()},updateOnlyOwnProperties:function(){if(typeof window<"u"){bt.passiveEvents=bt.state.detectPassiveEvents.hasSupport||!1,bt.hasTouch=bt.state.detectTouchEvents.hasSupport||!1,bt.deviceType=mt(bt.hasTouch,bt.state.detectHover.anyHover,bt.state.detectPointer.anyFine,bt.state),bt.hasMouse=bt.deviceType!=="touchOnly",bt.primaryInput=bt.deviceType==="mouseOnly"&&"mouse"||bt.deviceType==="touchOnly"&&"touch"||bt.state.detectPointer.fine&&"mouse"||bt.state.detectPointer.coarse&&"touch"||"mouse";var Et=function(Tt){return Tt>=59&&Tt<62},Ct=/windows/.test(window.navigator.userAgent.toLowerCase())&&/chrome/.test(window.navigator.userAgent.toLowerCase())&&Et(parseInt(/Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1],10));Ct&&bt.hasTouch&&(bt.deviceType="hybrid",bt.hasMouse=!0,bt.primaryInput="mouse")}}};return bt.updateOnlyOwnProperties(),lib$6.default=bt,lib$6}var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=et;function et(_e,tt){for(var rt=new Array(arguments.length-1),nt=0,st=2,dt=!0;st<arguments.length;)rt[nt++]=arguments[st++];return new Promise(function(ht,mt){rt[nt]=function(St){if(dt)if(dt=!1,St)mt(St);else{for(var Et=new Array(arguments.length-1),Ct=0;Ct<Et.length;)Et[Ct++]=arguments[Ct];ht.apply(null,Et)}};try{_e.apply(tt||null,rt)}catch(bt){dt&&(dt=!1,mt(bt))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,(function(et){var _e=et;_e.length=function(ft){var ht=ft.length;if(!ht)return 0;for(var mt=0;--ht%4>1&&ft.charAt(ht)==="=";)++mt;return Math.ceil(ft.length*3)/4-mt};for(var tt=new Array(64),rt=new Array(123),nt=0;nt<64;)rt[tt[nt]=nt<26?nt+65:nt<52?nt+71:nt<62?nt-4:nt-59|43]=nt++;_e.encode=function(ft,ht,mt){for(var bt=null,St=[],Et=0,Ct=0,Rt;ht<mt;){var Tt=ft[ht++];switch(Ct){case 0:St[Et++]=tt[Tt>>2],Rt=(Tt&3)<<4,Ct=1;break;case 1:St[Et++]=tt[Rt|Tt>>4],Rt=(Tt&15)<<2,Ct=2;break;case 2:St[Et++]=tt[Rt|Tt>>6],St[Et++]=tt[Tt&63],Ct=0;break}Et>8191&&((bt||(bt=[])).push(String.fromCharCode.apply(String,St)),Et=0)}return Ct&&(St[Et++]=tt[Rt],St[Et++]=61,Ct===1&&(St[Et++]=61)),bt?(Et&&bt.push(String.fromCharCode.apply(String,St.slice(0,Et))),bt.join("")):String.fromCharCode.apply(String,St.slice(0,Et))};var st="invalid encoding";_e.decode=function(ft,ht,mt){for(var bt=mt,St=0,Et,Ct=0;Ct<ft.length;){var Rt=ft.charCodeAt(Ct++);if(Rt===61&&St>1)break;if((Rt=rt[Rt])===void 0)throw Error(st);switch(St){case 0:Et=Rt,St=1;break;case 1:ht[mt++]=Et<<2|(Rt&48)>>4,Et=Rt,St=2;break;case 2:ht[mt++]=(Et&15)<<4|(Rt&60)>>2,Et=Rt,St=3;break;case 3:ht[mt++]=(Et&3)<<6|Rt,St=0;break}}if(St===1)throw Error(st);return mt-bt},_e.test=function(ft){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(ft)}})(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=et;function et(){this._listeners={}}return et.prototype.on=function(tt,rt,nt){return(this._listeners[tt]||(this._listeners[tt]=[])).push({fn:rt,ctx:nt||this}),this},et.prototype.off=function(tt,rt){if(tt===void 0)this._listeners={};else if(rt===void 0)this._listeners[tt]=[];else for(var nt=this._listeners[tt],st=0;st<nt.length;)nt[st].fn===rt?nt.splice(st,1):++st;return this},et.prototype.emit=function(tt){var rt=this._listeners[tt];if(rt){for(var nt=[],st=1;st<arguments.length;)nt.push(arguments[st++]);for(st=0;st<rt.length;)rt[st].fn.apply(rt[st++].ctx,nt)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=et(et);function et(st){return typeof Float32Array<"u"?(function(){var dt=new Float32Array([-0]),ft=new Uint8Array(dt.buffer),ht=ft[3]===128;function mt(Ct,Rt,Tt){dt[0]=Ct,Rt[Tt]=ft[0],Rt[Tt+1]=ft[1],Rt[Tt+2]=ft[2],Rt[Tt+3]=ft[3]}function bt(Ct,Rt,Tt){dt[0]=Ct,Rt[Tt]=ft[3],Rt[Tt+1]=ft[2],Rt[Tt+2]=ft[1],Rt[Tt+3]=ft[0]}st.writeFloatLE=ht?mt:bt,st.writeFloatBE=ht?bt:mt;function St(Ct,Rt){return ft[0]=Ct[Rt],ft[1]=Ct[Rt+1],ft[2]=Ct[Rt+2],ft[3]=Ct[Rt+3],dt[0]}function Et(Ct,Rt){return ft[3]=Ct[Rt],ft[2]=Ct[Rt+1],ft[1]=Ct[Rt+2],ft[0]=Ct[Rt+3],dt[0]}st.readFloatLE=ht?St:Et,st.readFloatBE=ht?Et:St})():(function(){function dt(ht,mt,bt,St){var Et=mt<0?1:0;if(Et&&(mt=-mt),mt===0)ht(1/mt>0?0:2147483648,bt,St);else if(isNaN(mt))ht(2143289344,bt,St);else if(mt>34028234663852886e22)ht((Et<<31|2139095040)>>>0,bt,St);else if(mt<11754943508222875e-54)ht((Et<<31|Math.round(mt/1401298464324817e-60))>>>0,bt,St);else{var Ct=Math.floor(Math.log(mt)/Math.LN2),Rt=Math.round(mt*Math.pow(2,-Ct)*8388608)&8388607;ht((Et<<31|Ct+127<<23|Rt)>>>0,bt,St)}}st.writeFloatLE=dt.bind(null,_e),st.writeFloatBE=dt.bind(null,tt);function ft(ht,mt,bt){var St=ht(mt,bt),Et=(St>>31)*2+1,Ct=St>>>23&255,Rt=St&8388607;return Ct===255?Rt?NaN:Et*(1/0):Ct===0?Et*1401298464324817e-60*Rt:Et*Math.pow(2,Ct-150)*(Rt+8388608)}st.readFloatLE=ft.bind(null,rt),st.readFloatBE=ft.bind(null,nt)})(),typeof Float64Array<"u"?(function(){var dt=new Float64Array([-0]),ft=new Uint8Array(dt.buffer),ht=ft[7]===128;function mt(Ct,Rt,Tt){dt[0]=Ct,Rt[Tt]=ft[0],Rt[Tt+1]=ft[1],Rt[Tt+2]=ft[2],Rt[Tt+3]=ft[3],Rt[Tt+4]=ft[4],Rt[Tt+5]=ft[5],Rt[Tt+6]=ft[6],Rt[Tt+7]=ft[7]}function bt(Ct,Rt,Tt){dt[0]=Ct,Rt[Tt]=ft[7],Rt[Tt+1]=ft[6],Rt[Tt+2]=ft[5],Rt[Tt+3]=ft[4],Rt[Tt+4]=ft[3],Rt[Tt+5]=ft[2],Rt[Tt+6]=ft[1],Rt[Tt+7]=ft[0]}st.writeDoubleLE=ht?mt:bt,st.writeDoubleBE=ht?bt:mt;function St(Ct,Rt){return ft[0]=Ct[Rt],ft[1]=Ct[Rt+1],ft[2]=Ct[Rt+2],ft[3]=Ct[Rt+3],ft[4]=Ct[Rt+4],ft[5]=Ct[Rt+5],ft[6]=Ct[Rt+6],ft[7]=Ct[Rt+7],dt[0]}function Et(Ct,Rt){return ft[7]=Ct[Rt],ft[6]=Ct[Rt+1],ft[5]=Ct[Rt+2],ft[4]=Ct[Rt+3],ft[3]=Ct[Rt+4],ft[2]=Ct[Rt+5],ft[1]=Ct[Rt+6],ft[0]=Ct[Rt+7],dt[0]}st.readDoubleLE=ht?St:Et,st.readDoubleBE=ht?Et:St})():(function(){function dt(ht,mt,bt,St,Et,Ct){var Rt=St<0?1:0;if(Rt&&(St=-St),St===0)ht(0,Et,Ct+mt),ht(1/St>0?0:2147483648,Et,Ct+bt);else if(isNaN(St))ht(0,Et,Ct+mt),ht(2146959360,Et,Ct+bt);else if(St>17976931348623157e292)ht(0,Et,Ct+mt),ht((Rt<<31|2146435072)>>>0,Et,Ct+bt);else{var Tt;if(St<22250738585072014e-324)Tt=St/5e-324,ht(Tt>>>0,Et,Ct+mt),ht((Rt<<31|Tt/4294967296)>>>0,Et,Ct+bt);else{var wt=Math.floor(Math.log(St)/Math.LN2);wt===1024&&(wt=1023),Tt=St*Math.pow(2,-wt),ht(Tt*4503599627370496>>>0,Et,Ct+mt),ht((Rt<<31|wt+1023<<20|Tt*1048576&1048575)>>>0,Et,Ct+bt)}}}st.writeDoubleLE=dt.bind(null,_e,0,4),st.writeDoubleBE=dt.bind(null,tt,4,0);function ft(ht,mt,bt,St,Et){var Ct=ht(St,Et+mt),Rt=ht(St,Et+bt),Tt=(Rt>>31)*2+1,wt=Rt>>>20&2047,At=4294967296*(Rt&1048575)+Ct;return wt===2047?At?NaN:Tt*(1/0):wt===0?Tt*5e-324*At:Tt*Math.pow(2,wt-1075)*(At+4503599627370496)}st.readDoubleLE=ft.bind(null,rt,0,4),st.readDoubleBE=ft.bind(null,nt,4,0)})(),st}function _e(st,dt,ft){dt[ft]=st&255,dt[ft+1]=st>>>8&255,dt[ft+2]=st>>>16&255,dt[ft+3]=st>>>24}function tt(st,dt,ft){dt[ft]=st>>>24,dt[ft+1]=st>>>16&255,dt[ft+2]=st>>>8&255,dt[ft+3]=st&255}function rt(st,dt){return(st[dt]|st[dt+1]<<8|st[dt+2]<<16|st[dt+3]<<24)>>>0}function nt(st,dt){return(st[dt]<<24|st[dt+1]<<16|st[dt+2]<<8|st[dt+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(et){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,(function(et){var _e=et;_e.length=function(rt){for(var nt=0,st=0,dt=0;dt<rt.length;++dt)st=rt.charCodeAt(dt),st<128?nt+=1:st<2048?nt+=2:(st&64512)===55296&&(rt.charCodeAt(dt+1)&64512)===56320?(++dt,nt+=4):nt+=3;return nt},_e.read=function(rt,nt,st){var dt=st-nt;if(dt<1)return"";for(var ft=null,ht=[],mt=0,bt;nt<st;)bt=rt[nt++],bt<128?ht[mt++]=bt:bt>191&&bt<224?ht[mt++]=(bt&31)<<6|rt[nt++]&63:bt>239&&bt<365?(bt=((bt&7)<<18|(rt[nt++]&63)<<12|(rt[nt++]&63)<<6|rt[nt++]&63)-65536,ht[mt++]=55296+(bt>>10),ht[mt++]=56320+(bt&1023)):ht[mt++]=(bt&15)<<12|(rt[nt++]&63)<<6|rt[nt++]&63,mt>8191&&((ft||(ft=[])).push(String.fromCharCode.apply(String,ht)),mt=0);return ft?(mt&&ft.push(String.fromCharCode.apply(String,ht.slice(0,mt))),ft.join("")):String.fromCharCode.apply(String,ht.slice(0,mt))},_e.write=function(rt,nt,st){for(var dt=st,ft,ht,mt=0;mt<rt.length;++mt)ft=rt.charCodeAt(mt),ft<128?nt[st++]=ft:ft<2048?(nt[st++]=ft>>6|192,nt[st++]=ft&63|128):(ft&64512)===55296&&((ht=rt.charCodeAt(mt+1))&64512)===56320?(ft=65536+((ft&1023)<<10)+(ht&1023),++mt,nt[st++]=ft>>18|240,nt[st++]=ft>>12&63|128,nt[st++]=ft>>6&63|128,nt[st++]=ft&63|128):(nt[st++]=ft>>12|224,nt[st++]=ft>>6&63|128,nt[st++]=ft&63|128);return st-dt}})(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=et;function et(_e,tt,rt){var nt=rt||8192,st=nt>>>1,dt=null,ft=nt;return function(mt){if(mt<1||mt>st)return _e(mt);ft+mt>nt&&(dt=_e(nt),ft=0);var bt=tt.call(dt,ft,ft+=mt);return ft&7&&(ft=(ft|7)+1),bt}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=_e;var et=requireMinimal$1();function _e(st,dt){this.lo=st>>>0,this.hi=dt>>>0}var tt=_e.zero=new _e(0,0);tt.toNumber=function(){return 0},tt.zzEncode=tt.zzDecode=function(){return this},tt.length=function(){return 1};var rt=_e.zeroHash="\0\0\0\0\0\0\0\0";_e.fromNumber=function(dt){if(dt===0)return tt;var ft=dt<0;ft&&(dt=-dt);var ht=dt>>>0,mt=(dt-ht)/4294967296>>>0;return ft&&(mt=~mt>>>0,ht=~ht>>>0,++ht>4294967295&&(ht=0,++mt>4294967295&&(mt=0))),new _e(ht,mt)},_e.from=function(dt){if(typeof dt=="number")return _e.fromNumber(dt);if(et.isString(dt))if(et.Long)dt=et.Long.fromString(dt);else return _e.fromNumber(parseInt(dt,10));return dt.low||dt.high?new _e(dt.low>>>0,dt.high>>>0):tt},_e.prototype.toNumber=function(dt){if(!dt&&this.hi>>>31){var ft=~this.lo+1>>>0,ht=~this.hi>>>0;return ft||(ht=ht+1>>>0),-(ft+ht*4294967296)}return this.lo+this.hi*4294967296},_e.prototype.toLong=function(dt){return et.Long?new et.Long(this.lo|0,this.hi|0,!!dt):{low:this.lo|0,high:this.hi|0,unsigned:!!dt}};var nt=String.prototype.charCodeAt;return _e.fromHash=function(dt){return dt===rt?tt:new _e((nt.call(dt,0)|nt.call(dt,1)<<8|nt.call(dt,2)<<16|nt.call(dt,3)<<24)>>>0,(nt.call(dt,4)|nt.call(dt,5)<<8|nt.call(dt,6)<<16|nt.call(dt,7)<<24)>>>0)},_e.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},_e.prototype.zzEncode=function(){var dt=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^dt)>>>0,this.lo=(this.lo<<1^dt)>>>0,this},_e.prototype.zzDecode=function(){var dt=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^dt)>>>0,this.hi=(this.hi>>>1^dt)>>>0,this},_e.prototype.length=function(){var dt=this.lo,ft=(this.lo>>>28|this.hi<<4)>>>0,ht=this.hi>>>24;return ht===0?ft===0?dt<16384?dt<128?1:2:dt<2097152?3:4:ft<16384?ft<128?5:6:ft<2097152?7:8:ht<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,(function(et){var _e=et;_e.asPromise=requireAspromise(),_e.base64=requireBase64(),_e.EventEmitter=requireEventemitter(),_e.float=requireFloat(),_e.inquire=requireInquire(),_e.utf8=requireUtf8(),_e.pool=requirePool(),_e.LongBits=requireLongbits(),_e.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),_e.global=_e.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,_e.emptyArray=Object.freeze?Object.freeze([]):[],_e.emptyObject=Object.freeze?Object.freeze({}):{},_e.isInteger=Number.isInteger||function(st){return typeof st=="number"&&isFinite(st)&&Math.floor(st)===st},_e.isString=function(st){return typeof st=="string"||st instanceof String},_e.isObject=function(st){return st&&typeof st=="object"},_e.isset=_e.isSet=function(st,dt){var ft=st[dt];return ft!=null&&st.hasOwnProperty(dt)?typeof ft!="object"||(Array.isArray(ft)?ft.length:Object.keys(ft).length)>0:!1},_e.Buffer=(function(){try{var nt=_e.inquire("buffer").Buffer;return nt.prototype.utf8Write?nt:null}catch{return null}})(),_e._Buffer_from=null,_e._Buffer_allocUnsafe=null,_e.newBuffer=function(st){return typeof st=="number"?_e.Buffer?_e._Buffer_allocUnsafe(st):new _e.Array(st):_e.Buffer?_e._Buffer_from(st):typeof Uint8Array>"u"?st:new Uint8Array(st)},_e.Array=typeof Uint8Array<"u"?Uint8Array:Array,_e.Long=_e.global.dcodeIO&&_e.global.dcodeIO.Long||_e.global.Long||_e.inquire("long"),_e.key2Re=/^true|false|0|1$/,_e.key32Re=/^-?(?:0|[1-9][0-9]*)$/,_e.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,_e.longToHash=function(st){return st?_e.LongBits.from(st).toHash():_e.LongBits.zeroHash},_e.longFromHash=function(st,dt){var ft=_e.LongBits.fromHash(st);return _e.Long?_e.Long.fromBits(ft.lo,ft.hi,dt):ft.toNumber(!!dt)};function tt(nt,st,dt){for(var ft=Object.keys(st),ht=0;ht<ft.length;++ht)(nt[ft[ht]]===void 0||!dt)&&(nt[ft[ht]]=st[ft[ht]]);return nt}_e.merge=tt,_e.lcFirst=function(st){return st.charAt(0).toLowerCase()+st.substring(1)};function rt(nt){function st(dt,ft){if(!(this instanceof st))return new st(dt,ft);Object.defineProperty(this,"message",{get:function(){return dt}}),Error.captureStackTrace?Error.captureStackTrace(this,st):Object.defineProperty(this,"stack",{value:new Error().stack||""}),ft&&tt(this,ft)}return st.prototype=Object.create(Error.prototype,{constructor:{value:st,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return nt},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),st}_e.newError=rt,_e.ProtocolError=rt("ProtocolError"),_e.oneOfGetter=function(st){for(var dt={},ft=0;ft<st.length;++ft)dt[st[ft]]=1;return function(){for(var ht=Object.keys(this),mt=ht.length-1;mt>-1;--mt)if(dt[ht[mt]]===1&&this[ht[mt]]!==void 0&&this[ht[mt]]!==null)return ht[mt]}},_e.oneOfSetter=function(st){return function(dt){for(var ft=0;ft<st.length;++ft)st[ft]!==dt&&delete this[st[ft]]}},_e.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},_e._configure=function(){var nt=_e.Buffer;if(!nt){_e._Buffer_from=_e._Buffer_allocUnsafe=null;return}_e._Buffer_from=nt.from!==Uint8Array.from&&nt.from||function(dt,ft){return new nt(dt,ft)},_e._Buffer_allocUnsafe=nt.allocUnsafe||function(dt){return new nt(dt)}}})(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=ht;var et=requireMinimal$1(),_e,tt=et.LongBits,rt=et.base64,nt=et.utf8;function st(wt,At,Nt){this.fn=wt,this.len=At,this.next=void 0,this.val=Nt}function dt(){}function ft(wt){this.head=wt.head,this.tail=wt.tail,this.len=wt.len,this.next=wt.states}function ht(){this.len=0,this.head=new st(dt,0,0),this.tail=this.head,this.states=null}var mt=function(){return et.Buffer?function(){return(ht.create=function(){return new _e})()}:function(){return new ht}};ht.create=mt(),ht.alloc=function(At){return new et.Array(At)},et.Array!==Array&&(ht.alloc=et.pool(ht.alloc,et.Array.prototype.subarray)),ht.prototype._push=function(At,Nt,Pt){return this.tail=this.tail.next=new st(At,Nt,Pt),this.len+=Nt,this};function bt(wt,At,Nt){At[Nt]=wt&255}function St(wt,At,Nt){for(;wt>127;)At[Nt++]=wt&127|128,wt>>>=7;At[Nt]=wt}function Et(wt,At){this.len=wt,this.next=void 0,this.val=At}Et.prototype=Object.create(st.prototype),Et.prototype.fn=St,ht.prototype.uint32=function(At){return this.len+=(this.tail=this.tail.next=new Et((At=At>>>0)<128?1:At<16384?2:At<2097152?3:At<268435456?4:5,At)).len,this},ht.prototype.int32=function(At){return At<0?this._push(Ct,10,tt.fromNumber(At)):this.uint32(At)},ht.prototype.sint32=function(At){return this.uint32((At<<1^At>>31)>>>0)};function Ct(wt,At,Nt){for(;wt.hi;)At[Nt++]=wt.lo&127|128,wt.lo=(wt.lo>>>7|wt.hi<<25)>>>0,wt.hi>>>=7;for(;wt.lo>127;)At[Nt++]=wt.lo&127|128,wt.lo=wt.lo>>>7;At[Nt++]=wt.lo}ht.prototype.uint64=function(At){var Nt=tt.from(At);return this._push(Ct,Nt.length(),Nt)},ht.prototype.int64=ht.prototype.uint64,ht.prototype.sint64=function(At){var Nt=tt.from(At).zzEncode();return this._push(Ct,Nt.length(),Nt)},ht.prototype.bool=function(At){return this._push(bt,1,At?1:0)};function Rt(wt,At,Nt){At[Nt]=wt&255,At[Nt+1]=wt>>>8&255,At[Nt+2]=wt>>>16&255,At[Nt+3]=wt>>>24}ht.prototype.fixed32=function(At){return this._push(Rt,4,At>>>0)},ht.prototype.sfixed32=ht.prototype.fixed32,ht.prototype.fixed64=function(At){var Nt=tt.from(At);return this._push(Rt,4,Nt.lo)._push(Rt,4,Nt.hi)},ht.prototype.sfixed64=ht.prototype.fixed64,ht.prototype.float=function(At){return this._push(et.float.writeFloatLE,4,At)},ht.prototype.double=function(At){return this._push(et.float.writeDoubleLE,8,At)};var Tt=et.Array.prototype.set?function(At,Nt,Pt){Nt.set(At,Pt)}:function(At,Nt,Pt){for(var It=0;It<At.length;++It)Nt[Pt+It]=At[It]};return ht.prototype.bytes=function(At){var Nt=At.length>>>0;if(!Nt)return this._push(bt,1,0);if(et.isString(At)){var Pt=ht.alloc(Nt=rt.length(At));rt.decode(At,Pt,0),At=Pt}return this.uint32(Nt)._push(Tt,Nt,At)},ht.prototype.string=function(At){var Nt=nt.length(At);return Nt?this.uint32(Nt)._push(nt.write,Nt,At):this._push(bt,1,0)},ht.prototype.fork=function(){return this.states=new ft(this),this.head=this.tail=new st(dt,0,0),this.len=0,this},ht.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new st(dt,0,0),this.len=0),this},ht.prototype.ldelim=function(){var At=this.head,Nt=this.tail,Pt=this.len;return this.reset().uint32(Pt),Pt&&(this.tail.next=At.next,this.tail=Nt,this.len+=Pt),this},ht.prototype.finish=function(){for(var At=this.head.next,Nt=this.constructor.alloc(this.len),Pt=0;At;)At.fn(At.val,Nt,Pt),Pt+=At.len,At=At.next;return Nt},ht._configure=function(wt){_e=wt,ht.create=mt(),_e._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=tt;var et=requireWriter();(tt.prototype=Object.create(et.prototype)).constructor=tt;var _e=requireMinimal$1();function tt(){et.call(this)}tt._configure=function(){tt.alloc=_e._Buffer_allocUnsafe,tt.writeBytesBuffer=_e.Buffer&&_e.Buffer.prototype instanceof Uint8Array&&_e.Buffer.prototype.set.name==="set"?function(st,dt,ft){dt.set(st,ft)}:function(st,dt,ft){if(st.copy)st.copy(dt,ft,0,st.length);else for(var ht=0;ht<st.length;)dt[ft++]=st[ht++]}},tt.prototype.bytes=function(st){_e.isString(st)&&(st=_e._Buffer_from(st,"base64"));var dt=st.length>>>0;return this.uint32(dt),dt&&this._push(tt.writeBytesBuffer,dt,st),this};function rt(nt,st,dt){nt.length<40?_e.utf8.write(nt,st,dt):st.utf8Write?st.utf8Write(nt,dt):st.write(nt,dt)}return tt.prototype.string=function(st){var dt=_e.Buffer.byteLength(st);return this.uint32(dt),dt&&this._push(rt,dt,st),this},tt._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=st;var et=requireMinimal$1(),_e,tt=et.LongBits,rt=et.utf8;function nt(St,Et){return RangeError("index out of range: "+St.pos+" + "+(Et||1)+" > "+St.len)}function st(St){this.buf=St,this.pos=0,this.len=St.length}var dt=typeof Uint8Array<"u"?function(Et){if(Et instanceof Uint8Array||Array.isArray(Et))return new st(Et);throw Error("illegal buffer")}:function(Et){if(Array.isArray(Et))return new st(Et);throw Error("illegal buffer")},ft=function(){return et.Buffer?function(Ct){return(st.create=function(Tt){return et.Buffer.isBuffer(Tt)?new _e(Tt):dt(Tt)})(Ct)}:dt};st.create=ft(),st.prototype._slice=et.Array.prototype.subarray||et.Array.prototype.slice,st.prototype.uint32=(function(){var Et=4294967295;return function(){if(Et=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(Et=(Et|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(Et=(Et|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(Et=(Et|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(Et=(Et|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return Et;if((this.pos+=5)>this.len)throw this.pos=this.len,nt(this,10);return Et}})(),st.prototype.int32=function(){return this.uint32()|0},st.prototype.sint32=function(){var Et=this.uint32();return Et>>>1^-(Et&1)|0};function ht(){var St=new tt(0,0),Et=0;if(this.len-this.pos>4){for(;Et<4;++Et)if(St.lo=(St.lo|(this.buf[this.pos]&127)<<Et*7)>>>0,this.buf[this.pos++]<128)return St;if(St.lo=(St.lo|(this.buf[this.pos]&127)<<28)>>>0,St.hi=(St.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return St;Et=0}else{for(;Et<3;++Et){if(this.pos>=this.len)throw nt(this);if(St.lo=(St.lo|(this.buf[this.pos]&127)<<Et*7)>>>0,this.buf[this.pos++]<128)return St}return St.lo=(St.lo|(this.buf[this.pos++]&127)<<Et*7)>>>0,St}if(this.len-this.pos>4){for(;Et<5;++Et)if(St.hi=(St.hi|(this.buf[this.pos]&127)<<Et*7+3)>>>0,this.buf[this.pos++]<128)return St}else for(;Et<5;++Et){if(this.pos>=this.len)throw nt(this);if(St.hi=(St.hi|(this.buf[this.pos]&127)<<Et*7+3)>>>0,this.buf[this.pos++]<128)return St}throw Error("invalid varint encoding")}st.prototype.bool=function(){return this.uint32()!==0};function mt(St,Et){return(St[Et-4]|St[Et-3]<<8|St[Et-2]<<16|St[Et-1]<<24)>>>0}st.prototype.fixed32=function(){if(this.pos+4>this.len)throw nt(this,4);return mt(this.buf,this.pos+=4)},st.prototype.sfixed32=function(){if(this.pos+4>this.len)throw nt(this,4);return mt(this.buf,this.pos+=4)|0};function bt(){if(this.pos+8>this.len)throw nt(this,8);return new tt(mt(this.buf,this.pos+=4),mt(this.buf,this.pos+=4))}return st.prototype.float=function(){if(this.pos+4>this.len)throw nt(this,4);var Et=et.float.readFloatLE(this.buf,this.pos);return this.pos+=4,Et},st.prototype.double=function(){if(this.pos+8>this.len)throw nt(this,4);var Et=et.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,Et},st.prototype.bytes=function(){var Et=this.uint32(),Ct=this.pos,Rt=this.pos+Et;if(Rt>this.len)throw nt(this,Et);if(this.pos+=Et,Array.isArray(this.buf))return this.buf.slice(Ct,Rt);if(Ct===Rt){var Tt=et.Buffer;return Tt?Tt.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,Ct,Rt)},st.prototype.string=function(){var Et=this.bytes();return rt.read(Et,0,Et.length)},st.prototype.skip=function(Et){if(typeof Et=="number"){if(this.pos+Et>this.len)throw nt(this,Et);this.pos+=Et}else do if(this.pos>=this.len)throw nt(this);while(this.buf[this.pos++]&128);return this},st.prototype.skipType=function(St){switch(St){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(St=this.uint32()&7)!==4;)this.skipType(St);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+St+" at offset "+this.pos)}return this},st._configure=function(St){_e=St,st.create=ft(),_e._configure();var Et=et.Long?"toLong":"toNumber";et.merge(st.prototype,{int64:function(){return ht.call(this)[Et](!1)},uint64:function(){return ht.call(this)[Et](!0)},sint64:function(){return ht.call(this).zzDecode()[Et](!1)},fixed64:function(){return bt.call(this)[Et](!0)},sfixed64:function(){return bt.call(this)[Et](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=tt;var et=requireReader();(tt.prototype=Object.create(et.prototype)).constructor=tt;var _e=requireMinimal$1();function tt(rt){et.call(this,rt)}return tt._configure=function(){_e.Buffer&&(tt.prototype._slice=_e.Buffer.prototype.slice)},tt.prototype.string=function(){var nt=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+nt,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+nt,this.len))},tt._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=_e;var et=requireMinimal$1();(_e.prototype=Object.create(et.EventEmitter.prototype)).constructor=_e;function _e(tt,rt,nt){if(typeof tt!="function")throw TypeError("rpcImpl must be a function");et.EventEmitter.call(this),this.rpcImpl=tt,this.requestDelimited=!!rt,this.responseDelimited=!!nt}return _e.prototype.rpcCall=function tt(rt,nt,st,dt,ft){if(!dt)throw TypeError("request must be specified");var ht=this;if(!ft)return et.asPromise(tt,ht,rt,nt,st,dt);if(!ht.rpcImpl){setTimeout(function(){ft(Error("already ended"))},0);return}try{return ht.rpcImpl(rt,nt[ht.requestDelimited?"encodeDelimited":"encode"](dt).finish(),function(bt,St){if(bt)return ht.emit("error",bt,rt),ft(bt);if(St===null){ht.end(!0);return}if(!(St instanceof st))try{St=st[ht.responseDelimited?"decodeDelimited":"decode"](St)}catch(Et){return ht.emit("error",Et,rt),ft(Et)}return ht.emit("data",St,rt),ft(null,St)})}catch(mt){ht.emit("error",mt,rt),setTimeout(function(){ft(mt)},0);return}},_e.prototype.end=function(rt){return this.rpcImpl&&(rt||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,(function(et){var _e=et;_e.Service=requireService()})(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,(function(et){var _e=et;_e.build="minimal",_e.Writer=requireWriter(),_e.BufferWriter=requireWriter_buffer(),_e.Reader=requireReader(),_e.BufferReader=requireReader_buffer(),_e.util=requireMinimal$1(),_e.rpc=requireRpc(),_e.roots=requireRoots(),_e.configure=tt;function tt(){_e.util._configure(),_e.Writer._configure(_e.BufferWriter),_e.Reader._configure(_e.BufferReader)}tt()})(indexMinimal)),indexMinimal}var minimal,hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,minimal=requireIndexMinimal()),minimal}var hasRequiredWhiteWebSdk;function requireWhiteWebSdk(){return hasRequiredWhiteWebSdk||(hasRequiredWhiteWebSdk=1,(function(et){requireEs_reflect_construct(),requireEs_reflect_get(),requireRuntime(),requireEs_object_create(),requireEs_object_defineProperty(),requireEs_object_defineProperties(),requireEs_object_getOwnPropertyDescriptor(),requireEs_object_getOwnPropertyDescriptors(),requireEs_object_getOwnPropertyNames(),requireEs_symbol(),requireEs_object_getPrototypeOf(),requireEs_date_toString(),requireEs_object_toString(),requireEs_regexp_toString(),requireEs_number_constructor(),requireEs_parseInt(),requireEs_object_freeze(),requireEs_object_setPrototypeOf(),requireEs_arrayBuffer_constructor(),requireEs_arrayBuffer_slice(),requireEs_dataView(),requireEs_number_maxSafeInteger(),requireEs_function_bind(),requireEs_function_name(),requireEs_array_forEach(),requireWeb_domCollections_forEach(),requireEs_array_map(),requireEs_array_join(),requireEs_regexp_exec(),requireEs_string_split(),requireEs_array_concat(),requireEs_date_now(),requireWeb_timers(),requireEs_promise(),requireEs_array_splice(),requireEs_string_match(),requireEs_string_replace(),requireEs_array_indexOf(),requireEs_number_isSafeInteger(),requireEs_array_slice(),requireEs_array_fill(),requireEs_array_iterator(),requireEs_typedArray_uint8Array(),requireEs_typedArray_copyWithin(),requireEs_typedArray_every(),requireEs_typedArray_fill(),requireEs_typedArray_filter(),requireEs_typedArray_find(),requireEs_typedArray_findIndex(),requireEs_typedArray_forEach(),requireEs_typedArray_includes(),requireEs_typedArray_indexOf(),requireEs_typedArray_iterator(),requireEs_typedArray_join(),requireEs_typedArray_lastIndexOf(),requireEs_typedArray_map(),requireEs_typedArray_reduce(),requireEs_typedArray_reduceRight(),requireEs_typedArray_reverse(),requireEs_typedArray_set(),requireEs_typedArray_slice(),requireEs_typedArray_some(),requireEs_typedArray_sort(),requireEs_typedArray_subarray(),requireEs_typedArray_toLocaleString(),requireEs_typedArray_toString(),requireEs_object_keys(),requireWeb_domCollections_iterator(),requireEs_map(),requireEs_string_iterator(),requireEs_number_isNan(),requireEs_array_find(),requireEs_array_filter(),requireEs_array_some(),requireEs_array_sort(),requireWeb_url(),requireEs_string_search(),requireEs_array_isArray(),requireEs_regexp_constructor(),requireEs_symbol_description(),requireEs_array_findIndex(),requireEs_object_seal(),requireEs_object_assign(),requireEs_string_fromCodePoint(),requireEs_number_isFinite(),requireEs_number_isInteger(),requireEs_number_parseFloat(),requireEs_number_parseInt(),requireEs_date_toJson(),requireWeb_url_toJson(),requireEs_symbol_iterator(),requireEs_array_every(),requireEs_array_lastIndexOf(),requireEs_array_reduce(),requireEs_array_reduceRight(),requireEs_string_anchor(),requireEs_parseFloat(),requireEs_array_includes(),requireEs_string_includes(),requireEs_number_minSafeInteger(),requireEs_array_reverse(),requireEs_set(),requireEs_string_repeat(),requireEs_number_toFixed(),requireEs_string_endsWith(),requireEs_string_startsWith(),requireEs_weakSet(),requireEs_string_trim(),requireEs_weakMap(),requireEs_array_from(),requireEs_string_italics(),requireEs_string_bold(),requireEs_string_codePointAt(),requireEs_string_padStart(),requireEs_string_link(),requireEs_promise_finally();var _e,tt;function rt(yt,ct,at){return ct in yt?Object.defineProperty(yt,ct,{value:at,enumerable:!0,configurable:!0,writable:!0}):yt[ct]=at,yt}function nt(yt){return Et(yt)||Tt(yt)||ar(yt)||bt()}function st(yt,ct,at){return typeof Reflect<"u"&&Reflect.get?st=Reflect.get:st=function(ot,gt,xt){var Mt=dt(ot,gt);if(Mt){var kt=Object.getOwnPropertyDescriptor(Mt,gt);return kt.get?kt.get.call(xt):kt.value}},st(yt,ct,at||yt)}function dt(yt,ct){for(;!Object.prototype.hasOwnProperty.call(yt,ct)&&(yt=Ut(yt),yt!==null););return yt}function ft(yt,ct,at,ut,ot,gt,xt){try{var Mt=yt[gt](xt),kt=Mt.value}catch(zt){at(zt);return}Mt.done?ct(kt):Promise.resolve(kt).then(ut,ot)}function ht(yt){return function(){var ct=this,at=arguments;return new Promise(function(ut,ot){var gt=yt.apply(ct,at);function xt(kt){ft(gt,ut,ot,xt,Mt,"next",kt)}function Mt(kt){ft(gt,ut,ot,xt,Mt,"throw",kt)}xt(void 0)})}}function mt(yt,ct){return Et(yt)||St(yt,ct)||ar(yt,ct)||bt()}function bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function St(yt,ct){var at=yt==null?null:typeof Symbol<"u"&&yt[Symbol.iterator]||yt["@@iterator"];if(at!=null){var ut=[],ot=!0,gt=!1,xt,Mt;try{for(at=at.call(yt);!(ot=(xt=at.next()).done)&&(ut.push(xt.value),!(ct&&ut.length===ct));ot=!0);}catch(kt){gt=!0,Mt=kt}finally{try{!ot&&at.return!=null&&at.return()}finally{if(gt)throw Mt}}return ut}}function Et(yt){if(Array.isArray(yt))return yt}function Ct(yt){return wt(yt)||Tt(yt)||ar(yt)||Rt()}function Rt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tt(yt){if(typeof Symbol<"u"&&yt[Symbol.iterator]!=null||yt["@@iterator"]!=null)return Array.from(yt)}function wt(yt){if(Array.isArray(yt))return pr(yt)}function At(yt){var ct=typeof Map=="function"?new Map:void 0;return At=function(ut){if(ut===null||!Pt(ut))return ut;if(typeof ut!="function")throw new TypeError("Super expression must either be null or a function");if(typeof ct<"u"){if(ct.has(ut))return ct.get(ut);ct.set(ut,ot)}function ot(){return Nt(ut,arguments,Ut(this).constructor)}return ot.prototype=Object.create(ut.prototype,{constructor:{value:ot,enumerable:!1,writable:!0,configurable:!0}}),Ft(ot,ut)},At(yt)}function Nt(yt,ct,at){return jt()?Nt=Reflect.construct:Nt=function(ot,gt,xt){var Mt=[null];Mt.push.apply(Mt,gt);var kt=Function.bind.apply(ot,Mt),zt=new kt;return xt&&Ft(zt,xt.prototype),zt},Nt.apply(null,arguments)}function Pt(yt){return Function.toString.call(yt).indexOf("[native code]")!==-1}function It(yt,ct){if(typeof ct!="function"&&ct!==null)throw new TypeError("Super expression must either be null or a function");yt.prototype=Object.create(ct&&ct.prototype,{constructor:{value:yt,writable:!0,configurable:!0}}),ct&&Ft(yt,ct)}function Ft(yt,ct){return Ft=Object.setPrototypeOf||function(ut,ot){return ut.__proto__=ot,ut},Ft(yt,ct)}function qt(yt){var ct=jt();return function(){var ut=Ut(yt),ot;if(ct){var gt=Ut(this).constructor;ot=Reflect.construct(ut,arguments,gt)}else ot=ut.apply(this,arguments);return Vt(this,ot)}}function Vt(yt,ct){return ct&&(tr(ct)==="object"||typeof ct=="function")?ct:Kt(yt)}function Kt(yt){if(yt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return yt}function jt(){if(typeof Reflect>"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 Ut(yt){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(at){return at.__proto__||Object.getPrototypeOf(at)},Ut(yt)}function Ot(yt,ct){if(!(yt instanceof ct))throw new TypeError("Cannot call a class as a function")}function Wt(yt,ct){for(var at=0;at<ct.length;at++){var ut=ct[at];ut.enumerable=ut.enumerable||!1,ut.configurable=!0,"value"in ut&&(ut.writable=!0),Object.defineProperty(yt,ut.key,ut)}}function Bt(yt,ct,at){return ct&&Wt(yt.prototype,ct),at&&Wt(yt,at),yt}function tr(yt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tr=function(at){return typeof at}:tr=function(at){return at&&typeof Symbol=="function"&&at.constructor===Symbol&&at!==Symbol.prototype?"symbol":typeof at},tr(yt)}function Jt(yt,ct){var at=typeof Symbol<"u"&&yt[Symbol.iterator]||yt["@@iterator"];if(!at){if(Array.isArray(yt)||(at=ar(yt))||ct){at&&(yt=at);var ut=0,ot=function(){};return{s:ot,n:function(){return ut>=yt.length?{done:!0}:{done:!1,value:yt[ut++]}},e:function(zt){throw zt},f:ot}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var gt=!0,xt=!1,Mt;return{s:function(){at=at.call(yt)},n:function(){var zt=at.next();return gt=zt.done,zt},e:function(zt){xt=!0,Mt=zt},f:function(){try{!gt&&at.return!=null&&at.return()}finally{if(xt)throw Mt}}}}function ar(yt,ct){if(yt){if(typeof yt=="string")return pr(yt,ct);var at=Object.prototype.toString.call(yt).slice(8,-1);if(at==="Object"&&yt.constructor&&(at=yt.constructor.name),at==="Map"||at==="Set")return Array.from(yt);if(at==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(at))return pr(yt,ct)}}function pr(yt,ct){(ct==null||ct>yt.length)&&(ct=yt.length);for(var at=0,ut=new Array(ct);at<ct;at++)ut[at]=yt[at];return ut}var cr=Object.create,gr=Object.defineProperty,Sr=Object.defineProperties,Er=Object.getOwnPropertyDescriptor,Vr=Object.getOwnPropertyDescriptors,Wr=Object.getOwnPropertyNames,Mr=Object.getOwnPropertySymbols,Nr=Object.getPrototypeOf,Yr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Ar=function(ct,at,ut){return at in ct?gr(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Qr=function(ct,at){for(var ut in at||(at={}))Yr.call(at,ut)&&Ar(ct,ut,at[ut]);if(Mr){var ot=Jt(Mr(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;Or.call(at,ut)&&Ar(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},hn=function(ct,at){return Sr(ct,Vr(at))},Sn=function(ct){return gr(ct,"__esModule",{value:!0})},Kr=function(ct,at){Sn(ct);for(var ut in at)gr(ct,ut,{get:at[ut],enumerable:!0})},Hn=function(ct,at,ut){if(at&&tr(at)=="object"||typeof at=="function"){var ot=Jt(Wr(at)),gt;try{var xt=function(){var kt=gt.value;!Yr.call(ct,kt)&&kt!=="default"&&gr(ct,kt,{get:function(){return at[kt]},enumerable:!(ut=Er(at,kt))||ut.enumerable})};for(ot.s();!(gt=ot.n()).done;)xt()}catch(Mt){ot.e(Mt)}finally{ot.f()}}return ct},ln=function(ct){return Hn(Sn(gr(ct!=null?cr(Nr(ct)):{},"default",ct&&ct.__esModule&&"default"in ct?{get:function(){return ct.default},enumerable:!0}:{value:ct,enumerable:!0})),ct)},kn=function(ct,at,ut,ot){for(var gt=at,xt=ct.length-1,Mt;xt>=0;xt--)(Mt=ct[xt])&&(gt=Mt(gt)||gt);return gt};Kr(et,{AdminObserverId:function(){return Pr},AkkoVersion:function(){return Hu},AnimationMode:function(){return Mm},ApplianceNames:function(){return Hp},AsyncModuleLoadMode:function(){return KC},CNode:function(){return Gw},CursorNames:function(){return Iv},DefaultHotKeys:function(){return Mq},DeviceType:function(){return d0},DisplayerConsumer:function(){return n5},EventPhase:function(){return fy},EventScope:function(){return Zu},InvisiblePlugin:function(){return sL},KeyboardKind:function(){return aT},LoggerReportMode:function(){return IA},LowTaskAnimationInterval:function(){return IT},NewPencilWritingQuality:function(){return xN},NullIdentifier:function(){return vl},ObserverMode:function(){return MA},OriginCoordType:function(){return wb},PPTKind:function(){return PR},PPTTaskStatus:function(){return NO},PPTTaskStep:function(){return kO},PlayerConsumer:function(){return i5},PlayerPhase:function(){return N1},RenderEngine:function(){return sT},RoomConsumer:function(){return aL},RoomErrorLevel:function(){return WM},RoomPhase:function(){return pv},ScenePathType:function(){return Lx},ScreenType:function(){return _S},ShapeType:function(){return pO},UpdateEventKind:function(){return fl},ViewMode:function(){return v0},ViewVisionMode:function(){return CR},WhiteVersion:function(){return g3},WhiteWebSdk:function(){return PL},autorun:function(){return uq.autorun},contentModeAspectFill:function(){return $4},contentModeAspectFillScale:function(){return dq},contentModeAspectFit:function(){return U4},contentModeAspectFitScale:function(){return G4},contentModeAspectFitSpace:function(){return z4},contentModeScale:function(){return hO},createPPTTask:function(){return U5},createPlugins:function(){return a5},injectCustomStyle:function(){return M5},isPlayer:function(){return LB},isRoom:function(){return Gq},listenDisposed:function(){return Wx},listenUpdated:function(){return xy},previewPPT:function(){return nq},reaction:function(){return uq.reaction},setAsyncModuleLoadMode:function(){return I4},toJS:function(){return zy},unlistenDisposed:function(){return NS},unlistenUpdated:function(){return f1}});var xn="2.16.53",An="cn-hz",rs={identifier:"link.netless/white-model-render",origin:"https://sdk.whiteboard.sd-rtn.com"},qs=["https://sdk.whiteboard.sd-rtn.com","https://sdk.whiteboard.rtelink.com","https://sdk.netless.link"],Ln={agora:["api.netless.link","api.whiteboard.agora.io","api.whiteboard.rtelink.com"],shengwang:["api.netless.link","api.baiban.shengwang.cn","api.whiteboard.sd-rtn.com"]},Cn={cn:"cn-hz",us:"us-sv",in:"in-mum",na:"us-sv",ap:"sg"},Nn={pptApi:["api.netless.link"]},Gr={argusOptions:{reportResourceURL:"https://rest-argus-ad.agoralab.co/v3/report",vid:3}},tn={sdkVersion:xn,defaultRegion:An,modules:rs,modulesOrigins:qs,shuntApiHosts:Ln,regionsMap:Cn,hosts:Nn,log:Gr},dn=ln(require$$116);(0,dn.configure)({useProxies:window.__netlessMobXUseProxies,isolateGlobalState:!0}),ln(requireDist$1());var Rn={};Kr(Rn,{ActionFrameType:function(){return gp},AdminObserverId:function(){return Pr},AkkoApp:function(){return CE},AkkoFetcher:function(){return Zo},AkkoVersion:function(){return Hu},Environment:function(){return Ov},EventPhase:function(){return fy},EventScope:function(){return Zu},FramePicker:function(){return av},ImagePhase:function(){return v_},KickReason:function(){return Ry},Library:function(){return yn},MagixPhase:function(){return ql},NullIdentifier:function(){return vl},ReconstructorFactory:function(){return lD},ReconstructorPhase:function(){return dv},ReconstructorSeekingResult:function(){return __},SocketErrorCode:function(){return my},UpdateEventKind:function(){return fl},__context:function(){return Bm},copy:function(){return y1},createBuffer:function(){return du},createElement:function(){return hw},event:function(){return G0},findClass:function(){return V1},findClassId:function(){return fE},findIdentifierWith:function(){return kS},getAuthorId:function(){return i1},getClassReflection:function(){return am},getCurrentTimestamp:function(){return k_},getEnvironment:function(){return ux},getLibrary:function(){return H0},getResource:function(){return V0},getSnapshot:function(){return Hy},getUser:function(){return dx},getUserIds:function(){return O_},getUsersCount:function(){return cx},hasUser:function(){return lx},isAkkoObject:function(){return jx},isAkkoWrappedObject:function(){return by},isAkkoWrappedObjectAccessible:function(){return ym},isBuffer:function(){return Sl},isInstanceOf:function(){return hm},listenDisposed:function(){return Wx},listenUpdated:function(){return xy},noEffects:function(){return Jv},resolve:function(){return uu},socketFactory:function(){return h_},transient:function(){return hy},translateToAckFrame:function(){return Nv},unlistenDisposed:function(){return NS},unlistenUpdated:function(){return f1},wrapBuffer:function(){return Iu}});var wn=ln(requireSparkMd5()),Un=Object.defineProperty,Zn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,Dn=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,_a=Object.prototype.propertyIsEnumerable,Vn=function(ct,at,ut){return at in ct?Un(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},bs=function(ct,at){for(var ut in at||(at={}))qn.call(at,ut)&&Vn(ct,ut,at[ut]);if(Dn){var ot=Jt(Dn(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;_a.call(at,ut)&&Vn(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},Is=function(ct,at){return Zn(ct,pn(at))},uo=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"id",get:function(){return this._id===void 0&&(this._id="".concat(yt.nextBufferId),yt.nextBufferId+=1),this._id}}]),yt})(),Rs=uo;Rs.nextBufferId=0;var io=8,vo=ds(),Bo=Ps();function En(yt,ct,at){for(var ut=new String(new Number(at).toString(16)),ot=2*io-ut.length,gt=0;gt<io;++gt){var xt=2*gt-ot;if(xt<-1)yt.setUint8(ct+gt,0);else if(xt===-1){var Mt=ut.substr(0,1),kt=vo[Mt];yt.setUint8(ct+gt,kt)}else{var zt=ut.substr(xt,2),Ht=vo[zt];yt.setUint8(ct+gt,Ht)}}}function In(yt,ct){for(var at="",ut=0;ut<io;++ut){var ot=yt.getUint8(ct+ut);at+=Bo[ot]}return parseInt(at,16)}function ds(){for(var yt={},ct=0;ct<256;++ct){var at=ct.toString(16);at.length===1&&(yt["0"+at]=ct),yt[at]=ct}return Object.freeze(yt)}function Ps(){for(var yt=[],ct=0;ct<256;++ct){var at=ct.toString(16);at.length===1?yt[ct]="0"+at:yt[ct]=at}return Object.freeze(yt)}var yo=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot){var gt;return Ot(this,at),gt=ct.call(this),gt.buffer=ut,gt.create=ot,gt}return Bt(at,[{key:"readonly",get:function(){return!0}},{key:"byteLength",get:function(){return this.buffer.byteLength}},{key:"primitiveBuffer",get:function(){return this.buffer}},{key:"isEqualsTo",value:function(ot){if(this.byteLength!==ot.byteLength)return!1;for(var gt=0;gt<this.byteLength;++gt)if(this.getUint8(gt)!==ot.getUint8(gt))return!1;return!0}},{key:"slice",value:function(){for(var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.buffer.length-ot,xt=this.create(gt),Mt=xt.buffer,kt=0;kt<gt;++kt)Mt.writeUInt8(this.buffer.readUInt8(ot+kt),kt);return xt}},{key:"getFloat64",value:function(ot){return this.buffer.readDoubleLE(ot)}},{key:"getUint16",value:function(ot){return this.buffer.readUInt16LE(ot)}},{key:"getInt32",value:function(ot){return this.buffer.readInt32LE(ot)}},{key:"getUint32",value:function(ot){return this.buffer.readUInt32LE(ot)}},{key:"getUint8",value:function(ot){return this.buffer.readUInt8(ot)}},{key:"getUint64",value:function(ot){return In(this,ot)}}]),at})(Rs),rn=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"readonly",get:function(){return!1}},{key:"freeze",value:function(){return Object.setPrototypeOf(this,yo.prototype),this}},{key:"fill",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ot.byteLength-xt,kt=ot.primitiveBuffer;if(kt instanceof ArrayBuffer){for(var zt=new DataView(kt),Ht=this.buffer.byteLength-gt,rr=Math.min(Mt,Ht),ur=0;ur<rr;++ur)this.buffer.writeUInt8(zt.getUint8(ur+xt),ur+gt);return rr}else return kt.copy(this.buffer,gt,xt,xt+Mt)}},{key:"setFloat64",value:function(ot,gt){this.buffer.writeDoubleLE(gt,ot)}},{key:"setUint16",value:function(ot,gt){this.buffer.writeUInt16LE(gt,ot)}},{key:"setInt32",value:function(ot,gt){this.buffer.writeInt32LE(gt,ot)}},{key:"setUint32",value:function(ot,gt){this.buffer.writeUInt32LE(gt,ot)}},{key:"setUint8",value:function(ot,gt){this.buffer.writeUInt8(gt,ot)}},{key:"setUint64",value:function(ot,gt){En(this,ot,gt)}}]),at})(yo),es=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this),ot.arrayBuffer=ut,ot.dataView=new DataView(ut),ot}return Bt(at,[{key:"readonly",get:function(){return!0}},{key:"byteLength",get:function(){return this.arrayBuffer.byteLength}},{key:"primitiveBuffer",get:function(){return this.arrayBuffer}},{key:"isEqualsTo",value:function(ot){if(this.byteLength!==ot.byteLength)return!1;for(var gt=0;gt<this.byteLength;++gt)if(this.getUint8(gt)!==ot.getUint8(gt))return!1;return!0}},{key:"slice",value:function(){for(var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.dataView.byteLength-ot,xt=new ArrayBuffer(gt),Mt=new DataView(xt),kt=0;kt<gt;++kt)Mt.setUint8(kt,this.dataView.getUint8(ot+kt));return new Gs(xt)}},{key:"getFloat64",value:function(ot){return this.dataView.getFloat64(ot,!0)}},{key:"getUint16",value:function(ot){return this.dataView.getUint16(ot,!0)}},{key:"getInt32",value:function(ot){return this.dataView.getInt32(ot,!0)}},{key:"getUint32",value:function(ot){return this.dataView.getUint32(ot,!0)}},{key:"getUint8",value:function(ot){return this.dataView.getUint8(ot)}},{key:"getUint64",value:function(ot){return In(this,ot)}}]),at})(Rs),Gs=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"readonly",get:function(){return!1}},{key:"freeze",value:function(){return Object.setPrototypeOf(this,es.prototype),this}},{key:"fill",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.MAX_SAFE_INTEGER,kt=ot.primitiveBuffer,zt=this.dataView.byteLength-gt,Ht=Math.min(Mt,zt);if(kt instanceof ArrayBuffer)for(var rr=new DataView(kt),ur=0;ur<Ht;++ur)this.dataView.setUint8(ur+gt,rr.getUint8(ur+xt));else for(var _r=0;_r<Ht;++_r)this.dataView.setUint8(_r+gt,kt.readUInt8(_r+xt));return Ht}},{key:"setFloat64",value:function(ot,gt){this.dataView.setFloat64(ot,gt,!0)}},{key:"setUint16",value:function(ot,gt){this.dataView.setUint16(ot,gt,!0)}},{key:"setInt32",value:function(ot,gt){this.dataView.setInt32(ot,gt,!0)}},{key:"setUint32",value:function(ot,gt){this.dataView.setUint32(ot,gt,!0)}},{key:"setUint8",value:function(ot,gt){this.dataView.setUint8(ot,gt)}},{key:"setUint64",value:function(ot,gt){En(this,ot,gt)}}]),at})(es),Ro=function yt(){var ct=this;Ot(this,yt),this.create=function(at){return ct.nodeBuffer?new rn(ct.nodeBuffer.alloc(at),ct.create):new Gs(new ArrayBuffer(at))},this.wrap=function(at){return ct.nodeBuffer&&at instanceof ct.nodeBuffer?new rn(at,ct.create):new Gs(at)},typeof Buffer=="function"?this.nodeBuffer=commonjsGlobal.Buffer:this.nodeBuffer=null},ru=new Ro,du=ru.create,Iu=ru.wrap;function Sl(yt){return yt instanceof yo||yt instanceof es}var Ko;(function(yt){yt.Any="any",yt.Never="never",yt.Undefined="undefined",yt.Null="null",yt.String="string",yt.Number="number",yt.Boolean="boolean",yt.Function="function",yt.Object="object",yt.And="and",yt.Or="or",yt.Generic="generic",yt.Generator="generator",yt.Reference="reference",yt.GlobalReference="globalReference"})(Ko||(Ko={}));var Fl=(function(){function yt(){Ot(this,yt),this.singletonMap=yt.createSingletonMap()}return Bt(yt,[{key:"getSingletonType",value:function(at){return this.singletonMap[at]}},{key:"getFunctionType",value:function(){return{typeEnum:Ko.Function}}},{key:"getObjectType",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut=at.key,ot=at.index,gt=at.properties;return{typeEnum:Ko.Object,key:ut||this.getSingletonType(Ko.Undefined),index:ot||this.getSingletonType(Ko.Undefined),properties:gt||{}}}},{key:"getCompoundType",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return{typeEnum:at,children:ut}}},{key:"getGenericType",value:function(at){return{index:at,typeEnum:Ko.Generic}}},{key:"getGeneratorType",value:function(at){var ut=at.template,ot=at.params;return{typeEnum:Ko.Generator,template:ut,params:ot||[]}}},{key:"getReferenceType",value:function(at){return{typeEnum:Ko.Reference,name:at}}},{key:"getGlobalReferenceType",value:function(at,ut){return{typeEnum:Ko.GlobalReference,path:at,name:ut}}}],[{key:"createSingletonMap",value:function(){for(var at={},ut=[Ko.Any,Ko.Never,Ko.Undefined,Ko.Null,Ko.String,Ko.Number,Ko.Boolean],ot=0,gt=ut;ot<gt.length;ot++){var xt=gt[ot];at[xt]={typeEnum:xt}}return Object.freeze(at)}}]),yt})(),gl=new Fl;gl.getSingletonType.bind(gl),gl.getFunctionType.bind(gl),gl.getObjectType.bind(gl),gl.getCompoundType.bind(gl),gl.getGenericType.bind(gl),gl.getGeneratorType.bind(gl),gl.getReferenceType.bind(gl),gl.getGlobalReferenceType.bind(gl);var Gu=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.name="RuntimeError",ot}return at})(At(Error)),Lu=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.akkoVersion=ct,this.akkoObjectBaseClass=at,this.libraryFactory=ut,this.onCreatedLibrary=ot,this.classHandlers={}}return Bt(yt,[{key:"baseClass",value:function(){return this.akkoObjectBaseClass}},{key:"wrapSuperClass",value:function(at){if(at===Object)return this.akkoObjectBaseClass;if(typeof at!="function")return at;{for(var ut=at;ut!==this.akkoObjectBaseClass;){var ot=Object.getPrototypeOf(ut.prototype);if(!ot)throw new Gu("class ".concat(at.name," can't be extended, it's out of library"));ut=ot.constructor}return at}}},{key:"declareClass",value:function(at){var ut=at.classId,ot=at.clazz,gt=at.superClass,xt=at.memberDecorators;if(this.classHandlers[ut])throw new Gu("class id ".concat(ut," was declared"));this.classHandlers[ut]={classId:ut,clazz:ot,superClass:gt,memberDecorators:xt||{}}}},{key:"createLibrary",value:function(at,ut){var ot={};for(var gt in ut.classes){var xt=ut.classes[gt],Mt=this.classHandlers[gt],kt=[],zt=Jt(xt.members),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value,ur=Mt.memberDecorators[rr.name];kt.push(Is(bs({},rr),{decorators:ur||Object.freeze([])}))}}catch(Dr){zt.e(Dr)}finally{zt.f()}ot[gt]={classId:Mt.classId,clazz:Mt.clazz,superClass:Mt.superClass,objectFormatId:xt.objectFormatId,members:kt}}var _r=this.libraryFactory({appIdentifier:ut.identifier,appVersion:ut.version,akkoVersion:ut.akko,formatBase64:ut.formatBase64,formatHash:ut.formatHash,rootConstructor:at,classDeclarations:ot});return Object.defineProperty(at,"__library",{enumerable:!1,configurable:!1,writable:!1,value:_r}),this.onCreatedLibrary(_r),at}}]),yt})();function Ku(yt){var ct=new Lu(yt.akkoVersion,yt.akkoObjectBaseClass,yt.libraryFactory,yt.onCreatedLibrary);return Object.freeze({baseClass:ct.baseClass.bind(ct),wrapSuperClass:ct.wrapSuperClass.bind(ct),declareClass:ct.declareClass.bind(ct),createLibrary:ct.createLibrary.bind(ct),creator:yt.coreFunctions.creator,updater:yt.coreFunctions.updater,wrapper:yt.coreFunctions.wrapper,unwrapper:yt.coreFunctions.unwrapper,jsxUnwrapper:yt.coreFunctions.jsxUnwrapper,getter:yt.coreFunctions.getter,setter:yt.coreFunctions.setter,caller:yt.coreFunctions.caller,remover:yt.coreFunctions.remover,prefix:yt.coreFunctions.prefix,postfix:yt.coreFunctions.postfix})}function uu(){for(var yt=[],ct=arguments.length,at=new Array(ct),ut=0;ut<ct;ut++)at[ut]=arguments[ut];return at.map(function(ot){return en(ot)}).forEach(function(ot){yt.length===0||!Jr(ot)?yt=ot:yt=vn(yt,ot)}),yt.join("/")}function en(yt){var ct=yt.split("/");return ct.length>0&&(ct[0]==="."&&ct.shift(),ct[ct.length-1]===""&&ct.pop()),ct}function Jr(yt){return yt.length>0&&yt[0]!==""}function vn(yt,ct){var at=fn(yt),ut=fn(ct);if(at.pureCells.length>ut.doubleDotsCount){for(var ot=0;ot<ut.doubleDotsCount;++ot)at.pureCells.pop();return[].concat(Ct(gn(at.doubleDotsCount)),Ct(at.pureCells),Ct(ut.pureCells))}else{var gt=ut.doubleDotsCount-at.pureCells.length;return[].concat(Ct(gn(at.doubleDotsCount+gt)),Ct(ut.pureCells))}}function fn(yt){var ct=[],at=0,ut=Jt(yt),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;gt===".."?at+=1:ct.push(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}return{doubleDotsCount:at,pureCells:ct}}function gn(yt){for(var ct=[],at=0;at<yt;++at)ct.push("..");return ct}var mn=function yt(ct){var at=this;Ot(this,yt),this.contextsStack=[],this.context=function(ut){switch(ut){case"index":{var ot=Ku({akkoVersion:at.akkoVersion,akkoObjectBaseClass:at.akkoObjectBaseClass,libraryFactory:at.libraryFactory,coreFunctions:at.coreFunctions,onCreatedLibrary:function(){return at.contextsStack.pop()}});return at.contextsStack.push(ot),ot}case"module":{var gt=at.contextsStack[at.contextsStack.length-1];if(!gt)throw new Gu("can't import index out of library");return gt}default:throw new Gu("unexpect mode ".concat(JSON.stringify(ut)))}},this.isAkkoObject=function(ut){return ut instanceof at.akkoObjectBaseClass},this.getLibrary=function(ut){if(typeof ut=="function"){var ot=ut.__library;if(tr(ot)=="object")return ot}else if(at.isAkkoObject(ut))return at.getLibrary(ut.constructor)},this.akkoVersion=ct.akkoVersion,this.akkoObjectBaseClass=ct.akkoObjectBaseClass,this.libraryFactory=ct.libraryFactory,this.coreFunctions=Object.freeze(bs({},ct.coreFunctions))};function ss(yt){return yt.type===Ns.Property}function ga(yt){return yt.type===Ns.Method}var Ns;(function(yt){yt.Method="method",yt.Property="property"})(Ns||(Ns={}));var vs;(function(yt){yt.Value="value",yt.Readonly="readonly",yt.Writeonly="writeonly",yt.Accessible="accessible"})(vs||(vs={}));var Xs=(function(){function yt(ct){var at=this;Ot(this,yt),this.invoker=ct,this.timer=null,this.fireAt=-1,this.invokeWhenTimeout=function(){var ut=Date.now();if(ut>=at.fireAt)at.timer=null,at.fireAt=-1,at.invoker();else{var ot=at.fireAt-ut;at.timer=setTimeout(at.invokeWhenTimeout,ot)}}}return Bt(yt,[{key:"isRunning",get:function(){return this.timer!==null}},{key:"refreshAndInvokeAfterInterval",value:function(at){var ut=Date.now();if(this.timer===null)this.timer=setTimeout(this.invokeWhenTimeout,at),this.fireAt=ut+at;else{var ot=ut+at;ot<=this.fireAt&&(clearTimeout(this.timer),this.timer=setTimeout(this.invokeWhenTimeout,at)),this.fireAt=ot}}},{key:"cancel",value:function(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null)}},{key:"dispose",value:function(){this.cancel(),this.invoker=yt.emptyInvoker}}],[{key:"emptyInvoker",value:function(){}}]),yt})();function co(yt){return(typeof window>"u"?"undefined":tr(window))=="object"&&"requestIdleCallback"in window?new Mo(yt):new ls}var ls=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"invokeOnIdle",value:function(at){for(var ut=arguments.length,ot=new Array(ut>1?ut-1:0),gt=1;gt<ut;gt++)ot[gt-1]=arguments[gt];return new Promise(function(xt,Mt){try{xt(at.apply(void 0,ot))}catch(kt){Mt(kt)}})}},{key:"invoke",value:function(at){for(var ut=arguments.length,ot=new Array(ut>1?ut-1:0),gt=1;gt<ut;gt++)ot[gt-1]=arguments[gt];return at.apply(void 0,ot)}}]),yt})(),Mo=(function(){function yt(ct){var at=this;Ot(this,yt),this.queue=[],this.isWaitingIdle=!1,this.onFire=function(){try{if(at.queue.length>0){var ut=at.config,ot=ut.checkingTimeMod,gt=ut.maxInvokingDuration,xt=ut.maxPaddingDuration,Mt=Date.now(),kt;for(kt=0;kt<at.queue.length;++kt){var zt=at.queue[kt];if(at.handle(zt),Mt<zt.beginAt+xt&&kt!==0&&kt%ot==0&&Date.now()-Mt>gt)break}at.queue.splice(0,kt+1),at.isWaitingIdle=!1,at.queue.length>0&&at.requestNextFire()}}catch(Ht){console.error("[Error] IdleQueue is crash (akko-core)"),console.error(Ht)}},this.handle=function(ut){var ot=ut.invoker,gt=ut.params,xt=ut.resolve,Mt=ut.reject;try{xt(ot.apply(void 0,Ct(gt)))}catch(kt){Mt(kt)}},this.config=Object.freeze(bs({},ct))}return Bt(yt,[{key:"invoke",value:function(at){for(var ut=arguments.length,ot=new Array(ut>1?ut-1:0),gt=1;gt<ut;gt++)ot[gt-1]=arguments[gt];return this.queue.length>0&&this.queue.splice(0).forEach(this.handle),at.apply(void 0,ot)}},{key:"invokeOnIdle",value:function(at){for(var ut=this,ot=arguments.length,gt=new Array(ot>1?ot-1:0),xt=1;xt<ot;xt++)gt[xt-1]=arguments[xt];return new Promise(function(Mt,kt){var zt=Date.now();ut.queue.push({invoker:at,params:gt,beginAt:zt,resolve:Mt,reject:kt}),!ut.isWaitingIdle&&ut.queue.length===1&&(ut.isWaitingIdle=!0,ut.requestNextFire())})}},{key:"requestNextFire",value:function(){window.requestIdleCallback(this.onFire,{timeout:this.config.timeout})}}]),yt})(),Nu=(function(){function yt(ct,at){Ot(this,yt),this.isFreezed=!1,this.shouldInvokeAfterFreeze=!1,this.latestInvokeTimestamp=0,this.timer=-1,this._limitDuration=ct,this.invoker=at,this.invokeWhenTimeout=this.invokeWhenTimeout.bind(this)}return Bt(yt,[{key:"limitDuration",get:function(){return this._limitDuration},set:function(at){if(this._limitDuration!==at){if(this._limitDuration=at,this.timer!==-1){clearTimeout(this.timer);var ut=this.nextInvokeTimeDuration();this.timer=setTimeout(this.invokeWhenTimeout,ut)}this.invoke()}}},{key:"isWaitingToInvoke",get:function(){return this.shouldInvokeAfterFreeze||this.timer!==-1}},{key:"invoke",value:function(){if(this.isFreezed)this.shouldInvokeAfterFreeze=!0;else if(this.timer===-1){var at=this.nextInvokeTimeDuration();this.timer=setTimeout(this.invokeWhenTimeout,at)}}},{key:"nextInvokeTimeDuration",value:function(){var at=Date.now(),ut=this.latestInvokeTimestamp+this.limitDuration-at;return Math.max(0,ut)}},{key:"invokeWhenTimeout",value:function(){this.timer=-1,this.latestInvokeTimestamp=Date.now(),this.invoker()}},{key:"cancel",value:function(){this.isFreezed?this.shouldInvokeAfterFreeze=!1:this.timer!==-1&&(clearTimeout(this.timer),this.timer=-1)}},{key:"freeze",value:function(){this.isFreezed||(this.timer!==-1&&(clearTimeout(this.timer),this.timer=-1,this.shouldInvokeAfterFreeze=!0),this.isFreezed=!0)}},{key:"unfreeze",value:function(){!this.isFreezed||(this.isFreezed=!1,this.shouldInvokeAfterFreeze&&(this.shouldInvokeAfterFreeze=!1,this.invoke()))}}]),yt})(),Ou=Object.freeze(["alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigma","tau","upsilon","phi","chi","psi","omega"]),$u=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.x=ct,this.y=at,this.z=ut,this.suffix=ot,Object.freeze(this)}return Bt(yt,[{key:"withoutSuffix",value:function(){return new yt(this.x,this.y,this.z)}},{key:"toString",value:function(){var at="".concat(this.x,".").concat(this.y,".").concat(this.z);return this.suffix&&(at+="-".concat(this.suffix.greekLetter,".").concat(this.suffix.number)),at}}],[{key:"parse",value:function(at){if(!/^\d+\.\d+\.\d+(-\w+\.\d+)?$/i.test(at))throw new Error("invalid version format ".concat(JSON.stringify(at)));var ut=at.match(/-\w+\.\d+$/),ot,gt=at;ut&&(ot=yt.parseSuffix(at,ut[0].replace(/^-/i,"")),gt=at.substring(0,at.length-ut[0].length));var xt=yt.parseVersionArray(at,gt),Mt=mt(xt,3),kt=Mt[0],zt=Mt[1],Ht=Mt[2];return new yt(kt,zt,Ht,ot)}},{key:"parseSuffix",value:function(at,ut){var ot=ut.split("."),gt=ot[0];if(Ou.indexOf(gt)===-1)throw new Error("invalid Greek letter ".concat(JSON.stringify(gt)," of ").concat(JSON.stringify(at)));var xt=parseInt(ot[1],10);if(!Number.isSafeInteger(xt))throw new Error("invalid version number ".concat(JSON.stringify(xt)," of ").concat(JSON.stringify(at)));return Object.freeze({greekLetter:gt,number:xt})}},{key:"parseVersionArray",value:function(at,ut){var ot=[],gt=Jt(ut.split(".")),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=parseInt(Mt,10);if(!Number.isSafeInteger(kt))throw new Error("invalid version number ".concat(JSON.stringify(Mt)," of ").concat(JSON.stringify(at)));ot.push(kt)}}catch(zt){gt.e(zt)}finally{gt.f()}return ot}},{key:"compare",value:function(at,ut){var ot=at.x-ut.x;if(ot!==0||(ot=at.y-ut.y,ot!==0)||(ot=at.z-ut.z,ot!==0))return ot;if(!at.suffix&&ut.suffix)return 1;if(at.suffix&&!ut.suffix)return-1;if(!at.suffix&&!ut.suffix)return 0;var gt=at.suffix.greekLetter,xt=ut.suffix.greekLetter;return ot=Ou.indexOf(gt)-Ou.indexOf(xt),ot!==0?ot:at.suffix.number-ut.suffix.number}}]),yt})(),Hu="1.4.4",kl=ln(requireSparkMd5()),Uu=Object.defineProperty,tl=Object.defineProperties,rl=Object.getOwnPropertyDescriptors,Wu=Object.getOwnPropertySymbols,tp=Object.prototype.hasOwnProperty,Al=Object.prototype.propertyIsEnumerable,om=function(ct,at,ut){return at in ct?Uu(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Op=function(ct,at){for(var ut in at||(at={}))tp.call(at,ut)&&om(ct,ut,at[ut]);if(Wu){var ot=Jt(Wu(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;Al.call(at,ut)&&om(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},op=function(ct,at){return tl(ct,rl(at))};function wl(yt){for(var ct=new String(yt),at=0,ut=0,ot=0;ot<ct.length;++ot)ut=ct.charCodeAt(ot),ut<128?at+=1:ut<2048?at+=2:(ut&64512)==55296&&(ct.charCodeAt(ot+1)&64512)==56320?(++ot,at+=4):at+=3;return at}function um(yt,ct,at){var ut=ct;if(at<1)return"";for(var ot=ut+at,gt=[],xt=null,Mt=0,kt;ut<ot;)kt=yt.getUint8(ut++),kt<128?gt[Mt++]=kt:kt>191&&kt<224?gt[Mt++]=(kt&31)<<6|yt.getUint8(ut++)&63:kt>239&&kt<365?(kt=((kt&7)<<18|(yt.getUint8(ut++)&63)<<12|(yt.getUint8(ut++)&63)<<6|yt.getUint8(ut++)&63)-65536,gt[Mt++]=55296+(kt>>10),gt[Mt++]=56320+(kt&1023)):gt[Mt++]=(kt&15)<<12|(yt.getUint8(ut++)&63)<<6|yt.getUint8(ut++)&63,Mt>8191&&((xt||(xt=[])).push(String.fromCharCode.apply(String,gt)),Mt=0);return xt?(Mt&&xt.push(String.fromCharCode.apply(String,gt.slice(0,Mt))),xt.join("")):String.fromCharCode.apply(String,gt.slice(0,Mt))}function Im(yt,ct){for(var at=new String(yt),ut,ot,gt=0;gt<at.length;++gt)ut=at.charCodeAt(gt),ut<128?ct.pushUint8(ut):ut<2048?(ct.pushUint8(ut>>6|192),ct.pushUint8(ut&63|128)):(ut&64512)==55296&&((ot=at.charCodeAt(gt+1))&64512)==56320?(ut=65536+((ut&1023)<<10)+(ot&1023),++gt,ct.pushUint8(ut>>18|240),ct.pushUint8(ut>>12&63|128),ct.pushUint8(ut>>6&63|128),ct.pushUint8(ut&63|128)):(ct.pushUint8(ut>>12|224),ct.pushUint8(ut>>6&63|128),ct.pushUint8(ut&63|128))}var Il=Math.pow(2,32),sn=Il-1,mr=256,fr=(function(){function yt(){Ot(this,yt),this._length=0,this.bufferChunks=[],this.appendNewChunk()}return Bt(yt,[{key:"length",get:function(){return this._length}},{key:"toBuffer",value:function(){var at=du(this.length),ut=0,ot=Jt(this.bufferChunks),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;at.fill(xt.buffer,ut,0,xt.length),ut+=xt.length}}catch(Mt){ot.e(Mt)}finally{ot.f()}return at}},{key:"generateHash",value:function(at,ut){for(var ot=0,gt=at;;){if(ot>=this.bufferChunks.length)return"";var xt=this.bufferChunks[ot].length;if(gt<xt)break;gt-=xt,ot+=1}for(var Mt=ut,kt=new wn.default.ArrayBuffer;ot<this.bufferChunks.length;++ot){var zt=this.bufferChunks[ot],Ht=zt.buffer,rr=zt.length,ur=Math.min(rr-gt,Mt),_r=Ht.primitiveBuffer instanceof ArrayBuffer?new Uint8Array(Ht.primitiveBuffer,gt,ur):Ht.primitiveBuffer.subarray(gt,gt+ur);if(kt.append(_r),Mt-=ur,Mt<=0)return kt.end(!0);gt=0}return kt.end(!0)}},{key:"pushBuffer",value:function(at,ut,ot){var gt=Math.min(ot,this.currentChunk.buffer.byteLength-this.currentChunk.length);gt>0&&(this.currentChunk.buffer.fill(at,this.currentChunk.length,ut,gt),this.currentChunk.length+=gt,this._length+=gt);var xt=ot-gt;xt>0&&(this.currentChunk={buffer:at.slice(ut+gt,xt),length:xt},this.bufferChunks.push(this.currentChunk),this._length+=xt)}},{key:"pushUint8",value:function(at){this.currentChunk.length+1>this.currentChunk.buffer.byteLength&&this.appendNewChunk(),this.currentChunk.buffer.setUint8(this.currentChunk.length,at),this.currentChunk.length+=1,this._length+=1}},{key:"pushUint8Holder",value:function(){this.currentChunk.length+1>this.currentChunk.buffer.byteLength&&this.appendNewChunk();var at=this.currentChunk.length,ut=this.currentChunk.buffer;return this.currentChunk.length+=1,this._length+=1,function(ot){return ut.setUint8(at,ot)}}},{key:"pushUint16",value:function(at){this.currentChunk.length+2>this.currentChunk.buffer.byteLength&&this.appendNewChunk(),this.currentChunk.buffer.setUint16(this.currentChunk.length,at),this.currentChunk.length+=2,this._length+=2}},{key:"pushInt32",value:function(at){this.currentChunk.length+4>this.currentChunk.buffer.byteLength&&this.appendNewChunk(),this.currentChunk.buffer.setInt32(this.currentChunk.length,at),this.currentChunk.length+=4,this._length+=4}},{key:"pushUint32",value:function(at){this.currentChunk.length+4>this.currentChunk.buffer.byteLength&&this.appendNewChunk(),this.currentChunk.buffer.setUint32(this.currentChunk.length,at),this.currentChunk.length+=4,this._length+=4}},{key:"pushUint32Holder",value:function(){this.currentChunk.length+4>this.currentChunk.buffer.byteLength&&this.appendNewChunk();var at=this.currentChunk.length,ut=this.currentChunk.buffer;return this.currentChunk.length+=4,this._length+=4,function(ot){return ut.setUint32(at,ot)}}},{key:"pushFloat64",value:function(at){this.currentChunk.length+8>this.currentChunk.buffer.byteLength&&this.appendNewChunk(),this.currentChunk.buffer.setFloat64(this.currentChunk.length,at),this.currentChunk.length+=8,this._length+=8}},{key:"appendNewChunk",value:function(){var at=du(mr);this.currentChunk={buffer:at,length:0},this.bufferChunks.push(this.currentChunk)}}]),yt})(),yr;(function(yt){yt[yt.Never=0]="Never",yt[yt.Undefined=1]="Undefined",yt[yt.Null=2]="Null",yt[yt.String=3]="String",yt[yt.Integer32=4]="Integer32",yt[yt.Integer53=5]="Integer53",yt[yt.Float=6]="Float",yt[yt.Function=7]="Function",yt[yt.Object=8]="Object",yt[yt.Array=9]="Array",yt[yt.True=10]="True",yt[yt.False=11]="False",yt[yt.Buffer=12]="Buffer",yt[yt.HangUpObject=13]="HangUpObject"})(yr||(yr={}));var jr;(function(yt){yt[yt.Array=0]="Array",yt[yt.DeducedObject=1]="DeducedObject",yt[yt.AssertedObject=2]="AssertedObject",yt[yt.HangUpObject=3]="HangUpObject"})(jr||(jr={}));var un;(function(yt){yt[yt.Array=0]="Array",yt[yt.Object=1]="Object",yt[yt.HangUpObject=2]="HangUpObject"})(un||(un={}));var $n="__identifier",Yn="__hangUpMetadata",os=(function(){function yt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};Ot(this,yt),this.decorateObjectEnums=Object.freeze([1]),this.decorateObject=ct}return Bt(yt,[{key:"createObject",value:function(at,ut){var ot=ut===0?[]:{};return Object.defineProperty(ot,$n,{enumerable:!1,configurable:!0,value:at}),ot}},{key:"findIdentifier",value:function(at){return at[$n]}},{key:"findHangUpMetadata",value:function(at){return at[Yn]}},{key:"checkObjectEnum",value:function(at){return at.constructor===Array?0:Yn in at?2:1}},{key:"length",value:function(at){return at.length}},{key:"keys",value:function(at){return Object.keys(at)}},{key:"hasKey",value:function(at,ut){return ut in at}},{key:"getValue",value:function(at,ut){return at[ut]}},{key:"setValue",value:function(at,ut,ot){at[ut]=ot}},{key:"completeHangUpObject",value:function(at,ut){Object.defineProperty(at,Yn,{enumerable:!1,configurable:!0,value:Object.freeze(Op({},ut))})}}]),yt})();function Vs(){var yt={};return yt.id=-1,yt.key=yt,yt.index=yt,yt.properties=Object.freeze({}),Object.freeze(yt)}var eo=48,qo=58,Po=97,su=103,mu=15,zu=(function(){function yt(){Ot(this,yt);for(var ct=[],at=[],ut=0;ut<16;++ut){var ot=ut.toString(16).charCodeAt(0);ct[ut]=ot,at[ot]=ut}this.integerToCode=Object.freeze(ct),this.codeToInteger=Object.freeze(at)}return Bt(yt,[{key:"cleanUnmeaningZero",value:function(at,ut){for(;at.length>ut&&this.codeToInteger[at[at.length-1]]===0;)at.pop()}},{key:"pushInt53",value:function(at,ut){var ot=ut|0,gt=(ut-ot)/Il;this.pushUint32(at,ot),this.pushUint32(at,gt)}},{key:"readInt53",value:function(at,ut){var ot=2,gt=this.readInt32(at,ut);return this.readInt32(at,ut+4*ot)*Il+gt}},{key:"pushUint32",value:function(at,ut){var ot=at.length;at[ot]=this.integerToCode[ut&mu],at[ot+1]=this.integerToCode[ut>>4&mu],at[ot+2]=this.integerToCode[ut>>8&mu],at[ot+3]=this.integerToCode[ut>>12&mu],at[ot+4]=this.integerToCode[ut>>16&mu],at[ot+5]=this.integerToCode[ut>>20&mu],at[ot+6]=this.integerToCode[ut>>24&mu],at[ot+7]=this.integerToCode[ut>>28&mu]}},{key:"readUint32",value:function(at,ut){var ot=this.readInt32(at,ut);return ot<0&&(ot+=Il),ot}},{key:"readInt32",value:function(at,ut){for(var ot=0,gt=0;gt<8;++gt){var xt=this.codeToInteger[at.charCodeAt(ut+gt)];if(xt===void 0)return NaN;ot|=xt<<4*gt}return ot}},{key:"parseCode",value:function(at){return this.codeToInteger[at]}},{key:"toCode",value:function(at){return this.integerToCode[at]}},{key:"increment",value:function(at,ut){for(var ot=ut;;){if(at.length<=ot){at[ot]=eo+1;break}var gt=!0;switch(at[ot]+=1,at[ot]){case qo:{at[ot]=Po;break}case su:{at[ot]=eo,ot+=1,gt=!1;break}}if(gt)break}}},{key:"parseString",value:function(at){for(var ut=new String(at),ot=[],gt=0;gt<ut.length;++gt)ot.push(ut.charCodeAt(gt));return ot}},{key:"stringify",value:function(at){return String.fromCharCode.apply(String,at)}}]),yt})(),lu=new zu,vl="",up=-1,_c=16;function Bl(yt){return lu.readInt53(yt,0)}function rp(yt,ct){var at=[];return lu.pushInt53(at,yt),typeof ct=="number"&&ct>0&&(lu.pushInt53(at,ct),lu.cleanUnmeaningZero(at,_c)),new lp(yt,at)}function Kp(yt,ct){if(yt>sn)throw new Error("observerId ".concat(yt," is out of range 0 ~ ").concat(sn));var at=[],ut=new lm(yt,at);return lu.pushUint32(at,yt),ut.makeSureNextGenerationIdAfter(ct),ut}var lp=(function(){function yt(ct,at){Ot(this,yt),this.scopeId=ct,this.codes=at}return Bt(yt,[{key:"generate",value:function(){var at=lu.stringify(this.codes);return lu.increment(this.codes,_c),at}},{key:"createdCount",get:function(){for(var at=8,ut=_c,ot=0,gt=0,xt=0;xt<at;++xt){var Mt=this.codes[ut+xt];Mt===void 0?Mt=0:Mt=lu.parseCode(Mt),ot|=Mt<<4*xt}ut+=at;for(var kt=0;kt<at;++kt){var zt=this.codes[ut+kt];zt===void 0?zt=0:zt=lu.parseCode(zt),gt|=zt<<4*kt}return gt*Il+ot}},{key:"clone",value:function(){return new yt(this.scopeId,Ct(this.codes))}}]),yt})(),qp=8,lm=(function(){function yt(ct,at){Ot(this,yt),this.observerId=ct,this.codes=at,this._createdCount=0}return Bt(yt,[{key:"scopeId",get:function(){return 0}},{key:"createdCount",get:function(){return this._createdCount}},{key:"generate",value:function(){return this._createdCount+=1,lu.increment(this.codes,qp),lu.stringify(this.codes)}},{key:"clone",value:function(){return new yt(this.observerId,Ct(this.codes))}},{key:"makeSureNextGenerationIdAfter",value:function(at){for(var ut=[],ot=0;ot<at.length;++ot){var gt=at.charCodeAt(ot);if(lu.parseCode(gt)===void 0)throw new Error("invalid generationId");ut[ot]=gt}for(var xt=0;xt<ut.length;++xt)this.codes[xt+qp]=ut[xt]}}]),yt})(),dl=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.name="SerializerError",ot}return at})(At(Error)),el=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.name="DeserializerError",ot}return at})(At(Error)),gv=Math.pow(2,31)-1,Vm=-Math.pow(2,31),nl=15e4,Xo=3e5,xm=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.writer=ct,this.objectFormats=at,this.objectAdapter=ut,this.assertObjectFormat=ot,this.anyObjectFormat=Vs(),this.serializeTasksQueue=[],this.serializeBufferQueue=[],this.didObjectInQueueSet={},this.bufferIndexMap={},this.alreadyAlarm=!1}return Bt(yt,[{key:"serialize",value:function(at,ut){var ot=this.writer.putUint32Holder(),gt=this.writer.didWriteBytes,xt=1;this.objectFormats.length!==1&&(this.writer.writeUint32(at.length),xt=at.length);for(var Mt=0;Mt<xt;++Mt){var kt=this.objectFormats[Mt]||this.anyObjectFormat,zt=at[Mt];this.serializeValue(kt,zt)}for(var Ht=0;this.serializeTasksQueue.length>0;){if(Ht+=1,Ht>Xo)throw new dl("room object count over ".concat(Xo,", trigger circuit breaker"));!this.alreadyAlarm&&Ht>nl&&(console.warn("room object count over ".concat(nl)),this.alreadyAlarm=!0);var rr=this.serializeTasksQueue.pop();this.handleSerializeTask(rr)}this.writer.writeBigInt(vl),this.writer.writeUint32(this.serializeBufferQueue.length);var ur=Jt(this.serializeBufferQueue),_r;try{for(ur.s();!(_r=ur.n()).done;){var Dr=_r.value;this.writer.writeUint8(Dr.readonly?255:0),this.writer.writeBuffer(Dr)}}catch(Zr){ur.e(Zr)}finally{ur.f()}var Br=this.writer.didWriteBytes-gt,Ur=ut?this.writer.generateHash(gt,Br):yv;this.serializeHash(Ur),ot(Br+Tm)}},{key:"serializeValue",value:function(at,ut){tr(ut)!="object"?this.serializeNotObjectValue(ut):ut===null?this.writer.writeUint8(yr.Null):Sl(ut)?this.serializeBufferValue(ut):this.serializeObjectValue(at,ut)}},{key:"handleSerializeTask",value:function(at){var ut=at.identifier,ot=at.object,gt=at.objectEnum,xt=at.deducedFormat;switch(this.writer.writeBigInt(ut),gt){case un.Array:{this.writer.writeUint8(jr.Array),this.handleArraySerializeTask(ot,xt);break}case un.Object:{var Mt=this.assertObjectFormat(ot),kt=Mt?jr.AssertedObject:jr.DeducedObject,zt=Mt||xt,Ht=!Mt;this.writer.writeUint8(kt),this.handleObjectSerializeTask(ot,zt,Ht);break}case un.HangUpObject:{var rr=this.objectAdapter.findHangUpMetadata(ot),ur=$u.parse(rr.version),_r=ur.x,Dr=ur.y,Br=ur.z;this.writer.writeUint8(jr.HangUpObject),this.writer.writeUint32(rr.objectFormatId),this.writer.writeUint16(_r),this.writer.writeUint16(Dr),this.writer.writeUint16(Br),this.writer.writeUint8(yr.Never),this.handleHangUpObjectSerializeTask(ot);break}}}},{key:"serializeNotObjectValue",value:function(at){switch(tr(at)){case"undefined":{this.writer.writeUint8(yr.Undefined);break}case"string":{this.writer.writeUint8(yr.String),this.writer.writeString(at);break}case"number":{Number.isSafeInteger(at)?Vm<=at&&at<=gv?(this.writer.writeUint8(yr.Integer32),this.writer.writeInt32(at)):(this.writer.writeUint8(yr.Integer53),this.writer.writeInt53(at)):(this.writer.writeUint8(yr.Float),this.writer.writeFloat64(at));break}case"boolean":{at?this.writer.writeUint8(yr.True):this.writer.writeUint8(yr.False);break}default:throw new dl("not support ".concat(tr(at)," now"))}}},{key:"serializeBufferValue",value:function(at){var ut=this.bufferIndexMap[at.id];ut===void 0&&(ut=this.serializeBufferQueue.length,this.bufferIndexMap[at.id]=ut,this.serializeBufferQueue[ut]=at),this.writer.writeUint8(yr.Buffer),this.writer.writeUint32(ut)}},{key:"serializeObjectValue",value:function(at,ut){var ot=this.objectAdapter.findIdentifier(ut),gt=this.objectAdapter.checkObjectEnum(ut),xt;switch(gt){case un.Array:{xt=yr.Array;break}case un.Object:{xt=yr.Object;break}case un.HangUpObject:{xt=yr.HangUpObject;break}default:throw new Error("unrecognized object enum ".concat(gt))}this.writer.writeUint8(xt),this.writer.writeUint8(0),this.writer.writeBigInt(ot),this.pushToSerializeTaskQueueIfFirstCall({identifier:ot,object:ut,deducedFormat:at,objectEnum:gt})}},{key:"pushToSerializeTaskQueueIfFirstCall",value:function(at){this.didObjectInQueueSet[at.identifier]||(this.didObjectInQueueSet[at.identifier]=!0,this.serializeTasksQueue.push(at))}},{key:"handleArraySerializeTask",value:function(at,ut){var ot=this.objectAdapter.length(at),gt=ut.index;this.writer.writeUint32(ot);for(var xt=0;xt<ot;++xt)this.serializeValue(gt,this.objectAdapter.getValue(at,xt))}},{key:"handleObjectSerializeTask",value:function(at,ut,ot){this.writer.writeUint32(ut.id);for(var gt in ut.properties){var xt=ut.properties[gt];this.objectAdapter.hasKey(at,gt)?this.serializeValue(xt,this.objectAdapter.getValue(at,gt)):this.writer.writeUint8(yr.Never)}if(ot){var Mt=this.writer.putUint32Holder(),kt=0,zt=Jt(this.objectAdapter.keys(at)),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;rr in ut.properties||(this.writer.writeString(rr),this.serializeValue(ut.key,this.objectAdapter.getValue(at,rr)),kt+=1)}}catch(ur){zt.e(ur)}finally{zt.f()}Mt(kt)}else this.writer.writeUint32(0)}},{key:"handleHangUpObjectSerializeTask",value:function(at){var ut=this.writer.putUint32Holder(),ot=0,gt=Jt(this.objectAdapter.keys(at)),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;this.writer.writeString(Mt),this.serializeValue(this.anyObjectFormat,this.objectAdapter.getValue(at,Mt)),ot+=1}}catch(kt){gt.e(kt)}finally{gt.f()}ut(ot)}},{key:"serializeHash",value:function(at){for(var ut=0;ut<Tm;++ut)ut<at.length?this.writer.writeUint8(at.charCodeAt(ut)):this.writer.writeUint8(0)}}]),yt})(),nm=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.reader=ct,this.format=at,this.objectAdapter=ut,this.valuesLength=ot,this.objectStateMap=new Map,this.holdersMap=new Map,this.deserializeBufferSetterQueue=[],this.cacheMap=Object.freeze([new Map,new Map,new Map])}return Bt(yt,[{key:"deserialize",value:function(at){for(var ut=yt.simpleObjectAdapter,ot=this.reader.readUint32(),gt=this.reader.didReadBytes,xt=this.deserializeRootValuesLength(),Mt=[],kt=0;kt<xt;++kt)this.deserializeValue(ut,Mt,kt);for(;;){var zt=this.reader.readBigInt();if(zt===vl)break;this.deserializeArrayOrObjectBody(zt)}this.handleAllDeserializeBuffers(),this.invokeObjectDecorator();var Ht=this.reader.didReadBytes-gt;if(ot!==Ht+Tm)throw new el("expect bytes ".concat(ot,", instead of ").concat(Ht));var rr=this.deserializeHash();if(!at&&rr!==yv&&rr!==this.reader.generateHash(gt,Ht))throw new el("hash isn't matched");return Mt}},{key:"deserializeRootValuesLength",value:function(){return this.valuesLength!==1?this.reader.readUint32():1}},{key:"invokeObjectDecorator",value:function(){var at=this,ut=Object.freeze([]),ot=Jt(this.objectAdapter.decorateObjectEnums),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;this.cacheMap[xt].forEach(function(Mt,kt){var zt=at.objectStateMap.get(kt);if(zt){var Ht=at.holdersMap.get(kt)||ut,rr=zt.type,ur=zt.objectFormat;at.objectAdapter.decorateObject(Mt,rr,Ht,ur)}})}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"deserializeValue",value:function(at,ut,ot){var gt=this.reader.readUint8(),xt;switch(gt){case yr.Undefined:{at.setValue(ut,ot,void 0);break}case yr.Null:{at.setValue(ut,ot,null);break}case yr.String:{at.setValue(ut,ot,this.reader.readString());break}case yr.Integer32:{at.setValue(ut,ot,this.reader.readInt32());break}case yr.Integer53:{at.setValue(ut,ot,this.reader.readInt53());break}case yr.Float:{at.setValue(ut,ot,this.reader.readFloat64());break}case yr.True:{at.setValue(ut,ot,!0);break}case yr.False:{at.setValue(ut,ot,!1);break}case yr.Array:{this.reader.readUint8(),xt=this.reader.readBigInt();var Mt=this.readAndPushToDeserializeTaskQueueIfNeed(xt,un.Array);at.setValue(ut,ot,Mt);break}case yr.Object:{this.reader.readUint8(),xt=this.reader.readBigInt();var kt=this.readAndPushToDeserializeTaskQueueIfNeed(xt,un.Object);at.setValue(ut,ot,kt);break}case yr.HangUpObject:{this.reader.readUint8(),xt=this.reader.readBigInt();var zt=this.readAndPushToDeserializeTaskQueueIfNeed(xt,un.HangUpObject);at.setValue(ut,ot,zt);break}case yr.Buffer:{var Ht=this.reader.readUint32(),rr=this.deserializeBufferSetterQueue[Ht];rr||(rr=this.deserializeBufferSetterQueue[Ht]=[]),rr.push(function(ur){return at.setValue(ut,ot,ur)});break}case yr.Never:break;default:throw new dl("unrecognized primitiveType ".concat(JSON.stringify(gt)))}return xt}},{key:"readAndPushToDeserializeTaskQueueIfNeed",value:function(at,ut){var ot=this.cacheMap[ut],gt=ot.get(at);return gt||(gt=this.objectAdapter.createObject(at,ut),ot.set(at,gt)),gt}},{key:"deserializeArrayOrObjectBody",value:function(at){var ut=this.reader.readUint8();switch(ut){case jr.Array:{this.objectStateMap.set(at,{type:ut}),this.handleArrayDeserializerTask(this.cacheMap[un.Array].get(at));break}case jr.DeducedObject:case jr.AssertedObject:{var ot=this.cacheMap[un.Object].get(at),gt=this.reader.readUint32(),xt=this.format.findObjectFormat(gt);this.objectStateMap.set(at,{type:ut,objectFormat:xt}),this.handleObjectDeserializerTask(ot,xt);break}case jr.HangUpObject:{var Mt=this.cacheMap[un.HangUpObject].get(at),kt=this.reader.readUint32(),zt=this.reader.readUint16(),Ht=this.reader.readUint16(),rr=this.reader.readUint16();this.objectStateMap.set(at,{type:ut}),this.reader.readUint8(),this.handleHangUpObjectDeserializerTask(Mt,{objectFormatId:kt,version:"".concat(zt,".").concat(Ht,".").concat(rr)});break}}}},{key:"handleAllDeserializeBuffers",value:function(){for(var at=this.reader.readUint32(),ut=0;ut<at;++ut){var ot=this.reader.readUint8(),gt=this.reader.readBuffer();ot&&gt.freeze();var xt=this.deserializeBufferSetterQueue[ut],Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;zt(gt)}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}}}},{key:"handleArrayDeserializerTask",value:function(at){for(var ut=this.reader.readUint32(),ot=0;ot<ut;++ot)this.deserializeValueAndRecordHolders(at,ot)}},{key:"handleObjectDeserializerTask",value:function(at,ut){for(var ot in ut.properties)this.deserializeValueAndRecordHolders(at,ot);for(var gt=this.reader.readUint32(),xt=0;xt<gt;++xt){var Mt=this.reader.readString();this.deserializeValueAndRecordHolders(at,Mt)}}},{key:"handleHangUpObjectDeserializerTask",value:function(at,ut){for(var ot=this.reader.readUint32(),gt=0;gt<ot;++gt){var xt=this.reader.readString();this.deserializeValueAndRecordHolders(at,xt)}this.objectAdapter.completeHangUpObject(at,ut)}},{key:"deserializeValueAndRecordHolders",value:function(at,ut){var ot=this.deserializeValue(this.objectAdapter,at,ut);if(ot!==void 0){var gt=this.holdersMap.get(ot);gt||this.holdersMap.set(ot,gt=[]),gt.push({object:at,key:ut})}}},{key:"deserializeHash",value:function(){for(var at=new Array(Tm),ut=0;ut<Tm;++ut)at[ut]=this.reader.readUint8();return String.fromCharCode.apply(String,at)}}]),yt})(),vv=nm;vv.simpleObjectAdapter=new os;var rv=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.reader=ct,this.format=at,this.objectFormats=ut,this.objectAdapter=ot,this.arrayCacheMap={},this.objectCacheMap={},this.objectStateMap={},this.holdersMap={},this.deserializeTasksQueue=[],this.deserializeBufferSetterQueue=[]}return Bt(yt,[{key:"deserialize",value:function(at){for(var ut=yt.simpleObjectAdapter,ot=this.reader.readUint32(),gt=this.reader.didReadBytes,xt=this.deserializeRootValuesLength(),Mt=[],kt=0;kt<xt;++kt){var zt=this.objectFormats[kt]||yt.neverObjectFormat;this.deserializeValue(zt,ut,Mt,kt)}for(;;){var Ht=this.reader.readBigInt();if(Ht===vl)break;var rr=this.takeNextDeserializerTask(Ht);this.handleDeserializerTask(rr)}this.handleAllDeserializeBuffers(),this.invokeObjectDecorator();var ur=this.reader.didReadBytes-gt;if(ot!==ur+Tm)throw new el("expect bytes ".concat(ot,", instead of ").concat(ur));var _r=this.deserializeHash();if(!at&&_r!==yv&&_r!==this.reader.generateHash(gt,ur))throw new el("hash isn't matched");return Mt}},{key:"deserializeRootValuesLength",value:function(){return this.objectFormats.length!==1?this.reader.readUint32():1}},{key:"invokeObjectDecorator",value:function(){var at=Object.freeze([]);for(var ut in this.objectCacheMap){var ot=this.objectCacheMap[ut],gt=this.holdersMap[ut]||at,xt=this.objectStateMap[ut],Mt=xt.objectFormat,kt=xt.type;this.objectAdapter.decorateObject(ot,kt,gt,Mt)}}},{key:"deserializeValueAndRecordHolders",value:function(at,ut,ot){var gt=this.deserializeValue(at,this.objectAdapter,ut,ot);if(gt!==void 0){var xt=this.holdersMap[gt];xt||(this.holdersMap[gt]=xt=[]),xt.push({object:ut,key:ot})}}},{key:"deserializeValue",value:function(at,ut,ot,gt){var xt=this.reader.readUint8(),Mt;switch(xt){case yr.Undefined:{ut.setValue(ot,gt,void 0);break}case yr.Null:{ut.setValue(ot,gt,null);break}case yr.String:{ut.setValue(ot,gt,this.reader.readString());break}case yr.Integer32:{ut.setValue(ot,gt,this.reader.readInt32());break}case yr.Integer53:{ut.setValue(ot,gt,this.reader.readInt53());break}case yr.Float:{ut.setValue(ot,gt,this.reader.readFloat64());break}case yr.True:{ut.setValue(ot,gt,!0);break}case yr.False:{ut.setValue(ot,gt,!1);break}case yr.Object:{Mt=this.reader.readBigInt();var kt=this.readAndPushToDeserializeTaskQueueIfNeed(Mt,at,!1);ut.setValue(ot,gt,kt);break}case yr.Array:{Mt=this.reader.readBigInt();var zt=this.readAndPushToDeserializeTaskQueueIfNeed(Mt,at,!0);ut.setValue(ot,gt,zt);break}case yr.Buffer:{var Ht=this.reader.readUint32(),rr=this.deserializeBufferSetterQueue[Ht];rr||(rr=this.deserializeBufferSetterQueue[Ht]=[]),rr.push(function(ur){return ut.setValue(ot,gt,ur)});break}}return Mt}},{key:"readAndPushToDeserializeTaskQueueIfNeed",value:function(at,ut,ot){var gt=ot?this.arrayCacheMap:this.objectCacheMap,xt=gt[at];return xt||(gt[at]=xt=this.objectAdapter.createObject(at,ot?un.Array:un.Object),this.deserializeTasksQueue.push({isArray:ot,identifier:at,deducedFormat:ut,object:xt})),xt}},{key:"takeNextDeserializerTask",value:function(at){for(var ut=0;ut<this.deserializeTasksQueue.length;++ut){var ot=this.deserializeTasksQueue[ut];if(at===ot.identifier)return this.deserializeTasksQueue.splice(ut,1),ot}throw new el("can't find identifier ".concat(at," in task queue"))}},{key:"handleDeserializerTask",value:function(at){var ut=this.reader.readUint8(),ot=at.identifier;switch(ut){case jr.Array:{if(!at.isArray)throw new el("expect array");this.objectStateMap[ot]={type:ut,objectFormat:at.deducedFormat},this.handleArrayDeserializerTask(at.object,at.deducedFormat);break}case jr.DeducedObject:{if(at.isArray)throw new el("expect object");this.objectStateMap[ot]={type:ut,objectFormat:at.deducedFormat},this.handleObjectDeserializerTask(at.object,at.deducedFormat);break}case jr.AssertedObject:{if(at.isArray)throw new el("expect object");var gt=this.reader.readUint32(),xt=this.format.findObjectFormat(gt);this.objectStateMap[ot]={type:ut,objectFormat:xt},this.handleObjectDeserializerTask(at.object,xt);break}}}},{key:"handleAllDeserializeBuffers",value:function(){for(var at=this.reader.readUint32(),ut=0;ut<at;++ut){var ot=this.reader.readUint8(),gt=this.reader.readBuffer();ot&&gt.freeze();var xt=this.deserializeBufferSetterQueue[ut],Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;zt(gt)}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}}}},{key:"handleArrayDeserializerTask",value:function(at,ut){for(var ot=ut.index,gt=this.reader.readUint32(),xt=0;xt<gt;++xt)this.deserializeValueAndRecordHolders(ot,at,xt)}},{key:"handleObjectDeserializerTask",value:function(at,ut){for(var ot in ut.properties)this.deserializeValueAndRecordHolders(ut.properties[ot],at,ot);for(var gt=this.reader.readUint32(),xt=0;xt<gt;++xt){var Mt=this.reader.readString();this.deserializeValueAndRecordHolders(ut.key,at,Mt)}}},{key:"deserializeHash",value:function(){for(var at=new Array(Tm),ut=0;ut<Tm;++ut)at[ut]=this.reader.readUint8();return String.fromCharCode.apply(String,at)}}]),yt})(),Lp=rv;Lp.neverObjectFormat=Vs(),Lp.simpleObjectAdapter=new os;var cp;(function(yt){yt[yt.V0=0]="V0",yt[yt.V1=1]="V1"})(cp||(cp={}));var nv=$u.parse("1.4.2");function Hm(yt){var ct=yt;return typeof ct=="string"&&(ct=$u.parse(ct)),$u.compare(ct,nv)<0?0:1}var Rv=(function(){function yt(ct){Ot(this,yt),this.format=ct.format,this.objectAdapter=ct.objectAdapter,this.assertObjectFormat=ct.assertObjectFormat||function(){}}return Bt(yt,[{key:"serialize",value:function(at){var ut=at.writer,ot=at.values,gt=at.objectFormats,xt=at.includesHash;new xm(ut,gt,this.objectAdapter,this.assertObjectFormat).serialize(ot,xt)}},{key:"deserialize",value:function(at){var ut=at.reader,ot=at.objectFormats,gt=at.ignoreHashChecking,xt=at.version;switch(xt){case cp.V0:return new Lp(ut,this.format,ot,this.objectAdapter).deserialize(gt);case cp.V1:return new vv(ut,this.format,this.objectAdapter,ot.length).deserialize(gt);default:return[]}}}]),yt})(),mm=48,Wm=(function(){function yt(){Ot(this,yt),this.buffer=new fr}return Bt(yt,[{key:"generateHash",value:function(at,ut){return this.buffer.generateHash(at,ut)}},{key:"didWriteBytes",get:function(){return this.buffer.length}},{key:"writeBuffer",value:function(at){this.buffer.pushUint32(at.byteLength),at.byteLength>0&&this.buffer.pushBuffer(at,0,at.byteLength)}},{key:"writeUint8",value:function(at){this.buffer.pushUint8(at)}},{key:"putUint8Holder",value:function(){return this.buffer.pushUint8Holder()}},{key:"writeUint16",value:function(at){this.buffer.pushUint16(at)}},{key:"writeInt32",value:function(at){this.buffer.pushInt32(at)}},{key:"writeUint32",value:function(at){this.buffer.pushUint32(at)}},{key:"putUint32Holder",value:function(){return this.buffer.pushUint32Holder()}},{key:"writeInt53",value:function(at){var ut=at|0,ot=(at-ut)/Il;this.buffer.pushInt32(ut),this.buffer.pushInt32(ot)}},{key:"writeFloat64",value:function(at){this.buffer.pushFloat64(at)}},{key:"writeString",value:function(at){var ut=wl(at);this.writeInt32(ut),Im(at,this.buffer)}},{key:"writeBigInt",value:function(at){var ut=at;if(ut.length>255)throw new dl("length of identifier ".concat(ut.length," is greater than 255"));this.buffer.pushUint8(ut.length);for(var ot=Math.ceil(ut.length/2),gt=0;gt<ot;++gt){var xt=ut.charCodeAt(gt*2),Mt=ut.charCodeAt(gt*2+1);Number.isNaN(Mt)&&(Mt=mm);var kt=lu.parseCode(xt),zt=lu.parseCode(Mt);if(kt===void 0||zt===void 0)throw new dl("invalid big integer ".concat(JSON.stringify(at)));this.buffer.pushUint8(kt|zt<<4)}}},{key:"writeReadSlice",value:function(at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt=gt.offset,Mt=gt.byteLength,kt=gt.buffer;this.buffer.pushBuffer(kt,xt,Mt)}}catch(zt){ut.e(zt)}finally{ut.f()}}},{key:"toBuffer",value:function(){return this.buffer.toBuffer()}}]),yt})(),uy=[],Sm=[0],wm=[0,0],tm=[0,0,0],iv=[0,0,0,0],_d=[0,0,0,0,0],Xm=[0,0,0,0,0,0],Cl=[0,0,0,0,0,0,0],Cy=[0,0,0,0,0,0,0,0];function zv(yt){switch(yt){case 0:return uy;case 1:return Sm;case 2:return wm;case 3:return tm;case 4:return iv;case 5:return _d;case 6:return Xm;case 7:return Cl;case 8:return Cy;default:return[]}}var Fp=(function(){function yt(ct){Ot(this,yt),this._offset=0,this.buffer=ct}return Bt(yt,[{key:"offset",get:function(){return this._offset}},{key:"generateHash",value:function(at,ut){var ot=new kl.default.ArrayBuffer,gt=this.buffer.primitiveBuffer instanceof ArrayBuffer?new Uint8Array(this.buffer.primitiveBuffer,at,ut):this.buffer.primitiveBuffer.subarray(at,at+ut);return ot.append(gt),ot.end(!0)}},{key:"didReadBytes",get:function(){return this._offset}},{key:"readBuffer",value:function(){var at=this.buffer.getUint32(this._offset);this._offset+=4;var ut=this.buffer.slice(this._offset,at);return this._offset+=at,ut}},{key:"readUint8",value:function(){var at=this.buffer.getUint8(this._offset);return this._offset+=1,at}},{key:"readUint16",value:function(){var at=this.buffer.getUint16(this._offset);return this._offset+=2,at}},{key:"readInt32",value:function(){var at=this.buffer.getInt32(this._offset);return this._offset+=4,at}},{key:"readUint32",value:function(){var at=this.buffer.getUint32(this._offset);return this._offset+=4,at}},{key:"readInt53",value:function(){var at=this.buffer.getInt32(this._offset);this._offset+=4;var ut=this.buffer.getInt32(this._offset);return this._offset+=4,ut*Il+at}},{key:"readFloat64",value:function(){var at=this.buffer.getFloat64(this._offset);return this._offset+=8,at}},{key:"readString",value:function(){var at=this.readInt32(),ut=um(this.buffer,this._offset,at);return this._offset+=at,ut}},{key:"readBigInt",value:function(){for(var at=this.readUint8(),ut=Math.ceil(at/2),ot=zv(at),gt=0;gt<ut;++gt){var xt=this.readUint8(),Mt=xt&15,kt=xt>>4&15;ot[gt*2]=lu.toCode(Mt),gt*2+1<at&&(ot[gt*2+1]=lu.toCode(kt))}return String.fromCharCode.apply(String,ot)}},{key:"skipBytes",value:function(at){return this._offset+=at,at}},{key:"sliceLatestBytes",value:function(at){return[{offset:this._offset-at,buffer:this.buffer,byteLength:at}]}}]),yt})(),Tm=16,yv=(function(){for(var yt=[],ct=0;ct<Tm;++ct)yt[ct]=0;return String.fromCharCode.apply(String,yt)})(),_l=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.name="FormatError",ot}return at})(At(Error)),Wp;(function(yt){yt[yt.Indeterminate=0]="Indeterminate",yt[yt.Circular=1]="Circular",yt[yt.Noncircular=2]="Noncircular"})(Wp||(Wp={}));var Zp;(function(yt){yt[yt.Border=0]="Border",yt[yt.Compound=1]="Compound",yt[yt.Object=2]="Object",yt[yt.Handle=3]="Handle"})(Zp||(Zp={}));var Xp=(function(){function yt(ct,at,ut){Ot(this,yt),this.templateEnvironment=ct,this.templateType=at,this.params=ut,this.expandedParamNodes=[],this.convertTypeToGeneratorParam=this.convertTypeToGeneratorParam.bind(this);for(var ot=0;ot<ut.length;++ot)this.expandedParamNodes[ot]=void 0}return Bt(yt,[{key:"getExpandedExpression",value:function(){return this.expandNode(this.templateType)}},{key:"expandNode",value:function(at){switch(at.typeEnum){case Ko.Any:case Ko.Never:case Ko.Undefined:case Ko.Null:case Ko.String:case Ko.Number:case Ko.Boolean:case Ko.Function:return{type:at,clazz:0};case Ko.Object:{var ut=at,ot={};for(var gt in ut.properties){var xt=ut.properties[gt];ot[gt]=this.expandNode(xt)}return{type:ut,clazz:2,key:this.expandNode(ut.key),index:this.expandNode(ut.index),properties:ot}}case Ko.And:case Ko.Or:{var Mt=at,kt=[],zt=Jt(Mt.children),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;kt.push(this.expandNode(rr))}}catch(ur){zt.e(ur)}finally{zt.f()}return{type:Mt,clazz:1,children:kt}}case Ko.Generator:return this.expandGeneratorType(at);case Ko.Generic:return this.expandGenericType(at);case Ko.Reference:case Ko.GlobalReference:return this.expandReferenceType(at)}throw new _l("unrecognized enum type "+at.typeEnum)}},{key:"expandGeneratorType",value:function(at){var ut=at.params.map(this.convertTypeToGeneratorParam),ot=this.templateEnvironment.getTemplate(at.template);return{clazz:3,handle:ot.getHandle(ut)}}},{key:"convertTypeToGeneratorParam",value:function(at){var ut=this.expandNode(at);return ut.clazz===3?ut.handle:ut.type}},{key:"expandGenericType",value:function(at){var ut=at.index,ot=this.expandedParamNodes[ut];if(!ot){var gt=this.params[ut];if(!gt)throw new _l("generic index ".concat(ut," is out of range: 0 ~ ").concat(this.params.length-1));ot=this.covertParamTypeToExpandedNode(gt),this.expandedParamNodes[ut]=ot}return ot}},{key:"expandReferenceType",value:function(at){var ut=this.templateEnvironment.replaceReferenceType(at),ot;return ut.typeEnum===Ko.Generator?ot=ut:ot={typeEnum:Ko.Generator,template:ut,params:[]},this.expandGeneratorType(ot)}},{key:"covertParamTypeToExpandedNode",value:function(at){return"id"in at?this.expandNode(at):{clazz:3,handle:at}}}]),yt})(),np=(function(){function yt(ct){Ot(this,yt),this.rootExpandedNode=ct}return Bt(yt,[{key:"getCollapsedExpression",value:function(){return this.collapseNode(this.rootExpandedNode)}},{key:"collapseNode",value:function(at){switch(at.clazz){case Zp.Border:return{id:yt.generateId(),hasCircular:!1,types:[at.type.typeEnum]};case Zp.Object:return this.collapseObjectExpandedNode(at);case Zp.Handle:return this.collapseHandleExpandedNode(at);case Zp.Compound:return this.collapseCompoundExpandedNode(at,at.type.typeEnum);default:throw new Error("invalid class ".concat(at.clazz))}}},{key:"collapseObjectExpandedNode",value:function(at){var ut=at.key,ot=at.index,gt=at.properties,xt=this.collapseNode(ut),Mt=this.collapseNode(ot),kt=xt.hasCircular||Mt.hasCircular,zt={};for(var Ht in gt){var rr=gt[Ht],ur=this.collapseNode(rr);zt[Ht]=ur,kt=kt||ur.hasCircular}var _r={key:xt,index:Mt,properties:zt};return this.isCollapsedObjectHasNeverPropertyTypes(_r)?yt.neverCollapsedNode:{id:yt.generateId(),hasCircular:kt,types:[Ko.Object],object:_r}}},{key:"collapseHandleExpandedNode",value:function(at){var ut=at.handle;switch(ut.state){case Wp.Noncircular:return ut.collapsedNode;case Wp.Indeterminate:case Wp.Circular:return{id:yt.generateId(),hasCircular:!0,types:[Ko.Object],handle:ut};default:throw new Error("invalid state ".concat(ut.state))}}},{key:"collapseCompoundExpandedNode",value:function(at,ut){var ot=at.children,gt=[],xt=Jt(ot),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;gt.push(this.collapseNode(kt))}}catch(_r){xt.e(_r)}finally{xt.f()}if(gt.length===0)return yt.neverCollapsedNode;if(gt.length===1)return gt[0];for(var zt=0,Ht=gt;zt<Ht.length;zt++){var rr=Ht[zt];if(rr.handle&&rr.handle.state===Wp.Indeterminate){var ur=ut===Ko.And?"&":"|";throw new _l('can not operate an indeterminate expression with "'.concat(ur,'" sign'))}}return ut===Ko.And?this.pruneAndMergeNodes(gt):this.flattenNodes(gt)}},{key:"pruneAndMergeNodes",value:function(at){var ut=this.collectCrossTypeEnumsWith(at);if(ut.length===0||ut.find(function(gt){return gt===Ko.Never}))return yt.neverCollapsedNode;var ot=this.collectAllObjectCollapsedNodesIn(at);return this.handleObjectCollapsedNodesWithTypeEnums(ot,ut,Ko.And)}},{key:"flattenNodes",value:function(at){var ut=this.collectUnionTypeEnumsWith(at);if(ut=ut.filter(function(gt){return gt!==Ko.Never}),ut.length===0)return yt.neverCollapsedNode;if(ut.find(function(gt){return gt===Ko.Any}))return{id:yt.generateId(),hasCircular:!1,types:[Ko.Any]};var ot=this.collectAllObjectCollapsedNodesIn(at);return this.handleObjectCollapsedNodesWithTypeEnums(ot,ut,Ko.Or)}},{key:"collectCrossTypeEnumsWith",value:function(at){var ut={},ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value.types,Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=ut[zt];Ht===void 0&&(Ht=0),ut[zt]=Ht+1}}catch(_r){Mt.e(_r)}finally{Mt.f()}}}catch(_r){ot.e(_r)}finally{ot.f()}var rr=[];for(var ur in ut)ut[ur]===at.length&&rr.push(ur);return rr}},{key:"collectUnionTypeEnumsWith",value:function(at){var ut={},ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value.types,Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;ut[zt]=!0}}catch(ur){Mt.e(ur)}finally{Mt.f()}}}catch(ur){ot.e(ur)}finally{ot.f()}var Ht=[];for(var rr in ut)ut[rr]&&Ht.push(rr);return Ht}},{key:"collectAllObjectCollapsedNodesIn",value:function(at){var ut=[],ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;(xt.object||xt.handle)&&ut.push(xt)}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut}},{key:"handleObjectCollapsedNodesWithTypeEnums",value:function(at,ut,ot){var gt,xt=at;if(xt.length===0)return{id:yt.generateId(),hasCircular:!1,types:ut};if(xt.length===1)return op(Op({},xt[0]),{id:yt.generateId(),types:ut});var Mt=[];if(xt=xt.filter(function(_r){return _r.handle?(Mt.push(_r),!1):!0}),Mt.length>=2){var kt=ot===Ko.And?"&":"|";throw new _l("can not ".concat(Mt.length,' circular expression with "').concat(kt,'" sign'))}(gt=xt).push.apply(gt,Mt);for(var zt=xt[0].object,Ht=1;Ht<xt.length;++Ht){if(ot===Ko.And&&this.isCollapsedObjectHasNeverPropertyTypes(zt))return yt.neverCollapsedNode;var rr=xt[Ht],ur=this.getObjectFromObjectCollapsedNode(rr);ot===Ko.And?zt=this.factorizeWithAndOperation(zt,ur):zt=this.factorizeWithOrOperation(zt,ur)}return this.isCollapsedObjectHasNeverPropertyTypes(zt)?yt.neverCollapsedNode:{id:yt.generateId(),types:ut,hasCircular:this.hasCircularIn(xt),object:zt}}},{key:"getObjectFromObjectCollapsedNode",value:function(at){for(var ut=at;;){if(ut.object)return ut.object;ut=ut.handle.collapsedNode}}},{key:"hasCircularIn",value:function(at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.hasCircular;if(gt)return!0}}catch(xt){ut.e(xt)}finally{ut.f()}return!1}},{key:"factorizeWithAndOperation",value:function(at,ut){var ot=[],gt=[],xt=[];for(var Mt in at.properties)Mt in ut.properties?ot.push(Mt):gt.push(Mt);for(var kt in ut.properties)kt in at.properties||xt.push(kt);for(var zt={},Ht=0,rr=ot;Ht<rr.length;Ht++){var ur=rr[Ht],_r=at.properties[ur],Dr=ut.properties[ur];zt[ur]=this.pruneAndMergeNodes([_r,Dr])}for(var Br=0,Ur=gt;Br<Ur.length;Br++){var Zr=Ur[Br];zt[Zr]=at.properties[Zr]}for(var Tn=0,jn=xt;Tn<jn.length;Tn++){var ts=jn[Tn];zt[ts]=ut.properties[ts]}return{key:this.pruneAndMergeKeyOrIndexNodes(at.key,ut.key),index:this.pruneAndMergeKeyOrIndexNodes(at.index,ut.index),properties:zt}}},{key:"factorizeWithOrOperation",value:function(at,ut){var ot=[];for(var gt in at.properties)gt in ut.properties&&ot.push(gt);for(var xt={},Mt=0,kt=ot;Mt<kt.length;Mt++){var zt=kt[Mt],Ht=at.properties[zt],rr=ut.properties[zt];xt[zt]=this.flattenNodes([Ht,rr])}return{key:this.flattenNodesKeyOrIndexNodes(at.key,ut.key),index:this.flattenNodesKeyOrIndexNodes(at.index,ut.index),properties:xt}}},{key:"pruneAndMergeKeyOrIndexNodes",value:function(at,ut){return this.isCollapsedNodeTypeEqual(at,Ko.Undefined)?ut:this.isCollapsedNodeTypeEqual(ut,Ko.Undefined)?at:this.pruneAndMergeNodes([at,ut])}},{key:"flattenNodesKeyOrIndexNodes",value:function(at,ut){return this.isCollapsedNodeTypeEqual(at,Ko.Undefined)?ut:this.isCollapsedNodeTypeEqual(ut,Ko.Undefined)?at:this.flattenNodes([at,ut])}},{key:"isCollapsedObjectHasNeverPropertyTypes",value:function(at){if(this.isCollapsedNodeTypeEqual(at.key,Ko.Never)||this.isCollapsedNodeTypeEqual(at.index,Ko.Never))return!0;for(var ut in at.properties)if(this.isCollapsedNodeTypeEqual(at.properties[ut],Ko.Never))return!0;return!1}},{key:"isCollapsedNodeTypeEqual",value:function(at,ut){return at.types.length!==1?!1:at.types[0]===ut}}],[{key:"generateId",value:function(){var at=this.nextId;return this.nextId+=1,"".concat(at)}}]),yt})(),Rm=np;Rm.nextId=0,Rm.neverCollapsedNode={id:np.generateId(),hasCircular:!1,types:[Ko.Never]};var _0=2500,bv=(function(){function yt(ct){Ot(this,yt),this.replaceReferenceType=ct,this.templatesTable={}}return Bt(yt,[{key:"getTemplate",value:function(at){if(at.id===void 0)throw new _l("templateType don't have id");var ut=this.templatesTable[at.id];return ut||(ut=new Cr(this,at),this.templatesTable[at.id]=ut),ut}}]),yt})(),Cr=(function(){function yt(ct,at){Ot(this,yt),this.templateEnvironment=ct,this.templateType=at,this.handlesCache=[]}return Bt(yt,[{key:"getHandle",value:function(at){var ut=this.getHandleByParams(at);if(!ut){ut={state:Wp.Indeterminate},this.setHandleWithParams(ut,Ct(at));var ot=this.createCollapsedNode(at);ut.collapsedNode=ot,ut.state=ot.hasCircular?Wp.Circular:Wp.Noncircular}return ut}},{key:"createCollapsedNode",value:function(at){var ut=new Xp(this.templateEnvironment,this.templateType,at).getExpandedExpression();return new Rm(ut).getCollapsedExpression()}},{key:"getHandleByParams",value:function(at){var ut=Jt(this.handlesCache),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(yt.isParamsEquals(gt.params,at))return gt.handle}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"setHandleWithParams",value:function(at,ut){if(this.handlesCache.length>=_0)throw new _l("the template's definition is divergence");this.handlesCache.push({handle:at,params:ut})}}],[{key:"isParamsEquals",value:function(at,ut){if(at.length!==ut.length)return!1;for(var ot=0;ot<at.length;++ot){var gt=at[ot],xt=ut[ot];if(gt!==xt&&(!("id"in gt)||!("id"in xt)||gt.id!==xt.id))return!1}return!0}}]),yt})(),ir=(function(){function yt(ct){Ot(this,yt),this.collapsedNodeToRecordMap={},this.recordMap={},this.nextRecordId=0,this.templateEnvironment=new bv(ct);var at=this.nextRecordId;this.nextRecordId+=1,this.recordMap[at]=this.anyObjectFormatRecord={id:at,key:at,index:at,properties:{}}}return Bt(yt,[{key:"covert",value:function(at){var ut=this.templateEnvironment.getTemplate(at).getHandle([]).collapsedNode,ot=this.findRecordId(ut);return this.recordMap[ot]}},{key:"getObjectFormatRecords",value:function(){var at=[];for(var ut in this.recordMap)at.push(this.recordMap[ut]);return at}},{key:"findRecordId",value:function(at){if(at.types.some(function(gt){return gt===Ko.Object})){var ut=this.collapsedNodeToRecordMap[at.id];if(!ut){var ot={id:this.nextRecordId};this.nextRecordId+=1,this.collapsedNodeToRecordMap[at.id]=ot,this.recordMap[ot.id]=ot,this.convertCollapsedNodeAndFillObjectFormatRecord(at,ot),ut=ot}return ut.id}else return this.anyObjectFormatRecord.id}},{key:"convertCollapsedNodeAndFillObjectFormatRecord",value:function(at,ut){for(var ot=at;ot.handle;)ot=ot.handle.collapsedNode;var gt=ot.object,xt={};for(var Mt in gt.properties)xt[Mt]=this.findRecordId(gt.properties[Mt]);ut.key=this.findRecordId(gt.key),ut.index=this.findRecordId(gt.index),ut.properties=xt}}]),yt})(),nr=(function(){function yt(){Ot(this,yt),this.replaceReferenceType=function(){throw new _l("not define referenceTypeReplacer")}}return Bt(yt,[{key:"createWithRecords",value:function(at,ut){var ot=new ir(ut||this.replaceReferenceType),gt=[],xt={},Mt=Jt(at),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt.type,rr=zt.interrupter,ur=ot.covert(Ht);rr&&(xt[ur.id]=rr),gt.push(ur.id)}}catch(jn){Mt.e(jn)}finally{Mt.f()}for(var _r=ot.getObjectFormatRecords().map(function(jn){var ts=xt[jn.id];return ts?ts(jn):jn}),Dr=new dr(_r),Br=[],Ur=0,Zr=gt;Ur<Zr.length;Ur++){var Tn=Zr[Ur];Br.push(Dr.findObjectFormat(Tn))}return{format:Dr,objectFormats:Br}}},{key:"createWithBuffer",value:function(at){return new dr(dr.deserialize(at))}}]),yt})(),dr=(function(){function yt(ct){Ot(this,yt),this.records={},this.formats={};var at=null,ut=Jt(ct),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt={};this.records[gt.id]=gt,this.formats[gt.id]=xt,this.isAnyObjectFormatRecord(gt)&&(at=xt)}}catch(Ht){ut.e(Ht)}finally{ut.f()}var Mt=Jt(ct),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;this.completeObjectFormat(this.formats[zt.id],zt)}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}if(!at)throw new Error("can't find any object format");this.anyObjectFormat=at,this.objectFormatIds=Object.freeze(ct.map(function(Ht){return Ht.id}).sort())}return Bt(yt,[{key:"isAnyObjectFormatRecord",value:function(at){for(var ut in at.properties)return!1;return at.index===at.id&&at.key===at.id}},{key:"completeObjectFormat",value:function(at,ut){at.id=ut.id,at.key=this.formats[ut.key],at.index=this.formats[ut.index],at.properties={};for(var ot in ut.properties)at.properties[ot]=this.formats[ut.properties[ot]];Object.freeze(at.properties),Object.freeze(at)}},{key:"findObjectFormat",value:function(at){var ut=this.formats[at];if(!ut)throw new Error("can't find ObjectFormat with id ".concat(at));return ut}},{key:"serialize",value:function(){var at=[],ut=new Wm;for(var ot in this.records)at.push(this.records[ot]);at.sort(function(kt,zt){return kt.id-zt.id}),ut.writeUint32(at.length);for(var gt=0,xt=at;gt<xt.length;gt++){var Mt=xt[gt];this.serializeRecord(Mt,ut)}return ut.toBuffer()}},{key:"serializeRecord",value:function(at,ut){if(at.id>sn)throw new _l("ObjectFormat's number can't greater than ".concat(sn));var ot=Object.keys(at.properties).sort();if(ot.length>sn)throw new _l("ObjectFormat's properties number can't greater than ".concat(sn));ut.writeUint32(at.id),ut.writeUint32(at.key),ut.writeUint32(at.index),ut.writeUint32(ot.length);var gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ut.writeString(Mt),ut.writeUint32(at.properties[Mt])}}catch(kt){gt.e(kt)}finally{gt.f()}}}],[{key:"deserialize",value:function(at){for(var ut=[],ot=new Fp(at),gt=ot.readUint32(),xt=0;xt<gt;++xt){for(var Mt=ot.readUint32(),kt=ot.readUint32(),zt=ot.readUint32(),Ht=ot.readUint32(),rr={},ur=0;ur<Ht;++ur){var _r=ot.readString(),Dr=ot.readUint32();rr[_r]=Dr}ut.push({id:Mt,key:kt,index:zt,properties:rr})}return ut}}]),yt})(),Pr=Math.pow(2,32)-1,Hr=Object.defineProperty,bn=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable,ms=function(ct,at,ut){return at in ct?Hr(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Es=function(ct,at){for(var ut in at||(at={}))Pn.call(at,ut)&&ms(ct,ut,at[ut]);if(bn){var ot=Jt(bn(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;Wn.call(at,ut)&&ms(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct};function ao(yt,ct){return yt===void 0?ct:yt}var Js=(function(){function yt(ct){Ot(this,yt);var at={},ut=[];for(var ot in ct){var gt=ct[ot],xt=ao(gt.enablePing,!0),Mt=ao(gt.useSSL,!0),kt=[],zt={};for(var Ht in gt.hosts)Ht==="*"?kt.push.apply(kt,Ct(this.readStringArray(gt.hosts[Ht]))):zt[Ht]=this.readStringArray(gt.hosts[Ht]);ut.push(ot),at[ot]=Object.freeze({enablePing:xt,useSSL:Mt,hosts:Object.freeze({default:Object.freeze(kt),regions:Object.freeze(zt)})})}this.keys=Object.freeze(ut.sort()),this.hosts=Object.freeze(Es({},at))}return Bt(yt,[{key:"readStringArray",value:function(at){return Object.freeze(typeof at=="string"?[at]:Ct(at))}},{key:"host",value:function(at){var ut=this.hosts[at];if(!ut)throw new Error("cannot find host ".concat(JSON.stringify(at)));return ut}}]),yt})(),po=(function(){function yt(ct,at){Ot(this,yt),this.nextIndex=0,this.enablePing=ct.enablePing,this.useSSL=ct.useSSL;var ut;if(at===void 0?ut=ct.hosts.default:ut=ct.hosts.regions[at]||ct.hosts.default,ut.length===0)throw at===void 0?new Error("expect region: unexpect undefined"):new Error("invalid region ".concat(JSON.stringify(at),": cannot find any hosts of region"));this.hosts=ut}return Bt(yt,[{key:"hostsCount",get:function(){return this.hosts.length}},{key:"host",value:function(){return this.hosts[this.nextIndex]}},{key:"markSuccess",value:function(at){}},{key:"markFail",value:function(at){var ut=this.nextIndex+1;ut>=this.hosts.length&&(ut=0),this.nextIndex=ut}}]),yt})(),So=(function(){function yt(ct){Ot(this,yt),this.fetcher=ct}return Bt(yt,[{key:"fetch",value:function(at,ut,ot){var gt=this;return new Promise(function(xt,Mt){var kt=setTimeout(zt,ot);function zt(){kt=null,Mt(new Error("timeout"))}gt.fetcher(at,ut).then(function(Ht){kt!==null&&(clearTimeout(kt),xt(Ht))}).catch(function(Ht){kt!==null&&(clearTimeout(kt),Mt(Ht))})})}}]),yt})(),$o=(function(){function yt(ct){Ot(this,yt);var at=new Js(ct.configmap),ut={};this.logger=ct.logger,this.fetcher=new So(ct.fetcher),this.keys=at.keys,this.onIngoreFetchError=ct.onIngoreFetchError,this.retryCount=ct.retryCount,this.retryLoopsCount=ct.retryLoopsCount,this.timeout=yt.parseTimeoutFromParams(ct.timeout),this.bussySleepDuration=ao(ct.bussySleepDuration,3*1e3);var ot=Jt(this.keys),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;ut[xt]=new po(at.host(xt),ct.region)}}catch(Mt){ot.e(Mt)}finally{ot.f()}this.loops=Object.freeze(ut)}return Bt(yt,[{key:"fetch",value:function(at){var ut=this,ot=this.parseFetchingContext(at),gt=ot.key,xt=this.loop(gt);return function(Mt,kt){return ut.fetchWithKey(ot,xt,Mt,kt)}}},{key:"origin",value:function(at,ut){var ot=this.loop(ut),gt=ot.host(),xt=at;return/:$/im.test(xt)||(xt+=":"),this.replaceProtocol(xt,ot.useSSL)+"//"+gt}},{key:"reportSuccess",value:function(at,ut){this.loop(at).markSuccess(ut)}},{key:"reportFail",value:function(at,ut){this.loop(at).markFail(ut)}},{key:"fetchWithKey",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt){var kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr,Tn,jn;return regeneratorRuntime.wrap(function(us){for(;;)switch(us.prev=us.next){case 0:kt=(Mt&&Mt.method||"get").toLowerCase(),zt=ot.enableRetry,zt===void 0&&(zt=this.checkIsIdempotent(kt)),Ht=zt?this.getFetchingCount(ot,gt):1,rr=null,ur=0;case 4:if(!(ur<Ht)){us.next=28;break}return _r=Date.now(),us.prev=6,Dr=gt.host(),Br=this.replaceURL(xt,Dr,gt.useSSL),this.logger&&this.logger.info(kt,Br),Ur=ot.timeout.length,Zr=ur<Ur?ot.timeout[ur]:ot.timeout[Ur-1],us.next=13,this.fetcher.fetch(Br,Mt,Zr);case 13:if(Tn=us.sent,this.isServerBussyCode(Tn.status)){us.next=16;break}return us.abrupt("return",(gt.markSuccess(Date.now()-_r),Tn));case 16:if(us.t0=ur<Ht-1,!us.t0){us.next=20;break}return us.next=20,new Promise(function(Os){return setTimeout(Os,ot.bussySleepDuration)});case 20:us.next=25;break;case 22:us.prev=22,us.t1=us.catch(6),rr=us.t1,gt.markFail(Date.now()-_r);case 25:++ur,us.next=4;break;case 28:throw this.onIngoreFetchError&&rr&&this.onIngoreFetchError(rr),jn="fail to ".concat(kt," ").concat(this.replaceHost(xt,gt.useSSL)),Ht>1&&(jn+=" after ".concat(Ht," times retries")),rr?rr=new Error("".concat(jn," and the last Error is: ").concat(rr.message)):rr=new Error(jn),rr;case 31:case"end":return us.stop()}},ut,this,[[6,22]])}));function at(ut,ot,gt,xt){return ct.apply(this,arguments)}return at})()},{key:"getFetchingCount",value:function(at,ut){var ot,gt;return typeof at.retryCount=="number"&&(ot=at.retryCount+1),typeof at.retryLoopsCount=="number"&&(gt=(at.retryLoopsCount+1)*ut.hostsCount),ot!==void 0&&gt!==void 0?Math.max(ot,gt):ot!==void 0?ot:gt!==void 0?gt:ut.hostsCount}},{key:"replaceURL",value:function(at,ut,ot){var gt=new URL(at),xt=gt.protocol,Mt=gt.port,kt=gt.pathname,zt=gt.search,Ht=this.replaceProtocol(xt,ot),rr=ut;return Mt&&(rr+=":"+Mt),"".concat(Ht,"//").concat(rr).concat(kt).concat(zt)}},{key:"replaceHost",value:function(at,ut){var ot=new URL(at),gt=ot.protocol,xt=ot.hostname,Mt=ot.port,kt=ot.pathname,zt=ot.search,Ht=this.replaceProtocol(gt,ut),rr="{{"+xt+"}}";return Mt&&(rr+=":"+Mt),"".concat(Ht,"//").concat(rr).concat(kt).concat(zt)}},{key:"parseFetchingContext",value:function(at){var ut=at;return typeof ut=="string"&&(ut={key:ut}),Object.freeze({key:ut.key,enableRetry:ut.enableRetry,timeout:yt.parseTimeoutFromParams(ut.timeout,this.timeout),retryCount:ao(ut.retryCount,this.retryCount),retryLoopsCount:ao(ut.retryLoopsCount,this.retryLoopsCount),bussySleepDuration:ao(ut.bussySleepDuration,this.bussySleepDuration)})}},{key:"checkIsIdempotent",value:function(at){switch(at){case"put":case"options":case"head":case"patch":case"delete":case"get":return!0;default:return!1}}},{key:"isServerBussyCode",value:function(at){switch(at){case 503:case 504:return!0;default:return!1}}},{key:"replaceProtocol",value:function(at,ut){switch(at){case"http:":case"https:":return ut?"https:":"http:";case"ws:":case"wss:":return ut?"wss:":"ws:";default:return at}}},{key:"loop",value:function(at){var ut=this.loops[at];if(!ut)throw new Error("undefined key ".concat(JSON.stringify(at)));return ut}}],[{key:"parseTimeoutFromParams",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yt.defaultTimeout;if(typeof at=="number")return Object.freeze([at]);if(Array.isArray(at)){if(at.length===0)throw new Error("timeout cannot be []");return Object.freeze(Ct(at))}else return ut}}]),yt})(),Zo=$o;Zo.defaultTimeout=Object.freeze([5*1e3,10*1e3,25*1e3]);var au=ln(requireBrowserAtob()),ou=Object.defineProperty,Yo=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,ku=Object.prototype.propertyIsEnumerable,Vu=function(ct,at,ut){return at in ct?ou(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},sl=function(ct,at){for(var ut in at||(at={}))Ru.call(at,ut)&&Vu(ct,ut,at[ut]);if(Yo){var ot=Jt(Yo(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;ku.call(at,ut)&&Vu(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},nu=(function(){function yt(ct){Ot(this,yt),this.sockets=[],this.logger=ct}return Bt(yt,[{key:"socketsCount",get:function(){return this.sockets.length}},{key:"addSocket",value:function(at){this.sockets.indexOf(at)===-1&&this.sockets.push(at)}},{key:"removeSocket",value:function(at){var ut=this.sockets.indexOf(at);ut!==-1&&this.sockets.splice(ut,1)}},{key:"forEachSockets",value:function(at){this.sockets.forEach(at)}},{key:"emit",value:function(at,ut){var ot=Jt(this.sockets),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;try{xt.emit(at,ut)}catch(Mt){this.logger.error(Mt)}}}catch(Mt){ot.e(Mt)}finally{ot.f()}}}]),yt})(),fu=(function(){function yt(ct){Ot(this,yt),this.typesMap={},this.typeToIndexMap={},this.typesMap=Object.freeze(this.createTypesMap(ct)),this.typeToIndexMap=Object.freeze(this.createTypeToIndexMap(this.typesMap))}return Bt(yt,[{key:"createTypesMap",value:function(at){for(var ut={},ot=0;ot<at.length;++ot)ut[ot]=at[ot];return ut}},{key:"createTypeToIndexMap",value:function(at){var ut={};for(var ot in at){var gt=parseInt(ot,10),xt=at[gt];if(xt in ut)throw new Error('find duplicated type "'.concat(xt,' in parameters of new TypesMap(...)"'));ut[xt]=gt}return ut}},{key:"hasType",value:function(at){return at in this.typeToIndexMap}},{key:"findTypeId",value:function(at){var ut=this.typeToIndexMap[at];if(ut===void 0)throw new Error("can't find id with type ".concat(at));return ut}},{key:"findTypeById",value:function(at){var ut=this.typesMap[at];if(!ut)throw new Error("can't find type with id ".concat(at));return ut}},{key:"extendsTypesMap",value:function(at){var ut=[];for(var ot in this.typesMap)ut.push(this.typesMap[ot]);for(var gt in at.typesMap)ut.push(at.typesMap[gt]);return new yt(ut)}}],[{key:"create",value:function(at){return new yt(at)}}]),yt})(),Vo;(function(yt){yt[yt.CONNECTING=0]="CONNECTING",yt[yt.OPEN=1]="OPEN",yt[yt.CLOSING=2]="CLOSING",yt[yt.CLOSED=3]="CLOSED"})(Vo||(Vo={}));var ll=(function(){function yt(){Ot(this,yt),this.eventListeners={}}return Bt(yt,[{key:"on",value:function(at,ut){var ot=this.eventListeners[at];ot||(ot=[],this.eventListeners[at]=ot),ot.indexOf(ut)===-1&&ot.push(ut)}},{key:"off",value:function(at,ut){var ot=this.eventListeners[at];if(ot){var gt=ot.indexOf(ut);gt!==-1&&(ot.splice(gt,1),ot.length===0&&delete this.eventListeners[at])}}},{key:"once",value:function(at,ut){var ot=this,gt=function xt(Mt){try{ut(Mt)}finally{ot.off(at,xt)}};this.on(at,gt)}},{key:"dispatchToListeners",value:function(at,ut){var ot=this.eventListeners[at];if(ot){var gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;try{Mt(ut)}catch(kt){console.error(kt)}}}catch(kt){gt.e(kt)}finally{gt.f()}}}}]),yt})(),zl=Math.pow(2,32);function Gl(yt,ct,at){var ut=at%zl,ot=(at-ut)/zl;yt.setInt32(ct,ut),yt.setInt32(ct+4,ot)}function Dl(yt,ct){var at=yt.getInt32(ct);return yt.getInt32(ct+4)*zl+at}var dp;(function(yt){yt[yt.Buffer=0]="Buffer",yt[yt.String=1]="String",yt[yt.Integer=2]="Integer"})(dp||(dp={}));function Bp(yt){switch(tr(yt)){case"number":return 2;case"string":return 1;default:return 0}}var cm=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this.typesMap=ct,this.socket=at,this.receiver=ut,this.latestThreePackageBytes=[0,0,0],this.nextSelfPackageId=0,this._latestReceivedRemoteId=-1,this.onMessage=function(gt){try{if(!ot.receivedPackageHeadBuffer)ot.receivedPackageHeadBuffer=Iu(gt.data);else{var xt=ot.receivedPackageHeadBuffer,Mt=Iu(gt.data),kt=ot.parsePackage(xt,Mt);ot._latestReceivedRemoteId=Math.max(kt.id,ot._latestReceivedRemoteId),ot.receivedPackageHeadBuffer=void 0,ot.receiver(null,kt)}}catch(zt){ot.receiver(zt,null)}},at.binaryType="arraybuffer",at.addEventListener("message",this.onMessage)}return Bt(yt,[{key:"bufferedAmount",get:function(){return this.socket.bufferedAmount}},{key:"maxPackageBytesInLatestThree",get:function(){return Math.max.apply(Math,[0].concat(Ct(this.latestThreePackageBytes)))}},{key:"latestReceivedRemoteId",get:function(){return this._latestReceivedRemoteId}},{key:"sendPackage",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ot=Object.freeze({id:this.nextSelfPackageId,receivedId:this._latestReceivedRemoteId,type:at,data:ut});this.nextSelfPackageId+=1;var gt=this.createPackageHead(ot),xt=this.wrapPackageData(ot.data),Mt=gt.byteLength+xt.byteLength;return this.socket.send(gt.primitiveBuffer),this.socket.send(xt.primitiveBuffer),this.latestThreePackageBytes[0]=this.latestThreePackageBytes[1],this.latestThreePackageBytes[1]=this.latestThreePackageBytes[2],this.latestThreePackageBytes[2]=Mt,ot.id}},{key:"createPackageHead",value:function(at){var ut=du(18);return Gl(ut,0,at.id),Gl(ut,8,at.receivedId),ut.setUint8(16,this.typesMap.findTypeId(at.type)),ut.setUint8(17,Bp(at.data)),ut}},{key:"wrapPackageData",value:function(at){if(typeof at=="string"){for(var ut=new String(at),ot=du(ut.length*2),gt=0;gt<ut.length;++gt)ot.setUint16(gt*2,ut.charCodeAt(gt)&65535);return ot}else if(typeof at=="number"){var xt=du(8);return Gl(xt,0,at),xt}else return at}},{key:"parsePackage",value:function(at,ut){var ot=Dl(at,0),gt=Dl(at,8),xt=at.getUint8(16),Mt=at.getUint8(17),kt;switch(Mt){case dp.String:{for(var zt=ut.byteLength/2,Ht=[],rr=0;rr<zt;++rr)Ht[rr]=ut.getUint16(rr*2);kt=String.fromCharCode.apply(String,Ht);break}case dp.Integer:{kt=Dl(ut,0);break}case dp.Buffer:{kt=ut;break}default:throw new Error("unrecognized data type ".concat(Mt))}return Object.freeze({id:ot,receivedId:gt,type:this.typesMap.findTypeById(xt),data:kt})}}]),yt})(),Rl=(function(){function yt(ct,at,ut,ot,gt){var xt=this;Ot(this,yt),this.receivedWhenNotWorkingBuffer=[],this.remoteHeartbeatTimeout=void 0,this.crashByChannelError=!1,this.isWorking=!1,this.isLimit=!1,this.becameLimitTimestamp=0,this.sendHeartbeat=function(){xt.isWorking&&(xt.sendHeartbeatDelayer.refreshAndInvokeAfterInterval(xt.akkoSocket.params.heartbeatInterval),xt.chanel.sendPackage("heartbeat"))},this.handleRemoteHeartbeatTimeout=function(){xt.crashByChannelError||(xt.crashByChannelError=!0,xt.callbacks.onRemoteHeartbeatTimeout())},this.onReceivedPackage=function(Mt,kt){if(!xt.crashByChannelError)if(!Mt&&kt)if(xt.isWorking)try{xt.handleReceivedPackage(kt)}finally{xt.delayRemoteHeartbeatTimeoutChecking()}else xt.receivedWhenNotWorkingBuffer.push(kt);else Mt&&!kt&&xt.callbacks.onParseMessageFailed(Mt)},this.akkoSocket=ct,this.logger=ut,this.chanel=new cm(ot,at,this.onReceivedPackage),this.callbacks=Object.freeze(sl({},gt)),this.sendHeartbeatDelayer=new Xs(this.sendHeartbeat),this.remoteHeartbeatTimeoutDelayer=new Xs(this.handleRemoteHeartbeatTimeout)}return Bt(yt,[{key:"send",value:function(at,ut){if(this.isWorking)if(ut instanceof Array){var ot=Jt(ut),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;this.sendPackage(at,xt)}}catch(Mt){ot.e(Mt)}finally{ot.f()}}else this.sendPackage(at,ut)}},{key:"sendPackage",value:function(at,ut){if(this.checkBufferedAmountOverflow())throw this.crashByChannelError||(this.crashByChannelError=!0,this.callbacks.onSendingBufferOverflow()),new Error("sending buffer overflow");this.sendHeartbeatDelayer.refreshAndInvokeAfterInterval(this.akkoSocket.params.heartbeatInterval),this.chanel.sendPackage(at,ut)}},{key:"checkBufferedAmountOverflow",value:function(){var at=!1,ut=this.akkoSocket.params,ot=ut.sendingBufferCrash,gt=ut.sendingBufferLimit,xt=ut.sendingBufferLimitDuration,Mt=this.chanel,kt=Mt.bufferedAmount,zt=Mt.maxPackageBytesInLatestThree;if(kt>ot+zt)at=!0;else if(kt>gt+zt){var Ht=Date.now();this.isLimit?Ht-this.becameLimitTimestamp>xt&&(this.isLimit=!1,at=!0):(this.isLimit=!0,this.becameLimitTimestamp=Ht)}else this.isLimit=!1;return at}},{key:"dispatchClose",value:function(at){var ut=JSON.stringify(at);this.chanel.sendPackage("close",ut)}},{key:"start",value:function(){this.isWorking||(this.isWorking=!0,this.delayRemoteHeartbeatTimeoutChecking(),this.sendHeartbeatDelayer.refreshAndInvokeAfterInterval(this.akkoSocket.params.heartbeatInterval),this.chanel.sendPackage("setHeartbeatTimeout",this.akkoSocket.params.heartbeatTimeout),this.cleanReceivedWhenNotWorkingBuffer())}},{key:"cleanReceivedWhenNotWorkingBuffer",value:function(){var at=this.receivedWhenNotWorkingBuffer.splice(0,this.receivedWhenNotWorkingBuffer.length);if(at.length>0)try{var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this.handleReceivedPackage(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}}finally{this.delayRemoteHeartbeatTimeoutChecking()}}},{key:"stop",value:function(){this.isWorking&&(this.isWorking=!1,this.sendHeartbeatDelayer.dispose(),this.remoteHeartbeatTimeoutDelayer.dispose(),this.remoteHeartbeatTimeout=void 0)}},{key:"handleReceivedPackage",value:function(at){if(!yt.sessionEventTypesMap.hasType(at.type))this.callbacks.onEvent(at.type,at.data);else if(at.type==="setHeartbeatTimeout")typeof at.data=="number"&&at.data>0?this.remoteHeartbeatTimeout=at.data:this.logger.warn("illegal remote heartbeat timeout: ".concat(at.data));else if(at.type==="close"){var ut;if(typeof at.data=="string")try{ut=JSON.parse(at.data)}catch(ot){this.logger.warn("parse close payload as JSON failed: ".concat(ot.message))}this.callbacks.onCloseByRemote(ut)}}},{key:"delayRemoteHeartbeatTimeoutChecking",value:function(){this.remoteHeartbeatTimeout===void 0?this.remoteHeartbeatTimeoutDelayer.refreshAndInvokeAfterInterval(this.akkoSocket.params.heartbeatTimeout):this.remoteHeartbeatTimeoutDelayer.refreshAndInvokeAfterInterval(this.remoteHeartbeatTimeout)}}]),yt})(),hl=Rl;hl.sessionEventTypesMap=fu.create(["heartbeat","setHeartbeatTimeout","close"]);var hp=25*1e3,Cp=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.socket=ct,this.logger=at,this.paddingExecutors=[],this.createdAt=Date.now(),this.isConnecting=!0,this.onOpen=function(){if(ut.isConnecting){ut.finishConnecting();var ot=Date.now()-ut.createdAt,gt=Jt(ut.paddingExecutors.splice(0)),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt.resolve({duration:ot})}}catch(kt){gt.e(kt)}finally{gt.f()}}},this.onError=function(ot){if(ut.isConnecting){ut.finishConnecting();var gt=new Error(ot.message||"connect failed"),xt=Jt(ut.paddingExecutors.splice(0)),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;kt.reject(gt)}}catch(zt){xt.e(zt)}finally{xt.f()}}},this.onTimeout=function(){if(ut.isConnecting){ut.finishConnecting();var ot=new Error("timeout"),gt=Jt(ut.paddingExecutors.splice(0)),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt.reject(ot)}}catch(zt){gt.e(zt)}finally{gt.f()}try{var kt=1e3;ut.socket.close(kt)}catch(zt){ut.logger.error(zt)}}},ct.addEventListener("open",this.onOpen),ct.addEventListener("error",this.onError),this.timeoutTimer=setTimeout(this.onTimeout,hp)}return Bt(yt,[{key:"waitToConnected",value:function(){var at=this;return new Promise(function(ut,ot){at.paddingExecutors.push({resolve:ut,reject:ot})})}},{key:"finishConnecting",value:function(){this.timeoutTimer&&clearTimeout(this.timeoutTimer),this.socket.removeEventListener("open",this.onOpen),this.socket.removeEventListener("error",this.onError),this.isConnecting=!1,this.timeoutTimer=null}}]),yt})(),il=3e3,Jp=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this),Mt.didCallDisconnect=!1,Mt.connectingManager=null,Mt.connectFailError=void 0,Mt.onError=function(){Mt.logger.warn("websocket received error")},Mt.onCloseByRemote=function(kt){if(Mt._phase===ip.Connected){var zt=1e3;Mt.sessionChannel.stop(),Mt.closeSocket(zt),Mt.updatePhase(ip.Disconnected);var Ht=kt&&kt.error,rr=kt&&kt.reason;Ht?Mt.callOnDisconnect({reason:Bs.RemoteError,message:Ht,remoteCode:kt.errorCode}):Mt.callOnDisconnect({reason:Bs.Normal,message:rr||"ok"})}},Mt.onClose=function(kt){var zt=kt.code,Ht=zt===void 0?1e3:zt,rr=kt.reason;if(Mt._phase===ip.Connected){var ur=Mt.errorMessageWithCode(Ht)||"disconnected with code ".concat(Ht,' "').concat(rr,'"');Mt.sessionChannel.stop(),Mt.updatePhase(ip.Disconnected),Mt.callOnDisconnect({reason:Bs.WebSocketError,message:ur,webSocketCode:Ht})}},Mt.socket=ut,Mt.socket.binaryType="arraybuffer",Mt.logger=ot,Mt.params=Object.freeze(sl({},xt)),Mt.sessionChannel=new hl(Kt(Mt),ut,ot,gt,{onCloseByRemote:Mt.onCloseByRemote,onEvent:function(zt,Ht){return Mt.dispatchToListeners(zt,Ht)},onRemoteHeartbeatTimeout:function(){return Mt.onCommunicationErrorMessage("remote heartbeat timeout")},onSendingBufferOverflow:function(){return Mt.onCommunicationErrorMessage("sending buffer overflow")},onParseMessageFailed:function(zt){return Mt.onCommunicationErrorMessage("parse message failed: "+zt.message)}}),Mt.initializePhaseWithSocketReadyState(),Mt}return Bt(at,[{key:"initializePhaseWithSocketReadyState",value:function(){switch(this.socket.readyState){case Vo.CONNECTING:{this._phase=ip.Connecting,this.connect();break}case Vo.OPEN:{this._phase=ip.Connected,this.addSessionListeners(),this.sessionChannel.start(),this.params.onConnection(0);break}default:{var ot=Vo[this.socket.readyState];throw ot||(ot="".concat(this.socket.readyState)),new Error("invalid readyState of WebSocket: ".concat(ot))}}}},{key:"phase",get:function(){return this._phase}},{key:"updatePhase",value:function(ot){if(this._phase!==ot)try{this.params.onPhaseChanged(ot)}finally{this._phase=ot}}},{key:"emit",value:function(ot,gt){if(this._phase!==ip.Connected)throw new Error("AkkoSocket can't emit when phase is ".concat(this.phase));try{this.sessionChannel.send(ot,gt)}catch(Mt){var xt=1e3;throw this.disconnectForceWithCode(xt),this.callOnDisconnect({reason:Bs.WebSocketError,message:Mt.message}),Mt}}},{key:"connect",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(){var xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,xt=Date.now(),this.connectingManager=new Cp(this.socket,this.logger),kt.next=5,this.connectingManager.waitToConnected();case 5:this.addSessionListeners(),this.sessionChannel.start(),this.updatePhase(ip.Connected),this.params.onConnection(Date.now()-xt),kt.next=14;break;case 11:kt.prev=11,kt.t0=kt.catch(0),this.updatePhase(ip.Disconnected),this.connectFailError=kt.t0;case 14:return kt.prev=14,this.connectingManager=null,kt.finish(14);case 17:case"end":return kt.stop()}},gt,this,[[0,11,14,17]])}));function ot(){return ut.apply(this,arguments)}return ot})()},{key:"addSessionListeners",value:function(){this.socket.addEventListener("close",this.onClose),this.socket.addEventListener("error",this.onError)}},{key:"waitToConnected",value:function(){if(this.connectFailError)throw this.connectFailError;if(this._phase===ip.Connected)return Promise.resolve({duration:0});if(this._phase===ip.Connecting)return this.connectingManager.waitToConnected();throw new Error("AkkoSocket's phase had became ".concat(this._phase))}},{key:"disconnect",value:function(ot){return ot?this.disconnectWithCodeAndReason({reason:ot}):this.disconnectWithCodeAndReason()}},{key:"disconnectWithErrorDescription",value:function(ot){var gt=ot.message,xt=ot.code;return this.disconnectWithCodeAndReason({error:gt,errorCode:xt})}},{key:"disconnectForce",value:function(){if(this._phase===ip.Connected){var ot=1e3;this.disconnectForceWithCode(ot)}}},{key:"disconnectForceWithCode",value:function(ot){this.sessionChannel.stop(),this.closeSocket(ot),this.updatePhase(ip.Disconnected)}},{key:"disconnectWithCodeAndReason",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!this.didCallDisconnect){Ht.next=2;break}throw new Error("AkkoSocket did call disconnect");case 2:this.didCallDisconnect=!0,Mt=!0,Ht.t0=this._phase,Ht.next=Ht.t0===ip.Disconnecting||Ht.t0===ip.Disconnected?7:Ht.t0===ip.Connecting?8:17;break;case 7:throw new Error("AkkoSocket can't disconnect when phase is ".concat(this.phase));case 8:return Ht.prev=8,Ht.next=11,this.waitToConnected();case 11:Ht.next=16;break;case 13:Ht.prev=13,Ht.t1=Ht.catch(8),Mt=!1;case 16:return Ht.abrupt("break",17);case 17:if(!Mt){Ht.next=26;break}return this.updatePhase(ip.Disconnecting),this.sessionChannel.dispatchClose(xt),Ht.next=22,this.waitUtilCloseAndCheckTimeout();case 22:if(!Ht.sent){Ht.next=25;break}kt=1e3,this.closeSocket(kt);case 25:this.sessionChannel.stop(),this.updatePhase(ip.Disconnected);case 26:case"end":return Ht.stop()}},gt,this,[[8,13]])}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"waitUtilCloseAndCheckTimeout",value:function(){var ot=this,gt=null,xt=new Promise(function(kt){gt=setTimeout(function(){gt=null,kt(!0)},il)}),Mt=new Promise(function(kt){ot.socket.readyState===Vo.CLOSED?kt(!1):ot.socket.addEventListener("close",function(){return kt(!1)})});return Promise.race([xt,Mt]).then(function(kt){return gt!==null&&clearTimeout(gt),kt})}},{key:"onCommunicationErrorMessage",value:function(ot){this._phase===ip.Connected&&(this.disconnectForce(),this.callOnDisconnect({reason:Bs.CommunicationError,message:ot}))}},{key:"closeSocket",value:function(ot){try{this.socket.close(ot)}catch(gt){this.logger.error(gt)}}},{key:"callOnDisconnect",value:function(ot){this.didCallDisconnect||this.params.onDisconnect(ot)}},{key:"errorMessageWithCode",value:function(ot){switch(ot){case 1e3:return"CLOSE_NORMAL";case 1001:return"CLOSE_GOING_AWAY";case 1002:return"CLOSE_PROTOCOL_ERROR";case 1003:return"CLOSE_UNSUPPORTED";case 1005:return"CLOSE_NO_STATUS";case 1006:return"CLOSE_ABNORMAL";case 1007:return"Unsupported Data";case 1008:return"Policy Violation";case 1009:return"CLOSE_TOO_LARGE";case 1010:return"Missing Extension";case 1011:return"Internal Error";case 1012:return"Service Restart";case 1013:return"Try Again Later";case 1015:return"TLS Handshake";default:return}}}]),at})(ll),fp=(function(){function yt(ct){Ot(this,yt),this.eventTypesMap=hl.sessionEventTypesMap.extendsTypesMap(fu.create(ct))}return Bt(yt,[{key:"createSocket",value:function(at,ut){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return new Jp(at,ut,this.eventTypesMap,sl(sl({},yt.defaultSocketParams),ot))}},{key:"createCombinedSockets",value:function(at){return new nu(at)}}]),yt})(),Jy=fp;Jy.defaultSocketParams=Object.freeze({heartbeatInterval:40*1e3,heartbeatTimeout:50*1e3,sendingBufferLimit:5*1024*1024,sendingBufferLimitDuration:30*1e3,sendingBufferCrash:100*1024*1024,onConnection:function(){},onDisconnect:function(){},onPhaseChanged:function(){}});var ip;(function(yt){yt.Connecting="connecting",yt.Connected="connected",yt.Disconnecting="disconnecting",yt.Disconnected="disconnected"})(ip||(ip={}));var Bs;(function(yt){yt.Normal="normal",yt.WebSocketError="webSocketError",yt.CommunicationError="communicationError",yt.RemoteError="remoteError"})(Bs||(Bs={}));var Do=Object.defineProperty,fo=Object.defineProperties,bu=Object.getOwnPropertyDescriptors,Qu=Object.getOwnPropertySymbols,jl=Object.prototype.hasOwnProperty,Yp=Object.prototype.propertyIsEnumerable,_h=function(ct,at,ut){return at in ct?Do(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Pm=function(ct,at){for(var ut in at||(at={}))jl.call(at,ut)&&_h(ct,ut,at[ut]);if(Qu){var ot=Jt(Qu(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;Yp.call(at,ut)&&_h(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},Lm=function(ct,at){return fo(ct,bu(at))};function _v(yt){var ct=yt.readInt32();yt.readInt32();for(var at=[],ut=0;ut<ct;++ut){var ot=yt.readUint32();at.push({userId:ot,nextFrameId:0,session:"",payload:void 0})}return at}var gp;(function(yt){yt[yt.Invoker=0]="Invoker",yt[yt.Event=1]="Event",yt[yt.Ack=2]="Ack",yt[yt.Enter=3]="Enter",yt[yt.Leave=4]="Leave"})(gp||(gp={}));function o_(yt){return yt.type===0}function Gv(yt){return yt.type===1}function ly(yt){return yt.type===3}function Dy(yt){return yt.type===4}var Zu;(function(yt){yt[yt.System=0]="System",yt[yt.App=1]="App",yt[yt.Custom=2]="Custom",yt[yt.Magix=3]="Magix"})(Zu||(Zu={}));var N_=(function(){function yt(ct,at){Ot(this,yt);var ut=ct.format.anyObjectFormat;this.serialization=ct,this.rootClassReflection=at,this.rootObjectFormats=Object.freeze([this.rootClassReflection.objectFormat]),this.oneAnyObjectFormats=Object.freeze([ut]),this.twoAnyObjectFormats=Object.freeze([ut,ut])}return Bt(yt,[{key:"serializeSnapshotFrame",value:function(at){var ut=new Wm;return this.serializeFrameHeader(ut,at),this.serializeUsers(ut,at.users),this.serialization.serialize({writer:ut,values:[at.rootObject],objectFormats:this.rootObjectFormats,includesHash:!0}),ut.toBuffer()}},{key:"serializeUsers",value:function(at,ut){var ot=[this.serialization.format.anyObjectFormat];at.writeUint32(ut.length);var gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;at.writeUint32(Mt.userId),at.writeUint32(Mt.nextFrameId),at.writeString(Mt.session),this.serialization.serialize({writer:at,values:[Mt.payload],objectFormats:ot,includesHash:!0})}}catch(kt){gt.e(kt)}finally{gt.f()}}},{key:"deserializeSnapshotFrame",value:function(at,ut,ot){var gt=new Fp(at),xt=this.deserializeFrameHeader(gt),Mt;ut!==cp.V0?Mt=this.deserializeUsers(gt,ut,ot):Mt=_v(gt);var kt=this.serialization.deserialize({reader:gt,objectFormats:this.rootObjectFormats,ignoreHashChecking:ot,version:ut}),zt=mt(kt,1),Ht=zt[0];return Lm(Pm({},xt),{users:Mt,rootObject:Ht})}},{key:"deserializeUsers",value:function(at,ut,ot){for(var gt=at.readUint32(),xt=[],Mt=[this.serialization.format.anyObjectFormat],kt=0;kt<gt;++kt){var zt=at.readUint32(),Ht=at.readUint32(),rr=at.readString(),ur=this.serialization.deserialize({reader:at,objectFormats:Mt,ignoreHashChecking:ot,version:ut}),_r=mt(ur,1),Dr=_r[0];xt.push({userId:zt,nextFrameId:Ht,session:rr,payload:Dr})}return Object.freeze(xt)}},{key:"serializeActionFrame",value:function(at,ut){var ot=new Wm;if(this.serializeFrameHeader(ot,at),ot.writeUint8(at.type),ot.writeInt53(at.scopeId),ot.writeInt53(at.beginObjectId),o_(at)){ot.writeUint32(at.methodId);var gt=this.rootClassReflection.methodNames[at.methodId],xt=this.rootClassReflection.methods[gt].parameterFormatObjects;this.serialization.serialize({writer:ot,values:at.parameters,objectFormats:xt,includesHash:ut})}else Gv(at)?(ot.writeUint8(at.scope),ot.writeString(at.event),this.serialization.serialize({writer:ot,values:[at.payload],objectFormats:this.oneAnyObjectFormats,includesHash:ut})):ly(at)?(ot.writeString(at.session),this.serialization.serialize({writer:ot,values:[at.userPayload,at.connectedPayload],objectFormats:this.twoAnyObjectFormats,includesHash:ut})):Dy(at)&&this.serialization.serialize({writer:ot,values:[at.payload],objectFormats:this.oneAnyObjectFormats,includesHash:ut});return ot.toBuffer()}},{key:"deserializeActionFrame",value:function(at,ut,ot){var gt=new Fp(at),xt=this.deserializeFrameHeader(gt),Mt=gt.readUint8(),kt=0,zt=0,Ht;switch(ut!==cp.V0&&(kt=gt.readInt53(),zt=gt.readInt53()),Mt){case gp.Invoker:{var rr=gt.readUint32(),ur=this.rootClassReflection.methodNames[rr],_r=this.rootClassReflection.methods[ur].parameterFormatObjects,Dr=this.serialization.deserialize({reader:gt,objectFormats:_r,ignoreHashChecking:ot,version:ut});return ut===cp.V0&&(Ht=gt.readBigInt()),Lm(Pm({},xt),{type:Mt,scopeId:kt,beginObjectId:zt,beginGenerationId:Ht,methodId:rr,parameters:Dr})}case gp.Event:{var Br=gt.readUint8(),Ur=gt.readString(),Zr=this.serialization.deserialize({reader:gt,objectFormats:this.oneAnyObjectFormats,ignoreHashChecking:ot,version:ut}),Tn=mt(Zr,1),jn=Tn[0];return ut===cp.V0&&(Ht=gt.readBigInt()),Lm(Pm({},xt),{type:Mt,scopeId:kt,beginObjectId:zt,beginGenerationId:Ht,scope:Br,event:Ur,payload:jn})}case gp.Ack:return Lm(Pm({},xt),{type:Mt,scopeId:kt,beginObjectId:zt});case gp.Enter:{var ts=gt.readString(),us=this.serialization.deserialize({reader:gt,objectFormats:this.twoAnyObjectFormats,ignoreHashChecking:ot,version:ut}),Os=mt(us,2),Hs=Os[0],Ks=Os[1];return Lm(Pm({},xt),{type:Mt,scopeId:kt,beginObjectId:zt,session:ts,userPayload:Hs,connectedPayload:Ks})}case gp.Leave:{var so=this.serialization.deserialize({reader:gt,objectFormats:this.oneAnyObjectFormats,ignoreHashChecking:ot,version:ut}),To=mt(so,1),Oo=To[0];return Lm(Pm({},xt),{type:Mt,scopeId:kt,beginObjectId:zt,payload:Oo})}default:throw new Error("invalid type ".concat(Mt))}}},{key:"serializeFrameHeader",value:function(at,ut){at.writeUint32(ut.frameId),at.writeUint32(ut.originalFrameId),at.writeInt53(ut.timestamp),at.writeUint32(ut.authorId)}},{key:"deserializeFrameHeader",value:function(at){var ut=at.readUint32(),ot=at.readUint32(),gt=at.readInt53(),xt=at.readUint32();return{frameId:ut,originalFrameId:ot,timestamp:gt,authorId:xt}}}]),yt})(),u_=Math.pow(2,32),cy=1,Pv=4,vp=8,Fu=5*Pv;function Zv(yt,ct){var at=yt.getInt32(ct);return yt.getInt32(ct+Pv)*u_+at}function Nv(yt){for(var ct=new Fp(yt),at=new Wm,ut=0;ut<Fu;++ut)at.writeUint8(ct.readUint8());return at.writeUint8(gp.Ack),at.toBuffer()}var av=(function(){function yt(ct){if(Ot(this,yt),ct.byteLength<Fu)throw new Error("Buffer is to short");this.frameBuffer=ct}return Bt(yt,[{key:"frameId",get:function(){return this.frameBuffer.getUint32(0)},set:function(at){this.frameBuffer.setUint32(0,at)}},{key:"originalFrameId",get:function(){return this.frameBuffer.getUint32(1*Pv)},set:function(at){this.frameBuffer.setUint32(1*Pv,at)}},{key:"timestamp",get:function(){return Zv(this.frameBuffer,2*Pv)},set:function(at){var ut=at|0,ot=(at-ut)/u_;this.frameBuffer.setInt32(2*Pv,ut),this.frameBuffer.setInt32(3*Pv,ot)}},{key:"authorId",get:function(){return this.frameBuffer.getUint32(4*Pv)},set:function(at){this.frameBuffer.setUint32(4*Pv,at)}},{key:"type",get:function(){return this.frameBuffer.getUint8(Fu)}},{key:"scopeId",get:function(){return Zv(this.frameBuffer,Fu+cy)}},{key:"beginObjectId",get:function(){return Zv(this.frameBuffer,Fu+vp+cy)}},{key:"scope",get:function(){return this.frameBuffer.getUint8(Fu+2*vp+cy)}},{key:"bodyBytes",get:function(){return this.frameBuffer.byteLength-Fu}},{key:"fetchEventContent",value:function(){var at=new Fp(this.frameBuffer),ut=Fu+2*vp+cy;if(at.skipBytes(ut),this.type===gp.Event){var ot=at.readUint8();return{event:at.readString(),scope:ot}}}}]),yt})(),Gy=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.call(this)}return Bt(at,[{key:"createObject",value:function(ot,gt){var xt=st(Ut(at.prototype),"createObject",this).call(this,ot,gt);return at.objectsCollection&&at.objectsCollection.push(xt),xt}}],[{key:"startCollection",value:function(){this.objectsCollection=[]}},{key:"completeCollection",value:function(){try{if(!this.objectsCollection)return[];var ot=Jt(this.objectsCollection),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;delete xt.__identifier}}catch(Mt){ot.e(Mt)}finally{ot.f()}return this.objectsCollection}finally{this.objectsCollection=void 0}}}]),at})(os),My=Gy;My.objectsCollection=void 0;function $0(yt,ct){return new N_(yt,ct)}var Iy=(function(){function yt(){Ot(this,yt),this.listeners=[]}return Bt(yt,[{key:"currentNode",get:function(){return this._currentNode}},{key:"addListener",value:function(at){this.listeners.push(at)}},{key:"runWith",value:function(at,ut){var ot=this._currentNode;this._currentNode=at,this.dispatch(at,!0);try{return ut()}finally{this._currentNode=ot,this.dispatch(at,!1),ot&&this.dispatch(ot,!0)}}},{key:"dispatch",value:function(at,ut){var ot=Jt(this.listeners),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;try{xt(at,ut)}catch(Mt){console.error(Mt)}}}catch(Mt){ot.e(Mt)}finally{ot.f()}}}]),yt})(),Ym;(function(yt){yt[yt.SingleForward=0]="SingleForward",yt[yt.DoubleForward=1]="DoubleForward"})(Ym||(Ym={}));var yp=new Iy,pp;(function(yt){yt[yt.FlatObject=0]="FlatObject",yt[yt.AkkoObject=1]="AkkoObject",yt[yt.Array=2]="Array",yt[yt.Displayer=3]="Displayer"})(pp||(pp={}));var xv;(function(yt){yt[yt.Uncommitted=0]="Uncommitted",yt[yt.Committed=1]="Committed",yt[yt.Rejected=2]="Rejected"})(xv||(xv={}));var Yl;(function(yt){yt[yt.Illusion=0]="Illusion",yt[yt.IllusionRebuild=1]="IllusionRebuild",yt[yt.Real=2]="Real",yt[yt.RealAck=3]="RealAck",yt[yt.Outside=4]="Outside"})(Yl||(Yl={}));var l_=(function(){function yt(ct){Ot(this,yt),this.operator=ct,this.floatObjects={}}return Bt(yt,[{key:"collectValue",value:function(at){var ut=this;if(!(tr(at)!="object"||at===null)){var ot=this.operator.identifier(at);return ot in this.floatObjects||(this.floatObjects[ot]=at,this.operator.forEach(at,function(gt){ut.collectValue(gt)})),ot}}}]),yt})(),e0=function yt(){Ot(this,yt)};function Vv(yt){return yt instanceof e0}function dy(yt){var ct=function(ut,ot,gt){return gt};return Object.setPrototypeOf(ct,e0.prototype),Object.defineProperty(ct,"payload",{enumerable:!0,configurable:!1,writable:!1,value:yt}),ct}var hy=dy(null),Jv=dy(null),Jn=function yt(ct){var at=this;Ot(this,yt),this.filters=[],this.filter=function(Mt,kt,zt){var Ht=Jt(at.filters),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;if(ur(Mt,kt,zt))return!0}}catch(_r){Ht.e(_r)}finally{Ht.f()}return!1};var ut=[],ot=Jt(ct),gt;try{var xt=function(){var kt=gt.value,zt=void 0;if(typeof kt=="function")zt=kt;else if(typeof kt=="string")zt=function(rr){return rr===kt};else if(kt instanceof RegExp)zt=function(rr){return kt.test(rr)};else throw new Error("unrecognized condition "+kt);ut.push(zt)};for(ot.s();!(gt=ot.n()).done;)xt()}catch(Mt){ot.e(Mt)}finally{ot.f()}this.filters=Object.freeze(ut)},Ql;(function(yt){yt.System="system",yt.App="app",yt.Custom="custom",yt.Magix="magix"})(Ql||(Ql={}));var fy;(function(yt){yt.Dispatched="dispatched",yt.Updated="updated",yt.Canceled="canceled"})(fy||(fy={}));function U0(yt,ct){return{event:yt.event,payload:yt.payload,authorId:yt.authorId,scope:Pl(yt.scope),phase:ct}}function Pl(yt){switch(yt){case Zu.System:return Ql.System;case Zu.App:return Ql.App;case Zu.Custom:return Ql.Custom;default:return Ql.Magix}}var gm=function yt(ct){Ot(this,yt),this.eventFilter=new Jn(ct).filter};function z0(yt){return tr(yt)=="object"&&yt!==null&&yt instanceof gm}function G0(){for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];return dy(new gm(ct))}var Nm="__reflection",x0=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.isRootClass=at,this.id=ut.classId,this.name=ut.clazz.name,this.clazz=ut.clazz,this.superClass=ut.superClass,this.objectFormat=ct.findObjectFormat(ut.objectFormatId);for(var gt={},xt={},Mt=[ut].concat(Ct(ot)),kt=Mt.length-1;kt>=0;--kt){var zt=Mt[kt],Ht=zt.clazz,rr=Jt(zt.members),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value;ss(_r)?gt[_r.name]=this.createProperty(_r,Ht,this.objectFormat):ga(_r)&&(xt[_r.name]=this.createMethod(_r,Ht,ct))}}catch(Dr){rr.e(Dr)}finally{rr.f()}}this.properties=Object.freeze(gt),this.methods=Object.freeze(xt),this.methodNames=Object.freeze(Object.keys(this.methods))}return Bt(yt,[{key:"createProperty",value:function(at,ut,ot){var gt=at.decorators.some(function(xt){return xt===hy});return Object.freeze({name:at.name,mode:at.mode,belongsClass:ut,isTransient:gt,isPublic:at.isPublic,objectFormat:ot.properties[at.name],decorators:at.decorators})}},{key:"createMethod",value:function(at,ut,ot){var gt=at.name,xt=at.parameters,Mt=at.decorators,kt=[],zt=Jt(xt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;kt.push(ot.findObjectFormat(rr))}}catch(ur){zt.e(ur)}finally{zt.f()}return Object.freeze({name:gt,belongsClass:ut,isPublic:at.isPublic,parameterFormatObjects:Object.freeze(kt),decorators:Object.freeze(Ct(Mt))})}}]),yt})(),kv=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt,Mt){var kt;return Ot(this,at),kt=ct.call(this,function(zt,Ht,rr,ur){return kt.handleDecorateObject(zt,Ht,rr,ur)}),kt.decorateObjectEnums=Object.freeze([un.Object,un.Array]),kt.proxyRuntime=ut,kt.idGenerator=gt,kt.covertIdToClass=ot,kt.toOverrideObjects=xt,kt.overrideNodeCatcher=Mt,kt}return Bt(at,[{key:"createObject",value:function(ot,gt){if(gt===un.HangUpObject)throw new el("not support hang up object: ".concat(ot));return st(Ut(at.prototype),"createObject",this).call(this,ot,gt)}},{key:"handleDecorateObject",value:function(ot,gt,xt,Mt){var kt=ot.__identifier,zt=this.proxyRuntime.objectOperator,Ht=this.getClassReflection(gt,Mt),rr=this.toOverrideObjects[kt];if(!rr||!this.isTypeMatch(rr,gt))switch(gt){case jr.Array:{rr=zt.createObject(this.idGenerator.generate(),[]);break}case jr.DeducedObject:{rr=zt.createObject(this.idGenerator.generate(),{});break}case jr.AssertedObject:{Object.setPrototypeOf(ot,Ht.clazz.prototype),rr=zt.createObject(this.idGenerator.generate(),ot);break}default:throw new el("invalid ObjectType ".concat(gt))}var ur=Jt(xt),_r;try{for(ur.s();!(_r=ur.n()).done;){var Dr=_r.value,Br=Dr.object,Ur=Dr.key;Br[Ur]=rr}}catch(Zr){ur.e(Zr)}finally{ur.f()}this.overrideNodeCatcher(rr,ot,Ht)}},{key:"isTypeMatch",value:function(ot,gt){switch(this.proxyRuntime.objectOperator.kind(ot)){case pp.Array:return gt===jr.Array;case pp.FlatObject:return gt===jr.DeducedObject;case pp.AkkoObject:return gt===jr.AssertedObject;default:return!1}}},{key:"getClassReflection",value:function(ot,gt){if(ot===jr.AssertedObject){if(!gt)throw new el("expect object format");var xt=this.covertIdToClass(gt.id);if(!xt)throw new el("can't find class by object format id ".concat(gt.id));return xt[Nm]}else return null}}]),at})(os),$l=(function(){function yt(ct){var at=this;Ot(this,yt),this.assertObjectFormat=function(ot){var gt=at.proxyRuntime.objectOperator.getClassReflection(ot);if(gt)return gt.objectFormat};var ut=new l_(ct.proxyRuntime.objectOperator);this.format=ct.format,this.snapshotObjectFormats=ct.snapshotObjectFormats,this.idGenerator=ct.idGenerator,this.proxyRuntime=ct.proxyRuntime,this.covertIdToClass=ct.covertIdToClass,ut.collectValue(ct.rootObject),this.floatObjects=ut.floatObjects}return Bt(yt,[{key:"recoverFrom",value:function(at,ut){for(var ot=[],gt=new kv(this.proxyRuntime,this.covertIdToClass,this.idGenerator,this.floatObjects,function(Tn,jn,ts){return ot.push({object:Tn,tempObject:jn,classReflection:ts})}),xt=new Rv({format:this.format,objectAdapter:gt,assertObjectFormat:this.assertObjectFormat}),Mt=!ut,kt=xt.deserialize({reader:at,objectFormats:this.snapshotObjectFormats,ignoreHashChecking:Mt,version:yt.akkoSerVersion}),zt=mt(kt,1),Ht=zt[0],rr,ur=0,_r=ot;ur<_r.length;ur++){var Dr=_r[ur],Br=Dr.object,Ur=Dr.tempObject,Zr=Dr.classReflection;this.proxyRuntime.objectOperator.override(Br,Ur,Zr),Ur===Ht&&(rr=Br)}return rr}}]),yt})(),sv=$l;sv.akkoSerVersion=Hm(Hu);var wp,yl=null,Tp=null;yp.addListener(function(yt,ct){ct&&yt.tools?(wp=yt.coreFunctions,Tp=yt.tools.idGenerator,yl=yt.proxyRuntime):(wp=null,Tp=null,yl=null)});var Hv=(function(){function yt(ct,at){Ot(this,yt),this.format=at.format,this.covertIdToClass=at.covertObjectFormatIdToClass,this.description=Object.freeze({roomUUID:ct,appIdentifier:at.appIdentifier,appVersion:at.appVersion,appHash:at.appHash,akkoVersion:at.akkoVersion})}return Bt(yt,[{key:"createSnapshot",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!yp.currentNode)throw new Error("can't call createSnapshot out of Magix");var ot=wp.wrapper(at),gt=new Wm,xt=this.readObjectFormatWith(ot),Mt=ut;return gt.writeUint8(ut?255:0),ut&&(gt.writeString(this.description.roomUUID),gt.writeString(this.description.appIdentifier),gt.writeString(this.description.appVersion),gt.writeString(this.description.appHash),gt.writeString(this.description.akkoVersion)),gt.writeUint32(xt.id),yl.frameHandler.createSerialization(this.format).serialize({writer:gt,values:[ot],objectFormats:[xt],includesHash:Mt}),gt.toBuffer().freeze()}},{key:"recoverWithSnapshot",value:function(at,ut){if(!yp.currentNode)throw new Error("can't call recoverWithSnapshot out of Magix");var ot=wp.wrapper(ut),gt=new Fp(at),xt=this.readDescription(gt),Mt=gt.readUint32();if(ot&&this.readObjectFormatWith(ot).id!==Mt)throw new Error("target's class isn't matching");var kt=this.format.findObjectFormat(Mt),zt=this.shouldOverrideTarget(xt)?ot:void 0;return new sv({rootObject:zt,format:this.format,snapshotObjectFormats:[kt],idGenerator:Tp,proxyRuntime:yl,covertIdToClass:this.covertIdToClass}).recoverFrom(gt,xt!==void 0)}},{key:"readObjectFormatWith",value:function(at){var ut=yl.objectOperator;if(ut.kind(at)!==pp.AkkoObject)throw new Error("can't only create snapshot of AkkoObject");return ut.getClassReflection(at).objectFormat}},{key:"readDescription",value:function(at){if(at.readUint8()){var ut=at.readString(),ot=at.readString(),gt=at.readString(),xt=at.readString(),Mt=at.readString();if(ot!==this.description.appIdentifier)throw new Error("invalid snapshot: appIdentifier not matches");if(gt!==this.description.appVersion)throw new Error("invalid snapshot: appVersion not matches");if(xt!==this.description.appHash)throw new Error("invalid snapshot: appHash not matches");if(Mt!==this.description.akkoVersion)throw new Error("invalid snapshot: akkoVersion not matches");return{roomUUID:ut,appIdentifier:ot,appVersion:gt,appHash:xt,akkoVersion:Mt}}}},{key:"shouldOverrideTarget",value:function(at){return at?at.roomUUID===this.description.roomUUID:!0}}]),yt})();function vm(yt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Hv(ct,yt)}var Qm;yp.addListener(function(yt,ct){ct&&yt.tools?Qm=yt.tools.extra:Qm=void 0});function V0(){if(!Qm)throw new Error("you can not call this function out of Magix");return Qm.resource}var Ov;(function(yt){yt.Real="real",yt.Illusion="illusion",yt.NoEffects="noEffects"})(Ov||(Ov={}));var Sv=(function(){function yt(ct){Ot(this,yt),this.atob=ct}return Bt(yt,[{key:"parse",value:function(at){for(var ut=new String(this.atob(at)),ot=du(ut.length),gt=0;gt<ut.length;++gt)ot.setUint8(gt,ut.charCodeAt(gt));return ot}}]),yt})();function c_(yt){var ct={},at=function(gt){var xt=yt[gt];typeof xt=="function"?ct[gt]=function(){var Mt;try{for(var kt=arguments.length,zt=new Array(kt),Ht=0;Ht<kt;Ht++)zt[Ht]=arguments[Ht];Mt=xt.apply(ct,zt)}catch(rr){console.error(rr)}return Mt}:ct[gt]=xt};for(var ut in yt)at(ut);return Object.freeze(ct)}var ey="__identifier";function py(yt,ct){Object.defineProperty(yt,ey,{enumerable:!1,configurable:!0,value:ct})}var Tr=(function(){function yt(ct,at){Ot(this,yt),this.foundObjects=[],this.idGenerator=ct,this.operator=at}return Bt(yt,[{key:"complete",value:function(){var at=Jt(this.foundObjects),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;delete ot[ey]}}catch(gt){at.e(gt)}finally{at.f()}}},{key:"bind",value:function(at){if(tr(at)!="object"||at===null||Sl(at))return at;{var ut=at;if(this.operator.isDisplayerObject(ut)&&(ut=this.operator.copyDisplayer(ut)),ut.constructor===Array)return this.bindArray(ut);if(ut.constructor===Object)return this.bindObject(ut)}throw new Error("can't let object of ".concat(at.constructor.name," pass Magix border"))}},{key:"bindArray",value:function(at){var ut=at[ey];ut===void 0&&(ut=this.idGenerator.generate(),py(at,ut),this.foundObjects.push(at));for(var ot=0;ot<at.length;++ot)this.bind(at[ot])}},{key:"bindObject",value:function(at){var ut=at[ey];ut===void 0&&(ut=this.idGenerator.generate(),py(at,ut),this.foundObjects.push(at));for(var ot in at)this.bind(at[ot])}}]),yt})(),br=(function(){function yt(ct,at,ut){Ot(this,yt),this.nodes={},this.idGenerator=ct,this.operator=at,this.adapter=ut}return Bt(yt,[{key:"bind",value:function(at,ut){var ot=null,gt=this.bindValue(at,ut),xt=this.findIdentifier(gt);if(xt!==void 0){var Mt=this.nodes[xt],kt=Mt.wrapped,zt=Mt.copied;ot={wrapped:kt,copied:zt}}return{value:gt,binder:ot}}},{key:"completeBinding",value:function(){for(var at in this.nodes){var ut=this.nodes[at].binded;delete ut[ey]}}},{key:"bindValue",value:function(at,ut){if(tr(at)!="object"||at===null)return at;if(Sl(at))return at.readonly?at:at.slice();{var ot=at;if(this.operator.isDisplayerObject(ot)&&(ot=this.operator.copyDisplayer(ot)),ot.constructor===Array)return this.bindArray(ot,ut);if(ot.constructor===Object)return this.bindObject(ot,ut)}throw new Error("can't let object of ".concat(at.constructor.name," pass Magix border"))}},{key:"bindArray",value:function(at,ut){var ot=at[ey];if(ot===void 0){ot=this.idGenerator.generate();var gt=this.adapter.createObject(ot,un.Array),xt=[];py(at,ot),py(xt,ot),this.nodes[ot]={identifier:ot,binded:at,copied:xt,wrapped:gt};for(var Mt=0;Mt<at.length;++Mt){var kt=this.bindValue(at[Mt],ut.index),zt=this.findIdentifier(kt);if(zt===void 0)this.adapter.setValue(gt,Mt,kt),xt[Mt]=kt;else{var Ht=this.nodes[zt],rr=Ht.copied,ur=Ht.wrapped;this.adapter.setValue(gt,Mt,ur),xt[Mt]=rr}}}return at}},{key:"bindObject",value:function(at,ut){var ot=at[ey];if(ot===void 0){ot=this.idGenerator.generate();var gt={},xt=this.adapter.createObject(ot,un.Object),Mt=[],kt=[];py(at,ot),py(gt,ot),this.nodes[ot]={identifier:ot,binded:at,copied:gt,wrapped:xt};for(var zt in ut.properties)zt in at&&(Mt.push(zt),kt.push(ut.properties[zt]));for(var Ht in at)Ht!==ey&&!(Ht in ut.properties)&&(Mt.push(Ht),kt.push(ut.key));for(var rr=0;rr<Mt.length;++rr){var ur=Mt[rr],_r=kt[rr],Dr=this.bindValue(at[ur],_r),Br=this.findIdentifier(Dr);if(Br===void 0)this.adapter.setValue(xt,ur,Dr),gt[ur]=Dr;else{var Ur=this.nodes[Br],Zr=Ur.copied,Tn=Ur.wrapped;this.adapter.setValue(xt,ur,Tn),gt[ur]=Zr}}}return at}},{key:"findIdentifier",value:function(at){if(tr(at)=="object"&&at!==null)return at[ey]}}]),yt})(),zr=(function(){function yt(ct){Ot(this,yt),this._phase=ct.phase||ct.getCurrentPhase(),this.getCurrentPhase=ct.getCurrentPhase,this.onPhaseChanged=ct.onPhaseChanged}return Bt(yt,[{key:"phase",get:function(){return this._phase}},{key:"touch",value:function(){var at=this.getCurrentPhase(),ut=this._phase;ut!==at&&(this._phase=at,this.onPhaseChanged&&this.onPhaseChanged(at,ut))}}]),yt})(),$r=(function(){function yt(ct,at){Ot(this,yt),this.paddingInvokers=null,this.logger=ct,this.callbacks=Pm({},at)}return Bt(yt,[{key:"hasKey",value:function(at){return at in this.callbacks}},{key:"callback",value:function(at,ut){var ot=this.callbacks[at];if(ot)if(this.paddingInvokers)this.paddingInvokers.push({key:at,payload:ut});else try{ot(ut)}catch(gt){this.logger.error(gt)}}},{key:"isPadding",get:function(){return!!this.paddingInvokers},set:function(at){if(this.isPadding!==at)if(at)this.paddingInvokers=[];else{var ut=Jt(this.paddingInvokers),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt=gt.key,Mt=gt.payload;try{this.callbacks[xt](Mt)}catch(kt){this.logger.error(kt)}}}catch(kt){ut.e(kt)}finally{ut.f()}this.paddingInvokers=null}}}]),yt})(),an=(function(){function yt(ct){Ot(this,yt),this.base64Parser=new Sv(ct)}return Bt(yt,[{key:"create",value:function(at){if(!this.isSupportedAkkoVersion(at.akkoVersion))throw new Gu("can not support library (built by akko ".concat(at.akkoVersion,")"));var ut=this.createFormat(at.formatBase64),ot=this.createClassReflections(ut,at.rootConstructor,at.classDeclarations),gt=this.createObjectFormatToClassMap(ot),xt=function(kt){return gt[kt]};return new yn(at.appIdentifier,at.appVersion,at.formatHash,at.akkoVersion,at.rootConstructor,xt,ut,ot)}},{key:"isSupportedAkkoVersion",value:function(at){var ut=Hu.split("."),ot=at.split(".");return ot.length<2||ut[0]!==ot[0]||ut[1]!==ot[1]?!1:ut.length>=3?ut[2]>=ot[2]:!0}},{key:"createFormat",value:function(at){var ut=new nr,ot=this.base64Parser.parse(at);return ut.createWithBuffer(ot)}},{key:"createClassReflections",value:function(at,ut,ot){var gt={};for(var xt in ot){var Mt=ot[xt],kt=Mt.clazz,zt=kt===ut,Ht=this.searchThisAndSuperClassDeclarations(Mt,ot),rr=nt(Ht),ur=rr[0],_r=rr.slice(1),Dr=new x0(at,zt,ur,_r);if(Object.getOwnPropertyDescriptor(kt,Nm)!==void 0)throw new Gu("class ".concat(kt.name,' has defined reserved word static property "').concat(Nm));Object.defineProperty(kt,Nm,{value:Dr,writable:!1,configurable:!1}),gt[xt]=Dr}return Object.freeze(gt)}},{key:"createObjectFormatToClassMap",value:function(at){var ut={};for(var ot in at){var gt=at[ot],xt=gt.objectFormat.id;ut[xt]=gt.clazz}return Object.freeze(ut)}},{key:"searchThisAndSuperClassDeclarations",value:function(at,ut){for(var ot=[],gt=at;ot.push(gt),!(!gt.superClass||gt.superClass===Object);)gt=this.findClassDeclarationsWithConstructor(gt.superClass,ut);return ot}},{key:"findClassDeclarationsWithConstructor",value:function(at,ut){for(var ot in ut){var gt=ut[ot];if(gt.clazz===at)return gt}throw new Gu("can not find superClass")}}]),yt})(),yn=(function(){function yt(ct,at,ut,ot,gt,xt,Mt,kt){Ot(this,yt),this.appIdentifier=ct,this.appVersion=at,this.appHash=ut,this.akkoVersion=ot,this.rootClass=gt,this.covertObjectFormatIdToClass=xt,this.format=Mt,this.classReflections=kt}return Bt(yt,[{key:"classReflection",value:function(at){var ut=this.classReflections[at];if(!ut)throw new Error("can't find class with id ".concat(at));return ut}}]),yt})(),as,hs,ys,Ss,zs,wo,hu,ko,Xu,Ju,jp;function wv(){return{creator:function(ct){return ct},updater:function(ct){return ct},wrapper:function(ct){return ct},unwrapper:function(ct){return ct},jsxUnwrapper:function(ct){return ct},getter:function(ct,at){return ct[at]},setter:function(ct,at,ut){return ct[at]=ut},caller:function(ct,at,ut,ot){return(ot||ct)[at].apply(ct,ut)},remover:function(ct,at){return delete ct[at]},prefix:function(ct,at,ut){return ct[at]+=ut},postfix:function(ct,at,ut){var ot=ct[at];return ct[at]+=ut,ot}}}function Vy(){return{creator:function(ct){return as(ct)},updater:function(ct){return hs(ct)},wrapper:function(ct){return ys(ct)},unwrapper:function(ct){return Ss(ct)},jsxUnwrapper:function(ct){return zs(ct)},getter:function(ct,at){return wo(ct,at)},setter:function(ct,at,ut){return hu(ct,at,ut)},caller:function(ct,at,ut,ot){return ko(ct,at,ut,ot)},remover:function(ct,at){return Xu(ct,at)},prefix:function(ct,at,ut){return Ju(ct,at,ut)},postfix:function(ct,at,ut){return jp(ct,at,ut)}}}function S0(yt){as=yt.creator,hs=yt.updater,ys=yt.wrapper,Ss=yt.unwrapper,zs=yt.jsxUnwrapper,wo=yt.getter,hu=yt.setter,ko=yt.caller,Xu=yt.remover,Ju=yt.prefix,jp=yt.postfix}var Tv=Object.freeze(wv());S0(Tv),yp.addListener(function(yt,ct){S0(ct?yt.coreFunctions:Tv)});var Fm;yp.addListener(function(yt,ct){ct?Fm=yt.coreFunctions.creator:Fm=void 0});function w0(){if(!Fm){var yt=this.constructor&&this.constructor.name;throw yt?new Error("can't construct ".concat(yt," out of Magix, it's an AkkoObject")):new Error("can't construct an AkkoObject out of Magix")}Fm(this)}Object.setPrototypeOf(w0.prototype,Object.prototype);var qv;yp.addListener(function(yt,ct){ct?qv=yt.proxyRuntime.objectOperator:qv=void 0});var bp=T0();function T0(){var yt=new an(au.default.bind(null));return new mn({akkoVersion:Hu,akkoObjectBaseClass:w0,libraryFactory:yt.create.bind(yt),coreFunctions:Vy()})}var Bm=bp.context,H0=bp.getLibrary;function jx(yt){if(!qv)throw new Error("can't call isAkkoObject out of Magix");return qv.isValidObject(yt)||bp.isAkkoObject(yt)}function am(yt){if(typeof yt=="function"){var ct=yt[Nm];if(tr(ct)=="object"&&ct!==null)return ct}else if(bp.isAkkoObject(yt))return am(yt.constructor)}var _p;yp.addListener(function(yt,ct){ct&&yt.tools?_p=yt.tools:_p=void 0});function ux(){if(!_p)throw Ev();return _p.environment}function k_(){if(!_p)throw Ev();return _p.timestamp}function i1(){if(!_p)throw Ev();return _p.functions.getAuthorId()}function lx(yt){if(!_p)throw Ev();return _p.functions.hasUser(yt)}function cx(){if(!_p)throw Ev();return _p.functions.getUsersCount()}function dx(yt){if(!_p)throw Ev();return _p.functions.getUser(yt)}function O_(){if(!_p)throw Ev();return _p.functions.getUserIds()}function Hy(){if(!_p)throw Ev();return _p.snapshot}function Ev(){return new Error("you can not call this function out of Magix")}var Ry;(function(yt){yt.RoomDelete="roomDelete",yt.RoomZombie="roomZombie",yt.RoomBan="roomBan",yt.GatewayAdjust="GatewayAdjust",yt.KickByAdmin="kickByAdmin",yt.ReplaceByOther="replaceByOther",yt.Crash="crash",yt.Isolate="isolate"})(Ry||(Ry={}));var fl;(function(yt){yt[yt.Inserted=0]="Inserted",yt[yt.Updated=1]="Updated",yt[yt.Removed=2]="Removed"})(fl||(fl={}));function t0(yt){for(var ct=new Fp(yt),at=ct.readUint32(),ut=[],ot=ct.readUint32(),gt=0;gt<ot;++gt){var xt=ct.readInt53(),Mt=ct.readUint32();ut.push(Object.freeze({beginScopeId:xt,count:Mt}))}return Object.freeze({userId:at,initializeSlices:Object.freeze(ut)})}var Xn;(function(yt){yt[yt.Readonly=0]="Readonly",yt[yt.Writable=1]="Writable"})(Xn||(Xn={}));var wS=(function(){function yt(ct,at){Ot(this,yt);var ut=at.format.anyObjectFormat;this.serialization=new Rv({format:at.format,objectAdapter:new My}),this.objectOperator=ct,this.oneAnyObjectFormats=Object.freeze([ut]),this.twoAnyObjectFormats=Object.freeze([ut,ut])}return Bt(yt,[{key:"serialize",value:function(at){var ut=new Wm,ot=rp(up),gt=new Tr(ot,this.objectOperator);ut.writeUint8(at.kind);try{switch(at.kind){case Xn.Writable:{var xt=at.userPayload,Mt=at.connectedPayload;gt.bind(xt),gt.bind(Mt),this.serialization.serialize({writer:ut,values:[xt,Mt],objectFormats:this.twoAnyObjectFormats,includesHash:!1});break}case Xn.Readonly:{var kt=at.payload;gt.bind(kt),this.serialization.serialize({writer:ut,values:[kt],objectFormats:this.oneAnyObjectFormats,includesHash:!1});break}}return ut.toBuffer()}finally{gt.complete()}}},{key:"deserialize",value:function(at){try{My.startCollection();var ut=new Fp(at),ot=ut.readUint8();switch(ot){case Xn.Writable:{var gt=this.serialization.deserialize({reader:ut,objectFormats:this.twoAnyObjectFormats,ignoreHashChecking:!0,version:yt.akkoSerVersion}),xt=mt(gt,2),Mt=xt[0],kt=xt[1];return{kind:ot,userPayload:Mt,connectedPayload:kt}}case Xn.Readonly:{var zt=this.serialization.deserialize({reader:ut,objectFormats:this.oneAnyObjectFormats,ignoreHashChecking:!0,version:yt.akkoSerVersion}),Ht=mt(zt,1),rr=Ht[0];return{kind:ot,payload:rr}}default:throw new Error("invalid kind ".concat(ot))}}finally{My.completeCollection()}}}]),yt})(),k1=wS;k1.akkoSerVersion=Hm(Hu);var W0=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"serialize",value:function(at){var ut=new Wm;return ut.writeString(at.libIdentifier),ut.writeString(at.appIdentifier),ut.writeString(at.appVersion),ut.writeString(at.appHash),ut.toBuffer()}},{key:"deserialize",value:function(at){var ut=new Fp(at),ot=ut.readString(),gt=ut.readString(),xt=ut.readString(),Mt=ut.readString();return{libIdentifier:ot,appIdentifier:gt,appVersion:xt,appHash:Mt}}}]),yt})();function O1(yt){var ct=new Fp(yt),at=ct.readString(),ut=ct.readString(),ot=ct.readString();return Object.freeze({session:at,sessionToken:ut,slice:ot})}function q1(yt){return d_(yt)}function Py(yt){return hx(yt)}function d_(yt){var ct=new Wm;return ct.writeUint32(yt.id),ct.writeInt53(yt.timestamp),ct.toBuffer()}function hx(yt){var ct=new Fp(yt),at=ct.readUint32(),ut=ct.readInt53();return Object.freeze({id:at,timestamp:ut})}var uw=(function(){function yt(ct){if(Ot(this,yt),this.storageSlices=[],this.usingSlice=void 0,this.nextScopeId=0,ct){var at=Jt(ct),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;this.appendScopeSlice(ot)}}catch(gt){at.e(gt)}finally{at.f()}}}return Bt(yt,[{key:"allocScopeId",value:function(){if(this.usingSlice){var at=this.nextScopeId;return at===this.usingSlice.beginScopeId+this.usingSlice.count-1?(this.usingSlice=this.storageSlices.shift(),this.usingSlice&&(this.nextScopeId=this.usingSlice.beginScopeId)):this.nextScopeId+=1,at}else return}},{key:"appendScopeSlice",value:function(at){this.usingSlice?this.storageSlices.push(at):(this.usingSlice=at,this.nextScopeId=at.beginScopeId)}}]),yt})();function $x(yt){for(var ct=new Fp(yt),at=[],ut=ct.readUint32(),ot=0;ot<ut;++ot){var gt=ct.readInt53(),xt=ct.readUint32();at.push(Object.freeze({beginScopeId:gt,count:xt}))}return Object.freeze(at)}var h_=new Jy(["error","snapshot","action","chunk","session-build","update-online","allocate-user","release-user","allocate-scope","update-access","ban-access","hang-up","library-description","ping","pong","reset-frame-id","ack-reset-frame-id","action-newline","allocate-user-ids","user-ids","allocate-snapshot","watch-action","action-result","isolate-room","action-ack","pull-library-description","check-action","check-action-result"]),my;(function(yt){yt[yt.Undefined=0]="Undefined",yt[yt.NoUserToRelease=1]="NoUserToRelease",yt[yt.WritableAccessForbidden=2]="WritableAccessForbidden",yt[yt.StuffedOfWritableUsers=3]="StuffedOfWritableUsers",yt[yt.WrongWritablePhase=4]="WrongWritablePhase"})(my||(my={}));var Ux=(function(){function yt(ct,at,ut){Ot(this,yt),this.nextFrameId=0,this.userId=ct,this.scopeStorage=at,this.nextFrameId=ut}return Bt(yt,[{key:"createFrameId",value:function(){var at=this.nextFrameId;return this.nextFrameId+=1,at}},{key:"appendScopeSlices",value:function(at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this.scopeStorage.appendScopeSlice(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"allocateIdentifierGenerator",value:function(){var at=this.scopeStorage.allocScopeId();if(at===void 0)throw new Gu("run out of scope ID");return rp(at)}}]),yt})(),L1=(function(){function yt(ct,at){if(Ot(this,yt),this.users={},this._usersCount=0,this.paddingImageCreatingTask=null,this.proxyRuntime=ct,at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this.users[gt.userId]={userId:gt.userId,nextFrameId:gt.nextFrameId,session:gt.session,payload:gt.payload},this._usersCount+=1}}catch(xt){ut.e(xt)}finally{ut.f()}}else this.users[Pr]={userId:Pr,nextFrameId:0,session:"",payload:void 0},this._usersCount+=1}return Bt(yt,[{key:"hasUser",value:function(at){return at in this.users}},{key:"userIds",get:function(){var at=[];for(var ut in this.users)at.push(parseInt(ut,10));return at.sort()}},{key:"usersCount",get:function(){return this._usersCount}},{key:"user",value:function(at,ut){var ot=this.users[at];if(ot){var gt=ot.payload;return ut||(gt=this.proxyRuntime.objectOperator.wrapDisplayer(this.proxyRuntime,gt)),{userId:at,session:ot.session,payload:gt}}else return}},{key:"snapshotUsers",value:function(){var at=[],ut=Jt(this.userIds),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt=this.users[gt];at.push({userId:gt,nextFrameId:xt.nextFrameId,session:xt.session,payload:xt.payload})}}catch(Mt){ut.e(Mt)}finally{ut.f()}return at}},{key:"createImageAuthor",value:function(at,ut){var ot=this,gt=at.userId,xt=this.users[gt];if(xt){var Mt=new uw(at.initializeSlices),kt=new Ux(at.userId,Mt,xt.nextFrameId);try{ut(kt)}catch(zt){console.error(zt)}return Promise.resolve()}else return new Promise(function(zt){ot.paddingImageCreatingTask={allocatedUser:at,complete:function(rr){zt(),rr&&ut(rr)}}})}},{key:"cancelImageAuthorCreating",value:function(){this.paddingImageCreatingTask&&(this.paddingImageCreatingTask.complete(null),this.paddingImageCreatingTask=null)}},{key:"updateUserNextFrameId",value:function(at,ut){var ot=this.users[at];ot&&(ot.nextFrameId=ut)}},{key:"userEnter",value:function(at,ut,ot,gt){var xt=this;at in this.users||(this._usersCount+=1),this.users[at]={userId:at,nextFrameId:ut,session:ot,payload:gt},this.proxyRuntime.observeUpdate(function(){if(xt.paddingImageCreatingTask){var Mt=xt.paddingImageCreatingTask.allocatedUser,kt=Mt.userId,zt=Mt.initializeSlices;if(kt===at){var Ht=new uw(zt),rr=new Ux(at,Ht,ut);xt.paddingImageCreatingTask.complete(rr),xt.paddingImageCreatingTask=null}}xt.proxyRuntime.reportUsersChanged(xt._usersCount)})}},{key:"userLeave",value:function(at){at in this.users&&(this._usersCount-=1,delete this.users[at]),this.proxyRuntime.reportUsersChanged(this._usersCount)}}]),yt})(),oE=(function(){function yt(ct){Ot(this,yt),this.didCompleteInit=!1,this.proxyRuntime=ct.proxyRuntime,this.imageUsers=ct.imageUsers,this.onEventFire=ct.onEventFire,this.onEventFireACK=ct.onEventFireACK,this.onCatchErrorWhenAppendFrame=ct.onCatchErrorWhenAppendFrame;var at=am(ct.library.rootClass),ut=[],ot={},gt={};for(var xt in at.methods){var Mt=at.methods[xt],kt=yt.findEventPayloadWithDecorators(Mt.decorators);kt&&ut.push(Object.freeze({filter:kt.eventFilter,method:xt})),gt[xt]=yt.findNoEffectsWithDecorators(Mt.decorators)}for(var zt=0;zt<at.methodNames.length;++zt)ot[at.methodNames[zt]]=zt;this.methodNames=at.methodNames,this.methodNameToIdMap=Object.freeze(ot),this.eventHandlers=Object.freeze(ut),this.noEffectsMethods=Object.freeze(gt)}return Bt(yt,[{key:"completeInit",value:function(){this.didCompleteInit=!0}},{key:"methodNameToId",value:function(at){return this.methodNameToIdMap[at]}},{key:"isNoEffectMethod",value:function(at){return this.noEffectsMethods[at]}},{key:"dispatch",value:function(at,ut){var ot=this.proxyRuntime.rootObject.target,gt=Zu.Custom,xt=Jt(this.eventHandlers),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.filter,Ht=kt.method;zt(at,ut,gt)&&this.proxyRuntime.rootObject.getRootMethod(Ht).apply(ot,[at,ut,gt])}}catch(rr){xt.e(rr)}finally{xt.f()}}},{key:"invoke",value:function(at,ut){var ot=this.proxyRuntime.rootObject.target;return this.proxyRuntime.rootObject.getRootMethod(at).apply(ot,ut)}},{key:"appendAction",value:function(at,ut,ot){var gt=this;(ut.mode===Yl.Real||ut.mode===Yl.RealAck)&&this.imageUsers.updateUserNextFrameId(at.authorId,at.originalFrameId+1);var xt=!this.isForcesOnIllusionLine(ut.mode);try{var Mt;return this.proxyRuntime.block.runWithMagix(ut,function(){o_(at)?Mt=gt.invokeActionFrame(at):Gv(at)?gt.handleEventActionFrame(at):ly(at)?gt.handleEnterActionFrame(at):Dy(at)&&gt.handleLeaveActionFrame(at)}),Mt}catch(kt){try{this.onCatchErrorWhenAppendFrame&&this.onCatchErrorWhenAppendFrame(at.authorId,kt),ot&&ot(kt)}catch(zt){console.error(zt)}return}finally{xt&&(this.frameId=at.frameId,this.timestamp=at.timestamp)}}},{key:"callbackEventIfNeed",value:function(at){if(this.didCompleteInit)if(Gv(at)){var ut=this.proxyRuntime.rootObject.observerId;at.authorId===ut?this.onEventFireACK({event:at.event,payload:this.proxyRuntime.objectOperator.copyDisplayer(at.payload),scope:at.scope,authorId:at.authorId}):this.onEventFire({event:at.event,payload:this.proxyRuntime.objectOperator.copyDisplayer(at.payload),scope:at.scope,authorId:at.authorId})}else ly(at)?this.onEventFire({event:"Enter",payload:this.proxyRuntime.objectOperator.copyDisplayer(at.connectedPayload),scope:Zu.System,authorId:at.authorId}):Dy(at)&&this.onEventFire({event:"Leave",payload:this.proxyRuntime.objectOperator.copyDisplayer(at.payload),scope:Zu.System,authorId:at.authorId})}},{key:"invokeActionFrame",value:function(at){var ut=at.methodId,ot=at.parameters,gt=this.proxyRuntime.rootObject.target,xt=this.methodNames[ut];return this.proxyRuntime.rootObject.getRootMethod(xt).apply(gt,ot)}},{key:"handleEventActionFrame",value:function(at){if(at.beginGenerationId!==void 0&&at.scope===Zu.System)switch(at.event){case"Enter":{var ut=at.authorId,ot=at.originalFrameId+1,gt="",xt;this.imageUsers.userEnter(ut,ot,gt,xt);break}case"Leave":{this.imageUsers.userLeave(at.authorId);break}}this.invokeEventCallbacks(at.event,at.payload,at.scope)}},{key:"handleEnterActionFrame",value:function(at){var ut=at.authorId,ot=at.originalFrameId+1,gt=at.session,xt=at.userPayload;this.imageUsers.userEnter(ut,ot,gt,xt),this.invokeEventCallbacks("Enter",at.connectedPayload,Zu.System)}},{key:"handleLeaveActionFrame",value:function(at){var ut=at.authorId,ot=at.payload;this.imageUsers.userLeave(ut),this.invokeEventCallbacks("Leave",ot,Zu.System)}},{key:"invokeEventCallbacks",value:function(at,ut,ot){var gt=this.proxyRuntime.rootObject.target,xt=Jt(this.eventHandlers),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.filter,Ht=kt.method;zt(at,ut,ot)&&this.proxyRuntime.rootObject.getRootMethod(Ht).apply(gt,[at,ut,ot])}}catch(rr){xt.e(rr)}finally{xt.f()}}},{key:"isForcesOnIllusionLine",value:function(at){switch(at){case Yl.Real:case Yl.RealAck:return!1;case Yl.Illusion:case Yl.IllusionRebuild:return!0;case Yl.Outside:return this.proxyRuntime.hasDoubleLines&&this.proxyRuntime.hasBranch;default:throw new Error("invalid mode ".concat(at))}}}],[{key:"findEventPayloadWithDecorators",value:function(at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(Vv(gt)&&z0(gt.payload))return gt.payload}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"findNoEffectsWithDecorators",value:function(at){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(gt===Jv)return!0}}catch(xt){ut.e(xt)}finally{ut.f()}return!1}}]),yt})(),f_=(function(){function yt(ct,at,ut){Ot(this,yt),this.observerId=ct,this.logger=at,this.onLengthChanged=ut,this.queue=[]}return Bt(yt,[{key:"length",get:function(){return this.queue.length}},{key:"pushIllusionActionFrameGetter",value:function(at){this.queue.push(at),this.onLengthChanged(this.queue.length)}},{key:"forFrames",value:function(at){var ut=Jt(this.queue),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"replaceActionFrame",value:function(at){var ut=this.isAckFrame(at),ot,gt,xt;if(ut){var Mt=this.takeIllusionFrame(at.frameId,at.originalFrameId),kt=new av(Mt.get());ot=Date.now()-Mt.timestamp,kt.frameId=at.frameId,kt.originalFrameId=at.originalFrameId,kt.timestamp=at.timestamp,gt=kt.frameBuffer,xt=Mt.section}else{if(at.type===gp.Ack)throw new Error("received others' ACK frame");gt=at.frameBuffer}return{replacedBuffer:gt,isAck:ut,rttTimeInterval:ot,section:xt}}},{key:"takeIllusionFrame",value:function(at,ut){var ot=this.queue.findIndex(function(xt){return xt.frameId===ut});if(ot>0&&this.logger.warn("received frame can't touch first illusion frame"),ot===-1)throw new Error("not found frameId ".concat(ut," match to ACK frameId"));var gt=this.queue.splice(ot,1)[0];return this.onLengthChanged(this.queue.length),gt}},{key:"isAckFrame",value:function(at){switch(at.type){case gp.Ack:case gp.Invoker:return at.authorId===this.observerId;case gp.Event:{if(at.scope===Zu.Custom)return at.authorId===this.observerId;break}}return!1}}]),yt})();function jm(yt){return yt.beginGenerationId===void 0?rp(yt.scopeId,yt.beginObjectId):Kp(yt.authorId,yt.beginGenerationId)}var X0=(function(){function yt(ct,at,ut,ot,gt,xt,Mt){Ot(this,yt),this.logger=ct,this.strategy=at,this.proxyRuntime=ut,this.triggerInvoker=ot,this.assertAppendFrameId=gt,this.onReceivedRttReport=xt,this.onIllusionQueueLengthChanged=Mt,this.observerId=null,this._illusionQueue=null}return Bt(yt,[{key:"illusionQueue",get:function(){return this._illusionQueue}},{key:"waitUtilIllusionQueueEmpty",value:function(){var at=this;return this._illusionQueue.length===0?Promise.resolve():new Promise(function(ut){at.onIllusionQueueEmpty=ut})}},{key:"setObserverId",value:function(at){if(this._illusionQueue)throw new Error("did set observer ID");this.observerId=at,this._illusionQueue=new f_(at,this.logger,this.onIllusionQueueLengthChanged)}},{key:"cleanObserverId",value:function(){var at=this._illusionQueue;this.observerId=null,this._illusionQueue=null,this.onIllusionQueueLengthChanged(at.length)}},{key:"appendActionFramesWithDoubleMode",value:function(at,ut){for(var ot=this,gt,xt=function(zt){var Ht=at[zt],rr=ot.proxyRuntime.frameHandler.deserializeActionFrame(Ht,ot.strategy.deserializerVersion,ot.strategy.ignoreHashChecking,{mode:Yl.Real}),ur=jm(rr);ot.assertAppendFrameId(rr);var _r=ut&&function(Br){return ut(Br,zt)},Dr={authorId:rr.authorId,mode:Yl.Real,timestamp:rr.timestamp,identifierGenerator:ur};gt=ot.triggerInvoker.appendAction(rr,Dr,_r),ot.triggerInvoker.callbackEventIfNeed(rr)},Mt=0;Mt<at.length;++Mt)xt(Mt);return gt}},{key:"appendActionFrames",value:function(at,ut){for(var ot=this,gt=[],xt=[],Mt=!1,kt=!1,zt=0;zt<at.length;++zt){var Ht=new av(at[zt]),rr=this._illusionQueue.replaceActionFrame(Ht);rr.isAck||(Mt=!0),!kt&&Ht.type===gp.Leave&&Ht.authorId===this.observerId&&(kt=!0);var ur={index:zt,frameBuffer:rr.replacedBuffer,frameSection:rr.section};Mt?xt.push(ur):gt.push(ur),rr.rttTimeInterval!==void 0&&this.onReceivedRttReport(rr.rttTimeInterval)}this.proxyRuntime.block.runWithDisableObserve(function(){for(var Zr=function(){var us=jn[Tn],Os=us.index,Hs=us.frameBuffer,Ks=us.frameSection,so=ot.proxyRuntime.frameHandler.deserializeActionFrame(Hs,ot.strategy.deserializerVersion,ot.strategy.ignoreHashChecking,{mode:Yl.RealAck,frameSection:Ks}),To=jm(so);ot.assertAppendFrameId(so);var Oo=ut&&function(Tu){return ut(Tu,Os)},Au={authorId:so.authorId,mode:Yl.RealAck,timestamp:so.timestamp,frameSection:Ks,identifierGenerator:To};ot.triggerInvoker.appendAction(so,Au,Oo),ot.triggerInvoker.callbackEventIfNeed(so),Ks.completeACK()},Tn=0,jn=gt;Tn<jn.length;Tn++)Zr()});var _r;if(xt.length>0){this.proxyRuntime.mergeBranch();var Dr=Jt(xt),Br;try{var Ur=function(){var Tn=Br.value,jn=Tn.index,ts=Tn.frameBuffer,us=Tn.frameSection,Os=ot.proxyRuntime.frameHandler.deserializeActionFrame(ts,ot.strategy.deserializerVersion,ot.strategy.ignoreHashChecking,{mode:Yl.Real,frameSection:us}),Hs=jm(Os);ot.assertAppendFrameId(Os);var Ks=ut&&function(To){return ut(To,jn)},so={authorId:Os.authorId,mode:Yl.Real,timestamp:Os.timestamp,frameSection:us,identifierGenerator:Hs};_r=ot.triggerInvoker.appendAction(Os,so,Ks),ot.triggerInvoker.callbackEventIfNeed(Os)};for(Dr.s();!(Br=Dr.n()).done;)Ur()}catch(Zr){Dr.e(Zr)}finally{Dr.f()}this._illusionQueue.length>0&&(kt?this._illusionQueue=new f_(this.observerId,this.logger,this.onIllusionQueueLengthChanged):this.rebuildIllusionBranch())}return this.proxyRuntime.hasBranch&&this.proxyRuntime.hasDoubleLines&&this._illusionQueue.length===0&&this.proxyRuntime.mergeBranch(),this.onIllusionQueueEmpty&&this._illusionQueue.length===0&&(this.onIllusionQueueEmpty(),this.onIllusionQueueEmpty=void 0),_r}},{key:"rebuildIllusionBranch",value:function(){var at=this;this.proxyRuntime.forkBranchRuntime();var ut=this._illusionQueue;this._illusionQueue=new f_(this.observerId,this.logger,this.onIllusionQueueLengthChanged),ut.forFrames(function(ot){var gt=new av(ot.get()),xt=at.proxyRuntime.createFrameSection(ot.section),Mt={frameId:ot.frameId,timestamp:ot.timestamp,section:xt,get:function(){return gt.frameBuffer}};at._illusionQueue.pushIllusionActionFrameGetter(Mt);var kt=at.proxyRuntime.frameHandler.deserializeActionFrame(gt.frameBuffer,at.strategy.deserializerVersion,at.strategy.ignoreHashChecking,{mode:Yl.IllusionRebuild,frameSection:xt}),zt=jm(kt);at.triggerInvoker.appendAction(kt,{authorId:kt.authorId,mode:Yl.IllusionRebuild,timestamp:kt.timestamp,frameSection:xt,identifierGenerator:zt}),xt.completeRebuild()}),ut.length>0&&this.onIllusionQueueLengthChanged(this._illusionQueue.length)}}]),yt})(),p_=(function(){function yt(ct,at){Ot(this,yt),this.objectOperator=at,this.rootClassReflection=am(ct.rootClass);var ut=new Rv({format:ct.format,objectAdapter:new My});this.flatFrameSerialization=$0(ut,this.rootClassReflection)}return Bt(yt,[{key:"serialize",value:function(at,ut,ot){var gt=new Tr(at,this.objectOperator);try{this.replaceWithBindsActionFrame(gt,ut);var xt=Lm(Pm({},ut),{beginObjectId:at.createdCount});return this.flatFrameSerialization.serializeActionFrame(xt,ot)}finally{gt.complete()}}},{key:"replaceWithBindsActionFrame",value:function(at,ut){if(Gv(ut))at.bind(ut.payload);else if(o_(ut)){var ot=Jt(ut.parameters),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;at.bind(xt)}}catch(Mt){ot.e(Mt)}finally{ot.f()}}else ly(ut)?(at.bind(ut.userPayload),at.bind(ut.connectedPayload)):Dy(ut)&&at.bind(ut.payload)}}]),yt})(),xp=(function(){function yt(ct){Ot(this,yt),this.author=ct.author,this.objectOperator=ct.objectOperator,this.rootClassReflection=ct.rootClassReflection,this.objectAdapter=ct.objectAdapter,this.flatFrameSerialization=ct.flatFrameSerialization,this.includesFrameHash=ct.includesFrameHash}return Bt(yt,[{key:"appendScopeSlices",value:function(at){this.author.appendScopeSlices(at)}},{key:"handleInvokerArgs",value:function(at,ut,ot){var gt=this.objectOperator,xt=this.objectAdapter,Mt=this.rootClassReflection,kt=new br(ot,gt,xt);try{for(var zt=Mt.methods[at].parameterFormatObjects,Ht=[],rr=[],ur=0;ur<ut.length;++ur){var _r=kt.bind(ut[ur],zt[ur]),Dr=_r.value,Br=_r.binder;Br?(Ht[ur]=Br.copied,rr[ur]=Br.wrapped):(Ht[ur]=Dr,rr[ur]=Dr)}return{copied:Ht,wrapped:rr}}finally{kt.completeBinding()}}},{key:"handlePayload",value:function(at,ut){var ot=this.objectOperator,gt=this.objectAdapter,xt=this.flatFrameSerialization.serialization.format.anyObjectFormat,Mt=new br(ut,ot,gt);try{var kt=Mt.bind(at,xt),zt=kt.value,Ht=kt.binder,rr=zt,ur=zt;return Ht&&(rr=Ht.copied,ur=Ht.wrapped),{copied:rr,wrapped:ur}}finally{Mt.completeBinding()}}},{key:"serializeEventFrameGetter",value:function(at,ut,ot,gt){var xt=this,Mt=this.author.createFrameId(),kt={frameId:Mt,originalFrameId:Mt,timestamp:ot,authorId:this.author.userId,type:gp.Event,scopeId:gt.scopeId,beginObjectId:gt.createdCount,event:at,payload:ut,scope:Zu.Custom};return{frameId:Mt,getter:function(){return xt.flatFrameSerialization.serializeActionFrame(kt,xt.includesFrameHash)}}}},{key:"serializeInvokerFrameGetter",value:function(at,ut,ot,gt){var xt=this,Mt=this.author.createFrameId(),kt={frameId:Mt,originalFrameId:Mt,timestamp:ot,authorId:this.author.userId,type:gp.Invoker,scopeId:gt.scopeId,beginObjectId:gt.createdCount,methodId:at,parameters:ut};return{frameId:Mt,getter:function(){return xt.flatFrameSerialization.serializeActionFrame(kt,xt.includesFrameHash)}}}}]),yt})(),m_=(function(){function yt(ct,at){Ot(this,yt),this.onGeneratedFrameBuffer=ct,this.onGenreateFrameFailed=at,this.pendding={},this._count=0}return Bt(yt,[{key:"count",get:function(){return this._count}},{key:"createEventFrameGetter",value:function(at,ut,ot,gt,xt,Mt){var kt=this,zt=gt.serializeEventFrameGetter(at,ut,ot,Mt),Ht=zt.frameId,rr=zt.getter,ur=new r0(Ht,ot,xt,function(){try{var _r=new av(rr());return kt.fireGenerate(ur,_r),_r.frameBuffer}catch(Dr){throw kt.onGenreateFrameFailed(Dr),Dr}});return this.fireCreate(ur),ur}},{key:"createInvokerFrameGetter",value:function(at,ut,ot,gt,xt,Mt){var kt=this,zt=gt.serializeInvokerFrameGetter(at,ut,ot,Mt),Ht=zt.frameId,rr=zt.getter,ur=new r0(Ht,ot,xt,function(){try{var _r=new av(rr());return kt.fireGenerate(ur,_r),_r.frameBuffer}catch(Dr){throw kt.onGenreateFrameFailed(Dr),Dr}});return this.fireCreate(ur),ur}},{key:"fireCreate",value:function(at){this.pendding[at.id]||(this.pendding[at.id]=at,this._count+=1)}},{key:"fireGenerate",value:function(at,ut){at.id in this.pendding&&(delete this.pendding[at.id],this._count-=1),this.onGeneratedFrameBuffer(ut.frameBuffer)}}]),yt})();m_.callGetMaxDuration=1200;var g_=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.frameId=ct,this.timestamp=at,this.section=ut,this.getter=ot,this.buffer=null,this.id="".concat(yt.nextId),yt.nextId+=1}return Bt(yt,[{key:"get",value:function(){return this.buffer||(this.buffer=this.getter()),this.buffer}}]),yt})(),r0=g_;r0.nextId=0;var q_=700,Av=(function(){function yt(ct){var at=this;if(Ot(this,yt),this.modifiable=!0,this.generator=null,this.didDestroy=!1,this.assertAppendFrameId=function(kt){var zt=kt.frameId,Ht=at.triggerInvoker.frameId+1;if(Ht!==zt)throw new Error("find unexpected frame id ".concat(zt,", wanna ").concat(Ht))},this.invokeMethod=function(kt,zt){at.assertEnableSendActionFrames();var Ht,rr=Date.now(),ur=at.generator;if(!ur)throw new Error("cannot invoke ".concat(kt,", frameGenerator is not prepare"));var _r=ur.author.allocateIdentifierGenerator(),Dr=at.proxyRuntime.block.runWithContinuousUpdated(function(){var Br=at.proxyRuntime.createFrameSection(),Ur={authorId:ur.author.userId,mode:Yl.Illusion,frameSection:Br,timestamp:rr,identifierGenerator:_r};Ht=at.proxyRuntime.block.runWithMagix(Ur,function(){var Zr=at.triggerInvoker.methodNameToId(kt),Tn=ur.handleInvokerArgs(kt,zt,_r),jn=_r.clone();try{return at.triggerInvoker.invoke(kt,Tn.wrapped)}finally{var ts=at.pending.createInvokerFrameGetter(Zr,Tn.copied,rr,ur,Br,jn);at.branchImageHelper.illusionQueue.pushIllusionActionFrameGetter(ts),at.callbacks.onGeneratedActionFrame?(at.phaseNode.touch(),at.callbacks.onGeneratedActionFrame(ts)):ts.get()}})});return at.callbacks.onModified&&Dr.didUpdated&&at.callbacks.onModified(),Ht},this.currentPhase=function(){var kt=at.branchImageHelper.illusionQueue;return kt&&kt.length===0&&at.pending.count===0?v_.Real:v_.Illusion},this.clientCrashWithError=function(kt){at.callbacks.onClientCrashWithError&&Promise.resolve().then(function(){return at.callbacks.onClientCrashWithError(kt)}).catch(function(zt){return console.error(zt)})},this.library=ct.library,this.logger=ct.logger,this.proxyRuntime=ct.proxyRuntime,this.serializer=new p_(ct.library,ct.proxyRuntime.objectOperator),this.imageUsers=ct.imageUsers,this.strategy=ct.strategy,this.callbacks=c_(ct.callbacks||{}),this.eventFireNode=new $r(ct.logger,{fire:this.callbacks.onEventFire,ack:this.callbacks.onEventFireACK}),this.eventFireNode.isPadding=!0,this.triggerInvoker=new oE({library:this.library,imageUsers:this.imageUsers,proxyRuntime:ct.proxyRuntime,onEventFire:function(zt){return at.eventFireNode.callback("fire",zt)},onEventFireACK:function(zt){return at.eventFireNode.callback("ack",zt)},onCatchErrorWhenAppendFrame:this.callbacks.onCatchErrorWhenAppendFrame}),this.triggerInvoker.frameId=ct.frameId,this.triggerInvoker.timestamp=ct.timestamp,this.proxyRuntime.rootObject.onInvokedTriggerMethod=this.invokeMethod,ct.actionFrames){var ut=Jt(ct.actionFrames),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt=this.proxyRuntime.frameHandler.deserializeActionFrame(gt,this.strategy.deserializerVersion,this.strategy.ignoreHashChecking),Mt=jm(xt);this.triggerInvoker.appendAction(xt,{authorId:xt.authorId,timestamp:xt.timestamp,mode:Yl.Real,identifierGenerator:Mt})}}catch(kt){ut.e(kt)}finally{ut.f()}}this.phaseNode=new zr({phase:v_.Real,getCurrentPhase:this.currentPhase,onPhaseChanged:this.callbacks.onPhaseChanged}),this.branchImageHelper=new X0(this.logger,this.strategy,this.proxyRuntime,this.triggerInvoker,this.assertAppendFrameId,this.callbacks.onReceivedRttReport||function(){},this.callbacks.onIllusionQueueLengthChanged||function(){}),this.pending=new m_(function(){return at.phaseNode.touch()},this.clientCrashWithError),this.triggerInvoker.completeInit(),this.eventFireNode.hasKey("fire")&&Promise.resolve().then(function(){return at.eventFireNode.isPadding=!1}).catch(function(kt){return console.error(kt)})}return Bt(yt,[{key:"hasDoubleLines",get:function(){return this.proxyRuntime.hasDoubleLines}},{key:"trigger",get:function(){return this.proxyRuntime.rootObject.displayer}},{key:"phase",get:function(){return this.phaseNode.phase}},{key:"userIds",get:function(){return this.imageUsers.userIds}},{key:"usersCount",get:function(){return this.imageUsers.usersCount}},{key:"pendingReportChanged",get:function(){return this.proxyRuntime.pendingReportChanged},set:function(at){this.proxyRuntime.pendingReportChanged=at}},{key:"hasUser",value:function(at){return this.imageUsers.hasUser(at)}},{key:"user",value:function(at){return this.imageUsers.user(at,!1)}},{key:"verifiedFrameId",get:function(){return this.triggerInvoker.frameId}},{key:"frameId",get:function(){var at=this.triggerInvoker.frameId,ut=this.branchImageHelper.illusionQueue;return ut&&(at+=ut.length),at},set:function(at){var ut=this.branchImageHelper.illusionQueue,ot=at;ut&&(ot-=ut.length),this.triggerInvoker.frameId=ot}},{key:"timestamp",get:function(){return this.triggerInvoker.timestamp}},{key:"appendActionFrames",value:function(at,ut){this.appendActionFramesToRuntime(at,ut)}},{key:"appendActionFramesToRuntime",value:function(at,ut){var ot=this,gt,xt;this.eventFireNode.isPadding=!0;try{gt=this.proxyRuntime.block.runWithContinuousUpdated(function(){ot.proxyRuntime.hasDoubleLines?ot.proxyRuntime.hasBranch?xt=ot.branchImageHelper.appendActionFrames(at,ut):xt=ot.branchImageHelper.appendActionFramesWithDoubleMode(at,ut):xt=ot.appendActionFramesWithSingleMode(at,ut)}),this.phaseNode.touch()}finally{this.eventFireNode.isPadding=!1}return this.callbacks.onModified&&gt.didUpdated&&this.callbacks.onModified(),xt}},{key:"appendScopeSlices",value:function(at){this.generator&&this.generator.appendScopeSlices(at)}},{key:"appendActionFramesWithSingleMode",value:function(at,ut){for(var ot=this,gt,xt=function(zt){var Ht=at[zt],rr=ot.proxyRuntime.frameHandler.deserializeActionFrame(Ht,ot.strategy.deserializerVersion,ot.strategy.ignoreHashChecking),ur=jm(rr);ot.assertAppendFrameId(rr);var _r=ut&&function(Br){return ut(Br,zt)},Dr={authorId:rr.authorId,mode:Yl.Real,timestamp:rr.timestamp,identifierGenerator:ur};gt=ot.triggerInvoker.appendAction(rr,Dr,_r),ot.triggerInvoker.callbackEventIfNeed(rr)},Mt=0;Mt<at.length;++Mt)xt(Mt);return gt}},{key:"dispatch",value:function(at,ut){var ot=this;this.assertEnableSendActionFrames();var gt=Date.now(),xt=this.generator;if(!xt)throw new Error("cannot dispatch event ".concat(at,", generator is not prepare"));var Mt=xt.author.allocateIdentifierGenerator(),kt=this.proxyRuntime.block.runWithContinuousUpdated(function(){var zt=ot.proxyRuntime.createFrameSection(),Ht={authorId:xt.author.userId,mode:Yl.Illusion,timestamp:gt,frameSection:zt,identifierGenerator:Mt};ot.proxyRuntime.block.runWithMagix(Ht,function(){var rr=xt.handlePayload(ut,Mt),ur=Mt.clone();try{return ot.triggerInvoker.dispatch(at,rr.wrapped)}finally{var _r=ot.pending.createEventFrameGetter(at,rr.copied,gt,xt,zt,ur);ot.branchImageHelper.illusionQueue.pushIllusionActionFrameGetter(_r),ot.callbacks.onGeneratedActionFrame?(ot.phaseNode.touch(),ot.callbacks.onGeneratedActionFrame(_r)):_r.get()}})});this.eventFireNode.callback("fire",{event:at,payload:ut,scope:Zu.Custom,authorId:xt.author.userId}),this.callbacks.onModified&&kt.didUpdated&&this.callbacks.onModified()}},{key:"snapshot",value:function(){var at=this,ut=this.generator?this.generator.author.userId:Pr,ot={frameId:this.frameId,originalFrameId:this.frameId,timestamp:this.timestamp,authorId:ut,rootObject:this.proxyRuntime.rootObject.snapshotRootObject(),users:this.imageUsers.snapshotUsers()},gt={authorId:ut,mode:Yl.Outside,timestamp:ot.timestamp,identifierGenerator:rp(up)};return this.proxyRuntime.block.runWithMagix(gt,function(){return at.proxyRuntime.frameHandler.serializeSnapshotFrame(ot)})}},{key:"setAllocatedUser",value:function(at){var ut=this;return this.imageUsers.createImageAuthor(at,function(ot){var gt=ut.serializer,xt=gt.objectOperator,Mt=gt.rootClassReflection,kt=gt.flatFrameSerialization,zt=ut.proxyRuntime.frameHandler.objectAdapter,Ht=ut.strategy.includesFrameHash;ut.generator=new xp({author:ot,objectOperator:xt,rootClassReflection:Mt,flatFrameSerialization:kt,objectAdapter:zt,includesFrameHash:Ht}),ut.proxyRuntime.reportObserverIdChanged(at.userId),ut.branchImageHelper.setObserverId(ot.userId)})}},{key:"waitUtilIllusionQueueEmpty",value:function(){return this.branchImageHelper.waitUtilIllusionQueueEmpty()}},{key:"removeAllocatedUser",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){return regeneratorRuntime.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return this.imageUsers.cancelImageAuthorCreating(),this.generator=null,this.proxyRuntime.reportObserverIdChanged(Pr),gt.next=5,this.branchImageHelper.waitUtilIllusionQueueEmpty();case 5:this.branchImageHelper.cleanObserverId();case 6:case"end":return gt.stop()}},ut,this)}));function at(){return ct.apply(this,arguments)}return at})()},{key:"destroy",value:function(){this.didDestroy||(this.imageUsers.cancelImageAuthorCreating(),this.generator=null,this.didDestroy=!0,this.proxyRuntime.dispose(),this.phaseNode.touch())}},{key:"createInvokerFrameBuffer",value:function(at){var ut=this.triggerInvoker.methodNameToId(at.method);if(ut===void 0)throw new Error("can't find method ".concat(JSON.stringify(at.method)));if(this.triggerInvoker.isNoEffectMethod(at.method))throw new Error("can't create frame for no effects method ".concat(JSON.stringify(at.method)));var ot=Lm(Pm({},this.createFrameHeader(at)),{type:gp.Invoker,scopeId:at.identifierGenerator.scopeId,methodId:ut,parameters:at.parameters});return this.serializeActionFrame(at.identifierGenerator,ot)}},{key:"createEventFrameBuffer",value:function(at){var ut=Lm(Pm({},this.createFrameHeader(at)),{type:gp.Event,scopeId:at.identifierGenerator.scopeId,scope:at.scope,event:at.event,payload:at.payload});return this.serializeActionFrame(at.identifierGenerator,ut)}},{key:"createEnterFrameBuffer",value:function(at){var ut=Lm(Pm({},this.createFrameHeader(at)),{type:gp.Enter,scopeId:at.identifierGenerator.scopeId,session:at.session,userPayload:at.userPayload,connectedPayload:at.connectedPayload});return this.serializeActionFrame(at.identifierGenerator,ut)}},{key:"createLeaveFrameBuffer",value:function(at){var ut=Lm(Pm({},this.createFrameHeader(at)),{type:gp.Leave,scopeId:at.identifierGenerator.scopeId,payload:at.payload});return this.serializeActionFrame(at.identifierGenerator,ut)}},{key:"createFrameHeader",value:function(at){var ut=at.frameId,ot=at.originalFrameId,gt=at.authorId;return{frameId:ut,originalFrameId:ot===void 0?ut:ot,timestamp:Date.now(),authorId:gt,beginObjectId:0}}},{key:"serializeActionFrame",value:function(at,ut){var ot=this,gt={authorId:this.generator?this.generator.author.userId:Pr,mode:Yl.Outside,timestamp:ut.timestamp,identifierGenerator:at};return this.proxyRuntime.block.runWithMagix(gt,function(){return ot.serializer.serialize(at,ut,ot.strategy.includesFrameHash)})}},{key:"assertEnableSendActionFrames",value:function(){if(this.didDestroy)throw new Error("image was desctroy");var at=this.branchImageHelper.illusionQueue;if((at?at.length:0)>=q_)throw this.clientCrashWithError(new Error("illusion queue is overflow")),new Error("can't modify. illusion queue is overflow")}}]),yt})(),v_;(function(yt){yt.Real="real",yt.Illusion="illusion"})(v_||(v_={}));var Km=(function(){function yt(ct){Ot(this,yt),this.proxyManager=ct}return Bt(yt,[{key:"createAccessUpdaterSerialization",value:function(at){return new k1(this.proxyManager.objectOperator,at)}},{key:"createWithParameters",value:function(at){var ut=this.findOriginProxyRuntime(at),ot=this.proxyManager.createProxyRuntime(at.library,ut),gt=new L1(ot),xt=Date.now();ot.setupWithParameters(at.constructorScopeId,at.args,xt,{logger:at.logger,observerId:at.observerId,imageUsers:gt,pendingReportChanged:at.pendingReportChanged,snapshotManager:vm(at.library,at.roomUUID),toolsExtra:at.toolsExtra});var Mt=new Av({frameId:0,timestamp:xt,library:at.library,logger:at.logger,proxyRuntime:ot,actionFrames:[],imageUsers:gt,strategy:yt.wrapStrategy(at),callbacks:at.callbacks});return ut?ot.rootObject.initializeWithOriginRootObject(ut.rootObject):ot.rootObject.initialize(),Mt}},{key:"parseSnapshotFrame",value:function(at,ut){var ot=this.proxyManager.createProxyRuntime(at),gt=cp.V1,xt=!1;return ot.frameHandler.deserializeSnapshotFrame(ut,gt,xt)}},{key:"createWithSnapshot",value:function(at){var ut=this.findOriginProxyRuntime(at),ot=this.proxyManager.createProxyRuntime(at.library,ut),gt=at.snapshotDeserializerVersion;gt===void 0&&(gt=Hm(Hu));var xt=ot.frameHandler.deserializeSnapshotFrame(at.snapshotFrame,gt,at.ignoreHashChecking),Mt=xt.rootObject,kt=new L1(ot,xt.users);ot.setupWithRootObject(Mt,{logger:at.logger,observerId:at.observerId,imageUsers:kt,pendingReportChanged:at.pendingReportChanged,snapshotManager:vm(at.library,at.roomUUID),toolsExtra:at.toolsExtra});var zt=new Av({frameId:xt.frameId,timestamp:xt.timestamp,library:at.library,logger:at.logger,actionFrames:at.actionFrames,proxyRuntime:ot,imageUsers:kt,strategy:yt.wrapStrategy(at),callbacks:at.callbacks});return ut?ot.rootObject.initializeWithOriginRootObject(ut.rootObject):ot.rootObject.initialize(),zt}},{key:"findOriginProxyRuntime",value:function(at){var ut=at.originalImage;if(ut)return ut.proxyRuntime}}],[{key:"wrapStrategy",value:function(at){var ut=at.actionDeserializerVersion;return ut===void 0&&(ut=Hm(Hu)),Object.freeze({roomUUID:at.roomUUID,ignoreHashChecking:at.ignoreHashChecking,includesFrameHash:at.includesFrameHash,deserializerVersion:ut})}}]),yt})(),F1=Object.freeze(TS());function TS(){return[{methodName:"toString",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"toLocaleString",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"join",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"indexOf",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"lastIndexOf",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"every",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"some",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"forEach",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"reduce",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"reduceRight",returnArray:!1,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"concat",returnArray:!0,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"reverse",returnArray:!0,lengthChanged:!1,elementChanged:!0,cleanEqualsCount:!0,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"slice",returnArray:!0,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"splice",returnArray:!0,lengthChanged:!0,elementChanged:!0,cleanEqualsCount:!0,touchLength:!0,pickTouchedSegment:function(ct,at){var ut,ot=at[0];if(ot>=0&&ot<ct.length)if(at.length>1){var gt=at[1];gt===void 0&&(gt=0);var xt=at.length-2;xt<0&&(xt=0),xt===gt?xt>0&&(ut={beginIndex:ot,length:xt}):ut={beginIndex:ot,length:ct.length-ot}}else ut={beginIndex:ot,length:ct.length-ot};return ut}},{methodName:"map",returnArray:!0,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"filter",returnArray:!0,lengthChanged:!1,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"sort",returnArray:!0,lengthChanged:!1,elementChanged:!0,cleanEqualsCount:!0,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}},{methodName:"push",returnArray:!1,lengthChanged:!0,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:ct.length-1,length:1}}},{methodName:"pop",returnArray:!1,lengthChanged:!0,elementChanged:!1,cleanEqualsCount:!1,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:ct.length,length:1}}},{methodName:"shift",returnArray:!1,lengthChanged:!0,elementChanged:!0,cleanEqualsCount:!0,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length+1}}},{methodName:"unshift",returnArray:!1,lengthChanged:!0,elementChanged:!0,cleanEqualsCount:!0,touchLength:!0,pickTouchedSegment:function(ct){return{beginIndex:0,length:ct.length}}}]}var E0=(function(){function yt(ct){Ot(this,yt),this.nodes={};var at={},ut=Jt(ct),ot;try{var gt=function(){var Mt=ot.value,kt=Mt.clazz,zt=Mt.banList,Ht=Mt.proxyList,rr={},ur=kt.name;at[ur]=Object.freeze({clazz:kt,methods:rr});var _r=Jt(zt),Dr;try{var Br=function(){var ts=Dr.value;rr[ts]=function(){throw new Error("".concat(ur,".").concat(ts," is ban in Magix"))}};for(_r.s();!(Dr=_r.n()).done;)Br()}catch(jn){_r.e(jn)}finally{_r.f()}var Ur=Jt(Ht),Zr;try{var Tn=function(){var ts=Zr.value;rr[ts]=function(){throw new Error("".concat(ur,".").concat(ts," is not defined"))}};for(Ur.s();!(Zr=Ur.n()).done;)Tn()}catch(jn){Ur.e(jn)}finally{Ur.f()}Object.seal(rr)};for(ut.s();!(ot=ut.n()).done;)gt()}catch(xt){ut.e(xt)}finally{ut.f()}this.nodes=at}return Bt(yt,[{key:"findMethod",value:function(at,ut){var ot=this.findNode(at);if(ot)return ot.methods[ut]}},{key:"proxyMethod",value:function(at,ut,ot){var gt=this.findNode(at);if(!gt)throw new Error("invalid class");if(!(ut in gt.methods))throw new Error("invalid method ".concat(JSON.stringify(ut)));gt.methods[ut]=ot}},{key:"findNode",value:function(at){var ut=at.name,ot=this.nodes[ut];if(ot&&ot.clazz===at)return ot}}]),yt})();function A0(){return new E0([{clazz:Object,proxyList:["assign"],banList:["getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","create","defineProperty","defineProperties"]},{clazz:Array,proxyList:[],banList:["from"]},{clazz:String,proxyList:["fromCodePoint","fromCharCode"],banList:[]},{clazz:Number,proxyList:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"],banList:[]}])}var C0=Object.defineProperty,Em=Object.getOwnPropertySymbols,Ny=Object.prototype.hasOwnProperty,ty=Object.prototype.propertyIsEnumerable,a1=function(ct,at,ut){return at in ct?C0(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},gy=function(ct,at){for(var ut in at||(at={}))Ny.call(at,ut)&&a1(ct,ut,at[ut]);if(Em){var ot=Jt(Em(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;ty.call(at,ut)&&a1(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},lw=(function(){function yt(ct){Ot(this,yt),this.usersCache={},this.observerId=ct.observerId,this.environment=ct.environment,this.authorId=ct.authorId,this.core=ct.coreFunctions,this.roomObserver=ct.roomObserver,this.imageUsers=ct.imageUsers}return Bt(yt,[{key:"getAuthorId",value:function(){var at;return this.environment===Ov.NoEffects&&this.observerId===this.authorId&&((at=this.roomObserver)==null||at.reportObservedObserverId()),this.authorId}},{key:"hasUser",value:function(at){var ut;return this.environment===Ov.NoEffects&&((ut=this.roomObserver)==null||ut.reportObservedUsers()),this.imageUsers.hasUser(at)}},{key:"getUsersCount",value:function(){var at;return this.environment===Ov.NoEffects&&((at=this.roomObserver)==null||at.reportObservedUsers()),this.imageUsers.usersCount}},{key:"getUser",value:function(at){var ut,ot;return this.imageUsers.hasUser(at)&&(ot=this.usersCache[at],ot||(ot=this.usersCache[at]=this.core.creator(this.imageUsers.user(at,!0)))),this.environment===Ov.NoEffects&&((ut=this.roomObserver)==null||ut.reportObservedUsers()),ot}},{key:"getUserIds",value:function(){var at;return this.userIdsCache||(this.userIdsCache=this.core.creator(this.imageUsers.userIds)),this.environment===Ov.NoEffects&&((at=this.roomObserver)==null||at.reportObservedUsers()),this.userIdsCache}}]),yt})(),ES=(function(){function yt(ct){Ot(this,yt),this._hasDoubleLines=!1,this._branchRuntime=null,this.logger=ct.logger,this.observerId=ct.observerId,this.proxyRuntime=ct.proxyRuntime,this.imageUsers=ct.imageUsers,this.toolsExtra=ct.toolsExtra,this.snapshotManager=ct.snapshotManager}return Bt(yt,[{key:"hasDoubleLines",get:function(){return this._hasDoubleLines}},{key:"branchRuntime",get:function(){return this._branchRuntime}},{key:"changeToDoubleLines",value:function(){this._hasDoubleLines=!0}},{key:"forkBranchRuntime",value:function(){return this._branchRuntime=mw(this.logger),this._branchRuntime}},{key:"releaseBranchRuntime",value:function(){this._branchRuntime&&(this._branchRuntime=null)}},{key:"getForwardMode",value:function(){return!this._hasDoubleLines||this._branchRuntime?Ym.SingleForward:Ym.DoubleForward}},{key:"runWithMagix",value:function(at,ut){var ot=at.authorId,gt=this.getEnvironment(at.mode),xt=this.getForwardMode(),Mt=yt.coreFunctionsSwitcher.switchCoreFunctions(at.mode),kt=Object.freeze({idGenerator:at.identifierGenerator,environment:gt,timestamp:at.timestamp,snapshot:this.snapshotManager,extra:this.toolsExtra,functions:new lw({observerId:this.observerId,environment:gt,authorId:ot,coreFunctions:Mt,roomObserver:this.proxyRuntime.roomObserver,imageUsers:this.imageUsers})}),zt={mode:at.mode,coreFunctions:Mt,frameSection:at.frameSection,proxyRuntime:this.proxyRuntime,forwardMode:xt,tools:kt};return yp.runWith(zt,ut)}},{key:"runWithSerialization",value:function(at,ut){var ot=this.getForwardMode(),gt=yt.coreFunctionsSwitcher.switchCoreFunctions(at.mode),xt={mode:at.mode,coreFunctions:gt,frameSection:at.frameSection,proxyRuntime:this.proxyRuntime,forwardMode:ot};return yp.runWith(xt,ut)}},{key:"isForcesOnIllusionLine",value:function(at){switch(at){case ry.Real:case ry.RealAck:return!1;case ry.Illusion:case ry.IllusionRebuild:return!0;case ry.Outside:return this._hasDoubleLines&&!!this._branchRuntime;default:throw new Error("invalid mode ".concat(at))}}},{key:"getEnvironment",value:function(at){switch(at){case ry.Illusion:case ry.IllusionRebuild:return Ov.Illusion;case ry.Real:case ry.RealAck:return Ov.Real;case ry.Outside:return Ov.NoEffects;default:throw new Error("invalid mode ".concat(at))}}}],[{key:"coreFunctionsSwitcher",get:function(){return this._coreFunctionsSwitcher||(this._coreFunctionsSwitcher=new j_),this._coreFunctionsSwitcher}}]),yt})();function s1(yt,ct,at){return ct.constructor===Object?z_(yt,at,ct):R0(yt,at,ct)}var o1="__identifier";function B1(yt,ct){Object.defineProperty(yt,o1,{enumerable:!1,configurable:!0,value:ct})}var fx;yp.addListener(function(yt,ct){ct?fx=yt.coreFunctions.creator:fx=void 0});var AS=(function(){function yt(ct,at,ut){Ot(this,yt),this.proxyRuntime=ct,this.identifierGenerator=at,this.banFunction=ut,this.proxyNodes={},this.modifyObjects=[]}return Bt(yt,[{key:"complete",value:function(){var at=Jt(this.modifyObjects),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;delete ot[o1]}}catch(gt){at.e(gt)}finally{at.f()}}},{key:"wrap",value:function(at){if(this.banFunction&&typeof at=="function")throw new Error("can't wrap function");if(tr(at)!="object"||at===null||Sl(at))return at;if(by(at))throw new Error("can't let displayer node pass Magix border");if(at.constructor===Array)return this.wrapArray(at);if(at.constructor===Object)return this.wrapObject(at);throw new Error("can't let object of ".concat(at.constructor.name," pass Magix border"))}},{key:"wrapArray",value:function(at){var ut=at[o1],ot;if(ut===void 0){ut=this.identifierGenerator.generate(),B1(at,ut),ot=this.createProxyNode([],ut);for(var gt=ot.target(),xt=0;xt<at.length;++xt)gt[xt]=this.wrap(at[xt]);this.proxyNodes[ut]=ot,this.modifyObjects.push(at)}else ot=this.proxyNodes[ut];return ot}},{key:"wrapObject",value:function(at){var ut=at[o1],ot;if(ut===void 0){ut=this.identifierGenerator.generate(),B1(at,ut),ot=this.createProxyNode({},ut);var gt=ot.target(),xt=Object.keys(at).sort(),Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;gt[zt]=this.wrap(at[zt])}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}this.proxyNodes[ut]=ot,this.modifyObjects.push(at)}else ot=this.proxyNodes[ut];return ot}},{key:"createProxyNode",value:function(at,ut){return fx?fx(at,ut):s1(this.proxyRuntime,at,ut)}}]),yt})(),CS=(function(){function yt(ct){Ot(this,yt),this.pendingBuffer={},this.observer=ct.create(vl,"room observer")}return Bt(yt,[{key:"pendingReportChanged",get:function(){return!!this.pendingBuffer},set:function(at){!!this.pendingBuffer!==at&&(at?this.pendingBuffer={}:(this.firePendingReportChanges(this.pendingBuffer),this.pendingBuffer=null))}},{key:"reportObserverIdChanged",value:function(at){this.report(yt.selfUserId,at,fl.Updated)}},{key:"reportUsersChanged",value:function(at){this.report(yt.users,at,fl.Updated)}},{key:"reportObservedObserverId",value:function(){this.observer.reportObservedKey(yt.selfUserId)}},{key:"reportObservedUsers",value:function(){this.observer.reportObservedKey(yt.users)}},{key:"firePendingReportChanges",value:function(at){for(var ut in at){var ot=at[ut],gt=ot.value,xt=ot.kind;this.observer.reportChanged(yt.users,gt,xt)}}},{key:"report",value:function(at,ut,ot){if(this.pendingBuffer){var gt=this.pendingBuffer[at];gt?(gt.value=ut,gt.kind=ot):this.pendingBuffer[at]={value:ut,kind:ot}}else this.observer.reportChanged(at,ut,ot)}}]),yt})(),dm=CS;dm.selfUserId="userId",dm.users="users";function D0(yt,ct){Object.defineProperty(yt,Ly,{enumerable:!1,writable:!1,configurable:!0,value:ct})}var cw=(function(){function yt(){Ot(this,yt),this.didTouchedSet={}}return Bt(yt,[{key:"copyProxyNode",value:function(at){var ut=at.identifier;this.didTouchedSet[ut]||(this.didTouchedSet[ut]=!0,bl(at)?this.copyAkkoObjectProxyNode(at):$p(at)?this.copyFlatObjectProxyNode(at):I0(at)&&this.copyArrayProxyNode(at))}},{key:"copyAkkoObjectProxyNode",value:function(at){var ut=at.realTarget;if(ut){var ot={};for(var gt in ut){var xt=Object.getOwnPropertyDescriptor(ut,gt);if(xt&&!xt.get&&!xt.set){var Mt=ut[gt];Um(Mt)&&this.copyProxyNode(Mt),ot[gt]=Mt}}D0(ot,at),Object.setPrototypeOf(ot,at.struct.classReflection.clazz.prototype),at.illuTarget=ot}}},{key:"copyFlatObjectProxyNode",value:function(at){var ut=at.realTarget;if(ut){var ot={};for(var gt in ut){var xt=ut[gt];Um(xt)&&this.copyProxyNode(xt),ot[gt]=xt}D0(ot,at),at.illuTarget=ot}}},{key:"copyArrayProxyNode",value:function(at){var ut=at.realTarget;if(ut){for(var ot=[],gt=0;gt<ut.length;++gt)if(gt in ut){var xt=ut[gt];Um(xt)&&this.copyProxyNode(xt),ot[gt]=xt}D0(ot,at),at.illuTarget=ot}}}]),yt})(),j1=new((function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"addProperty",value:function(at,ut,ot){}},{key:"removeProperty",value:function(at,ut){}},{key:"setProperty",value:function(at,ut,ot){}},{key:"unbindDelegate",value:function(at){}},{key:"callbackDelegates",value:function(){return{didUpdated:!1}}}]),yt})());function Am(){return j1}function vy(yt,ct){var at=j1;try{return j1=yt,ct(),{didUpdated:yt.didUpdated}}finally{j1=at}}var u1=(function(){function yt(){Ot(this,yt),this.disable=!1,this.delegates={},this.unbindsDelegated={},this.updatedObjects={},this._didUpdated=!1}return Bt(yt,[{key:"didUpdated",get:function(){return this._didUpdated}},{key:"callbackDelegates",value:function(){for(var at in this.delegates)if(at in this.unbindsDelegated)delete this.delegates[at];else{var ut=this.delegates[at],ot=this.updatedObjects[at];ut.updateDisplayer(ot)}for(var gt in this.delegates){var xt=this.delegates[gt],Mt=this.updatedObjects[gt];xt.reportChanged(Mt)}}},{key:"unbindDelegate",value:function(at){this.disable||(this.unbindsDelegated[at.identifier]=!0)}},{key:"addProperty",value:function(at,ut,ot){if(!(this.disable||(this._didUpdated=!0,at.didDispose))){var gt=this.getBufferObject(at),xt=gt[ut];if(xt)switch(xt.value=ot,xt.kind){case fl.Removed:{xt.kind=fl.Updated;break}case fl.Inserted:{xt.kind=fl.Inserted;break}case fl.Updated:{xt.kind=fl.Updated;break}}else gt[ut]={kind:fl.Inserted,value:ot,isIndex:typeof ut=="number"}}}},{key:"setProperty",value:function(at,ut,ot){if(!(this.disable||(this._didUpdated=!0,at.didDispose))){var gt=this.getBufferObject(at),xt=gt[ut];if(xt)switch(xt.value=ot,xt.kind){case fl.Removed:{xt.kind=fl.Updated;break}case fl.Inserted:{xt.kind=fl.Inserted;break}case fl.Updated:{xt.kind=fl.Updated;break}}else gt[ut]={kind:fl.Updated,value:ot,isIndex:typeof ut=="number"}}}},{key:"removeProperty",value:function(at,ut){if(!(this.disable||(this._didUpdated=!0,at.didDispose))){var ot=this.getBufferObject(at),gt=ot[ut];if(gt)switch(gt.kind){case fl.Removed:break;case fl.Inserted:{delete ot[ut];break}case fl.Updated:{gt.kind=fl.Removed,gt.value=void 0;break}}else ot[ut]={kind:fl.Removed,value:void 0,isIndex:typeof ut=="number"}}}},{key:"getBufferObject",value:function(at){var ut=at.identifier,ot=this.updatedObjects[ut];return ot||(this.delegates[ut]=at,this.updatedObjects[ut]=ot={}),ot}}]),yt})(),dw=(function(){function yt(ct,at,ut){Ot(this,yt),this.runtime=ct,this.observerAdapter=at,ut?this.pendingUpdatedSection=new u1:this.pendingUpdatedSection=null}return Bt(yt,[{key:"pendingReportChanged",get:function(){return!!this.pendingUpdatedSection},set:function(at){!!this.pendingUpdatedSection!==at&&(at?this.pendingUpdatedSection=new u1:(this.pendingUpdatedSection.callbackDelegates(),this.pendingUpdatedSection=null))}},{key:"runWithMagix",value:function(at,ut){return this.runtime.runWithMagix(at,ut)}},{key:"runWithDisableObserve",value:function(at){var ut=Am();try{return ut.disable=!0,at()}finally{ut.disable=!1}}},{key:"runWithContinuousUpdated",value:function(at){var ut,ot,gt;return this.pendingUpdatedSection?(ot=this.pendingUpdatedSection,gt=!1):(ot=new u1,gt=!0),this.observerAdapter?this.observerAdapter.observeUpdate(function(){ut=vy(ot,at),gt&&ot.callbackDelegates()}):(ut=vy(ot,at),gt&&ot.callbackDelegates()),ut}}]),yt})();function zx(yt){for(var ct in yt)return!0;return!1}var cT=(function(){function yt(ct){var at=this;Ot(this,yt),this.cache={},this.clean=function(){var ut=at.adapter.createObserverCollection();for(var ot in at.cache){var gt=at.cache[ot];for(var xt in gt){var Mt=gt[xt].hub;Mt&&ut.addObserverHub(Mt)}delete at.cache[ot]}ut.clean()},this.adapter=ct,this.delayer=new Xs(this.clean)}return Bt(yt,[{key:"dispose",value:function(){this.delayer.dispose()}},{key:"valueWithArgs",value:function(at,ut,ot,gt,xt){var Mt=this,kt;if(this.isComplicate(gt))return xt.call(at,ot,gt);{var zt=ot+JSON.stringify(gt),Ht=this.cache[ut];Ht||(Ht=this.cache[ut]={});var rr;if(zt in Ht)rr=Ht[zt],(kt=rr.hub)==null||kt.replay();else{var ur,_r;try{ur=this.adapter.collectObservations(function(){return xt.call(at,ot,gt)},function(Dr){return _r=Dr}),rr={hub:_r,result:ur}}catch(Dr){rr={hub:_r,error:Dr}}_r&&(_r.onChanged=function(){return Mt.onExpire(ut,zt)}),Ht[zt]=rr}return this.touchCache(),this.returnNode(rr)}}},{key:"isComplicate",value:function(at){var ut=5;if(at.length>=ut)return!0;var ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(typeof xt!="string"&&typeof xt!="number")return!0}}catch(Mt){ot.e(Mt)}finally{ot.f()}return!1}},{key:"valueWithKey",value:function(at,ut,ot,gt){var xt=this,Mt,kt=this.cache[ut];kt||(kt=this.cache[ut]={});var zt;if(ot in kt)zt=kt[ot],(Mt=zt.hub)==null||Mt.replay();else{var Ht,rr;try{Ht=this.adapter.collectObservations(function(){return gt.call(at,ot)},function(ur){return rr=ur}),zt={hub:rr,result:Ht}}catch(ur){zt={hub:rr,error:ur}}rr&&(rr.onChanged=function(){return xt.onExpire(ut,ot)}),kt[ot]=zt}return this.touchCache(),this.returnNode(zt)}},{key:"onExpire",value:function(at,ut){var ot=this.cache[at];ut in ot&&(delete ot[ut],zx(ot)||delete this.cache[at])}},{key:"returnNode",value:function(at){if(at.error)throw at.error;return at.hub&&at.hub.replay(),at.result}},{key:"touchCache",value:function(){if(!this.delayer.isRunning){var at=yt.cacheDuration,ut=yt.cacheRate,ot=at+Math.random()*ut;this.delayer.refreshAndInvokeAfterInterval(ot)}}}]),yt})(),l1=cT;l1.cacheDuration=60*1e3,l1.cacheRate=.3;var c1=(function(){function yt(ct,at,ut,ot){var gt=ot.observerAdapter,xt=ot.escapeObjectFilter,Mt=ot.jsxFactory;Ot(this,yt),this.objectOperator=ct,this.library=at,this.disposedListeners=[],this.observerAdapter=gt,this.escapeObjectFilter=xt||function(){return!1},this.jsxFactory=Mt,this.roomObserver=gt&&new dm(gt),this.noEffectsIdGenerator=rp(up),this.frameHandler=new dT(this,this.library),this.cache=this.observerAdapter&&new l1(this.observerAdapter),ut&&ut.library===this.library?this.structMap=gy({},ut.structMap):this.structMap={}}return Bt(yt,[{key:"runtime",get:function(){return this._runtime}},{key:"block",get:function(){return this.proxyBlock}},{key:"rootObject",get:function(){return this._rootObject}},{key:"hasDoubleLines",get:function(){return this._runtime.hasDoubleLines}},{key:"hasBranch",get:function(){return!!this._runtime.branchRuntime}},{key:"pendingReportChanged",get:function(){var at,ut;return!!((at=this.roomObserver)!=null&&at.pendingReportChanged||(ut=this.proxyBlock)!=null&&ut.pendingReportChanged)},set:function(at){this.roomObserver&&(this.roomObserver.pendingReportChanged=at),this.proxyBlock&&(this.proxyBlock.pendingReportChanged=at),this._rootObject.pendingUpdatedRootObject=at}},{key:"forkBranchRuntime",value:function(){this._runtime.forkBranchRuntime()}},{key:"mergeBranch",value:function(){var at=this._runtime;at.branchRuntime.syncTwoBranches(),at.releaseBranchRuntime()}},{key:"observeUpdate",value:function(at){this.observerAdapter?this.observerAdapter.observeUpdate(at):at()}},{key:"reportUsersChanged",value:function(at){var ut;(ut=this.roomObserver)==null||ut.reportUsersChanged(at)}},{key:"reportObserverIdChanged",value:function(at){var ut;this._runtime.observerId=at,(ut=this.roomObserver)==null||ut.reportObserverIdChanged(at)}},{key:"createFrameSection",value:function(at){var ut=this._runtime;ut.hasDoubleLines||(new cw().copyProxyNode(this._rootObject.snapshotRootObject()),ut.changeToDoubleLines());var ot=ut.branchRuntime;ot||(ot=ut.forkBranchRuntime());var gt;return at&&(gt=at.takeCreatedProxyNodes()),ot.createFrameSection(gt)}},{key:"setupWithParameters",value:function(at,ut,ot,gt){var xt=this;this.setupRuntime(gt);var Mt=Pr,kt=rp(at),zt=this.pushValues(kt,ut,!0),Ht={authorId:Mt,mode:Yl.Real,timestamp:ot,identifierGenerator:kt},rr=this.runtime.runWithMagix(Ht,function(){var ur=xt.library.rootClass;return Nt(ur,Ct(zt))}).__proxy;this._rootObject=new FS(this._runtime,rr,this.observerAdapter),this._rootObject.pendingUpdatedRootObject=gt.pendingReportChanged}},{key:"setupWithRootObject",value:function(at,ut){if(this.setupRuntime(ut),!bl(at))throw new Error("rootObject should be AkkoObjectProxyNode");this._rootObject=new FS(this._runtime,at,this.observerAdapter),this._rootObject.pendingUpdatedRootObject=ut.pendingReportChanged}},{key:"setupRuntime",value:function(at){if(this._runtime)throw new Error("did bind runtime params");this._runtime=new ES({logger:at.logger,observerId:at.observerId,imageUsers:at.imageUsers,snapshotManager:at.snapshotManager,proxyRuntime:this,toolsExtra:at.toolsExtra}),this.roomObserver&&(this.roomObserver.pendingReportChanged=at.pendingReportChanged),this.proxyBlock=new dw(this._runtime,this.observerAdapter,at.pendingReportChanged)}},{key:"pullValue",value:function(at){return tr(at)!="object"||at===null?at:Um(at)?at.displayer:Sl(at)?at.readonly?at:at.slice():this.escapeObjectFilter(at)?at:void 0}},{key:"pushValues",value:function(at,ut,ot){var gt=[],xt=new AS(this,at,ot);try{for(var Mt=0;Mt<ut.length;++Mt)gt[Mt]=xt.wrap(ut[Mt]);return gt}finally{xt.complete()}}},{key:"getAkkoObjectStruct",value:function(at){var ut=this.structMap[at.id];return ut||(ut=this.structMap[at.id]=new dE(at)),ut}},{key:"listenDisposed",value:function(at){this.disposedListeners.indexOf(at)===-1&&this.disposedListeners.push(at)}},{key:"unlistenDisposed",value:function(at){var ut=this.disposedListeners.indexOf(at);ut!==-1&&this.disposedListeners.splice(ut,1)}},{key:"dispose",value:function(){var at;(at=this.cache)==null||at.dispose();var ut=Jt(this.disposedListeners.splice(0)),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;try{gt()}catch(xt){console.error(xt)}}}catch(xt){ut.e(xt)}finally{ut.f()}}}]),yt})(),ky=A0();ky.proxyMethod(Object,"assign",function(){for(var yt,ct=arguments.length,at=new Array(ct),ut=0;ut<ct;ut++)at[ut]=arguments[ut];if(at.length>0){var ot=at[0];ot&&Um(ot)&&(yt=ot)}for(var gt=0;gt<at.length;++gt)at[gt]=Yx(at[gt]);var xt=Object.assign.apply(this,at),Mt=xt[Ly];return yt&&yt!==Mt&&(Mt=yt,$_(yt,xt)),Mt}),ky.proxyMethod(String,"fromCodePoint",function(){for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];for(var ut=0;ut<ct.length;++ut)ct[ut]=Yx(ct[ut]);return String.fromCodePoint.apply(this,ct)}),ky.proxyMethod(String,"fromCharCode",function(){for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];for(var ut=0;ut<ct.length;++ut)ct[ut]=Yx(ct[ut]);return String.fromCharCode.apply(this,ct)}),ky.proxyMethod(Number,"isFinite",Number.isFinite),ky.proxyMethod(Number,"isInteger",Number.isInteger),ky.proxyMethod(Number,"isNaN",Number.isNaN),ky.proxyMethod(Number,"isSafeInteger",Number.isSafeInteger),ky.proxyMethod(Number,"parseFloat",Number.parseFloat),ky.proxyMethod(Number,"parseInt",Number.parseInt);var $1;yp.addListener(function(yt,ct){ct?$1=yt.proxyRuntime.jsxFactory:$1=void 0});function hw(){if(!$1)throw yp.currentNode?new Error("can't create JSX. you didn't set jsxFactory"):new Error("can't create JSX. maybe you called it out of Magix");for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];return $1.apply(void 0,ct)}var d1=(function(){function yt(){Ot(this,yt),this.unwrappedMap={}}return Bt(yt,[{key:"unwrap",value:function(at){return Um(at)?this.unwrapProxyNode(at):Sl(at)?at.readonly?at:at.slice():at}},{key:"unwrapProxyNode",value:function(at){if(bl(at))return at.displayer;{var ut=at.identifier,ot=this.unwrappedMap[ut];if(!ot){var gt=at.target();if($p(at)){this.unwrappedMap[ut]=ot={};for(var xt in gt)ot[xt]=this.unwrap(gt[xt])}else if(I0(at)){this.unwrappedMap[ut]=ot=[];for(var Mt=0;Mt<gt.length;++Mt)ot[Mt]=this.unwrap(gt[Mt])}}return ot}}}]),yt})();function $m(yt){if(!(tr(yt)!="object"||yt===null)){if(Um(yt))return yt;{var ct=yt[Ly];return Um(ct)?ct:void 0}}}function Vl(yt){return yt instanceof w0?yt.__proxy:yt}var Y0=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"updater",value:function(at){return at}},{key:"getter",value:function(at,ut){var ot=$m(at);return ot?ot.getValue(ut):at[ut]}},{key:"caller",value:function(at,ut,ot,gt){if(typeof at=="function"){if(Nm in at)return at[ut].apply(at,ot);{var xt=ky.findMethod(at,ut);if(xt)return xt.apply(at,ot);if(typeof Function.prototype[ut]=="function")return at[ut].apply(at,Ct(ot));throw new Error("can't call ".concat(at.name,".").concat(ut,", it's not supported"))}}else{var Mt,kt;return gt&&(Mt=gt[ut]),Um(at)?(kt=at.target(),Mt||(Mt=at.getMethod(ut))):(kt=at,Mt||(Mt=at[ut])),Mt.apply(kt,ot)}}},{key:"setter",value:function(at,ut,ot){var gt=$m(at),xt=ot;return xt=Vl(xt),gt?gt.setValue(ut,xt):at[ut]=xt}},{key:"prefix",value:function(at,ut,ot){var gt=$m(at);return gt?gt.prefix(ut,ot):at[ut]+=ot}},{key:"postfix",value:function(at,ut,ot){var gt=$m(at);if(gt)return gt.postfix(ut,ot);{var xt=at[ut];return at[ut]+=ot,xt}}},{key:"remover",value:function(at,ut){var ot=$m(at);return ot?ot.removeKey(ut):delete at[ut]}},{key:"wrapper",value:function(at){return tr(at)!="object"||at===null?at:at[Ly]||at}},{key:"unwrapper",value:function(at){return Um(at)?at.target():at}},{key:"jsxUnwrapper",value:function(at){return new d1().unwrap(at)}}]),yt})(),Cv,Wv,n0,uE=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"onContextUpdate",value:function(ot,gt){gt?(Cv=ot.tools&&ot.tools.idGenerator,Wv=ot.frameSection,n0=ot.proxyRuntime):(Cv=void 0,Wv=void 0,n0=void 0)}},{key:"creator",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cv.generate(),xt;if(ot.constructor===Array)xt=R0(n0,gt,ot);else if(ot.constructor===Object)xt=z_(n0,gt,ot);else{var Mt=ot.constructor[Nm];if(tr(Mt)!="object"||Mt===null)throw new Error("can't find __reflection");var kt=n0.getAkkoObjectStruct(Mt);xt=lv(n0,gt,ot,kt)}return Wv.addCreatedObject(xt),xt}},{key:"updater",value:function(ot){return Um(ot)&&Wv.illusionUpdateProxyNode(ot),ot}},{key:"setter",value:function(ot,gt,xt){var Mt=$m(ot),kt=xt;return kt=Vl(kt),Mt?(Wv.illusionUpdateProxyNode(Mt),Mt.setValue(gt,kt)):ot[gt]=kt}},{key:"prefix",value:function(ot,gt,xt){var Mt=$m(ot);return Mt?(Wv.illusionUpdateProxyNode(Mt),Mt.prefix(gt,xt)):ot[gt]+=xt}},{key:"postfix",value:function(ot,gt,xt){var Mt=$m(ot);if(Mt)return Wv.illusionUpdateProxyNode(Mt),Mt.postfix(gt,xt);{var kt=ot[gt];return ot[gt]+=xt,kt}}},{key:"remover",value:function(ot,gt){var xt=$m(ot);return xt?(Wv.illusionUpdateProxyNode(xt),xt.removeKey(gt)):delete ot[gt]}}]),at})(Y0),fw,ov,Q0,h1=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"onContextUpdate",value:function(ot,gt){gt?(fw=ot.tools&&ot.tools.idGenerator,ov=ot.frameSection,Q0=ot.proxyRuntime):(fw=void 0,ov=void 0,Q0=void 0)}},{key:"creator",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fw.generate(),xt=ov.illusionTakeCreatedObject(gt,ot);if(xt)xt.replaceIlluTarget(ot);else if(ot.constructor===Array)xt=R0(Q0,gt,ot);else if(ot.constructor===Object)xt=z_(Q0,gt,ot);else{var Mt=ot.constructor[Nm];if(tr(Mt)!="object"||Mt===null)throw new Error("can't find __reflection");var kt=Q0.getAkkoObjectStruct(Mt);xt=lv(Q0,gt,ot,kt)}return ov.addCreatedObject(xt),xt}},{key:"updater",value:function(ot){return Um(ot)&&ov.illusionUpdateProxyNode(ot),ot}},{key:"setter",value:function(ot,gt,xt){var Mt=$m(ot),kt=xt;return kt=Vl(kt),Mt?(ov.illusionUpdateProxyNode(Mt),Mt.setValue(gt,kt)):ot[gt]=kt}},{key:"prefix",value:function(ot,gt,xt){var Mt=$m(ot);return Mt?(ov.illusionUpdateProxyNode(Mt),Mt.prefix(gt,xt)):ot[gt]+=xt}},{key:"postfix",value:function(ot,gt,xt){var Mt=$m(ot);if(Mt)return ov.illusionUpdateProxyNode(Mt),Mt.postfix(gt,xt);{var kt=ot[gt];return ot[gt]+=xt,kt}}},{key:"remover",value:function(ot,gt){var xt=$m(ot);return xt?(ov.illusionUpdateProxyNode(xt),xt.removeKey(gt)):delete ot[gt]}}]),at})(Y0),Oy,DS,yy,sm=Ym.SingleForward,L_=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"onContextUpdate",value:function(ot,gt){gt?(Oy=ot.tools&&ot.tools.idGenerator,DS=ot.frameSection,yy=ot.proxyRuntime,sm=ot.forwardMode):(Oy=void 0,DS=void 0,yy=void 0,sm=Ym.SingleForward)}},{key:"creator",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oy.generate(),xt=DS?.realTakeCreatedObject(gt,ot);if(xt)xt.realTarget=$_(xt,ot);else if(ot.constructor===Array)xt=R0(yy,gt,ot);else if(ot.constructor===Object)xt=z_(yy,gt,ot);else{var Mt=ot.constructor[Nm];if(tr(Mt)!="object"||Mt===null)throw new Error("can't find __reflection");var kt=yy.getAkkoObjectStruct(Mt);xt=lv(yy,gt,ot,kt)}return sm===Ym.DoubleForward&&xt.converge(),xt}},{key:"wrapper",value:function(ot){if(tr(ot)!="object"||ot===null)return ot;var gt=ot[Ly];return gt?(sm===Ym.DoubleForward&&gt.converge(),gt):ot}}]),at})(Y0),U1,Wy,F_,MS=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"onContextUpdate",value:function(ot,gt){gt?(U1=ot.tools&&ot.tools.idGenerator,Wy=ot.frameSection,F_=ot.proxyRuntime):(U1=void 0,Wy=void 0,F_=void 0)}},{key:"creator",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:U1.generate(),xt=Wy.realTakeCreatedObject(gt,ot);if(xt)xt.realTarget=$_(xt,ot);else if(ot.constructor===Array)xt=R0(F_,gt,ot),xt.converge(),Wy.realUpdateProxyNode(xt);else if(ot.constructor===Object)xt=z_(F_,gt,ot),xt.converge(),Wy.realUpdateProxyNode(xt);else{var Mt=ot.constructor[Nm];if(tr(Mt)!="object"||Mt===null)throw new Error("can't find __reflection");var kt=F_.getAkkoObjectStruct(Mt);xt=lv(F_,gt,ot,kt),xt.converge(),Wy.realUpdateProxyNode(xt)}return xt}},{key:"wrapper",value:function(ot){if(tr(ot)!="object"||ot===null)return ot;var gt=ot[Ly];return gt?(gt.illuTarget||(gt.converge(),Wy.realUpdateProxyNode(gt)),gt):ot}},{key:"updater",value:function(ot){return Um(ot)&&Wy.realUpdateProxyNode(ot),ot}},{key:"setter",value:function(ot,gt,xt){var Mt=$m(ot),kt=xt;return kt=Vl(kt),Mt?(Wy.realUpdateProxyNode(Mt),Mt.setValue(gt,kt)):ot[gt]=kt}},{key:"prefix",value:function(ot,gt,xt){var Mt=$m(ot);return Mt?(Wy.realUpdateProxyNode(Mt),Mt.prefix(gt,xt)):ot[gt]+=xt}},{key:"postfix",value:function(ot,gt,xt){var Mt=$m(ot);if(Mt)return Wy.realUpdateProxyNode(Mt),Mt.postfix(gt,xt);{var kt=ot[gt];return ot[gt]+=xt,kt}}},{key:"remover",value:function(ot,gt){var xt=$m(ot);return xt?(Wy.realUpdateProxyNode(xt),xt.removeKey(gt)):delete ot[gt]}}]),at})(Y0),y_=Vx;yp.addListener(function(yt,ct){ct&&yt.tools&&yt.mode===ry.Outside?y_=Gx:y_=Vx});function Gx(yt){return Bl(yt.identifier)===up}function Vx(){return!0}var mx,qy;function Hx(yt,ct){if(y_(yt))return!0;var at=am(yt.target());if(at){var ut=at.properties[ct];if(ut&&ut.isTransient)return!0}return!1}var B_=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"onContextUpdate",value:function(ot,gt){gt?(mx=ot.tools&&ot.tools.idGenerator,qy=ot.proxyRuntime):(mx=void 0,qy=void 0)}},{key:"creator",value:function(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mx.generate(),xt;if(ot.constructor===Array)xt=R0(qy,gt,ot);else if(ot.constructor===Object)xt=z_(qy,gt,ot);else{var Mt=ot.constructor[Nm];if(tr(Mt)!="object"||Mt===null)throw new Error("can't find __reflection");var kt=qy.getAkkoObjectStruct(Mt);xt=lv(qy,gt,ot,kt)}return xt}},{key:"getter",value:function(ot,gt){var xt=$m(ot);if(xt){var Mt=xt.getValue(gt);return xt.touchKey(gt),Mt}else return ot[gt]}},{key:"unwrapper",value:function(ot){return Um(ot)?(ot.touchKey(),ot.target()):ot}},{key:"setter",value:function(ot,gt,xt){var Mt=$m(ot),kt=xt;if(Mt&&Hx(Mt,gt))return kt=Vl(kt),Mt?Mt.setValue(gt,kt):ot[gt]=kt;throw new Error("Magix is frozen, you can't modify anything")}},{key:"prefix",value:function(ot,gt,xt){var Mt=$m(ot);if(Mt&&Hx(Mt,gt)){var kt=Mt.prefix(gt,xt);return Mt.touchKey(gt),kt}else throw new Error("Magix is frozen, you can't modify anything")}},{key:"postfix",value:function(ot,gt,xt){var Mt=$m(ot);if(Mt&&Hx(Mt,gt)){var kt=Mt.postfix(gt,xt);return Mt.touchKey(gt),kt}else throw new Error("Magix is frozen, you can't modify anything")}},{key:"remover",value:function(ot,gt){var xt=$m(ot);if(xt&&Hx(xt,gt))return xt.removeKey(gt);throw new Error("Magix is frozen, you can't modify anything")}}]),at})(Y0),ry;(function(yt){yt[yt.Illusion=0]="Illusion",yt[yt.IllusionRebuild=1]="IllusionRebuild",yt[yt.Real=2]="Real",yt[yt.RealAck=3]="RealAck",yt[yt.Outside=4]="Outside"})(ry||(ry={}));var j_=(function(){function yt(){var ct=this;Ot(this,yt),this.illusion=yt.bind(new uE),this.illusionRebuild=yt.bind(new h1),this.real=yt.bind(new L_),this.realAck=yt.bind(new MS),this.outside=yt.bind(new B_),this.currentCoreFunctions=this.illusion,yp.addListener(function(at,ut){return ct.currentCoreFunctions.onContextUpdate(at,ut)})}return Bt(yt,[{key:"switchCoreFunctions",value:function(at){switch(at){case 0:{this.currentCoreFunctions=this.illusion;break}case 1:{this.currentCoreFunctions=this.illusionRebuild;break}case 2:{this.currentCoreFunctions=this.real;break}case 3:{this.currentCoreFunctions=this.realAck;break}case 4:{this.currentCoreFunctions=this.outside;break}}return this.currentCoreFunctions}}],[{key:"bind",value:function(at){return Object.freeze({creator:at.creator.bind(at),updater:at.updater.bind(at),wrapper:at.wrapper.bind(at),unwrapper:at.unwrapper.bind(at),jsxUnwrapper:at.jsxUnwrapper.bind(at),getter:at.getter.bind(at),setter:at.setter.bind(at),caller:at.caller.bind(at),remover:at.remover.bind(at),prefix:at.prefix.bind(at),postfix:at.postfix.bind(at),onContextUpdate:at.onContextUpdate.bind(at)})}}]),yt})();function IS(){return new RS}var RS=(function(){function yt(){Ot(this,yt),this.counterSet={},this.elementSet={}}return Bt(yt,[{key:"hasElement",value:function(at){var ut=this.elementSet[at.identifier];return ut?ut===at:!1}},{key:"createSubSet",value:function(){return new lE(this)}},{key:"release",value:function(at){for(var ut in this.elementSet){var ot=this.elementSet[ut];at&&at(ot),delete this.counterSet[ut],delete this.elementSet[ut]}}},{key:"add",value:function(at){var ut=at.identifier;return ut in this.counterSet?this.counterSet[ut]+=1:(this.elementSet[ut]=at,this.counterSet[ut]=1)}},{key:"remove",value:function(at){var ut=this.counterSet[at];return ut===void 0?ut=0:(ut-=1,ut===0&&(delete this.counterSet[at],delete this.elementSet[at])),ut}}]),yt})(),lE=(function(){function yt(ct){Ot(this,yt),this.uniteSet=ct,this.elementSet={}}return Bt(yt,[{key:"add",value:function(at){var ut=at.identifier;ut in this.elementSet||(this.elementSet[ut]=at,this.uniteSet.add(at))}},{key:"release",value:function(at){for(var ut in this.elementSet){var ot=this.elementSet[ut],gt=this.uniteSet.remove(ut);at&&gt===0&&at(ot),delete this.elementSet[ut]}}}]),yt})();function pw(yt){var ct=yt.realTarget,at=yt.illuTarget;if(!ct||!at)return!1;switch(yt.kind){case Dp.Array:{var ut=yt,ot=ct,gt=at;if(ot.length!==gt.length)return!1;for(var xt=ut.equalsCount;xt<ot.length;++xt)if(gx(ot[xt],gt[xt]))return ut.equalsCount=xt,!1;return ut.equalsCount=ot.length,!0}case Dp.FlatObject:case Dp.HangUpObject:{for(var Mt in ct)if(!(Mt in at)||gx(at[Mt],ct[Mt]))return!1;for(var kt in at)if(!(kt in ct))return!1;return!0}case Dp.AkkoObject:{var zt=yt.struct,Ht=Jt(zt.serializableValueProperties),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;if(ur in ct!=ur in at||gx(ct[ur],at[ur]))return!1}}catch(_r){Ht.e(_r)}finally{Ht.f()}return!0}default:return!1}}function gx(yt,ct){return yt===ct?!1:Number.isNaN(yt)?!Number.isNaN(ct):Sl(yt)&&Sl(ct)?!yt.isEqualsTo(ct):!0}function mw(yt){return new kA(yt)}var kA=(function(){function yt(ct){Ot(this,yt),this.logger=ct,this.updatedProxyNodes=IS(),this.noConvergentRealNodes={},this.noConvergentIllusionNodes={}}return Bt(yt,[{key:"createFrameSection",value:function(at){return new gw(this,this.updatedProxyNodes.createSubSet(),at)}},{key:"syncTwoBranches",value:function(){this.updatedProxyNodes.release(function(xt){pw(xt)||xt.converge()});for(var at in this.noConvergentIllusionNodes){var ut=this.noConvergentIllusionNodes[at],ot=this.noConvergentRealNodes[at];ut!==ot&&ut.converge(),delete this.noConvergentIllusionNodes[at]}for(var gt in this.noConvergentRealNodes)this.noConvergentRealNodes[gt].converge(),delete this.noConvergentRealNodes[gt]}},{key:"isUpdatedProxyNode",value:function(at){return this.updatedProxyNodes.hasElement(at)}},{key:"isNoConvergentIllusionProxyNode",value:function(at){return at in this.noConvergentIllusionNodes}},{key:"isNoConvergentRealProxyNode",value:function(at){return at in this.noConvergentRealNodes}},{key:"addNoConvergentIllusionProxyNode",value:function(at){this.logger.warn("found no convergent illusion object: ".concat(at.identifier)),this.noConvergentIllusionNodes[at.identifier]=at}},{key:"addNoConvergentRealProxyNode",value:function(at){this.logger.warn("found no convergent real object: ".concat(at.identifier)),this.noConvergentRealNodes[at.identifier]=at}}]),yt})(),gw=(function(){function yt(ct,at){var ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ot(this,yt),this.createdProxyNodes={},this.branch=ct,this.illuUpdatedProxyNodes=at,this.realUpdatedProxyNodes={},this.legacyCreatedProxyNodes=ut}return Bt(yt,[{key:"takeCreatedProxyNodes",value:function(){try{return this.createdProxyNodes}finally{this.createdProxyNodes={}}}},{key:"illusionUpdateProxyNode",value:function(at){this.branch.isNoConvergentIllusionProxyNode(at.identifier)||this.illuUpdatedProxyNodes.add(at)}},{key:"realUpdateProxyNode",value:function(at){!this.branch.isNoConvergentRealProxyNode(at.identifier)&&!this.branch.isUpdatedProxyNode(at)&&(this.realUpdatedProxyNodes[at.identifier]=at)}},{key:"addCreatedObject",value:function(at){at.identifier in this.createdProxyNodes||(this.createdProxyNodes[at.identifier]=at),this.illuUpdatedProxyNodes.add(at)}},{key:"illusionTakeCreatedObject",value:function(at,ut){return this.takeCreatedObject(at,ut,this.legacyCreatedProxyNodes)}},{key:"realTakeCreatedObject",value:function(at,ut){var ot=this.takeCreatedObject(at,ut,this.createdProxyNodes);return ot&&!this.branch.isUpdatedProxyNode(ot)&&(this.realUpdatedProxyNodes[at]=ot),ot}},{key:"takeCreatedObject",value:function(at,ut,ot){var gt=ot[at];return gt&&(delete ot[at],(I0(gt)&&ut.constructor!==Array||$p(gt)&&ut.constructor!==Object||bl(gt)&&ut.constructor!==gt.struct.classReflection.clazz)&&(gt.dispose(),gt=void 0)),gt}},{key:"completeRebuild",value:function(){for(var at in this.legacyCreatedProxyNodes)this.legacyCreatedProxyNodes[at].dispose(),delete this.legacyCreatedProxyNodes[at]}},{key:"completeACK",value:function(){var at=this;for(var ut in this.realUpdatedProxyNodes){var ot=this.realUpdatedProxyNodes[ut];pw(ot)||this.branch.addNoConvergentRealProxyNode(ot),delete this.realUpdatedProxyNodes[ut]}this.illuUpdatedProxyNodes.release(function(xt){xt.realTarget&&!pw(xt)&&at.branch.addNoConvergentIllusionProxyNode(xt)});for(var gt in this.createdProxyNodes)this.createdProxyNodes[gt].dispose(),delete this.createdProxyNodes[gt]}}]),yt})();function by(yt){return yt instanceof i0}function _y(yt){var ct=yt.__proxy;return ct.didDispose?xv.Rejected:ct.realTarget?xv.Committed:xv.Uncommitted}var i0=(function(){function yt(ct){Ot(this,yt),Object.defineProperty(this,"__proxy",{value:ct,writable:!1,enumerable:!1,configurable:!0})}return Bt(yt,[{key:"toJSON",value:function(){return this.__proxy.toJSON()}}]),yt})();function PS(yt,ct){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;Object.defineProperty(yt,ct,{enumerable:at,configurable:!0,get:function(){var ot=this.__proxy,gt=ot.proxyRuntime.pullValue(ot.displayerTarget()[ct]);return ot.assertAccessible(),ot.touchKey(ct),gt}})}function cE(yt,ct){delete yt[ct]}var M0;(function(yt){yt[yt.ReadValue=0]="ReadValue",yt[yt.ReadByGetter=1]="ReadByGetter",yt[yt.CanNotReadGetter=2]="CanNotReadGetter",yt[yt.CanNotReadPrivateValue=3]="CanNotReadPrivateValue",yt[yt.CanNotReadPrivateGetter=4]="CanNotReadPrivateGetter"})(M0||(M0={}));var K0;(function(yt){yt[yt.NoEffects=0]="NoEffects",yt[yt.Modifiable=1]="Modifiable",yt[yt.Private=2]="Private",yt[yt.EventReceiver=3]="EventReceiver"})(K0||(K0={}));var dE=(function(){function yt(ct){Ot(this,yt),this.valuePropertiesSet={},this.classReflection=ct;var at=[],ut=[],ot=[],gt={};for(var xt in ct.properties){var Mt=ct.properties[xt],kt=Mt.mode===vs.Value,zt=Mt.decorators.some(function(rr){return rr===Jv}),Ht=Mt.decorators.some(function(rr){return rr===hy});kt&&(gt[xt]=!0,Ht?at.push(xt):ut.push(xt)),Mt.isPublic&&(kt||zt)&&ot.push(xt)}this.transientValueProperties=Object.freeze(at),this.serializableValueProperties=Object.freeze(ut),this.copyableProperties=Object.freeze(ot),this.displayerNodeClass=this.createAkkoDisplayerNodeClass(ct),this.valuePropertiesSet=Object.freeze(gt),this.propertyKinds=this.createPropertyReadableKinds(ct),this.methodKinds=this.createMethodCallableKinds(ct)}return Bt(yt,[{key:"isValueProperty",value:function(at){return at in this.valuePropertiesSet}},{key:"getPropertyReadableKind",value:function(at){return this.propertyKinds[at]}},{key:"getMethodCallableKind",value:function(at){return this.methodKinds[at]}},{key:"getValueOutsideFromProxyNode",value:function(at,ut){switch(this.propertyKinds[ut]){case 0:case 1:return at.proxyRuntime.pullValue(this.getValueFromProxyNode(at,ut));case 2:throw new Error("can't read property ".concat(JSON.stringify(ut)," unless it has @noEffects"));case 3:case 4:throw new Error("can't read private property ".concat(JSON.stringify(ut)));default:return}}},{key:"getValueFromProxyNode",value:function(at,ut){switch(at.assertAccessible(),this.propertyKinds[ut]){case 0:case 3:{var ot=at.displayerTarget()[ut];return at.touchKey(ut),ot}case 1:{var gt=at.proxyRuntime.runtime,xt=gt.observerId,Mt=at.proxyRuntime.noEffectsIdGenerator,kt={authorId:xt,mode:ry.Outside,timestamp:Date.now(),identifierGenerator:Mt};return gt.runWithMagix(kt,function(){return at.target()[ut]})}default:return}}},{key:"createAkkoDisplayerNodeClass",value:function(at){var ut=(function(kt){It(Ht,kt);var zt=qt(Ht);function Ht(){return Ot(this,Ht),zt.apply(this,arguments)}return Ht})(i0),ot=function(zt){var Ht=function(){var ur=this.__proxy,_r=ur.struct;return ur.assertAccessible(),_r.getValueOutsideFromProxyNode(ur,zt)};Object.defineProperty(ut.prototype,zt,{enumerable:!1,configurable:!1,get:Ht})};for(var gt in at.properties)ot(gt);var xt=function(zt){ut.prototype[zt]=function(){for(var Ht=arguments.length,rr=new Array(Ht),ur=0;ur<Ht;ur++)rr[ur]=arguments[ur];return this.__proxy.callOutside(zt,rr)}};for(var Mt in at.methods)xt(Mt);return ut}},{key:"createPropertyReadableKinds",value:function(at){var ut={};for(var ot in at.properties){var gt=at.properties[ot];gt.isPublic?gt.mode===vs.Value?ut[ot]=0:gt.decorators.some(function(xt){return xt===Jv})?ut[ot]=1:ut[ot]=2:gt.mode===vs.Value?ut[ot]=3:ut[ot]=4}return Object.freeze(ut)}},{key:"createMethodCallableKinds",value:function(at){var ut={};for(var ot in at.methods){var gt=at.methods[ot];gt.isPublic?gt.decorators.some(function(xt){return Vv(xt)&&z0(xt.payload)})?ut[ot]=3:gt.decorators.some(function(xt){return xt===Jv})?ut[ot]=0:ut[ot]=1:ut[ot]=2}return Object.freeze(ut)}}]),yt})();function $_(yt,ct){return Object.defineProperty(ct,Ly,{enumerable:!1,writable:!1,configurable:!0,value:yt}),ct}function hE(yt,ct,at){var ut=[];for(var ot in ct){var gt=ct[ot],xt=gt.isIndex?parseInt(ot,10):ot,Mt=gt.kind,kt=void 0;switch(Mt){case fl.Inserted:{kt=yt.proxyRuntime.pullValue(gt.value);break}case fl.Updated:{kt=yt.proxyRuntime.pullValue(gt.value);break}case fl.Removed:break}ut.push({key:xt,value:kt,kind:Mt})}at(ut)}var Ep=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,null,[{key:"createClass",value:function(ot){var gt=ot.classReflection,xt=ot.getter,Mt=ot.invoker,kt=(function(_r){It(Br,_r);var Dr=qt(Br);function Br(Ur,Zr){var Tn;return Ot(this,Br),Tn=Dr.call(this,Zr),Object.defineProperty(Kt(Tn),"__Holder",{value:Ur,writable:!1,enumerable:!1,configurable:!0}),Tn}return Br})(at),zt=function(Dr){Object.defineProperty(kt.prototype,Dr,{enumerable:!1,configurable:!1,get:function(){return xt(Dr)},set:function(){throw new Error("cannot set property ".concat(Dr," which has only a getter"))}})};for(var Ht in gt.properties)zt(Ht);var rr=function(Dr){kt.prototype[Dr]=function(){for(var Br=arguments.length,Ur=new Array(Br),Zr=0;Zr<Br;Zr++)Ur[Zr]=arguments[Zr];return Mt(Dr,Ur)}};for(var ur in gt.methods)rr(ur);return kt}},{key:"updateProxy",value:function(ot,gt){Object.defineProperty(ot,Ly,{value:gt,writable:!1,enumerable:!1,configurable:!0})}},{key:"getHolder",value:function(ot){return ot.__Holder}}]),at})(i0),vx=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.updatedListeners=[],this.disposedListeners=[],this.dispatchDisposed=function(){var ot=Jt(ut.disposedListeners),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;try{xt()}catch(Mt){console.error(Mt)}}}catch(Mt){ot.e(Mt)}finally{ot.f()}},this.runtime=ct,this.onClean=at}return Bt(yt,[{key:"listenUpdated",value:function(at){this.updatedListeners.some(function(ut){return ut.id===at.id})||this.updatedListeners.push(Object.freeze(gy({},at)))}},{key:"unlistenUpdated",value:function(at){var ut=this.updatedListeners.findIndex(function(ot){return ot.id===at});ut!==-1&&(this.updatedListeners.splice(ut,1),this.fireRemoveListener())}},{key:"listenDisposed",value:function(at){this.disposedListeners.indexOf(at)===-1&&(this.disposedListeners.push(at),this.disposedListeners.length===1&&this.runtime.listenDisposed(this.dispatchDisposed))}},{key:"unlistenDisposed",value:function(at){var ut=this.disposedListeners.indexOf(at);ut!==-1&&(this.disposedListeners.splice(ut,1),this.fireRemoveListener(),this.disposedListeners.length===0&&this.runtime.unlistenDisposed(this.dispatchDisposed))}},{key:"dispatchUpdated",value:function(at){var ut=Jt(this.updatedListeners),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.listener;try{gt(at)}catch(xt){console.error(xt)}}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"fireRemoveListener",value:function(){this.updatedListeners.length===0&&this.disposedListeners.length===0&&(this.runtime.unlistenDisposed(this.dispatchDisposed),this.onClean())}}]),yt})();function xy(yt,ct){var at=p1(yt),ut=yt.__proxy;at?.listenUpdated({id:ct,listener:function(gt){return hE(ut,gt,ct)}})}function f1(yt,ct){var at;(at=p1(yt))==null||at.unlistenUpdated(ct)}function Wx(yt,ct){var at;(at=p1(yt))==null||at.listenDisposed(ct)}function NS(yt,ct){var at;(at=p1(yt))==null||at.unlistenDisposed(ct)}function p1(yt){if(!by(yt))throw new Error("it isn't akko wrapped object");var ct;return yt instanceof Ep?ct=Ep.getHolder(yt).getListeners():ct=yt.__proxy.getListeners(),ct}var Xx=!1,yx=Ym.SingleForward;yp.addListener(function(yt,ct){if(ct){var at=yt.proxyRuntime.runtime;Xx=at.isForcesOnIllusionLine(yt.mode),yx=yt.forwardMode}else Xx=!1,yx=Ym.SingleForward});function Um(yt){return yt instanceof em}function Yx(yt){return tr(yt)!="object"||yt===null?yt:yt instanceof em?yt.target():yt}var em=(function(){function yt(ct,at,ut){Ot(this,yt),this._didDispose=!1,this.listeners=null,this.proxyRuntime=ct,this.identifier=at,Xx?this.illuTarget=$_(this,ut):this.realTarget=$_(this,ut)}return Bt(yt,[{key:"didDispose",get:function(){return this._didDispose}},{key:"assertAccessible",value:function(){if(this._didDispose)throw new Error("akko wrapped object isn't accessible")}},{key:"reportChanged",value:function(at){var ut;(ut=this.listeners)==null||ut.dispatchUpdated(at)}},{key:"getValue",value:function(at){return this.target()[at]}},{key:"touchKey",value:function(at){var ut=this.proxyRuntime.observerAdapter;ut&&(this.observer||(this.observer=ut.create(this.identifier,this.getDebugName())),at===void 0?this.observer.reportObservedIteration():this.observer.reportObservedKey(at))}},{key:"getListeners",value:function(){var at=this;return!this.listeners&&!this._didDispose&&(this.listeners=new vx(this.proxyRuntime,function(){at.listeners=null})),this.listeners}},{key:"cleanListeners",value:function(){this.listeners=null}},{key:"dispose",value:function(){this._didDispose=!0,Am().unbindDelegate(this),this._displayer&&(this.releaseDisplayer(this._displayer),delete this._displayer,delete this.observer),this.listeners&&(this.listeners=null)}},{key:"target",value:function(){return Xx?this.illuTarget:this.realTarget}},{key:"displayerTarget",value:function(){return this.illuTarget||this.realTarget}},{key:"displayer",get:function(){return this._displayer||(this._displayer=this.createDisplayer()),this._displayer}},{key:"toString",value:function(){return this.target().toString()}},{key:"toLocaleString",value:function(){return this.target().toLocaleString()}},{key:"sideTarget",value:function(){if(yx===Ym.DoubleForward&&!Xx)return this.illuTarget}}]),yt})(),Ly="__proxy",Dp;(function(yt){yt[yt.FlatObject=0]="FlatObject",yt[yt.AkkoObject=1]="AkkoObject",yt[yt.Array=2]="Array",yt[yt.HangUpObject=3]="HangUpObject"})(Dp||(Dp={}));function kS(yt){if(yp.currentNode){if(Um(yt))return yt.identifier;{var ct=yt[Ly];if(!Um(ct))throw new Error("identifier not found");return ct.identifier}}else{if(by(yt))return yt.__proxy.identifier;throw tr(yt)!="object"?new Error("can not find identifier of ".concat(tr(yt))):yt===null?new Error("can not find identifier of null"):new Error("identifier not found")}}function bl(yt){return yt instanceof Z0}var Z0=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,ut,ot,gt),Mt.struct=xt,Mt}return Bt(at,[{key:"getDebugName",value:function(){return this.struct.classReflection.name}},{key:"createDisplayer",value:function(){var ot=this.struct.displayerNodeClass;return new ot(this)}},{key:"kind",get:function(){return Dp.AkkoObject}},{key:"clazz",get:function(){return this.struct.classReflection.clazz}},{key:"updateDisplayer",value:function(ot){}},{key:"reportChanged",value:function(ot){st(Ut(at.prototype),"reportChanged",this).call(this,ot);var gt=this.observer;if(gt)for(var xt in ot){var Mt=ot[xt],kt=Mt.kind,zt=Mt.value;gt.reportChanged(xt,zt,kt)}}},{key:"converge",value:function(){var ot=this.realTarget;if(ot){var gt={},xt=Jt(this.struct.serializableValueProperties),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;kt in ot&&(gt[kt]=ot[kt])}}catch(zt){xt.e(zt)}finally{xt.f()}Object.setPrototypeOf(gt,this.struct.classReflection.clazz.prototype),this.replaceIlluTarget(gt)}}},{key:"replaceIlluTarget",value:function(ot){var gt=this.illuTarget||this.realTarget,xt=$_(this,ot);this.illuTarget=xt;var Mt=Am(),kt=Jt(this.struct.serializableValueProperties),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht in gt,ur=Ht in xt;ur&&!rr?Mt.addProperty(this,Ht,xt[Ht]):!ur&&rr?Mt.removeProperty(this,Ht):ur&&rr&&xt[Ht]!==gt[Ht]&&Mt.setProperty(this,Ht,xt[Ht])}}catch(_r){kt.e(_r)}finally{kt.f()}}},{key:"getMethod",value:function(ot){return this.target()[ot]}},{key:"touchKey",value:function(ot){switch(this.struct.getPropertyReadableKind(ot)){case M0.ReadValue:case M0.CanNotReadPrivateValue:{st(Ut(at.prototype),"touchKey",this).call(this,ot);break}}}},{key:"callOutside",value:function(ot,gt){this.assertAccessible();var xt;switch(this.struct.getMethodCallableKind(ot)){case K0.NoEffects:{var Mt=this.proxyRuntime.cache;Mt?xt=Mt.valueWithArgs(this,this.identifier,ot,gt,this.callNoEffectsMethod):xt=this.callNoEffectsMethod(ot,gt);break}case K0.Modifiable:{if(this.struct.classReflection.isRootClass)xt=this.proxyRuntime.rootObject.onInvokedTriggerMethod(ot,gt);else throw new Error("can only call modifiable methods of trigger object");break}case K0.EventReceiver:throw new Error("can't invoke event receiver. you should call dispatch()");case K0.Private:throw new Error("can't invoke private method");default:{var kt;(kt=void 0)[ot].apply(kt,Ct(gt));break}}return this.proxyRuntime.pullValue(xt)}},{key:"callNoEffectsMethod",value:function(ot,gt){var xt=this,Mt=this.proxyRuntime.runtime,kt=Mt.observerId,zt=this.proxyRuntime.noEffectsIdGenerator,Ht={authorId:kt,mode:ry.Outside,timestamp:Date.now(),identifierGenerator:zt};return Mt.runWithMagix(Ht,function(){var rr=xt.target(),ur=rr[ot],_r=xt.proxyRuntime.pushValues(zt,gt,!1);return ur.apply(rr,_r)})}},{key:"setValue",value:function(ot,gt){var xt=this.target();if(this.struct.isValueProperty(ot)){var Mt=xt[ot],kt=ot in xt;xt[ot]=gt,kt?Mt!==gt&&Am().setProperty(this,ot,gt):Am().addProperty(this,ot,gt);var zt=this.sideTarget();return zt&&(zt[ot]=gt),gt}else return xt[ot]=gt}},{key:"postfix",value:function(ot,gt){var xt=this.target();if(this.struct.isValueProperty(ot)){var Mt=xt[ot],kt=ot in xt,zt=xt[ot]+=gt;kt?Mt!==zt&&Am().setProperty(this,ot,zt):Am().addProperty(this,ot,zt);var Ht=this.sideTarget();return Ht&&(Ht[ot]=zt),zt}else return xt[ot]+=gt}},{key:"prefix",value:function(ot,gt){var xt=this.target(),Mt=xt[ot];if(this.struct.isValueProperty(ot)){var kt=ot in xt,zt=xt[ot]+=gt;kt?Mt!==zt&&Am().setProperty(this,ot,zt):Am().addProperty(this,ot,zt);var Ht=this.sideTarget();Ht&&(Ht[ot]=zt)}else xt[ot]+=gt;return Mt}},{key:"removeKey",value:function(ot){if(this.struct.isValueProperty(ot)){var gt=this.target(),xt=ot in gt;if(xt){delete gt[ot],Am().removeProperty(this,ot);var Mt=this.sideTarget();Mt&&delete Mt[ot]}return xt}else return!1}},{key:"toJSON",value:function(){var ot={},gt=Jt(this.struct.copyableProperties),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot[Mt]=this[Mt]}}catch(kt){gt.e(kt)}finally{gt.f()}return ot}},{key:"releaseDisplayer",value:function(ot){}}]),at})(em),U_=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"getDebugName",value:function(){return"Object"}},{key:"createDisplayer",value:function(){var ot=new i0(this);for(var gt in this.displayerTarget())PS(ot,gt);return ot}},{key:"updateDisplayer",value:function(ot){var gt=this._displayer;if(gt)for(var xt in ot)switch(ot[xt].kind){case fl.Inserted:{PS(gt,xt);break}case fl.Removed:{cE(gt,xt);break}}}},{key:"reportChanged",value:function(ot){st(Ut(at.prototype),"reportChanged",this).call(this,ot);var gt=this.observer;if(gt)for(var xt in ot){var Mt=ot[xt],kt=Mt.kind,zt=Mt.value;gt.reportChanged(xt,zt,kt)}}},{key:"clazz",get:function(){return Object}},{key:"converge",value:function(){this.realTarget&&this.replaceIlluTarget(gy({},this.realTarget))}},{key:"replaceIlluTarget",value:function(ot){var gt=this.illuTarget||this.realTarget,xt=$_(this,ot);this.illuTarget=xt;var Mt=Am();for(var kt in xt){var zt=xt[kt];kt in gt?gt[kt]!==zt&&Mt.setProperty(this,kt,zt):Mt.addProperty(this,kt,zt)}for(var Ht in gt)Ht in xt||Mt.removeProperty(this,Ht)}},{key:"getMethod",value:function(ot){return this.target()[ot]}},{key:"setValue",value:function(ot,gt){var xt=this.target(),Mt=this.sideTarget(),kt=xt[ot],zt=ot in xt;return xt[ot]=gt,zt?kt!==gt&&Am().setProperty(this,ot,gt):Am().addProperty(this,ot,gt),Mt&&(Mt[ot]=gt),gt}},{key:"prefix",value:function(ot,gt){var xt=this.target(),Mt=this.sideTarget(),kt=xt[ot],zt=ot in xt,Ht=xt[ot]+=gt;return zt?kt!==Ht&&Am().setProperty(this,ot,Ht):Am().addProperty(this,ot,Ht),Mt&&(Mt[ot]=Ht),Ht}},{key:"postfix",value:function(ot,gt){var xt=this.target(),Mt=this.sideTarget(),kt=xt[ot],zt=ot in xt,Ht=xt[ot]+=gt;return zt?kt!==Ht&&Am().setProperty(this,ot,Ht):Am().addProperty(this,ot,Ht),Mt&&(Mt[ot]=Ht),kt}},{key:"removeKey",value:function(ot){var gt=this.target(),xt=ot in gt;if(xt){delete gt[ot];var Mt=this.sideTarget();Am().removeProperty(this,ot),Mt&&delete Mt[ot]}return xt}},{key:"toJSON",value:function(){var ot=this.displayerTarget(),gt={};for(var xt in ot)gt[xt]=ot[xt];return gt}},{key:"releaseDisplayer",value:function(ot){}}]),at})(em);function $p(yt){return yt instanceof Lv}var Lv=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"kind",get:function(){return Dp.FlatObject}},{key:"covertToAkkoObjectProxyNode",value:function(ot){var gt=this,xt=this.realTarget,Mt=this.illuTarget;return gt.struct=this.proxyRuntime.getAkkoObjectStruct(ot),gt._displayer=void 0,Object.setPrototypeOf(gt,Z0.prototype),Object.setPrototypeOf(xt,ot.clazz.prototype),Mt&&Object.setPrototypeOf(Mt,ot.clazz.prototype),gt}}]),at})(U_),OS=(function(){function yt(ct){Ot(this,yt),this.index=0,this.proxy=ct,this.length=ct.proxyRuntime.pullValue(ct.displayerTarget().length),ct.assertAccessible(),ct.touchKey("length")}return Bt(yt,[{key:Symbol.iterator,value:function(){return new yt(this.proxy)}},{key:"next",value:function(){if(this.index>=this.length)return{value:void 0,done:!0};{var at=this.proxy.displayerTarget()[this.index],ut=this.proxy.proxyRuntime.pullValue(at);return this.proxy.assertAccessible(),this.proxy.touchKey(this.index),this.index+=1,{value:ut,done:!1}}}}]),yt})(),bx=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut);for(var gt=ut.displayerTarget(),xt=0;xt<gt.length;++xt)PS(Kt(ot),xt);return ot}return Bt(at,[{key:"concat",value:function(){for(var ot=at.unwrapToPureArray(this),gt=arguments.length,xt=new Array(gt),Mt=0;Mt<gt;Mt++)xt[Mt]=arguments[Mt];for(var kt=0;kt<xt.length;++kt)xt[kt]=at.unwrapToPureArray(xt[kt]);return Array.prototype.concat(ot,xt)}},{key:"every",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){return ot.call(gt,Mt.pullValue(Ht),rr,xt)};return Array.prototype.every.call(this.__proxy.displayerTarget(),kt)}},{key:"filter",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){return ot.call(gt,Mt.pullValue(Ht),rr,xt)};return Array.prototype.filter.call(this.__proxy.displayerTarget(),kt)}},{key:"find",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(rr,ur){return ot.call(gt,Mt.pullValue(rr),ur,xt)},zt=Array.prototype.find.call(this.__proxy.displayerTarget(),kt);return Mt.pullValue(zt)}},{key:"findIndex",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){return ot.call(gt,Mt.pullValue(Ht),rr,xt)};return Array.prototype.findIndex.call(this.__proxy.displayerTarget(),kt)}},{key:"forEach",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){ot.call(gt,Mt.pullValue(Ht),rr,xt)};Array.prototype.forEach.call(this.__proxy.displayerTarget(),kt)}},{key:"indexOf",value:function(ot,gt){var xt=ot;return by(xt)&&(xt=xt.__proxy),Array.prototype.indexOf.call(this.__proxy.displayerTarget(),xt,gt)}},{key:"lastIndexOf",value:function(ot,gt){var xt=ot;return by(xt)&&(xt=xt.__proxy),Array.prototype.lastIndexOf.call(this.__proxy.displayerTarget(),xt,gt)}},{key:"join",value:function(ot){return Array.prototype.join.call(this.__proxy.displayerTarget(),ot)}},{key:"map",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){return ot.call(gt,Mt.pullValue(Ht),rr,xt)};return Array.prototype.map.call(this.__proxy.displayerTarget(),kt)}},{key:"reduce",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=gt,zt=function(rr,ur,_r){var Dr=rr;return kt!==Dr&&(Dr=Mt.pullValue(Dr)),kt=ot(Dr,Mt.pullValue(ur),_r,xt),kt};return Array.prototype.reduce.call(this.__proxy.displayerTarget(),zt,gt)}},{key:"reduceRight",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=gt,zt=function(rr,ur,_r){var Dr=rr;return kt!==Dr&&(Dr=Mt.pullValue(Dr)),kt=ot(Dr,Mt.pullValue(ur),_r,xt),kt};return Array.prototype.reduceRight.call(this.__proxy.displayerTarget(),zt,gt)}},{key:"slice",value:function(ot,gt){for(var xt=this.__proxy.proxyRuntime,Mt=Array.prototype.slice.call(this.__proxy.displayerTarget(),ot,gt),kt=0;kt<Mt.length;++kt)Mt[kt]=xt.pullValue(Mt[kt]);return Mt}},{key:"some",value:function(ot,gt){var xt=this,Mt=this.__proxy.proxyRuntime,kt=function(Ht,rr){return ot.call(gt,Mt.pullValue(Ht),rr,xt)};return Array.prototype.some.call(this.__proxy.displayerTarget(),kt)}},{key:"toString",value:function(){return Array.prototype.toString.apply(this.__proxy.displayerTarget())}},{key:"copyWithin",value:function(){at.throwImmutableError()}},{key:"fill",value:function(){at.throwImmutableError()}},{key:"pop",value:function(){at.throwImmutableError()}},{key:"push",value:function(){at.throwImmutableError()}},{key:"reverse",value:function(){at.throwImmutableError()}},{key:"shift",value:function(){at.throwImmutableError()}},{key:"splice",value:function(){at.throwImmutableError()}},{key:"unshift",value:function(){at.throwImmutableError()}},{key:"sort",value:function(){at.throwImmutableError()}},{key:"entries",value:function(){at.throwBanMethodError()}},{key:"keys",value:function(){at.throwBanMethodError()}},{key:"values",value:function(){at.throwBanMethodError()}}],[{key:"refreshLength",value:function(ot,gt){for(var xt=gt;xt in ot;)cE(ot,xt),xt+=1;if(xt===gt)for(xt=gt-1;xt>=0&&!(xt in ot);)PS(ot,xt),xt-=1}},{key:"unwrapToPureArray",value:function(ot){if(ot instanceof at){for(var gt=ot.__proxy.displayerTarget(),xt=gt.length,Mt=new Array(xt),kt=0;kt<xt;++kt)Mt[kt]=ot[kt];return Mt}else return ot}},{key:"throwImmutableError",value:function(){throw new Error("it is immutable")}},{key:"throwBanMethodError",value:function(){throw new Error("ban method")}}]),at})(i0);Object.defineProperty(bx.prototype,"length",{enumerable:!1,configurable:!0,get:function(){var ct=this.__proxy,at=ct.proxyRuntime.pullValue(ct.displayerTarget().length);return ct.touchKey("length"),at}}),typeof Symbol<"u"&&typeof Symbol.iterator<"u"&&Object.defineProperty(bx.prototype,Symbol.iterator,{enumerable:!1,configurable:!0,writable:!1,value:function(){return new OS(this.__proxy)}});function I0(yt){return yt instanceof Xy}var Nl=(function(yt){It(at,yt);var ct=qt(at);function at(){var ut;return Ot(this,at),ut=ct.apply(this,arguments),ut.equalsCount=0,ut}return Bt(at,[{key:"getDebugName",value:function(){return"Array"}},{key:"createDisplayer",value:function(){return new bx(this)}},{key:"kind",get:function(){return Dp.Array}},{key:"clazz",get:function(){return Array}},{key:"updateDisplayer",value:function(ot){var gt=this._displayer,xt=ot.length;gt&&xt&&bx.refreshLength(gt,xt.value)}},{key:"reportChanged",value:function(ot){st(Ut(at.prototype),"reportChanged",this).call(this,ot);var gt=this.observer;if(gt){var xt=ot.length;xt&&gt.reportChanged("length",xt.value,xt.kind);for(var Mt in ot){var kt=ot[Mt],zt=kt.kind,Ht=kt.value,rr=kt.isIndex;rr&&gt.reportChanged(parseInt(Mt,10),Ht,zt)}}}},{key:"converge",value:function(){this.realTarget&&(this.replaceIlluTarget(Ct(this.realTarget)),this.equalsCount=this.realTarget.length)}},{key:"replaceIlluTarget",value:function(ot){var gt=this.illuTarget||this.realTarget,xt=$_(this,ot);this.illuTarget=xt;for(var Mt=Math.min(gt.length,xt.length),kt=Am(),zt=0;zt<Mt;++zt)gt[zt]!==xt[zt]&&kt.setProperty(this,zt,xt[zt]);this.refreshLength(gt.length,xt),this.equalsCount=0}},{key:"getMethod",value:function(ot){return at.arrayValidMethods[ot]}},{key:"getValue",value:function(ot){return typeof ot=="number"?this.target()[ot]:ot==="length"?this.target().length:void 0}},{key:"setValue",value:function(ot,gt){var xt=this.target(),Mt=xt.length;if(typeof ot=="number")if(ot>=0){var kt=ot in xt&&xt[ot]!==gt,zt=xt[ot]=gt;kt&&Am().setProperty(this,ot,gt);var Ht=this.sideTarget();return this.refreshLength(Mt,xt),Ht&&(Ht[ot]=gt),ot<this.equalsCount&&(this.equalsCount=ot),zt}else return gt;else return xt[ot]}},{key:"removeKey",value:function(ot){return!1}},{key:"prefix",value:function(ot,gt){if(typeof ot=="number"){var xt=this.target(),Mt=this.sideTarget(),kt=ot in xt,zt=xt.length,Ht=xt[ot],rr=xt[ot]+=gt;return kt&&rr!==Ht&&Am().setProperty(this,ot,rr),this.refreshLength(zt,xt),Mt&&(Mt[ot]=rr),ot<this.equalsCount&&(this.equalsCount=ot),rr}else return}},{key:"postfix",value:function(ot,gt){if(typeof ot=="number"){var xt=this.target(),Mt=this.sideTarget(),kt=ot in xt,zt=xt.length,Ht=xt[ot],rr=xt[ot]+=gt;return kt&&rr!==Ht&&Am().setProperty(this,ot,rr),this.refreshLength(zt,xt),Mt&&(Mt[ot]=rr),ot<this.equalsCount&&(this.equalsCount=ot),Ht}else return}},{key:"toJSON",value:function(){for(var ot=this.displayerTarget(),gt=[],xt=0;xt<ot.length;++xt)gt[xt]=ot[xt];return gt}},{key:"releaseDisplayer",value:function(ot){}},{key:"refreshLength",value:function(ot,gt){if(ot!==gt.length){var xt=this.sideTarget(),Mt=Am();if(ot>gt.length){xt&&xt.splice(gt.length);for(var kt=gt.length;kt<ot;++kt)Mt.removeProperty(this,kt)}else for(var zt=ot;zt<gt.length;++zt)xt&&(xt[zt]=gt[zt]),Mt.addProperty(this,zt,gt[zt]);Mt.setProperty(this,"length",gt.length)}}}],[{key:"createArrayValidMethods",value:function(){var ot,gt,xt;yp.addListener(function(ur,_r){_r&&ur.tools?(ot=ur.tools.idGenerator,gt=ur.coreFunctions.updater,xt=ur.coreFunctions.creator):(ot=void 0,gt=void 0,xt=void 0)});var Mt=function(_r,Dr){return _r===Dr?_r[Ly]:xt(Dr,ot.generate())},kt={},zt=Jt(F1),Ht;try{var rr=function(){var _r=Ht.value,Dr=_r.methodName,Br=_r.returnArray,Ur=_r.lengthChanged,Zr=_r.elementChanged,Tn=_r.touchLength,jn=_r.cleanEqualsCount,ts=_r.pickTouchedSegment,us=Array.prototype[Dr],Os=Ur||Zr;kt[Dr]=function(){for(var Hs=arguments.length,Ks=new Array(Hs),so=0;so<Hs;so++)Ks[so]=arguments[so];var To=this,Oo=To.length,Au=To[Ly],Tu=us.apply(To,Ks);if(Os&&!y_(Au))throw new Error("Magix is frozen, you can't call Array.".concat(Dr,"()"));var xu=ts&&ts(To,Ks);if(Ur&&Au.refreshLength(Oo,To),xu)for(var yu=Math.min(To.length,xu.beginIndex+xu.length),sp=Au.sideTarget(),Jl=Am(),Ml=xu.beginIndex;Ml<yu;++Ml){if(Zr){var Qp=To[Ml];sp&&(sp[Ml]=Qp),Jl.setProperty(Au,Ml,Qp)}Au.touchKey(Ml)}return Tn&&Au.touchKey(),jn&&(Au.equalsCount=0),Os&&gt(Au),Br?Mt(To,Tu):Tu}};for(zt.s();!(Ht=zt.n()).done;)rr()}catch(ur){zt.e(ur)}finally{zt.f()}return Object.freeze(kt)}}]),at})(em),Xy=Nl;Xy.arrayValidMethods=Nl.createArrayValidMethods();function pl(yt){return yt instanceof Sy}var Sy=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"version",get:function(){return this._version}},{key:"objectFormatId",get:function(){return this._objectFormatId}},{key:"setHangMetadata",value:function(ot){if(this._version||this._objectFormatId)throw new Error("did set version");this._version=ot.version,this._objectFormatId=ot.objectFormatId}},{key:"kind",get:function(){return Dp.HangUpObject}}]),at})(U_),Dv;(function(yt){yt[yt.ExportsPropertyMode=0]="ExportsPropertyMode",yt[yt.SerializablePropertyMode=1]="SerializablePropertyMode"})(Dv||(Dv={}));function _x(yt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,at=arguments.length>2?arguments[2]:void 0;return new J0(ct,at).copyValue(yt)}var J0=(function(){function yt(ct,at){Ot(this,yt),this.mode=ct,this.creator=at,this.copedObjectMap={}}return Bt(yt,[{key:"copyValue",value:function(at){return by(at)?this.copyProxyNode(at.__proxy):Um(at)?this.copyProxyNode(at):at}},{key:"copyProxyNode",value:function(at){var ut=at.identifier,ot=this.copedObjectMap[ut];if(!ot){var gt=at.displayerTarget();if($p(at)){var xt={};this.copedObjectMap[ut]=ot=xt;for(var Mt in gt)xt[Mt]=this.copyInsideValue(at.proxyRuntime,gt[Mt])}else if(bl(at)){var kt=at.struct,zt=this.createAkkoObject(kt.classReflection.clazz);this.copedObjectMap[ut]=ot=zt;var Ht=Jt(this.getPropertiesToCopy(at)),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;zt[ur]=this.copyInsideValue(at.proxyRuntime,kt.getValueFromProxyNode(at,ur))}}catch(Ur){Ht.e(Ur)}finally{Ht.f()}}else if(I0(at)){var _r=gt.length,Dr=[];this.copedObjectMap[ut]=ot=Dr;for(var Br=0;Br<_r;++Br)Dr[Br]=this.copyInsideValue(at.proxyRuntime,gt[Br])}}return ot}},{key:"getPropertiesToCopy",value:function(at){switch(this.mode){case 0:return at.struct.copyableProperties;case 1:return at.struct.serializableValueProperties;default:throw new Error("invalid mode ".concat(this.mode))}}},{key:"createAkkoObject",value:function(at){return this.creator?this.creator(at):{}}},{key:"copyInsideValue",value:function(at,ut){return tr(ut)!="object"||ut===null?ut:Um(ut)?this.copyProxyNode(ut):Sl(ut)?ut.readonly?ut:ut.slice():at.escapeObjectFilter(ut)?ut:void 0}}]),yt})(),uv;yp.addListener(function(yt,ct){ct&&yt.tools?uv=yt.coreFunctions:uv=null});function al(yt){return new z1().copyValue(yt)}var z1=(function(){function yt(){Ot(this,yt),this.copedObjectMap={}}return Bt(yt,[{key:"copyValue",value:function(at){return Um(at)?this.copyProxyNode(at):at}},{key:"copyProxyNode",value:function(at){var ut=at.identifier,ot=this.copedObjectMap[ut];if(!ot)if($p(at)||pl(at)){var gt=uv.creator({});this.copedObjectMap[ut]=ot=gt;for(var xt in uv.unwrapper(at)){var Mt=this.copyValue(uv.getter(at,xt));uv.setter(ot,xt,Mt)}}else if(bl(at)){var kt=at.struct,zt={};Object.setPrototypeOf(zt,kt.classReflection.clazz.prototype);var Ht=uv.creator(zt);this.copedObjectMap[ut]=ot=Ht;var rr=Jt(kt.serializableValueProperties),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value,Dr=this.copyValue(uv.getter(at,_r));uv.setter(Ht,_r,Dr)}}catch(jn){rr.e(jn)}finally{rr.f()}}else if(I0(at)){var Br=uv.getter(at,"length"),Ur=uv.creator([]);this.copedObjectMap[ut]=ot=Ur;for(var Zr=0;Zr<Br;++Zr){var Tn=this.copyValue(uv.getter(at,Zr));uv.setter(Ur,Zr,Tn)}}else throw new Error("invalid proxy node");return ot}}]),yt})(),Qx=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.listeners=new m1,this.didDispose=!1,this.getProperty=function(ot){var gt,xt=ut._akkoProxyNode.proxyRuntime;switch(ut.struct.getPropertyReadableKind(ot)){case M0.ReadValue:{gt=xt.pullValue(ut._akkoProxyNode.displayerTarget()[ot]),ut.touchKey(ot);break}case M0.ReadByGetter:{var Mt=xt.cache;Mt?gt=Mt.valueWithKey(ut,ut._akkoProxyNode.identifier,ot,ut.readByGetter):gt=ut.readByGetter(ot),ut.touchKey(Ly);break}case M0.CanNotReadGetter:throw new Error("can't read property ".concat(JSON.stringify(ot)," unless it has @noEffects"));case M0.CanNotReadPrivateValue:case M0.CanNotReadPrivateGetter:throw new Error("can't read private property ".concat(JSON.stringify(ot)))}return gt},this.readByGetter=function(ot){var gt=ut._akkoProxyNode.proxyRuntime,xt=gt.runtime,Mt=xt.observerId,kt=gt.noEffectsIdGenerator,zt={authorId:Mt,mode:ry.Outside,timestamp:Date.now(),identifierGenerator:kt},Ht=xt.runWithMagix(zt,function(){return ut._akkoProxyNode.target()[ot]});return gt.pullValue(Ht)},this.invokeMethod=function(ot,gt){var xt=ut._akkoProxyNode.callOutside(ot,gt);return ut.touchKey(Ly),xt},this.onAkkoProxyNodeUpdated=function(ot){if(ut.observer){for(var gt in ot){var xt=ot[gt],Mt=xt.kind,kt=xt.value;ut.observer.reportChanged(gt,kt,Mt)}ut.listeners.dispatchUpdated(ot)}},this.struct=ct.struct,this.observerAdapter=at,this._akkoProxyNode=ct,this.displayer=this.createDisplayer(ct),this.valueProperties=Object.freeze([].concat(Ct(this.struct.transientValueProperties),Ct(this.struct.serializableValueProperties))),this.listenUpdated(ct)}return Bt(yt,[{key:"dispose",value:function(){this.didDispose||(this.unlistenUpdate(this._akkoProxyNode),this.listeners.dispatchDisposed(),this.didDispose=!0)}},{key:"getListeners",value:function(){return this.listeners}},{key:"akkoProxyNode",get:function(){return this._akkoProxyNode},set:function(at){var ut=this;this._akkoProxyNode!==at&&(this.unlistenUpdate(this._akkoProxyNode),this.observerAdapter?this.observerAdapter.observeUpdate(function(){ut.compareAndReportUpdated(ut._akkoProxyNode,at),ut._akkoProxyNode=at,Ep.updateProxy(ut.displayer,at)}):(this.compareAndReportUpdated(this._akkoProxyNode,at),this._akkoProxyNode=at,Ep.updateProxy(this.displayer,at)),this.listenUpdated(this.akkoProxyNode))}},{key:"compareAndReportUpdated",value:function(at,ut){var ot=this.compareAndGetUpdatedObject(at,ut);if(this.observer){for(var gt in ot){var xt=ot[gt],Mt=xt.value,kt=xt.kind;this.observer.reportChanged(gt,Mt,kt)}this.observer.reportChanged(Ly,ut,fl.Updated)}this.listeners.dispatchUpdated(ot)}},{key:"compareAndGetUpdatedObject",value:function(at,ut){var ot=at.displayerTarget(),gt=ut.displayerTarget(),xt={},Mt=Jt(this.valueProperties),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt in ot,rr=zt in gt,ur=typeof zt=="number",_r=null;Ht&&!rr?_r={isIndex:ur,kind:fl.Removed,value:void 0}:!Ht&&rr?_r={isIndex:ur,kind:fl.Inserted,value:gt[zt]}:ot[zt]!==gt[zt]&&(_r={isIndex:ur,kind:fl.Updated,value:gt[zt]}),_r&&(xt[zt]=_r)}}catch(Dr){Mt.e(Dr)}finally{Mt.f()}return xt}},{key:"createDisplayer",value:function(at){var ut=Ep.createClass({classReflection:at.struct.classReflection,getter:this.getProperty,invoker:this.invokeMethod});return new ut(this,at)}},{key:"listenUpdated",value:function(at){var ut;(ut=at.getListeners())==null||ut.listenUpdated({id:this.onAkkoProxyNodeUpdated,listener:this.onAkkoProxyNodeUpdated})}},{key:"unlistenUpdate",value:function(at){var ut;(ut=at.getListeners())==null||ut.unlistenUpdated(this.onAkkoProxyNodeUpdated)}},{key:"touchKey",value:function(at){var ut=this.observerAdapter;if(ut){if(!this.observer){var ot=this._akkoProxyNode.identifier;this.observer=ut.create(ot,"AkkoDisplayerHolder")}this.observer.reportObservedKey(at)}}}]),yt})(),m1=(function(){function yt(){Ot(this,yt),this.updatedListeners=[],this.disposedListeners=[]}return Bt(yt,[{key:"listenUpdated",value:function(at){this.updatedListeners.some(function(ut){return ut.id===at.id})||this.updatedListeners.push(Object.freeze(gy({},at)))}},{key:"unlistenUpdated",value:function(at){var ut=this.updatedListeners.findIndex(function(ot){return ot.id===at});ut!==-1&&this.updatedListeners.splice(ut,1)}},{key:"listenDisposed",value:function(at){this.disposedListeners.indexOf(at)===-1&&this.disposedListeners.push(at)}},{key:"unlistenDisposed",value:function(at){var ut=this.disposedListeners.indexOf(at);ut!==-1&&this.disposedListeners.splice(ut,1)}},{key:"dispatchUpdated",value:function(at){var ut=Jt(this.updatedListeners),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.listener;try{gt(at)}catch(xt){console.error(xt)}}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"dispatchDisposed",value:function(){var at=Jt(this.disposedListeners),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;try{ot()}catch(gt){console.error(gt)}}}catch(gt){at.e(gt)}finally{at.f()}}}]),yt})(),ub=null;yp.addListener(function(yt,ct){ct?ub=yt.coreFunctions:ub=null});var Yu=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"isValidObject",value:function(at){return bl(at)}},{key:"isDisplayerObject",value:function(at){return by(at)}},{key:"identifier",value:function(at){return at.identifier}},{key:"kind",value:function(at){if(bl(at))return pp.AkkoObject;if($p(at))return pp.FlatObject;if(I0(at))return pp.Array;if(by(at))return pp.Displayer;throw new Error("unrecognized proxy node")}},{key:"forEach",value:function(at,ut){if($p(at)){var ot=at.target();for(var gt in ot)ut(ot[gt],gt)}else if(I0(at))for(var xt=at.target(),Mt=0;Mt<xt.length;++Mt)ut(xt[Mt],Mt);else if(bl(at)){var kt=at.target(),zt=at.struct,Ht=Jt(zt.serializableValueProperties),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;ut(kt[ur],ur)}}catch(_r){Ht.e(_r)}finally{Ht.f()}}}},{key:"createObject",value:function(at,ut){return ub.creator(ut,at)}},{key:"wrapDisplayer",value:function(at,ut){return ut.displayer}},{key:"unwrapDisplayer",value:function(at,ut){return ut.__proxy}},{key:"getClassReflection",value:function(at){var ut=at;if(by(ut)&&(ut=ut.__proxy),!!bl(ut))return ut.struct.classReflection}},{key:"override",value:function(at,ut,ot){if($p(at)){for(var gt in ub.unwrapper(at))gt in ut||ub.remover(at,gt);for(var xt in ut)ub.setter(at,xt,ut[xt])}else if(I0(at)){var Mt=ut,kt=ub.getter(at,"length");Mt.length>kt&&ub.caller(at,"splice",[kt]);for(var zt=0;zt<Mt.length;++zt)ub.setter(at,zt,Mt[zt])}else if(bl(at)){var Ht=at.proxyRuntime.getAkkoObjectStruct(ot),rr=Jt(Ht.transientValueProperties),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value;ub.remover(at,_r)}}catch(Zr){rr.e(Zr)}finally{rr.f()}var Dr=Jt(Ht.serializableValueProperties),Br;try{for(Dr.s();!(Br=Dr.n()).done;){var Ur=Br.value;ub.setter(at,Ur,ut[Ur])}}catch(Zr){Dr.e(Zr)}finally{Dr.f()}}}},{key:"displayerPhase",value:function(at){if(by(at))return _y(at);throw new Error("it isn't akko wrapped object")}},{key:"copyDisplayer",value:function(at){return _x(at)}}]),yt})();function z_(yt,ct,at){return new Lv(yt,ct,at)}function lv(yt,ct,at,ut){return new Z0(yt,ct,at,ut)}function R0(yt,ct,at){return new Xy(yt,ct,at)}function vw(yt,ct,at){return new Sy(yt,ct,at)}var g1;yp.addListener(function(yt,ct){ct?g1=yt.coreFunctions.creator:g1=void 0});var qS=(function(){function yt(ct,at){Ot(this,yt),this.decorateObjectEnums=Object.freeze([un.Object]),this.proxyRuntime=ct,this.covertIdToClass=at}return Bt(yt,[{key:"createObject",value:function(at,ut){if(ut===un.HangUpObject)return vw(this.proxyRuntime,at,{});{var ot=ut===un.Array?[]:{};return g1?g1(ot,at):s1(this.proxyRuntime,ot,at)}}},{key:"findIdentifier",value:function(at){var ut=at.identifier;if(ut===void 0)throw Um(at)?new Error("can't find identifier of proxy node"):new Error("object should be proxy node");return ut}},{key:"findHangUpMetadata",value:function(at){if(!pl(at))throw new Error("it's not hang up object");return at}},{key:"checkObjectEnum",value:function(at){switch(at.kind){case Dp.Array:return un.Array;case Dp.AkkoObject:case Dp.FlatObject:return un.Object;case Dp.HangUpObject:return un.HangUpObject;default:throw new Error("unrecognized object")}}},{key:"keys",value:function(at){return Object.keys(at.target())}},{key:"length",value:function(at){if(I0(at))return at.target().length}},{key:"hasKey",value:function(at,ut){return ut in at.target()}},{key:"getValue",value:function(at,ut){return at.target()[ut]}},{key:"setValue",value:function(at,ut,ot){at.setValue(ut,ot)}},{key:"completeHangUpObject",value:function(at,ut){pl(at)&&at.setHangMetadata(ut)}},{key:"decorateObject",value:function(at,ut,ot,gt,xt){if(gt&&ut===jr.AssertedObject){var Mt=this.covertIdToClass(gt.id);if(!Mt)throw new el("can't find class by object format id ".concat(gt.id));var kt=Mt[Nm];$p(at)&&at.covertToAkkoObjectProxyNode(kt)}}}]),yt})();function G1(yt,ct){return new qS(ct,yt.covertObjectFormatIdToClass)}function LS(yt,ct){var at=am(yt.rootClass),ut=new Rv({format:yt.format,objectAdapter:ct,assertObjectFormat:function(gt){if(bl(gt))return gt.struct.classReflection.objectFormat}});return $0(ut,at)}var dT=(function(){function yt(ct,at){Ot(this,yt),this.assertObjectFormat=function(ut){if(bl(ut))return ut.struct.classReflection.objectFormat},this.proxyRuntime=ct,this.objectAdapter=G1(at,ct),this.frameSerialization=LS(at,this.objectAdapter)}return Bt(yt,[{key:"serializeSnapshotFrame",value:function(at){return this.frameSerialization.serializeSnapshotFrame(at)}},{key:"serializeActionFrame",value:function(at,ut){return this.frameSerialization.serializeActionFrame(at,ut)}},{key:"deserializeSnapshotFrame",value:function(at,ut,ot){return this.frameSerialization.deserializeSnapshotFrame(at,ut,ot)}},{key:"deserializeActionFrame",value:function(at,ut,ot,gt){var xt=this;return gt?this.proxyRuntime.runtime.runWithSerialization(gt,function(){return xt.frameSerialization.deserializeActionFrame(at,ut,ot)}):this.frameSerialization.deserializeActionFrame(at,ut,ot)}},{key:"createSerialization",value:function(at){return new Rv({format:at,objectAdapter:this.objectAdapter,assertObjectFormat:this.assertObjectFormat})}}]),yt})(),FS=(function(){function yt(ct,at,ut){Ot(this,yt),this.runtime=ct,this.rootObject=at,this.observerAdapter=ut,this._pendingUpdatedRootObject=!1,this.didPenddingRootObject=!1}return Bt(yt,[{key:"initialize",value:function(){this.holder=new Qx(this.rootObject,this.observerAdapter)}},{key:"initializeWithOriginRootObject",value:function(at){this.holder=at.holder,this._pendingUpdatedRootObject?this.didPenddingRootObject=!0:this.holder.akkoProxyNode=this.rootObject}},{key:"pendingUpdatedRootObject",get:function(){return this._pendingUpdatedRootObject},set:function(at){this._pendingUpdatedRootObject!==at&&(this._pendingUpdatedRootObject=at,!at&&this.didPenddingRootObject&&(this.didPenddingRootObject=!1,this.holder.akkoProxyNode=this.rootObject))}},{key:"observerId",get:function(){return this.runtime.observerId}},{key:"displayer",get:function(){return this.holder.displayer}},{key:"target",get:function(){return this.rootObject.target()}},{key:"getRootMethod",value:function(at){return this.rootObject.getMethod(at)}},{key:"snapshotRootObject",value:function(){return this.rootObject}}]),yt})(),ny=(function(){function yt(ct){Ot(this,yt),this.params=Object.freeze(gy({},ct)),this.objectOperator=new Yu}return Bt(yt,[{key:"createProxyRuntime",value:function(at,ut){return new c1(this.objectOperator,at,ut,{escapeObjectFilter:this.params.escapeObjectFilter,jsxFactory:this.params.jsxFactory,observerAdapter:this.params.observerAdapter})}}]),yt})();function ym(yt){if(!by(yt))throw new Error("it isn't akko wrapped object");return xv.Rejected!==_y(yt)}function hm(yt,ct){return by(yt)?yt.__proxy.displayerTarget()instanceof ct:Um(yt)?yt.displayerTarget()instanceof ct:yt instanceof ct}var yw=-1,Kx=-2,a0=-3;function fE(yt){var ct=V1(yt);if(ct===Object)return yw;if(ct===Array)return Kx;if(ct===void 0)return a0;{var at=ct[Nm];return at?at.id:a0}}function V1(yt){switch(tr(yt)){case"function":return yt;case"object":{if(yt!==null)return pE(yt);break}}}function pE(yt){var ct=yt.__proxy;switch(hT(ct)){case pp.FlatObject:return Object;case pp.Array:return Array;case pp.AkkoObject:return mE(ct).clazz}return yt.constructor}function hT(yt){if(bl(yt))return pp.AkkoObject;if($p(yt))return pp.FlatObject;if(I0(yt))return pp.AkkoObject;if(by(yt))return pp.Displayer;throw new Error("unrecognized proxy node")}function mE(yt){var ct=yt;if(by(ct)&&(ct=ct.__proxy),!!bl(ct))return ct.struct.classReflection}function xx(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new ny(yt)}function y1(yt){return yp.currentNode?al(yt):_x(yt)}var gE=ln(requireQueryString()),fT=ln(requireQueryString()),BS=ln(requireQueryString()),vE=ln(requireQueryString()),pT=ln(requireQueryString()),mT=Object.defineProperty,Zx=Object.defineProperties,jS=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,bw=Object.prototype.propertyIsEnumerable,H1=function(ct,at,ut){return at in ct?mT(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},cv=function(ct,at){for(var ut in at||(at={}))yE.call(at,ut)&&H1(ct,ut,at[ut]);if(b1){var ot=Jt(b1(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;bw.call(at,ut)&&H1(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},vb=function(ct,at){return Zx(ct,jS(at))},_1=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"create",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new _E(at)}}]),yt})(),bE=(function(){function yt(ct){Ot(this,yt),this.callbacks=Object.freeze(this.wrapCallbacks(ct))}return Bt(yt,[{key:"wrapCallbacks",value:function(at){var ut={},ot=Jt(yt.callbackKeys),gt;try{var xt=function(){var kt=gt.value,zt=at[kt];zt?ut[kt]=zt:ut[kt]=function(){throw new Error("can't call. ".concat(kt," not register"))}};for(ot.s();!(gt=ot.n()).done;)xt()}catch(Mt){ot.e(Mt)}finally{ot.f()}return Object.freeze(ut)}},{key:"convertIdToUrl",value:function(at){return this.callbacks.convertIdToUrl(at)}}]),yt})(),_E=bE;_E.callbackKeys=Object.freeze(["convertIdToUrl"]);var G_=(function(){function yt(){Ot(this,yt),this.paddingResolves=[]}return Bt(yt,[{key:"hasValue",get:function(){return!this.paddingResolves}},{key:"getValueRightNow",value:function(){return this.value}},{key:"getValue",value:function(){var at=this;return this.hasValue?this.error?Promise.reject(this.error):Promise.resolve(this.value):new Promise(function(ut,ot){return at.paddingResolves.push({resolve:ut,reject:ot})})}},{key:"catchError",value:function(at){if(!this.hasValue){var ut=Jt(this.paddingResolves),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.reject;gt(at)}}catch(xt){ut.e(xt)}finally{ut.f()}this.value=void 0,this.error=at,this.paddingResolves=null}return this}},{key:"setValue",value:function(at){if(this.hasValue)throw new Error("did set value");this.value=at,this.error=void 0;var ut=Jt(this.paddingResolves),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.resolve;gt(at)}}catch(xt){ut.e(xt)}finally{ut.f()}return this.paddingResolves=null,this}}]),yt})(),gT=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,at.createMessage(ut)),ot.name=ut.title,ot.title=ut.title,ot.messages=ut.messages?Object.freeze(Ct(ut.messages)):at.emptyArray,ot.statusCode=ut.statusCode,ot.errorCode=ut.errorCode,ot}return Bt(at,null,[{key:"createMessage",value:function(ot){var gt=ot.title;return ot.messages&&ot.messages.length>0&&(gt+=": "+ot.messages.join("; ")),gt}}]),at})(At(Error)),_w=gT;_w.emptyArray=Object.freeze([]);var xE=(function(){function yt(ct,at,ut,ot){var gt=this;Ot(this,yt),this.keyFetcherValue=new G_,this._response=null,this.akkoVersionValue=at,ct.getValue().then(function(xt){return gt.keyFetcherValue.setValue(xt.getFetcher(ut).fetch(ot))}).catch(function(xt){return gt.keyFetcherValue.catchError(xt)})}return Bt(yt,[{key:"akkoVersion",get:function(){return this.akkoVersionValue.getValue()}},{key:"withResponse",value:function(at){return this._response=at,this}},{key:"fetchJSON",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,this.keyFetcherValue.getValue();case 2:if(xt=Ht.sent,Ht.t0=this._response,Ht.t0){Ht.next=8;break}return Ht.next=7,xt(ot,gt);case 7:Ht.t0=Ht.sent;case 8:if(Mt=Ht.t0,this._response=null,!this.isSuccessStatus(Mt,gt)){Ht.next=16;break}return Ht.next=12,Mt.text();case 12:return kt=Ht.sent,Ht.abrupt("return",kt===""?void 0:JSON.parse(kt));case 16:return Ht.next=18,this.createError(Mt);case 18:throw Ht.sent;case 19:case"end":return Ht.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchBuffer",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,this.keyFetcherValue.getValue();case 2:if(xt=zt.sent,zt.t0=this._response,zt.t0){zt.next=8;break}return zt.next=7,xt(ot,gt);case 7:zt.t0=zt.sent;case 8:if(Mt=zt.t0,this._response=null,Mt.status!==404){zt.next=11;break}return zt.abrupt("return",null);case 11:if(!this.isSuccessStatus(Mt,gt)){zt.next=26;break}if(!Mt.arrayBuffer){zt.next=20;break}return zt.t2=Iu,zt.next=16,Mt.arrayBuffer();case 16:zt.t3=zt.sent,zt.t1=(0,zt.t2)(zt.t3),zt.next=25;break;case 20:return zt.t4=Iu,zt.next=23,Mt.buffer();case 23:zt.t5=zt.sent,zt.t1=(0,zt.t4)(zt.t5);case 25:return zt.abrupt("return",zt.t1);case 26:return zt.next=28,this.createError(Mt);case 28:throw zt.sent;case 29:case"end":return zt.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"createError",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(gt=ot.headers.get("content-type"),!(!gt||/application\/json/i.test(gt))){ur.next=17;break}return ur.prev=2,ur.next=5,ot.json();case 5:xt=ur.sent,ur.next=11;break;case 8:return ur.prev=8,ur.t0=ur.catch(2),ur.abrupt("return",new Error("response with status "+ot.status+" and parse error JSON failed: "+ur.t0.message));case 11:if(!(tr(xt.error)!="object"||xt.error===null)){ur.next=13;break}return ur.abrupt("return",new Error("response with status "+ot.status+" without error object"));case 13:return Mt=xt.error,kt=Mt.code,zt=Mt.title,Ht=Mt.messages,ur.abrupt("return",new _w({statusCode:ot.status,errorCode:kt,title:zt,messages:Ht}));case 17:return ur.t1=Error,ur.t2="response with status "+ot.status+" with text ",ur.next=21,ot.text();case 21:return ur.t3=ur.sent,ur.t4=ur.t2+ur.t3,ur.abrupt("return",new ur.t1(ur.t4));case 24:case"end":return ur.stop()}},ut,null,[[2,8]])}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"isSuccessStatus",value:function(at,ut){var ot=at.status;switch(ut&&ut.method||"get"){case"get":return ot===200||ot===206;case"delete":return ot===204;default:return ot===201}}}]),yt})(),SE=(function(){function yt(ct,at){Ot(this,yt),this.configmap=ct,this.onIngoreFetchError=at,this.fetchers={},this.supportRegions=this.collectRegions(ct)}return Bt(yt,[{key:"collectRegions",value:function(at){var ut={};for(var ot in at)for(var gt in at[ot].hosts)ut[gt]=!0;return ut}},{key:"getFetcher",value:function(at){var ut=this.fetchers[at];if(!ut){if(!this.supportRegions[at])throw new Error("invalid region ".concat(JSON.stringify(at)));ut=this.fetchers[at]=new Zo({fetcher:fetch.bind(window),region:at,configmap:this.configmap,onIngoreFetchError:this.onIngoreFetchError,retryCount:2,retryLoopsCount:0})}return ut}}]),yt})();function b_(yt){if(tr(yt)=="object"&&yt!==null){for(var ct in yt)b_(yt[ct]);Object.freeze(yt)}return yt}function $S(yt){if(tr(yt)!="object"||yt===null)return yt;if(yt instanceof Array){for(var ct=[],at=0;at<yt.length;++at)ct[at]=$S(yt[at]);return ct}else{var ut={};for(var ot in yt)ut[ot]=$S(yt[ot]);return ut}}var OA=(function(){function yt(){Ot(this,yt),this.node=null}return Bt(yt,[{key:"getAkkoAppConfigs",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt=this,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return(!this.node||this.node.appIdentifier!==ot)&&(kt=new G_,this.node=Object.freeze({appIdentifier:ot,configsValue:kt}),this.fetchAkkoAppConfigs(ot,gt,xt).then(function(rr){return kt.setValue(b_(rr))}).catch(function(rr){kt.catchError(rr),setTimeout(function(){return Mt.node=null},0)})),Ht.t0=$S,Ht.next=4,this.node.configsValue.getValue();case 4:return Ht.t1=Ht.sent,Ht.abrupt("return",(0,Ht.t0)(Ht.t1));case 6:case"end":return Ht.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"fetchAkkoAppConfigs",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr,Tn;return regeneratorRuntime.wrap(function(ts){for(;;)switch(ts.prev=ts.next){case 0:return Mt=(0,gE.stringify)({app:ot}),ts.next=3,this.sortApiHostsBySpeed(gt,Mt);case 3:return kt=ts.sent,zt=kt.hosts,Ht=kt.response,rr={api:{hosts:{"*":zt}}},ur=new SE(rr,xt),_r=new G_().setValue(ur),Dr=new G_,ts.next=12,new xE(_r,Dr,"*","api").withResponse(Ht).fetchJSON("https://shunt-api/v5/configs/regions?".concat(Mt));case 12:Br=ts.sent;try{Ur=window.localStorage&&window.localStorage.getItem("white-prefer-gateway"),Ur&&(Zr=JSON.parse(Ur),Tn=Br.configmap.realtime.hosts[Zr.region],Date.now()<Zr.expire&&Tn&&Br.configmap.realtime.hosts[Zr.region].unshift(Zr.host))}catch{}return ts.abrupt("return",Br);case 15:case"end":return ts.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"sortApiHostsBySpeed",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return xt=setTimeout(function(){return console.warn("[White] connect to api hosts timeout in 5 seconds")},5e3),Dr.next=3,new Promise(function(Br,Ur){var Zr=1,Tn=Jt(ot),jn;try{for(Tn.s();!(jn=Tn.n()).done;){var ts=jn.value;Zr+=1,fetch("https://".concat(ts,"/v5/configs/regions?").concat(gt)).then(function(us){us.ok?Br(us):(Zr-=1,Zr===0&&(clearTimeout(xt),Ur(new Error("[White] failed to connect to api hosts: "+us.status+" "+us.statusText))))},function(us){Zr-=1,Zr===0&&(clearTimeout(xt),Ur(new Error("[White] failed to connect to api hosts: "+us)))})}}catch(us){Tn.e(us)}finally{Tn.f()}Zr-=1,Zr===0&&(clearTimeout(xt),Ur(new Error("[White] failed to connect to api hosts")))});case 3:if(Mt=Dr.sent,clearTimeout(xt),kt=new URL(Mt.url),zt=kt.host,Ht=ot.indexOf(zt),!(Ht>=0)){Dr.next=13;break}for(console.log("[White] choose api host:",zt),rr=[zt],ur=0;ur<ot.length;ur+=1)ur!==Ht&&rr.push(ot[ur]);return Dr.abrupt("return",{hosts:rr,response:Mt});case 13:return Dr.abrupt("return",(console.log("[White] not found api host:",zt),{hosts:ot,response:Mt}));case 14:case"end":return Dr.stop()}},ut)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()}]),yt})(),Sx=new OA;function xw(yt,ct,at){return Sx.getAkkoAppConfigs(yt,ct,at)}var V_;(function(yt){yt[yt.Ready=0]="Ready",yt[yt.Setuping=1]="Setuping",yt[yt.Fail=2]="Fail"})(V_||(V_={}));var Sw=(function(){function yt(ct){var at=this;Ot(this,yt),this.fetcherPhase=1,this.getAkkoFetcher=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return at.fetcherPhase===2&&at.setupFetcher(),Mt.next=3,at.fetchersHubValue.getValue();case 3:return Mt.abrupt("return",Mt.sent.getFetcher(gt));case 4:case"end":return Mt.stop()}},ot)}));return function(ot){return ut.apply(this,arguments)}})(),this.onIngoreFetchError=function(ut){console.warn("fetch failed but ignore: ".concat(ut.message))},this.params=Object.freeze(vb(cv({},ct),{shuntApiHosts:Object.freeze(Ct(ct.shuntApiHosts))})),this.akkoVersionValue=new G_,this.sdkHostsValue=new G_,this.setupFetcher()}return Bt(yt,[{key:"create",value:function(at){return new ww(this.fetchersHubValue,this.akkoVersionValue,this.sdkHostsValue,this.getAkkoFetcher,at)}},{key:"sdkHosts",get:function(){return this.sdkHostsValue.getValue()}},{key:"setupFetcher",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return gt=this.params,xt=gt.appIdentifier,Mt=gt.shuntApiHosts,kt=gt.onInterruptConfigs,zt=gt.onAkkoSetupFailed,ur.prev=1,this.fetchersHubValue=new G_,this.fetcherPhase=1,ur.next=5,xw(xt,Mt,this.onIngoreFetchError);case 5:Ht=ur.sent,kt&&(Ht=kt(Ht)),this.akkoVersionValue.setValue(Ht.akkoVersion),this.sdkHostsValue.setValue((ot=Ht.configmap.sdk)==null?void 0:ot.hosts),this.fetchersHubValue.setValue(new SE(Ht.configmap,this.onIngoreFetchError)),this.fetcherPhase=0,ur.next=12;break;case 9:ur.prev=9,ur.t0=ur.catch(1),this.fetchersHubValue.catchError(new Error("akko setup failed: ".concat(ur.t0.message))),this.fetcherPhase=2,zt&&zt(ur.t0);case 12:case"end":return ur.stop()}},ut,this,[[1,9]])}));function at(){return ct.apply(this,arguments)}return at})()}]),yt})(),ww=(function(){function yt(ct,at,ut,ot,gt){Ot(this,yt),this.fetchersHubValue=ct,this.akkoVersionValue=at,this.sdkHostsValue=ut,this.getAkkoFetcher=ot,this.region=gt}return Bt(yt,[{key:"fetch",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.abrupt("return",new xE(this.fetchersHubValue,this.akkoVersionValue,this.region,ot));case 1:case"end":return xt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"origin",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,this.getAkkoFetcher(this.region);case 2:return Mt.abrupt("return",Mt.sent.origin(ot,gt));case 3:case"end":return Mt.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"reportSuccess",value:function(at,ut){this.getAkkoFetcher(this.region).then(function(ot){ot.reportSuccess(at,ut)})}},{key:"reportFail",value:function(at,ut){this.getAkkoFetcher(this.region).then(function(ot){ot.reportFail(at,ut)})}},{key:"akkoVersion",get:function(){return this.akkoVersionValue.getValue()}},{key:"sdkHosts",get:function(){return this.sdkHostsValue.getValue()}}]),yt})(),qA=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.netState=ct,this.onNetStateUpdate=at,this.paddingResolver=[],this._didDispose=!1,this.onOnline=function(){ut._isOnline=!0,ut.onNetStateUpdate&&ut.onNetStateUpdate(!0),ut.handleAllPaddingResolver(!0)},this.onOffline=function(){ut._isOnline=!1,ut.onNetStateUpdate&&ut.onNetStateUpdate(!1)},ct.addListener(this.listener={onOnline:this.onOnline,onOffline:this.onOffline}),this._isOnline=ct.isOnline}return Bt(yt,[{key:"isOnline",get:function(){return this._isOnline}},{key:"didDispose",get:function(){return this._didDispose}},{key:"dispose",value:function(){try{this.handleAllPaddingResolver(!1),this.netState.removeListener(this.listener)}finally{this._didDispose=!0}}},{key:"makeSureOnline",value:function(){var at=this;return this._didDispose?Promise.resolve(!1):this._isOnline?Promise.resolve(!0):new Promise(function(ut){at.paddingResolver.push(ut)})}},{key:"handleAllPaddingResolver",value:function(at){var ut=Jt(this.paddingResolver.splice(0,this.paddingResolver.length)),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;gt(at)}}catch(xt){ut.e(xt)}finally{ut.f()}}}]),yt})();function wE(){return typeof WebSocket<"u"?WebSocket:commonjsGlobal.WebSocket}var W1=wE();function vT(yt,ct){var at={room:ct.uuid,token:yt,combinable:!0,sessionToken:ct.sessionToken,akkoVersion:ct.akkoVersion,clientVersion:ct.clientVersion,markWritable:ct.markWritable,access:ct.access};for(var ut in at)at[ut]===void 0&&delete at[ut];return(0,fT.stringify)(at)}var Tw=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.disconnectedCallbacks=[],this.actionFramesInterrupter=[],this.snapshotFrameInterrupter=null,this._connectingDuration=-1,this.onReceiveSnapshotFrame=function(ur){ut.snapshotFrameInterrupter=ur},this.onReceiveActionFrame=function(ur){ut.actionFramesInterrupter?ut.actionFramesInterrupter.push(ur):ut.callbacks.onReceivedActionFrame(ur)},this.onReceiveScopeSlices=function(ur){ut.callbacks.onReceivedScopeSlices($x(ur))},this.onHangUp=function(){ut.socket.disconnect(),ut.callbacks.onKickWithReason(Ry.GatewayAdjust)},this.onConnection=function(ur){ut.callbacks.onConnection(ur)},this.onDisconnect=function(ur){var _r=ur.reason,Dr=ur.message,Br=ut.isConnected();ut._sessionBuild=void 0;var Ur=_r===Bs.WebSocketError||_r===Bs.CommunicationError;if(ut.disconnectedCallback(Dr,Ur),Br)switch(_r){case Bs.WebSocketError:case Bs.CommunicationError:{ut.callbacks.onDisconnectedWithSocketError(new Error(Dr));break}case Bs.Normal:{ut.callbacks.onKickWithReason(Dr);break}case Bs.RemoteError:{ut.callbacks.onDisconnectedByServer(new Error(Dr));break}}};var ot=at.logger,gt=at.timeout,xt=at.connectionTimeout,Mt=at.roomToken,kt=at.webSocketQuery,zt=at.callbacks,Ht="".concat(ct,"?").concat(vT(Mt,kt)),rr=new W1(Ht);this.logger=ot,this.logger.info("connect to gateway: ".concat(ct)),this.timeout=gt,this.connectionTimeout=xt,this.uuid=kt.uuid,this.libraryDescriptionSerialization=new W0,this.socket=h_.createSocket(rr,ot,{onConnection:this.onConnection,onDisconnect:this.onDisconnect}),this.socket.on("snapshot",this.onReceiveSnapshotFrame),this.socket.on("action",this.onReceiveActionFrame),this.socket.on("allocate-scope",this.onReceiveScopeSlices),this.socket.on("hang-up",this.onHangUp),this.callbacks=Object.freeze(cv({},zt))}return Bt(yt,[{key:"connectingDuration",get:function(){return this._connectingDuration}},{key:"setAccessUpdaterSerialization",value:function(at){this.accessUpdaterSerialization=at}},{key:"bindPingPongNode",value:function(at){at.bindSocket(this.socket)}},{key:"sessionBuild",get:function(){if(!this._sessionBuild)throw new Error("not connected");return this._sessionBuild}},{key:"sendActionFrame",value:function(at){this.socket.emit("action",at)}},{key:"isConnected",value:function(){return!!this._sessionBuild}},{key:"connect",value:function(){var at=this;return new Promise(function(ut,ot){var gt,xt=function(){clearTimeout(at._connectingTimer);var Br=at.disconnectedCallbacks.indexOf(kt);Br!==-1&&at.disconnectedCallbacks.splice(Br,1),clearTimeout(gt),at.socket.off("session-build",zt)},Mt=function(){xt(),ut("receive session-build event timeout")};gt=setTimeout(Mt,at.timeout),at.socket.phase===ip.Connecting&&(clearTimeout(at._connectingTimer),at._connectingTimer=setTimeout(function(){at.socket.off("session-build",zt),at.socket.disconnect("connect timeout").catch(at.logger.warn),ut("connect timeout")},at.connectionTimeout));var kt=function(Br,Ur){xt(),Ur?ut(Br):(at.logger.error("connect failed: ".concat(Br)),ot(new Error("connect failed: ".concat(Br))))};at.disconnectedCallbacks.push(kt);var zt=function(Br){xt();var Ur=at.snapshotFrameInterrupter,Zr=at.actionFramesInterrupter;at._sessionBuild=O1(Br),at.snapshotFrameInterrupter=null,at.actionFramesInterrupter=null,at.logger.info("receive session build"),ut({snapshot:Ur,actionFrames:Zr})},Ht,rr=function Dr(Br){var Ur=at.libraryDescriptionSerialization.deserialize(Br);at.callbacks.onReceivedLibraryDescription(Ur),at.socket.off("library-description",Dr),clearTimeout(Ht),clearTimeout(gt),gt=setTimeout(Mt,at.timeout)},ur=1,_r=function Dr(){at.socket.phase===ip.Connected&&at.socket.emit("pull-library-description",ur),ur+=1,Ht=setTimeout(Dr,1e3)};Ht=setTimeout(_r,2e3),at.socket.on("session-build",zt),at.socket.on("library-description",rr),at.socket.waitToConnected().then(function(Dr){var Br=Dr.duration;return at._connectingDuration=Br}).catch(function(Dr){at.logger.warn(Dr.message),kt(Dr.message,!0)})})}},{key:"disconnect",value:function(){return this.disconnectedCallback("disconnect",!1),this.socket.disconnect()}},{key:"disconnectWithError",value:function(at){return this.disconnectedCallback(at.message,!1),this.socket.disconnectWithErrorDescription({message:at.message})}},{key:"updateToWritable",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return xt={kind:Xn.Writable,userPayload:ot,connectedPayload:gt},this.socket.emit("update-access",this.accessUpdaterSerialization.serialize(xt)),zt.next=4,this.interruptEvent("allocate-user",[my.WritableAccessForbidden,my.StuffedOfWritableUsers,my.WrongWritablePhase]);case 4:if(Mt=zt.sent,Mt.errorCode===void 0){zt.next=12;break}zt.t0=Mt.errorCode,zt.next=zt.t0===my.WritableAccessForbidden?9:zt.t0===my.StuffedOfWritableUsers?10:zt.t0===my.WrongWritablePhase?11:12;break;case 9:throw new Error("can't update to writable. you don't have permission");case 10:throw new Error("room is stuffed of writable users");case 11:throw new Error("it's wrong writable phase");case 12:return zt.abrupt("return",Mt.target!==void 0?t0(Mt.target):null);case 13:case"end":return zt.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"updateToReadonly",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return gt={kind:Xn.Readonly,payload:ot},this.socket.emit("update-access",this.accessUpdaterSerialization.serialize(gt)),kt.next=4,this.interruptEvent("release-user",[my.NoUserToRelease,my.WrongWritablePhase]);case 4:if(xt=kt.sent,xt.errorCode===void 0){kt.next=11;break}kt.t0=xt.errorCode,kt.next=kt.t0===my.NoUserToRelease?9:kt.t0===my.WrongWritablePhase?10:11;break;case 9:throw new Error("room don't have user to release");case 10:throw new Error("it's wrong writable phase");case 11:return kt.abrupt("return",xt.target!==void 0);case 12:case"end":return kt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"disconnectedCallback",value:function(at,ut){var ot=Jt(this.disconnectedCallbacks.splice(0)),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt(at,ut)}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"interruptEvent",value:function(at,ut){var ot=this;return new Promise(function(gt){var xt=function(){var rr=ot.disconnectedCallbacks.indexOf(Mt);rr!==-1&&ot.disconnectedCallbacks.splice(rr,1),ot.socket.off(at,kt),ot.socket.off("error",zt)},Mt=function(){xt(),gt({})};ot.disconnectedCallbacks.push(Mt);var kt=function(rr){xt(),gt({target:rr})},zt=function(rr){ut.indexOf(rr)!==-1&&(xt(),gt({errorCode:rr}))};ot.socket.on(at,kt),ot.socket.on("error",zt)})}}]),yt})(),Ew=(function(){function yt(){Ot(this,yt),this.switchOn=!0}return Bt(yt,[{key:"wrapCallbacks",value:function(at){var ut=this,ot={},gt=function(kt){var zt=at[kt];typeof zt=="function"?ot[kt]=function(){for(var Ht=arguments.length,rr=new Array(Ht),ur=0;ur<Ht;ur++)rr[ur]=arguments[ur];if(ut.switchOn)return zt.apply(ot,rr)}:ot[kt]=zt};for(var xt in at)gt(xt);return Object.freeze(ot)}}]),yt})(),Aw=Object.freeze([1e3,1e3,1e3,3e3,3e3,5e3,5e3]);function TE(yt){return new Promise(function(ct){return setTimeout(ct,yt)})}var yT=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this._didDispose=!1,this.connectionTask=null,this.operator=null,this.connectionNode=null,this.onNetStateUpdate=function(gt){ot._didDispose||(gt?ot.connectionTask&&ot.startConnectionTask():ot.operator&&(ot.operator.cancel(),ot.operator=null))},this.logger=ct,this.fetcher=at,this.netStatePaddingNode=ut&&new qA(ut,this.onNetStateUpdate)}return Bt(yt,[{key:"dispose",value:function(){this._didDispose||(this._didDispose=!0,this.operator&&this.operator.cancel(),this.connectionTask=null,this.operator=null,this.netStatePaddingNode&&this.netStatePaddingNode.dispose())}},{key:"connect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt=this,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(!this._didDispose){kt.next=2;break}throw new Error("did dispose");case 2:if(!this.connectionTask){kt.next=4;break}throw new Error("is connecting");case 4:if(this.connectionNode&&(this.connectionNode.filter.switchOn=!1,this.connectionNode=null),kt.t0=this.netStatePaddingNode,!kt.t0){kt.next=10;break}return kt.next=9,this.netStatePaddingNode.makeSureOnline();case 9:kt.t0=!kt.sent;case 10:if(!kt.t0){kt.next=12;break}throw new Error("offline");case 12:return xt=new Promise(function(zt,Ht){var rr=new Ew;gt.connectionTask={resolve:zt,reject:Ht,filter:rr,params:vb(cv({},ot),{callbacks:rr.wrapCallbacks(ot.callbacks)})}}),this.startConnectionTask(),kt.prev=14,kt.next=17,xt;case 17:return kt.abrupt("return",kt.sent);case 18:return kt.prev=18,this.connectionTask=null,kt.finish(18);case 21:case"end":return kt.stop()}},ut,this,[[14,,18,21]])}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"startConnectionTask",value:function(){var at=this,ut=new bT(this.logger,this.fetcher),ot=this.connectionTask,gt=ot.params,xt=ot.filter,Mt=ot.resolve,kt=ot.reject;this.operator=ut,this.operator.connect(gt).then(function(zt){zt&&ut===at.operator&&(Mt(zt),at.operator=null,at.connectionNode={filter:xt,connection:zt.connection})}).catch(function(zt){ut===at.operator&&(kt(zt),at.operator=null)})}}]),yt})(),bT=(function(){function yt(ct,at){Ot(this,yt),this.logger=ct,this.fetcher=at,this.connection=null,this.isCancel=!1}return Bt(yt,[{key:"connect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:gt="",xt=0;case 2:if(!(xt<Aw.length+1)){_r.next=33;break}return _r.next=5,this.fetcher.origin("wss","realtime");case 5:return Mt=_r.sent,kt=Date.now(),this.connection=new Tw(Mt,ot),zt=Date.now(),_r.next=11,this.connection.connect();case 11:if(Ht=_r.sent,!this.isCancel){_r.next=19;break}if(this.fetcher.reportSuccess("realtime",Date.now()-kt),_r.t0=Ht&&this.connection,!_r.t0){_r.next=18;break}return _r.next=18,this.connection.disconnectWithError(new Error("cancel connect"));case 18:return _r.abrupt("return",null);case 19:if(tr(Ht)!="object"){_r.next=21;break}return _r.abrupt("return",(this.fetcher.reportSuccess("realtime",Date.now()-kt),{connection:this.connection,snapshot:Ht.snapshot,actionFrames:Ht.actionFrames,retryCount:xt}));case 21:if(this.fetcher.reportFail("realtime",Date.now()-kt),gt=Ht,this.logger.warn("connect failed,message: ".concat(Ht,",try reconnect")),this.connection=null,rr=Aw[xt],_r.t1=rr!==void 0&&zt+rr-Date.now()>0,!_r.t1){_r.next=28;break}return _r.next=27,TE(rr);case 27:_r.t1=this.isCancel;case 28:if(!_r.t1){_r.next=30;break}return _r.abrupt("return",null);case 30:++xt,_r.next=2;break;case 33:throw new Error("connect fail after multiple retries: "+gt);case 34:case"end":return _r.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"cancel",value:function(){var at=this;this.connection&&(this.connection.disconnectWithError(new Error("cancel connect")).catch(function(ut){return at.logger.error(ut)}),this.connection=null),this.isCancel=!0}}]),yt})();function iy(yt){var ct=H0(yt);if(!ct)throw new Error("can't find library from ".concat(yt.name,". it's not root class"));return ct}var cl=function(){};function Ol(yt){return Cw.apply(this,arguments)}function Cw(){return Cw=ht(regeneratorRuntime.mark(function yt(ct){var at,ut;return regeneratorRuntime.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return at=new Ho(ct),gt.next=3,at.connect();case 3:return ut=gt.sent,gt.abrupt("return",{session:at,snapshot:ut.snapshot,actionFrames:ut.actionFrames,connection:ut.connection,retryCount:ut.retryCount});case 5:case"end":return gt.stop()}},yt)})),Cw.apply(this,arguments)}var Ho=(function(){function yt(ct){var at=this;Ot(this,yt),this.connectingResult=null,this._connection=null,this._libraryNode=null,this.onDisconnectedByServer=function(ut){at._connection=null,at._libraryNode=null,at.callbacks.onDisconnectedByServer&&at.callbacks.onDisconnectedByServer(ut)},this.onKickWithReason=function(ut){at._connection=null,at._libraryNode=null,!at.reconnectionOptions.disableReconnect&&(ut===Ry.GatewayAdjust||ut===Ry.RoomZombie)?at.startReconnect(new Error("room became zombie")):at.callbacks.onKickWithReason&&at.callbacks.onKickWithReason(ut)},this.onDisconnectedWithSocketError=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(at._connection=null,at._libraryNode=null,!at.reconnectionOptions.disableReconnect){Mt.next=6;break}at.callbacks.onDisconnectedWithSocketError&&at.callbacks.onDisconnectedWithSocketError(gt),Mt.next=8;break;case 6:return Mt.next=8,at.startReconnect(gt);case 8:case"end":return Mt.stop()}},ot)}));return function(ot){return ut.apply(this,arguments)}})(),this.logger=ct.logger,this.uuid=ct.uuid,this.roomToken=ct.roomToken,this.timeout=ct.timeout,this.connectionTimeout=ct.connectionTimeout,this.markWritable=ct.markWritable,this.clientVersion=ct.clientVersion,this.reconnectionOptions=ct.reconnectionOptions,this.access=ct.access,this.objectOperator=ct.objectOperator,this.libraryNodeFetcher=ct.libraryNodeFetcher,this.sdkHosts=ct.sdkHosts,this.connectionBuilder=new yT(ct.logger,ct.fetcher,ct.netState),this.callbacks=Object.freeze(cv({},ct.callbacks))}return Bt(yt,[{key:"session",get:function(){return this.sessionBuild.session}},{key:"slice",get:function(){return this.sessionBuild.slice}},{key:"connection",get:function(){return this._connection}},{key:"libraryNode",get:function(){return this._libraryNode}},{key:"dispose",value:function(){this.connectionBuilder.dispose()}},{key:"connect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(!this.connectingResult){rr.next=2;break}throw new Error("WebSocketSession is connecting");case 2:return ot=new G_,gt=this.connectingResult=new G_,rr.prev=3,rr.next=6,this.connectionBuilder.connect({logger:this.logger,roomToken:this.roomToken,timeout:this.timeout,connectionTimeout:this.connectionTimeout,webSocketQuery:{uuid:this.uuid,akkoVersion:Hu,clientVersion:this.clientVersion,markWritable:this.markWritable,access:this.access,sessionToken:this.sessionBuild&&this.sessionBuild.sessionToken},callbacks:{onConnection:this.callbacks.onConnection||cl,onReceivedLibraryDescription:this.createLibraryDescriptionReceiver(ot),onReceivedActionFrame:this.callbacks.onReceivedActionFrame||cl,onReceivedScopeSlices:this.callbacks.onReceivedScopeSlices||cl,onDisconnectedByServer:this.onDisconnectedByServer,onKickWithReason:this.onKickWithReason,onDisconnectedWithSocketError:this.onDisconnectedWithSocketError}});case 6:return xt=rr.sent,this.sessionBuild&&(Mt=xt.connection.sessionBuild,kt=Mt.session,zt=Mt.slice,this.callbacks.onSessionUpdate&&this.sessionBuild.session!==kt&&this.callbacks.onSessionUpdate(kt),this.callbacks.onSliceUpdate&&this.sessionBuild.slice!==zt&&this.callbacks.onSliceUpdate(zt)),this._connection=xt.connection,rr.next=11,ot.getValue();case 11:return this._libraryNode=rr.sent,this.sessionBuild=xt.connection.sessionBuild,this._connection.setAccessUpdaterSerialization(new k1(this.objectOperator,iy(this._libraryNode.libraryClass))),this.connectingResult=null,gt.setValue(xt),rr.abrupt("return",xt);case 19:throw rr.prev=19,rr.t0=rr.catch(3),ot.catchError(rr.t0),gt.catchError(rr.t0),this.logger.error(rr.t0),rr.t0;case 22:case"end":return rr.stop()}},ut,this,[[3,19]])}));function at(){return ct.apply(this,arguments)}return at})()},{key:"reconnectWithError",value:function(at){this._connection&&(this._connection.disconnect(),this._connection=null,this._libraryNode=null),this.startReconnect(at)}},{key:"createLibraryDescriptionReceiver",value:function(at){var ut=this;return(function(){var ot=ht(regeneratorRuntime.mark(function gt(xt){return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.t0=at,kt.next=4,ut.libraryNodeFetcher(xt,ut.sdkHosts);case 4:kt.t1=kt.sent,kt.t0.setValue.call(kt.t0,kt.t1),kt.next=11;break;case 8:kt.prev=8,kt.t2=kt.catch(0),at.catchError(kt.t2);case 11:case"end":return kt.stop()}},gt,null,[[0,8]])}));return function(gt){return ot.apply(this,arguments)}})()}},{key:"startReconnect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!this.connectingResult){Ht.next=5;break}return Ht.next=3,this.connectingResult.getValue();case 3:Ht.next=0;break;case 5:return Ht.prev=5,gt=this.callbacks,xt=gt.onBeginReconnect,Mt=gt.onReconnected,xt&&Promise.resolve().then(function(){return xt(ot)}),Ht.next=10,this.connect();case 10:kt=Ht.sent,Mt&&Promise.resolve().then(function(){return Mt(kt)}),Ht.next=17;break;case 14:Ht.prev=14,Ht.t0=Ht.catch(5),this.callbacks.onDisconnectedWithSocketError&&this.callbacks.onDisconnectedWithSocketError(Ht.t0);case 17:case"end":return Ht.stop()}},ut,this,[[5,14]])}));function at(ut){return ct.apply(this,arguments)}return at})()}]),yt})(),Fy=Object.freeze({disableReconnect:!1});function Gt(yt){return yt===!1?{disableReconnect:!0}:cv(cv({},Fy),yt)}var er;(function(yt){yt[yt.Success=0]="Success",yt[yt.Break=1]="Break"})(er||(er={}));var hr=(function(){function yt(ct){var at=this;Ot(this,yt),this.idle=co({timeout:800,checkingTimeMod:2,maxPaddingDuration:1600,maxInvokingDuration:100}),this.nextId=0,this.socket=null,this.pingProgress=null,this.promiseSleep=null,this.deltaTime=void 0,this.latestAdjustedTimestamp=0,this.isFirstAdjustedTime=!0,this.onPong=function(ut){var ot=Py(ut),gt=ot.id,xt=ot.timestamp;if(at.pingProgress){var Mt=at.pingProgress,kt=Mt.id,zt=Mt.timestamp,Ht=Mt.handlers;if(kt===gt){var rr={remoteTimestamp:xt,shouldBreak:!1,sendAt:zt,receivedAt:Date.now()},ur=Jt(Ht),_r;try{for(ur.s();!(_r=ur.n()).done;){var Dr=_r.value,Br=Dr.resolve,Ur=Dr.timer;clearTimeout(Ur),Br(rr)}}catch(Zr){ur.e(Zr)}finally{ur.f()}at.pingProgress=null}}},this.onPingFailed=ct}return Bt(yt,[{key:"calibrationTimestamp",get:function(){if(this.deltaTime===void 0)return Date.now();{var at=Math.max(this.latestAdjustedTimestamp,Date.now()+this.deltaTime);return this.latestAdjustedTimestamp=at,at}}},{key:"bindSocket",value:function(at){this.socket&&this.unbindSocket(),this.socket=at,this.socket.on("pong",this.onPong),this.handleStartPingLoop().catch(this.onPingFailed)}},{key:"unbindSocket",value:function(){if(this.socket&&(this.socket.off("pong",this.onPong),this.socket=null),this.promiseSleep&&(clearTimeout(this.promiseSleep.sleepTimer),this.promiseSleep.resolve(1),this.promiseSleep=null),this.pingProgress){var at={shouldBreak:!0,remoteTimestamp:0,sendAt:0,receivedAt:0},ut=Jt(this.pingProgress.handlers),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value.resolve;gt(at)}}catch(xt){ut.e(xt)}finally{ut.f()}this.pingProgress=null}}},{key:"handleStartPingLoop",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot=this,gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:gt=regeneratorRuntime.mark(function zt(){var Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return Ht=0,rr=0,Dr.next=4,ot.doProgress(ot.onPingFailed,ht(regeneratorRuntime.mark(function Br(){var Ur,Zr,Tn,jn,ts,us;return regeneratorRuntime.wrap(function(Hs){for(;;)switch(Hs.prev=Hs.next){case 0:return Hs.next=2,ot.ping(yt.pongTimeout);case 2:if(Ur=Hs.sent,Zr=Ur.shouldBreak,Tn=Ur.remoteTimestamp,jn=Ur.sendAt,ts=Ur.receivedAt,!Zr){Hs.next=9;break}return Hs.abrupt("return",1);case 9:return us=ts-jn,Hs.abrupt("return",(Ht+=Tn+us/2-ts,rr+=1,ot.isFirstAdjustedTime&&ot.updateDeltaTime(Math.floor(Ht/rr)),0));case 11:case"end":return Hs.stop()}},Br)})));case 4:if(ur=Dr.sent,Dr.t0=ur===1,Dr.t0){Dr.next=12;break}return ot.isFirstAdjustedTime?ot.isFirstAdjustedTime=!1:rr>=(yt.processTimeIntervalList.length+1)/2&&ot.updateDeltaTime(Math.floor(Ht/rr)),Dr.next=10,ot.sleep(ot.withFloatRate(yt.processInterval));case 10:ur=Dr.sent,Dr.t0=ur===1;case 12:if(!Dr.t0){Dr.next=14;break}return Dr.abrupt("return","break");case 14:case"end":return Dr.stop()}},zt)});case 1:if(!this.socket){kt.next=8;break}return kt.delegateYield(gt(),"t0",3);case 3:if(xt=kt.t0,xt!=="break"){kt.next=6;break}return kt.abrupt("break",8);case 6:kt.next=1;break;case 8:case"end":return kt.stop()}},ut,this)}));function at(){return ct.apply(this,arguments)}return at})()},{key:"updateDeltaTime",value:function(at){this.deltaTime=at}},{key:"doProgress",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return xt=0,rr.prev=1,rr.next=4,gt();case 4:xt=rr.sent,rr.next=10;break;case 7:rr.prev=7,rr.t0=rr.catch(1),ot(rr.t0);case 10:if(xt!==0){rr.next=43;break}Mt=Jt(yt.processTimeIntervalList),rr.prev=12,Mt.s();case 14:if((kt=Mt.n()).done){rr.next=35;break}return zt=kt.value,rr.prev=16,rr.next=19,this.sleep(this.withFloatRate(zt));case 19:if(xt=rr.sent,rr.t1=xt===1,rr.t1){rr.next=26;break}return rr.next=24,gt();case 24:xt=rr.sent,rr.t1=xt===1;case 26:if(!rr.t1){rr.next=28;break}return rr.abrupt("break",35);case 28:rr.next=33;break;case 30:rr.prev=30,rr.t2=rr.catch(16),ot(rr.t2);case 33:rr.next=14;break;case 35:rr.next=40;break;case 37:rr.prev=37,rr.t3=rr.catch(12),Mt.e(rr.t3);case 40:return rr.prev=40,Mt.f(),rr.finish(40);case 43:return rr.abrupt("return",xt);case 44:case"end":return rr.stop()}},ut,this,[[1,7],[12,37,40,43],[16,30]])}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"ping",value:function(at){var ut=this;return new Promise(function(ot,gt){var xt=Date.now(),Mt,kt;ut.pingProgress?(Mt=ut.pingProgress.id,kt=ut.pingProgress.handlers):(Mt=ut.getNextId(),kt=[],ut.pingProgress={id:Mt,timestamp:xt,handlers:kt},ut.idle.invokeOnIdle(function(){var rr;(rr=ut.socket)==null||rr.emit("ping",q1({id:Mt,timestamp:xt}))}).catch(function(rr){if(ut.pingProgress){var ur=Jt(ut.pingProgress.handlers),_r;try{for(ur.s();!(_r=ur.n()).done;){var Dr=_r.value;Dr.reject(rr),clearTimeout(Dr.timer)}}catch(Br){ur.e(Br)}finally{ur.f()}ut.pingProgress=null}}));var zt=setTimeout(function(){ut.pingProgress&&ut.pingProgress.id===Mt&&ut.removeHandler(Ht)&&Ht.reject(new Error("pong timeout"))},at),Ht={resolve:ot,reject:gt,timer:zt};kt.push(Ht)})}},{key:"removeHandler",value:function(at){var ut=!1;if(this.pingProgress){var ot=this.pingProgress.handlers,gt=ot.indexOf(at);gt>=0&&(ot.splice(gt,1),ot.length===0&&(this.pingProgress=null),ut=!0)}return ut}},{key:"getNextId",value:function(){this.nextId>yt.maxId&&(this.nextId=0);var at=this.nextId;return this.nextId+=1,at}},{key:"withFloatRate",value:function(at){var ut=1-yt.timeFloatRate+2*yt.timeFloatRate*Math.random();return Math.floor(ut*at)}},{key:"sleep",value:function(at){var ut=this;if(this.promiseSleep)throw new Error("did call sleep");return new Promise(function(ot){var gt=setTimeout(function(){ut.promiseSleep=null,ot(0)},at);ut.promiseSleep={resolve:ot,sleepTimer:gt}})}}]),yt})(),Fr=hr;Fr.maxId=Math.pow(2,32)-1,Fr.pongTimeout=6*1e3,Fr.timeFloatRate=.35,Fr.processInterval=300*1e3,Fr.processTimeIntervalList=Object.freeze([5*1e3,7*1e3,12*1e3,15*1e3]);var nn=(function(){function yt(ct){var at=this;Ot(this,yt),this.invoker=ct,this.animationFrameId=null,this.shouldInvokeNextFrame=!1,this.blockInvoke=!1,this.fireTick=function(){if(at.shouldInvokeNextFrame)try{at.invoker()}catch(ut){console.error(ut)}at.shouldInvokeNextFrame=!1,at.blockInvoke=!1,at.animationFrameId=null}}return Bt(yt,[{key:"invoke",value:function(){if(this.blockInvoke)this.shouldInvokeNextFrame=!0;else{try{this.invoker()}catch(at){console.error(at)}this.animationFrameId===null&&(this.animationFrameId=window.requestAnimationFrame(this.fireTick)),this.blockInvoke=!0}}}]),yt})(),zn;(function(yt){yt.Playing="playing",yt.Pausing="pausing",yt.PausingAndWaiting="pausingAndWaiting",yt.Waiting="waiting",yt.Ended="ended"})(zn||(zn={}));var _i;(function(yt){yt[yt.AutoBlockNewFrames=0]="AutoBlockNewFrames",yt[yt.DoNotBlockNewFrames=1]="DoNotBlockNewFrames"})(_i||(_i={}));var As=(function(){function yt(){Ot(this,yt),this.blockMode=1,this.queue=[],this.blockIndex=this.queue.length}return Bt(yt,[{key:"hasFrames",get:function(){return this.queue.length>0}},{key:"hasAccessibleFrames",get:function(){return this.blockIndex>0}},{key:"hasBlockedFrames",get:function(){return this.queue.length>this.blockIndex}},{key:"accessibleLength",get:function(){return this.blockIndex}},{key:"rearFrame",get:function(){return this.frameAt(0)}},{key:"latestFrameIncludesBlocked",get:function(){var at;return(at=this.queue[this.queue.length-1])==null?void 0:at.proto}},{key:"blockedFrame",get:function(){var at;return(at=this.queue[this.blockIndex])==null?void 0:at.proto}},{key:"blockedReceivedAt",get:function(){var at=this.queue[this.blockIndex];return at?at.receivedAt:-1}},{key:"timeInterval",get:function(){if(this.blockIndex>0){var at=this.queue[this.blockIndex-1],ut=this.queue[0];return at.proto.timestamp-ut.proto.timestamp}else return 0}},{key:"timeIntervalBefore",value:function(at){var ut,ot=0,gt=(ut=this.queue[0])==null?void 0:ut.proto.timestamp;if(gt!==void 0){for(var xt=-1,Mt=this.blockIndex-1;Mt>=0;--Mt){var kt=this.queue[Mt];if(kt.proto.timestamp<=at){xt=kt.proto.timestamp;break}}xt!==-1&&(ot=xt-gt)}return ot}},{key:"frameAt",value:function(at){if(at<this.blockIndex)return this.queue[at].proto}},{key:"push",value:function(at){var ut=Date.now();this.blockMode===1&&(this.blockIndex+=at.length);var ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;this.queue.push({proto:xt,receivedAt:ut})}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"shift",value:function(){var at;if(this.frameAt(0))return this.blockIndex-=1,(at=this.queue.shift())==null?void 0:at.proto}},{key:"unblockOneFrame",value:function(){this.blockIndex<this.queue.length&&(this.blockIndex+=1)}}]),yt})(),ps=12e3,xo;(function(yt){yt.Realtime="realtime",yt.Reconstruction="reconstruction"})(xo||(xo={}));var Pu=(function(){function yt(ct){var at=this;Ot(this,yt),this.framesQueue=new As,this.isPlaying=!1,this._didCompletePushFrames=!1,this.didCompletePlaying=!1,this.handleTickEvent=function(){try{at.onTick()}finally{at.shouldTickNextFrame()&&at.tickLimiter.invoke(),at.phaseNode.touch()}},this.currentPhase=function(){return at.didCompletePlaying?zn.Ended:at._didCompletePushFrames||at.framesQueue.hasAccessibleFrames?at.isPlaying?zn.Playing:zn.Pausing:at.isPlaying?zn.Waiting:zn.PausingAndWaiting},this.onPhaseChanged=function(zt,Ht){Ht===zn.Playing&&zt!==zn.Playing?at.onPlayingStop():Ht!==zn.Playing&&zt===zn.Playing&&at.onPlayingContinue(),at.callbacks.onPhaseChanged&&at.callbacks.onPhaseChanged(zt)},this.logger=ct.logger,this.mode=ct.mode,this.syncMode=ct.syncMode||!1,this.callbacks=Object.freeze(cv({},ct.callbacks));var ut=ct.enableAnimationFrame,ot=ct.frameInterval,gt=ot===void 0?17:ot,xt=ct.remainLowTimeInterval,Mt=xt===void 0?ps:xt;if(ut){var kt=new nn(this.handleTickEvent);this.tickLimiter=new Nu(gt,function(){return kt.invoke()})}else this.tickLimiter=new Nu(gt,this.handleTickEvent);this.remainLowTimeInterval=Mt,this.phaseNode=new zr({getCurrentPhase:this.currentPhase,onPhaseChanged:this.onPhaseChanged})}return Bt(yt,[{key:"didCompletePushFrames",get:function(){return this._didCompletePushFrames}},{key:"completePlaying",value:function(){this.didCompletePlaying=!0,this.phaseNode.touch(),this.tickLimiter.cancel()}},{key:"frameInterval",get:function(){return this.tickLimiter.limitDuration},set:function(at){this.tickLimiter.limitDuration=at}},{key:"phase",get:function(){return this.phaseNode.phase}},{key:"shouldTickNextFrame",value:function(){return this.didCompletePlaying?!1:this.willTickEveryFrames?!0:!!(this.isPlaying&&this.framesQueue.hasFrames)}},{key:"pushFrames",value:function(at){this.framesQueue.push(at),at.length>0&&this.isPlaying&&this.tickLimiter.invoke(),this.phaseNode.touch()}},{key:"play",value:function(){!this.isPlaying&&this.phaseNode.phase!==zn.Ended&&(this.isPlaying=!0,this.framesQueue.hasAccessibleFrames&&this.tickLimiter.invoke(),this.phaseNode.touch())}},{key:"pause",value:function(){this.isPlaying&&(this.isPlaying=!1,this.tickLimiter.cancel(),this.phaseNode.touch())}},{key:"completePushFrames",value:function(){this._didCompletePushFrames=!0,this.framesQueue.hasAccessibleFrames||(this.didCompletePlaying=!0,this.tickLimiter.cancel()),this.phaseNode.touch()}}]),yt})(),Bu=(function(){function yt(ct,at){Ot(this,yt),this.lastTimestamp=0,this.targetValue=ct,this._momentValue=ct,this.halfLifeInterval=at}return Bt(yt,[{key:"value",get:function(){return this.targetValue},set:function(at){this.targetValue!==at&&(this.targetValue!==this._momentValue&&this.refreshMomentValue(),this.targetValue=at)}},{key:"momentValue",get:function(){return this.targetValue!==this._momentValue&&this.refreshMomentValue(),this._momentValue}},{key:"refreshMomentValue",value:function(){var at=Date.now(),ut=at-this.lastTimestamp,ot;if(ut>this.halfLifeInterval*yt.convergenceTimes)ot=this.targetValue;else{var gt=Math.pow(.5,ut/this.halfLifeInterval);ot=this._momentValue*gt+this.targetValue*(1-gt),Math.abs(ot-this.targetValue)<yt.minNumber&&(ot=this.targetValue)}this._momentValue=ot,this.lastTimestamp=at}}]),yt})(),_f=Bu;_f.convergenceTimes=6,_f.minNumber=.01;var zp=1200,s0=Object.freeze([Object.freeze({duration:1200,rate:1}),Object.freeze({duration:1e3,rate:.75}),Object.freeze({duration:3e3,rate:.5}),Object.freeze({duration:5e3,rate:.25})]);function Xv(yt){var ct=yt,at=Jt(s0),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;if(ct<=ot.duration)return ot.rate;ct-=ot.duration}}catch(gt){at.e(gt)}finally{at.f()}throw new Error("durationTime is too large:"+ct)}var ho=(function(){var yt=0,ct=Jt(s0),at;try{for(ct.s();!(at=ct.n()).done;){var ut=at.value.duration;yt+=ut}}catch(ot){ct.e(ot)}finally{ct.f()}return yt})(),Zs=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.latestTimestamp=null,ot.syncDelta=null,ot.framesQueue.blockMode=_i.AutoBlockNewFrames,ot.frameDelayGradient=new _f(ut.frameDelay||0,zp),ot}return Bt(at,[{key:"frameDelay",get:function(){return this.frameDelayGradient.value},set:function(ot){this.frameDelayGradient.value=ot}},{key:"isPlaybackSpeedModifiable",get:function(){return!1}},{key:"playbackSpeed",get:function(){return 1},set:function(ot){}},{key:"willTickEveryFrames",get:function(){return!1}},{key:"syncBlockTimestamp",value:function(ot){var gt=ot-Date.now();this.syncDelta?this.syncDelta.value=gt:this.syncDelta=new _f(gt,zp)}},{key:"stopBlockTimestamp",value:function(){this.syncDelta=null}},{key:"flushFrames",value:function(){var ot=[];for(this.unblockFramesIfNeed(Date.now());this.framesQueue.hasAccessibleFrames;)ot.push(this.framesQueue.shift());this.playFrames(ot),this.latestTimestamp=null}},{key:"onPlayingContinue",value:function(){}},{key:"onPlayingStop",value:function(){}},{key:"onTick",value:function(){var ot=Date.now(),gt=[];if(this.unblockFramesIfNeed(ot),this.fillOverIntervalFrames(ot,gt),this.fillShouldPlayFrames(ot,gt),this.playFrames(gt),this.callbacks.onBufferRemainLow&&this.latestTimestamp&&!this.didCompletePushFrames){var xt=0;if(this.framesQueue.hasAccessibleFrames){var Mt=this.framesQueue.latestFrameIncludesBlocked.timestamp;xt=Mt-this.latestTimestamp.ack}xt<this.remainLowTimeInterval&&this.callbacks.onBufferRemainLow()}}},{key:"unblockFramesIfNeed",value:function(ot){if(this.syncDelta)for(var gt=ot+this.syncDelta.momentValue;this.framesQueue.hasBlockedFrames&&this.framesQueue.blockedFrame.timestamp<=gt;)this.framesQueue.unblockOneFrame();else for(;this.framesQueue.hasBlockedFrames;){var xt=this.framesQueue.blockedReceivedAt+this.frameDelayGradient.momentValue;if(ot>=xt)this.framesQueue.unblockOneFrame();else break}}},{key:"fillOverIntervalFrames",value:function(ot,gt){for(;this.framesQueue.timeInterval>ho;)gt.push(this.framesQueue.shift());gt.length>0&&this.updateLatestTimestamp(ot,gt[gt.length-1])}},{key:"fillShouldPlayFrames",value:function(ot,gt){for(var xt=this.framesQueue.timeIntervalBefore(ot),Mt=Xv(xt);this.framesQueue.hasAccessibleFrames;){var kt=this.framesQueue.rearFrame,zt=!1;if(!this.latestTimestamp||this.syncMode)zt=!0;else{var Ht=kt.timestamp-this.latestTimestamp.ack,rr=this.latestTimestamp.device+Ht*Mt;zt=ot+this.frameInterval>=rr}if(zt)gt.push(this.framesQueue.shift()),this.updateLatestTimestamp(ot,kt);else break}}},{key:"playFrames",value:function(ot){if(ot.length>0)try{this.callbacks.onPlayActionFrames&&this.callbacks.onPlayActionFrames(ot)}catch(gt){this.logger.error(gt)}}},{key:"updateLatestTimestamp",value:function(ot,gt){var xt=gt.timestamp;this.latestTimestamp?(this.latestTimestamp.ack=xt,this.latestTimestamp.device=ot):this.latestTimestamp={ack:xt,device:ot}}}]),at})(Pu),No=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.frameDelay=0,ot._playbackSpeed=1,ot.endFrameTimestamp=ut.endFrameTimestamp,ot.anchor={deviceTimestamp:Date.now(),playerTimestamp:ut.initFrameTimestamp},ot}return Bt(at,[{key:"syncBlockTimestamp",value:function(ot){}},{key:"stopBlockTimestamp",value:function(){}},{key:"flushFrames",value:function(){}},{key:"play",value:function(){st(Ut(at.prototype),"play",this).call(this);var ot=this.callbacks.onBufferRemainLow;ot&&this.isBufferRemainLow&&Promise.resolve().then(ot).catch(function(gt){return console.error(gt)})}},{key:"isPlaybackSpeedModifiable",get:function(){return!0}},{key:"playbackSpeed",get:function(){return this._playbackSpeed},set:function(ot){if(ot<0)throw new Error("invalid playback speed ".concat(ot,". it shouldn't be nagative number"));if(Number.isNaN(ot)||ot===1/0)throw new Error("invalid playback speed. it can not be ".concat(ot));this._playbackSpeed!==ot&&(this.phase===zn.Playing&&this.refreshAnchor(this._playbackSpeed),this._playbackSpeed=ot)}},{key:"willTickEveryFrames",get:function(){return!0}},{key:"onPlayingContinue",value:function(){this.refreshAnchor(0)}},{key:"onPlayingStop",value:function(){this.refreshAnchor(this._playbackSpeed)}},{key:"onTick",value:function(){for(var ot=[],gt=this.playbackSpeed*(Date.now()-this.anchor.deviceTimestamp+this.frameInterval),xt=this.anchor.playerTimestamp+gt;this.framesQueue.hasAccessibleFrames&&this.framesQueue.rearFrame.timestamp<=xt;)ot.push(this.framesQueue.shift());if(ot.length>0)try{this.callbacks.onPlayActionFrames&&this.callbacks.onPlayActionFrames(ot)}catch(zt){this.logger.error(zt)}if(this.callbacks.onTick)if(ot.length>0){var Mt=ot[ot.length-1],kt=Math.max(this.anchor.playerTimestamp,Mt.timestamp);this.callbacks.onTick(kt,!1)}else this.callbacks.onTick(xt,!0);this.callbacks.onBufferRemainLow&&!this.didCompletePushFrames&&this.isBufferRemainLow&&this.callbacks.onBufferRemainLow(),this.didCompletePushFrames&&ot.length===0&&this.endFrameTimestamp!==void 0&&xt>=this.endFrameTimestamp&&this.completePlaying()}},{key:"refreshAnchor",value:function(ot){var gt=Date.now(),xt=ot*(gt-this.anchor.deviceTimestamp);this.anchor={deviceTimestamp:gt,playerTimestamp:this.anchor.playerTimestamp+xt}}},{key:"isBufferRemainLow",get:function(){return this.framesQueue.timeInterval<this.remainLowTimeInterval}}]),at})(Pu),iu=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"create",value:function(at){switch(at.mode){case xo.Realtime:return new Zs(at);case xo.Reconstruction:return new No(at);default:throw new Error("invalid mode ".concat(at.mode))}}}]),yt})(),wu=new iu,ju=(function(){function yt(ct){Ot(this,yt),this.latestReceivedFrameId=-1,this.didAssertedCount=0,this.latestReceivedFrameId=ct}return Bt(yt,[{key:"assertReceivedFrameId",value:function(at){var ut=this.latestReceivedFrameId+1;if(at!==ut)throw new Error("Magix want frameId ".concat(ut,", instead of ").concat(at," (did asserted ").concat(this.didAssertedCount," frames)"));this.latestReceivedFrameId=at,this.didAssertedCount+=1}}]),yt})(),ml=(function(){function yt(ct){var at=this;Ot(this,yt),this.latestTimestamp=null,this.onVisible=function(){document.visibilityState==="visible"&&at.playerBuffer.flushFrames()},this.receivedActionFramePicker=function(ot){at.frameIdAsserter.assertReceivedFrameId(ot.frameId),at.playerBuffer.pushFrames([ot])},this.onPlayActionFrames=function(ot){at.onFrameReceivedInterval&&ot.length>0&&at.onFrameReceivedInterval(at.getFrameReceivedInterval(ot));var gt=[],xt=Jt(ot),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;gt.push(kt.frameBuffer)}}catch(zt){xt.e(zt)}finally{xt.f()}try{at.image.appendActionFrames(gt)}catch(zt){if(at.onClientCrashWithError)at.onClientCrashWithError(zt);else throw zt}};var ut;this.connection=ct.connection,this.image=ct.imageFactory.createWithSnapshot({logger:ct.logger,observerId:Pr,library:ct.library,snapshotFrame:ct.snapshot,pendingReportChanged:ct.pendingReportChanged,actionFrames:Ct(ct.initializeActionFrames),originalImage:(ut=ct.originalMagixSession)==null?void 0:ut.image,includesFrameHash:!1,ignoreHashChecking:!0,roomUUID:ct.connection.uuid,toolsExtra:ct.toolsExtra,callbacks:{onModified:ct.callbacks.onModified,onPhaseChanged:ct.callbacks.onImagePhaseChanged,onGeneratedActionFrame:ct.callbacks.onGeneratedActionFrame,onCatchErrorWhenAppendFrame:ct.callbacks.onCatchErrorWhenAppendFrame,onReceivedRttReport:ct.callbacks.onReceivedRttReport,onIllusionQueueLengthChanged:ct.callbacks.onIllusionQueueLengthChanged,onEventFire:ct.callbacks.onEventFire,onEventFireACK:ct.callbacks.onEventFireACK,onClientCrashWithError:ct.callbacks.onClientCrashWithError}}),this.frameIdAsserter=new ju(this.image.frameId),this.playerBuffer=wu.create({logger:ct.logger,mode:xo.Realtime,syncMode:ct.syncMode,frameDelay:ct.timeDelay,enableAnimationFrame:ct.enableAnimationFrame,initFrameTimestamp:this.image.timestamp,callbacks:{onPlayActionFrames:this.onPlayActionFrames}}),this.onFrameReceivedInterval=ct.callbacks.onFrameReceivedInterval,this.onClientCrashWithError=ct.callbacks.onClientCrashWithError,typeof document<"u"&&document.visibilityState&&document.addEventListener("visibilitychange",this.onVisible),this.playerBuffer.play()}return Bt(yt,[{key:"imagePhase",get:function(){return this.image.phase}},{key:"timestamp",get:function(){return this.image.timestamp}},{key:"trigger",get:function(){return this.image.trigger}},{key:"pendingReportChanged",get:function(){return this.image.pendingReportChanged},set:function(at){this.image.pendingReportChanged=at}},{key:"syncMode",get:function(){return this.playerBuffer.syncMode},set:function(at){this.playerBuffer.syncMode=at}},{key:"receivedScopeSlices",value:function(at){this.image.appendScopeSlices(at)}},{key:"dispatch",value:function(at,ut){this.image.dispatch(at,ut)}},{key:"updateTimeDelay",value:function(at){this.playerBuffer.frameDelay=at}},{key:"syncBlockTimestamp",value:function(at){this.playerBuffer.syncBlockTimestamp(at)}},{key:"stopBlockTimestamp",value:function(){this.playerBuffer.stopBlockTimestamp()}},{key:"setModifiable",value:function(at){this.image.modifiable=at}},{key:"setAllocatedUser",value:function(at){return this.image.setAllocatedUser(at)}},{key:"removeAllocatedUser",value:function(){return this.image.removeAllocatedUser()}},{key:"destroy",value:function(){typeof document<"u"&&document.removeEventListener("visibilitychange",this.onVisible),this.image.destroy()}},{key:"cleanSendingQueue",value:function(){return this.image.waitUtilIllusionQueueEmpty()}},{key:"getFrameReceivedInterval",value:function(at){var ut=Date.now(),ot=0,gt=0,xt=Jt(at),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(this.latestTimestamp){var zt=ut-this.latestTimestamp.recevied,Ht=kt.timestamp-this.latestTimestamp.arbitrated;this.latestTimestamp.recevied=ut,this.latestTimestamp.arbitrated=kt.timestamp,ot+=Math.abs(zt-Ht),gt+=1}else this.latestTimestamp={recevied:ut,arbitrated:kt.timestamp}}}catch(ur){xt.e(ur)}finally{xt.f()}var rr=0;return gt>0&&(rr=ot/gt),rr}}]),yt})(),Mp=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.userPayload=ct,this.onCleanSendingQueue=at,this.onSelfUserIdUpdate=ut,this.onConvertToWritable=ot,this._selfUserId=void 0,this.invokerBlock=Promise.resolve(),this.isConnectedSessionWritable=!1,this.connectedSession=null}return Bt(yt,[{key:"selfUserId",get:function(){return this._selfUserId}},{key:"finalUserId",get:function(){var at=this;return this.invokerBlock.then(function(){return at._selfUserId})}},{key:"setConnectedMagixSession",value:function(at){this.connectedSession!==at&&(!this.connectedSession&&at&&this.paddingAndWaitSession&&(this.paddingAndWaitSession(at),this.paddingAndWaitSession=void 0),this.connectedSession=at,this.isConnectedSessionWritable=!1)}},{key:"setWritable",value:function(at,ut){return this.invokerBlock=this.convertTo(this.invokerBlock,at,ut)}},{key:"convertTo",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ot;case 2:if(this.isConnectedSessionWritable!==gt){Ht.next=4;break}return Ht.abrupt("return");case 4:this.updateObserverId(void 0),Mt=null;case 6:return Ht.next=8,this.waitAndGetConnectedSession();case 8:if(kt=Ht.sent,this.isConnectedSessionWritable!==gt){Ht.next=11;break}return Ht.abrupt("break",33);case 11:if(!gt){Ht.next=21;break}return Ht.next=14,kt.connection.updateToWritable(this.userPayload,xt);case 14:if(Mt=Ht.sent,Mt){Ht.next=17;break}return Ht.abrupt("continue",31);case 17:return Ht.next=19,kt.setAllocatedUser(Mt);case 19:Ht.next=29;break;case 21:return Ht.next=23,this.onCleanSendingQueue();case 23:return Ht.next=25,kt.connection.updateToReadonly(xt);case 25:if(Ht.sent){Ht.next=27;break}return Ht.abrupt("continue",31);case 27:return Ht.next=29,kt.removeAllocatedUser();case 29:return this.isConnectedSessionWritable=gt,Ht.abrupt("break",33);case 31:Ht.next=6;break;case 33:Mt&&this.updateObserverId(Mt.userId),this.onConvertToWritable&&this.onConvertToWritable(!!Mt);case 34:case"end":return Ht.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"waitAndGetConnectedSession",value:function(){var at=this;return this.connectedSession?Promise.resolve(this.connectedSession):new Promise(function(ut){return at.paddingAndWaitSession=ut})}},{key:"updateObserverId",value:function(at){this._selfUserId!==at&&(this._selfUserId=at,this.onSelfUserIdUpdate&&this.onSelfUserIdUpdate(at))}}]),yt})(),Cm=12,Wl;(function(yt){yt[yt.Admin=0]="Admin",yt[yt.Writer=1]="Writer",yt[yt.Reader=2]="Reader"})(Wl||(Wl={}));function x1(yt){if(/^NETLESSROOM_.+/.test(yt)){var ct=yt.substring(Cm),at=(0,BS.parse)(EE(ct)),ut=parseFloat("".concat(at.role));if(Number.isNaN(ut)||!Number.isSafeInteger(ut))throw new Error("invalid room token with wrong role: ".concat(JSON.stringify(yt)));switch(ut){case 0:case 1:return"writable";case 2:return"readonly";default:throw new Error("find unrecognized role from roomToken: ".concat(ut))}}else{if(/^WHITE.+/.test(yt))return"writable";throw new Error("invalid room token: ".concat(JSON.stringify(yt)))}}function EE(yt){return atob(yt.replace(/_/g,"/").replace(/-/g,"+"))}var tD=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.queue=[],this._isWorking=!0,this.onDelayFire=function(){ut.queue.splice(0),ut.onTimeout()},this.timeout=ct,this.delayer=new Xs(this.onDelayFire),this.onTimeout=at}return Bt(yt,[{key:"isWorking",get:function(){return this._isWorking},set:function(at){this._isWorking!==at&&(this._isWorking=at,at?this.activeFirstNode():this.delayer.cancel())}},{key:"fireSend",value:function(at){var ut=at.frameId,ot=Date.now();this.queue.push({frameId:ut,sendAt:ot}),this._isWorking&&this.queue.length===1&&this.delayer.refreshAndInvokeAfterInterval(this.timeout)}},{key:"fireACK",value:function(at){var ut=at.originalFrameId,ot=this.queue.findIndex(function(gt){return gt.frameId===ut});ot!==-1&&(this.queue.splice(ot,1),this._isWorking&&this.activeFirstNode())}},{key:"activeFirstNode",value:function(){if(this.queue.length===0)this.delayer.cancel();else{var at=this.queue[0].sendAt,ut=at+this.timeout-Date.now();ut>0?this.delayer.refreshAndInvokeAfterInterval(ut):(this.delayer.cancel(),this.onDelayFire())}}}]),yt})(),rD=(function(){function yt(ct){var at=this;Ot(this,yt),this.idle=co({timeout:250,checkingTimeMod:7,maxPaddingDuration:800,maxInvokingDuration:5}),this.actionFramePickersList=[],this._phase=ql.Ready,this._modifiable=!0,this._timeDelay=0,this._syncMode=!1,this.switchWritable=!1,this.switchWritableTaskId=0,this.isReconnecting=!1,this.beginReconnectAt=0,this.onConnection=function(ut){at.logger.info("connected (".concat(ut,"ms), initializing...")),at.callbacks.onConnection&&at.callbacks.onConnection(ut)},this.onReceivedActionFrame=function(ut){var ot=new av(ut);try{if(at.magixSession){if(at.actionFramePickersList.length>0){var gt=Jt(at.cleanActionFramesBufferList()),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;at.magixSession.receivedActionFramePicker(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}}at.magixSession.receivedActionFramePicker(ot)}else at.actionFramePickersList.push(ot)}catch(kt){at.logger.error("found error when receive action frame: "+kt.message),at.socketSession.reconnectWithError(kt)}finally{at.ackTimeout.fireACK(ot)}},this.onReceivedScopeSlices=function(ut){try{at.magixSession&&at.magixSession.receivedScopeSlices(ut)}catch(ot){at.logger.error("found error when receive scope slices: "+ot.message),at.socketSession.reconnectWithError(ot)}},this.onBeginReconnect=function(ut){var ot=at._phase===ql.Connecting;at.beginReconnectAt=Date.now(),at.refreshACKTimeoutIsWorking(),ot||(at.callbacks.onReconnectWithError?at.callbacks.onReconnectWithError(ut):at.logger.error(ut)),at.switchWritableTaskId+=1,at.magixSession.destroy(),at.pingPongNode.unbindSocket(),ot||at.changePhase(ql.Reconnecting),at.isReconnecting=!0,at.authorState.setConnectedMagixSession(null)},this.onReconnected=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt){var xt,Mt,kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:if(xt=gt.connection,Mt=gt.snapshot,kt=gt.actionFrames,zt=gt.retryCount,at.buildMagixSession({connection:xt,snapshot:Mt,actionFrames:kt,pendingReportChanged:!0}),Ht=at._phase===ql.Connecting,rr=at.switchWritableTaskId,_r.t0=at.switchWritable,!_r.t0){_r.next=7;break}return _r.next=7,at.authorState.setWritable(!0,at.settingWritablePayload);case 7:rr===at.switchWritableTaskId&&(at.magixSession.pendingReportChanged=!1,Ht||(at.changePhase(ql.Connected),at.onModified()),at.isReconnecting=!1,at.reconnectionResultReceiver&&(at.reconnectionResultReceiver(null),at.reconnectionResultReceiver=null),at.callbacks.onReconnected&&!Ht&&at.callbacks.onReconnected({retryCount:zt,buildWebSocketDuration:xt.connectingDuration,buildMagixDuration:Date.now()-at.beginReconnectAt})),at.beginReconnectAt=0,at.refreshACKTimeoutIsWorking();case 10:case"end":return _r.stop()}},ot)}));return function(ot){return ut.apply(this,arguments)}})(),this.onGeneratedActionFrame=function(ut){var ot;at.idle.invokeOnIdle(ht(regeneratorRuntime.mark(function gt(){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:ot=ut.get();case 1:case"end":return Mt.stop()}},gt)}))).catch(function(gt){var xt,Mt;return(Mt=(xt=at.callbacks).onReceivedWarning)==null?void 0:Mt.call(xt,gt.message)}),at.idle.invokeOnIdle(ht(regeneratorRuntime.mark(function gt(){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:ot&&(at.socketSession.connection.sendActionFrame(ot),at.ackTimeout.fireSend(new av(ot)));case 1:case"end":return Mt.stop()}},gt)}))).catch(function(gt){var xt,Mt;return(Mt=(xt=at.callbacks).onReceivedWarning)==null?void 0:Mt.call(xt,gt.message)})},this.onCleanSendingQueue=ht(regeneratorRuntime.mark(function ut(){var ot;return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,(ot=at.magixSession)==null?void 0:ot.cleanSendingQueue();case 2:case"end":return xt.stop()}},ut)})),this.onSelfUserIdUpdate=function(ut){at.callbacks.onSelfUserIdUpdate&&at._phase!==ql.Ready&&at._phase!==ql.Connecting&&at.callbacks.onSelfUserIdUpdate(ut)},this.onModified=function(){at.callbacks.onModified&&at._phase!==ql.Ready&&at._phase!==ql.Connecting&&(at.animationFrameTicker?at.animationFrameTicker.invoke():at.callbacks.onModified())},this.onACKTimeout=function(){console.warn("receive ACK frame timeout. it will send a ping"),at.pingPongNode.ping(yt.pingAfterAckTimeout).catch(function(){at.onClientCrashWithError(new Error("connection failed because pong timeout after receive ACK frame timeout"))})},this.onClientCrashWithError=function(ut){at._phase===ql.Connected&&at.socketSession.reconnectWithError(ut)},this.onFrameReceivedInterval=function(ut){at.callbacks.onFrameReceivedInterval&&(at.callbacks.onFrameReceivedInterval(ut),at.receivedIntervalResetter.refreshAndInvokeAfterInterval(yt.receivedIntervalResetterCleanInterval))},this.onDisconnectWithError=function(ut){if(at.magixSession.destroy(),at.pingPongNode.unbindSocket(),at.phase!==ql.Disconnected){var ot=at._phase;at.socketSession.dispose(),at.isReconnecting=!1,at.changePhase(ql.Disconnected),at.reconnectionResultReceiver&&(at.reconnectionResultReceiver(ut),at.reconnectionResultReceiver=null),ot===ql.Connecting?at.errorWhenConnecting=ut:at.callbacks.onDisconnectWithError&&at.callbacks.onDisconnectWithError(ut)}},this.onKickedWithReason=function(ut){if(at.magixSession.destroy(),at.pingPongNode.unbindSocket(),at.phase!==ql.Disconnected){var ot=at._phase,gt=new Error("kicked by server when connecting: ".concat(ut));at.socketSession.dispose(),at.isReconnecting=!1,at.changePhase(ql.Disconnected),at.reconnectionResultReceiver&&(at.reconnectionResultReceiver(gt),at.reconnectionResultReceiver=null),ot===ql.Connecting&&(at.errorWhenConnecting=gt),at.callbacks.onKickedWithReason&&at.callbacks.onKickedWithReason(ut)}},this.logger=ct.logger,this.imageFactory=ct.imageFactory,this.libraryNodeFetcher=ct.libraryNodeFetcher,this.fetcherFactory=ct.fetcherFactory,this.enableAnimationFrame=ct.enableAnimationFrame,this.reconnectionOptions=ct.reconnectionOptions,this.toolsExtra=ct.toolsExtra,this.netState=ct.netState,this.clientVersion=ct.clientVersion,this.callbacks=c_(ct.callbacks),this.callbacks.onModified&&ct.enableAnimationFrame&&(this.animationFrameTicker=new nn(this.callbacks.onModified)),this.pingPongNode=new Fr(this.logger.warn),this.authorState=new Mp(ct.userPayload,this.onCleanSendingQueue,this.onSelfUserIdUpdate,this.onModified),this.ackTimeout=new tD(yt.ackTimeout,this.onACKTimeout),this.receivedIntervalResetter=new Xs(function(){at.callbacks.onFrameReceivedInterval&&at.callbacks.onFrameReceivedInterval(0)})}return Bt(yt,[{key:"modifiable",get:function(){return this._modifiable}},{key:"phase",get:function(){return this._phase}},{key:"calibrationTimestamp",get:function(){return this.pingPongNode.calibrationTimestamp}},{key:"timeDelay",get:function(){return this._timeDelay},set:function(at){this._timeDelay=at,this.magixSession&&this.magixSession.updateTimeDelay(at)}},{key:"syncMode",get:function(){return this._syncMode},set:function(at){this._syncMode=at,this.magixSession&&(this.magixSession.syncMode=at)}},{key:"session",get:function(){return this.socketSession&&this.socketSession.session}},{key:"slice",get:function(){return this.socketSession&&this.socketSession.slice}},{key:"changePhase",value:function(at){if(this._phase!==at){switch(this._phase=at,at){case ql.Disconnecting:case ql.Disconnected:{this.refreshACKTimeoutIsWorking(),this.receivedIntervalResetter.cancel();break}}this.callbacks.onPhaseChanged&&this.callbacks.onPhaseChanged(at)}}},{key:"selfUserId",get:function(){return this.authorState.selfUserId}},{key:"isWritable",get:function(){return this.authorState.selfUserId!==void 0}},{key:"imagePhase",get:function(){if(!this.magixSession)throw new Error("image phase not exist when Magix's phase is ".concat(this.phase));return this.magixSession.imagePhase}},{key:"trigger",get:function(){if(!this.magixSession)throw new Error("trigger object not exist when Magix's phase is ".concat(this.phase));return this.magixSession.trigger}},{key:"syncBlockTimestamp",value:function(at){var ut;(ut=this.magixSession)==null||ut.syncBlockTimestamp(at)}},{key:"stopBlockTimestamp",value:function(){var at;(at=this.magixSession)==null||at.stopBlockTimestamp()}},{key:"setWritable",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(!(this._phase===ql.Connected||this._phase===ql.Reconnecting)){Mt.next=10;break}return this.switchWritable=ot,this.settingWritablePayload=ot?gt:void 0,this.refreshACKTimeoutIsWorking(),Mt.prev=2,Mt.next=5,this.authorState.setWritable(ot,gt);case 5:return Mt.prev=5,this.refreshACKTimeoutIsWorking(),Mt.finish(5);case 8:Mt.next=11;break;case 10:throw new Error("can't only set writable when connected or reconnecting");case 11:case"end":return Mt.stop()}},ut,this,[[2,,5,8]])}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"connect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt=this,xt,Mt,kt,zt,Ht,rr,ur,_r;return regeneratorRuntime.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(xt=Date.now(),this.phase===ql.Ready){Br.next=3;break}throw new Error("can't connect when Magix's phase is ".concat(this.phase));case 3:return this.changePhase(ql.Connecting),Br.prev=4,Br.t0=Ol,Br.t1=this.logger,Br.t2=this.fetcherFactory.create(ot.region),Br.t3=ot.uuid,Br.t4=ot.roomToken,Br.t5=45e3,Br.t6=5e3,Br.t7=ot.isWritable,Br.t8=this.clientVersion,Br.t9=x1(ot.roomToken),Br.t10=this.netState,Br.t11=this.reconnectionOptions,Br.t12=this.imageFactory.proxyManager.objectOperator,Br.t13=this.libraryNodeFetcher,Br.next=21,this.fetcherFactory.sdkHosts;case 21:return Br.t14=Br.sent,Br.t15={onConnection:this.onConnection,onReceivedActionFrame:this.onReceivedActionFrame,onReceivedScopeSlices:this.onReceivedScopeSlices,onBeginReconnect:this.onBeginReconnect,onReconnected:this.onReconnected,onSliceUpdate:this.callbacks.onSliceChanged,onSessionUpdate:this.callbacks.onSessionChanged,onDisconnectedByServer:this.onDisconnectWithError,onDisconnectedWithSocketError:this.onDisconnectWithError,onKickWithReason:this.onKickedWithReason},Br.t16={logger:Br.t1,fetcher:Br.t2,uuid:Br.t3,roomToken:Br.t4,timeout:Br.t5,connectionTimeout:Br.t6,markWritable:Br.t7,clientVersion:Br.t8,access:Br.t9,netState:Br.t10,reconnectionOptions:Br.t11,objectOperator:Br.t12,libraryNodeFetcher:Br.t13,sdkHosts:Br.t14,callbacks:Br.t15},Br.next=26,(0,Br.t0)(Br.t16);case 26:if(Mt=Br.sent,kt=Mt.session,zt=Mt.connection,Ht=Mt.snapshot,rr=Mt.actionFrames,ur=Mt.retryCount,this.socketSession=kt,this.settingWritablePayload=ot.connectedPayload,this.buildMagixSession({connection:zt,snapshot:Ht,actionFrames:rr,pendingReportChanged:!1}),Br.t17=ot.isWritable,!Br.t17){Br.next=41;break}return Br.next=39,this.authorState.setWritable(!0,ot.connectedPayload);case 39:this.logger.info("set writable"),this.switchWritable=!0;case 41:if(!this.isReconnecting){Br.next=49;break}return Br.next=44,new Promise(function(Ur){gt.reconnectionResultReceiver=Ur});case 44:if(_r=Br.sent,!_r){Br.next=47;break}throw this.logger.error(_r),_r;case 47:Br.next=51;break;case 49:if(this._phase===ql.Connecting){Br.next=51;break}throw this.errorWhenConnecting?(this.logger.error(this.errorWhenConnecting),this.errorWhenConnecting):(this.logger.error("magix connect fail with invalid phase ".concat(this._phase)),new Error("magix connect fail with invalid phase ".concat(this._phase)));case 51:return Br.abrupt("return",(this.changePhase(ql.Connected),{libraryNode:kt.libraryNode,statistics:{retryCount:ur,buildWebSocketDuration:kt.connection.connectingDuration,buildMagixDuration:Date.now()-xt}}));case 54:throw Br.prev=54,Br.t18=Br.catch(4),this.cleanActionFramesBufferList(),this.changePhase(ql.Disconnected),this.pingPongNode.unbindSocket(),Br.t18;case 57:case"end":return Br.stop()}},ut,this,[[4,54]])}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"reconnectWithError",value:function(at){if(this._phase!==ql.Reconnecting){if(this._phase!==ql.Connected)throw new Error("can't reconnect when magix's phase is ".concat(this._phase));this.socketSession.reconnectWithError(at)}}},{key:"buildMagixSession",value:function(at){var ut=this,ot=at.connection,gt=at.snapshot,xt=at.actionFrames,Mt=at.pendingReportChanged;this.magixSession&&this.magixSession.destroy(),gt.byteLength>=yt.hugeSnapshotBytes&&(this.ackTimeout.timeout=yt.hugeSnapshotAckTimeout);var kt=this.magixSession=new ml({logger:this.logger,library:iy(this.socketSession.libraryNode.libraryClass),connection:ot,pendingReportChanged:Mt,snapshot:gt,initializeActionFrames:xt,imageFactory:this.imageFactory,enableAnimationFrame:this.enableAnimationFrame,originalMagixSession:this.magixSession,timeDelay:this._timeDelay,syncMode:this._syncMode,toolsExtra:this.toolsExtra,callbacks:{onImagePhaseChanged:function(Ht){return ut.onImagePhaseChanged(kt,Ht)},onGeneratedActionFrame:this.onGeneratedActionFrame,onModified:this.onModified,onEventFire:this.wrapeEventFireCallback(this.callbacks.onEventFire),onEventFireACK:this.wrapeEventFireCallback(this.callbacks.onEventFireACK),onClientCrashWithError:this.onClientCrashWithError,onFrameReceivedInterval:this.onFrameReceivedInterval,onReceivedRttReport:this.callbacks.onReceivedRttReport,onIllusionQueueLengthChanged:this.callbacks.onIllusionQueueLengthChanged,onCatchErrorWhenAppendFrame:this.callbacks.onCatchErrorWhenAppendFrame||function(zt,Ht){return ut.logger.error(Ht)}}});ot.bindPingPongNode(this.pingPongNode),this.magixSession.setModifiable(this._modifiable),this.authorState.setConnectedMagixSession(this.magixSession)}},{key:"disconnect",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){return regeneratorRuntime.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(this.isReconnecting=!1,this.phase!==ql.Reconnecting){gt.next=4;break}this.socketSession.dispose(),this.pingPongNode.unbindSocket(),this.changePhase(ql.Disconnected),gt.next=27;break;case 4:if(this.phase!==ql.Connected){gt.next=26;break}if(this.pingPongNode.unbindSocket(),this.changePhase(ql.Disconnecting),gt.prev=6,gt.t0=this.magixSession,!gt.t0){gt.next=18;break}return gt.next=11,this.authorState.finalUserId;case 11:if(gt.t1=gt.sent,gt.t2=void 0,gt.t3=gt.t1!==gt.t2,!gt.t3){gt.next=17;break}return gt.next=17,this.magixSession.removeAllocatedUser();case 17:this.magixSession.destroy();case 18:return gt.next=20,this.socketSession.connection.disconnect();case 20:this.socketSession.dispose();case 21:return gt.prev=21,this.changePhase(ql.Disconnected),gt.finish(21);case 24:gt.next=27;break;case 26:throw new Error("can't disconnect when Magix's phase is ".concat(this.phase));case 27:case"end":return gt.stop()}},ut,this,[[6,,21,24]])}));function at(){return ct.apply(this,arguments)}return at})()},{key:"dispatch",value:function(at,ut){if(this.phase!==ql.Connected)throw new Error("can't dispatch event when Magix's phase is ".concat(this.phase));this.magixSession.dispatch(at,ut)}},{key:"refreshACKTimeoutIsWorking",value:function(){this.beginReconnectAt===0&&this.switchWritable&&this.isWritable&&this._phase===ql.Connected?this.ackTimeout.isWorking=!0:this.ackTimeout.isWorking=!1}},{key:"onImagePhaseChanged",value:function(at,ut){this.callbacks.onImagePhaseChanged&&this.magixSession===at&&this.callbacks.onImagePhaseChanged(ut)}},{key:"wrapeEventFireCallback",value:function(at){if(at)return function(ut){return at(U0(ut,fy.Dispatched))}}},{key:"cleanActionFramesBufferList",value:function(){return this.actionFramePickersList.splice(0,this.actionFramePickersList.length)}}]),yt})(),US=rD;US.receivedIntervalResetterCleanInterval=700,US.ackTimeout=7*1e3,US.pingAfterAckTimeout=7*1e3,US.hugeSnapshotAckTimeout=26*1e3,US.hugeSnapshotBytes=1024*1024;var nD=(function(){function yt(ct,at,ut,ot,gt,xt){Ot(this,yt),this.fetcherFactory=ct,this.imageFactory=at,this.reconnectionOptions=ut,this.netState=ot,this.clientVersion=gt,this.magixConfiguration=Object.freeze(cv({},xt))}return Bt(yt,[{key:"createMagix",value:function(at,ut){return new US({logger:ut.logger,fetcherFactory:this.fetcherFactory,libraryNodeFetcher:ut.libraryNodeFetcher,imageFactory:this.imageFactory,toolsExtra:at,enableAnimationFrame:this.magixConfiguration.enableAnimationFrame,reconnectionOptions:this.reconnectionOptions,netState:this.netState,userPayload:ut.userPayload,clientVersion:this.clientVersion,callbacks:ut.callbacks||{}})}}]),yt})(),ql;(function(yt){yt.Ready="ready",yt.Connecting="connecting",yt.Connected="connected",yt.Reconnecting="reconnecting",yt.Disconnecting="disconnecting",yt.Disconnected="disconnected"})(ql||(ql={}));function LA(yt){return _T.apply(this,arguments)}function _T(){return _T=ht(regeneratorRuntime.mark(function yt(ct){var at,ut,ot;return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:at=3,ot=0;case 2:if(!(ot<at)){xt.next=15;break}return xt.prev=3,xt.next=6,ct();case 6:return xt.abrupt("return",xt.sent);case 9:xt.prev=9,xt.t0=xt.catch(3),ut=xt.t0;case 12:++ot,xt.next=2;break;case 15:throw ut;case 16:case"end":return xt.stop()}},yt,null,[[3,9]])})),_T.apply(this,arguments)}var iD=(function(){function yt(ct){var at=this;Ot(this,yt),this.isDownloading=!1,this.didDestroy=!1,this.onPlayActionFrames=function(ut){var ot=[],gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.sequenceInitializer,zt=Mt.framePicker;kt&&(ot.length>0&&(at.image.appendActionFrames(ot),ot=[]),at.image=at.createImage(kt,at.image),at._libIdentifier=kt.libIdentifier,at._libraryNode=kt.libraryNode,at.playingSliceIndex+=1,at.callbacks.onSliceChanged&&at.callbacks.onSliceChanged()),zt&&ot.push(zt.frameBuffer)}}catch(Ht){gt.e(Ht)}finally{gt.f()}ot.length>0&&at.image.appendActionFrames(ot)},this.onBufferRemainLow=function(){at.isDownloading||at.loadActionFrames()},this.onPlayerBufferPhaseChanged=function(ut){at.callbacks.onPhaseChanged&&at.callbacks.onPhaseChanged(ut)},this.logger=ct.logger,this.imageFactory=ct.imageFactory,this.sliceChunk=ct.sliceChunk,this.sequenceFetcher=ct.sequenceFetcher,this.toolsExtra=ct.toolsExtra,this.fetchingSliceIndex=ct.beginSliceIndex,this.playingSliceIndex=ct.beginSliceIndex,this.callbacks=ct.callbacks,this.isFirstSlice=!0,this.image=this.createImage(ct.sequenceInitializer,ct.originalReconstructorLine&&ct.originalReconstructorLine.image),this.latestFetchingFrameId=this.image.frameId,this.latestPlayingFrameId=this.image.frameId,this.beginTimestamp=ct.initFrameTimestamp===void 0?this.image.timestamp:ct.initFrameTimestamp,this._libIdentifier=ct.sequenceInitializer.libIdentifier,this._libraryNode=ct.sequenceInitializer.libraryNode,this.playerBuffer=wu.create({logger:ct.logger,mode:xo.Reconstruction,enableAnimationFrame:ct.enableAnimationFrame,initFrameTimestamp:this.beginTimestamp,endFrameTimestamp:this.sliceChunk.beginTimestamp+this.sliceChunk.duration,callbacks:{onBufferRemainLow:this.onBufferRemainLow,onPlayActionFrames:this.onPlayActionFrames,onPhaseChanged:this.onPlayerBufferPhaseChanged,onTick:ct.callbacks.onTick}}),this.playerBuffer.playbackSpeed=ct.playbackSpeed}return Bt(yt,[{key:"trigger",get:function(){return this.image.trigger}},{key:"libIdentifier",get:function(){return this._libIdentifier}},{key:"libraryNode",get:function(){return this._libraryNode}},{key:"playbackSpeed",get:function(){return this.playerBuffer.playbackSpeed},set:function(at){this.playerBuffer.playbackSpeed=at}},{key:"createImage",value:function(at,ut){var ot=at.snapshot,gt=at.actionFrames,xt=at.akkoSerVersion,Mt=at.libraryNode,kt=this.imageFactory.createWithSnapshot({logger:this.logger,observerId:Pr,library:iy(Mt.libraryClass),snapshotFrame:ot,actionFrames:gt,originalImage:ut,toolsExtra:this.toolsExtra,roomUUID:this.sliceChunk.roomUUID,includesFrameHash:!1,ignoreHashChecking:!0,pendingReportChanged:!1,snapshotDeserializerVersion:xt,actionDeserializerVersion:xt,callbacks:{onModified:this.callbacks.onModified,onEventFire:this.callbacks.onEventFire,onCatchErrorWhenAppendFrame:this.callbacks.onCatchErrorWhenAppendFrame}});return kt.modifiable=!1,kt}},{key:"slice",get:function(){return this.sliceChunk.sliceAt(this.playingSliceIndex)}},{key:"sliceIndex",get:function(){return this.playingSliceIndex}},{key:"play",value:function(){this.playerBuffer.play()}},{key:"pause",value:function(){this.playerBuffer.pause()}},{key:"setup",value:function(){var at=this.sliceChunk.beginTimestamp+this.sliceChunk.duration;this.beginTimestamp<at?this.loadActionFrames():this.playerBuffer.completePushFrames()}},{key:"destroy",value:function(){this.didDestroy||(this.playerBuffer.pause(),this.image.destroy(),this.didDestroy=!0)}},{key:"phase",get:function(){return this.playerBuffer.phase}},{key:"isRemainFramesToFetch",value:function(){return this.fetchingSliceIndex<this.sliceChunk.slicesCount}},{key:"loadActionFrames",value:function(){var at=this;this.fillActionFramesIntoBuffer().catch(function(ut){return at.logger.error(ut)})}},{key:"fillActionFramesIntoBuffer",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!this.isRemainFramesToFetch()){zt.next=18;break}return zt.prev=1,this.isDownloading=!0,zt.next=5,this.fetchFrames();case 5:ot=zt.sent,gt=this.sliceChunk.beginTimestamp+this.sliceChunk.duration,xt=this.removeTimestampOverFrames(ot,gt),Mt=ot[ot.length-1],Mt&&(this.latestPlayingFrameId=Mt.frameId),this.shouldPushEndSpaceHolderFrame(ot,xt,gt)&&ot.push({frameId:this.latestPlayingFrameId+1,timestamp:gt}),ot.length>0&&this.playerBuffer.pushFrames(ot),this.isRemainFramesToFetch()||this.playerBuffer.completePushFrames(),zt.next=15;break;case 12:zt.prev=12,zt.t0=zt.catch(1),this.callbacks.onCatchErrorWhenFetchBuffer&&this.callbacks.onCatchErrorWhenFetchBuffer(zt.t0);case 15:return zt.prev=15,this.isDownloading=!1,zt.finish(15);case 18:case"end":return zt.stop()}},ut,this,[[1,12,15,18]])}));function at(){return ct.apply(this,arguments)}return at})()},{key:"shouldPushEndSpaceHolderFrame",value:function(at,ut,ot){var gt=at[at.length-1];return(ut||!this.isRemainFramesToFetch())&&(!gt||gt.timestamp<ot)}},{key:"fetchFrames",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot=this,gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur;return regeneratorRuntime.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(gt=this.sliceChunk.sliceAt(this.fetchingSliceIndex),!!gt){Tn.next=2;break}return Tn.abrupt("return",[]);case 2:if(xt=gt.framesCount-this.latestFetchingFrameId,!(xt>0)){Tn.next=4;break}return Tn.abrupt("break",7);case 4:this.latestFetchingFrameId=0,this.latestPlayingFrameId=0,this.fetchingSliceIndex+=1,this.isFirstSlice=!1;case 5:Tn.next=0;break;case 7:return Mt=Math.min(xt,yt.fetchFramesCountOnce),kt=this.latestFetchingFrameId===0&&!this.isFirstSlice,Tn.next=11,Promise.all([LA(function(){return ot.sequenceFetcher.fetchFramePickers(gt,ot.latestFetchingFrameId,Mt)}),kt?LA(function(){return ot.sequenceFetcher.initializeWithFrameId(gt,ot.latestFetchingFrameId)}):Promise.resolve(void 0)]);case 11:zt=Tn.sent,Ht=mt(zt,2),rr=Ht[0],ur=Ht[1],_r=[],Dr=Jt(rr);try{for(Dr.s();!(Br=Dr.n()).done;)Ur=Br.value,this.latestFetchingFrameId=Ur.frameId,_r.push({frameId:Ur.frameId,timestamp:Ur.timestamp,framePicker:Ur})}catch(jn){Dr.e(jn)}finally{Dr.f()}return Tn.abrupt("return",(ur&&(_r[0].sequenceInitializer=ur),_r));case 19:case"end":return Tn.stop()}},ut,this)}));function at(){return ct.apply(this,arguments)}return at})()},{key:"removeTimestampOverFrames",value:function(at,ut){var ot=at.findIndex(function(gt){return gt.timestamp>ut});return ot!==-1?(at.splice(ot,at.length-ot),!0):!1}}]),yt})(),wx=iD;wx.fetchFramesCountOnce=600;var FA=(function(){function yt(ct){Ot(this,yt),this.sliceChunk=ct.sliceChunk,this.imageFactory=ct.imageFactory,this.sequenceFetcher=ct.sequenceFetcher,this.toolsExtra=ct.toolsExtra,this.enableAnimationFrame=ct.enableAnimationFrame}return Bt(yt,[{key:"createWithFrameId",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt,kt){var zt,Ht,rr,ur,_r;return regeneratorRuntime.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return zt=this.sliceChunk.getFrameDescriptionWithFrameId(gt),Ht=zt.sliceIndex,rr=zt.frameId,ur=this.sliceChunk.sliceAt(Ht),Br.next=6,this.sequenceFetcher.initializeWithFrameId(ur,rr);case 6:return _r=Br.sent,Br.abrupt("return",new wx({logger:ot,imageFactory:this.imageFactory,sequenceFetcher:this.sequenceFetcher,originalReconstructorLine:kt,sliceChunk:this.sliceChunk,toolsExtra:this.toolsExtra,beginSliceIndex:Ht,initFrameTimestamp:this.sliceChunk.beginTimestamp,sequenceInitializer:_r,enableAnimationFrame:this.enableAnimationFrame,playbackSpeed:xt,callbacks:Mt}));case 8:case"end":return Br.stop()}},ut,this)}));function at(ut,ot,gt,xt,Mt){return ct.apply(this,arguments)}return at})()},{key:"createCacheWithProgressTime",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return xt=this.sliceChunk.getFrameDescriptionWithTimestamp(gt),Mt=xt.sliceIndex,kt=xt.timestamp,zt=this.sliceChunk.sliceAt(Mt),Ht=kt+zt.beginTimestamp,_r.next=7,this.sequenceFetcher.initializeWithTimestamp(zt,Ht);case 7:return rr=_r.sent,_r.abrupt("return",{sliceIndex:Mt,timestamp:kt,sequenceInitializer:rr});case 9:case"end":return _r.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"createWithCache",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt,kt,zt){return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.abrupt("return",new wx({logger:ot,imageFactory:this.imageFactory,sequenceFetcher:this.sequenceFetcher,originalReconstructorLine:zt,sliceChunk:this.sliceChunk,toolsExtra:this.toolsExtra,beginSliceIndex:kt.sliceIndex,initFrameTimestamp:this.sliceChunk.beginTimestamp+gt,sequenceInitializer:kt.sequenceInitializer,enableAnimationFrame:this.enableAnimationFrame,playbackSpeed:xt,callbacks:Mt}));case 1:case"end":return rr.stop()}},ut,this)}));function at(ut,ot,gt,xt,Mt,kt){return ct.apply(this,arguments)}return at})()},{key:"createWithProgressTime",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt,kt){var zt,Ht,rr,ur,_r,Dr;return regeneratorRuntime.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:return zt=this.sliceChunk.getFrameDescriptionWithTimestamp(gt),Ht=zt.sliceIndex,rr=zt.timestamp,ur=this.sliceChunk.sliceAt(Ht),_r=rr+ur.beginTimestamp,Ur.next=7,this.sequenceFetcher.initializeWithTimestamp(ur,_r);case 7:return Dr=Ur.sent,Ur.abrupt("return",new wx({logger:ot,imageFactory:this.imageFactory,sequenceFetcher:this.sequenceFetcher,originalReconstructorLine:kt,sliceChunk:this.sliceChunk,toolsExtra:this.toolsExtra,beginSliceIndex:Ht,initFrameTimestamp:this.sliceChunk.beginTimestamp+gt,sequenceInitializer:Dr,enableAnimationFrame:this.enableAnimationFrame,playbackSpeed:xt,callbacks:Mt}));case 9:case"end":return Ur.stop()}},ut,this)}));function at(ut,ot,gt,xt,Mt){return ct.apply(this,arguments)}return at})()}]),yt})(),AE;(function(yt){yt[yt.FrameId=0]="FrameId",yt[yt.ProgressTime=1]="ProgressTime"})(AE||(AE={}));var aD=(function(){function yt(ct){Ot(this,yt),this.isRunningLoop=!1,this.task=null,this.id=0,this.callbacks=Object.freeze(cv({},ct))}return Bt(yt,[{key:"currentTaskId",get:function(){return this.id}},{key:"isSeeking",get:function(){return this.isRunningLoop}},{key:"stopSeeking",value:function(){this.task&&(this.task.complete(__.Stopped),this.task=null),this.id+=1}},{key:"seekToFrameId",value:function(at){var ut=this;return new Promise(function(ot){!ut.task||ut.task.mode!==0||ut.task.value!==at?(ut.setNewTask(0,at,ot),ut.startTaskLoop().catch(function(gt){return console.error(gt)})):ot(__.SuccessButUnnecessary)})}},{key:"seekToProgressTime",value:function(at){var ut=this;return new Promise(function(ot){!ut.task||ut.task.mode!==1||ut.task.value!==at?(ut.setNewTask(1,at,ot),ut.startTaskLoop().catch(function(gt){return console.error(gt)})):ot(__.SuccessButUnnecessary)})}},{key:"setNewTask",value:function(at,ut,ot){var gt=this.id+=1;this.task&&this.task.complete(__.Override),this.task={id:gt,mode:at,value:ut,complete:ot}}},{key:"startTaskLoop",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(this.isRunningLoop){rr.next=23;break}rr.prev=1,this.isRunningLoop=!0,this.callbacks.updateIsSeeking();case 3:if(!this.task){rr.next=20;break}gt=this.task,xt=gt.id,Mt=gt.mode,kt=gt.value,zt=void 0,rr.t0=Mt,rr.next=rr.t0===0?8:rr.t0===1?12:16;break;case 8:return rr.next=10,this.callbacks.startSeekingToFrameId(xt,kt);case 10:return zt=rr.sent,rr.abrupt("break",17);case 12:return rr.next=14,this.callbacks.startSeekingToProgressTime(xt,kt);case 14:return zt=rr.sent,rr.abrupt("break",17);case 16:throw new Error("invalid mode ".concat(Mt));case 17:this.id===xt?((ot=this.task)==null||ot.complete(__.Success),this.task=null,this.callbacks.afterSeeking(zt)):this.callbacks.cancelSeeking(zt);case 18:rr.next=3;break;case 20:return rr.prev=20,this.isRunningLoop=!1,this.callbacks.updateIsSeeking(),rr.finish(20);case 23:case"end":return rr.stop()}},ut,this,[[1,,20,23]])}));function at(){return ct.apply(this,arguments)}return at})()}]),yt})(),sD=(function(){function yt(ct){var at=this;Ot(this,yt),this._progressTime=0,this._playbackSpeed=1,this.isPlaying=!1,this.isMaskPhaseUpdating=!1,this.didStop=!1,this.currentLine=void 0,this.reconstructorLineCache=new Map,this.startSeekingToFrameId=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt,xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Mt=xt,Mt=Math.max(Mt,0),Mt=Math.min(Mt,at.framesCount),kt=function(ur){return at.lineFactory.createWithFrameId(at.logger,Mt,at.playbackSpeed,ur,at.currentLine)},Ht.next=5,at.startSeekingTask(gt,kt);case 5:return Ht.abrupt("return",Ht.sent);case 6:case"end":return Ht.stop()}},ot)}));return function(ot,gt){return ut.apply(this,arguments)}})(),this.startSeekingToProgressTime=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt,xt){var Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return Mt=xt,Mt=Math.max(Mt,0),Mt=Math.min(Mt,at.duration),Number.isSafeInteger(Mt)||(Mt=Math.floor(Mt)),kt=at.reconstructorLineCache.get(xt),kt?zt=function(_r){return at.lineFactory.createWithCache(at.logger,Mt,at.playbackSpeed,_r,kt,at.currentLine)}:zt=function(_r){return at.lineFactory.createWithProgressTime(at.logger,Mt,at.playbackSpeed,_r,at.currentLine)},rr.next=6,at.startSeekingTask(gt,zt);case 6:return rr.abrupt("return",rr.sent);case 7:case"end":return rr.stop()}},ot)}));return function(ot,gt){return ut.apply(this,arguments)}})(),this.afterSeeking=function(ut){try{at.isMaskPhaseUpdating=!0,ut.setup()}finally{at.isMaskPhaseUpdating=!1}at.changeCurrentLine(ut)},this.cancelSeeking=function(ut){ut.destroy()},this.onLineSliceChanged=function(){var ut,ot;at.currentLine&&(at.sliceStateUpdater.refreshReconstructorLine(at.currentLine),at.callbacks.onModified&&at.callbacks.onModified(),at.onTick(at.currentLine.beginTimestamp),(ot=(ut=at.callbacks).onTriggerBuilt)==null||ot.call(ut))},this.currentIsPlayable=function(){if(at.didStop||!at.currentLine||at.seekingNode.isSeeking)return!1;switch(at.currentLine.phase){case zn.Playing:case zn.Pausing:return!0;case zn.PausingAndWaiting:case zn.Waiting:case zn.Ended:return!1;default:return!1}},this.currentPhase=function(){if(at.didStop)return dv.Stopped;if(!at.currentLine)return dv.WaitingFirstFrame;if(at.seekingNode.isSeeking)return dv.Seeking;switch(at.currentLine.phase){case zn.Playing:return dv.Playing;case zn.Pausing:case zn.PausingAndWaiting:return dv.Pause;case zn.Waiting:return dv.Buffering;case zn.Ended:return dv.Ended;default:throw new Error("invalid phase ".concat(at.currentLine.phase))}},this.touchPhaseChanged=function(){at.isMaskPhaseUpdating||(at.phaseNode.touch(),at.isPlayableNode.touch())},this.onTick=function(ut){var ot=Math.min(ut-at.beginTimestamp,at.sliceChunk.duration);at._progressTime=ot,at.callbacks.onProgressTimeChanged&&at.callbacks.onProgressTimeChanged(ot)},this.onCatchError=function(ut){at.didStop||(at.stop(),at.callbacks.onStoppedWithError&&at.callbacks.onStoppedWithError(ut))},this.onEventFire=function(ut){at.callbacks.onEventFire&&at.callbacks.onEventFire(U0(ut,fy.Dispatched))},this.logger=ct.logger,this.sliceChunk=ct.sliceChunk,this.sequenceFetcher=ct.sequenceFetcher,this.callbacks=c_(ct.callbacks),this.sliceStateUpdater=ct.sliceStateUpdater,this.sliceStateUpdater.onSliceChanged=this.callbacks.onSliceChanged,this.sliceStateUpdater.onLibraryNodeChanged=this.callbacks.onLibraryNodeChanged,this.seekingNode=new aD({startSeekingToFrameId:this.startSeekingToFrameId,startSeekingToProgressTime:this.startSeekingToProgressTime,afterSeeking:this.afterSeeking,cancelSeeking:this.cancelSeeking,updateIsSeeking:this.touchPhaseChanged}),this.isPlayableNode=new zr({phase:!1,onPhaseChanged:ct.callbacks.onIsPlayableChanged,getCurrentPhase:this.currentIsPlayable}),this.phaseNode=new zr({phase:dv.WaitingFirstFrame,onPhaseChanged:ct.callbacks.onPhaseChanged,getCurrentPhase:this.currentPhase}),this.lineFactory=new FA({sliceChunk:ct.sliceChunk,imageFactory:ct.imageFactory,sequenceFetcher:ct.sequenceFetcher,toolsExtra:ct.toolsExtra,enableAnimationFrame:ct.enableAnimationFrame})}return Bt(yt,[{key:"trigger",get:function(){if(!this.currentLine)throw new Error("trigger object not exist when Reconstructor's phase is ".concat(this.phase));return this.currentLine.trigger}},{key:"isPlayable",get:function(){return this.isPlayableNode.phase}},{key:"phase",get:function(){return this.phaseNode.phase}},{key:"progressTime",get:function(){return this._progressTime}},{key:"slice",get:function(){return this.sliceStateUpdater.slice}},{key:"sliceIndex",get:function(){return this.sliceStateUpdater.sliceIndex}},{key:"libIdentifier",get:function(){return this.sliceStateUpdater.libIdentifier}},{key:"libraryNode",get:function(){return this.sliceStateUpdater.libraryNode}},{key:"roomUUID",get:function(){return this.sliceChunk.roomUUID}},{key:"duration",get:function(){return this.sliceChunk.duration}},{key:"framesCount",get:function(){return this.sliceChunk.framesCount}},{key:"beginTimestamp",get:function(){return this.sliceChunk.beginTimestamp}},{key:"playbackSpeed",get:function(){return this.currentLine?this.currentLine.playbackSpeed:this._playbackSpeed},set:function(at){this._playbackSpeed=at,this.currentLine&&(this.currentLine.playbackSpeed=at)}},{key:"play",value:function(){var at=this;if(this.assertNotStop(),this.phaseNode.phase!==dv.Ended){var ut=this.isPlaying;this.isPlaying=!0,!ut&&!this.seekingNode.isSeeking&&(this.currentLine?this.currentLine.play():this.seekToProgressTime(0).catch(function(ot){return at.logger.error(ot)})),this.touchPhaseChanged()}}},{key:"pause",value:function(){this.assertNotStop(),this.isPlaying&&!this.seekingNode.isSeeking&&this.currentLine&&this.currentLine.pause(),this.isPlaying=!1,this.touchPhaseChanged()}},{key:"stop",value:function(){this.assertNotStop(),this.seekingNode.stopSeeking(),this.currentLine&&(this.currentLine.destroy(),this.currentLine=void 0),this.didStop=!0,this.touchPhaseChanged()}},{key:"seekToFrameId",value:function(at){return this.assertNotStop(),this.seekingNode.seekToFrameId(at)}},{key:"seekToProgressTime",value:function(at){return this.assertNotStop(),this.seekingNode.seekToProgressTime(at)}},{key:"createdCachedReconstructorLineWithProgressTime",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt;return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,this.lineFactory.createCacheWithProgressTime(this.logger,ot);case 2:gt=Mt.sent,this.reconstructorLineCache.set(ot,gt);case 4:case"end":return Mt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"deleteCachedReconstructorLineWithProgressTime",value:function(at){this.reconstructorLineCache.delete(at)}},{key:"startSeekingTask",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,xt=cv({},this.wrapCallbacksWithTaskChecking(ot,{onCatchErrorWhenAppendFrame:this.callbacks.onCatchErrorWhenAppendFrame,onCatchErrorWhenFetchBuffer:this.onCatchError,onModified:this.callbacks.onModified,onSliceChanged:this.onLineSliceChanged,onEventFire:this.onEventFire,onTick:this.onTick,onPhaseChanged:this.touchPhaseChanged})),kt.next=4,gt(xt);case 4:return kt.abrupt("return",kt.sent);case 7:throw kt.prev=7,kt.t0=kt.catch(0),this.onCatchError(kt.t0),kt.t0;case 10:case"end":return kt.stop()}},ut,this,[[0,7]])}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"changeCurrentLine",value:function(at){var ut,ot;this.currentLine&&this.currentLine.destroy(),this.currentLine=at,this.sliceStateUpdater.refreshReconstructorLine(at),this.isPlaying&&at.play(),this.callbacks.onModified&&this.callbacks.onModified(),this.onTick(at.beginTimestamp),(ot=(ut=this.callbacks).onTriggerBuilt)==null||ot.call(ut)}},{key:"wrapCallbacksWithTaskChecking",value:function(at,ut){var ot=this,gt={},xt=function(zt){var Ht=ut[zt];Ht&&(gt[zt]=function(){if(at===ot.seekingNode.currentTaskId)return Ht.apply(void 0,arguments)})};for(var Mt in ut)xt(Mt);return gt}},{key:"assertNotStop",value:function(){if(this.didStop)throw new Error("Reconstructor did stop")}}]),yt})(),Tx=8;function Dw(yt,ct,at){var ut=Math.min(yt,at),ot=Math.max(yt,at),gt=ct;return ct<ut?gt=ut:ct>ot&&(gt=ot),gt}var oD=(function(){function yt(ct){var at=this;Ot(this,yt),this.fetchLibraryNode=(function(){var ut=ht(regeneratorRuntime.mark(function ot(gt,xt){var Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(!(at.previousLibraryNode&&at.previousLibraryNode.libIdentifier===xt)){zt.next=2;break}return zt.abrupt("return",at.previousLibraryNode.libraryNode);case 2:return zt.t0=at,zt.t1={appIdentifier:gt.appIdentifier,appVersion:gt.appVersion,appHash:gt.appHash,libIdentifier:xt},zt.next=6,at.fetcher.sdkHosts;case 6:return zt.t2=zt.sent,zt.next=9,zt.t0.libraryNodeFetcher.call(zt.t0,zt.t1,zt.t2);case 9:return Mt=zt.sent,zt.abrupt("return",(at.previousLibraryNode=Object.freeze({libIdentifier:xt,libraryNode:Mt}),Mt));case 11:case"end":return zt.stop()}},ot)}));return function(ot,gt){return ut.apply(this,arguments)}})(),this.logger=ct.logger,this.fetcher=ct.fetcher,this.roomToken=ct.roomToken,this.libraryNodeFetcher=ct.libraryNodeFetcher}return Bt(yt,[{key:"initializeWithTimestamp",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return xt=ot.libIdentifier,ur.next=3,Promise.all([this.sequenceImageInitializerWithTimestamp(ot,gt),this.fetchLibraryNode(ot,xt)]);case 3:return Mt=ur.sent,kt=mt(Mt,2),zt=kt[0],Ht=kt[1],ur.abrupt("return",vb(cv({},zt),{libraryNode:Ht,libIdentifier:xt}));case 8:case"end":return ur.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"initializeWithFrameId",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return xt=ot.libIdentifier,ur.next=3,Promise.all([this.sequenceImageInitializerWithFrameId(ot,gt),this.fetchLibraryNode(ot,xt)]);case 3:return Mt=ur.sent,kt=mt(Mt,2),zt=kt[0],Ht=kt[1],ur.abrupt("return",vb(cv({},zt),{libraryNode:Ht,libIdentifier:xt}));case 8:case"end":return ur.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"sequenceImageInitializerWithTimestamp",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br;return regeneratorRuntime.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:return xt=Dw(ot.beginTimestamp,gt,ot.beginTimestamp+ot.duration),Zr.next=3,this.fetcher.fetch("persistence");case 3:return Mt=Zr.sent,kt=(0,pT.stringify)({timestamp:xt}),zt="https://persistence/pv/rooms/".concat(ot.roomUUID,"/slices/").concat(ot.uuid,"/snapshots?").concat(kt),Zr.next=8,Mt.fetchJSON(zt,{method:"get",headers:{"content-type":"application/json",token:this.roomToken}});case 8:return Ht=Zr.sent,Ht||(this.logger.warn("cannot find snapshot that timestamp=".concat(xt," and slice=").concat(ot.uuid)),Ht={frameId:0,timestamp:ot.beginTimestamp}),Zr.next=12,this.fetchFrameRouterPicker(ot,Ht.frameId);case 12:for(rr=Zr.sent,ur=0,_r=0;_r<rr.framesCount&&rr.timestampAt(_r)<=gt;_r++)ur+=1;return Zr.next=17,this.fetchSnapshot(ot,Ht.frameId);case 17:if(Dr=Zr.sent,ur!==0){Zr.next=22;break}Zr.t0=[],Zr.next=25;break;case 22:return Zr.next=24,this.fetchFramePickers(ot,Ht.frameId,ur);case 24:Zr.t0=Zr.sent;case 25:return Br=Zr.t0,Zr.abrupt("return",{snapshot:Dr.frameBuffer,actionFrames:Br.map(function(Tn){return Tn.frameBuffer}),akkoSerVersion:Hm(ot.akkoVersion)});case 27:case"end":return Zr.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"sequenceImageInitializerWithFrameId",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return xt=Dw(0,gt,ot.framesCount-1),rr.next=3,this.fetchSnapshot(ot,xt);case 3:if(Mt=rr.sent,kt=xt-Mt.frameId,kt!==0){rr.next=7;break}return rr.abrupt("return",{snapshot:Mt.frameBuffer,actionFrames:[],akkoSerVersion:Hm(ot.akkoVersion)});case 7:return rr.next=9,this.fetchFramePickers(ot,Mt.frameId,kt);case 9:return zt=rr.sent,rr.abrupt("return",{snapshot:Mt.frameBuffer,actionFrames:zt.map(function(ur){return ur.frameBuffer}),akkoSerVersion:Hm(ot.akkoVersion)});case 11:case"end":return rr.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchFramePickers",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr;return regeneratorRuntime.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:return jn.next=2,this.getAssetsFetcherAndURL(ot,"framesRouter");case 2:return Mt=jn.sent,kt=Mt.fetcher,zt=Mt.url,jn.next=7,xT.pick(kt,zt,gt,xt);case 7:return Ht=jn.sent,jn.next=10,this.fetchBody(ot,"framesBody",Ht.offset,Ht.length);case 10:rr=jn.sent,ur=[],_r=0;case 13:if(!(_r<Ht.framesCount)){jn.next=22;break}if(Dr=Ht.offsetAt(_r)-Ht.offset,Br=Ht.lengthAt(_r),!(rr.byteLength<Dr+Br)){jn.next=17;break}return jn.abrupt("break",22);case 17:Ur=rr.slice(Dr,Br),Zr=new av(Ur),ur.push(Zr);case 19:++_r,jn.next=13;break;case 22:return jn.abrupt("return",ur);case 23:case"end":return jn.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"fetchSnapshot",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr,ur,_r;return regeneratorRuntime.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,this.getAssetsFetcherAndURL(ot,"snapshotsRouter");case 2:return xt=Br.sent,Mt=xt.fetcher,kt=xt.url,zt=Math.floor(gt/ot.snapshotIdInterval),Br.next=8,xT.pick(Mt,kt,zt,1);case 8:if(Ht=Br.sent,Ht.framesCount!==0){Br.next=11;break}throw new Error("can't find snapshot with frameId ".concat(gt));case 11:return rr=Ht.offsetAt(0),ur=Ht.lengthAt(0),Br.next=15,this.fetchBody(ot,"snapshotsBody",rr,ur);case 15:return _r=Br.sent,Br.abrupt("return",new av(_r));case 17:case"end":return Br.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchFrameRouterPicker",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return rr.next=2,this.getAssetsFetcherAndURL(ot,"framesRouter");case 2:return xt=rr.sent,Mt=xt.fetcher,kt=xt.url,zt=Math.min(ot.framesCount-gt,ot.snapshotIdInterval-1),rr.abrupt("return",xT.pick(Mt,kt,gt,zt));case 7:case"end":return rr.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchBody",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt){var kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,this.getAssetsFetcherAndURL(ot,gt);case 2:return kt=_r.sent,zt=kt.fetcher,Ht=kt.url,_r.next=7,zt.fetchBuffer(Ht,{method:"get",headers:{"content-type":"application/json",Accept:"application/octet-stream",Range:"bytes=".concat(xt,"-").concat(xt+Mt)}});case 7:if(rr=_r.sent,rr){_r.next=10;break}throw new Error(`can't find "`.concat(Ht,'"'));case 10:return _r.abrupt("return",rr);case 11:case"end":return _r.stop()}},ut,this)}));function at(ut,ot,gt,xt){return ct.apply(this,arguments)}return at})()},{key:"getAssetsFetcherAndURL",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr,ur,_r;return regeneratorRuntime.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:xt=ot.uuid,Mt=ot.roomUUID,kt=ot.token,zt=ot.signedUrl,Br.t0=gt,Br.next=Br.t0==="framesBody"?4:Br.t0==="framesRouter"?6:Br.t0==="snapshotsBody"?8:Br.t0==="snapshotsRouter"?10:12;break;case 4:return Ht="frames.body",Br.abrupt("break",12);case 6:return Ht="frames.router",Br.abrupt("break",12);case 8:return Ht="snapshots.body",Br.abrupt("break",12);case 10:return Ht="snapshots.router",Br.abrupt("break",12);case 12:return kt?(rr="assets-auth",ur=kt[gt]):rr="assets",_r="https://".concat(rr,"/").concat(Mt,"/").concat(xt,"/").concat(Ht),zt?_r=zt[gt]:ur&&(_r+="?auth_key="+ur),Br.next=17,this.fetcher.fetch(rr);case 17:return Br.t1=Br.sent,Br.t2=_r,Br.abrupt("return",{fetcher:Br.t1,url:Br.t2});case 20:case"end":return Br.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()}]),yt})(),xT=(function(){function yt(ct,at){Ot(this,yt),this.buffer=ct,this.framesCount=at,this.framesCount>0?this.offset=this.offsetAt(0):this.offset=Number.NaN}return Bt(yt,[{key:"length",get:function(){if(this._length===void 0){this._length=0;for(var at=0;at<this.framesCount;++at)this._length+=this.lengthAt(at)}return this._length}},{key:"timestampAt",value:function(at){var ut=3*Tx,ot=at*ut+0*Tx;return this.buffer.getUint64(ot)}},{key:"offsetAt",value:function(at){var ut=3*Tx,ot=at*ut+1*Tx;return this.buffer.getUint64(ot)}},{key:"lengthAt",value:function(at){var ut=3*Tx,ot=at*ut+2*Tx;return this.buffer.getUint64(ot)}}],[{key:"pick",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt){var kt,zt,Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return kt=3*Tx,zt=xt*kt,Ht=(xt+Mt)*kt-1,Dr.next=5,ot.fetchBuffer(gt,{method:"get",headers:{"content-type":"application/json",Accept:"application/octet-stream",Range:"bytes=".concat(zt,"-").concat(Ht)}});case 5:return rr=Dr.sent,rr||(rr=du(0)),ur=Math.floor(rr.byteLength/kt),Dr.abrupt("return",new yt(rr,ur));case 9:case"end":return Dr.stop()}},ut)}));function at(ut,ot,gt,xt){return ct.apply(this,arguments)}return at})()}]),yt})(),uD=(function(){function yt(ct){Ot(this,yt),this.slices=Object.freeze(Ct(ct.slices).sort(function(at,ut){return at.beginTimestamp-ut.beginTimestamp})),this.beginAt=ct.beginAt,this.endAt=ct.endAt,this.roomUUID=this.getRoomUUID(),this.framesCount=this.getFramesCount()}return Bt(yt,[{key:"getRoomUUID",value:function(){for(var at=this.slices[0].roomUUID,ut=1;ut<this.slices.length;++ut)if(at!==this.slices[ut].roomUUID)throw new Error("all slices should have the same roomUUID");return at}},{key:"getFramesCount",value:function(){var at=0,ut=Jt(this.slices),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at+=gt.framesCount}}catch(xt){ut.e(xt)}finally{ut.f()}return at}},{key:"beginTimestamp",get:function(){return this.beginAt}},{key:"duration",get:function(){return this.endAt-this.beginAt}},{key:"slicesCount",get:function(){return this.slices.length}},{key:"sliceAt",value:function(at){return this.slices[at]}},{key:"getFrameDescriptionWithFrameId",value:function(at){for(var ut=at,ot=0,gt=0;gt<this.slices.length;++gt){var xt=this.slices[gt];if(ot=gt,ut<xt.framesCount)break;ut-=xt.framesCount}return{frameId:ut,sliceIndex:ot}}},{key:"getFrameDescriptionWithTimestamp",value:function(at){for(var ut=at+this.beginAt,ot=0,gt=0;gt<this.slices.length;++gt){var xt=this.slices[gt];if(ot=gt,ut<xt.beginTimestamp+xt.duration)break}var Mt=Math.max(0,ut-this.slices[ot].beginTimestamp);return{sliceIndex:ot,timestamp:Mt}}}]),yt})(),ST=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this._libraryNodeFetcher=ct,this.sdkHosts=at,this.libraryNodeFetcher=function(ot){return ut._libraryNode&&ut._libIdentifier===ot.libIdentifier?Promise.resolve(ut._libraryNode):ut._libraryNodeFetcher(ot,ut.sdkHosts)}}return Bt(yt,[{key:"sliceIndex",get:function(){return this._sliceIndex}},{key:"slice",get:function(){return this._slice}},{key:"libIdentifier",get:function(){return this._libIdentifier}},{key:"libraryNode",get:function(){return this._libraryNode}},{key:"refreshReconstructorLine",value:function(at){(at.libIdentifier!==this._libIdentifier||at.libraryNode!==this._libraryNode)&&(this._libIdentifier=at.libIdentifier,this._libraryNode=at.libraryNode,this.onLibraryNodeChanged&&this.onLibraryNodeChanged(this._libIdentifier,this._libraryNode)),at.sliceIndex!==this._sliceIndex&&(this._sliceIndex=at.sliceIndex,this._slice=at.slice,this.onSliceChanged&&this.onSliceChanged(this._slice,this._sliceIndex))}}]),yt})(),lD=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.fetcherFactory=ct,this.imageFactory=at,this.clientVersion=ut,this.enableAnimationFrame=ot}return Bt(yt,[{key:"createReconstructor",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:return xt=gt.rangeQuery,rr.t0=ST,rr.t1=gt.libraryNodeFetcher,rr.next=5,this.fetcherFactory.sdkHosts;case 5:return rr.t2=rr.sent,Mt=new rr.t0(rr.t1,rr.t2),kt=new oD({logger:gt.logger,roomToken:gt.roomToken,fetcher:this.fetcherFactory.create(xt.region),libraryNodeFetcher:Mt.libraryNodeFetcher}),rr.next=10,this.fetchSliceChunk(xt);case 10:if(zt=rr.sent,zt){rr.next=13;break}throw new Error("couldn't find any matching slices");case 13:return rr.abrupt("return",new sD({logger:gt.logger,sliceChunk:zt,imageFactory:this.imageFactory,sequenceFetcher:kt,sliceStateUpdater:Mt,toolsExtra:ot,enableAnimationFrame:this.enableAnimationFrame,callbacks:gt.callbacks||{}}));case 14:case"end":return rr.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"searchSlices",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,this.fetchSliceChunk(ot);case 2:if(gt=zt.sent,xt=[],gt)for(Mt=0;Mt<gt.slicesCount;++Mt)xt.push(gt.sliceAt(Mt));return zt.abrupt("return",xt);case 6:case"end":return zt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"fetchSliceChunk",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt=this,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr,Tn,jn;return regeneratorRuntime.wrap(function(us){for(;;)switch(us.prev=us.next){case 0:return us.next=2,this.fetcherFactory.create(ot.region).fetch("persistence");case 2:if(xt=us.sent,ot.slice===void 0){us.next=14;break}return kt={clientVersion:this.clientVersion},zt="https://persistence/pv/rooms/".concat(ot.room,"/slices/").concat(ot.slice,"?").concat((0,vE.stringify)(kt)),us.next=8,xt.fetchJSON(zt,{headers:{"content-type":"application/json",token:ot.roomToken}});case 8:if(Ht=us.sent,!(ot.room!==void 0&&ot.room!==Ht.roomUUID)){us.next=11;break}throw new Error("slice ".concat(Ht.uuid," is not belongs to room ").concat(ot.room));case 11:Mt=[Ht],us.next=22;break;case 14:if(ot.room===void 0){us.next=21;break}return rr=ot.beginTimestamp,ur=ot.beginTimestamp!==void 0&&ot.duration!==void 0?ot.beginTimestamp+ot.duration:void 0,_r={beginAt:rr,endAt:ur,clientVersion:this.clientVersion},Dr="https://persistence/pv/rooms/".concat(ot.room,"/slices?").concat((0,vE.stringify)(_r)),us.next=18,xt.fetchJSON(Dr,{headers:{"content-type":"application/json",token:ot.roomToken}});case 18:Mt=us.sent,us.next=22;break;case 21:throw new Error("expect either room or slice");case 22:if(Mt=Mt.map(function(Os){return gt.fillSliceLibIdentifier(Os)}),!(Mt.length>0)){us.next=31;break}Br=ot.beginTimestamp,Br===void 0&&(Br=Math.min.apply(Math,Ct(Mt.map(function(Os){return Os.beginTimestamp})))),ot.duration?Ur=Br+ot.duration:Ur=Math.max.apply(Math,Ct(Mt.map(function(Os){return Os.beginTimestamp+Os.duration}))),Zr=Jt(Mt);try{for(Zr.s();!(Tn=Zr.n()).done;)jn=Tn.value,Object.freeze(jn)}catch(Os){Zr.e(Os)}finally{Zr.f()}return us.abrupt("return",(Mt=Mt.filter(function(Os){var Hs=Os.beginTimestamp;return Os.beginTimestamp+Os.duration>=Br&&Hs<=Ur}),new uD({beginAt:Br,endAt:Ur,slices:Mt})));case 31:return us.abrupt("return",null);case 32:case"end":return us.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"fillSliceLibIdentifier",value:function(at){var ut,ot=at.libIdentifier.replace(/\.\w+$/im,"").split("-"),gt=mt(ot,2),xt=gt[0],Mt=gt[1];if(xt&&Mt)try{if($u.compare($u.parse(Mt),$u.parse("2.7.0"))<0)switch(xt){case"2.0.0":{ut="2.0.0-2.7.9.0f385eb562396be49fb451e80c1d85fa";break}case"2.1.0":{ut="2.1.0-2.8.0.fb7b9e324522d815ee4e40990d061a0b";break}}}catch(kt){console.warn(kt)}return ut?vb(cv({},at),{libIdentifier:ut}):at}}]),yt})(),dv;(function(yt){yt.WaitingFirstFrame="waitingFirstFrame",yt.Playing="playing",yt.Pause="pause",yt.Stopped="stopped",yt.Ended="ended",yt.Buffering="buffering",yt.Seeking="seeking"})(dv||(dv={}));var __;(function(yt){yt[yt.Success=0]="Success",yt[yt.SuccessButUnnecessary=1]="SuccessButUnnecessary",yt[yt.Override=2]="Override",yt[yt.Stopped=3]="Stopped"})(__||(__={}));var CE=(function(){function yt(ct){Ot(this,yt);var at=ct.onAkkoSetupFailed,ut=xx({escapeObjectFilter:ct.escapeObjectFilter,jsxFactory:ct.jsxFactory,observerAdapter:ct.observerAdapter});if(this.imageFactory=new Km(ut),this.convertIdToUrl=ct.convertIdToUrl,ct.shuntApiHosts){var ot=new Sw({appIdentifier:ct.appIdentifier,shuntApiHosts:ct.shuntApiHosts,onInterruptConfigs:ct.configsInterrupter,onAkkoSetupFailed:function(zt){console.error("akko setup failed: ".concat(zt.stack||zt.message)),at&&at(zt)}}),gt=!!ct.enableAnimationFrame,xt={enableAnimationFrame:gt},Mt=Gt(ct.reconnectionOptions);this.magixFactory=new nD(ot,this.imageFactory,Mt,ct.netStateAdapter,ct.clientVersion,xt),this.playerFactory=new lD(ot,this.imageFactory,ct.clientVersion,gt)}}return Bt(yt,[{key:"createMagix",value:function(at){if(!this.magixFactory)throw new Error("expect shuntApiHosts");var ut=new _1().create({convertIdToUrl:this.convertIdToUrl}),ot=Object.freeze({resource:ut});return this.magixFactory.createMagix(ot,at)}},{key:"createReconstructor",value:function(at){if(!this.playerFactory)throw new Error("expect shuntApiHosts");var ut=new _1().create({convertIdToUrl:this.convertIdToUrl}),ot=Object.freeze({resource:ut});return this.playerFactory.createReconstructor(ot,at)}},{key:"searchSlices",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(this.playerFactory){xt.next=2;break}throw new Error("expect shuntApiHosts");case 2:return xt.next=4,this.playerFactory.searchSlices(ot);case 4:return xt.abrupt("return",xt.sent);case 5:case"end":return xt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()}]),yt})(),BA={};Kr(BA,{AnimationMode:function(){return Mm},Boundless:function(){return Yw},BoundlessEventKind:function(){return Ls},CNode:function(){return Gw},CameraTransformation:function(){return oS},CanvasPaitingMode:function(){return HS},CanvasRenderMode:function(){return zw},CanvasRenderState:function(){return tA},ComponentKind:function(){return w_},DeviceType:function(){return d0},LayoutKind:function(){return uS},LayoutRenderMode:function(){return Qw},LowTaskAnimationInterval:function(){return IT},OriginCoordType:function(){return wb},RectangleAdapterMode:function(){return q0},RectangleTesting:function(){return Ix},RenderLayoutMode:function(){return By},creatHTMLRenderEngine:function(){return iC},createCanvasRenderEngine:function(){return MD},createComponentDefinition:function(){return QD},distance:function(){return LR},isCanvasRenderEngine:function(){return ID},isHTMLRenderEngine:function(){return LT},midpoint:function(){return rA},unitVector:function(){return qR}});var cD=ln(requireSparkMd5()),jA=Object.defineProperty,$A=Object.defineProperties,dD=Object.getOwnPropertyDescriptors,UA=Object.getOwnPropertySymbols,hD=Object.prototype.hasOwnProperty,fD=Object.prototype.propertyIsEnumerable,Mw=function(ct,at,ut){return at in ct?jA(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Iw=function(ct,at){for(var ut in at||(at={}))hD.call(at,ut)&&Mw(ct,ut,at[ut]);if(UA){var ot=Jt(UA(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;fD.call(at,ut)&&Mw(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},pD=function(ct,at){return $A(ct,dD(at))},wT=Object.freeze({debug:0,info:1,warn:2,error:3}),DE=(function(){function yt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},at=ct.prefix,ut=ct.levelMask;Ot(this,yt),this.prefix=at,this.levelMaskIndex=wT[ut||"info"]}return Bt(yt,[{key:"log",value:function(at,ut,ot){wT[ut]>=this.levelMaskIndex&&(this.prefix?console[ut](this.prefix,ot):console[ut](ot))}},{key:"commit",value:function(){}},{key:"isSupportedEvents",value:function(at){return!0}}]),yt})();function zA(yt){var ct={};for(var at in yt){var ut=yt[at];ut!==void 0&&(ct[at]=ut)}return ct}function ME(yt){if(tr(yt)!="object"||yt===null)return yt;if(yt instanceof Array){var ct=[],at=Jt(yt),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ct.push(ME(ot))}}catch(Mt){at.e(Mt)}finally{at.f()}return Object.freeze(ct)}else{var gt={};for(var xt in yt)gt[xt]=ME(yt[xt]);return Object.freeze(gt)}}function RE(yt,ct,at){if(!yt.isSupportedEvents(ct))throw new Error("unsupported event name: ".concat(ct));var ut=at?{context:zA(at)}:{};return PE(yt,ct,ut)}function PE(yt,ct,at){var ut={debug:TT(yt,"debug",ct,at),info:TT(yt,"info",ct,at),warn:TT(yt,"warn",ct,at),error:TT(yt,"error",ct,at),withContext:function(gt){return PE(yt,ct,{context:Iw(Iw({},at.context),gt)})}};return Object.defineProperty(ut,"context",{enumerable:!1,set:function(gt){return at.context=gt},get:function(){return at.context}}),Object.freeze(ut)}function TT(yt,ct,at,ut){return function(){for(var ot=arguments.length,gt=new Array(ot),xt=0;xt<ot;xt++)gt[xt]=arguments[xt];for(var Mt=0;Mt<gt.length;++Mt)gt[Mt]=ET(gt[Mt]);var kt=mD(ut),zt=gt.join(" ");yt.log(at,ct,zt,kt)}}function mD(yt){var ct;if(yt.context){ct||(ct={});for(var at in yt.context)ct[at]=yt.context[at]}return Object.freeze(ct)}function ET(yt){if(yt instanceof Error){var ct="Error: "+yt.message+`
`;return typeof yt.stack=="string"?ct+yt.stack.replace(ct,""):ct}else try{return"".concat(yt)}catch(at){return"[".concat(tr(yt)," ").concat(JSON.stringify(at.message),"]")}}function Rw(yt,ct){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!yt.isSupportedEvents(ct))throw new Error("unsupported event name: ".concat(ct));var ut=Object.freeze(zA(at));return Object.freeze({commit:function(gt){yt.commit(ct,Iw(Iw({},ut),gt))}})}var JM=function(ct){if((typeof process>"u"?"undefined":tr(process))=="object"&&process+""=="[object process]")return Buffer.from(ct).toString("base64");{for(var at=32768,ut="",ot,gt=0,xt=ct.length;gt<xt;)ot=ct.subarray(gt,Math.min(gt+at,xt)),ut+=String.fromCharCode.apply(null,ot),gt+=at;return btoa(ut)}},GA=(function(){function yt(ct,at){Ot(this,yt),this.argusEvents=ME(ct),this.vid=at}return Bt(yt,[{key:"encode",value:function(at,ut){var ot=pD(Iw({},ut),{vid:this.vid,lts:Date.now(),clientIP:"__#CLIENT_IP#__"}),gt=this.argusEvents[at],xt=gt.eventID,Mt=gt.proto,kt=Mt.verify(ot);if(kt)throw new Error(kt);var zt=Mt.create(ot),Ht=Mt.encode(zt).finish(),rr=JM(Ht),ur="whiteBoard",_r=Math.floor(Date.now()/1e3),Dr=cD.default.hash("payload=".concat(rr,"&src=").concat(ur,"&ts=").concat(_r));return{id:xt,src:ur,payload:rr,qos:this.vid===1?101:1,ts:_r,sign:Dr}}}]),yt})(),NE=(function(){function yt(){Ot(this,yt),this.queue=[]}return Bt(yt,[{key:"append",value:function(at){this.queue.push(at)}},{key:"next",get:function(){return this.queue[0]}},{key:"done",value:function(){this.queue.shift()}},{key:"length",get:function(){return this.queue.length}}]),yt})(),AT=3,CT=1e3,VA=(function(){var yt=ht(regeneratorRuntime.mark(function ct(at,ut){var ot,gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:ot=regeneratorRuntime.mark(function zt(Ht){return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.prev=0,ur.next=3,at(ut);case 3:return ur.abrupt("return","break");case 6:if(ur.prev=6,ur.t0=ur.catch(0),Ht!==AT){ur.next=10;break}throw new Error("report log failed (with ".concat(AT," times failed), error: ").concat(ur.t0));case 10:return ur.next=12,new Promise(function(_r){setTimeout(_r,Ht*CT)});case 12:case"end":return ur.stop()}},zt,null,[[0,6]])}),gt=1;case 2:if(!(gt<=AT)){kt.next=10;break}return kt.delegateYield(ot(gt),"t0",4);case 4:if(xt=kt.t0,xt!=="break"){kt.next=7;break}return kt.abrupt("break",10);case 7:gt++,kt.next=2;break;case 10:case"end":return kt.stop()}},ct)}));return function(at,ut){return yt.apply(this,arguments)}})(),kE=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.logQueue=ct,this.resourceURL=at,this.request=ut,this.warnLog=ot}return Bt(yt,[{key:"report",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt=this,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(this.logQueue.append(ot),this.logQueue.length!==1){kt.next=19;break}case 1:if(xt=this.logQueue.next,!xt){kt.next=16;break}return kt.prev=3,kt.next=6,VA(function(zt){return gt.request(zt,gt.resourceURL)},xt);case 6:kt.next=11;break;case 8:kt.prev=8,kt.t0=kt.catch(3),this.warnLog(kt.t0);case 11:return kt.prev=11,this.logQueue.done(),kt.finish(11);case 14:kt.next=17;break;case 16:return kt.abrupt("break",19);case 17:kt.next=1;break;case 19:case"end":return kt.stop()}},ut,this,[[3,8,11,14]])}));function at(ut){return ct.apply(this,arguments)}return at})()}]),yt})(),X1=(function(){function yt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(this,yt),this.events={},this.initListeners("debug",ct.debug),this.initListeners("info",ct.info),this.initListeners("warn",ct.warn),this.initListeners("error",ct.error)}return Bt(yt,[{key:"on",value:function(at,ut){var ot;(ot=this.events[at]).push.apply(ot,Ct(Array.isArray(ut)?ut:[ut]))}},{key:"initListeners",value:function(at,ut){return this.events[at]=[],ut&&this.on(at,ut)}},{key:"emit",value:function(at,ut){this.events[at].forEach(function(ot){try{var gt=ot(ut);gt instanceof Promise&&gt.catch(console.error)}catch(xt){console.error(xt)}})}}]),yt})(),Pw=ln(requireReact()),Nw=ln(requireReact()),HA=ln(requireReact()),DT=ln(requireEs5()),zS=ln(requireReact()),zm=ln(requireReact()),Y1=ln(requireReact()),Ex=ln(requireReact()),gD=ln(require$$123),OE=ln(requireReact()),eI=ln(requireReact()),Q1=ln(requireReact()),vD=ln(requireReactDom()),MT=ln(requireReact()),Dm=ln(requireReact()),ap=ln(require$$125),ol=Object.defineProperty,qE=Object.defineProperties,yD=Object.getOwnPropertyDescriptors,WA=Object.getOwnPropertySymbols,tI=Object.prototype.hasOwnProperty,_b=Object.prototype.propertyIsEnumerable,S1=function(ct,at,ut){return at in ct?ol(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},Ll=function(ct,at){for(var ut in at||(at={}))tI.call(at,ut)&&S1(ct,ut,at[ut]);if(WA){var ot=Jt(WA(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;_b.call(at,ut)&&S1(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},Zm=function(ct,at){return qE(ct,yD(at))},Ls;(function(yt){yt.MouseDown="MouseDown",yt.MouseMove="MouseMove",yt.MouseUp="MouseUp",yt.MouseLeave="MouseLeave",yt.MouseWheel="MouseWheel",yt.TouchStart="TouchStart",yt.TouchMove="TouchMove",yt.TouchEnd="TouchEnd",yt.TouchCancel="TouchCancel",yt.SortedTouchStart="SortedTouchStart",yt.SortedTouchMove="SortedTouchMove",yt.SortedTouchEnd="SortedTouchEnd",yt.SortedTouchCancel="SortedTouchCancel",yt.KeyDown="KeyDown",yt.KeyUp="KeyUp",yt.MetaKeyUp="MetaKeyUp"})(Ls||(Ls={}));var By;(function(yt){yt[yt.Normal=0]="Normal",yt[yt.Preview=1]="Preview"})(By||(By={}));var o0=(function(){function yt(ct){Ot(this,yt),this.definitions={},this.id="".concat(yt.nextId),this.orderIndex=ct,yt.nextId+=1}return Bt(yt,[{key:"painToCanvas",value:function(at,ut,ot,gt){}},{key:"addDefinition",value:function(at){this.definitions[at.id]=at}}]),yt})(),Jm=o0;Jm.nextId=0;var rI=(function(){function yt(){Ot(this,yt),typeof performance>"u"?this.fetch=this.fetchByMilliseconds:this.fetch=this.fetchByMicroseconds}return Bt(yt,[{key:"fetchByMilliseconds",value:function(){return Date.now()*1e3}},{key:"fetchByMicroseconds",value:function(){return Math.floor(performance.now()*1e3)}}]),yt})(),Jx=new rI;function bD(){return Jx.fetch()}var wb;(function(yt){yt[yt.Default=0]="Default",yt[yt.LeftTop=7]="LeftTop",yt[yt.LeftBottom=1]="LeftBottom",yt[yt.RightTop=9]="RightTop",yt[yt.RightBottom=3]="RightBottom",yt[yt.LeftCenter=4]="LeftCenter",yt[yt.RightCenter=6]="RightCenter",yt[yt.TopCenter=8]="TopCenter",yt[yt.BottomCenter=2]="BottomCenter",yt[yt.Center=5]="Center"})(wb||(wb={}));var IT;(function(yt){yt[yt.Default=0]="Default",yt[yt.Xs=20]="Xs",yt[yt.Sm=40]="Sm",yt[yt.Md=60]="Md",yt[yt.Lg=80]="Lg",yt[yt.Xl=120]="Xl"})(IT||(IT={}));var nI=(function(){function yt(){Ot(this,yt),this.useLowTaskAnimation=0,this.useSinglerCanvas=!1,this.useTopFloatOriginCoord=0}return Bt(yt,[{key:"set",value:function(at){var ut,ot,gt;this.useLowTaskAnimation=(ut=at.useLowTaskAnimation)!=null?ut:this.useLowTaskAnimation,this.useSinglerCanvas=(ot=at.useSinglerCanvas)!=null?ot:this.useSinglerCanvas,this.useTopFloatOriginCoord=(gt=at.useTopFloatOriginCoord)!=null?gt:this.useTopFloatOriginCoord}}]),yt})(),eS=new nI,LE=(function(){function yt(ct,at,ut){Ot(this,yt),this._ratio=1,this._visibility=!0,this._size=Object.freeze(Ll({},ct)),this.dirtyNotify=at,this.onSetupCanvas=ut}return Bt(yt,[{key:"size",get:function(){return this._size},set:function(at){(this._size.width!==at.width||this._size.height!==at.height)&&(this._size=Object.freeze(Ll({},at)),this.hasNextCanvasNode&&this._visibility&&this.refreshSize())}},{key:"visibility",get:function(){return this._visibility},set:function(at){this._visibility!==at&&(this._visibility=at,this.hasNextCanvasNode&&this._visibility&&this.refreshSize(),this.refreshVisibility())}},{key:"ratio",get:function(){return this._ratio}},{key:"setRatio",value:function(at){this._ratio=at}},{key:"getRatioWithContext",value:function(at){var ut=at.webkitBackingStorePixelRatio||at.mozBackingStorePixelRatio||at.msBackingStorePixelRatio||at.oBackingStorePixelRatio||at.backingStorePixelRatio||1;return Math.max(1,(window.devicePixelRatio||1)/ut)}}],[{key:"setCanvasSize",value:function(at,ut,ot){(at.width!==ut||at.height!==ot)&&(at.width=ut,at.height=ot)}}]),yt})(),tS;(function(yt){yt[yt.Firefox=0]="Firefox",yt[yt.Opera=1]="Opera",yt[yt.Safari=2]="Safari",yt[yt.IE=3]="IE",yt[yt.Other=4]="Other",yt[yt.Unkown=5]="Unkown"})(tS||(tS={}));var u0=(function(){function yt(){Ot(this,yt),this.kind=5}return Bt(yt,[{key:"getContext",value:function(at){var ut=at.getContext("2d");switch(ut.imageSmoothingEnabled=!1,this.kind){case 0:{ut.mozImageSmoothingEnabled=!1;break}case 1:{ut.oImageSmoothingEnabled=!1;break}case 2:{ut.webkitImageSmoothingEnabled=!1;break}case 3:{ut.msImageSmoothingEnabled=!1;break}case 5:{ut.mozImageSmoothingEnabled!==void 0?(ut.mozImageSmoothingEnabled=!1,this.kind=0):ut.oImageSmoothingEnabled!==void 0?(ut.oImageSmoothingEnabled=!1,this.kind=1):ut.webkitImageSmoothingEnabled!==void 0?(ut.webkitImageSmoothingEnabled=!1,this.kind=2):ut.msImageSmoothingEnabled!==void 0&&(ut.msImageSmoothingEnabled=!1,this.kind=3);break}}return ut}}]),yt})(),RT=new u0;function Ax(yt){return RT.getContext(yt)}var Mv=(function(yt){It(at,yt);var ct=qt(at);function at(){var ut;return Ot(this,at),ut=ct.apply(this,arguments),ut.canvas=null,ut.canvasIndex=1,ut.canvasSizeSetter=null,ut}return Bt(at,[{key:"hasNextCanvasNode",get:function(){return!!this.canvas}},{key:"nextCanvasNode",value:function(){var ot=null;if(this.canvas){var gt=this.canvas,xt=gt.node1,Mt=gt.node2;ot=[xt,Mt][this.canvasIndex-1]}return ot}},{key:"updateToNextBuffering",value:function(){this.canvas&&(this.refreshVisibility(),eS.useSinglerCanvas||(this.canvasIndex=this.canvasIndex===1?2:1))}},{key:"get2DContext",value:function(ot){return Ax(ot.canvas)}},{key:"refreshSize",value:function(){var ot;if(this.canvas){var gt=this.canvas.node1.canvas,xt=this.canvas.node2.canvas;if(!(gt.getContext("2d")&&xt.getContext("2d")))throw new Error("cannot find 2d context from canvas");var Mt=Math.ceil(this.ratio*this.size.width),kt=Math.ceil(this.ratio*this.size.height);at.setCanvasSize(gt,Mt,kt),at.setCanvasSize(xt,Mt,kt),(ot=this.canvasSizeSetter)==null||ot.call(this,{width:Mt/this.ratio,height:kt/this.ratio})}}},{key:"refreshVisibility",value:function(){if(this.canvas){var ot=this.canvas.node1.canvas,gt=this.canvas.node2.canvas;if(this.visibility)switch(this.canvasIndex){case 1:{ot.style.visibility="visible",gt.style.visibility="hidden";break}case 2:{ot.style.visibility="hidden",gt.style.visibility="visible";break}}else ot.style.visibility="hidden",gt.style.visibility="hidden"}}},{key:"setCanvas",value:function(ot){var gt,xt,Mt,kt,zt,Ht,rr,ur=!1;if(ot){var _r=mt(ot,2),Dr=_r[0],Br=_r[1];if(this.canvas){var Ur=this.canvas,Zr=Ur.node1,Tn=Ur.node2;(Zr.canvas!==Dr||Tn.canvas!==Br)&&((gt=Zr.dirty)==null||gt.release(),(xt=Tn.dirty)==null||xt.release(),this.canvas=null)}this.canvas||(ur=!0,this.canvas=Object.freeze({node1:Object.freeze({canvas:Dr,dirty:(Mt=this.dirtyNotify)==null?void 0:Mt.createDirty()}),node2:Object.freeze({canvas:Br,dirty:(kt=this.dirtyNotify)==null?void 0:kt.createDirty()})}))}else this.canvas&&((zt=this.canvas.node1.dirty)==null||zt.release(),(Ht=this.canvas.node2.dirty)==null||Ht.release(),this.canvas=null);ur&&(this.setRatio(this.getRatioWithCanvasPair(this.canvas)),this.refreshSize(),this.refreshVisibility(),(rr=this.onSetupCanvas)==null||rr.call(this))}},{key:"getRatioWithCanvasPair",value:function(ot){var gt=ot.node1.canvas,xt=ot.node2.canvas;return Math.max(this.getRatioWithContext(Ax(gt)),this.getRatioWithContext(Ax(xt)))}},{key:"getRender",value:function(){var ot=this,gt=(function(xt){It(kt,xt);var Mt=qt(kt);function kt(zt){var Ht;return Ot(this,kt),Ht=Mt.call(this,zt),Ht.canvas1=null,Ht.canvas2=null,Ht.onSetCanvas1Ref=function(rr){Ht.canvas1=rr,Ht.refreshCanvas()},Ht.onSetCanvas2Ref=function(rr){Ht.canvas2=rr,Ht.refreshCanvas()},Ht.state=Ll({},ot.size),ot.canvasSizeSetter=function(rr){return Ht.setState(rr)},Ht}return Bt(kt,[{key:"componentWillUnmount",value:function(){ot.canvasSizeSetter=null}},{key:"refreshCanvas",value:function(){this.canvas1&&this.canvas2?ot.setCanvas([this.canvas1,this.canvas2]):ot.setCanvas(null)}},{key:"render",value:function(){var Ht=this.props,rr=Ht.className,ur=Ht.style,_r=this.state,Dr=_r.width,Br=_r.height,Ur=Zm(Ll({},ur),{width:Dr,height:Br});return[(0,Nw.createElement)("canvas",{key:"canvas1",className:rr,ref:this.onSetCanvas1Ref,style:Ur}),(0,Nw.createElement)("canvas",{key:"canvas2",className:rr,ref:this.onSetCanvas2Ref,style:Ur})]}}]),kt})(Nw.Component);return gt}}]),at})(LE),Fv=(function(){return(typeof window>"u"?"undefined":tr(window))=="object"?DT.default.getParser(window.navigator.userAgent).getEngineName()==="WebKit":!1})();function PT(){return Fv}var iI=(function(yt){It(at,yt);var ct=qt(at);function at(){var ut;return Ot(this,at),ut=ct.apply(this,arguments),ut.shouldWrapContext=!1,ut.isCanvasReadyOnSarari=!1,ut.canvasNode=null,ut.canvasSizeSetter=null,ut.setCanvas=function(ot){var gt,xt,Mt,kt,zt=!1;ot?(ut.canvasNode&&ut.canvasNode.canvas!==ot&&((gt=ut.canvasNode.dirty)==null||gt.release(),ut.canvasNode=null),ut.canvasNode||(zt=!0,ut.canvasNode={canvas:ot,dirty:(xt=ut.dirtyNotify)==null?void 0:xt.createDirty()})):ut.canvasNode&&((Mt=ut.canvasNode.dirty)==null||Mt.release(),ut.canvasNode=null),zt&&(ut.setRatio(ut.getRatioWithContext(Ax(ut.canvasNode.canvas))),ut.refreshSize(),ut.refreshVisibility(),(kt=ut.onSetupCanvas)==null||kt.call(Kt(ut)))},ut}return Bt(at,[{key:"hasNextCanvasNode",get:function(){return!!this.canvasNode}},{key:"nextCanvasNode",value:function(){return this.canvasNode}},{key:"updateToNextBuffering",value:function(){}},{key:"get2DContext",value:function(ot){return Ax(ot.canvas)}},{key:"refreshSize",value:function(){var ot;if(this.canvasNode){var gt=this.canvasNode.canvas;if(!gt.getContext("2d"))throw new Error("cannot find 2d context from canvas");var xt=Math.ceil(this.ratio*this.size.width),Mt=Math.ceil(this.ratio*this.size.height);at.setCanvasSize(gt,xt,Mt),(ot=this.canvasSizeSetter)==null||ot.call(this,{width:xt/this.ratio,height:Mt/this.ratio})}PT()&&this.refreshIsCanvasReadyOnSarari()}},{key:"refreshVisibility",value:function(){if(this.canvasNode){var ot=this.canvasNode.canvas;this.visibility?ot.style.visibility="visible":ot.style.visibility="hidden"}PT()&&this.refreshIsCanvasReadyOnSarari()}},{key:"refreshIsCanvasReadyOnSarari",value:function(){var ot=this.size,gt=this.visibility,xt=this.hasNextCanvasNode&&gt&&ot.width>0&&ot.height>0;this.isCanvasReadyOnSarari!==xt&&(this.isCanvasReadyOnSarari=xt,xt&&(this.shouldWrapContext=!0))}},{key:"getRender",value:function(){var ot=this,gt=(function(xt){It(kt,xt);var Mt=qt(kt);function kt(zt){var Ht;return Ot(this,kt),Ht=Mt.call(this,zt),Ht.state=Ll({},ot.size),ot.canvasSizeSetter=function(rr){return Ht.setState(rr)},Ht}return Bt(kt,[{key:"componentWillUnmount",value:function(){ot.canvasSizeSetter=null}},{key:"render",value:function(){var Ht=this.props,rr=Ht.className,ur=Ht.style,_r=this.state,Dr=_r.width,Br=_r.height,Ur=Zm(Ll({},ur),{width:Dr,height:Br});return(0,HA.createElement)("canvas",{key:"canvas1",className:rr,ref:ot.setCanvas,style:Ur})}}]),kt})(HA.Component);return gt}}]),at})(LE);function aI(yt,ct,at){return new Mv(yt,ct,at)}function sI(yt,ct,at){return new iI(yt,ct,at)}var oI=(function(){function yt(){Ot(this,yt),this.paintFloatCount=0,this.generateCacheCount=0,this.paintCacheCount=0,this.fuseCacheCount=0,this.fuseCount=0,this.splitCount=0}return Bt(yt,[{key:"recordPaintFloat",value:function(){this.paintFloatCount+=1}},{key:"recordGenerateCache",value:function(){this.generateCacheCount+=1}},{key:"recordPaintCache",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.paintCacheCount+=at}},{key:"recordFuseCache",value:function(){this.fuseCacheCount+=1}},{key:"recordFuse",value:function(at){this.fuseCount+=at}},{key:"recordSplit",value:function(){this.splitCount+=1}},{key:"clear",value:function(){this.paintFloatCount=0,this.generateCacheCount=0,this.paintCacheCount=0,this.fuseCacheCount=0,this.fuseCount=0,this.splitCount=0}},{key:"print",value:function(){console.log(`
=========`),console.log("paintFloatCount",this.paintFloatCount),console.log("generateCacheCount",this.generateCacheCount),console.log("paintCacheCount",this.paintCacheCount),console.log("fuseCacheCount",this.fuseCacheCount),console.log("fuseCount",this.fuseCount),console.log("splitCount",this.splitCount),this.clear()}}]),yt})(),_D=Object.freeze({forEach:function(){return!1}});function uI(yt,ct){return new FE(rS.Fusion,yt,ct)}function xD(yt,ct){return new FE(rS.Rejection,yt,ct)}var rS;(function(yt){yt[yt.Fusion=0]="Fusion",yt[yt.Rejection=1]="Rejection"})(rS||(rS={}));var FE=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this.cells={},this.forEach=function(zt){if(ot.mode===0)for(var Ht in ot.cells){var rr=ot.cells[Ht],ur=rr.row,_r=rr.column;if(zt(ur,_r))return!0}return ot.range.forEach(function(Dr,Br){var Ur=yt.key(Dr,Br);return!!(!ot.cells[Ur]&&zt(Dr,Br))})},this.mode=ct,this.range=at;var gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=yt.key(Mt.row,Mt.column);this.cells[kt]=Mt}}catch(zt){gt.e(zt)}finally{gt.f()}}return Bt(yt,null,[{key:"key",value:function(at,ut){return"".concat(at,":").concat(ut)}}]),yt})(),x_=(function(){function yt(ct,at,ut,ot){var gt=this;Ot(this,yt),this.row0=ct,this.row1=at,this.column0=ut,this.column1=ot,this.forEach=function(xt){for(var Mt=gt.row0,kt=gt.row1,zt=gt.column0,Ht=gt.column1,rr=Mt;rr<kt;++rr)for(var ur=zt;ur<Ht;++ur)if(xt(rr,ur))return!0;return!1}}return Bt(yt,[{key:"toString",value:function(){return"[row0=".concat(this.row0," row1=").concat(this.row1," column0=").concat(this.column0," column1=").concat(this.column1,"]")}},{key:"excludeForEach",value:function(at){var ut=this.row0,ot=this.row1,gt=this.column0,xt=this.column1,Mt=ut,kt=this.clamp(ut,at.row0,ot),zt=this.clamp(ut,at.row1,ot),Ht=ot,rr=gt,ur=this.clamp(gt,at.column0,xt),_r=this.clamp(gt,at.column1,xt),Dr=xt;return{forEach:function(Ur){for(var Zr=Mt;Zr<kt;++Zr)for(var Tn=gt;Tn<xt;++Tn)if(Ur(Zr,Tn))return!0;for(var jn=zt;jn<Ht;++jn)for(var ts=gt;ts<xt;++ts)if(Ur(jn,ts))return!0;for(var us=kt;us<zt;++us)for(var Os=rr;Os<ur;++Os)if(Ur(us,Os))return!0;for(var Hs=kt;Hs<zt;++Hs)for(var Ks=_r;Ks<Dr;++Ks)if(Ur(Hs,Ks))return!0;return!1}}}},{key:"clamp",value:function(at,ut,ot){var gt=ut;return gt<at?gt=at:gt>ot&&(gt=ot),gt}},{key:"rowsCount",get:function(){return this.row1-this.row0}},{key:"columnsCount",get:function(){return this.column1-this.column0}},{key:"includes",value:function(at,ut){return this.row0<=at&&at<this.row1&&this.column0<=ut&&ut<this.column1}},{key:"includesRange",value:function(at){var ut=at.row0,ot=at.row1,gt=at.column0,xt=at.column1;return this.row0<=ut&&ot<=this.row1&&this.column0<=gt&&xt<=this.column1}},{key:"merge",value:function(at,ut,ot){for(var gt=new yt(Math.floor(this.row0/at),Math.ceil(this.row1/at),Math.floor(this.column0/ut),Math.ceil(this.column1/ut)),xt=gt.row0,Mt=gt.row1,kt=gt.column0,zt=gt.column1,Ht=xt;Ht<Mt;++Ht)for(var rr=kt;rr<zt;++rr){var ur=!1,_r=Ht*at,Dr=(Ht+1)*at,Br=rr*ut,Ur=(rr+1)*ut;_r<this.row0&&(_r=this.row0,ur=!0),Dr>this.row1&&(Dr=this.row1,ur=!0),Br<this.column0&&(Br=this.column0,ur=!0),Ur>this.column1&&(Ur=this.column1,ur=!0);var Zr=new yt(_r,Dr,Br,Ur);Zr.rowsCount>0&&Zr.columnsCount>0&&ot(Ht,rr,Zr,ur)}return gt}},{key:"fork",value:function(at,ut,ot){for(var gt=this.row0,xt=this.row1,Mt=this.column0,kt=this.column1,zt=gt;zt<xt;++zt)for(var Ht=Mt;Ht<kt;++Ht)ot(zt,Ht,new yt(zt*at,(zt+1)*at,Ht*ut,(Ht+1)*ut));return new yt(this.row0*at,this.row1*at,this.column0*ut,this.column1*ut)}}],[{key:"rectToRange",value:function(at,ut){var ot=at.originX,gt=at.originY,xt=at.width,Mt=at.height,kt=ut.width,zt=ut.height,Ht=Math.floor(gt/zt),rr=Math.floor(ot/kt),ur=Math.floor((gt+Mt)/zt)+1,_r=Math.floor((ot+xt)/kt)+1;return new yt(Ht,ur,rr,_r)}},{key:"cellToRect",value:function(at,ut,ot){var gt=ot.width,xt=ot.height,Mt=ut*gt,kt=at*xt;return{originX:Mt,originY:kt,width:gt,height:xt}}},{key:"calcIntersection",value:function(at,ut){var ot=Math.max(at.row0,ut.row0),gt=Math.min(at.row1,ut.row1),xt=Math.max(at.column0,ut.column0),Mt=Math.min(at.column1,ut.column1);return ot<gt&&xt<Mt?new yt(ot,gt,xt,Mt):null}},{key:"calcDiff",value:function(at,ut){var ot=this.calcIntersection(at,ut);return{addedRange:at.excludeForEach(ut),removedRange:ut.excludeForEach(at),keepRange:ot?{forEach:ot.forEach}:_D}}},{key:"isEquals",value:function(at,ut){return at.row0===ut.row0&&at.row1===ut.row1&&at.column0===ut.column0&&at.column1===ut.column1}}]),yt})(),NT=(function(){function yt(){Ot(this,yt),this.nodes={}}return Bt(yt,[{key:"get",value:function(at,ut){var ot,gt=yt.key(at,ut);return(ot=this.nodes[gt])==null?void 0:ot.element}},{key:"set",value:function(at,ut,ot){var gt=yt.key(at,ut);return this.nodes[gt]=Object.freeze({element:ot,row:at,column:ut,key:gt}),ot}},{key:"delete",value:function(at,ut){var ot=yt.key(at,ut),gt=this.nodes[ot];if(gt)return delete this.nodes[ot],gt.element}},{key:"fill",value:function(at){var ut=at.nodes;for(var ot in ut)this.nodes[ot]=ut[ot]}},{key:"clear",value:function(at){if(at)for(var ut in this.nodes)at(this.nodes[ut].element);this.nodes={}}},{key:"forEach",value:function(at){for(var ut in this.nodes){var ot=this.nodes[ut];at(ot.element,ot.row,ot.column)}}}],[{key:"key",value:function(at,ut){return"".concat(at,":").concat(ut)}}]),yt})();function P0(yt,ct){if(tr(yt)!=tr(ct))return!1;if(tr(yt)!="object"||yt===null)return yt===ct;if(yt.constructor!==ct.constructor)return!1;if(yt.constructor===Object){for(var at in yt)if(at in ct){if(!P0(yt[at],ct[at]))return!1}else return!1;for(var ut in ct)if(!(ut in yt))return!1;return!0}else if(yt.constructor===Array){var ot=yt,gt=ct;if(ot.length===gt.length){for(var xt=0;xt<ot.length;++xt)if(!P0(yt[xt],ct[xt]))return!1}else return!1;return!0}else return!0}function km(yt){for(var ct in yt)return!0;return!1}var kw=(function(){function yt(ct){Ot(this,yt),this.rate=ct.rate,this.bucketUnitSize=Object.freeze(Ll({},ct.bucketUnitSize)),this.favorBucketsCount=ct.favorBucketsCount,this.tree=ct.tree,this.visions=ct.visions,this.bucketFactory=ct.bucketFactory,this.visibleNodes=this.initVisibleNodes(this.visions),this.toScreenPoint=ct.toScreenPoint,this.onLeafNodeVisible=ct.onLeafNodeVisible,this.onLeafNodeInvisible=ct.onLeafNodeInvisible,this.visionCover=this.calcVisionCover(ct.visionRectangle),this._projectiveSize=this.calcProjectiveSize(this.visionCover,ct.scale),this.buckets=new NT,this.searchAndFillVisibleNodes(this.visionCover.range,this._projectiveSize,this.visionCover.unitSize,ct.ratio)}return Bt(yt,[{key:"projectiveSize",get:function(){return this._projectiveSize}},{key:"unitSize",get:function(){return this.visionCover.unitSize}},{key:"range",get:function(){return this.visionCover.range}},{key:"forEachBuckets",value:function(at){this.buckets.forEach(at)}},{key:"bucket",value:function(at,ut){return this.buckets.get(at,ut)}},{key:"update",value:function(at){var ut=this;this.refreshVisibleNodes(at.diff);var ot=this.updateVision(at),gt=ot.addedRange,xt=ot.keepRange,Mt=ot.projectiveSize,kt=Ll({},at.updateSet),zt=!!at.dirtyCells,Ht=[];return xt.forEach(function(rr,ur){var _r=ut.buckets.get(rr,ur),Dr=ut.appendDiff(rr,ur,_r,at,zt),Br=Dr.movedLeaves,Ur=Dr.touchedLeaves;Ur&&Ht.push({row:rr,column:ur,touchedLeaves:Ur}),Object.assign(kt,Br)}),gt.forEach(function(rr,ur){var _r,Dr=ut.buckets.get(rr,ur),Br=Dr.collectLeaves(),Ur=ut.createProjectiveRect(rr,ur,ut.visionCover.unitSize,Mt);(_r=at.dirtyCells)==null||_r.collect(rr,ur),Object.assign(kt,Br),Dr.updateProjectiveRect(Ur,at.ratio,at.refresh)}),xt.forEach(function(rr,ur){var _r=ut.buckets.get(rr,ur),Dr=ut.createProjectiveRect(rr,ur,ut.visionCover.unitSize,Mt);_r.updateProjectiveRect(Dr,at.ratio,at.refresh),_r.handleUpdatedLeaves(kt),_r.fuseChunksWithNeighbours(),_r.increaseChunksLife()}),at.shouldUpdateAll&&this.forEachBuckets(function(rr){return rr.notifyGlobalUpdate()}),this.callbackLeavesVisible(at),Ht}},{key:"initVisibleNodes",value:function(at){var ut={};return at.forEach(function(ot){ut[ot.id]=ot}),ut}},{key:"refreshVisibleNodes",value:function(at){var ut=at.addedSet,ot=at.removedSet;for(var gt in ut)this.visibleNodes[gt]=ut[gt];for(var xt in ot)delete this.visibleNodes[xt]}},{key:"updateVision",value:function(at){var ut=_D,ot=this.visionCover.range,gt=null;if(at.visionRectangle){var xt=this.calcVisionCover(at.visionRectangle,this.visionCover.exponent),Mt=this.calcProjectiveSize(xt,at.scale);if(!yt.isVisionCoversEquals(xt,this.visionCover)){var kt=this.forkOrMegeAndGetRangeDiff(xt,Mt);this.searchAndFillVisibleNodes(kt.addedRange,Mt,xt.unitSize,at.scale),this.visionCover=xt,ut=kt.addedRange,ot=kt.keepRange}P0(Mt,this._projectiveSize)||(this._projectiveSize=Mt,gt=Mt)}return gt||(gt=this._projectiveSize),{addedRange:ut,keepRange:ot,projectiveSize:gt}}},{key:"forkOrMegeAndGetRangeDiff",value:function(at,ut){var ot=this,gt,xt=at.exponent-this.visionCover.exponent;if(xt>0){var Mt=Math.pow(this.rate,xt),kt=new NT,zt=[],Ht=this.visionCover.range.merge(Mt,Mt,function(Ur,Zr,Tn,jn){if(at.range.includes(Ur,Zr))if(jn)zt.push({row:Ur,column:Zr});else{var ts=ot.bucketFactory.merge(ot.buckets,{range:Tn,unitSize:at.unitSize,projectiveRect:ot.createProjectiveRect(Ur,Zr,at.unitSize,ut)});kt.set(Ur,Zr,ts)}});if(gt=x_.calcDiff(at.range,Ht),zt.length>0){var rr=uI(gt.addedRange,zt),ur=xD(gt.keepRange,zt);gt=Zm(Ll({},gt),{addedRange:rr,keepRange:ur})}this.buckets.forEach(function(Ur){return Ur.dispose()}),this.buckets=kt}else if(xt<0){var _r=Math.pow(this.rate,Math.abs(xt)),Dr=new NT,Br=this.visionCover.range.fork(_r,_r,function(Ur,Zr,Tn){var jn=x_.calcIntersection(Tn,at.range),ts=ot.buckets.get(Ur,Zr);if(jn&&ts){var us=ot.bucketFactory.fork(ts,{range:jn,unitSize:at.unitSize,projectiveRect:ot.createProjectiveRect(Ur,Zr,at.unitSize,ut)});Dr.fill(us)}});gt=x_.calcDiff(at.range,Br),this.buckets.forEach(function(Ur){return Ur.dispose()}),this.buckets=Dr}else gt=x_.calcDiff(at.range,this.visionCover.range),gt.removedRange.forEach(function(Ur,Zr){var Tn;(Tn=ot.buckets.delete(Ur,Zr))==null||Tn.dispose()});return gt}},{key:"searchAndFillVisibleNodes",value:function(at,ut,ot,gt){var xt=this,Mt=null;at.forEach(function(kt,zt){if(!Mt){Mt={};for(var Ht in xt.visibleNodes){var rr=xt.rangeOfLeafNode(xt.visibleNodes[Ht],ot);rr&&(Mt[Ht]=rr)}}var ur=x_.cellToRect(kt,zt,ot),_r=xt.createProjectiveRect(kt,zt,ot,ut),Dr=xt.bucketFactory.build(xt.tree,gt,ur,_r,function(Br){var Ur=Mt[Br.id];return!!(Ur&&Ur.includes(kt,zt))});xt.buckets.set(kt,zt,Dr)})}},{key:"createProjectiveRect",value:function(at,ut,ot,gt){var xt=this.toScreenPoint(at,ut,ot);return{originX:xt.x,originY:xt.y,width:gt.width,height:gt.height}}},{key:"appendDiff",value:function(at,ut,ot,gt,xt){var Mt=gt.diff,kt=gt.moveSet,zt=Mt,Ht=zt.addedSet,rr=this.visionCover.unitSize,ur=[],_r=[],Dr=[];for(var Br in Ht){var Ur=this.rangeOfLeafNode(Ht[Br],rr);Ur&&!Ur.includes(at,ut)&&ur.push(Br)}var Zr={};for(var Tn in kt){var jn=kt[Tn],ts=this.rangeOfLeafNode(jn,rr);if(ts){var us=ot.has(Tn),Os=ts.includes(at,ut);us&&Os?Zr[Tn]=jn:us&&!Os?Dr.push(jn):!us&&Os&&_r.push(jn)}}var Hs=xt?{}:null;if(ur.length>0||_r.length>0||Dr.length>0){if(Hs){var Ks=Jt(ur),so;try{for(Ks.s();!(so=Ks.n()).done;){var To=so.value;Hs[To]=!0}}catch(Uv){Ks.e(Uv)}finally{Ks.f()}var Oo=Jt(_r),Au;try{for(Oo.s();!(Au=Oo.n()).done;){var Tu=Au.value;Hs[Tu.id]=!0}}catch(Uv){Oo.e(Uv)}finally{Oo.f()}var xu=Jt(Dr),yu;try{for(xu.s();!(yu=xu.n()).done;){var sp=yu.value;Hs[sp.id]=!0}}catch(Uv){xu.e(Uv)}finally{xu.f()}}Mt=Mt.decorate({maskAdded:ur,insertToAdded:_r,insertToRemoved:Dr})}if(Hs){for(var Jl in Zr)Hs[Jl]=!0;for(var Ml in gt.updateSet)Hs[Ml]=!0;for(var Qp in gt.diff.sortedSet)Hs[Qp]=!0;for(var pm in gt.diff.removedSet)Hs[pm]=!0;km(Hs)||(Hs=null)}return ot.appendDiff(Mt),{movedLeaves:Zr,touchedLeaves:Hs}}},{key:"isLeavesTouchBucket",value:function(at,ut){var ot=!1;for(var gt in ut)if(at.has(gt)){ot=!0;break}return ot}},{key:"callbackLeavesVisible",value:function(at){var ut=at.diff,ot=ut.addedSet,gt=ut.removedSet;for(var xt in ot)this.onLeafNodeVisible(ot[xt]);for(var Mt in gt)this.onLeafNodeInvisible(gt[Mt])}},{key:"calcVisionCover",value:function(at,ut){var ot=at.width*at.height;ot===0&&(ot=1);var gt=this.rate,xt=this.favorBucketsCount,Mt=this.bucketUnitSize,kt=Mt.width*Mt.height,zt=Math.log(ot/(xt*kt))/(2*Math.log(gt));if(ut===void 0)zt=Math.ceil(zt);else{var Ht=ut+yt.ExponentBuffer,rr=ut-1-yt.ExponentBuffer;zt>Ht||zt<rr?zt=Math.ceil(zt):zt=ut}var ur=Math.pow(gt,zt),_r=Object.freeze({width:Mt.width*ur,height:Mt.height*ur}),Dr=x_.rectToRange(at,_r);return Object.freeze({exponent:zt,range:Dr,unitSize:_r})}},{key:"calcProjectiveSize",value:function(at,ut){var ot=at.unitSize,gt=ot.width,xt=ot.height;return Object.freeze({width:Math.ceil(gt*ut),height:Math.ceil(xt*ut)})}},{key:"rangeOfLeafNode",value:function(at,ut){var ot=this.visions.vision(at.id);return ot?x_.rectToRange(ot.sceneRect,ut):null}}],[{key:"isVisionCoversEquals",value:function(at,ut){return at.exponent===ut.exponent&&at.unitSize.width===ut.unitSize.width&&at.unitSize.height===ut.unitSize.height&&x_.isEquals(at.range,ut.range)}}]),yt})(),SD=kw;SD.ExponentBuffer=.25;var wD=(function(){function yt(ct,at,ut,ot,gt,xt){var Mt=this;Ot(this,yt),this.touch=function(){Mt.onRepaint(Mt.leaf.value)},this.screen=ct,this.visions=at,this.id=ut.id,this.leaf=ut,this.fixedSize=ot,this.render=gt,this.onRepaint=xt}return Bt(yt,[{key:"refreshPayload",value:function(){this.render.updatePayload(this.leaf.value.payload)}},{key:"updateContext",value:function(at){this.render.updateContext(at)}},{key:"paint",value:function(at,ut,ot){var gt=this.leaf.value,xt=this.visions.vision(this.leaf.id),Mt=this.createPaintParams(at,xt,gt,ut,ot),kt=xt.screenRect.originX,zt=xt.screenRect.originY;if(ot&&(kt-=ot.originX,zt-=ot.originY),at.translate(kt,zt),this.fixedSize){var Ht=xt.scale;if(Ht!==1&&at.scale(Ht,Ht),xt.rotation!==void 0){var rr=xt.sceneRect,ur=rr.width,_r=rr.height,Dr=ur/2,Br=_r/2;at.translate(Dr,Br),at.rotate(xt.rotation),at.translate(-Dr,-Br)}}this.render.paint(Mt)}},{key:"remove",value:function(){this.render.remove()}},{key:"createPaintParams",value:function(at,ut,ot,gt,xt){var Mt,kt,zt,Ht=ut.screenRect,rr=this.touch,ur=this.createTailor(ut,xt);if(this.fixedSize){zt=ut.scale,kt={width:ot.width,height:ot.height};var _r=ut.scale,Dr=ut.margin,Br=Ht.width/_r-kt.width,Ur=Ht.height/_r-kt.height,Zr=Br/(Dr.left+Dr.right),Tn=Ur/(Dr.top+Dr.bottom);Mt={left:Dr.left*Zr,right:Dr.right*Zr,top:Dr.top*Tn,bottom:Dr.bottom*Tn}}else zt=ut.scale,Mt=ut.margin,kt={width:Ht.width-Mt.left-Mt.right,height:Ht.height-Mt.top-Mt.bottom};var jn={context:at,margin:Mt,scale:zt,size:kt,tailor:ur,paintingMode:gt,touch:rr,screen:this.screen},ts=this.createFakeScreenRect(kt,ur);return jn.screenSize=ts,jn.screenRect=ts,jn}},{key:"createTailor",value:function(at,ut){var ot=at.tailor,gt=ot.left,xt=ot.top,Mt=ot.right,kt=ot.bottom;if(ut){var zt=at.screenRect,Ht=zt.originX,rr=zt.originY,ur=Ht+zt.width,_r=rr+zt.height,Dr=Ht+gt,Br=rr+xt,Ur=ur-Mt,Zr=_r-kt;Dr=Math.max(Dr,ut.originX),Br=Math.max(Br,ut.originY),Ur=Math.min(Ur,ut.originX+ut.width),Zr=Math.min(Zr,ut.originY+ut.width),gt=Dr-Ht,xt=Br-rr,Mt=ur-Ur,kt=_r-Zr}if(this.fixedSize){var Tn=at.scale;gt/=Tn,xt/=Tn,Mt/=Tn,kt/=Tn}return{left:gt,top:xt,right:Mt,bottom:kt}}},{key:"createFakeScreenRect",value:function(at,ut){var ot=ut.left,gt=ut.top,xt=at.width-ut.right,Mt=at.height-ut.bottom;return{originX:ot,originY:gt,width:xt-ot,height:Mt-gt}}}]),yt})(),TD=(function(){function yt(ct){Ot(this,yt),this.nodes=null,this.id="".concat(yt.nextId+=1),this.life=0,this.context=ct}return Bt(yt,[{key:"isFuseable",get:function(){return this.life>=yt.fuseThreshold}},{key:"isFloat",get:function(){var at;return this.life<yt.floatThreshold&&((at=this.nodes)==null?void 0:at.length)===1}},{key:"onBeforeFuse",value:function(at,ut){}},{key:"onSplit",value:function(){}},{key:"onRemoved",value:function(){}},{key:Symbol.iterator,value:function(){return new nS(this.getNodes())}},{key:"previousChunk",get:function(){var at,ut;return((ut=(at=this.getNodes()[0])==null?void 0:at.previousNode)==null?void 0:ut.value)||null}},{key:"nextChunk",get:function(){var at,ut,ot=this.getNodes();return((ut=(at=ot[ot.length-1])==null?void 0:at.nextNode)==null?void 0:ut.value)||null}},{key:"getSampleNode",value:function(){return this.nodes&&this.nodes.length>0?this.nodes[0]:null}},{key:"initWithNode",value:function(at){if(this.nodes)throw new Error("it is not init chunk");return this.nodes=[at],at.value=this,this}},{key:"initWithShadowList",value:function(at){if(this.nodes)throw new Error("it is not init chunk");this.nodes=[];var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this.nodes.push(gt),gt.value=this}}catch(xt){ut.e(xt)}finally{ut.f()}return this}},{key:"increaseLife",value:function(){var at=this;this.life<yt.floatThreshold&&this.watchIsFloatUpdate(function(){at.life+=1})}},{key:"cutOff",value:function(at,ut){var ot=this;return this.watchIsFloatUpdate(function(){var gt=ot.getNodes(),xt=gt.indexOf(at),Mt=gt.indexOf(ut);if(xt===-1)throw new Error("cannot find begin node id=".concat(at.id," to cut off"));if(Mt===-1)throw new Error("cannot find end node id=".concat(at.id," to cut off"));var kt=gt.splice(Mt),zt=ot.createChunkWithNodes(kt),Ht=gt.splice(0,xt+1);return{left:ot.createChunkWithNodes(Ht),right:zt,becomeBlank:gt.length===0}})}},{key:"split",value:function(at){var ut=this;return this.watchIsFloatUpdate(function(){var ot=ut.getNodes(),gt=ot.indexOf(at),xt=null,Mt=null;if(gt===-1)throw new Error("cannot find node id=".concat(at.id," to split"));if(gt<ot.length-1){var kt=ot.splice(gt+1);xt=ut.createChunkWithNodes(kt)}if(gt>0){var zt=ot.splice(0,gt);Mt=ut.createChunkWithNodes(zt)}return ut.onSplit(),{left:Mt,right:xt}})}},{key:"createChunkWithNodes",value:function(at){var ut=this.context.create();ut.nodes=at;var ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt.value=ut}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut.isFloat&&ut.context.bind(ut,at[0].related),ut}},{key:"findFuseNeighboursBeforeMe",value:function(){for(var at=this,ut=[];at&&(at=at.previousChunk,!!at?.isFuseable);)ut.unshift(at);return ut}},{key:"findFuseNeighboursAfterMe",value:function(){for(var at=this,ut=[];at&&(at=at.nextChunk,!!at?.isFuseable);)ut.push(at);return ut}},{key:"unshift",value:function(at){var ut=at.nodes;if(ut){var ot;(ot=this.getNodes()).unshift.apply(ot,Ct(ut));var gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt.value=this}}catch(kt){gt.e(kt)}finally{gt.f()}}}},{key:"push",value:function(at){var ut=at.nodes;if(ut){var ot;(ot=this.getNodes()).push.apply(ot,Ct(ut));var gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt.value=this}}catch(kt){gt.e(kt)}finally{gt.f()}}}},{key:"resetLife",value:function(){this.life=0}},{key:"dispose",value:function(){this.isFloat&&this.context.unbind(this,this.nodes[0].related),this.nodes=null,this.life=0,this.onRemoved()}},{key:"getNodes",value:function(){return this.nodes||(this.nodes=[]),this.nodes}},{key:"watchIsFloatUpdate",value:function(at){var ut=this.isFloat,ot=this.nodes&&this.nodes[0].related,gt=at(),xt=this.isFloat;return!ut&&xt?this.context.bind(this,this.nodes[0].related):ut&&!xt&&this.context.unbind(this,ot),gt}}],[{key:"fuseEachNeighbours",value:function(at){var ut=[],ot={};for(var gt in at)ot[gt]||(function(){ot[gt]=!0;var xt=at[gt];xt.isFuseable&&xt.watchIsFloatUpdate(function(){var Mt=xt.findFuseNeighboursBeforeMe(),kt=xt.findFuseNeighboursAfterMe();(Mt.length>0||kt.length>0)&&(xt.life=0,xt.onBeforeFuse(Mt,kt));for(var zt=Mt.length-1;zt>=0;zt--)xt.unshift(Mt[zt]);var Ht=Jt(Mt),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;ot[ur.id]=!0,ut.push(ur)}}catch(Ur){Ht.e(Ur)}finally{Ht.f()}var _r=Jt(kt),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value;xt.push(Br),ot[Br.id]=!0,ut.push(Br)}}catch(Ur){_r.e(Ur)}finally{_r.f()}})})();return ut}}]),yt})(),H_=TD;H_.fuseThreshold=4,H_.floatThreshold=5,H_.nextId=0;var nS=(function(){function yt(ct){Ot(this,yt),this.nodes=ct,this.index=0}return Bt(yt,[{key:"next",value:function(){var at;return this.index<this.nodes.length?(at={value:this.nodes[this.index],done:!1},this.index+=1):at={value:void 0,done:!0},at}}]),yt})();function XA(){return new N0({},{},{})}var K1=(function(){function yt(ct){Ot(this,yt),this.addedSet={},this.sortedSet={},this.removedSet={},this.id="".concat(yt.nextId),this.releaser=ct,yt.nextId+=1}return Bt(yt,[{key:"fetchDiff",value:function(){var at=new N0(this.addedSet,this.sortedSet,this.removedSet);return this.addedSet={},this.sortedSet={},this.removedSet={},at}},{key:"release",value:function(){this.releaser(this.id)}},{key:"markAdded",value:function(at){this.addedSet[at.id]=at,delete this.sortedSet[at.id],delete this.removedSet[at.id]}},{key:"markSorted",value:function(at){this.addedSet[at.id]||(this.sortedSet[at.id]=at)}},{key:"markRemoved",value:function(at){this.removedSet[at.id]=at,delete this.addedSet[at.id],delete this.sortedSet[at.id]}}]),yt})(),Xc=K1;Xc.nextId=0;var N0=(function(){function yt(ct,at,ut){Ot(this,yt),this.addedSet=ct,this.sortedSet=at,this.removedSet=ut}return Bt(yt,[{key:"isBlank",get:function(){return!km(this.addedSet)&&!km(this.sortedSet)&&!km(this.removedSet)}},{key:"decorate",value:function(at){var ut=at.insertToAdded,ot=at.insertToRemoved,gt=at.maskAdded,xt=null,Mt=null;if(ut&&ut.length>0){xt=Ll({},this.addedSet);var kt=Jt(ut),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value;xt[Ht.id]=Ht}}catch(Zr){kt.e(Zr)}finally{kt.f()}}if(gt&&gt.length>0){xt=xt||Ll({},this.addedSet);var rr=Jt(gt),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value;delete xt[_r]}}catch(Zr){rr.e(Zr)}finally{rr.f()}}if(ot&&ot.length>0){Mt=Ll({},this.removedSet);var Dr=Jt(ot),Br;try{for(Dr.s();!(Br=Dr.n()).done;){var Ur=Br.value;Mt[Ur.id]=Ur}}catch(Zr){Dr.e(Zr)}finally{Dr.f()}}return xt=xt||this.addedSet,Mt=Mt||this.removedSet,new yt(xt,this.sortedSet,Mt)}}],[{key:"createInsertDiff",value:function(at){var ut={},ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;ut[xt.id]=xt}}catch(Mt){ot.e(Mt)}finally{ot.f()}return new yt(ut,{},{})}}]),yt})(),l0=(function(){function yt(ct){Ot(this,yt);var at={},ut=Jt(ct),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at[gt.id]={leaf:gt,nex:null}}}catch(xt){ut.e(xt)}finally{ut.f()}this.nodes=at,this.leaves=ct}return Bt(yt,[{key:"sort",value:function(){this.leaves.splice(0);for(var at in this.nodes){var ut=this.nodes[at],ot=this.findNextNode(ut);ot&&(ut.nex=ot,delete this.nodes[ot.leaf.id])}for(var gt in this.nodes)for(var xt=this.nodes[gt];xt;)this.leaves.push(xt.leaf),xt=xt.nex;return this.leaves}},{key:"findNextNode",value:function(at){for(var ut=at.leaf.nexLeaf();ut;){var ot=this.nodes[ut.id];if(ot)return ot;ut=ut.nexLeaf()}return null}}]),yt})(),YA=(function(){function yt(ct,at){Ot(this,yt),this.par=null,this.pre=null,this.nex=null,this.tree=ct,this.value=at,this.id=String(yt.nextId),yt.nextId+=1}return Bt(yt,[{key:"parent",get:function(){return this.par}},{key:"assertBlank",value:function(at){if(this.assertBelongsTo(at),this.par||this.pre||this.nex)throw new Error("node is not empty")}},{key:"assertAddedTo",value:function(at){if(this.assertBelongsTo(at),this.isFreeNode())throw new Error("this node did not add to any tree")}},{key:"assertBelongsTo",value:function(at){if(this.tree!==at)throw new Error("this node is belongs to another tree")}},{key:"isFreeNode",value:function(){return this.par===null}},{key:"preLeaf",value:function(){return this.pre?this.pre.lastLeaf():this.par?this.par.preLeaf():null}},{key:"nexLeaf",value:function(){return this.nex?this.nex.firstLeaf():this.par?this.par.nexLeaf():null}}]),yt})(),BE=YA;BE.nextId=0;var Ip=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot){return Ot(this,at),ct.call(this,ut,ot)}return Bt(at,[{key:"firstLeaf",value:function(){return this}},{key:"lastLeaf",value:function(){return this}}]),at})(BE),QA=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot){var gt,xt;Ot(this,at),xt=ct.call(this,ut,ot),xt.fir=null,xt.las=null,xt.forEachLeaves=function(kt){for(var zt=xt.fir;zt;)zt instanceof Ip?kt(zt):zt.forEachLeaves(kt),zt=zt.nex};var Mt=(gt={},rt(gt,Symbol.iterator,function(){return new GS(Kt(xt))}),rt(gt,"forEach",xt.forEachLeaves),gt);return xt.leaves=Object.freeze(Mt),xt}return Bt(at,[{key:Symbol.iterator,value:function(){return new KA(this.fir)}},{key:"nodes",get:function(){for(var ot=[],gt=this.fir;gt;)ot.push(gt),gt=gt.nex;return ot}},{key:"assertBlank",value:function(ot){if(st(Ut(at.prototype),"assertBlank",this).call(this,ot),this.fir||this.las)throw new Error("node is not empty")}},{key:"firstLeaf",value:function(){for(var ot=this.fir;ot;){var gt=ot.firstLeaf();if(gt)return gt;ot=ot.nex}return null}},{key:"lastLeaf",value:function(){for(var ot=this.las;ot;){var gt=ot.lastLeaf();if(gt)return gt;ot=ot.pre}return null}},{key:"forEach",value:function(ot){for(var gt=this.fir;gt;)ot(gt),gt=gt.nex}},{key:"isFreeNode",value:function(){return st(Ut(at.prototype),"isFreeNode",this).call(this)&&this!==this.tree.root}}]),at})(BE),KA=(function(){function yt(ct){Ot(this,yt),this.node=ct}return Bt(yt,[{key:"next",value:function(){var at;return this.node?(at={value:this.node,done:!1},this.node=this.node.nex):at={value:void 0,done:!0},at}}]),yt})(),GS=(function(){function yt(ct){Ot(this,yt),this.node=ct.firstLeaf(),this.lastLeaf=ct.lastLeaf()}return Bt(yt,[{key:"next",value:function(){var at;return this.node?(at={value:this.node,done:!1},this.node===this.lastLeaf?this.node=null:this.node=this.node.nexLeaf()):at={value:void 0,done:!0},at}}]),yt})(),lI=(function(){function yt(ct){Ot(this,yt),this.bufferMap={},this._root=new QA(this),ct&&ct(this)}return Bt(yt,[{key:"root",get:function(){return this._root}},{key:"createDiffBuffer",value:function(){var at=this,ut=new Xc(function(ot){return delete at.bufferMap[ot]});return this.bufferMap[ut.id]=ut,ut}},{key:"wrapLeaf",value:function(at){return new Ip(this,at)}},{key:"wrapGroup",value:function(at){return new QA(this,at)}},{key:Symbol.iterator,value:function(){return this._root.leaves[Symbol.iterator]()}},{key:"forEach",value:function(at){return this._root.leaves.forEach(at)}},{key:"append",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._root,ot=at,gt=ut;ot.assertBlank(this),gt.assertAddedTo(this),this.appendTo(ot,gt),this.markAdded(ot)}},{key:"addAfter",value:function(at,ut){var ot=at,gt=ut;if(ot.assertBlank(this),gt.assertAddedTo(this),gt===this._root)throw new Error("cannot add after root");this.addAfterTo(ot,gt),this.markAdded(ot)}},{key:"addBefore",value:function(at,ut){var ot=at,gt=ut;if(ot.assertBlank(this),gt.assertAddedTo(this),gt===this._root)throw new Error("cannot add before root");this.addBeforeTo(ot,gt),this.markAdded(ot)}},{key:"remove",value:function(at){var ut=at;ut.assertAddedTo(this),this.removeFrom(ut),this.markRemoved(ut)}},{key:"moveAppend",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._root,ot=at,gt=ut;ot.assertAddedTo(this),gt.assertAddedTo(this),this.removeFrom(ot),this.appendTo(ot,gt),this.markSorted(ot)}},{key:"moveAfter",value:function(at,ut){var ot=at,gt=ut;ot.assertAddedTo(this),gt.assertAddedTo(this),this.removeFrom(ot),this.addAfterTo(ot,gt),this.markSorted(ot)}},{key:"moveBefore",value:function(at,ut){var ot=at,gt=ut;ot.assertAddedTo(this),gt.assertAddedTo(this),this.removeFrom(ot),this.addBeforeTo(ot,gt),this.markSorted(ot)}},{key:"appendTo",value:function(at,ut){at.par=ut,ut.las?(at.pre=ut.las,ut.las.nex=at,ut.las=at):(ut.fir=at,ut.las=at)}},{key:"addAfterTo",value:function(at,ut){var ot=ut.nex,gt=ut.par;if(!gt)throw new Error("cannot add after root");at.pre=ut,at.nex=ot,at.par=gt,ut.nex=at,ot&&(ot.pre=at),gt.las===ut&&(gt.las=at)}},{key:"addBeforeTo",value:function(at,ut){var ot=ut.pre,gt=ut.par;if(!gt)throw new Error("cannot add before root");at.nex=ut,at.pre=ot,at.par=gt,ut.pre=at,ot&&(ot.nex=at),gt.fir===ut&&(gt.fir=at)}},{key:"removeFrom",value:function(at){var ut=at.pre,ot=at.nex,gt=at.par;if(!gt)throw new Error("cannot remove root");ut&&(ut.nex=ot),ot&&(ot.pre=ut),gt.fir===at&&(gt.fir=ot),gt.las===at&&(gt.las=ut),at.par=null,at.pre=null,at.nex=null}},{key:"sortLeaves",value:function(at){return at.length<=1?at:new l0(at).sort()}},{key:"sort",value:function(at,ut){var ot=at;ot.assertAddedTo(this);var gt=ot.nodes,xt=Ct(gt).sort(ut);this.rebuildList(ot,xt),this.checkAndMarkSorted(gt,xt)}},{key:"rebuildList",value:function(at,ut){ut.length>0&&(at.fir=ut[0],at.las=ut[ut.length-1]);for(var ot=null,gt=0;gt<ut.length;++gt){var xt=ut[gt];ot&&(ot.nex=xt),xt.pre=ot,ot=xt}ot&&(ot.nex=null)}},{key:"checkAndMarkSorted",value:function(at,ut){for(var ot={},gt={},xt=0;xt<at.length;++xt){var Mt=at[xt];ot[Mt.id]=xt}var kt=[],zt=!1,Ht=null,rr=0,ur=-1,_r=Jt(ut),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value,Ur=ot[Br.id];if(Ht){var Zr=!1,Tn=Ht.length,jn=Ht[Tn-1];if(Ur<=jn)Zr=!0;else switch(Ht.length){case 0:break;case 1:{zt=Ur===jn+1;break}default:{Ur===jn+1!==zt&&(Zr=!0);break}}Zr?(kt.push(Ht),Ht.length>rr&&(rr=Ht.length,ur=kt.length-1),Ht=[Ur]):Ht.push(Ur)}else Ht=[Ur]}}catch(pm){_r.e(pm)}finally{_r.f()}if(Ht&&(kt.push(Ht),Ht.length>rr&&(rr=Ht.length,ur=kt.length-1)),ur!==-1){for(var ts=kt[ur],us=ts[0],Os=ts[ts.length-1],Hs=ur-1;Hs>=0;Hs--){var Ks=kt[Hs];if(Ks[Ks.length-1]<us)us=Ks[0];else{var so=Jt(Ks),To;try{for(so.s();!(To=so.n()).done;){var Oo=To.value,Au=at[Oo];gt[Au.id]=Au}}catch(pm){so.e(pm)}finally{so.f()}}}for(var Tu=ur+1;Tu<kt.length;Tu++){var xu=kt[Tu];if(xu[0]>Os)Os=xu[xu.length-1];else{var yu=Jt(xu),sp;try{for(yu.s();!(sp=yu.n()).done;){var Jl=sp.value,Ml=at[Jl];gt[Ml.id]=Ml}}catch(pm){yu.e(pm)}finally{yu.f()}}}}for(var Qp in gt)this.markSorted(gt[Qp])}},{key:"markAdded",value:function(at){for(var ut in this.bufferMap){var ot=this.bufferMap[ut];if(at instanceof Ip)ot.markAdded(at);else{var gt=Jt(at.leaves),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot.markAdded(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}}}}},{key:"markSorted",value:function(at){for(var ut in this.bufferMap){var ot=this.bufferMap[ut];if(at instanceof Ip)ot.markSorted(at);else{var gt=Jt(at.leaves),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot.markSorted(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}}}}},{key:"markRemoved",value:function(at){for(var ut in this.bufferMap){var ot=this.bufferMap[ut];if(at instanceof Ip)ot.markRemoved(at);else{var gt=Jt(at.leaves),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot.markRemoved(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}}}}}]),yt})(),Cx=(function(){function yt(ct){Ot(this,yt),this.pre=null,this.nex=null,this.id=ct.id,this.related=ct}return Bt(yt,[{key:"previousNode",get:function(){return this.pre}},{key:"nextNode",get:function(){return this.nex}}]),yt})(),Ow=(function(){function yt(ct){Ot(this,yt),this.nodesSet={},this._length=0,this.fir=null,this.las=null,this.valueInitializer=ct}return Bt(yt,[{key:"length",get:function(){return this._length}},{key:"firstNode",get:function(){return this.fir}},{key:"node",value:function(at){return this.nodesSet[at]||null}},{key:"findNode",value:function(at){for(var ut=this.fir;ut&&!at(ut);)ut=ut.nex;return ut}},{key:Symbol.iterator,value:function(){return new cI(this.fir)}},{key:"forEach",value:function(at){for(var ut=this.fir;ut;)at(ut),ut=ut.nex}},{key:"appendDiff",value:function(at){var ut=[],ot=[],gt=[];for(var xt in at.removedSet){var Mt=this.nodesSet[xt];Mt&&(this.removeNode(Mt),delete this.nodesSet[xt],ut.push(Mt),this._length-=1)}for(var kt in at.sortedSet){var zt=this.nodesSet[kt];zt&&!at.addedSet[kt]&&(this.removeNode(zt),gt.push(zt))}for(var Ht in at.addedSet)if(!this.nodesSet[Ht]){var rr=at.addedSet[Ht],ur=new Cx(rr);ur.value=this.valueInitializer(ur),this.nodesSet[Ht]=ur,ot.push(ur),this._length+=1}for(var _r=0,Dr=ot;_r<Dr.length;_r++){var Br=Dr[_r];this.addNode(Br)}for(var Ur=0,Zr=gt;Ur<Zr.length;Ur++){var Tn=Zr[Ur];this.addNode(Tn)}return{removedNodes:ut,addedNodes:ot,sortedNodes:gt}}},{key:"filter",value:function(at){var ut=new yt(this.valueInitializer),ot=Jt(this),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(at(xt)){var Mt=xt.related,kt=xt.value,zt=new Cx(Mt);zt.value=kt,ut.appendNode(zt)}}}catch(Ht){ot.e(Ht)}finally{ot.f()}return ut}},{key:"removeNode",value:function(at){var ut=at.pre,ot=at.nex;ut&&(ut.nex=ot),ot&&(ot.pre=ut),this.fir===at&&(this.fir=ot),this.las===at&&(this.las=ut),at.pre=null,at.nex=null}},{key:"appendNode",value:function(at){this.las?(at.pre=this.las,this.las.nex=at,this.las=at):(this.fir=at,this.las=at),this.nodesSet[at.id]=at,this._length+=1}},{key:"addNode",value:function(at){var ut=this.findPreNode(at),ot=this.findNexNode(at);ut?(ut.nex=at,at.pre=ut):this.fir=at,ot?(ot.pre=at,at.nex=ot):this.las=at}},{key:"findPreNode",value:function(at){for(var ut=at.related.preLeaf();ut;){var ot=this.nodesSet[ut.id];if(ot)return ot;ut=ut.preLeaf()}return null}},{key:"findNexNode",value:function(at){for(var ut=at.related.nexLeaf();ut;){var ot=this.nodesSet[ut.id];if(ot)return ot;ut=ut.nexLeaf()}return null}}],[{key:"create",value:function(at){var ut=new yt(at.valueInitializer),ot=at.initLeafFilter||yt.alwaysTrue,gt=Jt(at.tree),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;if(ot(Mt)){var kt=new Cx(Mt);kt.value=ut.valueInitializer(kt),ut.appendNode(kt)}}}catch(zt){gt.e(zt)}finally{gt.f()}return ut}},{key:"alwaysTrue",value:function(){return!0}},{key:"merge",value:function(at){if(at.length>0){var ut=new yt(at[0].valueInitializer),ot=ut.nodesSet,gt=Jt(at),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.id,ur=Ht.related,_r=Ht.value;if(!ot[rr]){var Dr=new Cx(ur);Dr.value=_r,ot[rr]=Dr,ut._length+=1,ut.addNode(Dr)}}}catch(Br){kt.e(Br)}finally{kt.f()}}}catch(Br){gt.e(Br)}finally{gt.f()}return ut}else return null}}]),yt})(),cI=(function(){function yt(ct){Ot(this,yt),this.node=ct}return Bt(yt,[{key:"next",value:function(){var at;return this.node?(at={value:this.node,done:!1},this.node=this.node.nex):at={value:void 0,done:!0},at}}]),yt})(),ED=(function(){function yt(ct){Ot(this,yt),this.visions=ct}return Bt(yt,[{key:"build",value:function(at,ut,ot,gt,xt){var Mt,kt=this.canvasPool,zt=this.chunkContext,Ht=Ow.create({tree:at,initLeafFilter:xt??function(){return!1},valueInitializer:function(){return null}});if(xt&&Ht.length>0){var rr=zt.create().initWithShadowList(Ht);Mt=rt({},rr.id,rr),rr.isFloat&&zt.bind(rr,rr.getSampleNode().related)}return this.create({ratio:ut,canvasPool:kt,rectangle:ot,chunks:Mt,projectiveRect:gt,shadowList:Ht,chunkContext:zt})}},{key:"merge",value:function(at,ut){var ot=ut.range,gt=ut.unitSize,xt=ut.projectiveRect,Mt=[],kt=1;ot.forEach(function(Zr,Tn){var jn=at.get(Zr,Tn);Mt.push(jn.shadowList),kt=jn.ratio});var zt=this.canvasPool,Ht=this.chunkContext,rr=Ow.merge(Mt),ur={};if(rr.length>0){var _r=Ht.create().initWithShadowList(rr);ur[_r.id]=_r,_r.isFloat&&Ht.bind(_r,_r.getSampleNode().related)}var Dr=ot.row0*ot.rowsCount,Br=ot.column0*ot.columnsCount,Ur=x_.cellToRect(Dr,Br,gt);return this.create({ratio:kt,canvasPool:zt,rectangle:Ur,shadowList:rr,chunks:ur,projectiveRect:xt,chunkContext:Ht})}},{key:"fork",value:function(at,ut){var ot=this,gt=ut.range,xt=ut.unitSize,Mt=ut.projectiveRect,kt=this.canvasPool,zt=this.chunkContext,Ht={},rr=new NT;return at.shadowList.forEach(function(ur){var _r=ot.visions.vision(ur.related.id);if(_r){var Dr=x_.rectToRange(_r.sceneRect,xt);Ht[ur.id]=Dr}}),gt.forEach(function(ur,_r){var Dr=at.shadowList.filter(function(Zr){var Tn;return!!((Tn=Ht[Zr.id])!=null&&Tn.includes(ur,_r))}),Br={};if(Dr.length>0){var Ur=zt.create().initWithShadowList(Dr);Br[Ur.id]=Ur,zt.bind(Ur,Ur.getSampleNode().related)}rr.set(ur,_r,ot.create({canvasPool:kt,shadowList:Dr,chunks:Br,projectiveRect:Mt,chunkContext:zt,ratio:at.ratio,rectangle:x_.cellToRect(ur,_r,xt)}))}),rr}}]),yt})(),qw=(function(){function yt(ct){Ot(this,yt),this.id="".concat(yt.nextId+=1),this.chunkContext=ct.chunkContext,this.rectangle=ct.rectangle,this._ratio=ct.ratio,this._projectiveRect=ct.projectiveRect,this.shadowList=ct.shadowList,this.chunks=ct.chunks||{}}return Bt(yt,[{key:"ratio",get:function(){return this._ratio}},{key:"projectiveRect",get:function(){return this._projectiveRect}},{key:"firstChunk",get:function(){var at=this.shadowList.firstNode;return at?at.value:null}},{key:Symbol.iterator,value:function(){return new Lw(this.firstChunk)}},{key:"has",value:function(at){return this.shadowList.node(at)!==null}},{key:"findChunk",value:function(at){var ut=null,ot=this.shadowList.node(at.id);return ot&&(ut=this.findChunkByNode(ot)),ut}},{key:"collectLeaves",value:function(){var at={};for(var ut in this.chunks){var ot=Jt(this.chunks[ut]),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;at[xt.id]=xt.related}}catch(Mt){ot.e(Mt)}finally{ot.f()}}return at}},{key:"appendDiff",value:function(at){var ut=this.shadowList.appendDiff(at),ot=ut.removedNodes,gt=ut.addedNodes,xt=ut.sortedNodes,Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;this.removeNode(zt)}}catch(jn){Mt.e(jn)}finally{Mt.f()}var Ht=Jt(ot),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;this.removeNode(ur)}}catch(jn){Ht.e(jn)}finally{Ht.f()}var _r=Jt(gt),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value;this.addNode(Br)}}catch(jn){_r.e(jn)}finally{_r.f()}var Ur=Jt(xt),Zr;try{for(Ur.s();!(Zr=Ur.n()).done;){var Tn=Zr.value;this.addNode(Tn)}}catch(jn){Ur.e(jn)}finally{Ur.f()}}},{key:"removeNode",value:function(at){var ut=this.findChunkByNode(at);if(ut){var ot=this.chunkContext,gt=ut.split(at),xt=gt.left,Mt=gt.right;xt&&(this.chunks[xt.id]=xt,xt.isFloat&&ot.bind(xt,xt.getSampleNode().related)),Mt&&(this.chunks[Mt.id]=Mt,Mt.isFloat&&ot.bind(Mt,Mt.getSampleNode().related)),delete this.chunks[ut.id],ut.dispose()}}},{key:"addNode",value:function(at){var ut=this.chunkContext,ot=this.previousNode(at),gt=ot?.value,xt=this.nextNode(at),Mt=xt?.value;if(gt&&gt===Mt){var kt=gt,zt=kt.cutOff(ot,xt),Ht=zt.left,rr=zt.right,ur=zt.becomeBlank;this.chunks[Ht.id]=Ht,this.chunks[rr.id]=rr,Ht.isFloat&&ut.bind(Ht,Ht.getSampleNode().related),rr.isFloat&&ut.bind(rr,rr.getSampleNode().related),ur?(delete this.chunks[kt.id],kt.dispose()):kt.resetLife()}var _r=this.chunkContext.create().initWithNode(at);this.chunks[_r.id]=_r,ut.bind(_r,_r.getSampleNode().related)}},{key:"previousNode",value:function(at){for(var ut=at.previousNode;ut&&!ut.value;)ut=ut.previousNode;return ut}},{key:"nextNode",value:function(at){for(var ut=at.nextNode;ut&&!ut.value;)ut=ut.nextNode;return ut}},{key:"findChunkByNode",value:function(at){var ut=at.value,ot=null;if(ut&&(ot=this.chunks[ut.id],ot!==ut))throw new Error("invalid node");return ot}},{key:"handleUpdatedLeaves",value:function(at){for(var ut in at){var ot=this.shadowList.node(ut);if(ot?.value){var gt=ot.value,xt=gt.split(ot),Mt=xt.left,kt=xt.right,zt=this.chunkContext;Mt&&(this.chunks[Mt.id]=Mt,Mt.isFloat&&zt.bind(Mt,Mt.getSampleNode().related)),kt&&(this.chunks[kt.id]=kt,kt.isFloat&&zt.bind(kt,kt.getSampleNode().related)),gt.resetLife()}}}},{key:"fuseChunksWithNeighbours",value:function(){var at=this.chunks,ut=H_.fuseEachNeighbours(at),ot=Jt(ut),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;delete at[xt.id],xt.dispose()}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"increaseChunksLife",value:function(){var at=this.chunks;for(var ut in at)at[ut].increaseLife()}},{key:"updateProjectiveRect",value:function(at,ut,ot){this._ratio=ut,this._projectiveRect=Object.freeze({originX:at.originX,originY:at.originY,width:at.width,height:at.height})}},{key:"dispose",value:function(){var at={},ut=Jt(this.shadowList),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value,xt=gt.value;xt&&(at[xt.id]=xt)}}catch(kt){ut.e(kt)}finally{ut.f()}for(var Mt in at)at[Mt].dispose()}},{key:"notifyGlobalUpdate",value:function(){}}]),yt})(),ZA=qw;ZA.nextId=0;var Lw=(function(){function yt(ct){Ot(this,yt),this.chunk=ct,this.didTouchChunk={}}return Bt(yt,[{key:"next",value:function(){var at,ut;if(this.chunk){if(this.didTouchChunk[this.chunk.id])throw new Error("find duplicated chunk "+this.chunk.id);this.didTouchChunk[this.chunk.id]=this.chunk,ut={value:this.chunk,done:!1},this.chunk=(at=this.chunk.nextChunk)!=null?at:null}else ut={value:void 0,done:!0};return ut}}]),yt})(),AD=(function(){function yt(ct){Ot(this,yt),this.nodes={},this.factory=ct}return Bt(yt,[{key:"create",value:function(){return this.factory(this)}},{key:"forEachCandidateFloatNodes",value:function(at){for(var ut in this.nodes)at(this.nodes[ut].leaf)}},{key:"bind",value:function(at,ut){var ot=this.nodes[ut.id];ot||(ot=this.nodes[ut.id]={leaf:ut,chunks:{}}),ot.chunks[at.id]=at}},{key:"unbind",value:function(at,ut){var ot=this.nodes[ut.id];if(ot){var gt=ot.chunks;delete gt[at.id],km(gt)||delete this.nodes[ut.id]}}}]),yt})(),dI=(function(){function yt(){Ot(this,yt),this.refManager=new hI,this.pool=[]}return Bt(yt,[{key:"pull",value:function(){var at;if(this.pool.length===0){var ut=document.createElement("canvas"),ot=Ax(ut);at={canvas:ut,context:ot,size:{width:0,height:0}}}else at=this.pool.pop();return at}},{key:"push",value:function(at){this.pool.push(at)}},{key:"clear",value:function(){this.pool=[]}}]),yt})(),hI=(function(){function yt(){Ot(this,yt),this.refs={},this._length=0}return Bt(yt,[{key:"has",value:function(at){return at in this.refs}},{key:"set",value:function(at,ut){if(!this.has(at)){var ot={id:at,value:ut,prev:this.tail};this.tail?(this.tail.next=ot,this.tail=ot):this.head=this.tail=ot,this.refs[at]=ot,this._length+=1}}},{key:"delete",value:function(at){if(this.has(at)){var ut=this.refs[at],ot=ut.prev,gt=ut.next;ot?ot.next=gt:this.head=gt,gt?gt.prev=ot:this.tail=ot,delete this.refs[at],this._length-=1}}},{key:"shift",value:function(){var at=this.head;if(at)return this.delete(at.id),at.value}},{key:"length",get:function(){return this._length}}]),yt})(),fI=(function(){function yt(ct){Ot(this,yt),this.canvasPool=ct,this.id="".concat(yt.id+=1),this.value=null}return Bt(yt,[{key:"get",value:function(){return this.value}},{key:"transformTo",value:function(){var at=new yt(this.canvasPool);return at.value=this.value,this.value=null,at}},{key:"allocate",value:function(at){if(this.value)throw new Error("can not call allocate on non empty canvasRef!");var ut;if(this.canvasPool.refManager.length<yt.MaxRefsSize)ut=this.canvasPool.pull();else{var ot=this.canvasPool.refManager.shift();ut=ot.value,ot.value=null}this.value=ut,this.canvasPool.refManager.set(this.id,this);var gt=ut,xt=gt.canvas,Mt=gt.context,kt=ut.size=at,zt=kt.width,Ht=kt.height;return xt.width=zt,xt.height=Ht,Mt.resetTransform(),ut}},{key:"clear",value:function(){this.canvasPool.refManager.delete(this.id),this.value&&(this.canvasPool.push(this.value),this.value=null)}},{key:"isEmpty",value:function(){return this.value==null}},{key:"isSizeEquals",value:function(at){return!!this.value&&P0(this.value.size,at)}}]),yt})(),Fw=fI;Fw.MaxRefsSize=64,Fw.id=0;var jE=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,gt),Mt.ratio=1,Mt.cacheSize=at.initCacheSize,Mt.didCacheSizeUpdated=!1,Mt.projectiveRect=at.initProjectiveReact,Mt.painter=ut,Mt.statistical=xt,Mt.canvasPool=ot,Mt.canvasRef=new Fw(ot),Mt}return Bt(at,[{key:"onSplit",value:function(){var ot;this.canvasRef.clear(),(ot=this.statistical)==null||ot.recordSplit()}},{key:"onRemoved",value:function(){this.canvasRef.clear()}},{key:"updatePaintingInfo",value:function(ot,gt,xt,Mt){this.projectiveRect=xt,this.ratio=ot,P0(this.cacheSize,gt)||(this.cacheSize=gt,this.didCacheSizeUpdated=!0),Mt&&this.didCacheSizeUpdated&&(this.canvasRef.clear(),this.didCacheSizeUpdated=!1)}},{key:"onGlobalUpdate",value:function(){this.canvasRef.clear()}},{key:"paint",value:function(ot){var gt,xt,Mt=this.canvasRef.get(),kt;if(Mt)kt=Mt.canvas;else{var zt=this.canvasRef.allocate(this.cacheSize),Ht=zt.context,rr=zt.canvas;this.paintNodes(Ht,this,HS.GenerateCache),(gt=this.statistical)==null||gt.recordGenerateCache(),kt=rr}if(this.canvasRef.isSizeEquals(this.cacheSize))ot.drawImage(kt,0,0);else{var ur=this.cacheSize,_r=ur.width,Dr=ur.height;ot.drawImage(kt,0,0,_r,Dr)}(xt=this.statistical)==null||xt.recordPaintCache()}},{key:"onBeforeFuse",value:function(ot,gt){var xt;if(!this.canvasRef.isEmpty()||this.hasAnyCache(ot)||this.hasAnyCache(gt)){var Mt=[].concat(Ct(ot),[this],Ct(gt)),kt=Mt[0],zt=Mt.slice(1),Ht,rr=null;kt.canvasRef.isSizeEquals(this.cacheSize)?Ht=kt.canvasRef.transformTo():(Ht=new Fw(this.canvasPool),rr=kt);var ur=this.getCanvasRefContext(Ht);rr&&this.mergeChunk(ur,rr);var _r=Jt(zt),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value;this.mergeChunk(ur,Br)}}catch(Ur){_r.e(Ur)}finally{_r.f()}this.canvasRef.clear(),this.canvasRef=Ht}(xt=this.statistical)==null||xt.recordFuse(ot.length+1+gt.length)}},{key:"getCanvasRefContext",value:function(ot){var gt,xt,Mt;return ot.isEmpty()?(gt=ot.allocate(this.cacheSize),Mt=gt.context):(xt=ot.get(),Mt=xt.context),Mt}},{key:"hasAnyCache",value:function(ot){var gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;if(!Mt.canvasRef.isEmpty())return!0}}catch(kt){gt.e(kt)}finally{gt.f()}return!1}},{key:"mergeChunk",value:function(ot,gt){var xt,Mt;if(ot.resetTransform(),gt.canvasRef.isEmpty()){var kt=this.paintNodes(ot,gt,HS.GenerateCache);(xt=this.statistical)==null||xt.recordPaintCache(kt)}else{var zt=gt.canvasRef.get(),Ht=zt.canvas;if(gt.canvasRef.isSizeEquals(this.cacheSize))ot.drawImage(Ht,0,0);else{var rr=this.cacheSize,ur=rr.width,_r=rr.height;ot.drawImage(Ht,0,0,ur,_r)}(Mt=this.statistical)==null||Mt.recordFuseCache()}}},{key:"paintNodes",value:function(ot,gt,xt){var Mt,kt=0,zt=Jt(gt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;ot.resetTransform(),ot.scale(this.ratio,this.ratio),(Mt=this.painter(rr.id))==null||Mt.paint(ot,xt,this.projectiveRect),kt+=1}}catch(ur){zt.e(ur)}finally{zt.f()}return kt}}]),at})(H_),Bw=jE;Bw.initCacheSize=Object.freeze({width:1,height:1}),Bw.initProjectiveReact=Object.freeze({originX:0,originY:0,width:1,height:1});var $E=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,ot),Mt.canvasPool=gt,Mt.chunkContext=new AD(function(kt){return new Bw(ut,gt,kt,xt)}),Mt}return Bt(at,[{key:"create",value:function(ot){return new jw(ot)}}]),at})(ED),jw=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot._protoProjectiveRect=ot.projectiveRect,ot.cacheSize=Object.freeze({width:ut.projectiveRect.width,height:ut.projectiveRect.height}),ot}return Bt(at,[{key:"protoProjectiveRect",get:function(){return this._protoProjectiveRect}},{key:"updateProjectiveRect",value:function(ot,gt,xt){var Mt=Math.ceil(ot.originX*gt),kt=Math.ceil(ot.originY*gt),zt=Math.ceil((ot.originX+ot.width)*gt),Ht=Math.ceil((ot.originY+ot.height)*gt),rr=zt-Mt,ur=Ht-kt,_r={originX:Mt/gt,originY:kt/gt,width:rr/gt,height:ur/gt};st(Ut(at.prototype),"updateProjectiveRect",this).call(this,_r,gt,xt),this._protoProjectiveRect=Object.freeze(Ll({},ot)),this.cacheSize=Object.freeze({width:rr,height:ur}),this.updatePaintingInfo(this.ratio,this.cacheSize,this.projectiveRect,xt)}},{key:"updateRatioAndRefresh",value:function(ot,gt){st(Ut(at.prototype),"updateProjectiveRect",this).call(this,this.projectiveRect,ot,gt),this.updatePaintingInfo(this.ratio,this.cacheSize,this.projectiveRect,gt)}},{key:"updatePaintingInfo",value:function(ot,gt,xt,Mt){var kt=Jt(this),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value;Ht.updatePaintingInfo(ot,gt,xt,Mt)}}catch(rr){kt.e(rr)}finally{kt.f()}}},{key:"notifyGlobalUpdate",value:function(){var ot=Jt(this),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt.onGlobalUpdate()}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"paint",value:function(ot,gt,xt){for(var Mt=xt||this[Symbol.iterator](),kt,zt=null;kt=Mt.next(),!kt.done;){var Ht=kt.value;if(gt(Ht)){zt=Ht;break}Ht.paint(ot)}return{iterator:Mt,floatChunk:zt}}}]),at})(ZA),iS;(function(yt){yt[yt.None=0]="None",yt[yt.CoverByTop=1]="CoverByTop",yt[yt.Repaint=2]="Repaint"})(iS||(iS={}));var kT;(function(yt){yt[yt.None=0]="None",yt[yt.All=1]="All",yt[yt.Part=2]="Part"})(kT||(kT={}));function jy(){return new $w}var e_=(function(){function yt(){Ot(this,yt),this.dirties=[]}return Bt(yt,[{key:"createDirty",value:function(){var at=this,ut=new wy(function(){var ot=at.dirties.indexOf(ut);ot!==-1&&at.dirties.splice(ot,1)});return this.dirties.push(ut),ut}},{key:"canBeMoreDirty",get:function(){var at=!1,ut=Jt(this.dirties),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(gt.canBeMoreDirty){at=!0;break}}}catch(xt){ut.e(xt)}finally{ut.f()}return at}},{key:"dirtyAll",value:function(){var at=Jt(this.dirties),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot.dirtyAll()}}catch(gt){at.e(gt)}finally{at.f()}}},{key:"createDirtyCellsCollection",value:function(){var at=this;return new JA(null,function(ut,ot){var gt=Jt(at.dirties),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt.dirtyCells(ut,ot)}}catch(kt){gt.e(kt)}finally{gt.f()}})}}]),yt})(),JA=(function(){function yt(ct,at){Ot(this,yt),this.cells={},this.subCells={},this.parent=ct,this.onCollectedCells=at}return Bt(yt,[{key:"createSub",value:function(){return new yt(this,null)}},{key:"collect",value:function(at,ut){var ot=wy.key(at,ut);ot in this.cells||(this.cells[ot]={row:at,column:ut,level:0})}},{key:"complete",value:function(at){var ut,ot=this.putLevelAndCollectMaxLevel(at);this.assignSubCells(),this.parent&&this.reportToParent(this.parent),(ut=this.onCollectedCells)==null||ut.call(this,ot,this.cells)}},{key:"putLevelAndCollectMaxLevel",value:function(at){var ut=0;for(var ot in this.cells){var gt=this.cells[ot].level;this.cells[ot].level=Math.max(gt,at),ut=Math.max(ut,at)}return Math.max(ut,at)}},{key:"assignSubCells",value:function(){for(var at in this.subCells)if(at in this.cells){var ut=this.cells[at].level;this.cells[at].level=Math.max(ut,this.subCells[at].level)}else this.cells[at]=this.subCells[at]}},{key:"reportToParent",value:function(at){var ut=at.subCells;for(var ot in this.cells){var gt=ut[ot],xt=this.cells[ot];gt&&gt.level>xt.level&&(xt=gt),ut[ot]=xt}}}]),yt})(),wy=(function(){function yt(ct){Ot(this,yt),this.phase=1,this.cells=null,this.release=ct}return Bt(yt,[{key:"canBeMoreDirty",get:function(){return this.phase!==1}},{key:"takeDirtyState",value:function(){var at=new CD(this.phase,this.cells);return this.phase=0,this.cells=null,at}},{key:"dirtyAll",value:function(){this.phase=1,this.cells=null}},{key:"dirtyCells",value:function(at,ut){this.phase!==1&&(at>=2&&(this.phase=2),this.cells?Object.assign(this.cells,ut):this.cells=Ll({},ut))}}],[{key:"key",value:function(at,ut){return"".concat(at,",").concat(ut)}}]),yt})(),CD=(function(){function yt(ct){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Ot(this,yt),this.cells=null,this.phase=ct,this.cells=at}return Bt(yt,[{key:"isDirty",value:function(at,ut){switch(this.phase){case 2:if(this.cells){var ot=wy.key(at,ut),gt=this.cells[ot];return gt?gt.level>=2:!1}else return!1;case 1:return!0;default:return!1}}},{key:"forEachDirtyBuckets",value:function(at,ut,ot){switch(this.phase){case 1:{at.forEachBuckets(ot);break}case 2:{if(this.cells)for(var gt in this.cells){var xt=this.cells[gt],Mt=xt.row,kt=xt.column,zt=xt.level;if(zt>=ut){var Ht=at.bucket(Mt,kt);Ht&&ot(Ht,Mt,kt)}}break}}}}]),yt})(),$w=(function(){function yt(){Ot(this,yt),this.phase=1}return Bt(yt,[{key:"isDirty",value:function(){return!0}},{key:"forEachDirtyBuckets",value:function(at,ut,ot){at.forEachBuckets(ot)}}]),yt})(),OT=(function(){function yt(ct){var at=this;Ot(this,yt),this.paintableBucketsQueue=[],this.isFloatChunk=function(ut){return ut.id in at.chunkToFloatMap},this.grid=ct.grid,this.cleanBucketsBackground=ct.cleanBucketsBackground,this.dirtyState=ct.dirtyState,this.floatLeafPainter=ct.floatLeafPainter,this.paintBucket=ct.bucketPainter,this.chunkToFloatMap=ct.floatNodesInfo.chunkToFloatMap,this.pendingByFloats=ct.floatNodesInfo.pendingByFloats}return Bt(yt,[{key:"collectBuckets",value:function(){var at=this;this.dirtyState.forEachDirtyBuckets(this.grid,iS.CoverByTop,function(ut,ot,gt){at.startToPaintBucket({bucket:ut,row:ot,column:gt},at.cleanBucketsBackground)})}},{key:"runLoopToPaintAll",value:function(){for(var at=!1;this.paintableBucketsQueue.length>0;)this.startToPaintBucket(this.paintableBucketsQueue.pop(),at);km(this.pendingByFloats)&&this.printPendingFloatNodesWarn()}},{key:"printPendingFloatNodesWarn",value:function(){console.warn("found pending float nodes were never paint");for(var at in this.pendingByFloats){var ut=this.pendingByFloats[at],ot=ut.untouched,gt=ut.pending,xt=Object.keys(ot).join(", "),Mt=Object.keys(gt).join(", ");console.warn("float ".concat(at," is waiting ").concat(xt," to touch, and is padding buckets ").concat(Mt))}}},{key:"startToPaintBucket",value:function(at,ut){var ot=at.bucket,gt=at.row,xt=at.column,Mt=at.iterator,kt=this.paintBucket(ot,gt,xt,this.isFloatChunk,ut,Mt),zt=kt.iterator,Ht=kt.floatChunk;if(Ht){var rr=this.pendingByFloatInfo(Ht);if(rr){var ur=rr.untouched,_r=rr.pending,Dr=Ht.getSampleNode();delete ur[ot.id],_r[ot.id]={bucket:ot,row:gt,column:xt,iterator:zt},km(ur)||this.startToPaintFloatNode(Dr,_r)}}}},{key:"pendingByFloatInfo",value:function(at){var ut=this.chunkToFloatMap[at.id];return ut?ut.info:null}},{key:"startToPaintFloatNode",value:function(at,ut){this.floatLeafPainter(at.related),delete this.pendingByFloats[at.id];for(var ot in ut){var gt=ut[ot];this.paintableBucketsQueue.unshift(gt)}}}],[{key:"paintBuckets",value:function(at){var ut=new yt(at);ut.collectBuckets(),ut.runLoopToPaintAll()}}]),yt})();function pI(yt){return new _g(yt).search()}var _g=(function(){function yt(ct){Ot(this,yt),this.chunkContext=ct.chunkContext,this.grid=ct.grid,this.visions=ct.visions,this.dirtyCells=ct.dirtyCells}return Bt(yt,[{key:"search",value:function(){var at=this,ut={},ot={},gt={};return this.chunkContext.forEachCandidateFloatNodes(function(xt){var Mt,kt=xt,zt=(Mt=at.dirtyCells)==null?void 0:Mt.createSub(),Ht=at.searchCoverBuckets(kt,zt);if(Ht){var rr=Ht.buckets,ur=Ht.range,_r={},Dr=!0,Br=!0,Ur=null;for(var Zr in rr){var Tn=rr[Zr].findChunk(kt);if(Tn&&Tn.isFloat)Ur||(Ur={leaf:kt,info:{untouched:rr,pending:{}}}),Tn.nextChunk&&(Br=!1),_r[Tn.id]=Ur;else{Dr=!1;break}}Dr&&Ur&&(Object.assign(ut,_r),ot[kt.id]=Ur.info,Br?gt[kt.id]={leaf:kt,range:ur,dirtyCells:zt}:zt?.complete(iS.Repaint))}}),{chunkToFloatMap:ut,pendingByFloats:ot,topFloatNodes:gt}}},{key:"searchCoverBuckets",value:function(at,ut){var ot=this,gt=this.visions.visions(at.id);if(!gt)return null;var xt=this.visionSceneRect(gt),Mt=x_.rectToRange(xt,this.grid.unitSize),kt=x_.calcIntersection(Mt,this.grid.range);if(!kt)return null;var zt={};return kt.forEach(function(Ht,rr){var ur=ot.grid.bucket(Ht,rr);ur&&(zt[ur.id]=ur),ut?.collect(Ht,rr)}),km(zt)?{range:kt,buckets:zt}:null}},{key:"visionSceneRect",value:function(at){var ut=at[0].sceneRect,ot=at[1];if(ot){var gt=ot.sceneRect,xt=Math.min(ut.originX,gt.originX),Mt=Math.min(ut.originY,gt.originY),kt=Math.max(ut.originX+ut.width,gt.originX+gt.width),zt=Math.max(ut.originY+ut.height,gt.originY+gt.height);ut={originX:xt,originY:Mt,width:kt-xt,height:zt-Mt}}return ut}}]),yt})(),Ty;(function(yt){yt[yt.Inside=0]="Inside",yt[yt.Equal=1]="Equal",yt[yt.Intersect=2]="Intersect",yt[yt.Outside=3]="Outside"})(Ty||(Ty={}));function UE(yt){var ct=yt.originX,at=yt.originY,ut=yt.width,ot=yt.height,gt=ct,xt=ct+ut,Mt=at,kt=at+ot;return{intervalX:[gt,xt],intervalY:[Mt,kt]}}function DD(yt,ct){var at=yt[0],ut=ct[0],ot=yt[1],gt=ct[1];return at<=ut&&ot>=gt?Ty.Inside:at>gt||ot<ut?Ty.Outside:at===ut&&ot===gt?Ty.Equal:Ty.Intersect}function Uw(yt,ct){var at=UE(yt),ut=UE(ct),ot=DD(at.intervalX,ut.intervalX),gt=DD(at.intervalY,ut.intervalY);return ot===Ty.Inside&&gt===Ty.Inside?Ty.Inside:ot===Ty.Outside||gt===Ty.Outside?Ty.Outside:ot===Ty.Equal&&gt===Ty.Equal?Ty.Equal:Ty.Intersect}function eC(yt,ct){var at=32;return ct===wb.LeftTop?{x:-at,y:-at}:ct===wb.Center?{x:Math.floor(-yt.width/2)+at,y:Math.floor(-yt.height/2)+at}:ct===wb.TopCenter?{x:Math.floor(-yt.width/2)+at,y:0-at}:ct===wb.BottomCenter?{x:Math.floor(-yt.width/2)+at,y:-yt.height+at}:ct===wb.LeftCenter?{x:0-at,y:Math.floor(-yt.height/2)+at}:ct===wb.RightCenter?{x:-yt.width+at,y:Math.floor(-yt.height/2)+at}:ct===wb.RightTop?{x:-yt.width+at,y:0-at}:ct===wb.LeftBottom?{x:-at,y:-yt.height+at}:ct===wb.RightBottom?{x:-yt.width+at,y:-yt.height+at}:{x:0,y:0}}function zE(yt,ct){return{x:yt.x+ct.x,y:yt.y+ct.y}}function GE(yt,ct){var at=yt.width,ut=yt.height,ot=yt.originX,gt=yt.originY,xt=zE({x:ot,y:gt},ct),Mt=xt.x,kt=xt.y;return{originX:Mt,originY:kt,width:at,height:ut}}function Z1(yt,ct){for(var at in ct)if(yt[at])return!0;return!1}function mI(yt){var ct={};for(var at in yt)ct[at]=!0;return ct}var tC=(function(){function yt(ct){var at=this;Ot(this,yt),this.painters={},this.canvasPool=new dI,this.floatCanvasSize=null,this.nextFloatNodesInfo=null,this.topFloatRangeSet={},this.cacheTopFloatNodesIds={},this.toScreenPoint=function(xt,Mt,kt){var zt=Mt*kt.width,Ht=xt*kt.height,rr=(zt-at.camera.centerX)*at.camera.scale+at.screenSize.width/2,ur=(Ht-at.camera.centerY)*at.camera.scale+at.screenSize.height/2;return{x:rr,y:ur}},this.onLeafNodeVisible=function(xt){var Mt=xt.value,kt=at.getRenderConstructor(Mt.definition);if(kt)try{var zt=new kt(Mt,at.context),Ht=new wD(at.screen,at.visions,xt,at.fixedSize,zt,at.onRepaint);at.painters[xt.id]=Ht}catch(rr){console.error(rr)}},this.onLeafNodeInvisible=function(xt){var Mt=at.painters[xt.id];Mt&&(delete at.painters[xt.id],Mt.remove())},this.fixedSize=ct.fixedSize,this.willPrintGrid=!!ct.willPrintGrid,this.onRepaint=ct.onRepaint,this.getRenderConstructor=ct.getRenderConstructor,this.screen=ct.screen,this.dirtyNotify=ct.dirtyNotify,this.visions=ct.visions,this.camera=this.screen.camera,this.screenSize=Object.freeze({width:this.screen.width,height:this.screen.height}),this.context=ct.context,this.statistical=ct.statistical,this.visionRectangle=this.createVisionRectangle(this.camera,this.screenSize),this.bucketFactory=new $E(function(xt){return at.painters[xt]},this.visions,this.canvasPool,this.statistical),this.grid=new SD({tree:ct.tree,ratio:ct.ratio,visions:ct.visions,bucketFactory:this.bucketFactory,visionRectangle:this.visionRectangle,scale:this.camera.scale,rate:ct.rate,bucketUnitSize:ct.bucketUnitSize,favorBucketsCount:ct.favorBucketsCount,toScreenPoint:this.toScreenPoint,onLeafNodeVisible:this.onLeafNodeVisible,onLeafNodeInvisible:this.onLeafNodeInvisible});var ut=Jt(ct.tree),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this.onLeafNodeVisible(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}}return Bt(yt,[{key:"dispose",value:function(){this.canvasPool.clear(),this.cacheTopFloatNodesIds={},this.cacheTopFloatRectangle=null}},{key:"update",value:function(at){var ut,ot=!1,gt=!1,xt;if(at.context){for(var Mt in this.painters)this.painters[Mt].updateContext(at.context);this.context=at.context,ot=!0}at.camera&&(this.camera=at.camera,gt=!0),at.screenSize&&(this.screenSize=at.screenSize,gt=!0);for(var kt in at.updateSet)(ut=this.painters[kt])==null||ut.refreshPayload();gt&&(this.visionRectangle=xt=this.createVisionRectangle(this.camera,this.screenSize));var zt;ot||gt?this.dirtyNotify.dirtyAll():this.dirtyNotify.canBeMoreDirty&&(zt=this.dirtyNotify.createDirtyCellsCollection());var Ht=this.grid.update({shouldUpdateAll:ot,dirtyCells:zt,visionRectangle:xt,scale:this.camera.scale,ratio:at.ratio,diff:at.diff,updateSet:at.updateSet,moveSet:at.moveSet,refresh:at.refresh});at.floatCanvasSize&&(this.floatCanvasSize=at.floatCanvasSize),this.nextFloatNodesInfo=this.searchFloatNodes({dirtyCells:zt,visions:this.visions,grid:this.grid,chunkContext:this.bucketFactory.chunkContext}),zt&&(this.dirtyTouchedBuckets(zt,this.nextFloatNodesInfo,Ht),zt.complete(iS.Repaint))}},{key:"dirtyTouchedBuckets",value:function(at,ut,ot){var gt=ut.topFloatNodes;if(gt){var xt=gt.leaves,Mt=Jt(ot),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt.row,rr=zt.column,ur=zt.touchedLeaves;yt.isAllKeysBelongTo(ur,xt)||at.collect(Ht,rr)}}catch(Tn){Mt.e(Tn)}finally{Mt.f()}}else{var _r=Jt(ot),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value,Ur=Br.row,Zr=Br.column;at.collect(Ur,Zr)}}catch(Tn){_r.e(Tn)}finally{_r.f()}}}},{key:"createVisionRectangle",value:function(at,ut){var ot,gt,xt,Mt;return at.scale===0?(ot=0,gt=0,xt=0,Mt=0):(xt=ut.width/at.scale,Mt=ut.height/at.scale,ot=at.centerX-xt/2,gt=at.centerY-Mt/2),Object.freeze({originX:ot,originY:gt,width:xt,height:Mt})}},{key:"paintTopFloatAndGetOrigin",value:function(at,ut,ot){var gt,xt=this.getPaintFloatNodesInfo(),Mt=xt.topFloatNodes,kt=null;if(Mt){var zt=Mt.zone,Ht=Mt.leaves;kt={x:zt.originX,y:zt.originY},ut.resetTransform(),ut.clearRect(0,0,at.width,at.height);for(var rr in Ht){var ur=this.painters[rr];ur&&(ut.resetTransform(),ut.scale(ot,ot),ut.translate(-kt.x,-kt.y),ur.paint(ut,HS.Directly),(gt=this.statistical)==null||gt.recordPaintFloat())}}return kt}},{key:"paintBackground",value:function(at){var ut=this,ot=at.context,gt=at.ratio,xt=at.refresh,Mt=at.cleanBucketsBackground,kt=at.dirtyState,zt,Ht,rr=this.getPaintFloatNodesInfo(),ur=(Ht=(zt=rr.topFloatNodes)==null?void 0:zt.leaves)!=null?Ht:yt.voidLeaves;OT.paintBuckets({grid:this.grid,floatNodesInfo:rr,dirtyState:kt,cleanBucketsBackground:Mt,floatLeafPainter:function(Dr){var Br=Dr.id,Ur,Zr=ut.painters[Br];Zr&&!ur[Br]&&(ot.resetTransform(),ot.scale(gt,gt),Zr.paint(ot,HS.Directly),(Ur=ut.statistical)==null||Ur.recordPaintFloat())},bucketPainter:function(Dr,Br,Ur,Zr,Tn,jn){var ts=Dr.protoProjectiveRect,us=Math.ceil(ts.originX*gt),Os=Math.ceil(ts.originY*gt),Hs=Math.ceil((ts.originX+ts.width)*gt),Ks=Math.ceil((ts.originY+ts.height)*gt),so=Hs-us,To=Ks-Os;return ot.resetTransform(),ot.translate(us,Os),Dr.updateRatioAndRefresh(gt,xt),Tn&&ot.clearRect(0,0,so,To),Dr.paint(ot,Zr,jn)}}),this.willPrintGrid&&(ot.resetTransform(),ot.scale(gt,gt),this.paintGrid(ot))}},{key:"completePaint",value:function(){this.nextFloatNodesInfo=null}},{key:"getPaintFloatNodesInfo",value:function(){var at;return(at=this.nextFloatNodesInfo)!=null?at:this.searchFloatNodes({visions:this.visions,grid:this.grid,chunkContext:this.bucketFactory.chunkContext})}},{key:"paintGrid",value:function(at){var ut=this,ot=this.grid,gt=ot.range,xt=ot.unitSize;at.lineWidth=1,at.strokeStyle="rgba(0,0,0,0.5)",at.fillStyle="rgba(0,0,0,0.5)",gt.forEach(function(Mt,kt){var zt=ut.toScreenPoint(Mt,kt,xt),Ht=zt.x,rr=zt.y,ur=Math.ceil(xt.width*ut.camera.scale),_r=Math.ceil(xt.height*ut.camera.scale);at.strokeRect(Ht,rr,ur,_r),at.fillText("".concat(Mt,",").concat(kt),Ht+2,rr+14)})}},{key:"searchFloatNodes",value:function(at){var ut=pI(at),ot=null,gt=null;if(this.floatCanvasSize){var xt=this.floatCanvasSize,Mt=xt.width,kt=xt.height,zt=this.searchBorderRectange(ut.topFloatNodes);if(zt){var Ht=eS.useTopFloatOriginCoord;if(Ht===wb.Default)zt.width<=Mt&&zt.height<=kt&&(ot=zt);else{var rr={originX:zt.originX,originY:zt.originY,width:Mt,height:kt},ur=eC(rr,Ht);if(!this.cacheTopFloatRectangle){var _r=GE(rr,ur);this.cacheTopFloatRectangle=_r}if(this.cacheTopFloatRectangle){var Dr=Uw(this.cacheTopFloatRectangle,zt),Br=mI(ut.topFloatNodes);if(Dr===Ty.Inside)ot=this.cacheTopFloatRectangle,this.cacheTopFloatNodesIds=Br;else if(!Z1(this.cacheTopFloatNodesIds,Br)){var Ur=GE(rr,ur);this.cacheTopFloatRectangle=Ur,ot=Ur,this.cacheTopFloatNodesIds=Br}}}}}var Zr={},Tn=at.dirtyCells;if(ot){var jn={};for(var ts in ut.topFloatNodes){var us=iS.CoverByTop,Os=ut.topFloatNodes[ts],Hs=Os.leaf,Ks=Os.range,so=Os.dirtyCells;jn[ts]=Hs,ts in this.topFloatRangeSet?delete this.topFloatRangeSet[ts]:us=iS.Repaint,so?.complete(us),Zr[ts]=Ks}gt={zone:ot,leaves:jn}}else for(var To in ut.topFloatNodes){var Oo=ut.topFloatNodes[To].dirtyCells;Oo&&Oo.complete(iS.Repaint)}if(Tn)for(var Au in this.topFloatRangeSet)this.topFloatRangeSet[Au].forEach(function(Tu,xu){Tn.collect(Tu,xu)});return this.topFloatRangeSet=Zr,{topFloatNodes:gt,chunkToFloatMap:ut.chunkToFloatMap,pendingByFloats:ut.pendingByFloats}}},{key:"searchBorderRectange",value:function(at){var ut=null,ot=0,gt=Number.MAX_SAFE_INTEGER,xt=Number.MIN_SAFE_INTEGER,Mt=Number.MAX_SAFE_INTEGER,kt=Number.MIN_SAFE_INTEGER;for(var zt in at){var Ht=this.visions.vision(zt);if(Ht){var rr=Ht.screenRect,ur=rr.originX,_r=rr.originX+rr.width,Dr=rr.originY,Br=rr.originY+rr.height;gt>ur&&(gt=ur),xt<_r&&(xt=_r),Mt>Dr&&(Mt=Dr),kt<Br&&(kt=Br),ot+=1}}if(ot>0){var Ur=32,Zr=Math.floor(gt/Ur)*Ur,Tn=Math.floor(Mt/Ur)*Ur,jn=Math.ceil(xt-Zr),ts=Math.ceil(kt-Tn);ut={originX:Zr,originY:Tn,width:jn,height:ts}}return ut}}],[{key:"isAllKeysBelongTo",value:function(at,ut){for(var ot in at)if(!(ot in ut))return!1;return!0}}]),yt})(),aS=tC;aS.voidLeaves={};var gI=(function(){function yt(ct){var at=this;Ot(this,yt),this.dirtyNotify=new e_,this.refresh=!0,this.cacheFloatOrigin=null,this.useSinglerCanvas=eS.useSinglerCanvas,this.onRepaint=function(ot){at.screen.scene.reportComponentUpdate(ot,fm.PropertiesUpdated)},this.setupAfterCanvasReady=function(){at.backgroundCanvas.ratio!==1&&at.update({isTransition:!1,diff:XA(),updateSet:{},moveSet:{}}),at.paint()},this.renderMode=ct.renderMode,this.engine=ct.engine,this.screen=ct.screen,this.onRenderDuration=ct.onRenderDuration,this.statistical=ct.willPrintStatistical?new oI:void 0,this.className=ct.className,this.style=Object.freeze(Zm(Ll({},ct.style),{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:this.engine.orderIndex}));var ut=new vI(this.setupAfterCanvasReady);this.useSinglerCanvas=eS.useSinglerCanvas,this.floatCanvas=sI(this.createFloatSize(this.screen),void 0,ut.createUnlockCall()),this.floatCanvas.visibility=!1,this.backgroundCanvas=aI({width:this.screen.width,height:this.screen.height},this.dirtyNotify,ut.createUnlockCall()),this.painter=new aS({ratio:1,tree:ct.tree,fixedSize:ct.fixedSize,screen:ct.screen,visions:ct.visions,context:this.screen.context,statistical:this.statistical,dirtyNotify:this.dirtyNotify,getRenderConstructor:ct.getRenderConstructor,onRepaint:this.onRepaint,rate:2,favorBucketsCount:12,bucketUnitSize:Object.freeze({width:256,height:256})})}return Bt(yt,[{key:"willInterruptEvent",value:function(){return!1}},{key:"findComponentWithTarget",value:function(){}},{key:"update",value:function(at){var ut,ot,gt=bD(),xt;switch(this.useSinglerCanvas!==eS.useSinglerCanvas&&(this.useSinglerCanvas=eS.useSinglerCanvas,xt=this.createFloatSize(this.screen),this.floatCanvas.size=xt),at.screenSize&&(xt=this.createFloatSize(at.screenSize),this.backgroundCanvas.size=at.screenSize,this.floatCanvas.size=xt),this.renderMode){case zw.HighQuality:{this.refresh=!0;break}case zw.PerformanceWhileTransition:{this.refresh=!at.isTransition;break}}this.painter.update({context:at.context,camera:at.camera,screenSize:at.screenSize,floatCanvasSize:xt,diff:at.diff,ratio:this.backgroundCanvas.ratio,updateSet:at.updateSet,moveSet:at.moveSet,refresh:this.refresh}),this.backgroundCanvas.hasNextCanvasNode?(this.paint(),(ut=this.statistical)==null||ut.print(),this.onRenderDuration&&this.onRenderDuration(bD()-gt)):(ot=this.statistical)==null||ot.clear()}},{key:"painToCanvas",value:function(at,ut,ot,gt){this.painter.update({camera:ut,screenSize:ot,ratio:gt,refresh:!0,diff:XA(),updateSet:{},moveSet:{}}),this.painter.paintBackground({context:at,ratio:gt,refresh:this.refresh,dirtyState:jy(),cleanBucketsBackground:!0})}},{key:"paint",value:function(){var at=this,ut=null,ot=!1,gt=this.floatCanvas.nextCanvasNode(),xt=this.backgroundCanvas.nextCanvasNode();if(gt){var Mt=this.floatCanvas.get2DContext(gt);Mt.resetTransform(),ut=this.painter.paintTopFloatAndGetOrigin(gt.canvas,Mt,this.floatCanvas.ratio)}if(xt){var kt=xt.dirty.takeDirtyState();if(kt.phase!==kT.None){var zt=this.backgroundCanvas.get2DContext(xt),Ht=kt.phase===kT.Part;if(zt.resetTransform(),kt.phase===kT.All){var rr=xt.canvas,ur=rr.width,_r=rr.height;zt.clearRect(0,0,ur,_r)}this.painter.paintBackground({context:zt,ratio:this.backgroundCanvas.ratio,refresh:this.refresh,dirtyState:kt,cleanBucketsBackground:Ht}),ot=!0}}this.painter.completePaint(),(!gt||!xt)&&console.warn("cannot find canvas"),(gt||xt)&&Promise.resolve().then(function(){return at.doAfterPaint(ut,gt,ot)}).catch(function(Dr){return console.error(Dr)})}},{key:"doAfterPaint",value:function(at,ut,ot){var gt,xt;if(at&&ut){var Mt=at.x,kt=at.y;(((gt=this.cacheFloatOrigin)==null?void 0:gt.x)!==Mt||((xt=this.cacheFloatOrigin)==null?void 0:xt.y)!==kt)&&(ut.canvas.style.transform="translate(".concat(Mt,"px, ").concat(kt,"px)")),this.floatCanvas.visibility||(this.floatCanvas.visibility=!0,this.floatCanvas.updateToNextBuffering())}else this.floatCanvas.visibility&&(this.floatCanvas.visibility=!1);this.cacheFloatOrigin=at,ot&&this.backgroundCanvas.updateToNextBuffering()}},{key:"dispose",value:function(){this.painter.dispose()}},{key:"createFloatSize",value:function(at){var ut=yt.floatCanvasMaxSize;if(PT())return ut;var ot=at.width*yt.floatCanvasRate,gt=at.height*yt.floatCanvasRate;return this.useSinglerCanvas?(ot<ut.width&&(ot=ut.width),gt<ut.height&&(gt=ut.height),ot=Math.max(ot,ut.width),gt=Math.max(gt,ut.width)):(ot>ut.width&&(ot=ut.width),gt>ut.height&&(gt=ut.height)),ot=Math.floor(ot),gt=Math.floor(gt),{width:ot,height:gt}}},{key:"getRender",value:function(){var at=this,ut=this.backgroundCanvas.getRender(),ot=this.floatCanvas.getRender(),gt=(function(xt){It(kt,xt);var Mt=qt(kt);function kt(zt){return Ot(this,kt),Mt.call(this,zt)}return Bt(kt,[{key:"componentWillUnmount",value:function(){at.dispose()}},{key:"render",value:function(){return(0,Pw.createElement)(Pw.Fragment,null,(0,Pw.createElement)(ut,{className:at.className,style:at.style}),(0,Pw.createElement)(ot,{className:at.className,style:at.style}))}}]),kt})(Pw.Component);return gt}}]),yt})(),rC=gI;rC.floatCanvasRate=.25,rC.floatCanvasMaxSize=Object.freeze({width:340,height:240});var vI=(function(){function yt(ct){Ot(this,yt),this.onUnlock=ct,this.didUnLock=!1,this.unlockCount=0,this.lockCount=0}return Bt(yt,[{key:"createUnlockCall",value:function(){var at=this;return this.lockCount+=1,function(){at.unlockCount+=1,!at.didUnLock&&at.unlockCount===at.lockCount&&(at.didUnLock=!0,setTimeout(at.onUnlock,0))}}}]),yt})();function Dx(yt,ct){return yt===void 0?ct:yt}function qT(yt,ct){return typeof yt=="number"?yt:ct}var zw;(function(yt){yt[yt.HighQuality=0]="HighQuality",yt[yt.PerformanceWhileTransition=1]="PerformanceWhileTransition"})(zw||(zw={}));var nC=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut.orderIndex),ot.constructors={},ot.getRenderConstructor=function(gt){return ot.constructors[gt.id]},ot.fixedSize=ut.fixedSize,ot.renderMode=Dx(ut.renderMode,0),ot}return Bt(at,[{key:"bind",value:function(ot,gt){if(!(ot instanceof Gm))throw new Error("it is not ComponentDefinition");if(this.constructors[ot.id])throw new Error("define duplicated ComponentDefinition");this.constructors[ot.id]=gt,ot.addEngine(this,{isVisible:gt.isVisible}),this.addDefinition(ot)}},{key:"createRenderLayout",value:function(ot){return new rC({engine:this,screen:ot.screen,tree:ot.tree,visions:ot.visions,fixedSize:this.fixedSize,renderMode:this.renderMode,getRenderConstructor:this.getRenderConstructor,onRenderDuration:ot.onRenderDuration})}}]),at})(Jm);function MD(yt){return new nC(yt)}function ID(yt){return yt instanceof nC}var RD=(function(){function yt(ct){var at=this;Ot(this,yt),this.setCNodeElement=function(ut,ot){var gt=ut.treeNode.id,xt=at.shadowList.node(gt);xt&&(xt.value=ot)},this.engine=ct.engine,this.renderComponent=ct.renderComponent,this.screen=ct.screen,this.fixedSize=ct.fixedSize,this.className=ct.className,this.style=ct.style,this.visions=ct.visions,this.leafFilter=ct.leafFilter,this.mode=ct.mode,this.camera=ct.initCamera||this.screen.camera,this.context=this.screen.context,this.screenSize=Object.freeze({width:this.screen.width,height:this.screen.height}),this.shadowList=Ow.create({tree:ct.tree,valueInitializer:function(){return null},initLeafFilter:function(ot){return at.visions.includes(ot.id)&&ct.leafFilter(ot)}})}return Bt(yt,[{key:"painToCanvas",value:function(){}},{key:"willInterruptEvent",value:function(at,ut,ot){var gt=this.findComponentWithTarget(ot);if(gt){var xt=this.engine.getDefinitionNode(gt.definition);if(xt)return xt.willInterruptEvent(at,gt,ut)}return!1}},{key:"findComponentWithTarget",value:function(at){var ut=this.shadowList.findNode(function(gt){var xt=gt.value;return!!(xt&&(at===xt||xt.contains(at)))});if(ut){var ot=ut.related;if(ot.value)return ot.value}}},{key:"update",value:function(at){var ut=this.shadowList.appendDiff(at.diff),ot=!1;at.camera&&(this.camera=at.camera,ot=!0),at.screenSize&&(this.screenSize=at.screenSize,ot=!0),at.context&&(this.context=at.context,ot=!0),(km(at.updateSet)||km(at.moveSet)||ut.addedNodes.length>0||ut.removedNodes.length>0||ut.sortedNodes.length>0)&&(ot=!0),this.setState&&ot&&this.setState(this.getRenderLayoutState())}},{key:"getRender",value:function(){var at={self:this},ut=this.renderComponent,ot=(function(gt){It(Mt,gt);var xt=qt(Mt);function Mt(kt){var zt;return Ot(this,Mt),zt=xt.call(this,kt),zt.state=at.self.getRenderLayoutState(),at.self.setState=function(Ht){return zt.setState(Ht)},zt}return Bt(Mt,[{key:"componentWillUnmount",value:function(){this.setState({context:null}),at.self.setState=void 0,at.self=null}},{key:"render",value:function(){var zt=this.state,Ht=zt.camera,rr=zt.screenSize,ur=zt.context,_r=at.self;return(0,zS.createElement)(ut,{engine:_r.engine,screen:_r.screen,mode:_r.mode,visions:_r.visions,leafFilter:_r.leafFilter,camera:Ht,screenSize:rr,context:ur,fixedSize:_r.fixedSize,className:_r.className,style:_r.style,onCNodeRef:_r.setCNodeElement})}}]),Mt})(zS.Component);return ot}},{key:"getRenderLayoutState",value:function(){return{camera:this.camera,screenSize:this.screenSize,context:this.context}}}]),yt})(),yI=(function(yt){It(at,yt);var ct=qt(at);function at(){var ut;return Ot(this,at),ut=ct.apply(this,arguments),ut.onRef=function(ot){var gt=ut.props,xt=gt.onRef,Mt=gt.context;xt&&xt(ot);var kt=Mt;kt&&kt.onRef(kt.component,ot)},ut}return Bt(at,[{key:"render",value:function(){var ot=this.props,gt=ot.context,xt=ot.children,Mt=ot.fixedMode,kt=ot.style,zt=gt;if(zt){var Ht=zt.vision,rr=zt.component,ur=zt.margin,_r=Ht.screenRect,Dr=_r.originX,Br=_r.originY,Ur="absolute";if(Mt){var Zr=zt.screen.bounding;Dr+=Zr.left,Br+=Zr.top,Ur="fixed"}var Tn="translate(".concat(Dr,"px,").concat(Br,"px) scale(").concat(zt.scale,",").concat(zt.scale,")"),jn=Ll({WebkitTransform:Tn,transform:Tn,WebkitTransformOrigin:"0px 0px 0px",transformOrigin:"0px 0px 0px",position:Ur,overflow:"visible",width:zt.size.width+zt.margin.left+zt.margin.right,height:zt.size.height+zt.margin.top+zt.margin.bottom,margin:0,paddingLeft:ur.left,paddingRight:ur.right,paddingTop:ur.top,paddingBottom:ur.bottom,zIndex:rr.orderIndex},kt),ts=Ll({},this.props);return delete ts.context,delete ts.fixedMode,delete ts.onRef,(0,Y1.createElement)("div",Zm(Ll({},ts),{style:jn,ref:this.onRef}),xt)}else return(0,Y1.createElement)(Y1.Fragment,null,xt)}}]),at})(Y1.Component),Gw=yI,bI=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"getPreviewURL",value:function(ot){var gt=this.props.mode;if(gt===By.Preview)return ot.previewURL}},{key:"getPositionInfo",value:function(ot,gt,xt){var Mt=this.props.fixedSize,kt,zt,Ht;ot.absoluteCoordinates?Ht=1:Ht=xt,Mt?(zt={left:gt.margin.left/Ht,right:gt.margin.right/Ht,top:gt.margin.top/Ht,bottom:gt.margin.bottom/Ht},kt={width:ot.width,height:ot.height}):(zt=gt.margin,kt={width:gt.screenRect.width-zt.left-zt.right,height:gt.screenRect.height-zt.top-zt.bottom});var rr={x:gt.screenRect.originX,y:gt.screenRect.originY};return{margin:zt,size:kt,origin:rr,cnodeScale:Ht}}},{key:"renderPreview",value:function(ot,gt,xt,Mt){var kt=this.props,zt=kt.screen,Ht=kt.onCNodeRef,rr=this.getPositionInfo(ot,gt,Mt),ur=rr.margin,_r=rr.size,Dr=rr.cnodeScale,Br={vision:gt,component:ot,screen:zt,onRef:Ht,margin:ur,size:_r,scale:Dr};return(0,zm.createElement)(Gw,{key:ot.id,context:Br},(0,zm.createElement)("img",{src:xt,alt:"",width:_r.width,height:_r.height}))}},{key:"renderLeafNode",value:function(ot,gt,xt,Mt){var kt=ot.definition,zt=this.props,Ht=zt.engine,rr=zt.context,ur=zt.screen,_r=zt.onCNodeRef,Dr=Ht.getDefinitionNode(kt);if(Dr){var Br=this.getPositionInfo(ot,gt,Mt),Ur=Br.margin,Zr=Br.size,Tn=Br.origin,jn=Br.cnodeScale,ts=Dr.render,us={vision:gt,component:ot,margin:Ur,size:Zr,scale:jn,screen:ur,onRef:_r};return(0,zm.createElement)(ts,{key:ot.id,id:ot.id,cnode:us,screen:ur,payload:ot.payload,context:rr,size:Zr,origin:Tn,margin:Ur,scale:xt,layout:Ht.orderIndex})}else return null}},{key:"render",value:function(){var ot=this,gt=[],xt=this.props,Mt=xt.visions,kt=xt.leafFilter,zt=xt.style,Ht=xt.className,rr=xt.engine,ur=xt.fixedSize;return Mt.forEach(function(_r,Dr){if(kt(_r)){var Br=_r.value,Ur=ot.getPreviewURL(Br),Zr=ur?Dr.scale:1;if(Ur)gt.push(ot.renderPreview(Br,Dr,Ur,Zr));else{var Tn=ur?1:Dr.scale,jn=ot.renderLeafNode(Br,Dr,Tn,Zr);gt.push(jn)}}}),(0,zm.createElement)("div",{className:Ht,style:Zm(Ll({},zt),{width:"100%",height:"100%",position:"absolute",overflow:"hidden",zIndex:rr.orderIndex})},gt)}}]),at})(zm.Component),PD=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"shouldComponentUpdate",value:function(ot){var gt=this.props,xt=gt.origin,Mt=gt.size,kt=gt.zIndex,zt=gt.margin,Ht=gt.payload,rr=gt.context;return xt.x!==ot.origin.x||xt.y!==ot.origin.y||Mt.width!==ot.size.width||Mt.height!==ot.size.height||kt!==ot.zIndex||zt.left!==ot.margin.left||zt.right!==ot.margin.right||zt.top!==ot.margin.top||zt.bottom!==ot.margin.bottom||Ht!==ot.payload||rr!==ot.context}},{key:"render",value:function(){var ot=this.props,gt=ot.render,xt=ot.screen,Mt=ot.engine,kt=ot.component,zt=ot.context,Ht=ot.origin,rr=ot.zIndex,ur=ot.size,_r=ot.margin,Dr=ot.payload,Br="translate(".concat(Ht.x,"px,").concat(Ht.y,"px)");return(0,Ex.createElement)("g",{style:{transform:Br,zIndex:rr,WebkitTransform:Br}},(0,Ex.createElement)(gt,{id:kt.id,screen:xt,payload:Dr,context:zt,size:ur,origin:Ht,margin:_r,scale:1,layout:Mt.orderIndex}))}}]),at})(Ex.Component),_I=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"getPreviewURL",value:function(ot){var gt=this.props.mode;if(gt===By.Preview)return ot.previewURL}},{key:"createViewBox",value:function(){var ot=this.props,gt=ot.screenSize,xt=ot.camera,Mt=xt.scale,kt=xt.centerX,zt=xt.centerY,Ht=gt.width/Mt,rr=gt.height/Mt;return Number.isNaN(Ht)&&(Ht=0),Number.isNaN(rr)&&(rr=0),"".concat(kt-Ht/2," ").concat(zt-rr/2," ").concat(Ht," ").concat(rr)}},{key:"render",value:function(){var ot=this,gt=[],xt=this.props,Mt=xt.visions,kt=xt.leafFilter,zt=xt.className,Ht=xt.screen,rr=xt.engine,ur=xt.context,_r=xt.style;return Mt.forEach(function(Dr,Br){if(kt(Dr)){var Ur=Dr.value,Zr=rr.getDefinitionNode(Ur.definition);if(Zr){var Tn=ot.getPreviewURL(Ur),jn={x:Ur.originX,y:Ur.originY},ts={width:Ur.width,height:Ur.height};if(Tn)gt.push((0,Ex.createElement)("image",{key:Ur.id,x:jn.x,y:jn.y,width:ts.width,height:ts.height,xlinkHref:Tn}));else{var us=Br.margin,Os=Ur.orderIndex;gt.push((0,Ex.createElement)(PD,{key:Ur.id,screen:Ht,engine:rr,render:Zr.render,context:ur,component:Ur,margin:us,size:ts,zIndex:Os,origin:jn,payload:Ur.payload}))}}}}),(0,Ex.createElement)("svg",{className:zt,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:this.createViewBox(),preserveAspectRatio:"xMidYMid",style:Zm(Ll({},_r),{width:"100%",height:"100%",position:"absolute",overflow:"hidden",zIndex:rr.orderIndex})},gt)}}]),at})(Ex.Component),VE=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut.orderIndex),ot.definitionNodes={},ot.fixedSize=ut.fixedSize,ot.isSVG=ut.isSVG,ot.className=ut.className,ot.style=ut.style&&Object.freeze(Ll({},ut.style)),ot}return Bt(at,[{key:"getDefinitionNode",value:function(ot){return this.definitionNodes[ot.id]}},{key:"bind",value:function(ot){var gt=this;return function(xt){if(!(ot instanceof Gm))throw new Error("it is not ComponentDefinition");if(gt.definitionNodes[ot.id])throw new Error("define duplicated ComponentDefinition");var Mt;if(typeof xt.willInterruptEvent=="boolean"){var kt=xt.willInterruptEvent;Mt=function(){return kt}}else xt.willInterruptEvent?Mt=xt.willInterruptEvent.bind(xt):Mt=function(){return!1};return gt.definitionNodes[ot.id]=Object.freeze({willInterruptEvent:Mt,render:xt}),ot.addEngine(gt,{isVisible:xt.isVisible}),gt.addDefinition(ot),xt}}},{key:"createRenderLayout",value:function(ot){var gt;return this.isSVG?gt=_I:gt=bI,new RD({engine:this,screen:ot.screen,mode:ot.mode,initCamera:ot.initCamera,tree:ot.tree,visions:ot.visions,leafFilter:ot.leafFilter,renderComponent:gt,fixedSize:this.fixedSize,className:this.className,style:this.style})}}]),at})(Jm);function iC(yt){return new VE(yt)}function LT(yt){return yt instanceof VE}var aC=(function(){function yt(){Ot(this,yt),this.nodes={},this.touched={}}return Bt(yt,[{key:"includes",value:function(at){return at in this.nodes}},{key:"leaf",value:function(at){var ut=this.nodes[at];return ut?ut.leaf:null}},{key:"vision",value:function(at){var ut=this.nodes[at];return ut?ut.visions[0]:null}},{key:"visions",value:function(at){var ut=this.nodes[at];return ut?ut.visions:null}},{key:"bindVision",value:function(at,ut){var ot=at.id,gt=this.nodes[ot];gt?gt.visions[0]=ut:this.nodes[ot]={leaf:at,visions:[ut,null]},this.touched[ot]=!0}},{key:"unbindVision",value:function(at){delete this.nodes[at]}},{key:"forEach",value:function(at){for(var ut in this.nodes){var ot=this.nodes[ut],gt=ot.leaf,xt=ot.visions;at(gt,xt[0])}}},{key:"completeFrame",value:function(){var at=!1;for(var ut in this.touched){var ot=this.nodes[ut];if(ot){var gt=mt(ot.visions,1),xt=gt[0];ot.visions[1]=xt,at=!0}}at&&(this.touched={})}},{key:"clean",value:function(){this.nodes={},this.touched={}}}]),yt})(),FT=0,HE=(function(){function yt(ct){var at=this;Ot(this,yt),this.binder=ct,this.isLeftButtonPressed=!1,this.onMouseDown=function(ut){if(ut.button===FT&&(at.checkMouseDidUp(ut),at.isLeftButtonPressed=!0,!at.binder.willInterruptMouseOrTouchEvent(ut,ut.target))){var ot=at.binder.eventPosition(ut),gt={kind:Ls.MouseDown,nativeEvent:ut,isOnScreen:!0,pointOnScreen:ot,pointOnScene:at.binder.toPointInScene(ot.x,ot.y)};at.binder.fireEvent(gt)}},this.onMouseMove=function(ut){if(ut.button===FT){at.checkMouseDidUp(ut);var ot=at.binder.eventPosition(ut),gt={kind:Ls.MouseMove,nativeEvent:ut,isOnScreen:at.binder.isEventFiredOnElement(ut.target,at.binder.divElement),pointOnScreen:ot,pointOnScene:at.binder.toPointInScene(ot.x,ot.y)};at.binder.fireEvent(gt)}},this.onMouseLeave=function(ut){if(ut.button===FT&&(at.checkMouseDidUp(ut),ut.target===at.binder.divElement)){var ot=at.binder.eventPosition(ut),gt={kind:Ls.MouseLeave,nativeEvent:ut,isOnScreen:at.binder.isEventFiredOnElement(ut.target,at.binder.divElement),pointOnScreen:ot,pointOnScene:at.binder.toPointInScene(ot.x,ot.y)};at.binder.fireEvent(gt)}},this.onMouseUp=function(ut){ut.button===FT&&(at.isLeftButtonPressed=!1,at.fireMouseUpEvent(ut))}}return Bt(yt,[{key:"checkMouseDidUp",value:function(at){var ut=at.which!==0;this.isLeftButtonPressed&&!ut&&this.fireMouseUpEvent(at)}},{key:"fireMouseUpEvent",value:function(at){var ut=this.binder.eventPosition(at),ot={kind:Ls.MouseUp,nativeEvent:at,isOnScreen:this.binder.isEventFiredOnElement(at.target,this.binder.divElement),pointOnScreen:ut,pointOnScene:this.binder.toPointInScene(ut.x,ut.y)};this.binder.fireEvent(ot)}}]),yt})(),xI=(function(){function yt(ct){var at=this;Ot(this,yt),this.binder=ct,this.latestScale=1,this.onMouseWheel=function(ut){if(!at.binder.willInterruptMouseOrTouchEvent(ut,ut.target)){var ot=at.binder.eventPosition(ut),gt=ut.deltaX,xt=ut.deltaY,Mt=Math.sqrt(gt*gt+xt*xt),kt=0,zt=0;at.binder.getOS()==="Windows"&&(Mt=-Mt),gt+xt<0&&(Mt=-Mt),at.isMacTouchpadTwoFingerZoom(ut)?Mt=-Mt*.5:at.isMacTouchpadTwoFingerScroll(ut)?(kt=-gt,zt=-xt,Mt=0):Mt*=.035;var Ht={kind:Ls.MouseWheel,nativeEvent:ut,isOnScreen:at.binder.isEventFiredOnElement(ut.target,at.binder.divElement),offsetPoint:{x:kt,y:zt},scale:at.adjustScale(Mt),pointOnScreen:ot,pointOnScene:at.binder.toPointInScene(ot.x,ot.y)};at.binder.fireEvent(Ht)}ut.preventDefault()},this.onGestureStart=function(ut){at.binder.willInterruptMouseOrTouchEvent(ut,ut.target)||(ut.preventDefault(),at.latestScale=1)},this.onGestureChange=function(ut){if(!at.binder.willInterruptMouseOrTouchEvent(ut,ut.target)){ut.preventDefault();var ot=(ut.scale/at.latestScale-1)*yt.safariScaleNumber,gt={x:ut.layerX,y:ut.layerY},xt={kind:Ls.MouseWheel,nativeEvent:ut,isOnScreen:at.binder.isEventFiredOnElement(ut.target,at.binder.divElement),offsetPoint:{x:0,y:0},scale:at.adjustScale(ot),pointOnScreen:gt,pointOnScene:at.binder.toPointInScene(gt.x,gt.y)};at.binder.fireEvent(xt)}},this.onGestureEnd=function(ut){at.binder.willInterruptMouseOrTouchEvent(ut,ut.target)||ut.preventDefault()},this.isMacTouchpadTwoFingerZoom=function(ut){return navigator.platform.indexOf("Mac")!==-1?ut.ctrlKey||at.binder.commandWheelToZoom&&ut.metaKey:!1},this.isMacTouchpadTwoFingerScroll=function(ut){return navigator.platform.indexOf("Mac")!==-1?ut.wheelDelta%120!=0||ut.movementX!==0||ut.deltaX!==0:!1}}return Bt(yt,[{key:"adjustScale",value:function(at){return Math.max(at,yt.minScaleStep)*yt.scaleRate}}]),yt})(),Mx=xI;Mx.safariScaleNumber=10,Mx.minScaleStep=-40,Mx.scaleRate=.02;var ND=(function(){function yt(ct){var at=this;Ot(this,yt),this.binder=ct,this.onTouchStart=function(ut){var ot=ut.target,gt=!ot||ot&&!ot.classList.contains("ppt-event-source");ut.cancelable&&gt&&ut.preventDefault();for(var xt=[],Mt=0;Mt<ut.changedTouches.length;++Mt){var kt=ut.changedTouches.item(Mt);if(!at.binder.willInterruptMouseOrTouchEvent(ut,kt.target)){var zt="".concat(kt.identifier),Ht=at.binder.eventPosition(kt);xt.push({identifier:zt,pointOnScreen:Ht,pointOnScene:at.binder.toPointInScene(Ht.x,Ht.y)})}}if(xt.length>0){var rr={kind:Ls.TouchStart,nativeEvent:ut,touches:xt};at.binder.fireEvent(rr)}},this.onTouchMove=function(ut){ut.cancelable&&ut.preventDefault();for(var ot=[],gt=0;gt<ut.changedTouches.length;++gt){var xt=ut.changedTouches.item(gt),Mt="".concat(xt.identifier),kt=at.binder.eventPosition(xt);ot.push({identifier:Mt,pointOnScreen:kt,pointOnScene:at.binder.toPointInScene(kt.x,kt.y)})}if(ot.length>0){var zt={kind:Ls.TouchMove,nativeEvent:ut,touches:ot};at.binder.fireEvent(zt)}},this.onTouchEnd=function(ut){var ot=ut.target,gt=!ot||ot&&!ot.classList.contains("ppt-event-source");ut.cancelable&&gt&&ut.preventDefault();var xt=at.cleanAcceptedTouchesByTouchEvent(ut);if(xt.length>0){var Mt={kind:Ls.TouchEnd,nativeEvent:ut,touches:xt};at.binder.fireEvent(Mt)}},this.onTouchCancel=function(ut){ut.cancelable&&ut.preventDefault();var ot=at.cleanAcceptedTouchesByTouchEvent(ut);if(ot.length>0){var gt={kind:Ls.TouchCancel,nativeEvent:ut,touches:ot};at.binder.fireEvent(gt)}}}return Bt(yt,[{key:"cleanAcceptedTouchesByTouchEvent",value:function(at){for(var ut=[],ot=0;ot<at.changedTouches.length;++ot){var gt=at.changedTouches.item(ot),xt="".concat(gt.identifier),Mt=this.binder.eventPosition(gt);ut.push({identifier:xt,pointOnScreen:Mt,pointOnScene:this.binder.toPointInScene(Mt.x,Mt.y)})}return ut}}]),yt})(),WE=function yt(ct){var at=this;Ot(this,yt),this.binder=ct,this.onKeyDown=function(ut){if(!at.binder.willInterruptKeyboardEvent(ut,ut.target)){var ot=ut.key,gt=ut.altKey,xt=ut.ctrlKey,Mt=ut.shiftKey,kt={kind:Ls.KeyDown,nativeEvent:ut,key:ot,altKey:gt,ctrlKey:xt,shiftKey:Mt};at.binder.fireEvent(kt)}},this.onKeyUp=function(ut){var ot=ut.key,gt=ut.altKey,xt=ut.ctrlKey,Mt=ut.shiftKey,kt={kind:Ls.KeyUp,nativeEvent:ut,key:ot,altKey:gt,ctrlKey:xt,shiftKey:Mt};at.binder.fireEvent(kt)}},SI=(function(){function yt(ct,at,ut){Ot(this,yt),this.mouseEventHandler=new HE(this),this.touchEventHandler=new ND(this),this.wheelEventHandler=new Mx(this),this.keyboardEventHandler=new WE(this),this.divElement=at,this.eventParamMap=this.createEventParamMap(ct),this.delegate=ut,this.addListeners()}return Bt(yt,[{key:"createEventParamMap",value:function(at){var ut={};switch(at){case d0.Desktop:{ut=Zm(Ll({},ut),{keyup:{method:this.keyboardEventHandler.onKeyUp,element:document.body},keydown:{method:this.keyboardEventHandler.onKeyDown,element:document.body},mousedown:{method:this.mouseEventHandler.onMouseDown},mousemove:{method:this.mouseEventHandler.onMouseMove,element:document},mouseup:{method:this.mouseEventHandler.onMouseUp,element:document},mouseleave:{method:this.mouseEventHandler.onMouseLeave},wheel:{method:this.wheelEventHandler.onMouseWheel},gesturestart:{method:this.wheelEventHandler.onGestureStart,element:document.body},gesturechange:{method:this.wheelEventHandler.onGestureChange,element:document.body},gestureend:{method:this.wheelEventHandler.onGestureEnd,element:document.body}});break}case d0.Touch:{ut=Zm(Ll({},ut),{touchstart:{method:this.touchEventHandler.onTouchStart},touchmove:{method:this.touchEventHandler.onTouchMove},touchend:{method:this.touchEventHandler.onTouchEnd},touchcancel:{method:this.touchEventHandler.onTouchCancel}});break}case d0.Surface:{ut=Zm(Ll({},ut),{keyup:{method:this.keyboardEventHandler.onKeyUp,element:document.body},keydown:{method:this.keyboardEventHandler.onKeyDown,element:document.body},mousedown:{method:this.mouseEventHandler.onMouseDown},mousemove:{method:this.mouseEventHandler.onMouseMove,element:document},mouseup:{method:this.mouseEventHandler.onMouseUp,element:document},mouseleave:{method:this.mouseEventHandler.onMouseLeave},wheel:{method:this.wheelEventHandler.onMouseWheel},gesturestart:{method:this.wheelEventHandler.onGestureStart,element:document.body},gesturechange:{method:this.wheelEventHandler.onGestureChange,element:document.body},gestureend:{method:this.wheelEventHandler.onGestureEnd,element:document.body},touchstart:{method:this.touchEventHandler.onTouchStart},touchmove:{method:this.touchEventHandler.onTouchMove},touchend:{method:this.touchEventHandler.onTouchEnd},touchcancel:{method:this.touchEventHandler.onTouchCancel}});break}}return Object.freeze(ut)}},{key:"addListeners",value:function(){var at=!0;for(var ut in this.eventParamMap){var ot=this.eventParamMap[ut],gt=ot.method,xt=ot.element;(xt||this.divElement).addEventListener(ut,gt,at)}}},{key:"release",value:function(){var at=!0;for(var ut in this.eventParamMap){var ot=this.eventParamMap[ut],gt=ot.method,xt=ot.element;(xt||this.divElement).removeEventListener(ut,gt,at)}}},{key:"commandWheelToZoom",get:function(){return this.delegate.commandWheelToZoom}},{key:"fireEvent",value:function(at){this.delegate.fireEvent(at)}},{key:"getOS",value:function(){var at=window.navigator,ut=at.userAgent,ot=at.platform,gt=["Macintosh","MacIntel","MacPPC","Mac68K"],xt=["Win32","Win64","Windows","WinCE"],Mt=["iPhone","iPad","iPod"],kt="";return gt.indexOf(ot)!==-1?kt="Mac OS":Mt.indexOf(ot)!==-1?kt="iOS":xt.indexOf(ot)!==-1?kt="Windows":/Android/.test(ut)?kt="Android":!kt&&/Linux/.test(ot)&&(kt="Linux"),kt}},{key:"toPointInScene",value:function(at,ut){return this.delegate.toPointInScene(at,ut)}},{key:"willInterruptMouseOrTouchEvent",value:function(at,ut){return ut?!this.isEventFiredOnElement(ut,this.divElement)||this.delegate.willInterruptEvent(at,ut):!1}},{key:"willInterruptKeyboardEvent",value:function(at,ut){return ut?this.delegate.willInterruptEvent(at,ut)?!0:ut===document.body?!1:!this.isEventFiredOnElement(ut,this.divElement):!1}},{key:"isEventFiredOnElement",value:function(at,ut){for(var ot=at;ot;){if(ot===ut)return!0;ot=ot.parentElement}return!1}},{key:"eventPosition",value:function(at){var ut=this.divElement.getBoundingClientRect(),ot=ut.left,gt=ut.top;return{x:Math.floor(at.clientX)-ot,y:Math.floor(at.clientY)-gt}}}]),yt})(),k0=(function(){function yt(){Ot(this,yt),this.listeners=[]}return Bt(yt,[{key:"dispatch",value:function(at){var ut=Jt(this.listeners),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;try{gt(at)}catch(xt){console.error(xt)}}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"addListener",value:function(at){this.listeners.indexOf(at)===-1&&this.listeners.push(at)}},{key:"removeListener",value:function(at){var ut=this.listeners.indexOf(at);ut!==-1&&this.listeners.splice(ut,1)}},{key:"removeAllListeners",value:function(){this.listeners.splice(0)}}]),yt})(),c0;(function(yt){yt[yt.Start=0]="Start",yt[yt.Update=1]="Update",yt[yt.End=2]="End",yt[yt.Other=3]="Other"})(c0||(c0={}));var sC=(function(){function yt(ct,at){Ot(this,yt),this._disable=!1,this.onCancelEvent=ct,this.adapterNodes=Object.freeze(at.map(function(ut){var ot={},gt={};return ut.setEventDescriptionStateGetter&&ut.setEventDescriptionStateGetter(function(xt){var Mt=ot[xt];if(Mt)return{payload:Mt,isCanceled:!!gt[xt]}}),{adapter:ut,payloads:ot,canceledMap:gt}}))}return Bt(yt,[{key:"disable",get:function(){return this._disable},set:function(at){this._disable!==at&&(this._disable=at,at&&this.cancel())}},{key:"cancel",value:function(){var at=Jt(this.adapterNodes),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value,gt=ot.adapter,xt=ot.payloads,Mt=ot.canceledMap,kt={},zt=!1;for(var Ht in xt)Ht in Mt||(kt[Ht]=xt[Ht],Mt[Ht]=!0,zt=!0);if(zt){var rr=gt.createCancelEvent(kt);rr&&this.onCancelEvent(rr)}}}catch(ur){at.e(ur)}finally{at.f()}}},{key:"interruptEvent",value:function(at){if(this.isMetaUp(at))return{kind:Ls.MetaKeyUp,nativeEvent:at.nativeEvent};var ut=this.adapterNodes.find(function(Dr){return Dr.adapter.isEventAccessible(at)});if(ut){var ot=ut.adapter,gt=ut.canceledMap,xt=ot.takeEventDescription(at),Mt;xt?typeof xt.length=="number"?Mt=xt:Mt=[xt]:Mt=[];var kt=[],zt=Jt(Mt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;if(rr.phase===3)kt.push(rr);else{var ur=this.handleAndCheckIgnoreEventDescription(ut,rr),_r=gt[rr.identifier];!ur&&!_r&&kt.push(rr)}}}catch(Dr){zt.e(Dr)}finally{zt.f()}return!this._disable&&kt.length>0?ot.convertToEvent(at,kt):null}else return at}},{key:"isMetaUp",value:function(at){return at.kind===Ls.KeyUp&&at.nativeEvent.key==="Meta"}},{key:"handleAndCheckIgnoreEventDescription",value:function(at,ut){var ot=at.payloads,gt=at.canceledMap,xt=ut.identifier,Mt=ut.phase,kt=ut.payload;switch(Mt){case 0:return xt in ot?!0:(ot[xt]=kt,this._disable&&(gt[xt]=!0),!1);case 1:return xt in ot?(ot[xt]=kt,!1):!0;case 2:if(xt in ot){var zt=!!gt[xt];return delete ot[xt],delete gt[xt],zt}else return!0;default:return!0}}}]),yt})(),kD=(function(){function yt(){Ot(this,yt),this.currentIdentifier=0}return Bt(yt,[{key:"setEventDescriptionStateGetter",value:function(at){this.getDescriptionState=at}},{key:"isEventAccessible",value:function(at){return at.kind===Ls.MouseDown||at.kind===Ls.MouseMove||at.kind===Ls.MouseUp||at.kind===Ls.MouseLeave}},{key:"convertToEvent",value:function(at,ut){var ot=mt(ut,1),gt=ot[0].payload;return{kind:at.kind,nativeEvent:at.nativeEvent,isOnScreen:gt.isOnScreen,pointOnScreen:gt.pointOnScreen,pointOnScene:gt.pointOnScene}}},{key:"createCancelEvent",value:function(at){var ut;for(var ot in at)ut=at[ot];return{kind:Ls.MouseUp,isOnScreen:ut.isOnScreen,pointOnScreen:ut.pointOnScreen,pointOnScene:ut.pointOnScene}}},{key:"takeEventDescription",value:function(at){at.kind===Ls.MouseDown&&(this.currentIdentifier+=1);var ut="".concat(this.currentIdentifier);at.kind===Ls.MouseUp&&(this.currentIdentifier+=1);var ot;switch(at.kind){case Ls.MouseDown:{ot=c0.Start;break}case Ls.MouseMove:case Ls.MouseLeave:{var gt=this.getDescriptionState(ut);if(gt){if(gt.isCanceled)return null;ot=c0.Update}else if(at.isOnScreen)ot=c0.Other;else return null;break}case Ls.MouseUp:{ot=c0.End;break}default:return null}var xt={isOnScreen:at.isOnScreen,pointOnScreen:at.pointOnScreen,pointOnScene:at.pointOnScene};return{identifier:ut,phase:ot,payload:xt}}}]),yt})(),wI=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"isEventAccessible",value:function(at){return at.kind===Ls.TouchStart||at.kind===Ls.TouchMove||at.kind===Ls.TouchEnd||at.kind===Ls.TouchCancel}},{key:"convertToEvent",value:function(at,ut){var ot=[],gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.identifier,zt=Mt.payload;ot.push(Ll({identifier:kt},zt))}}catch(Ht){gt.e(Ht)}finally{gt.f()}return{kind:at.kind,nativeEvent:at.nativeEvent,touches:ot}}},{key:"createCancelEvent",value:function(at){var ut=[];for(var ot in at)ut.push(Ll({identifier:ot},at[ot]));return{kind:Ls.TouchCancel,touches:ut}}},{key:"takeEventDescription",value:function(at){var ut;switch(at.kind){case Ls.TouchStart:{ut=c0.Start;break}case Ls.TouchMove:{ut=c0.Update;break}case Ls.TouchEnd:case Ls.TouchCancel:{ut=c0.End;break}default:return null}var ot=[],gt=Jt(at.touches),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.identifier,zt=Mt.pointOnScene,Ht=Mt.pointOnScreen;ot.push({identifier:kt,phase:ut,payload:{pointOnScene:zt,pointOnScreen:Ht}})}}catch(rr){gt.e(rr)}finally{gt.f()}return ot}}]),yt})(),OD=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"isEventAccessible",value:function(at){return at.kind===Ls.SortedTouchStart||at.kind===Ls.SortedTouchMove||at.kind===Ls.SortedTouchEnd||at.kind===Ls.SortedTouchCancel}},{key:"convertToEvent",value:function(at,ut){var ot=mt(ut,1),gt=ot[0],xt=gt.identifier,Mt=gt.payload;return{kind:at.kind,nativeEvent:at.nativeEvent,identifier:xt,pointOnScene:Mt.pointOnScene,pointOnScreen:Mt.pointOnScreen}}},{key:"createCancelEvent",value:function(at){var ut;for(var ot in at)ut=ot;var gt=at[ut],xt=gt.pointOnScene,Mt=gt.pointOnScreen;return{kind:Ls.SortedTouchCancel,identifier:ut,pointOnScene:xt,pointOnScreen:Mt}}},{key:"takeEventDescription",value:function(at){var ut;switch(at.kind){case Ls.SortedTouchStart:{ut=c0.Start;break}case Ls.SortedTouchMove:{ut=c0.Update;break}case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:{ut=c0.End;break}default:return null}return[{identifier:at.identifier,phase:ut,payload:{pointOnScene:at.pointOnScene,pointOnScreen:at.pointOnScreen}}]}}]),yt})(),Vw=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"isEventAccessible",value:function(at){return at.kind===Ls.KeyUp||at.kind===Ls.KeyDown}},{key:"convertToEvent",value:function(at,ut){var ot=mt(ut,1),gt=ot[0].payload;return{kind:at.kind,nativeEvent:at.nativeEvent,key:gt.key,altKey:gt.altKey,ctrlKey:gt.ctrlKey,shiftKey:gt.shiftKey}}},{key:"createCancelEvent",value:function(at){var ut;for(var ot in at)ut=at[ot];return{kind:Ls.KeyUp,key:ut.key,altKey:ut.altKey,ctrlKey:ut.ctrlKey,shiftKey:ut.shiftKey}}},{key:"takeEventDescription",value:function(at){var ut,ot;if(at.key==="Meta"||(ut=at.nativeEvent)!=null&&ut.metaKey)ot=c0.Other;else switch(at.kind){case Ls.KeyDown:{ot=c0.Start;break}case Ls.KeyUp:{ot=c0.End;break}default:return null}var gt=at.key,xt={key:at.key,altKey:at.altKey,ctrlKey:at.ctrlKey,shiftKey:at.shiftKey};return{identifier:gt,phase:ot,payload:xt}}}]),yt})(),VS=(function(){function yt(){Ot(this,yt),this.currentIdentifier=0}return Bt(yt,[{key:"setEventDescriptionStateGetter",value:function(at){this.getDescriptionState=at}},{key:"isEventAccessible",value:function(at){return at.kind===Ls.MouseWheel}},{key:"takeEventDescription",value:function(at){var ut="".concat(this.currentIdentifier);this.getDescriptionState(ut),this.currentIdentifier+=1;var ot={isOnScreen:at.isOnScreen,pointOnScene:at.pointOnScene,pointOnScreen:at.pointOnScreen,offsetPoint:at.offsetPoint,scale:at.scale};return{identifier:ut,phase:c0.Other,payload:ot}}},{key:"convertToEvent",value:function(at,ut){return at}},{key:"createCancelEvent",value:function(at){return null}}]),yt})();function oC(yt){return new sC(yt,[new kD,new wI,new OD,new Vw,new VS])}var TI=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.eventDispatcher=new k0,this.binder=null,this.fireEvent=function(ot){var gt=ut.continuityNode.interruptEvent(ot);gt&&ut.eventDispatcher.dispatch(gt)},this.screen=ct,this.eventInterrupter=at,this.continuityNode=oC(function(ot){return ut.eventDispatcher.dispatch(ot)})}return Bt(yt,[{key:"bindDivElement",value:function(at){at!==(this.binder?this.binder.divElement:null)&&(this.binder&&this.binder.release(),at?this.binder=new SI(this.screen.deviceType,at,this):this.binder=null)}},{key:"disable",get:function(){return this.continuityNode.disable},set:function(at){this.continuityNode.disable=at}},{key:"commandWheelToZoom",get:function(){return this.screen.commandWheelToZoom}},{key:"cancelCurrentContinuityEvent",value:function(){this.continuityNode.cancel()}},{key:"toPointInScene",value:function(at,ut){return this.screen.convertPointToScene(at,ut)}},{key:"willInterruptEvent",value:function(at,ut){return!this.disable&&this.eventInterrupter(at)?!0:ut?this.screen.willInterruptEvent(at,ut):!1}},{key:"addListener",value:function(at){this.eventDispatcher.addListener(at)}},{key:"removeListener",value:function(at){this.eventDispatcher.removeListener(at)}}]),yt})(),qD=(function(){function yt(ct){var at=this;Ot(this,yt),this.invoker=ct,this.timer=null,this.fireAt=-1,this.invokeWhenTimeout=function(){var ut=Date.now();if(ut>=at.fireAt)at.timer=null,at.fireAt=-1,at.invoker();else{var ot=at.fireAt-ut;at.timer=setTimeout(at.invokeWhenTimeout,ot)}}}return Bt(yt,[{key:"isRunning",get:function(){return this.timer!==null}},{key:"refreshAndInvokeAfterInterval",value:function(at){var ut=Date.now();if(this.timer===null)this.timer=setTimeout(this.invokeWhenTimeout,at),this.fireAt=ut+at;else{var ot=ut+at;ot<=this.fireAt&&(clearTimeout(this.timer),this.timer=setTimeout(this.invokeWhenTimeout,at)),this.fireAt=ot}}},{key:"cancel",value:function(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null)}}]),yt})(),EI=300,XE=(function(){function yt(ct){var at=this;Ot(this,yt),this.onPushedBoundlessEvent=ct,this.operationBuffer=[],this.willBlockOperation=!1,this.flushingOperationBufferTimer=null,this.flushOperationBuffer=function(){if(at.operationBuffer){var ut=Jt(at.operationBuffer),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;gt()}}catch(xt){ut.e(xt)}finally{ut.f()}at.operationBuffer.splice(0,at.operationBuffer.length),at.willBlockOperation=!1}at.flushingOperationBufferTimer=null}}return Bt(yt,[{key:"unknownIsMultiFingers",get:function(){return this.willBlockOperation}},{key:"startOperation",value:function(){this.willBlockOperation=!0,this.flushingOperationBufferTimer=setTimeout(this.flushOperationBuffer,EI)}},{key:"assertMultiFingers",value:function(){this.operationBuffer.splice(0,this.operationBuffer.length),this.willBlockOperation=!1,this.flushingOperationBufferTimer!==null&&(clearTimeout(this.flushingOperationBufferTimer),this.flushingOperationBufferTimer=null)}},{key:"assertSingleFinger",value:function(){this.flushingOperationBufferTimer!==null&&clearTimeout(this.flushingOperationBufferTimer),this.flushOperationBuffer()}},{key:"pushBoundlessEvent",value:function(at){var ut=this;this.willBlockOperation?this.operationBuffer.push(function(){return ut.onPushedBoundlessEvent(at)}):this.onPushedBoundlessEvent(at)}}]),yt})(),LD=(function(){function yt(){Ot(this,yt),this.pressedTouches={},this.emptyResolves=[],this.pressedTouchesCount=0}return Bt(yt,[{key:"receiveTouchStartOrMoveEvent",value:function(at){var ut=at.touches,ot=Jt(ut),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt.identifier in this.pressedTouches||(this.pressedTouchesCount+=1),this.pressedTouches[xt.identifier]=xt}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"receiveTouchEndOrCancelEvent",value:function(at){var ut=at.touches,ot=Jt(ut),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.identifier in this.pressedTouches&&(this.pressedTouchesCount-=1,delete this.pressedTouches[xt.identifier],this.pressedTouchesCount===0)){var Mt=Jt(this.emptyResolves.splice(0)),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;zt()}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}}}}catch(Ht){ot.e(Ht)}finally{ot.f()}}},{key:"waitUntilNoPressedTouches",value:function(){var at=this;return this.pressedTouchesCount===0?Promise.resolve():new Promise(function(ut){return at.emptyResolves.push(ut)})}}]),yt})(),FD=3,uC;(function(yt){yt[yt.None=0]="None",yt[yt.Event=1]="Event",yt[yt.Camera=2]="Camera",yt[yt.Cancel=3]="Cancel"})(uC||(uC={}));var O0=(function(){function yt(ct){Ot(this,yt),this.pressedTouches=new LD,this.state=0,this.pinchTouches=null,this.previousTouchesCount=0,this.firstPressedTouch=null,this.firstPressedTouchBeginX=0,this.firstPressedTouchBeginY=0,this.blocker=new XE(ct.onReceivedSortedTouchEvent),this.callbacks=Object.freeze(Ll({},ct))}return Bt(yt,[{key:"pushTouchEvent",value:function(at){switch(at.kind){case Ls.TouchStart:{this.pressedTouches.receiveTouchStartOrMoveEvent(at),this.pushTouchStartEvent(at);break}case Ls.TouchMove:{this.pressedTouches.receiveTouchStartOrMoveEvent(at),this.pushTouchMoveEvent(at);break}case Ls.TouchEnd:case Ls.TouchCancel:{this.pressedTouches.receiveTouchEndOrCancelEvent(at),this.pushTouchEndOrCancelEvent(at);break}}}},{key:"cancel",value:function(){var at=this;this.state!==0&&this.state!==3&&(this.state=3,this.pressedTouches.waitUntilNoPressedTouches().then(function(){at.state=0}).catch(function(ut){return console.error(ut)}))}},{key:"pushTouchStartEvent",value:function(at){var ut=at.touches;switch(this.state){case 0:{this.blocker.startOperation(),ut.length===1?(this.state=1,this.firstPressedTouchBeginX=ut[0].pointOnScreen.x,this.firstPressedTouchBeginY=ut[0].pointOnScreen.y,this.firstPressedTouch={identifier:ut[0].identifier,x:this.firstPressedTouchBeginX,y:this.firstPressedTouchBeginY},this.blocker.pushBoundlessEvent(this.covertToSortedTouchEvent(at,0))):(this.state=2,this.pinchTouches=ut.map(function(ot){return{identifier:ot.identifier,x:ot.pointOnScreen.x,y:ot.pointOnScreen.y}}),this.handleTouchEvents(this.pinchTouches));break}case 1:{this.pinchTouches=[{identifier:this.firstPressedTouch.identifier,x:this.firstPressedTouch.x,y:this.firstPressedTouch.y}],this.blocker.unknownIsMultiFingers&&(this.blocker.assertMultiFingers(),this.firstPressedTouch=null),this.pushToPinchTouches(ut),this.handleTouchEvents(this.pinchTouches),this.state=2;break}case 2:{this.pushToPinchTouches(ut),this.handleTouchEvents(this.pinchTouches);break}}}},{key:"pushTouchMoveEvent",value:function(at){var ut=this,ot=at.touches;switch(this.refreshFirstPressedTouch(ot),this.state){case 1:{var gt=ot.findIndex(function(zt){return zt.identifier===ut.firstPressedTouch.identifier});this.blocker.pushBoundlessEvent(this.covertToSortedTouchEvent(at,gt));break}case 2:{var xt=Jt(this.pinchTouches),Mt;try{var kt=function(){var Ht=Mt.value,rr=ot.find(function(ur){return ur.identifier===Ht.identifier});rr&&(Ht.x=rr.pointOnScreen.x,Ht.y=rr.pointOnScreen.y)};for(xt.s();!(Mt=xt.n()).done;)kt()}catch(zt){xt.e(zt)}finally{xt.f()}this.handleTouchEvents(this.pinchTouches);break}}}},{key:"pushTouchEndOrCancelEvent",value:function(at){var ut=this,ot=at.touches;if(this.firstPressedTouch&&this.state!==3){var gt=ot.findIndex(function(Ht){return Ht.identifier===ut.firstPressedTouch.identifier});if(gt!==-1){var xt=this.covertToSortedTouchEvent(at,gt);this.callbacks.onReceivedPreEndTouchEvent(xt),this.blocker.pushBoundlessEvent(xt),this.firstPressedTouch=null}}switch(this.state){case 1:{this.blocker.assertSingleFinger(),this.completeOperation();break}case 2:{this.blocker.assertMultiFingers();var Mt=Jt(ot),kt;try{var zt=function(){var rr=kt.value,ur=ut.pinchTouches.findIndex(function(_r){return _r.identifier===rr.identifier});ur!==-1&&ut.pinchTouches.splice(ur,1)};for(Mt.s();!(kt=Mt.n()).done;)zt()}catch(Ht){Mt.e(Ht)}finally{Mt.f()}this.firstPressedTouch&&this.pinchTouches.length===1?(this.state=1,this.handleTouchEvents([]),this.pinchTouches=null):this.pinchTouches.length===0?(this.handleTouchEvents(this.pinchTouches),this.pinchTouches=null,this.completeOperation()):this.handleTouchEvents(this.pinchTouches);break}}}},{key:"handleTouchEvents",value:function(at){try{this.previousTouchesCount===0&&at.length>0&&this.callbacks.onBeginTransformCamera(at),this.previousTouchesCount>0&&at.length===0?this.callbacks.onAfterTransformCamera():this.callbacks.onTransformCamera(at)}finally{this.previousTouchesCount=at.length}}},{key:"pushToPinchTouches",value:function(at){var ut=this;if(this.pinchTouches){var ot=Jt(at),gt;try{var xt=function(){var kt=gt.value;ut.pinchTouches.some(function(zt){return zt.identifier===kt.identifier})||ut.pinchTouches.push({x:kt.pointOnScreen.x,y:kt.pointOnScreen.y,identifier:kt.identifier})};for(ot.s();!(gt=ot.n()).done;)xt()}catch(Mt){ot.e(Mt)}finally{ot.f()}}}},{key:"refreshFirstPressedTouch",value:function(at){if(this.firstPressedTouch){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(gt.identifier===this.firstPressedTouch.identifier){this.firstPressedTouch.x=gt.pointOnScreen.x,this.firstPressedTouch.y=gt.pointOnScreen.y;break}}}catch(zt){ut.e(zt)}finally{ut.f()}if(this.blocker.unknownIsMultiFingers){var xt=this.firstPressedTouch.x-this.firstPressedTouchBeginX,Mt=this.firstPressedTouch.y-this.firstPressedTouchBeginY,kt=FD;xt*xt+Mt*Mt>=kt*kt&&this.blocker.assertSingleFinger()}}}},{key:"completeOperation",value:function(){this.state=0,this.blocker.unknownIsMultiFingers&&this.blocker.assertMultiFingers(),this.callbacks.onCompleteGroupOfEvents()}},{key:"covertToSortedTouchEvent",value:function(at,ut){var ot=at.touches[ut],gt=ot.identifier,xt=ot.pointOnScreen,Mt=ot.pointOnScene,kt,zt;switch(at.kind){case Ls.TouchStart:{kt=Ls.SortedTouchStart;break}case Ls.TouchMove:{kt=Ls.SortedTouchMove;break}case Ls.TouchEnd:{kt=Ls.SortedTouchEnd;break}case Ls.TouchCancel:{kt=Ls.SortedTouchCancel;break}default:throw new Error("unexpected kind ".concat(at.kind))}return this.firstPressedTouch&&(zt={x:this.firstPressedTouchBeginX,y:this.firstPressedTouchBeginY}),{identifier:gt,nativeEvent:at.nativeEvent,kind:kt,pointOnScreen:xt,pointOnScene:Mt,beginPointOnScreen:zt}}}]),yt})();function YE(yt,ct){return yt.centerX===ct.centerX&&yt.centerY===ct.centerY&&yt.damping===ct.damping&&yt.width===ct.width&&yt.height===ct.height&&yt.minScale===ct.minScale&&yt.maxScale===ct.maxScale}function lC(yt,ct,at,ut){if(ct===1/0||ut===1/0)return{center:0,scale:1/0};var ot=ct/ut;return Number.isNaN(ot)&&(ot=1),{center:at-yt,scale:ot}}var cC=(function(){function yt(ct){Ot(this,yt),this.originBorder=ct,this.currentBorder=ct,this._transform=Object.freeze({deltaX:0,deltaY:0,scale:1})}return Bt(yt,[{key:"transform",get:function(){return this._transform}},{key:"adaptOriginBorder",get:function(){return this._adaptOriginBorder}},{key:"setCurrentBorder",value:function(at){this.currentBorder=at;var ut=lC(this.originBorder.centerX,this.originBorder.width,this.currentBorder.centerX,this.currentBorder.width),ot=ut.center,gt=ut.scale,xt=lC(this.originBorder.centerY,this.originBorder.height,this.currentBorder.centerY,this.currentBorder.height),Mt=xt.center,kt=xt.scale,zt=Math.min(gt,kt);zt===1/0&&(zt=1),this._transform=Object.freeze({deltaX:ot,deltaY:Mt,scale:zt}),this._adaptOriginBorder=Object.freeze({damping:at.damping,centerX:at.centerX-ot,centerY:at.centerY-Mt,width:at.width*zt,height:at.height*zt,maxScale:at.maxScale/zt,minScale:at.minScale/zt})}}]),yt})(),BD=(function(){function yt(){Ot(this,yt),this.eccentricityRate=1,this.centroidXOffset=0,this.centroidYOffset=0,this.beginCentroidX=0,this.beginCentroidY=0,this.centroidX=0,this.centroidY=0,this._scale=1,this.isHanding=!1,this.previousTouchesCount=0}return Bt(yt,[{key:"beginCentroid",get:function(){return this.isHanding?{x:this.beginCentroidX,y:this.beginCentroidY}:yt.zeroPoint}},{key:"centroid",get:function(){return this.isHanding?{x:this.centroidX,y:this.centroidY}:yt.zeroPoint}},{key:"scale",get:function(){return this.isHanding?this._scale:1}},{key:"handleTouches",value:function(at){var ut=this.findTouchesExpression(at);this.isHanding?(this.previousTouchesCount!==at.length&&(this.centroidXOffset=this.centroidX-ut.centroidX,this.centroidYOffset=this.centroidY-ut.centroidY,this.eccentricityRate=this._scale/ut.eccentricity,this.previousTouchesCount=at.length),this.centroidX=ut.centroidX+this.centroidXOffset,this.centroidY=ut.centroidY+this.centroidYOffset,this._scale=ut.eccentricity*this.eccentricityRate):(this.centroidXOffset=0,this.centroidYOffset=0,this.eccentricityRate=1/ut.eccentricity,this.beginCentroidX=ut.centroidX,this.beginCentroidY=ut.centroidY,this.centroidX=ut.centroidX,this.centroidY=ut.centroidY,this._scale=1,this.previousTouchesCount=at.length,this.isHanding=!0)}},{key:"findTouchesExpression",value:function(at){var ut=0,ot=0,gt=Jt(at),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.x,zt=Mt.y;ut+=kt,ot+=zt}}catch(ts){gt.e(ts)}finally{gt.f()}var Ht=ut/at.length,rr=ot/at.length,ur=0,_r=Jt(at),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value,Ur=Br.x,Zr=Br.y,Tn=Ur-Ht,jn=Zr-rr;ur+=Math.sqrt(Tn*Tn+jn*jn)}}catch(ts){_r.e(ts)}finally{_r.f()}return ur===0&&(ur=1),{eccentricity:ur,centroidX:Ht,centroidY:rr}}}]),yt})(),dC=BD;dC.zeroPoint=Object.freeze({x:0,y:0});var QE=(function(){function yt(ct){Ot(this,yt),this.border={centerX:0,centerY:0,width:Number.POSITIVE_INFINITY,height:Number.POSITIVE_INFINITY},this.scaleStart=0,this.scaleEnd=Number.POSITIVE_INFINITY,this.screenSize=ct}return Bt(yt,[{key:"findClosestValidCamera",value:function(at){var ut=this.findClosestValidScale(at.scale),ot=at.centerX,gt=at.centerY;if(this.pinPoint&&at.scale!==ut){var xt=ot-this.pinPoint.x,Mt=gt-this.pinPoint.y,kt=ut/at.scale;ot=this.pinPoint.x+xt/kt,gt=this.pinPoint.y+Mt/kt}return ot=this.findClosestValidCenter(ot,ut,this.screenSize.width,this.border.centerX,this.border.width),gt=this.findClosestValidCenter(gt,ut,this.screenSize.height,this.border.centerY,this.border.height),{centerX:ot,centerY:gt,scale:ut}}},{key:"findClosestValidScale",value:function(at){var ut=at;return this.scaleStart>ut?ut=this.scaleStart:this.scaleEnd<ut&&(ut=this.scaleEnd),ut}},{key:"findClosestValidCenter",value:function(at,ut,ot,gt,xt){var Mt=ot/xt,kt=at;if(ut<=Mt)kt=gt;else{var zt=ot/ut/2,Ht=xt/2,rr=gt-Ht+zt,ur=gt+Ht-zt;kt<rr?kt=rr:kt>ur&&(kt=ur)}return kt}}]),yt})();function hC(yt,ct){return{x:yt.x-ct.width/2,y:yt.y-ct.height/2}}function BT(yt,ct,at){var ut=yt.x-ct.width/2,ot=yt.y-ct.height/2;return{x:at.centerX+ut/at.scale,y:at.centerY+ot/at.scale}}function jD(yt,ct){return yt.centerX===ct.centerX&&yt.centerY===ct.centerY&&yt.scale===ct.scale}var $D=(function(){function yt(ct){Ot(this,yt),this.pincher=null,this.damping=0,this.camera=null,this.lastValidCamera=null,this.domain=new QE(ct)}return Bt(yt,[{key:"isHandingPinch",get:function(){return!!this.pincher}},{key:"screenSize",get:function(){return this.domain.screenSize},set:function(at){this.domain.screenSize=at}},{key:"setCameraBorder",value:function(at){this.damping=at.damping,this.domain.scaleStart=at.minScale,this.domain.scaleEnd=at.maxScale,this.domain.border.centerX=at.centerX,this.domain.border.centerY=at.centerY,this.domain.border.width=at.width,this.domain.border.height=at.height}},{key:"beginWithCamera",value:function(at){this.pincher=new dC,this.camera=at}},{key:"handleTouchesAndGetCameraMoving",value:function(at){this.pincher.handleTouches(at);var ut=this.pincher.centroid,ot=this.currentTargetCamera();return this.transformToCombinedCamera(ot,ut)}},{key:"transformToCombinedCamera",value:function(at,ut){var ot=this.domain.screenSize,gt=BT(ut,ot,at);this.domain.pinPoint=gt;var xt=this.domain.findClosestValidCamera(at);this.lastValidCamera=xt;var Mt;if(this.damping===0)Mt=at;else if(this.damping===1)Mt=xt;else if(jD(at,xt))Mt=at;else{var kt=BT(ut,ot,xt);Mt=this.viewCamera(gt,kt,at,xt,this.damping)}return{valid:xt,view:Mt}}},{key:"completeAndGetValidCamera",value:function(){var at=this.lastValidCamera;return this.pincher=null,this.camera=null,this.lastValidCamera=null,at}},{key:"currentTargetCamera",value:function(){var at=this.camera,ut=this.pincher,ot=this.domain.screenSize,gt=at.scale*ut.scale,xt=hC(ut.beginCentroid,ot),Mt=hC(ut.centroid,ot),kt=xt.x/at.scale-Mt.x/gt,zt=xt.y/at.scale-Mt.y/gt;return{centerX:at.centerX+kt,centerY:at.centerY+zt,scale:gt}}},{key:"viewCamera",value:function(at,ut,ot,gt,xt){var Mt=LR(ot.centerX,ot.centerY,at.x,at.y),kt=rA(ot.scale,gt.scale,xt),zt=Mt*ot.scale/kt,Ht=rA(at.x,ut.x,xt),rr=rA(at.y,ut.y,xt),ur=qR(rA(ot.centerX,gt.centerX,xt)-Ht,rA(ot.centerY,gt.centerY,xt)-rr),_r=zt*ur.x,Dr=zt*ur.y;return{centerX:Ht+_r,centerY:rr+Dr,scale:kt}}}]),yt})(),UD=(function(){function yt(ct){Ot(this,yt),this._isActive=!1,this._key=void 0,this.previousPressEvent=null,this.cameraman=ct.cameraman,this.activeDispatch=ct.activeDispatch}return Bt(yt,[{key:"active",get:function(){return this._isActive},set:function(at){this._isActive=at}},{key:"key",get:function(){return this._key},set:function(at){this._key=at}},{key:"willInterruptEvent",value:function(at){return this.active&&!!at&&(at.kind===Ls.SortedTouchMove||at.kind===Ls.MouseMove)}},{key:"moveCameraByEvent",value:function(at){if(at&&this.previousPressEvent&&this.isMouseOrSortedTouch(this.previousPressEvent)&&this.isMouseOrSortedTouch(at)){var ut=at.pointOnScreen.x-this.previousPressEvent.pointOnScreen.x,ot=at.pointOnScreen.y-this.previousPressEvent.pointOnScreen.y,gt=this.cameraman.screen.camera,xt=gt.centerX,Mt=gt.centerY,kt=gt.scale;this.cameraman.transformCamera({centerX:xt-ut/kt,centerY:Mt-ot/kt,scale:kt,animationMode:Mm.Immediately,operatorId:this.cameraman.operatorId,boundCamera:!0})}}},{key:"handlePreviousEvent",value:function(at){this.needUpdatePrevious(at)?this.previousPressEvent=at:this.needReleasePrevious(at)&&(this.previousPressEvent=null)}},{key:"isKeyEvent",value:function(at){return!!at.nativeEvent&&at.nativeEvent instanceof KeyboardEvent&&at.nativeEvent.key===this.key}},{key:"handleKeyEvent",value:function(at){var ut=this.active;at.kind===Ls.KeyDown&&ut!==!0?this.active=!0:at.kind===Ls.KeyUp&&ut!==!1&&(this.active=!1),ut!==this.active&&this.activeDispatch(this.active)}},{key:"isMouseOrSortedTouch",value:function(at){var ut=at.kind;return ut===Ls.MouseDown||ut===Ls.MouseUp||ut===Ls.MouseLeave||ut===Ls.MouseMove||ut===Ls.SortedTouchStart||ut===Ls.SortedTouchMove||ut===Ls.SortedTouchEnd||ut===Ls.SortedTouchCancel}},{key:"needUpdatePrevious",value:function(at){return!!(at&&(this.previousPressEvent&&(at.kind===Ls.MouseMove||at.kind===Ls.SortedTouchMove)||at.kind===Ls.MouseDown||at.kind===Ls.SortedTouchStart))}},{key:"needReleasePrevious",value:function(at){return!!at&&(at.kind===Ls.MouseUp||at.kind===Ls.SortedTouchEnd||at.kind===Ls.SortedTouchCancel)}}]),yt})(),jT=(function(){function yt(ct,at,ut){var ot=this,gt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};Ot(this,yt),this.disableCameraTransform=!1,this.boundlessEventDispatcher=new k0,this.preEndTouchEventDisplayer=new k0,this.transformationEventDispatcher=new k0,this.handToolActiveEventDispatcher=new k0,this.transformer=null,this.border=Object.freeze({damping:.75,centerX:0,centerY:0,width:Number.POSITIVE_INFINITY,height:Number.POSITIVE_INFINITY,minScale:0,maxScale:Number.POSITIVE_INFINITY}),this.moveToCamera=null,this.didRelease=!1,this.isPaddingCameraOperations=!1,this.paddingCameraOperation=null,this.onBoundlessEvent=function(xt){switch(ot.screen.deviceType){case d0.Surface:{ot.handleBoundlessEventWhenItIsSurface(xt);break}case d0.Desktop:{ot.handleBoundlessEventWhenItIsDesktop(xt);break}case d0.Touch:ot.handleBoundlessEventWhenItIsTouch(xt)}},this.onScreenUpdatedListener=function(xt){var Mt=xt.camera,kt=xt.width,zt=xt.height,Ht=ot.cameraView.screenSize;if(Ht.width!==kt||Ht.height!==zt){ot.cameraView.screenSize=Object.freeze({width:kt,height:zt});var rr=ot.cameraView.transformToCombinedCamera(ot.screen.camera,{x:kt/2,y:zt/2}),ur=rr.valid;(Mt.centerX!==ur.centerX||Mt.centerY!==ur.centerY||Mt.scale!==ur.scale)&&ot.screen.transformCamera(Zm(Ll({},ur),{animationMode:Mm.Immediately}))}},this.dispatchBoundlessEvent=function(xt){var Mt=ot.continuityNode.interruptEvent(xt);ot.handTool.willInterruptEvent(Mt)?ot.handTool.moveCameraByEvent(Mt):Mt&&ot.boundlessEventDispatcher.dispatch(Mt),ot.handTool.handlePreviousEvent(Mt)},this.dispatchPreEndTouchEvent=function(xt){ot.preEndTouchEventDisplayer.dispatch(xt)},this.onAfterMouseWheel=function(){ot.transformationEventDispatcher.dispatch(oS.End),ot.screen.setTransition(!1,ot.operatorId)},this.onBeginTransformCamera=function(xt){ot.disableCameraTransform||(ot.isPaddingCameraOperations=!0,ot.transformationEventDispatcher.dispatch(oS.Begin),ot.cameraView.beginWithCamera(ot.screen.camera),ot.transformer=new cC(ot.border),ot.onTransformCamera(xt))},this.onTransformCamera=function(xt){if(!ot.disableCameraTransform){var Mt=ot.cameraView.handleTouchesAndGetCameraMoving(xt),kt=Zm(Ll({},ot.cameraAppendBorderTransform(Mt.view)),{animationMode:Mm.Immediately,operatorId:ot.operatorId});ot.moveToCamera=Mt.view,ot.screen.setCameraTransfrom(kt,!0)}},this.onAfterTransformCamera=function(){if(!ot.disableCameraTransform){var xt=ot.cameraView.completeAndGetValidCamera();ot.isPaddingCameraOperations=!1,ot.moveToCamera=ot.cameraAppendBorderTransform(xt),ot.cameraView.setCameraBorder(ot.border),ot.paddingCameraOperation&&(ot.paddingCameraOperation(),ot.paddingCameraOperation=null),ot.transformer=null,ot.transformationEventDispatcher.dispatch(oS.End)}},this.onCompleteGroupOfEvents=function(){if(ot.moveToCamera){var xt=ot.screen.camera;if(ot.moveToCamera.centerX!==xt.centerX||ot.moveToCamera.centerY!==xt.centerY||ot.moveToCamera.scale!==xt.scale){var Mt=Zm(Ll({},ot.moveToCamera),{animationMode:Mm.Continuous,operatorId:ot.operatorId});ot.screen.setCameraTransfrom(Mt,!1)}else ot.screen.setTransition(!1,ot.operatorId);ot.moveToCamera=null}},this.onContinuityNodeCancel=function(xt){ot.boundlessEventDispatcher.dispatch(xt),ot.sorter&&ot.sorter.cancel()},this.screen=ct,this.operatorId=ut,this.eventProxy=at,this.afterWheelDelayer=new qD(this.onAfterMouseWheel),this.continuityNode=oC(this.onContinuityNodeCancel),this.cameraView=new $D({width:ct.width,height:ct.height}),this.handTool=new UD({cameraman:this,activeDispatch:function(Mt){return ot.handToolActiveEventDispatcher.dispatch(Mt)}}),this.setCameraBorder(gt),(ct.deviceType===d0.Touch||ct.deviceType===d0.Surface)&&(this.sorter=new O0({onBeginTransformCamera:this.onBeginTransformCamera,onTransformCamera:this.onTransformCamera,onAfterTransformCamera:this.onAfterTransformCamera,onCompleteGroupOfEvents:this.onCompleteGroupOfEvents,onReceivedSortedTouchEvent:this.dispatchBoundlessEvent,onReceivedPreEndTouchEvent:this.dispatchPreEndTouchEvent})),at.addListener(this.onBoundlessEvent),ct.addScreenUpdatedListener(this.onScreenUpdatedListener)}return Bt(yt,[{key:"handToolActive",get:function(){return this.handTool.active},set:function(at){this.handTool.active=at}},{key:"handToolKey",get:function(){return this.handTool.key},set:function(at){this.handTool.key=at}},{key:"cameraBorder",get:function(){return this.border}},{key:"cancelCurrentContinuityEvent",value:function(){this.continuityNode.cancel()}},{key:"setCameraBorder",value:function(at){var ut=this.border,ot=this.border=Object.freeze(Ll(Ll({},this.border),at));if(!YE(ut,ot)){var gt;this.transformer?(gt=this.transformer,gt.setCurrentBorder(ot),ot=gt.adaptOriginBorder):(gt=new cC(ut),gt.setCurrentBorder(ot)),this.cameraView.setCameraBorder(ot);var xt=this.moveToCamera||this.screen.camera,Mt=gt,kt=Mt.transform;(kt.deltaX!==0||kt.deltaY!==0||kt.scale!==1)&&this.screen.transformCamera({animationMode:Mm.Immediately,centerX:xt.centerX+kt.deltaX,centerY:xt.centerY+kt.deltaY,scale:xt.scale*kt.scale})}return this.border}},{key:"disableBoundlessEvent",get:function(){return this.continuityNode.disable},set:function(at){this.continuityNode.disable=at}},{key:"transformCamera",value:function(at){var ut=this;this.isPaddingCameraOperations?this.paddingCameraOperation=function(){return ut.executeTransformCamera(at)}:this.executeTransformCamera(at)}},{key:"executeTransformCamera",value:function(at){var ut=at;if(ut.boundCamera){var ot=this.screen.camera,gt=ot.centerX,xt=ot.centerY,Mt=ot.scale,kt={centerX:Dx(ut.centerX,gt),centerY:Dx(ut.centerY,xt),scale:Dx(ut.scale,Mt)},zt=this.cameraView.screenSize,Ht=zt.width,rr=zt.height,ur=this.cameraView.transformToCombinedCamera(kt,{x:Ht/2,y:rr/2}),_r=ur.valid;(_r.centerX!==kt.centerX||_r.centerY!==kt.centerY||_r.scale!==kt.scale)&&(ut=Zm(Ll({},ut),{centerX:_r.centerX,centerY:_r.centerY,scale:_r.scale}))}this.screen.transformCamera(ut)}},{key:"adaptRectangle",value:function(at){var ut=this;this.isPaddingCameraOperations?this.paddingCameraOperation=function(){return ut.screen.adaptRectangle(at)}:this.screen.adaptRectangle(at)}},{key:"release",value:function(){this.didRelease||(this.sorter&&this.sorter.cancel(),this.eventProxy.removeListener(this.onBoundlessEvent),this.screen.removeScreenUpdatedListener(this.onScreenUpdatedListener),this.afterWheelDelayer.cancel(),this.didRelease=!0)}},{key:"handleBoundlessEventWhenItIsDesktop",value:function(at){switch(at.kind){case Ls.MouseWheel:{this.onMouseWheel(at);break}case Ls.TouchStart:case Ls.TouchMove:case Ls.TouchEnd:case Ls.TouchCancel:break;case Ls.KeyDown:case Ls.KeyUp:{this.handTool.isKeyEvent(at)?this.handTool.handleKeyEvent(at):this.dispatchBoundlessEvent(at);break}default:this.dispatchBoundlessEvent(at)}}},{key:"handleBoundlessEventWhenItIsTouch",value:function(at){switch(at.kind){case Ls.TouchStart:case Ls.TouchMove:case Ls.TouchEnd:case Ls.TouchCancel:{this.sorter.pushTouchEvent(at);break}case Ls.MouseDown:case Ls.MouseUp:case Ls.MouseMove:case Ls.MouseLeave:break;case Ls.KeyDown:case Ls.KeyUp:{this.handTool.isKeyEvent(at)?this.handTool.handleKeyEvent(at):this.dispatchBoundlessEvent(at);break}default:this.dispatchBoundlessEvent(at)}}},{key:"handleBoundlessEventWhenItIsSurface",value:function(at){switch(at.kind){case Ls.MouseWheel:{this.onMouseWheel(at);break}case Ls.TouchStart:case Ls.TouchMove:case Ls.TouchEnd:case Ls.TouchCancel:{this.sorter.pushTouchEvent(at);break}case Ls.MouseDown:case Ls.MouseUp:case Ls.MouseMove:case Ls.MouseLeave:default:this.dispatchBoundlessEvent(at)}}},{key:"onMouseWheel",value:function(at){if(!this.disableCameraTransform){var ut=this.screen.camera,ot=ut.centerX,gt=ut.centerY,xt=ut.scale;if(at.scale!==0){var Mt=1+at.scale,kt=at.pointOnScreen.x,zt=at.pointOnScreen.y,Ht=(1-1/Mt)/xt;ot+=Ht*(kt-this.screen.width/2),gt+=Ht*(zt-this.screen.height/2),xt*=Mt}ot-=at.offsetPoint.x/xt,gt-=at.offsetPoint.y/xt;var rr=this.cameraView.transformToCombinedCamera({centerX:ot,centerY:gt,scale:xt},at.pointOnScreen),ur=Zm(Ll({},this.cameraAppendBorderTransform(rr.valid)),{animationMode:Mm.Immediately,operatorId:this.operatorId});this.transformationEventDispatcher.dispatch(oS.Begin),this.afterWheelDelayer.refreshAndInvokeAfterInterval(yt.RefreshTimeoutOnDesktop),this.screen.setCameraTransfrom(ur,!0)}}},{key:"cameraAppendBorderTransform",value:function(at){if(this.transformer){var ut=this.transformer.transform;return Object.freeze({centerX:at.centerX+ut.deltaX,centerY:at.centerY+ut.deltaY,scale:at.scale*ut.scale})}else return at}},{key:"addHandToolActiveListener",value:function(at){this.handToolActiveEventDispatcher.addListener(at)}},{key:"removeHandToolActiveListener",value:function(at){this.handToolActiveEventDispatcher.removeListener(at)}},{key:"addCameraTransformationListener",value:function(at){this.transformationEventDispatcher.addListener(at)}},{key:"removeCameraTransformationListener",value:function(at){this.transformationEventDispatcher.removeListener(at)}},{key:"addBoundlessEventListener",value:function(at){this.boundlessEventDispatcher.addListener(at)}},{key:"removeBoundlessEventListener",value:function(at){this.boundlessEventDispatcher.removeListener(at)}},{key:"addPreTouchEventListener",value:function(at){this.preEndTouchEventDisplayer.addListener(at)}},{key:"removePreTouchEventListener",value:function(at){this.preEndTouchEventDisplayer.removeListener(at)}}]),yt})(),KE=jT;KE.RefreshTimeoutOnDesktop=200;function Hw(yt,ct){var at=yt.indexOf(ct);at!==-1&&yt.splice(at,1)}function fC(yt,ct){yt.indexOf(ct)===-1&&yt.push(ct)}var zD=(function(){function yt(){var ct=this;Ot(this,yt),this.animationPriorities=[],this.animations={},this.afterAnimationsInvokers=[],this.animationId=null,this.isInAnimationFrame=!1,this.useLowTaskAnimation=IT.Default,this.onAnimationFrame=function(){try{ct.isInAnimationFrame=!0;var at=Jt(ct.animationPriorities),ut;try{for(at.s();!(ut=at.n()).done;)for(var ot=ut.value,gt=0,xt=Ct(ct.animations[ot]);gt<xt.length;gt++){var Mt=xt[gt];Mt()}}catch(rr){at.e(rr)}finally{at.f()}for(var kt=0,zt=Ct(ct.afterAnimationsInvokers);kt<zt.length;kt++){var Ht=zt[kt];Ht()}ct.animationPriorities.length>0?ct.runAnimationAsync():ct.animationId=null}finally{ct.isInAnimationFrame=!1}}}return Bt(yt,[{key:"addAnimation",value:function(at,ut){var ot=this.animations[at],gt=!1;ot||(ot=this.animations[at]=[],this.animationPriorities.push(at),this.animationPriorities.sort(),gt=this.animationPriorities.length===1),fC(ot,ut),gt&&this.animationId===null&&this.runAnimationAsync()}},{key:"runAnimationAsync",value:function(){if(this.useLowTaskAnimation=eS.useLowTaskAnimation,this.useLowTaskAnimation){this.animationId=window.requestIdleCallback(this.onAnimationFrame,{timeout:this.useLowTaskAnimation});return}this.animationId=window.requestAnimationFrame(this.onAnimationFrame)}},{key:"cancelAnimationAsync",value:function(){this.animationId&&(this.useLowTaskAnimation?window.cancelIdleCallback(this.animationId):window.cancelAnimationFrame(this.animationId)),this.animationId=null}},{key:"removeAnimation",value:function(at,ut){var ot=this.animations[at];ot&&(Hw(ot,ut),ot.length===0&&(delete this.animations[at],Hw(this.animationPriorities,at),this.animationPriorities.length===0&&!this.isInAnimationFrame&&this.animationId!==null&&this.cancelAnimationAsync()))}},{key:"addAfterAnimationsInvoker",value:function(at){fC(this.afterAnimationsInvokers,at)}},{key:"removeAfterAnimationsInvoker",value:function(at){Hw(this.afterAnimationsInvokers,at)}}]),yt})(),W_=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"createAnimationGroup",value:function(){return new pC}},{key:"createAnimation",value:function(at,ut){return new GD(at,ut)}},{key:"createAnimationFrameInvoker",value:function(at){return new AI(at)}},{key:"createAfterAnimationsInvoker",value:function(at){return new mC(at)}}]),yt})();W_.animationFrames=new zD;var pC=(function(){function yt(){Ot(this,yt),this.children=[]}return Bt(yt,[{key:"createAnimation",value:function(at,ut){var ot=this,gt=new GD(at,ut,function(xt){return Hw(ot.children,xt)});return this.children.push(gt),gt}},{key:"createAfterAnimationsInvoker",value:function(at){var ut=this,ot=new mC(at,function(gt){return Hw(ut.children,gt)});return this.children.push(ot),ot}},{key:"release",value:function(){var at=Jt(this.children.splice(0)),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot.release()}}catch(gt){at.e(gt)}finally{at.f()}}}]),yt})(),GD=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this.priority=ct,this.onRefresh=at,this.onRelease=ut,this.onAnimationFrame=function(){$T(ot,ot.onRefresh)},W_.animationFrames.addAnimation(this.priority,this.onAnimationFrame)}return Bt(yt,[{key:"release",value:function(){W_.animationFrames.removeAnimation(this.priority,this.onAnimationFrame),this.onRelease&&this.onRelease(this)}}]),yt})(),mC=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.onRefresh=ct,this.onRelease=at,this.onAnimationFrame=function(){$T(ut,ut.onRefresh)},W_.animationFrames.addAfterAnimationsInvoker(this.onAnimationFrame)}return Bt(yt,[{key:"release",value:function(){W_.animationFrames.removeAfterAnimationsInvoker(this.onAnimationFrame),this.onRelease&&this.onRelease(this)}}]),yt})(),AI=(function(){function yt(ct){var at=this;Ot(this,yt),this.priority=ct,this.nextHandler=null,this.banAnimationChange=!1,this.onAnimationFrame=function(){if(at.nextHandler){var ut=at.nextHandler;at.nextHandler=null;try{at.banAnimationChange=!0,$T(at,ut)}finally{at.banAnimationChange=!1}at.nextHandler===null&&W_.animationFrames.removeAnimation(at.priority,at.onAnimationFrame)}}}return Bt(yt,[{key:"invoke",value:function(at){!this.banAnimationChange&&!this.nextHandler&&W_.animationFrames.addAnimation(this.priority,this.onAnimationFrame),this.nextHandler=at}},{key:"release",value:function(){!this.banAnimationChange&&this.nextHandler&&(this.nextHandler=null,W_.animationFrames.removeAnimation(this.priority,this.onAnimationFrame))}}]),yt})(),gC=new W_;function $T(yt,ct){try{ct(yt)}catch(at){console.error(at)}}function vC(yt){var ct=Math.abs(yt),at=1/(1+ct/2),ut=at*Math.exp(-ct*ct-1.26551223+at*(1.00002368+at*(.37409196+at*(.09678418+at*(-.18628806+at*(.27886807+at*(-1.13520398+at*(1.48851587+at*(-.82215223+at*.17087277)))))))));return yt>=0?ut:2-ut}function VD(yt){if(yt>=2)return-100;if(yt<=0)return 100;for(var ct=yt<1?yt:2-yt,at=Math.sqrt(-2*Math.log(ct/2)),ut=-.70711*((2.30753+at*.27061)/(1+at*(.99229+at*.04481))-at),ot=0;ot<2;ot++){var gt=vC(ut)-ct;ut+=gt/(1.1283791670955126*Math.exp(-(ut*ut))-ut*gt)}return yt<1?ut:-ut}function Ww(yt,ct){return new HD(yt,ct)}function yC(yt,ct){return Ww(ct/yt,1/yt)}var HD=(function(){function yt(ct,at){Ot(this,yt),this.mean=ct,this.variance=at,this.standardDeviation=Math.sqrt(at)}return Bt(yt,[{key:"pdf",value:function(at){var ut=this.standardDeviation*Math.sqrt(2*Math.PI);return Math.exp(-Math.pow(at-this.mean,2)/(2*this.variance))/ut}},{key:"cdf",value:function(at){return .5*vC(-(at-this.mean)/(this.standardDeviation*Math.sqrt(2)))}},{key:"ppf",value:function(at){return this.mean-this.standardDeviation*Math.sqrt(2)*VD(2*at)}},{key:"mul",value:function(at){if(typeof at=="number")return this.scale(at);var ut=1/this.variance,ot=1/at.variance;return yC(ut+ot,ut*this.mean+ot*at.mean)}},{key:"div",value:function(at){if(typeof at=="number")return this.scale(1/at);var ut=1/this.variance,ot=1/at.variance;return yC(ut-ot,ut*this.mean-ot*at.mean)}},{key:"add",value:function(at){return Ww(this.mean+at.mean,this.variance+at.variance)}},{key:"sub",value:function(at){return Ww(this.mean-at.mean,this.variance+at.variance)}},{key:"scale",value:function(at){return Ww(this.mean*at,this.variance*at*at)}}]),yt})(),bC=(function(){function yt(){Ot(this,yt);for(var ct=arguments.length,at=new Array(ct),ut=0;ut<ct;ut++)at[ut]=arguments[ut];this.configurations=Object.freeze(at.map(function(ot){return Object.freeze(Ll({},ot))}))}return Bt(yt,[{key:"create",value:function(at,ut,ot){return new _C(at,Ct(this.configurations),ut,ot)}}]),yt})(),WD=(function(){function yt(ct,at,ut,ot){var gt=this;Ot(this,yt),this.priority=ct,this._point=ut,this.onPointUpdate=ot,this.completeTick=!1,this.playingAnimation=null,this.updateIdealPoint=function(rr){yt.setPoint(gt.idealPoint,rr),!gt.playingAnimation&&gt.shouldContinueMoving()&&(gt.playingAnimation=gC.createAnimation(gt.priority,gt.onTick)),gt.completeTick=!1},this.onTick=function(){if(gt.completeTick)gt.stop();else{gt.executePhysicalSimulate();var rr=!gt.shouldContinueMoving();gt.onPointUpdate&&gt.onPointUpdate(gt._point,rr),rr&&(gt.completeTick=!0)}};var xt=at.splice(0,1),Mt=mt(xt,1),kt=Mt[0];this.configuration=kt,this._point=Ct(ut),this.idealPoint=Ct(ut),this.velocity=ut.map(function(){return 0}),at.length>0&&(this.guider=new yt(this.priority,at,ut,this.updateIdealPoint));var zt=this.configuration.pedesisSpeedMean,Ht=this.configuration.pedesisSpeedVariance;zt!==0&&Ht!==0?this.gaussian=Ww(zt,Ht):this.gaussian=null,this.noPedesisRadius=(zt+Math.sqrt(Ht))*yt.noPedesisRadiusRate}return Bt(yt,[{key:"point",get:function(){return this._point}},{key:"isPlayingAnimation",get:function(){return!!this.playingAnimation}},{key:"moveRightNow",value:function(at){this.guider&&this.guider.moveRightNow(at),yt.setPoint(this.idealPoint,at),yt.setPoint(this._point,at),yt.setPointZero(this.velocity),this.playingAnimation&&(this.playingAnimation.release(),this.playingAnimation=null),this.completeTick=!1}},{key:"moveTo",value:function(at){this.guider?this.guider.moveTo(at):this.updateIdealPoint(at)}},{key:"moveToAndChangeCoordinate",value:function(at,ut){for(var ot=0;ot<this._point.length;++ot)this._point[ot]+=at[ot];this.guider?this.guider.moveToAndChangeCoordinate(at,ut):this.updateIdealPoint(ut)}},{key:"stop",value:function(){yt.setPoint(this.idealPoint,this._point),yt.setPointZero(this.velocity),this.playingAnimation&&(this.playingAnimation.release(),this.playingAnimation=null),this.completeTick=!1}},{key:"executePhysicalSimulate",value:function(){for(var at=this.squareDistanceToIdealPoint(),ut=this.velocityDamping(at),ot=at>this.noPedesisRadius*this.noPedesisRadius,gt=0;gt<this._point.length;++gt){var xt=this.idealPoint[gt]-this._point[gt],Mt=this.configuration.kDistance*xt;if(this.velocity[gt]+=Mt,ot&&this.gaussian){var kt=this.gaussian.ppf(Math.random());Math.random()>=.5&&(kt=-kt),this.velocity[gt]+=kt}this._point[gt]+=this.velocity[gt],this.velocity[gt]*=1-ut}}},{key:"velocityDamping",value:function(at){for(var ut=0,ot=0;ot<this.velocity.length;++ot)ut+=this.velocity[ot]*this.velocity[ot];var gt=this.configuration,xt=gt.heavyDampingRadius,Mt=gt.heavyDampingSpeed;return ut<Mt*Mt||at>xt*xt?this.configuration.velocityDamping:Math.min(1,ut*this.configuration.velocityDamping)}},{key:"squareDistanceToIdealPoint",value:function(){for(var at=0,ut=0;ut<this.velocity.length;++ut){var ot=this.idealPoint[ut]-this._point[ut];at+=ot*ot}return at}},{key:"shouldContinueMoving",value:function(){for(var at=0;at<this._point.length;++at)if(Math.abs(this._point[at]-this.idealPoint[at])>this.configuration.matchingDistance||Math.abs(this.velocity[at])>this.configuration.zeroSpeed)return!0;return!1}}],[{key:"setPoint",value:function(at,ut){for(var ot=0;ot<at.length;++ot)ot in ut?at[ot]=ut[ot]:at[ot]=0}},{key:"setPointZero",value:function(at){for(var ut=0;ut<at.length;++ut)at[ut]=0}}]),yt})(),_C=WD;_C.noPedesisRadiusRate=2.7;var Xw;(function(yt){yt[yt.ComponentMoving=0]="ComponentMoving",yt[yt.CameraMoving=1]="CameraMoving",yt[yt.Rendering=2]="Rendering"})(Xw||(Xw={}));var XD=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.referPoint=[],this._isTransition=!1;var ot=at&&function(gt,xt){var Mt=ut.convertPointToCamera(gt,xt),kt=ut._isTransition||!xt;at(Mt,kt,ut.currentOperatorId),xt&&(ut.currentOperatorId=void 0)};this.referPoint[0]=ct.centerX,this.referPoint[1]=ct.centerY,this.referPoint[2]=ct.scale*yt.kScale,this.spaceSpring=yt.spaceSpringFactory.create(Xw.CameraMoving,[0,0,0],ot)}return Bt(yt,[{key:"isTransition",get:function(){return this._isTransition}},{key:"convertPointToCamera",value:function(at,ut){return ut?{centerX:this.referPoint[0],centerY:this.referPoint[1],scale:this.referPoint[2]/yt.kScale}:{centerX:this.referPoint[0]+at[0],centerY:this.referPoint[1]+at[1],scale:(this.referPoint[2]+at[2])/yt.kScale}}},{key:"moveTo",value:function(at,ut,ot){var gt=[this.referPoint[0]-at.centerX,this.referPoint[1]-at.centerY,this.referPoint[2]-at.scale*yt.kScale];this._isTransition=ut,this.currentOperatorId=ot,this.referPoint[0]=at.centerX,this.referPoint[1]=at.centerY,this.referPoint[2]=at.scale*yt.kScale,this.spaceSpring.moveToAndChangeCoordinate(gt,[0,0,0])}},{key:"moveToRightNow",value:function(at,ut){this._isTransition=ut,this.referPoint[0]=at.centerX,this.referPoint[1]=at.centerY,this.referPoint[2]=at.scale*yt.kScale,this.spaceSpring.moveRightNow([0,0,0])}}]),yt})(),ZE=XD;ZE.kScale=700,ZE.spaceSpringFactory=new bC({matchingDistance:2,zeroSpeed:.55,kDistance:.17,velocityDamping:.55,heavyDampingRadius:15,heavyDampingSpeed:.25,pedesisSpeedMean:0,pedesisSpeedVariance:0},{matchingDistance:2,zeroSpeed:.55,kDistance:.12,velocityDamping:.35,heavyDampingRadius:15,heavyDampingSpeed:.35,pedesisSpeedMean:0,pedesisSpeedVariance:0});function xC(yt,ct){var at=ct,ut=Jt(yt),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at=(0,eI.createElement)(gt,null,at)}}catch(xt){ut.e(xt)}finally{ut.f()}return at}function JE(yt){var ct={},at=Jt(yt.engines),ut;try{var ot=function(){var xt=ut.value;ct[xt.id]=xt.createRenderLayout({screen:yt.screen,tree:yt.tree,mode:yt.mode,initCamera:yt.initCamera,visions:yt.visions,leafFilter:function(kt){return kt.value.isVisible(xt)},onRenderDuration:yt.onRenderDuration})};for(at.s();!(ut=at.n()).done;)ot()}catch(gt){at.e(gt)}finally{at.f()}return ct}var YD=(function(){function yt(ct){Ot(this,yt),this.className=ct.screen.className,this.layouts=Object.freeze(JE({tree:ct.tree,screen:ct.screen,initCamera:ct.initCamera,visions:ct.visions,engines:ct.engines,onRenderDuration:ct.onRenderDuration,mode:By.Preview}))}return Bt(yt,[{key:"render",value:function(at){var ut=[],ot={width:"100%",height:"100%",position:"relative"};for(var gt in this.layouts){var xt=this.layouts[gt].getRender();ut.push((0,OE.createElement)(xt,{key:gt}))}return xC(at,(0,OE.createElement)("div",{className:this.className,style:ot},ut))}}]),yt})(),Ix;(function(yt){(function(gt){gt[gt.Disjoint=0]="Disjoint",gt[gt.Cross=1]="Cross",gt[gt.IncludeRectangle=2]="IncludeRectangle",gt[gt.IncludeByRectangle=3]="IncludeByRectangle"})(yt.Result||(yt.Result={}));function ct(gt,xt,Mt,kt,zt,Ht){var rr=gt+Mt,ur=xt+kt;return zt>=gt&&zt<=rr&&Ht>=xt&&Ht<=ur}yt.testPoint=ct;function at(gt,xt,Mt,kt,zt,Ht,rr,ur){var _r=SC(gt,gt+Mt,zt,zt+rr),Dr=SC(xt,xt+kt,Ht,Ht+ur);return _r===0||Dr===0?0:_r===1||Dr===1?1:_r===2&&Dr===2?2:_r===3&&Dr===3?3:1}yt.testRectangle=at;function ut(gt,xt,Mt,kt,zt){zt(gt,xt),zt(gt+Mt,xt),zt(gt+Mt,xt+kt),zt(gt,xt+kt)}yt.iterate=ut;function ot(gt,xt,Mt,kt){return[{x:gt,y:xt},{x:gt+Mt,y:xt},{x:gt+Mt,y:xt+kt},{x:gt,y:xt+kt}]}yt.allPoints=ot})(Ix||(Ix={}));function SC(yt,ct,at,ut){var ot=yt,gt=ct,xt=at,Mt=ut,kt=ot>xt;if(kt){var zt=ot,Ht=gt;ot=xt,xt=zt,gt=Mt,Mt=Ht}return gt<xt?Ix.Result.Disjoint:gt<Mt?Ix.Result.Cross:kt?Ix.Result.IncludeByRectangle:Ix.Result.IncludeRectangle}var Qt=(function(){function yt(ct){Ot(this,yt),this.component=null,this.componentState={className:ct.screen.className},this.layouts=Object.freeze(JE({tree:ct.tree,screen:ct.screen,engines:ct.engines,visions:ct.visions,onRenderDuration:ct.onRenderDuration,mode:By.Normal})),this.logger=ct.screen.scene.logger,this.renderClass=this.createRender()}return Bt(yt,[{key:"setState",value:function(at){var ut;this.componentState=Ll({},at),(ut=this.component)==null||ut.setState(at)}},{key:"renderLayouts",get:function(){return this.layouts}},{key:"getRender",value:function(){return this.renderClass}},{key:"createRender",value:function(){var at={self:this},ut=(function(ot){It(xt,ot);var gt=qt(xt);function xt(Mt){var kt;return Ot(this,xt),kt=gt.call(this,Mt),kt.state=Ll({},at.self.componentState),at.self.component=Kt(kt),kt}return Bt(xt,[{key:"componentWillUnmount",value:function(){at.self.component=null,at.self=null}},{key:"render",value:function(){var kt=[],zt=this.state,Ht=zt.className,rr=zt.style,ur=Zm(Ll({},rr),{width:"100%",height:"100%",position:"relative",overflow:"hidden"});for(var _r in at.self.layouts)kt.push((0,MT.createElement)(sr,{key:_r,logger:at.self.logger,layout:at.self.layouts[_r]}));return(0,MT.createElement)("div",{className:Ht,style:ur,tabIndex:-1},kt)}}]),xt})(MT.Component);return ut}}]),yt})(),sr=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.state={error:void 0},ot}return Bt(at,[{key:"shouldComponentUpdate",value:function(ot,gt){var xt=this.props.layout,Mt=this.state.error;return xt!==ot.layout||Mt!==gt.error}},{key:"componentDidCatch",value:function(ot,gt){var xt=this.props,Mt=xt.layout,kt=xt.logger;kt.error("boundless layout ".concat(Mt.engine.id," render catch error:"),ot," stack: ",gt.componentStack)}},{key:"render",value:function(){var ot=this.props.layout,gt=this.state.error;if(gt)return null;{var xt=ot.getRender();return(0,MT.createElement)(xt,null)}}}],[{key:"getDerivedStateFromError",value:function(ot){return console.error(ot),{error:ot}}}]),at})(MT.Component),Rr=(function(){function yt(ct,at,ut,ot,gt){Ot(this,yt);var xt={},Mt=function(Ht){var rr=ct.renderLayouts[Ht],ur={};at.forEach(function(_r){_r.value.isVisible(rr.engine)&&(ur[_r.id]=!0)}),xt[Ht]=Object.seal({layout:rr,visibleSet:ur})};for(var kt in ct.renderLayouts)Mt(kt);this.camera=ot,this.screenSize=gt,this.context=ut,this.engineNodes=Object.freeze(xt)}return Bt(yt,[{key:"flush",value:function(at){var ut,ot,gt;P0(this.camera,at.camera)||(ut=this.camera=at.camera),P0(this.screenSize,at.screenSize)||(ot=this.screenSize=at.screenSize),this.context!==at.context&&(gt=this.context=at.context);for(var xt in this.engineNodes)this.flushEngine(this.engineNodes[xt],at,gt,ut,ot)}},{key:"flushEngine",value:function(at,ut,ot,gt,xt){var Mt=at.visibleSet,kt=at.layout.engine,zt=ut.testSet,Ht=ut.updateSet,rr=ut.moveSet,ur=ut.isTransition,_r=ut.diff,Dr=_r.addedSet,Br=_r.removedSet,Ur=[],Zr=[],Tn=[];for(var jn in Dr)Dr[jn].value.isVisible(kt)?Mt[jn]=!0:Tn.push(jn);for(var ts in zt){var us=zt[ts],Os=us.treeNode,Hs=us.isVisible(kt),Ks=ts in Mt;Ks&&!Hs?(Zr.push(Os),delete Mt[ts]):!Ks&&Hs&&(Ur.push(Os),Mt[ts]=!0)}for(var so in Br)delete Mt[so];var To=ut.diff.decorate({insertToAdded:Ur,insertToRemoved:Zr,maskAdded:Tn}),Oo={},Au={};for(var Tu in Ht)Tu in Mt&&(Oo[Tu]=Ht[Tu].treeNode);for(var xu in rr)xu in Mt&&(Au[xu]=rr[xu].treeNode);at.layout.update({context:ot,camera:gt,screenSize:xt,isTransition:ur,diff:To,updateSet:Oo,moveSet:Au})}}]),yt})(),cn=(function(){function yt(ct){var at=this;Ot(this,yt),this.frameInvoker=gC.createAnimationFrameInvoker(Xw.Rendering),this.didReceiveTransitionFalse=!1,this.onFrameInvoke=function(){var ut=!at.didReceiveTransitionFalse;at.didReceiveTransitionFalse=!1,at.frameHandler(ut)},this.frameHandler=ct}return Bt(yt,[{key:"release",value:function(){this.frameInvoker.release()}},{key:"fire",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;at||(this.didReceiveTransitionFalse=!0),this.frameInvoker.invoke(this.onFrameInvoke)}}]),yt})();function Bn(yt,ct,at,ut){var ot=ro(ct),gt=yt.treeNode;Fs(gt,ot,at,ut)}function ns(yt,ct,at,ut){switch(yt.kind){case w_.Component:{var ot=yt,gt=ot.treeNode.parent,xt=Ds(gt,ct);if(xt){var Mt=tu(yt,xt);Mt?at(ot,Mt):ut(ot)}break}case w_.Group:{var kt=yt.treeNode,zt=Ds(kt,ct);zt&&Fs(kt,zt,at,ut);break}}}function Ds(yt,ct){for(var at=[],ut=yt;ut.parent;)at.push(ut),ut=ut.parent;for(var ot=ro(ct),gt=at.length-1;gt>=0;gt--){var xt=at[gt].value,Mt=tu(xt,ot);if(!Mt){ot=null;break}ot=Uo(ot,Mt,xt)}return ot}function Fs(yt,ct,at,ut){var ot=Jt(yt),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value,Mt=xt.value,kt=tu(Mt,ct);switch(Mt.kind){case w_.Component:{var zt=Mt;kt?at(zt,kt):ut(zt);break}case w_.Group:{if(kt){var Ht=Mt,rr=Ht.treeNode,ur=Uo(ct,kt,Ht);Fs(rr,ur,at,ut)}break}}}}catch(_r){ot.e(_r)}finally{ot.f()}}function ro(yt){var ct=yt.camera,at=yt.width,ut=yt.height,ot={dx:0,dy:0,scale:1},gt={dx:-(ct.centerX-at/ct.scale/2)*ct.scale,dy:-(ct.centerY-ut/ct.scale/2)*ct.scale,scale:ct.scale};return{scene:ot,screen:gt,rect:{originX:0,originY:0,width:at,height:ut},tailor:{left:0,right:0,top:0,bottom:0},absolute:Go(at,ut)}}function Go(yt,ct){var at={dx:0,dy:0,scale:1},ut={dx:yt/2,dy:ct/2,scale:1},ot={scene:at,screen:ut,rect:{originX:0,originY:0,width:yt,height:ct},tailor:{left:0,right:0,top:0,bottom:0},absolute:null};return ot.absolute=ot,ot}function Uo(yt,ct,at){var ut=ct.sceneRect,ot=ct.screenRect,gt=ct.tailor,xt={dx:ut.originX,dy:ut.originY,scale:yt.scene.scale*at.scale},Mt={dx:ot.originX,dy:ot.originY,scale:yt.screen.scale*at.scale};return{scene:xt,screen:Mt,rect:ot,tailor:gt,absolute:yt.absolute}}function tu(yt,ct){if(yt.kind===w_.Component&&!yt.isVisible())return null;var at=ct,ut;yt.absoluteCoordinates&&(at=at.absolute),yt instanceof GT&&(ut=yt.rotation);var ot=at,gt=ot.scene,xt=ot.screen,Mt=xt.scale,kt=xt.dx,zt=xt.dy,Ht=qu(yt,Mt),rr=Su(yt.originX*Mt+kt-Ht.left,yt.originY*Mt+zt-Ht.top,yt.width*Mt+Ht.left+Ht.right,yt.height*Mt+Ht.top+Ht.bottom,ut),ur=rr.originX,_r=rr.originY,Dr=rr.width,Br=rr.height,Ur=at.rect,Zr=at.tailor,Tn=Ur.originX+Zr.left-ur,jn=Ur.originY+Zr.top-_r,ts=ur+Dr-(Ur.originX+Ur.width-Zr.right),us=_r+Br-(Ur.originY+Ur.height-Zr.bottom);if(!yt.disableVisionTrim&&(Tn>=Dr||ts>=Dr||Tn+ts>=Dr||jn>=Br||us>=Br||jn+us>=Br))return null;var Os={left:Tn,top:jn,right:ts,bottom:us},Hs={originX:ur,originY:_r,width:Dr,height:Br},Ks=xl(yt,Mt),so=Su(yt.originX+gt.dx-Ks.left,yt.originY+gt.dy-Ks.top,yt.width*gt.scale+Ks.left+Ks.right,yt.height*gt.scale+Ks.top+Ks.bottom,ut);return{margin:Ht,scale:Mt,tailor:Os,sceneRect:so,screenRect:Hs,rotation:ut}}function Su(yt,ct,at,ut,ot){if(ot===void 0)return{originX:yt,originY:ct,width:at,height:ut};{var gt=at/2,xt=ut/2,Mt=-gt,kt=xt,zt=-gt,Ht=-xt,rr=gt,ur=-xt,_r=gt,Dr=xt,Br=Math.cos(ot),Ur=Math.sin(ot),Zr=Mt*Br+kt*Ur,Tn=kt*Br-Mt*Ur,jn=zt*Br+Ht*Ur,ts=Ht*Br-zt*Ur,us=rr*Br+ur*Ur,Os=ur*Br-rr*Ur,Hs=_r*Br+Dr*Ur,Ks=Dr*Br-_r*Ur,so=Math.min(Zr,jn,us,Hs),To=Math.max(Zr,jn,us,Hs),Oo=Math.min(Tn,ts,Os,Ks),Au=Math.max(Tn,ts,Os,Ks),Tu=yt+gt,xu=ct+xt;return{originX:Tu+so,originY:xu+Oo,width:To-so,height:Au-Oo}}}function qu(yt,ct){var at=yt.sceneMargin,ut=yt.parallaxMargin,ot=at.left*ct+ut.left,gt=at.top*ct+ut.top,xt=at.right*ct+ut.right,Mt=at.bottom*ct+ut.bottom;return Object.freeze({left:ot,right:xt,top:gt,bottom:Mt})}function xl(yt,ct){var at=yt.sceneMargin,ut=yt.parallaxMargin,ot=at.left+ut.left/ct,gt=at.top+ut.top/ct,xt=at.right+ut.right/ct,Mt=at.bottom+ut.bottom/ct;return Object.freeze({left:ot,right:xt,top:gt,bottom:Mt})}function Kl(yt,ct,at){Bn(ct,at,function(ut,ot){yt.bindVision(ut.treeNode,ot)},function(){})}var Tl=(function(){function yt(ct){var at=this;Ot(this,yt),this.isCameraUpdated=!1,this.toTestAppearSet={},this.toTestVisibleSet={},this.toUpdateSet={},this.toSortSet={},this.toMoveSet={},this.toShowSet={},this.toHideSet={},this.onScreenUpdate=function(xt){P0(at.screenState,xt)||(at.isCameraUpdated=!0,at.screenState=xt,at.refreshFrameNode.fire(xt.isTransition))},this.onGroupSorted=function(xt){at.toSortSet[xt.treeNode.id]=xt,at.refreshFrameNode.fire()},this.onComponentUpdate=function(xt){var Mt=xt.node,kt=xt.behavior;switch(kt){case fm.Removed:{delete at.toTestAppearSet[Mt.treeNode.id],delete at.toUpdateSet[Mt.treeNode.id],delete at.toTestVisibleSet[Mt.treeNode.id];break}case fm.Added:case fm.AppearUpdated:{at.toTestAppearSet[Mt.treeNode.id]=Mt;break}case fm.VisibleUpdated:{Mt instanceof GT&&(at.toTestVisibleSet[Mt.treeNode.id]=Mt);break}case fm.PropertiesUpdated:{Mt instanceof GT&&(at.toUpdateSet[Mt.treeNode.id]=Mt);break}}at.refreshFrameNode.fire()},this.handleFrame=function(xt){try{at.sortAllGroups();var Mt=at.diffBuffer.fetchDiff();at.testComponents(Mt);var kt=at.commitVisibleAndDecorateDiff(Mt);at.notify(kt,xt),at.cleanSet(),at.visions.completeFrame()}catch(zt){at.logger.error(zt)}},this.refreshComponent=function(xt,Mt){var kt=xt.treeNode.id,zt=at.visions.leaf(kt),Ht=at.visions.vision(kt);if(!Ht)at.toShowSet[kt]={component:xt,vision:Mt};else{var rr=Ht.sceneRect,ur=zt.value;(!P0(rr,Mt.sceneRect)||!P0(ur.parallaxMargin,xt.parallaxMargin)||!P0(ur.sceneMargin,xt.sceneMargin))&&(at.toMoveSet[kt]={component:xt,vision:Mt})}zt&&at.visions.bindVision(zt,Mt)},this.removeComponent=function(xt){var Mt=xt.treeNode;at.visions.includes(Mt.id)&&(at.toHideSet[Mt.id]=xt),at.visions.unbindVision(Mt.id)},this.screen=ct.screen,this.visions=ct.visions,this.logger=this.screen.scene.logger,this.tree=this.screen.scene.tree,this.diffBuffer=this.tree.createDiffBuffer(),this.screenState={width:this.screen.width,height:this.screen.height,camera:Object.freeze(Ll({},this.screen.camera)),visionRectangle:this.screen.visionRectangle,isTransition:!1},Kl(this.visions,this.screen.scene,this.screenState),this.renderer=new Qt({screen:this.screen,engines:ct.engines,tree:this.tree,visions:this.visions,onRenderDuration:ct.onRenderDuration});var ut=this.screen,ot=ut.context,gt=ut.camera;this.notifier=new Rr(this.renderer,this.visions,ot,gt,Object.freeze({width:this.screen.width,height:this.screen.height})),this.refreshFrameNode=new cn(this.handleFrame),this.screen.addScreenUpdatedListener(this.onScreenUpdate),this.screen.scene.addGroupSortedListener(this.onGroupSorted),this.screen.scene.addComponentUpdateListener(this.onComponentUpdate)}return Bt(yt,[{key:"willInterruptEvent",value:function(at,ut){for(var ot in this.renderer.renderLayouts)if(this.renderer.renderLayouts[ot].willInterruptEvent(this.screen,at,ut))return!0;return!1}},{key:"findComponentWithTarget",value:function(at){for(var ut in this.renderer.renderLayouts){var ot=this.renderer.renderLayouts[ut],gt=ot.findComponentWithTarget(at);if(gt)return{component:gt,engine:ot.engine}}}},{key:"forEachVisibleComponent",value:function(at){var ut=Jt(this.tree),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at(gt.value)}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"release",value:function(){this.refreshFrameNode.release(),this.diffBuffer.release(),this.screen.removeScreenUpdatedListener(this.onScreenUpdate),this.screen.scene.removeGroupSortedListener(this.onGroupSorted),this.screen.scene.removeComponentUpdateListener(this.onComponentUpdate)}},{key:"refreshScreenContext",value:function(){this.refreshFrameNode.fire()}},{key:"sortAllGroups",value:function(){for(var at in this.toSortSet)this.toSortSet[at].sortIfNeed()}},{key:"testComponents",value:function(at){for(var ut in at.removedSet)this.visions.includes(ut)&&(this.toHideSet[ut]=at.removedSet[ut].value);if(this.isCameraUpdated)Bn(this.screen.scene,this.screenState,this.refreshComponent,this.removeComponent),this.isCameraUpdated=!1;else for(var ot in this.toTestAppearSet){var gt=this.toTestAppearSet[ot];gt.treeNode.parent&&ns(gt,this.screenState,this.refreshComponent,this.removeComponent)}}},{key:"commitVisibleAndDecorateDiff",value:function(at){var ut=[],ot=[],gt=[];for(var xt in this.toShowSet){var Mt=this.toShowSet[xt],kt=Mt.vision,zt=Mt.component,Ht=zt.treeNode;at.addedSet[xt]||ut.push(Ht),this.visions.bindVision(Ht,kt)}for(var rr in this.toMoveSet){var ur=this.toMoveSet[rr],_r=ur.vision,Dr=ur.component,Br=Dr.treeNode;this.visions.bindVision(Br,_r)}for(var Ur in this.toHideSet){var Zr=this.toHideSet[Ur].treeNode;at.removedSet[Ur]||ot.push(Zr),this.visions.unbindVision(Ur)}for(var Tn in at.addedSet)this.visions.includes(Tn)||gt.push(Tn);return at.decorate({insertToAdded:ut,insertToRemoved:ot,maskAdded:gt})}},{key:"notify",value:function(at,ut){var ot={};for(var gt in this.toMoveSet)ot[gt]=this.toMoveSet[gt].component;for(var xt in this.toUpdateSet)this.visions.includes(xt)||delete this.toUpdateSet[xt];for(var Mt in this.toTestVisibleSet)this.visions.includes(Mt)||delete this.toTestVisibleSet[Mt];this.notifier.flush({context:this.screen.context,camera:this.screenState.camera,diff:at,isTransition:ut,moveSet:ot,testSet:this.toTestVisibleSet,updateSet:this.toUpdateSet,screenSize:Object.freeze({width:this.screen.width,height:this.screen.height})})}},{key:"cleanSet",value:function(){this.toTestVisibleSet={},this.toUpdateSet={},km(this.toTestAppearSet)&&(this.toTestAppearSet={}),km(this.toSortSet)&&(this.toSortSet={}),km(this.toMoveSet)&&(this.toMoveSet={}),km(this.toShowSet)&&(this.toShowSet={}),km(this.toHideSet)&&(this.toHideSet={})}}]),yt})(),ep=(function(){function yt(ct){Ot(this,yt),this.context=null,this.screen=ct.screen,this.engines=ct.engines,this.onRenderDuration=ct.onRenderDuration,this.visions=new aC,this._wrappedComponents=Object.freeze(Ct(ct.wrappedComponents))}return Bt(yt,[{key:"hitTest",value:function(at,ut){var ot=this,gt=[];if(this.context){var xt=ut/this.screen.camera.scale;this.context.visibleTestNode.forEachVisibleComponent(function(Mt){ot.isHitComponent(Mt,at,xt)&&gt.push(Mt.id)})}return gt.reverse()}},{key:"findComponentWithTarget",value:function(at){if(this.context)return this.context.visibleTestNode.findComponentWithTarget(at)}},{key:"willInterruptEvent",value:function(at,ut){return this.context?this.context.visibleTestNode.willInterruptEvent(at,ut):!1}},{key:"refreshScreenRendererState",value:function(at){var ut;(ut=this.context)==null||ut.visibleTestNode.renderer.setState(at)}},{key:"refreshScreenContext",value:function(){this.context&&this.context.visibleTestNode.refreshScreenContext()}},{key:"isHitComponent",value:function(at,ut,ot){var gt=ut.x,xt=ut.y;if(at.rotation===void 0){var Mt=xl(at,this.screen.camera.scale),kt=Math.max(Mt.left,ot),zt=Math.max(Mt.right,ot),Ht=Math.max(Mt.top,ot),rr=Math.max(Mt.bottom,ot),ur=at.originX-kt,_r=at.originY-Ht,Dr=at.width+kt+zt,Br=at.height+Ht+rr;if(Ix.testPoint(ur,_r,Dr,Br,gt,xt))return at.definition.hitTest(this.screen,at,gt,xt,ot)}return!1}},{key:"divElement",get:function(){return this.context&&this.context.divElement},set:function(at){at!==(this.context&&this.context.divElement)&&(this.context&&(this.context.visibleTestNode.release(),(0,vD.unmountComponentAtNode)(this.context.divElement)),at?this.context=Object.freeze({divElement:at,visibleTestNode:new Tl({screen:this.screen,engines:this.engines,visions:this.visions,onRenderDuration:this.onRenderDuration})}):(this.visions.clean(),this.context=null),this.refreshScreenRender())}},{key:"wrappedComponents",get:function(){return this._wrappedComponents},set:function(at){this._wrappedComponents!==at&&(this._wrappedComponents=Object.freeze(Ct(at)),this.refreshScreenRender())}},{key:"refreshScreenRender",value:function(){if(this.context){var at=(0,Q1.createElement)(this.context.visibleTestNode.renderer.getRender()),ut=xC(this._wrappedComponents,at);(0,vD.render)(ut,this.context.divElement)}}}]),yt})(),Rp=(function(){function yt(ct){var at=this;Ot(this,yt),this.screenUpdatedDispatcher=new k0,this.cameraUpdatedDispatcher=new k0,this.renderErrorCatchedDispatcher=new k0,this.sizeUpdatedDispatcher=new k0,this.centerX=0,this.centerY=0,this.scale=1,this.adaptedRectangle=null,this.dispatchUpdatedEvent=function(ut,ot,gt){var xt=at.convertVisionRectangle(ut,at._width,at._height);at.screenUpdatedDispatcher.dispatch({width:at._width,height:at._height,camera:ut,visionRectangle:xt,isTransition:ot}),at.cameraUpdatedDispatcher.dispatch(Zm(Ll({},ut),{operatorId:gt}))},this.onResize=function(ut){var ot=ut[0];if(ot){var gt=ot.contentRect,xt=gt.width,Mt=gt.height;at.refreshSize(xt,Mt)}},this.deviceType=ct.scene.deviceType,this.scene=ct.scene,this._className=ct.className,this._style=ct.style,this._context=ct.context,this._width=ct.width,this._height=ct.height,this.commandWheelToZoom=ct.commandWheelToZoom,this.cameraAnimation=new ZE(this.camera,this.dispatchUpdatedEvent),this.eventInterrupter=ct.eventInterrupter,this.onRenderDuration=ct.onRenderDuration,this.updater=new ep({screen:this,engines:ct.engines,wrappedComponents:ct.wrappedComponents,onRenderDuration:ct.onRenderDuration}),ct.autoResize&&((typeof window>"u"?"undefined":tr(window))=="object"&&"ResizeObserver"in window?this.resizeObserver=new window.ResizeObserver(this.onResize):this.resizeObserver=new gD.ResizeObserver(this.onResize))}return Bt(yt,[{key:"className",get:function(){return this._className},set:function(at){this._className!==at&&(this._className=at,this.updater.refreshScreenRendererState({className:at}))}},{key:"style",get:function(){return this._style},set:function(at){this._style!==at&&(this._style=at,this.updater.refreshScreenRendererState({style:at}))}},{key:"wrappedComponents",get:function(){return this.updater.wrappedComponents},set:function(at){this.updater.wrappedComponents=at}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"divElement",get:function(){return this.updater.divElement},set:function(at){var ut=this.updater.divElement;if(ut!==at){if(this.resizeObserver&&ut&&this.resizeObserver.unobserve(ut),this.updater.divElement=at,at){var ot=at.clientWidth,gt=at.clientHeight;this.refreshSize(ot,gt),this.resizeObserver&&this.resizeObserver.observe(at)}this._eventProxy&&this._eventProxy.bindDivElement(at)}}},{key:"eventProxy",get:function(){return this._eventProxy||(this._eventProxy=new TI(this,this.eventInterrupter),this._eventProxy.bindDivElement(this.divElement)),this._eventProxy}},{key:"context",get:function(){return this._context},set:function(at){this._context!==at&&(this._context=at,this.updater.refreshScreenContext())}},{key:"bounding",get:function(){if(this.divElement){var at=this.divElement.getBoundingClientRect();return{left:at.left,right:at.right,top:at.top,bottom:at.bottom,width:at.width,height:at.height}}else return{left:0,right:0,top:0,bottom:0,width:0,height:0}}},{key:"bindCameraman",value:function(at,ut){return new KE(this,this.eventProxy,ut,at)}},{key:"convertPointToScreen",value:function(at,ut){return{x:(at-this.centerX)*this.scale+this._width/2,y:(ut-this.centerY)*this.scale+this._height/2}}},{key:"convertPointToScene",value:function(at,ut){return{x:(at-this._width/2)/this.scale+this.centerX,y:(ut-this._height/2)/this.scale+this.centerY}}},{key:"cameraWithAdaptRectangle",value:function(at,ut){var ot=at.originX+at.width/2,gt=at.originY+at.height/2,xt=this._width/at.width,Mt=this._height/at.height;switch((Number.isNaN(xt)||xt<=0)&&(xt=1),(Number.isNaN(Mt)||Mt<=0)&&(Mt=1),ut){case q0.Centering:return{centerX:ot,centerY:gt,scale:Math.min(xt,Mt)};case q0.Tailor:return{centerX:ot,centerY:gt,scale:Math.max(xt,Mt)};default:throw new Error("invalid adapter mode ".concat(ut))}}},{key:"adaptRectangle",value:function(at){if(at.width===0||at.height===0)this.transformCamera({animationMode:at.animationMode,centerX:at.originX+at.width/2,centerY:at.originY+at.height/2,scale:1,operatorId:at.operatorId});else{var ut=Zm(Ll({},this.cameraWithAdaptRectangle(at,at.adapterMode)),{animationMode:at.animationMode,operatorId:at.operatorId});this.setCameraTransfrom(ut,!1),this.adaptedRectangle=Object.freeze({originX:at.originX,originY:at.originY,width:at.width,height:at.height,adapterMode:at.adapterMode})}}},{key:"transformCamera",value:function(at){this.adaptedRectangle=null,this.setCameraTransfrom(at,!1)}},{key:"setTransition",value:function(at,ut){at!==this.cameraAnimation.isTransition&&this.updateCameraAnimation(this.camera,Mm.Immediately,at,ut)}},{key:"setCameraTransfrom",value:function(at,ut){var ot=qT(at.centerX,this.centerX),gt=qT(at.centerY,this.centerY),xt=qT(at.scale,this.scale);(ot!==this.centerX||gt!==this.centerY||xt!==this.scale||ut!==this.cameraAnimation.isTransition)&&(this.centerX=ot,this.centerY=gt,this.scale=xt,this.updateCameraAnimation(this.camera,at.animationMode,ut,at.operatorId))}},{key:"updateCameraAnimation",value:function(at,ut,ot,gt){switch(ut){case Mm.Immediately:{this.dispatchUpdatedEvent(at,ot,gt),this.cameraAnimation.moveToRightNow(at,ot);break}case Mm.Continuous:{this.cameraAnimation.moveTo(at,ot,gt);break}}}},{key:"camera",get:function(){return{centerX:this.centerX,centerY:this.centerY,scale:this.scale}}},{key:"visionRectangle",get:function(){return this.convertVisionRectangle(this.camera,this._width,this._height)}},{key:"willInterruptEvent",value:function(at,ut){return this.updater.willInterruptEvent(at,ut)}},{key:"convertVisionRectangle",value:function(at,ut,ot){var gt=ut/at.scale,xt=ot/at.scale;return{originX:at.centerX-gt/2,originY:at.centerY-xt/2,width:gt,height:xt}}},{key:"hitTest",value:function(at,ut,ot){return this.updater.hitTest(this.convertPointToScene(at,ut),ot)}},{key:"findComponentWithTarget",value:function(at){return this.updater.findComponentWithTarget(at)}},{key:"renderScreenshot",value:function(at){var ut=Dx(at.camera,Object.freeze(this.camera)),ot=Dx(at.width,this._width),gt=Dx(at.height,this._height),xt=new aC;return Kl(xt,this.scene,{width:this._width,height:this._height,camera:ut,visionRectangle:this.convertVisionRectangle(ut,ot,gt)}),new YD({visions:xt,tree:this.scene.tree,screen:this,initCamera:ut,engines:this.updater.engines,onRenderDuration:this.onRenderDuration}).render(this.updater.wrappedComponents)}},{key:"renderScreenshotToCanvas",value:function(at,ut,ot,gt){var xt=new aC;Kl(xt,this.scene,{width:this._width,height:this._height,camera:ut,visionRectangle:this.convertVisionRectangle(ut,ot.width,ot.height)});var Mt=JE({tree:this.scene.tree,screen:this,initCamera:ut,visions:xt,engines:this.updater.engines,mode:By.Preview});for(var kt in Mt)Mt[kt].painToCanvas(at,ut,ot,gt)}},{key:"resize",value:function(){if(this.divElement&&!this.resizeObserver){var at=this.divElement;this.refreshSize(at.clientWidth,at.clientHeight)}}},{key:"refreshSize",value:function(at,ut){if(this._width!==at||this._height!==ut){this._width=at,this._height=ut;var ot;this.adaptedRectangle?ot=this.cameraWithAdaptRectangle(this.adaptedRectangle,this.adaptedRectangle.adapterMode):ot=this.camera,this.setCameraTransfrom(Zm(Ll({},ot),{animationMode:Mm.Immediately}),!1),this.dispatchUpdatedEvent(ot,!1),this.sizeUpdatedDispatcher.dispatch({width:at,height:ut})}}},{key:"addCameraUpdatedListener",value:function(at){this.cameraUpdatedDispatcher.addListener(at)}},{key:"removeCameraUpdatedListener",value:function(at){this.cameraUpdatedDispatcher.removeListener(at)}},{key:"addRenderErrorCatchedListener",value:function(at){this.renderErrorCatchedDispatcher.addListener(at)}},{key:"removeRenderErrorCatchedListener",value:function(at){this.renderErrorCatchedDispatcher.removeListener(at)}},{key:"addSizeUpdatedListener",value:function(at){this.sizeUpdatedDispatcher.addListener(at)}},{key:"removeSizeUpdatedListener",value:function(at){this.sizeUpdatedDispatcher.removeListener(at)}},{key:"addScreenUpdatedListener",value:function(at){this.screenUpdatedDispatcher.addListener(at)}},{key:"removeScreenUpdatedListener",value:function(at){this.screenUpdatedDispatcher.removeListener(at)}},{key:"layoutComponentWithTarget",value:function(at){var ut=this.findComponentWithTarget(at);if(ut)return{componentId:ut.component.id,layout:ut.engine.orderIndex}}}]),yt})();function S_(yt,ct,at){var ut=ct,ot=yt.orderIndex,gt=(function(xt){It(kt,xt);var Mt=qt(kt);function kt(){return Ot(this,kt),Mt.apply(this,arguments)}return Bt(kt,[{key:"render",value:function(){var Ht=this.props,rr=Ht.id,ur=Ht.margin,_r=Ht.origin,Dr=Ht.size,Br=Ht.scale,Ur=Ht.payload,Zr=Ht.context,Tn=Ht.cnode;return(0,Dm.createElement)(ut,{id:rr,layout:ot,margin:ur,origin:_r,size:Dr,scale:Br,payload:Ur,context:Zr,cnode:Tn})}}],[{key:"willInterruptEvent",value:function(Ht,rr,ur){return typeof ct.willInterruptEvent=="function"?ct.willInterruptEvent(Ht,rr,ot,ur):typeof ct.willInterruptEvent=="boolean"?ct.willInterruptEvent:!1}}]),kt})(Dm.Component);return gt.isVisible=at,gt}var Yy=(function(){function yt(ct){Ot(this,yt),this.definitionNodes=[];var at=Ct(ct).sort(function(zt,Ht){return zt.layout-Ht.layout}),ut={},ot={},gt=Jt(at),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=this.createEngine(Mt);Mt.renderMode===Qw.Screen&&(ot[kt.id]=!0),ut[kt.id]=kt}}catch(zt){gt.e(zt)}finally{gt.f()}this.engines=Object.freeze(Ll({},ut)),this.absoluteCoordinatesSet=Object.freeze(Ll({},ot))}return Bt(yt,[{key:"createEngine",value:function(at){var ut=at.layout,ot=at.kind,gt=at.renderMode,xt=at.className,Mt=at.style,kt;switch(ot){case uS.HTML:case uS.SVG:{kt=iC({orderIndex:ut,fixedSize:gt===Qw.AbsoluteSize,isSVG:ot===uS.SVG,className:xt,style:Mt});break}case uS.CANVAS:{kt=MD({orderIndex:ut,fixedSize:!0});break}default:throw new Error("invalid kind ".concat(ot))}return kt}},{key:"adaptComponentConstructor",value:function(at){if(at.definition)return at;var ut=at,ot=this.findDefinitionNode(ut),gt=ot.definition,xt=this.checkIsAbsoluteCoordinates(ut);return{id:ut.id,definition:gt,originX:ut.originX,originY:ut.originY,width:ut.width,height:ut.height,parallaxMargin:ut.parallaxMargin,sceneMargin:ut.sceneMargin,disableVisionTrim:ut.disableVisionTrim,absoluteCoordinates:xt,payload:ut.payload,orderIndex:ut.orderIndex}}},{key:"checkIsAbsoluteCoordinates",value:function(at){for(var ut in at.render.layouts){var ot=this.findEngineWithLayout(parseInt(ut,10));if(ot)return!!this.absoluteCoordinatesSet[ot.id]}return!1}},{key:"findDefinitionNode",value:function(at){var ut=null,ot=Jt(this.definitionNodes),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.render===at.render){ut=xt;break}}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut||(ut=Object.freeze({definition:this.createDefinition(at),render:at.render,painter:at.painter}),this.definitionNodes.push(ut)),ut}},{key:"createDefinition",value:function(at){var ut=at.render,ot,gt=new Gm({name:ut.name||"ComponentDefinition",hitTest:(ot=ut.hitTest)==null?void 0:ot.bind(ut)});for(var xt in ut.layouts){var Mt=this.findEngineWithLayout(parseInt(xt,10)),kt=ut.layouts[xt].isVisible;Mt instanceof VE&&Mt.bind(gt)(S_(Mt,ut,kt))}return gt}},{key:"findEngineWithLayout",value:function(at){for(var ut in this.engines)if(this.engines[ut].orderIndex===at)return this.engines[ut];return null}}]),yt})(),fm;(function(yt){yt[yt.Added=0]="Added",yt[yt.Removed=1]="Removed",yt[yt.VisibleUpdated=2]="VisibleUpdated",yt[yt.AppearUpdated=3]="AppearUpdated",yt[yt.PropertiesUpdated=4]="PropertiesUpdated"})(fm||(fm={}));var Bv=Object.freeze({left:0,right:0,top:0,bottom:0}),w1=new bC({matchingDistance:2,zeroSpeed:.55,kDistance:.17,velocityDamping:.55,heavyDampingRadius:15,heavyDampingSpeed:.25,pedesisSpeedMean:0,pedesisSpeedVariance:0},{matchingDistance:2,zeroSpeed:.55,kDistance:.12,velocityDamping:.35,heavyDampingRadius:15,heavyDampingSpeed:.35,pedesisSpeedMean:0,pedesisSpeedVariance:0}),Om=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this.onRemovedDispatcher=new k0,this.onRectangleUpdatedDispatcher=new k0,this.onRectanglePointUpdate=function(){ot.reporter.update(ot,fm.AppearUpdated),ot.onRectangleUpdatedDispatcher.dispatch(ot)},this.reporter=ct,this.id=at.id||(0,ap.v4)().replace(/-/g,""),this.treeNode=ut,this._parallaxMargin=zT(at.parallaxMargin),this._sceneMargin=zT(at.sceneMargin),this.disableVisionTrim=!!at.disableVisionTrim,this.absoluteCoordinates=!!at.absoluteCoordinates,this._orderIndex=at.orderIndex,this.rectangleTarget={originX:UT(at.originX),originY:UT(at.originY),width:UT(at.width),height:UT(at.height)};var gt=[this.rectangleTarget.originX,this.rectangleTarget.originY,this.rectangleTarget.width,this.rectangleTarget.height];this.rectangleAnimation=w1.create(Xw.ComponentMoving,gt,this.onRectanglePointUpdate)}return Bt(yt,[{key:"originX",get:function(){return this.rectangleAnimation.point[0]}},{key:"originY",get:function(){return this.rectangleAnimation.point[1]}},{key:"width",get:function(){return this.rectangleAnimation.point[2]}},{key:"height",get:function(){return this.rectangleAnimation.point[3]}},{key:"parallaxMargin",get:function(){return this._parallaxMargin}},{key:"sceneMargin",get:function(){return this._sceneMargin}},{key:"orderIndex",get:function(){return this._orderIndex},set:function(at){if(at!==this._orderIndex){var ut=this.treeNode.parent.value;this._orderIndex=at,ut.reportChildOrderUpdate()}}},{key:"moveTo",value:function(at,ut){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mm.Immediately;(this.rectangleTarget.originX!==at||this.rectangleTarget.originY!==ut)&&(this.rectangleTarget.originX=at,this.rectangleTarget.originY=ut,this.syncRectangleTarget(ot))}},{key:"resize",value:function(at,ut){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mm.Immediately;(this.rectangleTarget.width!==at||this.rectangleTarget.height!==ut)&&(this.rectangleTarget.width=at,this.rectangleTarget.height=ut,this.syncRectangleTarget(ot))}},{key:"setRectangle",value:function(at,ut,ot,gt){var xt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mm.Immediately;(this.rectangleTarget.originX!==at||this.rectangleTarget.originY!==ut||this.rectangleTarget.width!==ot||this.rectangleTarget.height!==gt)&&(this.rectangleTarget.originX=at,this.rectangleTarget.originY=ut,this.rectangleTarget.width=ot,this.rectangleTarget.height=gt,this.syncRectangleTarget(xt))}},{key:"syncRectangleTarget",value:function(at){var ut=[this.rectangleTarget.originX,this.rectangleTarget.originY,this.rectangleTarget.width,this.rectangleTarget.height];switch(at){case Mm.Immediately:{this.rectangleAnimation.moveRightNow(ut),this.reporter.update(this,fm.AppearUpdated);break}case Mm.Continuous:{this.rectangleAnimation.moveTo(ut);break}}}},{key:"setParallaxMargin",value:function(at){eA(this._parallaxMargin,at)||(this._parallaxMargin=zT(at),this.reporter.update(this,fm.AppearUpdated))}},{key:"setSceneMargin",value:function(at){eA(this._sceneMargin,at)||(this._sceneMargin=zT(at),this.reporter.update(this,fm.AppearUpdated))}},{key:"release",value:function(){this.rectangleAnimation.stop(),this.onRemovedDispatcher.dispatch(this)}},{key:"addRemovedListener",value:function(at){this.onRemovedDispatcher.addListener(at)}},{key:"removeRemovedListener",value:function(at){this.onRemovedDispatcher.removeListener(at)}},{key:"addRectangleUpdatedListener",value:function(at){this.onRectangleUpdatedDispatcher.addListener(at)}},{key:"removeRectangleUpdatedListener",value:function(at){this.onRectangleUpdatedDispatcher.removeListener(at)}}]),yt})();function UT(yt){return typeof yt=="number"?yt:0}function zT(yt){return yt===void 0||yt===0?Bv:Object.freeze(typeof yt=="number"?{left:yt,right:yt,top:yt,bottom:yt}:Ll({},yt))}function eA(yt,ct){return ct===void 0?yt.top===0&&yt.left===0&&yt.right===0&&yt.bottom===0:typeof ct=="number"?yt.top===ct&&yt.left===ct&&yt.right===ct&&yt.bottom===ct:yt.top===ct.top&&yt.left===ct.left&&yt.right===ct.right&&yt.bottom===ct.bottom}var sS=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,ut,xt,gt),Mt.group=new OR(ut,ot,gt),Mt._scale=Dx(xt.scale,1),Mt}return Bt(at,[{key:"kind",get:function(){return w_.Group}},{key:"scale",get:function(){return this._scale},set:function(ot){this._scale!==ot&&(this._scale=ot)}},{key:"components",get:function(){return this.group.components}},{key:"removeComponent",value:function(ot){return this.group.removeComponent(ot)}},{key:"reportChildOrderUpdate",value:function(){this.group.reportChildOrderUpdate()}},{key:"addComponent",value:function(ot){return this.group.addComponent(ot)}},{key:"addComponentGroup",value:function(ot){return this.group.addComponentGroup(ot)}}]),at})(Om),jN=(function(){function yt(ct){if(Ot(this,yt),this.engineNodes={},this.enginesCache=null,this.id="".concat(yt.nextId),this.name=ct.name,yt.nextId+=1,typeof ct.hitTest=="boolean"){var at=ct.hitTest;this.hitTest=function(){return at}}else ct.hitTest?this.hitTest=ct.hitTest:this.hitTest=function(){return!0}}return Bt(yt,[{key:"engines",get:function(){if(!this.enginesCache){var at=[],ut=[];for(var ot in this.engineNodes){var gt=this.engineNodes[ot].engine;gt.orderIndex===void 0?ut.push(gt):at.push(gt)}at.sort(function(xt,Mt){return xt.orderIndex-Mt.orderIndex}),this.enginesCache=Object.freeze([].concat(at,ut))}return this.enginesCache}},{key:"addEngine",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.enginesCache)throw new Error("definition is frozon. you can only do it before bind with screen");if(!(at instanceof Jm))throw new Error("it is not RenderEngine");this.engineNodes[at.id]=Object.freeze({engine:at,options:Object.freeze({isVisible:Dx(ut.isVisible,!0)})})}},{key:"options",value:function(at){var ut;return(ut=this.engineNodes[at.id])==null?void 0:ut.options}}]),yt})(),Gm=jN;Gm.nextId=0;var GT=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt){var xt;if(Ot(this,at),xt=ct.call(this,ut,ot,gt),xt.visibleMap={},xt.visibleCount=0,!(ot.definition instanceof Gm))throw new Error("it is not ComponentDefinition");xt.definition=ot.definition,xt._rotation=ot.rotation,xt._payload=ot.payload;var Mt=Jt(xt.definition.engines),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=xt.definition.options(zt),rr=Ht.isVisible;rr&&(xt.visibleCount+=1),xt.visibleMap[zt.id]=rr}}catch(ur){Mt.e(ur)}finally{Mt.f()}return xt}return Bt(at,[{key:"kind",get:function(){return w_.Component}},{key:"rotation",get:function(){return this._rotation},set:function(ot){this._rotation!==ot&&(this._rotation=ot,this.reporter.update(this,fm.AppearUpdated))}},{key:"payload",get:function(){return this._payload},set:function(ot){ot!==this._payload&&(this._payload=ot,this.reporter.update(this,fm.PropertiesUpdated))}},{key:"isVisible",value:function(ot){return typeof ot=="number"?this.visibleMap[ot]||!1:ot?this.visibleMap[ot.id]||!1:this.visibleCount>0}},{key:"setVisible",value:function(ot,gt){var xt;if(typeof ot=="number"?xt="".concat(ot):xt=ot.id,this.visibleMap[xt]!==void 0&&this.visibleMap[xt]!==gt){var Mt=this.visibleCount===0;this.visibleMap[xt]=gt,gt?this.visibleCount+=1:this.visibleCount-=1;var kt=this.visibleCount===0;Mt===kt?this.reporter.update(this,fm.VisibleUpdated):this.reporter.update(this,fm.AppearUpdated)}}}]),at})(Om),OR=(function(){function yt(ct,at,ut){Ot(this,yt),this.shouldSort=!1,this.reporter=ct,this.tree=at,this.treeNode=ut}return Bt(yt,[{key:"components",get:function(){this.sortIfNeed();var at=[],ut=Jt(this.treeNode),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at.push(gt.value)}}catch(xt){ut.e(xt)}finally{ut.f()}return at}},{key:"reportChildOrderUpdate",value:function(){this.shouldSort=!0,this.reporter.sortGroup(this)}},{key:"sortIfNeed",value:function(){this.shouldSort&&(this.shouldSort=!1,this.tree.sort(this.treeNode,function(at,ut){var ot=at.value.orderIndex,gt=ut.value.orderIndex;return ot!==void 0&&gt!==void 0?ot-gt:ot!==void 0?-1:gt!==void 0?1:at.id.localeCompare(ut.id)}))}},{key:"removeComponent",value:function(at){return this.treeNode===at.treeNode.parent?(this.tree.remove(at.treeNode),this.reporter.update(at,fm.Removed),at.release(),!0):!1}},{key:"addComponent",value:function(at){var ut=this.tree.wrapLeaf(),ot=new GT(this.reporter,at,ut);return this.addNode(ut,ot)}},{key:"addComponentGroup",value:function(at){var ut=this.tree.wrapGroup(),ot=new sS(this.reporter,this.tree,ut,at);return this.addNode(ut,ot)}},{key:"addNode",value:function(at,ut){return at.value=ut,this.tree.append(at,this.treeNode),this.reporter.update(ut,fm.Added),ut}}]),yt})(),CI=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt,Mt){var kt;return Ot(this,at),kt=ct.call(this,xt,Mt,Mt.root),kt.componentUpdateDispatcher=new k0,kt.groupSortedDispatcher=new k0,kt.deviceType=ut,kt.logger=ot,kt.legacy=gt,kt}return Bt(at,[{key:"createScreen",value:function(ot){return new Rp({scene:this,context:ot.context,className:ot.className,autoResize:!!ot.autoResize,commandWheelToZoom:!!ot.commandWheelToZoom,width:qT(ot.width,0),height:qT(ot.height,0),engines:this.collectEngines(ot),eventInterrupter:ot.eventInterrupter||function(){return!1},wrappedComponents:ot.wrappedComponents||[],onRenderDuration:ot.onRenderDuration})}},{key:"collectEngines",value:function(ot){var gt;if(ot.engines){gt={};var xt=Jt(ot.engines),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(!(kt instanceof Jm))throw new Error("it is not RenderEngine");gt[kt.id]=kt}}catch(_r){xt.e(_r)}finally{xt.f()}}else gt=this.legacy.engines;var zt=[],Ht=[];for(var rr in gt){var ur=gt[rr];ur.orderIndex===void 0?Ht.push(ur):zt.push(ur)}return Object.freeze([].concat(zt,Ht))}},{key:"getEngineWithLegacyLayout",value:function(ot){for(var gt in this.legacy.engines){var xt=this.legacy.engines[gt];if(xt.orderIndex===ot)return xt}}},{key:"addComponentUpdateListener",value:function(ot){this.componentUpdateDispatcher.addListener(ot)}},{key:"removeComponentUpdateListener",value:function(ot){this.componentUpdateDispatcher.removeListener(ot)}},{key:"reportComponentUpdate",value:function(ot,gt){this.componentUpdateDispatcher.dispatch({node:ot,behavior:gt})}},{key:"addGroupSortedListener",value:function(ot){this.groupSortedDispatcher.addListener(ot)}},{key:"removeGroupSortedListener",value:function(ot){this.groupSortedDispatcher.removeListener(ot)}}],[{key:"create",value:function(ot,gt,xt){var Mt,kt=new lI,zt={update:function(rr,ur){return Mt.reportComponentUpdate(rr,ur)},sortGroup:function(rr){return Mt.groupSortedDispatcher.dispatch(rr)}};return Mt=new at(ot,gt,xt,zt,kt),kt.root.value=Mt,Mt}}]),at})(OR),d0;(function(yt){yt.Desktop="desktop",yt.Touch="touch",yt.Surface="surface"})(d0||(d0={}));var Yw=(function(){function yt(ct){Ot(this,yt),this.deviceType=ct}return Bt(yt,[{key:"setOptimizeOptions",value:function(at){eS.set(at)}},{key:"createScene",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yt.createDefaultLogger();return CI.create(this.deviceType,at,new Yy([]))}},{key:"createSceneWithLegacyLayoutDescriptions",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yt.createDefaultLogger();return CI.create(this.deviceType,ut,new Yy(at))}}],[{key:"createDefaultLogger",value:function(){return RE(new DE,"Boundless")}}]),yt})(),q0;(function(yt){yt.Centering="centering",yt.Tailor="tailor"})(q0||(q0={}));function QD(yt){return new Gm(yt)}var w_;(function(yt){yt[yt.Group=0]="Group",yt[yt.Component=1]="Component"})(w_||(w_={}));var tA;(function(yt){yt[yt.Unchanged=0]="Unchanged",yt[yt.Overlay=1]="Overlay",yt[yt.Changed=2]="Changed"})(tA||(tA={}));var HS;(function(yt){yt[yt.Directly=0]="Directly",yt[yt.GenerateCache=1]="GenerateCache",yt[yt.Overlay=2]="Overlay",yt[yt.OverlayOnCache=3]="OverlayOnCache"})(HS||(HS={}));var oS;(function(yt){yt.Begin="Begin",yt.End="End"})(oS||(oS={}));var Mm;(function(yt){yt.Continuous="continuous",yt.Immediately="immediately"})(Mm||(Mm={}));function rA(yt,ct,at){return yt+(ct-yt)*at}function qR(yt,ct){var at=Math.sqrt(yt*yt+ct*ct);return at===0?{x:1,y:0}:{x:yt/at,y:ct/at}}function LR(yt,ct,at,ut){var ot=yt-at,gt=ct-ut;return Math.sqrt(ot*ot+gt*gt)}var uS;(function(yt){yt[yt.HTML=0]="HTML",yt[yt.SVG=1]="SVG",yt[yt.CANVAS=2]="CANVAS"})(uS||(uS={}));var Qw;(function(yt){yt[yt.AbsoluteSize=0]="AbsoluteSize",yt[yt.RelativeSize=1]="RelativeSize",yt[yt.Screen=2]="Screen"})(Qw||(Qw={}));var $N=ln(require$$116),FR={};Kr(FR,{MobXProviderContext:function(){return cM},Observer:function(){return h0},PropTypes:function(){return xk},Provider:function(){return lP},disposeOnUnmount:function(){return hP},enableStaticRendering:function(){return RI},inject:function(){return ok},isUsingStaticRendering:function(){return lS},observer:function(){return sA},observerBatching:function(){return $R},useAsObservableSource:function(){return EC},useLocalObservable:function(){return TC},useLocalStore:function(){return QR},useObserver:function(){return rM},useStaticRendering:function(){return OI}});var $y=ln(require$$116),Yv=ln(requireReact()),WS=ln(require$$116),BR=ln(requireReact());if(!BR.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!WS.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var UN=ln(requireReactDom()),jR=ln(require$$116);function DI(yt){yt()}function $R(yt){yt||(yt=DI),(0,jR.configure)({reactionScheduler:yt})}var UR=ln(requireReact()),zN=function(ct,at){var ut=typeof Symbol=="function"&&ct[Symbol.iterator];if(!ut)return ct;var ot=ut.call(ct),gt,xt=[],Mt;try{for(;(at===void 0||at-- >0)&&!(gt=ot.next()).done;)xt.push(gt.value)}catch(kt){Mt={error:kt}}finally{try{gt&&!gt.done&&(ut=ot.return)&&ut.call(ot)}finally{if(Mt)throw Mt.error}}return xt},GN=[];function VN(){var yt=zN((0,UR.useState)(0),2),ct=yt[1],at=(0,UR.useCallback)(function(){ct(function(ut){return ut+1})},GN);return at}var zR=ln(require$$116),KD=ln(requireReact()),GR=ln(require$$116);function HN(yt){return(0,GR.getDependencyTree)(yt)}var MI=typeof FinalizationRegistry>"u"?void 0:FinalizationRegistry;function X_(yt){var ct={reaction:yt,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+nA};return ct}var nA=1e4,Kw=1e4;function II(yt){var ct=new Map,at=1,ut=new yt(function(ot){var gt=ct.get(ot);gt&&(gt.reaction.dispose(),ct.delete(ot))});return{addReactionToTrack:function(gt,xt,Mt){var kt=at++;return ut.register(Mt,kt,gt),gt.current=X_(xt),gt.current.finalizationRegistryCleanupToken=kt,ct.set(kt,gt.current),gt.current},recordReactionAsCommitted:function(gt){ut.unregister(gt),gt.current&&gt.current.finalizationRegistryCleanupToken&&ct.delete(gt.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}var WN=function(ct){var at=typeof Symbol=="function"&&Symbol.iterator,ut=at&&ct[at],ot=0;if(ut)return ut.call(ct);if(ct&&typeof ct.length=="number")return{next:function(){return ct&&ot>=ct.length&&(ct=void 0),{value:ct&&ct[ot++],done:!ct}}};throw new TypeError(at?"Object is not iterable.":"Symbol.iterator is not defined.")};function XN(){var yt=new Set,ct;function at(){ct&&(clearTimeout(ct),Mt())}function ut(){var kt,zt;if(yt.size>0){try{for(var Ht=WN(yt),rr=Ht.next();!rr.done;rr=Ht.next()){var ur=rr.value,_r=ur.current;_r&&(_r.reaction.dispose(),ur.current=null)}}catch(Dr){kt={error:Dr}}finally{try{rr&&!rr.done&&(zt=Ht.return)&&zt.call(Ht)}finally{if(kt)throw kt.error}}yt.clear()}ct&&(clearTimeout(ct),ct=void 0)}function ot(){ct===void 0&&(ct=setTimeout(Mt,Kw))}function gt(kt){yt.add(kt),ot()}function xt(kt){yt.delete(kt)}function Mt(){ct=void 0;var kt=Date.now();yt.forEach(function(zt){var Ht=zt.current;Ht&&kt>=Ht.cleanAt&&(Ht.reaction.dispose(),zt.current=null,yt.delete(zt))}),yt.size>0&&ot()}return{addReactionToTrack:function(zt,Ht,rr){return zt.current=X_(Ht),gt(zt),zt.current},recordReactionAsCommitted:xt,forceCleanupTimerToRunNowForTests:at,resetCleanupScheduleForTests:ut}}var wC=MI?II(MI):XN(),ZD=wC.addReactionToTrack,VR=wC.recordReactionAsCommitted,T_=!1;function RI(yt){T_=yt}function lS(){return T_}var VT=function(ct,at){var ut=typeof Symbol=="function"&&ct[Symbol.iterator];if(!ut)return ct;var ot=ut.call(ct),gt,xt=[],Mt;try{for(;(at===void 0||at-- >0)&&!(gt=ot.next()).done;)xt.push(gt.value)}catch(kt){Mt={error:kt}}finally{try{gt&&!gt.done&&(ut=ot.return)&&ut.call(ot)}finally{if(Mt)throw Mt.error}}return xt};function HR(yt){return"observer"+yt}var WR=(function(){function yt(){}return yt})();function JD(yt,ct){if(ct===void 0&&(ct="observed"),lS())return yt();var at=VT(KD.default.useState(new WR),1),ut=at[0],ot=VN(),gt=KD.default.useRef(null);if(!gt.current)var xt=new zR.Reaction(HR(ct),function(){Mt.mounted?ot():Mt.changedBeforeMount=!0}),Mt=ZD(gt,xt,ut);var kt=gt.current.reaction;KD.default.useDebugValue(kt,HN),KD.default.useEffect(function(){return VR(gt),gt.current?(gt.current.mounted=!0,gt.current.changedBeforeMount&&(gt.current.changedBeforeMount=!1,ot())):(gt.current={reaction:new zR.Reaction(HR(ct),function(){ot()}),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},ot()),function(){gt.current.reaction.dispose(),gt.current=null}},[]);var zt,Ht;if(kt.track(function(){try{zt=yt()}catch(rr){Ht=rr}}),Ht)throw Ht;return zt}var eM=ln(requireReact()),tM=function(){return tM=Object.assign||function(ct){for(var at,ut=1,ot=arguments.length;ut<ot;ut++){at=arguments[ut];for(var gt in at)Object.prototype.hasOwnProperty.call(at,gt)&&(ct[gt]=at[gt])}return ct},tM.apply(this,arguments)};function YN(yt,ct){if(lS())return yt;var at=tM({forwardRef:!1},ct),ut=yt.displayName||yt.name,ot=function(Mt,kt){return JD(function(){return yt(Mt,kt)},ut)};ot.displayName=ut;var gt;return at.forwardRef?gt=(0,eM.memo)((0,eM.forwardRef)(ot)):gt=(0,eM.memo)(ot),QN(yt,gt),gt.displayName=ut,gt}var PI={$$typeof:!0,render:!0,compare:!0,type:!0};function QN(yt,ct){Object.keys(yt).forEach(function(at){PI[at]||Object.defineProperty(ct,at,Object.getOwnPropertyDescriptor(yt,at))})}function h0(yt){var ct=yt.children,at=yt.render,ut=ct||at;return typeof ut!="function"?null:JD(ut)}h0.displayName="Observer";var NI=ln(require$$116),KN=ln(requireReact());function TC(yt,ct){return(0,KN.useState)(function(){return(0,NI.observable)(yt(),ct,{autoBind:!0})})[0]}var iA=ln(require$$116),XR=ln(requireReact()),kI=ln(require$$116),YR=ln(requireReact()),E_=function(ct,at){var ut=typeof Symbol=="function"&&ct[Symbol.iterator];if(!ut)return ct;var ot=ut.call(ct),gt,xt=[],Mt;try{for(;(at===void 0||at-- >0)&&!(gt=ot.next()).done;)xt.push(gt.value)}catch(kt){Mt={error:kt}}finally{try{gt&&!gt.done&&(ut=ot.return)&&ut.call(ot)}finally{if(Mt)throw Mt.error}}return xt};function EC(yt){var ct=E_((0,YR.useState)(function(){return(0,kI.observable)(yt,{},{deep:!1})}),1),at=ct[0];return(0,kI.runInAction)(function(){Object.assign(at,yt)}),at}function QR(yt,ct){var at=ct&&EC(ct);return(0,XR.useState)(function(){return(0,iA.observable)(yt(at),void 0,{autoBind:!0})})[0]}$R(UN.unstable_batchedUpdates);function rM(yt,ct){return ct===void 0&&(ct="observed"),JD(yt,ct)}function OI(yt){RI(yt)}var nM=0;function ZN(yt){if(typeof Symbol=="function")return Symbol(yt);var ct="__$mobx-react "+yt+" ("+nM+")";return nM++,ct}var qI={};function A_(yt){return qI[yt]||(qI[yt]=ZN(yt)),qI[yt]}function aA(yt,ct){if(KR(yt,ct))return!0;if(tr(yt)!="object"||yt===null||tr(ct)!="object"||ct===null)return!1;var at=Object.keys(yt),ut=Object.keys(ct);if(at.length!==ut.length)return!1;for(var ot=0;ot<at.length;ot++)if(!Object.hasOwnProperty.call(ct,at[ot])||!KR(yt[at[ot]],ct[at[ot]]))return!1;return!0}function KR(yt,ct){return yt===ct?yt!==0||1/yt==1/ct:yt!==yt&&ct!==ct}var JN={$$typeof:1,render:1,compare:1,type:1,childContextTypes:1,contextType:1,contextTypes:1,defaultProps:1,getDefaultProps:1,getDerivedStateFromError:1,getDerivedStateFromProps:1,mixins:1,displayName:1,propTypes:1};function tk(yt,ct){var at=Object.getOwnPropertyNames(Object.getPrototypeOf(yt));Object.getOwnPropertyNames(yt).forEach(function(ut){!JN[ut]&&at.indexOf(ut)===-1&&Object.defineProperty(ct,ut,Object.getOwnPropertyDescriptor(yt,ut))})}function cS(yt,ct,at){Object.hasOwnProperty.call(yt,ct)?yt[ct]=at:Object.defineProperty(yt,ct,{enumerable:!1,configurable:!0,writable:!0,value:at})}var AC=A_("patchMixins"),ZR=A_("patchedDefinition");function rk(yt,ct){var at=yt[AC]=yt[AC]||{},ut=at[ct]=at[ct]||{};return ut.locks=ut.locks||0,ut.methods=ut.methods||[],ut}function JR(yt,ct){for(var at=this,ut=arguments.length,ot=new Array(ut>2?ut-2:0),gt=2;gt<ut;gt++)ot[gt-2]=arguments[gt];ct.locks++;try{var xt;return yt!=null&&(xt=yt.apply(this,ot)),xt}finally{ct.locks--,ct.locks===0&&ct.methods.forEach(function(Mt){Mt.apply(at,ot)})}}function eP(yt,ct){var at=function(){for(var ot=arguments.length,gt=new Array(ot),xt=0;xt<ot;xt++)gt[xt]=arguments[xt];JR.call.apply(JR,[this,yt,ct].concat(gt))};return at}function tP(yt,ct,at){var ut=rk(yt,ct);ut.methods.indexOf(at)<0&&ut.methods.push(at);var ot=Object.getOwnPropertyDescriptor(yt,ct);if(!(ot&&ot[ZR])){var gt=yt[ct],xt=rP(yt,ct,ot?ot.enumerable:void 0,ut,gt);Object.defineProperty(yt,ct,xt)}}function rP(yt,ct,at,ut,ot){var gt,xt=eP(ot,ut);return gt={},gt[ZR]=!0,gt.get=function(){return xt},gt.set=function(Mt){if(this===yt)xt=eP(Mt,ut);else{var kt=rP(this,ct,at,ut,Mt);Object.defineProperty(this,ct,kt)}},gt.configurable=!0,gt.enumerable=at,gt}var LI=$y.$mobx||"$mobx",nP=A_("isMobXReactObserver"),iP=A_("isUnmounted"),iM=A_("skipRender"),aM=A_("isForcingUpdate");function nk(yt){var ct=yt.prototype;if(yt[nP]){var at=sM(ct);console.warn("The provided component class ("+at+`)
has already been declared as an observer component.`)}else yt[nP]=!0;if(ct.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(yt.__proto__!==Yv.PureComponent){if(!ct.shouldComponentUpdate)ct.shouldComponentUpdate=oM;else if(ct.shouldComponentUpdate!==oM)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}aP(ct,"props"),aP(ct,"state");var ut=ct.render;return ct.render=function(){return XS.call(this,ut)},tP(ct,"componentWillUnmount",function(){var ot;if(lS()!==!0&&((ot=this.render[LI])==null||ot.dispose(),this[iP]=!0,!this.render[LI])){var gt=sM(this);console.warn("The reactive render of an observer class component ("+gt+`)
was overriden after MobX attached. This may result in a memory leak if the
overriden reactive render was not properly disposed.`)}}),yt}function sM(yt){return yt.displayName||yt.name||yt.constructor&&(yt.constructor.displayName||yt.constructor.name)||"<component>"}function XS(yt){var ct=this;if(lS()===!0)return yt.call(this);cS(this,iM,!1),cS(this,aM,!1);var at=sM(this),ut=yt.bind(this),ot=!1,gt=new $y.Reaction(at+".render()",function(){if(!ot&&(ot=!0,ct[iP]!==!0)){var Mt=!0;try{cS(ct,aM,!0),ct[iM]||Yv.Component.prototype.forceUpdate.call(ct),Mt=!1}finally{cS(ct,aM,!1),Mt&&gt.dispose()}}});gt.reactComponent=this,xt[LI]=gt,this.render=xt;function xt(){ot=!1;var Mt=void 0,kt=void 0;if(gt.track(function(){try{kt=(0,$y._allowStateChanges)(!1,ut)}catch(zt){Mt=zt}}),Mt)throw Mt;return kt}return xt.call(this)}function oM(yt,ct){return lS()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==ct?!0:!aA(this.props,yt)}function aP(yt,ct){var at=A_("reactProp_"+ct+"_valueHolder"),ut=A_("reactProp_"+ct+"_atomHolder");function ot(){return this[ut]||cS(this,ut,(0,$y.createAtom)("reactive "+ct)),this[ut]}Object.defineProperty(yt,ct,{configurable:!0,enumerable:!0,get:function(){var xt=!1;return $y._allowStateReadsStart&&$y._allowStateReadsEnd&&(xt=(0,$y._allowStateReadsStart)(!0)),ot.call(this).reportObserved(),$y._allowStateReadsStart&&$y._allowStateReadsEnd&&(0,$y._allowStateReadsEnd)(xt),this[at]},set:function(xt){!this[aM]&&!aA(this[at],xt)?(cS(this,at,xt),cS(this,iM,!0),ot.call(this).reportChanged(),cS(this,iM,!1)):cS(this,at,xt)}})}var sP=typeof Symbol=="function"&&Symbol.for,oP=sP?Symbol.for("react.forward_ref"):typeof Yv.forwardRef=="function"&&(0,Yv.forwardRef)(function(yt){return null}).$$typeof,uP=sP?Symbol.for("react.memo"):typeof Yv.memo=="function"&&(0,Yv.memo)(function(yt){return null}).$$typeof;function sA(yt){if(yt.isMobxInjector===!0&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),uP&&yt.$$typeof===uP)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(oP&&yt.$$typeof===oP){var ct=yt.render;if(typeof ct!="function")throw new Error("render property of ForwardRef was not a function");return(0,Yv.forwardRef)(function(){var at=arguments;return(0,Yv.createElement)(h0,null,function(){return ct.apply(void 0,at)})})}return typeof yt=="function"&&(!yt.prototype||!yt.prototype.render)&&!yt.isReactClass&&!Object.prototype.isPrototypeOf.call(Yv.Component,yt)?YN(yt):nk(yt)}function uM(){return uM=Object.assign||function(yt){for(var ct=1;ct<arguments.length;ct++){var at=arguments[ct];for(var ut in at)Object.prototype.hasOwnProperty.call(at,ut)&&(yt[ut]=at[ut])}return yt},uM.apply(this,arguments)}function lM(yt,ct){if(yt==null)return{};var at={},ut=Object.keys(yt),ot,gt;for(gt=0;gt<ut.length;gt++)ot=ut[gt],!(ct.indexOf(ot)>=0)&&(at[ot]=yt[ot]);return at}var cM=Yv.default.createContext({});function lP(yt){var ct=yt.children,at=lM(yt,["children"]),ut=Yv.default.useContext(cM),ot=Yv.default.useRef(uM({},ut,at)),gt=ot.current;return Yv.default.createElement(cM.Provider,{value:gt},ct)}lP.displayName="MobXProvider";function cP(yt,ct,at,ut){var ot=Yv.default.forwardRef(function(gt,xt){var Mt=uM({},gt),kt=Yv.default.useContext(cM);return Object.assign(Mt,yt(kt||{},Mt)||{}),xt&&(Mt.ref=xt),Yv.default.createElement(ct,Mt)});return ut&&(ot=sA(ot)),ot.isMobxInjector=!0,tk(ct,ot),ot.wrappedComponent=ct,ot.displayName=dP(ct,at),ot}function dP(yt,ct){var at,ut=yt.displayName||yt.name||yt.constructor&&yt.constructor.name||"Component";return ct?at="inject-with-"+ct+"("+ut+")":at="inject("+ut+")",at}function sk(yt){return function(ct,at){return yt.forEach(function(ut){if(!(ut in at)){if(!(ut in ct))throw new Error("MobX injector: Store '"+ut+"' is not available! Make sure it is provided by some Provider");at[ut]=ct[ut]}}),at}}function ok(){for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];if(typeof arguments[0]=="function"){var ut=arguments[0];return function(ot){return cP(ut,ot,ut.name,!0)}}else return function(ot){return cP(sk(ct),ot,ct.join("-"),!1)}}var dM=A_("disposeOnUnmountProto"),hM=A_("disposeOnUnmountInst");function uk(){var yt=this;[].concat(this[dM]||[],this[hM]||[]).forEach(function(ct){var at=typeof ct=="string"?yt[ct]:ct;at!=null&&(Array.isArray(at)?at.map(function(ut){return ut()}):at())})}function hP(yt,ct){if(Array.isArray(ct))return ct.map(function(kt){return hP(yt,kt)});var at=Object.getPrototypeOf(yt).constructor,ut=Object.getPrototypeOf(yt.constructor),ot=Object.getPrototypeOf(Object.getPrototypeOf(yt));if(!(at===Yv.default.Component||at===Yv.default.PureComponent||ut===Yv.default.Component||ut===Yv.default.PureComponent||ot===Yv.default.Component||ot===Yv.default.PureComponent))throw new Error("[mobx-react] disposeOnUnmount only supports direct subclasses of React.Component or React.PureComponent.");if(typeof ct!="string"&&typeof ct!="function"&&!Array.isArray(ct))throw new Error("[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.");var gt=typeof ct=="string",xt=!!yt[dM]||!!yt[hM],Mt=gt?yt[dM]||(yt[dM]=[]):yt[hM]||(yt[hM]=[]);if(Mt.push(ct),xt||tP(yt,"componentWillUnmount",uk),typeof ct!="string")return ct}function fP(yt){function ct(ut,ot,gt,xt,Mt,kt){for(var zt=arguments.length,Ht=new Array(zt>6?zt-6:0),rr=6;rr<zt;rr++)Ht[rr-6]=arguments[rr];return(0,$y.untracked)(function(){if(xt=xt||"<<anonymous>>",kt=kt||gt,ot[gt]==null){if(ut){var ur=ot[gt]===null?"null":"undefined";return new Error("The "+Mt+" `"+kt+"` is marked as required in `"+xt+"`, but its value is `"+ur+"`.")}return null}else return yt.apply(void 0,[ot,gt,xt,Mt,kt].concat(Ht))})}var at=ct.bind(null,!1);return at.isRequired=ct.bind(null,!0),at}function pk(yt,ct){return yt==="symbol"||ct["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ct instanceof Symbol}function pP(yt){var ct=tr(yt);return Array.isArray(yt)?"array":yt instanceof RegExp?"object":pk(ct,yt)?"symbol":ct}function mk(yt){var ct=pP(yt);if(ct==="object"){if(yt instanceof Date)return"date";if(yt instanceof RegExp)return"regexp"}return ct}function oA(yt,ct){return fP(function(at,ut,ot,gt,xt){return(0,$y.untracked)(function(){if(yt&&pP(at[ut])===ct.toLowerCase())return null;var Mt;switch(ct){case"Array":Mt=$y.isObservableArray;break;case"Object":Mt=$y.isObservableObject;break;case"Map":Mt=$y.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+ct)}var kt=at[ut];if(!Mt(kt)){var zt=mk(kt),Ht=yt?" or javascript `"+ct.toLowerCase()+"`":"";return new Error("Invalid prop `"+xt+"` of type `"+zt+"` supplied to `"+ot+"`, expected `mobx.Observable"+ct+"`"+Ht+".")}return null})})}function FI(yt,ct){return fP(function(at,ut,ot,gt,xt){for(var Mt=arguments.length,kt=new Array(Mt>5?Mt-5:0),zt=5;zt<Mt;zt++)kt[zt-5]=arguments[zt];return(0,$y.untracked)(function(){if(typeof ct!="function")return new Error("Property `"+xt+"` of component `"+ot+"` has invalid PropType notation.");var Ht=oA(yt,"Array")(at,ut,ot,gt,xt);if(Ht instanceof Error)return Ht;for(var rr=at[ut],ur=0;ur<rr.length;ur++)if(Ht=ct.apply(void 0,[rr,ur,ot,gt,xt+"["+ur+"]"].concat(kt)),Ht instanceof Error)return Ht;return null})})}var mP=oA(!1,"Array"),gP=FI.bind(null,!1),vk=oA(!1,"Map"),vP=oA(!1,"Object"),yk=oA(!0,"Array"),yP=FI.bind(null,!0),_k=oA(!0,"Object"),xk={observableArray:mP,observableArrayOf:gP,observableMap:vk,observableObject:vP,arrayOrObservableArray:yk,arrayOrObservableArrayOf:yP,objectOrObservableObject:_k};if(!Yv.Component)throw new Error("mobx-react requires React to be available");if(!$y.observable)throw new Error("mobx-react requires mobx to be available");var bP={};Kr(bP,{EmuToPt:function(){return ZT},EmuToPx:function(){return n_},RenderMode:function(){return hN},Slide:function(){return UO},disableAutoPlayKey:function(){return YL},loadPPT:function(){return JO},playLastStepKey:function(){return QL},previewPPT:function(){return nq},sequenceIndexesKey:function(){return XL},toNumber:function(){return nw},toPt:function(){return gu}});var YS=ln(requireReact()),Pp=ln(requireEventemitter3()),uA=ln(requireReact()),qm=ln(requireColor()),CC=ln(require$$128),L0=ln(requireReact()),_P=ln(requireReact()),Zw=ln(requireReact()),HT=ln(requireReact()),T1=ln(requireReact()),fM=ln(requireCjs()),Rx,DC,Sk=Object.defineProperty,BI=Object.defineProperties,wk=Object.getOwnPropertyDescriptors,xP=Object.getOwnPropertySymbols,pM=Object.prototype.hasOwnProperty,WT=Object.prototype.propertyIsEnumerable,MC=function(ct,at,ut){return at in ct?Sk(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},jv=function(ct,at){for(var ut in at||(at={}))pM.call(at,ut)&&MC(ct,ut,at[ut]);if(xP){var ot=Jt(xP(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;WT.call(at,ut)&&MC(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},Px=function(ct,at){return BI(ct,wk(at))};(DC=Rx||(Rx={}))[DC.Cmd=1]="Cmd",DC[DC.State=2]="State";var dS=(function(){function yt(ct){var at=ct.playerID,ut=ct.players,ot=ct.effectType,gt=ot===void 0?"clickEffect":ot;Ot(this,yt),this.players=[],this._playerID=at,this.players=ut,this.effectType=gt,this.repeat=Math.max.apply(Math,Ct(ut.map(function(xt){return xt.repeat})).concat([1])),this.duration=Math.max.apply(Math,Ct(ut.map(function(xt){return xt.duration})).concat([0])),this.delay=ut.length>0?Math.min.apply(Math,Ct(ut.map(function(xt){return xt.delay}))):0}return Bt(yt,[{key:"playerID",get:function(){return this._playerID||(this._playerID="par[".concat(this.players.map(function(at){return at.playerID}).join(","),"]")),this._playerID}},{key:"progressTime",get:function(){return Math.max.apply(Math,Ct(this.players.map(function(at){return at.progressTime})||0))}},{key:"isPlaying",get:function(){return this.players.some(function(at){return at.isPlaying})}},{key:"isComplete",get:function(){return this.players.every(function(at){return at.isComplete})}},{key:"play",value:function(){this.players.forEach(function(at){return at.play()})}},{key:"pause",value:function(){this.players.forEach(function(at){return at.pause()})}},{key:"seek",value:function(at){if(at>this.progressTime)this.players.forEach(function(ot){return ot.seek(at)});else if(at<this.progressTime)for(var ut=this.players.length-1;ut>=0;ut--)this.players[ut].seek(at)}},{key:"onFrame",value:function(at){if(at>this.progressTime)this.players.forEach(function(ot){return ot.onFrame(at)});else if(at<this.progressTime)for(var ut=this.players.length-1;ut>=0;ut--)this.players[ut].onFrame(at)}},{key:"reset",value:function(){for(var at=this.players.length-1;at>=0;at--)this.players[at].reset()}},{key:"stop",value:function(){this.players.forEach(function(at){return at.stop()})}},{key:"stopFinite",value:function(){this.players.forEach(function(at){return at.stopFinite()})}}]),yt})(),Y_=function(){return(Y_=Object.assign||function(ct){for(var at,ut=1,ot=arguments.length;ut<ot;ut++)for(var gt in at=arguments[ut])Object.prototype.hasOwnProperty.call(at,gt)&&(ct[gt]=at[gt]);return ct}).apply(this,arguments)};function IC(yt,ct){var at={};for(var ut in yt)Object.prototype.hasOwnProperty.call(yt,ut)&&ct.indexOf(ut)<0&&(at[ut]=yt[ut]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function"){var ot=0;for(ut=Object.getOwnPropertySymbols(yt);ot<ut.length;ot++)ct.indexOf(ut[ot])<0&&Object.prototype.propertyIsEnumerable.call(yt,ut[ot])&&(at[ut[ot]]=yt[ut[ot]])}return at}var jI=function(ct,at){return function(ut){return Math.max(Math.min(ut,at),ct)}},mM=function(ct){return ct%1?Number(ct.toFixed(5)):ct},SP=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,gM={test:function(ct){return typeof ct=="number"},parse:parseFloat,transform:function(ct){return ct}},lA=Y_(Y_({},gM),{transform:jI(0,1)}),vM=Y_(Y_({},gM),{default:1}),cA=function(ct){return{test:function(ut){return typeof ut=="string"&&ut.endsWith(ct)&&ut.split(" ").length===1},parse:parseFloat,transform:function(ut){return""+ut+ct}}},QS=cA("deg"),KS=cA("%"),mp=cA("px"),J1=Y_(Y_({},KS),{parse:function(ct){return KS.parse(ct)/100},transform:function(ct){return KS.transform(100*ct)}}),RC=jI(0,255),hS=function(ct){return ct.red!==void 0},PC=function(ct){return ct.hue!==void 0},NC=function(ct){return function(at){if(typeof at!="string")return at;for(var ut={},ot=(function(xt){return xt.substring(xt.indexOf("(")+1,xt.lastIndexOf(")"))})(at).replace(/(,|\/)/g," ").split(/ \s*/),gt=0;gt<4;gt++)ut[ct[gt]]=ot[gt]!==void 0?parseFloat(ot[gt]):1;return ut}},dA=Y_(Y_({},gM),{transform:function(ct){return Math.round(RC(ct))}});function yM(yt,ct){return yt.startsWith(ct)&&SP.test(yt)}var hA,ZS={test:function(ct){return typeof ct=="string"?yM(ct,"rgb"):hS(ct)},parse:NC(["red","green","blue","alpha"]),transform:function(ct){var at=ct.red,ut=ct.green,ot=ct.blue,gt=ct.alpha,xt=gt===void 0?1:gt;return(function(Mt){var kt=Mt.red,zt=Mt.green,Ht=Mt.blue,rr=Mt.alpha;return"rgba("+kt+", "+zt+", "+Ht+", "+(rr===void 0?1:rr)+")"})({red:dA.transform(at),green:dA.transform(ut),blue:dA.transform(ot),alpha:mM(lA.transform(xt))})}},bM={test:function(ct){return typeof ct=="string"?yM(ct,"hsl"):PC(ct)},parse:NC(["hue","saturation","lightness","alpha"]),transform:function(ct){var at=ct.hue,ut=ct.saturation,ot=ct.lightness,gt=ct.alpha,xt=gt===void 0?1:gt;return(function(Mt){var kt=Mt.hue,zt=Mt.saturation,Ht=Mt.lightness,rr=Mt.alpha;return"hsla("+kt+", "+zt+", "+Ht+", "+(rr===void 0?1:rr)+")"})({hue:Math.round(at),saturation:KS.transform(mM(ut)),lightness:KS.transform(mM(ot)),alpha:mM(lA.transform(xt))})}},wP=Y_(Y_({},ZS),{test:function(ct){return typeof ct=="string"&&yM(ct,"#")},parse:function(ct){var at="",ut="",ot="";return ct.length>4?(at=ct.substr(1,2),ut=ct.substr(3,2),ot=ct.substr(5,2)):(at=ct.substr(1,1),ut=ct.substr(2,1),ot=ct.substr(3,1),at+=at,ut+=ut,ot+=ot),{red:parseInt(at,16),green:parseInt(ut,16),blue:parseInt(ot,16),alpha:1}}}),Qv={test:function(ct){return typeof ct=="string"&&SP.test(ct)||hS(ct)||PC(ct)},parse:function(ct){return ZS.test(ct)?ZS.parse(ct):bM.test(ct)?bM.parse(ct):wP.test(ct)?wP.parse(ct):ct},transform:function(ct){return hS(ct)?ZS.transform(ct):PC(ct)?bM.transform(ct):ct}},TP=function(ct){return ct},E1=(hA=function(ct,at,ut){return Math.min(Math.max(ut,ct),at)},function(yt,ct,at){return at!==void 0?hA(yt,ct,at):function(ut){return hA(yt,ct,ut)}});E1(0,1);var Tk=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},EP=typeof window<"u"?function(yt){return window.requestAnimationFrame(yt)}:function(yt){return setTimeout(function(){return yt(Tk())},16.666666666666668)},$I=!0,kC=!1,UI=!1,_M={delta:0,timestamp:0},xM=["read","update","preRender","render","postRender"],Q_=xM.reduce(function(yt,ct){var at,ut,ot,gt,xt,Mt,kt;return yt[ct]=(at=function(){return kC=!0},ut=[],ot=[],gt=0,xt=!1,Mt=new WeakSet,kt={schedule:function(Ht,rr,ur){rr===void 0&&(rr=!1),ur===void 0&&(ur=!1);var _r=ur&&xt,Dr=_r?ut:ot;return rr&&Mt.add(Ht),Dr.indexOf(Ht)===-1&&(Dr.push(Ht),_r&&xt&&(gt=ut.length)),Ht},cancel:function(Ht){var rr=ot.indexOf(Ht);rr!==-1&&ot.splice(rr,1),Mt.delete(Ht)},process:function(Ht){var rr;if(xt=!0,ut=(rr=[ot,ut])[0],(ot=rr[1]).length=0,gt=ut.length)for(var ur=0;ur<gt;ur++){var _r=ut[ur];_r(Ht),Mt.has(_r)&&(kt.schedule(_r),at())}xt=!1}}),yt},{}),Jw=xM.reduce(function(yt,ct){var at=Q_[ct];return yt[ct]=function(ut,ot,gt){return ot===void 0&&(ot=!1),gt===void 0&&(gt=!1),kC||AP(),at.schedule(ut,ot,gt)},yt},{}),SM=xM.reduce(function(yt,ct){return yt[ct]=Q_[ct].cancel,yt},{}),Ek=function(ct){return Q_[ct].process(_M)},Ak=function yt(ct){kC=!1,_M.delta=$I?16.666666666666668:Math.max(Math.min(ct-_M.timestamp,40),1),_M.timestamp=ct,UI=!0,xM.forEach(Ek),UI=!1,kC&&($I=!1,EP(yt))},AP=function(){kC=!0,$I=!0,UI||EP(Ak)},wM=(function(){function yt(ct){var at=ct.playerID,ut=ct.players,ot=ct.effectType,gt=ot===void 0?"clickEffect":ot,xt=ct.repeat,Mt=ct.rewind,kt=Mt===void 0?!1:Mt,zt=ct.reverse,Ht=zt===void 0?!1:zt,rr=ct.delay,ur=rr===void 0?0:rr;Ot(this,yt),this.players=[],this.progressTime=0,this.loopCount=0,this.elapsed=0,this._playerID=at,this.players=ut,this.effectType=gt,this.roundDuration=Math.max.apply(Math,Ct(ut.map(function(_r){return _r.duration})).concat([0])),this.repeat=xt!=null?Math.max(1,xt):Math.max.apply(Math,Ct(ut.map(function(_r){return _r.repeat})).concat([1])),this.rewind=kt,this.reverse=Ht,this.delay=ur,this.duration=this.delay+this.roundDuration*(Number.isFinite(this.repeat)?this.repeat:1)*(this.reverse?2:1),this.loop=Number.isFinite(this.repeat)?this.reverse?2*(this.repeat-1)+1:this.repeat-1:this.repeat}return Bt(yt,[{key:"playerID",get:function(){return this._playerID||(this._playerID="par-plus[".concat(this.players.map(function(at){return at.playerID}).join(","),"]")),this._playerID}},{key:"isPlaying",get:function(){return!!this.frameProcess}},{key:"isComplete",get:function(){return this.progressTime>=this.duration}},{key:"play",value:function(){var at=this;this.isPlaying||this.isComplete||(this.frameProcess=Jw.update(function(ut){var ot=ut.delta;if(at.progressTime+=ot,!(at.progressTime<=at.delay)&&(at.elapsed+=ot,at.update(),at.isPlaying&&at.elapsed>at.roundDuration)){if(at.loopCount<at.loop)return at.elapsed=0,void(at.loopCount+=1);at.pause()}},!0))}},{key:"pause",value:function(){this.frameProcess&&(SM.update(this.frameProcess),this.frameProcess=void 0)}},{key:"seek",value:function(at){var ut=this.progressTime;this.progressTime=E1(0,this.duration,at),this.progressTime<=this.delay?(this.loopCount=0,this.elapsed=0):(this.loopCount=Math.floor((this.progressTime-this.delay)/this.roundDuration-1),this.elapsed=(this.progressTime-this.delay-1)%this.roundDuration+1);var ot=this.reverse&&this.loopCount%2!=0,gt=ot?this.roundDuration-this.elapsed:this.elapsed;if(ut>at||ot)for(var xt=this.players.length-1;xt>=0;xt--)this.players[xt].seek(gt);else ut<at&&this.players.forEach(function(Mt){return Mt.seek(gt)})}},{key:"onFrame",value:function(at){var ut=this.progressTime;this.progressTime=E1(0,this.duration,at),this.progressTime<=this.delay?(this.loopCount=0,this.elapsed=0):(this.loopCount=Math.floor((this.progressTime-this.delay)/this.roundDuration-1),this.elapsed=(this.progressTime-this.delay-1)%this.roundDuration+1);var ot=this.reverse&&this.loopCount%2!=0,gt=ot?this.roundDuration-this.elapsed:this.elapsed;if(ut>at||ot)for(var xt=this.players.length-1;xt>=0;xt--)this.players[xt].onFrame(gt);else ut<at&&this.players.forEach(function(Mt){return Mt.onFrame(gt)})}},{key:"reset",value:function(){if(this.progressTime>0){this.pause(),this.loopCount=0,this.elapsed=0,this.progressTime=0;for(var at=this.players.length-1;at>=0;at--)this.players[at].reset()}}},{key:"stop",value:function(){this.pause(),this.seek(this.duration)}},{key:"stopFinite",value:function(){Number.isFinite(this.repeat)&&this.stop()}},{key:"update",value:function(){var at=this;if(this.reverse&&this.loopCount%2!=0)for(var ut=this.players.length-1;ut>=0;ut--)this.players[ut].onFrame(this.roundDuration-this.elapsed);else this.players.forEach(function(ot){return ot.onFrame(at.elapsed)})}}]),yt})(),zI=(function(){function yt(ct){var at=ct.playerID,ut=ct.players,ot=ct.effectType,gt=ot===void 0?"clickEffect":ot;Ot(this,yt);var xt,Mt;this.players=[],this.index=0,this.progressTime=0,this._playerIndex=0,this.elapsed=0,this._playerID=at,this.players=ut,this.effectType=gt,this.duration=ut.reduce(function(zt,Ht){return zt+Ht.duration},0),this.delay=(Mt=(xt=this.players[0])==null?void 0:xt.delay)!=null?Mt:0,this.blocks=[],this.indexBlocks=[];for(var kt=0;kt<this.players.length;kt++)kt!==0&&this.players[kt].effectType!=="clickEffect"||this.blocks.push(kt),this.indexBlocks.push(this.blocks.length-1)}return Bt(yt,[{key:"playerID",get:function(){return this._playerID||(this._playerID="seq[".concat(this.players.map(function(at){return at.playerID}).join(","),"]")),this._playerID}},{key:"length",get:function(){return this.blocks.length}},{key:"currentPlayer",get:function(){return this.players[this._playerIndex]}},{key:"isPlaying",get:function(){return!!this.frameProcess}},{key:"isComplete",get:function(){return this.index>=this.blocks.length}},{key:"repeat",get:function(){var at,ut;return(ut=(at=this.currentPlayer)==null?void 0:at.repeat)!=null?ut:1}},{key:"play",value:function(){var at=this;!this.currentPlayer||this.isPlaying||this.isComplete||(this.currentPlayer.play(),this.frameProcess=Jw.update(function(ut){var ot=ut.delta,gt,xt=at.currentPlayer;if(xt){if(at.elapsed+=ot,at.progressTime+=ot,xt.isPlaying||xt.play(),at.elapsed>xt.duration){at._playerIndex<at.players.length&&(at._playerIndex+=1,at.elapsed=0,at.index=(gt=at.indexBlocks[at._playerIndex])!=null?gt:at.blocks.length);var Mt=at.players[at._playerIndex];if(Mt&&Mt.effectType!=="clickEffect")return void Mt.play();at.stopTimer()}}else at.stopTimer()},!0))}},{key:"pause",value:function(){var at;(at=this.currentPlayer)==null||at.pause(),this.stopTimer()}},{key:"seek",value:function(at){var ut,ot;if(at>this.duration){this.pause();for(var gt=this._playerIndex;gt<this.players.length;gt++){var xt=this.players[gt];xt.seek(xt.duration)}this.progressTime=this.duration,this.elapsed=0,this._playerIndex=this.players.length,this.index=this.blocks.length}this.progressTime=E1(0,this.duration,at),this.elapsed=this.progressTime;for(var Mt=0;Mt<this.players.length;){var kt=this.players[Mt];if(this.elapsed<=kt.duration)break;this.elapsed-=kt.duration,Mt++}if(this._playerIndex<Mt){for(var zt=this._playerIndex;zt<Mt;zt++){var Ht=this.players[zt];!Number.isFinite(Ht.repeat)&&Ht.isPlaying||Ht.seek(Ht.duration)}(ut=this.players[Mt])==null||ut.seek(this.elapsed)}else if(this._playerIndex>Mt)for(var rr=this.safePlayerIndex(this._playerIndex);rr>=Mt;rr--){var ur=this.players[rr];rr===Mt?(ur.pause(),ur.seek(this.elapsed)):ur.reset()}this._playerIndex=Mt,this.index=(ot=this.indexBlocks[this._playerIndex])!=null?ot:this.blocks.length}},{key:"onFrame",value:function(at){throw new Error("onFrame not implemented in seq player")}},{key:"reset",value:function(){if(this.progressTime>0&&this.players.length>0)for(var at=this.safePlayerIndex(this._playerIndex);at>=0;at--)this.players[at].reset();this._playerIndex=0,this.index=0,this.progressTime=0,this.elapsed=0}},{key:"stop",value:function(){this.pause(),this.seek(this.duration+1)}},{key:"stopFinite",value:function(){this.players.forEach(function(at){return at.stopFinite()})}},{key:"seekIndex",value:function(at){var ut;this.seekPlayerIndex((ut=this.blocks[at])!=null?ut:this.players.length)}},{key:"next",value:function(){this.elapsed>0&&this.seekIndex(this.index+1),this.play()}},{key:"back",value:function(){this.pause(),this.progressTime<=0||(this.seekIndex(this.elapsed>0?this.index:this.index-1),this.pause())}},{key:"stopTimer",value:function(){this.frameProcess&&(SM.update(this.frameProcess),this.frameProcess=void 0)}},{key:"safePlayerIndex",value:function(at){return Math.min(at,this.players.length-1)}},{key:"seekPlayerIndex",value:function(at){var ut;if(at=E1(0,this.players.length,at),this._playerIndex<at)for(var ot=this._playerIndex;ot<at;ot++)this.players[ot].stopFinite();else for(var gt=this.safePlayerIndex(this._playerIndex);gt>=at;gt--)this.players[gt].reset();this.progressTime=this.getProgressTimeByPlayerIndex(at),this._playerIndex=at,this.index=(ut=this.indexBlocks[at])!=null?ut:this.blocks.length,this.elapsed=0}},{key:"getProgressTimeByPlayerIndex",value:function(at){for(var ut=0,ot=0;ot<at;ot++)ut+=this.players[ot].duration;return ut}}]),yt})();function Ck(yt,ct){return function(at){return ct(yt(at))}}function XT(yt,ct,at){return(ct-yt)*at+yt}var CP={exports:{}},DP={exports:{}},Dk=function(ct){return!(!ct||typeof ct=="string")&&(ct instanceof Array||Array.isArray(ct)||ct.length>=0&&(ct.splice instanceof Function||Object.getOwnPropertyDescriptor(ct,ct.length-1)&&ct.constructor.name!=="String"))},Mk=Array.prototype.concat,Ik=Array.prototype.slice,MP=DP.exports=function(yt){for(var ct=[],at=0,ut=yt.length;at<ut;at++){var ot=yt[at];Dk(ot)?ct=Mk.call(ct,Ik.call(ot)):ct.push(ot)}return ct};MP.wrap=function(yt){return function(){return yt(MP(arguments))}};var TM={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},OC=DP.exports,IP={};for(EM in TM)TM.hasOwnProperty(EM)&&(IP[TM[EM]]=EM);var EM,A1=CP.exports={to:{},get:{}};function eT(yt,ct,at){return Math.min(Math.max(ct,yt),at)}function AM(yt){var ct=yt.toString(16).toUpperCase();return ct.length<2?"0"+ct:ct}A1.get=function(yt){var ct,at;switch(yt.substring(0,3).toLowerCase()){case"hsl":ct=A1.get.hsl(yt),at="hsl";break;case"hwb":ct=A1.get.hwb(yt),at="hwb";break;default:ct=A1.get.rgb(yt),at="rgb"}return ct?{model:at,value:ct}:null},A1.get.rgb=function(yt){if(!yt)return null;var ct,at,ut,ot=[0,0,0,1];if(ct=yt.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(ut=ct[2],ct=ct[1],at=0;at<3;at++){var gt=2*at;ot[at]=parseInt(ct.slice(gt,gt+2),16)}ut&&(ot[3]=parseInt(ut,16)/255)}else if(ct=yt.match(/^#([a-f0-9]{3,4})$/i)){for(ut=(ct=ct[1])[3],at=0;at<3;at++)ot[at]=parseInt(ct[at]+ct[at],16);ut&&(ot[3]=parseInt(ut+ut,16)/255)}else if(ct=yt.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(at=0;at<3;at++)ot[at]=parseInt(ct[at+1],0);ct[4]&&(ot[3]=parseFloat(ct[4]))}else{if(!(ct=yt.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(ct=yt.match(/(\D+)/))?ct[1]==="transparent"?[0,0,0,0]:(ot=TM[ct[1]])?(ot[3]=1,ot):null:null;for(at=0;at<3;at++)ot[at]=Math.round(2.55*parseFloat(ct[at+1]));ct[4]&&(ot[3]=parseFloat(ct[4]))}for(at=0;at<3;at++)ot[at]=eT(ot[at],0,255);return ot[3]=eT(ot[3],0,1),ot},A1.get.hsl=function(yt){if(!yt)return null;var ct=yt.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(ct){var at=parseFloat(ct[4]);return[(parseFloat(ct[1])+360)%360,eT(parseFloat(ct[2]),0,100),eT(parseFloat(ct[3]),0,100),eT(isNaN(at)?1:at,0,1)]}return null},A1.get.hwb=function(yt){if(!yt)return null;var ct=yt.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(ct){var at=parseFloat(ct[4]);return[(parseFloat(ct[1])%360+360)%360,eT(parseFloat(ct[2]),0,100),eT(parseFloat(ct[3]),0,100),eT(isNaN(at)?1:at,0,1)]}return null},A1.to.hex=function(){var yt=OC(arguments);return"#"+AM(yt[0])+AM(yt[1])+AM(yt[2])+(yt[3]<1?AM(Math.round(255*yt[3])):"")},A1.to.rgb=function(){var yt=OC(arguments);return yt.length<4||yt[3]===1?"rgb("+Math.round(yt[0])+", "+Math.round(yt[1])+", "+Math.round(yt[2])+")":"rgba("+Math.round(yt[0])+", "+Math.round(yt[1])+", "+Math.round(yt[2])+", "+yt[3]+")"},A1.to.rgb.percent=function(){var yt=OC(arguments),ct=Math.round(yt[0]/255*100),at=Math.round(yt[1]/255*100),ut=Math.round(yt[2]/255*100);return yt.length<4||yt[3]===1?"rgb("+ct+"%, "+at+"%, "+ut+"%)":"rgba("+ct+"%, "+at+"%, "+ut+"%, "+yt[3]+")"},A1.to.hsl=function(){var yt=OC(arguments);return yt.length<4||yt[3]===1?"hsl("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%)":"hsla("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%, "+yt[3]+")"},A1.to.hwb=function(){var yt=OC(arguments),ct="";return yt.length>=4&&yt[3]!==1&&(ct=", "+yt[3]),"hwb("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%"+ct+")"},A1.to.keyword=function(yt){return IP[yt.slice(0,3)]};var Nx,qC,Rk=CP.exports;(qC=Nx||(Nx={}))[qC.RGB=0]="RGB",qC[qC.HSL=1]="HSL";var RP=(function(){function yt(ct){Ot(this,yt),this.animBox=ct,this.$=1}return Bt(yt,[{key:"snapshot",get:function(){if(!this._snapshot){var at=this;this._snapshot={$ppt_x:this.animBox.initState.ppt_x,$ppt_y:this.animBox.initState.ppt_y,$ppt_w:this.animBox.initState.ppt_w,$ppt_h:this.animBox.initState.ppt_h,ppt_x:Number(at.animBox.currentState.ppt_x),ppt_y:Number(at.animBox.currentState.ppt_y),ppt_w:Number(at.animBox.currentState.ppt_w),ppt_h:Number(at.animBox.currentState.ppt_h),get $(){return at.$}}}return this._snapshot}}]),yt})(),CM=(function(){function yt(ct,at){Ot(this,yt),this.expr=ct,this.scope=at}return Bt(yt,[{key:"valueOf",value:function(){var at;return(at=this.value)!=null?at:this.evaluate(1)}},{key:"evaluate",value:function(at){this.scope.$=at;try{return this.value=this.formula.evaluate(this.scope.snapshot),this.value}catch(ut){return console.error(ut),at}}},{key:"formula",get:function(){if(!this._formula)try{this._formula=(0,fM.compile)(this.expr.replace(/#/g,"$"))}catch(at){console.error(at),this._formula={evaluate:function(ot){return ot}}}return this._formula}}]),yt})(),Pk=Object.prototype.hasOwnProperty;function C1(yt,ct){return Pk.call(yt,ct)}function JS(yt){return yt instanceof CM||typeof yt=="number"&&!Number.isNaN(yt)}function PP(yt){return yt/12700+"pt"}function GI(yt){return!!(yt&&C1(yt,"r")&&C1(yt,"g")&&C1(yt,"b")&&C1(yt,"a"))}function Nk(yt){return!!(yt&&C1(yt,"h")&&C1(yt,"s")&&C1(yt,"l")&&C1(yt,"a"))}var f0=(function(){function yt(ct){if(Ot(this,yt),typeof ct=="string"){var at=Rk.get(ct);if(at){var ut=at.model,ot=at.value;switch(ut){case"hsl":return this.model=Nx.HSL,void(this._hslCache={h:ot[0],s:ot[1],l:ot[2],a:ot[3]});case"rgb":return this.model=Nx.RGB,void(this._rgbCache={r:ot[0],g:ot[1],b:ot[2],a:ot[3]})}}}else{if(GI(ct))return this.model=Nx.RGB,this._rgbCache=ct,void(this._hslCache=void 0);if(Nk(ct))return this.model=Nx.HSL,this._hslCache=ct,void(this._rgbCache=void 0)}throw new TypeError("[Animatic] incorrect color: ".concat(ct))}return Bt(yt,[{key:"rgb",get:function(){if(!this._rgbCache){if(!this._hslCache)throw new Error("[Animatic] No color available");this._rgbCache=this.hslToRgb(this._hslCache)}return this._rgbCache}},{key:"hsl",get:function(){if(!this._hslCache){if(!this._rgbCache)throw new Error("[Animatic] No color available");this._hslCache=this.rbgToHsl(this._rgbCache)}return this._hslCache}},{key:"toString",value:function(){if(this.model===Nx.HSL){var at=this.hsl,ut=at.h,ot=at.s,gt=at.l,xt=at.a;return"hsla(".concat(ut,",").concat(ot,",").concat(gt,",").concat(xt,")")}var Mt=this.rgb,kt=Mt.r,zt=Mt.g,Ht=Mt.b,rr=Mt.a;return"rgba(".concat(kt,",").concat(zt,",").concat(Ht,",").concat(rr,")")}},{key:"lighten",value:function(at){var ut=this.hsl;return new yt(Px(jv({},ut),{l:E1(0,100,ut.l*(1+at))}))}},{key:"darken",value:function(at){var ut=this.hsl;return new yt(Px(jv({},ut),{l:E1(0,100,ut.l*(1-at))}))}},{key:"alpha",value:function(at){var ut=this.model===Nx.HSL?this.hsl:this.rgb;if(at==null)return ut.a;var ot=E1(0,1,at);return ot===ut.a?this:new yt(Px(jv({},ut),{a:ot}))}},{key:"rbgToHsl",value:function(at){var ut=at.r/255,ot=at.g/255,gt=at.b/255,xt=Math.min(ut,ot,gt),Mt=Math.max(ut,ot,gt),kt=Mt-xt,zt=0,Ht=0;Mt===xt?zt=0:ut===Mt?zt=(ot-gt)/kt:ot===Mt?zt=2+(gt-ut)/kt:gt===Mt&&(zt=4+(ut-ot)/kt),zt=Math.min(60*zt,360),zt<0&&(zt+=360);var rr=(xt+Mt)/2;return Ht=Mt===xt?0:rr<=.5?kt/(Mt+xt):kt/(2-Mt-xt),{h:zt,s:100*Ht,l:100*rr,a:at.a}}},{key:"hslToRgb",value:function(at){var ut=at.s/100,ot=at.l/100;if(ut===0){var gt=255*ot;return{r:gt,g:gt,b:gt,a:at.a}}var xt=at.h/360,Mt,kt,zt;Mt=ot<.5?ot*(1+ut):ot+ut-ot*ut;for(var Ht=2*ot-Mt,rr=[0,0,0],ur=0;ur<3;ur++)kt=xt+1/3*-(ur-1),kt<0&&kt++,kt>1&&kt--,zt=6*kt<1?Ht+6*(Mt-Ht)*kt:2*kt<1?Mt:3*kt<2?Ht+(Mt-Ht)*(2/3-kt)*6:Ht,rr[ur]=255*zt;return{r:rr[0],g:rr[1],b:rr[2],a:at.a}}}]),yt})();function VI(yt,ct,at){if(yt.model===Nx.HSL||ct.model===Nx.HSL){var ut=yt.hsl,ot=ct.hsl;return new f0({h:XT(ut.h,ot.h,at),s:XT(ut.s,ot.s,at),l:XT(ut.l,ot.l,at),a:XT(ut.a,ot.a,at)})}{var gt=yt.rgb,xt=ct.rgb;return new f0({r:HI(gt.r,xt.r,at),g:HI(gt.g,xt.g,at),b:HI(gt.b,xt.b,at),a:XT(gt.a,xt.a,at)})}}function HI(yt,ct,at){var ut=yt*yt,ot=ct*ct;return Math.sqrt(Math.max(0,at*(ot-ut)+ut))}function NP(yt,ct){var at=Object.keys(ct),ut=at.reduce(function(ot,gt){switch(gt){case"visible":{var xt=yt[gt],Mt=ct[gt];ot[gt]=function(ur){return ur<=0?xt:Mt};break}case"fillcolor":{var kt=yt[gt],zt=ct[gt];if(!kt||!zt)throw new Error("Mismatch color animation (Key: ".concat(gt,", From: ").concat(kt,", To: ").concat(zt,")"));ot[gt]=function(ur){return VI(kt,zt,ur)};break}default:{var Ht=yt[gt],rr=ct[gt];if(!JS(Ht)||!JS(rr))throw new Error("Mismatch number animation (Key: ".concat(gt,", From: ").concat(Ht,", To: ").concat(rr,")"));ot[gt]=function(ur){return XT(Ht,rr,ur)};break}}return ot},{});return function(ot){return at.reduce(function(gt,xt){var Mt,kt=(Mt=ut[xt])==null?void 0:Mt.call(ut,ot);return kt!=null&&(gt[xt]=kt),gt},{})}}function fA(yt,ct){var at;return function(ut){return at||(at=NP(yt(),ct)),at(ut)}}var tT=(function(){function yt(ct){var at=ct.animBox,ut=ct.eventSource,ot=ct.playerID,gt=ct.effectType,xt=gt===void 0?"clickEffect":gt,Mt=ct.duration,kt=ct.transform,zt=ct.ease,Ht=zt===void 0?TP:zt,rr=ct.repeat,ur=rr===void 0?0:rr,_r=ct.rewind,Dr=_r===void 0?!1:_r,Br=ct.reverse,Ur=Br===void 0?!1:Br,Zr=ct.delay,Tn=Zr===void 0?0:Zr,jn=ct.by,ts=jn===void 0?!1:jn;Ot(this,yt),this.progressTime=0,this.loopCount=0,this.fvTime=0,this.elapsed=0,this.animBox=at,this.eventSource=ut,this.playerID=ot,this.effectType=xt,this.roundDuration=Mt,this.ease=Ht,this.repeat=Math.max(1,ur),this.rewind=Dr,this.reverse=Ur,this.delay=Tn,this.by=ts,this.duration=this.delay+this.roundDuration*(Number.isFinite(this.repeat)?this.repeat:1)*(this.reverse?2:1),this.loop=Number.isFinite(this.repeat)?this.reverse?2*(this.repeat-1)+1:this.repeat-1:this.repeat,this.transform=Ck(Ht,kt??this.noopTransform)}return Bt(yt,[{key:"isPlaying",get:function(){return!!this.frameProcess}},{key:"isComplete",get:function(){return this.progressTime>=this.duration}},{key:"play",value:function(){var at=this;this.isPlaying||this.isComplete||(this.preAnimationState||(this.preAnimationState=jv({},this.animBox.currentPureState)),this.frameProcess=Jw.update(function(ut){var ot=ut.delta;if(at.progressTime+=ot,at.progressTime<=at.delay)at.fvTime=0;else if(at.fvTime<=0&&(at.fvTime=Date.now()),at.elapsed+=ot,at.update(),at.isPlaying&&at.elapsed>at.roundDuration){if(at.loopCount<at.loop)return at.elapsed=0,void(at.loopCount+=1);at.pause()}},!0))}},{key:"pause",value:function(){this.frameProcess&&(SM.update(this.frameProcess),this.frameProcess=void 0)}},{key:"seek",value:function(at){var ut=this;this.preAnimationState||(this.preAnimationState=jv({},this.animBox.currentPureState)),at<=0&&(this.fvTime=0),this.progressTime=E1(0,this.duration,at),this.progressTime<=this.delay?(this.loopCount=0,this.elapsed=0):(this.loopCount=Math.floor((this.progressTime-this.delay)/this.roundDuration-1),this.elapsed=(this.progressTime-this.delay-1)%this.roundDuration+1),Jw.update(function(){return ut.update()},!1,!1)}},{key:"onFrame",value:function(at){if(at<=0){if(this.progressTime<=0)return;this.fvTime=0}if(!(at>=this.duration&&this.progressTime>=this.duration)){if(this.preAnimationState||(this.preAnimationState=jv({},this.animBox.currentPureState)),this.progressTime=E1(0,this.duration,at),this.progressTime<=this.delay)return this.loopCount=0,this.elapsed=0,void(this.by&&this.update());this.loopCount=Math.floor((this.progressTime-this.delay)/this.roundDuration),this.reverse?this.elapsed=(this.progressTime-this.delay)%this.roundDuration:this.elapsed=(this.progressTime-this.delay-1)%this.roundDuration+1,this.update()}}},{key:"reset",value:function(){var at=this;this.progressTime>0&&(this.pause(),this.loopCount=0,this.fvTime=0,this.elapsed=0,this.progressTime=0),this.preAnimationState&&Jw.update(function(){at.preAnimationState&&(at.animBox.resetState(at.playerID,at.preAnimationState),at.preAnimationState=void 0)},!1,!1)}},{key:"stop",value:function(){this.pause(),this.seek(this.duration)}},{key:"stopFinite",value:function(){Number.isFinite(this.repeat)&&this.stop()}},{key:"update",value:function(){var at=E1(0,1,this.elapsed/this.roundDuration),ut=this.transform(this.reverse&&this.loopCount%2!=0?1-at:at);ut!=null&&this.animBox.handleStateEvent({type:Rx.State,playerID:this.playerID,srcID:this.eventSource,by:this.by,fvTime:this.fvTime,value:ut})}},{key:"noopTransform",value:function(){return{}}}]),yt})(),kP=(function(){function yt(ct){var at=ct.cmd,ut=ct.animBox,ot=ct.eventSource,gt=ct.playerID,xt=ct.effectType,Mt=xt===void 0?"clickEffect":xt,kt=ct.rewind,zt=kt===void 0?!1:kt,Ht=ct.delay,rr=Ht===void 0?0:Ht;Ot(this,yt),this.repeat=1,this.progressTime=0,this.fvTime=0,this.cmd=at,this.animBox=ut,this.eventSource=ot,this.playerID=gt,this.effectType=Mt,this.rewind=zt,this.delay=rr,this.duration=this.delay+1}return Bt(yt,[{key:"isPlaying",get:function(){return!!this.frameProcess}},{key:"isComplete",get:function(){return this.progressTime>=this.duration}},{key:"play",value:function(){var at=this;if(!this.isPlaying&&!this.isComplete)return this.duration===1?(this.progressTime=1,void Jw.update(function(){return at.sendEvent()},!1,!1)):void(this.frameProcess=Jw.update(function(ut){var ot=ut.delta;at.progressTime+=ot,at.progressTime<=at.delay?at.fvTime=0:(at.fvTime<=0&&(at.fvTime=Date.now()),at.sendEvent(),at.pause())},!0))}},{key:"pause",value:function(){this.frameProcess&&(SM.update(this.frameProcess),this.frameProcess=void 0)}},{key:"seek",value:function(at){at<=0&&(this.fvTime=0),this.progressTime=E1(0,this.duration,at),at<=0&&this.cmd.name!=="pause"&&this.cmd.name!=="stop"&&this.animBox.handleCmdEvent({type:Rx.Cmd,playerID:this.playerID,srcID:this.eventSource,fvTime:Date.now(),value:{name:"pause"}})}},{key:"onFrame",value:function(at){at<=0&&(this.fvTime=0,this.progressTime<=0)||at>=this.duration&&this.progressTime>=this.duration||(this.progressTime=E1(0,this.duration,at),this.progressTime>=this.delay&&this.sendEvent())}},{key:"reset",value:function(){this.progressTime>0&&(this.pause(),this.fvTime=0,this.progressTime=0)}},{key:"stop",value:function(){this.pause(),this.seek(this.duration)}},{key:"stopFinite",value:function(){Number.isFinite(this.repeat)&&this.stop()}},{key:"sendEvent",value:function(){this.animBox.handleCmdEvent({type:Rx.Cmd,playerID:this.playerID,srcID:this.eventSource,fvTime:this.fvTime,value:this.cmd})}}]),yt})();function OP(yt,ct){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.5;if(yt.model===Nx.HSL&&yt.model===ct.model){var ut=yt.hsl,ot=ct.hsl,gt=ut.h,xt=ot.h;return new f0({h:gt+at*(xt>gt&&xt-gt>180?xt-(gt+360):xt<gt&&gt-xt>180?xt+360-gt:xt-gt),s:ut.s+at*(ot.s-ut.s),l:ut.l+at*(ot.l-ut.l),a:ut.a*at+ot.a*(1-at)})}{var Mt=yt.rgb,kt=ct.rgb,zt=2*at-1,Ht=Mt.a-kt.a,rr=((zt*Ht==-1?zt:(zt+Ht)/(1+zt*Ht))+1)/2,ur=1-rr;return new f0({r:rr*Mt.r+ur*kt.r,g:rr*Mt.g+ur*kt.g,b:rr*Mt.b+ur*kt.b,a:Mt.a*at+kt.a*(1-at)})}}var qP=new f0({r:0,g:0,b:0,a:0}),WI,XI=0,LP=typeof window<"u"&&window.requestAnimationFrame!==void 0?function(yt){return window.requestAnimationFrame(yt)}:function(yt){var ct=Date.now(),at=Math.max(0,16.7-(ct-XI));XI=ct+at,setTimeout(function(){return yt(XI)},at)},YT=1/60*1e3,DM=!0,LC=!1,MM=!1,t_={delta:0,timestamp:0},YI=["read","update","preRender","render","postRender"],QI=function(ct){return LC=ct},KI=YI.reduce(function(yt,ct){var at,ut,ot,gt,xt,Mt,kt,zt,Ht;return yt[ct]=(at=QI,ut=[],ot=[],gt=0,xt=!1,Mt=0,kt=new WeakSet,zt=new WeakSet,Ht={cancel:function(ur){var _r=ot.indexOf(ur);kt.add(ur),_r!==-1&&ot.splice(_r,1)},process:function(ur){var _r,Dr;if(xt=!0,ut=(_r=[ot,ut])[0],(ot=_r[1]).length=0,gt=ut.length)for(Mt=0;Mt<gt;Mt++)(Dr=ut[Mt])(ur),zt.has(Dr)!==!0||kt.has(Dr)||(Ht.schedule(Dr),at(!0));xt=!1},schedule:function(ur,_r,Dr){_r===void 0&&(_r=!1),Dr===void 0&&(Dr=!1);var Br=Dr&&xt,Ur=Br?ut:ot;kt.delete(ur),_r&&zt.add(ur),Ur.indexOf(ur)===-1&&(Ur.push(ur),Br&&(gt=ut.length))}}),yt},{}),QT=YI.reduce(function(yt,ct){var at=KI[ct];return yt[ct]=function(ut,ot,gt){return ot===void 0&&(ot=!1),gt===void 0&&(gt=!1),LC||C_(),at.schedule(ut,ot,gt),ut},yt},{}),FP=function(ct){return KI[ct].process(t_)},pu=function yt(ct){LC=!1,t_.delta=DM?YT:Math.max(Math.min(ct-t_.timestamp,40),1),DM||(YT=t_.delta),t_.timestamp=ct,MM=!0,YI.forEach(FP),MM=!1,LC&&(DM=!1,LP(yt))},C_=function(){LC=!0,DM=!0,MM||LP(pu)},FC=function(ct){var at=ct.onRead,ut=ct.onRender,ot=ct.uncachedValues,gt=ot===void 0?new Set:ot,xt=ct.useCache,Mt=xt===void 0||xt;return function(kt){kt===void 0&&(kt={});var zt=IC(kt,[]),Ht={},rr=[],ur=!1;function _r(Br,Ur){Br.startsWith("--")&&(zt.hasCSSVariable=!0);var Zr=Ht[Br];Ht[Br]=Ur,Ht[Br]!==Zr&&(rr.indexOf(Br)===-1&&rr.push(Br),ur||(ur=!0,QT.render(Dr.render)))}var Dr={get:function(Ur,Zr){return Zr===void 0&&(Zr=!1),!Zr&&Mt&&!gt.has(Ur)&&Ht[Ur]!==void 0?Ht[Ur]:at(Ur,zt)},set:function(Ur,Zr){if(typeof Ur=="string")_r(Ur,Zr);else for(var Tn in Ur)_r(Tn,Ur[Tn]);return this},render:function(Ur){return Ur===void 0&&(Ur=!1),(ur||Ur===!0)&&(ut(Ht,zt,rr),ur=!1,rr.length=0),this}};return Dr}},BC=/([a-z])([A-Z])/g,IM=function(ct){return ct.replace(BC,"$1-$2").toLowerCase()},BP=new Map,ZI=new Map,jC=["Webkit","Moz","O","ms",""],Ok=jC.length,jP=typeof document<"u",rT=function(ct,at){return ZI.set(ct,IM(at))},JI=function(ct,at){at===void 0&&(at=!1);var ut=at?ZI:BP;return ut.has(ct)||(jP?(function(ot){WI=WI||document.createElement("div");for(var gt=0;gt<Ok;gt++){var xt=jC[gt],Mt=xt==="",kt=Mt?ot:xt+ot.charAt(0).toUpperCase()+ot.slice(1);if(kt in WI.style||Mt){if(Mt&&ot==="clipPath"&&ZI.has(ot))return;BP.set(ot,kt),rT(ot,(Mt?"":"-")+IM(kt))}}})(ct):(function(ot){rT(ot,ot)})(ct)),ut.get(ct)||ct},eR=["","X","Y","Z"],ew=["translate","scale","rotate","skew","transformPerspective"].reduce(function(yt,ct){return eR.reduce(function(at,ut){return at.push(ct+ut),at},yt)},["x","y","z"]),qk=ew.reduce(function(yt,ct){return yt[ct]=!0,yt},{});function RM(yt){return qk[yt]===!0}function tR(yt,ct){return ew.indexOf(yt)-ew.indexOf(ct)}var $P=new Set(["originX","originY","originZ"]);function UP(yt){return $P.has(yt)}var pA=Y_(Y_({},gM),{transform:Math.round}),PM={color:Qv,backgroundColor:Qv,outlineColor:Qv,fill:Qv,stroke:Qv,borderColor:Qv,borderTopColor:Qv,borderRightColor:Qv,borderBottomColor:Qv,borderLeftColor:Qv,borderWidth:mp,borderTopWidth:mp,borderRightWidth:mp,borderBottomWidth:mp,borderLeftWidth:mp,borderRadius:mp,radius:mp,borderTopLeftRadius:mp,borderTopRightRadius:mp,borderBottomRightRadius:mp,borderBottomLeftRadius:mp,width:mp,maxWidth:mp,height:mp,maxHeight:mp,size:mp,top:mp,right:mp,bottom:mp,left:mp,padding:mp,paddingTop:mp,paddingRight:mp,paddingBottom:mp,paddingLeft:mp,margin:mp,marginTop:mp,marginRight:mp,marginBottom:mp,marginLeft:mp,rotate:QS,rotateX:QS,rotateY:QS,rotateZ:QS,scale:vM,scaleX:vM,scaleY:vM,scaleZ:vM,skew:QS,skewX:QS,skewY:QS,distance:mp,translateX:mp,translateY:mp,translateZ:mp,x:mp,y:mp,z:mp,perspective:mp,opacity:lA,originX:J1,originY:J1,originZ:mp,zIndex:pA,fillOpacity:lA,strokeOpacity:lA,numOctaves:pA},NM=function(ct){return PM[ct]},Lk=function(ct,at){return at&&typeof ct=="number"?at.transform(ct):ct},zP=new Set(["scrollLeft","scrollTop"]),fS=new Set(["scrollLeft","scrollTop","transform"]),mA={x:"translateX",y:"translateY",z:"translateZ"};function rR(yt){return typeof yt=="function"}function GP(yt,ct,at,ut,ot,gt,xt,Mt){ct===void 0&&(ct=!0),at===void 0&&(at={}),ut===void 0&&(ut={}),ot===void 0&&(ot={}),gt===void 0&&(gt=[]),xt===void 0&&(xt=!1),Mt===void 0&&(Mt=!0);var kt=!0,zt=!1,Ht=!1;for(var rr in yt){var ur=yt[rr],_r=NM(rr),Dr=Lk(ur,_r);RM(rr)?(zt=!0,ut[rr]=Dr,gt.push(rr),kt&&(_r.default&&ur!==_r.default||!_r.default&&ur!==0)&&(kt=!1)):UP(rr)?(ot[rr]=Dr,Ht=!0):fS.has(rr)&&rR(Dr)||(at[JI(rr,xt)]=Dr)}return(zt||typeof yt.transform=="function")&&(at.transform=(function(Br,Ur,Zr,Tn,jn,ts){ts===void 0&&(ts=!0);var us="",Os=!1;Zr.sort(tR);for(var Hs=Zr.length,Ks=0;Ks<Hs;Ks++){var so=Zr[Ks];us+=(mA[so]||so)+"("+Ur[so]+") ",Os=so==="z"||Os}return!Os&&jn?us+="translateZ(0)":us=us.trim(),rR(Br.transform)?us=Br.transform(Ur,Tn?"":us):ts&&Tn&&(us="none"),us})(yt,ut,gt,kt,ct,Mt)),Ht&&(at.transformOrigin=(ot.originX||"50%")+" "+(ot.originY||"50%")+" "+(ot.originZ||0)),at}function kM(yt){var ct=yt===void 0?{}:yt,at=ct.enableHardwareAcceleration,ut=at===void 0||at,ot=ct.isDashCase,gt=ot===void 0||ot,xt=ct.allowTransformNone,Mt=xt===void 0||xt,kt={},zt={},Ht={},rr=[];return function(ur){return rr.length=0,GP(ur,ut,kt,zt,Ht,rr,gt,Mt),kt}}var Fk=FC({onRead:function(ct,at){var ut=at.element,ot=at.preparseOutput,gt=NM(ct);if(RM(ct))return gt&&gt.default||0;if(zP.has(ct))return ut[ct];var xt=window.getComputedStyle(ut,null).getPropertyValue(JI(ct,!0))||0;return ot&&gt&&gt.test(xt)&&gt.parse?gt.parse(xt):xt},onRender:function(ct,at,ut){var ot=at.element,gt=at.buildStyles,xt=at.hasCSSVariable;if(Object.assign(ot.style,gt(ct)),xt)for(var Mt=ut.length,kt=0;kt<Mt;kt++){var zt=ut[kt];zt.startsWith("--")&&ot.style.setProperty(zt,ct[zt])}ut.indexOf("scrollLeft")!==-1&&(ot.scrollLeft=ct.scrollLeft),ut.indexOf("scrollTop")!==-1&&(ot.scrollTop=ct.scrollTop)},uncachedValues:zP}),nR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),iR=function(ct,at){return mp.transform(ct*at)},VP={x:0,y:0,width:0,height:0};function HP(yt,ct,at){return typeof yt=="string"?yt:mp.transform(ct+at*yt)}var aR={enableHardwareAcceleration:!1,isDashCase:!1};function Bk(yt,ct,at,ut,ot,gt){ct===void 0&&(ct=VP),ut===void 0&&(ut=kM(aR)),ot===void 0&&(ot={style:{}}),gt===void 0&&(gt=!0);var xt=yt.attrX,Mt=yt.attrY,kt=yt.originX,zt=yt.originY,Ht=yt.pathLength,rr=yt.pathSpacing,ur=rr===void 0?1:rr,_r=yt.pathOffset,Dr=_r===void 0?0:_r,Br=ut(IC(yt,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]));for(var Ur in Br)Ur==="transform"?ot.style.transform=Br[Ur]:ot[gt&&!nR.has(Ur)?IM(Ur):Ur]=Br[Ur];return(kt!==void 0||zt!==void 0||Br.transform)&&(ot.style.transformOrigin=(function(Zr,Tn,jn){return HP(Tn,Zr.x,Zr.width)+" "+HP(jn,Zr.y,Zr.height)})(ct,kt!==void 0?kt:.5,zt!==void 0?zt:.5)),xt!==void 0&&(ot.x=xt),Mt!==void 0&&(ot.y=Mt),at!==void 0&&Ht!==void 0&&(ot[gt?"stroke-dashoffset":"strokeDashoffset"]=iR(-Dr,at),ot[gt?"stroke-dasharray":"strokeDasharray"]=iR(Ht,at)+" "+iR(ur,at)),ot}function sR(yt,ct,at){at===void 0&&(at=!0);var ut={style:{}},ot=kM(aR);return function(gt){return Bk(gt,yt,ct,ot,ut,at)}}var D1,oR,WP=FC({onRead:function(ct,at){var ut=at.element;if(RM(ct=nR.has(ct)?ct:IM(ct))){var ot=NM(ct);return ot&&ot.default||0}return ut.getAttribute(ct)},onRender:function(ct,at){var ut=at.element,ot=(0,at.buildAttrs)(ct);for(var gt in ot)gt==="style"?Object.assign(ut.style,ot.style):ut.setAttribute(gt,ot[gt])}}),uR=FC({useCache:!1,onRead:function(ct){return ct==="scrollTop"?window.pageYOffset:window.pageXOffset},onRender:function(ct){var at=ct.scrollTop,ut=at===void 0?0:at,ot=ct.scrollLeft,gt=ot===void 0?0:ot;return window.scrollTo(gt,ut)}}),$C=new WeakMap,XP=function(ct,at){var ut,ot,gt,xt;return ct===window?ut=uR(ct):(function(Mt){return Mt instanceof HTMLElement||typeof Mt.click=="function"})(ct)?ut=(function(Mt,kt){kt===void 0&&(kt={});var zt=kt.enableHardwareAcceleration,Ht=kt.allowTransformNone,rr=IC(kt,["enableHardwareAcceleration","allowTransformNone"]);return Fk(Y_({element:Mt,buildStyles:kM({enableHardwareAcceleration:zt,allowTransformNone:Ht}),preparseOutput:!0},rr))})(ct,at):(function(Mt){return Mt instanceof SVGElement||"ownerSVGElement"in Mt})(ct)&&(gt=(function(Mt){try{return(function(kt){return typeof kt.getBBox=="function"?kt.getBBox():kt.getBoundingClientRect()})(Mt)}catch{return{x:0,y:0,width:0,height:0}}})(ot=ct),xt=(function(Mt){return Mt.tagName==="path"})(ot)&&ot.getTotalLength?ot.getTotalLength():void 0,ut=WP({element:ot,buildAttrs:sR(gt,xt)})),$C.set(ct,ut),ut};function YP(yt,ct){return(function(at,ut){return $C.has(at)?$C.get(at):XP(at,ut)})(typeof yt=="string"?document.querySelector(yt):yt,ct)}function $k(yt){switch(yt){case"rotate":case"scaleX":case"scaleY":case"fillcolor":return!0;default:return!1}}(oR=D1||(D1={})).Paragraph="anim-p",oR.Text="anim-t";var OM=(function(){function yt(ct){var at=this,ut=ct.target,ot=ct.pIndex,gt=ct.tIndex,xt=ct.constants,Mt=ct.initState,kt=Mt===void 0?{}:Mt,zt=ct.applyStyles;Ot(this,yt),this.handleStateEvent=function(Ur){var Zr=Ur.playerID,Tn=Ur.by,jn=Ur.value,ts=Object.keys(jn).filter(function(Ml){return jn[Ml]!=null});if(Tn){var us=at.byStates.get(Zr);us||(us={},at.byStates.set(Zr,us));var Os=Jt(ts),Hs;try{for(Os.s();!(Hs=Os.n()).done;){var Ks=Hs.value;$k(Ks)?(us[Ks]=jn[Ks],at.currentState[Ks]=at.currentPureState[Ks]):(at.currentState[Ks]=jn[Ks],at.currentPureState[Ks]=jn[Ks])}}catch(Ml){Os.e(Ml)}finally{Os.f()}}else{at.lastStateEvent=Ur;var so=Jt(ts),To;try{for(so.s();!(To=so.n()).done;){var Oo=To.value;at.currentState[Oo]=jn[Oo],at.currentPureState[Oo]=jn[Oo]}}catch(Ml){so.e(Ml)}finally{so.f()}}var Au=Jt(at.byStates.values()),Tu;try{for(Au.s();!(Tu=Au.n()).done;){var xu=Tu.value,yu=Jt(ts),sp;try{for(yu.s();!(sp=yu.n()).done;){var Jl=sp.value;at.mergeByStates(Jl,xu)}}catch(Ml){yu.e(Ml)}finally{yu.f()}}}catch(Ml){Au.e(Ml)}finally{Au.f()}at.applyStyles(at.convertStyles(at.currentState))},this.handleCmdEvent=function(Ur){at.lastCmdEvent=Ur,Ur.value.name==="playFrom"?window?.postMessage({type:"_changeAudioState",targetID:at.target,play:1,stop:0},"*"):Ur.value.name==="playSF"?window?.postMessage({type:"_playSoundEffect",targetID:at.target,soundEffectId:Ur.value.value},"*"):window?.postMessage({type:"_changeAudioState",targetID:at.target,play:0,stop:1},"*")},this.byStates=new Map,this.target=ut,this.pIndex=ot,this.tIndex=gt,this.constants=xt,this.withSubElem=this.pIndex!=null||this.tIndex!=null;var Ht=xt.x,rr=xt.y,ur=xt.slideWidth,_r=xt.slideHeight,Dr=xt.width,Br=xt.height;this.initState=Px(jv({scaleX:1,scaleY:1,rotate:0,opacity:1,xshear:0,yshear:0,fillcolor:qP,visible:!0},kt),{ppt_x:Ht/ur,ppt_y:rr/_r,ppt_w:Dr/ur,ppt_h:Br/_r}),this.currentState=jv({},this.initState),this.currentPureState=jv({},this.initState),zt&&(this.applyStyles=zt)}return Bt(yt,[{key:"resetState",value:function(at,ut){this.lastStateEvent=void 0,this.lastCmdEvent=void 0,this.byStates.delete(at),Object.assign(this.currentPureState,ut),Object.assign(this.currentState,this.currentPureState);var ot=Jt(this.byStates.values()),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;for(var Mt in xt)this.mergeByStates(Mt,xt)}}catch(kt){ot.e(kt)}finally{ot.f()}this.applyStyles(this.convertStyles(this.currentState))}},{key:"applyStyles",value:function(at){var ut=this.getStyler();ut&&ut.forEach(function(ot,gt){gt?ot.set({"pointer-events":at["pointer-events"]}):ot.set(at)})}},{key:"applyPreAnimation",value:function(){this.preAnimationState&&this.applyStyles(this.convertStyles(this.preAnimationState))}},{key:"preAnimation",value:function(at){if(!at)return this.preAnimationState;{this.preAnimationState||(this.preAnimationState={});for(var ut=Object.keys(at),ot=0,gt=ut;ot<gt.length;ot++){var xt=gt[ot],Mt=at[xt];Mt!=null&&(this.preAnimationState[xt]=Mt,this.currentState[xt]=Mt,this.currentPureState[xt]=Mt)}}}},{key:"clearCache",value:function(){this._stylerList=void 0}},{key:"mergeByStates",value:function(at,ut){var ot,gt,xt,Mt,kt,zt;switch(at){case"rotate":this.currentState.rotate=((ot=this.currentState.rotate)!=null?ot:0)+((gt=ut.rotate)!=null?gt:0);break;case"scaleX":this.currentState.scaleX=((xt=this.currentState.scaleX)!=null?xt:1)*((Mt=ut.scaleX)!=null?Mt:1);break;case"scaleY":this.currentState.scaleY=((kt=this.currentState.scaleY)!=null?kt:1)*((zt=ut.scaleY)!=null?zt:1);break;case"fillcolor":this.currentState.fillcolor&&ut.fillcolor?this.currentState.fillcolor=OP(this.currentState.fillcolor,ut.fillcolor):ut.fillcolor&&(this.currentState.fillcolor=ut.fillcolor)}}},{key:"convertStyles",value:function(at){var ut,ot,gt,xt,Mt,kt,zt,Ht,rr={"will-change":"opacity,transform"},ur=this.constants,_r=ur.x,Dr=ur.y,Br=ur.width,Ur=ur.height,Zr=ur.slideWidth,Tn=ur.slideHeight;for(var jn in at)if(C1(at,jn))switch(jn){case"ppt_x":{var ts=(ut=at.ppt_x)!=null?ut:this.currentState.ppt_x;rr.translateX=PP(ts*Zr-_r);break}case"ppt_y":{var us=(ot=at.ppt_y)!=null?ot:this.currentState.ppt_y;rr.translateY=PP(us*Tn-Dr);break}case"scaleX":{var Os=(gt=at.scaleX)!=null?gt:1,Hs=this.currentState.ppt_w;rr.scaleX=Os*Hs*Zr/Br;break}case"ppt_w":{var Ks=(xt=this.currentState.scaleX)!=null?xt:1,so=(Mt=at.ppt_w)!=null?Mt:this.currentState.ppt_w;rr.scaleX=Ks*so*Zr/Br;break}case"scaleY":{var To=(kt=at.scaleY)!=null?kt:1,Oo=this.currentState.ppt_h;rr.scaleY=To*Oo*Tn/Ur;break}case"ppt_h":{var Au=(zt=this.currentState.scaleY)!=null?zt:1,Tu=(Ht=at.ppt_h)!=null?Ht:this.currentState.ppt_h;rr.scaleY=Au*Tu*Tn/Ur;break}case"fillcolor":if(at.fillcolor!=null){var xu=at.fillcolor.hsl;rr["--sp-fill"]="hsla(".concat(xu.h,",").concat(xu.s,"%,").concat(xu.l,"%,").concat(xu.a,")"),rr["--sp-fill-h"]=xu.h,rr["--sp-fill-s"]=xu.s+"%",rr["--sp-fill-l"]=xu.l+"%",rr["--sp-fill-a"]=xu.a}break;case"visible":at.visible!=null&&(rr.opacity=this.currentState.opacity*(at.visible?1:0),rr["pointer-events"]=at.visible?"initial":"none");break;case"opacity":at.opacity!=null&&(rr.opacity=at.opacity*(this.currentState.visible?1:0));break;case"rotate":at.rotate!=null&&(rr.rotate=Number(at.rotate));break;case"xshear":at.xshear!=null&&(rr.skewX=45*at.xshear);break;case"yshear":at.yshear!=null&&(rr.skewY=45*at.yshear);break;default:at[jn]!=null&&(rr[jn]=at[jn])}return this.constants.flipH&&C1(rr,"scaleX")&&(rr.scaleX*=-1),this.constants.flipV&&C1(rr,"scaleY")&&(rr.scaleY*=-1),C1(rr,"rotate")&&(rr.scaleX<0&&(rr.rotate*=-1),rr.scaleY<0&&(rr.rotate*=-1)),rr}},{key:"getStyler",value:function(){if(!this._stylerList){var at=document.getElementById(this.target);if(at&&this.pIndex!=null&&(at=at.querySelectorAll(".".concat(D1.Paragraph))[this.pIndex]),at&&this.tIndex!=null&&(at=at.querySelectorAll(".".concat(D1.Text))[this.tIndex]),at){this._stylerList=[YP(at)];for(var ut=0;ut<at.children.length;ut+=1)at.children[ut].classList.contains("ppt-event-source")&&this._stylerList.push(YP(at.children[ut]))}}return this._stylerList}}]),yt})(),lR={exports:{}};(function(yt){var ct=Object.prototype.hasOwnProperty,at="~";function ut(){}function ot(kt,zt,Ht){this.fn=kt,this.context=zt,this.once=Ht||!1}function gt(kt,zt,Ht,rr,ur){if(typeof Ht!="function")throw new TypeError("The listener must be a function");var _r=new ot(Ht,rr||kt,ur),Dr=at?at+zt:zt;return kt._events[Dr]?kt._events[Dr].fn?kt._events[Dr]=[kt._events[Dr],_r]:kt._events[Dr].push(_r):(kt._events[Dr]=_r,kt._eventsCount++),kt}function xt(kt,zt){--kt._eventsCount==0?kt._events=new ut:delete kt._events[zt]}function Mt(){this._events=new ut,this._eventsCount=0}Object.create&&(ut.prototype=Object.create(null),new ut().__proto__||(at=!1)),Mt.prototype.eventNames=function(){var kt,zt,Ht=[];if(this._eventsCount===0)return Ht;for(zt in kt=this._events)ct.call(kt,zt)&&Ht.push(at?zt.slice(1):zt);return Object.getOwnPropertySymbols?Ht.concat(Object.getOwnPropertySymbols(kt)):Ht},Mt.prototype.listeners=function(kt){var zt=at?at+kt:kt,Ht=this._events[zt];if(!Ht)return[];if(Ht.fn)return[Ht.fn];for(var rr=0,ur=Ht.length,_r=new Array(ur);rr<ur;rr++)_r[rr]=Ht[rr].fn;return _r},Mt.prototype.listenerCount=function(kt){var zt=at?at+kt:kt,Ht=this._events[zt];return Ht?Ht.fn?1:Ht.length:0},Mt.prototype.emit=function(kt,zt,Ht,rr,ur,_r){var Dr=at?at+kt:kt;if(!this._events[Dr])return!1;var Br,Ur,Zr=this._events[Dr],Tn=arguments.length;if(Zr.fn){switch(Zr.once&&this.removeListener(kt,Zr.fn,void 0,!0),Tn){case 1:return Zr.fn.call(Zr.context),!0;case 2:return Zr.fn.call(Zr.context,zt),!0;case 3:return Zr.fn.call(Zr.context,zt,Ht),!0;case 4:return Zr.fn.call(Zr.context,zt,Ht,rr),!0;case 5:return Zr.fn.call(Zr.context,zt,Ht,rr,ur),!0;case 6:return Zr.fn.call(Zr.context,zt,Ht,rr,ur,_r),!0}for(Ur=1,Br=new Array(Tn-1);Ur<Tn;Ur++)Br[Ur-1]=arguments[Ur];Zr.fn.apply(Zr.context,Br)}else{var jn,ts=Zr.length;for(Ur=0;Ur<ts;Ur++)switch(Zr[Ur].once&&this.removeListener(kt,Zr[Ur].fn,void 0,!0),Tn){case 1:Zr[Ur].fn.call(Zr[Ur].context);break;case 2:Zr[Ur].fn.call(Zr[Ur].context,zt);break;case 3:Zr[Ur].fn.call(Zr[Ur].context,zt,Ht);break;case 4:Zr[Ur].fn.call(Zr[Ur].context,zt,Ht,rr);break;default:if(!Br)for(jn=1,Br=new Array(Tn-1);jn<Tn;jn++)Br[jn-1]=arguments[jn];Zr[Ur].fn.apply(Zr[Ur].context,Br)}}return!0},Mt.prototype.on=function(kt,zt,Ht){return gt(this,kt,zt,Ht,!1)},Mt.prototype.once=function(kt,zt,Ht){return gt(this,kt,zt,Ht,!0)},Mt.prototype.removeListener=function(kt,zt,Ht,rr){var ur=at?at+kt:kt;if(!this._events[ur])return this;if(!zt)return xt(this,ur),this;var _r=this._events[ur];if(_r.fn)_r.fn!==zt||rr&&!_r.once||Ht&&_r.context!==Ht||xt(this,ur);else{for(var Dr=0,Br=[],Ur=_r.length;Dr<Ur;Dr++)(_r[Dr].fn!==zt||rr&&!_r[Dr].once||Ht&&_r[Dr].context!==Ht)&&Br.push(_r[Dr]);Br.length?this._events[ur]=Br.length===1?Br[0]:Br:xt(this,ur)}return this},Mt.prototype.removeAllListeners=function(kt){var zt;return kt?(zt=at?at+kt:kt,this._events[zt]&&xt(this,zt)):(this._events=new ut,this._eventsCount=0),this},Mt.prototype.off=Mt.prototype.removeListener,Mt.prototype.addListener=Mt.prototype.on,Mt.prefixed=at,Mt.EventEmitter=Mt,yt.exports=Mt})(lR);var qM=lR.exports,Uk=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.call(this)}return at})(qM),zk=ln(requireReact()),D_=ln(requireReact()),UC=ln(requireReact()),M1=ln(requireReact()),ay=ln(requireReact()),Gp=ln(requireReact()),gA=ln(requireReact()),eu=ln(requireReact()),QP=ln(requireReact()),vA=ln(requireReact()),yA=ln(requireReact()),tw=ln(requireReact()),K_=ln(requireReact()),LM=ln(requireReactDom()),zC=ln(requireReact()),M_=ln(requireReact()),F0=ln(requireReact()),kx=ln(requireReact()),I_=ln(requireReact()),rw=ln(requireColor()),p0=ln(requireBezierJs()),ex=ln(requireReact()),cR=ln(requireReactDom()),KT=ln(requireEventemitter3()),r_=ln(requireReact()),I1=ln(requireReact()),Z_=ln(requireReact()),Eo=Object.defineProperty,KP=Object.defineProperties,Gk=Object.getOwnPropertyDescriptors,ZP=Object.getOwnPropertySymbols,JP=Object.prototype.hasOwnProperty,eN=Object.prototype.propertyIsEnumerable,GC=function(ct,at,ut){return at in ct?Eo(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},_u=function(ct,at){for(var ut in at||(at={}))JP.call(at,ut)&&GC(ct,ut,at[ut]);if(ZP){var ot=Jt(ZP(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;eN.call(at,ut)&&GC(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},El=function(ct,at){return KP(ct,Gk(at))},ZT=12700,n_=9525,Ap=1e5,dR=45720,tN=91440,J_=6e4,Vk=1;function Ey(yt){if(typeof yt=="number")return yt/Ap;var ct=yt.endsWith("%");return parseFloat(yt)/(ct?100:Ap)}function gu(yt){return"".concat(nw(yt)/ZT,"pt")}function pS(yt){return yt===0?0:yt/J_}function nw(yt){return typeof yt=="string"?parseFloat(yt):yt}function FM(yt){return nw(yt)*.75}function Ox(yt){return nw(yt)/.75}function hR(yt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return rt({},BM(yt,ct),fR(yt,ct))}function fR(yt,ct){var at=hv(yt.elements)||ct;if(yt.elements.length>0){var ut={},ot=at&&yt.elements.length>1,gt=Jt(yt.elements),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=BM(Mt,ot),zt=fR(Mt,ct);Mt.text===void 0?ut[kt]=zt:ut[kt]=El(_u({},zt),{body:Mt.text})}}catch(Ht){gt.e(Ht)}finally{gt.f()}return ut}else return null}function hv(yt){var ct={},at=Jt(yt),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value,gt=ot.name||"";if(gt in ct)return!0;ct[gt]=!0}}catch(xt){at.e(xt)}finally{at.f()}return!1}function BM(yt,ct){var at=[];yt.attr.forEach(function(ot){var gt=yt.attr.getOptional(ot);typeof gt=="string"?at.push("".concat(ot,"=").concat(JSON.stringify(gt))):at.push("".concat(ot,"=").concat(gt))});var ut="";return ct&&(ut+="[".concat(yt.index,"] ")),ut+="<".concat(yt.name),at.length>0&&(ut+=" "+at.join(" ")),ut+=">",ut}var jM=(function(){function yt(ct){Ot(this,yt),this.tagName=ct}return Bt(yt,[{key:"get",value:function(at,ut){return this.assignDefaultValue(at,this.getOptional(at),ut)}},{key:"getString",value:function(at,ut){return this.assignDefaultValue(at,this.getStringOptional(at),ut)}},{key:"getNumber",value:function(at,ut){return this.assignDefaultValue(at,this.getNumberOptional(at),ut)}},{key:"getBoolean",value:function(at,ut){return this.assignDefaultValue(at,this.getBooleanOptional(at),ut)}},{key:"getColor",value:function(at,ut){return this.assignDefaultValue(at,this.getColorOptional(at),ut)}},{key:"getColorOptional",value:function(at){return this.getOptional(at)}},{key:"getStringOptional",value:function(at){var ut=this.getOptional(at);return typeof ut=="number"&&(ut="".concat(ut)),ut}},{key:"getNumberOptional",value:function(at){var ut=this.getOptional(at);if(!(typeof ut=="string"&&(ut=parseInt(ut,10),Number.isNaN(ut))))return ut}},{key:"getBooleanOptional",value:function(at){var ut=this.getOptional(at);return ut==="true"||ut==="1"||ut==="on"?ut=!0:ut==="false"||ut==="0"||ut==="off"?ut=!1:ut!==void 0&&(ut=!!ut),ut}},{key:"assignDefaultValue",value:function(at,ut,ot){var gt=ut;if(gt===void 0&&(gt=ot),gt===void 0)throw new Error("can't find attribute ".concat(JSON.stringify(at)," from ").concat(this.tagName));return gt}}]),yt})(),pR=(function(yt){It(at,yt);var ct=qt(at);function at(ut){return Ot(this,at),ct.call(this,ut)}return Bt(at,[{key:"length",value:function(){return 0}},{key:"forEach",value:function(ot){}},{key:"getOptional",value:function(ot){}},{key:"has",value:function(ot){return!1}}]),at})(jM),rN=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot){var gt;return Ot(this,at),gt=ct.call(this,ut),gt.attributes=ot,gt}return Bt(at,[{key:"length",value:function(){return Object.keys(this.attributes).length}},{key:"forEach",value:function(ot){for(var gt in this.attributes)ot(gt)}},{key:"has",value:function(ot){return ot in this.attributes}},{key:"getOptional",value:function(ot){return this.attributes[ot]}}]),at})(jM),VC=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt){var xt;return Ot(this,at),xt=ct.call(this,ut.name),xt.xml=ut,xt.picker=ot,xt.resourceType=gt,xt}return Bt(at,[{key:"length",value:function(){return-1}},{key:"forEach",value:function(ot){this.tagName!==void 0&&this.picker.forEachAttributes(this.tagName,ot)}},{key:"has",value:function(ot){return this.getOptional(ot)!==void 0}},{key:"getOptional",value:function(ot){var gt;return this.cachedValues&&ot in this.cachedValues?gt=this.cachedValues[ot]:this.tagName!==void 0&&(this.cachedXMLMap||(this.cachedXMLMap={}),gt=this.picker.getAttribute(this.tagName,ot,this.xml,this.cachedXMLMap,this.resourceType),this.cachedValues||(this.cachedValues={}),this.cachedValues[ot]=gt),gt}}]),at})(jM),tx=(function(){function yt(ct,at){Ot(this,yt),this.picker=at,this.resourceType=ct}return Bt(yt,[{key:"parse",value:function(at){return new nN(this.picker,null,0,(0,CC.xml2js)(at,{compact:!1,captureSpacesBetweenElements:!0}),this.resourceType)}}]),yt})(),Np=(function(){function yt(){Ot(this,yt);for(var ct=arguments.length,at=new Array(ct),ut=0;ut<ct;ut++)at[ut]=arguments[ut];this.tagNames=at}return Bt(yt,[{key:"execute",value:function(at){return this.tagNames.find(function(ut){return ut===at})!==void 0}},{key:"toString",value:function(){return this.tagNames.join(" or ")}}]),yt})(),nN=(function(){function yt(ct,at,ut,ot,gt){Ot(this,yt),this.picker=ct,this.parent=at,this.index=ut,this.resourceType=gt,this.name=ot.name,this.type=ot.type,this.attr=new rN(this.name,Object.freeze(_u({},ot.attributes))),this.extraAttr=ct?new VC(this,ct,gt):new pR(this.name);var xt=[];if(ot.elements)for(var Mt=0;Mt<ot.elements.length;++Mt){var kt=ot.elements[Mt];kt.type==="text"?this.text=kt.text:xt.push(new yt(ct,this,Mt,kt,gt))}this.elements=Object.freeze(xt)}return Bt(yt,[{key:"element",get:function(){return this.elements[0]}},{key:"displayer",value:function(at){return hR(this,at)}},{key:"elementWithName",value:function(at){var ut=Jt(this.elements),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;if(gt.name===at)return gt}}catch(xt){ut.e(xt)}finally{ut.f()}}},{key:"extraElementWithName",value:function(at){if(this.picker&&this.name)return this.cachedXMLMap||(this.cachedXMLMap={}),this.picker.getChild(this.name,at,this,this.cachedXMLMap,this.resourceType)}},{key:"elementsWithName",value:function(at){var ut=[],ot=Jt(this.elements),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt.name===at&&ut.push(xt)}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut}},{key:"childElementOptional",value:function(){for(var at=arguments.length,ut=new Array(at),ot=0;ot<at;ot++)ut[ot]=arguments[ot];var gt=this.searchChildElement(ut),xt=gt.xml,Mt=gt.found;if(Mt)return xt}},{key:"childElement",value:function(){for(var at=arguments.length,ut=new Array(at),ot=0;ot<at;ot++)ut[ot]=arguments[ot];var gt=this.searchChildElement(ut),xt=gt.xml,Mt=gt.found;if(Mt)return xt;typeof this.name=="string"&&ut.unshift(this.name);var kt=ut.join(" -> "),zt=ut.findIndex(function(ur){return ur===xt.name}),Ht=ut.splice(zt+1)[0],rr=ut.join(" -> ");throw new Error("can't find child ".concat(kt,": lack of child ").concat(Ht," from ").concat(rr))}},{key:"searchChildElement",value:function(at){for(var ut=this,ot=0;ot<at.length;++ot){var gt=at[ot],xt=ut,Mt=Jt(ut.elements),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;if(typeof gt=="string"){if(zt.name===gt){ut=zt;break}}else if(gt.execute(zt.name)){ut=zt;break}}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}if(xt===ut)return{xml:ut,found:!1}}return{xml:ut,found:!0}}},{key:"hasChildElementWithName",value:function(at){var ut=this,ot=Jt(ut.elements),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.name===at)return!0}}catch(Mt){ot.e(Mt)}finally{ot.f()}return!1}},{key:"parentElement",value:function(at){var ut=this.parentElementOptional(at);if(ut)return ut;throw new Error("can't find parent ".concat(at," from ").concat(this.name))}},{key:"parentElementOptional",value:function(at){for(var ut=this.parent;ut;){if(typeof at=="string"){if(ut.name===at)return ut}else if(at.execute(ut.name))return ut;ut=ut.parent}}}]),yt})(),iN={"Arial Rounded MT Bold":"https://convertcdn.netless.link/fonts/ArialRoundedMTBold.woff",Arial:"https://convertcdn.netless.link/fonts/arial.woff","Cooper Black":"https://convertcdn.netless.link/fonts/COOPBL.woff",Calibri:"https://convertcdn.netless.link/fonts/Calibri.woff",微软雅黑:"https://convertcdn.netless.link/fonts/msyh.woff",华文新魏:"https://convertcdn.netless.link/fonts/HuaWenXinWei-1.woff","雅痞-简":"https://convertcdn.netless.link/fonts/yuppy.woff",黑体:"https://convertcdn.netless.link/fonts/simhei.woff",楷体:"https://convertcdn.netless.link/fonts/simkai.woff",Heiti:"https://convertcdn.netless.link/fonts/simhei.woff",Aharoni:"https://convertcdn.netless.link/fonts/Aharoni.woff","Aharoni Bold":"https://convertcdn.netless.link/fonts/Aharoni%20Bold.woff","source-han-sans":"https://convertcdn.netless.link/fonts/simhei.woff"},aN="netless-ppt-font-face";function mR(yt,ct,at){if(document&&at){var ut=document.getElementById("".concat(aN,"-").concat(ct));if(!ut)ut=document.createElement("style"),ut.id="".concat(aN,"-").concat(ct),document.head.appendChild(ut);else return;var ot=at.filter(function(gt){return gt.src}).map(function(gt){var xt=gt.src.split("."),Mt=xt[xt?.length-1],kt={"font-style":gt.fontStyle,"font-weight":gt.fontWeight,"font-family":'"'.concat(gt.fontFamily,"-").concat(ct,'"'),src:'url("'.concat(yt,"/fonts/").concat(gt.src,'") format("').concat(Mt,'")')};return JSON.parse(JSON.stringify(kt))}).map(function(gt){return"@font-face {".concat(Object.keys(gt).reduce(function(xt,Mt){return"".concat(xt,`
`).concat(Mt,": ").concat(gt[Mt],";")},""),"}")});ut.innerHTML=ot.join(`
`)}}var bA=new Map;function sN(yt,ct){return gR.apply(this,arguments)}function gR(){return gR=ht(regeneratorRuntime.mark(function yt(ct,at){return regeneratorRuntime.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:bA.has(ct)||(bA.set(ct,!0),at&&at[ct]?_A(ct,at[ct]).then(function(){},function(){}):at&&at["*"]?(_A(ct,at["*"]).then(function(){},function(){}),_A(ct,at["*-bold"],{weight:"500"}).then(function(){},function(){}),_A(ct,at["*-italic"],{style:"italic"}).then(function(){},function(){}),_A(ct,at["*-bold-italic"],{weight:"500",style:"italic"}).then(function(){},function(){})):iN[ct]&&_A(ct,iN[ct]).then(function(){},function(){}));case 1:case"end":return ot.stop()}},yt)})),gR.apply(this,arguments)}function _A(yt,ct,at){return vR.apply(this,arguments)}function vR(){return vR=ht(regeneratorRuntime.mark(function yt(ct,at,ut){var ot,gt;return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Mt.t0=at,!Mt.t0){Mt.next=7;break}return Mt.next=4,fetch(at,{cache:"force-cache"});case 4:return Mt.next=6,Mt.sent.arrayBuffer();case 6:ot=Mt.sent;case 7:if(!ot){Mt.next=20;break}return gt=new FontFace(ct,ot,ut),Mt.prev=9,Mt.next=12,gt.load();case 12:document.fonts.add(gt),Mt.next=18;break;case 15:Mt.prev=15,Mt.t1=Mt.catch(9),console.error("".concat(ct," load error font"),Mt.t1);case 18:Mt.next=21;break;case 20:bA.delete(ct);case 21:case"end":return Mt.stop()}},yt,null,[[9,15]])})),vR.apply(this,arguments)}function oN(yt,ct){if(ct.masterThemeColorMapping[yt]){var at="a:".concat(ct.masterThemeColorMapping[yt]),ut=ct.theme.childElementOptional("a:theme","a:themeElements","a:clrScheme",at,"a:srgbClr");if(ut)return ut.attr.getString("val");{var ot=ct.theme.childElementOptional("a:theme","a:themeElements","a:clrScheme",at,"a:sysClr");return ot?ot.attr.getString("lastClr",yt):yt}}else{var gt="a:".concat(yt),xt=ct.theme.childElementOptional("a:theme","a:themeElements","a:clrScheme",gt,"a:srgbClr");if(xt)return xt.attr.getString("val");{var Mt=ct.theme.childElementOptional("a:theme","a:themeElements","a:clrScheme",gt,"a:sysClr");return Mt?Mt.attr.getString("lastClr",yt):yt}}}function uN(yt){var ct=rx(yt).childElementOptional("a:majorFont");return ct===void 0?{}:qx(ct)}function $M(yt){var ct=rx(yt).childElementOptional("a:minorFont");return ct===void 0?{}:qx(ct)}function qx(yt){var ct={},at=yt.childElementOptional("a:latin"),ut=yt.childElementOptional("a:ea"),ot=yt.childElementOptional("a:cs");at&&(ct.latin=at.attr.getString("typeface","")===""?[]:[at.attr.getString("typeface")]),ut&&(ct.ea=ut.attr.getString("typeface","")===""?[]:[ut.attr.getString("typeface")]),ot&&(ct.cs=ot.attr.getString("typeface","")===""?[]:[ot.attr.getString("typeface")]);var gt=yt.elementsWithName("a:font").filter(function(xt){return["Hans","Hant","Jpan","Hang"].includes(xt.attr.getString("script"))}).map(function(xt){return xt.attr.getString("typeface")});return ct.ea!==void 0?ct.ea=ct.ea.concat(gt):ct.ea=gt,ct}function rx(yt){return yt.theme.childElement("a:theme","a:themeElements","a:fontScheme")}function Hk(yt,ct){if(yt!=="none"){var at=rx(ct).childElement("a:".concat(yt,"Font")),ut=qx(at);return yR(ut).filter(function(ot){return!ot.startsWith("+")&&ot!==""}).map(function(ot){return sN(ot,ct.userFonts),ot})}else return[]}function yR(yt){var ct=[];return yt.latin!==void 0&&ct.concat(yt.latin),yt.ea!==void 0&&ct.concat(yt.ea),yt.cs!==void 0&&ct.concat(yt.cs),ct}var xA=["a:blipFill","a:gradFill","a:grpFill","a:noFill","a:pattFill","a:solidFill"],mS=["a:hslClr","a:schemeClr","a:srgbClr","a:scrgbClr","a:sysClr","a:prstClr"];function bR(yt,ct){var at=ct.theme.childElement("a:theme","a:themeElements","a:fmtScheme"),ut=yt.childElement("a:effectRef"),ot=ut.childElement(Nt(Np,mS)),gt=ut.attr.getNumber("idx"),xt=at.childElement("a:effectStyleLst").elements[gt-1],Mt=yt.childElement("a:fillRef"),kt=Mt.childElement(Nt(Np,mS)),zt=Mt.attr.getNumber("idx"),Ht=at.childElement("a:fillStyleLst").elements[zt-1],rr=yt.childElement("a:fontRef"),ur=rr.attr.getString("idx"),_r;ur!=="none"&&(_r=rx(ct).childElement("a:".concat(ur,"Font")));var Dr=yt.childElement("a:lnRef"),Br=Dr.childElement(Nt(Np,mS)),Ur=Dr.attr.getNumber("idx"),Zr=at.childElement("a:lnStyleLst").elements[Ur-1];return{effect:{xml:xt,phClr:ot},fill:{xml:Ht,phClr:kt},font:{xml:_r,fontRef:rr},ln:{xml:Zr,phClr:Br}}}var e1=(0,qm.default)("#FFFFFF").alpha(0),iw=(0,qm.default)("#FFFFFF").alpha(0),bm;(function(yt){yt.None="none",yt.Norm="norm",yt.Lighten="lighten",yt.LightenLess="lightenLess",yt.Darken="darken",yt.DarkenLess="darkenLess"})(bm||(bm={}));var sy=(function(){function yt(){Ot(this,yt),this.fillColor=e1.hsl()}return Bt(yt,[{key:"setFillColor",value:function(at){at?this.fillColor=at:this.fillColor=e1.hsl()}},{key:"hsl",value:function(){return this.fillColor.hsl()}},{key:"rgb",value:function(){return this.fillColor.rgb()}}]),yt})(),UM=(function(){function yt(ct){Ot(this,yt),this.alphaModFix=1,this.resId=ct.childElement("a:blip").attr.getString("r:embed"),ct.childElementOptional("a:tile")!==void 0?this.tile=!0:this.tile=!1;var at=ct.childElement("a:blip").childElementOptional("a:alphaModFix");if(at!==void 0){var ut=at.attr.getNumberOptional("amt");ut&&(this.alphaModFix=Ey(ut))}}return Bt(yt,[{key:"getResId",value:function(){return this.resId}},{key:"getAlphaModFix",value:function(){return this.alphaModFix}},{key:"hsl",value:function(){return e1.hsl()}},{key:"rgb",value:function(){return e1.rgb()}}]),yt})(),nT=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.colors=[],this.rotation=0,this.path=void 0;var gt=ct.hasChildElementWithName("a:gsLst")?ct.childElement("a:gsLst").elementsWithName("a:gs"):[];if(this.colors=gt.sort(function(_r,Dr){var Br=_r.attr.getNumber("pos")/Ap,Ur=Dr.attr.getNumber("pos")/Ap;return Br-Ur}).map(function(_r){var Dr=_r.attr.getNumber("pos")/Ap,Br=JT(_r.childElement(Nt(Np,mS)),at,ut,ot);return{stop:Dr,color:Br}}),ct.hasChildElementWithName("a:lin")&&(this.rotation=pS(ct.childElement("a:lin").attr.getNumber("ang",0))),ct.hasChildElementWithName("a:path")){var xt=ct.childElement("a:path"),Mt=xt.attr.getStringOptional("path"),kt=xt.childElementOptional("a:fillToRect");if(!kt){this.path={path:Mt,fillToRect:{left:0,top:0,bottom:0,right:0}};return}var zt=kt.attr.getNumber("l",0),Ht=kt.attr.getNumber("t",0),rr=kt.attr.getNumber("b",0),ur=kt.attr.getNumber("r",0);this.path={path:Mt,fillToRect:{left:zt,top:Ht,bottom:rr,right:ur}}}}return Bt(yt,[{key:"getGradientPath",value:function(){return this.path}},{key:"getColors",value:function(){return this.colors}},{key:"getRotation",value:function(){return this.rotation}},{key:"hsl",value:function(){return this.colors&&this.colors.length>0&&this.colors[0].color?this.colors[0].color.hsl():e1.hsl()}},{key:"rgb",value:function(){return this.colors&&this.colors.length>0&&this.colors[0].color?this.colors[0].color.rgb():e1.rgb()}},{key:"getGradientStyles",value:function(){var at="linear-gradient(".concat(this.rotation+90,"deg, ");return at+=this.colors.filter(function(ut){return ut.color}).map(function(ut){var ot;return"".concat((ot=ut.color)==null?void 0:ot.rgb().string()," ").concat(ut.stop*100,"%")}).join(","),at+=")",at}}]),yt})();function JT(yt,ct,at,ut){var ot;if(yt.attr.has("val")){var gt=yt.childElementOptional("a:alpha"),xt=yt.childElementOptional("a:shade"),Mt=yt.childElementOptional("a:tint"),kt=yt.childElementOptional("a:lumMod"),zt=yt.childElementOptional("a:satMod"),Ht=yt.childElementOptional("a:satOff"),rr=yt.childElementOptional("a:lumOff"),ur=yt.childElementOptional("a:hueMod"),_r=yt.childElementOptional("a:hueOff");switch(yt.name){case"a:prstClr":return eE((0,qm.default)(yt.attr.getString("val")),gt,xt,kt,Mt,zt,rr,Ht,ur,_r);case"a:srgbClr":return eE((0,qm.default)("#".concat(yt.attr.getString("val"))),gt,xt,kt,Mt,zt,rr,Ht,ur,_r);case"a:schemeClr":{var Dr=yt.attr.getString("val");return Dr==="phClr"&&(ut?Dr=ut:at.name==="a:sysClr"?Dr=(ot=at.attr.getStringOptional("lastClr"))!=null?ot:"accent1":Dr=at.attr.getString("val")),eE((0,qm.default)("#".concat(oN(Dr,ct))),gt,xt,kt,Mt,zt,rr,Ht,ur,_r)}case"a:hslClr":{var Br=yt.attr.getNumber("hue")/J_,Ur=yt.attr.getNumber("sat")/Ap,Zr=yt.attr.getNumber("lum")/Ap;return eE((0,qm.default)({h:Br,s:Ur,l:Zr}),gt,xt,kt,Mt,zt,rr)}case"a:scrgbClr":{var Tn=yt.attr.getNumber("r")*255/Ap,jn=yt.attr.getNumber("g")*255/Ap,ts=yt.attr.getNumber("b")*255/Ap;return eE((0,qm.default)({r:Tn,g:jn,b:ts}),gt,xt,kt,Mt,zt,rr)}case"a:sysClr":return eE((0,qm.default)("#".concat(yt.attr.getString("lastClr"))),gt,xt,kt,Mt,zt,rr,Ht,ur,_r);default:return}}}function m0(yt,ct){var at,ut,ot,gt,xt,Mt,kt,zt,Ht,rr=Number((at=yt.alpha)==null?void 0:at.val),ur=Number((ut=yt.shade)==null?void 0:ut.val),_r=Number((ot=yt.tint)==null?void 0:ot.val),Dr=Number((gt=yt.lumMod)==null?void 0:gt.val),Br=Number((xt=yt.satMod)==null?void 0:xt.val),Ur=Number((Mt=yt.satOff)==null?void 0:Mt.val),Zr=Number((kt=yt.lumOff)==null?void 0:kt.val),Tn=Number((zt=yt.hueMod)==null?void 0:zt.val),jn=Number((Ht=yt.hueOff)==null?void 0:Ht.val);return _R((0,qm.default)("#".concat(oN(yt.val,ct))),rr,ur,Dr,_r,Br,Zr,Ur,Tn,jn)}function eE(yt,ct,at,ut,ot,gt,xt,Mt,kt,zt){var Ht=yt;if(ot&&(Ht=Ht.mix((0,qm.default)("white"),1-ot.attr.getNumber("val")/Ap)),at&&(Ht=Ht.mix((0,qm.default)("black"),1-at.attr.getNumber("val")/Ap)),gt){var rr=Ht.hsl().object(),ur=rr.h,_r=rr.s,Dr=rr.l,Br=_r*gt.attr.getNumber("val")/Ap;Ht=(0,qm.default)({l:Dr,s:Br,h:ur})}if(Mt){var Ur=Ht.hsl().object(),Zr=Ur.h,Tn=Ur.s,jn=Ur.l,ts=Mt.attr.getNumber("val")/Ap*100+Tn;Ht=(0,qm.default)({l:jn,s:ts,h:Zr})}if(ut){var us=Ht.hsl().object(),Os=us.h,Hs=us.s,Ks=us.l,so=Ks*ut.attr.getNumber("val")/Ap;Ht=(0,qm.default)({l:so,s:Hs,h:Os})}if(xt){var To=Ht.hsl().object(),Oo=To.h,Au=To.s,Tu=To.l,xu=xt.attr.getNumber("val")/Ap*100+Tu;Ht=(0,qm.default)({l:xu,s:Au,h:Oo})}if(kt){var yu=Ht.hsl().object(),sp=yu.h,Jl=yu.s,Ml=yu.l,Qp=sp*kt.attr.getNumber("val")/Ap;Ht=(0,qm.default)({l:Ml,s:Jl,h:Qp})}if(zt){var pm=Ht.hsl().object(),Uv=pm.h,mv=pm.s,P_=pm.l,ox=zt.attr.getNumber("val")/J_+Uv;Ht=(0,qm.default)({l:P_,s:mv,h:ox})}return ct&&(Ht=Ht.alpha(ct.attr.getNumber("val")/Ap)),Ht}function _R(yt,ct,at,ut,ot,gt,xt,Mt,kt,zt){var Ht=yt;if(ot&&(Ht=yt.mix((0,qm.default)("white"),1-ot/Ap)),at&&(Ht=yt.mix((0,qm.default)("black"),1-at/Ap)),gt){var rr=yt.hsl().object(),ur=rr.h,_r=rr.s,Dr=rr.l,Br=_r*gt/Ap;Ht=(0,qm.default)({l:Dr,s:Br,h:ur})}if(Mt){var Ur=yt.hsl().object(),Zr=Ur.h,Tn=Ur.s,jn=Ur.l,ts=Mt/Ap*100+Tn;Ht=(0,qm.default)({l:jn,s:ts,h:Zr})}if(ut){var us=yt.hsl().object(),Os=us.h,Hs=us.s,Ks=us.l,so=Ks*ut/Ap;Ht=(0,qm.default)({l:so,s:Hs,h:Os})}if(xt){var To=yt.hsl().object(),Oo=To.h,Au=To.s,Tu=To.l,xu=xt/Ap*100+Tu;Ht=(0,qm.default)({l:xu,s:Au,h:Oo})}if(kt){var yu=yt.hsl().object(),sp=yu.h,Jl=yu.s,Ml=yu.l,Qp=sp*kt/Ap;Ht=(0,qm.default)({l:Ml,s:Jl,h:Qp})}if(zt){var pm=yt.hsl().object(),Uv=pm.h,mv=pm.s,P_=pm.l,ox=zt/J_+Uv;Ht=(0,qm.default)({l:P_,s:mv,h:ox})}return ct&&(Ht=yt.alpha(ct/Ap)),Ht}var Ay=(function(){function yt(ct){Ot(this,yt),this.placeHolderColor=ct}return Bt(yt,[{key:"read",value:function(at,ut){if(at===void 0)return iw;switch(at.name){case"a:noFill":return e1;case"a:solidFill":return JT(at.childElement(Nt(Np,mS)),ut,this.placeHolderColor);case"a:gradFill":return new nT(at,ut,this.placeHolderColor);case"a:blipFill":return(at.hasChildElementWithName("a:blip")?at.childElement("a:blip").attr.getStringOptional("r:embed"):void 0)!==void 0?new UM(at):e1;case"a:grpFill":return new sy;case"a:pattFill":default:return iw}}}]),yt})();function Zl(yt){return yt instanceof UM||yt===void 0?"none":yt.rgb().string()}function vt(yt,ct){if(yt==="none")return yt;switch(ct){case bm.None:return"none";case bm.Norm:return yt;case bm.Darken:return(0,qm.default)(yt).darken(.4).rgb().string();case bm.DarkenLess:return(0,qm.default)(yt).darken(.2).rgb().string();case bm.Lighten:return(0,qm.default)(yt).lighten(.4).rgb().string();case bm.LightenLess:return(0,qm.default)(yt).lighten(.2).rgb().string();default:return yt}}var it=(function(){function yt(){Ot(this,yt),this.tasks={slideDidUpdate:!1},this.isLoadFinished=!1}return Bt(yt,[{key:"reset",value:function(at){this.tasks={slideDidUpdate:!1},this.eventHub=at}},{key:"endLoadTask",value:function(at){var ut=this;return this.tasks[at]=!0,Object.keys(this.tasks).every(function(ot){return ut.tasks[ot]})?(this.eventHub.emit("__PresetTransactionReady__"),!0):!1}},{key:"addLoadTask",value:function(at){this.tasks[at]=!1}},{key:"loadImage",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.prev=0,Ht.next=3,fetch(ot);case 3:return gt=Ht.sent,xt=new FileReader,Ht.next=7,gt.blob();case 7:return Mt=Ht.sent,kt=new Promise(function(rr){xt.onload=function(ur){var _r;rr((_r=ur.target)==null?void 0:_r.result)},xt.onerror=function(){rr(ot)}}),xt.readAsDataURL(Mt),Ht.next=12,kt;case 12:return Ht.abrupt("return",Ht.sent);case 15:return Ht.prev=15,Ht.t0=Ht.catch(0),Ht.abrupt("return",ot);case 18:case"end":return Ht.stop()}},ut,null,[[0,15]])}));function at(ut){return ct.apply(this,arguments)}return at})()}]),yt})(),lt=new it,pt=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.imageUrl="",ot.state={imageBase64Url:""},ot.updateImageUrl(ot.props),ot}return Bt(at,[{key:"UNSAFE_componentWillReceiveProps",value:function(ot){this.updateImageUrl(ot)}},{key:"updateImageUrl",value:function(ot){var gt=this,xt=ot.cSld.extraAttr.getStringOptional("backgroundResId"),Mt=ot.cSld.extraAttr.getStringOptional("backgroundImageResourceType");if(xt&&Mt){var kt=ot.resourceLoader.loadURL(Mt,xt);this.imageUrl!==kt&&(this.imageUrl=kt,lt.addLoadTask(kt),lt.loadImage(kt).then(function(zt){gt.setState({imageBase64Url:zt},function(){lt.endLoadTask(kt)})},function(){}))}}},{key:"renderImage",value:function(ot,gt){var xt=this.props.cSld,Mt=this.state.imageBase64Url,kt=xt.extraAttr.getStringOptional("backgroundResId"),zt=xt.extraAttr.getStringOptional("backgroundImageResourceType");if(kt&&zt){var Ht=xt.extraElementWithName("getBackgroundImageFill");if(Ht===void 0||Ht.childElementOptional("a:blip")===void 0)return null;{var rr=Ht.childElement("a:blip").childElementOptional("a:alphaModFix"),ur=!!Ht.childElementOptional("a:tile"),_r=1;if(rr){var Dr=rr.attr.getNumberOptional("amt");Dr&&(_r=Ey(Dr))}var Br={position:"absolute",left:0,top:0,width:gu(ot),height:gu(gt),opacity:_r,backgroundImage:"url(".concat(Mt,")"),backgroundSize:ur?"auto":"".concat(gu(ot)," ").concat(gu(gt))};return uA.default.createElement("div",{style:Br})}}else{var Ur=xt.extraAttr.getColorOptional("backgroundColor"),Zr;return Ur instanceof nT?Zr=Ur.getGradientStyles():Zr=Zl(Ur),Ur?uA.default.createElement("div",{style:{position:"absolute",left:0,top:0,width:gu(ot),height:gu(gt),background:Zr}}):null}}},{key:"render",value:function(){var ot=this.props,gt=ot.slideContext,xt=ot.slideRef,Mt=ot.className,kt=ot.children,zt={position:"relative",width:gu(gt.slideWidth),height:gu(gt.slideHeight),overflow:"hidden"};return uA.default.createElement("div",{id:"ppt-animation-hub",ref:xt,className:Mt,style:zt},this.renderImage(gt.slideWidth,gt.slideHeight),kt)}}]),at})(uA.default.Component),_t=(function(){function yt(ct){Ot(this,yt),this.mapper=ct}return Bt(yt,[{key:"map",value:function(at,ut,ot){return(!this.buffer||this.buffer.source!==at)&&(this.buffer={source:at,target:this.mapper(at,ut,void 0,ot)}),this.buffer.target}}]),yt})();function Dt(yt){switch(yt){case"b":return"flex-end";case"ctr":return"center";default:return"flex-start"}}function Lt(yt){switch(yt){case"l":return"left";case"r":return"right";case"ctr":return"center";case"just":return"justify";case"dist":return"justify";default:return"left"}}function $t(yt){switch(yt){case"sng":return"underline";default:return"none"}}function Xt(yt,ct){var at=ct.scaleX,ut=ct.scaleY;return Math.abs(Math.cos(yt/180*Math.PI))>=Math.abs(Math.sin(yt/180*Math.PI))?{scaleX:at,scaleY:ut}:{scaleX:ut,scaleY:at}}var Yt=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"renderAutoNum",value:function(ot){var gt=this.props,xt=gt.buIndexCounter,Mt=gt.paragraphXML,kt=gt.firstRangeXML,zt=ot.attr.getString("type"),Ht=ot.attr.getNumber("startAt",1),rr=xt.get(Mt,Ht,kt)+Ht;return Ir(rr,zt)}},{key:"renderBuChar",value:function(ot){return lr(ot)}},{key:"render",value:function(){var ot=this.props,gt=ot.buXML,xt=ot.buIndexCounter;switch(gt.name){case"a:buChar":return xt.reset(),this.renderBuChar(gt.attr.getString("char"));case"a:buAutoNum":return this.renderAutoNum(gt);case"a:buNone":case"a:buBlip":return xt.reset(),""}return""}}]),at})(zk.default.Component);function Zt(yt){return yt<=20?String.fromCodePoint(yt+9311):yt<=35?String.fromCodePoint(yt+12860):yt<=50?String.fromCodePoint(yt+12941):"".concat(yt)}function lr(yt){switch(yt){case String.fromCodePoint(159):case" ":case"l":return"●";case"ü":return"✓";case"•":return"•";case"n":return"◾";case"":return"";case"v":return"❖";case"u":return"◆";case"&":return"🕮";case"Ø":return"➣";case"p":return"□";default:return yt}}function xr(yt){var ct=64,at=26,ut=yt%at;ut=ut===0?26:ut;var ot=Math.ceil(yt/at);return String.fromCodePoint(ut+ct).repeat(ot)}function wr(yt){var ct={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},at="",ut=yt;for(var ot in ct)for(;ut>=ct[ot];)at+=ot,ut-=ct[ot];return at}function Ir(yt,ct){switch(ct){case"alphaLcParenBoth":return"(".concat(xr(yt),")");case"alphaLcParenR":return"".concat(xr(yt).toLowerCase(),")");case"alphaLcPeriod":return"".concat(xr(yt).toLowerCase(),".");case"alphaUcParenBoth":return"(".concat(xr(yt),")");case"alphaUcParenR":return"".concat(xr(yt),")");case"alphaUcPeriod":return"".concat(xr(yt),".");case"arabicParenBoth":return"(".concat(yt,")");case"arabicParenR":return"".concat(yt,")");case"arabicPeriod":return"".concat(yt,".");case"arabicPlain":return"".concat(yt);case"ea1JpnChsDbParenBoth":return"(".concat(yt.toLocaleString("zh-Hans-CN-u-nu-hanidec"),")");case"ea1JpnChsDbParenR":return"".concat(yt.toLocaleString("zh-Hans-CN-u-nu-hanidec"),")");case"ea1JpnChsDbPeriod":return"".concat(yt.toLocaleString("zh-Hans-CN-u-nu-hanidec"),".");case"ea1JpnChsDbPlain":return"".concat(yt.toLocaleString("zh-Hans-CN-u-nu-hanidec"));case"circleNumDbPlain":return Zt(yt);case"romanLcParenBoth":return"(".concat(wr(yt).toLowerCase(),")");case"romanLcParenR":return"".concat(wr(yt).toLowerCase(),")");case"romanLcPeriod":return"".concat(wr(yt).toLowerCase(),".");case"romanUcParenBoth":return"(".concat(wr(yt),")");case"romanUcParenR":return"".concat(wr(yt),")");case"romanUcPeriod":return"".concat(wr(yt),".");default:return"".concat(yt,".")}}var kr=(function(yt){It(at,yt);var ct=qt(at);function at(ut){return Ot(this,at),ct.call(this,ut)}return Bt(at,[{key:"hasUnderLine",value:function(ot){switch(ot){case"none":return"none";default:return"underline"}}},{key:"render",value:function(){var ot=this.props,gt=ot.text,xt=ot.highlightColor,Mt=ot.underLineStyle,kt=ot.indent,zt=ot.lineHeight,Ht=ot.isTextWrap,rr=ot.fontFamily,ur=ot.isBold,_r=ot.color,Dr=ot.isItalic,Br=ot.letterSpacing,Ur=ot.fontSize;return gt?D_.default.createElement("span",{style:{display:"inline-flex",justifyContent:"space-between",backgroundColor:Zl(xt),textDecoration:this.hasUnderLine(Mt),width:"100%"}},Array.from(gt).map(function(Zr,Tn){return Tn===0&&kt?D_.default.createElement("span",{key:"run-text-".concat(Tn),style:{display:kt?"inline-block":"inline",lineHeight:zt,whiteSpace:Ht?"pre-wrap":"pre",fontSize:"".concat(Ur,"pt"),fontFamily:rr,fontWeight:ur?500:400,color:Zl(_r),fontStyle:Dr?"italic":"normal",letterSpacing:"".concat(Br/100,"pt"),textIndent:kt?gu(kt):0}},Zr):D_.default.createElement("span",{key:"run-text-".concat(Tn),style:{display:"inline",lineHeight:zt,whiteSpace:Ht?"pre-wrap":"pre",fontSize:"".concat(Ur,"pt"),fontFamily:rr,fontWeight:ur?500:400,color:Zl(_r),fontStyle:Dr?"italic":"normal",letterSpacing:"".concat(Br/100,"pt")}},Zr)})):null}}]),at})(D_.default.Component),Lr=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.defaultPtSize=18;var gt=ut.rNodeOrBrNode,xt=ut.lineHeight,Mt=ut.fontScale,kt=gt.extraAttr.getNumberOptional("sz"),zt;return kt===void 0?zt=ot.defaultPtSize:zt=kt,typeof xt=="string"?ot.lineHeight=xt:ot.lineHeight="".concat(zt*Mt*1.2*xt,"pt"),ot.fontSize="".concat(zt*Mt,"pt"),ot}return Bt(at,[{key:"hasUnderLine",value:function(ot){switch(ot){case"none":return"none";default:return"underline"}}},{key:"renderText",value:function(){var ot,gt=this.props,xt=gt.rNodeOrBrNode,Mt=gt.slideIndex,kt=gt.fontScale,zt=gt.lineHeight,Ht=gt.indent,rr=gt.isTextWrap,ur=gt.runIndex,_r=gt.align,Dr=gt.lastRunInParagraph,Br=xt.attr.getStringOptional("type");if(Br)switch(Br){case"slidenum":{ot=Mt;break}default:ot=new Date(Date.now()).toLocaleDateString()}var Ur=xt.childElementOptional("a:t");if(Ur===void 0)return D_.default.createElement("span",null);var Zr=xt.extraAttr.getBoolean("b",!1),Tn=xt.extraAttr.getString("u","none"),jn=xt.extraAttr.getNumber("spc",0),ts=xt.extraAttr.getBoolean("i",!1),us=xt.extraAttr.getColorOptional("color"),Os=xt.extraAttr.getNumber("sz",0)*kt,Hs=xt.extraAttr.getString("fontType",""),Ks=xt.extraAttr.getColorOptional("highlight",void 0),so,To=xt.childElementOptional("a:rPr");To!==void 0&&(so=To.attr.getNumberOptional("baseline"));var Oo;if(so===void 0)Oo=ot||Ur.text;else{var Au;so>0?(Au=40,Oo=D_.default.createElement("sup",{style:{fontSize:"small",verticalAlign:"".concat(Au+so/Ap*100,"%")}},ot||Ur.text)):so<0?(Au=0,Oo=D_.default.createElement("sub",{style:{fontSize:"small",verticalAlign:"".concat(Au+so/Ap*100,"%")}},ot||Ur.text)):Oo=ot||Ur.text}var Tu;if(typeof zt=="string"?Tu=zt:Tu="".concat(Os*1.2*zt,"pt"),_r==="dist")return D_.default.createElement(kr,{fontSize:Os,text:"".concat(Oo),lineHeight:Tu,indent:Ht,isTextWrap:rr,isBold:Zr,isItalic:ts,underLineStyle:Tn,fontFamily:Hs,letterSpacing:jn,color:us,highlightColor:Ks});{var xu={display:Ht?"inline-block":"inline",lineHeight:zt,whiteSpace:rr?"pre-wrap":"pre",backgroundColor:Zl(Ks),fontSize:"".concat(Os,"pt"),textDecoration:this.hasUnderLine(Tn),fontFamily:Hs,fontWeight:Zr?500:400,color:Zl(us),fontStyle:ts?"italic":"normal",letterSpacing:"".concat(jn/100,"pt"),overflowWrap:"break-word",textIndent:Ht?gu(Ht):0};if(Dr&&(typeof Oo=="string"||typeof Oo=="number")){var yu="",sp=Oo;if(typeof Oo=="string")Oo.length>0&&(sp=Oo.substring(0,Oo.length-1),yu=Oo.substring(Oo.length-1));else if(typeof Oo=="number"){var Jl=Oo+"";sp=Jl.substring(0,Jl.length-1),yu=Jl.substring(Jl.length-1)}return xu["--data-last-word-indent"]=Ht?"".concat(gu(-Ht)):"0pt",D_.default.createElement("span",{className:"netless-ppt-last-run","data-last-word":yu,key:"run-".concat(ur),style:xu},sp)}else return D_.default.createElement("span",{key:"run-".concat(ur),style:xu},Oo)}}},{key:"render",value:function(){var ot=this.props,gt=ot.rNodeOrBrNode,xt=ot.runIndex,Mt=ot.prevElement;switch(gt.name){case"a:fld":case"a:r":return this.renderText();case"a:br":return D_.default.createElement("span",{key:"br-".concat(xt),style:{lineHeight:this.lineHeight,fontSize:this.fontSize}},D_.default.createElement("br",null));case"a:endParaRPr":return Mt&&Mt.name==="a:br"?D_.default.createElement("span",{key:"endParaRPr-".concat(xt),style:{lineHeight:this.lineHeight,display:"inline",fontSize:this.fontSize}},D_.default.createElement("br",null)):null;default:return null}}}]),at})(D_.default.Component),Xr;(function(yt){yt.Horz="horz",yt.Vert="vert",yt.Vert270="vert270",yt.WordArtVert="wordArtVert",yt.EaVert="eaVert",yt.MongolianVert="mongolianVert",yt.WordArtVertRtl="wordArtVertRtl"})(Xr||(Xr={}));function _n(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz;switch(yt){case Xr.MongolianVert:case Xr.WordArtVert:return"vertical-lr";case Xr.WordArtVertRtl:case Xr.EaVert:return"vertical-rl";default:return"horizontal-tb"}}function On(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz;return yt!==Xr.Horz?{maxHeight:"100%",width:void 0}:{}}function Kn(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz;return yt===Xr.WordArtVert||yt===Xr.WordArtVertRtl?{padding:"0.1em"}:{}}function Mn(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz;switch(yt){case Xr.EaVert:return["","","","","","【","】","《","》","〈","〉"];case Xr.WordArtVertRtl:case Xr.WordArtVert:return["《","》","…","…","[","]","{","}","<",">","","〈","〉","(",")","",""];default:return[]}}function ca(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz;switch(yt){case Xr.EaVert:return["“","”","","",""];default:return[]}}function Gn(yt,ct,at){var ut,ot,gt,xt=(ut=yt.left)!=null?ut:0,Mt=(ot=yt.right)!=null?ot:0,kt=0,zt=0;(gt=yt.textBodyWrapResource)!=null&&gt.prop?(kt=yt.textBodyWrapResource.prop.width*n_,zt=yt.textBodyWrapResource.prop.height*n_):(kt=yt.width,zt=yt.height);var Ht=Mt?Mt-zt/2+kt/2:zt/2-kt/2;if(at===Xr.Vert270&&ct.paddingTop&&typeof ct.paddingTop=="string"){var rr=parseFloat(ct.paddingTop)*ZT;Number.isNaN(rr)||(Ht-=rr)}return{left:gu(xt?xt-kt/2+zt/2:kt/2-zt/2),top:gu(Ht),width:gu(zt),height:gu(kt)}}function Qn(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz,ct=arguments.length>1?arguments[1]:void 0,at=arguments.length>2?arguments[2]:void 0,ut,ot;switch(yt){case Xr.EaVert:return El(_u({},ct),{writingMode:_n(yt)});case Xr.WordArtVert:case Xr.WordArtVertRtl:return El(_u({},ct),{writingMode:_n(yt),textOrientation:"upright"});case Xr.Vert:{var gt=Gn(at,ct,yt),xt=(ut=ct.transform)!=null?ut:"";return El(_u(_u({},ct),gt),{position:"absolute",minHeight:at.insideTable?void 0:gt.height,paddingLeft:ct.paddingBottom,paddingTop:ct.paddingLeft,paddingRight:ct.paddingTop,paddingBottom:ct.paddingRight,transform:"".concat(xt," rotate(90deg)")})}case Xr.Vert270:{var Mt=Gn(at,ct,yt),kt=(ot=ct.transform)!=null?ot:"";return El(_u(_u({},ct),Mt),{position:"absolute",minHeight:at.insideTable?void 0:Mt.height,paddingLeft:ct.paddingTop,paddingTop:ct.paddingRight,paddingRight:ct.paddingBottom,paddingBottom:ct.paddingLeft,transform:"".concat(kt," rotate(-90deg)")})}default:return ct}}function ks(yt){var ct=yt.childElement("a:bodyPr").attr.getStringOptional("vert");if(!ct){var at=yt.parentElementOptional("a:tc");if(at){var ut=at.childElementOptional("a:tcPr");ut&&(ct=ut.attr.getStringOptional("vert"))}}return ct||Xr.Horz}function Cs(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz,ct=arguments.length>1?arguments[1]:void 0;return yt===Xr.WordArtVertRtl?El(_u({},ct),{marginTop:ct.marginLeft,marginLeft:ct.marginBottom,marginRight:ct.marginTop}):yt===Xr.EaVert||yt===Xr.WordArtVert?El(_u({},ct),{marginTop:ct.marginLeft,marginLeft:ct.marginTop,marginRight:ct.marginBottom}):ct}function gs(yt,ct,at){var ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ot,gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur=0,Zr;return ct.includes("m")?Zr=(Mt=(xt=(gt=(ot=yt?.master)==null?void 0:ot.shapes)==null?void 0:gt[ct.replace("m","")])==null?void 0:xt.textBodyMap)==null?void 0:Mt[0]:ct.includes("l")?Zr=(rr=(Ht=(zt=(kt=yt?.layout)==null?void 0:kt.shapes)==null?void 0:zt[ct.replace("l","")])==null?void 0:Ht.textBodyMap)==null?void 0:rr[0]:Zr=(Br=(Dr=(_r=(ur=yt?.slide)==null?void 0:ur.shapes)==null?void 0:_r[ct])==null?void 0:Dr.textBodyMap)==null?void 0:Br[0],Zr&&(at==null?Zr.paragraphs:Zr.paragraphs.slice(at,at+1)).forEach(function(Tn){Tn.runs.forEach(function(jn){jn.text&&(ut&&jn.prop.language==="en"?Ur+=1:Ur+=jn.text.length)})}),Ur}function _s(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr.Horz,ct=arguments.length>1?arguments[1]:void 0,at=arguments.length>2?arguments[2]:void 0,ut={};return yt===Xr.Horz?ut.height="".concat(at,"px"):(ut.height="".concat(ct,"px"),ut.width="".concat(at,"px"),(yt===Xr.Vert||yt===Xr.Vert270)&&(ut.width="".concat(ct,"px"),ut.height="".concat(at,"px")),yt===Xr.WordArtVert||yt===Xr.WordArtVertRtl?ut.margin="0 0.6em":ut.whiteSpace="nowrap",(yt===Xr.EaVert||yt===Xr.WordArtVertRtl)&&(ut.transformOrigin="100% 0")),ut}function Ts(yt){var ct,at=yt.childElementOptional("p:txBody","a:bodyPr");return(ct=at?.attr.getStringOptional("vert"))!=null?ct:Xr.Horz}function ws(yt){if(yt===void 0)return yt;if(/^#([A-Fa-f0-9]{8})$/.test(yt)){var ct=parseInt(yt.slice(1,3),16),at=parseInt(yt.slice(3,5),16),ut=parseInt(yt.slice(5,7),16),ot=parseInt(yt.slice(7,9),16);return ot===255?"rgb(".concat(ct,",").concat(at,",").concat(ut,")"):"rgba(".concat(ct,",").concat(at,",").concat(ut,",").concat(ot/256,")")}else return yt}function oo(yt){var ct,at=yt.run.prop,ut;at.underLine&&(ut="underline"),at.strikeThrough&&(ut=ut?"".concat(ut," line-through"):"line-through");var ot;yt.run.runType==="tab"&&(ot={display:"inline-block",width:yt.run.prop.width});var gt="'".concat(at.font,"-").concat(yt.uuid,"','").concat(at.font,"'"),xt=(1-Math.abs(at.baseline))*at.size,Mt={fontSize:"".concat(xt/yt.transformScale,"px"),lineHeight:"".concat(at.lineSpacing/yt.transformScale,"px")};return _u(_u({color:ws((ct=at.fillType)==null?void 0:ct.color),fontFamily:gt,fontSize:"".concat(xt,"px"),fontStyle:at.italic?"italic":"normal",fontWeight:no(at),letterSpacing:"".concat(at.kerning||0,"px"),lineHeight:"".concat(at.lineSpacing,"px"),backgroundColor:at.highlightColor,verticalAlign:at.baseline?"".concat(at.baseline*100,"%"):void 0,textDecoration:ut},ot),Mt)}function no(yt){return yt.fontWeight?yt.fontWeight:yt.bold?"bold":"normal"}var js={display:"inline-block",textIndent:0},Ws=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.styles=oo(ut),ot}return Bt(at,[{key:"renderSingleTextNodes",value:function(ot){return ot.split("").map(function(gt,xt){return M1.default.createElement("span",{key:xt,className:D1.Text,style:js},gt)})}},{key:"render",value:function(){var ot=this.props,gt=ot.run,xt=ot.withAnimation,Mt=ot.isSplitRun,kt=gt.text||" ",zt=kt.split("").map(function(rr,ur){return M1.default.createElement("span",{key:ur,className:D1.Text,style:js},rr)}),Ht=M1.default.createElement("span",{style:El(_u({},this.styles),{whiteSpace:"pre"})}," ");return M1.default.createElement("span",{style:El(_u({},this.styles),{whiteSpace:"nowrap",display:"inline-block",minWidth:Mt&&gt.runType==="text"?void 0:gt.prop.width})},xt?zt:kt.split("").map(function(rr){return rr===" "?Ht:rr}))}}]),at})(M1.default.Component),Co=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.horizontalText="",ot.needSideWayCharacterList=Mn(ut.vert),ot.needUpRightCharacterList=ca(ut.vert);var gt=oo(ut);return ot.fontSpanStyle=_u(El(_u({},gt),{maxHeight:gt.fontSize}),Kn(ut.vert)),ot}return Bt(at,[{key:"renderHorizontalNumber",value:function(ot,gt){if(!this.horizontalText)return null;var xt=this.horizontalText,Mt=this.props,kt=Mt.run,zt=Mt.vert;return this.horizontalText="",kt.prop.kumimoji&&zt===Xr.EaVert?M1.default.createElement("span",{className:D1.Text,key:gt+xt,style:_u(El(_u({},ot),{writingMode:"horizontal-tb"}),js)},xt):M1.default.createElement("span",{key:gt+xt,style:ot},M1.default.createElement("span",{className:D1.Text,style:js},xt))}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.run,Mt=gt.vert,kt=xt.runType==="tab"?" ":xt.text||" ",zt=oo(this.props),Ht=El(_u({},this.fontSpanStyle),{display:"inline-block",verticalAlign:"middle",textIndent:0});return M1.default.createElement("span",{style:_u({},zt)},kt.split("").map(function(rr,ur){return Mt===Xr.EaVert&&!Number.isNaN(parseInt(rr,10))?(ot.horizontalText+=rr,ot.horizontalText.length===2||Number.isNaN(parseInt(kt[ur+1],10))?ot.renderHorizontalNumber(ot.fontSpanStyle,ur):null):ot.needSideWayCharacterList.includes(rr)?M1.default.createElement("span",{className:D1.Text,key:ur,style:El(_u({},Ht),{transform:"rotate(90deg)",display:"inline-block"})},rr):ot.needUpRightCharacterList.includes(rr)?M1.default.createElement("span",{className:D1.Text,key:ur,style:El(_u({},Ht),{transform:"rotate(-90deg)",display:"inline-block"})},rr):M1.default.createElement("span",{className:D1.Text,key:ur,style:El(_u({},ot.fontSpanStyle),{display:"inline-block"})},rr)}))}}]),at})(M1.default.Component),jo=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"getScaleStyle",value:function(ot){var gt=ot.reduce(function(zt,Ht){return(1-Math.abs(Ht.prop.baseline))*Ht.prop.size<(1-Math.abs(zt.prop.baseline))*zt.prop.size?Ht:zt}),xt=(1-Math.abs(gt.prop.baseline))*gt.prop.size,Mt={},kt=1;return xt<12&&(kt=xt/12,Mt.transform="scale(".concat(kt,")"),Mt.transformOrigin="0 0",Mt.lineHeight="1",Mt.display="block"),{scaleStyle:Mt,transformScale:kt}}},{key:"splitRuns",value:function(ot){function gt(xt){var Mt=xt.codePointAt(0)||0;return Mt>=65&&Mt<=122}return(ot.text||"").split("").reduce(function(xt,Mt){var kt=xt[xt.length-1];if(kt===void 0)return xt.push(El(_u({},ot),{text:Mt})),xt;var zt=kt.text||"",Ht=zt[zt.length-1],rr=gt(Ht),ur=gt(Mt);return rr&&ur?kt.text="".concat(zt).concat(Mt):xt.push(El(_u({},ot),{text:Mt})),xt},[])}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.line,Mt=gt.justify,kt=gt.vert,zt=gt.lineIndent,Ht=gt.align,rr=gt.textBodyWrapResource,ur=xt,_r=this.props.uuid,Dr=!1,Br={};Mt?(Dr=!0,ur=xt.reduce(function(Ks,so){var To=so.runType==="text"?ot.splitRuns(so):[so],Oo=Ks;return Oo=Oo.concat(To),Oo},[]),Br={display:"flex",justifyContent:"space-between",width:"calc(100% - ".concat(zt||0,"px"),position:"relative",left:zt}):Br={textIndent:zt};var Ur=ur.reduce(function(Ks,so){return so.prop.lineSpacing>Ks.prop.lineSpacing?so:Ks}).prop.lineSpacing,Zr=0;ur.forEach(function(Ks){Zr+=Number(Ks.prop.width)});var Tn=_s(kt,Zr,Ur);Ht==="dist"&&kt!==Xr.Horz&&(Tn.height=rr?.prop.height);var jn=this.getScaleStyle(ur),ts=jn.scaleStyle,us=jn.transformScale,Os=El(_u(_u(_u({},Br),Tn),ts),{whiteSpace:"pre"}),Hs=this.props.withAnimation;return kt!==Xr.Horz?UC.default.createElement("div",{style:Os},ur.map(function(Ks,so){return UC.default.createElement(Co,{withAnimation:Hs,transformScale:us,vert:kt,uuid:_r,key:so,run:Ks,firstRun:so===0})})):UC.default.createElement("div",{style:Os},ur.map(function(Ks,so){return UC.default.createElement(Ws,{withAnimation:Hs,transformScale:us,isSplitRun:Dr,uuid:_r,key:so,run:Ks,firstRun:so===0})}))}}]),at})(UC.default.Component),Qo;(function(yt){yt.r="r",yt.l="l",yt.crl="ctr",yt.dist="dist",yt.just="just"})(Qo||(Qo={}));var xs=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;if(Ot(this,at),ot=ct.call(this,ut),!ut.paragraphXML||!ut.bodyPrXML)return Vt(ot);var gt=ut.bodyPrXML,xt=ut.paragraphXML;ot.runElements=xt.elements.filter(function(zt){return["a:fld","a:r","a:br","a:endParaRPr"].includes(zt.name)}),ot.biggestFontSize=Ct(ot.runElements).filter(function(zt){return zt.name==="a:r"}).map(function(zt){return zt.extraAttr.getNumber("sz",0)}).sort(function(zt,Ht){return zt-Ht})[0],ot.fontScale=.01;var Mt=gt.childElementOptional("a:normAutofit");if(Mt&&(ot.fontScale=Ey(Mt.attr.getNumber("fontScale",Ap))/100),ot.buChar=xt.extraElementWithName("bu"),ot.indent=xt.extraAttr.getNumber("indent",0),ot.marL=xt.extraAttr.getNumber("marL",0),ot.lineHeightInXml=xt.extraAttr.get("lineHeight"),typeof ot.lineHeightInXml!="number")ot.lineHeight="".concat(parseFloat(ot.lineHeightInXml)*ot.fontScale*100,"pt");else{var kt=ot.getBigestLineHeight(Ct(ot.runElements),ot.lineHeightInXml,ot.fontScale);ot.lineHeight=kt===void 0?void 0:"".concat(kt,"pt")}return ot.buClr=xt.extraAttr.getColorOptional("buClr"),ot.noneBuChar=ot.buChar===void 0||ot.buChar.name==="a:buNone",ot.paddingBottom=ot.getPaddingBottom(xt.extraAttr.getStringOptional("a:spcAft"),ot.biggestFontSize),ot.paddingBottom=ot.getPaddingTop(xt.extraAttr.getStringOptional("a:spcBef"),ot.biggestFontSize),ot.align=xt.extraAttr.getStringOptional("algn"),ot}return Bt(at,[{key:"getPaddingBottom",value:function(ot,gt){var xt=this.props,Mt=xt.isLast,kt=xt.spcFirstLastPara;return Mt&&!kt?"0pt":this.getPadding(ot,gt)}},{key:"getPaddingTop",value:function(ot,gt){var xt=this.props,Mt=xt.isFirst,kt=xt.spcFirstLastPara;return Mt&&!kt?"0pt":this.getPadding(ot,gt)}},{key:"getPadding",value:function(ot,gt){if(ot){if(ot.indexOf("pt")!==-1)return ot;if(gt)return"".concat(gt*parseFloat(ot)/100,"pt")}return"0pt"}},{key:"getBigestLineHeight",value:function(ot,gt,xt){var Mt;return ot.forEach(function(kt){switch(kt.name){case"a:fld":case"a:r":case"a:br":case"a:endParaRPr":{var zt=kt.extraAttr.getNumber("sz",0)*1.2*gt*xt;(Mt===void 0||Mt<zt)&&(Mt=zt)}}}),Mt}},{key:"isFlexSpaceBetween",value:function(ot,gt,xt){return ot===Qo.dist?!0:ot===Qo.just&&gt!==xt-1}},{key:"renderWrapParagraph",value:function(ot){var gt=this.props,xt=gt.paragraphWrapResource,Mt=gt.bulletInfo,kt=gt.vert,zt=xt,Ht=zt.prop,rr=Ht.spaceBefore,ur=Ht.spaceAfter,_r=Ht.firstLineIndent,Dr=zt.prop,Br=Dr.align,Ur=Dr.bulletChar,Zr=Dr.indent,Tn=Dr.marginLeft,jn=Dr.marginRight;if(ot.length===0&&zt.endParagraphRunProp){var ts=zt.endParagraphRunProp,us=ts.spaceBefore,Os=ts.spaceAfter;rr=us,ur=Os}Mt.order===0&&(rr=0),Mt.order+1===Mt.count&&(ur=0);var Hs=Cs(kt,{marginLeft:Tn,marginRight:jn,marginTop:rr,marginBottom:ur}),Ks=El(_u({textAlign:Lt(Br),position:"relative",fontSize:"0",lineHeight:"0"},Hs),{whiteSpace:"pre"});return _r===void 0&&(_r=Math.max(Zr,-Tn),Ur&&(_r=Zr>=0?Zr:Math.max(0,-(Tn+Zr)))),T1.default.createElement("div",{className:D1.Paragraph,style:Ks},Ur&&this.renderBulletCharNode(ot),this.renderLines(ot,_r,Br))}},{key:"renderBulletCharNode",value:function(ot){var gt,xt=this.props,Mt=xt.paragraphWrapResource,kt=xt.bulletInfo,zt=xt.vert,Ht=Mt,rr=Ht.prop,ur=rr.bulletChar,_r=rr.indent;if(ur){var Dr=ot.length===0,Br=kt.number,Ur=ot.slice(0,1),Zr=Ur[0]&&Ur[0][0],Tn=ur.colorFollowText&&Zr?(gt=Zr.prop.fillType)==null?void 0:gt.color:ur.color,jn=ur.fontFollowText&&Zr?Zr.prop.font:ur.font,ts=ur.sizeFollowText&&Zr?Zr.prop.size:ur.size,us=Zr?"".concat(Zr.prop.lineSpacing,"px"):void 0,Os=ur.autoNumber!==void 0&&ur.autoNumberType!==void 0,Hs=_r>=0?0:_r,Ks="";Dr||(Os&&Br&&(Ks=Ir(Br,ur.autoNumberType)),Os||(Ks+=lr(ur.character||"l")));var so={position:"absolute",fontFamily:jn,fontSize:ts,textIndent:Hs,color:Tn,lineHeight:us};return zt===Xr.EaVert&&(so.textOrientation="sideways"),T1.default.createElement("div",{style:so},Ks)}}},{key:"renderLines",value:function(ot,gt,xt){var Mt=this,kt=this.props,zt=kt.paragraphWrapResource,Ht=kt.uuid,rr=kt.vert,ur=kt.withAnimation,_r=kt.textBodyWrapResource;if(ot.length===0){var Dr={},Br=zt.endParagraphRunProp?zt.endParagraphRunProp.lineSpacing:void 0,Ur=zt.endParagraphRunProp?zt.endParagraphRunProp.size:void 0,Zr;if(Ur&&Ur<12){var Tn=Ur/12;Ur=12,Br=Br?Br*Tn:void 0,Zr="scale(".concat(Tn,")"),Dr.display="inline-block"}return Dr.lineHeight="".concat(Br,"px"),Dr.fontSize="".concat(Ur,"px"),Dr.transform=Zr,T1.default.createElement("span",{style:{lineHeight:"".concat(Br,"px"),fontSize:"".concat(Ur,"px"),transform:Zr}},T1.default.createElement("br",null))}return ot.map(function(jn,ts){return T1.default.createElement(jo,{key:ts,withAnimation:ur,uuid:Ht,vert:rr,lineIndent:ts===0?gt:void 0,line:jn,align:xt,textBodyWrapResource:_r,justify:Mt.isFlexSpaceBetween(xt,ts,ot.length)})})}},{key:"renderRunOrBrOrEnd",value:function(ot,gt,xt,Mt,kt,zt,Ht,rr,ur){var _r=this.props,Dr=_r.isTextWrap,Br=_r.slideContext;return T1.default.createElement(Lr,{key:"".concat(gt,"-").concat(xt),isTextWrap:Dr,paragraphHasRange:rr!==void 0,rNodeOrBrNode:ot,fontScale:Mt,runIndex:xt,indent:xt===0&&this.noneBuChar&&this.marL!==0?zt:void 0,slideIndex:Br.slideIndex,prevElement:ur,lineHeight:kt,align:this.align?this.align:"l",lastRunInParagraph:Ht})}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.paragraphXML,Mt=gt.resourceType,kt=gt.paragraphIndex,zt=gt.paragraphWrapResource,Ht=gt.firstRangeXML,rr=gt.buIndexCounter,ur=gt.isTextWrap,_r=xt?.extraAttr.getBoolean("placeHolderType");if(Mt!=="slide"&&_r)return T1.default.createElement("div",{key:"".concat(kt)});if(zt)return this.renderWrapParagraph(zt.lines);if(!xt)return null;var Dr,Br=Lt(this.align),Ur=this.runElements.map(function(Hs,Ks){var so=Br==="left"&&Ks===ot.runElements.length-1,To=ot.renderRunOrBrOrEnd(Hs,kt,Ks,ot.fontScale,ot.lineHeightInXml,ot.indent,so,Ht,Dr);return Dr=Hs,To}),Zr=0;if(Ht){if(this.buChar&&this.buChar.name!=="a:buNone"){var Tn=Ht.extraAttr.getNumber("sz",0),jn=Ht.extraAttr.getString("fontType","");Ur.unshift(T1.default.createElement("span",{key:"bu-".concat(Zr+=1),style:{display:"inline-block",position:"absolute",color:this.buClr!==void 0?Zl(this.buClr):Zl(Ht.extraAttr.getColorOptional("color")),fontSize:"".concat(Tn*this.fontScale,"pt"),lineHeight:this.lineHeight,fontFamily:jn,textIndent:gu(this.indent)}},T1.default.createElement(Yt,{paragraphXML:xt,firstRangeXML:Ht,buXML:this.buChar,buIndexCounter:rr})))}}else{var ts=0,us=xt.childElementOptional("a:endParaRPr");if(us){var Os=us.extraAttr.getNumberOptional("sz");ts=Os===void 0?0:Os}else ts=xt.extraAttr.getNumber("sz",0);Ur.push(T1.default.createElement("span",{key:"end-".concat(Zr+=1),style:{display:"block",lineHeight:this.lineHeight,fontSize:"".concat(ts*this.fontScale,"pt")}},T1.default.createElement("br",null)))}return this.buChar&&this.buChar.name==="a:buNone"&&rr.reset(),T1.default.createElement("li",{key:"".concat(kt),className:"".concat(D1.Paragraph," Paragraph-").concat(kt),style:{whiteSpace:ur?"normal":"nowrap",paddingTop:this.paddingTop,paddingBottom:this.paddingBottom,marginLeft:gu(xt.extraAttr.getNumber("marL",0)),marginRight:gu(xt.extraAttr.getNumber("marR",0)),lineHeight:"1pt",listStyleType:"none",textAlign:Br}},Ur)}}]),at})(T1.default.Component),Ms={"*/":function(ct,at,ut){return ct*at/ut},"+-":function(ct,at,ut){return ct+at-ut},"+/":function(ct,at,ut){return(ct+at)/ut},"?:":function(ct,at,ut){return ct>0?at:ut},abs:function(ct){return Math.abs(ct)},at2:function(ct,at){return _o(Math.atan2(at,ct))},cat2:function(ct,at,ut){return ct*Math.cos(Math.atan2(ut,at))},cos:function(ct,at){return ct*Math.cos(Io(at))},max:function(ct,at){return ct>at?ct:at},min:function(ct,at){return ct<at?ct:at},mod:function(ct,at,ut){return Math.sqrt(Math.pow(ct,2)+Math.pow(at,2)+Math.pow(ut,2))},pin:function(ct,at,ut){return at<ct?ct:at>ut?ut:at},sat2:function(ct,at,ut){return ct*Math.sin(Math.atan2(ut,at))},sin:function(ct,at){return ct*Math.sin(Io(at))},sqrt:function(ct){return Math.sqrt(ct)},tan:function(ct,at){return ct*Math.tan(Io(at))},val:function(ct){return ct}};function Io(yt){return yt/J_*(Math.PI/180)}function _o(yt){return yt*(180/Math.PI)*J_}var Ys=(function(){function yt(ct){Ot(this,yt),this.expr=ct}return Bt(yt,[{key:"standardizationTokenSplit",value:function(at){return at.replace(/\s+/g," ")}},{key:"eval",value:function(at){var ut=this.standardizationTokenSplit(this.expr).split(" "),ot=ut.slice(1,ut.length).map(function(gt){return Number.isNaN(Number(gt))?at.getRequiredVariable(gt):parseInt(gt,10)});if(Ms[ut[0]]===void 0)throw new Error("Formula ".concat(ut[0]," not supported"));return Ms[ut[0]].apply(Ms,Ct(ot))}}],[{key:"deconstructShapeGuide",value:function(at){var ut=at.split(" "),ot=nt(ut),gt=ot[0],xt=ot.slice(1),Mt=xt.map(function(kt){return parseInt(kt,10)});return Ms[gt].apply(Ms,Ct(Mt))}}]),yt})();function zo(yt,ct){return Jo.apply(this,arguments)}function Jo(){return Jo=ht(regeneratorRuntime.mark(function yt(ct,at){var ut,ot;return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,go(ct,void 0,at,5e3);case 2:if(ut=xt.sent,ut.status===200){xt.next=8;break}return xt.next=6,ut.text();case 6:throw ot=xt.sent,$s(ct,ut.status,at,new Error(ot)).then(function(){},function(){}),new Error("fetch ".concat(ct," failed with ").concat(ut.status));case 8:return xt.next=10,ut.text();case 10:return xt.abrupt("return",xt.sent);case 11:case"end":return xt.stop()}},yt)})),Jo.apply(this,arguments)}function mo(yt,ct){return fs.apply(this,arguments)}function fs(){return fs=ht(regeneratorRuntime.mark(function yt(ct,at){var ut,ot;return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,go(ct,{headers:{"content-type":"application/json",Accept:"application/json"}},at,5e3);case 2:if(ut=xt.sent,ut.status===200){xt.next=8;break}return xt.next=6,ut.text();case 6:throw ot=xt.sent,$s(ct,ut.status,at,new Error(ot)).then(function(){},function(){}),new Error("fetch ".concat(ct," failed with ").concat(ut.status));case 8:return xt.next=10,ut.json();case 10:return xt.abrupt("return",xt.sent);case 11:case"end":return xt.stop()}},yt)})),fs.apply(this,arguments)}function $s(yt,ct,at,ut){return lo.apply(this,arguments)}function lo(){return lo=ht(regeneratorRuntime.mark(function yt(ct,at,ut,ot){return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:window&&window.postMessage({name:"pptDataLoadError",src:ct,event:"PPT data load failed",status:at},"*"),ut?.error("fetch ".concat(JSON.stringify(ct)," failed with ").concat(at," : "),ot);case 1:case"end":return xt.stop()}},yt)})),lo.apply(this,arguments)}function go(yt,ct,at,ut){return Qs.apply(this,arguments)}function Qs(){return Qs=ht(regeneratorRuntime.mark(function yt(ct,at,ut,ot){var gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return gt=setTimeout(function(){ut?.warn("fetch ".concat(ct," for ").concat(ot,"ms"))},ot),kt.prev=1,kt.next=4,fetch(ct,_u({},at));case 4:return xt=kt.sent,kt.abrupt("return",(clearTimeout(gt),xt));case 8:throw kt.prev=8,kt.t0=kt.catch(1),clearTimeout(gt),ut?.error("fetch ".concat(ct," with error ").concat(kt.t0)),kt.t0;case 11:case"end":return kt.stop()}},yt,null,[[1,8]])})),Qs.apply(this,arguments)}var Lo=(function(){function yt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"keyval-store",at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"keyval";Ot(this,yt),this.storeName=at,this._dbp=new Promise(function(ut,ot){var gt=indexedDB.open(ct,1);gt.onerror=function(){return ot(gt.error)},gt.onsuccess=function(){return ut(gt.result)},gt.onupgradeneeded=function(){gt.result.createObjectStore(at)}})}return Bt(yt,[{key:"_withIDBStore",value:function(at,ut){var ot=this;return this._dbp.then(function(gt){return new Promise(function(xt,Mt){var kt=gt.transaction(ot.storeName,at);kt.oncomplete=function(){return xt()},kt.onabort=kt.onerror=function(){return Mt(kt.error)},ut(kt.objectStore(ot.storeName))})})}}]),yt})(),Cu;function Du(){return Cu||(Cu=new Lo),Cu}function Mu(yt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Du(),at;return ct._withIDBStore("readonly",function(ut){at=ut.get(yt)}).then(function(){return at.result})}function Xl(yt,ct){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Du();return at._withIDBStore("readwrite",function(ut){ut.put(ct,yt)})}var oy=(function(){function yt(){Ot(this,yt),this.attributePickers={},this.childPickers={}}return Bt(yt,[{key:"createPickers",value:function(){return new t1(this.attributePickers,this.childPickers)}},{key:"bindAttributePicker",value:function(at,ut,ot){this.bindPicker(at,ut,ot,this.attributePickers)}},{key:"bindChildPicker",value:function(at,ut,ot){this.bindPicker(at,ut,ot,this.childPickers)}},{key:"bindPicker",value:function(at,ut,ot,gt){typeof at=="string"&&(at=[at]),typeof ut=="string"&&(ut=[ut]);var xt=Jt(at),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;this.bindPickerWithAttributeNames(kt,ut,ot,gt)}}catch(zt){xt.e(zt)}finally{xt.f()}}},{key:"bindPickerWithAttributeNames",value:function(at,ut,ot,gt){var xt=gt[at];if(xt||(xt=gt[at]={}),tr(xt)=="object"){var Mt=Jt(ut),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;xt[zt]=ot}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}}}}]),yt})(),_m=(function(){function yt(ct){Ot(this,yt),this.pickers=ct}return Bt(yt,[{key:"forEach",value:function(at,ut){var ot=this.pickers[at];if(ot)for(var gt in ot)gt!=="*"&&ut(gt)}},{key:"has",value:function(at,ut){var ot=this.pickers[at];return ot?ut in ot||"*"in ot:!1}},{key:"get",value:function(at,ut,ot,gt,xt,Mt){var kt=this.pickers[ut];if(kt){var zt=kt[ot];if(zt||(zt=kt["*"]),zt)return zt(gt,at,ot,xt,Mt)}}}]),yt})(),t1=(function(){function yt(ct,at){Ot(this,yt),this.attributePickers=new _m(ct),this.childPickers=new _m(at)}return Bt(yt,[{key:"forEachAttributes",value:function(at,ut){this.attributePickers.forEach(at,ut)}},{key:"hasAttribute",value:function(at,ut){return this.attributePickers.has(at,ut)}},{key:"getAttribute",value:function(at,ut,ot,gt,xt){if(this.context)return this.attributePickers.get(this.context,at,ut,ot,gt,xt)}},{key:"getChild",value:function(at,ut,ot,gt,xt){if(this.context)return this.childPickers.get(this.context,at,ut,ot,gt,xt)}}]),yt})(),iT=(function(){function yt(ct){Ot(this,yt),this.resourceScheme=ct}return Bt(yt,[{key:"loadLumiaPSD",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(Mt="https://convertcdn.netless.link/publicFiles/xml/PresetShapeDefinitions.xml",this.resourceScheme&&(Mt=Mt.replace(/^[a-zA-z]+[^://]/,this.resourceScheme)),ot!==!1){zt.next=8;break}return zt.next=5,zo(Mt,gt);case 5:xt=zt.sent,zt.next=18;break;case 8:return zt.next=10,Mu("PresetShapeDefinitions");case 10:if(xt=zt.sent,zt.t0=xt===void 0,!zt.t0){zt.next=18;break}return zt.next=15,zo(Mt,gt);case 15:return xt=zt.sent,zt.next=18,Xl("PresetShapeDefinitions",xt);case 18:yt.presetShapeDefinitons=new tx("slide").parse(xt).childElement("presetShapeDefinitons");case 19:case"end":return zt.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"preLoad",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt){var kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,this.fetchAllResourceUrl(gt,xt,Mt.logger);case 2:kt=_r.sent,zt=0;case 4:if(!(zt<kt.length)){_r.next=12;break}return Ht=zt+1,rr=kt[zt],_r.next=8,this.prefetchPageResource(rr);case 8:Mt.preloadProgress&&Mt.preloadProgress((Ht/kt.length).toFixed(2));case 9:zt++,_r.next=4;break;case 12:case"end":return _r.stop()}},ut,this)}));function at(ut,ot,gt,xt){return ct.apply(this,arguments)}return at})()},{key:"prefetchPageResource",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:for(gt=[],xt=0,Mt=Object.keys(ot);xt<Mt.length;xt++)kt=Mt[xt],gt.push(this.prefetchResource(ot[kt]));return Ht.next=4,Promise.all(gt);case 4:case"end":return Ht.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"prefetchResource",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:if(!(Object.keys(ot).length>0)){_r.next=15;break}gt=Object.keys(ot),xt=[],Mt=0,kt=gt;case 3:if(!(Mt<kt.length)){_r.next=13;break}if(zt=kt[Mt],Ht=ot[zt],!Ht.endsWith(".mp4")){_r.next=8;break}return _r.abrupt("continue",10);case 8:rr=Ht,this.resourceScheme&&(rr=Ht.replace(/^[a-zA-z]+[^://]/,this.resourceScheme)),xt.push(this.fetch(rr));case 10:Mt++,_r.next=3;break;case 13:return _r.next=15,Promise.all(xt);case 15:case"end":return _r.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"fetch",value:(function(ct){function at(ut){return ct.apply(this,arguments)}return at.toString=function(){return ct.toString()},at})((function(){var ct=ht(regeneratorRuntime.mark(function at(ut){return regeneratorRuntime.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.prev=0,gt.next=3,fetch(ut);case 3:gt.next=8;break;case 5:gt.prev=5,gt.t0=gt.catch(0),console.debug("cache fail",gt.t0);case 8:case"end":return gt.stop()}},at,null,[[0,5]])}));return function(at){return ct.apply(this,arguments)}})())},{key:"fetchAllResourceUrl",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:for(Mt=[],kt=1;kt<=gt;kt++)Mt.push(mo("".concat(ot,"/resources/resource").concat(kt,".json"),xt));return Ht.next=4,Promise.all(Mt);case 4:return Ht.abrupt("return",Ht.sent);case 5:case"end":return Ht.stop()}},ut)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"fetchPageResource",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,mo("".concat(ot,"/resources/resource").concat(gt,".json"),xt);case 2:return kt.abrupt("return",kt.sent);case 3:case"end":return kt.stop()}},ut)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()}]),yt})(),SA=(function(){function yt(ct){Ot(this,yt),this.foundStartPostion=!1,this.variablesMap=ct,this.injectConstant()}return Bt(yt,[{key:"injectConstant",value:function(){this.setVariable("3cd4",162e5),this.setVariable("3cd8",81e5),this.setVariable("5cd8",135e5),this.setVariable("7cd8",189e5),this.setVariable("b",new Ys("val h").eval(this)),this.setVariable("cd2",108e5),this.setVariable("cd4",54e5),this.setVariable("cd8",27e5),this.setVariable("hc",new Ys("*/ w 1.0 2.0").eval(this)),this.setVariable("hd2",new Ys("*/ h 1.0 2.0").eval(this)),this.setVariable("hd3",new Ys("*/ h 1.0 3.0").eval(this)),this.setVariable("hd4",new Ys("*/ h 1.0 4.0").eval(this)),this.setVariable("hd5",new Ys("*/ h 1.0 5.0").eval(this)),this.setVariable("hd6",new Ys("*/ h 1.0 6.0").eval(this)),this.setVariable("hd8",new Ys("*/ h 1.0 8.0").eval(this)),this.setVariable("l",0),this.setVariable("ls",new Ys("max w h").eval(this)),this.setVariable("r",new Ys("val w").eval(this)),this.setVariable("ss",new Ys("min w h").eval(this)),this.setVariable("ssd2",new Ys("*/ ss 1.0 2.0").eval(this)),this.setVariable("ssd4",new Ys("*/ ss 1.0 4.0").eval(this)),this.setVariable("ssd6",new Ys("*/ ss 1.0 6.0").eval(this)),this.setVariable("ssd8",new Ys("*/ ss 1.0 8.0").eval(this)),this.setVariable("ssd16",new Ys("*/ ss 1.0 16.0").eval(this)),this.setVariable("ssd32",new Ys("*/ ss 1.0 32.0").eval(this)),this.setVariable("t",0),this.setVariable("vc",new Ys("*/ h 1.0 2.0").eval(this)),this.setVariable("wd2",new Ys("*/ w 1.0 2.0").eval(this)),this.setVariable("wd3",new Ys("*/ w 1.0 3.0").eval(this)),this.setVariable("wd4",new Ys("*/ w 1.0 4.0").eval(this)),this.setVariable("wd5",new Ys("*/ w 1.0 5.0").eval(this)),this.setVariable("wd6",new Ys("*/ w 1.0 6.0").eval(this)),this.setVariable("wd8",new Ys("*/ w 1.0 8.0").eval(this)),this.setVariable("wd10",new Ys("*/ w 1.0 10.0").eval(this)),this.setVariable("wd12",new Ys("*/ w 1.0 12.0").eval(this)),this.setVariable("wd32",new Ys("*/ w 1.0 32.0").eval(this))}},{key:"getVariable",value:function(at,ut){return this.variablesMap[at]!==void 0?this.variablesMap[at]:ut}},{key:"getRequiredVariable",value:function(at){if(this.variablesMap[at]!==void 0)return this.variablesMap[at];throw new Error("".concat(at," is required"))}},{key:"setVariable",value:function(at,ut){this.variablesMap[at]=ut}},{key:"setVariableIfNotExist",value:function(at,ut){this.variablesMap[at]===void 0&&(this.variablesMap[at]=ut)}},{key:"isNumeric",value:function(at){return/^-{0,1}\d+$/.test(at)}},{key:"accessValue",value:function(at){var ut;return this.isNumeric(at)?ut=parseInt(at,10):ut=this.getRequiredVariable(at),ut}},{key:"setLatestPostion",value:function(at,ut){this.latestPostionX=at,this.latestPostionY=ut,this.foundStartPostion||(this.startPostionX=at,this.startPostionY=ut,this.foundStartPostion=!0)}},{key:"getLatestPostion",value:function(){return{x:this.latestPostionX,y:this.latestPostionY}}},{key:"getStartPostion",value:function(){return{x:this.startPostionX,y:this.startPostionY}}},{key:"inspect",value:function(){console.debug(JSON.stringify(this.variablesMap))}}]),yt})(),wA=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"renderLumiaPath",value:function(at,ut){var ot=this,gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",xt=at.childElementOptional("".concat(gt,"avLst"));xt&&xt.elementsWithName("".concat(gt,"gd")).forEach(function(rr){var ur=rr.attr.getString("fmla"),_r=new Ys(ur).eval(ut),Dr=rr.attr.getString("name");ut.setVariableIfNotExist(Dr,_r)});var Mt=at.childElementOptional("".concat(gt,"gdLst"));Mt&&Mt.elementsWithName("".concat(gt,"gd")).forEach(function(rr){var ur=rr.attr.getString("fmla"),_r=new Ys(ur).eval(ut),Dr=rr.attr.getString("name");ut.setVariable(Dr,_r)});var kt=at.childElementOptional("".concat(gt,"rect"));kt?(ut.setVariable("rectLeft",ut.accessValue(kt.attr.getString("l"))),ut.setVariable("rectTop",ut.accessValue(kt.attr.getString("t"))),ut.setVariable("rectRight",ut.accessValue(kt.attr.getString("r"))),ut.setVariable("rectBottom",ut.accessValue(kt.attr.getString("b")))):(ut.setVariable("rectLeft",ut.accessValue("l")),ut.setVariable("rectTop",ut.accessValue("t")),ut.setVariable("rectRight",ut.accessValue("r")),ut.setVariable("rectBottom",ut.accessValue("b")));var zt=at.childElement("".concat(gt,"pathLst")).elementsWithName("".concat(gt,"path")),Ht=[];return zt.forEach(function(rr){var ur,_r={fill:void 0,pathD:"",isBorder:(ur=rr.attr.getBooleanOptional("stroke"))!=null?ur:!0};_r.fill=rr.attr.getStringOptional("fill")||void 0;var Dr=ot.calcPathScale(rr,ut),Br=Dr.pathWidthScale,Ur=Dr.pathHeightScale,Zr=rr.elements.map(function(Tn){return new R_(Tn,gt,Br,Ur).generate(ut)});_r.pathD=Zr.join(" "),Ht.push(_r)}),Ht}},{key:"calcPathScale",value:function(at,ut){var ot=at.attr.getNumberOptional("w"),gt=at.attr.getNumberOptional("h"),xt=1,Mt=1;return ot&&(xt=ut.accessValue("w")/ot),gt&&(Mt=ut.accessValue("h")/gt),{pathWidthScale:xt,pathHeightScale:Mt}}}]),yt})(),R_=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.actionXML=ct,this.namespace=at,this.pathWidthScale=ut,this.pathHeightScale=ot}return Bt(yt,[{key:"xUnitTransformAndPathScale",value:function(at){return at*this.pathWidthScale/n_}},{key:"yUnitTransformAndPathScale",value:function(at){return at*this.pathHeightScale/n_}},{key:"generate",value:function(at){var ut=this,ot=this.actionXML.elementsWithName("".concat(this.namespace,"pt")).map(function(jn){return{x:jn.attr.getString("x"),y:jn.attr.getString("y")}}).map(function(jn){var ts=ut.getPtValue(jn,at,"x"),us=ut.getPtValue(jn,at,"y");return{x:ts,y:us}}),gt=ot.length>0?ot[0].x:0,xt=ot.length>0?ot[0].y:0,Mt=ot.length>1?ot[1].x:0,kt=ot.length>1?ot[1].y:0,zt=ot.length>2?ot[2].x:0,Ht=ot.length>2?ot[2].y:0;switch(this.actionXML.name){case"".concat(this.namespace,"moveTo"):return at.setLatestPostion(gt,xt),["M",this.xUnitTransformAndPathScale(gt),this.yUnitTransformAndPathScale(xt)].join(" ");case"".concat(this.namespace,"lnTo"):return at.setLatestPostion(gt,xt),["L",this.xUnitTransformAndPathScale(gt),this.yUnitTransformAndPathScale(xt)].join(" ");case"".concat(this.namespace,"arcTo"):{var rr=at.accessValue(this.actionXML.attr.getString("wR")),ur=at.accessValue(this.actionXML.attr.getString("hR")),_r=at.accessValue(this.actionXML.attr.getString("stAng"))/J_,Dr=at.accessValue(this.actionXML.attr.getString("swAng"))/J_,Br=at.getLatestPostion(),Ur=Br.x,Zr=Br.y,Tn=this.getSvgArc(rr,ur,_r,Dr,Ur,Zr);return Dr>=360?(at.setLatestPostion(Tn.endX,Tn.endY),["A",this.xUnitTransformAndPathScale(Tn.radiusX),this.yUnitTransformAndPathScale(Tn.radiusY),Tn.xAxisRotation,Tn.largeArcFlag,Tn.sweepFlag,this.xUnitTransformAndPathScale(Tn.middleX),this.yUnitTransformAndPathScale(Tn.middleY),"A",this.xUnitTransformAndPathScale(Tn.radiusX),this.yUnitTransformAndPathScale(Tn.radiusY),Tn.xAxisRotation,Tn.largeArcFlag,Tn.sweepFlag,this.xUnitTransformAndPathScale(Tn.endX),this.yUnitTransformAndPathScale(Tn.endY)].join(" ")):(at.setLatestPostion(Tn.endX,Tn.endY),["A",this.xUnitTransformAndPathScale(Tn.radiusX),this.yUnitTransformAndPathScale(Tn.radiusY),Tn.xAxisRotation,Tn.largeArcFlag,Tn.sweepFlag,this.xUnitTransformAndPathScale(Tn.endX),this.yUnitTransformAndPathScale(Tn.endY)].join(" "))}case"".concat(this.namespace,"cubicBezTo"):return at.setLatestPostion(zt,Ht),["C",this.xUnitTransformAndPathScale(gt),this.yUnitTransformAndPathScale(xt),this.xUnitTransformAndPathScale(Mt),this.yUnitTransformAndPathScale(kt),this.xUnitTransformAndPathScale(zt),this.yUnitTransformAndPathScale(Ht)].join(" ");case"".concat(this.namespace,"quadBezTo"):return at.setLatestPostion(ot[1].x,ot[1].y),["Q",this.xUnitTransformAndPathScale(gt),this.yUnitTransformAndPathScale(xt),this.xUnitTransformAndPathScale(Mt),this.yUnitTransformAndPathScale(kt)].join(" ");case"".concat(this.namespace,"close"):return at.setLatestPostion(at.getStartPostion().x,at.getStartPostion().y),"Z";default:throw new Error("unknow ".concat(this.actionXML.name))}}},{key:"getPtValue",value:function(at,ut,ot){return ut.accessValue(at[ot])}},{key:"getSvgArc",value:function(at,ut,ot,gt,xt,Mt){var kt=at,zt=ut,Ht,rr,ur,_r,Dr;if(gt===0)Ht=xt,rr=Mt,Dr=0;else if(gt>=360)Ht=xt,rr=Mt,ur=xt+2*at*Math.abs(Math.cos(-ot/180*Math.PI)),_r=Mt+2*ut*Math.sin(-ot/180*Math.PI),Dr=1;else{var Br=-ot,Ur=-(ot+gt),Zr=this.getCoordinateOnEllipse(Br,kt,zt),Tn=Zr.x,jn=Zr.y,ts=xt-Tn,us=Mt+jn,Os=this.getCoordinateOnEllipse(Ur,kt,zt),Hs=Os.x,Ks=Os.y;Ht=Hs+ts,rr=us-Ks,gt>=-360&&gt<-180?Dr=1:gt>=-180&&gt<0||gt>0&&gt<180?Dr=0:Dr=1}return{radiusX:kt,radiusY:zt,xAxisRotation:0,largeArcFlag:Dr,sweepFlag:gt>0?1:0,endX:Ht,endY:rr,middleX:ur,middleY:_r}}},{key:"getCoordinateOnEllipse",value:function(at,ut,ot){var gt,xt,Mt=at%360;if(Mt%180==0)gt=Math.cos(Mt*(Math.PI/180))*ut,xt=0;else if(Mt%90==0)gt=0,xt=Math.sin(Mt*(Math.PI/180))*ot;else{var kt=this.getTanDeg(Mt);gt=ut*ot/Math.sqrt(Math.pow(ot,2)+Math.pow(ut*kt,2)),(Mt>90&&Mt<270||Mt<-90&&Mt>-270)&&(gt=-gt),xt=kt*gt}return{x:gt,y:xt}}},{key:"getTanDeg",value:function(at){var ut=at*Math.PI/180;return Math.tan(ut)}}]),yt})();function B0(yt){return iT.presetShapeDefinitons.childElementOptional(yt)||(console.warn("".concat(yt," not include preset shape.")),iT.presetShapeDefinitons.childElement("rect"))}var cu;(function(yt){yt[yt.none=0]="none",yt[yt.triangle=1]="triangle",yt[yt.stealth=2]="stealth",yt[yt.diamond=3]="diamond",yt[yt.oval=4]="oval",yt[yt.arrow=5]="arrow"})(cu||(cu={}));function xR(yt){switch(yt){case"none":return 0;case"triangle":return 1;case"stealth":return 2;case"diamond":return 3;case"oval":return 4;case"arrow":return 5;default:return 0}}var SR=10*1e3,Qy=(function(){function yt(ct){Ot(this,yt),this.logger=ct}return Bt(yt,[{key:"createMonitor",value:function(){return new lN(this.logger).ref}}]),yt})(),lN=(function(){function yt(ct){var at=this;Ot(this,yt),this.logger=ct,this.image=null,this.timer=null,this.beginTimestamp=0,this.ref=function(ut){ut?at.bindImage(ut):at.releaseImage()},this.onLoad=function(){at.beginTimestamp!==0&&(at.beginTimestamp=0,at.clearTimer())},this.onError=function(ut){var ot;if(at.beginTimestamp!==0){at.beginTimestamp=0,at.clearTimer();var gt;typeof ut=="string"?gt=new Error(ut):gt=new Error("".concat(ut.message)),(ot=at.logger)==null||ot.error("loading image ".concat(at.getImageUrl()," with error: ").concat(gt))}},this.onTimeout=function(){var ut;at.beginTimestamp=0,(ut=at.logger)==null||ut.warn("loading image ".concat(at.getImageUrl()," timeout for ").concat(SR,"ms"))},this.getImageUrl=function(){var ut,ot,gt;return at.image&&at.image instanceof SVGImageElement?gt=(ut=at.image)==null?void 0:ut.href.animVal:gt=(ot=at.image)==null?void 0:ot.src,gt}}return Bt(yt,[{key:"bindImage",value:function(at){at.onload=this.onLoad,at.onerror=this.onError,this.image=at,this.timer=setTimeout(this.onTimeout,SR),this.beginTimestamp=Date.now()}},{key:"releaseImage",value:function(){this.image&&(this.image.onload=null,this.image.onerror=null,this.image=null,this.beginTimestamp=0,this.clearTimer())}},{key:"clearTimer",value:function(){this.timer!==null&&clearTimeout(this.timer)}}]),yt})(),cN="other",TA="body";function wR(yt){switch(yt){case"title":case"ctrTitle":return!0;default:return!1}}function aw(yt,ct,at){var ut=dN(yt),ot=!0;if(at==="master"){var gt=rE(yt);if(!gt)return ot=!1,{allShape:[yt],masterStyleXML:WC(ct),isTextBox:ut,hasPlaceHolder:ot};var xt=gt.type||TA,Mt=HC(xt,ct,ut);return{placeHolderType:xt,masterShape:yt,masterStyleXML:Mt,allShape:[yt],isTextBox:ut,hasPlaceHolder:ot}}else if(at==="layout"){var kt=rE(yt);if(!kt)return ot=!1,{allShape:[yt],masterStyleXML:WC(ct),isTextBox:ut,hasPlaceHolder:ot};var zt=kt.type||TA,Ht=zM(zt),rr=ct.masterIndex.typeIndex[Ht],ur=[yt];rr&&ur.push(rr);var _r=HC(Ht,ct,ut);return{allShape:ur,placeHolderType:Ht,layoutShape:yt,masterShape:rr,masterStyleXML:_r,isTextBox:ut,hasPlaceHolder:ot}}else{var Dr=rE(yt);if(!Dr)return ot=!1,{allShape:[yt],masterStyleXML:WC(ct),isTextBox:ut,hasPlaceHolder:ot};tE(Dr)&&(Dr.idx="1");var Br;if(Dr.idx?(Br=ct.layoutIndex.idxIndex[Dr.idx],Dr.type&&Br===void 0&&(Br=ct.layoutIndex.typeIndex[Dr.type])):Dr.type&&(Br=ct.layoutIndex.typeIndex[Dr.type]),Br){var Ur=rE(Br);if(Ur){var Zr=Ur.type||TA,Tn=zM(Zr),jn=ct.masterIndex.typeIndex[Tn],ts=[yt];Br&&ts.push(Br),jn&&ts.push(jn);var us=HC(Tn,ct,ut);return{allShape:ts,placeHolderType:Tn,layoutShape:Br,masterShape:jn,masterStyleXML:us,isTextBox:ut,hasPlaceHolder:ot}}else throw new Error("layout ph not existed.")}else{var Os=Dr.type||TA,Hs=zM(Os),Ks=ct.masterIndex.typeIndex[Hs],so=[yt];Ks&&so.push(Ks);var To=HC(Hs,ct,ut);return{allShape:so,placeHolderType:Hs,layoutShape:yt,masterShape:Ks,masterStyleXML:To,isTextBox:ut,hasPlaceHolder:ot}}}}function dN(yt){var ct=!1,at=yt.childElementOptional("p:nvSpPr");return at&&at.childElement("p:cNvSpPr").attr.getBooleanOptional("txBox")&&(ct=!0),ct}function tE(yt){return yt!==void 0&&yt.idx!==void 0&&yt.idx==="4294967295"}function rE(yt){if(yt){var ct=yt.childElementOptional(new Np("p:nvSpPr","p:nvCxnSpPr"));if(ct){var at=ct.childElementOptional("p:nvPr","p:ph");if(at){var ut=at.attr.getStringOptional("idx"),ot=at.attr.getStringOptional("type");return(ot==="title"||ot==="ctrTitle")&&(ut=ut||"0"),{idx:ut,type:ot}}}}}function HC(yt,ct,at){if(ct.masterIndex.txStyle){var ut=ct.masterIndex.txStyle[yt];return ut||(at?ut=ct.masterIndex.txStyle[TA]:ut=ct.masterIndex.txStyle[cN]),ut}}function WC(yt){return yt.main.childElementOptional("p:presentation","p:defaultTextStyle")}function zM(yt){switch(yt){case"ctrTitle":case"title":return"title";case"dt":return"dt";case"ftr":return"ftr";case"sldNum":return"sldNum";default:return"body"}}var nE=12700/2;function Us(yt){yt.bindChildPicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"a:prstGeom",Hl),yt.bindChildPicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"a:custGeom",Hl),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"fillColor",Eu),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"borderWidth",ul),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"borderType",Vp),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"borderColor",Sp),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:grpSp"],"borderStrokeDashArray",Ul),yt.bindAttributePicker("p:sp","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvSpPr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:cxnSp","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvCxnSpPr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:pic","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvPicPr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:grpSp","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvGrpSpPr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:spTree","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvGrpSpPr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:graphicFrame","spId",function(ct,at,ut,ot,gt){return Fo(gt)+ct.childElement("p:nvGraphicFramePr","p:cNvPr").attr.getOptional("id")}),yt.bindAttributePicker("p:graphicFrame","borderWidth",function(){return 0}),yt.bindAttributePicker("p:graphicFrame","borderType",function(){return"none"}),yt.bindAttributePicker("p:graphicFrame","borderColor",function(){return"black"}),yt.bindAttributePicker("p:graphicFrame","borderStrokeDashArray",function(){return"0"})}function Fo(yt){var ct="";return yt==="master"?ct="m":yt==="layout"&&(ct="l"),ct}function Ao(yt,ct,at,ut){var ot=at.lnStyleXMLDescription;return ot||(ot=at.lnStyleXMLDescription=Object.freeze(vu(yt,ct,ut))),ot}function Wo(yt,ct,at,ut){var ot=at.fillStyleXMLDescription;return ot||(ot=at.fillStyleXMLDescription=Object.freeze(rm(yt,ct,ut))),ot}function vu(yt,ct,at){var ut=[],ot,gt=aw(yt,ct,at),xt=gt.allShape,Mt=gt.placeHolderType,kt=Jt(xt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional(new Np("p:spPr","p:grpSpPr"));if(rr){var ur=rr.childElementOptional("a:ln");ur&&ut.push(ur)}var _r=Ht.childElementOptional("p:style");if(_r){var Dr=bR(_r,ct);Dr.ln.xml&&ut.push(Dr.ln.xml),ot=Dr.ln.phClr}}}catch(Br){kt.e(Br)}finally{kt.f()}return{shapeStyleXMLList:ut,placeHolderType:Mt,placeHolderColor:ot}}function rm(yt,ct,at){var ut=[],ot,gt=aw(yt,ct,at),xt=gt.allShape,Mt=gt.placeHolderType,kt=Jt(xt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional(new Np("p:spPr","p:grpSpPr"),Nt(Np,xA));rr&&ut.push(rr);var ur=Ht.childElementOptional("p:style");if(ur){var _r=bR(ur,ct);_r.fill.xml&&ut.push(_r.fill.xml),ot=_r.fill.phClr}}}catch(Dr){kt.e(Dr)}finally{kt.f()}return{shapeStyleXMLList:ut,placeHolderType:Mt,placeHolderColor:ot}}var Hl=function(ct,at,ut,ot,gt){var xt=aw(ct,at,gt),Mt=xt.allShape,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional("p:spPr",ut);if(rr)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}},Eu=function(ct,at,ut,ot,gt){if(ct.attr.getBoolean("useBgFill",!1)){var xt=ct.parentElement("p:cSld");if(xt){var Mt=xt.extraAttr.getColorOptional("backgroundColor");if(Mt)return Mt}}var kt=Wo(ct,at,ot,gt),zt=Jt(kt.shapeStyleXMLList),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;return new Ay(kt.placeHolderColor).read(rr,at)||void 0}}catch(ur){zt.e(ur)}finally{zt.f()}},Sp=function(ct,at,ut,ot,gt){var xt=Ao(ct,at,ot,gt),Mt=Jt(xt.shapeStyleXMLList),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt.childElementOptional(Nt(Np,xA));if(Ht){var rr=new Ay(xt.placeHolderColor).read(Ht,at);if(rr)return rr}}}catch(ur){Mt.e(ur)}finally{Mt.f()}return iw},ul=function(ct,at,ut,ot,gt){var xt=Ao(ct,at,ot,gt),Mt=Jt(xt.shapeStyleXMLList),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;if(zt&&zt.attr.has("w")){var Ht=zt.attr.getNumber("w");return Ht>nE?Ht:nE}}}catch(rr){Mt.e(rr)}finally{Mt.f()}return nE},Vp=function(ct,at,ut,ot,gt){var xt=Ao(ct,at,ot,gt),Mt=Jt(xt.shapeStyleXMLList),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt.childElementOptional("a:prstDash");if(Ht&&Ht.attr.has("val"))return Ht.attr.getString("val")}}catch(rr){Mt.e(rr)}finally{Mt.f()}return"solid"},Ul=function(ct,at,ut,ot,gt){var xt=ul(ct,at,ut,ot,gt)/ZT;switch(Vp(ct,at,ut,ot,gt)){case"solid":return"0";case"dash":return"".concat(5*xt);case"dashDot":return" ".concat(5*xt,", ").concat(5*xt,", ").concat(xt,", ").concat(5*xt);case"dot":return"".concat(xt,", ").concat(5*xt);case"lgDash":return"".concat(2*xt,", ").concat(xt);case"lgDashDot":return"".concat(10*xt,", ").concat(5*xt,", ").concat(xt,", ").concat(5*xt,", ").concat(xt,", ").concat(5*xt);case"sysDash":return"".concat(5*xt,", ").concat(2*xt);case"sysDashDot":return"".concat(5*xt,", ").concat(2*xt,", ").concat(xt,", ").concat(5*xt);case"sysDashDotDot":return"".concat(5*xt,", ").concat(2*xt,", ").concat(xt,", ").concat(5*xt,", ").concat(xt,", ").concat(5*xt);case"sysDot":return"".concat(2*xt,", ").concat(5*xt);default:return"0"}},kp=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.isRender=!1,ot.state={dataUrl:""};var gt=ut.xlinkHref||ut.href;return gt&&lt.addLoadTask(gt),ot}return Bt(at,[{key:"componentDidMount",value:function(){this.isRender=!0,this.loadImage()}},{key:"getSnapshotBeforeUpdate",value:function(ot){var gt=this.props,xt=gt.xlinkHref,Mt=gt.href,kt=ot.xlinkHref||ot.href,zt=xt||Mt;return kt!==zt&&zt?(lt.addLoadTask(zt),!0):!1}},{key:"componentDidUpdate",value:function(ot,gt,xt){xt&&this.loadImage()}},{key:"componentWillUnmount",value:function(){this.isRender=!1}},{key:"updateImageState",value:function(ot,gt){this.isRender&&this.setState({dataUrl:ot},gt)}},{key:"loadImage",value:function(){var ot=this,gt=this.props,xt=gt.xlinkHref,Mt=gt.href,kt=xt||Mt;kt&&lt.loadImage(kt).then(function(zt){ot.updateImageState(zt,function(){lt.endLoadTask(kt)})}).then(function(){},function(){})}},{key:"render",value:function(){var ot=this.state.dataUrl,gt=this.props,xt=gt.innerref,Mt=gt.vertTextType,kt=gt.width,zt=gt.height,Ht=gt.x,rr=gt.y,ur=gt.opacity,_r=gt.clipPath,Dr=gt.preserveAspectRatio;if(ot){var Br={};Mt&&(Br.transform="scale(".concat(kt/zt,", ").concat(zt/kt,") rotate(270deg)"),Br.transformOrigin="center");var Ur={xlinkHref:ot,href:ot,width:gu(kt),height:gu(zt),opacity:ur,clipPath:_r,preserveAspectRatio:Dr,x:Ht,y:rr};return gA.default.createElement("image",El(_u({},Ur),{style:Br,ref:xt}))}return null}}]),at})(gA.default.Component),Uy=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.pathElements={},ot.imageElement=Gp.default.createRef();var gt=ut.shapeXML;return ot.spId=ut.spId,ot.graphType=ut.shapeXML.name==="p:sp"?"shape":"connection",ot.prestGeomXML=gt.extraElementWithName("a:prstGeom"),ot.custGeomXML=gt.extraElementWithName("a:custGeom"),ot.svgLoadingMonitor=new Qy(ut.logger).createMonitor(),ot}return Bt(at,[{key:"getCssVaribleColor",value:function(ot){switch(ot){case bm.Darken:return"hsla(var(--sp-fill-h),var(--sp-fill-s),calc(var(--sp-fill-l)*0.6),var(--sp-fill-a))";case bm.DarkenLess:return"hsla(var(--sp-fill-h),var(--sp-fill-s),calc(var(--sp-fill-l)*0.8),var(--sp-fill-a))";case bm.Lighten:return"hsla(var(--sp-fill-h),var(--sp-fill-s),calc(var(--sp-fill-l)*1.4),var(--sp-fill-a))";case bm.LightenLess:return"hsla(var(--sp-fill-h),var(--sp-fill-s),calc(var(--sp-fill-l)*1.2),var(--sp-fill-a))";default:return"hsla(var(--sp-fill-h),var(--sp-fill-s),var(--sp-fill-l),var(--sp-fill-a))"}}},{key:"updateFillColor",value:function(ot){var gt=this,xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Mt,kt=[],zt=0,Ht,rr;if(ot instanceof nT)kt=ot.getColors(),zt=ot.getRotation(),Ht=ot.getGradientPath(),Mt="url(#".concat(this.identification(),"-gradient-fill)");else if(ot instanceof UM)rr=ot.getResId();else if(ot instanceof sy){var ur=this.props.groupFillColor;Mt=Zl(ur)}else Mt=Zl(ot);if(xt&&(Object.keys(this.pathElements).forEach(function(Dr){var Br=gt.pathElements[Dr];Br&&Mt&&(rr!==void 0?Br.setAttribute("fill","none"):Br.setAttribute("fill",Mt))}),this.imageElement.current&&ot)){var _r=ot.getAlphaModFix();this.imageElement.current.setAttribute("opacity",_r.toString())}return{path:Ht,imageResId:rr,colorStops:kt,rotation:zt,fillColor:Mt}}},{key:"identification",value:function(){var ot=this.props,gt=ot.slideIndex,xt=ot.spId;return"".concat(gt,"-").concat(xt,"-")}},{key:"injectAdjustValue",value:function(ot,gt){var xt=ot.childElementOptional("a:avLst");xt&&xt.elementsWithName("a:gd").forEach(function(Mt){var kt=Mt.attr.getString("fmla"),zt=new Ys(kt).eval(gt),Ht=Mt.attr.getString("name");gt.setVariable(Ht,zt)})}},{key:"renderSVG",value:function(ot,gt,xt,Mt){var kt,zt=null,Ht=null,rr=this.props,ur=rr.shapeXML,_r=rr.width,Dr=rr.height,Br=rr.fillColor,Ur=rr.resourceLoader,Zr=rr.resourceType,Tn=rr.borderStyle,jn=rr.vertTextType,ts=(kt=ur.childElementOptional("p:nvSpPr","p:cNvSpPr"))==null?void 0:kt.attr.getBooleanOptional("txBox"),us=ur.childElementOptional("p:spPr","a:blipFill","a:stretch","a:fillRect"),Os=(us?us.attr.getNumber("l",0)/Ap:0)*_r,Hs=(us?us.attr.getNumber("b",0)/Ap:0)*Dr,Ks=(us?us.attr.getNumber("r",0)/Ap:0)*_r,so=(us?us.attr.getNumber("t",0)/Ap:0)*Dr;if(Mt){var To=Br.getAlphaModFix();ts||(zt=Gp.default.createElement("clipPath",{id:"clippath-".concat(this.identification())},ot));var Oo=Ur.loadURL(Zr,Mt);Ht=Gp.default.createElement(kp,{innerref:this.imageElement,xlinkHref:Oo,vertTextType:jn,href:Oo,width:_r-Ks-Os,height:Dr-Hs-so,x:gu(Os),y:gu(so),opacity:To,clipPath:"url(#clippath-".concat(this.identification(),")"),preserveAspectRatio:"none"})}var Au=this.graphType==="connection"&&Tn.color||this.graphType==="shape",Tu,xu;return nw(Dr)/n_<1?Tu="1px":Tu=gu(Dr),nw(_r)/n_<1?xu="1px":xu=gu(_r),Au?Gp.default.createElement("svg",{style:{position:"absolute",width:xu,height:Tu,overflow:"visible"}},Gp.default.createElement("defs",null,zt,gt,Gp.default.createElement("marker",{id:"".concat(this.identification(),"-arrow-end"),viewBox:"0 0 10 10",refX:"10",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt*1.5,markerHeight:xt*1.5,stroke:Zl(Tn.color),fill:Zl(Tn.color),orient:"auto"},Gp.default.createElement("path",{d:"M 1 0 L 10 5 L 1 10 L 0 9 L 7.18 5 L 0 1 Z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-arrow-start"),viewBox:"0 0 10 10",refX:"0",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt*1.5,markerHeight:xt*1.5,stroke:Zl(Tn.color),fill:Zl(Tn.color),orient:"auto"},Gp.default.createElement("path",{d:"M 9 0 L 0 5 L 9 10 L 10 9 L 2.82 5 L 10 1 L 9 0 Z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-triangle-end"),viewBox:"0 0 10 10",refX:"10",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-triangle-start"),viewBox:"0 0 10 10",refX:"0",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 10 0 L 0 5 L 10 10 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-stealth-end"),viewBox:"0 0 10 10",refX:"10",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 L 3 5 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-stealth-start"),viewBox:"0 0 10 10",refX:"0",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 10 0 L 0 5 L 10 10 L 7 5 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-diamond-end"),viewBox:"0 0 10 10",refX:"5",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 5 0 L 10 5 L 5 10 L 0 5 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-diamond-start"),viewBox:"0 0 10 10",refX:"5",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("path",{d:"M 5 0 L 10 5 L 5 10 L 0 5 z",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-oval-end"),viewBox:"0 0 10 10",refX:"5",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("ellipse",{cx:"5",cy:"5",rx:"5",ry:"5",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-oval-start"),viewBox:"0 0 10 10",refX:"5",refY:"5",markerUnits:"userSpaceOnUse",markerWidth:xt,markerHeight:xt,orient:"auto"},Gp.default.createElement("ellipse",{cx:"5",cy:"5",rx:"5",ry:"5",fill:Zl(Tn.color)})),Gp.default.createElement("marker",{id:"".concat(this.identification(),"-none")})),Ht,ot):null}},{key:"render",value:function(){var ot=this,gt,xt;this.pathElements={};var Mt,kt=this.props,zt=kt.width,Ht=kt.height,rr=kt.shapeXML,ur=kt.fillColor,_r=kt.borderStyle,Dr=kt.children,Br=new SA({w:zt,h:Ht}),Ur="";if(this.prestGeomXML){var Zr=this.prestGeomXML.attr.getString("prst");this.injectAdjustValue(this.prestGeomXML,Br),Mt=B0(Zr)}else this.custGeomXML?(Mt=this.custGeomXML,Ur="a:"):Mt=B0("rect");var Tn=cu.none,jn=cu.none,ts=rr.childElementOptional("p:spPr","a:ln","a:headEnd"),us=rr.childElementOptional("p:spPr","a:ln","a:tailEnd"),Os=((gt=ts?.parent)==null?void 0:gt.attr.getNumber("w",nE))||((xt=us?.parent)==null?void 0:xt.attr.getNumber("w",nE))||nE,Hs=Math.max(3*(Os/n_),10);if(ts){var Ks=ts.attr.getString("type","none");Tn=xR(Ks)}if(us){var so=us.attr.getString("type","none");jn=xR(so)}var To=this.updateFillColor(ur,!1),Oo=To.fillColor,Au=To.colorStops,Tu=To.imageResId,xu=To.path,yu=null;Au.length>0&&(xu?yu=Gp.default.createElement("radialGradient",{id:"".concat(this.identification(),"-gradient-fill")},Au.map(function(mv,P_){return Gp.default.createElement("stop",{key:"index-".concat(P_),offset:mv.stop,stopColor:Zl(mv.color)})})):yu=Gp.default.createElement("linearGradient",{id:"".concat(this.identification(),"-gradient-fill")},Au.map(function(mv,P_){return Gp.default.createElement("stop",{key:"index-".concat(P_),offset:mv.stop,stopColor:Zl(mv.color)})})));var sp=new wA().renderLumiaPath(Mt,Br,Ur).map(function(mv,P_){var ox=mv.fill!=="none"?Oo:"none",xS=mv.isBorder?Zl(_r.color):"none";Au.length===0&&(Oo&&mv.fill&&(ox=vt(Oo,mv.fill)),!rr.childElementOptional("p:spPr","a:ln","a:solidFill")&&Oo!=="none"&&(xS=vt(xS,bm.Darken)));var RA={};return mv.fill!=="none"&&Au.length===0&&(RA.fill=ot.getCssVaribleColor(mv.fill)),Gp.default.createElement("path",{ref:function(PA){ot.pathElements[P_.toString()]=PA},key:"path".concat(P_),d:mv.pathD,style:RA,fill:Tu?"none":ox,height:gu(Ht),width:gu(zt),stroke:xS,strokeWidth:gu(_r.width),strokeDasharray:_r.strokeDashArray,markerStart:"url(#".concat(ot.identification(),"-").concat(cu[Tn],"-start)"),markerEnd:"url(#".concat(ot.identification(),"-").concat(cu[jn],"-end)")})}),Jl=Br.accessValue("rectLeft"),Ml=Br.accessValue("rectTop"),Qp=Br.accessValue("rectRight")-Br.accessValue("rectLeft"),pm=Br.accessValue("rectBottom")-Br.accessValue("rectTop"),Uv=Gp.default.Children.map(Dr,function(mv){return Gp.default.cloneElement(mv,{left:Jl,right:Ml,width:Qp,height:pm})});return Gp.default.createElement(Gp.default.Fragment,null,Uv,this.renderSVG(sp,yu,Hs,Tu))}}]),at})(Gp.default.Component),fv=["textPlain"],R1;(function(yt){yt.textNoShape="textNoShape",yt.textPlain="textPlain",yt.textRingInside="textRingInside",yt.textRingOutside="textRingOutside"})(R1||(R1={}));var ev=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.contentWidth=0,ot.fontRowCount=0;var gt,xt=ut.textBodyWrapResource;ot.gbDataList=ut.shapeGuideList.map(function(kt){var zt=kt.attr.getString("name"),Ht=kt.attr.getString("fmla");return rt({},zt,Ht)}),ot.textContent=(gt=ut.textBodyWrapResource.paragraphs[0].runs)==null?void 0:gt.map(function(kt){return kt.text}).join(""),ot.height=FM(xt.prop.height),ot.width=FM(xt.prop.width);var Mt=0;return xt.paragraphs.forEach(function(kt){ot.fontRowCount+=kt.lines.length,kt.lines.forEach(function(zt){var Ht=0;zt.forEach(function(rr){Ht+=parseInt(rr.prop.width,10),Mt||(Mt=rr.prop.lineSpacing),ot.fontSize||(ot.fontSize=FM(rr.prop.size))}),ot.contentWidth=Math.max(ot.contentWidth,Ht)})}),ot.contentHeight=Ox((ot.fontRowCount-1)*Mt+ot.fontSize||ot.fontSize),ot}return Bt(at,[{key:"textNoShape",value:function(){var ot=this,gt={display:"flex",fontSize:"".concat(this.fontSize,"pt"),transformOrigin:"50%, 0",height:"".concat(this.height,"pt"),width:"".concat(this.width,"pt"),justifyContent:"center",alignItems:"center"},xt=this.height,Mt=this.width,kt=this.contentWidth,zt=this.contentHeight,Ht=Number.isNaN(Mt/kt)?1:Ox(Mt/kt),rr=Number.isNaN(xt/zt)?1:Ox(xt/zt),ur={margin:0,padding:0,fontSize:"".concat(this.fontSize,"pt"),lineHeight:"".concat(this.fontSize,"pt"),height:"".concat(this.fontSize,"pt"),width:"".concat(this.fontSize,"pt"),display:"inline-block"},_r=this.props.textBodyWrapResource;return ay.default.createElement("div",{style:gt},ay.default.createElement("div",{ref:function(Br){ot.spanRef=Br},style:{whiteSpace:"initial",transform:"scaleX(".concat(Ht,") scaleY(").concat(rr,")")}},_r.paragraphs.map(function(Dr,Br){var Ur;return ay.default.createElement("span",{key:Br,style:{whiteSpace:"initial"}},(Ur=Dr.lines)==null?void 0:Ur.map(function(Zr,Tn){return ay.default.createElement(ay.default.Fragment,null,Zr.map(function(jn){var ts;return(ts=jn.text)==null?void 0:ts.split("").map(function(us,Os){return ay.default.createElement("pre",{style:ur,key:"".concat(Tn,"-").concat(Os)},us)})}),ay.default.createElement("br",null))}))})))}},{key:"textRing",value:function(ot){var gt=this,xt,Mt,kt,zt=Math.atan(this.height/this.width),Ht=zt*180/Math.PI,rr=6e4;(xt=this.gbDataList[0])!=null&&xt.adj&&(rr=Ys.deconstructShapeGuide(this.gbDataList[0].adj));var ur=200,_r=100,Dr=(1-Ey(rr)*_r)/this.fontSize;if(!((Mt=this.textContent)!=null&&Mt.length))return this.textNoShape();var Br=this.textContent.length;return ay.default.createElement("div",{style:{display:"inline-block",position:"relative",fontSize:"".concat(this.fontSize,"pt"),transformOrigin:"50%, 0",height:"".concat(_r,"pt"),width:"".concat(ur,"pt"),transform:"scale(".concat(this.width/ur,", ").concat(this.height/_r/(Math.cos(zt/180)*Math.PI),")")}},ay.default.createElement("div",{style:{transformStyle:"preserve-3d",height:"".concat(_r,"pt"),width:"".concat(ur,"pt"),transform:"rotateX(".concat(-Ht,"deg)")}},(kt=this.textContent)==null?void 0:kt.split("").map(function(Ur,Zr){return ay.default.createElement("span",{style:{position:"absolute",lineHeight:"".concat(gt.fontSize,"pt"),left:"".concat(ur/2-gt.fontSize/2,"pt"),top:"".concat((_r-gt.fontSize)/2,"pt"),transform:ot(Zr,Br,Dr)},key:Zr},Ur)})))}},{key:"textRingInside",value:function(){var ot=function(xt,Mt,kt){return"rotateY(".concat(70-340/Mt*xt,"deg) translateZ(").concat(-100,"pt) scaleY(").concat(kt,")")};return this.textRing(ot)}},{key:"textRingOutside",value:function(){var ot=function(xt,Mt,kt){return"rotateY(".concat(320*xt/(Mt-1)-60,"deg) translateZ(",100,"pt) scaleY(").concat(kt,")")};return this.textRing(ot)}},{key:"textPlain",value:function(){var ot=this,gt=this.gbDataList[0]?Ys.deconstructShapeGuide(this.gbDataList[0].adj):5e4,xt=this.width,Mt=this.height,kt=Ey(gt),zt=kt>.5?(2*kt-1)*xt:(1-kt*2)*xt,Ht=Math.atan(zt/Mt),rr=Ht*180/Math.PI;kt<.5&&(rr=-rr);var ur={display:"flex",fontSize:"".concat(this.fontSize,"pt"),transformOrigin:"0, 0",height:"".concat(Mt,"pt"),width:"".concat(xt,"pt"),justifyContent:"center",alignItems:"center"},_r={display:"block",lineHeight:"".concat(this.fontSize,"pt"),textAlign:"center"},Dr={display:"inline-block",fontSize:"".concat(this.fontSize,"pt"),lineHeight:"".concat(this.fontSize,"pt"),height:"".concat(this.fontSize,"pt"),transformOrigin:"50% 0",margin:0,padding:"0"},Br=this.contentWidth,Ur=this.contentHeight,Zr=Number.isNaN(xt/Br)?1:Ox(xt)/(Br+Math.tan(Ht)*Ox(Mt)),Tn=Number.isNaN(Mt/Ur)?1:Ox(Mt/Ur),jn=0,ts=this.props.textBodyWrapResource;return ay.default.createElement("div",{style:_u({},ur)},ay.default.createElement("div",{ref:function(Os){ot.spanRef=Os},style:El(_u({},_r),{whiteSpace:"initial",transform:"skew(".concat(rr,"deg) scaleY(").concat(Tn,") scaleX(").concat(Zr,")")})},ts.paragraphs.map(function(us,Os){var Hs;return ay.default.createElement("div",{key:"wordart-".concat(Os),style:El(_u({},_r),{whiteSpace:"initial"})},(Hs=us.lines)==null?void 0:Hs.map(function(Ks,so){var To=ot.fontRowCount===1?ot.fontSize:Ks[0].prop.lineSpacing,Oo={};return(jn===0||jn===ot.fontRowCount-1)&&(To=(To+ot.fontSize)/2,Oo.display="flex",jn===ot.fontRowCount-1&&(Oo.alignItems="flex-end")),us.prop.align==="l"||us.prop.align==="just"?Oo.justifyContent="flex-start":us.prop.align==="r"?Oo.justifyContent="flex-end":us.prop.align==="dist"?Oo.justifyContent="space-between":us.prop.align==="ctr"&&(Oo.justifyContent="center"),jn+=1,ay.default.createElement("div",{key:Ks[0].text+so.toString(),style:_u({whiteSpace:"nowrap",lineHeight:"".concat(To,"pt")},Oo)},Ks.map(function(Au){var Tu;return(Tu=Au.text)==null?void 0:Tu.split("").map(function(xu,yu){return ay.default.createElement("pre",{style:El(_u({},Dr),{fontFamily:Au.prop.font}),key:yu},xu)})}),ay.default.createElement("br",null))}))})))}},{key:"render",value:function(){var ot=this.props.presetType;return this[ot]?this[ot]():this.textNoShape()}}]),at})(ay.default.Component),gS=9999,Ky=(function(){function yt(){Ot(this,yt),this.indexByLevel=new Map,this.startAtByLevel=new Map}return Bt(yt,[{key:"get",value:function(at,ut,ot){var gt=at.extraAttr.getNumber("level");this.indexByLevel.has(gt)||(this.indexByLevel.set(gt,0),this.startAtByLevel.set(gt,-1));var xt=this.startAtByLevel.get(gt);if(ut!==xt)this.indexByLevel.set(gt,0),this.startAtByLevel.set(gt,ut);else{var Mt=this.indexByLevel.get(gt);ot&&(Mt+=1,this.indexByLevel.set(gt,Mt))}return this.indexByLevel.get(gt)}},{key:"reset",value:function(){this.indexByLevel=new Map,this.startAtByLevel=new Map}}]),yt})(),r1=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.buIndexCounter=new Ky,ot.paragraphBulletInfo=[],ot.numCol=1;var gt=ot.props,xt=gt.txBodyXML,Mt=gt.textBodyWrapResource,kt=gt.flipH,zt=gt.flipV,Ht=gt.insideTable,rr=gt.totalPadding,ur=gt.height,_r=gt.width,Dr=gt.right,Br=gt.left;ot.bodyPrXML=xt.childElement("a:bodyPr"),ot.paragraphXMLs=xt.elementsWithName("a:p");var Ur=ot.bodyPrXML.childElementOptional("a:prstTxWarp");Ur&&(ot.presetType=Ur.attr.getString("prst","textNoShape"));var Zr=ot.bodyPrXML.extraAttr.getString("anchor","t"),Tn=ot.bodyPrXML.extraAttr.getString("wrap","square");ot.isTextWrap=Tn==="square",ot.spcFirstLastPara=ot.bodyPrXML.extraAttr.getBoolean("spcFirstLastPara",!1),ot.anchorCtr=ot.bodyPrXML.extraAttr.getBoolean("anchorCtr",!1),ot.numCol=ot.bodyPrXML.extraAttr.getNumber("numCol",1);var jn=0,ts=0;if(Mt){var us=Mt.prop;ot.vert=us.vert,ot.paddingLeft=us.lIns*n_,ot.paddingRight=us.rIns*n_,jn=us.tIns*n_,ts=us.bIns*n_}else ot.vert=ks(xt),ot.paddingLeft=ot.bodyPrXML.extraAttr.getNumber("lIns",tN),ot.paddingRight=ot.bodyPrXML.extraAttr.getNumber("rIns",tN),jn=ot.bodyPrXML.extraAttr.getNumber("tIns",dR),ts=ot.bodyPrXML.extraAttr.getNumber("bIns",dR);var Os;return kt!==zt&&(Os="scale(-1, 1)"),ot.rectStyle=Ht?{position:"relative",left:0,top:0,width:gu(_r),paddingTop:gu(jn-rr/2),paddingBottom:gu(ts-rr/2),height:"calc(100% - ".concat(gu(rr),")"),transform:Os}:{position:"absolute",left:gu(Br===void 0?0:Br),top:gu(Dr===void 0?0:Dr),width:gu(_r),height:gu(ur),transform:Os},ot.rectStyle=_u({display:"inline-flex",flexDirection:"column",alignItems:ot.anchorCtr?"center":"flex-start",justifyContent:Dt(Zr),zIndex:gS,paddingLeft:gu(ot.paddingLeft),paddingTop:gu(jn),paddingRight:gu(ot.paddingRight),paddingBottom:gu(ts),boxSizing:"border-box",whiteSpace:ot.isTextWrap?"normal":"nowrap"},ot.rectStyle),ot.updateRectStyleByWrapResource(),ot.generateParagraphBulletInfo(),ot}return Bt(at,[{key:"updateRectStyleByWrapResource",value:function(){var ot=this.props.textBodyWrapResource;if(ot!==void 0){var gt=ot.prop.anchor;this.rectStyle=El(_u({},this.rectStyle),{justifyContent:Dt(gt)}),this.rectStyle=Qn(this.vert,this.rectStyle,this.props)}}},{key:"generateParagraphBulletInfo",value:function(){var ot=this.props.textBodyWrapResource;if(ot!==void 0){var gt=ot.paragraphs.map(function(Mt){var kt,zt;return{autoNumber:(kt=Mt.prop.bulletChar)==null?void 0:kt.autoNumber,autoNumberType:(zt=Mt.prop.bulletChar)==null?void 0:zt.autoNumberType,level:Mt.prop.level,empty:Mt.lines.length===0}}),xt=[0,0,0,0,0,0,0,0,0];this.paragraphBulletInfo=gt.map(function(Mt,kt){var zt=Mt.level,Ht=Mt.autoNumberType;if(xt=xt.map(function(_r,Dr){return Dr>zt?0:Dr===zt?Ht?_r:0:_r}),Ht){var rr=Mt.autoNumber;if(kt>0&&gt[kt-1].autoNumber!==rr&&(xt[zt]=0),Mt.empty)return{order:kt,count:gt.length};var ur=xt[zt];return xt[zt]=ur+1,{number:ur+(rr||1),order:kt,count:gt.length}}else return{order:kt,count:gt.length}})}}},{key:"renderParagraph",value:function(ot,gt,xt,Mt,kt,zt,Ht,rr){var ur=0,_r=ot?.elements.find(function(Os){return Os.name==="a:r"}),Dr=this.props,Br=Dr.slideContext,Ur=Dr.width,Zr=Dr.height,Tn=Dr.uuid,jn=Dr.resourceType,ts=Dr.withAnimation,us=Dr.textBodyWrapResource;return HT.default.createElement(xs,{key:"".concat(xt),slideContext:Br,isTextWrap:Ht,width:Ur,height:Zr,paragraphIndex:xt,firstRangeXML:_r,buIndexCounter:this.buIndexCounter,paragraphXML:ot,bodyPrXML:gt,uuid:Tn,round:ur,spcFirstLastPara:Mt,isFirst:kt,isLast:zt,vert:this.vert,resourceType:jn,paragraphWrapResource:rr,textBodyWrapResource:us,withAnimation:!!ts,bulletInfo:this.paragraphBulletInfo[xt]})}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.textBodyWrapResource,Mt=gt.width;if(this.presetType&&this.presetType!==R1.textNoShape&&fv.includes(this.presetType)&&xt){var kt=this.bodyPrXML.childElementOptional("a:prstTxWarp"),zt=kt?.childElementOptional("a:avLst"),Ht=zt?.elementsWithName("a:gd")||[];return HT.default.createElement("div",{style:El(_u({},this.rectStyle),{display:"flex",justifyContent:"center",alignItems:"center",padding:0}),className:"txBody"},HT.default.createElement(ev,{presetType:this.presetType,shapeGuideList:Ht,textBodyWrapResource:xt}))}var rr=On(this.vert),ur;return xt?ur=xt.paragraphs.map(function(_r,Dr){return ot.renderParagraph(void 0,void 0,Dr,ot.spcFirstLastPara,Dr===0,Dr===xt.paragraphs.length-1,ot.isTextWrap,_r)}):ur=this.paragraphXMLs.map(function(_r,Dr){return ot.renderParagraph(_r,ot.bodyPrXML,Dr,ot.spcFirstLastPara,Dr===0,Dr===ot.paragraphXMLs.length-1,ot.isTextWrap)}),this.buIndexCounter.reset(),HT.default.createElement("div",{className:"txBoby",style:this.rectStyle},HT.default.createElement("ol",{style:_u({width:gu(Mt-this.paddingLeft-this.paddingRight),marginBlockEnd:0,marginBlockStart:0,paddingBlockStart:0,paddingBlockEnd:0,marginInlineEnd:0,marginInlineStart:0,paddingInlineStart:0,paddingInlineEnd:0,margin:0,padding:0,whiteSpace:this.isTextWrap?"normal":"nowrap",columnCount:this.numCol===1?void 0:this.numCol},rr)},ur))}}]),at})(HT.default.Component),i_=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"renderCol",value:function(ot,gt,xt,Mt,kt,zt){var Ht=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,rr,ur=function(){var aE;return(aE=[]).concat.apply(aE,arguments).reduce(function(PA,eD){return PA+eD},0)},_r=ot.childElementOptional("a:tcPr");if(!_r)return null;var Dr=_r.extraAttr.getColor("".concat(gt,"-").concat(xt,"-fillColor"),iw),Br;Dr instanceof nT?Br=Dr.getGradientStyles():Br=Zl(Dr);var Ur=_r.extraAttr.getStringOptional("".concat(gt,"-").concat(xt,"-fontFamily")),Zr=_r.extraAttr.getBoolean("".concat(gt,"-").concat(xt,"-isBold"),!1),Tn=_r.extraAttr.getBoolean("".concat(gt,"-").concat(xt,"-isItalic"),!1),jn=_r.extraAttr.getString("".concat(gt,"-").concat(xt,"-bottomBorderStyle"),"none"),ts=_r.extraAttr.getNumber("".concat(gt,"-").concat(xt,"-bottomBorderWidth"),0),us=_r.extraAttr.getColorOptional("".concat(gt,"-").concat(xt,"-bottomBorderColor"),iw),Os=_r.extraAttr.getString("".concat(gt,"-").concat(xt,"-topBorderStyle"),"none"),Hs=_r.extraAttr.getNumber("".concat(gt,"-").concat(xt,"-topBorderWidth"),0),Ks=_r.extraAttr.getColorOptional("".concat(gt,"-").concat(xt,"-topBorderColor"),iw),so=_r.extraAttr.getString("".concat(gt,"-").concat(xt,"-leftBorderStyle"),"none"),To=_r.extraAttr.getNumber("".concat(gt,"-").concat(xt,"-leftBorderWidth"),0),Oo=_r.extraAttr.getColorOptional("".concat(gt,"-").concat(xt,"-leftBorderColor"),iw),Au=_r.extraAttr.getString("".concat(gt,"-").concat(xt,"-rightBorderStyle"),"none"),Tu=_r.extraAttr.getNumber("".concat(gt,"-").concat(xt,"-rightBorderWidth"),0),xu=_r.extraAttr.getColorOptional("".concat(gt,"-").concat(xt,"-rightBorderColor"),iw),yu=ot.childElementOptional("a:txBody");if(yu===void 0)return null;var sp=ot.attr.getNumber("gridSpan",1),Jl=ot.attr.getNumber("rowSpan",1),Ml=ot.attr.getBoolean("hMerge",!1),Qp=ot.attr.getBoolean("vMerge",!1),pm=ur(zt.slice(xt,xt+sp)),Uv="".concat(gt,"-").concat(xt),mv=this.props,P_=mv.slideContext,ox=mv.uuid,xS=mv.shapeWrapResource;return Ml||Qp?null:Zw.default.createElement("td",{colSpan:sp,rowSpan:Jl,style:{position:"relative",fontFamily:Ur&&Ur,fontWeight:Zr?500:400,fontStyle:Tn?"italic":"normal",borderBottomStyle:jn,borderTopStyle:Os,borderLeftStyle:so,borderRightStyle:Au,borderBottomWidth:gu(ts),borderTopWidth:gu(Hs),borderLeftWidth:gu(To),borderRightWidth:gu(Tu),borderBottomColor:Zl(us),borderTopColor:Zl(Ks),borderLeftColor:Zl(Oo),borderRightColor:Zl(xu),width:gu(pm),height:gu(kt),background:Br,boxSizing:"border-box",fontSize:0,lineHeight:0},key:"tc-".concat(gt,"-").concat(xt),className:"tc-".concat(gt,"-").concat(xt)},Zw.default.createElement(r1,{slideContext:P_,insideTable:!0,width:pm,height:kt,totalPadding:Ht,uuid:ox,txBodyXML:yu,resourceType:"slide",textBodyWrapResource:(rr=xS?.textBodyMap)==null?void 0:rr[Uv]}))}},{key:"render",value:function(){var ot=this,gt=this.props.graphXML,xt=gt.childElementOptional("a:graphic","a:graphicData","a:tbl"),Mt=xt&&xt.childElement("a:tblGrid"),kt=Mt?Mt.elementsWithName("a:gridCol"):[],zt=xt?xt.elementsWithName("a:tr"):[],Ht=zt.length,rr=0;if(Ht>0){var ur=0;zt.forEach(function(Dr,Br){if(Br===0){var Ur=0;Dr.elementsWithName("a:tc").forEach(function(Tn,jn){var ts=Tn.childElement("a:tcPr").extraAttr.getNumber("".concat(Br,"-").concat(jn,"-topBorderWidth"),0);Ur=Math.max(ts,Ur)}),ur+=Ur}var Zr=0;Dr.elementsWithName("a:tc").forEach(function(Tn,jn){var ts=Tn.childElement("a:tcPr").extraAttr.getNumber("".concat(Br,"-").concat(jn,"-bottomBorderWidth"),0);Zr=Math.max(ts,Zr)}),ur+=Zr}),rr=ur/Ht}var _r=zt.map(function(Dr,Br){var Ur=Dr.attr.getNumber("h"),Zr=Dr.elementsWithName("a:tc").map(function(jn,ts){return kt[ts].attr.getNumber("w")}),Tn=Dr.elementsWithName("a:tc").map(function(jn,ts){var us=kt[ts].attr.getNumber("w");return ot.renderCol(jn,Br,ts,us,Ur,Zr,rr)});return Zw.default.createElement("tr",{key:"tr-"+Br},Tn)});return Zw.default.createElement("table",{style:{borderCollapse:"collapse"},cellSpacing:"0",cellPadding:"0"},Zw.default.createElement("tbody",null,_r))}}]),at})(Zw.default.Component),XC=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.url=ot.getUrl(),ot.imageLoadingMonitor=new Qy(ut.logger).createMonitor(),ot}return Bt(at,[{key:"getId",value:function(){var ot=this.props.graphXML,gt=ot.childElement("p:nvGraphicFramePr","p:cNvPr").attr.getStringOptional("id");if(gt)return"spId".concat(gt);if(ot.parent&&ot.parent.name==="mc:Choice")return this.getResId()}},{key:"getResId",value:function(){var ot,gt=this.props.graphXML,xt=(ot=gt.parent)==null?void 0:ot.parent;if(xt){var Mt=xt.childElementOptional("mc:Fallback","p:pic","p:blipFill","a:blip");if(Mt)return Mt.attr.getStringOptional("r:embed")}}},{key:"getUrl",value:function(){var ot=this.props,gt=ot.slideContext,xt=ot.resourceType,Mt=this.getId();return Mt?gt.resourceLoader.loadURL(xt,Mt):void 0}},{key:"render",value:function(){if(!this.url)return null;var ot=this.props,gt=ot.width,xt=ot.height;return eu.default.createElement("img",{src:this.url,alt:"graph",style:{width:gu(gt),height:gu(xt)},ref:this.imageLoadingMonitor})}}]),at})(eu.default.Component),kL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.url=ot.getUrl(),ot.imageLoadingMonitor=new Qy(ut.logger).createMonitor(),ot}return Bt(at,[{key:"getId",value:function(){var ot=this.props.graphXML;return ot.childElement("p:nvGraphicFramePr","p:cNvPr").attr.getString("id")}},{key:"getUrl",value:function(){var ot=this.props,gt=ot.slideContext,xt=ot.resourceType,Mt=this.getId();return gt.resourceLoader.loadURL(xt,"spId".concat(Mt))}},{key:"render",value:function(){var ot=this.props,gt=ot.width,xt=ot.height;return QP.default.createElement("img",{src:this.url,alt:"diagram",style:{width:gu(gt),height:gu(xt)},ref:this.imageLoadingMonitor})}}]),at})(QP.default.Component),OL=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"render",value:function(){return vA.default.createElement("div",null)}}]),at})(vA.default.PureComponent),qL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.url=ot.getUrl(),ot.imageLoadingMonitor=new Qy(ut.logger).createMonitor(),ot}return Bt(at,[{key:"getId",value:function(){var ot=this.props.graphXML;return ot.childElement("p:nvGraphicFramePr","p:cNvPr").attr.getString("id")}},{key:"getUrl",value:function(){var ot=this.props,gt=ot.slideContext,xt=ot.resourceType,Mt=this.getId();return gt.resourceLoader.loadURL(xt,"spId".concat(Mt))}},{key:"render",value:function(){if(this.url){var ot=this.props,gt=ot.width,xt=ot.height;return yA.default.createElement("img",{src:this.url,alt:"oleGraph",style:{width:gu(gt),height:gu(xt)},ref:this.imageLoadingMonitor})}else return yA.default.createElement("div",null)}}]),at})(yA.default.Component),LL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut);var gt=ot.props.graphXML;return ot.uri=gt.childElement("a:graphic","a:graphicData").attr.getStringOptional("uri"),ot}return Bt(at,[{key:"subGraphClassWithURI",value:function(ot){switch(ot){case"http://schemas.openxmlformats.org/drawingml/2006/table":return i_;case"http://schemas.microsoft.com/office/drawing/2014/chartex":case"http://schemas.openxmlformats.org/drawingml/2006/chart":return XC;case"http://schemas.openxmlformats.org/drawingml/2006/diagram":return kL;case"http://schemas.openxmlformats.org/presentationml/2006/ole":return qL;default:return console.debug("Unsupported graph",ot),OL}}},{key:"render",value:function(){var ot=this.props,gt=ot.shapeGroupTransform,xt=ot.width,Mt=ot.height,kt=this.subGraphClassWithURI(this.uri),zt,Ht;if(gt){var rr=gt.scaleX,ur=gt.scaleY;zt=xt*rr,Ht=Mt*ur}else zt=xt,Ht=Mt;var _r=El(_u({},this.props),{height:Ht,width:zt});return _P.default.createElement(kt,_u({},_r))}}]),at})(_P.default.Component),FL="https://convertcdn.netless.link/publicFiles/icon/play.png",BL="https://convertcdn.netless.link/publicFiles/icon/pause.png",BO=function(ct){var at=ct.startTime,ut=ct.endTime,ot=ct.duration;return at&&(ot-=at),ut&&(ot-=ut),ot},jO=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.state={total:BO(ut)},ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this.props.protalId;this.controllerPortal=document.getElementById(ot)}},{key:"onPlayClick",value:function(ot){var gt=this.props.onPlayClick;ot.stopPropagation(),gt()}},{key:"onPauseClick",value:function(ot){var gt=this.props.onPauseClick;ot.stopPropagation(),gt()}},{key:"onBarClick",value:function(ot){var gt=this.props,xt=gt.duration,Mt=gt.startTime,kt=gt.endTime,zt=gt.onSeekClick;if(ot.stopPropagation(),xt){var Ht=this.props.duration;Mt&&(Ht-=Mt),kt&&(Ht-=kt);var rr=ot.nativeEvent.offsetX/ot.currentTarget.clientWidth*Ht;Mt&&(rr+=Mt),zt(Math.floor(rr))}}},{key:"computedCurrent",value:function(){var ot=this.props.startTime,gt=this.props.currentTime,xt=this.state.total;return ot&&(gt>ot?gt-=ot:gt=0),gt>xt&&(gt=xt),gt}},{key:"formatTime",value:function(ot){var gt="00:00";if(ot){var xt=Math.floor(ot/60),Mt=String(xt<0?0:xt).padStart(2,"0"),kt=Math.floor(ot%60),zt=String(kt<0?0:kt).padStart(2,"0");gt="".concat(Mt,":").concat(zt)}return gt}},{key:"renderController",value:function(ot){var gt=this.props,xt=gt.display,Mt=gt.style,kt=gt.controllerRef,zt=gt.resourceLoader,Ht=gt.playing,rr=this.state.total;return K_.default.createElement("div",{className:"ppt-event-source",style:_u({background:"#FFFFFF",borderRadius:50,height:50,width:300,display:xt?"flex":"none",flexDirection:"row",alignItems:"center"},Mt),ref:kt},K_.default.createElement("div",{className:"ppt-event-source",style:{marginLeft:15,marginRight:10,fontSize:0,height:20,display:Ht?"none":"block"},onClick:this.onPlayClick.bind(this)},K_.default.createElement("img",{style:{height:20},alt:"play",src:zt.replaceProtocolByresourceScheme(FL)})),K_.default.createElement("div",{className:"ppt-event-source",style:{marginLeft:15,marginRight:10,fontSize:0,height:20,display:Ht?"block":"none"},onClick:this.onPauseClick.bind(this)},K_.default.createElement("img",{style:{height:20},alt:"pause",src:zt.replaceProtocolByresourceScheme(BL)})),K_.default.createElement("div",{style:{width:100},className:"timer"},K_.default.createElement("span",{className:"current"},this.formatTime(this.computedCurrent())),K_.default.createElement("span",null,"/"),K_.default.createElement("span",{className:"total"},this.formatTime(rr))),K_.default.createElement("div",{className:"ppt-event-source",style:{flex:1,position:"relative",marginRight:10},onMouseDown:this.onBarClick.bind(this)},K_.default.createElement("div",{style:{background:"#D9D9D9",position:"relative",height:10,display:"flex"},className:"total"},K_.default.createElement("div",{style:{background:"#4F4F4F",top:0,left:0,height:10,flex:ot},className:"played"}))))}},{key:"render",value:function(){var ot=this.props,gt=ot.duration,xt=ot.endTime,Mt=ot.currentTime,kt=ot.playing,zt=ot.onMediaEnd,Ht=this.state.total;if(xt){var rr=Mt+xt;gt>0&&rr>=gt&&kt&&zt()}var ur=0;return gt&&(ur=this.computedCurrent()/Ht),this.controllerPortal?(0,LM.createPortal)(this.renderController(ur),this.controllerPortal):this.renderController(ur)}}],[{key:"getDerivedStateFromProps",value:function(ot){return{total:BO(ot)}}}]),at})(K_.default.Component),jL="https://convertcdn.netless.link/publicFiles/icon/audio.png",$L=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.videoIntervalId=void 0,ot.lastAnimeState={stop:0,play:0},ot.player=tw.default.createRef(),ot.controller=tw.default.createRef(),ut.mediaState?ot.state={displayController:!1,playing:ut.mediaState.playing,currentTime:ut.mediaState.currentTime||ut.startTimePerfix,duration:0,controllerPositionTop:0,controllerPositionLeft:0}:ot.state={displayController:!1,playing:!1,currentTime:ut.startTimePerfix||0,duration:0,controllerPositionTop:0,controllerPositionLeft:0};var gt=ot.state.playing,xt=ot.props,Mt=xt.mediaSlideActionUserIds,kt=xt.userId;return gt&&ot.hasControl(Mt,kt)&&ot.syncPlayTimeLoop(),ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this,gt=this.props.targetID;window?.addEventListener("message",function(xt){xt.data.type==="_changeAudioState"&&xt.data.targetID===gt&&ot.updateAnimation(xt.data)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(ot){var gt=this.props,xt=gt.disableAnimation,Mt=gt.outsidePausing,kt=gt.mediaState,zt=gt.rtcClient,Ht=this.state.playing;if(xt===!0){this.player.current&&this.pauseAudio();return}if(!Mt&&ot.outsidePausing){this.player.current&&this.pauseAudio();return}else if(Mt&&!ot.outsidePausing){this.player.current&&this.playAudio();return}if(kt!==void 0&&kt.playing===ot.mediaState.playing&&kt.currentTime===ot.mediaState.currentTime){Ht!==kt.playing&&this.setState({playing:kt.playing});return}this.hasControl(ot.mediaSlideActionUserIds,ot.userId)||this.stopSyncPlayTime(),kt===void 0&&ot.mediaState!==void 0?kt===void 0&&ot.mediaState!==void 0&&(this.player.current&&(this.pauseAudio(),this.player.current.currentTime=ot.mediaState.currentTime,ot.mediaState.playing===!0?this.playAudio():this.pauseAudio()),this.setState(ot.mediaState)):kt!==void 0&&ot.mediaState!==void 0&&this.player.current&&(kt.playing?Math.abs(ot.mediaState.currentTime-this.player.current.currentTime)>1.5&&(this.player.current.currentTime=ot.mediaState.currentTime,ot.mediaState.playing&&zt?.setAudioMixingPosition(Math.floor(this.player.current.currentTime*1e3))):this.player.current.currentTime=ot.mediaState.currentTime,Ht&&!ot.mediaState.playing?this.pauseAudio():!Ht&&ot.mediaState.playing&&this.playAudio(),this.setState({playing:ot.mediaState.playing,currentTime:ot.mediaState.currentTime}))}},{key:"onMediaCanPlay",value:function(){var ot=this.props,gt=ot.disableAnimation,xt=ot.mediaState,Mt=ot.rtcClient;gt===!0?this.pauseAudio():xt&&xt.playing&&(Mt&&!this.audioMixing||this.player.current.paused===!0&&(this.player.current.currentTime=xt.currentTime,this.playAudio()))}},{key:"onMouseOver",value:function(ot){var gt=this.state.displayController,xt=this.props.slideRef;if(gt!==!0){var Mt=ot.target,kt=Mt.getBoundingClientRect(),zt=kt.x,Ht=kt.y,rr=kt.height,ur=xt.current.getBoundingClientRect(),_r=ur.x,Dr=ur.y,Br=ur.width,Ur=ur.height,Zr=getComputedStyle(this.controller.current),Tn=Br/parseFloat(getComputedStyle(xt.current).width),jn=0,ts=0;Zr!==null&&Zr.width!==null&&(jn=parseInt(Zr.width,10)*Tn),Zr!==null&&Zr.height!==null&&(ts=parseInt(Zr.height,10)*Tn);var us=0,Os=0;zt<_r?Os=0:_r+Br<zt+jn?Os=Br-jn:Os=zt-_r,Ht+rr-ts<Dr?us=0:Ht+rr>Dr+Ur?us=Ur-ts:us=Ht+rr-Dr-ts,this.setState({displayController:!0,controllerPositionTop:us/Tn,controllerPositionLeft:Os/Tn})}}},{key:"onMediaPlay",value:function(){var ot=this.props,gt=ot.onMediaPlay,xt=ot.shapeId,Mt=this.state.currentTime;gt&&gt(xt,"audio",Mt)}},{key:"onMediaPause",value:function(){var ot=this.props,gt=ot.onMediaPause,xt=ot.shapeId,Mt=this.state.currentTime;this.stopSyncPlayTime(),gt&&gt(xt,"audio",Mt)}},{key:"stopSyncPlayTime",value:function(){this.videoIntervalId&&clearInterval(this.videoIntervalId)}},{key:"syncPlayTime",value:function(ot){if(this.player.current){var gt=this.props,xt=gt.mediaRef,Mt=gt.onMediaChange,kt=gt.shapeId,zt=this.state.currentTime,Ht=xt.startTime,rr=xt.endTime,ur=ot||zt,_r=this.player.current.duration;rr&&(_r-=rr);var Dr=ur;this.player.current&&ur>=_r&&(Dr=Ht||0),Ht&&Dr<Ht&&(Dr=Ht),Mt({playing:!0,currentTime:Dr},kt)}}},{key:"syncPlayTimeLoop",value:function(ot){var gt=this,xt=this.props.onMediaChange;xt&&(this.syncPlayTime(ot),this.videoIntervalId=window.setInterval(function(){gt.syncPlayTime()},1e3))}},{key:"pauseAudio",value:function(){var ot=this;if(this.player.current){var gt=this.props.rtcClient;gt!==void 0?this.stopMixAudio(function(){return ot.player.current.pause()}):this.player.current.pause()}}},{key:"stopMixAudio",value:function(ot){var gt=this,xt=this.props,Mt=xt.rtcClient,kt=xt.logger;Mt.stopAudioMixing(function(zt,Ht){zt===714?(kt?.error("rtc mixing error : ".concat(Ht)),console.error(" stop audio mixing error :",Ht)):(gt.audioMixing=!1,ot())})}},{key:"playLocalAudio",value:function(){var ot=this.player.current.play();if(ot!==void 0){var gt=this.props,xt=gt.onMediaPlayError,Mt=gt.logger,kt=gt.shapeId;ot.then(function(){}).catch(function(zt){Mt?Mt.error("play audio exception: ".concat(zt)):console.error(zt),xt&&xt(kt,"audio",zt)})}}},{key:"playAudio",value:function(){if(this.player.current){var ot=this.props.rtcClient;ot!==void 0?this.mixAudio(this.player.current.currentTime,this.playLocalAudio.bind(this)):this.playLocalAudio()}}},{key:"mixAudio",value:function(ot,gt){var xt=this,Mt=this.props,kt=Mt.rtcClient,zt=Mt.audioURL,Ht=Mt.logger,rr=this.state.playing;rr?(kt?.setAudioMixingPosition(Math.floor(ot*1e3)),gt()):kt?.startAudioMixing(zt,!0,!1,1,function(ur,_r){ur===714?(Ht?.error("rtc mixing error : ".concat(_r)),console.error("rtc mixing error :",_r)):(kt?.setAudioMixingPosition(Math.floor(ot*1e3)),xt.audioMixing=!0,gt())})}},{key:"updateAnimation",value:function(ot){if(this.player.current){var gt=this.props,xt=gt.startTime,Mt=gt.startTimePerfix,kt=this.state.playing;ot.play===1&&this.player.current.paused&&(xt?this.player.current.currentTime=Mt+xt:this.player.current.currentTime=Mt,this.playAudio(),this.setState({playing:!0,currentTime:this.player.current.currentTime})),ot.stop===1&&this.player.current&&kt&&(this.pauseAudio(),this.setState({playing:!1}))}}},{key:"hasControl",value:function(ot,gt){var xt=this.props.shapeId;return!ot||gt===void 0?!1:ot[xt]===gt}},{key:"UNSAFE_componentWillReceivePropseslintreact",value:function(){this.pauseAudio(),this.stopSyncPlayTime(),window?.removeEventListener("_changeAudioState",function(){})}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.resourceLoader,Mt=gt.width,kt=gt.height,zt=gt.rtcClient,Ht=gt.audioURL,rr=gt.logger,ur=gt.controllerProtalId,_r=gt.mediaRef,Dr=this.state,Br=Dr.controllerPositionTop,Ur=Dr.controllerPositionLeft,Zr=Dr.displayController,Tn=Dr.duration,jn=Dr.playing,ts=Dr.currentTime;return tw.default.createElement("div",{style:{position:"relative"},onMouseLeave:function(){return ot.setState({displayController:!1})}},tw.default.createElement("img",{className:"ppt-event-source",alt:"audio",src:xt.replaceProtocolByresourceScheme(jL),style:{width:gu(Mt),height:gu(kt)},onMouseOver:this.onMouseOver.bind(this)}),tw.default.createElement("audio",{src:Ht,ref:this.player,muted:!!zt,onPlay:this.onMediaPlay.bind(this),onPause:this.onMediaPause.bind(this),onLoadedMetadata:function(){return ot.setState({duration:ot.player.current.duration})},onTimeUpdate:function(){return ot.setState({currentTime:ot.player.current.currentTime})},onLoadedMetadataCapture:function(){window.__platform==="ios"&&ot.onMediaCanPlay()},onCanPlay:function(){window.__platform!=="ios"&&ot.onMediaCanPlay()},onError:function(Os){var Hs;Os.target.error!==null&&(Hs=Os.target.error),Hs!==void 0?rr?.error("load media: ".concat(Ht," error, code: ").concat(Hs.code,", message: ").concat(Hs.message)):rr?.error("load media: ".concat(Ht," error without error message"))}}),tw.default.createElement(jO,{controllerRef:this.controller,protalId:ur,style:{position:"absolute",top:Br,left:Ur,zIndex:1},resourceLoader:xt,mediaRef:this.player,display:Zr,playing:jn,duration:Tn,currentTime:ts,onPlayClick:function(){ot.stopSyncPlayTime(),ot.syncPlayTimeLoop()},onPauseClick:function(){var Os=ot.props,Hs=Os.onMediaChange,Ks=Os.shapeId,so=ot.state.currentTime;ot.stopSyncPlayTime(),ot.pauseAudio(),Hs&&Hs({playing:!1,currentTime:so},Ks)},onSeekClick:function(Os){ot.stopSyncPlayTime(),ot.syncPlayTimeLoop(Os)},onMediaEnd:function(){ot.stopSyncPlayTime(),ot.pauseAudio(),ot.setState({playing:!1})},endTime:_r.endTime,startTime:_r.startTime}))}}]),at})(tw.default.Component),UL=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"identification",value:function(){var ot=this.props,gt=ot.slideIndex,xt=ot.spId;return"".concat(gt,"-").concat(xt,"-")}},{key:"injectAdjustValue",value:function(ot,gt){var xt=ot.childElementOptional("a:avLst");xt&&xt.elementsWithName("a:gd").forEach(function(Mt){var kt=Mt.attr.getString("fmla"),zt=new Ys(kt).eval(gt),Ht=Mt.attr.getString("name");gt.setVariable(Ht,zt)})}},{key:"render",value:function(){var ot=this.props,gt=ot.shapeXML,xt=ot.width,Mt=ot.height,kt=ot.fillColor,zt=ot.borderStyle,Ht=ot.children,rr=gt.childElementOptional("p:spPr","a:prstGeom"),ur=gt.childElementOptional("p:spPr","a:custGeom"),_r,Dr=new SA({w:xt,h:Mt}),Br="";if(rr){var Ur=rr.attr.getString("prst");this.injectAdjustValue(rr,Dr),_r=B0(Ur)}else ur?(_r=ur,Br="a:"):_r=B0("rect");var Zr=new wA().renderLumiaPath(_r,Dr,Br).map(function(Tn,jn){return M_.default.createElement("path",{key:"path".concat(jn),d:Tn.pathD,fill:Zl(kt),height:gu(Mt),width:gu(xt),stroke:Zl(zt.color),strokeWidth:gu(zt.width),strokeDasharray:zt.strokeDashArray})});return M_.default.createElement("svg",{style:{position:"absolute",width:gu(xt),height:gu(Mt),overflow:"visible"}},M_.default.createElement("defs",null,M_.default.createElement("clipPath",{id:"clippath-".concat(this.identification())},Zr)),Ht,Zr)}}]),at})(M_.default.Component),zL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.spId="",ot.opacity=1,ot.imageLoadingMonitor=new Qy(ut.logger).createMonitor(),ot.svgLoadingMonitor=new Qy(ut.logger).createMonitor(),ot.spId=ut.imageXML.extraAttr.getString("spId"),ot.getAlphaModFix(),ot}return Bt(at,[{key:"hasSoftEdge",get:function(){var ot=this.props.imageXML,gt=ot.childElementOptional("p:spPr","a:effectLst","a:softEdge");return!!gt}},{key:"hasBlipChild",get:function(){var ot=this.props.imageXML,gt=ot.childElementOptional("p:blipFill","a:blip");return!!gt?.elements.length}},{key:"needSpUrl",get:function(){return this.hasSoftEdge||this.hasBlipChild}},{key:"getAlphaModFix",value:function(){var ot=this.props.imageXML,gt=ot.childElement("p:blipFill"),xt=new UM(gt).getAlphaModFix();xt&&(this.opacity=xt)}},{key:"identification",value:function(){var ot=this.props.slideIndex;return"".concat(ot,"-").concat(this.spId,"-")}},{key:"render",value:function(){var ot=this.props,gt=ot.imageXML,xt=ot.width,Mt=ot.height,kt=ot.spURL,zt=ot.imageURL,Ht=ot.margin,rr=ot.uuid,ur=ot.slideIndex,_r=ot.borderStyle,Dr=gt.childElementOptional("p:blipFill","a:stretch","a:fillRect"),Br=(Dr?Dr.attr.getNumber("l",0)/Ap:0)*xt,Ur=(Dr?Dr.attr.getNumber("b",0)/Ap:0)*Mt,Zr=(Dr?Dr.attr.getNumber("r",0)/Ap:0)*xt,Tn=(Dr?Dr.attr.getNumber("t",0)/Ap:0)*Mt;if(gt.childElementOptional("p:spPr",new Np("a:prstGeom","a:custGeom"))===void 0){var jn=gt.childElementOptional("p:blipFill","a:srcRect"),ts={top:0,left:0,right:0,bottom:0};return jn&&(ts.top=Ey(jn.attr.getNumber("t",0)),ts.left=Ey(jn.attr.getNumber("l",0)),ts.right=Ey(jn.attr.getNumber("r",0)),ts.bottom=Ey(jn.attr.getNumber("b",0))),zC.default.createElement("div",{style:{overflow:"hidden",height:"100%"}},zC.default.createElement("img",{src:zt,style:{width:gu(xt),height:gu(Mt),position:"relative",top:"".concat(gu(Mt*-ts.top)),left:"".concat(gu(xt*-ts.left))},alt:"",ref:this.imageLoadingMonitor}))}else{var us=this.needSpUrl?kt:zt,Os=this.needSpUrl?1:this.opacity,Hs,Ks,so,To;return this.needSpUrl&&kt?(Hs=xt-Ht.left-Ht.right,Ks=Mt-Ht.top-Ht.bottom,so=void 0,To=void 0):(Hs=xt-Br-Zr,Ks=Mt-Tn-Ur,so=gu(-Ht.left+Br),To=gu(-Ht.top+Tn)),zC.default.createElement(UL,{uuid:rr,slideIndex:ur,borderStyle:_r,width:xt-Ht.left-Ht.right,height:Mt-Ht.top-Ht.bottom,shapeXML:gt,spId:this.spId},zC.default.createElement(kp,{innerref:this.svgLoadingMonitor,preserveAspectRatio:"none",xlinkHref:us||zt,href:us||zt,x:so,y:To,width:Hs,height:Ks,clipPath:"url(#clippath-".concat(this.identification(),")"),opacity:Os}))}}}]),at})(zC.default.Component),GL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.videoIntervalId=void 0,ot.lastAnimeState={stop:0,play:0},ot.player=F0.default.createRef(),ot.controller=F0.default.createRef(),ot.imageLoadingMonitor=new Qy(ut.logger).createMonitor(),ut.mediaState?ot.state={displayController:!1,playing:ut.mediaState.playing,currentTime:ut.mediaState.currentTime||ut.startTimePerfix,duration:0,controllerPositionTop:0,controllerPositionLeft:0}:ot.state={displayController:!1,playing:!1,currentTime:ut.startTimePerfix||0,duration:0,controllerPositionTop:0,controllerPositionLeft:0};var gt=ot.state.playing,xt=ot.props,Mt=xt.mediaSlideActionUserIds,kt=xt.userId;return gt&&ot.hasControl(Mt,kt)&&ot.syncPlayTimeLoop(),ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this,gt=this.props.targetID;window?.addEventListener("message",function(xt){xt.data.type==="_changeAudioState"&&xt.data.targetID===gt&&ot.updateAnimation(xt.data)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(ot){var gt=this.state.playing,xt=this.props,Mt=xt.disableAnimation,kt=xt.outsidePausing,zt=xt.mediaState,Ht=xt.rtcClient;if(Mt===!0){this.player.current&&this.pauseVideo();return}if(!kt&&ot.outsidePausing){this.player.current&&this.pauseVideo();return}else if(kt&&!ot.outsidePausing){this.player.current&&this.playVideo();return}if(zt!==void 0&&zt.playing===ot.mediaState.playing&&zt.currentTime===ot.mediaState.currentTime){gt!==zt.playing&&this.setState({playing:zt.playing});return}zt===void 0&&ot.mediaState!==void 0?(this.hasControl(ot.mediaSlideActionUserIds,ot.userId)||this.stopSyncPlayTime(),zt===void 0&&ot.mediaState!==void 0&&(this.player.current&&(this.pauseVideo(),this.player.current.currentTime=ot.mediaState.currentTime,ot.mediaState.playing===!0?this.playVideo():this.pauseVideo()),this.setState(ot.mediaState))):zt!==void 0&&ot.mediaState!==void 0&&(this.hasControl(ot.mediaSlideActionUserIds,ot.userId)||this.stopSyncPlayTime(),this.player.current&&(zt.playing?Math.abs(ot.mediaState.currentTime-this.player.current.currentTime)>1.5&&(this.player.current.currentTime=ot.mediaState.currentTime,ot.mediaState.playing&&Ht?.setAudioMixingPosition(Math.floor(this.player.current.currentTime*1e3))):this.player.current.currentTime=ot.mediaState.currentTime,gt&&!ot.mediaState.playing?this.pauseVideo():!gt&&ot.mediaState.playing&&this.playVideo(),this.setState({playing:ot.mediaState.playing,currentTime:ot.mediaState.currentTime})))}},{key:"componentWillUnmount",value:function(){this.pauseVideo(),this.stopSyncPlayTime(),window?.removeEventListener("_changeAudioState",function(){})}},{key:"onMediaPause",value:function(){var ot=this.state.currentTime,gt=this.props,xt=gt.onMediaPause,Mt=gt.shapeId;this.stopSyncPlayTime(),xt&&xt(Mt,"video",ot)}},{key:"onMediaPlay",value:function(){var ot=this.state.currentTime,gt=this.props,xt=gt.onMediaPlay,Mt=gt.shapeId;xt&&xt(Mt,"video",ot)}},{key:"onMouseOver",value:function(ot){var gt=this.state.displayController,xt=this.props.slideRef;if(gt!==!0){var Mt=ot.target,kt=Mt.getBoundingClientRect(),zt=kt.x,Ht=kt.y,rr=kt.height,ur=xt.current.getBoundingClientRect(),_r=ur.x,Dr=ur.y,Br=ur.width,Ur=ur.height,Zr=getComputedStyle(this.controller.current),Tn=Br/parseFloat(getComputedStyle(xt.current).width),jn=0,ts=0;Zr!==null&&Zr.width!==null&&(jn=parseInt(Zr.width,10)*Tn),Zr!==null&&Zr.height!==null&&(ts=parseInt(Zr.height,10)*Tn);var us=0,Os=0;zt<_r?Os=0:_r+Br<zt+jn?Os=Br-jn:Os=zt-_r,Ht+rr-ts<Dr?us=0:Ht+rr>Dr+Ur?us=Ur-ts:us=Ht+rr-Dr-ts,this.setState({displayController:!0,controllerPositionTop:us/Tn,controllerPositionLeft:Os/Tn})}}},{key:"onMediaCanPlay",value:function(){var ot=this.props,gt=ot.disableAnimation,xt=ot.mediaState,Mt=ot.rtcClient;gt===!0?this.pauseVideo():xt&&xt.playing&&(Mt&&!this.audioMixing||this.player.current.paused===!0&&(this.player.current.currentTime=xt.currentTime,this.playVideo()))}},{key:"hasControl",value:function(ot,gt){var xt=this.props.shapeId;return!ot||gt===void 0?!1:ot[xt]===gt}},{key:"stopSyncPlayTime",value:function(){this.videoIntervalId&&clearInterval(this.videoIntervalId)}},{key:"mixAudio",value:function(ot,gt){var xt=this,Mt=this.state.playing,kt=this.props,zt=kt.rtcClient,Ht=kt.logger,rr=kt.videoURL;Mt?(zt?.setAudioMixingPosition(Math.floor(ot*1e3)),gt()):zt?.startAudioMixing(rr,!0,!1,1,function(ur,_r){ur===714?(Ht?.error("rtc mixing error : ".concat(_r)),console.error("rtc mixing error :",_r)):(zt?.setAudioMixingPosition(Math.floor(ot*1e3)),xt.audioMixing=!0,gt())})}},{key:"updateAnimation",value:function(ot){if(this.player.current&&this.lastAnimeState){var gt=this.state.playing,xt=this.props,Mt=xt.startTime,kt=xt.startTimePerfix;this.lastAnimeState.play===0&&ot.play===1&&this.player.current&&(ot.stop===1?gt&&(this.pauseVideo(),this.setState({playing:!1})):gt||(Mt?this.player.current.currentTime=kt+Mt:this.player.current.currentTime=kt,this.playVideo(),this.setState({playing:!0}))),this.lastAnimeState.stop===0&&ot.stop===1&&this.player.current&&gt&&(this.pauseVideo(),this.setState({playing:!1}))}this.lastAnimeState=ot}},{key:"syncPlayTime",value:function(ot){if(this.player.current){var gt=this.state.currentTime,xt=this.props,Mt=xt.mediaRef,kt=xt.onMediaChange,zt=xt.shapeId,Ht=Mt.startTime,rr=Mt.endTime,ur=ot||gt,_r=this.player.current.duration;rr&&(_r-=rr);var Dr=ur;this.player.current&&ur>=_r&&(Dr=Ht||0),Ht&&Dr<=Ht&&(Dr=Ht),kt({playing:!0,currentTime:Dr},zt)}}},{key:"pauseVideo",value:function(){var ot=this,gt=this.props.rtcClient;this.player.current&&(gt!==void 0?this.stopMixAudio(function(){return ot.player.current.pause()}):this.player.current.pause())}},{key:"syncPlayTimeLoop",value:function(ot){var gt=this,xt=this.props.onMediaChange;xt&&(this.syncPlayTime(ot),this.videoIntervalId=window.setInterval(function(){gt.syncPlayTime()},1e3))}},{key:"stopMixAudio",value:function(ot){var gt=this,xt=this.props,Mt=xt.rtcClient,kt=xt.logger;Mt.stopAudioMixing(function(zt,Ht){zt===714?(kt?.error("rtc mixing error : ".concat(Ht)),console.error(" stop audio mixing error :",Ht)):(gt.audioMixing=!1,ot())})}},{key:"playLocalVideo",value:function(){var ot=this.player.current.play();if(ot!==void 0){var gt=this.props,xt=gt.onMediaPlayError,Mt=gt.logger,kt=gt.shapeId;ot.then(function(){}).catch(function(zt){Mt?Mt.error("play video exception: ".concat(zt)):console.error(zt),xt&&xt(kt,"video",zt)})}}},{key:"playVideo",value:function(){if(this.player.current){var ot=this.props.rtcClient;ot!==void 0?this.mixAudio(this.player.current.currentTime,this.playLocalVideo.bind(this)):this.playLocalVideo()}}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.mediaRef,Mt=gt.videoURL,kt=gt.width,zt=gt.height,Ht=gt.rtcClient,rr=gt.logger,ur=gt.controllerProtalId,_r=gt.resourceLoader,Dr=gt.onMediaChange,Br=gt.shapeId,Ur=this.state,Zr=Ur.controllerPositionTop,Tn=Ur.controllerPositionLeft,jn=Ur.displayController,ts=Ur.playing,us=Ur.duration,Os=Ur.currentTime,Hs=xt.startTime?xt.startTime*1e3:1e4,Ks="".concat(Mt,"?x-oss-process=video/snapshot,t_").concat(Hs,",m_fast,w_800,f_png,ar_auto");return F0.default.createElement("div",{className:"ppt-event-source",style:{position:"relative",width:gu(kt),height:gu(zt)},onMouseLeave:function(){return ot.setState({displayController:!1})}},F0.default.createElement("img",{src:Ks,alt:"poster",style:{position:"absolute",zIndex:0,top:0,left:0,width:gu(kt),height:gu(zt)},ref:this.imageLoadingMonitor}),F0.default.createElement("video",{className:"ppt-event-source","webkit-playsinline":"true",playsInline:!0,src:Mt,ref:this.player,muted:!!Ht,style:{position:"absolute",zIndex:1,top:0,left:0,width:gu(kt),height:gu(zt),objectFit:"fill"},poster:Ks,onPlay:this.onMediaPlay.bind(this),onPause:this.onMediaPause.bind(this),onLoadedMetadata:function(){return ot.setState({duration:ot.player.current.duration})},onTimeUpdate:function(){return ot.setState({currentTime:ot.player.current.currentTime})},onLoadedMetadataCapture:function(){window.__platform==="ios"&&ot.onMediaCanPlay()},onCanPlay:function(){window.__platform!=="ios"&&ot.onMediaCanPlay()},onError:function(To){var Oo;To.target.error!==null&&(Oo=To.target.error),Oo!==void 0?rr?.error("load media: ".concat(Mt," error, code: ").concat(Oo.code,", message: ").concat(Oo.message)):rr?.error("load media: ".concat(Mt," error without error message"))},onMouseOver:this.onMouseOver.bind(this),preload:"auto"}),F0.default.createElement(jO,{protalId:ur,style:{position:"absolute",top:Zr,left:Tn,zIndex:2,backfaceVisibility:"hidden"},resourceLoader:_r,controllerRef:this.controller,mediaRef:this.player,display:jn,playing:ts,duration:us,currentTime:Os,onPlayClick:function(){ot.stopSyncPlayTime(),ot.syncPlayTimeLoop()},onPauseClick:function(){ot.stopSyncPlayTime(),Dr&&Dr({playing:!1,currentTime:Os},Br)},onSeekClick:function(To){ot.stopSyncPlayTime(),ot.syncPlayTimeLoop(To)},onMediaEnd:function(){ot.stopSyncPlayTime(),ot.pauseVideo(),ot.setState({playing:!1})},endTime:xt.endTime,startTime:xt.startTime}))}}]),at})(F0.default.Component),VL=(function(){function yt(ct){Ot(this,yt),this.spTreeXML=ct}return Bt(yt,[{key:"indexBySpId",value:function(){var at={},ut=0,ot=Jt(this.spTreeXML.elements),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value,Mt=xt.extraAttr.getStringOptional("spId");typeof Mt=="string"&&(at[Mt]=ut,ut+=1)}}catch(kt){ot.e(kt)}finally{ot.f()}return at}}]),yt})(),HL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.lumiaRef=kx.default.createRef();var gt,xt=0,Mt=ut.shapeGroupTransform,kt=ut.shapeXML;if(kt.name==="p:sp"){var zt=kt.childElementOptional("p:spPr","a:xfrm");if(zt){var Ht=zt.attr.getNumber("rot",0);xt=Number(Ht)/J_}}var rr=Ts(kt),ur=(gt=Mt?.rotate)!=null?gt:0;return rr===Xr.EaVert&&xt+ur===270&&(ot.vertTextType=!0),ot}return Bt(at,[{key:"renderTextBody",value:function(ot){var gt,xt=this.props,Mt=xt.shapeWrapResource,kt=xt.slideContext,zt=xt.width,Ht=xt.height,rr=xt.resourceType,ur=xt.flipH,_r=xt.flipV,Dr=xt.uuid,Br=xt.withAnimation,Ur;return Mt&&!Mt.prop.specialShape&&(Ur=(gt=Mt.textBodyMap)==null?void 0:gt[0]),kx.default.createElement(r1,{slideContext:kt,txBodyXML:ot,width:zt,height:Ht,resourceType:rr,flipH:ur,flipV:_r,uuid:Dr,textBodyWrapResource:Ur,withAnimation:Br})}},{key:"renderShape",value:function(ot,gt){var xt,Mt,kt=0,zt=this.vertTextType,Ht=this.lumiaRef,rr=this.props,ur=rr.shapeGroupTransform,_r=rr.width,Dr=rr.height,Br=rr.fillColor,Ur=rr.groupFillColor,Zr=rr.borderStyle,Tn=rr.slideIndex,jn=rr.uuid,ts=rr.resourceLoader,us=rr.resourceType,Os=rr.logger;if(ot.name==="p:sp"){var Hs=ot.childElementOptional("p:spPr","a:xfrm");if(Hs){var Ks=Hs.attr.getNumber("rot",0);kt=Number(Ks)/J_}}if(ur){var so=Xt(kt,ur),To=so.scaleX,Oo=so.scaleY;xt=_r*To,Mt=Dr*Oo}else xt=_r,Mt=Dr;return kx.default.createElement(Uy,{vertTextType:zt,ref:Ht,fillColor:Br,groupFillColor:Ur,spId:ot.extraAttr.getString("spId"),borderStyle:Zr,width:xt,height:Mt,slideIndex:Tn,uuid:jn,resourceLoader:ts,resourceType:us,logger:Os,shapeXML:ot},gt?this.renderTextBody(gt):null)}},{key:"render",value:function(){var ot=this.props.shapeXML,gt=ot.childElementOptional("p:txBody");return this.renderShape(ot,gt)}}]),at})(kx.default.PureComponent);function sw(yt,ct,at){return"".concat(at,"_").concat(ct,"_").concat(yt)}function WL(yt,ct){if(!ct)return 1;var at=ct.slideIndex,ut=ct.slideCount,ot=ct.preSlideIndex,gt=1;switch(yt){case"firstslide":{gt=1;break}case"previousslide":{gt=at-1;break}case"endshow":{gt=ut;break}case"lastslide":{gt=ut;break}case"nextslide":{gt=at+1;break}case"lastslideviewed":gt=ot+1}return gt<1&&(gt=1),gt>ut&&(gt=ut),gt}function $O(yt,ct,at,ut){var ot=Xr.Horz,gt=yt.childElementOptional("p:txBody");gt&&gt.name==="p:txBody"&&(ot=ks(gt));var xt={x:yt.extraAttr.getNumber("x"),y:yt.extraAttr.getNumber("y"),width:yt.extraAttr.getNumber("width"),height:yt.extraAttr.getNumber("height")},Mt=yt.extraAttr.getBoolean("hidden"),kt=yt.extraAttr.getBoolean("flipV"),zt=yt.extraAttr.getBoolean("flipH"),Ht=yt.extraAttr.getNumberOptional("rot");if(ot===Xr.EaVert&&Ht===162e5){Ht=0;var rr=xt,ur=rr.x,_r=rr.y,Dr=rr.width,Br=rr.height;xt=El(_u({},xt),{x:ur+(Dr-Br)/2,y:_r+(Br-Dr)/2,width:Br,height:Dr})}var Ur={color:yt.extraAttr.getColor("borderColor"),width:yt.extraAttr.getNumber("borderWidth"),type:yt.extraAttr.getString("borderType"),strokeDashArray:yt.extraAttr.getString("borderStrokeDashArray")},Zr;yt.extraAttr.getOptional("fillColor")&&(Zr=yt.extraAttr.getColor("fillColor"),Zr instanceof sy&&Zr.setFillColor(ut.fillColor));var Tn=yt.childElementOptional("p:blipFill","a:srcRect"),jn;if(Tn){var ts=Ey(Tn.attr.getNumber("l",0)),us=Ey(Tn.attr.getNumber("r",0)),Os=Ey(Tn.attr.getNumber("t",0)),Hs=Ey(Tn.attr.getNumber("b",0)),Ks=1-ts-us,so=1-Os-Hs,To=xt.width/Ks,Oo=xt.height/so,Au=To*ts,Tu=Oo*Os,xu=To*us,yu=Oo*Hs;jn={width:To,height:Oo,margin:{left:Au,top:Tu,right:xu,bottom:yu}}}var sp=yt.childElementOptional(new Np("p:nvSpPr","p:nvPicPr"),"p:cNvPr","a:hlinkClick"),Jl;if(sp&&(Jl=sp.attr.getStringOptional("r:id"),!Jl)){var Ml=sp?.attr.getStringOptional("action"),Qp=new URL(Ml??"");if(Qp.pathname==="//hlinkshowjump"){var pm=["firstslide","previousslide","nextslide","lastslide","endshow","lastslideviewed"],Uv=Qp.searchParams.get("jump");pm.includes(Uv)&&(Jl=WL(Uv,ct))}}return{rectangle:xt,borderStyle:Ur,fillColor:Zr,tailor:jn,flipV:kt,flipH:zt,rotate:Ht,parentGroupShapeId:at,hidden:Mt,hyperLinkDestination:Jl}}var Wk=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.animeTarget=I_.default.createRef(),ot.shapeMap=new _t($O),ot.childrenRef=I_.default.createRef(),ot.eventSourceId=void 0,ot.emptyClick=function(){},ot.onClick=function(Ht){var rr=ot.props,ur=rr.onHyperLinkClick,_r=rr.onEventSourceClick;if(ot.shapeWrapperParams.hyperLinkDestination!==void 0)return ur?ur(ot.shapeWrapperParams.hyperLinkDestination,Ht):void 0;if(ot.eventSourceId!==void 0)return _r?_r(ot.eventSourceId):void 0},ot.state={soundEffectUrl:null};var gt=ut.shapeXML,xt=ut.resourceType,Mt=ut.shapeGroupTransform,kt=ut.onEventSourceClick;if(ot.spId=gt.extraAttr.getString("spId"),ot.resourceType=xt,ot.player=I_.default.createRef(),ot.shapeWrapperParams=ot.shapeMap.map(gt,ut.slideContext,Mt),ut.eventSourceId!==void 0)ot.eventSourceId=ut.eventSourceId;else{var zt=sw(ut.slideContext.uuid,ut.slideContext.slideIndex,ot.spId);ut.interactiveSeqsKeys&&ut.interactiveSeqsKeys.indexOf(zt)!==-1&&kt!==void 0&&(ot.eventSourceId=zt)}return ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this,gt=this.props.slideContext;window?.addEventListener("message",function(xt){xt.data.type==="_playSoundEffect"&&xt.data.targetID===sw(gt.uuid,gt.slideIndex,ot.spId)&&ot.playEffectSound(xt.data.targetID,xt.data.soundEffectId)})}},{key:"getPositionAndSize",value:function(){var ot,gt,xt,Mt,kt=0,zt=this.props,Ht=zt.shapeXML,rr=zt.shapeGroupTransform;if(Ht.name==="p:sp"||Ht.name==="p:pic"){var ur=Ht.childElementOptional("p:spPr","a:xfrm");if(ur){var _r=ur.attr.getNumber("rot",0);kt=Number(_r)/J_}}if(rr){var Dr=this.shapeWrapperParams.rectangle,Br=Dr.x,Ur=Dr.y,Zr=Dr.width,Tn=Dr.height,jn=rr.scaleX,ts=rr.scaleY,us=rr.translateX,Os=rr.translateY;Math.abs(Math.cos(kt/180*Math.PI))>=Math.abs(Math.sin(kt/180*Math.PI))?(ot=(Br+us)*jn,gt=(Ur+Os)*ts,xt=Zr*jn,Mt=Tn*ts):(ot=(Br+us+Zr/2)*jn-Zr*ts/2,gt=(Ur+Os+Tn/2)*ts-Tn*jn/2,xt=Zr*ts,Mt=Tn*jn)}else ot=this.shapeWrapperParams.rectangle.x,gt=this.shapeWrapperParams.rectangle.y,xt=this.shapeWrapperParams.rectangle.width,Mt=this.shapeWrapperParams.rectangle.height;return{left:gu(ot),top:gu(gt),width:gu(xt),height:gu(Mt)}}},{key:"transform",value:function(ot){var gt={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0},xt=this.transformWithShapeParams(ot,gt),Mt=xt.translateX,kt=xt.translateY,zt=xt.scaleX,Ht=xt.scaleY,rr=xt.rotate,ur=(ot.rotate||0)+rr;return zt<0&&(ur=-ur),Ht<0&&(ur=-ur),"translate(".concat(gu(Mt),", ").concat(gu(kt),") scale(").concat(zt,",").concat(Ht,") rotate(").concat(pS(ur),"deg)")}},{key:"transformWithShapeParams",value:function(ot,gt){var xt=gt.translateX,Mt=gt.translateY,kt=ot.flipH?-gt.scaleX:gt.scaleX,zt=ot.flipV?-gt.scaleY:gt.scaleY,Ht=0;return gt.rotate&&typeof gt.rotate=="number"&&(Ht=gt.rotate),{translateX:xt,translateY:Mt,scaleX:kt,scaleY:zt,rotate:Ht}}},{key:"playEffectSound",value:function(ot,gt){if(gt!==void 0){var xt=this.props,Mt=xt.resourceType,kt=xt.slideContext;if(Mt==="slide"){var zt=kt.resourceLoader.loadURL(Mt,gt);if(zt){var Ht=document.getElementById("".concat(ot));if(Ht){var rr=document.createElement("audio");return rr.id="".concat(ot,"-").concat(gt),rr.onpause=function(){rr.remove()},rr.src=zt,rr.controls=!1,Ht.appendChild(rr),rr.play().then(function(){},function(){}),!0}}}}return!1}},{key:"renderShape",value:function(ot){var gt=ot.tailor,xt={left:0,right:0,top:0,bottom:0},Mt=ot.rectangle;gt&&(Mt=El(_u({},Mt),{width:gt.width,height:gt.height}),xt=gt.margin);var kt=this.props,zt=kt.flipH,Ht=kt.flipV,rr=kt.shapeGroupTransform,ur=kt.resourceType,_r=!!zt!==ot.flipH,Dr=!!Ht!==ot.flipV;return this.renderChildren({play:ot.play,stop:ot.stop,width:Mt.width,height:Mt.height,borderStyle:ot.borderStyle,fillColor:ot.fillColor,rotate:ot.rotate,margin:xt,shapeGroupTransform:rr,flipH:_r,flipV:Dr,resoureType:ur})}},{key:"renderChildren",value:function(ot){var gt=this.props.children;if(typeof gt=="function"){var xt=gt(ot);return xt&&I_.default.cloneElement(xt,{ref:this.childrenRef})}else return I_.default.cloneElement(gt,{ref:this.childrenRef})}},{key:"render",value:function(){var ot,gt=this.state.soundEffectUrl,xt=this.getPositionAndSize(),Mt=xt.left,kt=xt.top,zt=xt.height,Ht=xt.width,rr;this.shapeWrapperParams.hidden===!0&&(rr="none");var ur=(ot=this.shapeWrapperParams.hyperLinkDestination)!=null?ot:this.eventSourceId!==void 0,_r=Zl(this.shapeWrapperParams.fillColor)!=="none"?(0,rw.default)(Zl(this.shapeWrapperParams.fillColor)):(0,rw.default)("#FFFFFF00"),Dr=_r.hsl().array(),Br=this.props,Ur=Br.slideContext,Zr=Br.zIndex;return I_.default.createElement("div",{className:"spId-".concat(this.spId," ").concat(ur?" ppt-event-source":""),id:sw(Ur.uuid,Ur.slideIndex,this.spId),ref:this.animeTarget,style:{position:"absolute",display:rr,zIndex:Zr,left:Mt,top:kt,width:Ht,height:zt,transform:this.transform(this.shapeWrapperParams),opacity:1,backfaceVisibility:"hidden","--sp-fill-h":_r&&Dr[0],"--sp-fill-s":_r&&Dr[1]+"%","--sp-fill-l":_r&&Dr[2]+"%","--sp-fill-a":_r?_r.alpha():0},onClick:ur?this.onClick.bind(this,this.spId):this.emptyClick},gt&&I_.default.createElement("audio",{src:gt,ref:this.player,controls:!1}),this.renderShape(this.shapeWrapperParams))}}]),at})(I_.default.Component);function Xk(yt,ct,at,ut){var ot=yt.childElementOptional("p:grpSpPr","a:xfrm"),gt=0,xt=0,Mt=0,kt=0,zt=1,Ht=1,rr=1,ur;yt.extraAttr.getOptional("fillColor")&&(ur=yt.extraAttr.getColor("fillColor"),ur instanceof sy&&ur.setFillColor(ut.fillColor));var _r=!1,Dr=!1,Br=0,Ur,Zr={},Tn={x:0,y:0,width:ct?ct.slideWidth:0,height:ct?ct.slideHeight:0},jn=0;if(ot){var ts=yt.childElementOptional("p:grpSpPr","a:xfrm","a:chExt"),us=yt.childElementOptional("p:grpSpPr","a:xfrm","a:ext"),Os=yt.childElementOptional("p:grpSpPr","a:xfrm","a:chOff");Mt=ts?ts.attr.getNumber("cx"):0,kt=ts?ts.attr.getNumber("cy"):0,zt=Mt===0||!us?1:us.attr.getNumber("cx")/Mt,zt=Number.isNaN(zt)?1:zt,Ht=Mt===0||!us?1:us.attr.getNumber("cy")/kt,Ht=Number.isNaN(Ht)?1:Ht,gt=Os?-Os.attr.getNumber("x"):0,xt=Os?-Os.attr.getNumber("y"):0,jn=ot.attr.getNumber("rot",0),Br=jn/J_,_r=ot.attr.getBoolean("flipV",!1),Dr=ot.attr.getBoolean("flipH",!1);var Hs=yt.childElementOptional("p:grpSpPr","a:xfrm","a:off");Tn={x:Hs?Hs.attr.getNumber("x"):0,y:Hs?Hs.attr.getNumber("y"):0,width:us?us.attr.getNumber("cx"):0,height:us?us.attr.getNumber("cy"):0}}var Ks={translateX:gt,translateY:xt,scaleX:zt,scaleY:Ht,rotate:Br,fillColor:ur},so=yt.extraAttr.getBooleanOptional("hidden");return{rectangle:Tn,borderStyle:Zr,opacity:rr,tailor:Ur,flipV:_r,flipH:Dr,transform:Ks,parentGroupShapeId:at,fillColor:ur,rotate:jn,hidden:so}}var Yk=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.animeTarget=L0.default.createRef(),ot.eventSourceId=void 0,ot.shapeWrappers=[],ot.shapeMap=new _t(Xk),ot.renderShape=function(Ht,rr,ur,_r,Dr,Br,Ur){var Zr=rr.extraAttr.getString("spId"),Tn=Zr.replace("l","").replace("m",""),jn=ot.props,ts=jn.slideContext,us=jn.interactiveSeqsKeys,Os=jn.onEventSourceClick,Hs=jn.onHyperLinkClick,Ks=jn.resourceType,so=jn.uuid,To=jn.wrapResource,Oo=jn.animationManager,Au=!1,Tu=rr.childElementOptional(new Np("p:nvSpPr","p:nvCxnSpPr"));if(Tu&&(Au=!!Tu.childElementOptional("p:nvPr","p:ph")),!(Ks!=="slide"&&Au))return L0.default.createElement(Wk,{key:"".concat(ur),ref:function(yu){return ot.shapeWrappers.push(yu)},shapeXML:rr,slideContext:ts,shapeGroupTransform:_r,interactiveSeqsKeys:us,eventSourceId:ot.eventSourceId,onEventSourceClick:Os,onHyperLinkClick:Hs,zIndex:ot.zIndex(Ht,rr),resourceType:Ks,flipV:Ur,flipH:Br},function(xu){return L0.default.createElement(HL,{uuid:so,width:xu.width,fillColor:xu.fillColor,slideContext:ts,height:xu.height,slideIndex:ts.slideIndex,groupFillColor:Dr.fillColor,borderStyle:xu.borderStyle,shapeGroupTransform:xu.shapeGroupTransform,shapeXML:rr,resourceLoader:ts.resourceLoader,resourceType:Ks,shapeWrapResource:To?.shapes[Tn],withAnimation:Oo?.withTextAnimation(Zr),flipV:xu.flipV,flipH:xu.flipH})})},ot.renderPicture=function(Ht,rr,ur,_r){var Dr=ot.props,Br=Dr.slideContext,Ur=Dr.interactiveSeqsKeys,Zr=Dr.onEventSourceClick,Tn=Dr.onHyperLinkClick,jn=Dr.resourceType;return L0.default.createElement(Wk,{key:"".concat(ur),shapeXML:rr,ref:function(us){return ot.shapeWrappers.push(us)},slideContext:Br,interactiveSeqsKeys:Ur,shapeGroupTransform:_r,eventSourceId:ot.eventSourceId,onEventSourceClick:Zr,onHyperLinkClick:Tn,zIndex:ot.zIndex(Ht,rr),resourceType:jn},function(ts){return ot.renderPictureContent(rr,ts,Br.resourceLoader,_r)})},ot.renderGraph=function(Ht,rr,ur,_r){var Dr=rr.extraAttr.getString("spId"),Br=ot.props,Ur=Br.slideContext,Zr=Br.interactiveSeqsKeys,Tn=Br.onEventSourceClick,jn=Br.onHyperLinkClick,ts=Br.resourceType,us=Br.uuid,Os=Br.wrapResource;return L0.default.createElement(Wk,{key:"".concat(ur),shapeXML:rr,ref:function(Ks){return ot.shapeWrappers.push(Ks)},slideContext:Ur,interactiveSeqsKeys:Zr,eventSourceId:ot.eventSourceId,onEventSourceClick:Tn,onHyperLinkClick:jn,zIndex:ot.zIndex(Ht,rr),resourceType:ts,shapeGroupTransform:_r},function(Hs){return L0.default.createElement(LL,{uuid:us,slideContext:Ur,width:Hs.width,height:Hs.height,rotate:Hs.rotate,borderStyle:Hs.borderStyle,fillColor:Hs.fillColor,key:"".concat(ur),shapeGroupTransform:Hs.shapeGroupTransform,graphXML:rr,shapeWrapResource:Os?.shapes[Dr],resourceType:Hs.resoureType})})},ot.renderShapeGroup=function(Ht,rr,ur,_r,Dr,Br){var Ur=ot.zIndex(Ht,rr),Zr=ot.props,Tn=Zr.uuid,jn=Zr.slideRef,ts=Zr.slideContext,us=Zr.interactiveSeqsKeys,Os=Zr.resourceType,Hs=Zr.onEventSourceClick,Ks=Zr.onHyperLinkClick,so=Zr.meidaStates,To=Zr.disableAnimation,Oo=Zr.onMediaChange,Au=Zr.onMediaPause,Tu=Zr.onMediaPlay,xu=Zr.onMediaPlayError,yu=Zr.mediaSlideActionUserIds,sp=Zr.rtcClient,Jl=Zr.userId,Ml=Zr.wrapResource;return L0.default.createElement(at,{key:"".concat(ur),uuid:Tn,slideRef:jn,slideContext:ts,zIndex:Ur,shapeGroupXML:rr,interactiveSeqsKeys:us,eventSourceId:ot.eventSourceId,resourceType:Os,onEventSourceClick:Hs,onHyperLinkClick:Ks,shapeGroupTransform:_r,flipH:Dr,flipV:Br,meidaStates:so,disableAnimation:To,onMediaChange:Oo,onMediaPlay:Tu,onMediaPause:Au,onMediaPlayError:xu,userId:Jl,mediaSlideActionUserIds:yu,wrapResource:Ml,rtcClient:sp})},ot.state={soundEffectUrl:null};var gt=ot.props,xt=gt.shapeGroupXML,Mt=gt.onEventSourceClick,kt=xt.extraAttr.getString("spId");ot.shapeId=kt;var zt=sw(ut.slideContext.uuid,ut.slideContext.slideIndex,kt);return ut.interactiveSeqsKeys&&ut.interactiveSeqsKeys.indexOf(zt)!==-1&&Mt!==void 0&&(ot.eventSourceId=zt),ot.player=L0.default.createRef(),ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this,gt=this.props.slideContext;window?.addEventListener("message",function(xt){xt.data.type==="_playSoundEffect"&&xt.data.targetID===sw(gt.uuid,gt.slideIndex,ot.shapeId)&&ot.playEffectSound(xt.data.targetID,xt.data.soundEffectId)})}},{key:"componentDidCatch",value:function(ot,gt){var xt=this.props.logger;xt&&xt.error("catch render error: ",ot," stack: ",gt.componentStack),this.setState({error:!0})}},{key:"transformWithShapeParams",value:function(ot,gt){var xt=gt.translateX,Mt=gt.translateY,kt=ot.flipH?-gt.scaleX:gt.scaleX,zt=ot.flipV?-gt.scaleY:gt.scaleY,Ht=0;return gt.rotate&&typeof gt.rotate=="number"&&(Ht=gt.rotate),{translateX:xt,translateY:Mt,scaleX:kt,scaleY:zt,rotate:Ht}}},{key:"transform",value:function(ot){var gt=this.props.shapeGroupTransform,xt={translateX:0,translateY:0,scaleX:1,scaleY:1,rotate:0};gt&&(xt.rotate=gt.rotate+xt.rotate);var Mt=this.transformWithShapeParams(ot,xt),kt=Mt.translateX,zt=Mt.translateY,Ht=Mt.scaleX,rr=Mt.scaleY,ur=Mt.rotate;return"translate(".concat(gu(kt),", ").concat(gu(zt),") scale(").concat(Ht,",").concat(rr,") rotate(").concat(pS(ur)+ot.transform.rotate,"deg)")}},{key:"updateAnimation",value:function(ot){var gt;(gt=this.player)!=null&&gt.current&&(ot.play===1&&ot.stop===0?this.player.current.play().then(function(){},function(){}):ot.play===0&&ot.stop===1&&this.player.current.pause())}},{key:"playEffectSound",value:function(ot,gt){if(gt!==void 0){var xt=this.props,Mt=xt.resourceType,kt=xt.slideContext;if(Mt==="slide"){var zt=kt.resourceLoader.loadURL(Mt,gt);if(zt){var Ht=document.getElementById("".concat(ot));if(Ht){var rr=document.createElement("audio");return rr.id="".concat(ot,"-").concat(gt),rr.onpause=function(){rr.remove()},rr.src=zt,rr.controls=!1,Ht.appendChild(rr),rr.play().then(function(){},function(){}),!0}}}}return!1}},{key:"parseMediaRef",value:function(ot,gt){if(gt){var xt=this.props.resourceType,Mt=gt.childElementOptional(new Np("a:videoFile","a:audioFile"));if(Mt){var kt=Mt.name==="a:videoFile"?"video":"audio",zt=Mt.attr.getString("r:link"),Ht=ot.loadURL(xt,zt);if(Ht)return{resURL:Ht,mediaType:kt};var rr=gt.childElementOptional("p:extLst","p:ext");if(rr&&rr.attr.getString("uri")==="{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}"){var ur=rr.childElement("p14:media"),_r=ur.attr.getStringOptional("r:link"),Dr=ur.attr.getStringOptional("r:embed"),Br=_r||Dr||"unknow";if(ur.hasChildElementWithName("p14:trim")){var Ur=ur.childElement("p14:trim"),Zr=Ur.attr.getNumberOptional("st"),Tn=Ur.attr.getNumberOptional("end");return Zr&&(Zr/=1e3),Tn&&(Tn/=1e3),{resURL:ot.loadURL(xt,Br),mediaType:kt,startTime:Zr,endTime:Tn}}else return{resURL:ot.loadURL(xt,Br),mediaType:kt}}}return}else return}},{key:"zIndex",value:function(ot,gt){var xt=gt.extraAttr.getStringOptional("spId");if(typeof xt=="string"){var Mt=new VL(ot).indexBySpId();if(xt in Mt)return Mt[xt]}return 999}},{key:"renderPictureContent",value:function(ot,gt,xt,Mt){var kt=gt.width,zt=gt.height,Ht=gt.fillColor,rr=gt.borderStyle,ur=gt.margin,_r=ot.childElementOptional("p:nvPicPr","p:nvPr"),Dr=ot.childElement("p:nvPicPr","p:cNvPr").attr.getString("id"),Br=this.parseMediaRef(xt,_r),Ur=ot.childElementOptional("p:blipFill","a:blip"),Zr=0,Tn=ot?.childElementOptional("p:spPr","a:xfrm");if(Tn){var jn=Tn.attr.getNumber("rot",0);Zr=Number(jn)/J_}var ts,us,Os=_u({},ur);if(Mt){var Hs=Xt(Zr,Mt),Ks=Hs.scaleX,so=Hs.scaleY;ts=kt*Ks,us=zt*so,Os.left*=Ks,Os.right*=Ks,Os.top*=so,Os.bottom*=so}else ts=kt,us=zt;var To=this.props,Oo=To.meidaStates,Au=To.uuid,Tu=To.slideContext,xu=To.logger,yu=To.slideRef,sp=To.pausing,Jl=To.disableAnimation,Ml=To.onMediaChange,Qp=To.onMediaPause,pm=To.onMediaPlay,Uv=To.onMediaPlayError,mv=To.userId,P_=To.mediaSlideActionUserIds,ox=To.rtcClient,xS=To.resourceType,RA=Oo?Oo[Dr]:void 0;if(Br&&Br.mediaType==="video")return L0.default.createElement(GL,{width:ts,uuid:Au,controllerProtalId:"netless-media-controller-portal-".concat(Tu.uuid),logger:xu,slideRef:yu,startTimePerfix:Br.startTime?Br.startTime:0,outsidePausing:sp,height:us,fillColor:Ht,borderStyle:rr,videoURL:Br.resURL,shapeId:Dr,targetID:sw(Tu.uuid,Tu.slideIndex,Dr),mediaState:RA,resourceLoader:xt,disableAnimation:Jl,onMediaChange:Ml,onMediaPlay:pm,onMediaPause:Qp,onMediaPlayError:Uv,userId:mv,mediaSlideActionUserIds:P_,rtcClient:ox,mediaRef:Br});if(Br&&Br.mediaType==="audio")return L0.default.createElement($L,{width:ts,controllerProtalId:"netless-media-controller-portal-".concat(Tu.uuid),logger:xu,slideRef:yu,startTimePerfix:Br.startTime?Br.startTime:0,outsidePausing:sp,height:us,borderStyle:rr,uuid:Au,audioURL:Br.resURL,shapeId:Dr,targetID:sw(Tu.uuid,Tu.slideIndex,Dr),mediaState:RA,resourceLoader:xt,disableAnimation:Jl,onMediaChange:Ml,onMediaPlay:pm,onMediaPause:Qp,onMediaPlayError:Uv,userId:mv,mediaSlideActionUserIds:P_,rtcClient:ox,mediaRef:Br});if(Ur){var aE=Ur.attr.getStringOptional("r:embed");if(aE===void 0)return null;{var PA=xt.loadURL(xS,aE),eD;return Dr&&(eD=xt.loadURL(xS,"spId".concat(Dr))),L0.default.createElement(zL,{width:ts,uuid:Tu.uuid,logger:xu,resourceType:xS,resId:aE,height:us,slideIndex:Tu.slideIndex,fillColor:Ht,borderStyle:rr,imageURL:PA,margin:Os,imageXML:ot,preload:Tu.preload,spURL:eD})}}else return null}},{key:"renderShapeGroupContent",value:function(ot){var gt=this,xt=this.props,Mt=xt.shapeGroupXML,kt=xt.shapeGroupTransform,zt=xt.flipH,Ht=xt.flipV,rr=Mt.elementsWithName("p:sp"),ur=Mt.elementsWithName("p:cxnSp"),_r=Mt.elementsWithName("p:pic"),Dr=Mt.elementsWithName("p:graphicFrame"),Br=Mt.elementsWithName("p:grpSp");Mt.elementsWithName("mc:AlternateContent").forEach(function(ts){var us=ts.childElementOptional("mc:Choice","p:graphicFrame");if(us)Dr.push(us);else{var Os=ts.childElementOptional("mc:Fallback","p:pic");Os&&_r.push(Os)}});var Ur=_u({},ot.transform),Zr=kt;Zr&&(Ur.rotate+=Zr.rotate,Ur.scaleX*=Zr.scaleX,Ur.scaleY*=Zr.scaleY);var Tn=!!zt!==ot.flipH,jn=!!Ht!==ot.flipV;return L0.default.createElement(L0.default.Fragment,null,rr.map(function(ts,us){return gt.renderShape(Mt,ts,us,Ur,ot,Tn,jn)}),ur.map(function(ts,us){return gt.renderShape(Mt,ts,us,Ur,ot,Tn,jn)}),_r.map(function(ts,us){return gt.renderPicture(Mt,ts,us,Ur)}),Dr.map(function(ts,us){return gt.renderGraph(Mt,ts,us,Ur)}),Br.map(function(ts,us){return gt.renderShapeGroup(Mt,ts,us,Ur,Tn,jn)}))}},{key:"render",value:function(){this.shapeWrappers=[];var ot=this.state,gt=ot.error,xt=ot.soundEffectUrl;if(gt)return L0.default.createElement("div",{"data-reason":"render error"});var Mt=this.props,kt=Mt.shapeGroupXML,zt=Mt.slideContext,Ht=Mt.shapeGroupTransform,rr=Mt.zIndex,ur=this.shapeMap.map(kt,zt,Ht),_r=kt.extraAttr.getString("spId"),Dr,Br,Ur,Zr;return Ht?(Dr=gu((ur.rectangle.x+Ht.translateX)*Ht.scaleX),Br=gu((ur.rectangle.y+Ht.translateY)*Ht.scaleY),Ur=gu(ur.rectangle.width*Ht.scaleX),Zr=gu(ur.rectangle.height*Ht.scaleY)):(Dr=gu(ur.rectangle.x),Br=gu(ur.rectangle.y),Ur=gu(ur.rectangle.width),Zr=gu(ur.rectangle.height)),L0.default.createElement("div",{ref:this.animeTarget,className:"spGoupId-"+_r,id:sw(zt.uuid,zt.slideIndex,_r),style:{position:"absolute",left:Dr,top:Br,transform:this.transform(ur),width:Ur,height:Zr,zIndex:rr,opacity:ur.opacity}},xt&&L0.default.createElement("audio",{src:xt,ref:this.player,controls:!1}),this.renderShapeGroupContent(ur))}}]),at})(L0.default.Component),Kv="-1",XL="sequenceIndexes",YL="disableAutoPlay",QL="playLastStep",hN;(function(yt){yt[yt.Normal=0]="Normal",yt[yt.Preview=1]="Preview"})(hN||(hN={}));var UO=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,ut),ot.eventHub=new Pp.default,ot.isImageLoadFinished=!1,ot.shapeGroupRef=YS.default.createRef(),ot.onHyperLinkClick=function(kt,zt){var Ht,rr,ur=ot.props,_r=ur.data,Dr=ur.stateAdapter,Br=ot.getTurnToSlide(kt,zt);if(Br){var Ur=Br.match(/slide(\S*)/);Ur!==null&&((Ht=Dr?.onPageJumpTo)==null||Ht.call(Dr,_r.uuid,parseInt(Ur[1],10)))}typeof kt=="number"&&((rr=Dr?.onPageJumpTo)==null||rr.call(Dr,_r.uuid,kt))},ot.onEventSourceClick=function(kt){ot.mainAnimationManager.interactiveSeqs.get(kt)&&ot.onMasterEventSourceClick(kt)},ot.onMediaPlay=function(kt,zt,Ht){window!==void 0&&window.postMessage({shapeId:kt,mediaType:zt,action:"play"},"*");var rr=ot.props.callbacks;rr&&rr.onMediaPlay&&rr.onMediaPlay(kt,zt)},ot.onMediaPause=function(kt,zt,Ht){var rr=ot.props,ur=rr.userId,_r=rr.callbacks,Dr=ot.state.mediaActionUserIds;ur!==void 0&&Dr!==void 0&&Dr[ot.currentSlideKey]!==void 0&&Dr[ot.currentSlideKey][kt]===ur&&ot.setMediaState({playing:!1,currentTime:Ht},kt),window!==void 0&&window.postMessage({shapeId:kt,mediaType:zt,action:"pause"},"*"),_r&&_r.onMediaPause&&_r.onMediaPause(kt,zt)},ot.setMediaState=function(kt,zt){var Ht=ot.props,rr=Ht.pptState,ur=Ht.userId,_r=Ht.stateAdapter,Dr=Ht.data,Br,Ur;if(rr===void 0||rr.mediaStates===void 0)Br=rt({},ot.currentSlideKey,rt({},zt,kt)),ur!==void 0&&(Ur=rt({},ot.currentSlideKey,rt({},zt,ur)));else{var Zr=rr.mediaStates[ot.currentSlideKey];if(Zr===void 0?Zr=rt({},zt,kt):Zr[zt]=kt,ur!==void 0){var Tn=ot.state.mediaActionUserIds;Tn!==void 0?Tn[ot.currentSlideKey]!==void 0?Ur=El(_u({},Tn),rt({},ot.currentSlideKey,El(_u({},Tn[ot.currentSlideKey]),rt({},zt,ur)))):Ur=El(_u({},Tn),rt({},ot.currentSlideKey,rt({},zt,ur))):Ur=rt({},ot.currentSlideKey,rt({},zt,ur))}Br=El(_u({},rr.mediaStates),rt({},ot.currentSlideKey,Zr))}_r.setState(Dr.uuid,Dr.index,El(_u({},rr),{mediaStates:Br,mediaActionUserIds:Ur}))};var gt,xt,Mt=ut.data;return ot.preSlideIndex=(xt=(gt=ut.pptState)==null?void 0:gt.preSlideIndex)!=null?xt:0,ot.currentSlideKey="".concat(Mt.uuid,"-").concat(Mt.index),ot.masterAnimationManager=Mt.animations.masterAnimationManager,ot.layoutAnimationManager=Mt.animations.layoutAnimationManager,ot.slideAnimationManager=Mt.animations.slideAnimationManager,ot.mainAnimationManager=Mt.animations.mainAnimationManager,ot.animationCount=Mt.animations.animationCount,ot.initSlideStates(),ot.masterInteractiveSeqsKeys=Array.from(ot.masterAnimationManager.interactiveSeqs.keys()),ot.layoutInteractiveSeqsKeys=Array.from(ot.layoutAnimationManager.interactiveSeqs.keys()),ot.slideInteractiveSeqsKeys=Array.from(ot.slideAnimationManager.interactiveSeqs.keys()),ot.slide=YS.default.createRef(),ot.isRenderMaster=ut.data.layoutXML.childElement("p:sldLayout").attr.getBoolean("showMasterSp",!0),ot.changeStep.bind(Kt(ot)),lt.reset(ot.eventHub),ot}return Bt(at,[{key:"componentDidMount",value:function(){this.isImageLoadFinished=lt.endLoadTask("slideDidUpdate"),this.mainAnimationManager.animBoxes.forEach(function(zt){return zt.applyPreAnimation()});var ot=this.getMainStepsFromSequences();this.mainAnimationManager.mainSeq.effectType!=="clickEffect"&&ot===1?(this.mainAnimationManager.mainSeq.seekIndex(0),this.mainAnimationManager.mainSeq.play()):ot&&this.mainAnimationManager.mainSeq.seekIndex(ot);var gt=this.state[this.currentSlideKey],xt=gt.sequenceSteps,Mt=gt.layoutSequenceSteps,kt=gt.masterSequenceSteps;this.mainAnimationManager.interactiveSeqs.forEach(function(zt,Ht){xt&&xt[Ht]?zt.seekIndex(xt[Ht]):Mt&&Mt[Ht]?zt.seekIndex(Mt[Ht]):kt&&kt[Ht]?zt.seekIndex(kt[Ht]):zt.seekIndex(0)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(ot){var gt=this;if(ot.pptState!==void 0){var xt=this.props.pptState;if(this.setState(ot.pptState),!xt||!xt[this.currentSlideKey]){this.playAnime(xt,ot.pptState,this.mainAnimationManager.mainSeq,Kv),this.mainAnimationManager.interactiveSeqs.forEach(function(Mt,kt){gt.playAnime(xt,ot.pptState,Mt,kt)});return}if(this.mainAnimationManager.interactiveSeqs.forEach(function(Mt,kt){gt.playAnime(xt,ot.pptState,Mt,kt)}),!ot.pptState[this.currentSlideKey])return;this.playAnime(xt,ot.pptState,this.mainAnimationManager.mainSeq,Kv)}}},{key:"componentDidUpdate",value:function(ot,gt){var xt=this,Mt=this.props.data;ot.data.index!==Mt.index&&lt.endLoadTask("slideDidUpdate");var kt=this.state[this.currentSlideKey],zt=gt[this.currentSlideKey];zt!==void 0&&kt===void 0&&(this.resetAnimation(),this.mainAnimationManager.mainSeq.seekIndex(0),setTimeout(function(){xt.mainAnimationManager.mainSeq.effectType!=="clickEffect"&&xt.mainAnimationManager.mainSeq.play();var Ht=xt.initSlideAnimationState();ot.stateAdapter.setState(Mt.uuid,Mt.index,_u({},xt.composeSlideStateIntoPPTState(Ht)))},80))}},{key:"componentDidCatch",value:function(ot){console.error("catched error: ",ot);var gt=this.props,xt=gt.data,Mt=gt.userId;xt.logger&&xt.logger.error("catched ppt: ".concat(xt.uuid,", index: ").concat(xt.index,", user: ").concat(Mt," render error : "),ot)}},{key:"componentWillUnmount",value:function(){this.masterAnimationManager.triggerEvent.emit("onUnmount",{target:"master"}),this.layoutAnimationManager.triggerEvent.emit("onUnmount",{target:"layout"}),this.slideAnimationManager.triggerEvent.emit("onUnmount",{target:"slide"}),this.mainAnimationManager.triggerEvent.emit("onUnmount",{target:"slide"})}},{key:"onPageToNext",value:function(){var ot=this.props.stateAdapter;return this.setDisableAutoPlay(!1),this.pauseAllAnimation(!0),ot.onPageToNext?ot.onPageToNext():void 0}},{key:"onPageToPrev",value:function(){var ot=this.props.stateAdapter;return this.pauseAllAnimation(),ot.onPageToPrev?ot.onPageToPrev():void 0}},{key:"onMasterEventSourceClick",value:function(ot){var gt,xt=this,Mt=this.mainAnimationManager.interactiveSeqs.get(ot),kt=this.state[this.currentSlideKey],zt=this.props,Ht=zt.stateAdapter,rr=zt.data,ur=kt.masterSequenceSteps,_r=kt.layoutSequenceSteps,Dr=kt.sequenceSteps,Br=ur[ot],Ur="masterSequenceSteps",Zr=ur;if(Br===void 0&&(Br=_r[ot],Ur="layoutSequenceSteps",Zr=_r),Br===void 0&&(Br=Dr[ot],Ur="sequenceSteps",Zr=Dr),Br!==void 0){var Tn;Mt!==void 0&&ot!==Kv&&(Br>Mt.length||Br===Mt.length&&!Mt.isPlaying)?Tn=0:Tn=Br+1,Ht.setState(rr.uuid,rr.index,this.composeSlideStateIntoPPTState((gt={},rt(gt,Ur,El(_u({},Zr),rt({},ot,Tn))),rt(gt,"hasChangeStep",!0),gt))),Br!==0&&Tn===0&&setTimeout(function(){var jn;Ht.setState(rr.uuid,rr.index,xt.composeSlideStateIntoPPTState((jn={},rt(jn,Ur,El(_u({},Zr),rt({},ot,Tn+1))),rt(jn,"hasChangeStep",!0),jn)))},80)}}},{key:"getTurnToSlide",value:function(ot,gt){var xt=this.props.data,Mt=xt.resourceLoader;if(gt)return/m/.test(gt)?Mt.resource.master[ot]:/l/.test(gt)?Mt.resource.layout[ot]:Mt.resource.slide[ot];var kt=Mt.resource.master[ot];return kt||(kt=Mt.resource.layout[ot],kt)||(kt=Mt.resource.slide[ot]),kt}},{key:"getCurrentSequences",value:function(ot,gt){var xt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Mt=gt??this.state,kt=Mt[this.currentSlideKey];if(!kt)return[void 0,"masterSequenceSteps"];var zt=kt.sequenceSteps,Ht=kt.layoutSequenceSteps,rr=kt.masterSequenceSteps;if(typeof ot=="number"){var ur=this.animationCount,_r=ur.slide,Dr=ur.layout,Br=ur.master;if(ot<Br||xt&&ot<=Br)return[rr,"masterSequenceSteps"];if(ot<Br+Dr||xt&&ot<=Br+Dr)return[Ht,"layoutSequenceSteps"];if(ot<Br+Dr+_r||xt&&ot<=Br+Dr+_r)return[zt,"sequenceSteps"]}return rr[ot]!==void 0?[rr,"masterSequenceSteps"]:Ht[ot]!==void 0?[Ht,"layoutSequenceSteps"]:[zt,"sequenceSteps"]}},{key:"getCurrentSequenceAnimationCount",value:function(ot){return ot==="sequenceSteps"?this.animationCount.slide:ot==="layoutSequenceSteps"?this.animationCount.layout:ot==="masterSequenceSteps"?this.animationCount.master:0}},{key:"getMainStepsFromSequences",value:function(ot){var gt=ot??this.state,xt=gt[this.currentSlideKey];if(xt){var Mt=xt.sequenceSteps,kt=xt.layoutSequenceSteps,zt=xt.masterSequenceSteps,Ht=0;return zt&&zt[Kv]&&zt[Kv]>0&&(Ht+=zt[Kv]),kt&&kt[Kv]&&kt[Kv]>0&&(Ht+=kt[Kv]),Mt&&Mt[Kv]&&Mt[Kv]>0&&(Ht+=Mt[Kv]),Ht}}},{key:"getSequencesByKey",value:function(ot,gt){var xt=gt??this.state,Mt=xt[this.currentSlideKey];if(!Mt)return[void 0,void 0];var kt=Mt.sequenceSteps,zt=Mt.layoutSequenceSteps,Ht=Mt.masterSequenceSteps;return kt&&kt[ot]!==void 0?[kt,"sequenceSteps"]:zt&&zt[ot]!==void 0?[zt,"layoutSequenceSteps"]:Ht&&Ht[ot]!==void 0?[Ht,"masterSequenceSteps"]:[void 0,void 0]}},{key:"setDisableAutoPlay",value:function(ot){var gt=this.props,xt=gt.stateAdapter,Mt=gt.data,kt=this.state[this.currentSlideKey],zt=kt.masterSequenceSteps,Ht=kt.layoutSequenceSteps,rr=kt.sequenceSteps;xt.setState(Mt.uuid,Mt.index,this.composeSlideStateIntoPPTState({masterSequenceSteps:zt,layoutSequenceSteps:Ht,sequenceSteps:rr},ot))}},{key:"pauseAllAnimation",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.mainAnimationManager.mainSeq.pause(),ot){var gt=this.animationCount,xt=gt.slide,Mt=gt.layout,kt=gt.master;this.mainAnimationManager.mainSeq.seekIndex(xt+Mt+kt)}var zt=this.getMainStepsFromSequences();zt&&this.mainAnimationManager.mainSeq.seekIndex(zt),this.mainAnimationManager.interactiveSeqs.forEach(function(Ht){return Ht.pause()})}},{key:"initSlideAnimationState",value:function(){var ot=rt({},Kv,0),gt=rt({},Kv,0),xt=rt({},Kv,0),Mt=!1,kt=!1;return this.animationCount.master>0&&this.masterAnimationManager.mainSeq.effectType!=="clickEffect"&&(xt[Kv]=1,Mt=!0),this.masterAnimationManager.interactiveSeqs.forEach(function(zt,Ht){xt[Ht]=0}),this.animationCount.layout>0&&this.layoutAnimationManager.mainSeq.effectType!=="clickEffect"&&!Mt&&(gt[Kv]=1,kt=!0),this.layoutAnimationManager.interactiveSeqs.forEach(function(zt,Ht){gt[Ht]=0}),this.animationCount.slide>0&&this.slideAnimationManager.mainSeq.effectType!=="clickEffect"&&!Mt&&!kt&&(ot[Kv]=1),this.slideAnimationManager.interactiveSeqs.forEach(function(zt,Ht){ot[Ht]=0}),{masterSequenceSteps:xt,layoutSequenceSteps:gt,sequenceSteps:ot,hasChangeStep:!1}}},{key:"initSlideStates",value:function(){var ot,gt,xt=this.initSlideAnimationState(),Mt=xt.hasChangeStep,kt=xt.sequenceSteps,zt=xt.layoutSequenceSteps,Ht=xt.masterSequenceSteps,rr=this.props.pptState,ur={};rr!==void 0&&(ur=rr);var _r=ur[this.currentSlideKey];_r&&(Ht=(ot=_r.masterSequenceSteps)!=null?ot:Ht,zt=(gt=_r.layoutSequenceSteps)!=null?gt:zt,kt=_r.sequenceSteps),this.state=_u({},this.composeSlideStateIntoPPTState({masterSequenceSteps:Ht,layoutSequenceSteps:zt,sequenceSteps:kt,hasChangeStep:Mt}))}},{key:"composeSlideStateIntoPPTState",value:function(ot,gt){var xt,Mt,kt,zt=this.props,Ht=zt.pptState,rr=zt.data;if(!this.state)return El(_u({},Ht),(xt={},rt(xt,this.currentSlideKey,_u({},ot)),rt(xt,"uuid",rr.uuid),rt(xt,"pageIndex",rr.index),xt));var ur=this.state[this.currentSlideKey];return gt!==void 0?El(_u({},Ht),(Mt={},rt(Mt,this.currentSlideKey,_u(_u({},ur),ot)),rt(Mt,"uuid",rr.uuid),rt(Mt,"pageIndex",rr.index),rt(Mt,"disableAutoPlay",gt),Mt)):El(_u({},Ht),(kt={},rt(kt,this.currentSlideKey,_u(_u({},ur),ot)),rt(kt,"uuid",rr.uuid),rt(kt,"pageIndex",rr.index),kt))}},{key:"playAnime",value:function(ot,gt,xt,Mt){var kt,zt,Ht;if(Mt===Kv)zt=this.getMainStepsFromSequences(ot),Ht=this.getMainStepsFromSequences(gt);else{var rr=this.getSequencesByKey(Mt,ot),ur=mt(rr,1),_r=ur[0],Dr=this.getSequencesByKey(Mt,gt),Br=mt(Dr,1),Ur=Br[0];_r&&(zt=_r[Mt]),Ur&&(Ht=Ur[Mt])}if(zt!==Ht)if(Ht){if(Ht!==zt)if(zt===-1)xt.seekIndex(((kt=this.slideAnimationManager.mainSeq)==null?void 0:kt.length)||0);else if(Ht<=xt.length&&Ht>=0){var Zr=Ht-(zt||0);Zr>0?((xt.index===Ht-2&&xt.isPlaying||Zr>1)&&xt.seekIndex(Ht-1),xt.play()):Zr<0&&(xt.pause(),xt.seekIndex(Ht))}else Ht>xt.length&&(xt.pause(),xt.seekIndex(xt.length))}else xt.pause(),xt.seekIndex(0)}},{key:"resetAnimationSteps",value:function(){var ot={},gt={},xt={};return this.masterAnimationManager.interactiveSeqs.forEach(function(Mt,kt){xt[kt]=0}),xt[Kv]=0,this.layoutAnimationManager.interactiveSeqs.forEach(function(Mt,kt){gt[kt]=0}),gt[Kv]=0,this.masterAnimationManager.interactiveSeqs.forEach(function(Mt,kt){ot[kt]=0}),ot[Kv]=0,{sequenceSteps:ot,layoutSequenceSteps:gt,masterSequenceSteps:xt,hasChangeStep:!1}}},{key:"resetAnimation",value:function(){var ot=this.props,gt=ot.stateAdapter,xt=ot.data,Mt=this.resetAnimationSteps(),kt=El(_u({},this.state),rt({},this.currentSlideKey,Mt));gt.setState(xt.uuid,xt.index,kt)}},{key:"resetCurrentSlideAnimation",value:function(){var ot=this.props,gt=ot.stateAdapter,xt=ot.data,Mt=El(_u({},this.state),rt({},this.currentSlideKey,void 0));gt.setState(xt.uuid,xt.index,Mt)}},{key:"resetCurrentPPTAnimation",value:function(){var ot=this,gt=this.state,xt=gt.disableAutoPlay,Mt=gt.pageIndex,kt=gt.playLastStep,zt=gt.progressIndex,Ht=gt.uuid,rr=gt[this.currentSlideKey];if(rr){var ur=this.props,_r=ur.data,Dr=ur.stateAdapter,Br=ur.pptState,Ur=Br.preSlideIndex,Zr={disableAutoPlay:xt,pageIndex:Mt,playLastStep:kt,progressIndex:zt,uuid:Ht,preSlideIndex:Ur},Tn=Object.keys(this.state).filter(function(ts){return ts.includes(_r.uuid)}).map(function(ts){var us=ot.state[ts];return _u({key:ts},us)}),jn={};Tn.forEach(function(ts){var us=ts.key;jn[us]=void 0}),Zr=_u(_u({},Zr),jn),Dr.setState(_r.uuid,_r.index,Zr)}}},{key:"toNextPage",value:function(){var ot=this.props.stateAdapter;ot.onPageToNext&&ot.onPageToNext()}},{key:"toPrevPage",value:function(){var ot=this.props.stateAdapter;ot.onPageToPrev&&ot.onPageToPrev()}},{key:"changeStep",value:function(ot){var gt,xt,Mt=this.props,kt=Mt.stateAdapter,zt=Mt.data,Ht=this.getMainStepsFromSequences(),rr=this.getCurrentSequences(Ht??1,void 0,ot<0),ur=mt(rr,2),_r=ur[0],Dr=ur[1];if(!(_r===void 0||Dr===void 0)){var Br=_r[Kv];if(Br===void 0||this.mainAnimationManager.mainSeq.length===0){ot>0?this.onPageToNext():ot<0&&this.onPageToPrev();return}Br<0&&(this.masterAnimationManager.triggerEvent.emit("onEnd",{target:"slide"}),Br=this.mainAnimationManager.mainSeq.length);var Ur=Br+ot;Ur<0?this.onPageToPrev():Ur>this.getCurrentSequenceAnimationCount(Dr)?this.onPageToNext():Br===1&&Ur===0?kt.setState(zt.uuid,zt.index,_u({},this.composeSlideStateIntoPPTState((gt={},rt(gt,Dr,El(_u({},_r),rt({},Kv,Ur))),rt(gt,"hasChangeStep",!0),gt),!0))):kt.setState(zt.uuid,zt.index,_u({},this.composeSlideStateIntoPPTState((xt={},rt(xt,Dr,El(_u({},_r),rt({},Kv,Ur))),rt(xt,"hasChangeStep",!0),xt))))}}},{key:"renderMediaControllerPortal",value:function(ot){var gt=this.props.renderMode;return gt===0?YS.default.createElement("div",{id:"netless-media-controller-portal-".concat(ot.uuid),style:{position:"absolute",zIndex:1e3}}):null}},{key:"render",value:function(){var ot,gt,xt,Mt,kt,zt,Ht,rr=this.props,ur=rr.disableAnimation,_r=rr.renderMode,Dr=rr.className,Br=rr.data,Ur=rr.pausing,Zr=rr.userId,Tn=rr.callbacks,jn=rr.pptState,ts=Br.slideXML.childElement("p:sld","p:cSld","p:spTree"),us=Br.masterXML.childElement("p:sldMaster","p:cSld","p:spTree"),Os=Br.layoutXML.childElement("p:sldLayout","p:cSld","p:spTree"),Hs=Br.slideXML.childElement("p:sld","p:cSld"),Ks={uuid:Br.uuid,resourceLoader:Br.resourceLoader,slideWidth:Br.width,slideHeight:Br.height,preSlideIndex:this.preSlideIndex,slideIndex:Br.index+1,preload:Br.preload,slideCount:Br.slidesCount},so=ur;_r!==void 0&&_r===1&&(so=!0);var To=(ot=jn?.mediaStates)==null?void 0:ot[this.currentSlideKey];return YS.default.createElement(pt,{className:Dr,slideContext:Ks,slideRef:this.slide,cSld:Hs,resourceLoader:Br.resourceLoader},this.renderMediaControllerPortal(Br),this.isRenderMaster&&YS.default.createElement(Yk,{uuid:Br.uuid,logger:Br.logger,slideRef:this.slide,slideContext:Ks,shapeGroupXML:us,resourceType:"master",disableAnimation:so,zIndex:0,wrapResource:(gt=Br.WrapResource)==null?void 0:gt.master,ref:this.shapeGroupRef,pausing:Ur,userId:Zr,interactiveSeqsKeys:this.masterInteractiveSeqsKeys||[],onEventSourceClick:this.onEventSourceClick,onHyperLinkClick:this.onHyperLinkClick,meidaStates:To,mediaSlideActionUserIds:(xt=jn?.mediaActionUserIds)==null?void 0:xt[this.currentSlideKey],onMediaChange:this.setMediaState,onMediaPlay:this.onMediaPlay,onMediaPlayError:Tn?Tn.onMediaPlayError:void 0,onMediaPause:this.onMediaPause,rtcClient:Br.rtcClient,animationManager:this.masterAnimationManager}),YS.default.createElement(Yk,{uuid:Br.uuid,logger:Br.logger,slideRef:this.slide,slideContext:Ks,shapeGroupXML:Os,resourceType:"layout",disableAnimation:so,zIndex:1,wrapResource:(Mt=Br.WrapResource)==null?void 0:Mt.layout,ref:this.shapeGroupRef,pausing:Ur,userId:Zr,interactiveSeqsKeys:this.layoutInteractiveSeqsKeys||[],onEventSourceClick:this.onEventSourceClick,onHyperLinkClick:this.onHyperLinkClick,meidaStates:To,mediaSlideActionUserIds:(kt=jn?.mediaActionUserIds)==null?void 0:kt[this.currentSlideKey],onMediaChange:this.setMediaState,onMediaPlay:this.onMediaPlay,onMediaPlayError:Tn?Tn.onMediaPlayError:void 0,onMediaPause:this.onMediaPause,rtcClient:Br.rtcClient,animationManager:this.layoutAnimationManager}),YS.default.createElement(Yk,{uuid:Br.uuid,ref:this.shapeGroupRef,shapeGroupXML:ts,pausing:Ur,userId:Zr,logger:Br.logger,slideRef:this.slide,slideContext:Ks,resourceType:"slide",interactiveSeqsKeys:this.slideInteractiveSeqsKeys||[],zIndex:2,onEventSourceClick:this.onEventSourceClick,onHyperLinkClick:this.onHyperLinkClick,meidaStates:To,mediaSlideActionUserIds:(zt=jn?.mediaActionUserIds)==null?void 0:zt[this.currentSlideKey],disableAnimation:so,onMediaChange:this.setMediaState,onMediaPlay:this.onMediaPlay,onMediaPlayError:Tn?Tn.onMediaPlayError:void 0,onMediaPause:this.onMediaPause,rtcClient:Br.rtcClient,wrapResource:(Ht=Br.WrapResource)==null?void 0:Ht.slide,animationManager:this.slideAnimationManager}))}}]),at})(YS.default.Component);function zO(yt,ct){var at={},ut={},ot={},gt=Jt(yt.elements),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.childElementOptional(new Np("p:nvSpPr","p:nvCxnSpPr"));if(kt){var zt=kt.childElement("p:cNvPr").attr.getStringOptional("id"),Ht=kt.childElementOptional("p:nvPr","p:ph"),rr=Ht&&Ht.attr.getStringOptional("idx"),ur=Ht&&Ht.attr.getStringOptional("type");zt!==void 0&&(at[zt]=Mt),rr!==void 0?ut[rr]=Mt:(ur==="title"||ur==="ctrTitle")&&(ut[0]=Mt),ur==="title"||ur==="ctrTitle"?(ot.title=Mt,ot.ctrTitle=Mt):ur!==void 0&&(ot[ur]=Mt)}}}catch(_r){gt.e(_r)}finally{gt.f()}return Object.freeze(ct?{idIndex:Object.freeze(at),idxIndex:Object.freeze(ut),typeIndex:Object.freeze(ot),txStyle:Object.freeze(KL(ct))}:{idIndex:Object.freeze(at),idxIndex:Object.freeze(ut),typeIndex:Object.freeze(ot)})}function KL(yt){var ct={},at=yt.elementWithName("p:bodyStyle");at&&(ct.body=at);var ut=yt.elementWithName("p:titleStyle");ut&&(ct.title=ut,ct.subTitle=ut,ct.ctrTitle=ut);var ot=yt.elementWithName("p:otherStyle");return ot&&(ct.other=ot),ct}var ZL=(function(){function yt(ct,at){Ot(this,yt),this.resource=ct,this.resourceScheme=at}return Bt(yt,[{key:"loadURL",value:function(at,ut){var ot=this.resource[at]&&this.resource[at][ut];return typeof ot>"u"||(ot=this.replaceProtocolByresourceScheme(ot)),ot}},{key:"replaceProtocolByresourceScheme",value:function(at){var ut=at;return this.resourceScheme&&(ut=ut.replace(/^[a-zA-z]+[^://]/,this.resourceScheme)),ut}}]),yt})();function JL(yt){yt.bindAttributePicker("a:p","*",nF),yt.bindAttributePicker("a:p","indent",GO(-342900,0)),yt.bindAttributePicker("a:p","marL",GO(342900,0)),yt.bindAttributePicker("a:p","level",iF),yt.bindAttributePicker("a:bodyPr","*",eF),yt.bindAttributePicker(["a:r","a:br","a:endParaRPr","a:fld"],"*",Qk),yt.bindAttributePicker(["a:r","a:br","a:endParaRPr","a:fld","a:p"],"sz",oF),yt.bindAttributePicker(["a:r"],"highlight",sF),yt.bindAttributePicker(["a:r","a:fld"],"color",cF),yt.bindAttributePicker(["a:r","a:fld"],"fontType",dF),yt.bindAttributePicker("a:p","placeHolderType",hF),yt.bindChildPicker("a:p","bu",fF),yt.bindAttributePicker("a:p","buClr",pF),yt.bindAttributePicker("a:p","lineHeight",gF),yt.bindAttributePicker("a:p",["a:spcBef","a:spcAft"],vF)}var eF=function(ct,at,ut,ot,gt){var xt=tF(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.attr.getOptional(ut);if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}};function tF(yt,ct,at,ut){var ot=at.bodyPrXMlList;return ot||(ot=at.bodyPrXMlList=Object.freeze(rF(yt,ct,ut))),ot}function rF(yt,ct,at){var ut=[],ot=yt.parentElement(new Np("p:sp","p:graphicFrame")),gt=aw(ot,ct,at),xt=gt.allShape,Mt=gt.hasPlaceHolder,kt=Jt(xt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional("p:txBody","a:bodyPr");rr&&ut.push(rr)}}catch(ur){kt.e(ur)}finally{kt.f()}return{pPrXMLList:ut,hasPlaceHolder:Mt}}var nF=function(ct,at,ut,ot,gt){var xt=YC(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.attr.getOptional(ut);if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}},GO=function(ct,at){return function(ut,ot,gt,xt,Mt){var kt=YC(ut,ot,xt,Mt),zt=kt.pPrXMLList,Ht=kt.hasPlaceHolder,rr=Jt(zt),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value,Dr=_r.attr.getOptional(gt);if(Dr!==void 0)return Dr}}catch(Br){rr.e(Br)}finally{rr.f()}return Ht?ct:at}},iF=function(ct,at,ut,ot,gt){return YC(ct,at,ot,gt).level};function YC(yt,ct,at,ut){var ot=at.pPrXMlList;return ot||(ot=at.pPrXMlList=Object.freeze(aF(yt,ct,ut))),ot}function aF(yt,ct,at){var ut=[],ot=yt.parentElement(new Np("p:sp","p:graphicFrame")),gt=yt.childElementOptional("a:pPr"),xt=0;gt&&(ut.push(gt),xt=gt.attr.getNumber("lvl",0));var Mt="a:lvl".concat(xt+1,"pPr"),kt=aw(ot,ct,at),zt=kt.allShape,Ht=kt.placeHolderType,rr=kt.masterStyleXML,ur=kt.hasPlaceHolder,_r=Jt(zt),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value,Ur=Br.childElementOptional("p:txBody","a:lstStyle",Mt);Ur&&ut.push(Ur)}}catch(Tn){_r.e(Tn)}finally{_r.f()}if(rr){var Zr=rr.childElementOptional(Mt);Zr&&ut.push(Zr)}return{pPrXMLList:ut,placeHolderType:Ht,level:xt,hasPlaceHolder:ur}}var Qk=function(ct,at,ut,ot,gt){var xt=Kk(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.attr.getOptional(ut);if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}},sF=function(ct,at){var ut=ct.childElementOptional("a:rPr","a:highlight",Nt(Np,mS));if(ut)return JT(ut,at)},oF=function(ct,at,ut,ot,gt){var xt=Qk(ct,at,"sz",ot,gt),Mt=Qk(ct,at,"kern",ot,gt);return xt||Mt};function Kk(yt,ct,at,ut){var ot=at.rangeXMlList;return ot||(ot=at.rangeXMlList=Object.freeze(uF(yt,ct,ut))),ot}function uF(yt,ct,at){var ut=yt.elementWithName("a:rPr"),ot;yt.name==="a:p"?ot=yt:ot=yt.parentElement("a:p");var gt=lF(ot,ct,at),xt=gt.placeHolderType,Mt=gt.pPrXMLList,kt=gt.level,zt=gt.hasPlaceHolder;return ut?{placeHolderType:xt,pPrXMLList:[yt,ut].concat(Ct(Mt)),level:kt,hasPlaceHolder:zt}:{placeHolderType:xt,pPrXMLList:[yt].concat(Ct(Mt)),level:kt,hasPlaceHolder:zt}}function lF(yt,ct,at){var ut=[],ot=yt.parentElement(new Np("p:sp","p:graphicFrame")),gt=yt.childElementOptional("a:pPr"),xt=0;if(gt){xt=gt.attr.getNumber("lvl",0);var Mt=gt.childElementOptional("a:defRPr");Mt&&ut.push(Mt)}var kt="a:lvl".concat(xt+1,"pPr"),zt=aw(ot,ct,at),Ht=zt.allShape,rr=zt.placeHolderType,ur=zt.masterStyleXML,_r=zt.hasPlaceHolder,Dr=Jt(Ht),Br;try{for(Dr.s();!(Br=Dr.n()).done;){var Ur=Br.value,Zr=Ur.childElementOptional("p:txBody","a:lstStyle",kt,"a:defRPr");Zr&&ut.push(Zr);var Tn=Ur.childElementOptional("p:style");if(Tn){var jn=bR(Tn,ct);ut.push(jn.font.fontRef),jn.font.xml&&ut.push(jn.font.xml)}}}catch(us){Dr.e(us)}finally{Dr.f()}if(ur){var ts=ur.childElementOptional(kt,"a:defRPr");ts&&ut.push(ts)}return{pPrXMLList:ut,placeHolderType:rr,level:xt,hasPlaceHolder:_r}}var cF=function(ct,at,ut,ot,gt){var xt=Kk(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional(Nt(Np,xA));if(rr)return new Ay().read(rr,at);var ur=Ht.childElementOptional(Nt(Np,mS));if(ur)return JT(ur,at)}}catch(_r){kt.e(_r)}finally{kt.f()}},dF=function(ct,at,ut,ot,gt){var xt=Kk(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=[],zt=Jt(Mt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value,ur=rr.childElementOptional("a:latin"),_r=rr.childElementOptional("a:ea");if(ur){var Dr=ur.attr.getOptional("typeface");typeof Dr=="string"&&kt.push(Dr)}if(_r){var Br=_r.attr.getOptional("typeface");typeof Br=="string"&&kt.push(Br)}}}catch(jn){zt.e(jn)}finally{zt.f()}wR(xt.placeHolderType)?kt=kt.concat(yR(uN(at))):kt=kt.concat(yR($M(at))),kt=kt.filter(function(jn){return jn!==""});var Ur=[],Zr=uN(at),Tn=$M(at);return kt.forEach(function(jn){switch(jn){case"+mj-lt":{Ur=Zr.latin?Ur.concat(Zr.latin):Ur;break}case"+mj-ea":{Ur=Zr.ea?Ur.concat(Zr.ea):Ur;break}case"+mj-cs":{Ur=Zr.cs?Ur.concat(Zr.cs):Ur;break}case"+mn-lt":{Ur=Tn.latin?Ur.concat(Tn.latin):Ur;break}case"+mn-ea":{Ur=Tn.ea?Ur.concat(Tn.ea):Ur;break}case"+mn-cs":{Ur=Zr.cs?Ur.concat(Zr.cs):Ur;break}default:{Ur.push(jn);break}}}),Ur.forEach(function(jn){sN(jn,at.userFonts).then(function(){},function(){})}),Ur.join(",")},hF=function(ct){var at=ct.parentElement(new Np("p:sp","p:graphicFrame")).childElementOptional(new Np("p:nvSpPr","p:nvCxnSpPr"));return at&&at.childElementOptional("p:nvPr","p:ph")?"true":"false"},fF=function(ct,at,ut,ot,gt){var xt=YC(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional(new Np("a:buChar","a:buNone","a:buAutoNum","a:buBlip"));if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}},pF=function(ct,at,ut,ot,gt){var xt=YC(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=Ht.childElementOptional("a:buClr");if(rr)return JT(rr.childElement(Nt(Np,mS)),at)}}catch(ur){kt.e(ur)}finally{kt.f()}};function mF(yt){var ct=yt.childElementOptional("a:lnSpc",new Np("a:spcPct","a:spcPts"));if(ct){var at=0,ut=yt.parentElementOptional("p:txBody");if(ut){var ot=ut.childElementOptional("a:bodyPr","a:normAutofit");ot&&(at=Ey(ot.attr.getNumber("lnSpcReduction",0)))}switch(ct.name){case"a:spcPct":return Ey(ct.attr.getString("val"))*1.2-at;case"a:spcPts":return"".concat(ct.attr.getNumber("val")/100*(1-at),"pt");default:return}}else return}var gF=function(ct,at,ut,ot,gt){var xt=YC(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=mF(Ht);if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}return Vk},vF=function(ct,at,ut,ot,gt){var xt=YC(ct,at,ot,gt),Mt=xt.pPrXMLList,kt=Jt(Mt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value,rr=yF(Ht,ut);if(rr!==void 0)return rr}}catch(ur){kt.e(ur)}finally{kt.f()}};function yF(yt,ct){var at=yt.childElementOptional(ct,new Np("a:spcPct","a:spcPts"));if(at)switch(at.name){case"a:spcPct":return Ey(at.attr.getString("val"));case"a:spcPts":return"".concat(at.attr.getNumber("val")/100,"pt");default:return}else return}function bF(yt){yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"x",function(ct,at,ut,ot,gt){var xt=VO(ct,at,gt);return xt?xt.attr.getOptional("x"):0}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"y",function(ct,at,ut,ot,gt){var xt=VO(ct,at,gt);return xt?xt.attr.getOptional("y"):0}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"width",function(ct,at,ut,ot,gt){var xt=HO(ct,at,gt);return xt?xt.attr.getOptional("cx"):0}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"height",function(ct,at,ut,ot,gt){var xt=HO(ct,at,gt);return xt?xt.attr.getOptional("cy"):0}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"flipV",function(ct,at){var ut=TR(ct,at,"slide");return ut===void 0?"false":ut.attr.getOptional("flipV")?ut.attr.getOptional("flipV"):"false"}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"flipH",function(ct,at){var ut=TR(ct,at,"slide");return ut===void 0?"false":ut.attr.getOptional("flipH")?ut.attr.getOptional("flipH"):"false"}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp","p:graphicFrame"],"hidden",function(ct){var at=ct.childElementOptional(new Np("p:nvGraphicFramePr","p:nvSpPr","p:nvCxnSpPr","p:nvPicPr"),"p:cNvPr");return at?at.attr.get("hidden","false"):"false"}),yt.bindAttributePicker(["p:sp","p:pic","p:cxnSp"],"rot",function(ct,at){var ut=TR(ct,at,"slide");return ut?ut.attr.getOptional("rot"):0})}function VO(yt,ct,at){var ut=aw(yt,ct,at),ot=ut.allShape,gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.childElementOptional("p:spPr","a:xfrm","a:off");if(kt!==void 0||(kt=Mt.childElementOptional("p:xfrm","a:off"),kt!==void 0))return kt}}catch(Ht){gt.e(Ht)}finally{gt.f()}var zt=TR(yt,ct,at);return zt&&zt.childElementOptional("a:off")}function HO(yt,ct,at){var ut=aw(yt,ct,at),ot=ut.allShape,gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=Mt.childElementOptional("p:spPr","a:xfrm","a:ext");if(kt!==void 0||(kt=Mt.childElementOptional("p:xfrm","a:ext"),kt!==void 0))return kt}}catch(Ht){gt.e(Ht)}finally{gt.f()}var zt=TR(yt,ct,at);return zt&&zt.childElementOptional("a:ext")}function TR(yt,ct,at){var ut;if(at==="slide"){var ot=yt.childElementOptional("p:spPr","a:xfrm");if(ot)return ot;var gt=(ut=yt.childElementOptional("p:nvPicPr","p:nvPr","p:ph"))==null?void 0:ut.attr.getStringOptional("idx");if(gt){var xt=ct.layoutIndex.idxIndex[gt];if(xt)return xt.childElementOptional("p:spPr","a:xfrm");var Mt=ct.masterIndex.idxIndex[gt];if(Mt)return Mt.childElementOptional("p:spPr","a:xfrm")}}}var Zk=["无样式,无网格","styleName","wholeTbl","tcTxStyle","fontRef","minor","idx","scrgbClr","0","r","g","b","schemeClr","tx1","val","无样式,网格型","tcStyle","tcBdr","left","ln","12700","w","sng","cmpd","solidFill","right","top","bottom","insideH","insideV","主题样式 1 - 强调 1","tblBg","fillRef","2","accent1","effectRef","1","dk1","lnRef","band1H","fill","alpha","40000","band1V","lastCol","on","firstCol","lastRow","firstRow","lt1","主题样式 1 - 强调 2","accent2","主题样式 1 - 强调 3","accent3","主题样式 1 - 强调 4","accent4","主题样式 1 - 强调 5","accent5","主题样式 1 - 强调 6","accent6","主题样式 2 - 强调 1","3","tint","50000","20000","主题样式 2 - 强调 2","主题样式 2 - 强调 3","主题样式 2 - 强调 4","主题样式 2 - 强调 5","主题样式 2 - 强调 6","浅色样式 1","浅色样式 1 - 强调 1","浅色样式 1 - 强调 2","浅色样式 1 - 强调 3","浅色样式 1 - 强调 4","浅色样式 1 - 强调 5","浅色样式 1 - 强调 6","浅色样式 2","band2V","50800","dbl","bg1","浅色样式 2 - 强调 1","浅色样式 2 - 强调 2","浅色样式 2 - 强调 3","浅色样式 2 - 强调 4","浅色样式 2 - 强调 5","浅色样式 2 - 强调 6","浅色样式 3","25400","浅色样式 3 - 强调 1","浅色样式 3 - 强调 2","浅色样式 3 - 强调 3","浅色样式 3 - 强调 4","浅色样式 3 - 强调 5","浅色样式 3 - 强调 6","中度样式 1","中度样式 1 - 强调 1","中度样式 1 - 强调 2","中度样式 1 - 强调 3","中度样式 1 - 强调 4","中度样式 1 - 强调 5","中度样式 1 - 强调 6","中度样式 2","prstClr","black","38100","中度样式 2 - 强调 1","中度样式 2 - 强调 2","中度样式 2 - 强调 3","中度样式 2 - 强调 4","中度样式 2 - 强调 5","中度样式 2 - 强调 6","中度样式 3","seCell","swCell","中度样式 3 - 强调 1","中度样式 3 - 强调 2","中度样式 3 - 强调 3","中度样式 3 - 强调 4","中度样式 3 - 强调 5","中度样式 3 - 强调 6","中度样式 4","中度样式 4 - 强调 1","中度样式 4 - 强调 2","中度样式 4 - 强调 3","中度样式 4 - 强调 4","中度样式 4 - 强调 5","中度样式 4 - 强调 6","深色样式 1","60000","深色样式 1 - 强调 1","shade","深色样式 1 - 强调 2","深色样式 1 - 强调 3","深色样式 1 - 强调 4","深色样式 1 - 强调 5","深色样式 1 - 强调 6","深色样式 2","深色样式 2 - 强调 1/强调 2","深色样式 2 - 强调 3/强调 4","深色样式 2 - 强调 5/强调 6"],vr=[{4:{6:5,7:{9:8,10:8,11:8}},12:{14:13}},{19:{21:20,23:22,24:{12:{14:13}}}},{4:{6:5,7:{9:8,10:8,11:8}},12:{14:37}},{38:{6:36,12:{14:34}}},{6:33,12:{14:34}},{6:36,12:{14:34}},{14:42},{11:45},{38:{6:33,12:{14:34}}},{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},{24:{12:{14:34}}},{38:{6:33,12:{14:49}}},{38:{6:36,12:{14:51}}},{6:33,12:{14:51}},{6:36,12:{14:51}},{38:{6:33,12:{14:51}}},{24:{12:{14:51}}},{38:{6:36,12:{14:53}}},{6:33,12:{14:53}},{6:36,12:{14:53}},{38:{6:33,12:{14:53}}},{24:{12:{14:53}}},{38:{6:36,12:{14:55}}},{6:33,12:{14:55}},{6:36,12:{14:55}},{38:{6:33,12:{14:55}}},{24:{12:{14:55}}},{38:{6:36,12:{14:57}}},{6:33,12:{14:57}},{6:36,12:{14:57}},{38:{6:33,12:{14:57}}},{24:{12:{14:57}}},{38:{6:36,12:{14:59}}},{6:33,12:{14:59}},{6:36,12:{14:59}},{38:{6:33,12:{14:59}}},{24:{12:{14:59}}},{16:{40:{24:{12:{14:49,41:{14:64}}}}}},{3:{11:45},16:{17:{18:{38:{6:33,12:{14:49}}}}}},{3:{11:45},16:{17:{25:{38:{6:33,12:{14:49}}}}}},{3:{11:45},16:{17:{26:{38:{6:33,12:{14:49}}}}}},{3:{11:45},16:{17:{27:{38:{6:61,12:{14:49}}}}}},{4:{6:5,7:{9:8,10:8,11:8}},12:{14:49}},{38:{6:36,12:{14:34,62:{14:63}}}},{14:34},{38:{6:36,12:{14:51,62:{14:63}}}},{14:51},{38:{6:36,12:{14:53,62:{14:63}}}},{14:53},{38:{6:36,12:{14:55,62:{14:63}}}},{14:55},{38:{6:36,12:{14:57,62:{14:63}}}},{14:57},{38:{6:36,12:{14:59,62:{14:63}}}},{14:59},{16:{40:{24:{12:{14:13,41:{14:64}}}}}},{3:{11:45}},{16:{40:{24:{12:{14:34,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:34}}}},{16:{40:{24:{12:{14:51,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:51}}}},{16:{40:{24:{12:{14:53,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:53}}}},{16:{40:{24:{12:{14:55,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:55}}}},{16:{40:{24:{12:{14:57,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:57}}}},{16:{40:{24:{12:{14:59,41:{14:64}}}}}},{19:{21:20,23:22,24:{12:{14:59}}}},{38:{6:36,12:{14:13}}},{12:{14:13}},{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:81}},{6:36,12:{14:13}},{26:{19:{21:79,23:80,24:{12:{14:34}}}}},{26:{19:{21:79,23:80,24:{12:{14:51}}}}},{26:{19:{21:79,23:80,24:{12:{14:53}}}}},{26:{19:{21:79,23:80,24:{12:{14:55}}}}},{26:{19:{21:79,23:80,24:{12:{14:57}}}}},{26:{19:{21:79,23:80,24:{12:{14:59}}}}},{12:{14:34}},{12:{14:51}},{12:{14:53}},{12:{14:55}},{12:{14:57}},{12:{14:59}},{16:{40:{24:{12:{14:37,62:{14:64}}}}}},{3:{11:45},16:{17:{26:{19:{21:79,23:80,24:{12:{14:37}}}}},40:{24:{12:{14:49}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:37}}}}},{24:{12:{14:49}}},{19:{21:20,23:22,24:{12:{14:37}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:34}}}}},{40:{24:{12:{14:34,62:{14:64}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:51}}}}},{40:{24:{12:{14:51,62:{14:64}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:53}}}}},{40:{24:{12:{14:53,62:{14:64}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:55}}}}},{40:{24:{12:{14:55,62:{14:64}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:57}}}}},{40:{24:{12:{14:57,62:{14:64}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:49}},16:{40:{24:{12:{14:59}}}}},{40:{24:{12:{14:59,62:{14:64}}}}},{16:{40:{24:{12:{14:37,62:{14:42}}}}}},{4:{6:5,104:{14:105}},12:{14:37}},{18:{19:{21:20,23:22,24:{12:{14:49}}}},25:{19:{21:20,23:22,24:{12:{14:49}}}},26:{19:{21:20,23:22,24:{12:{14:49}}}},27:{19:{21:20,23:22,24:{12:{14:49}}}},28:{19:{21:20,23:22,24:{12:{14:49}}}},29:{19:{21:20,23:22,24:{12:{14:49}}}}},{24:{12:{14:37,62:{14:64}}}},{4:{6:5,104:{14:105}},11:45,12:{14:49}},{40:{24:{12:{14:37}}}},{26:{19:{21:106,23:22,24:{12:{14:49}}}}},{24:{12:{14:37}}},{27:{19:{21:106,23:22,24:{12:{14:49}}}}},{16:{40:{24:{12:{14:34,62:{14:42}}}}}},{24:{12:{14:34,62:{14:64}}}},{40:{24:{12:{14:34}}}},{16:{40:{24:{12:{14:51,62:{14:42}}}}}},{24:{12:{14:51,62:{14:64}}}},{40:{24:{12:{14:51}}}},{16:{40:{24:{12:{14:53,62:{14:42}}}}}},{24:{12:{14:53,62:{14:64}}}},{40:{24:{12:{14:53}}}},{16:{40:{24:{12:{14:55,62:{14:42}}}}}},{24:{12:{14:55,62:{14:64}}}},{40:{24:{12:{14:55}}}},{16:{40:{24:{12:{14:57,62:{14:42}}}}}},{24:{12:{14:57,62:{14:64}}}},{40:{24:{12:{14:57}}}},{16:{40:{24:{12:{14:59,62:{14:42}}}}}},{24:{12:{14:59,62:{14:64}}}},{40:{24:{12:{14:59}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},11:45,12:{14:37}}},{17:{26:{19:{21:89,23:22,24:{12:{14:37}}}},27:{19:{21:89,23:22,24:{12:{14:37}}}}},40:{24:{12:{14:49}}}},{14:37},{27:{19:{21:89,23:22,24:{12:{14:37}}}}},{3:{4:{6:5,7:{9:8,10:8,11:8}},12:{14:37}},16:{17:{26:{19:{21:89,23:22,24:{12:{14:37}}}},27:{19:{21:89,23:22,24:{12:{14:37}}}}},40:{24:{12:{14:49}}}}},{19:{21:89,23:22,24:{12:{14:37}}}},{40:{24:{12:{14:37,62:{14:64}}}}},{3:{11:45},16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:{24:{12:{14:37}}}}},{18:{19:{21:89,23:22,24:{12:{14:49}}}}},{24:{12:{14:37,62:{14:130}}}},{25:{19:{21:89,23:22,24:{12:{14:49}}}}},{26:{19:{21:89,23:22,24:{12:{14:49}}}}},{24:{12:{14:34,132:{14:130}}}},{24:{12:{14:51,132:{14:130}}}},{24:{12:{14:53,132:{14:130}}}},{24:{12:{14:55,132:{14:130}}}},{24:{12:{14:57,132:{14:130}}}},{24:{12:{14:59,132:{14:130}}}},{26:{19:{21:79,23:80,24:{12:{14:37}}}}}],_F={"{2D5ABB26-0587-4C30-8999-92F81FD0307C}":{1:0,2:{3:vr[0]}},"{5940675A-B579-460E-94D1-54222C63F5DA}":{1:15,2:{3:vr[0],16:{17:{18:vr[1],25:vr[1],26:vr[1],27:vr[1],28:vr[1],29:vr[1]}}}},"{3C2FFA5D-87B4-456A-9821-1D502468CF0F}":{1:30,2:{3:vr[2],16:{17:{18:vr[3],25:vr[3],26:vr[3],27:vr[3],28:vr[3],29:vr[3]}}},31:{32:vr[4],35:vr[5]},39:{16:{40:{24:{12:{14:34,41:vr[6]}}}}},43:{16:{17:{26:vr[3],27:vr[3]},40:{24:{12:{14:34,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[4]},25:vr[3],26:vr[3],27:vr[3],28:vr[3]}}},46:{3:vr[7],16:{17:{18:vr[3],25:{38:vr[4]},26:vr[3],27:vr[3],28:vr[3]}}},47:{3:vr[7],16:{17:{18:vr[3],25:vr[3],26:{38:vr[4]},27:{38:vr[4]}}}},48:{3:vr[9],16:{17:{18:vr[3],25:vr[3],26:vr[3],27:vr[11]},40:vr[10]}}},"{284E427A-3D55-4303-BF80-6455036E1DE7}":{1:50,2:{3:vr[2],16:{17:{18:vr[12],25:vr[12],26:vr[12],27:vr[12],28:vr[12],29:vr[12]}}},31:{32:vr[13],35:vr[14]},39:{16:{40:{24:{12:{14:51,41:vr[6]}}}}},43:{16:{17:{26:vr[12],27:vr[12]},40:{24:{12:{14:51,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[13]},25:vr[12],26:vr[12],27:vr[12],28:vr[12]}}},46:{3:vr[7],16:{17:{18:vr[12],25:{38:vr[13]},26:vr[12],27:vr[12],28:vr[12]}}},47:{3:vr[7],16:{17:{18:vr[12],25:vr[12],26:{38:vr[13]},27:{38:vr[13]}}}},48:{3:vr[9],16:{17:{18:vr[12],25:vr[12],26:vr[12],27:vr[11]},40:vr[16]}}},"{69C7853C-536D-4A76-A0AE-DD22124D55A5}":{1:52,2:{3:vr[2],16:{17:{18:vr[17],25:vr[17],26:vr[17],27:vr[17],28:vr[17],29:vr[17]}}},31:{32:vr[18],35:vr[19]},39:{16:{40:{24:{12:{14:53,41:vr[6]}}}}},43:{16:{17:{26:vr[17],27:vr[17]},40:{24:{12:{14:53,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[18]},25:vr[17],26:vr[17],27:vr[17],28:vr[17]}}},46:{3:vr[7],16:{17:{18:vr[17],25:{38:vr[18]},26:vr[17],27:vr[17],28:vr[17]}}},47:{3:vr[7],16:{17:{18:vr[17],25:vr[17],26:{38:vr[18]},27:{38:vr[18]}}}},48:{3:vr[9],16:{17:{18:vr[17],25:vr[17],26:vr[17],27:vr[11]},40:vr[21]}}},"{775DCB02-9BB8-47FD-8907-85C794F793BA}":{1:54,2:{3:vr[2],16:{17:{18:vr[22],25:vr[22],26:vr[22],27:vr[22],28:vr[22],29:vr[22]}}},31:{32:vr[23],35:vr[24]},39:{16:{40:{24:{12:{14:55,41:vr[6]}}}}},43:{16:{17:{26:vr[22],27:vr[22]},40:{24:{12:{14:55,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[23]},25:vr[22],26:vr[22],27:vr[22],28:vr[22]}}},46:{3:vr[7],16:{17:{18:vr[22],25:{38:vr[23]},26:vr[22],27:vr[22],28:vr[22]}}},47:{3:vr[7],16:{17:{18:vr[22],25:vr[22],26:{38:vr[23]},27:{38:vr[23]}}}},48:{3:vr[9],16:{17:{18:vr[22],25:vr[22],26:vr[22],27:vr[11]},40:vr[26]}}},"{35758FB7-9AC5-4552-8A53-C91805E547FA}":{1:56,2:{3:vr[2],16:{17:{18:vr[27],25:vr[27],26:vr[27],27:vr[27],28:vr[27],29:vr[27]}}},31:{32:vr[28],35:vr[29]},39:{16:{40:{24:{12:{14:57,41:vr[6]}}}}},43:{16:{17:{26:vr[27],27:vr[27]},40:{24:{12:{14:57,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[28]},25:vr[27],26:vr[27],27:vr[27],28:vr[27]}}},46:{3:vr[7],16:{17:{18:vr[27],25:{38:vr[28]},26:vr[27],27:vr[27],28:vr[27]}}},47:{3:vr[7],16:{17:{18:vr[27],25:vr[27],26:{38:vr[28]},27:{38:vr[28]}}}},48:{3:vr[9],16:{17:{18:vr[27],25:vr[27],26:vr[27],27:vr[11]},40:vr[31]}}},"{08FB837D-C827-4EFA-A057-4D05807E0F7C}":{1:58,2:{3:vr[2],16:{17:{18:vr[32],25:vr[32],26:vr[32],27:vr[32],28:vr[32],29:vr[32]}}},31:{32:vr[33],35:vr[34]},39:{16:{40:{24:{12:{14:59,41:vr[6]}}}}},43:{16:{17:{26:vr[32],27:vr[32]},40:{24:{12:{14:59,41:vr[6]}}}}},44:{3:vr[7],16:{17:{18:{38:vr[33]},25:vr[32],26:vr[32],27:vr[32],28:vr[32]}}},46:{3:vr[7],16:{17:{18:vr[32],25:{38:vr[33]},26:vr[32],27:vr[32],28:vr[32]}}},47:{3:vr[7],16:{17:{18:vr[32],25:vr[32],26:{38:vr[33]},27:{38:vr[33]}}}},48:{3:vr[9],16:{17:{18:vr[32],25:vr[32],26:vr[32],27:vr[11]},40:vr[36]}}},"{D113A9D2-9D6B-4929-AA2D-F23B5EE8CBE7}":{1:60,2:{3:vr[42],16:{17:{18:vr[43],25:vr[43],26:vr[43],27:vr[43]}}},31:{32:{6:61,12:vr[44]},35:{6:61,12:vr[44]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{18603FDC-E32A-4AB5-989C-0864C3EAD2B8}":{1:65,2:{3:vr[42],16:{17:{18:vr[45],25:vr[45],26:vr[45],27:vr[45]}}},31:{32:{6:61,12:vr[46]},35:{6:61,12:vr[46]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{306799F8-075E-4A3A-A7F6-7FBC6576F1A4}":{1:66,2:{3:vr[42],16:{17:{18:vr[47],25:vr[47],26:vr[47],27:vr[47]}}},31:{32:{6:61,12:vr[48]},35:{6:61,12:vr[48]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{E269D01E-BC32-4049-B463-5C60D7B0CCD2}":{1:67,2:{3:vr[42],16:{17:{18:vr[49],25:vr[49],26:vr[49],27:vr[49]}}},31:{32:{6:61,12:vr[50]},35:{6:61,12:vr[50]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{327F97BB-C833-4FB7-BDE5-3F7075034690}":{1:68,2:{3:vr[42],16:{17:{18:vr[51],25:vr[51],26:vr[51],27:vr[51]}}},31:{32:{6:61,12:vr[52]},35:{6:61,12:vr[52]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{638B1855-1B75-4FBE-930C-398BA8C253C6}":{1:69,2:{3:vr[42],16:{17:{18:vr[53],25:vr[53],26:vr[53],27:vr[53]}}},31:{32:{6:61,12:vr[54]},35:{6:61,12:vr[54]}},39:vr[37],43:vr[37],44:{3:vr[7],16:{17:{18:vr[11]}}},46:{3:vr[7],16:{17:{25:vr[11]}}},47:{3:vr[7],16:{17:{26:vr[11]}}},48:{3:vr[7],16:{17:{27:{38:{6:61,12:{14:49}}}}}}},"{9D7B26C5-4107-4FEC-AEDC-1716B250A1EF}":{1:70,2:{3:vr[0],16:{17:{26:vr[1],27:vr[1]}}},39:vr[55],43:vr[55],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:vr[1]}}},48:{3:vr[7],16:{17:{27:vr[1]}}}},"{3B4B98B0-60AC-42C2-AFA5-B58CD77FA1E5}":{1:71,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[44]}}},27:{19:{21:20,23:22,24:{12:vr[44]}}}}}},39:vr[57],43:vr[57],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[44]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[44]}}}}}}},"{0E3FDE45-AF77-4B5C-9715-49D594BDF05E}":{1:72,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[46]}}},27:{19:{21:20,23:22,24:{12:vr[46]}}}}}},39:vr[59],43:vr[59],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[46]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[46]}}}}}}},"{C083E6E3-FA7D-4D7B-A595-EF9225AFEA82}":{1:73,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[48]}}},27:{19:{21:20,23:22,24:{12:vr[48]}}}}}},39:vr[61],43:vr[61],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[48]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[48]}}}}}}},"{D27102A9-8310-4765-A935-A1911B00CA55}":{1:74,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[50]}}},27:{19:{21:20,23:22,24:{12:vr[50]}}}}}},39:vr[63],43:vr[63],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[50]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[50]}}}}}}},"{5FD0F851-EC5A-4D38-B0AD-8093EC10F338}":{1:75,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[52]}}},27:{19:{21:20,23:22,24:{12:vr[52]}}}}}},39:vr[65],43:vr[65],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[52]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[52]}}}}}}},"{68D230F3-CF80-4859-8CE7-A43EE81993B5}":{1:76,2:{3:vr[0],16:{17:{26:{19:{21:20,23:22,24:{12:vr[54]}}},27:{19:{21:20,23:22,24:{12:vr[54]}}}}}},39:vr[67],43:vr[67],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:20,23:22,24:{12:vr[54]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:20,23:22,24:{12:vr[54]}}}}}}},"{7E9639D4-E3E2-4D34-9284-5A2195B3D0D7}":{1:77,2:{3:vr[0],16:{17:{18:vr[69],25:vr[69],26:vr[69],27:vr[69]}}},39:{16:{17:{26:vr[69],27:vr[69]}}},43:{16:{17:{18:vr[69],25:vr[69]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:vr[70]}}}}},48:{3:vr[71],16:{32:vr[72]}},78:{16:{17:{18:vr[69],25:vr[69]}}}},"{69012ECD-51FC-41F1-AA8D-1B2483CD663E}":{1:82,2:{3:vr[0],16:{17:{18:vr[3],25:vr[3],26:vr[3],27:vr[3]}}},39:{16:{17:{26:vr[3],27:vr[3]}}},43:{16:{17:{18:vr[3],25:vr[3]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[44]}}}}}},48:{3:vr[71],16:{32:vr[5]}},78:{16:{17:{18:vr[3],25:vr[3]}}}},"{72833802-FEF1-4C79-8D5D-14CF1EAF98D9}":{1:83,2:{3:vr[0],16:{17:{18:vr[12],25:vr[12],26:vr[12],27:vr[12]}}},39:{16:{17:{26:vr[12],27:vr[12]}}},43:{16:{17:{18:vr[12],25:vr[12]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[46]}}}}}},48:{3:vr[71],16:{32:vr[14]}},78:{16:{17:{18:vr[12],25:vr[12]}}}},"{F2DE63D5-997A-4646-A377-4702673A728D}":{1:84,2:{3:vr[0],16:{17:{18:vr[17],25:vr[17],26:vr[17],27:vr[17]}}},39:{16:{17:{26:vr[17],27:vr[17]}}},43:{16:{17:{18:vr[17],25:vr[17]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[48]}}}}}},48:{3:vr[71],16:{32:vr[19]}},78:{16:{17:{18:vr[17],25:vr[17]}}}},"{17292A2E-F333-43FB-9621-5CBBE7FDCDCB}":{1:85,2:{3:vr[0],16:{17:{18:vr[22],25:vr[22],26:vr[22],27:vr[22]}}},39:{16:{17:{26:vr[22],27:vr[22]}}},43:{16:{17:{18:vr[22],25:vr[22]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[50]}}}}}},48:{3:vr[71],16:{32:vr[24]}},78:{16:{17:{18:vr[22],25:vr[22]}}}},"{5A111915-BE36-4E01-A7E5-04B1672EAD32}":{1:86,2:{3:vr[0],16:{17:{18:vr[27],25:vr[27],26:vr[27],27:vr[27]}}},39:{16:{17:{26:vr[27],27:vr[27]}}},43:{16:{17:{18:vr[27],25:vr[27]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[52]}}}}}},48:{3:vr[71],16:{32:vr[29]}},78:{16:{17:{18:vr[27],25:vr[27]}}}},"{912C8C85-51F0-491E-9774-3900AFEF0FD7}":{1:87,2:{3:vr[0],16:{17:{18:vr[32],25:vr[32],26:vr[32],27:vr[32]}}},39:{16:{17:{26:vr[32],27:vr[32]}}},43:{16:{17:{18:vr[32],25:vr[32]}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[54]}}}}}},48:{3:vr[71],16:{32:vr[34]}},78:{16:{17:{18:vr[32],25:vr[32]}}}},"{616DA210-FB5B-4158-B5E0-FEB733F419BA}":{1:88,2:{3:vr[0],16:{17:{18:vr[1],25:vr[1],26:vr[1],27:vr[1],28:vr[1],29:vr[1]}}},39:vr[55],43:vr[55],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:vr[70]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:vr[70]}}}}}},"{BC89EF96-8CEA-46FF-86C4-4CE0E7609802}":{1:90,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[44]}}},25:{19:{21:20,23:22,24:{12:vr[44]}}},26:{19:{21:20,23:22,24:{12:vr[44]}}},27:{19:{21:20,23:22,24:{12:vr[44]}}},28:{19:{21:20,23:22,24:{12:vr[44]}}},29:{19:{21:20,23:22,24:{12:vr[44]}}}}}},39:vr[57],43:vr[57],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[44]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[44]}}}}}}},"{5DA37D80-6434-44D0-A028-1B22A696006F}":{1:91,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[46]}}},25:{19:{21:20,23:22,24:{12:vr[46]}}},26:{19:{21:20,23:22,24:{12:vr[46]}}},27:{19:{21:20,23:22,24:{12:vr[46]}}},28:{19:{21:20,23:22,24:{12:vr[46]}}},29:{19:{21:20,23:22,24:{12:vr[46]}}}}}},39:vr[59],43:vr[59],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[46]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[46]}}}}}}},"{8799B23B-EC83-4686-B30A-512413B5E67A}":{1:92,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[48]}}},25:{19:{21:20,23:22,24:{12:vr[48]}}},26:{19:{21:20,23:22,24:{12:vr[48]}}},27:{19:{21:20,23:22,24:{12:vr[48]}}},28:{19:{21:20,23:22,24:{12:vr[48]}}},29:{19:{21:20,23:22,24:{12:vr[48]}}}}}},39:vr[61],43:vr[61],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[48]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[48]}}}}}}},"{ED083AE6-46FA-4A59-8FB0-9F97EB10719F}":{1:93,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[50]}}},25:{19:{21:20,23:22,24:{12:vr[50]}}},26:{19:{21:20,23:22,24:{12:vr[50]}}},27:{19:{21:20,23:22,24:{12:vr[50]}}},28:{19:{21:20,23:22,24:{12:vr[50]}}},29:{19:{21:20,23:22,24:{12:vr[50]}}}}}},39:vr[63],43:vr[63],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[50]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[50]}}}}}}},"{BDBED569-4797-4DF1-A0F4-6AAB3CD982D8}":{1:94,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[52]}}},25:{19:{21:20,23:22,24:{12:vr[52]}}},26:{19:{21:20,23:22,24:{12:vr[52]}}},27:{19:{21:20,23:22,24:{12:vr[52]}}},28:{19:{21:20,23:22,24:{12:vr[52]}}},29:{19:{21:20,23:22,24:{12:vr[52]}}}}}},39:vr[65],43:vr[65],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[52]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[52]}}}}}}},"{E8B1032C-EA38-4F05-BA0D-38AFFFC7BED3}":{1:95,2:{3:vr[0],16:{17:{18:{19:{21:20,23:22,24:{12:vr[54]}}},25:{19:{21:20,23:22,24:{12:vr[54]}}},26:{19:{21:20,23:22,24:{12:vr[54]}}},27:{19:{21:20,23:22,24:{12:vr[54]}}},28:{19:{21:20,23:22,24:{12:vr[54]}}},29:{19:{21:20,23:22,24:{12:vr[54]}}}}}},39:vr[67],43:vr[67],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[54]}}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:vr[54]}}}}}}},"{793D81CF-94F2-401A-BA57-92F5A7B2D0C5}":{1:96,2:{3:vr[2],16:{17:{18:vr[89],25:vr[89],26:vr[89],27:vr[89],28:vr[89]},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:vr[107]}},"{B301B821-A1FF-4177-AEE7-76D212191A09}":{1:97,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[44]}}},25:{19:{21:20,23:22,24:{12:vr[44]}}},26:{19:{21:20,23:22,24:{12:vr[44]}}},27:{19:{21:20,23:22,24:{12:vr[44]}}},28:{19:{21:20,23:22,24:{12:vr[44]}}}},40:vr[88]}},39:{16:vr[91]},43:{16:vr[91]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[44]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[10]}}},"{9DCAF9ED-07DC-4A11-8D7F-57B35C25682E}":{1:98,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[46]}}},25:{19:{21:20,23:22,24:{12:vr[46]}}},26:{19:{21:20,23:22,24:{12:vr[46]}}},27:{19:{21:20,23:22,24:{12:vr[46]}}},28:{19:{21:20,23:22,24:{12:vr[46]}}}},40:vr[88]}},39:{16:vr[93]},43:{16:vr[93]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[46]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[16]}}},"{1FECB4D8-DB02-4DC6-A0A2-4F2EBAE1DC90}":{1:99,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[48]}}},25:{19:{21:20,23:22,24:{12:vr[48]}}},26:{19:{21:20,23:22,24:{12:vr[48]}}},27:{19:{21:20,23:22,24:{12:vr[48]}}},28:{19:{21:20,23:22,24:{12:vr[48]}}}},40:vr[88]}},39:{16:vr[95]},43:{16:vr[95]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[48]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[21]}}},"{1E171933-4619-4E11-9A3F-F7608DF75F80}":{1:100,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[50]}}},25:{19:{21:20,23:22,24:{12:vr[50]}}},26:{19:{21:20,23:22,24:{12:vr[50]}}},27:{19:{21:20,23:22,24:{12:vr[50]}}},28:{19:{21:20,23:22,24:{12:vr[50]}}}},40:vr[88]}},39:{16:vr[97]},43:{16:vr[97]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[50]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[26]}}},"{FABFCF23-3B69-468F-B69F-88F6DE6A72F2}":{1:101,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[52]}}},25:{19:{21:20,23:22,24:{12:vr[52]}}},26:{19:{21:20,23:22,24:{12:vr[52]}}},27:{19:{21:20,23:22,24:{12:vr[52]}}},28:{19:{21:20,23:22,24:{12:vr[52]}}}},40:vr[88]}},39:{16:vr[99]},43:{16:vr[99]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[52]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[31]}}},"{10A1B5D5-9B99-4C35-A422-299274C87663}":{1:102,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[54]}}},25:{19:{21:20,23:22,24:{12:vr[54]}}},26:{19:{21:20,23:22,24:{12:vr[54]}}},27:{19:{21:20,23:22,24:{12:vr[54]}}},28:{19:{21:20,23:22,24:{12:vr[54]}}}},40:vr[88]}},39:{16:vr[101]},43:{16:vr[101]},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[54]}}}},40:vr[88]}},48:{3:vr[9],16:{40:vr[36]}}},"{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}":{1:103,2:{3:vr[103],16:{17:vr[104],40:vr[105]}},39:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},44:{3:vr[106],16:vr[107]},46:{3:vr[106],16:vr[107]},47:{3:vr[106],16:{17:vr[108],40:vr[109]}},48:{3:vr[106],16:{17:vr[110],40:vr[109]}}},"{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}":{1:107,2:{3:vr[103],16:{17:vr[104],40:vr[112]}},39:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[10]}},46:{3:vr[106],16:{40:vr[10]}},47:{3:vr[106],16:{17:vr[108],40:vr[10]}},48:{3:vr[106],16:{17:vr[110],40:vr[10]}}},"{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}":{1:108,2:{3:vr[103],16:{17:vr[104],40:vr[115]}},39:{16:{40:{24:{12:{14:51,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:51,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[16]}},46:{3:vr[106],16:{40:vr[16]}},47:{3:vr[106],16:{17:vr[108],40:vr[16]}},48:{3:vr[106],16:{17:vr[110],40:vr[16]}}},"{F5AB1C69-6EDB-4FF4-983F-18BD219EF322}":{1:109,2:{3:vr[103],16:{17:vr[104],40:vr[118]}},39:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[21]}},46:{3:vr[106],16:{40:vr[21]}},47:{3:vr[106],16:{17:vr[108],40:vr[21]}},48:{3:vr[106],16:{17:vr[110],40:vr[21]}}},"{00A15C55-8517-42AA-B614-E9B94910E393}":{1:110,2:{3:vr[103],16:{17:vr[104],40:vr[121]}},39:{16:{40:{24:{12:{14:55,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:55,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[26]}},46:{3:vr[106],16:{40:vr[26]}},47:{3:vr[106],16:{17:vr[108],40:vr[26]}},48:{3:vr[106],16:{17:vr[110],40:vr[26]}}},"{7DF18680-E054-41AD-8BC1-D1AEF772440D}":{1:111,2:{3:vr[103],16:{17:vr[104],40:vr[124]}},39:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[31]}},46:{3:vr[106],16:{40:vr[31]}},47:{3:vr[106],16:{17:vr[108],40:vr[31]}},48:{3:vr[106],16:{17:vr[110],40:vr[31]}}},"{93296810-A885-4BE3-A3E7-6D5BEEA58F35}":{1:112,2:{3:vr[103],16:{17:vr[104],40:vr[127]}},39:{16:{40:{24:{12:{14:59,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:59,62:vr[6]}}}}},44:{3:vr[106],16:{40:vr[36]}},46:{3:vr[106],16:{40:vr[36]}},47:{3:vr[106],16:{17:vr[108],40:vr[36]}},48:{3:vr[106],16:{17:vr[110],40:vr[36]}}},"{8EC20E35-A176-4012-BC5E-935CFFF8708E}":{1:113,2:{3:{4:{6:5},12:vr[131]},16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:vr[107]},46:{3:vr[9],16:vr[107]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[109]}},114:vr[129],115:vr[129]},"{6E25E649-3F16-4E02-A733-19D2CDBF48F0}":{1:116,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[10]}},46:{3:vr[9],16:{40:vr[10]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[10]}},114:vr[129],115:vr[129]},"{85BE263C-DBD7-4A20-BB59-AAB30ACAA65A}":{1:117,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[16]}},46:{3:vr[9],16:{40:vr[16]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[16]}},114:vr[129],115:vr[129]},"{EB344D84-9AFB-497E-A393-DC336BA19D2E}":{1:118,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[21]}},46:{3:vr[9],16:{40:vr[21]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[21]}},114:vr[129],115:vr[129]},"{EB9631B5-78F2-41C9-869B-9F39066F8104}":{1:119,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[26]}},46:{3:vr[9],16:{40:vr[26]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[26]}},114:vr[129],115:vr[129]},"{74C1A8A3-306A-4EB7-A6B1-4F7E0EB9C5D6}":{1:120,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[31]}},46:{3:vr[9],16:{40:vr[31]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[31]}},114:vr[129],115:vr[129]},"{2A488322-F2BA-4B5B-9748-0D474271808F}":{1:121,2:{3:vr[2],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}},27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[88]}},39:vr[85],43:vr[85],44:{3:vr[9],16:{40:vr[36]}},46:{3:vr[9],16:{40:vr[36]}},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[88]}},48:{3:vr[9],16:{17:{27:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[36]}},114:vr[129],115:vr[129]},"{D7AC3CCA-C797-4891-BE02-D94E43425B78}":{1:122,2:{3:vr[2],16:{17:{18:vr[89],25:vr[89],26:vr[89],27:vr[89],28:vr[89],29:vr[89]},40:vr[105]}},39:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[131]}}}},40:vr[105]}},48:{3:vr[7],16:{40:vr[105]}}},"{69CF1AB2-1976-4502-BF36-3FF5EA218861}":{1:123,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[44]}}},25:{19:{21:20,23:22,24:{12:vr[44]}}},26:{19:{21:20,23:22,24:{12:vr[44]}}},27:{19:{21:20,23:22,24:{12:vr[44]}}},28:{19:{21:20,23:22,24:{12:vr[44]}}},29:{19:{21:20,23:22,24:{12:vr[44]}}}},40:vr[112]}},39:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[44]}}}},40:vr[112]}},48:{3:vr[7],16:vr[91]}},"{8A107856-5554-42FB-B03E-39F5DBC370BA}":{1:124,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[46]}}},25:{19:{21:20,23:22,24:{12:vr[46]}}},26:{19:{21:20,23:22,24:{12:vr[46]}}},27:{19:{21:20,23:22,24:{12:vr[46]}}},28:{19:{21:20,23:22,24:{12:vr[46]}}},29:{19:{21:20,23:22,24:{12:vr[46]}}}},40:vr[115]}},39:{16:{40:{24:{12:{14:51,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:51,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[46]}}}},40:vr[115]}},48:{3:vr[7],16:vr[93]}},"{0505E3EF-67EA-436B-97B2-0124C06EBD24}":{1:125,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[48]}}},25:{19:{21:20,23:22,24:{12:vr[48]}}},26:{19:{21:20,23:22,24:{12:vr[48]}}},27:{19:{21:20,23:22,24:{12:vr[48]}}},28:{19:{21:20,23:22,24:{12:vr[48]}}},29:{19:{21:20,23:22,24:{12:vr[48]}}}},40:vr[118]}},39:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[48]}}}},40:vr[118]}},48:{3:vr[7],16:vr[95]}},"{C4B1156A-380E-4F78-BDF5-A606A8083BF9}":{1:126,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[50]}}},25:{19:{21:20,23:22,24:{12:vr[50]}}},26:{19:{21:20,23:22,24:{12:vr[50]}}},27:{19:{21:20,23:22,24:{12:vr[50]}}},28:{19:{21:20,23:22,24:{12:vr[50]}}},29:{19:{21:20,23:22,24:{12:vr[50]}}}},40:vr[121]}},39:{16:{40:{24:{12:{14:55,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:55,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[50]}}}},40:vr[121]}},48:{3:vr[7],16:vr[97]}},"{22838BEF-8BB2-4498-84A7-C5851F593DF1}":{1:127,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[52]}}},25:{19:{21:20,23:22,24:{12:vr[52]}}},26:{19:{21:20,23:22,24:{12:vr[52]}}},27:{19:{21:20,23:22,24:{12:vr[52]}}},28:{19:{21:20,23:22,24:{12:vr[52]}}},29:{19:{21:20,23:22,24:{12:vr[52]}}}},40:vr[124]}},39:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[52]}}}},40:vr[124]}},48:{3:vr[7],16:vr[99]}},"{16D9F66E-5EB9-4882-86FB-DCBF35E3C3E4}":{1:128,2:{3:vr[2],16:{17:{18:{19:{21:20,23:22,24:{12:vr[54]}}},25:{19:{21:20,23:22,24:{12:vr[54]}}},26:{19:{21:20,23:22,24:{12:vr[54]}}},27:{19:{21:20,23:22,24:{12:vr[54]}}},28:{19:{21:20,23:22,24:{12:vr[54]}}},29:{19:{21:20,23:22,24:{12:vr[54]}}}},40:vr[127]}},39:{16:{40:{24:{12:{14:59,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:59,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:89,23:22,24:{12:vr[54]}}}},40:vr[127]}},48:{3:vr[7],16:vr[101]}},"{E8034E78-7F5D-4C2E-B375-FC64B27BC917}":{1:129,2:{3:vr[42],16:{40:vr[105]}},39:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},44:{3:vr[7],16:{17:vr[137],40:vr[138]}},46:{3:vr[7],16:{17:vr[139],40:vr[138]}},47:{3:vr[7],16:{17:vr[140],40:vr[138]}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{125E5076-3810-47DD-B79F-674D7AD40C01}":{1:131,2:{3:vr[42],16:{40:vr[10]}},39:{16:{40:vr[141]}},43:{16:{40:vr[141]}},44:{3:vr[7],16:{17:vr[137],40:vr[141]}},46:{3:vr[7],16:{17:vr[139],40:vr[141]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:34,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{37CE84F3-28C3-443E-9E96-99CF82512B78}":{1:133,2:{3:vr[42],16:{40:vr[16]}},39:{16:{40:vr[142]}},43:{16:{40:vr[142]}},44:{3:vr[7],16:{17:vr[137],40:vr[142]}},46:{3:vr[7],16:{17:vr[139],40:vr[142]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:51,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{D03447BB-5D67-496B-8E87-E561075AD55C}":{1:134,2:{3:vr[42],16:{40:vr[21]}},39:{16:{40:vr[143]}},43:{16:{40:vr[143]}},44:{3:vr[7],16:{17:vr[137],40:vr[143]}},46:{3:vr[7],16:{17:vr[139],40:vr[143]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:53,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{E929F9F4-4A8F-4326-A1B4-22849713DDAB}":{1:135,2:{3:vr[42],16:{40:vr[26]}},39:{16:{40:vr[144]}},43:{16:{40:vr[144]}},44:{3:vr[7],16:{17:vr[137],40:vr[144]}},46:{3:vr[7],16:{17:vr[139],40:vr[144]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:55,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{8FD4443E-F989-4FC4-A0C8-D5A2AF1F390B}":{1:136,2:{3:vr[42],16:{40:vr[31]}},39:{16:{40:vr[145]}},43:{16:{40:vr[145]}},44:{3:vr[7],16:{17:vr[137],40:vr[145]}},46:{3:vr[7],16:{17:vr[139],40:vr[145]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:57,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{AF606853-7671-496A-8E4F-DF71F8EC918B}":{1:137,2:{3:vr[42],16:{40:vr[36]}},39:{16:{40:vr[146]}},43:{16:{40:vr[146]}},44:{3:vr[7],16:{17:vr[137],40:vr[146]}},46:{3:vr[7],16:{17:vr[139],40:vr[146]}},47:{3:vr[7],16:{17:vr[140],40:{24:{12:{14:59,132:vr[6]}}}}},48:{3:vr[7],16:{17:{27:{19:{21:89,23:22,24:{12:{14:49}}}}},40:vr[109]}}},"{5202B0CA-FC54-4496-8BCA-5EF66A818D29}":{1:138,2:{3:vr[2],16:{40:vr[105]}},39:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:37,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[105]}},48:{3:vr[9],16:vr[107]}},"{0660B408-B3CF-4A94-85FC-2B1E0A45F4A2}":{1:139,2:{3:vr[2],16:vr[91]},39:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:34,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[112]}},48:{3:vr[9],16:{40:vr[16]}}},"{91EBBBCC-DAD2-459C-BE2E-F6DE35CF9A28}":{1:140,2:{3:vr[2],16:vr[95]},39:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:53,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[118]}},48:{3:vr[9],16:{40:vr[26]}}},"{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}":{1:141,2:{3:vr[2],16:vr[99]},39:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},43:{16:{40:{24:{12:{14:57,62:vr[6]}}}}},44:{3:vr[7]},46:{3:vr[7]},47:{3:vr[7],16:{17:{26:{19:{21:79,23:80,24:{12:vr[131]}}}},40:vr[124]}},48:{3:vr[9],16:{40:vr[36]}}}};function WO(yt){var ct={};return Object.keys(yt).forEach(function(at){tr(yt[at])=="object"?ct[Zk[Number(at)]]=WO(yt[at]):ct[Zk[Number(at)]]=Zk[yt[at]]}),ct}function xF(yt){var ct=_F[yt];return ct?WO(ct):void 0}function SF(yt){yt.bindAttributePicker("a:tcPr","*",wF)}var wF=function(ct,at,ut,ot,gt){var xt=EF(ct,at,ut,ot),Mt=ut.split("-"),kt=parseInt(Mt[0],10),zt=parseInt(Mt[1],10),Ht=Mt[2],rr=ct.parentElement("a:tbl").childElementOptional("a:tblPr"),ur=TF(ct,at,Ht,rr);if(ur!==void 0&&ur!==iw)return ur;var _r=xt.tableStyle,Dr=xt.bandRow,Br=xt.bandCol;if(_r){var Ur=_r.band1H,Zr=_r.band2H,Tn=_r.band1V,jn=_r.band2V,ts=_r.firstRow,us=_r.firstCol,Os=_r.wholeTbl,Hs=(kt+1)%2==1,Ks=(zt+1)%2==1;return ts&&kt===0?fN(ts,at,Ht,Os,_r):us&&kt===0?fN(us,at,Ht,Os,_r):Dr?fN(ts?Hs?Zr:Ur:Hs?Ur:Zr,at,Ht,Os,_r):Br?fN(us?Ks?jn:Tn:Ks?Tn:jn,at,Ht,Os,_r):pN(Os,at,Ht,_r)}};function fN(yt,ct,at,ut,ot){if(yt){var gt=pN(yt,ct,at,ot);return gt===void 0?pN(ut,ct,at,ot):gt}else return pN(ut,ct,at,ot)}function pN(yt,ct,at,ut){var ot,gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br;switch(at){case"isBold":{var Ur=yt&&yt?.tcTxStyle;return Ur?(ot=Ur.b)!=null?ot:"off":"false"}case"isItalic":{var Zr=yt&&yt?.tcTxStyle;return Zr?(gt=Zr.i)!=null?gt:"off":"false"}case"fillColor":{var Tn=yt&&((kt=(Mt=(xt=yt.tcStyle)==null?void 0:xt.fill)==null?void 0:Mt.solidFill)==null?void 0:kt.schemeClr);if(Tn)return m0(Tn,ct);if(Tn=(Ht=(zt=ut.tblBg)==null?void 0:zt.fillRef)==null?void 0:Ht.schemeClr,Tn){var jn=Number((ur=(rr=ut.tblBg)==null?void 0:rr.fillRef)==null?void 0:ur.idx),ts=ct.theme.childElementOptional("a:theme","a:themeElements","a:fmtScheme","a:fillStyleLst");if(jn&&ts)return new nT(ts?.elements[jn],ct,void 0,Tn.val)}return}case"fontFamily":{var us=yt&&((_r=yt.tcTxStyle)==null?void 0:_r.fontRef);return us?Hk((Dr=us.idx)!=null?Dr:"none",ct).join(","):void 0}case"fontColor":{var Os=yt&&((Br=yt.tcTxStyle)==null?void 0:Br.schemeClr);return Os?m0(Os,ct):void 0}case"bottomBorderWidth":return new vS(yt,"bottom").getBorderWidth();case"bottomBorderColor":return new vS(yt,"bottom").getBorderColor(ct);case"bottomBorderStyle":return new vS(yt,"bottom").getBorderType();case"topBorderWidth":return new vS(yt,"top").getBorderWidth();case"topBorderColor":return new vS(yt,"top").getBorderColor(ct);case"topBorderStyle":return new vS(yt,"top").getBorderType();case"leftBorderWidth":return new vS(yt,"left").getBorderWidth();case"leftBorderColor":return new vS(yt,"left").getBorderColor(ct);case"leftBorderStyle":return new vS(yt,"left").getBorderType();case"rightBorderWidth":return new vS(yt,"right").getBorderWidth();case"rightBorderColor":return new vS(yt,"right").getBorderColor(ct);case"rightBorderStyle":return new vS(yt,"right").getBorderType();default:return}}function TF(yt,ct,at,ut){switch(at){case"isBold":return;case"isItalic":return;case"fillColor":{var ot=yt.childElementOptional(Nt(Np,xA));return ot?new Ay().read(ot,ct):new Ay().read(ut,ct)}case"fontFamily":return;case"fontColor":return;case"bottomBorderWidth":return new n1(yt,"a:lnB").getBorderWidth();case"bottomBorderColor":return new n1(yt,"a:lnB").getBorderColor(ct);case"bottomBorderStyle":return new n1(yt,"a:lnB").getBorderType();case"bottomBorderStrokeDashArray":return new n1(yt,"a:lnB").getBorderStrokeDashArray();case"topBorderWidth":return new n1(yt,"a:lnT").getBorderWidth();case"topBorderColor":return new n1(yt,"a:lnT").getBorderColor(ct);case"topBorderStyle":return new n1(yt,"a:lnT").getBorderType();case"topBorderStrokeDashArray":return new n1(yt,"a:lnT").getBorderStrokeDashArray();case"leftBorderWidth":return new n1(yt,"a:lnL").getBorderWidth();case"leftBorderColor":return new n1(yt,"a:lnL").getBorderColor(ct);case"leftBorderStyle":return new n1(yt,"a:lnL").getBorderType();case"leftBorderStrokeDashArray":return new n1(yt,"a:lnL").getBorderStrokeDashArray();case"rightBorderWidth":return new n1(yt,"a:lnR").getBorderWidth();case"rightBorderColor":return new n1(yt,"a:lnR").getBorderColor(ct);case"rightBorderStyle":return new n1(yt,"a:lnR").getBorderType();case"rightBorderStrokeDashArray":return new n1(yt,"a:lnR").getBorderStrokeDashArray();default:return}}function EF(yt,ct,at,ut,ot){var gt=ut.tableStyleXML;return gt||(gt=ut.tableStyleXML=Object.freeze(AF(yt))),gt}function AF(yt,ct){var at=yt.parentElement("a:tbl").childElementOptional("a:tblPr");if(at&&at.hasChildElementWithName("a:tableStyleId")){var ut=at.childElement("a:tableStyleId").text,ot=xF(ut),gt=at.attr.getBoolean("bandCol",!1),xt=at.attr.getBoolean("bandRow",!1),Mt=at.attr.getBoolean("firstCol",!1),kt=at.attr.getBoolean("firstRow",!1),zt=at.attr.getBoolean("lastCol",!1),Ht=at.attr.getBoolean("lastRow",!1),rr=at.attr.getBoolean("rtl",!1);return{tableStyle:ot,bandCol:gt,bandRow:xt,firstCol:Mt,firstRow:kt,lastCol:zt,lastRow:Ht,rtl:rr}}else return{tableStyle:void 0,bandCol:!1,bandRow:!1,firstCol:!1,firstRow:!1,lastCol:!1,lastRow:!1,rtl:!1}}var vS=(function(){function yt(ct,at){Ot(this,yt),this.tcStyle=ct,this.lnKey=at}return Bt(yt,[{key:"getBorderColor",value:function(at){var ut,ot,gt,xt,Mt,kt=this.tcStyle&&((Mt=(xt=(gt=(ot=(ut=this.tcStyle.tcStyle)==null?void 0:ut.tcBdr)==null?void 0:ot[this.lnKey])==null?void 0:gt.ln)==null?void 0:xt.solidFill)==null?void 0:Mt.schemeClr);if(kt)return m0(kt,at)}},{key:"getBorderWidth",value:function(){var at,ut,ot,gt=this.tcStyle&&((ot=(ut=(at=this.tcStyle.tcStyle)==null?void 0:at.tcBdr)==null?void 0:ut[this.lnKey])==null?void 0:ot.ln);if(gt)return Number(gt.w)}},{key:"getBorderType",value:function(){var at,ut,ot,gt=this.tcStyle&&((ot=(ut=(at=this.tcStyle.tcStyle)==null?void 0:at.tcBdr)==null?void 0:ut[this.lnKey])==null?void 0:ot.ln);if(gt){var xt=gt.prstDash;if(xt&&xt.val)return xt.val}return"solid"}}]),yt})(),n1=(function(){function yt(ct,at){Ot(this,yt),this.tcPrXMl=ct,this.lnKey=at}return Bt(yt,[{key:"getBorderColor",value:function(at){var ut=this.tcPrXMl.childElementOptional(this.lnKey);if(ut)return new Ay().read(ut.childElement(Nt(Np,xA)),at)}},{key:"getBorderWidth",value:function(){var at=this.tcPrXMl.childElementOptional(this.lnKey);if(at)return at.attr.getNumber("w",0)}},{key:"getBorderType",value:function(){var at=this.tcPrXMl.childElementOptional(this.lnKey);if(at){var ut=at.childElementOptional("a:prstDash");if(ut&&ut.attr.has("val")){var ot=ut.attr.getStringOptional("val");return ot==="dot"||ot==="sysDot"?"dotted":ot==="dash"||ot==="sysDash"?"dashed":"solid"}}}},{key:"getBorderStrokeDashArray",value:function(){var at=this.getBorderWidth(),ut=this.getBorderType();if(!(at===void 0||ut===void 0))switch(ut){case"solid":return"0";case"dash":return"".concat(5*at);case"dashDot":return" ".concat(5*at,", ").concat(5*at,", ").concat(at,", ").concat(5*at);case"dot":return"".concat(at,", ").concat(5*at);case"lgDash":return"".concat(2*at,", ").concat(at);case"lgDashDot":return"".concat(10*at,", ").concat(5*at,", ").concat(at,", ").concat(5*at,", ").concat(at,", ").concat(5*at);case"sysDash":return"".concat(5*at,", ").concat(2*at);case"sysDashDot":return"".concat(5*at,", ").concat(2*at,", ").concat(at,", ").concat(5*at);case"sysDashDotDot":return"".concat(5*at,", ").concat(2*at,", ").concat(at,", ").concat(5*at,", ").concat(at,", ").concat(5*at);case"sysDot":return"".concat(2*at,", ").concat(5*at);default:return"0"}}}]),yt})();function CF(yt){yt.bindChildPicker(["p:cSld"],"getBackgroundImageFill",DF),yt.bindAttributePicker(["p:cSld"],"backgroundResId",MF),yt.bindAttributePicker(["p:cSld"],"backgroundImageResourceType",IF),yt.bindAttributePicker(["p:cSld"],"backgroundColor",RF)}var DF=function(ct,at,ut,ot,gt){var xt=mN(ct,at,ut,ot);if(xt.bgXML&&xt.bgXML.hasChildElementWithName("p:bgRef")){var Mt=xt.bgXML.childElement("p:bgRef").attr.getNumber("idx");return at.theme.childElement("a:theme","a:themeElements","a:fmtScheme","a:bgFillStyleLst").elements[Mt-1e3-1]}else return xt.bgXML.childElementOptional("p:bgPr","a:blipFill")},MF=function(ct,at,ut,ot,gt){var xt=mN(ct,at,ut,ot);if(xt.bgXML&&xt.bgXML.hasChildElementWithName("p:bgRef")){var Mt=xt.bgXML.childElement("p:bgRef").attr.getNumber("idx"),kt=at.theme.childElement("a:theme","a:themeElements","a:fmtScheme","a:bgFillStyleLst").elements[Mt-1e3-1];if(kt.name==="a:blipFill")return XO(kt)}else{var zt=xt.bgXML.childElementOptional("p:bgPr","a:blipFill");return XO(zt)}};function XO(yt){if(yt)return yt.childElement("a:blip").attr.getStringOptional("r:embed")}var IF=function(ct,at,ut,ot,gt){var xt=mN(ct,at,ut,ot);return xt.bgXML&&xt.bgXML.hasChildElementWithName("p:bgRef")?"theme":xt.resourceType},RF=function(ct,at,ut,ot,gt){var xt=mN(ct,at,ut,ot);if(xt.bgXML&&xt.bgXML.hasChildElementWithName("p:bgRef")){var Mt=xt.bgXML.childElement("p:bgRef").attr.getNumber("idx"),kt=at.theme.childElement("a:theme","a:themeElements","a:fmtScheme","a:bgFillStyleLst").elements[Mt-1e3-1];return new Ay(xt.bgXML.childElement("p:bgRef").childElementOptional("a:schemeClr")).read(kt,at)}else return new Ay().read(xt.bgXML.childElement("p:bgPr",Nt(Np,xA)),at)};function mN(yt,ct,at,ut,ot){var gt=ut.bgXML;return gt||(gt=ut.bgXML=Object.freeze(PF(yt,ct))),gt}function PF(yt,ct){return yt.hasChildElementWithName("p:bg")?{bgXML:yt.childElement("p:bg"),resourceType:"slide"}:ct.layout.childElementOptional("p:sldLayout","p:cSld","p:bg")?{bgXML:ct.layout.childElement("p:sldLayout","p:cSld","p:bg"),resourceType:"layout"}:{bgXML:ct.master.childElement("p:sldMaster","p:cSld","p:bg"),resourceType:"master"}}var GM=new oy;JL(GM),Us(GM),bF(GM),SF(GM),CF(GM);function NF(){return GM.createPickers()}var Jk=(function(){function yt(ct,at){Ot(this,yt),this.slideXML=ct,this.context=at,this.animations=[]}return Bt(yt,[{key:"collect",value:function(){var at=this.slideXML.childElementOptional(new Np("p:sld","p:sldMaster","p:sldLayout"),"p:timing","p:tnLst","p:par","p:cTn","p:childTnLst");if(at)for(var ut=at.elementsWithName("p:seq"),ot=0;ot<ut.length;++ot){var gt=ut[ot],xt=gt.childElement("p:cTn").attr.getString("nodeType","afterEffect");this.searchAndIndexParXMLs(gt,xt,[ot],0,void 0)}return this.animations}},{key:"searchAndIndexParXMLs",value:function(at,ut,ot,gt,xt){var Mt=at.childElementOptional("p:cTn","p:childTnLst"),kt=Mt?Mt.elementsWithName("p:par"):[],zt=at.childElementOptional("p:cTn","p:stCondLst","p:cond"),Ht=xt,rr=0;if(zt){rr=zt&&zt.attr.getNumberOptional("delay")||0;var ur=zt.childElementOptional("p:tgtEl","p:spTgt");if(ur&&(Ht=Fo(this.context.resourceType)+ur.attr.getString("spid"),this.context.shapeParamsIndex[Ht].hidden))return}if(kt.length===0)this.handleLeafParXML(at,ut,ot,gt,Ht);else for(var _r=0;_r<kt.length;++_r)this.searchAndIndexParXMLs(kt[_r],ut,[].concat(Ct(ot),[_r]),gt+rr,Ht)}},{key:"handleLeafParXML",value:function(at,ut,ot,gt,xt){var Mt,kt,zt,Ht=at.childElementOptional("p:cTn","p:iterate"),rr=(Mt=Ht?.attr)==null?void 0:Mt.getStringOptional("type"),ur,_r,Dr=Ht?.childElementOptional("p:tmPct");if(Dr&&(_r=Ey(Dr.attr.getString("val"))),_r==null){var Br=Ht?.childElementOptional("p:tmAbs");Br&&(ur=Br.attr.getNumberOptional("val"))}var Ur=function(Qp){return ur??(_r!=null?_r*Qp:0)},Zr=at.childElementOptional("p:cTn","p:childTnLst"),Tn=Zr&&Zr.element.childElementOptional("p:cBhvr","p:tgtEl","p:spTgt"),jn=Tn?Fo(this.context.resourceType)+Tn.attr.getString("spid"):"",ts=Tn?.childElementOptional("p:txEl","p:pRg"),us=(kt=ts?.attr)==null?void 0:kt.getNumberOptional("st"),Os=(zt=ts?.attr)==null?void 0:zt.getNumberOptional("end"),Hs=!!Tn?.childElementOptional("p:bg"),Ks=us!=null&&Os!=null?{start:us,end:Os}:null;if(!(!this.context.shapeParamsIndex[jn]||this.context.shapeParamsIndex[jn].hidden)){var so=at.childElement("p:cTn"),To=at.childElementOptional("p:cTn","p:stCondLst","p:cond"),Oo=Zr?Zr.elements:[],Au=Number.MIN_SAFE_INTEGER;Oo.forEach(function(Ml){var Qp=0,pm=Ml.childElementOptional("p:cBhvr","p:cTn","p:stCondLst","p:cond");pm&&(Qp=pm.attr.getNumberOptional("delay")||0);var Uv=Ml.childElement("p:cBhvr","p:cTn").attr.getNumberOptional("dur");Uv===void 0&&(Uv=1),Uv+Qp>Au&&(Au=Uv+Qp)});var Tu,xu=so.childElementOptional("p:endCondLst");xu!==void 0&&xu.childElement("p:cond").attr.getStringOptional("evt")==="onNext"&&(Tu="onNext");var yu=so.attr.get("repeatCount","none");yu!=="indefinite"&&yu!=="none"&&(yu=yu/1e3,yu===0&&(yu="none"));var sp=so.attr.getStringOptional("presetClass");sp||(sp="entr");var Jl=Object.freeze({eventSourceShapeId:xt,spId:jn,pRg:Ks,pBg:Hs,textAnimMode:rr,textAnimIterateDelay:Ur,sequenceType:ut,animationXML:Zr,sequenceIndex:ot[1],parallelIndex:ot[3],isLoop:so.attr.has("repeatCount"),id:so.attr.getStringOptional("id")||"",presetClass:sp,presetID:so.attr.getStringOptional("presetID")||"",presetSubtype:so.attr.getStringOptional("presetSubtype"),repeatCount:yu,repeatEndCondition:Tu,nodeType:so.attr.getStringOptional("nodeType")||"afterEffect",delay:To&&To.attr.getNumberOptional("delay")||0,parentDelay:gt,duration:Au,autoRev:so.attr.getBoolean("autoRev",!1),soundEffectId:this.parseAnimeSoundEffect(at),dimAfter:this.parseDimAfter(at)});this.animations.push(Jl)}}},{key:"parseAnimeSoundEffect",value:function(at){var ut=at.childElementOptional("p:cTn","p:subTnLst","p:audio");if(ut!==void 0)return ut.childElement("p:cMediaNode","p:tgtEl","p:sndTgt").attr.getString("r:embed")}},{key:"parseDimAfter",value:function(at){var ut,ot,gt=at.childElementOptional("p:cTn","p:subTnLst","p:set","p:cBhvr");if(gt){var xt=gt.childElementOptional("p:attrNameLst","p:attrName");if(xt&&String(xt.text).includes("visibility"))return((ot=(ut=gt.childElementOptional("p:cTn"))==null?void 0:ut.attr)==null?void 0:ot.getStringOptional("masterRel"))==="nextClick"?"next":"same"}}}]),yt})();function kF(yt){if(!yt)return TP;var ct=yt.replace(/\s+/g,"").split(";").map(function(gt){var xt=gt.split(","),Mt=mt(xt,2),kt=Mt[0],zt=Mt[1];return{input:parseFloat(kt),output:parseFloat(zt)}});ct[ct.length-1].input<1&&ct.push({input:1,output:1});var at=ct.length-1,ut=0,ot=0;return function(gt){if(gt>=ut)for(var xt=ot;xt<at;xt++){var Mt=ct[xt],kt=ct[xt+1];if(gt>=Mt.input&&gt<=kt.input)return ot=xt,ut=gt,YO(gt,Mt,kt)}else for(var zt=ot;zt>=0;zt--){var Ht=ct[zt],rr=ct[zt+1];if(gt>=Ht.input&&gt<=rr.input)return ot=zt,ut=gt,YO(gt,Ht,rr)}return ot=0,ut=0,gt}}function YO(yt,ct,at){var ut=ct.input,ot=ct.output,gt=at.input,xt=at.output;return(yt-ut)/(gt-ut)*(xt-ot)+ot}var EA=(function(){function yt(ct){Ot(this,yt),this.behaviorNode=ct.childElement("p:cBhvr"),this.timingNode=this.behaviorNode.childElement("p:cTn")}return Bt(yt,[{key:"animeId",value:function(){var at;return String((at=this.timingNode.attr.getNumberOptional("id"))!=null?at:Date.now())}},{key:"duration",value:function(){var at=this.timingNode.attr.getStringOptional("dur");return at?at==="indefinite"?1/0:parseInt(at,10):1}},{key:"delay",value:function(){var at=this.timingNode.childElementOptional("p:stCondLst","p:cond");return at?at.attr.getNumber("delay",0):0}},{key:"ease",value:function(){var at=kF(this.timingNode.attr.getStringOptional("tmFilter")),ut=this.timingNode.attr.getStringOptional("spd");if(ut){var ot=Ey(ut);if(!Number.isNaN(ot)&&ot!==1&&ot!==0)return ot>0?function(gt){return at(gt/ot)}:function(gt){return 1-at(gt/-ot)}}return at}},{key:"reverse",value:function(){return!!this.timingNode.attr.getBooleanOptional("autoRev")}},{key:"rewind",value:function(){var at=this.timingNode.attr.getStringOptional("fill");return at==="transition"||at==="remove"}},{key:"repeat",value:function(){var at=this.timingNode.attr.get("repeatCount","");if(!at)return 1;if(at==="indefinite")return 1/0;var ut=Number(at)/1e3;return Number.isNaN(ut)?1:ut}},{key:"attrNames",value:function(){var at=this.behaviorNode.childElementOptional("p:attrNameLst"),ut=[];if(at){var ot=at.elementsWithName("p:attrName"),gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=this.mapAttrName(Mt.text);kt&&ut.push(kt)}}catch(zt){gt.e(zt)}finally{gt.f()}}return ut}},{key:"mapAttrName",value:function(at){if(typeof at=="string"){var ut=at.toLowerCase();switch(ut){case"ppt_x":case"ppt_y":case"ppt_w":case"ppt_h":case"xshear":case"yshear":case"fillcolor":return ut;case"scalex":return"scaleX";case"scaley":return"scaleY";case"style.rotation":case"r":return"rotate";case"style.visibility":return"visible";case"style.opacity":return"opacity"}}}}]),yt})();function OF(yt){var ct=qF(yt.split(/,|\s/i)),at=[],ut,ot,gt,xt=Jt(ct),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(/^[a-zA-Z]$/.test(kt)){if(gt!==void 0)throw new Error("invalid path: lack of number");ut!==void 0&&at.push({sign:ut,points:ot}),ut=kt,ot=[]}else{var zt=parseFloat(kt);if(Number.isNaN(zt))throw new Error("invalid path: unrecognized number ".concat(JSON.stringify(kt)));gt===void 0?gt=zt:(ot.push({x:gt,y:zt}),gt=void 0)}}}catch(Ht){xt.e(Ht)}finally{xt.f()}if(gt!==void 0)throw new Error("invalid path: lack of number");return ut!==void 0&&at.push({sign:ut,points:ot}),at}function qF(yt){var ct=[],at=Jt(yt),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;if(ot!=="")if(ot.length===1)ct.push(ot);else{var gt=ot[0];/[a-zA-Z]/.test(gt)?(ct.push(gt),ct.push(ot.substring(1))):ct.push(ot)}}}catch(xt){at.e(xt)}finally{at.f()}return ct}var LF=(function(){function yt(){Ot(this,yt);for(var ct=arguments.length,at=new Array(ct),ut=0;ut<ct;ut++)at[ut]=arguments[ut];if(at.length===0)throw new Error("expect 1 curve minimum");for(var ot=[],gt=0,xt=0,Mt=at;xt<Mt.length;xt++){var kt=Mt[xt];ot.push(kt.rectangle),gt+=kt.length}this.curves=Object.freeze(at),this.length=gt,this.rectangle=yt.unionRectangles(ot)}return Bt(yt,[{key:"get",value:function(at){var ut=0,ot=0,gt,xt=Jt(this.curves),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(gt=kt,ot=ut,at<ut+kt.length)break;ut+=kt.length}}catch(zt){xt.e(zt)}finally{xt.f()}return gt.get(at-ot)}}],[{key:"unionRectangles",value:function(at){var ut=Number.MAX_SAFE_INTEGER,ot=Number.MIN_SAFE_INTEGER,gt=Number.MAX_SAFE_INTEGER,xt=Number.MIN_SAFE_INTEGER,Mt=Jt(at),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;zt.left<ut&&(ut=zt.left),zt.right>ot&&(ot=zt.right),zt.top<gt&&(gt=zt.top),zt.bottom>xt&&(xt=zt.bottom)}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}return Object.freeze({left:ut,right:ot,top:gt,bottom:xt})}}]),yt})(),QO=(function(){function yt(ct,at){Ot(this,yt),this.beginX=ct.x,this.beginY=ct.y,this.deltaX=at.x-ct.x,this.deltaY=at.y-ct.y,this.length=Math.sqrt(this.deltaX*this.deltaX+this.deltaY*this.deltaY),this.rectangle=Object.freeze({left:Math.min(ct.x,at.x),right:Math.max(ct.x,at.x),top:Math.min(ct.y,at.y),bottom:Math.max(ct.y,at.y)})}return Bt(yt,[{key:"get",value:function(at){if(this.length===0)return{x:this.beginX,y:this.beginY};var ut=at/this.length;return ut=Math.max(0,ut),ut=Math.min(1,ut),{x:this.beginX+ut*this.deltaX,y:this.beginY+ut*this.deltaY}}}]),yt})(),eO=(function(){function yt(ct,at,ut,ot){Ot(this,yt),this.bezier=new p0.default([ct,at,ut,ot]),this.length=this.bezier.length(),this.rectangle=this.createRectangle()}return Bt(yt,[{key:"createRectangle",value:function(){var at=this.bezier.bbox();return Object.freeze({left:at.x.min,right:at.x.max,top:at.y.min,bottom:at.y.max})}},{key:"get",value:function(at){var ut=at/this.length;return ut=Math.max(0,ut),ut=Math.min(1,ut),this.bezier.get(ut)}}]),yt})();function FF(yt){var ct=OF(yt),at=[],ut,ot,gt,xt=Jt(ct),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.sign,Ht=kt.points;switch(zt){case"M":{QC(zt,Ht,1),ut=Ht[0],ot=Ht[0],gt=void 0;break}case"L":{QC(zt,Ht,1),VM(ot),at.push(new QO(ot,Ht[0])),ot=Ht[0],gt=void 0;break}case"Z":{QC(zt,Ht,0),VM(ot),at.push(new QO(ot,ut)),ot=ut,gt=void 0;break}case"C":{QC(zt,Ht,3),VM(ot),at.push(new eO(ot,Ht[0],Ht[1],Ht[2])),gt={controller:Ht[1],end:Ht[2]},ot=Ht[2];break}case"S":{if(!gt)throw new Error("invalid path: expect C or S before S");QC(zt,Ht,2),VM(ot);var rr=KO(gt);at.push(new eO(ot,rr,Ht[0],Ht[1])),gt={controller:Ht[0],end:Ht[1]},ot=Ht[1];break}case"Q":{QC(zt,Ht,2),VM(ot),at.push(new eO(ot,Ht[0],Ht[1])),gt={controller:Ht[0],end:Ht[1]},ot=Ht[1];break}case"T":{if(!gt)throw new Error("invalid path: expect Q or T before T");QC(zt,Ht,1),VM(ot);var ur=KO(gt);gt={controller:ur,end:Ht[0]},gt={controller:ur,end:Ht[0]},ot=Ht[0];break}case"E":break;default:throw new Error("invalid path: unrecognized sign ".concat(JSON.stringify(zt)))}}}catch(_r){xt.e(_r)}finally{xt.f()}return Nt(LF,at)}function KO(yt){var ct=yt.controller,at=yt.end,ut=at.x-ct.x,ot=at.y-ct.y;return{x:at.x+ut,y:at.y+ot}}function QC(yt,ct,at){if(ct.length!==at)throw new Error("invalid path: sign ".concat(yt," should have ").concat(at," points (").concat(2*at," number)"))}function VM(yt){if(!yt)throw new Error("invalid path: expect M")}var BF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.animBox,gt=new EA(at),xt=at.attr.getString("path","M 0 0"),Mt=FF(xt),kt=ot.initState,zt=kt.ppt_x,Ht=kt.ppt_y;return new tT({animBox:ot,effectType:ut.nodeType,playerID:gt.animeId(),eventSource:ut.eventSourceShapeId,duration:gt.duration(),ease:gt.ease(),repeat:gt.repeat(),delay:gt.delay(),reverse:gt.reverse(),rewind:gt.rewind(),transform:function(ur){var _r=Mt.get(ur*Mt.length),Dr=_r.x,Br=_r.y;return{ppt_x:(Dr||0)+zt,ppt_y:(Br||0)+Ht}}})},tO=(function(){function yt(ct){var at=ct.context,ut=ct.animBox;Ot(this,yt),this.context=at,this.animBox=ut}return Bt(yt,[{key:"parse",value:function(at,ut){var ot=at?.childElementOptional(new Np("p:strVal","p:fltVal","p:clrVal","p:intVal"));if(ot)switch(ot.name){case"p:fltVal":case"p:intVal":{var gt=parseFloat(ot.attr.getString("val"));return JS(gt)?gt:void 0}case"p:clrVal":{var xt=JT(ot.childElement(Nt(Np,mS)),this.context.slideContext);if(xt){var Mt=xt.rgb().object(),kt=Mt.r,zt=Mt.g,Ht=Mt.b;return new f0({r:kt,g:zt,b:Ht,a:1})}return}default:return JS(this.animBox.initState[ut])?new CM(ot.attr.getString("val"),this.formulaScope):ut==="visible"?ot.attr.getString("val")!=="hidden":ot.attr.getString("val")}}},{key:"formulaScope",get:function(){return this._formulaScope?this._formulaScope:this._formulaScope=new RP(this.animBox)}}]),yt})(),jF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.context,gt=ct.animBox,xt=new EA(at),Mt=xt.attrNames(),kt={},zt=new tO({context:ot,animBox:gt}),Ht=Jt(Mt),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value;switch(ur){case"visible":{var _r=zt.parse(at.childElementOptional("p:to"),"visible");_r!=null&&(kt.visible=_r,gt.preAnimation()||gt.preAnimation({visible:!_r}));break}case"opacity":case"xshear":case"yshear":{var Dr=zt.parse(at.childElementOptional("p:to"),ur);Dr!=null&&(kt[ur]=Dr);break}default:break}}}catch(Br){Ht.e(Br)}finally{Ht.f()}return new tT({animBox:gt,effectType:ut.nodeType,playerID:xt.animeId(),eventSource:ut.eventSourceShapeId,duration:xt.duration(),delay:xt.delay(),transform:fA(function(){var Br={};for(var Ur in kt)if(C1(kt,Ur))switch(Ur){case"visible":{Br.visible=!kt.visible;break}case"opacity":case"xshear":case"yshear":{Br[Ur]=gt.currentState[Ur];break}}return Br},kt)})},$F=function(ct){var at=ct.animBox,ut=ct.node,ot=ct.animation,gt=ut.attr.getStringOptional("transition");if(gt){var xt=new EA(ut),Mt=0,kt=1;return gt==="out"&&(Mt=1,kt=0),new tT({animBox:at,effectType:ot.nodeType,playerID:xt.animeId(),eventSource:ot.eventSourceShapeId,duration:xt.duration(),ease:xt.ease(),repeat:xt.repeat(),delay:xt.delay(),reverse:xt.reverse(),rewind:xt.rewind(),by:!0,transform:NP({opacity:Mt},{opacity:kt})})}},UF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.animBox,gt=ct.context,xt=new EA(at);if(xt.attrNames().includes("fillcolor")){var Mt=!1,kt;if(kt=rO(gt.slideContext,at.childElementOptional("p:to")),kt||(Mt=!0,kt=rO(gt.slideContext,at.childElementOptional("p:by"))),!!kt){var zt=kt,Ht=rO(gt.slideContext,at.childElementOptional("p:from")),rr;return new tT({animBox:ot,effectType:ut.nodeType,playerID:xt.animeId(),eventSource:ut.eventSourceShapeId,duration:xt.duration(),ease:xt.ease(),repeat:xt.repeat(),delay:xt.delay(),reverse:xt.reverse(),rewind:xt.rewind(),by:Mt,transform:function(_r){Ht||(Ht=ot.currentState.fillcolor,rr=Ht.alpha());var Dr=VI(Ht,zt,_r);return{fillcolor:rr>0?Dr.alpha(rr):Dr}}})}}};function rO(yt,ct){if(ct){var at=ct.childElementOptional(new Np("p:rgb","p:hsl"));if(at)switch(at.name){case"p:rgb":return new f0({r:at.attr.getNumber("r"),g:at.attr.getNumber("g"),b:at.attr.getNumber("b"),a:1});case"p:hsl":return new f0({h:at.attr.getNumber("h")/J_,s:at.attr.getNumber("s")/Ap*100,l:at.attr.getNumber("l")/Ap*100,a:1})}else{var ut=ct.childElement(Nt(Np,mS)),ot=JT(ut,yt);if(ot){var gt=ot.rgb().object(),xt=gt.r,Mt=gt.g,kt=gt.b;return new f0({r:xt,g:Mt,b:kt,a:1})}}}}var zF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.context,gt=ct.animBox,xt=new EA(at),Mt=!1,kt=nO(at.attr.getStringOptional("to"));if(kt==null&&(Mt=!0,kt=nO(at.attr.getStringOptional("by"))),kt==null){var zt=new tO({context:ot,animBox:gt}).parse(at.childElementOptional("p:by"),"rotate");JS(zt)&&(kt=pS(Number(zt)))}if(kt!=null){var Ht=kt,rr=nO(at.attr.getStringOptional("from"));return new tT({animBox:gt,effectType:ut.nodeType,playerID:xt.animeId(),eventSource:ut.eventSourceShapeId,duration:xt.duration(),ease:xt.ease(),repeat:xt.repeat(),delay:xt.delay(),reverse:xt.reverse(),rewind:xt.rewind(),by:Mt,transform:fA(function(){var ur;return{rotate:rr??(Mt?0:(ur=gt.currentState.rotate)!=null?ur:0)}},{rotate:Ht})})}};function nO(yt){var ct=Number(yt);if(!Number.isNaN(ct))return pS(ct)}var GF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.animBox,gt=new EA(at),xt=!1,Mt=iO(at.childElementOptional("p:to"));if(Mt==null&&(xt=!0,Mt=iO(at.childElementOptional("p:by"))),Mt!=null){var kt=Mt,zt=iO(at.childElementOptional("p:from"));return new tT({animBox:ot,effectType:ut.nodeType,playerID:gt.animeId(),eventSource:ut.eventSourceShapeId,duration:gt.duration(),ease:gt.ease(),repeat:gt.repeat(),delay:gt.delay(),reverse:gt.reverse(),rewind:gt.rewind(),by:xt,transform:fA(function(){var Ht,rr;return zt??(xt?{scaleX:1,scaleY:1}:{scaleX:(Ht=ot.currentState.scaleX)!=null?Ht:1,scaleY:(rr=ot.currentState.scaleY)!=null?rr:1})},kt)})}};function iO(yt){if(yt)return{scaleX:Ey(yt.attr.getString("x")),scaleY:Ey(yt.attr.getString("y"))}}var VF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.animBox,gt=new EA(at),xt=HF(at.attr.getString("cmd"));return new kP({animBox:ot,effectType:ut.nodeType,playerID:gt.animeId(),eventSource:ut.eventSourceShapeId,duration:1,delay:gt.delay(),reverse:gt.reverse(),rewind:gt.rewind(),cmd:xt})};function HF(yt){var ct=/^playFrom\(([^)]+)\)$/.exec(yt);return ct?{name:"playFrom",value:parseFloat(ct[1])}:yt.includes("pause")?{name:"pause"}:{name:"stop"}}function WF(yt,ct,at){var ut=yt.node,ot=yt.context,gt=yt.animBox;function xt(Ht){if(Ht){if(JS(gt.initState[at]))return new CM(Ht,kt.formulaScope);console.error("Expr ".concat(Ht," cannot work with targetKey ").concat(at))}}var Mt=ut.childElementOptional("p:tavLst");if(Mt){var kt=new tO({context:ot,animBox:gt}),zt=Mt.elementsWithName("p:tav").map(function(Ht){var rr=kt.parse(Ht.childElement("p:val"),at);if(rr!=null){var ur=Ey(Ht.attr.getString("tm")),_r=xt(Ht.attr.getStringOptional("fmla"));return{val:rr,progress:ur,fmla:_r}}}).filter(function(Ht){return!!Ht});if(!(zt.length<=0))if(ct==="lin"){if(JS(zt[0].val))return aO(zt,at,XT);if(zt[0].val instanceof f0)return aO(zt,at,OP)}else return aO(zt,at,XF)}}function aO(yt,ct,at){return function(ut){for(var ot=1;ot<yt.length;ot++){var gt=yt[ot-1],xt=yt[ot];if(ut>=gt.progress&&ut<=xt.progress){var Mt=at(gt.val,xt.val,(ut-gt.progress)/(xt.progress-gt.progress));return rt({},ct,gt.fmla?gt.fmla.evaluate(Mt):Mt)}}var kt=yt[yt.length-1],zt=kt.fmla,Ht=kt.val;return rt({},ct,zt?zt.evaluate(Ht):Ht)}}function XF(yt,ct,at){return at<1?yt:ct}var YF=(function(){function yt(ct,at){Ot(this,yt),this.node=ct,this.animBox=at}return Bt(yt,[{key:"parse",value:function(at,ut){var ot=this.node.attr.getStringOptional(at);if(ot){var gt=this.animBox.initState[ut];if(gt instanceof f0)try{return new f0(ot)}catch{return}if(JS(gt)){var xt=Number(ot);return JS(xt)?xt:(at==="by"&&(ut==="ppt_x"||ut==="ppt_y")&&(ot+="+#".concat(ut)),new CM(ot,this.formulaScope))}if(ut==="visible")return ot!=="hidden"}}},{key:"formulaScope",get:function(){return this._formulaScope?this._formulaScope:this._formulaScope=new RP(this.animBox)}}]),yt})(),QF=function(ct){var at=ct.node,ut=ct.animation,ot=ct.animBox,gt=new EA(at),xt=at.attr.getString("calcmode","lin"),Mt=gt.attrNames()[0];if(!Mt){console.error("Missing attrName for p:anim",gt.animeId());return}var kt=new YF(at,ot),zt=!1,Ht=WF(ct,xt,Mt);if(!Ht){var rr=kt.parse("from",Mt),ur=kt.parse("to",Mt);if(ur||(zt=!0,ur=kt.parse("by",Mt)),!ur)return;Ht=fA(function(){return rt({},Mt,rr??ot.currentState[Mt])},rt({},Mt,ur))}return new tT({animBox:ot,effectType:ut.nodeType,playerID:gt.animeId(),eventSource:ut.eventSourceShapeId,duration:gt.duration(),ease:gt.ease(),repeat:gt.repeat(),delay:gt.delay(),reverse:gt.reverse(),rewind:gt.rewind(),by:zt,transform:Ht})},KF=function(ct){switch(ct.node.name){case"p:animMotion":return BF(ct);case"p:set":return jF(ct);case"p:animEffect":return $F(ct);case"p:anim":return QF(ct);case"p:animClr":return UF(ct);case"p:animRot":return zF(ct);case"p:animScale":return GF(ct);case"p:cmd":return VF(ct);default:console.error("failed parsing ".concat(ct.node.name," animation node"))}};function ZF(yt,ct){if(yt.soundEffectId)return new kP({animBox:ct,effectType:yt.nodeType,playerID:"SF".concat(String(Date.now())),eventSource:yt.eventSourceShapeId,duration:1,delay:0,cmd:{name:"playSF",value:yt.soundEffectId}})}function ZO(yt,ct,at){return new tT({animBox:yt,effectType:ct,playerID:"Dim".concat(String(Date.now())),duration:1,delay:at,transform:fA(function(){return{visible:yt.currentState.visible}},{visible:!1})})}function JF(yt){return typeof yt=="number"?yt:yt==="indefinite"?1/0:1}var gN=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.animations=ct,this.context=at,this.mainPlayerSeq=[],this.interactivePlayerSeqs=new Map,this.subNextPlayerAnimBoxes=new Map,this.textAnimSpIds=new Set,this.triggerEvent=new Uk,this.animBoxes=new Map,this.textCount=0;var ot,gt,xt;this.type=at.resourceType;for(var Mt=0;Mt<this.animations.length;Mt+=1){var kt=this.animations[Mt],zt=this.getAnimationSeq(kt);if(zt){var Ht=this.getAnimBox(kt.spId,(ot=kt.pRg)==null?void 0:ot.start),rr=void 0;if((kt.textAnimMode==="lt"||kt.textAnimMode==="wd")&&!kt.pBg)this.textAnimSpIds.add(kt.spId),rr=this.getTextAnimationPlayer(kt,Ht);else if(rr=this.getAnimationPlayer(kt,Ht),rr&&kt.parentDelay>0){var ur=kt.parentDelay-zt.reduce(function(Dr,Br){return Dr+Br.duration},0);ur>0&&(rr=new wM({players:[rr],effectType:rr.effectType,delay:ur}))}if(rr){rr=this.joinSubSamePlayers(rr,kt,Ht);var _r=this.getSubNextPlayerAnimBoxes(this.getSeqId(kt));zt.length>0&&rr.effectType!==zt[zt.length-1].effectType&&this.squashLastSeqPlayers(zt),rr.effectType!=="withEffect"&&this.joinLastSubNextIntoPlayers(this.getSeqId(kt),zt),(rr.effectType!=="withEffect"||Mt===0)&&_r.push([]),kt.dimAfter==="next"&&_r[_r.length-1].push(Ht),zt.push(rr)}}}this.squashLastSeqPlayers(this.mainPlayerSeq),this.joinLastSubNextIntoPlayers("mainSeq",this.mainPlayerSeq),this.interactivePlayerSeqs.forEach(function(Dr,Br){ut.squashLastSeqPlayers(Dr),ut.joinLastSubNextIntoPlayers(Br,Dr)}),this.mainSeq=new zI({playerID:"mainSeq",players:this.mainPlayerSeq,effectType:(xt=(gt=this.mainPlayerSeq[0])==null?void 0:gt.effectType)!=null?xt:"clickEffect"}),this.interactiveSeqs=new Map,this.interactivePlayerSeqs.forEach(function(Dr,Br){var Ur,Zr;ut.interactiveSeqs.set(Br,new zI({playerID:"interactiveSeq"+Br,players:Dr,effectType:(Zr=(Ur=Dr[0])==null?void 0:Ur.effectType)!=null?Zr:"clickEffect"}))})}return Bt(yt,[{key:"withTextAnimation",value:function(at){return this.textAnimSpIds.has(at)}},{key:"end",value:function(){console.log("[animation manager]: end"),this.mainSeq.seek(this.mainSeq.duration+1)}},{key:"pause",value:function(){console.log("[animation manager]: pause");var at=Jt(this.mainSeq.players),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot.pause()}}catch(gt){at.e(gt)}finally{at.f()}this.interactiveSeqs.forEach(function(gt){var xt=Jt(gt.players),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;kt.pause()}}catch(zt){xt.e(zt)}finally{xt.f()}})}},{key:"reset",value:function(){var at=this;console.log("[animation manager]: reset"),this.mainSeq.reset(),this.interactiveSeqs.forEach(function(ut){return ut.reset()}),Jw.render(function(){at.animBoxes.forEach(function(ut){return ut.clearCache()})},!1,!1)}},{key:"logSeq",value:function(){var at="";at+=`mainSeq
`,ut(this.mainSeq," "),at+=`interactiveSeqs
`,this.interactiveSeqs.forEach(function(ot){return ut(ot," ")}),console.log(at);function ut(ot){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ot instanceof zI?(at+="".concat(gt,"seq ").concat(ot.effectType,`
`),ot.players.forEach(function(xt){return ut(xt,gt+" ")})):ot instanceof dS?(at+="".concat(gt,"par ").concat(ot.effectType,`
`),ot.players.forEach(function(xt){return ut(xt,gt+" ")})):ot instanceof wM?(at+="".concat(gt,"par2 ").concat(ot.effectType,`
`),ot.players.forEach(function(xt){return ut(xt,gt+" ")})):at+="".concat(gt).concat(ot.playerID," ").concat(ot.effectType,`
`)}}},{key:"getPlayer",value:function(at,ut){var ot=ut;ot||(ot=[this.mainSeq].concat(Ct(Array.from(this.interactiveSeqs.values()))));var gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;if(Mt.playerID===at)return Mt;var kt=Mt.players;if(kt){var zt=this.getPlayer(at,kt);if(zt)return zt}}}catch(Ht){gt.e(Ht)}finally{gt.f()}}},{key:"getAnimationSeq",value:function(at){switch(at.sequenceType){case"mainSeq":return this.mainPlayerSeq;case"interactiveSeq":{if(at.eventSourceShapeId!==void 0)return this.getInteractiveSeq(sw(this.context.pptUUID,this.context.slideIndex,at.eventSourceShapeId));console.error("interactiveSeq animation ".concat(at.id," does not have eventSourceShapeId"),at);break}default:console.error('not support sequenceType: "'.concat(at.sequenceType,'"'),at)}}},{key:"getInteractiveSeq",value:function(at){var ut=this.interactivePlayerSeqs.get(at);return ut||(ut=[],this.interactivePlayerSeqs.set(at,ut)),ut}},{key:"getTextScale",value:function(at){var ut=1/0;return at.forEach(function(ot){ot.prop.size<ut&&(ut=ot.prop.size)}),ut>=12?1:ut/12}},{key:"getTextRect",value:function(at,ut){var ot,gt,xt,Mt,kt,zt,Ht,rr=0;if(at){var ur=Jt(at.paragraphs),_r;try{for(ur.s();!(_r=ur.n()).done;){var Dr=_r.value,Br=Jt(Dr.lines),Ur;try{for(Br.s();!(Ur=Br.n()).done;){var Zr=Ur.value,Tn=this.getTextScale(Zr),jn=Jt(Zr),ts;try{for(jn.s();!(ts=jn.n()).done;){var us=ts.value;if(rr<=ut&&rr+((gt=(ot=us.text)==null?void 0:ot.length)!=null?gt:0)>ut){var Os=Number(us.prop.width)/Tn/((Mt=(xt=us.text)==null?void 0:xt.length)!=null?Mt:1);return{height:(kt=us.prop.height)!=null?kt:us.prop.size,width:Os,textScale:Tn}}else rr+=(Ht=(zt=us.text)==null?void 0:zt.length)!=null?Ht:0}}catch(Hs){jn.e(Hs)}finally{jn.f()}}}catch(Hs){Br.e(Hs)}finally{Br.f()}}}catch(Hs){ur.e(Hs)}finally{ur.f()}}}},{key:"getParagraphRect",value:function(at,ut){var ot=at?.paragraphs[ut],gt=at?.prop.width,xt=ot?.lines.map(function(Mt){return Math.max.apply(Math,Ct(Mt.map(function(kt){var zt;return(zt=kt.prop.height)!=null?zt:kt.prop.size})))}).reduce(function(Mt,kt){return Mt+kt},0);if(gt&&xt)return{height:xt,width:gt,textScale:1}}},{key:"getTextWrapper",value:function(at){var ut,ot,gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr;return at.includes("m")?(Mt=(xt=(gt=(ot=(ut=this.context.wrapResource)==null?void 0:ut.master)==null?void 0:ot.shapes)==null?void 0:gt[at.replace("m","")])==null?void 0:xt.textBodyMap)==null?void 0:Mt[0]:at.includes("l")?(ur=(rr=(Ht=(zt=(kt=this.context.wrapResource)==null?void 0:kt.layout)==null?void 0:zt.shapes)==null?void 0:Ht[at.replace("l","")])==null?void 0:rr.textBodyMap)==null?void 0:ur[0]:(Zr=(Ur=(Br=(Dr=(_r=this.context.wrapResource)==null?void 0:_r.slide)==null?void 0:Dr.shapes)==null?void 0:Br[at])==null?void 0:Ur.textBodyMap)==null?void 0:Zr[0]}},{key:"getAnimBox",value:function(at,ut,ot){var gt,xt,Mt,kt=at,zt=ot!=null,Ht=ut!=null;Ht?(kt+=",".concat(ut),zt&&(kt+=",".concat(ot))):zt&&(kt+=",,".concat(ot));var rr=this.animBoxes.get(kt);if(!rr){var ur=this.context.shapeParamsIndex[at],_r=qP;if(ur.fillColor){var Dr=ur.fillColor.rgb().object(),Br=Dr.r,Ur=Dr.g,Zr=Dr.b,Tn=Dr.alpha;_r=new f0({r:Br,g:Ur,b:Zr,a:Tn??1})}var jn,ts=sw(this.context.pptUUID,this.context.slideIndex,at),us=ur.rotate?pS(ur.rotate):0;if(zt||Ht){us=0;var Os=this.getTextWrapper(at);zt?(jn=this.getTextRect(Os,this.textCount),this.textCount+=1):Ht&&(jn=this.getParagraphRect(Os,ut))}rr=new OM({target:ts,pIndex:jn?ut:void 0,tIndex:jn?ot:void 0,constants:{x:ur.rectangle.x,y:ur.rectangle.y,width:jn?jn.width*n_:ur.rectangle.width||1,height:jn?jn.height*n_:ur.rectangle.height||1,slideWidth:this.context.slideWidth/((gt=jn?.textScale)!=null?gt:1),slideHeight:this.context.slideHeight/((xt=jn?.textScale)!=null?xt:1),flipH:ur.flipH,flipV:ur.flipV},initState:{opacity:(Mt=ur.opacity)!=null?Mt:1,fillcolor:_r,rotate:us}}),this.animBoxes.set(kt,rr)}return rr}},{key:"squashLastSeqPlayers",value:function(at,ut){var ot,gt;if(!(at.length<=1)){var xt=at[at.length-1].effectType;if(xt==="withEffect"){for(var Mt=at.length-1;Mt>0&&at[Mt].effectType===xt;)Mt-=1;var kt=at.splice(Mt,at.length-Mt);at.push(new dS({players:kt,effectType:(gt=ut??((ot=kt[0])==null?void 0:ot.effectType))!=null?gt:"clickEffect"}))}}}},{key:"getAnimationPlayer",value:function(at,ut){if(at.animationXML){var ot=[],gt=at.animationXML.elements,xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=KF({node:kt,animation:at,context:this.context,triggerEvent:this.triggerEvent,animBox:ut});!zt||(ut.preAnimation()||ut.preAnimation({}),ot.push(zt))}}catch(ur){xt.e(ur)}finally{xt.f()}if(!(ot.length<=0)){if(at.soundEffectId){var Ht=ZF(at,ut);Ht&&ot.push(Ht)}var rr=JF(at.repeatCount);return at.delay>0||rr>1||at.autoRev?new wM({playerID:"parr"+at.id,players:ot,effectType:at.nodeType,delay:at.delay,repeat:rr,reverse:!!at.autoRev}):ot.length>1?new dS({playerID:"par"+at.id,players:ot,effectType:at.nodeType}):ot[0]}}}},{key:"getTextAnimationPlayer",value:function(at,ut){var ot=this,gt,xt=gs(this.context.wrapResource,at.spId,(gt=at.pRg)==null?void 0:gt.start,at.textAnimMode==="wd");if(xt===0)return this.getAnimationPlayer(at,ut);var Mt=Array(xt).fill(0).map(function(kt,zt){var Ht,rr=ot.getAnimBox(at.spId,(Ht=at.pRg)==null?void 0:Ht.start,zt),ur=ot.getAnimationPlayer(at,rr);return ur?new wM({effectType:at.nodeType,delay:at.textAnimIterateDelay(ur.duration-ur.delay)*zt,players:[ur]}):null}).filter(function(kt){return!!kt});return Mt.length<=1?Mt[0]:new dS({effectType:at.nodeType,players:Mt})}},{key:"joinSubSamePlayers",value:function(at,ut,ot){return ut.sequenceType!=="mainSeq"||ut.dimAfter!=="same"?at:new dS({players:[at,ZO(ot,"withEffect",at.duration+32)],effectType:at.effectType})}},{key:"joinLastSubNextIntoPlayers",value:function(at,ut){var ot=this.getSubNextPlayerAnimBoxes(at),gt=ut[ut.length-1],xt=ot[ot.length-2];if(!(!gt||!xt||xt.length<=0)){var Mt=[gt],kt=Jt(xt),zt;try{for(kt.s();!(zt=kt.n()).done;){var Ht=zt.value;Mt.push(ZO(Ht,"withEffect",gt.delay))}}catch(rr){kt.e(rr)}finally{kt.f()}ut[ut.length-1]=new dS({players:Mt,effectType:gt.effectType})}}},{key:"getSubNextPlayerAnimBoxes",value:function(at){var ut=this.subNextPlayerAnimBoxes.get(at);return ut||(ut=[],this.subNextPlayerAnimBoxes.set(at,ut)),ut}},{key:"getSeqId",value:function(at){return at.sequenceType==="interactiveSeq"&&at.eventSourceShapeId!==void 0?sw(this.context.pptUUID,this.context.slideIndex,at.eventSourceShapeId):"mainSeq"}}]),yt})();function e4(yt,ct){var at=new Jk(ct.slideContext.master,El(_u({},ct),{resourceType:"master",shapeParamsIndex:ct.masterShapeParamsIndex})).collect(),ut=new Jk(ct.slideContext.layout,El(_u({},ct),{resourceType:"layout",shapeParamsIndex:ct.layoutShapeParamsIndex})).collect(),ot=new Jk(yt,El(_u({},ct),{resourceType:"slide",shapeParamsIndex:ct.slideShapeParamsIndex})).collect(),gt=new gN(at,El(_u({},ct),{resourceType:"master",shapeParamsIndex:ct.masterShapeParamsIndex})),xt=new gN(ut,El(_u({},ct),{resourceType:"layout",shapeParamsIndex:ct.layoutShapeParamsIndex})),Mt=new gN(ot,El(_u({},ct),{resourceType:"slide",shapeParamsIndex:ct.slideShapeParamsIndex})),kt=new gN(at.concat.apply(at,Ct(ut).concat(Ct(ot))),El(_u({},ct),{resourceType:"main",shapeParamsIndex:_u(_u(_u({},ct.slideShapeParamsIndex),ct.layoutShapeParamsIndex),ct.masterShapeParamsIndex)})),zt={slide:0,layout:0,master:0};return zt.slide=Mt.mainSeq.length,zt.layout=xt.mainSeq.length,zt.master=gt.mainSeq.length,Mt.mainSeq.effectType!=="clickEffect"&&(zt.layout>0?zt.layout-=1:zt.master>0&&(zt.master-=1)),xt.mainSeq.effectType!=="clickEffect"&&zt.master>0&&(zt.master-=1),[Mt,xt,gt].forEach(function(Ht){Ht.triggerEvent.on("onEnd",function(rr){var ur=rr.target;ur==="slide"?(Mt.end(),kt.end()):ur==="layout"?xt.end():ur==="master"&&gt.end()}),Ht.triggerEvent.on("onUnmount",function(rr){var ur=rr.target;ur==="slide"?(Mt.reset(),kt.reset()):ur==="layout"?xt.reset():ur==="master"&&gt.reset()})}),{masterAnimationManager:gt,layoutAnimationManager:xt,slideAnimationManager:Mt,mainAnimationManager:kt,animationCount:zt,sequenceAnimesCounts:{get"-1"(){return Mt.mainSeq.length}}}}var t4="masterPartName",r4="layoutPartName";function n4(yt,ct){return sO.apply(this,arguments)}function sO(){return sO=ht(regeneratorRuntime.mark(function yt(ct,at){var ut,ot,gt,xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,mo("".concat(ct,"/text/slide/slide").concat(at,".json"));case 2:return ut=zt.sent,ot=ut[t4].replace("/ppt/slideMasters/slideMaster","/text/master/master").replace(".xml",".json"),gt=ut[r4].replace("/ppt/slideLayouts/slideLayout","/text/layout/layout").replace(".xml",".json"),zt.next=7,mo("".concat(ct).concat(ot));case 7:return xt=zt.sent,zt.next=10,mo("".concat(ct).concat(gt));case 10:return Mt=zt.sent,zt.abrupt("return",{slide:ut,master:xt,layout:Mt});case 12:case"end":return zt.stop()}},yt)})),sO.apply(this,arguments)}function JO(yt,ct){return oO.apply(this,arguments)}function oO(){return oO=ht(regeneratorRuntime.mark(function yt(ct,at){var ut,ot,gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr=arguments;return regeneratorRuntime.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:return ut=Zr.length>2&&Zr[2]!==void 0?Zr[2]:!1,ot=Zr.length>4?Zr[4]:void 0,gt=Zr.length>5?Zr[5]:void 0,xt=Zr.length>6?Zr[6]:void 0,gt&&gt.info("Start load ppt ".concat(at," resource.")),Mt=ct.replace(/\/$/i,""),xt&&xt.scheme&&(kt=xt.scheme,Mt=Mt.replace(/^[a-zA-z]+[^://]/,kt)),zt=new iT(kt),jn.next=11,Promise.all([mo(Mt+"/info.json",gt),zo(Mt+"/pptxml/ppt.xml",gt)]);case 11:return Ht=jn.sent,rr=mt(Ht,2),ur=rr[0],_r=rr[1],jn.next=17,zt.loadLumiaPSD(ut,gt);case 17:return gt&&gt.info("load ppt ".concat(at," resource success")),Dr=xt||{},Br=Dr.useServerWrap,Ur=Br===void 0?!0:Br,jn.abrupt("return",(Ur&&mR(Mt,at,ur.fonts),new i4({uuid:at,url:Mt,width:ur.width,height:ur.height,slidesCount:ur.totalPageSize,mainXMLContent:_r,userFonts:ot,preload:ut,logger:gt,resourceScheme:kt,rtcClient:xt?.rtcClient,useServerWrap:Ur})));case 20:case"end":return jn.stop()}},yt)})),oO.apply(this,arguments)}var i4=(function(){function yt(ct){Ot(this,yt),this.url=ct.url,this.uuid=ct.uuid,this.width=ct.width*ZT,this.height=ct.height*ZT,this.slidesCount=ct.slidesCount,this.userFonts=ct.userFonts,this.preload=ct.preload,this.logger=ct.logger,this.resourceScheme=ct.resourceScheme,this.mainXMLContent=ct.mainXMLContent,this.rtcClient=ct.rtcClient,this.useServerWrap=ct.useServerWrap}return Bt(yt,[{key:"loadSlide",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt=this,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr,Tn,jn,ts,us,Os,Hs,Ks,so,To,Oo,Au,Tu,xu,yu;return regeneratorRuntime.wrap(function(Jl){for(;;)switch(Jl.prev=Jl.next){case 0:if((xt=this.logger)==null||xt.debug("begin load slide ".concat(ot+1)),Ht=NF(),rr=new tx("main",Ht).parse(this.mainXMLContent),!(ot<0||ot>=this.slidesCount)){Jl.next=4;break}throw new Error("index should be in 0 ~ ".concat(this.slidesCount-1));case 4:return ur=ot+1,Jl.next=7,this.fetchSlideInfo(ur);case 7:return _r=Jl.sent,Dr=_r.slideXMLContent,Br=_r.slideRefXMLContent,Ur=_r.layoutXMLContent,Zr=_r.masterXMLContent,Tn=_r.themeXMLContent,jn=_r.resource,ts=_r.wrapResource,this.preload===!0&&((Mt=this.logger)==null||Mt.debug("begin preload slide ".concat(ur+1)),this.prefetch(ur+1).catch(function(Ml){var Qp;(Qp=gt.logger)==null||Qp.debug("prefetch slide ".concat(ur+1," error: "),Ml)}),(kt=this.logger)==null||kt.debug("preloaded slide ".concat(ur+1))),us=new tx("layout",Ht).parse(Ur),Os=zO(us.childElement("p:sldLayout","p:cSld","p:spTree")),Hs=new tx("master",Ht).parse(Zr),Ks=zO(Hs.childElement("p:sldMaster","p:cSld","p:spTree"),Hs.childElementOptional("p:sldMaster","p:txStyles")),so=new tx("theme",Ht).parse(Tn),To=new ZL(jn,this.resourceScheme),Oo=new tx("slide",Ht).parse(Dr),Au=new tx("slideRef",Ht).parse(Br),Tu={},Au.element!==void 0&&Au.element.elements.forEach(function(Ml){Tu[Ml.attr.getString("Id")]=Ml.attr.getStringOptional("Target")}),xu={slide:Oo,layout:us,layoutIndex:Os,master:Hs,masterIndex:Ks,masterThemeColorMapping:Hs.childElement("p:sldMaster","p:clrMap").attr.attributes,theme:so,main:rr,userFonts:this.userFonts},Ht.context=Object.freeze(xu),yu=e4(Oo,Object.freeze({pptUUID:this.uuid,slideIndex:ur,slideContext:xu,slideWidth:this.width,slideHeight:this.height,masterShapeParamsIndex:this.getShapeIndexMap(Hs.childElement("p:sldMaster","p:cSld","p:spTree")),layoutShapeParamsIndex:this.getShapeIndexMap(us.childElement("p:sldLayout","p:cSld","p:spTree")),slideShapeParamsIndex:this.getShapeIndexMap(Oo.childElement("p:sld","p:cSld","p:spTree")),wrapResource:ts})),Jl.abrupt("return",((zt=this.logger)==null||zt.debug("loaded slide ".concat(ur)),this.slideIndex=ot,Object.freeze({uuid:this.uuid,url:this.url,index:ot,width:this.width,height:this.height,masterXML:Hs,masterIndex:Ks,layoutXML:us,layoutIndex:Os,mainXML:rr,themeXML:so,slideXML:Oo,slideRefIndex:Tu,resourceLoader:To,animations:yu,slidesCount:this.slidesCount,preload:this.preload,logger:this.logger,rtcClient:this.rtcClient,WrapResource:ts,preSlideIndex:this.preSlideIndex})));case 22:case"end":return Jl.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"fetchSlideInfo",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht,rr,ur,_r,Dr;return regeneratorRuntime.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:return gt=[zo("".concat(this.url,"/slide/slide").concat(ot,".xml"),this.logger),zo("".concat(this.url,"/slideRef/slideRef").concat(ot,".xml"),this.logger).catch(function(Zr){return console.log("error ",Zr),""}),zo("".concat(this.url,"/layout/layout").concat(ot,".xml"),this.logger),zo("".concat(this.url,"/master/master").concat(ot,".xml"),this.logger),zo("".concat(this.url,"/theme/theme").concat(ot,".xml"),this.logger),mo("".concat(this.url,"/resources/resource").concat(ot,".json"),this.logger)],Ur.next=3,Promise.all(gt);case 3:if(xt=Ur.sent,Mt=mt(xt,6),kt=Mt[0],zt=Mt[1],Ht=Mt[2],rr=Mt[3],ur=Mt[4],_r=Mt[5],!this.useServerWrap){Ur.next=20;break}return Ur.prev=12,Ur.next=15,n4(this.url,ot);case 15:Dr=Ur.sent,Ur.next=20;break;case 18:Ur.prev=18,Ur.t0=Ur.catch(12);case 20:return Ur.abrupt("return",{slideXMLContent:kt,slideRefXMLContent:zt,layoutXMLContent:Ht,masterXMLContent:rr,themeXMLContent:ur,resource:_r,wrapResource:Dr});case 21:case"end":return Ur.stop()}},ut,this,[[12,18]])}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"prefetch",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!(ot>this.slidesCount)){Ht.next=3;break}return(gt=this.logger)==null||gt.debug("no slide need prefetch"),Ht.abrupt("return");case 3:return Mt=new iT(this.resourceScheme),Ht.next=6,Mt.fetchPageResource(this.url,ot);case 6:kt=Ht.sent,Mt.prefetchPageResource(kt).then(function(){},function(){}),(xt=this.logger)==null||xt.debug("prefetch slide ".concat(ot," finish"));case 8:case"end":return Ht.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"getShapeIndexMap",value:function(at){var ut={},ot=at.extraAttr.getString("spId"),gt=Xk(at);return this.getShapeGroupIndexMap(at,ut,ot,gt.transform),ut}},{key:"getShapeGroupIndexMap",value:function(at,ut,ot,gt){var xt=this,Mt=at.elementsWithName("p:sp");this.getChildShapesIndexMap(Mt,ut,ot,gt);var kt=at.elementsWithName("p:cxnSp");this.getChildShapesIndexMap(kt,ut,ot,gt);var zt=at.elementsWithName("p:pic");this.getChildShapesIndexMap(zt,ut,ot,gt);var Ht=at.elementsWithName("p:graphicFrame");this.getChildShapesIndexMap(Ht,ut,ot,gt);var rr=at.elementsWithName("p:grpSp");rr.length>0&&rr.forEach(function(ur){var _r=ur.extraAttr.getString("spId"),Dr=Xk(ur,void 0,ot,gt);xt.getShapeGroupIndexMap(ur,ut,_r,Dr.transform),ut[_r]=Dr})}},{key:"getChildShapesIndexMap",value:function(at,ut,ot,gt){at.forEach(function(xt){var Mt=xt.extraAttr.getString("spId"),kt=$O(xt,void 0,ot,gt);ut[Mt]=kt})}}]),yt})(),a4=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.state={disableJumpTo:!1},ot}return Bt(at,[{key:"UNSAFE_componentWillMount",value:function(){var ot=this.props.emitter;ot.on("nextStep",this.onNextStepHandler,this),ot.on("preStep",this.onPreStepHandler,this),ot.on("nextPage",this.onNextPageHandler,this),ot.on("prePage",this.onPrePageHandler,this),ot.on("resetSlideAnimation",this.resetCurrentSlideAnimation,this),ot.on("resetPPTAnimation",this.resetCurrentPPTAnimation,this),ot.on("changePageTo",this.onClickJumpToHandler,this),ot.on("displaySidebar",this.displaySidebar,this),ot.on("hideSidebar",this.hideSidebar,this),ot.on("displayNote",this.displayNote,this),ot.on("hideNote",this.hideNote,this)}},{key:"componentWillUnmount",value:function(){var ot=this.props.emitter;ot.removeAllListeners()}},{key:"onPrePageHandler",value:function(){var ot=this.props,gt=ot.slideIndex,xt=ot.changeToPage;gt>0&&xt(gt-1)}},{key:"onNextPageHandler",value:function(){var ot=this.props,gt=ot.slideIndex,xt=ot.changeToPage,Mt=ot.total;gt<Mt-1&&xt(gt+1)}},{key:"onClickJumpToHandler",value:function(ot){var gt=this.props,xt=gt.total,Mt=gt.changeToPage,kt=(ot||parseInt(this.inputRef.value,10))-1;if(Number.isNaN(kt)||kt<0){this.inputRef.value="1",Mt(0);return}if(kt>xt-1){this.inputRef.value="".concat(xt),Mt(xt-1);return}this.inputRef.value=(kt+1).toString(),Mt(kt)}},{key:"onPreStepHandler",value:function(){var ot=this.props.changeStep;ot(-1)}},{key:"onNextStepHandler",value:function(){var ot=this.props.changeStep;ot(1)}},{key:"invalidJumpTo",value:function(){Number.isNaN(parseInt(this.inputRef.value,10))?this.setState({disableJumpTo:!0}):this.setState({disableJumpTo:!1})}},{key:"resetCurrentSlideAnimation",value:function(){var ot=this.props.resetCurrentSlideAnimation;ot()}},{key:"resetCurrentPPTAnimation",value:function(){var ot=this.props.resetCurrentPPTAnimation;ot()}},{key:"displaySidebar",value:function(){var ot=this.props.changeIsExtendSidebar;ot(!0)}},{key:"hideSidebar",value:function(){var ot=this.props.changeIsExtendSidebar;ot(!1)}},{key:"displayNote",value:function(){var ot=this.props.changeIsShowNote;ot(!0)}},{key:"hideNote",value:function(){var ot=this.props.changeIsShowNote;ot(!1)}},{key:"render",value:function(){var ot=this,gt=this.state.disableJumpTo,xt=this.props,Mt=xt.slideIndex,kt=xt.total,zt=xt.isExtendSidebar,Ht=xt.isShowNote,rr=xt.international,ur=xt.disableSidebar,_r=xt.disableNote;return r_.default.createElement("div",{className:"ppt-preview-beauty-scroll-bar ppt-preview-controls"},r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",disabled:Mt===0,onClick:function(){ot.onPrePageHandler()}},rr&&rr.prePage||"上一页"),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.onPreStepHandler()}},rr&&rr.preStep||"上一步"),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.onNextStepHandler()}},rr&&rr.nextStep||"下一步"),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",disabled:Mt===kt-1,onClick:function(){ot.onNextPageHandler()}},rr&&rr.nextPage||"下一页"),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.resetCurrentSlideAnimation()}},rr&&rr.resetCurrentSlideAnimation||"重置当前页动画"),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.resetCurrentPPTAnimation()}},rr&&rr.resetCurrentPPTAnimation||"重置所有动画"),r_.default.createElement("input",{className:"ppt-preview-controls-input",type:"text",onInput:function(){ot.invalidJumpTo()},ref:function(Br){ot.inputRef=Br}}),r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.onClickJumpToHandler()},disabled:gt},rr&&rr.jumpTo||"跳转到此页"),zt?r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.hideSidebar()}},rr&&rr.hideSidebar||"隐藏侧边栏"):r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.displaySidebar()},disabled:ur},rr&&rr.displaySidebar||"显示侧边栏"),Ht?r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.hideNote()}},rr&&rr.hideNote||"隐藏备注"):r_.default.createElement("button",{type:"button",className:"ppt-preview-controls-button",onClick:function(){ot.displayNote()},disabled:_r},rr&&rr.displayNote||"显示备注"),r_.default.createElement("p",{className:"ppt-preview-controls-page"},rr&&rr.pageNumber||"页码","",Mt+1," ","/",kt))}}]),at})(r_.default.Component),s4=(function(yt){It(at,yt);var ct=qt(at);function at(ut){return Ot(this,at),ct.call(this,ut)}return Bt(at,[{key:"render",value:function(){var ot=this.props,gt=ot.isShow,xt=ot.noteList;return I1.default.createElement("div",{style:{width:"100%",height:"200px",overflow:"auto",position:"absolute",bottom:gt?0:"-200px",transition:"1s",zIndex:"2",fontSize:"12px",padding:"12px",boxSizing:"border-box",fontFamily:"等线"},className:"ppt-preview-beauty-scroll-bar ppt-preview-note"},xt.map(function(Mt,kt){var zt,Ht={textAlign:Lt((zt=Mt.align)!=null?zt:"l"),marginLeft:Mt.marginLeft?"".concat(Mt.marginLeft,"px"):0,marginRight:Mt.marginRight?"".concat(Mt.marginRight,"px"):0,textIndent:Mt.indent?"".concat(Mt.indent,"px"):0};return I1.default.createElement("div",{key:kt,style:Ht},Mt.buchar&&I1.default.createElement("span",null,parseInt(Mt.buchar,10)?Mt.buchar+".":Mt.buchar,"  "),!Mt.runs&&I1.default.createElement("br",null),Mt.runs&&Mt.runs.map(function(rr,ur){var _r,Dr={letterSpacing:rr.wordSpace?"".concat(rr.wordSpace,"px"):0,verticalAlign:rr.baseline?"".concat(rr.baseline,"px"):0,textDecoration:rr.underLine?$t(rr.underLine):"none",strikeThrough:rr.strikeThrough?"":"none",fontWeight:rr.bold?"bolder":"normal",fontStyle:rr.italic?"italic":"normal"},Br=rr.text?rr.text:"";if((_r=rr.text)!=null&&_r.includes(" ")){for(var Ur=[],Zr=0;Zr<rr.text.length;Zr+=1)rr.text[Zr]===" "?Ur.push(I1.default.createElement("span",{key:"tab"+Zr}," ")):Ur.push(I1.default.createElement("span",{key:"tab"+Zr,style:{fontFamily:"等线"}},rr.text[Zr]));return I1.default.createElement("pre",{key:Br+kt+ur,style:{margin:"0",display:"inline"}},Ur)}return rr.strikeThrough==="sngStrike"?I1.default.createElement("span",{key:Br+kt+ur,style:Dr},I1.default.createElement("s",null,rr.text)):rr.runType==="br"?I1.default.createElement("br",null):rr.runType==="text"?I1.default.createElement("span",{key:Br+kt+ur,style:Dr},rr.text):I1.default.createElement("span",{key:Br+kt+ur})}))}))}}]),at})(I1.default.PureComponent),o4=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"clickHandler",value:function(ot){var gt=this.props.changeToPage;gt(ot)}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.isExtend,Mt=gt.previewList,kt={display:"flex",flexDirection:"column",justifyContent:"flex-start",position:"absolute",right:xt?0:"-20%",width:"20%",overflow:"auto",transition:"1s",top:0,bottom:0,zIndex:"3",borderLeft:"1px solid #ccc",backgroundColor:"#eee"},zt={display:"flex",flexDirection:"column",justifyContent:"space-around"};return Z_.default.createElement("div",{style:kt,className:"ppt-preview-beauty-scroll-bar ppt-preview-sidebar"},Mt.map(function(Ht,rr){return Z_.default.createElement("div",{className:"ppt-preview-sidebar-item ppt-event-source",key:Ht,style:zt,onClick:function(){ot.clickHandler(rr)}},Z_.default.createElement("img",{className:"ppt-preview-sidebar-img",src:Ht,alt:"PPT略缩图"}),Z_.default.createElement("span",{className:"ppt-preview-sidebar-span"},rr+1))}))}}]),at})(Z_.default.Component),uO;(function(yt){yt.waiting="Waiting",yt.converting="Converting",yt.finished="Finished",yt.fail="Fail"})(uO||(uO={}));var tq;(function(yt){yt.packaging="Packaging",yt.extracting="Extracting",yt.generatingPreview="GeneratingPreview",yt.mediaTranscode="MediaTranscode"})(tq||(tq={}));var rq;(function(yt){yt.dynamic="dynamic",yt.static="static"})(rq||(rq={}));var u4=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.previewList=[],ot.PPTSliderList=[],ot.stateAdapter={disableInteractive:!1,setState:(function(){var gt=ht(regeneratorRuntime.mark(function Mt(kt,zt,Ht){return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:ot.setState({globalPPTState:Ht});case 1:case"end":return ur.stop()}},Mt)}));function xt(Mt,kt,zt){return gt.apply(this,arguments)}return xt})(),onPageToPrev:function(){var xt=ot.state.slideIndex;ot.changePageTo(xt-1).then(function(){},function(){})},onPageToNext:function(){var xt=ot.state.slideIndex;ot.changePageTo(xt+1).then(function(){},function(){})},onPageJumpTo:(function(){var gt=ht(regeneratorRuntime.mark(function Mt(kt,zt){return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:ot.changePageTo(zt-1).then(function(){},function(){});case 1:case"end":return rr.stop()}},Mt)}));function xt(Mt,kt){return gt.apply(this,arguments)}return xt})(),setSlideStateAdapterCallbacks:function(xt){}},ot.clickSidebarHandler=function(gt){ot.changePageTo(gt).then(function(){},function(){})},ot.clickControllerHandler=function(gt){ot.changePageTo(gt).then(function(){},function(){})},ot.changeIsExtendSidebar=function(gt){ot.previewList.length!==0&&ot.setState({isExtendingSidebar:gt})},ot.changeIsShowNote=function(gt){var xt=ot.state.noteList;xt.length!==0&&ot.setState({isShownNote:gt})},ot.resetCurrentSlideAnimation=function(){ot.slideRef&&ot.slideRef.resetCurrentSlideAnimation()},ot.resetCurrentPPTAnimation=function(){ot.slideRef&&ot.slideRef.resetCurrentPPTAnimation()},ot.state={slide:void 0,slideIndex:0,globalPPTState:void 0,isExtendingSidebar:!1,isShownNote:!1,noteList:[],isLoading:!0},ot.isGotNodeList=!1,ut.conversionResponse.status===uO.finished&&(ot.uuid=ut.conversionResponse.uuid,ut.conversionResponse.progress.convertedFileList.forEach(function(gt){ot.PPTSliderList.push(El(_u({},gt),{conversionFileUrl:gt.conversionFileUrl.replace(/\d.slide/g,"")})),gt.preview&&ot.previewList.push(gt.preview)}),ot.total=ot.PPTSliderList.length),ot}return Bt(at,[{key:"UNSAFE_componentWillMount",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(){var xt,Mt,kt,zt,Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return xt=this.state.slideIndex,Mt=this.props,kt=Mt.preloadProgress,zt=Mt.userFonts,Ht=Mt.logger,rr=this.PPTSliderList[xt],Dr.next=3,JO(rr.conversionFileUrl,this.uuid,!0,kt,zt,Ht,{scheme:"https",useServerWrap:!0});case 3:return this.ppt=Dr.sent,Dr.next=6,this.ppt.loadSlide(xt);case 6:return ur=Dr.sent,Dr.next=9,this.getNoteList();case 9:this.setState({slide:ur,isLoading:!1});case 10:case"end":return Dr.stop()}},gt,this)}));function ot(){return ut.apply(this,arguments)}return ot})()},{key:"componentWillUnmount",value:function(){var ot=this.props.emitter;ot.removeAllListeners()}},{key:"getNoteList",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(){var xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return xt=this.state.slideIndex,Mt=this.PPTSliderList[xt],Ht.prev=1,Ht.next=4,mo("".concat(Mt.conversionFileUrl.replace("pptx","https"),"notes/note").concat(xt+1,".json"));case 4:kt=Ht.sent,this.setState({noteList:kt}),Ht.next=11;break;case 8:Ht.prev=8,Ht.t0=Ht.catch(1),this.setState({noteList:[]});case 11:this.isGotNodeList=!0;case 12:case"end":return Ht.stop()}},gt,this,[[1,8]])}));function ot(){return ut.apply(this,arguments)}return ot})()},{key:"changePageTo",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!(xt<0||xt>=this.total)){Ht.next=2;break}return Ht.abrupt("return");case 2:if(Mt=this.state.isLoading,!Mt){Ht.next=5;break}return Ht.abrupt("return");case 5:return this.setState({isLoading:!0}),Ht.next=8,this.ppt.loadSlide(xt);case 8:return kt=Ht.sent,this.setState({slide:kt,slideIndex:xt,isLoading:!1,isShownNote:!1}),Ht.next=12,this.getNoteList();case 12:case"end":return Ht.stop()}},gt,this)}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"changeStep",value:function(ot){var gt=this.state.isLoading;gt||this.slideRef.changeStep(ot)}},{key:"emitData",value:function(){var ot=this;clearTimeout(this.emitSetTimeout),this.emitSetTimeout=setTimeout(function(){if(ot.isGotNodeList){var gt=ot.total,xt=ot.state,Mt=xt.slideIndex,kt=xt.isExtendingSidebar,zt=xt.isShownNote,Ht=xt.noteList,rr=ot.props.emitter,ur=!ot.previewList.length,_r=!Ht.length;rr.emit("update",{index:Mt+1,total:gt,disableNote:_r,disableSidebar:ur,isShowNote:zt,isExtendSidebar:kt})}},500)}},{key:"render",value:function(){var ot=this,gt=this.total,xt=this.PPTSliderList,Mt=this.state,kt=Mt.globalPPTState,zt=Mt.slide,Ht=Mt.slideIndex,rr=Mt.isExtendingSidebar,ur=Mt.isShownNote,_r=Mt.noteList,Dr=Mt.isLoading,Br=this.props,Ur=Br.parentElement,Zr=Br.config,Tn=Br.emitter,jn=!this.previewList.length,ts=!_r.length,us=xt[0].width;this.emitData();var Os=xt[0].height+40,Hs={width:"".concat(us,"px"),height:"".concat(Os,"px"),transform:""},Ks=Math.min(Ur.offsetWidth/us,Ur.offsetHeight/Os);return Ur.style.width&&(Hs.transform="scale(".concat(Ks,", ").concat(Ks,")")),ex.default.createElement("div",{style:Hs,className:"ppt-preview-container"},ex.default.createElement(a4,{international:Zr&&Zr.international,isShowNote:ur,emitter:Tn,disableNote:ts,disableSidebar:jn,isExtendSidebar:rr,changeStep:function(To){ot.changeStep(To)},changeIsShowNote:this.changeIsShowNote,changeIsExtendSidebar:this.changeIsExtendSidebar,total:gt,resetCurrentSlideAnimation:this.resetCurrentSlideAnimation,resetCurrentPPTAnimation:this.resetCurrentPPTAnimation,changeToPage:this.clickControllerHandler,slideIndex:Ht}),ex.default.createElement("div",{style:{position:"relative",display:"inline-block",overflow:"hidden",width:"100%",fontSize:"0"},className:"ppt-preview-main-container"},ex.default.createElement("div",{style:{display:"inline-block"},className:"ppt-preview-slide-container"},!Dr&&zt&&ex.default.createElement(UO,{ref:function(To){ot.slideRef=To},stateAdapter:this.stateAdapter,pptState:kt,data:zt,renderMode:hN.Normal}),Dr&&ex.default.createElement("div",{style:Hs})),this.previewList.length>0&&ex.default.createElement(o4,{isExtend:rr,previewList:this.previewList,changeToPage:this.clickSidebarHandler}),_r.length>0&&ex.default.createElement(s4,{isShow:ur,noteList:_r})))}}]),at})(ex.default.Component);function nq(yt,ct,at){var ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ot=arguments.length>4?arguments[4]:void 0,gt=arguments.length>5?arguments[5]:void 0,xt=arguments.length>6?arguments[6]:void 0,Mt=arguments.length>7?arguments[7]:void 0;ct.style.display="flex",ct.style.alignItems="center",ct.style.justifyContent="center";var kt=Mt??new KT.default;return cR.default.render(ex.default.createElement(u4,{conversionResponse:yt,parentElement:ct,preload:ut,userFonts:ot,logger:gt,config:at,pptPrams:xt,emitter:kt}),ct),kt}var l4=ln(requireReact()),c4=ln(requireUrlParse()),d4=ln(requireTextareaCaretTs()),h4=Object.defineProperty,iq=Object.getOwnPropertySymbols,f4=Object.prototype.hasOwnProperty,p4=Object.prototype.propertyIsEnumerable,aq=function(ct,at,ut){return at in ct?h4(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},m4=function(ct,at){for(var ut in at||(at={}))f4.call(at,ut)&&aq(ct,ut,at[ut]);if(iq){var ot=Jt(iq(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;p4.call(at,ut)&&aq(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct};function g4(yt){var ct=yt.split("/");return ct.pop(),ct.join("/")}var y4=(function(){function yt(){var ct=this;Ot(this,yt),this.libraryMap={},this.paddingMap={},this.freeInterrupters={},this.defineLibrary=function(ot,gt){if(ot.libName in ct.libraryMap)throw new Error("found duplicated library ".concat(JSON.stringify(ot.libName)));gt&&(ct.freeInterrupters[ot.libName]=gt),ct.libraryMap[ot.libName]=Object.freeze(m4({},ot))},this.requireModules=function(ot){return new Promise(function(gt,xt){var Mt=ct.paddingMap[ot];Mt||(Mt=ct.paddingMap[ot]=[]),Mt.push({resolve:gt,reject:xt})})},this.loader=function(ot,gt,xt){if(gt||xt){var Mt=ot;ct.handlePanddingNodes(Mt,gt,xt);return}else{var kt=ot;return ct.createRequireFunction(kt)}};var at="__netlessJavaScriptLoader",ut=window;if(ut[at]!==void 0)throw new Error("window.".concat(at," was override"));Object.defineProperty(ut,at,{enumerable:!1,configurable:!1,writable:!1,value:this.loader})}return Bt(yt,[{key:"handlePanddingNodes",value:function(at,ut,ot){var gt=this.paddingMap[at];if(gt){delete this.paddingMap[at];var xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(ot)kt.reject(ot);else try{kt.resolve(this.handleModules(ut))}catch(rr){kt.reject(rr)}}}catch(rr){xt.e(rr)}finally{xt.f()}}else if(!ot&&ut){var zt=g4(at),Ht=this.freeInterrupters[zt];Ht&&Ht(at,ut)}else console.warn("find invalid async module ".concat(JSON.stringify(at)))}},{key:"createRequireFunction",value:function(at){var ut=this.libraryMap[at];if(!ut)throw new Error("undefined library ".concat(JSON.stringify(at)));return function(ot){var gt=ut.dependencies,xt=gt&&gt[ot];if(!xt)throw new Error("cannot find module ".concat(JSON.stringify(ot)," of library ").concat(JSON.stringify(at)));return xt}}},{key:"handleModules",value:function(at){for(var ut in at){var ot=at[ut];"__esModule"in ot||Object.defineProperty(ot,"__esModule",{value:!0})}return Object.freeze(at)}}]),yt})(),sq=new y4,b4=sq.requireModules,_4=sq.defineLibrary;function x4(yt,ct){for(var at=window.atob(yt),ut=new Uint8Array(at.length),ot=0;ot<at.length;ot++)ut[ot]=at.charCodeAt(ot);return new Blob([ut],ct)}function S4(yt){return new Promise(function(ct,at){try{var ut=new FileReader;ut.onload=function(ot){var gt,xt=(gt=ot.target)==null?void 0:gt.result;typeof xt=="string"?ct(xt):at(new Error("blob load wrong type "+tr(xt)))},ut.readAsDataURL(yt)}catch(ot){at(ot)}})}var w4="__netlessJavaScriptCache",T4=1,ER="modules";function lO(yt){return new Promise(function(ct,at){yt.onsuccess=function(){return ct(yt.result)},yt.onerror=function(){if(yt.error){var ut=new Error(yt.error.message);ut.name=yt.error.name,at(ut)}else at(new Error("failed with null Error"))}})}var E4=(function(){function yt(ct,at,ut,ot){Ot(this,yt);var gt=new URL(typeof at=="string"?at:at[0]),xt=gt.protocol,Mt=gt.host,kt=Array.isArray(at)?this.extractHosts(at):[Mt],zt=new Zo({logger:ot,fetcher:window.fetch.bind(window),retryCount:yt.retryCount,retryLoopsCount:0,configmap:{module:{useSSL:xt==="https:",hosts:{"*":kt}}}});this.fetcher=zt.fetch("module"),this.storeBase64=ct,this.findPath=ut}return Bt(yt,[{key:"extractHosts",value:function(at){return at.map(function(ut){return new URL(ut).host})}},{key:"findObjectURL",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt;return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,this.readBlob(ot);case 2:if(gt=Mt.sent,Mt.t0=gt,Mt.t0){Mt.next=10;break}return Mt.next=7,this.fetchBuffer(ot);case 7:return gt=Mt.sent,Mt.next=10,this.writeBlob(ot,gt);case 10:return Mt.abrupt("return",URL.createObjectURL(gt,{oneTimeOnly:!0}));case 11:case"end":return Mt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"readBlob",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht,rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,yt.dbp;case 2:return gt=_r.sent.transaction([ER],"readonly").objectStore(ER).get(ot),_r.next=5,lO(gt);case 5:return xt=_r.sent,typeof xt=="string"&&(Mt=xt.split(/;base64,/im),kt=mt(Mt,2),zt=kt[0],Ht=kt[1],rr=zt.replace(/^data:/im,""),xt=x4(Ht,{type:rr})),_r.abrupt("return",xt);case 8:case"end":return _r.stop()}},ut)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"writeBlob",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(xt=gt,zt.t0=this.storeBase64,!zt.t0){zt.next=6;break}return zt.next=5,S4(xt);case 5:xt=zt.sent;case 6:return zt.next=8,yt.dbp;case 8:return Mt=zt.sent.transaction([ER],"readwrite").objectStore(ER).put(xt,ot),zt.next=11,lO(Mt);case 11:case"end":return zt.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchBuffer",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return gt="http://module"+this.findPath(ot),kt.next=3,this.fetcher(gt,{method:"get",headers:{Accept:"application/javascript"}});case 3:if(xt=kt.sent,xt.status===200){kt.next=6;break}throw new Error("failed to fetch ".concat(JSON.stringify(gt)," with status ").concat(xt.status));case 6:return kt.next=8,xt.blob();case 8:return kt.abrupt("return",kt.sent);case 9:case"end":return kt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()}],[{key:"dbp",get:function(){if(!this._dbp)if(typeof indexedDB>"u")this._dbp=Promise.reject(new Error("indexedDB is not supported"));else{var at=indexedDB.open(w4,T4);at.onupgradeneeded=function(ut){ut.target.result.createObjectStore(ER)},this._dbp=lO(at)}return this._dbp}}]),yt})(),oq=E4;oq.retryCount=5;var A4=(function(){function yt(ct){Ot(this,yt),this.params=ct,this.completeCallbacks=[]}return Bt(yt,[{key:"load",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return ot=[],this.params.timeout!==void 0&&ot.push(this.startTimeout(this.params.timeout)),ot.push(this.loadScript()),zt.prev=2,zt.next=5,Promise.race(ot);case 5:zt.prev=5,gt=Jt(this.completeCallbacks);try{for(gt.s();!(xt=gt.n()).done;)Mt=xt.value,Mt()}catch(Ht){gt.e(Ht)}finally{gt.f()}return zt.finish(5);case 9:case"end":return zt.stop()}},ut,this,[[2,,5,9]])}));function at(){return ct.apply(this,arguments)}return at})()},{key:"loadScript",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot,gt,xt,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(ot=this.params,gt=ot.origin,xt=ot.findPath,Mt=ot.identifier,kt=ot.storage,!kt){rr.next=13;break}return rr.prev=2,rr.next=5,kt.findObjectURL(Mt);case 5:zt=rr.sent,rr.next=11;break;case 8:rr.prev=8,rr.t0=rr.catch(2),console.warn("read from storage failed: ".concat(rr.t0.message)),zt="".concat(gt).concat(xt(Mt));case 11:rr.next=14;break;case 13:zt="".concat(gt).concat(xt(Mt));case 14:return this.params.logger&&!zt.startsWith("blob:")&&this.params.logger.info("load modules from script ".concat(zt)),rr.next=17,this.loadScriptWithURL(zt);case 17:case"end":return rr.stop()}},ut,this,[[2,8]])}));function at(){return ct.apply(this,arguments)}return at})()},{key:"loadScriptWithURL",value:function(at){var ut=this;return new Promise(function(ot,gt){var xt=document.createElement("script");ut.completeCallbacks.push(function(){xt.onerror=null,xt.onload=null,xt.remove()}),xt.charset="utf-8",xt.src=at,xt.onload=function(){ot()},xt.onerror=function(Mt){var kt=Mt&&(Mt.type==="load"?"missing":Mt.type);gt(new Error("fetch ".concat(JSON.stringify(at)," failed: ").concat(kt)))},document.head.appendChild(xt)})}},{key:"startTimeout",value:function(at){var ut=this,ot=null;return this.completeCallbacks.push(function(){ot!==null&&(clearTimeout(ot),ot=null)}),new Promise(function(gt,xt){ot=setTimeout(function(){ot=null,xt(new Error("fetch ".concat(ut.params.identifier," timeout")))},at)})}}]),yt})();function C4(yt){return new D4(yt)}var D4=(function(){function yt(ct){var at=this;Ot(this,yt),this.modulesMap={},this.taskPromises={},this.onInterruptFreeModules=function(ot,gt){at.modulesMap[ot]||(at.modulesMap[ot]=gt)};var ut={libName:ct.libName,dependencies:ct.dependencies};_4(ut,this.onInterruptFreeModules),this.logger=ct.logger,this.origin=ct.origin,this.origins=ct.origins,this.findPath=ct.findPath,this.timeout=ct.timeout,this.storage=ct.cache?new oq(!!ct.storeBase64,ct.origins||ct.origin,ct.findPath,ct.logger):void 0}return Bt(yt,[{key:"require",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt=this,Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(Mt=this.modulesMap[ot],Mt){rr.next=7;break}return kt=this.taskPromises[ot],kt===void 0&&(kt=this.taskPromises[ot]=ht(regeneratorRuntime.mark(function ur(){var _r,Dr,Br,Ur;return regeneratorRuntime.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.prev=0,_r={identifier:ot,logger:xt.logger,origin:xt.origin,origins:xt.origins,findPath:xt.findPath,timeout:xt.timeout,storage:xt.storage},Tn.next=4,Promise.all([b4(ot),new A4(_r).load()]);case 4:return Dr=Tn.sent,Br=mt(Dr,1),Ur=Br[0],Tn.abrupt("return",Ur);case 8:return Tn.prev=8,delete xt.taskPromises[ot],Tn.finish(8);case 11:case"end":return Tn.stop()}},ur,null,[[0,,8,11]])}))()),rr.next=6,kt;case 6:Mt=this.modulesMap[ot]=rr.sent;case 7:if(zt=Mt[gt],zt){rr.next=10;break}throw new Error("can't find module ".concat(JSON.stringify(gt)," from ").concat(ot));case 10:return rr.abrupt("return",zt);case 11:case"end":return rr.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()}]),yt})(),Zy=cO(tn);function cO(yt){if(tr(yt)!="object"||yt===null)return yt;if(yt.constructor===Object){var ct={};for(var at in yt)ct[at]=cO(yt[at]);return Object.freeze(ct)}else if(Array.isArray(yt)){for(var ut=[],ot=0;ot<yt.length;++ot)ut[ot]=cO(yt[ot]);return Object.freeze(ut)}else return yt}function vN(yt){var ct=Zy.regionsMap;if(ct){var at=yt.toLowerCase();return ct[at]||yt}return yt}function M4(yt,ct){var at=[],ut="api-".concat(yt,"."),ot=Jt(ct),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;xt.startsWith("api.")&&at.push(ut+xt.slice(4))}}catch(Mt){ot.e(Mt)}finally{ot.f()}return at.push.apply(at,Ct(ct)),at}var KC;(function(yt){yt.DisableCache="disableCache",yt.StoreAsBlob="storeAsBlob",yt.StoreAsBase64="storeAsBase64"})(KC||(KC={}));var yN=KC.StoreAsBase64,bN=null;function I4(yt){if(yN===void 0)throw new Error("cannot set async module load mode after joined or replay any room");yN=yt}function R4(yt,ct){return dO.apply(this,arguments)}function dO(){return dO=ht(regeneratorRuntime.mark(function yt(ct,at){var ut;return regeneratorRuntime.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return bN||(bN=P4(yN,at||{}),yN=void 0),gt.next=3,Promise.all([bN.require(ct,"white-model"),bN.require(ct,"white-render")]);case 3:return ut=gt.sent,gt.abrupt("return",Object.freeze({WhiteModel:ut[0],WhiteRender:ut[1]}));case 5:case"end":return gt.stop()}},yt)})),dO.apply(this,arguments)}function P4(yt,ct){var at=ct.origin,ut=ct.origins,ot=ct.logger,gt,xt;switch(yt){case KC.DisableCache:{gt=!1,xt=!1;break}case KC.StoreAsBlob:{gt=!0,xt=!1;break}case KC.StoreAsBase64:{gt=!0,xt=!0;break}}return C4({libName:Zy.modules.identifier,timeout:120*1e3,cache:gt,storeBase64:xt,logger:ot,origin:at||Zy.modules.origin,origins:ut||Zy.modulesOrigins,findPath:function(kt){return"/dynamic-libraries/".concat(kt,".js")},dependencies:{akko:Rn,boundless:BA,mobx:$N,"mobx-react":FR,react:l4.default,"netless-ppt":bP,"url-parse":c4.default,"textarea-caret-ts":d4.default}})}function N4(yt){var ct=document.createElement("style"),at=document.createTextNode(yt);ct.appendChild(at),document.head.appendChild(ct)}var k4=`.netless-whiteboard div.highlight-box{border:1px solid;box-shadow:0 0 1px #fff,inset 0 0 1px #fff}.netless-whiteboard div.editor-box>*.cursor-nwse{cursor:nwse-resize}.netless-whiteboard div.editor-box>*.cursor-nesw{cursor:nesw-resize}.netless-whiteboard div.editor-box>*.cursor-ns{cursor:ns-resize}.netless-whiteboard div.editor-box>*.cursor-ew{cursor:ew-resize}.netless-whiteboard div.editor-box>*.cursor-move{cursor:move}.netless-whiteboard.cursor-move{cursor:move}.netless-whiteboard div.editor-box{pointer-events:none;border:1px solid;box-shadow:0 0 1px #fff,inset 0 0 1px #fff}.netless-whiteboard div.editor-box>.lock{pointer-events:none;position:absolute;width:22px;height:22px;top:-11px;left:-11px}.netless-whiteboard div.editor-box>div.operation-point-desktop{width:7px;height:7px;position:absolute;pointer-events:auto}.netless-whiteboard div.editor-box>div.operation-point-touch{width:33px;height:33px;background-color:#fff0;position:absolute;pointer-events:auto;display:flex;align-items:center;justify-content:center}.netless-whiteboard div.editor-box>div.operation-point-touch>*{pointer-events:none;width:7px;height:7px}.netless-whiteboard div.editor-box>.operation-point-desktop.left-top{left:-4px;top:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.right-top{right:-4px;top:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.left-bottom{left:-4px;bottom:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.right-bottom{right:-4px;bottom:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.top{top:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.right{right:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.bottom{bottom:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.left{left:-4px}.netless-whiteboard div.editor-box>.operation-point-desktop.rotation{cursor:move;display:flex;align-items:center;justify-content:center;width:16px;height:16px;left:-32px;bottom:-32px;border-radius:8px}.netless-whiteboard div.editor-box>.operation-point-desktop.rotation>img{pointer-events:none;width:10;height:10px}.netless-whiteboard div.editor-box>.operation-point-touch.left-top{left:-17px;top:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.right-top{right:-17px;top:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.left-bottom{left:-17px;bottom:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.right-bottom{right:-17px;bottom:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.top{top:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.right{right:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.bottom{bottom:-17px}.netless-whiteboard div.editor-box>.operation-point-touch.left{left:-17px}.netless-whiteboard div.editor-box-others{border:1px solid}.netless-whiteboard textarea{-webkit-appearance:none;-webkit-user-select:text;-moz-user-select:text;user-select:text;padding:0;margin:0;outline:none;border:none;resize:none;overflow:hidden;line-height:1.2}.netless-whiteboard .textarea-border{position:absolute;top:0;left:0;pointer-events:none;border-width:1px;border-style:dashed}.netless-whiteboard .textarea-border>*{position:absolute;pointer-events:auto}.netless-whiteboard .textarea-layout{position:absolute;top:0;left:0;pointer-events:none;border-width:1px;border-style:dashed;border-style:solid;border-color:#0000}.netless-whiteboard .textarea-layout>*{position:absolute;pointer-events:auto}.netless-whiteboard textarea.readonly-textarea{background:rgba(255,255,255,0)}.netless-whiteboard textarea.editable-textarea{background:rgba(255,255,255,0)}.netless-whiteboard textarea.my-textarea{pointer-events:auto}.netless-whiteboard div.float-bar{display:flex;flex-direction:row;align-items:center;background:#ffffff;border:1px solid #EFEFEF;box-shadow:0 6px 12px #0000001f;border-radius:4px;color-scheme:light;pointer-events:auto}.netless-whiteboard div.float-bar div,.netless-whiteboard div.float-bar input{pointer-events:auto}.netless-whiteboard div.float-bar img{pointer-events:none}.netless-whiteboard div.float-bar .button{display:flex;justify-content:center;align-items:center;cursor:pointer;border:none}.netless-whiteboard div.float-bar .button:hover{background:#EEF0F6}.netless-whiteboard div.float-bar .button.disable{opacity:.5;cursor:not-allowed;background:transparent}.netless-whiteboard div.float-bar>.decorator{height:40px;display:flex;justify-content:center;align-items:center;cursor:pointer;border:none}.netless-whiteboard div.float-bar>.normal-button{width:40px;height:40px}.netless-whiteboard div.float-bar>.highlight-button{background:#EEF0F6}.netless-whiteboard div.float-bar img.font-size-icon{width:16px;height:16px;margin-left:12px}.netless-whiteboard div.float-bar>input.font-size-input::-webkit-outer-spin-button,.netless-whiteboard div.float-bar>input.font-size-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.netless-whiteboard div.float-bar>input.middle:focus,.netless-whiteboard div.float-bar>input:focus{outline-width:0}.netless-whiteboard div.float-bar>input.font-size-input{-moz-appearance:textfield;width:29px;height:20px;margin-left:10px;font-size:12px;font-family:PingFang SC,Microsoft Yahei;font-weight:normal;color:#212324;line-height:14px;border-radius:2px;border:1px solid #e7e7e7;text-align:center}.netless-whiteboard div.float-bar div.font-size-buttons{display:flex;flex-direction:column;flex-wrap:none;justify-content:space-between;align-items:stretch;margin-left:5px;margin-right:7px}.netless-whiteboard div.float-bar div.font-size-buttons>div.arrow-button{display:flex;flex-direction:column;flex-wrap:none;align-items:center;width:16px;height:18px}.netless-whiteboard div.float-bar div.font-size-buttons>div.arrow-button>img{width:6px;height:3px}.netless-whiteboard div.float-bar div.font-size-buttons>div.up{justify-content:flex-end;padding-bottom:2px}.netless-whiteboard div.float-bar div.font-size-buttons>div.down{justify-content:flex-start;padding-top:2px}.netless-whiteboard div.float-bar div.font-size-menu{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:stretch;background:#ffffff;box-shadow:0 3px 6px #0000001f;border-radius:2px}.netless-whiteboard div.float-bar div.font-size-menu>div.hover{background:#e7e7e7}.netless-whiteboard div.float-bar div.font-size-menu>div.cell{display:flex;flex-direction:row;justify-content:center;align-items:center;width:64px;height:24px}.netless-whiteboard div.float-bar div.font-size-menu>div.cell>span{padding-left:4px;padding-right:4px;font-size:12px;font-family:PingFang SC,Microsoft Yahei;font-weight:normal;color:#000}.netless-whiteboard div.float-bar div.font-size-menu>div.cell>.check{width:8px;height:8px}.netless-whiteboard div.float-bar div.font-colors-icon{position:relative;width:16px;height:16px}.netless-whiteboard div.float-bar div.font-colors-icon>img{position:absolute;top:0;left:0;width:16px;height:16px;z-index:1}.netless-whiteboard div.float-bar div.font-colors-icon>div.bar{position:absolute;left:2px;right:2px;top:12.5px;height:1.5px;z-index:2}.netless-whiteboard div.float-bar div.font-colors-menu{display:flex;flex-wrap:wrap;flex-direction:row;justify-content:flex-start;align-items:center;position:absolute;padding:8px;background:#ffffff;box-shadow:0 3px 6px #0000001f;border-radius:2px}.netless-whiteboard div.float-bar div.font-color-button{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:4px;width:20px;height:20px;border-radius:50%;border-width:1px;border-style:solid}.netless-whiteboard div.float-bar div.font-color-button.font-color-selected{border-color:#a7a7a7}.netless-whiteboard div.float-bar div.font-color-button.font-color-not-selected{border-color:#fff}.netless-whiteboard div.float-bar div.font-color-button>.core{width:16px;height:16px;border-radius:50%;border:1px solid rgba(0,0,0,.12)}.netless-whiteboard div.float-bar div.font-color-button>.core.chessboard{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;background-repeat:repeat}.netless-whiteboard div.float-bar div.image-layer-menu{display:flex;flex-wrap:wrap;flex-direction:row;justify-content:flex-start;align-items:center;position:absolute;padding:4px;background:#ffffff;box-shadow:0 3px 6px #0000001f;border-radius:2px}.netless-whiteboard div.float-bar div.image-layer-menu>.normal-button{width:32px;height:32px}.netless-whiteboard div.rotation-indicator{pointer-events:auto;display:flex;align-items:center;justify-content:center;border-radius:5px;color:#fff;background-color:#000;opacity:.75;font-size:12px;width:32px;height:20px}.netless-whiteboard *{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.cursor-selector .ppt-event-source{cursor:pointer;pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.cursor-clicker .ppt-event-source{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.netless-whiteboard{text-align:start;outline:none;line-height:1.2}.netless-whiteboard *{box-sizing:border-box}.netless-whiteboard *>svg{text-align:start}.netless-ppt-last-run:after{content:attr(data-last-word);margin-left:var(--data-last-word-indent);display:inline-block;width:0}.ppt-preview-beauty-scroll-bar::-webkit-scrollbar{width:12px;height:6px}.ppt-preview-beauty-scroll-bar::-webkit-scrollbar-track{border-radius:3px;background:rgba(0,0,0,.06);-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,.08);box-shadow:inset 0 0 5px #00000014}.ppt-preview-beauty-scroll-bar::-webkit-scrollbar-thumb{border-radius:3px;background:rgba(0,0,0,.12);-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.2);box-shadow:inset 0 0 10px #0003}.ppt-preview-main-container{border:1px solid #222}.ppt-preview-show-note-svg{width:40px;height:40px}.ppt-preview-show-sidebar-svg{width:40px;height:40px}.ppt-preview-controls{height:40px;width:100%}.ppt-preview-controls-button{margin:0 2px}.ppt-preview-sidebar{border-left:1px solid #ccc;background-color:#eee}.ppt-preview-sidebar-item{margin:14px 14px 16px}.ppt-preview-sidebar-span{font-size:10pt;text-align:center}.ppt-preview-note{background-color:#eee}.ppt-preview-animation-svg{width:20px;height:20px}.ppt-preview-controls-page{float:right;line-height:16px;font-size:16px;padding:0;margin:0}
`;N4(k4);var uq=ln(require$$116),O4=ln(requireLib$2()),lq=ln(requireReact()),q4=ln(require$$116),cq=ln(require$$116),L4=(function(){function yt(ct){Ot(this,yt),this.onChanged=null,this.atoms=[],this.observers={},this.id=ct}return Bt(yt,[{key:"addObservedAtom",value:function(at,ut){this.observers&&this.atoms&&(this.observers[at.identifier]=at,this.atoms.push(ut))}},{key:"takeObservers",value:function(){var at=this.observers;return this.observers=null,at}},{key:"replay",value:function(){if(this.atoms){var at=Jt(this.atoms),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot.reportObserved()}}catch(gt){at.e(gt)}finally{at.f()}}}},{key:"reportChanged",value:function(){if(this.atoms){var at=this.onChanged;this.atoms=null,this.observers=null,this.onChanged=null,at?.()}}}],[{key:"collectObservations",value:function(at,ut){var ot=new yt("".concat(yt.nextId));yt.nextId+=1,yt.hub=ot;try{return at()}finally{yt.hub=null;try{ut(ot)}catch(gt){console.error(gt)}}}},{key:"observedHub",value:function(){return yt.hub}}]),yt})(),_N=L4;_N.nextId=0;var F4=(function(){function yt(ct,at){Ot(this,yt),this.atoms={},this.keysHubs={},this.iterationAtom=null,this.iterationHubs=null,this.identifier=ct,this.debugName=at}return Bt(yt,[{key:"releaseHubs",value:function(){for(var at in this.keysHubs)delete this.keysHubs[at];this.iterationHubs=null}},{key:"reportChanged",value:function(at,ut,ot){this.reportAtomChanged(at,ot),this.disposeHubs(at)}},{key:"reportAtomChanged",value:function(at,ut){var ot=this.atoms[at];if(ot&&ot.reportChanged(),this.iterationAtom)switch(ut){case fl.Removed:case fl.Inserted:{this.iterationAtom.reportChanged();break}}ot&&ut===fl.Removed&&delete this.atoms[at]}},{key:"disposeHubs",value:function(at){for(var ut in this.iterationHubs)this.iterationHubs[ut].reportChanged();this.iterationHubs=null;var ot=this.keysHubs[at];if(ot){for(var gt in ot)ot[gt].reportChanged();delete this.keysHubs[at]}}},{key:"reportObservedIteration",value:function(){var at=this.iterationAtom;at||(at=this.iterationAtom=(0,cq.createAtom)(this.debugName)),at.reportObserved();var ut=_N.observedHub();if(ut){var ot=this.iterationHubs;ot||(ot=this.iterationHubs={}),ot[ut.id]||(ot[ut.id]=ut,ut.addObservedAtom(this,at))}}},{key:"reportObservedKey",value:function(at){var ut=this.atoms[at];ut||(ut=this.atoms[at]=(0,cq.createAtom)(this.debugName)),ut.reportObserved();var ot=_N.observedHub();if(ot){var gt=this.keysHubs[at];gt||(gt=this.keysHubs[at]={}),gt[ot.id]||(gt[ot.id]=ot,ot.addObservedAtom(this,ut))}}}]),yt})(),B4=(function(){function yt(){Ot(this,yt),this.observers={}}return Bt(yt,[{key:"addObserverHub",value:function(at){var ut=at.takeObservers();for(var ot in ut)this.observers[ot]=ut[ot]}},{key:"clean",value:function(){for(var at in this.observers)this.observers[at].releaseHubs()}}]),yt})(),j4=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"observeUpdate",value:function(at){(0,q4.runInAction)(at)}},{key:"create",value:function(at,ut){return new F4(at,ut)}},{key:"createObserverCollection",value:function(){return new B4}},{key:"collectObservations",value:function(at,ut){return _N.collectObservations(at,ut)}}]),yt})();function hO(yt){return function(){return yt}}function $4(){return dq(1)}function dq(yt){return function(ct,at){var ut=ct.width/at.width,ot=ct.height/at.height,gt=Math.max(ut,ot)*yt;return Number.isNaN(gt)?1:gt}}function U4(){return fO(1,0)}function z4(yt){return fO(1,yt)}function G4(yt){return fO(yt,0)}function fO(yt,ct){return function(at,ut){var ot=at.width/(ut.width+ct*2),gt=at.height/(ut.height+ct*2),xt=Math.min(ot,gt)*yt;return Number.isNaN(xt)||xt===1/0?0:xt}}function V4(yt){for(var ct in yt)yt[ct]===void 0&&delete yt[ct];return yt}var hq=(function(){function yt(ct,at){Ot(this,yt),this._cameraBound=at,this.cameraman=ct.bindCameraman(this.toCameraBorder(at),"device")}return Bt(yt,[{key:"cameraBound",get:function(){return this._cameraBound}},{key:"setScreenSize",value:function(at){(!this.screenSize||this.screenSize.width!==at.width||this.screenSize.height!==at.height)&&(this.screenSize=at,this.setCameraBound({maxContentMode:this.maxContentMode,minContentMode:this.minContentMode}))}},{key:"setCameraBound",value:function(at){this._cameraBound=at,this.cameraman.setCameraBorder(this.toCameraBorder(at))}},{key:"toCameraBorder",value:function(at){var ut=at.damping,ot=at.centerX,gt=at.centerY,xt=at.width,Mt=at.height,kt=this.boundSize(xt,Mt);this.maxContentMode=at.maxContentMode,this.minContentMode=at.minContentMode;var zt=1/0,Ht=0;return this.screenSize&&(this.maxContentMode&&(zt=this.maxContentMode(this.screenSize,kt)),this.minContentMode&&(Ht=this.minContentMode(this.screenSize,kt))),V4({damping:ut,centerX:ot,centerY:gt,width:xt,height:Mt,maxScale:zt,minScale:Ht})}},{key:"boundSize",value:function(at,ut){return this.cameraman?{width:at===void 0?this.cameraman.cameraBorder.width:at,height:ut===void 0?this.cameraman.cameraBorder.height:ut}:{width:at===void 0?1/0:at,height:ut===void 0?1/0:ut}}}]),yt})(),pO;(function(yt){yt.Triangle="triangle",yt.Rhombus="rhombus",yt.Pentagram="pentagram",yt.SpeechBalloon="speechBalloon"})(pO||(pO={}));var H4=Object.freeze(["currentApplianceName","strokeColor","strokeWidth","textColor","textSize","pencilEraserSize","bold","italic","underline","lineThrough","dottedLine","shapeType","textCanSelectText","autoSelectPaste","autoSelectDuplicate","textCompleteToSelector","fillColor","textSizeOverride","rectangleCompleteToSelector","ellipseCompleteToSelector","straightCompleteToSelector","arrowCompleteToSelector","shapeCompleteToSelector"]),Hp;(function(yt){yt.selector="selector",yt.clicker="clicker",yt.laserPointer="laserPointer",yt.pencil="pencil",yt.rectangle="rectangle",yt.ellipse="ellipse",yt.shape="shape",yt.eraser="eraser",yt.pencilEraser="pencilEraser",yt.text="text",yt.straight="straight",yt.arrow="arrow",yt.hand="hand"})(Hp||(Hp={}));var Lx;(function(yt){yt.None="none",yt.Dir="dir",yt.Page="page",yt.Conflict="conflict"})(Lx||(Lx={}));var W4=(function(){function yt(ct,at){Ot(this,yt),this.enableDrawPoint=ct,this.disableNewPencil=at}return Bt(yt,[{key:"becomeWritable",value:function(at){if(this.disableNewPencil){var ut=at.getMemberState();if(ut){var ot=ut.pencilOptions;ot?ot=hn(Qr({},ot),{disableBezier:!0}):ot={disableBezier:!0,enableDrawPoint:!1,sparseHump:3,sparseWidth:4},at.setMemberStateWithCommitter({pencilOptions:ot})}}}},{key:"shouldUseNewPencil",value:function(at){return!this.disableNewPencil&&at===Hp.pencil}}]),yt})(),fq=(function(){function yt(ct){var at=this;Ot(this,yt),this.onLimiterInvoke=function(){if(at.nextInvoker)try{at.nextInvoker()}finally{at.nextInvoker=void 0}},this.limiter=new Nu(ct,this.onLimiterInvoke)}return Bt(yt,[{key:"limitDuration",get:function(){return this.limiter.limitDuration},set:function(at){this.limiter.limitDuration=at}},{key:"invoke",value:function(at){this.nextInvoker=at,this.limiter.invoke()}},{key:"flush",value:function(){this.nextInvoker&&this.onLimiterInvoke(),this.cancel()}},{key:"cancel",value:function(){this.nextInvoker=void 0,this.limiter.cancel()}}]),yt})(),X4=5600,Y4=4,mO=100,pq=17,Q4=75,K4=100,xN;(function(yt){yt[yt.Hight=0]="Hight",yt[yt.Medium=1]="Medium",yt[yt.Low=2]="Low"})(xN||(xN={}));var Z4=Object.freeze((_e={},rt(_e,0,41),rt(_e,1,82),rt(_e,2,164),_e)),mq={};Kr(mq,{bezierMaxSegments:function(){return vq},bezierRenderGranularity:function(){return gq},fitCurveMaxError:function(){return yq}});var gq=4.5,vq=30,yq=1,bq=Object.freeze({x:0,y:0});function J4(yt,ct){return Math.sqrt(Math.pow(yt.x-ct.x,2)+Math.pow(yt.y-ct.y,2))}function SN(yt){return Math.sqrt(Math.pow(yt.x,2)+Math.pow(yt.y,2))}function _q(yt){return Math.pow(yt.x,2)+Math.pow(yt.y,2)}function iE(yt,ct){return{x:yt.x+ct.x,y:yt.y+ct.y}}function xq(){for(var yt=arguments.length,ct=new Array(yt),at=0;at<yt;at++)ct[at]=arguments[at];return{x:ct.reduce(function(ut,ot){return ut+ot.x},0),y:ct.reduce(function(ut,ot){return ut+ot.y},0)}}function nx(yt,ct){return{x:yt.x-ct.x,y:yt.y-ct.y}}function g0(yt,ct){return{x:yt.x*ct,y:yt.y*ct}}function eB(yt,ct){return{x:yt.x/ct,y:yt.y/ct}}function Sq(yt){var ct=SN(yt);return ct===0?yt:eB(yt,ct)}function AA(yt,ct){return yt.x*ct.x+yt.y*ct.y}function wq(yt,ct){if(yt.length<2)return[];var at=yt.length,ut=Eq(yt[1],yt[0]),ot=Eq(yt[at-2],yt[at-1]);return gO(yt,ut,ot,ct)}function gO(yt,ct,at,ut){var ot=20;if(yt.length===2){var gt=J4(yt[0],yt[1])/3;return[{curve:[yt[0],iE(yt[0],g0(ct,gt)),iE(yt[1],g0(at,gt)),yt[1]],beginIndex:0,count:yt.length}]}var xt=iB(yt),Mt=Tq(yt,xt,xt,ct,at),kt=mt(Mt,3),zt=kt[0],Ht=kt[1],rr=kt[2];if(Ht===0||Ht<ut)return[{curve:zt,beginIndex:0,count:yt.length}];if(Ht<ut*ut)for(var ur=xt,_r=Ht,Dr=rr,Br=0;Br<ot;Br++){var Ur,Zr;if(ur=rB(zt,yt,ur),Ur=Tq(yt,xt,ur,ct,at),Zr=mt(Ur,3),zt=Zr[0],Ht=Zr[1],rr=Zr[2],Ht<ut)return[{curve:zt,beginIndex:0,count:yt.length}];if(rr===Dr){var Tn=Ht/_r;if(Tn>.9999&&Tn<1.0001)break}_r=Ht,Dr=rr}var jn=nx(yt[rr-1],yt[rr+1]);if(jn.x===0&&jn.y===0){var ts=nx(yt[rr-1],yt[rr]),us=ts.x,Os=ts.y;jn={x:-Os,y:us}}var Hs=Sq(jn),Ks=g0(Hs,-1),so=gO(yt.slice(0,rr+1),ct,Hs,ut),To=gO(yt.slice(rr),Ks,at,ut),Oo=Jt(To),Au;try{for(Oo.s();!(Au=Oo.n()).done;){var Tu=Au.value;Tu.beginIndex+=rr}}catch(xu){Oo.e(xu)}finally{Oo.f()}return[].concat(Ct(so),Ct(To))}function Tq(yt,ct,at,ut,ot){var gt=tB(yt,at,ut,ot),xt=aB(yt,gt,ct),Mt=mt(xt,2),kt=Mt[0],zt=Mt[1];return[gt,kt,zt]}function tB(yt,ct,at,ut){for(var ot=yt[0],gt=yt[yt.length-1],xt=[ot,bq,bq,gt],Mt=ct.map(function(To){var Oo=1-To;return[g0(at,3*To*(Oo*Oo)),g0(ut,3*Oo*(To*To))]}),kt=[[0,0],[0,0]],zt=[0,0],Ht=0,rr=Array.from(ct.entries());Ht<rr.length;Ht++){var ur=mt(rr[Ht],2),_r=ur[0],Dr=ur[1],Br=mt(Mt[_r],2),Ur=Br[0],Zr=Br[1];kt[0][0]+=AA(Ur,Ur),kt[0][1]+=AA(Ur,Zr),kt[1][0]+=AA(Ur,Zr),kt[1][1]+=AA(Zr,Zr);var Tn=nx(yt[_r],wN([ot,ot,gt,gt],Dr));zt[0]+=AA(Ur,Tn),zt[1]+=AA(Zr,Tn)}var jn=kt[0][0]*kt[1][1]-kt[1][0]*kt[0][1],ts=kt[0][0]*zt[1]-kt[1][0]*zt[0],us=zt[0]*kt[1][1]-zt[1]*kt[0][1],Os=jn===0?0:us/jn,Hs=jn===0?0:ts/jn,Ks=SN(nx(ot,gt)),so=1e-6*Ks;return Os<so||Hs<so?(xt[1]=iE(ot,g0(at,Ks/3)),xt[2]=iE(gt,g0(ut,Ks/3))):(xt[1]=iE(ot,g0(at,Os)),xt[2]=iE(gt,g0(ut,Hs))),xt}function rB(yt,ct,at){return at.map(function(ut,ot){return nB(yt,ct[ot],ut)})}function nB(yt,ct,at){var ut=nx(wN(yt,at),ct),ot=uB(yt,at),gt=AA(ut,ot),xt=_q(ot)+2*AA(ut,lB(yt,at));return xt===0?at:at-gt/xt}function iB(yt){var ct=[],at,ut,ot;return yt.forEach(function(gt,xt){at=xt>0?ut+SN(nx(gt,ot)):0,ct.push(at),ut=at,ot=gt}),ct=ct.map(function(gt){return ut===0?0:gt/ut}),ct}function aB(yt,ct,at){for(var ut=0,ot=Math.floor(yt.length/2),gt=sB(ct,10),xt=1;xt<yt.length-1;xt++){var Mt=yt[xt],kt=oB(ct,at[xt],gt,10),zt=nx(wN(ct,kt),Mt),Ht=_q(zt);Ht>ut&&(ut=Ht,ot=xt)}return[ut,ot]}function sB(yt,ct){for(var at=[0],ut=yt[0],ot=0,gt=1;gt<=ct;gt++){var xt=wN(yt,gt/ct);ot+=SN(nx(xt,ut)),at.push(ot),ut=xt}return at=at.map(function(Mt){return Mt/ot}),at}function oB(yt,ct,at,ut){if(ct<0)return 0;if(ct>1)return 1;for(var ot=1;ot<=ut;ot++)if(ct<=at[ot]){var gt=(ot-1)/ut,xt=ot/ut,Mt=at[ot-1],kt=at[ot];return(ct-Mt)/(kt-Mt)*(xt-gt)+gt}return Number.NaN}function Eq(yt,ct){return Sq(nx(yt,ct))}function wN(yt,ct){var at=1-ct,ut=g0(yt[0],Math.pow(at,3)),ot=g0(yt[1],3*Math.pow(at,2)*ct),gt=g0(yt[2],3*at*Math.pow(ct,2)),xt=g0(yt[3],Math.pow(ct,3));return xq(ut,ot,gt,xt)}function uB(yt,ct){var at=1-ct,ut=g0(nx(yt[1],yt[0]),3*Math.pow(at,2)),ot=g0(nx(yt[2],yt[1]),6*at*ct),gt=g0(nx(yt[3],yt[2]),3*Math.pow(ct,2));return xq(ut,ot,gt)}function lB(yt,ct){return iE(g0(iE(nx(yt[2],g0(yt[1],2)),yt[0]),6*(1-ct)),g0(iE(nx(yt[3],g0(yt[2],2)),yt[1]),6*ct))}var Aq=(function(){function yt(ct){Ot(this,yt),this.extraSteups=0,this.straightEnd=null,this.points=null,this.isCurveExits=!1,this.didPushPointsCount=0;var at=ct.firstPoint;this.applianceManager=ct.applianceManager,this.paintingShape=ct.paintingShape,this.bezierCurvePainter=ct.bezierCurvePainter,this.invoker=ct.invoker,this.beginPoint=at,this.isStraightMode=ct.isStraightMode,this.scale=ct.scale,this.enableDrawPoint=ct.enableDrawPoint,this.zone=Object.seal({top:at.y,bottom:at.y,left:at.x,right:at.x}),this.bezierCurvePainter.pushPoint(at.x,at.y)}return Bt(yt,[{key:"toStraightMode",value:function(){var at;if((at=this.invoker)==null||at.flush(),this.points){var ut=this.points[this.points.length-1];this.beginPoint={x:ut.x,y:ut.y},this.points=null}this.isStraightMode=!0}},{key:"toPencilMode",value:function(){if(this.straightEnd){var at=this.straightEnd,ut=at.x,ot=at.y;this.receiveIntoZone(ut,ot),this.beginPoint={x:ut,y:ot},this.straightEnd=null}this.bezierCurvePainter.completeMoveBrokenPoint(),this.isStraightMode=!1,this.isCurveExits=!1}},{key:"addExtraSteups",value:function(){return this.extraSteups+=1}},{key:"moveTo",value:function(at,ut){this.isStraightMode?this.moveStraightEnd(at,ut):this.pushPencilPoint(at,ut)}},{key:"complete",value:function(at,ut){return this.isStraightMode&&this.receiveIntoZone(at,ut),!this.shouldCancelPaintingPencil()}},{key:"shouldCancelPaintingPencil",value:function(){if(this.enableDrawPoint)return!1;{var at=this.paintingShape.hitTestingBoxMargin/5,ut=this.zone.right-this.zone.left,ot=this.zone.bottom-this.zone.top;return ut<=at&&ot<=at}}},{key:"moveStraightEnd",value:function(at,ut){var ot=TN.curveConvergenceSteps.length,gt=this.extraSteups-ot;this.extraSteups=ot,this.straightEnd?(this.straightEnd.x=at,this.straightEnd.y=ut,this.applianceManager.updateBezierCurveTail(this.createStraightLine(at,ut),gt)):(this.straightEnd={x:at,y:ut},this.didPushPointsCount+=1,this.applianceManager.appendBezierCurveTail([this.createStraightLine(at,ut)],gt)),this.didPushPointsCount<yt.maxSegmentsPointsCount?this.bezierCurvePainter.moveBrokenPoint(at,ut):this.bezierCurvePainter.touchPoint(at,ut)}},{key:"createStraightLine",value:function(at,ut){var ot=this.beginPoint.x-at,gt=this.beginPoint.y-ut;return{point1:Qr({},this.beginPoint),point2:{x:at,y:ut},point3:{x:at,y:ut},hiddenPoints:0,cubic:[0,1],distance:Math.sqrt(ot*ot+gt*gt)}}},{key:"pushPencilPoint",value:function(at,ut){var ot=this;this.points||(this.points=[hn(Qr({},this.beginPoint),{distance:0})]);var gt=this.createStrokePoint(this.points,at,ut);this.points.push(gt),this.didPushPointsCount<yt.maxSegmentsPointsCount?(this.bezierCurvePainter.pushPoint(at,ut),this.didPushPointsCount+=1):this.bezierCurvePainter.touchPoint(at,ut),this.invoker&&this.points.length<yt.maxSegmentsPointsCount?this.invoker.invoke(function(){return ot.syncCurve()}):this.syncCurve(),this.receiveIntoZone(at,ut)}},{key:"syncCurve",value:function(){var at=this.points,ut=yq/this.scale,ot=wq(at,Math.pow(ut,2)),gt=this.subtractExtraSteps();if(ot.length===1){var xt=ot[0].curve,Mt=this.createBezierCurve(at,xt,0,at.length);this.isCurveExits?this.applianceManager.updateBezierCurveTail(Mt,gt):this.applianceManager.appendBezierCurveTail([Mt],gt)}else{var kt=0,zt=[],Ht=Jt(ot),rr;try{for(Ht.s();!(rr=Ht.n()).done;){var ur=rr.value,_r=ur.curve,Dr=ur.beginIndex,Br=ur.count;zt.push(this.createBezierCurve(at,_r,Dr,Br)),kt=Math.max(kt,Dr)}}catch(Ur){Ht.e(Ur)}finally{Ht.f()}at.splice(0,kt),this.isCurveExits?this.applianceManager.splitBezierCurveTail(zt,gt):this.applianceManager.appendBezierCurveTail(zt,gt)}this.isCurveExits=!0}},{key:"createStrokePoint",value:function(at,ut,ot){var gt=at[at.length-1],xt=ut-gt.x,Mt=ot-gt.y,kt=gt.distance+Math.sqrt(xt*xt+Mt*Mt);return{x:ut,y:ot,distance:kt}}},{key:"createBezierCurve",value:function(at,ut,ot,gt){var xt=gt-2,Mt=at[ot],kt=at[ot+gt-1];return{point1:ut[1],point2:ut[2],point3:ut[3],hiddenPoints:xt,cubic:this.fitCubic(at,ot,gt),distance:kt.distance-Mt.distance}}},{key:"fitCubic",value:function(at,ut,ot){var gt=null,xt=at[ut].distance,Mt=at[ut+ot-1].distance-xt;if(ot>=3&&Mt>0){for(var kt=[],zt=[],Ht=0;Ht<ot;++Ht){var rr=at[ut+Ht].distance;kt[Ht]=(rr-xt)/Mt,zt[Ht]=Ht/(ot-1)}gt=yt.getLinearRegression(kt,zt)}return gt||(gt=Ct(yt.defaultCubic)),gt}},{key:"receiveIntoZone",value:function(at,ut){this.zone.left=Math.min(this.zone.left,at),this.zone.right=Math.max(this.zone.right,at),this.zone.top=Math.min(this.zone.top,ut),this.zone.bottom=Math.max(this.zone.bottom,ut)}},{key:"subtractExtraSteps",value:function(){var at=0;return this.extraSteups>0&&(this.extraSteups-=1,at=1),at}}],[{key:"getLinearRegression",value:function(at,ut){for(var ot=null,gt=0,xt=0,Mt=0,kt=0,zt=0,Ht=1;Ht<at.length;++Ht){var rr=at[Ht],ur=ut[Ht];if(rr!==0){var _r=rr*rr,Dr=ur/_r;gt+=Dr,xt+=rr,Mt+=_r,kt+=Dr*rr,zt+=1}}if(zt>2){var Br=xt/zt,Ur=gt/zt,Zr=(kt-Ur*Br)/(Mt-xt*xt/zt),Tn=Ur-Zr*Br,jn=Tn+Zr;ot=[Tn/jn,Zr/jn,0,0]}return ot}}]),yt})(),vO=Aq;vO.maxSegmentsPointsCount=350,vO.defaultCubic=Object.freeze(Aq.getLinearRegression([0,.2,.4,.6,.8,1],[0,.2,.4,.6,.8,1]));var TN=(function(){function yt(ct,at,ut,ot,gt,xt,Mt){var kt=this;Ot(this,yt),this.isShiftPress=!1,this.isCtrlKeyPress=!1,this.isAltPress=!1,this.isPaintCircularMode=!1,this.curve=null,this.commiter=null,this.onAddExtraSteups=function(){var zt;kt.curve&&((zt=kt.invoker)==null||zt.flush(),kt.applianceManager.addBezierCurveExtraSteups(),kt.curve.addExtraSteups()>=kt.bezierCurvePainter.maxExtraSteups&&kt.fountain.stop())},this.view=ct,this.applianceManager=at,this.cameraObserver=ut,this.pencilOptions=ot,this.bezierCurvePainter=gt,this.fountain=new yO(this.onAddExtraSteups),xt?this.invoker=null:this.invoker=new fq(Z4[Mt])}return Bt(yt,[{key:"notifyShiftPress",value:function(at){var ut,ot;this.isShiftPress!==at&&(this.isShiftPress=at,at?(ut=this.curve)==null||ut.toStraightMode():(ot=this.curve)==null||ot.toPencilMode())}},{key:"notifiyCtrlPress",value:function(at){this.isCtrlKeyPress=at}},{key:"notifiyAltPress",value:function(at){this.isAltPress=at}},{key:"pushBoundlessMouseEvent",value:function(at,ut){switch(this.commiter=null,at){case Ls.MouseDown:case Ls.SortedTouchStart:{this.onMouseDown(ut);break}case Ls.MouseMove:case Ls.SortedTouchMove:{this.onMouseMove(ut);break}case Ls.MouseUp:case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:{this.onMouseUp(ut);break}case Ls.MouseLeave:{this.onMouseLeave(ut);break}}return this.commiter}},{key:"onMouseDown",value:function(at){var ut=at.x,ot=at.y;!this.curve&&!this.isPaintCircularMode&&(this.isAltPress?(this.isPaintCircularMode=!0,this.applianceManager.beginPencilCircular(ut,ot,this.isCtrlKeyPress)):(this.curve=new vO({applianceManager:this.applianceManager,paintingShape:this.createCurveShape(ut,ot),bezierCurvePainter:this.bezierCurvePainter,invoker:this.invoker,firstPoint:{x:ut,y:ot},isStraightMode:this.isShiftPress,enableDrawPoint:this.pencilOptions.enableDrawPoint,scale:this.cameraObserver.cameraState.scale}),this.fountain.touch()))}},{key:"onMouseMove",value:function(at){this.curve?(this.curve.moveTo(at.x,at.y),this.fountain.touch()):this.isPaintCircularMode?this.applianceManager.movePencilCircular(at.x,at.y):this.applianceManager.onMouseMove(at,this.view.focusSceneId)}},{key:"onMouseUp",value:function(at){var ut=at.x,ot=at.y,gt;this.curve?((gt=this.invoker)==null||gt.flush(),this.fountain.stop(),this.curve.complete(ut,ot)?this.commiter=this.applianceManager.completePencilPainting(ut,ot):this.applianceManager.cancelPencilPainting(ut,ot,this.view.focusSceneId),this.bezierCurvePainter.completePainting(this.curve.paintingShape),this.curve=null):this.isPaintCircularMode&&(this.isPaintCircularMode=!1,this.commiter=this.applianceManager.completePencilCircular(ut,ot))}},{key:"onMouseLeave",value:function(at){this.curve||(this.commiter=this.applianceManager.onMouseLeave(at,this.view.focusSceneId))}},{key:"createCurveShape",value:function(at,ut){var ot=this.applianceManager.createBezierCurve({x:at,y:ut},this.view.focusSceneId),gt=kS(ot);return this.bezierCurvePainter.startPainting(gt),ot}}]),yt})();TN.curveConvergenceSteps=Object.freeze([.1,.3,.5,.7,.9,1]);var cB=(function(){function yt(ct){var at=this;Ot(this,yt),this.onGush=ct,this.sleepTimer=null,this.gushInterval=null,this.onTick=function(){at.sleepTimer=null,at.gushInterval=at.runAsyncTask(yt.GushInterval),at.onGush()}}return Bt(yt,[{key:"touch",value:function(){this.gushInterval&&(this.cancelAsyncTask(this.gushInterval),this.gushInterval=null),this.sleepTimer&&clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(this.onTick,yt.SleepDuration)}},{key:"stop",value:function(){this.gushInterval&&(this.cancelAsyncTask(this.gushInterval),this.gushInterval=null),this.sleepTimer&&(clearTimeout(this.sleepTimer),this.sleepTimer=null)}},{key:"runAsyncTask",value:function(at){return window.requestAnimationFrame(this.onTick)}},{key:"cancelAsyncTask",value:function(at){window.cancelAnimationFrame(at)}}]),yt})(),yO=cB;yO.SleepDuration=68,yO.GushInterval=17;var Fx;(function(yt){yt[yt.Down=0]="Down",yt[yt.Move=1]="Move",yt[yt.Up=2]="Up",yt[yt.Leave=3]="Leave"})(Fx||(Fx={}));var bO=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.invoker=new fq(mO),this.latestHitTestIdentifies=[],this.isPressed=!1,this.onStart=function(ot,gt){var xt=ut.getProxyEventKind(ot),Mt=ut.createProxyEvent(ot,gt,0);if(Mt&&(ut.pushProxyEvent(Mt,gt),xt===2)){var kt=ut.createProxyEvent(ot,gt,2);kt&&ut.pushProxyEvent(kt,gt)}},this.onEvent=function(ot,gt){var xt=ut.createProxyEvent(ot,gt);xt&&ut.pushProxyEvent(xt,gt)},this.onCancel=function(ot,gt){var xt,Mt=2,kt=0,zt=0;ot&&(kt=ot.pointOnScreen.x,zt=ot.pointOnScreen.y);var Ht=[],rr=0,ur={x:kt,y:zt,targetsMap:{},hitTestIdentifies:Ht};ut.invoker.cancel(),ut.latestHitTestIdentifies=Ht,(xt=ut.onReceviedMouseEvent)==null||xt.call(ut,Mt,rr,ur,gt)},this.radiusSelector=ct,this.delegate=at}return Bt(yt,[{key:"cleanWaitingEvents",value:function(){this.invoker.cancel()}},{key:"pushProxyEvent",value:function(at,ut){var ot=this;switch(at.boundlessEvent.kind){case Ls.MouseDown:{this.invoker.limitDuration=pq,this.isPressed=!0;break}case Ls.MouseUp:{this.invoker.limitDuration=mO,this.isPressed=!1;break}}switch(at.kind){case 0:{this.invoker.limitDuration=pq;break}case 2:{this.invoker.limitDuration=mO;break}}var gt=at.mouseEvent.hitTestIdentifies;at.boundlessEvent.kind===Ls.MouseMove&&!this.isHitTestIdentifiesDifferent(gt)?this.invoker.invoke(function(){return ot.callbackReceiveMouseEvent(at,ut)}):(this.invoker.cancel(),this.callbackReceiveMouseEvent(at,ut)),this.latestHitTestIdentifies=gt}},{key:"callbackReceiveMouseEvent",value:function(at,ut){var ot=at.kind,gt=at.eraserRadius,xt=at.mouseEvent,Mt;(Mt=this.onReceviedMouseEvent)==null||Mt.call(this,ot,gt,xt,ut)}},{key:"createProxyEvent",value:function(at,ut,ot){var gt=this.delegate.getScreen(ut),xt=null,Mt=0,kt,zt=this.delegate.getCurrentApplianceName(),Ht=at.pointOnScreen,rr=ot??this.getProxyEventKind(at);if(zt===Hp.selector||zt===Hp.eraser||zt===Hp.text){var ur=this.radiusSelector.radius(zt,Ht,this.isPressed);this.isPressed&&zt===Hp.eraser&&(Mt=ur),kt=gt.hitTest(Ht.x,Ht.y,ur)}else kt=[];var _r=this.createMouseEvent(gt,at,ut,kt);return xt={kind:rr,eraserRadius:Mt,applianceName:zt,mouseEvent:_r,boundlessEvent:at},xt}},{key:"createMouseEvent",value:function(at,ut,ot,gt){var xt=ut.nativeEvent,Mt;if(xt&&xt.target){var kt=at.findComponentWithTarget(xt.target);kt&&(Mt=this.delegate.getTargetsMap(kt,ot,xt))}return Mt||(Mt={}),{x:ut.pointOnScene.x,y:ut.pointOnScene.y,targetsMap:Mt,hitTestIdentifies:gt}}},{key:"getProxyEventKind",value:function(at){switch(at.kind){case Ls.MouseDown:case Ls.SortedTouchStart:return 0;case Ls.MouseMove:case Ls.SortedTouchMove:return 1;case Ls.MouseUp:case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:return 2;case Ls.MouseLeave:return 3;default:throw new Error("invalid kind ".concat(at.kind))}}},{key:"isHitTestIdentifiesDifferent",value:function(at){var ut=this.latestHitTestIdentifies.length!==at.length;if(!ut)for(var ot=0;ot<at.length;++ot){var gt=at[ot],xt=this.latestHitTestIdentifies[ot];if(ut=gt!==xt,ut)break}return ut}}]),yt})(),dB=(function(){function yt(ct){Ot(this,yt),this.isDisplayerWritable=ct,this.catchPress=!1,this.catchTarget=null,this.shadowTextarea=null,this.didRelease=!1}return Bt(yt,[{key:"receivePreEndTouch",value:function(at,ut){var ot=!1;this.catchTarget&&!this.isParent(this.catchTarget,at.target)&&(ot=!0),this.isDisplayerWritable()&&!this.didRelease&&this.catchPress&&!ot&&ut<=7&&this.getShadowTextarea().focus()}},{key:"isParent",value:function(at,ut){for(var ot=at;ot;){if(ot===ut)return!0;ot=ot.parentElement}return!1}},{key:"release",value:function(){this.shadowTextarea&&(this.shadowTextarea.remove(),this.shadowTextarea=null),this.didRelease=!0}},{key:"getShadowTextarea",value:function(){return this.shadowTextarea||(this.shadowTextarea=this.createShadowTextarea()),this.shadowTextarea}},{key:"createShadowTextarea",value:function(){var at=document.createElement("textarea");return at.style.flex="fixed",at.style.opacity="0.0",at.style.width="0px",at.style.height="0px",at.addEventListener("onchange",function(){at.value="",at.blur(),console.warn("")}),document.body.append(at),at}}]),yt})(),hB=(function(){function yt(ct){Ot(this,yt),this.bezierRenderGranularity=ct.bezierRenderGranularity,this.bezierMaxSegments=ct.bezierMaxSegments,this.fitCurveMaxError=ct.fitCurveMaxError}return Bt(yt,[{key:"erase",value:function(at,ut,ot){var gt=this,xt={},Mt=[],kt=Jt(at),zt;try{var Ht=function(){var ur=zt.value,_r=ur.getCurves(),Dr=gt.splitAndKeepErasedRanges(ur,ut,_r,ot).map(function(Br){return gt.toBezierCurveShapeUpdater(Br,ut,ur,_r)});xt[ur.identifier]=Dr,Mt.push(ur.protoKey)};for(kt.s();!(zt=kt.n()).done;)Ht()}catch(rr){kt.e(rr)}finally{kt.f()}return{updaters:xt,touchProtoKeys:Mt}}},{key:"splitAndKeepErasedRanges",value:function(at,ut,ot,gt){var xt=this,Mt=at.getInitializedSize(),kt=at.getHeadPoint(),zt=this.bezierRenderGranularity/ut,Ht=yt.scale(at.width,Mt.width),rr=yt.scale(at.height,Mt.height),ur=Math.sqrt(Ht*Ht+rr*rr)/Math.sqrt(2),_r=gt.transform(at.originX,at.originY,Ht,rr),Dr=[],Br=null,Ur=kt.x*Ht,Zr=kt.y*rr;_r.includes(Ur,Zr)||(Br={headPoint:Qr({},kt),begin:{index:0,d:0,points:null,cubic:[0,0,0,0]},end:{index:0,d:0,points:null,cubic:[0,0,0,0]}});for(var Tn=function(so){var To=Math.ceil(so*ur/zt);return Math.max(2,Math.min(To,xt.bezierMaxSegments))},jn=function(so){var To=ot[so],Oo=To.point1,Au=To.point2,Tu=To.point3,xu=To.distance,yu=To.cubic,sp=!0;xt.forEachCurvePoints(Ur,Zr,Oo,Au,Tu,sp,Tn(xu),function(Jl,Ml,Qp){var pm=_r.includes(Jl,Ml);Br&&!pm?(Br.end.index=so,Br.end.d=Qp,Br.end.cubic=yu):Br&&pm?(Dr.push(Br),Br=null):!Br&&!pm&&(Br={headPoint:{x:Jl,y:Ml},begin:{index:so,d:Qp,points:null,cubic:yu},end:{index:so,d:Qp,points:null,cubic:yu}})}),Ur=Tu.x,Zr=Tu.y},ts=0;ts<ot.length;++ts)jn(ts);Br&&Dr.push(Br);for(var us=0,Os=Dr;us<Os.length;us++){var Hs=Os[us];Hs.begin.index===Hs.end.index?this.collectPointsOnTheSameCurve(Hs,ot,Tn):(this.collectPointsOnBeginSideCurve(Hs,ot,Tn),this.collectPointsOnEndSideCurve(Hs,ot,Tn))}return Dr}},{key:"collectPointsOnTheSameCurve",value:function(at,ut,ot){var gt=at.begin,xt=at.end;if(gt.d>0||xt.d<1){var Mt=ut[gt.index],kt=Mt.point1,zt=Mt.point2,Ht=Mt.point3,rr=Mt.distance,ur=at.headPoint,_r=ur.x,Dr=ur.y,Br=[],Ur=!0;this.forEachCurvePoints(_r,Dr,kt,zt,Ht,Ur,ot(rr),function(Zr,Tn,jn){return jn>xt.d?!0:(jn>=gt.d&&Br.push({x:Zr,y:Tn}),!1)}),at.begin.points=Br,at.end.points=Br}}},{key:"collectPointsOnBeginSideCurve",value:function(at,ut,ot){var gt=at.begin;if(gt.d>0){var xt=ut[gt.index],Mt=xt.point1,kt=xt.point2,zt=xt.point3,Ht=xt.distance,rr=at.headPoint,ur=rr.x,_r=rr.y,Dr=[],Br=!1;this.forEachCurvePoints(ur,_r,Mt,kt,zt,Br,ot(Ht),function(Ur,Zr,Tn){return Dr.push({x:Ur,y:Zr}),Tn<gt.d}),at.begin.points=Dr.reverse()}}},{key:"collectPointsOnEndSideCurve",value:function(at,ut,ot){var gt=at.end;if(gt.d<1){var xt=ut[gt.index],Mt=xt.point1,kt=xt.point2,zt=xt.point3,Ht=xt.distance,rr=ut[gt.index-1].point3||at.headPoint,ur=rr.x,_r=rr.y,Dr=[],Br=!0;this.forEachCurvePoints(ur,_r,Mt,kt,zt,Br,ot(Ht),function(Ur,Zr,Tn){return Dr.push({x:Ur,y:Zr}),Tn>gt.d}),at.end.points=Dr}}},{key:"forEachCurvePoints",value:function(at,ut,ot,gt,xt,Mt,kt,zt){var Ht=ot.x,rr=ot.y,ur=gt.x,_r=gt.y,Dr=xt.x,Br=xt.y,Ur,Zr,Tn;for(Mt?(Ur=0,Zr=kt-1,Tn=1):(Ur=kt-1,Zr=0,Tn=-1);;){var jn=Ur/(kt-1),ts=Math.pow(1-jn,3),us=3*jn*Math.pow(1-jn,2),Os=3*Math.pow(jn,2)*(1-jn),Hs=Math.pow(jn,3),Ks=ts*at+us*Ht+Os*ur+Hs*Dr,so=ts*ut+us*rr+Os*_r+Hs*Br;if(zt(Ks,so,jn)||Ur===Zr)break;Ur+=Tn}}},{key:"toBezierCurveShapeUpdater",value:function(at,ut,ot,gt){var xt=at.headPoint,Mt=at.begin,kt=at.end,zt=Math.pow(this.fitCurveMaxError/ut,2),Ht=null,rr=null,ur=-1,_r=Mt.index;if(Mt.points){var Dr=1;Mt.index===kt.index&&(Dr=kt.d),Ht=this.collectBezierCurve(Mt.points,Mt.cubic,zt,Mt.d,Dr)}if(Mt.index<kt.index){if(kt.points){var Br=0;Mt.index===kt.index&&(Br=Mt.d),rr=this.collectBezierCurve(kt.points,kt.cubic,zt,Br,kt.d)}ur=kt.index,_r=kt.index}var Ur;return _r===gt.length-1?Ur=ot.getExtraSteups():Ur=this.bezierMaxSegments,{firstPoint:xt,first:Ht,last:rr,firstIndex:Mt.index,lastIndex:ur,extraSteups:Ur}}},{key:"collectBezierCurve",value:function(at,ut,ot,gt,xt){var Mt=[],kt=2,zt=wq(at,Math.pow(ot,2)),Ht=at.length,rr=this.calculateDistance(at),ur=xt-gt,_r=0,Dr=Jt(zt),Br;try{for(Dr.s();!(Br=Dr.n()).done;){var Ur=Br.value,Zr=Ur.curve,Tn=Ur.count,jn=Tn/Ht,ts=Tn-kt,us=jn*rr,Os=gt+_r/Ht*ur,Hs=gt+(_r+Tn)/Ht*ur;Mt.push({point1:Zr[1],point2:Zr[2],point3:Zr[3],cubic:this.cutOffCubic(ut,Os,Hs),hiddenPoints:ts,distance:us}),_r+=Tn}}catch(Ks){Dr.e(Ks)}finally{Dr.f()}return Mt}},{key:"calculateDistance",value:function(at){for(var ut=0,ot=at[0],gt=1;gt<at.length;++gt){var xt=at[gt],Mt=xt.x-ot.x,kt=xt.y-ot.y;ut+=Math.sqrt(Math.pow(Mt,2)+Math.pow(kt,2)),ot=xt}return ut}},{key:"cutOffCubic",value:function(at,ut,ot){var gt=at;if(ut>0||ot<1){var xt=ot-ut,Mt=ut,kt=gt,zt=mt(kt,4),Ht=zt[0],rr=zt[1],ur=zt[2],_r=zt[3];gt=[Ht*Math.pow(xt,3),3*Ht*Math.pow(xt,2)*Mt+rr*Math.pow(xt,2),3*Ht*Math.pow(Mt,2)+2*rr*Mt+ur*xt,Ht*Math.pow(Mt,3)+rr*Math.pow(Mt,2),ur*Math.pow(Mt,2)+_r]}return gt}}],[{key:"isRectIncludes",value:function(at,ut,ot,gt,xt,Mt){return at>=ot&&at<=gt&&ut>=xt&&ut<=Mt}},{key:"scale",value:function(at,ut){return ut===0?1:at/ut}}]),yt})(),fB=(function(){function yt(){Ot(this,yt),this.points=[]}return Bt(yt,[{key:"pushPoint",value:function(at,ut){return this.points.push({x:at,y:ut}),this}},{key:"complete",value:function(){return this.points.push(this.points[0]),this}},{key:"transform",value:function(at,ut,ot,gt){var xt=new yt,Mt=Jt(this.points),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=zt.x,rr=zt.y,ur=(Ht-at)/ot,_r=(rr-ut)/gt;xt.points.push({x:ur,y:_r})}}catch(Dr){Mt.e(Dr)}finally{Mt.f()}return xt}},{key:"externalRectangle",value:function(){var at=Number.MAX_VALUE,ut=Number.MAX_VALUE,ot=-Number.MAX_VALUE,gt=-Number.MAX_VALUE,xt=Jt(this.points),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.x,Ht=kt.y;at>zt&&(at=zt),ut>Ht&&(ut=Ht),ot<zt&&(ot=zt),gt<Ht&&(gt=Ht)}}catch(rr){xt.e(rr)}finally{xt.f()}return{originX:at,originY:ut,width:ot-at,height:gt-ut}}},{key:"includes",value:function(at,ut){for(var ot=1;ot<this.points.length;++ot){var gt=this.points[ot-1],xt=this.points[ot],Mt=xt.x-gt.x,kt=xt.y-gt.y,zt=at-gt.x,Ht=ut-gt.y;if(Mt*Ht-kt*zt>0)return!1}return!0}}]),yt})(),pB=(function(){function yt(ct){Ot(this,yt),this.prePoint=null,this.commiterState=null,this.isPressed=!1,this.applianceManager=ct,this.eraser=new hB(mq)}return Bt(yt,[{key:"fireMouseDown",value:function(at,ut,ot,gt){this.isPressed||(this.commiterState={snapshots:{},modify:{added:{},removed:{},updated:{}}},this.isPressed=!0,this.erase(at,ut,ot,!1,gt),this.prePoint={x:at,y:ut})}},{key:"fireMouseMove",value:function(at,ut,ot,gt){this.isPressed&&(this.erase(at,ut,ot,!1,gt),this.prePoint={x:at,y:ut})}},{key:"fireMouseUp",value:function(at,ut,ot,gt){var xt=null;return this.isPressed&&(this.isPressed=!1,this.erase(at,ut,ot,!0,gt),this.commiterState&&(xt=this.createCommiter(this.commiterState),this.commiterState=null),this.prePoint=null),xt}},{key:"erase",value:function(at,ut,ot,gt,xt){var Mt=this.createPolygon(at,ut,ot),kt=Mt.externalRectangle(),zt=kt.originX,Ht=kt.originY,rr=kt.width,ur=kt.height,_r=this.applianceManager.collectNewPencilCurves(zt,Ht,rr,ur,xt),Dr=this.eraser.erase(_r,ot,Mt),Br=Dr.updaters,Ur=Dr.touchProtoKeys;this.searchSnapshotsBeforeUpdate(Ur,xt);var Zr=this.applianceManager.updateNewPencilCurves(Br,at,ut,gt,xt);this.commitModify(Zr)}},{key:"getEraserSizeIndex",value:function(at){var ut=1;return at&&typeof at.pencilEraserSize=="number"&&(ut=at.pencilEraserSize),ut=Math.min(3,Math.max(1,Math.floor(ut))),ut-1}},{key:"createPolygon",value:function(at,ut,ot){var gt=new fB,xt=this.applianceManager.getMemberState(),Mt=this.getEraserSizeIndex(xt),kt=yt.eraserSizes[Mt],zt=kt.width/ot,Ht=kt.height/ot,rr=at-zt/2,ur=ut-Ht/2,_r,Dr;this.prePoint?(_r=this.prePoint.x-zt/2,Dr=this.prePoint.y-Ht/2):(_r=rr,Dr=ur);var Br=rr-_r,Ur=ur-Dr;return Br>0?Ur>0?gt.pushPoint(_r,Dr).pushPoint(_r,Dr+Ht).pushPoint(rr,ur+Ht).pushPoint(rr+zt,ur+Ht).pushPoint(rr+zt,ur).pushPoint(_r+zt,Dr):Ur<0?gt.pushPoint(_r,Dr).pushPoint(_r,Dr+Ht).pushPoint(rr+zt,ur+Ht).pushPoint(rr+zt,ur):gt.pushPoint(_r,Dr).pushPoint(_r,Dr+Ht).pushPoint(_r+zt,Dr+Ht).pushPoint(rr+zt,ur+Ht).pushPoint(rr+zt,ur).pushPoint(rr,ur):Br<0?Ur>0?gt.pushPoint(_r,Dr).pushPoint(rr,ur).pushPoint(rr,ur+Ht).pushPoint(rr+zt,ur+Ht).pushPoint(_r+zt,ur+Ht).pushPoint(_r+zt,Dr):Ur<0?gt.pushPoint(_r+zt,Dr).pushPoint(rr+zt,ur).pushPoint(rr,ur).pushPoint(rr,ur+Ht).pushPoint(_r,Dr+Ht).pushPoint(_r+Ht,Dr+Ht):gt.pushPoint(_r,Dr+Ht).pushPoint(rr,ur).pushPoint(rr,ur+Ht).pushPoint(_r+zt,Dr+Ht):Ur>0?gt.pushPoint(_r,Dr).pushPoint(rr,ur+Ht).pushPoint(rr+zt,ur+Ht).pushPoint(_r+zt,Dr):Ur<0?gt.pushPoint(_r,Dr+Ht).pushPoint(rr,ur).pushPoint(rr+zt,ur).pushPoint(_r+zt,Dr+Ht):gt.pushPoint(_r,Dr).pushPoint(_r,Dr+Ht).pushPoint(_r+zt,Dr+Ht).pushPoint(_r+zt,Dr),gt.complete()}},{key:"searchSnapshotsBeforeUpdate",value:function(at,ut){var ot=[],gt=this.commiterState,xt=gt.snapshots,Mt=gt.modify,kt=Mt.added,zt=Mt.removed,Ht=Mt.updated,rr=Jt(at),ur;try{for(rr.s();!(ur=rr.n()).done;){var _r=ur.value;!xt[_r]&&!kt[_r]&&!zt[_r]&&!Ht[_r]&&ot.push(_r)}}catch(Dr){rr.e(Dr)}finally{rr.f()}ot.length>0&&this.applianceManager.searchPencilCurves(ot,ut).forEach(function(Dr,Br){Dr&&(xt[ot[Br]]=Dr.snapshotUndo())})}},{key:"commitModify",value:function(at){var ut=this.commiterState.modify,ot=ut.added,gt=ut.removed,xt=ut.updated;for(var Mt in at.added)ot[Mt]=!0;for(var kt in at.removed)ot[kt]?delete ot[kt]:(gt[kt]=!0,delete xt[kt]);for(var zt in at.updated)ot[zt]||(xt[zt]=!0)}},{key:"createCommiter",value:function(at){var ut=at.modify,ot=at.snapshots,gt={},xt={},Mt=this.collectAfterSnapshots(ut);for(var kt in ut.added)gt[kt]={delete:!0},xt[kt]={createCurve:Mt[kt]};for(var zt in ut.updated)gt[zt]={updateCurve:ot[zt]},xt[zt]={updateCurve:Mt[zt]};for(var Ht in ut.removed)gt[Ht]={createCurve:ot[Ht]},xt[Ht]={delete:!0};return{redo:xt,undo:gt}}},{key:"collectAfterSnapshots",value:function(at){var ut=[];for(var ot in at.added)ut.push(ot);for(var gt in at.updated)ut.push(gt);var xt={};return this.applianceManager.searchPencilCurves(ut).forEach(function(Mt,kt){Mt&&(xt[ut[kt]]=Mt.snapshotUndo())}),xt}}]),yt})(),Cq=pB;Cq.eraserSizes=Object.freeze([Object.freeze({width:18,height:26}),Object.freeze({width:26,height:34}),Object.freeze({width:34,height:50})]);var mB=(function(){function yt(ct,at,ut,ot,gt,xt,Mt,kt,zt,Ht,rr){var ur=this;Ot(this,yt),this._disableKey=!1,this.onReceviedPencilMouseEvent=function(_r,Dr,Br){var Ur;switch(_r){case Fx.Down:{Ur=Ls.MouseDown;break}case Fx.Move:{Ur=Ls.MouseMove;break}case Fx.Up:{Ur=Ls.MouseUp;break}case Fx.Leave:{Ur=Ls.MouseLeave;break}}var Zr=ur.bezierPencilAppliance.pushBoundlessMouseEvent(Ur,Br);Zr&&ur.undoWatcher&&ur.undoWatcher.stack.commit(Zr)},this.onReceivedPencilEraserMouseEvent=function(_r,Dr,Br){var Ur=Br.x,Zr=Br.y;switch(_r){case Fx.Down:{ur.pencilEraserAppliance.fireMouseDown(Ur,Zr,ur.view.camera.scale,ur.view.focusSceneId);break}case Fx.Move:{ur.pencilEraserAppliance.fireMouseMove(Ur,Zr,ur.view.camera.scale,ur.view.focusSceneId);break}case Fx.Up:{var Tn=ur.pencilEraserAppliance.fireMouseUp(Ur,Zr,ur.view.camera.scale,ur.view.focusSceneId);Tn&&ur.undoWatcher&&ur.undoWatcher.stack.commit(Tn);break}}},this.onReceviedOthersMouseEvent=function(_r,Dr,Br){var Ur=null;switch(_r){case Fx.Down:{Ur=ur.magix.trigger.onMouseDown(Br,ur.view.focusSceneId);break}case Fx.Move:{Ur=ur.magix.trigger.onMouseMove(Br,ur.view.focusSceneId);break}case Fx.Up:{Ur=ur.magix.trigger.onMouseUp(Br,ur.view.focusSceneId);break}case Fx.Leave:{Ur=ur.magix.trigger.onMouseLeave(Br,ur.view.focusSceneId);break}}ur.viewsHub.putState({cursorStyle:ur.getCursorStyleWithRadius(Dr)}),Ur&&ur.undoWatcher&&ur.undoWatcher.stack.commit(Ur)},this.magix=ct.magix,this.viewInputsHub=ct.viewInputsHub,this.view=ct.view,this.viewsHub=ct.viewsHub,this.mouseFollower=ot,this.pencilKeyInterrupter=ut,this.undoWatcher=at,this.getCursorStyleWithRadius=ct.getCursorStyleWithRadius,this.onKeyPressed=xt,this.onMetaKeyUp=Mt,this.onTouchPressUpdate=kt,this.onWindowBlur=zt,this.onCopy=Ht,this.onPaste=rr,this._virtualKeyboardHelper=new dB(gt),this.bezierPencilAppliance=new TN(this.view,this.magix.trigger,ct.cameraObserver,ct.pencilOptions,ct.bezierCurvePainter,ct.disablePencilWrittingLimitFrequency,ct.newPencilWritingQuality),this.pencilEraserAppliance=new Cq(this.magix.trigger),this.pencilKeyInterrupter.setAppliance(this.bezierPencilAppliance),this.input=this.viewInputsHub.bindView(this.view,{onReceviedPencilMouseEvent:this.onReceviedPencilMouseEvent,onReceivedPencilEraserMouseEvent:this.onReceivedPencilEraserMouseEvent,onReceviedOthersMouseEvent:this.onReceviedOthersMouseEvent}),window.addEventListener("blur",this.onWindowBlur),window.addEventListener("copy",this.onCopy),window.addEventListener("paste",this.onPaste)}return Bt(yt,[{key:"disableKey",get:function(){return this._disableKey},set:function(at){this._disableKey!==at&&(this._disableKey=at)}},{key:"virtualKeyboardHelper",get:function(){return this._virtualKeyboardHelper}},{key:"pushEvent",value:function(at){this.syncStateOfMouseFollower(at),at.kind===Ls.SortedTouchStart&&this.onTouchPressUpdate(!0),this.pushAndCallback(at),at.kind===Ls.SortedTouchEnd&&this.onTouchPressUpdate(!1)}},{key:"syncStateOfMouseFollower",value:function(at){switch(at.kind){case Ls.MouseDown:{var ut=at.pointOnScreen,ot=ut.x,gt=ut.y;this.mouseFollower.moveMouse(ot,gt);break}case Ls.MouseMove:{var xt=at.pointOnScreen,Mt=xt.x,kt=xt.y;this.mouseFollower.moveMouse(Mt,kt);break}case Ls.MouseUp:{this.mouseFollower.releaseMouse();break}}}},{key:"pushAndCallback",value:function(at){switch(at.kind){case Ls.MouseDown:case Ls.MouseMove:case Ls.MouseUp:case Ls.MouseLeave:case Ls.SortedTouchStart:case Ls.SortedTouchMove:case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:{this.input.pushEvent(at);break}case Ls.KeyDown:case Ls.KeyUp:{this._disableKey||this.onKeyPressed(at);break}case Ls.MetaKeyUp:{this._disableKey||this.onMetaKeyUp(at.nativeEvent);break}}}},{key:"pushPreEndTouchEvent",value:function(at){var ut=at.nativeEvent,ot=at.pointOnScreen,gt=at.beginPointOnScreen;if(ut){var xt=0;if(gt){var Mt=gt.x-ot.x,kt=gt.y-ot.y;xt+=Math.sqrt(Math.pow(Mt,2)+Math.pow(kt,2))}this._virtualKeyboardHelper.receivePreEndTouch(ut,xt)}}},{key:"fireSceneUpdate",value:function(){this.input=this.viewInputsHub.swapInput(this.view)}},{key:"release",value:function(){window.removeEventListener("paste",this.onPaste),window.removeEventListener("copy",this.onCopy),window.removeEventListener("blur",this.onWindowBlur),this.pencilKeyInterrupter.setAppliance(null),this.viewInputsHub.unbindView(this.view),this._virtualKeyboardHelper.release(),this.mouseFollower.releaseMouse()}}]),yt})(),gB=(function(){function yt(ct){Ot(this,yt),this.inputs={},this.outputs={},this.previousId=0,this.pressedInputId="",this.isPressed=!1,this.output=void 0,this.outputSwitch=ct}return Bt(yt,[{key:"createInput",value:function(){var at=this,ut="".concat(this.previousId+=1),ot=Object.freeze({id:ut,pushEvent:function(xt){return at.pushEventByInput(ut,xt)},dispose:function(){return at.removeInput(ot)}});return this.inputs[ut]={input:ot,isPressed:!1},ot}},{key:"removeInput",value:function(at){var ut,ot=this.inputs[at.id];if(ot?.input===at&&(delete this.inputs[at.id],this.pressedInputId===at.id)){this.pressedInputId="",this.isPressed=!1;var gt=this.outputSwitch(at),xt=this.outputs[gt];(ut=xt?.onCancel)==null||ut.call(xt,null,at)}}},{key:"putOutput",value:function(at,ut){this.outputs[at]=ut}},{key:"pushEventByInput",value:function(at,ut){var ot=this.inputs[at];switch(ut.kind){case Ls.MouseDown:case Ls.SortedTouchStart:{ot.isPressed=!0,this.isPressed=!0,this.pressedInputId===""&&(this.pressedInputId=at,this.pushEvent(ot.input,ut));break}case Ls.MouseMove:case Ls.MouseLeave:case Ls.SortedTouchMove:{(this.pressedInputId===""&&!ot.isPressed||this.pressedInputId===at)&&this.pushEvent(ot.input,ut);break}case Ls.MouseUp:case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:{this.pressedInputId===at&&(this.pressedInputId="",this.pushEvent(ot.input,ut)),ot.isPressed=!1,this.isPressed=!1;break}}}},{key:"pushEvent",value:function(at,ut){var ot,gt=this.outputSwitch(at),xt=this.outputs[gt];if(this.output===void 0||this.output!==gt){var Mt=this.output!==void 0?this.outputs[this.output]:void 0;this.output=gt,this.isPressed&&((ot=Mt?.onCancel)==null||ot.call(Mt,ut,at),xt?.onEvent(ut,at))}else xt?.onEvent(ut,at)}}]),yt})(),Dq=(function(){function yt(){Ot(this,yt),this.map={}}return Bt(yt,[{key:"values",value:function(at){return this.map[at]}},{key:"has",value:function(at,ut){var ot=this.map[at];return ot?ot.indexOf(ut)!==-1:!1}},{key:"put",value:function(at,ut){var ot=this.map[at];ot||(ot=this.map[at]=[]),ot.indexOf(ut)===-1&&ot.push(ut)}},{key:"remove",value:function(at,ut){if(at)if(!ut)delete this.map[at];else{var ot=this.map[at];if(ot){var gt=ot.indexOf(ut);gt!==-1&&(ot.splice(gt,1),ot.length===0&&delete this.map[at])}}else for(var xt in this.map)delete this.map[xt]}}]),yt})(),CA=(function(){function yt(ct){if(Ot(this,yt),this.listeners=new Dq,this.oncesListeners=new Dq,ct)for(var at in ct){var ut=ct[at];ut&&this.listeners.put(at,ut)}}return Bt(yt,[{key:"dispatch",value:function(at,ut){var ot=0;return ot+=this.dispatchTo(at,this.listeners,ut),ot+=this.dispatchTo(at,this.oncesListeners,ut),this.oncesListeners.remove(at),ot}},{key:"dispatchTo",value:function(at,ut,ot){var gt=ut.values(at);if(gt){var xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;try{ot(kt)}catch(zt){console.error(zt)}}}catch(zt){xt.e(zt)}finally{xt.f()}return gt.length}else return 0}},{key:"on",value:function(at,ut){this.listeners.put(at,ut)}},{key:"once",value:function(at,ut){this.oncesListeners.put(at,ut)}},{key:"off",value:function(at,ut){this.listeners.remove(at,ut),this.oncesListeners.remove(at,ut)}},{key:"forwardTo",value:function(at,ut){var ot=function(){for(var xt=arguments.length,Mt=new Array(xt),kt=0;kt<xt;kt++)Mt[kt]=arguments[kt];ut.dispatch(at,function(zt){return zt.apply(void 0,Mt)})};return this.on(at,ot),ot}}]),yt})(),aT;(function(yt){yt.Mac="mac",yt.Windows="windows"})(aT||(aT={}));function vB(){return function(yt,ct){var at=yt.key,ut=yt.ctrlKey;switch(ct){case aT.Mac:return at==="Meta"&&!ut;case aT.Windows:return at==="Control";default:return!1}}}function yB(){return function(yt){var ct=yt.key;return ct==="Alt"}}function bB(){return function(yt){var ct=yt.key,at=yt.altKey;return ct==="Shift"&&!at}}function EN(yt){return function(ct,at){var ut=ct.key,ot=ct.altKey,gt=ct.ctrlKey,xt=ct.shiftKey,Mt=ct.nativeEvent;switch(at){case aT.Mac:return ut===yt&&!gt&&!ot&&!xt&&!!Mt?.metaKey;case aT.Windows:return ut===yt&&gt&&!ot&&!xt&&ct.kind==="KeyDown";default:return!1}}}var Mq=Object.freeze({delete:Object.freeze(["Backspace","Delete"]),undo:EN("z"),redo:EN("y"),copy:EN("c"),paste:EN("v"),lockCenter:vB(),pencilPaintCircular:yB(),lock:bB()}),_B=(function(){function yt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mq;Ot(this,yt);var at=[];for(var ut in ct){var ot=ct[ut];ot&&at.push(Object.freeze({kind:ut,checker:this.toHotKeyChecker(ot)}))}this.nodes=Object.freeze(at)}return Bt(yt,[{key:"checkHotKey",value:function(at){var ut=this.getKeyboardKind(),ot=Jt(this.nodes),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.checker(at,ut))return xt.kind}}catch(Mt){ot.e(Mt)}finally{ot.f()}}},{key:"getKeyboardKind",value:function(){return/^Mac/i.test(navigator.platform)?aT.Mac:aT.Windows}},{key:"toHotKeyChecker",value:function(at){var ut=at;if(typeof ut!="function"&&(ut instanceof Array||(ut=[ut]),ut instanceof Array)){var ot=Object.freeze(ut.map(function(gt){var xt=gt;return typeof xt=="string"&&(xt={key:xt,altKey:!1,ctrlKey:!1,shiftKey:!1}),Object.freeze(Qr({},xt))}));ut=function(xt,Mt){var kt;if(Mt===aT.Windows&&xt.kind!=="KeyDown")return!1;var zt=xt.key,Ht=xt.altKey,rr=xt.shiftKey,ur=xt.ctrlKey||!!((kt=xt.nativeEvent)!=null&&kt.metaKey),_r=Jt(ot),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value;if(Br.key===zt&&(Br.altKey===null||Br.altKey===Ht)&&(Br.ctrlKey===null||Br.ctrlKey===ur)&&(Br.shiftKey===null||Br.shiftKey===rr))return!0}}catch(Ur){_r.e(Ur)}finally{_r.f()}return!1}}return ut}}]),yt})(),Iq=ln(require$$116),xB=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"parse",value:function(at){var ut=at.split("/");if(ut[0]!=="")throw new Error("path ".concat(JSON.stringify(at),' should start with "/"'));ut[ut.length-1]===""&&ut.pop();for(var ot=[],gt=1;gt<ut.length;++gt)ot.push(ut[gt].trim());return ot}},{key:"stringify",value:function(at){return"/".concat(at.join("/"))}}]),yt})(),$v=new xB,SB=(function(){function yt(ct){Ot(this,yt),this.hub={},this.constr=Object.freeze(Qr({},ct))}return Bt(yt,[{key:"refresh",value:function(at){this.constr=Object.freeze(Qr({},at));var ut=this.constr,ot=ut.applianceManager,gt=ut.sceneNodeClass;for(var xt in this.hub){var Mt=$v.parse(xt),kt=this.hub[xt],zt=ot.scenes.findSceneOrGroup(Mt);!zt||hm(zt,gt)?kt.zombie():kt.setGroup(zt)}}},{key:"create",value:function(at,ut){var ot=this,gt=this.constr,xt=gt.applianceManager,Mt=gt.sceneNodeClass,kt=$v.parse(at),zt=xt.scenes.findSceneOrGroup(kt),Ht=null;if(zt){var rr,ur;if(hm(zt,Mt)?(kt.pop(),rr=$v.stringify(kt),ur=xt.scenes.findSceneOrGroup(kt)):(rr=at,ur=zt),rr in this.hub)throw new Error("did create scenes callbacks of path ".concat(JSON.stringify(rr),". you should call dispose() before create another one"));Ht=this.hub[rr]=new wB(rr,ur,function(){return delete ot.hub[rr]},ut)}return Ht}}]),yt})(),wB=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,xt),Mt._scenesCount=0,Mt._sceneGroupsCount=0,Mt.state=null,Mt.didZombie=!1,Mt.didDispose=!1,Mt.onGroupsUpdate=function(kt){var zt=Jt(kt),Ht;try{var rr=function(){var _r=Ht.value;switch(_r.kind){case fl.Inserted:{Mt.dispatch("onAddSceneGroup",function(Dr){return Dr(Kt(Mt),_r.key)});break}case fl.Removed:{Mt.dispatch("onRemoveSceneGroup",function(Dr){return Dr(Kt(Mt),_r.key)});break}}};for(zt.s();!(Ht=zt.n()).done;)rr()}catch(ur){zt.e(ur)}finally{zt.f()}},Mt.onScenesUpdate=function(kt){var zt=Jt(kt),Ht;try{var rr=function(){var _r=Ht.value;switch(_r.kind){case fl.Inserted:{Mt.dispatch("onAddScene",function(Dr){return Dr(Kt(Mt),_r.key)});break}case fl.Removed:{Mt.dispatch("onRemoveScene",function(Dr){return Dr(Kt(Mt),_r.key)});break}}};for(zt.s();!(Ht=zt.n()).done;)rr()}catch(ur){zt.e(ur)}finally{zt.f()}},Mt.path=ut,Mt.setGroup(ot),Mt.onDispose=gt,Mt}return Bt(at,[{key:"scenes",get:function(){var ot=[];if(this.state){var gt=Jt(this.state.group.scenesList),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot.push(Mt.name)}}catch(kt){gt.e(kt)}finally{gt.f()}}return ot}},{key:"scenesCount",get:function(){return this._scenesCount}},{key:"sceneGroups",get:function(){var ot=[];if(this.state){var gt=Jt(this.state.group.groupsList),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ot.push(Mt.name)}}catch(kt){gt.e(kt)}finally{gt.f()}}return ot}},{key:"sceneGroupsCount",get:function(){return this._sceneGroupsCount}},{key:"setGroup",value:function(ot){var gt=this;if(!this.didZombie){this.state&&this.cleanState(this.state);var xt=ot.groupsMap,Mt=ot.groupsList,kt=ot.scenesMap,zt=ot.scenesList;xy(xt,this.onGroupsUpdate),xy(kt,this.onScenesUpdate),this._sceneGroupsCount=Mt.length,this._scenesCount=zt.length;var Ht=[(0,Iq.reaction)(function(){return Mt.length},function(rr){gt._sceneGroupsCount=rr,gt.dispatch("onScenesGroupCountUpdate",function(ur){return ur(gt,rr)})}),(0,Iq.reaction)(function(){return zt.length},function(rr){gt._scenesCount=rr,gt.dispatch("onScenesCountUpdate",function(ur){return ur(gt,rr)})})];this.state={group:ot,disposers:Ht}}}},{key:"zombie",value:function(){this.didZombie||(this.didZombie=!0,this.state&&(this.cleanState(this.state),this.state=null))}},{key:"cleanState",value:function(ot){var gt=ot.group,xt=ot.disposers,Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;zt()}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}f1(gt.groupsMap,this.onGroupsUpdate),f1(gt.scenesMap,this.onScenesUpdate),this._scenesCount=0,this._sceneGroupsCount=0}},{key:"dispose",value:function(){this.didDispose||(this.didDispose=!0,this.zombie(),this.onDispose())}}]),at})(CA),AR=ln(require$$116),Rq=ln(require$$116);function zy(yt){var ct=tr(yt);return ct!=="object"||yt===null?ct==="function"?void 0:yt:by(yt)?y1(yt):yt instanceof Array?TB(yt):(0,Rq.isObservable)(yt)?EB(yt):AB(yt)}function TB(yt){for(var ct=[],at=yt.length,ut=0;ut<at;++ut)ct[ut]=zy(yt[ut]);return ct}function EB(yt){var ct={},at=Jt((0,Rq.keys)(yt)),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ct[ot]=zy(yt[ot])}}catch(gt){at.e(gt)}finally{at.f()}return ct}function AB(yt){var ct={};for(var at in yt)ct[at]=zy(yt[at]);return ct}var AN=ln(require$$116);function Pq(yt,ct){return(0,AN.isObservable)(yt)?(0,AN.has)(yt,ct):ct in yt}function Nq(yt){return(0,AN.isObservable)(yt)?(0,AN.keys)(yt):Object.keys(yt)}function HM(yt,ct){if(tr(yt)!=tr(ct))return!1;if(tr(yt)!="object"||yt===null)return yt===ct;if(yt.constructor!==ct.constructor)return!1;if(yt.constructor===Object){var at=Jt(Nq(yt)),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;if(Pq(ct,ot)){if(!HM(yt[ot],ct[ot]))return!1}else return!1}}catch(_r){at.e(_r)}finally{at.f()}var gt=Jt(Nq(ct)),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;if(!Pq(yt,Mt))return!1}}catch(_r){gt.e(_r)}finally{gt.f()}return!0}else if(yt.constructor===Array){var kt=yt,zt=ct;if(kt.length===zt.length){for(var Ht=0;Ht<kt.length;++Ht)if(!HM(kt[Ht],zt[Ht]))return!1;return!0}else return!1}else if(tr(yt)=="object"){for(var rr in yt)if(rr in ct){if(!HM(yt[rr],ct[rr]))return!1}else return!1;for(var ur in ct)if(!(ur in yt))return!1;return!0}else return!0}var kq=(function(){function yt(ct){var at=this,ut=ct.disableMaskKey,ot=ct.useMobXMode,gt=ct.propertyGetters,xt=ct.onStateChanged;Ot(this,yt),this.didStateReady=!1,this.updatedState={},this.activeUpdateKey=null,this.updateState=function(){var Mt=at.updatedState;at._state=at.patchState(Mt),at.updatedState={},at.onStateChanged&&at.onStateChanged(Mt)},this.disableActiveCallback=ut,this.useMobXMode=ot,this.updateLimiter=new Nu(0,this.updateState),this.onStateChanged=xt,this.disposers=this.createAutoRun(gt),(0,AR.makeObservable)(this,{activeUpdate:AR.action,patchState:AR.action})}return Bt(yt,[{key:"state",get:function(){return this._state}},{key:"release",value:function(){var at=Jt(this.disposers),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot()}}catch(gt){at.e(gt)}finally{at.f()}}},{key:"activeUpdate",value:function(at,ut){try{this.activeUpdateKey=at;var ot=ut();return this._state=this.setState(at,ot),this.onStateChanged&&!this.disableActiveCallback&&this.onStateChanged(rt({},at,ot)),ot}finally{this.activeUpdateKey=null}}},{key:"createAutoRun",value:function(at){var ut=this,ot=[],gt={fireImmediately:!0},xt=function(zt){var Ht=at[zt],rr=function(_r){if(!ut.didStateReady)ut.updatedState[zt]=_r;else{var Dr=zt in ut.updatedState?ut.updatedState[zt]:ut._state[zt];ut.activeUpdateKey!==zt&&!HM(_r,Dr)&&(ut.updatedState[zt]=_r,ut.updateLimiter.invoke())}};ot.push((0,AR.reaction)(function(){return Ht()},rr,gt))};for(var Mt in at)xt(Mt);return this._state=this.createState(this.updatedState),this.updatedState={},this.didStateReady=!0,ot}},{key:"createState",value:function(at){return this.useMobXMode?(0,AR.observable)(at):Object.freeze(zy(at))}},{key:"patchState",value:function(at){if(this.useMobXMode){for(var ut in at)this._state[ut]=at[ut];return this._state}else{var ot=Qr({},this._state);for(var gt in at)ot[gt]=zy(at[gt]);return Object.freeze(ot)}}},{key:"setState",value:function(at,ut){return this.useMobXMode?(this._state[at]=ut,this._state):Object.freeze(hn(Qr({},this._state),rt({},at,zy(ut))))}}]),yt})();function _O(yt){switch(yt){case _S.Desktop:return 2.42;case _S.Phone:return 2.42;case _S.Pad:return 2.42;case _S.TV:return 2.42;default:return 1}}var tv={"arrow-down-disabled":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDMgMy0zSDB6IiBmaWxsPSIjRTdFN0U3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-down-hover":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDMgMy0zSDB6IiBmaWxsPSIjN0Q3RDdEIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-down-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDMgMy0zSDB6IiBmaWxsPSIjNUI5MDhFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-down":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDMgMy0zSDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-up-disabled":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDAgMyAzSDB6IiBmaWxsPSIjRTdFN0U3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-up-hover":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDAgMyAzSDB6IiBmaWxsPSIjN0Q3RDdEIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-up-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDAgMyAzSDB6IiBmaWxsPSIjNUI5MDhFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","arrow-up":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zIDAgMyAzSDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=","bold-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAySDhhMi41IDIuNSAwIDAgMSAwIDVINS41aDBtLTEgMGg0YTMgMyAwIDAgMSAwIDZoLTQgMG0wIDFWMiIgc3Ryb2tlPSIjMzM4MUZGIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=",bold:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAySDhhMi41IDIuNSAwIDAgMSAwIDVINS41aDBtLTEgMGg0YTMgMyAwIDAgMSAwIDZoLTQgMG0wIDFWMiIgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=",check:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIG9wYWNpdHk9Ii4wMSIgZD0iTTAgMGg4djhIMHoiLz48cGF0aCBkPSJNNy4xMjUgMS40ODRoLS41NDZhLjI0OS4yNDkgMCAwIDAtLjE5Ni4wOTZMMy4xNjIgNS42NiAxLjYxNyAzLjcwM2EuMjUuMjUgMCAwIDAtLjE5Ni0uMDk1SC44NzVhLjA2Mi4wNjIgMCAwIDAtLjA1LjFsMi4xNCAyLjcxMmEuMjUuMjUgMCAwIDAgLjM5NCAwbDMuODE1LTQuODM2YS4wNjIuMDYyIDAgMCAwLS4wNDktLjF6Ii8+PC9zdmc+",delete:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDZ2NmEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTItMlY2aDBtMS0yYTIgMiAwIDAgMSAyLTJoMmEyIDIgMCAwIDEgMiAyaDBNMyA0aDEwIiBzdHJva2U9IiM0NDRFNjAiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==",duplicate:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik0xMSAySDZhMSAxIDAgMCAwLTEgMXY4YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjRoMGwtMi0yeiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PHBhdGggZD0iTTExIDJ2MWExIDEgMCAwIDAgMSAxaDFsLTItMnoiLz48cGF0aCBkPSJNOSAxNEg0YTEgMSAwIDAgMS0xLTFWNWgwIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L2c+PC9zdmc+","eraser-cursor":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANKSURBVHgB1VTdS5NhFD/7iuXa8KNw7SK/IjBYo13soqvEITENtj9AwZiCOCTvQrNWF9rFFPGLrC1iF10Oiy68mBSUF2KB4YabhKKyTfFCc+3Lzb2ds72LsfbxCkZ04Mf7Puc5z/k95+M5AP+R8OAvCW9nZ6cyHo8/SSaTc4RQKKQ+S0JyxFtbW6va39//ZjKZmMbGRkar1TJOp5MhYtwXwBkQkgMROnyXIcmGw+FgYrHY00JkQm4cqYPCaDQ6ZrFY7i4sLPxhMDg4SJ8hTOOWRCJ5jf8npyUiEgE6eGy1Wk12u72gIZHJZDLr4eHhVnl5+YdsslL5pH1+JBIx22y2h9PT01BKpFIpLC4ufhKJRFpcxhEM6fmlSMLh8P35+XlOJCTBYBC2t7dr8fdctv+iRHjI4HK5LAMDA8BVFAoFyOVyH/6KIKsxCtVIgC188+Dg4CV2GJxGpqamYHR09AHklEWQY5d6K/gg67HD3huNRrlKpYLNzU3gIsPDw8Dn84fa29s/4zIK6Rol8xIhSUMikXB2dXXV4AHo6en5KhaLFcvLy0VJent7QaPRzKrV6le4DCEi2UTCnGgE1dXVj3Q6XY1er08drKiosK2urnbjnrFQQxBJU1PTC3y4kyxJGHEMWe2dTUSNIcLZVXl0dAStra3BiYmJOTqgVCqfu91uull3LhlFjbZv6urqiCTIElHaEsC2dq4QqXRlZeUePsrUDFtfX/eZzebbqL+GuIFks1js32OHRtHu7u5H3FMiahFViPNQYuZRO8oQVzY2NibJocFgYAKBgLuzs/M66hsQKuzELx0dHak9rKe3paXlFurrERdZEiGUGARkcAFxmSJAJ/aRkRGGnOKwdPn9/rG9vT0HXaC5uZnxer3+vr4+HdpeRVxClBWLJFuZqhF7gAjL0PGz8fFxvcfjSY0WevVUv5mZmQDWyog1/I52PyBdlxgUqUu+qMSQznVtW1ubBlP3dmlpicnA5/N5+vv770C6bhS9lEu6eHnWFP45NioJS5xxRLdNsrenKH5CusNOWH1BEeTRMTnI6MgZpYYeYhhOmS5eEX0mMhELPktGoBd/zCWSUkTAOs4QZqZ8JsokS8Kp8KWICtlwdv5P5BchBHaEIRURoQAAAABJRU5ErkJggg==","eraser-cursor@2x":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAgrSURBVHgB7ZprTBRXFIDP7gIt8lQppTwE5V0KaAn6o1pqNGkDDTEmTUhsgKRp+gNJw68CFkLbVC2QkDS+gD8KJdWmARvbFBNNWpuIRGPFWBXQRMPDqIki+KLATs+ZnTvcvXtnX8w2beJJToaduTP3fHPOPffcOwC8kP+2WCDwIvahGFxTuN8KmNSZmULPNjLeqF9F8rdPkIEGEn+r+vjx46LQ0NA8/Dsader58+e/h4WFDWntFO7ot6fMFAt3JLWi2lCDpqamCux2+2+KROj82NhYGrXT2lu5Z/DP/deFByElA4Pv3LlTiHY/nJ6eVnbv3q1s2bJFyc7OVrZu3arU1dUp4+PjxPUQoT+g9tp9PkMFgpo9kxljHRoaWp2Xl3duYmIiurKyEvDoclNCQgIcPnxYPc7MzHwcGRnZhaft4Ag7O9fUbRhaITCie4lgcnNzT7qDIaHz27dvh+vXr0NEREQneqoCHKFnAR+8ZCaQGGq2CxcurCGYycnJZHcwTNAzUFFRoUJFRUV1IFQ5OKBsXB9uxSwgl0TQ3d29Yt26dccwoyVXV1d7hGEiQmGi2AzOUHx/hob4K2yuYS9G987s7OwPISEh7xPM6dOnwVfBsIMjR45AZmbmo5s3b76Xnp7+J55egMVxBSAZT0v1ED+76yn66dOnLQSzd+9ev2BIyFP0MjBco1JTU/sxfFeDazp3cYgZHmKqdoaGNISHh9fv378fSJcqlPV6e3sBJ+I/goOD34VFL0k95Y+HxPHCYGxmw5DQ2NuzZw8EBQVtunXr1jvgwUP+hhz/QDXMMCNVE8zx48dNg2FCz6QQjI2N/RA8VBFmANnu3btXihnpG8pM9fX1EAi5du0aeWkVOAMBCF7yN+R0z4yOjq6NiYlpp9CgdBtIwXpPH6vgDKWLt0CygtM6MDCwBuUYZSKaOCksAiVY9wFOBePgDOOytPAGSKzNVCCC2bBhw69YdK7ypgpYimzbtk2dl7CM+hFcveOUHDylbTFO1YdhFbByx44dA1QFUP0VSJj4+Hjo6+sDq9U6iEmHKvFZTedQ50GYbN15SITVlwNlZWUnLRZL8s6dOwMOQ9UCTtKTra2ttdppt9V2kMF5cbmsjxuM43bMNrmUzc6fP6+GQiDGDoOJi4ubwb4qm5ubafyIE6nLxGqTPEsGo1cBOGNX0TyDYafC0CyOaxcVziyh53Z2dkJycvLMvn37PmpoaBgFR4jxYSbWdVIgI89Iq4CjR48CZjlYv369+tssqI6ODsjPz4f+/v668vLycxrEHHfkYdwC8SB6mGEV8Cl64cuuri5oa2tTG+EyGjZu3AiXLl1qefDgwV8lJSUFZkDV1tZCcXExXLx4sbWoqKgPFj0zx8GI9ZwO5W4M6ekZYeqpaqbqmaSqqkpNpcPDw4dwzfM9nrLduHEjEs+X0XV/Sx96LnqE1kLtBQUF3eDwCO8dGQyzV5rl+JyuegfXI29jRotiRlKnpFghHMzKyjqotVXS0tLacKPjF3bdHxjSq1evduAkepAD+ZsDYlC8V5w8ZBVg+PPq2MGMlkInqE4joTf45MmT4YyMjAPcA+ltLSQlJX2BafxnX6HI29QeK44TOTk57mCYZ0QoJ8OBM4yB6dkNkwGlSygsLFQvYtYB3BTMxFL+M+0eFgZqp4mJiU2+QKGX1fGIk/QIrn0aYXGsyDxjmAyMhO2jhaCGoUbX1NSkLSwsPMJqV8Fspu6lIZS6OYhjiOLwdU7fQM1HfRPD7wS1obZ0j0xpb4726Z49ezaJf2/S7s9ATUGNR41BjdJseRnke3WGwhrRTS9pD1mOGoeG15BxOOfoxuCkp0Ih6NeaEaSZGlieJyiCoc1FgsGldokGk8nBvAKOrWIGQ5uPsm0tt0BWDiicAaGuGhkZ+YqMw9StGzU4OKhCnT179hNsswY1FTXdE5QEJhc1S3tGogazXLOBwQSBl3tzIhQPtAL1VQJCTcNx8y1vHIUghSKFZE9PT7H2dlM1b+Wgrr1y5Uq77J75+fnplpaWMg2ch4nlYEI5z7hdensDpI4hrYNErcMMXJ32koG4ztf3pultz83NjWG99Ra2WQ0OL2VjZjwgeufUqVOqV8+cOdPIwdBLSNJeHg8TAh5WqJ6EfSmgt7IMNRJ1JThiOlnrOAMHshprmMKdoGSCpb9s3B3SYLIFGIqICJB7xisYi+RvfiypXw40DWGdlJaWRmMd141hk8V2OWm7ieYTXhBc3+BgaZyqAISjOYxSMVvXsBTNlzdiNQDgRao2AtK3pjggpmrqbGpqSsLPIN/dv38/gaBwUjTshMHcvn27JyUlpRmc5xpPMD599LIYnLNyUKKndKjGxsakXbt2deMCLIE8IVvs0YRM1fjdu3d/wrXN5+BcnzEgvor2uN3rjzAYMp5lPEoQlE5fA0fWo8GfhlCbKVFQ1pKNIfzcOHH58mWqaimVUwJI0+6n59D4pIlzmdZPMPiZzXjDjX47Le5g0Uu8x2zgPqWyKpjVe7x3+AUbq9NYjQbgp2dsBud5o8TP7d5kHAWcQchQfoEmLgn8HjOiBIF7o5hI1x6CEbLNP3bdqYAF44JzyWLzcN1i8DcT/o3awbm8Fz3DAy2A62INwPV/E3wWdx5inmBHuwChCBD6R2JwHge80TIQRQLjt7e8DTkGZgfX8cUMZTDAteFDkveaIlzjX9ySQs8X18r2t2VHUURPKoICmDR+eCO9aSdmOIub3/w9RgpgUpiJhvraXpa6jZKHGEqyusw0GLFzX+5RhN/8kYnMSNMMfyH/V/kHST6OYVElTPAAAAAASUVORK5CYII=","font-colors-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQgMTEgNC05IDQgOU02IDdoNCIgc3Ryb2tlPSIjMzM4MUZGIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=","font-colors":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQgMTEgNC05IDQgOU02IDdoNCIgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=","font-size-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIgMmg4TTYgMnYxMm02LTZ2Nm0tMi02aDQiIHN0cm9rZT0iIzMzODFGRiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","font-size":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIgMmg4TTYgMnYxMm02LTZ2Nm0tMi02aDQiIHN0cm9rZT0iIzQ0NEU2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","hand-grasp":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTExLjcyIDE0LjM0NEg0Ljk3OGMtLjUxMyAwLS45MzEtLjQ3My0uOTMxLTEuMDU1IDAtLjQ0Mi0uMS0uNzQ0LS4zMzQtMS4wMUwuNDQ2IDguNzQxLjQ0NCA4Ljc0QTEuNzkgMS43OSAwIDAgMSAwIDcuNTU0VjQuODc4QzAgMy45OC42NDUgMy4yNSAxLjQzNyAzLjI1Yy4zOTQgMCAuNzU5LjE3NiAxLjAyOC40OTUuMDkyLjExLjE3LjIzMS4yMzIuMzYzVjIuMjAyYzAtLjg5OC42NDUtMS42MjggMS40MzctMS42MjguNTcgMCAxLjA1NC4zNjcgMS4yODcuOTEzLjA1OC0uMzYuMjEtLjY5Mi40NDMtLjk1NUExLjUwNiAxLjUwNiAwIDAgMSA3IDBhLjguOCAwIDAgMSAuMTc0LjAxNWMuNjMyLjA4IDEuMTQyLjU3OSAxLjM0MSAxLjI1LjItLjYyNi43My0xLjA3NCAxLjM1LTEuMDc0LjEgMCAuMTkzLjAxMy4yOC4wMjdsLjAxNS4wMDNjLjY2Mi4xNTYgMS4xNDMuODQzIDEuMTQzIDEuNjM1di4zM2MuMjQ0LS41MDQuNzE3LS44NDggMS4yNi0uODQ4LjM5NCAwIC43NTkuMTc2IDEuMDI4LjQ5NC4yNjQuMzEyLjQwOS43MjguNDA5IDEuMTd2Mi45NGMwIC4zNTItLjAzOC42ODYtLjExNC45OTNsLTEuMTM4IDUuMjEtLjAwMS4wMDRhMy41MyAzLjUzIDAgMCAwLS4wOTYuODQxdi4yOTljMCAuNTgyLS40MTcgMS4wNTUtLjkzIDEuMDU1eiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Im0xLjAyNCA4LjM5OSAzLjE1MiAzLjQxMi4wMDIuMDAyYy4zMi4zNjMuNDY4LjguNDY4IDEuMzc0IDAgLjI0OC4xODUuNDU3LjQwNC40NTdoNi41MDdjLjIxOCAwIC40MDMtLjIxLjQwMy0uNDU3VjEyLjljMC0uMzQuMDM3LS42NjIuMTEtLjk1OWwxLjA5OC01LjAyNlY2LjkxYTMuMzcgMy4zNyAwIDAgMCAuMDkzLS44MTJWMy4yNjJjMC0uNTg2LS4zOTEtMS4wNDUtLjg5MS0xLjA0NS0uNDkyIDAtLjg5MS40NTMtLjg5MSAxLjAxdi42NWgtLjgyVjIuMTU1YzAtLjQ5Ni0uMjk1LS45MjYtLjcwMS0xLjAyNS0uMDY2LS4wMS0uMTMtLjAyLS4xOTEtLjAyLS40OTEgMC0uODkxLjQ1My0uODkxIDEuMDF2MS43NTdoLS44MlYyLjE5YzAtLjY1MS0uNDA4LTEuMTktLjk0OC0xLjI1NEw3LjA5Ni45MzQgNy4wODUuOTMyYy0uMDI3LS4wMDYtLjA1LS4wMDYtLjA4My0uMDA2LS41ODEgMC0xLjA1NC41MzYtMS4wNTQgMS4xOTV2MS43NTZoLS44MlYyLjUyNGMwLS41ODYtLjM5Mi0xLjA0NC0uODkxLTEuMDQ0LS40OTIgMC0uODkyLjQ1My0uODkyIDEuMDF2NS41OTJsLS44Mi0uODcyVjUuMTA2YzAtLjU4Ni0uMzkxLTEuMDQ1LS44OS0xLjA0NS0uNDkzIDAtLjg5Mi40NTMtLjg5MiAxLjAxdjIuNTgzYzAgLjI3NC4xLjUzOC4yOC43NDV6IiBmaWxsPSIjRkZGIi8+PHBhdGggZD0iTTUuNTY2IDYuMDgydjQuNjM2YzAgLjE5LjIyMy4zNDQuNS4zNDQuMjc2IDAgLjUtLjE1NC41LS4zNDRWNi4wODJjMC0uMTktLjIyNC0uMzQ0LS41LS4zNDQtLjI3NyAwLS41LjE1NC0uNS4zNDR6bTIuMTggMHY0LjYzNmMwIC4xOS4yMjQuMzQ0LjUuMzQ0cy41LS4xNTQuNS0uMzQ0VjYuMDgyYzAtLjE5LS4yMjQtLjM0NC0uNS0uMzQ0cy0uNS4xNTQtLjUuMzQ0em0yLjE4IDB2NC42MzZjMCAuMTkuMjI0LjM0NC41LjM0NHMuNS0uMTU0LjUtLjM0NFY2LjA4MmMwLS4xOS0uMjI0LS4zNDQtLjUtLjM0NHMtLjUuMTU0LS41LjM0NHoiIGZpbGw9IiMwMDAiLz48L2c+PC9zdmc+","hand-loosen":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTkuMTU0IDBBMS4yMjYgMS4yMjYgMCAwIDAgOC4xMS42MDdjLS4yMDguMzQ4LS4yOTUuNzY4LS4zNDUgMS4yMzItLjEuOTI5LS4wMjUgMi4wNTgtLjAxNCAzLjA0Ni4wMDcuNTEyLjAwNCAxLjA0MS0uMDAxIDEuNTQ3YTYzLjMxIDYzLjMxIDAgMCAxLS4zNS0uOXYtLjAwM2wtLjAwMS0uMDAxYy0uMzU5LS45MjYtLjY5Mi0xLjg3LTEuMTUtMi41NjItLjIzLS4zNDYtLjQ5Ni0uNjQtLjg1LS44MDctLjM1Ni0uMTY2LS43OTItLjE2NS0xLjIwNC4wMmwtLjAwMy4wMDEtLjAwNC4wMDJjLS40LjE4Ny0uNjUuNTYzLS43MjIuOTU4LS4wNzQuMzk0LS4wMTkuODEyLjA4MiAxLjI2Mi4yMDMuOS42MTMgMS45NC44OTIgMi45Ny4yMi44MTMuNDM0IDEuNjMyLjYxMyAyLjMyMmExMy44NTUgMTMuODU1IDAgMCAwLS44NzQtLjgxNmMtLjU0My0uNDYyLTEuMTQtLjg4OS0xLjc1Ny0xLjExOS0uNjE2LS4yMy0xLjMyMy0uMjQ0LTEuODQ1LjIxOGwtLjAwNC4wMDQtLjAwNC4wMDRjLS40MS4zODQtLjYxNC44Ni0uNTYgMS4zMjMuMDUzLjQ2NC4zMDcuODcxLjY0MiAxLjI5LjY2OS44MzYgMS43MiAxLjc1MSAyLjczNCAyLjk2OCAxLjEzNSAxLjM2MiAyLjM3MiAzLjUzOCAzLjI1MSA0LjY4MWwuMTE4LjE1M2g3LjcwNGwuMDg2LS4yNzRjLjE1LS40ODIuMzE4LTEuNDQyLjU4Ny0yLjY0Mi4yNjgtMS4yLjYyNy0yLjYxIDEuMTA0LTMuODQ3LjYzNS0xLjY0NiAxLjI4NS0zLjE5NCAxLjU3Ny00LjQyMy4xNDctLjYxNC4yMTQtMS4xNTEuMDk1LTEuNjI2YTEuMzA2IDEuMzA2IDAgMCAwLTEuMDQ4LS45NmMtLjQ2Ny0uMDg4LS45MS4xMi0xLjIyLjQzNC0uMzEuMzE2LS41NDYuNzM2LS43NjUgMS4yMDctLjE3LjM2NS0uMzI3Ljc2NS0uNDgxIDEuMTY2bC0uMDEtMS43MzRjLS4wMDQtMS4wMDcuMDU5LTIuMTM2LS4wMTctMy4wNDQtLjAzOC0uNDU1LS4xMDMtLjg1NS0uMjcyLTEuMTkxLS4xNjUtLjMyNy0uNTI0LS42LS45MjUtLjU4NWExLjE4IDEuMTggMCAwIDAtLjk2OS40NmMtLjIyMy4yODUtLjM1NC42MzYtLjQ1OSAxLjAyMy0uMjEuNzczLS4zMDIgMS43MDktLjQ0MyAyLjQ4bC0uMTk1IDEuMDkyYTQ1Ljg3NCA0NS44NzQgMCAwIDEtLjEzNi0xLjE4N2MtLjA5NC0uOTM3LS4xNi0yLjA1NS0uMzU2LTIuOTctLjA5Ny0uNDU3LS4yMjItLjg2Ni0uNDM1LTEuMTk5LS4yMTQtLjMzMi0uNTgyLS41OTctMS4wMS0uNTc5aC4wM0w5LjE1NSAweiIgZmlsbD0iIzAwMCIvPjxwYXRoIGQ9Ik05LjE1Ljc4NGguMDQ5Yy4xMzItLjAwNS4xOTUuMDMuMzE3LjIyLjEyMy4xOTIuMjQxLjUyOC4zMjkuOTM5LjE3NS44Mi4yNDUgMS45MjQuMzQyIDIuODg0LjIxMiAyLjEwOC41MTQgMy42MzUuNTE0IDMuNjM1bC43Ny0uMDEzcy4yODctMS43NjMuNTk4LTMuNDYzYy4xNS0uODIuMjQ3LTEuNzQ2LjQyOS0yLjQxNy4wOS0uMzM1LjIwNy0uNi4zMTktLjc0My4xMTItLjE0Mi4xNjktLjE3NC4zMTktLjE2M2wuMDMuMDAyLjAyOC0uMDAyYy4xMi0uMDA5LjExNi0uMDEuMi4xNTYuMDg0LjE2Ny4xNTcuNDk1LjE5MS45MDMuMDY4LjgxNS4wMSAxLjk0Mi4wMTUgMi45ODNsLjAxOSAzLjcwNS43NDUuMTY4Yy40NTUtLjk0OC44MTktMi4xMTIgMS4yMjEtMi45NzguMjAxLS40MzMuNDE1LS43ODcuNjEzLS45ODguMTk3LS4yLjMyMy0uMjUuNTE2LS4yMTNoLjAwNGwuMDA1LjAwMmMuMjk5LjA1MS4zNi4xMjcuNDI0LjM3OC4wNjMuMjUuMDM1LjY5Ny0uMDk3IDEuMjU0LS4yNjUgMS4xMTUtLjkwNyAyLjY2NC0xLjU0NiA0LjMyMi0uNTAyIDEuMy0uODY2IDIuNzQtMS4xMzggMy45NTctLjIyLjk4My0uMzg3IDEuODM0LS40OTkgMi4zMDRINy4xNDRjLS44MDItMS4wOS0xLjk5Ny0zLjE2LTMuMTU3LTQuNTUyLTEuMDYtMS4yNzEtMi4xMzYtMi4yMi0yLjcyNC0yLjk1Ni0uMjk0LS4zNjgtLjQ1LS42NzMtLjQ3Ni0uODktLjAyNS0uMjE1LjAyNi0uMzg2LjMxMi0uNjU2LjI3LS4yMzcuNTgyLS4yNDMgMS4wNDktLjA2OS40NjcuMTc1IDEuMDE4LjU1MiAxLjUyNC45ODJhMTUuODggMTUuODggMCAwIDEgMS44NDcgMS45MDRsLjY4Ny0uMzRzLS41MDQtMi4wMS0xLjAxLTMuODcyQzQuOTAzIDYuMDggNC40OTQgNS4wMyA0LjMxNCA0LjIzYy0uMDktLjQtLjExNi0uNzMzLS4wNzctLjk0Ny4wNC0uMjEzLjA5Ny0uMzAyLjI4My0uMzkuMjQ4LS4xMS4zODgtLjA5OC41NDctLjAyNC4xNTkuMDc0LjM0NC4yNTEuNTI5LjUzLjM2OC41NTcuNzEgMS40NzYgMS4wNzMgMi40MTJsLS4wMDItLjAwNGMuMzcuOTgzIDEuMDc4IDIuNzE0IDEuMDc4IDIuNzE0bC43NTUtLjEzN3MuMDU1LTEuOTEuMDM2LTMuNTA5Yy0uMDEyLTEuMDE4LS4wNzgtMi4xMzYuMDEtMi45NTIuMDQzLS40MDguMTMxLS43MzUuMjM4LS45MTUuMTA3LS4xNzkuMTctLjIyNS4zNjctLjIyNHoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNNy43MjMgMTAuOHY0LjY5MmMwIC4xOTIuMjIzLjM0OC41LjM0OC4yNzYgMCAuNS0uMTU2LjUtLjM0OFYxMC44YzAtLjE5Mi0uMjI0LS4zNDgtLjUtLjM0OC0uMjc3IDAtLjUuMTU2LS41LjM0OHptMi4yMDYgMHY0LjY5MmMwIC4xOTIuMjI0LjM0OC41LjM0OHMuNS0uMTU2LjUtLjM0OFYxMC44YzAtLjE5Mi0uMjI0LS4zNDgtLjUtLjM0OHMtLjUuMTU2LS41LjM0OHptMi4yMDYgMHY0LjY5MmMwIC4xOTIuMjI0LjM0OC41LjM0OC4yNzcgMCAuNS0uMTU2LjUtLjM0OFYxMC44YzAtLjE5Mi0uMjIzLS4zNDgtLjUtLjM0OC0uMjc2IDAtLjUuMTU2LS41LjM0OHoiIGZpbGw9IiMwMDAiLz48L2c+PC9zdmc+","italic-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQgOSAyTTUgMTRoNE03IDJoNCIgc3Ryb2tlPSIjMzM4MUZGIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=",italic:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQgOSAyTTUgMTRoNE03IDJoNCIgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=","laser-pointer-cursor":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGZpbHRlciB4PSItMTIwJSIgeT0iLTEyMCUiIHdpZHRoPSIzNDAlIiBoZWlnaHQ9IjM0MCUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImEiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjQiIGluPSJTb3VyY2VHcmFwaGljIi8+PC9maWx0ZXI+PC9kZWZzPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDkgOSkiIGZpbGw9IiNGRjAxMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGNpcmNsZSBmaWx0ZXI9InVybCgjYSkiIGN4PSI1IiBjeT0iNSIgcj0iNSIvPjxwYXRoIGQ9Ik01IDhhMyAzIDAgMSAwIDAtNiAzIDMgMCAwIDAgMCA2em0wLTEuNzE0YTEuMjg2IDEuMjg2IDAgMSAxIDAtMi41NzIgMS4yODYgMS4yODYgMCAwIDEgMCAyLjU3MnoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=","layer-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE2IDEwLTYgNCA2IDQgNi00em0tNiA4IDYgNCA2LTQiIHN0cm9rZT0iIzMzODFGRiIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+",layer:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTE2IDEwLTYgNCA2IDQgNi00em0tNiA4IDYgNCA2LTQiIHN0cm9rZT0iIzQ0NEU2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","line-through-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgOGg4bS0xLTNhMyAzIDAgMCAwLTMtM2gtLjkzOEEyLjY0IDIuNjQgMCAwIDAgNC41IDRhMi41NyAyLjU3IDAgMCAwIDEuMzQ0IDIuOTIybDQuMzEyIDIuMTU2QTIuNTcgMi41NyAwIDAgMSAxMS41IDEyYTIuNjQgMi42NCAwIDAgMS0yLjU2MiAySDdhMyAzIDAgMCAxLTMtM2gwIiBzdHJva2U9IiMzMzgxRkYiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==","line-through":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgOGg4bS0xLTNhMyAzIDAgMCAwLTMtM2gtLjkzOEEyLjY0IDIuNjQgMCAwIDAgNC41IDRhMi41NyAyLjU3IDAgMCAwIDEuMzQ0IDIuOTIybDQuMzEyIDIuMTU2QTIuNTcgMi41NyAwIDAgMSAxMS41IDEyYTIuNjQgMi42NCAwIDAgMS0yLjU2MiAySDdhMyAzIDAgMCAxLTMtM2gwIiBzdHJva2U9IiM0NDRFNjAiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==","lock-hover":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgb3BhY2l0eT0iLjAxIiBkPSJNMCAwaDE2djE2SDB6Ii8+PHBhdGggZD0iTTEzIDcuMjVoLTEuMDYzdi0zLjVhMiAyIDAgMCAwLTItMkg2LjA2M2EyIDIgMCAwIDAtMiAydjMuNUgzYS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWgxMGEuNS41IDAgMCAwIC41LS41di02YS41LjUgMCAwIDAtLjUtLjV6bS00LjU2MyAzLjcwM3YuODI4YS4xMjUuMTI1IDAgMCAxLS4xMjQuMTI1aC0uNjI2YS4xMjUuMTI1IDAgMCAxLS4xMjUtLjEyNXYtLjgyOEEuNzQ5Ljc0OSAwIDAgMSA4IDkuNTkzYS43NS43NSAwIDAgMSAuNDM4IDEuMzZ6bTIuMzc2LTMuNzAzSDUuMTg2di0zLjVjMC0uNDgzLjM5My0uODc1Ljg3NS0uODc1aDMuODc1Yy40ODMgMCAuODc2LjM5Mi44NzYuODc1djMuNXoiIGZpbGw9IiM3RDdEN0QiLz48L2c+PC9zdmc+","lock-new-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiM0NDRFNjAiIGN4PSIxNiIgY3k9IjE3IiByPSIxIi8+PHJlY3Qgc3Ryb2tlPSIjNDQ0RTYwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHg9IjExIiB5PSIxNCIgd2lkdGg9IjEwIiBoZWlnaHQ9IjgiIHJ4PSIyIi8+PHBhdGggZD0iTTEzIDE0di0zYTMgMyAwIDAgMSA2IDB2MWgwbS0zIDV2MyIgc3Ryb2tlPSIjNDQ0RTYwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L2c+PC9zdmc+","lock-new":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiM0NDRFNjAiIGN4PSIxNiIgY3k9IjE3IiByPSIxIi8+PHJlY3Qgc3Ryb2tlPSIjNDQ0RTYwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHg9IjExIiB5PSIxNCIgd2lkdGg9IjEwIiBoZWlnaHQ9IjgiIHJ4PSIyIi8+PHBhdGggZD0iTTEzIDE0di0zYTMgMyAwIDAgMSA2IDB2MWgwbS0zIDV2MyIgc3Ryb2tlPSIjNDQ0RTYwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L2c+PC9zdmc+","lock-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgb3BhY2l0eT0iLjAxIiBkPSJNMCAwaDE2djE2SDB6Ii8+PHBhdGggZD0iTTEzIDcuMjVoLTEuMDYzdi0zLjVhMiAyIDAgMCAwLTItMkg2LjA2M2EyIDIgMCAwIDAtMiAydjMuNUgzYS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWgxMGEuNS41IDAgMCAwIC41LS41di02YS41LjUgMCAwIDAtLjUtLjV6bS00LjU2MyAzLjcwM3YuODI4YS4xMjUuMTI1IDAgMCAxLS4xMjQuMTI1aC0uNjI2YS4xMjUuMTI1IDAgMCAxLS4xMjUtLjEyNXYtLjgyOEEuNzQ5Ljc0OSAwIDAgMSA4IDkuNTkzYS43NS43NSAwIDAgMSAuNDM4IDEuMzZ6bTIuMzc2LTMuNzAzSDUuMTg2di0zLjVjMC0uNDgzLjM5My0uODc1Ljg3NS0uODc1aDMuODc1Yy40ODMgMCAuODc2LjM5Mi44NzYuODc1djMuNXoiIGZpbGw9IiM1QjkwOEUiLz48L2c+PC9zdmc+",lock:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggb3BhY2l0eT0iLjAxIiBkPSJNMCAwaDE2djE2SDB6Ii8+PHBhdGggZD0iTTEzIDcuMjVoLTEuMDYzdi0zLjVhMiAyIDAgMCAwLTItMkg2LjA2M2EyIDIgMCAwIDAtMiAydjMuNUgzYS41LjUgMCAwIDAtLjUuNXY2YS41LjUgMCAwIDAgLjUuNWgxMGEuNS41IDAgMCAwIC41LS41di02YS41LjUgMCAwIDAtLjUtLjV6bS00LjU2MyAzLjcwM3YuODI4YS4xMjUuMTI1IDAgMCAxLS4xMjQuMTI1aC0uNjI2YS4xMjUuMTI1IDAgMCAxLS4xMjUtLjEyNXYtLjgyOEEuNzQ5Ljc0OSAwIDAgMSA4IDkuNTkzYS43NS43NSAwIDAgMSAuNDM4IDEuMzZ6bTIuMzc2LTMuNzAzSDUuMTg2di0zLjVjMC0uNDgzLjM5My0uODc1Ljg3NS0uODc1aDMuODc1Yy40ODMgMCAuODc2LjM5Mi44NzYuODc1djMuNXoiLz48L3N2Zz4=","pencil-cursor":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ2SURBVHgB7ZXPqxJRFMfvjI4F+cqkTcrjge9B+B+0LJQ27lq4ijZprly6DaF1COKPjYRrVy0CF/aof6Baa6ChOPkLFcdMm1+dM93RafzxZuptgnfgC3ecO+dzz497JOTKNsZMp9OAoihvZFku4xp/I5dsbL/fP221Wl/D4bCKwnWn0znDd+SSDE/N6ZBgMKjJBNuKzC4dHTgQ5PF4bququn7R7XZJPB4/kSTpHcBOiQlmJ6cMpCvAcdz5ZDJhF4tF1u12v4jFYkc8z683+f1+Uq1W38K+x/AogVQ7ETF4SnB+Ho1GTxKJxDFC2u32q1KpJPh8vvVGjHK5XM4xahv+tYgRcranJrNarfay2WwKoVBIRTUajW42m70P390EOYmFrOEGdhfECEMIwur1Og+p5VOp1CP47piCOB3EXBBJAIuLRcZi7zKsSaVSEbxe70N4FEEL0AyE6VuBZEJD2wmyAkHDmoxGIwGW36ljBP2gUEXf5/wXCDZBsVjky+XyUwpCyBL0k0ai7gNp3WUVUigUvgHoWSaTaRoi2YJojk1r52q1eh2JRJ5YgUB3Pc/n83WyXRPV/A1rWrtgSAZsQL6Q3ynTI1F2QdCMqXNQEGsDMqMgrMt6ChwCaXcGYdBFjA3InELkQxBCtkcEI4riHyPFCMnlcnEKMbYzQhRi0TCKa6A76XT6wWAweD8ejz8Oh8PPcEc+9Xq9D8lkMgLv74Hugo5ALmJzlumG4+IG6BZ1dJ06wtPqN14gmza2FYljD1SljrCTsAaYpjnZFP7CmpADEel/ai4qffLiqSUKFSlEP8xfgYwwlmzyr1KYHoUtgBU4Y9D/Y78AxCeE/aWoyrkAAAAASUVORK5CYII=","pencil-cursor@2x":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYISURBVHgB7ZpNSCtXFIBPEuvz+dMGpYUKD/sWFX+Qti6kK7Hqpm6e9q0rIoIUFUShPLV10VZx4+JZqa9v20LBhdq9fyBUCtKNPH8qYl2IOw3G38Rkek4y15y5uTOZJDOWggcOSSYzN/ebc+45554JwIM8iBCPyTEP+86T4vyMfsRN4b+nQTKIJp0vzuGvlpID7os8EQNEIBD4oKio6Bm9DwaDv/v9/n/076JgbtWUYPchwrW8qD7UnOvr6wFNkpubm+/wu7f0c7y6mrnlvQufxB0Iau7V1dX3BDA/P6/V1dVpzc3N2uLiIofK1c8VYHys/wRKBUN3/hGHqaysNOjc3FwMis6hc0FtLTHuvYLxCCZgci8uLn4wg5Gh6Fy8Jk+/NkcCAlAAuUkoW4g0B+d5tLS05O/r67O8eGxsDNra2uDy8nKsoKCAwCIQDxQa0yTxgrvCYXyTk5Ml+Orf2dlJeeHIyAigFSE/P38ELfUNqNdSkjgF5FF89jL1TU1NlQwODl5gZPujp6cHWltbUw7Koc7Pz8mkZpHPFeFrJuZeqLnoMoPoZqe0JjDP/IZgnyLUG/o8NDRkuo5Ua2pjY6MC4oFCFf1cA0oKzRSOp6enRfTaGh0d/QxBt+1CUVgnOTs7+xrHfQzGyOcKkK3QTJMnQffZ6e/v/xwttmsHqqmpKXbdycnJCxy7ABLh3FEgVZ6hZJhnFZoFFMF0d3c/w7v+dyookXBnZ2c/xvHfhriVcvXfdBRItsxjnOhYqjwjoAimq6vrCysoGofk+Ph4Esd/F/UdiFtJAGUd2DygTpp5dmBUUJ2dnc9VUALm8PDwJY7/BPU9VD8k3M4RC6kskxZMKigKIMLN9vf3p3H8DyWgfEhEOwOQD9IXOTz7EObbwsLC4YWFBRgeHrY9ECXYo6MjaGlpKWlsbPxkYGDgRW1tbSEWquVlZWXBzc3Nl1VVVa8hXiXc6ioqBqGaPDk7AACJTRZ3NS9lcUp86cJwoSQ7Pj4Op6enfxUXF3/V0NCQv7q6GsCvwrqGUG/01xAD4+VQTOxaSF43d5bBOisrGBJRCtXX17+/trb268rKSgASFgmz97KFkmo6OztWuVyPweiWGc4WRkhFRQVEIpHg8vJyQAIQVlLBROVxvBYQHsXnO8tk62ZcyN0wecLBwcEvYHSzEPscBqOLCRhLC4n9uqaA8UAWAcAKhtbQ3t7eTHl5+Y9gtAp3twhT056CDMQ7MRzIFTeTYKb1yYYVQFH9VdzsqNmYKpfTJBDX3Ixgdnd3XyHMT2AMALJlBBSPaMpNngrIsTyTCgaj288YDGakictrxizvKFNOjgSSBLS+vv6UYHDb7DgMVgsChjTEgCIKGG4ZU+EWkgNBzN1qamq+pAMTExPgFMzW1tZrhHkFyWE5KxgSszx0527RaDRmOSpRshEOU11dPQPG8CwHARHJlMnTSrwSRFIlfXt7m3V5ngJGuJtqzaQtZkFBVNJezN5ZAdmwjKo2k9tVtrcI3OXk4tPgcg7ChCDZ1URgMOu72Xa5VFHOkymQhWVU60YVmjN6wiC7k6p+S1syCACOwJBYFaexV+yhBekNPsMBO6KAEeE4BMaCU67RsoYhSbXgaT//ht709vZCaWmp6YkEbLFmVJWzas04+iBL7EKpm0J7duqu0B7+CTUpNJuyvb1NCfMj1CqI9wLKUOlOUMeG+gGFkHii4HizUF4z/KFUrPsJ8WbEIyx7nnZ0dDynME6BAuce09iFHo+GrnmGltltb2//E4wVAN82y7vOjKOZXSBhJdHNiT3TYWD8OY2PTUJkdd7MkJMnT5wZVQF2RFX6yBMUdzPMvvfqxz3sXHF+GNT9ANXit/10O1sgHkZvdQAOKvs9B5L7ARELGAAXLSTvM8QExTE+YbHe+HURhZp1aRyF4CJXClbbWwGketgkW9VsY+YaiBCVhfgE+XvxRwgZSM4jUVCDZFQ9pytmXR8hUTB2gnidx4XffVWydN0yQjwmx/jkAZJBrIBI5J7ZvQGZWUgVSuU/EqmOAzicKNMVu816DdRWUV1/7xAP8n+SfwF3Du3NF2sYhwAAAABJRU5ErkJggg==","pencil-eraser-1":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3QgeD0iLjUiIHk9Ii41IiB3aWR0aD0iMTciIGhlaWdodD0iMjUiIHJ4PSIzLjUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjM1IiBzdHJva2U9IiNmZmYiLz48L3N2Zz4=","pencil-eraser-2":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMzQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3QgeD0iLjUiIHk9Ii41IiB3aWR0aD0iMjUiIGhlaWdodD0iMzMiIHJ4PSIzLjUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjM1IiBzdHJva2U9IiNmZmYiLz48L3N2Zz4=","pencil-eraser-3":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iNTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3QgeD0iLjUiIHk9Ii41IiB3aWR0aD0iMzMiIGhlaWdodD0iNDkiIHJ4PSIzLjUiIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjM1IiBzdHJva2U9IiNmZmYiLz48L3N2Zz4=",rotate:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgc3Ryb2tlPSIjNDQ0RTYwIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTEzIDZhNiA2IDAgMSAxLTMuNzA5IDEuMjgzIi8+PHBhdGggZD0ibTEzIDYgMS40MTQgMi40NUwxMyA2bDIuNDUtMS40MTQiLz48L2c+PC9zdmc+","rotation-button":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBvcGFjaXR5PSIuMDEiIGQ9Ik0wIDI0VjBoMjR2MjR6Ii8+PHBhdGggZD0iTTUuNzI0IDUuNzI0QTguODQ3IDguODQ3IDAgMCAxIDEyIDMuMTI1YzIuMjcxIDAgNC41NDMuODY2IDYuMjc2IDIuNmE4Ljg0NiA4Ljg0NiAwIDAgMSAyLjU5OCA2LjE0IDguODQ5IDguODQ5IDAgMCAxLTIuNTU5IDYuMzdsLTEuNS0uOTgzQTcuMTA1IDcuMTA1IDAgMCAwIDE5LjEyNSAxMmE3LjEwMyA3LjEwMyAwIDAgMC0yLjA4Ny01LjAzOEE3LjEwMyA3LjEwMyAwIDAgMCAxMiA0Ljg3NWE3LjEwMyA3LjEwMyAwIDAgMC01LjAzOCAyLjA4NyA3LjEwMSA3LjEwMSAwIDAgMC0yLjA4NiA0LjkyIDcuMTAzIDcuMTAzIDAgMCAwIDEuNzY2IDQuODE1bDEuOTQ1LTEuNTg0IDIuMzk0IDcuMTgyLTcuMjIyLTIuNDA4IDEuNzkxLTEuNzlBOC44NDYgOC44NDYgMCAwIDEgMy4xMjUgMTJjMC0yLjI3MS44NjYtNC41NDMgMi42LTYuMjc2eiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9Ii41IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+",rotation:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjRkZGIiBvcGFjaXR5PSIuMDEiIGQ9Ik0wIDI0VjBoMjR2MjR6Ii8+PHBhdGggZD0iTTUuNzI0IDUuNzI0QTguODQ3IDguODQ3IDAgMCAxIDEyIDMuMTI1YzIuMjcxIDAgNC41NDMuODY2IDYuMjc2IDIuNmE4Ljg0NiA4Ljg0NiAwIDAgMSAyLjU5OCA2LjE0IDguODQ5IDguODQ5IDAgMCAxLTIuNTU5IDYuMzdsLTEuNS0uOTgzQTcuMTA1IDcuMTA1IDAgMCAwIDE5LjEyNSAxMmE3LjEwMyA3LjEwMyAwIDAgMC0yLjA4Ny01LjAzOEE3LjEwMyA3LjEwMyAwIDAgMCAxMiA0Ljg3NWE3LjEwMyA3LjEwMyAwIDAgMC01LjAzOCAyLjA4NyA3LjEwMSA3LjEwMSAwIDAgMC0yLjA4NiA0LjkyIDcuMTAzIDcuMTAzIDAgMCAwIDEuNzY2IDQuODE1bDEuOTQ1LTEuNTg0IDIuMzk0IDcuMTgyLTcuMjIyLTIuNDA4IDEuNzkxLTEuNzlBOC44NDYgOC44NDYgMCAwIDEgMy4xMjUgMTJjMC0yLjI3MS44NjYtNC41NDMgMi42LTYuMjc2eiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9Ii41IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+","selector-cursor":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKeSURBVHgB3VTLi1JhFD86zlQ4ysxSXAy1GWYZzMxmYAhHagRB/QN8FLqPFq4FIQhXkS6kTQ4t2ilIKEWgSS0SmVpIm0BdaBJSaOP78XU+PXey6+saburAD+73uL/feX0H4H81GQdj7D7ilrCGFRonk3c6nXvhcJiFQiGWy+Xy/X7/WbPZ1K1KkBOsl0qlO36/n+3t7Q1hs9kYF+WC3W73MTpxc1lBmej7KuJaoVDInZ6eqsWXDw4OwGKxwPHx8Se1Wn1Wr9cjW1tbOTxi9D9bJCJHXEFslsvlR263+246nYZZptPpQK/Xg8lkSvZ6vbNGo5EgQRCLiSPhIqpoNHobo3keCARgkalUKjg5ORlGuL+/n8T6PVAqlefjYmKRdYQSsZ3P5z8aDAYVLGFarRbi8fhbhUKhx2VPEJGP3eEbfTrs4MUwr4EU49FYrVbweDy1SqXyipy95FaI7g8QXS6SyWReHx4e2ubVBc+HtTk6OjqvVqtvvF7vi0gkUiSByyyJ21BGwpswJ2Vmsxlw/0Kj0bxMJBJJl8vFPWkhGogLQoeyMhEJo2jGUzYRjcPh+Op0Oq2pVOoHkXE0SahF/w+E+3KYNEaX2pSyiSiKxeJTFPiGyyriO6FKEUgSESLp4ht4bzQaf4pFYrHYO/ysEXGNyJtjKRqM/zNNhFuf0B7vst3dXdjZ2Yn4fL4vRFwn8jaMGqYPU179LBEGf3bZcNNutwPOtScwKnCLPJ9KLMWEh7mNuIFdVsNXzbBNP+D6Ou1vwAqm8hqMWlmbzWYf4mz6HAwGzbjWwGgqrEklmucJT+UGCfG3wiPjueeNwGvB0zkAid7OMmF8CyOck/I6NJcR4KZYcM6J2vCbUGhvyQIA0gonzCEZkQud9Fcd9W/bL57cJu3lkjuNAAAAAElFTkSuQmCC","selector-cursor@2x":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAZoSURBVHgB7VlLSCRXFL3ljNEhEXTGhMQJmOjCz8ZNVLKICz9xIYhCNi7UgINkGEk2En8hW5cBUQNxo05GAoKikuCAmvGzGMdPcCUGjDPxD/4Vv/3JvWW97luvq7ur+hMZ8MKlqrteNfe8e965970GuLVbC5kpJr53+hjHx9yY3TUxJgLMAQG4ITARfp5T4Mri4uL9q6urnxwOxz/oY5eXl1/Pzs7e195X2FX4jZsIhAK7gx5ps9m6nGj9/f3OtbU1pzAE0318fPwVjYHrrN7R3AjU/wpOBwA9Cmf/9ejoqDMtLU31iooKGdA+ATo4OMiXAEWAHhBAGEApXj4rPAik0vPt7e0vCgoKPH4gMzMTSktLIS8vD2JiYgABvcHMTZyennbHxsaOg3udOJmLzwqEYB0ZgRCZENm4u7e39yQuLq65srISZmZmvP5Ybm4u5OfnQ0lJyXWUCAgzNLS+vt6SnJz8WgvYwV5xSlcRgyVg3ha2Dkxzc3MvfZmVlQW+bGxsDBobGyE7O1u94uJPjIqKqklKSvrbbrfPnp+ff7e8vJwMnlSTKWfJjDKhywJo6wLp0YcZ+dyIUr7s4cOHLsrRlQwBTSBFuzc2NiZYhjjVAIyzZBqEwgCQv0OOM/gNzuiP/ijlDxBRjgClpqa6AF1cXDydmpoaLCws3JcAGYHyC4JMzoKaibKysvienp6FtrY2IA/WCFB5ebkqCHSvARo8Ozt7igIxwIJ2gJ+seFMnDoIyEUV+dHT0G3qWVUr5M043DdAB0m2IKZwAYpgZX+qkywR6NFbuR0iDxmAoZRUQKRxSLTMnJ8eIaqqSeVMnIYUOdu+sq6vrp4f+VCoYo8khZaNs01VRlERUu2/BrWAA7sl2Anink1Ao18JGjyY/PDx8hq1GZqgp5c2mp6chMjLy2b179x7hRzvoqeUUwXIzqq4O5nZsNUaEbIbLqPLTou/s7FTvT05OpsA9sXJG1AVsZDwjutqBIN6gUlWjxod8XRBNKXgsrqpqYZfwEqX9h8TExD7wbFm8LmzxHQ0QHSlXKZVSqFC/hkqlaKapTaGgCQTK7PHW1lb/wsLC86KiokkccoV+qV1tcE0pO7AWxmhTxBszDzqRr66ujqanp2cRpQLNBgUsCh8BwQ54bn5+/s+mpqa+4eHhfS1gb52vwuP0trPjhSZCBtLQ0NA3MDDQQIFYAUHBYhuvzjpVbJr1lZWVP3p7e19UVVXNgHumXYrI4uBx6Yqevz02b0FcRQ8CoBQF3dXVpQLZ3d39C7n+ora29vfJyclDYFnWgFyxK3cxhss/+KoT/N6DVkQpKypFGUCp3Ozo6HgSHx//GLW/BwHsg57zl5pzADajwLn52mPL1ZHPloMoRYPMFL6EhAR18e7s7MxVV1fPsAAp4Avteq7dC/c1+wKI4g+EfGzDM+EYHBw8RDrNiA2QL6upqVGvKJ2/gHu2L1nA5wwEB2YDfSYMO1x/px0cgEc2zBY+eo67u6H29vZ/wU2VC8l58JxKNjDOgojNEp08aFVfX++3l6JMEdDx8fEB0FNIBsDXBc8ArwuW1EkeI1RKdLWmCx+1DhkZGRvR0dFfSsHKxYtnW0iqvJAN9xNm6MR/QO5sfapUSkqKmqW5ubmfwVgyZdpw/vPZl2kUEAinBMSUStG+gwra0NDQSynQKyloIxnlewafjDFLJzLRBJqiFMnqyMgIbG5uDuD996Dnv8iAPOMAPmbcm5lVJwA/vZRMKZGZlpaWVtAvUL4GZMqE1fjRJrUd76LHoX+InlhcXPwZnWW2tra6jjrpiBM3UK/weQr6J+gfodMh9HtwncG7YLA3CMSsLmxx5WuDCt8B7vZeicInTjCWlpb6wc15mfey7oc9E8LElpVmMgb9AXoC+qcTExOPKRu4NlTHs6Q10GfhgfYOvRsJQZ76BWMKuDtaolQs+gfoH6Mn436gDg+e+5BKXUQx/C5Je/a+NpbeiQJPKgUdlNXx/BCBKxVdxW5Q0I3XBqFKRhU4KLtjYawi3csuTKdc4FnIXNvKUJkVEGRG20QZAAUpA5DbaYAQLmQzfzxyk/ffdnCD4NWVnGdE7kQBQvQHC5lVEDxgMaM29lkxGCNLKrDnIbFAMkFmBIaDkHstU41coGZ1TZD5UjReCGUAYbNgdNqoXZB/T67yYbFAMiGML3BhYeH8rb0t9h/zgcTBcTNGiQAAAABJRU5ErkJggg==","to-bottom-pressed":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDEwdjhtMCAwLTItMm0yIDIgMi0ybS00IDZoMTJtLTYtNGg2bS02LTRoNm0tNi00aDYiIHN0cm9rZT0iIzQ0NEU2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","to-bottom":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDEwdjhtMCAwLTItMm0yIDIgMi0ybS00IDZoMTJtLTYtNGg2bS02LTRoNm0tNi00aDYiIHN0cm9rZT0iIzQ0NEU2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","to-top":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDIydi04bTAgMC0yIDJtMi0yIDIgMm0tNC02aDEybS02IDRoNm0tNiA0aDZtLTYgNGg2IiBzdHJva2U9IiM0NDRFNjAiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==","underline-active":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDJ2NWE0IDQgMCAxIDEtOCAwVjJoME0zIDE0aDEwIiBzdHJva2U9IiMzMzgxRkYiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==",underline:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDJ2NWE0IDQgMCAxIDEtOCAwVjJoME0zIDE0aDEwIiBzdHJva2U9IiM0NDRFNjAiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==","unlock-new":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiMzMzgxRkYiIGN4PSIxNiIgY3k9IjE3IiByPSIxIi8+PHJlY3Qgc3Ryb2tlPSIjMzM4MUZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHg9IjExIiB5PSIxNCIgd2lkdGg9IjEwIiBoZWlnaHQ9IjgiIHJ4PSIyIi8+PHBhdGggZD0iTTEzIDE0di0xYTMgMyAwIDAgMSA2IDB2MWgwbS0zIDN2MyIgc3Ryb2tlPSIjMzM4MUZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L2c+PC9zdmc+",unlock:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiM0NDRFNjAiIGN4PSI4IiBjeT0iOSIgcj0iMSIvPjxyZWN0IHN0cm9rZT0iIzQ0NEU2MCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiB4PSIzIiB5PSI2IiB3aWR0aD0iMTAiIGhlaWdodD0iOCIgcng9IjIiLz48cGF0aCBkPSJtNS4yMDQgNC40NDcuMjYtLjk2NmEzIDMgMCAxIDEgNS43OTUgMS41NTNMMTEgNmgwTTggOXYzIiBzdHJva2U9IiM0NDRFNjAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvZz48L3N2Zz4="},CB=tv["eraser-cursor"],Oq=Object.freeze({x:8,y:18}),qq=Object.freeze({width:26,height:26}),Lq=36,Fq=1,Bq=(function(){function yt(ct){var at=this;Ot(this,yt),this.cursors=Object.freeze([]);var ut=new Image;ut.onload=function(){for(var ot=[],gt=0;gt<Fq;++gt)ot[gt]=null;for(var xt=Fq;xt<=Lq;++xt)ot[xt]=at.createCursor(xt,ut);at.cursors=Object.freeze(ot)},ut.onerror=function(ot){ct.error(ot)},ut.src=CB}return Bt(yt,[{key:"cursorStyle",value:function(at){var ut=this.cursors[Math.min(Math.ceil(at),Lq)];if(ut)return"url(".concat(ut.url,") ").concat(ut.centerX," ").concat(ut.centerY,", auto")}},{key:"release",value:function(){var at=Jt(this.cursors),ut;try{for(at.s();!(ut=at.n()).done;){var ot=ut.value;ot&&URL.revokeObjectURL(ot.url)}}catch(gt){at.e(gt)}finally{at.f()}this.cursors=Object.freeze([])}},{key:"createCursor",value:function(at,ut){var ot=-at,gt=-at,xt=-Oq.x,Mt=-Oq.y,kt=Number.MAX_SAFE_INTEGER,zt=Number.MAX_SAFE_INTEGER,Ht=Number.MIN_SAFE_INTEGER,rr=Number.MIN_SAFE_INTEGER;kt=Math.min(kt,ot),kt=Math.min(kt,xt),zt=Math.min(zt,gt),zt=Math.min(zt,Mt),Ht=Math.max(Ht,ot)+2*at,Ht=Math.max(Ht,xt)+2*qq.width,rr=Math.max(zt,gt)+2*at,rr=Math.max(zt,Mt)+2*qq.height;var ur=-kt,_r=-zt,Dr=Ht-kt,Br=rr-zt;xt+=ur,Mt+=_r;var Ur=document.createElement("canvas"),Zr=Ur.getContext("2d");return Ur.width=Dr,Ur.height=Br,Zr.fillStyle="rgba(216,216,216,146)",Zr.beginPath(),Zr.ellipse(ur,_r,at,at,0,0,2*Math.PI),Zr.fill(),Zr.drawImage(ut,xt,Mt),Object.freeze({centerX:ur,centerY:_r,url:Ur.toDataURL("mycanvas")})}}]),yt})(),DB=20,MB=(function(){function yt(ct){Ot(this,yt),this.stackMap=new Map,this.stackIndexMap=new Map,this.currentScenePath="/",this.index=0,this.textareaExtraStep=0,this.execute=ct.execute,this.onCanUndoStepsUpdate=ct.onCanUndoStepsUpdate,this.onCanRedoStepsUpdate=ct.onCanRedoStepsUpdate}return Bt(yt,[{key:"canUndoSteps",get:function(){return this.stack.length-this.index+this.textareaExtraStep}},{key:"canRedoSteps",get:function(){return this.index}},{key:"stack",get:function(){var at=this.stackMap.get(this.currentScenePath);return at||(at=[],this.stackMap.set(this.currentScenePath,at)),at}},{key:"commit",value:function(at){var ut=this.stack,ot=this.canUndoSteps,gt=this.canRedoSteps;for(ut.splice(0,this.index,y1(at)),this.index=0;ut.length>DB;)ut.pop();var xt=this.canUndoSteps,Mt=this.canRedoSteps;xt!==ot&&this.onCanUndoStepsUpdate(xt),Mt!==gt&&this.onCanRedoStepsUpdate(Mt)}},{key:"undo",value:function(at,ut){var ot=this.stack[this.index];ot&&(this.index+=1,this.textareaExtraStep=0,this.execute(this.replacePath(ot.undo,at),ut),this.onCanUndoStepsUpdate(this.canUndoSteps),this.onCanRedoStepsUpdate(this.canRedoSteps),this.stackIndexMap.set(this.currentScenePath,this.index))}},{key:"redo",value:function(at,ut){this.index>0&&(this.index-=1,this.textareaExtraStep=0,this.execute(this.replacePath(this.stack[this.index].redo,at),ut),this.onCanUndoStepsUpdate(this.canUndoSteps),this.onCanRedoStepsUpdate(this.canRedoSteps),this.stackIndexMap.set(this.currentScenePath,this.index))}},{key:"clear",value:function(at){at?(this.index=0,this.textareaExtraStep=0,this.stack.length=0):(this.textareaExtraStep=0,this.stack.length=this.index),this.onCanUndoStepsUpdate(this.canUndoSteps),this.onCanRedoStepsUpdate(this.canRedoSteps),this.stackIndexMap.set(this.currentScenePath,this.index)}},{key:"onTextareaUpdate",value:function(at){this.textareaExtraStep=at?1:0,this.onCanUndoStepsUpdate(this.canUndoSteps)}},{key:"replacePath",value:function(at,ut){var ot=at;if(ut){var gt=$v.parse(ut);ot=y1(ot);for(var xt in ot){var Mt=ot[xt];Mt.path!==void 0&&(Mt.path=gt)}}return ot}}]),yt})(),IB=(function(){function yt(ct){Ot(this,yt),this.map={},this.savingQueue=[],this.hangQueue=[],this._count=0,this.maxCount=ct.maxSavingCount+ct.keepCountAfterRelease,this.keepCountAfterRelease=ct.keepCountAfterRelease,this.onRelease=ct.onRelease}return Bt(yt,[{key:"count",get:function(){return this._count}},{key:"getValue",value:function(at){var ut=this.map[at];if(ut)return this.pushToTail(this.savingQueue,at),this.pushToTail(this.hangQueue,at),ut}},{key:"save",value:function(at,ut){this._count>=this.maxCount&&this.removeOne(),this._count+=1,this.map[at]=ut,this.savingQueue.push({key:at,target:ut})}},{key:"release",value:function(at){var ut=this.map[at];if(ut){var ot=this.savingQueue.findIndex(function(gt){return gt.key===at});ot!==-1&&(this.savingQueue.splice(ot,1),this.hangTarget(at,ut))}}},{key:"removeOne",value:function(){if(this.hangQueue.length>0){var at=this.hangQueue.shift(),ut=at.key;this.finalReleaseTarget(ut)}else{var ot=this.savingQueue.shift(),gt=ot.key;this.finalReleaseTarget(gt)}}},{key:"hangTarget",value:function(at,ut){if(this.keepCountAfterRelease>0){if(this.hangQueue.length>=this.keepCountAfterRelease){var ot=this.hangQueue.shift(),gt=ot.key;this.finalReleaseTarget(gt)}this.hangQueue.push({key:at,target:ut})}else this.finalReleaseTarget(at)}},{key:"finalReleaseTarget",value:function(at){var ut,ot=this.map[at];delete this.map[at],this._count-=1,(ut=this.onRelease)==null||ut.call(this,ot)}},{key:"pushToTail",value:function(at,ut){var ot=at.findIndex(function(kt){return kt.key===ut});if(ot!==-1&&ot!==at.length-1){var gt=at.splice(ot,1),xt=mt(gt,1),Mt=xt[0];at.push(Mt)}}}]),yt})(),jq=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.getNode=function(ot){var gt=ut.nodes.getValue(ot);return gt||(gt=ut.createNode(ot),ut.nodes.save(ot,gt)),gt},this.releaseNode=function(ot){ot.refsCount<=0&&ut.nodes.release(ot.identifier)},this.execute=at,this.nodes=new IB({maxSavingCount:4,keepCountAfterRelease:Math.max(0,ct),onRelease:function(gt){for(var xt=0,Mt=Ct(gt.watcherDisposers);xt<Mt.length;xt++){var kt=Mt[xt];kt()}}})}return Bt(yt,[{key:"createWatcher",value:function(at,ut){return new RB(this.getNode(at),this.getNode,this.releaseNode,ut)}},{key:"createNode",value:function(at){var ut=[],ot=[],gt=new MB({execute:this.execute,onCanRedoStepsUpdate:function(Mt){for(var kt=0,zt=ut;kt<zt.length;kt++){var Ht=zt[kt];Ht(Mt)}},onCanUndoStepsUpdate:function(Mt){for(var kt=0,zt=ot;kt<zt.length;kt++){var Ht=zt[kt];Ht(Mt)}}});return{identifier:at,stack:gt,redoUpdaters:ut,undoUpdaters:ot,watcherDisposers:[],refsCount:0}}}]),yt})();jq.watchMaxCount=15;var RB=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt){var Mt;return Ot(this,at),Mt=ct.call(this,xt),Mt.didStop=!1,Mt.stop=function(){Mt.didStop||(Mt.didStop=!0,Mt.unlink())},Mt.onCanUndoStepsUpdate=function(kt){Mt.dispatch("onCanUndoStepsUpdate",function(zt){return zt(kt)})},Mt.onCanRedoStepsUpdate=function(kt){Mt.dispatch("onCanRedoStepsUpdate",function(zt){return zt(kt)})},Mt.link(ut),Mt.getNode=ot,Mt.releaseNode=gt,Mt}return Bt(at,[{key:"watch",value:function(ot){if(this.didStop)throw new Error("watcher did stop");if(this.identifier!==ot){var gt=this.canRedoSteps,xt=this.canUndoSteps;this.unlink(),this.link(this.getNode(ot));var Mt=this.canRedoSteps,kt=this.canUndoSteps;gt!==Mt&&this.dispatch("onCanRedoStepsUpdate",function(zt){return zt(Mt)}),xt!==kt&&this.dispatch("onCanUndoStepsUpdate",function(zt){return zt(kt)})}}},{key:"identifier",get:function(){return this.node.identifier}},{key:"canRedoSteps",get:function(){return this.node.stack.canRedoSteps}},{key:"canUndoSteps",get:function(){return this.node.stack.canUndoSteps}},{key:"stack",get:function(){return this.node.stack}},{key:"link",value:function(ot){this.node=ot,ot.refsCount+=1,ot.watcherDisposers.push(this.stop),ot.undoUpdaters.push(this.onCanUndoStepsUpdate),ot.redoUpdaters.push(this.onCanRedoStepsUpdate)}},{key:"unlink",value:function(){at.arrayRemove(this.node.watcherDisposers,this.stop),at.arrayRemove(this.node.undoUpdaters,this.onCanUndoStepsUpdate),at.arrayRemove(this.node.redoUpdaters,this.onCanRedoStepsUpdate),this.node.refsCount-=1,this.releaseNode(this.node)}}],[{key:"arrayRemove",value:function(ot,gt){var xt=ot.indexOf(gt);return xt!==-1?(ot.splice(xt,1),!0):!1}}]),at})(CA),PB=(function(){function yt(){Ot(this,yt),this.creators={},this.waitingTouchCount=0}return Bt(yt,[{key:"reportState",value:function(at,ut,ot){var gt,xt=yt.shadowRefs[at];if(xt){var Mt=ut&&!ot,kt=null,zt=Jt(xt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;rr.isWaitingTouch!==Mt&&(Mt?(this.waitingTouchCount+=1,kt=rr.ref):this.waitingTouchCount-=1,rr.isWaitingTouch=Mt)}}catch(ur){zt.e(ur)}finally{zt.f()}(gt=this.onWaitingTouchRefChanged)==null||gt.call(this,kt,this.waitingTouchCount)}}},{key:"registerShadowRef",value:function(at,ut){var ot=yt.shadowRefs[at];ot?ot.findIndex(function(gt){return gt.ref===ut})===-1&&ot.push({ref:ut,isWaitingTouch:!1}):yt.shadowRefs[at]=[{ref:ut,isWaitingTouch:!1}]}},{key:"unregisterShadowRef",value:function(at,ut){var ot=yt.shadowRefs[at];if(ot){var gt=ot.findIndex(function(zt){return zt.ref===ut});if(gt!==-1){var xt=ot.splice(gt,1),Mt=mt(xt,1),kt=Mt[0];kt.isWaitingTouch&&(this.waitingTouchCount-=1),ot.length===0&&delete yt.shadowRefs[at]}}}},{key:"addTextareaRectGetter",value:function(at,ut){this.creators[at]=ut}},{key:"removeTextareaRectGetter",value:function(at){delete this.creators[at]}},{key:"getTextareaSizeMap",value:function(at){var ut={};for(var ot in this.creators){var gt=this.creators[ot](at,!0);gt&&(ut[ot]=gt)}return ut}},{key:"getTextareaRect",value:function(at,ut,ot){var gt=null,xt=this.creators[at];return xt&&(gt=xt(ut,!1,ot)),gt}},{key:"forEachShadowRefs",value:function(at,ut){var ot=yt.shadowRefs[at];if(ot){var gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;ut(Mt.ref)}}catch(kt){gt.e(kt)}finally{gt.f()}}}}]),yt})(),$q=PB;$q.shadowRefs={};var CN=ln(require$$116),NB=(function(){function yt(){var ct=this;Ot(this,yt),this.mainView=null,this._cameraState={centerX:0,centerY:0,scale:1,width:0,height:0},this.onSizeUpdated=function(at){(at.width!==ct._cameraState.width||at.height!==ct._cameraState.height)&&(ct._cameraState=Object.freeze(Qr(Qr({},ct._cameraState),at)))},this.onCameraUpdated=function(at){(at.centerX!==ct._cameraState.centerX||at.centerY!==ct._cameraState.centerY||at.scale!==ct._cameraState.scale)&&(ct._cameraState=Object.freeze(Qr(Qr({},ct._cameraState),at)))},(0,CN.makeObservable)(this,{_cameraState:CN.observable,onSizeUpdated:CN.action,onCameraUpdated:CN.action})}return Bt(yt,[{key:"cameraState",get:function(){return this._cameraState}},{key:"setupMainView",value:function(at){this.releaseMainView(),this.mainView=at,this.onSizeUpdated(at.size),at.callbacks.on("onSizeUpdated",this.onSizeUpdated),at.callbacks.on("onCameraUpdated",this.onCameraUpdated)}},{key:"releaseMainView",value:function(){this.mainView&&(this.mainView.callbacks.off("onSizeUpdated",this.onSizeUpdated),this.mainView.callbacks.off("onCameraUpdated",this.onCameraUpdated),this.mainView=null)}},{key:"dispose",value:function(){this.releaseMainView()}}]),yt})(),DN=.45,xO=4.35,kB=90,OB=(function(){function yt(ct,at){Ot(this,yt),this.deviceType=ct,this.screenType=at,this.previousPoint={x:0,y:0},this.previousTimestamp=0,this.currentSpeed=0,this.isPressed=!1}return Bt(yt,[{key:"radius",value:function(at,ut,ot){switch(this.updatePressed(ut,ot),this.deviceType){case d0.Touch:return 36/_O(this.screenType);default:return at===Hp.eraser?this.getSpeedRaidus():0}}},{key:"updatePressed",value:function(at,ut){if(this.isPressed!==ut&&(this.isPressed=ut,ut?(this.previousPoint.x=0,this.previousPoint.y=0,this.previousTimestamp=Date.now(),this.currentSpeed=0):this.currentSpeed=0),ut){var ot=Date.now(),gt=at.x-this.previousPoint.x,xt=at.y-this.previousPoint.y,Mt=ot-this.previousTimestamp,kt=Mt===0?0:Math.sqrt(gt*gt+xt*xt)/Mt;this.previousPoint.x=at.x,this.previousPoint.y=at.y,this.previousTimestamp=ot,this.currentSpeed=(kt+this.currentSpeed)/2}}},{key:"getSpeedRaidus",value:function(){var at=this.currentSpeed;at>xO?at=xO:at<DN&&(at=DN);var ut=at-DN,ot=xO-DN;return kB*ut/ot/_O(this.screenType)}}]),yt})(),Uq;(function(yt){yt[yt.Hand=0]="Hand",yt[yt.NewPencil=1]="NewPencil",yt[yt.PencilEraser=2]="PencilEraser",yt[yt.Others=3]="Others"})(Uq||(Uq={}));var qB=(function(){function yt(ct){var at=this;Ot(this,yt),this.view2input={},this.input2view={},this.onReceviedPencilMouseEvent=function(zt,Ht,rr,ur){var _r=at.input2view[ur.id];_r&&_r.callbacks.onReceviedPencilMouseEvent(zt,Ht,rr)},this.onReceivedPencilEraserMouseEvent=function(zt,Ht,rr,ur){var _r=at.input2view[ur.id];_r&&_r.callbacks.onReceivedPencilEraserMouseEvent(zt,Ht,rr)},this.onReceviedOthersMouseEvent=function(zt,Ht,rr,ur){var _r=at.input2view[ur.id];_r&&_r.callbacks.onReceviedOthersMouseEvent(zt,Ht,rr)};var ut=ct.magix,ot=ct.pencilOptions,gt=ct.onReceivedHandMouseEvent,xt=ct.onHandMouseEventCompleted,Mt=new OB(ct.deviceType,ct.screenType),kt={isWorking:function(){return ut.phase===ql.Connected},getScreen:function(Ht){return at.viewWithInput(Ht).screen},getCurrentApplianceName:function(){return ut.trigger.getMemberState().currentApplianceName},getTargetsMap:function(Ht,rr,ur){return at.viewWithInput(rr).getTargetsMap(Ht,ur)}};this.channel=new gB(function(){var zt=ut.trigger.getMemberState().currentApplianceName;return zt===Hp.hand?0:ot.shouldUseNewPencil(zt)?1:zt===Hp.pencilEraser?2:3}),this.pencilChannel=new bO(Mt,kt),this.eraserChannel=new bO(Mt,kt),this.othersChannel=new bO(Mt,kt),this.pencilChannel.onReceviedMouseEvent=this.onReceviedPencilMouseEvent,this.eraserChannel.onReceviedMouseEvent=this.onReceivedPencilEraserMouseEvent,this.othersChannel.onReceviedMouseEvent=this.onReceviedOthersMouseEvent,this.channel.putOutput(1,this.pencilChannel),this.channel.putOutput(2,this.eraserChannel),this.channel.putOutput(3,this.othersChannel),this.channel.putOutput(0,{onEvent:function(Ht,rr){return gt(at.viewWithInput(rr),Ht,rr)},onCancel:function(Ht,rr){return xt(at.viewWithInput(rr))}})}return Bt(yt,[{key:"bindView",value:function(at,ut){var ot=this.view2input[at.id];return ot||(this.view2input[at.id]=ot=this.channel.createInput(),this.input2view[ot.id]=Object.freeze({view:at,callbacks:Object.freeze(Qr({},ut))})),ot}},{key:"unbindView",value:function(at){var ut=this.view2input[at.id];ut&&(delete this.view2input[at.id],delete this.input2view[ut.id],ut.dispose())}},{key:"swapInput",value:function(at){var ut=this.view2input[at.id];if(!ut)throw new Error("unbinded view id=".concat(at.id));var ot=this.channel.createInput();return this.input2view[ot.id]=this.input2view[ut.id],this.view2input[at.id]=ot,ut.dispose(),delete this.input2view[ut.id],ot}},{key:"cleanWaitingEvents",value:function(){this.pencilChannel.cleanWaitingEvents(),this.othersChannel.cleanWaitingEvents()}},{key:"viewWithInput",value:function(at){return this.input2view[at.id].view}}]),yt})(),ZC=ln(require$$116),sT;(function(yt){yt.SVG="svg",yt.Canvas="canvas"})(sT||(sT={}));var v0;(function(yt){yt.Freedom="freedom",yt.Follower="follower",yt.Broadcaster="broadcaster"})(v0||(v0={}));var zq=ln(require$$116);function Gq(yt){return yt instanceof PO}function LB(yt){return yt instanceof TL}function Vq(yt,ct){var at=Qr({},yt),ut=!1;for(var ot in ct){var gt=ct[ot];yt[ot]!==gt&&(at[ot]=gt,ut=!0)}return ut?at:null}function FB(yt,ct){var at,ut,ot='<meta charset="utf-8"><span data-meta="<--(akko-copy-buffer-)';ot+=ct,ot+='(/akko-copy-buffer)-->"></span>',(at=yt.clipboardData)==null||at.setData("text/plain",""),(ut=yt.clipboardData)==null||ut.setData("text/html",ot)}function BB(yt){var ct,at=(ct=yt.clipboardData)==null?void 0:ct.getData("text/html");if(at){var ut=at.indexOf("<--(akko-copy-buffer-)"),ot=at.indexOf("(/akko-copy-buffer)-->");if(ut>=0&&ot>=0)return at.slice(ut+22,ot)}return""}var Hq=(function(){function yt(ct){Ot(this,yt),this._state=Object.freeze(Qr({},ct))}return Bt(yt,[{key:"state",get:function(){return this._state}},{key:"putState",value:function(at){var ut=Vq(this._state,at),ot=!1;if(ut){var gt=this._state;this._state=Object.freeze(ut),this.onStateUpdate(at,gt),ot=!0}return ot}}]),yt})(),Wq=ln(requireReactDom()),Xq=ln(requireReact());function jB(yt){return SO.apply(this,arguments)}function SO(){return SO=ht(regeneratorRuntime.mark(function yt(ct){var at,ut,ot,gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:at=3,ut=null,ot=null,gt=0;case 2:if(!(gt<at)){kt.next=19;break}return kt.prev=3,kt.next=6,fetch(ct);case 6:ut=kt.sent,kt.next=13;break;case 9:return kt.prev=9,kt.t0=kt.catch(3),ot=kt.t0,kt.abrupt("continue",16);case 13:if(ut.status!==200){kt.next=15;break}return kt.abrupt("break",19);case 15:throw new Error("fetch ".concat(JSON.stringify(ct)," failed with status ").concat(ut.status));case 16:++gt,kt.next=2;break;case 19:if(!ot){kt.next=21;break}throw ot;case 21:return kt.next=23,ut.blob();case 23:return xt=kt.sent,kt.next=26,$B(xt);case 26:return kt.abrupt("return",kt.sent);case 27:case"end":return kt.stop()}},yt,null,[[3,9]])})),SO.apply(this,arguments)}function $B(yt){return wO.apply(this,arguments)}function wO(){return wO=ht(regeneratorRuntime.mark(function yt(ct){return regeneratorRuntime.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ut.abrupt("return",window.createImageBitmap?window.createImageBitmap(ct):new Promise(function(ot,gt){var xt=URL.createObjectURL(ct),Mt=document.createElement("img");Mt.addEventListener("load",function(){URL.revokeObjectURL(Mt.src),ot(Mt)}),Mt.src=xt}));case 1:case"end":return ut.stop()}},yt)})),wO.apply(this,arguments)}var oT=ln(require$$116),UB=ln(requireReact()),zB=(function(){function yt(){Ot(this,yt)}return Bt(yt,[{key:"createCursor",value:function(){return{x:0,y:0,width:0,height:0}}},{key:"onAddedCursor",value:function(at){var ut=at.cursorMember.appliance,ot=0,gt=0,xt=0,Mt=0,kt="";switch(ut){case Hp.laserPointer:{ot=14,gt=14,xt=28,Mt=28,kt=tv["laser-pointer-cursor"];break}case Hp.eraser:{ot=8,gt=18,xt=26,Mt=26,kt=tv["eraser-cursor@2x"];break}case Hp.pencilEraser:{var zt=at.eraserSize;switch(typeof zt!="number"&&(zt=1),zt=Math.min(3,Math.max(1,Math.floor(zt))),kt=tv["pencil-eraser-"+zt],zt){case 1:{ot=9,gt=13,xt=18,Mt=26;break}case 2:{ot=13,gt=17,xt=26,Mt=34;break}case 3:{ot=17,gt=25,xt=34,Mt=50;break}}break}}at.setCursorDescription({x:ot,y:gt,width:xt,height:Mt}),at.setReactNode(UB.createElement("img",{alt:"self-cursor",width:xt,height:Mt,src:kt}))}}]),yt})(),GB=ln(require$$116),VB=(function(){function yt(ct){var at=this;Ot(this,yt),this.eraserSize=void 0,this.reactNode=null,this.onCursorComponentChanged=function(ot){at.cursorComponent=ot,ot?at.adapter.onAddedCursor&&at.adapter.onAddedCursor(at):at.adapter.onRemovedCursor&&at.adapter.onRemovedCursor(at)},this.onComponentMoved=function(){if(at.adapter.onMovingCursor){var ot=at.component.originX+at._x+at.screen.width/2,gt=at.component.originY+at._y+at.screen.height/2;at.adapter.onMovingCursor(at,ot,gt)}},this.idPrefix=ct.idPrefix,this.applianceManager=ct.applianceManager,this.adapter=ct.adapter,this.screen=ct.screen,this.memberId=ct.memberId,this._cursorMember=ct.cursorMember;var ut=this.adapter.createCursor(this.memberId);this._x=ut.x,this._y=ut.y,this._width=ut.width,this._height=ut.height,this.reactNode=ut.reactNode||null,this.component=this.screen.scene.addComponent({id:this.idPrefix+this.memberId,definition:ct.cursorDefinition,originX:ct.point.x-this._x,originY:ct.point.y-this._y,width:ut.width,height:ut.height,orderIndex:this.memberId,absoluteCoordinates:!0,payload:{reactNode:this.reactNode,onCursorComponentChanged:this.onCursorComponentChanged}}),this.adapter.onMovingCursor&&this.component.addRectangleUpdatedListener(this.onComponentMoved)}return Bt(yt,[{key:"cursorMember",get:function(){return this._cursorMember}},{key:"setCursorMember",value:function(at){var ut;this._cursorMember&&!HM(this._cursorMember,at)&&(this._cursorMember=at,(ut=this.onCursorMemberChanged)==null||ut.call(this,this._cursorMember))}},{key:"remove",value:function(){this.screen.scene.removeComponent(this.component),this.adapter.onMovingCursor&&this.component.removeRectangleUpdatedListener(this.onComponentMoved)}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"divElement",get:function(){if(!this.cursorComponent)throw new Error("cursor isn't added");return this.cursorComponent.divElement}},{key:"setReactNode",value:function(at){this.reactNode=at,this.component.payload={reactNode:at,onCursorComponentChanged:this.onCursorComponentChanged}}},{key:"setCursorDescription",value:function(at){var ut=Qr({x:this._x,y:this._y,width:this._width,height:this._height},at),ot=this._x-ut.x,gt=this._y-ut.y;this.component.setRectangle(this.component.originX+ot,this.component.originY+gt,ut.width,ut.height),this._x=ut.x,this._y=ut.y,this._width=ut.width,this._height=ut.height}}]),yt})(),Yq=(function(){function yt(ct){var at=this;Ot(this,yt),this.didMouseCursorMoved=!1,this.inactivityTimer=null,this.shouldAppearNextFrame=!0,this.cursor=null,this.disposer=null,this.refreshState=function(){var ut=at.getCursorState(at.memberId),ot=at.applianceManager.getViewState(at.memberId);ut&&ot&&at.willShow(at.applianceManager,ut)?at.cursor?at.refreshCursorVisibleState(ut,ot,at.cursor):at.cursor=at.createCursor(ut):at.cursor&&(at.removeCursor(at.cursor),at.cursor=null)},this.applianceManager=ct.applianceManager,this.cursorDefinition=ct.cursorDefinition,this.screen=ct.screen,this.engine=ct.engine,this.idPrefix=ct.idPrefix,this.memberId=ct.memberId,this.adapter=ct.adapter,this.willShow=ct.willShow,this.isFollowerFixedOnScreen=ct.isFollowerFixedOnScreen,this.getOverridePoint=ct.getOverridePoint,this.refreshAutorun(),this.refreshIsVisible()}return Bt(yt,[{key:"isVisible",get:function(){return this.isCursorInScene&&this.isKeepVisible}},{key:"getCursorState",value:function(at){if(!this.applianceManager.getCursorState)return this.getCursorStateLegacy(at);var ut=this.applianceManager.getCursorState(at),ot=this.getOverridePoint(at);if(ot){var gt=this.applianceManager.getViewState(at),xt=gt.originX,Mt=gt.originY,kt=gt.width,zt=gt.height,Ht=ot.x,rr=ot.y;return kt===0?Ht=.5:Ht=(Ht-xt)/kt,zt===0?rr=.5:rr=(rr-Mt)/zt,hn(Qr({},ut),{cursorX:Ht,cursorY:rr,isPressed:!0,isActivity:!0,isCursorInScene:!0})}else return ut}},{key:"getCursorStateLegacy",value:function(at){var ut,ot=Jt(this.applianceManager.getMemberDisplayers()),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.memberId===at){ut={deviceType:xt.deviceType,isPressed:xt.isPressed,isActivity:xt.isActivity,isCursorInScene:xt.isCursorInScene,currentApplianceName:xt.currentApplianceName,color:xt.color,cursorX:xt.cursorX,cursorY:xt.cursorY};break}}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut}},{key:"refreshCursorVisibleState",value:function(at,ut,ot){this.setPositionProperties(at,ut),this.setVisibleProperties(at),this.refreshComponentPosition(),at.currentApplianceName===Hp.pencilEraser?ot.eraserSize=at.eraserSize:ot.eraserSize=void 0,ot.setCursorMember({appliance:at.currentApplianceName,color:at.color,information:this.applianceManager.getInformationWithMemberId(this.memberId)})}},{key:"createCursor",value:function(at){return this.isCursorInScene=at.isCursorInScene,this.isPressed=at.isPressed,this.isActivity=at.isActivity,this.isKeepVisible=at.isActivity,this.cursorX=at.cursorX,this.cursorY=at.cursorY,this.latestCheckedCursorX=this.cursorX,this.latestCheckedCursorY=this.cursorY,new VB({idPrefix:this.idPrefix,memberId:this.memberId,applianceManager:this.applianceManager,cursorDefinition:this.cursorDefinition,screen:this.screen,adapter:this.adapter,point:this.getCurrentComponentPosition(),cursorMember:{color:at.color,appliance:at.currentApplianceName}})}},{key:"removeCursor",value:function(at){this.cleanInactivityDelayer(),at.remove()}},{key:"updateScreenSize",value:function(){this.refreshComponentPosition()}},{key:"refreshAutorun",value:function(){this.disposer&&this.disposer(),this.disposer=(0,GB.autorun)(this.refreshState)}},{key:"dispose",value:function(){this.disposer&&(this.disposer(),this.disposer=null),this.cursor&&(this.removeCursor(this.cursor),this.cursor=null)}},{key:"setPositionProperties",value:function(at,ut){if(this.mode=ut.mode,this.originX=ut.originX,this.originY=ut.originY,this.cursorX=at.cursorX,this.cursorY=at.cursorY,this.width=ut.width,this.height=ut.height,this.didMouseCursorMoved)this.latestCheckedCursorX=this.cursorX,this.latestCheckedCursorY=this.cursorY;else{var ot=Y4,gt=this.width===0?1:this.screen.width/this.width,xt=this.height===0?1:this.screen.height/this.height,Mt=(this.cursorX-this.latestCheckedCursorX)*this.width*gt,kt=(this.cursorY-this.latestCheckedCursorY)*this.height*xt;Mt*Mt+kt*kt>=ot*ot&&(this.didMouseCursorMoved=!0,this.latestCheckedCursorX=this.cursorX,this.latestCheckedCursorY=this.cursorY)}}},{key:"setVisibleProperties",value:function(at){var ut=this.isActivity;this.isCursorInScene=at.isCursorInScene,this.isPressed=at.isPressed,this.isActivity=at.isActivity,ut&&!this.isActivity?(this.delayInactivity(),this.checkMouseCursorMoved()):!ut&&this.isActivity?(this.cleanInactivityDelayer(),this.isKeepVisible=!0):!this.isActivity&&this.checkMouseCursorMoved()&&this.delayInactivity(),this.refreshIsVisible()}},{key:"refreshComponentPosition",value:function(){var at;if(this.isVisible){var ut=this.getCurrentComponentPosition(),ot=this.getNextAnimationMode();(at=this.cursor)==null||at.component.moveTo(ut.x-this.cursor.x,ut.y-this.cursor.y,ot)}}},{key:"getNextAnimationMode",value:function(){return this.shouldAppearNextFrame?(this.shouldAppearNextFrame=!1,Mm.Immediately):this.isPressed?Mm.Immediately:Mm.Continuous}},{key:"getCurrentComponentPosition",value:function(){var at,ut;if(this.isFollowerFixedOnScreen(this.applianceManager)&&this.mode!==v0.Freedom){var ot=this.width===0?1:this.screen.width/this.width,gt=this.height===0?1:this.screen.height/this.height,xt=Math.min(ot,gt),Mt=(this.screen.width-xt*this.width)/2,kt=(this.screen.height-xt*this.height)/2;at=this.cursorX*this.width*xt+Mt-this.screen.width/2,ut=this.cursorY*this.height*xt+kt-this.screen.height/2}else{var zt=this.screen.camera,Ht=zt.centerX,rr=zt.centerY,ur=zt.scale;at=this.cursorX*this.width+this.originX,ut=this.cursorY*this.height+this.originY,at=(at-Ht)*ur,ut=(ut-rr)*ur}return{x:at,y:ut}}},{key:"checkMouseCursorMoved",value:function(){return this.didMouseCursorMoved?(this.didMouseCursorMoved=!1,!0):!1}},{key:"cleanInactivityDelayer",value:function(){this.inactivityTimer!==null&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=null)}},{key:"delayInactivity",value:function(){var at=this;this.inactivityTimer!==null&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=null),this.isActivity||(this.isKeepVisible=!0,this.refreshIsVisible(),this.inactivityTimer=setTimeout(function(){at.isKeepVisible=!1,at.inactivityTimer=null,at.refreshIsVisible()},X4))}},{key:"refreshIsVisible",value:function(){var at,ut=this.isVisible;ut||(this.shouldAppearNextFrame=!0),(at=this.cursor)==null||at.component.setVisible(this.engine,ut)}}]),yt})(),Qq=ln(requireReact()),Kq=(function(yt){It(at,yt);var ct=qt(at);function at(){var ut;return Ot(this,at),ut=ct.apply(this,arguments),ut.onRef=function(ot){var gt=ut.props.payload;if(!ut._divElement&&ot)ut._divElement=ot,gt.onCursorComponentChanged(Kt(ut));else if(ut._divElement&&!ot)try{gt.onCursorComponentChanged(null)}finally{ut._divElement=ot}},ut}return Bt(at,[{key:"divElement",get:function(){return this._divElement}},{key:"render",value:function(){var ot=this.props,gt=ot.cnode,xt=ot.size,Mt=ot.payload;return Qq.createElement(Gw,{context:gt,onRef:this.onRef,style:xt},Mt.reactNode)}}]),at})(Qq.Component);Kq.isVisible=!1;var HB=(function(){function yt(ct){var at=this;Ot(this,yt),this.nodes={},this._isHidden=!1,this._showBuiltin=!1,this.getOverridePoint=function(ut){return at.overrideCurves.get("".concat(ut))},this.onAddedMember=function(ut,ot){var gt;at.cursorAdapter!==!1&&(gt=new Yq({memberId:ot,idPrefix:"laser-pointer-",adapter:at.builtinPointerCursorAdapter,applianceManager:ut,cursorDefinition:at.cursorDefinition,engine:at.engine,screen:at.screen,isFollowerFixedOnScreen:at.isFollowerFixedOnScreen,getOverridePoint:at.getOverridePoint,willShow:function(kt,zt){switch(zt.currentApplianceName){case Hp.laserPointer:return at.enableLaser&&ot!==at.observerId||at._showBuiltin;case Hp.eraser:case Hp.pencilEraser:return ot===at.observerId&&at._showBuiltin;default:return!1}}}));var xt;at.cursorAdapter&&(xt=new Yq({memberId:ot,idPrefix:"cursor-",adapter:at.cursorAdapter,applianceManager:ut,cursorDefinition:at.cursorDefinition,engine:at.engine,screen:at.screen,isFollowerFixedOnScreen:at.isFollowerFixedOnScreen,getOverridePoint:at.getOverridePoint,willShow:function(kt,zt){return ot!==at.observerId&&zt.currentApplianceName!==Hp.laserPointer}})),at.nodes[ot]={builtinPointer:gt,cursor:xt}},this.onRemovedMember=function(ut,ot){var gt,xt,Mt=at.nodes[ot];Mt&&(delete at.nodes[ot],(gt=Mt.builtinPointer)==null||gt.dispose(),(xt=Mt.cursor)==null||xt.dispose())},this.onRefreshed=function(){var ut,ot;for(var gt in at.nodes){var xt=at.nodes[gt];(ut=xt.builtinPointer)==null||ut.refreshAutorun(),(ot=xt.cursor)==null||ot.refreshAutorun()}},this.isFollowerFixedOnScreen=function(ut){var ot=ut.getViewState(at.observerId);return ot?ot.mode===v0.Broadcaster||ot.mode===v0.Follower:!1},this.screen=ct.screen,this.members=ct.members,this.engine=this.getMouseCursorEngine(ct.appVersion,ct.engine),this.observerId=ct.observerId,this.cursorAdapter=ct.adapter,this._isHidden=ct.isHidden,this.enableLaser=ct.enableLaser,this.builtinPointerCursorAdapter=new zB,this.overrideCurves=oT.observable.map({}),this.cursorDefinition=QD({name:"Cursor"}),this.engine.bind(this.cursorDefinition)(Kq),this.members.forEach(this.onAddedMember),this.members.callbacks.on("onAdded",this.onAddedMember),this.members.callbacks.on("onRemoved",this.onRemovedMember),this.members.callbacks.on("onRefreshed",this.onRefreshed),(0,oT.makeObservable)(this,{observerId:oT.observable,_isHidden:oT.observable,_showBuiltin:oT.observable,setHidden:oT.action,setShowBuiltin:oT.action,updateObserverId:oT.action,putOverrideCursor:oT.action,removeOverrideCursors:oT.action})}return Bt(yt,[{key:"isHidden",get:function(){return this._isHidden}},{key:"setHidden",value:function(at){this._isHidden!==at&&(this._isHidden=at)}},{key:"showBuiltin",get:function(){return this._showBuiltin}},{key:"setShowBuiltin",value:function(at){this._showBuiltin!==at&&(this._showBuiltin=at)}},{key:"updateObserverId",value:function(at){this.observerId=at}},{key:"updateScreenSize",value:function(){var at,ut;for(var ot in this.nodes){var gt=this.nodes[ot];(at=gt.builtinPointer)==null||at.updateScreenSize(),(ut=gt.cursor)==null||ut.updateScreenSize()}}},{key:"putOverrideCursor",value:function(at,ut,ot){this.overrideCurves.set("".concat(at),{x:ut,y:ot})}},{key:"removeOverrideCursors",value:function(at){this.overrideCurves.delete("".concat(at))}},{key:"release",value:function(){var at,ut;this.members.callbacks.off("onAdded",this.onAddedMember),this.members.callbacks.off("onRemoved",this.onRemovedMember),this.members.callbacks.off("onRefreshed",this.onRefreshed);for(var ot in this.nodes){var gt=this.nodes[ot];(at=gt.builtinPointer)==null||at.dispose(),(ut=gt.cursor)==null||ut.dispose(),delete this.nodes[ot]}}},{key:"getMouseCursorEngine",value:function(at,ut){if(ut)return ut;switch(at){case"2.0.0":return this.screen.scene.getEngineWithLegacyLayout(4);case"2.1.0":return this.screen.scene.getEngineWithLegacyLayout(5);default:throw new Error("invalid app version "+at)}}}]),yt})();function WB(yt,ct){var at=document.createElement("canvas");return at.width=yt,at.height=ct,at.toDataURL("screenshot")}var Zq=(function(){function yt(ct,at,ut,ot,gt,xt){var Mt=this;Ot(this,yt),this.screenshotEngines={},this._maskScreenObserverId=!0,this.onScreenSizeUpdated=function(Zr){Mt.cameraBoundState.setScreenSize(Zr),Mt._cursors&&Mt._cursors.updateScreenSize(),Mt.render.refreshSceneComponents(),Mt._onScreenSizeUpdated&&Mt._onScreenSizeUpdated(Zr)},this.updateCursorClassBySelector=function(Zr){if(Mt.applianceManager){var Tn=Mt.applianceManager.getMemberState();Tn&&Tn.currentApplianceName===Hp.selector&&Mt.updateCursorClass(Zr)}},this.reportCurveTailUpdate=function(Zr,Tn,jn){var ts;(ts=Mt._cursors)==null||ts.putOverrideCursor(Zr,Tn,jn)},this.reportCurveComplete=function(Zr){var Tn;(Tn=Mt._cursors)==null||Tn.removeOverrideCursors(Zr)},this.interruptEvent=function(Zr){var Tn=!1;return Mt.eventInterrupter&&(Tn=Mt.eventInterrupter(Zr)),Mt.view.handleNativeEvent(Zr),Tn};var kt,zt=ut.modules,Ht=zt.WhiteRender,rr=Ht.cleanCurveAnimes,ur=Ht.WhiteboardRender;this.engines=ut.engines,this.modules=ut.modules,this.pluginManager=ut.pluginManager,this.applianceManager=ut.applianceManager,this.enableAssignScene=!!this.applianceManager.enableAssignScene,this.members=ut.members,this.dynamicPpt=ut.dynamicPpt,this.bezierCurvePainter=ut.bezierCurvePainter,this.view=ct,this._isCursorsHidden=gt,this.observerId=at.observerId,this.mouseFollower=ot.mouseFollowerHub.createMouseFollower();var _r=this.applianceManager.getViewState(),Dr=this.createScene(ot.boundless,ot.logger,ot.renderEngine,zt),Br=Object.freeze(hn(Qr({},at),{view:ct,icons:tv,observerId:this.screenObserverId(at),deviceType:ot.boundless.deviceType,dynamicPpt:this.dynamicPpt,disalbeImageHit:!1,disableOthersSelectingBox:!1,pluginManager:this.pluginManager,bezierCurvePainter:this.bezierCurvePainter,mouseFollower:this.mouseFollower,fontFamily:ot.fontFamily,convertIdToUrl:ot.urlInterrupter,onBackgroundError:ot.onBackgroundError,updateTextarea:ct.updateTextarea,updateCursorClass:this.updateCursorClassBySelector,enableSelfCurveAnime:ot.enableSelfCurveAnime,enableCurveAnimes:!ot.disableCurveAnimes,enableRotation:!ot.disableRotation,enableVectorOperator:!0,disableNewPencilStroke:ot.disableNewPencilStroke,reportCurveTailUpdate:this.reportCurveTailUpdate,reportCurveComplete:this.reportCurveComplete,floatBarClass:ot.floatBarClass,textareaHub:ct.textareaHub}));if(this.screen=Dr.createScreen({className:"netless-whiteboard",context:Br,engines:(kt=this.engines)==null?void 0:kt.enginesList,autoResize:ot.autoResize,commandWheelToZoom:ot.commandWheelToZoom,eventInterrupter:this.interruptEvent,wrappedComponents:ot.wrappedComponents,onRenderDuration:function(Tn){return Mt.view.fireRenderDuration(Tn)}}),this.mouseFollower.initScreen(this.screen),this.eventInterrupter=ot.eventInterrupter,this.onCatchErrorWhenRender=ot.onCatchErrorWhenRender,this._onScreenSizeUpdated=ot.onScreenSizeUpdated,ot.onCatchErrorWhenRender&&this.screen.addRenderErrorCatchedListener(ot.onCatchErrorWhenRender),this.screen.addSizeUpdatedListener(this.onScreenSizeUpdated),xt){var Ur=xt.cameraBoundState;this.cameraBoundState=new hq(this.screen,Ur.cameraBound),this.cameraBoundState.cameraman.disableBoundlessEvent=Ur.cameraman.disableBoundlessEvent,this.cameraBoundState.cameraman.disableCameraTransform=Ur.cameraman.disableCameraTransform,this.cameraBoundState.cameraman.handToolKey=Ur.cameraman.handToolKey}else this.cameraBoundState=new hq(this.screen,ot.cameraBound),this.cameraBoundState.cameraman.disableBoundlessEvent=ot.disableOperations,this.cameraBoundState.cameraman.handToolKey=ot.handToolKey;this.cameraBoundState.cameraman.adaptRectangle({originX:_r.originX,originY:_r.originY,width:_r.width,height:_r.height,adapterMode:q0.Centering,animationMode:Mm.Immediately}),this.cleanCurveAnimes=rr,this.render=new ur(this.screen,this.pluginManager,this.applianceManager,this.engines),this.setupViewContextState(ct.state),setTimeout(function(){var Zr;Mt._cursors=new HB({appVersion:ut.appVersion,members:Mt.members,screen:Mt.screen,engine:(Zr=Mt.engines)==null?void 0:Zr.engines.mouseCurosrEngine,observerId:Mt.observerId,isHidden:Mt._isCursorsHidden,enableLaser:ot.enableLaser,adapter:ot.cursorAdapter})},0)}return Bt(yt,[{key:"isCursorsHidden",get:function(){return this._isCursorsHidden},set:function(at){this._isCursorsHidden!==at&&(this._isCursorsHidden=at,this._cursors&&this._cursors.setHidden(this._isCursorsHidden))}},{key:"maskFloatBar",get:function(){return this.render.maskFloatBar},set:function(at){this.render.maskFloatBar=at}},{key:"cursors",get:function(){return this._cursors}},{key:"updateState",value:function(at){"cameraBound"in at&&this.cameraBoundState.setCameraBound(at.cameraBound),this.syncCameraMoving(at.cameraMoving),"disableCameraTransform"in at&&(this.cameraman.disableCameraTransform=at.disableCameraTransform),"handToolActive"in at&&(this.cameraman.handToolActive=at.handToolActive),"handToolKey"in at&&(this.cameraman.handToolKey=at.handToolKey),"divElement"in at&&(this.screen.divElement=at.divElement)}},{key:"syncCameraMoving",value:function(at){if(at){var ut=at.camera,ot=at.toContaint;if(ut){var gt=ut.animationMode||Mm.Continuous;this.cameraman.transformCamera(hn(Qr({},ut),{animationMode:gt}))}else if(ot){var xt=ot.animationMode||Mm.Continuous;this.cameraman.adaptRectangle(hn(Qr({},ot),{animationMode:xt,adapterMode:q0.Centering}))}}}},{key:"setupViewContextState",value:function(at){this.cameraBoundState.setCameraBound(at.cameraBound),this.syncCameraMoving(at.cameraMoving),this.cameraman.transformCamera(hn(Qr({},at.cameraMoving),{animationMode:Mm.Immediately})),this.cameraman.disableCameraTransform=at.disableCameraTransform,this.cameraman.handToolActive=at.handToolActive,this.cameraman.handToolKey=at.handToolKey,this.screen.divElement=at.divElement}},{key:"createScene",value:function(at,ut,ot,gt){var xt=gt.WhiteRender;if(xt.createLayoutDescriptions){var Mt=xt.createLayoutDescriptions(ot);return at.createSceneWithLegacyLayoutDescriptions(Mt,ut)}else return at.createScene(ut)}},{key:"scenePath",get:function(){return"/"+this.applianceManager.getCurrentScenePath().join("/")}},{key:"foucsScenePath",get:function(){return this.render.foucsScenePath},set:function(at){this.render.foucsScenePath=at}},{key:"cameraman",get:function(){return this.cameraBoundState.cameraman}},{key:"maskScreenObserverId",get:function(){return this._maskScreenObserverId},set:function(at){this._maskScreenObserverId!==at&&(this._maskScreenObserverId=at,this.screen.context=Object.freeze(hn(Qr({},this.screen.context),{observerId:at?Pr:this.observerId})))}},{key:"sceneIdentifier",value:function(at){var ut=$v.parse(at),ot=this.applianceManager.scenes.getScene(ut);return ot?.id}},{key:"setCommonScreenContext",value:function(at){var ut,ot=this.observerId,gt=at.observerId;this.screen.context=Object.freeze(hn(Qr(Qr({},this.screen.context),at),{observerId:this.screenObserverId(at)})),ot!==gt&&(this.observerId=gt,(ut=this._cursors)==null||ut.updateObserverId(gt))}},{key:"setCameraBound",value:function(at){this.cameraBoundState.setCameraBound(at)}},{key:"resizeScreen",value:function(){this.screen.resize()}},{key:"refreshRender",value:function(){this.render.refreshSceneComponents()}},{key:"fireReloadLibrary",value:function(){this.render.rebuildSceneRender&&this.render.rebuildSceneRender(),this.stopCurveAnimesAndRemoveOverrideCursors()}},{key:"refreshCameraToFocus",value:function(){var at=this.applianceManager.getViewState(),ut=at.originX,ot=at.originY,gt=at.width,xt=at.height,Mt={originX:ut,originY:ot,width:gt,height:xt};this.screen.adaptRectangle(hn(Qr({},Mt),{animationMode:Mm.Continuous,adapterMode:q0.Centering}))}},{key:"getTargetsMap",value:function(at,ut){var ot=at.component,gt=at.engine,xt=this.modules.WhiteModel.ApplianceComponent,Mt;return hm(ot.payload,xt)&&(this.render.getTargetsMap?Mt=this.render.getTargetsMap(ot,ut):Mt=this.render.findTargetsMap(ot.id,gt.orderIndex,ut)),Mt}},{key:"cleanScreen",value:function(){var at;(at=this.render)==null||at.clean()}},{key:"release",value:function(){var at;this.onCatchErrorWhenRender&&this.screen.removeRenderErrorCatchedListener(this.onCatchErrorWhenRender),this.screen.removeSizeUpdatedListener(this.onScreenSizeUpdated),this.screen.divElement=null,(at=this._cursors)==null||at.release(),this.render.release(),this.cameraBoundState.cameraman.release(),this.mouseFollower.release()}},{key:"scenePreview",value:function(at,ut,ot,gt,xt){var Mt=this.modules.WhiteRender,kt=Mt.screenshot,zt=Mt.EnginesHub;if(kt){var Ht=xt||sT.SVG;this.screenshotEngines[Ht]||(this.screenshotEngines[Ht]=zt&&new zt(Ht));var rr=$v.parse(at),ur=this.screen,_r=ot,Dr=gt;_r=typeof _r!="number"?ut.clientWidth:_r,Dr=typeof Dr!="number"?ut.clientHeight:Dr;var Br=1;ur.width!==0&&ur.height!==0&&(Br=Math.min(_r/ur.width,Dr/ur.height)*ur.camera.scale);var Ur={centerX:ur.camera.centerX,centerY:ur.camera.centerY,scale:Br},Zr=kt({applianceManager:this.applianceManager,engines:this.screenshotEngines[Ht],pluginManager:this.pluginManager,bezierCurvePainter:this.bezierCurvePainter,width:_r,height:Dr,path:rr,camera:Ur});if((0,Xq.isValidElement)(Zr))Wq.render(Zr,ut);else throw new Error("scene preview must render ReactElement")}}},{key:"fillSceneSnapshot",value:function(at,ut,ot,gt,xt){var Mt=this.modules.WhiteRender,kt=Mt.screenshot,zt=Mt.EnginesHub;if(kt){var Ht=xt||sT.SVG;this.screenshotEngines[Ht]||(this.screenshotEngines[Ht]=zt&&new zt(Ht));var rr=$v.parse(at),ur=ot,_r=gt;ur=typeof ur!="number"?ut.clientWidth:ur,_r=typeof _r!="number"?ut.clientHeight:_r;var Dr=kt({applianceManager:this.applianceManager,engines:this.screenshotEngines[Ht],pluginManager:this.pluginManager,bezierCurvePainter:this.bezierCurvePainter,fontFamily:this.screen.context.fontFamily,width:ur,height:_r,path:rr});if((0,Xq.isValidElement)(Dr))Wq.render(Dr,ut);else throw new Error("scene preview must render ReactElement")}}},{key:"preloadImages",value:function(at,ut){var ot=this.modules.WhiteRender.imagePreloader;if(ot){var gt=this.view.getImagesInformation(at).filter(function(Mt){return Mt.src}),xt=new Set;return ot.maxSize<gt.length&&(ot.maxSize=gt.length),gt.forEach(function(Mt){var kt=ot.add(Mt.src,Mt.crossOrigin);kt.complete||xt.add(kt)}),xt.size===0?(ut(),function(){}):ot.on("load",function(Mt){xt.delete(Mt),xt.size===0&&ut()})}return function(){}}},{key:"screenshotToCanvas",value:function(at,ut,ot,gt,xt,Mt){var kt=this.modules.WhiteRender,zt=kt.screenshotToCanvas,Ht=kt.EnginesHub;if(zt){var rr=sT.Canvas;this.screenshotEngines[rr]||(this.screenshotEngines[rr]=Ht&&new Ht(rr));var ur=$v.parse(ut),_r={applianceManager:this.applianceManager,engines:this.screenshotEngines[rr],pluginManager:this.pluginManager,bezierCurvePainter:this.bezierCurvePainter,fontFamily:this.screen.context.fontFamily,width:ot,height:gt,camera:xt,path:ur};zt(_r,at,Mt)}}},{key:"screenshotToCanvasAsync",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt,kt,zt,Ht){var rr=this;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,new Promise(function(Dr){var Br=rr.preloadImages(gt,Dr);Ht&&setTimeout(function(){Br(),Dr()},Ht)});case 2:this.screenshotToCanvas(ot,gt,xt,Mt,kt,zt);case 3:case"end":return _r.stop()}},ut,this)}));function at(ut,ot,gt,xt,Mt,kt,zt){return ct.apply(this,arguments)}return at})()},{key:"getBoundingRect",value:function(at){var ut=this.modules.WhiteRender,ot=ut.getBoundingRect,gt=ut.EnginesHub;if(ot){var xt=sT.Canvas;this.screenshotEngines[xt]||(this.screenshotEngines[xt]=gt&&new gt(xt));var Mt=$v.parse(at),kt={applianceManager:this.applianceManager,engines:this.screenshotEngines[xt],pluginManager:this.pluginManager,width:0,height:0,path:Mt};return ot(kt)}return{originX:0,originY:0,width:0,height:0}}},{key:"generateScreenshot",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt,zt;return regeneratorRuntime.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(ot?(kt=$v.parse(ot),Mt=this.applianceManager.scenes.getScene(kt)):Mt=this.applianceManager.scene,Mt){rr.next=3;break}throw new Error("cannot find scene with path ".concat(JSON.stringify(ot)));case 3:if(zt=this.findBackgroundImage(Mt),!zt){rr.next=10;break}return rr.next=7,this.generateImage(zt,gt,xt);case 7:rr.t0=rr.sent,rr.next=11;break;case 10:rr.t0=WB(1,1);case 11:return rr.abrupt("return",rr.t0);case 12:case"end":return rr.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"findBackgroundImage",value:function(at){for(var ut=this.modules.WhiteModel.BackgroundImage,ot=0;ot<at.componentsLength;++ot){var gt=at.componentAt(ot);if(hm(gt,ut))return gt}return null}},{key:"generateImage",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr,Tn;return regeneratorRuntime.wrap(function(ts){for(;;)switch(ts.prev=ts.next){case 0:if(Mt=document.createElement("canvas"),kt=gt,zt=xt,kt===void 0&&(kt=ot.width),zt===void 0&&(zt=ot.height),Mt.width=kt,Mt.height=zt,Ht=ot.previewURL,!Ht&&/^https?:\/\//im.test(ot.src)&&(Ht=ot.src),!Ht){ts.next=14;break}return ts.next=6,jB(Ht);case 6:rr=ts.sent,ur=Mt.getContext("2d"),_r=Math.min(kt/ot.width,zt/ot.height),Dr=ot.width*_r,Br=ot.height*_r,Ur=(kt-Dr)/2,Zr=(zt-Br)/2,ur.drawImage(rr,Ur,Zr,Dr,Br);case 14:return ts.next=16,new Promise(function(us){return Mt.toBlob(function(Os){return us(Os)})});case 16:return Tn=ts.sent,ts.abrupt("return",URL.createObjectURL(Tn));case 18:case"end":return ts.stop()}},ut)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"stopCurveAnimesAndRemoveOverrideCursors",value:function(){if(this.cleanCurveAnimes){var at=this.cleanCurveAnimes();if(this._cursors){var ut=Jt(at),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;this._cursors.removeOverrideCursors(gt)}}catch(xt){ut.e(xt)}finally{ut.f()}}}}},{key:"updateCursorClass",value:function(at){at!==null?this.screen.className="netless-whiteboard "+at:this.screen.className="netless-whiteboard"}},{key:"updateCursorStyle",value:function(at){at===null?this.screen.style=void 0:this.screen.style={cursor:at}}},{key:"screenObserverId",value:function(at){var ut=at.observerId;return this._maskScreenObserverId?Pr:ut}}]),yt})(),XB=ln(require$$116),YB=(function(){function yt(ct,at,ut,ot){var gt=this;Ot(this,yt);var xt;this.scenePath=ct,this.applianceManager=at,this.isWritable=ut,this.disposer=(0,XB.autorun)(function(){var Mt=gt.applianceManager.scenes,kt=$v.parse(ct),zt=Mt.getScene(kt);xt?gt.onSceneUpdate(zt):xt=zt}),xt||this.disposer(),this.onBecomeInvalid=ot,this.focusScene=xt}return Bt(yt,[{key:"isValid",get:function(){return!!this.focusScene}},{key:"identifier",get:function(){var at;return(at=this.focusScene)==null?void 0:at.id}},{key:"dispose",value:function(){if(this.focusScene&&(this.focusScene=void 0,this.disposer(),this.isWritable())){var at=$v.parse(this.scenePath);this.applianceManager.notifyThatSceneChanged(at)}}},{key:"onSceneUpdate",value:function(at){this.focusScene&&this.focusScene!==at&&(this.focusScene=void 0,this.disposer(),this.onBecomeInvalid())}}]),yt})(),QB=(function(){function yt(){Ot(this,yt),this.appliance=null,this.pencilOptions=null,this.applianceName=null,this.shouldInterrupt=!1,this.isShiftKeyPressed=!1,this.isCtrlKeyPress=!1,this.isAltKeyPress=!1}return Bt(yt,[{key:"interruptKeyEvent",value:function(at,ut){var ot,gt,xt,Mt=this.isShiftKeyPressed,kt=this.isCtrlKeyPress,zt=this.isAltKeyPress,Ht=!1;if(this.shouldInterrupt)switch(ut){case Ls.KeyDown:{switch(at){case"lock":{Mt=!0,Ht=!0;break}case"lockCenter":{kt=!0,Ht=!0;break}case"pencilPaintCircular":{zt=!0,Ht=!0;break}}break}case Ls.KeyUp:{switch(at){case"lock":{Mt=!1,Ht=!0;break}case"lockCenter":{kt=!1,Ht=!0;break}case"pencilPaintCircular":{zt=!1,Ht=!0;break}}break}}return Ht&&(this.isShiftKeyPressed!==Mt&&(this.isShiftKeyPressed=Mt,(ot=this.appliance)==null||ot.notifyShiftPress(Mt)),this.isCtrlKeyPress!==kt&&(this.isCtrlKeyPress=kt,(gt=this.appliance)==null||gt.notifiyCtrlPress(kt)),this.isAltKeyPress!==zt&&(this.isAltKeyPress=zt,(xt=this.appliance)==null||xt.notifiyAltPress(zt))),Ht}},{key:"setAppliance",value:function(at){var ut,ot,gt;this.appliance!==at&&(this.appliance=at,(ut=this.appliance)==null||ut.notifyShiftPress(this.isShiftKeyPressed),(ot=this.appliance)==null||ot.notifiyCtrlPress(this.isCtrlKeyPress),(gt=this.appliance)==null||gt.notifiyAltPress(this.isAltKeyPress))}},{key:"setApplianceName",value:function(at){var ut=at||null;this.applianceName!==ut&&(this.applianceName=ut,this.refreshShouldIterrupt())}},{key:"setPencilOptions",value:function(at){this.pencilOptions!==at&&(this.pencilOptions=at,this.refreshShouldIterrupt())}},{key:"cancel",value:function(){var at,ut,ot;this.shouldInterrupt&&(this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,(at=this.appliance)==null||at.notifyShiftPress(!1)),this.isCtrlKeyPress&&(this.isCtrlKeyPress=!1,(ut=this.appliance)==null||ut.notifiyCtrlPress(!1)),this.isAltKeyPress&&(this.isAltKeyPress=!1,(ot=this.appliance)==null||ot.notifiyAltPress(!1))),this.refreshShouldIterrupt()}},{key:"refreshShouldIterrupt",value:function(){var at,ut;this.pencilOptions&&this.applianceName!==null?ut=this.pencilOptions.shouldUseNewPencil(this.applianceName):ut=!1,this.shouldInterrupt!==ut&&(this.shouldInterrupt=ut,ut||(this.isShiftKeyPressed=!1),(at=this.appliance)==null||at.notifyShiftPress(this.isShiftKeyPressed))}}]),yt})();function Jq(yt){for(var ct in yt)return!0;return!1}var CR;(function(yt){yt[yt.FollowSceneAndCamera=0]="FollowSceneAndCamera",yt[yt.FollowScene=1]="FollowScene",yt[yt.Freedom=2]="Freedom"})(CR||(CR={}));var KB=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt,xt,Mt,kt,zt){var Ht;return Ot(this,at),Ht=ct.call(this,Mt),Ht.pressedHotKeys={},Ht.extraWrappedComponents=Object.freeze([]),Ht.didRelease=!1,Ht.wannaFocusScenePath=void 0,Ht.input=null,Ht.isCopying=null,Ht.isPasting=null,Ht._mode=2,Ht.updateTextarea=function(rr,ur,_r){var Dr;Ht.params.displayer.isEnableModify()&&(Ht.node.applianceManager.updateTextarea(rr,ur,Ht.focusSceneId),(Dr=Ht.undoWatcher)==null||Dr.stack.onTextareaUpdate(!!_r))},Ht.isDisplayerWritable=function(){var rr=Ht.params.displayer;return Gq(rr)?rr.isWritable:!1},Ht.onSizeUpdated=function(rr){var ur=rr.width,_r=rr.height;Ht._size=Object.freeze({width:ur,height:_r}),Ht._callbacks.dispatch("onSizeUpdated",function(Dr){return Dr(Ht._size)})},Ht.onCameraUpdated=function(rr){Ht._camera=Object.freeze({centerX:rr.centerX,centerY:rr.centerY,scale:rr.scale}),typeof rr.operatorId=="string"&&Ht._callbacks.dispatch("onCameraUpdatedByDevice",function(ur){return ur(Ht._camera)}),Ht._callbacks.dispatch("onCameraUpdated",function(ur){return ur(Ht._camera)})},Ht.onKeyPressed=function(rr){var ur,_r=Ht.params,Dr=_r.hotKeys,Br=_r.displayer;if(Br.isEnableModify()){if(Dr){var Ur=rr,Zr=Dr.checkHotKey(Ur);Zr&&!Ht.pencilKeyInterrupter.interruptKeyEvent(Zr,Ur.kind)&&((Zr==="copy"||Zr==="paste")&&Ht.useNativeClipboard?Ht.handleNativeClipboardEvent(Zr,rr):(Ht.receiveAndHandleHotKey(Zr,rr),(ur=rr.nativeEvent)==null||ur.preventDefault())),Zr&&Ht._callbacks.dispatch("onActiveHotkey",function(Tn){return Tn(Zr)})}switch(rr.kind){case Ls.KeyDown:{Ht._callbacks.dispatch("onKeyDown",function(Tn){return Tn(rr.nativeEvent)});break}case Ls.KeyUp:{Ht._callbacks.dispatch("onKeyUp",function(Tn){return Tn(rr.nativeEvent)});break}}}},Ht.onMetaKeyUp=function(rr){var ur,_r=Ht.params,Dr=_r.hotKeys,Br=_r.displayer;if(Dr&&Br.isEnableModifyWithoutThrowError()){var Ur={nativeEvent:rr,kind:Ls.KeyUp,key:"Meta",altKey:!1,ctrlKey:!1,shiftKey:!1},Zr=Dr.checkHotKey(Ur);Zr&&!Ht.pencilKeyInterrupter.interruptKeyEvent(Zr,"KeyUp")&&((Zr==="copy"||Zr==="paste")&&Ht.useNativeClipboard?Ht.handleNativeClipboardEvent(Zr,Ur):(Ht.receiveAndHandleHotKey(Zr,Ur),(ur=Ur.nativeEvent)==null||ur.preventDefault())),Zr&&Ht._callbacks.dispatch("onActiveHotkey",function(Tn){return Tn(Zr)})}},Ht.onTouchPressUpdate=function(rr){var ur=Ht.node.cursors;if(ur&&!Ht.params.willHideSelfCursor)if(rr){var _r=Ht.node.applianceManager.getMemberState();_r?.currentApplianceName&&ur.setShowBuiltin(!0)}else ur.setShowBuiltin(!1)},Ht.onWindowBlur=function(){Ht.pencilKeyInterrupter.cancel(),Ht.cancelPressedHotKeys()},Ht.onCopy=function(rr){var ur=Ht.params,_r=ur.displayer,Dr=ur.copyOperator;if(Dr&&_r.isEnableModify()){if(Ht.useNativeClipboard&&rr.clipboardData){Dr.copy(Ht.node.applianceManager,Ht.focusSceneId);var Br=Dr.toBase64();Br&&(rr.preventDefault(),FB(rr,Br),Ht.isCopying=null)}Ht.isCopying&&(Ht.receiveAndHandleHotKey("copy",Ht.isCopying),Ht.isCopying=null)}delete Ht.pressedHotKeys.copy},Ht.onPaste=function(rr){var ur=Ht.params,_r=ur.displayer,Dr=ur.copyOperator;if(Dr&&_r.isEnableModify()){if(Ht.useNativeClipboard){var Br=BB(rr);if(Br){rr.preventDefault(),Dr.fromBase64(Br);try{var Ur=Dr.paste(Ht.node.applianceManager,Ht.focusSceneId);Ht.undoWatcher&&Ur&&Ht.undoWatcher.stack.commit(Ur),Ht.isPasting=null}catch(Zr){console.error(Zr)}}}Ht.isPasting&&(Ht.receiveAndHandleHotKey("paste",Ht.isPasting),Ht.isPasting=null)}delete Ht.pressedHotKeys.paste},Ht.onBoundlessEvent=function(rr){var ur;(ur=Ht.input)==null||ur.pushEvent(rr)},Ht.onPreEndTouchEvent=function(rr){var ur;(ur=Ht.input)==null||ur.pushPreEndTouchEvent(rr)},Ht.onHandToolActive=function(rr){Ht._callbacks.dispatch("onHandToolActive",function(ur){return ur(rr)})},Ht.onCameraTransformation=function(rr){Ht._callbacks.dispatch("onCameraTransform",function(ur){return ur(rr)})},Ht.updateScenePath=function(rr){if(!Ht.latestSceneInfo||rr!==Ht.latestSceneInfo.path){var ur=Ht.node.sceneIdentifier(rr);Ht.latestSceneInfo={id:ur,path:rr},Ht.undoWatcher&&!Ht.focusScene&&Ht.undoWatcher.watch(ur)}},Ht.id=ut,Ht.textareaHub=gt.enableTextareHub?new $q:void 0,Ht.commonScreenContext=ot,Ht.params=gt,Ht.node=new Zq(Kt(Ht),ot,xt,gt,Ht.shouldHideCursors(xt)),Ht.node.maskScreenObserverId=!1,Ht.node.maskFloatBar=!1,Ht.floatBarDelegate=Ht.createFloatBarDelegate(),Ht.mobxDisposer=Ht.startWatchScenePath(),Ht.pencilKeyInterrupter=new QB,Ht.delegate=kt,Ht._callbacks=new CA(zt),Ht.undoWatcher=Ht.createUndoStackWatcher(gt.undoStacksHub),Ht.registerScreenAndCameraman(Ht.node.screen,Ht.node.cameraman),gt.boundless.deviceType===d0.Touch&&Ht.disableTextAreaAsEraserTouchTarget(),Ht}return Bt(at,[{key:"scenePath",get:function(){return this.latestSceneInfo.path}},{key:"focusScenePath",get:function(){return this.wannaFocusScenePath},set:function(ot){var gt=this;this.wannaFocusScenePath!==ot&&(this.node.foucsScenePath!==ot&&!this.shouldFollowScene(this._mode)&&this.watchScenePathUpdate(function(){var xt,Mt,kt,zt;if((xt=gt.focusScene)==null||xt.dispose(),gt.focusScene=void 0,ot){var Ht=new YB(ot,gt.node.applianceManager,gt.isDisplayerWritable,function(){var rr,ur;gt.didRelease||(gt.focusScene=void 0,gt.node.foucsScenePath=void 0,gt.wannaFocusScenePath=void 0,(rr=gt.input)==null||rr.fireSceneUpdate(),(ur=gt.undoWatcher)==null||ur.watch(gt.latestSceneInfo.id))});Ht.isValid&&(gt.focusScene=Ht)}gt.focusScene?(gt.node.foucsScenePath=ot,(Mt=gt.undoWatcher)==null||Mt.watch(gt.focusScene.identifier)):(gt.node.foucsScenePath=void 0,(kt=gt.undoWatcher)==null||kt.watch(gt.latestSceneInfo.id)),(zt=gt.input)==null||zt.fireSceneUpdate()}),this.wannaFocusScenePath=this.node.foucsScenePath)}},{key:"focusSceneIndex",get:function(){var ot;if(this.wannaFocusScenePath!==void 0){for(var gt=$v.parse(this.wannaFocusScenePath),xt=gt.pop(),Mt=this.node.applianceManager.getSceneNames(gt),kt=0;kt<Mt.length;++kt)if(Mt[kt]===xt)return kt}return ot},set:function(ot){if(ot===void 0)this.focusScenePath=void 0;else if(this.wannaFocusScenePath){var gt=$v.parse(this.wannaFocusScenePath),xt=gt.pop(),Mt=this.node.applianceManager.getSceneNames(gt)[ot];Mt!==void 0&&Mt!==xt&&(gt.push(Mt),this.focusScenePath=$v.stringify(gt))}}},{key:"focusSceneId",get:function(){var ot;return(ot=this.focusScene)==null?void 0:ot.identifier}},{key:"disableCameraTransform",get:function(){return this.state.disableCameraTransform},set:function(ot){this.putState({disableCameraTransform:ot})}},{key:"disableKey",get:function(){return this.input?this.input.disableKey:!0},set:function(ot){if(!this.input)throw new Error("cannot modify disableKey");this.input.disableKey=ot}},{key:"callbacks",get:function(){return this._callbacks}},{key:"mode",get:function(){return this._mode},set:function(ot){var gt=this;this.assertNotRelease(),this._mode!==ot&&this.watchScenePathUpdate(function(){var xt;gt.shouldFollowCamera(ot)&&!gt.shouldFollowCamera(gt._mode)&&gt.node.refreshCameraToFocus(),gt.shouldFollowScene(ot)&&!gt.shouldFollowScene(gt._mode)?gt.node.foucsScenePath=void 0:!gt.shouldFollowScene(ot)&&gt.shouldFollowScene(gt._mode)&&(gt.node.foucsScenePath=gt.wannaFocusScenePath),(xt=gt.input)==null||xt.fireSceneUpdate(),gt._mode=ot})}},{key:"wrappedComponents",get:function(){return this.extraWrappedComponents},set:function(ot){this.extraWrappedComponents=Object.freeze(Ct(ot)),this.node.screen.wrappedComponents=[].concat(Ct(ot),Ct(this.params.wrappedComponents))}},{key:"useNativeClipboard",get:function(){return this.params.displayer.useNativeClipboard}},{key:"commandWheelToZoom",get:function(){return this.node.screen.commandWheelToZoom},set:function(ot){this.node.screen.commandWheelToZoom=ot}},{key:"fireReloadLibrary",value:function(){this.node.fireReloadLibrary()}},{key:"refresh",value:function(){this.fireReloadLibrary()}},{key:"setupViewInput",value:function(ot){var gt;this.input=new mB(ot,this.undoWatcher,this.pencilKeyInterrupter,this.node.mouseFollower,this.isDisplayerWritable,this.onKeyPressed,this.onMetaKeyUp,this.onTouchPressUpdate,this.onWindowBlur,this.onCopy,this.onPaste),this.pencilKeyInterrupter.setApplianceName((gt=ot.magix.trigger.getMemberState())==null?void 0:gt.currentApplianceName),this.pencilKeyInterrupter.setPencilOptions(ot.pencilOptions)}},{key:"releaseViewInput",value:function(){this.input&&(this.input.release(),this.input=null)}},{key:"createUndoStackWatcher",value:function(ot){var gt;return ot&&(gt=ot.createWatcher(this.latestSceneInfo.id),gt.forwardTo("onCanRedoStepsUpdate",this._callbacks),gt.forwardTo("onCanUndoStepsUpdate",this._callbacks)),gt}},{key:"shouldFollowCamera",value:function(ot){switch(ot){case 0:return!0;default:return!1}}},{key:"shouldHideCursors",value:function(ot){var gt=ot.applianceManager,xt="/"+gt.getCurrentScenePath().join("/");return!!(this.wannaFocusScenePath&&!this.shouldFollowScene(this._mode)&&xt!==this.wannaFocusScenePath)}},{key:"shouldFollowScene",value:function(ot){switch(ot){case 0:case 1:return!0;default:return!1}}},{key:"canUndoSteps",get:function(){return this.undoWatcher?this.undoWatcher.stack.canUndoSteps:0}},{key:"canRedoSteps",get:function(){return this.undoWatcher?this.undoWatcher.stack.canRedoSteps:0}},{key:"undoStack",get:function(){var ot;return(ot=this.undoWatcher)==null?void 0:ot.stack}},{key:"camera",get:function(){return this._camera}},{key:"size",get:function(){return this._size}},{key:"screen",get:function(){return this.node.screen}},{key:"cameraman",get:function(){return this.node.cameraman}},{key:"divElement",get:function(){return this.state.divElement},set:function(ot){this.putState({divElement:ot})}},{key:"getTargetsMap",value:function(ot,gt){return this.node.getTargetsMap(ot,gt)}},{key:"cancelCurrentContinuityEvent",value:function(){this.cameraman.cancelCurrentContinuityEvent()}},{key:"setCommonScreenContext",value:function(ot){this.assertNotRelease(),this.commonScreenContext=ot,this.node.setCommonScreenContext(ot)}},{key:"updateContext",value:function(ot){var gt=this,xt=this.node.maskFloatBar;this.assertNotRelease(),this.node.cleanScreen(),this.node.release(),this.unregisterScreenAndCameraman(this.node.screen,this.node.cameraman),this.node=new Zq(this,this.commonScreenContext,ot,this.handleUpdatedParams(this.params),this.shouldHideCursors(ot),this.node),this.node.maskScreenObserverId=!1,this.node.maskFloatBar=xt,this.input&&(this.input.mouseFollower=this.node.mouseFollower),this.shouldFollowScene(this._mode)&&this.watchScenePathUpdate(function(){var Mt;gt.node.foucsScenePath=gt.wannaFocusScenePath,(Mt=gt.input)==null||Mt.fireSceneUpdate()}),this.registerScreenAndCameraman(this.node.screen,this.node.cameraman)}},{key:"handleUpdatedParams",value:function(ot){return this.extraWrappedComponents.length===0?ot:hn(Qr({},ot),{wrappedComponents:[].concat(Ct(this.extraWrappedComponents),Ct(ot.wrappedComponents))})}},{key:"setMemberState",value:function(ot){var gt=this;return this.params.setMemberStateWrapper(ot,this,function(xt){var Mt,kt=gt.node.applianceManager,zt=(Mt=kt.getMemberState())==null?void 0:Mt.currentApplianceName,Ht=kt.setMemberStateWithCommitter(xt),rr=Ht.memberState,ur=Ht.committer;if(gt.undoWatcher&&ur&&gt.undoWatcher.stack.commit(ur),"currentApplianceName"in rr){var _r=rr.currentApplianceName;_r!==zt&&(gt.pencilKeyInterrupter.setApplianceName(_r),gt.checkApplianceNameUpdate(_r),gt.refreshCursorHideObserverIdNeed(_r),zt==="text"&&gt.focusToSomeThing())}return rr})}},{key:"checkApplianceNameUpdate",value:function(ot){var gt,xt=(gt=this.input)==null?void 0:gt.virtualKeyboardHelper;if(xt)switch(ot){case Hp.text:{xt.catchPress=!0,xt.catchTarget=null,this.textareaHub&&(this.textareaHub.onWaitingTouchRefChanged=void 0);break}case Hp.selector:{xt.catchPress=!1,xt.catchTarget=null,this.textareaHub&&(this.textareaHub.onWaitingTouchRefChanged=function(Mt,kt){Mt&&kt===1?(xt.catchPress=!0,xt.catchTarget=Mt):(xt.catchPress=!1,xt.catchTarget=null)});break}default:{xt.catchPress=!1,xt.catchTarget=null,this.textareaHub&&(this.textareaHub.onWaitingTouchRefChanged=void 0);break}}}},{key:"setCameraBound",value:function(ot){this.putState({cameraBound:ot})}},{key:"moveCamera",value:function(ot){this.putState({cameraMoving:{camera:ot}})}},{key:"moveCameraToContain",value:function(ot){this.putState({cameraMoving:{toContaint:ot}})}},{key:"insertImage",value:function(ot){this.params.displayer.isEnableModify()&&this.node.applianceManager.insertImage(ot,this.focusSceneId)}},{key:"lockImage",value:function(ot,gt){this.params.displayer.isEnableModify()&&this.node.applianceManager.lockImage(ot,gt,this.focusSceneId)}},{key:"lockImages",value:function(ot){this.params.displayer.isEnableModify()&&this.node.applianceManager.lockImages(ot,this.focusSceneId)}},{key:"getImagesInformation",value:function(ot){var gt=this.node.applianceManager;if(gt.getImagesInformation){var xt=$v.parse(ot);return zy(gt.getImagesInformation(xt))}return[]}},{key:"updatePencilColor",value:function(ot){this.params.displayer.isEnableModify()&&this.node.applianceManager.updatePencilColor(ot,this.focusSceneId)}},{key:"updateShapeColor",value:function(ot){this.params.displayer.isEnableModify()&&this.node.applianceManager.updateShapeColor(ot,this.focusSceneId)}},{key:"updateShapeFillColor",value:function(ot){this.params.displayer.isEnableModify()&&this.node.applianceManager.updateShapeFillColor(ot,this.focusSceneId)}},{key:"completeImageUpload",value:function(ot,gt){if(this.params.displayer.isEnableModify()){var xt=this.node.applianceManager.completeImageUpload(ot,gt,this.focusSceneId);this.undoWatcher&&xt&&this.undoWatcher.stack.commit(xt)}}},{key:"insertText",value:function(ot,gt,xt){var Mt=this;if(this.textareaHub&&this.params.displayer.isEnableModify()){var kt=this.node.applianceManager.insertTextarea(ot,gt,this.focusSceneId);if(xt){var zt=this.node.applianceManager.getMemberState();if(zt){var Ht=zt.bold,rr=zt.italic,ur=zt.underline,_r=zt.lineThrough,Dr={bold:Ht,italic:rr,underline:ur,lineThrough:_r};setTimeout(function(){var Br,Ur=Mt.textareaHub.getTextareaRect(kt,Dr,xt);if(Ur){var Zr={width:Ur.width,height:Ur.height,scale:Ur.scale,textLines:[],originalText:xt};Mt.node.applianceManager.updateTextarea(Zr,kt,Mt.focusSceneId),(Br=Mt.undoWatcher)==null||Br.stack.onTextareaUpdate(xt.length>0)}},100)}}return kt}else return vl}},{key:"updateText",value:function(ot,gt){var xt;if(gt.length===0)throw new Error("make text blank");if(this.textareaHub&&this.params.displayer.isEnableModify()){var Mt=this.node.applianceManager.getMemberState(),kt=Mt.bold,zt=Mt.italic,Ht=Mt.underline,rr=Mt.lineThrough,ur={bold:kt,italic:zt,underline:Ht,lineThrough:rr},_r=this.textareaHub.getTextareaRect(ot,ur,gt);if(!_r)throw new Error("text ".concat(ot," not exits or invisible"));var Dr={width:_r.width,height:_r.height,scale:_r.scale,textLines:[],originalText:gt};this.node.applianceManager.updateTextarea(Dr,ot,this.focusSceneId),(xt=this.undoWatcher)==null||xt.stack.onTextareaUpdate(!0)}}},{key:"updateSelectedText",value:function(ot){var gt;if(this.params.displayer.isEnableModify()){var xt=this.getTextMemberState(ot);if(this.textareaHub&&Jq(xt)){var Mt=this.textareaHub.getTextareaSizeMap(ot),kt=this.node.applianceManager.updateTextareaFormat(ot,Mt,this.focusSceneId);this.undoWatcher&&kt&&this.undoWatcher.stack.commit(kt)}if(ot.fontSize!==void 0){var zt=this.node.applianceManager.updateTextareaFontSize(ot.fontSize,this.focusSceneId);this.undoWatcher&&zt&&this.undoWatcher.stack.commit(zt),xt.textSize=ot.fontSize}Jq(xt)&&((gt=this.params.memberStateStorage)==null||gt.setMemberState(xt),this.node.applianceManager.setMemberState(xt))}}},{key:"updateTextFormat",value:function(ot){var gt;if(this.textareaHub){var xt=this.getTextMemberState(ot);(gt=this.params.memberStateStorage)==null||gt.setMemberState(xt),this.node.applianceManager.setMemberState(xt);var Mt=this.textareaHub.getTextareaSizeMap(ot),kt=this.node.applianceManager.updateTextareaFormat(ot,Mt,this.focusSceneId);this.undoWatcher&&kt&&this.undoWatcher.stack.commit(kt)}}},{key:"getTextMemberState",value:function(ot){var gt={};return"bold"in ot&&(gt.bold=ot.bold),"italic"in ot&&(gt.italic=ot.italic),"underline"in ot&&(gt.underline=ot.underline),"lineThrough"in ot&&(gt.lineThrough=ot.lineThrough),"color"in ot&&(gt.textColor=ot.color),gt}},{key:"delete",value:function(){if(this.params.displayer.isEnableModify()){var ot=this.node.applianceManager.delete(null,this.focusSceneId);this.undoWatcher&&ot&&this.undoWatcher.stack.commit(ot)}}},{key:"duplicate",value:function(){var ot=this.params,gt=ot.displayer,xt=ot.copyOperator;if(xt&&gt.isEnableModify()){var Mt=xt.duplicate(this.node.applianceManager,this.focusSceneId);this.undoWatcher&&Mt&&this.undoWatcher.stack.commit(Mt)}}},{key:"redo",value:function(){var ot,gt;return(ot=this.undoWatcher)==null||ot.stack.redo(this.focusScenePath,this.focusSceneId),((gt=this.undoWatcher)==null?void 0:gt.stack.canRedoSteps)||0}},{key:"undo",value:function(){var ot,gt;return(ot=this.undoWatcher)==null||ot.stack.undo(this.focusScenePath,this.focusSceneId),((gt=this.undoWatcher)==null?void 0:gt.stack.canUndoSteps)||0}},{key:"clearUndoHistory",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,gt;(gt=this.undoWatcher)==null||gt.stack.clear(ot)}},{key:"copy",value:function(){var ot=this.params,gt=ot.displayer,xt=ot.copyOperator;xt&&gt.isEnableModify()&&xt.copy(this.node.applianceManager,this.focusSceneId)}},{key:"paste",value:function(){var ot=this.params,gt=ot.displayer,xt=ot.copyOperator;if(xt&&gt.isEnableModify()){var Mt=xt.paste(this.node.applianceManager,this.focusSceneId);this.undoWatcher&&Mt&&this.undoWatcher.stack.commit(Mt)}}},{key:"cleanCurrentScene",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.params.displayer.isEnableModify()){var gt=this.node.applianceManager.cleanCurrentScene(ot,this.focusSceneId);this.undoWatcher&&gt&&this.undoWatcher.stack.commit(gt)}}},{key:"moveSelectedComponentsToTop",value:function(){this.params.displayer.isEnableModify()&&this.node.applianceManager.moveSelectedComponentsToTop(null)}},{key:"moveSelectedComponentsToBottom",value:function(){this.params.displayer.isEnableModify()&&this.node.applianceManager.moveSelectedComponentsToBottom(null)}},{key:"updateDisableBoundlessEvent",value:function(ot){this.node.cameraman.disableBoundlessEvent=ot}},{key:"updateCursorClass",value:function(ot){this.node.updateCursorClass(ot)}},{key:"updateCursorStyle",value:function(ot){this.node.updateCursorStyle(ot)}},{key:"resizeScreen",value:function(){this.node.resizeScreen()}},{key:"refreshRender",value:function(){var ot=this;this.watchScenePathUpdate(function(){return ot.node.refreshRender()})}},{key:"scenePreview",value:function(ot,gt,xt,Mt,kt){return this.node.scenePreview(ot,gt,xt,Mt,kt)}},{key:"generateScreenshot",value:function(ot,gt,xt){return this.node.generateScreenshot(ot,gt,xt)}},{key:"fillSceneSnapshot",value:function(ot,gt,xt,Mt,kt){this.node.fillSceneSnapshot(ot,gt,xt,Mt,kt)}},{key:"screenshotToCanvas",value:function(ot,gt,xt,Mt,kt,zt){this.node.screenshotToCanvas(ot,gt,xt,Mt,kt,zt)}},{key:"screenshotToCanvasAsync",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt,Mt,kt,zt,Ht,rr,ur){return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return Dr.next=2,this.node.screenshotToCanvasAsync(xt,Mt,kt,zt,Ht,rr,ur);case 2:case"end":return Dr.stop()}},gt,this)}));function ot(gt,xt,Mt,kt,zt,Ht,rr){return ut.apply(this,arguments)}return ot})()},{key:"getBoundingRect",value:function(ot){return this.node.getBoundingRect(ot)}},{key:"convertToPointInWorld",value:function(ot){var gt=ot.x,xt=ot.y;return this.node.screen.convertPointToScene(gt,xt)}},{key:"convertToPointOnScreen",value:function(ot,gt){return this.node.screen.convertPointToScreen(ot,gt)}},{key:"fireRenderDuration",value:function(ot){this._callbacks.dispatch("onRenderDuration",function(gt){return gt(ot)})}},{key:"handleNativeEvent",value:function(ot){if(ot.code==="Escape"&&this.params.displayer.isEnableModifyWithoutThrowError()){var gt=this.node.applianceManager.releaseAllTextarea(null,this.focusSceneId);this.undoWatcher&&gt&&this.undoWatcher.stack.commit(gt)}}},{key:"release",value:function(){var ot;this.assertNotRelease(),this.releaseViewInput(),this.node.release(),(ot=this.undoWatcher)==null||ot.stop(),this.mobxDisposer(),this.unregisterScreenAndCameraman(this.node.screen,this.node.cameraman),this.didRelease=!0,this.delegate.onRelease()}},{key:"onStateUpdate",value:function(ot){this.node.updateState(ot)}},{key:"disableTextAreaAsEraserTouchTarget",value:function(){var ot="disable-textarea-as-eraser-target";if(!document.getElementById(ot)){var gt=document.createElement("style");gt.id=ot,gt.textContent=".netless-whiteboard.cursor-eraser .textarea-container { pointer-events: none; }",document.head.appendChild(gt)}}},{key:"registerScreenAndCameraman",value:function(ot,gt){var xt=this,Mt=ot.width,kt=ot.height,zt=ot.camera;(!this._size||this._size.width!==Mt||this._size.height!==kt)&&(this._size=Object.freeze({width:Mt,height:kt}),this._callbacks.dispatch("onSizeUpdated",function(Ht){return Ht(xt._size)})),(!this._camera||!HM(this._camera,zt))&&(this._camera=Object.freeze(Qr({},zt)),this._callbacks.dispatch("onCameraUpdated",function(Ht){return Ht(xt._camera)})),ot.addSizeUpdatedListener(this.onSizeUpdated),ot.addCameraUpdatedListener(this.onCameraUpdated),gt.addBoundlessEventListener(this.onBoundlessEvent),gt.addPreTouchEventListener(this.onPreEndTouchEvent),gt.addHandToolActiveListener(this.onHandToolActive),gt.addCameraTransformationListener(this.onCameraTransformation)}},{key:"unregisterScreenAndCameraman",value:function(ot,gt){ot.removeSizeUpdatedListener(this.onSizeUpdated),ot.removeCameraUpdatedListener(this.onCameraUpdated),gt.removeBoundlessEventListener(this.onBoundlessEvent),gt.removePreTouchEventListener(this.onPreEndTouchEvent),gt.removeHandToolActiveListener(this.onHandToolActive),gt.removeCameraTransformationListener(this.onCameraTransformation)}},{key:"handleNativeClipboardEvent",value:function(ot,gt){ot==="copy"&&(this.isCopying=gt),ot==="paste"&&(this.isPasting=gt)}},{key:"refreshCursorHideObserverIdNeed",value:function(ot){var gt=this.node.cursors;gt&&!this.params.willHideSelfCursor&&gt.setShowBuiltin(!1)}},{key:"assertNotRelease",value:function(){if(this.didRelease)throw new Error("view did release")}},{key:"receiveAndHandleHotKey",value:function(ot,gt){switch(gt.kind){case Ls.KeyDown:{var xt=this.pressedHotKeys[ot];xt||(xt=this.pressedHotKeys[ot]=[]),xt.push(gt);break}case Ls.KeyUp:{delete this.pressedHotKeys[ot];break}}this.handleHotKey(ot,gt)}},{key:"cancelPressedHotKeys",value:function(){for(var ot in this.pressedHotKeys){var gt=this.pressedHotKeys[ot];delete this.pressedHotKeys[ot];var xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=hn(Qr({},kt),{kind:Ls.KeyUp});this.handleHotKey(ot,zt)}}catch(Ht){xt.e(Ht)}finally{xt.f()}}}},{key:"handleHotKey",value:function(ot,gt){switch(ot){case"duplicate":{this.duplicate();break}case"copy":{this.copy();break}case"paste":{this.paste();break}case"undo":{this.undo();break}case"redo":{this.redo();break}case"delete":{this.delete();break}case"lock":{var xt=this.sendToApplianceManager(ot,gt);this.undoWatcher&&xt&&this.undoWatcher.stack.commit(xt);break}case"lockCenter":{var Mt=this.sendToApplianceManager(ot,gt);this.undoWatcher&&Mt&&this.undoWatcher.stack.commit(Mt);break}case"changeToSelector":{this.updateAppliance(Hp.selector);break}case"changeToClick":{this.updateAppliance(Hp.clicker);break}case"changeToLaserPointer":{this.updateAppliance(Hp.laserPointer);break}case"changeToPencil":{this.updateAppliance(Hp.pencil);break}case"changeToRectangle":{this.updateAppliance(Hp.rectangle);break}case"changeToEllipse":{this.updateAppliance(Hp.ellipse);break}case"changeToEraser":{this.updateAppliance(Hp.eraser);break}case"changeToPencilEraser":{this.updateAppliance(Hp.pencilEraser);break}case"changeToText":{this.updateAppliance(Hp.text);break}case"changeToStraight":{this.updateAppliance(Hp.straight);break}case"changeToArrow":{this.updateAppliance(Hp.arrow);break}case"changeToHand":{this.updateAppliance(Hp.hand);break}}delete this.pressedHotKeys[ot]}},{key:"sendToApplianceManager",value:function(ot,gt){var xt=null,Mt={kind:ot};switch(gt.kind){case Ls.KeyDown:{xt=this.node.applianceManager.onKeyDown(Mt,this.focusSceneId);break}case Ls.KeyUp:{xt=this.node.applianceManager.onKeyUp(Mt,this.focusSceneId);break}}return xt}},{key:"updateAppliance",value:function(ot){this.setMemberState({currentApplianceName:ot})}},{key:"createFloatBarDelegate",value:function(){var ot=this,gt=this.node.applianceManager.updateShapeColor,xt=this.node.applianceManager.updateShapeFillColor;return Object.freeze({delete:function(){return ot.delete()},lockImages:function(kt){return ot.lockImages(kt)},updatePencilColor:function(kt){return ot.updatePencilColor(kt)},updateShapeColor:gt?function(Mt){return ot.updateShapeColor(Mt)}:void 0,updateShapeFillColor:xt?function(Mt){return ot.updateShapeFillColor(Mt)}:void 0,moveSelectedComponentsToTop:function(){return ot.moveSelectedComponentsToTop()},moveSelectedComponentsToBottom:function(){return ot.moveSelectedComponentsToBottom()},duplicate:function(){return ot.duplicate()},updateTextareaFontSize:function(kt){return ot.updateSelectedText({fontSize:kt})},updateTextareaFormat:function(kt){return ot.updateTextFormat(kt)}})}},{key:"watchScenePathUpdate",value:function(ot){try{return ot()}finally{var gt=this.latestSceneInfo.path,xt=this.node.scenePath;this.wannaFocusScenePath&&!this.shouldFollowScene(this._mode)&&xt!==this.wannaFocusScenePath?this.node.isCursorsHidden=!0:this.node.isCursorsHidden=!1,gt!==xt&&(this.updateScenePath(xt),this._callbacks.dispatch("onScenePathUpdated",function(Mt){return Mt(xt)}))}}},{key:"startWatchScenePath",value:function(){var ot=this,gt={equals:zq.comparer.default};return this.updateScenePath(this.node.scenePath),(0,zq.reaction)(function(){return ot.node.scenePath},this.updateScenePath,gt)}},{key:"focusToSomeThing",value:function(){var ot=document.createElement("button");ot.style.position="fixed",ot.style.zIndex="-1024",ot.style.opacity="1.0",document.body.appendChild(ot),ot.focus(),setTimeout(function(){return ot.remove()},0)}}]),at})(Hq),ZB=(function(yt){It(at,yt);var ct=qt(at);function at(ut,ot,gt){var xt;return Ot(this,at),xt=ct.call(this,ot),xt.viewsMap={},xt.previousViewId=0,xt.viewInputParams=null,xt.params=ut,xt.context=Object.freeze(Qr({},gt)),xt._dynamicPpt=gt.dynamicPpt,xt._callbacks=new CA,xt.commonScreenContext=Object.freeze({observerId:ot.observerId,forcePPTLandscape:ot.forcePPTLandscape,disalbeImageHit:ot.disalbeImageHit,disableOthersSelectingBox:ot.disableOthersSelectingBox}),xt}return Bt(at,[{key:"dynamicPpt",get:function(){return this._dynamicPpt}},{key:"callbacks",get:function(){return this._callbacks}},{key:"setupViewInput",value:function(ot){this.viewInputParams||(this.viewInputParams=Object.freeze(Qr({},ot)),this.forEach(function(gt){return gt.setupViewInput(hn(Qr({},ot),{view:gt}))}))}},{key:"releaseViewInput",value:function(){this.viewInputParams&&(this.viewInputParams=null,this.forEach(function(ot){return ot.release()}))}},{key:"onStateUpdate",value:function(ot,gt){if("observerId"in ot&&this.updateCommonScreenContext("observerId",ot.observerId),"forcePPTLandscape"in ot&&this.updateCommonScreenContext("forcePPTLandscape",ot.forcePPTLandscape),"disalbeImageHit"in ot&&this.updateCommonScreenContext("disalbeImageHit",ot.disalbeImageHit),"disableOthersSelectingBox"in ot&&this.updateCommonScreenContext("disableOthersSelectingBox",ot.disableOthersSelectingBox),"disableBoundlessEvent"in ot&&this.forEach(function(kt){return kt.updateDisableBoundlessEvent(ot.disableBoundlessEvent)}),"cursorClass"in ot&&this.forEach(function(kt){return kt.updateCursorClass(ot.cursorClass)}),"cursorStyle"in ot&&this.forEach(function(kt){return kt.updateCursorStyle(ot.cursorStyle)}),"playerState"in ot){var xt=ot.playerState,Mt=this.context.pluginManager;Mt.setPlayerState?Mt.setPlayerState(xt):xt.isPlaying!==void 0&&Mt.setPlayingState(xt.isPlaying)}}},{key:"setupViewContext",value:function(ot){ot.updateDisableBoundlessEvent(this.state.disableBoundlessEvent),ot.updateCursorClass(this.state.cursorClass),ot.updateCursorStyle(this.state.cursorStyle)}},{key:"updateCommonScreenContext",value:function(ot,gt){this.commonScreenContext=Object.freeze(hn(Qr({},this.commonScreenContext),rt({},ot,gt)));for(var xt in this.viewsMap)this.viewsMap[xt].setCommonScreenContext(this.commonScreenContext)}},{key:"forEach",value:function(ot){for(var gt in this.viewsMap)ot(this.viewsMap[gt])}},{key:"createView",value:function(ot,gt){var xt=this,Mt="".concat(this.previousViewId+=1),kt=Object.freeze({onRelease:function(){return xt.releaseView(zt)}}),zt=new KB(Mt,this.commonScreenContext,this.params,this.context,ot,kt,gt);return this.viewsMap[zt.id]=zt,this.setupViewContext(zt),this.viewInputParams&&zt.setupViewInput(hn(Qr({},this.viewInputParams),{view:zt})),this._callbacks.dispatch("onCreatedView",function(Ht){return Ht(zt)}),zt}},{key:"updateContext",value:function(ot){for(var gt in this.viewsMap){var xt=this.viewsMap[gt];xt.updateContext(ot),this.setupViewContext(xt)}this._dynamicPpt=ot.dynamicPpt}},{key:"fireReloadLibrary",value:function(){var ot,gt;(gt=(ot=this.context.pluginManager).refreshPluginInstances)==null||gt.call(ot);for(var xt in this.viewsMap)this.viewsMap[xt].fireReloadLibrary()}},{key:"releaseView",value:function(ot){delete this.viewsMap[ot.id],this._callbacks.dispatch("onReleasedView",function(gt){return gt(ot)})}}]),at})(Hq),JB=(function(){function yt(ct){Ot(this,yt),this.viewsHub=ct}return Bt(yt,[{key:"createView",value:function(at){var ut={cameraBound:{},handToolActive:!1,divElement:null,disableCameraTransform:!1};return this.viewsHub.createView(ut,at)}},{key:"forEach",value:function(at){this.viewsHub.forEach(at)}}]),yt})(),eL=(function(){function yt(ct){Ot(this,yt),this._owner=void 0,this._state=Object.freeze(Qr({},ct))}return Bt(yt,[{key:"owner",get:function(){return this._owner}},{key:"state",get:function(){return this._state||this._owner.state}},{key:"putState",value:function(at){var ut;if(this._state){var ot=Vq(this._state,at);ot&&(this._state=Object.freeze(ot)),ut=!!ot}else ut=this._owner.putState(at);return ut}},{key:"updateOwner",value:function(at){this._owner=at,this._state=null}}]),yt})(),tL=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this.isReadonlyMode=!1,this.isOverrideWithFreedom=!1,this.overrideDisposer=null,this.previousRectangle=null,this.onCreatedView=function(ot){ut.previousRectangle&&ut.refreshScreenRectangle(ot,ut.previousRectangle)},this.viewsHub=ct,this.applianceManager=at,this.followerCheckingDisposer=(0,ZC.reaction)(function(){return ut.getCurrentMode()===v0.Follower},function(ot){ot?ut.refreshCameraRectangle():ut.previousRectangle=null}),ct.callbacks.on("onCreatedView",this.onCreatedView),(0,ZC.makeObservable)(this,{isReadonlyMode:ZC.observable,isOverrideWithFreedom:ZC.observable,setReadonlyMode:ZC.action,overrideWithFreedom:ZC.action})}return Bt(yt,[{key:"release",value:function(){this.overrideDisposer&&(this.overrideDisposer(),this.overrideDisposer=null),this.viewsHub.callbacks.off("onCreatedView",this.onCreatedView),this.followerCheckingDisposer()}},{key:"setReadonlyMode",value:function(at){this.isReadonlyMode!==at&&(this.isReadonlyMode=at,this.overrideDisposer&&!at&&(this.overrideDisposer(),this.overrideDisposer=null))}},{key:"overrideWithFreedom",value:function(at){var ut=this;this.isReadonlyMode&&this.isOverrideWithFreedom!==at&&(this.isOverrideWithFreedom=at,at?this.overrideDisposer=(0,ZC.when)(function(){return ut.applianceManager.getViewState().mode===v0.Freedom},function(){ut.isReadonlyMode&&ut.isOverrideWithFreedom&&(ut.isOverrideWithFreedom=!1),ut.overrideDisposer=null}):this.overrideDisposer&&(this.overrideDisposer(),this.overrideDisposer=null))}},{key:"getBroadcastState",value:function(){var at=this.applianceManager,ut=at.getBroadcasterId();return{mode:this.getCurrentMode(),broadcasterId:ut}}},{key:"getCurrentMode",value:function(){return this.isReadonlyMode&&this.isOverrideWithFreedom?v0.Freedom:this.applianceManager.getViewState().mode}},{key:"refreshCameraRectangle",value:function(){var at=this,ut=this.applianceManager.getViewState(),ot=ut.originX,gt=ut.originY,xt=ut.width,Mt=ut.height,kt={originX:ot,originY:gt,width:xt,height:Mt};(!this.previousRectangle||this.previousRectangle.originX!==ot||this.previousRectangle.originY!==gt||this.previousRectangle.width!==xt||this.previousRectangle.height!==Mt)&&(this.viewsHub.forEach(function(zt){return at.refreshScreenRectangle(zt,kt)}),this.previousRectangle=kt)}},{key:"refreshScreenRectangle",value:function(at,ut){var ot=at.mode;ot===CR.FollowSceneAndCamera&&at.screen.adaptRectangle(hn(Qr({},ut),{animationMode:Mm.Continuous,adapterMode:q0.Centering}))}}]),yt})();function e5(yt,ct){var at=[],ut=new Nu(ct,function(){at.length>0&&yt(at.splice(0,at.length))});function ot(gt){at.push(gt),ut.invoke()}return Object.defineProperty(ot,"proxyListener",{writable:!1,value:yt}),ot}var t5=(function(){function yt(){Ot(this,yt),this.listeners={},this.eventsMergers={},this.waitingNodes=[]}return Bt(yt,[{key:"dispatchEvent",value:function(at,ut,ot){var gt=this.listeners[at.event];if(gt){var xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value;if(!ot||kt.isAfterCommit===ut)try{kt.invoke(at)}catch(Ht){console.error(Ht)}}}catch(Ht){xt.e(Ht)}finally{xt.f()}}var zt=this.waitingNodes.findIndex(function(Ht){return Ht.filter(at)?(Ht.resolve(at),!0):!1});zt!==-1&&this.waitingNodes.splice(zt,1)}},{key:"addMagixEventsListener",value:function(at,ut,ot,gt){var xt=e5(ut,ot),Mt=this.eventsMergers[at];Mt||(Mt=[],this.eventsMergers[at]=Mt),Mt.push(xt),this.addMagixEventListener(at,xt,gt)}},{key:"addMagixEventListener",value:function(at,ut,ot){var gt=this.listeners[at];gt||(gt=[],this.listeners[at]=gt),gt.push({invoke:ut,isAfterCommit:ot})}},{key:"removeMagixEventListener",value:function(at,ut){if(ut){var ot=this.removeFromEventMerges(at,ut);ot?this.removeFromListeners(at,ot):this.removeFromListeners(at,ut)}else delete this.listeners[at],delete this.eventsMergers[at]}},{key:"removeFromEventMerges",value:function(at,ut){var ot=this.eventsMergers[at];if(ot){for(var gt=-1,xt=0;xt<ot.length;++xt)if(ot[xt].proxyListener===ut){gt=xt;break}if(gt!==-1){var Mt=ot[gt];return ot.splice(gt,1),ot.length===0&&delete this.eventsMergers[at],Mt}}}},{key:"removeFromListeners",value:function(at,ut){var ot=this.listeners[at];if(ot){var gt=ot.findIndex(function(xt){return xt.invoke===ut});gt!==-1&&(ot.splice(gt,1),ot.length===0&&delete this.listeners[at])}}},{key:"waitMagixEvent",value:function(at){var ut=this;return new Promise(function(ot){ut.waitingNodes.push({resolve:ot,filter:at})})}}]),yt})(),MN=ln(requireReact()),rL=MN.createContext(void 0),nL=MN.createContext(void 0),iL=MN.createContext(void 0),r5=(function(){function yt(){Ot(this,yt),this.contents={},this.nextId=0}return Bt(yt,[{key:"createWrappedComponent",value:function(at,ut){var ot=this,gt="".concat(this.nextId),xt=function(kt){var zt=kt.children;if(ot.contents){var Ht=ot.contents[gt],rr=Ht.value,ur=Ht.provider;return MN.createElement(ur,{value:rr},zt)}else return null};return this.nextId+=1,this.contents[gt]=Object.freeze({value:ut,provider:at.Provider}),xt}},{key:"dispose",value:function(){this.contents=null}}]),yt})(),n5=rL.Consumer,aL=nL.Consumer,i5=iL.Consumer;function a5(yt){return new TO(yt)}var TO=(function(){function yt(ct){Ot(this,yt),this.cacheContextMap={},this.manager=null,this.plugins=this.copyAndFreezePlugins(ct)}return Bt(yt,[{key:"copyAndFreezePlugins",value:function(at){var ut={};for(var ot in at){var gt=at[ot];if(gt.kind!==void 0&&ot!==gt.kind)throw new Error("plugin's kind ".concat(JSON.stringify(gt.kind)," is not equals key ").concat(JSON.stringify(ot)));var xt=gt.defaultAttributes;tr(xt)=="object"&&xt!==null&&(xt=Object.freeze(Qr({},xt))),ut[ot]=Object.freeze({kind:ot,render:gt.render,defaultAttributes:xt,hitTest:gt.hitTest,willInterruptEvent:gt.willInterruptEvent})}return Object.freeze(ut)}},{key:"setPluginContext",value:function(at,ut){this.manager?this.manager.setPluginContext(at,ut):this.cacheContextMap&&at in this.plugins&&(this.cacheContextMap[at]=ut)}},{key:"getPluginContext",value:function(at){return this.manager?this.manager.getPluginContext(at):this.cacheContextMap?this.cacheContextMap[at]:void 0}},{key:"setPluginManager",value:function(at){if(this.cacheContextMap){for(var ut in this.cacheContextMap)at.setPluginContext(ut,this.cacheContextMap[ut]);this.cacheContextMap=null}else if(this.manager)for(var ot in this.plugins){var gt=this.manager.getPluginContext(ot);at.setPluginContext(ot,gt)}this.manager=at}}]),yt})(),IN=ln(require$$116),sL=(function(){function yt(ct){Ot(this,yt),this.enableCallbackUpdate=!0,this.disposers=null,this.copiedAttributes=null,this.copiedMemberAttributes=null,this.kind=ct.kind,this._displayer=ct.displayer,this._callbacks=new CA,this.onAttributesUpdate&&this._callbacks.on("onAttributesUpdate",this.onAttributesUpdate.bind(this)),this.onDestroy&&this._callbacks.on("onDestroy",this.onDestroy.bind(this)),this.autorunAttributesUpdate(),(0,IN.makeObservable)(this,{attributes:IN.computed})}return Bt(yt,[{key:"autorunAttributesUpdate",value:function(){var at=this;this._displayer.useMobXState||(this.disposers=[this.bindAutorunAttributes(function(){at.copiedAttributes=y1(at._displayer.applianceManager.getAttributesWithInvisiblePlugin(at.kind))},function(){return at._callbacks.dispatch("onAttributesUpdate",function(ut){return ut(at.copiedAttributes)})}),this.bindAutorunAttributes(function(){at.copiedMemberAttributes=y1(at._displayer.applianceManager.getMemberAttributes(at.kind))},function(){return at._callbacks.dispatch("onMemberAttributesUpdate",function(ut){return ut(at.copiedMemberAttributes)})})])}},{key:"bindAutorunAttributes",value:function(at,ut){var ot=this,gt=!1;return(0,IN.autorun)(function(){ot._displayer.applianceManager.hasInvisibilePluginKind(ot.kind)&&(at(),gt&&ot.enableCallbackUpdate&&ut(),gt=!0)})}},{key:"displayer",get:function(){return this._displayer}},{key:"callbacks",get:function(){return this._callbacks}},{key:"attributes",get:function(){var at;return this._displayer.useMobXState?at=this._displayer.applianceManager.getAttributesWithInvisiblePlugin(this.kind):at=this.copiedAttributes||{},at}},{key:"memberAttributes",get:function(){var at;return this._displayer.useMobXState?at=this._displayer.applianceManager.getMemberAttributes(this.kind):at=this.copiedMemberAttributes||{},at}},{key:"getMemberAttributes",value:function(at){return this._displayer.applianceManager.getMemberAttributes(this.kind,[],at)}},{key:"getAttributesValue",value:function(at){var ut=this._displayer.applianceManager;return ut.getAttributesWithInvisiblePlugin(this.kind,at)}},{key:"getMemberAttributesValue",value:function(at){var ut=this._displayer.applianceManager;return ut.getMemberAttributes(this.kind,at)}},{key:"setAttributes",value:function(at){if(this.isEnableUpdateAttributes())try{this.enableCallbackUpdate=!1;var ut=this._displayer,ot=ut.applianceManager,gt=ut.parametersFilter,xt=gt?gt.filter(at):at;ot.updateAttributesInvisiblePlugin(this.kind,xt)}finally{this.resetEnableCallbackUpdate()}}},{key:"setMemberAttributes",value:function(at){if(this.isEnableUpdateAttributes())try{this.enableCallbackUpdate=!1;var ut=this._displayer,ot=ut.applianceManager,gt=ut.parametersFilter,xt=gt?gt.filter(at):at;ot.updateMemberAttributes(this.kind,xt)}finally{this.resetEnableCallbackUpdate()}}},{key:"updateAttributes",value:function(at,ut){if(this.isEnableUpdateAttributes())try{this.enableCallbackUpdate=!1;var ot=this._displayer,gt=ot.applianceManager,xt=ot.parametersFilter,Mt=xt?xt.filter(ut):ut;gt.updateAttributesInvisiblePluginWithKeys(this.kind,at,Mt)}finally{this.resetEnableCallbackUpdate()}}},{key:"updateMemberAttributes",value:function(at,ut){if(this.isEnableUpdateAttributes())try{this.enableCallbackUpdate=!1;var ot=this._displayer,gt=ot.applianceManager,xt=ot.parametersFilter,Mt=xt?xt.filter(ut):ut;gt.updateMemberAttrubtesWithKeys(this.kind,at,Mt)}finally{this.resetEnableCallbackUpdate()}}},{key:"destroy",value:function(){try{this.enableCallbackUpdate=!1;var at=this._displayer.applianceManager;at.removeInvisiblePlugin(this.kind)}finally{this.resetEnableCallbackUpdate()}}},{key:"_dispose",value:function(at){this.disposers&&(this.disposers.forEach(function(ut){return ut()}),this.disposers=null),at&&this.enableCallbackUpdate&&this._callbacks.dispatch("onDestroy",function(ut){return ut()})}},{key:"resetEnableCallbackUpdate",value:function(){var at=this;Promise.resolve().then(function(){at.enableCallbackUpdate=!0})}},{key:"isEnableUpdateAttributes",value:function(){if(this._displayer instanceof PO)return this._displayer.isEnableModify();throw new Error("cannot update attributes when displayer is player")}}]),yt})(),s5=(function(){function yt(ct,at,ut){Ot(this,yt),this.pluginClasses={},this.plugins={},this.paddingCreators={},this.disposer=null,this._isWatching=!1,this.logger=ct,this.displayer=at,this.pluginClasses=this.createPluginClasses(ut)}return Bt(yt,[{key:"createPluginClasses",value:function(at){var ut={},ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;if(xt.kind in ut)throw new Error("duplicated kind from invisible plugin ".concat(JSON.stringify(xt.kind)));ut[xt.kind]=xt}}catch(Mt){ot.e(Mt)}finally{ot.f()}return Object.freeze(ut)}},{key:"isWatching",get:function(){return this._isWatching},set:function(at){var ut=this;this._isWatching!==at&&(this._isWatching=at,at&&!this.disposer?this.disposer=(0,IN.autorun)(function(){for(var ot in ut.pluginClasses)ut.refreshPlugin(ut.pluginClasses[ot])}):!at&&this.disposer&&(this.disposer(),this.disposer=null))}},{key:"get",value:function(at){return this.plugins[at]||null}},{key:"create",value:function(at,ut){var ot=this;return new Promise(function(gt,xt){var Mt=at.kind,kt=ot.displayer.applianceManager;try{if(ot.addPaddingCreator(Mt,gt),at!==ot.pluginClasses[Mt])throw new Error("unregister invisible plugin class");kt.putInvisiblePlugin(Mt,ut)}catch(zt){xt(zt),ot.removePaddingCreator(Mt,gt)}})}},{key:"dispose",value:function(){this.disposer&&(this.disposer(),this.disposer=null);var at=!1;for(var ut in this.plugins){try{this.plugins[ut]._dispose(at)}catch(ot){this.logger.error(ot)}delete this.plugins[ut]}}},{key:"refreshPlugin",value:function(at){var ut=this.displayer.applianceManager,ot=at.kind;if(ut.hasInvisibilePluginKind(ot)){if(!this.plugins[ot]){var gt={kind:ot,displayer:this.displayer},xt=at,Mt=this.plugins[ot]=new xt(gt);if(at.onCreate)try{at.onCreate(Mt)}catch(Dr){this.logger.error(Dr)}}var kt=this.paddingCreators[ot];if(kt){delete this.paddingCreators[ot];var zt=Jt(kt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;rr(this.plugins[ot])}}catch(Dr){zt.e(Dr)}finally{zt.f()}}}else{var ur=this.plugins[ot],_r=!0;if(ur){delete this.plugins[ot];try{ur._dispose(_r)}catch(Dr){this.logger.error(Dr)}if(at.onDestroy)try{at.onDestroy(ur)}catch(Dr){this.logger.error(Dr)}}}}},{key:"addPaddingCreator",value:function(at,ut){var ot=this.paddingCreators[at];ot||(ot=this.paddingCreators[at]=[]),ot.push(ut)}},{key:"removePaddingCreator",value:function(at,ut){var ot=this.paddingCreators[at];if(ot){var gt=ot.indexOf(ut);gt!==-1&&(ot.splice(gt,1),ot.length===0&&delete this.paddingCreators[at])}}}]),yt})(),uT=ln(require$$116),o5=(function(){function yt(ct){var at=this;Ot(this,yt),this._callbacks=new CA,this.set={},this.autoUpdateMembers=function(){var ut=at.applianceManager,ot={},gt=Jt(at.getMemberIds(ut)),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;Mt in at.set?delete at.set[Mt]:at.dispatchEvent("onAdded",ut,Mt),ot[Mt]=Mt}}catch(Ht){gt.e(Ht)}finally{gt.f()}for(var kt in at.set){var zt=at.set[kt];at.dispatchEvent("onRemoved",ut,zt)}at.set=ot},this.applianceManager=ct,this.disposer=(0,uT.autorun)(this.autoUpdateMembers),(0,uT.makeObservable)(this,{refresh:uT.action})}return Bt(yt,[{key:"callbacks",get:function(){return this._callbacks}},{key:"forEach",value:function(at){for(var ut in this.set)at(this.applianceManager,this.set[ut])}},{key:"refresh",value:function(){var at=this.applianceManager;this.disposer(),this.disposer=(0,uT.autorun)(this.autoUpdateMembers),this._callbacks.dispatch("onRefreshed",function(ut){return ut(at)})}},{key:"createMapper",value:function(at){return new u5(this,at)}},{key:"dispose",value:function(){this.disposer()}},{key:"dispatchEvent",value:function(at,ut,ot){var gt=this;setTimeout(function(){gt._callbacks.dispatch(at,function(xt){return(0,uT.runInAction)(function(){xt(ut,ot)})})},0)}},{key:"getMemberIds",value:function(at){if(at.getMemberIds)return at.getMemberIds();var ut=at.getMemberDisplayers(),ot=[],gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value.memberId;ot.push(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}return ot}}]),yt})(),u5=(function(){function yt(ct,at){var ut=this;Ot(this,yt),this._nodes=[],this.memberIds={},this.onAdded=function(ot,gt){gt in ut.memberIds||(ut.memberIds[gt]=!0,ut._nodes.push(new EO(ot,gt,ut.mapper)))},this.onRemoved=function(ot,gt){var xt=ut._nodes.findIndex(function(Mt){return Mt.memberId===gt});xt!==-1&&(ut._nodes.splice(xt,1),delete ut.memberIds[gt])},this.onRefreshed=function(){ut._nodes.splice(0,ut._nodes.length),ut.memberIds={},ut.members.forEach(function(ot,gt){ut.memberIds[gt]=!0,ut._nodes.push(new EO(ot,gt,ut.mapper))})},this.members=ct,this.mapper=at,this.members.forEach(function(ot,gt){ut.memberIds[gt]=!0,ut._nodes.push(new EO(ot,gt,at))}),this.members.callbacks.on("onAdded",this.onAdded),this.members.callbacks.on("onRemoved",this.onRemoved),this.members.callbacks.on("onRefreshed",this.onRefreshed),(0,uT.makeObservable)(this,{_nodes:uT.observable,targets:uT.computed})}return Bt(yt,[{key:"targets",get:function(){var at=[],ut=Jt(this._nodes),ot;try{for(ut.s();!(ot=ut.n()).done;){var gt=ot.value;at.push(gt.target)}}catch(xt){ut.e(xt)}finally{ut.f()}return at}},{key:"dispose",value:function(){this.members.callbacks.off("onAdded",this.onAdded),this.members.callbacks.off("onRemoved",this.onRemoved),this.members.callbacks.off("onRefreshed",this.onRefreshed)}}]),yt})(),EO=(function(){function yt(ct,at,ut){Ot(this,yt),this.applianceManager=ct,this.memberId=at,this.mapper=ut,(0,uT.makeObservable)(this,{target:uT.computed})}return Bt(yt,[{key:"target",get:function(){return this.mapper(this.applianceManager,this.memberId)}}]),yt})();function l5(yt){var ct;if(!("getRectangle"in yt.prototype))return yt;var at=yt;return ct=(function(ut){It(gt,ut);var ot=qt(gt);function gt(){var xt;return Ot(this,gt),xt=ot.apply(this,arguments),xt.cacheSegments={},xt.cacheIdentifiers=[],xt.isWrapped=!0,xt}return Bt(gt,[{key:"getPrecisionSegments",value:function(Mt){var kt=st(Ut(gt.prototype),"getPrecisionSegments",this).call(this,Mt);return kt||(kt=this.cacheSegments[Mt]||null),kt}},{key:"completePainting",value:function(Mt){var kt=st(Ut(gt.prototype),"completePainting",this).call(this);if(kt){var zt,Ht;Mt?(zt=Mt.originX,Ht=Mt.originY):(zt=kt.left,Ht=kt.top),this.cachePrecisionSegments(kt.identifier,{points:kt.points,beginIndex:kt.beginIndex,left:zt,top:Ht})}return kt}},{key:"fireRemoveComponent",value:function(Mt){delete this.cacheSegments[Mt],st(Ut(gt.prototype),"fireRemoveComponent",this).call(this,Mt)}},{key:"cachePrecisionSegments",value:function(Mt,kt){if(!this.cacheSegments[Mt]){this.cacheSegments[Mt]=kt,this.cacheIdentifiers.push(Mt);var zt=ct,Ht=zt.maxCacheCount;if(this.cacheIdentifiers.length>Ht){var rr=this.cacheIdentifiers.shift();delete this.cacheSegments[rr]}}}}]),gt})(at),ct.maxCacheCount=3,ct}var oL=ln(requireReact()),c5=(function(){function yt(ct,at,ut){Ot(this,yt),this.mousePoint=null,this.follower=null,this.component=null,this.id=ct,this.description=at,this.onRelease=ut}return Bt(yt,[{key:"initScreen",value:function(at){this._screen=at}},{key:"release",value:function(){this.component&&(this._screen.scene.removeComponent(this.component),this.component=null),this.onRelease(this.id)}},{key:"moveMouse",value:function(at,ut){var ot=this._screen,gt=ot.width,xt=ot.height,Mt=yt.mouseOffset,kt=at-gt/2+Mt.x,zt=ut-xt/2+Mt.y;this.mousePoint?(this.mousePoint.x=kt,this.mousePoint.y=zt,this.follower&&this.moveFollower(this.follower,kt,zt)):(this.mousePoint={x:kt,y:zt},this.follower&&this.updateFollowerBecomeVisible(this.follower,this.mousePoint.x,this.mousePoint.y))}},{key:"releaseMouse",value:function(){this.mousePoint&&this.follower&&this.updateFoolowerBecomeHidden(),this.mousePoint=null}},{key:"setFollower",value:function(at){this.follower?at?(this.follower=at,this.mousePoint&&this.updateFollowerDescription(at)):(this.follower=null,this.mousePoint&&this.updateFoolowerBecomeHidden()):at&&(this.follower=at,this.mousePoint&&this.updateFollowerBecomeVisible(at,this.mousePoint.x,this.mousePoint.y))}},{key:"updateFollowerBecomeVisible",value:function(at,ut,ot){this.component=this._screen.scene.addComponent({id:this.id,definition:this.description,originX:ut-at.width/2,originY:ot-at.height/2,width:at.width,height:at.height,absoluteCoordinates:!0,payload:{reactNode:at.reactNode}})}},{key:"updateFollowerDescription",value:function(at){this.component.payload={reactNode:at.reactNode}}},{key:"moveFollower",value:function(at,ut,ot){this.component.moveTo(ut-at.width/2,ot-at.height/2,Mm.Immediately)}},{key:"updateFoolowerBecomeHidden",value:function(){this._screen.scene.removeComponent(this.component)}}]),yt})(),uL=c5;uL.mouseOffset=Object.freeze({x:-12,y:-19});var d5=(function(){function yt(){Ot(this,yt),this.previousId=0,this.followers={},this.follower=null,this.description=QD({name:"MouseFollower"})}return Bt(yt,[{key:"refreshEngine",value:function(at){at.bind(this.description)(lL)}},{key:"createMouseFollower",value:function(){var at=this,ut="follower-".concat(this.previousId+=1),ot=new uL(ut,this.description,function(gt){delete at.followers[gt]});return this.follower&&ot.setFollower(this.follower),this.followers[ut]=ot,ot}},{key:"setFollower",value:function(at){this.follower=at;for(var ut in this.follower)this.followers[ut].setFollower(at)}}]),yt})(),lL=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"render",value:function(){var ot=this.props,gt=ot.cnode,xt=ot.size,Mt=ot.payload;return oL.createElement(Gw,{context:gt,style:xt},Mt.reactNode)}}]),at})(oL.Component);lL.isVisible=!0;var RN=500,DR="/";function cL(yt){return tr(yt)=="object"&&yt!==null}var dL=(function(){function yt(ct){var at=this,ut=ct.whiteTracker,ot=ct.logger,gt=ct.region,xt=ct.boundless,Mt=ct.useMobXState,kt=ct.preloadDynamicPPT,zt=ct.userFonts,Ht=ct.pptHandler,rr=ct.globalStateUpdater,ur=ct.screenType,_r=ct.cameraBound,Dr=ct.renderEngine,Br=ct.undoStacksHub,Ur=ct.autoResize,Zr=ct.plugins,Tn=ct.wrappedComponents,jn=ct.floatBarClass,ts=ct.useMultiViews,us=ct.willHideSelfCursor,Os=ct.disableCameraTransform,Hs=ct.memberStateStorage,Ks=ct.onlyCallbackRemoteStateModify,so=ct.invisiblePlugins,To=ct.handToolKey,Oo=ct.fontFamily,Au=ct.disableOperations,Tu=ct.disableOthersSelectingBox,xu=ct.cursorAdapter,yu=ct.eraserRadiusCursor,sp=ct.enableTextareHub,Jl=ct.enableSelfCurveAnime,Ml=ct.modulesOrigin,Qp=ct.disableCurveAnimes,pm=ct.disableRotation,Uv=ct.disableNewPencilStroke,mv=ct.commandWheelToZoom,P_=ct.hotKeys,ox=ct.copyOperator,xS=ct.eventInterrupter,RA=ct.callbacks,aE=ct.urlInterrupter,PA=ct.userPayload,eD=ct.pptParams;Ot(this,yt),this.magixEventsManager=new t5,this.preloadDynamicPPT=!1,this.mainViewProxy=null,this.membersMapper=null,this.context=null,this._views=null,this.libraryNodeFetcher=(function(){var sE=ht(regeneratorRuntime.mark(function a_(s_,ow){var QM,KM,ZM,LO,FO,NL;return regeneratorRuntime.wrap(function(SS){for(;;)switch(SS.prev=SS.next){case 0:return ZM="".concat(Zy.modules.identifier,"/").concat(s_.libIdentifier),at.logger.info("before load modules",ZM),LO=Date.now(),SS.prev=3,SS.next=6,R4(ZM,{logger:at.logger,origin:at.modulesOrigin,origins:at.originsByRegion(ow)});case 6:return FO=SS.sent,NL=FO.WhiteModel.default,SS.abrupt("return",(at.logger.info("load modules ",ZM),(QM=at.tracker)==null||QM.commit({name:"initSdk",result:"success",payload:{duration:Date.now()-LO,identifier:ZM},reason:""}),Object.freeze({modules:FO,libraryClass:NL,appVersion:s_.appVersion})));case 11:throw SS.prev=11,SS.t0=SS.catch(3),(KM=at.tracker)==null||KM.commit({name:"initSdk",result:"fail",payload:{duration:Date.now()-LO,identifier:ZM},reason:SS.t0.message}),SS.t0;case 14:case"end":return SS.stop()}},a_,null,[[3,11]])}));return function(a_,s_){return sE.apply(this,arguments)}})(),this.covertMemberDisplayerToMember=function(sE,a_){var s_=at.getMemberInformation(sE,a_),ow=s_?s_.session:"",QM=s_&&s_.payload,KM=at.memberState(a_);return KM||(KM=at.getDefaultMemberState()),{memberId:a_,memberState:KM,session:ow,payload:QM}},this.tracker=ut,this.logger=ot,this.region=gt,this.useMobXState=Mt,this.boundless=xt,this.screenType=ur,this.eraserRadiusCursor=yu,this.pluginOperator=this.createPluginOperator(),this.plugins=Zr,this.autoResize=Ur,this.modulesOrigin=Ml,this.cameraObserver=new NB,this.copyOperator=ox,this.reactContext=new r5,this.wrappedComponents=Object.freeze(Ct(Tn)),this.onlyCallbackRemoteStateModify=Ks,this.pptHandler=Ht,this.invisiblePluginNode=new s5(ot,this,so),this.callbacks=new CA(RA),this.preloadDynamicPPT=kt,this.mouseFollowerHub=new d5,this.viewsParams={logger:ot,displayer:this,renderEngine:Dr,undoStacksHub:Br,boundless:xt,cameraBound:_r,fontFamily:Oo,cursorAdapter:xu,autoResize:Ur,floatBarClass:jn,memberStateStorage:Hs,enableSelfCurveAnime:Jl,disableCurveAnimes:Qp,disableRotation:pm,disableNewPencilStroke:Uv,mouseFollowerHub:this.mouseFollowerHub,wrappedComponents:this.createWrappedComponents(),disableOperations:Au,willHideSelfCursor:us,handToolKey:To,eventInterrupter:xS,urlInterrupter:aE,onBackgroundError:function(a_){return at.callbacks.dispatch("onBackgroundError",function(s_){return s_(a_)})},enableTextareHub:sp,userPayload:PA,commandWheelToZoom:mv,pptParams:eD,hotKeys:P_,copyOperator:ox,enableLaser:!ts,setMemberStateWrapper:this.wrapSetMemberState.bind(this),onScreenSizeUpdated:function(a_){return at.onScreenSizeUpdated(a_)}},this.dynamicPptParams={globalStateUpdater:rr,observerId:Pr,userFonts:zt,preload:kt,pptHandler:Ht,logger:ot,pptParams:eD,userPayload:PA,pptAssetsOrigin:"https://convertcdn.netless.link/dynamicConvert",onPPTLoadProgress:function(a_,s_){return at.callbacks.dispatch("onPPTLoadProgress",function(ow){return ow(a_,s_)})},onPPTMediaPause:function(a_,s_){return at.callbacks.dispatch("onPPTMediaPause",function(ow){return ow(a_,s_)})},onPPTMediaPlay:function(a_,s_){return at.callbacks.dispatch("onPPTMediaPlay",function(ow){return ow(a_,s_)})},onPPTMediaPlayError:function(a_,s_,ow){at.callbacks.dispatch("onPPTMediaPlayError",function(QM){return QM(a_,s_,ow)})}},this.viewsHubProxy=new eL({observerId:Pr,forcePPTLandscape:!1,disalbeImageHit:!1,disableBoundlessEvent:!0,disableOthersSelectingBox:Tu,cursorClass:null,cursorStyle:null,playerState:Object.freeze({isPlaying:!0,timestamp:0,playbackSpeed:1})}),ts||(this.mainViewProxy=new eL({cameraBound:_r,handToolActive:!1,divElement:null,disableCameraTransform:!!Os}))}return Bt(yt,[{key:"getMainViewIfExits",value:function(){var at;return(at=this.mainViewProxy)==null?void 0:at.owner}},{key:"enableWriteNow",get:function(){return!1}},{key:"deviceType",get:function(){return this.boundless.deviceType}},{key:"observerId",get:function(){return this.viewsHubProxy.state.observerId}},{key:"version",get:function(){return Zy.sdkVersion}},{key:"viewsHub",get:function(){return this.viewsHubProxy.owner}},{key:"useMultiViews",get:function(){return!this.mainViewProxy}},{key:"mainView",get:function(){var at=this.mainViewProxy;if(at){var ut=at.owner;if(ut)return ut}return null}},{key:"memberStateStorage",get:function(){return this.viewsParams.memberStateStorage}},{key:"onScreenSizeUpdated",value:function(at){}},{key:"createWrappedComponents",value:function(){return[].concat(Ct(this.wrappedComponents),[this.reactContext.createWrappedComponent(rL,this)])}},{key:"createPluginOperator",value:function(){return Object.freeze({remove:function(){throw new Error("it is not a writable room")},update:function(){throw new Error("it is not a writable room")},getPlugin:function(){throw new Error("it is not a writable room")}})}},{key:"scalePptToFit",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mm.Continuous,ut=this.state.sceneState.scenes[this.state.sceneState.index];ut.ppt&&this.moveCameraToContain({originX:-ut.ppt.width/2,originY:-ut.ppt.height/2,width:ut.ppt.width,height:ut.ppt.height,animationMode:at})}},{key:"scenePathType",value:function(at){var ut=at.replace(/\/$/g,"").split(DR);ut.shift();var ot=this.applianceManager.scenes.findSceneOrGroup(ut),gt=this.context.modules.WhiteModel.SceneNode;if(ot&&hm(ot,gt))return Lx.Page;if(ot)return Lx.Dir;for(;ut.length>1;){ut.pop();var xt=this.applianceManager.scenes.findSceneOrGroup(ut);if(xt&&hm(xt,gt))return Lx.Conflict}return Lx.None}},{key:"entireScenes",value:function(){var at=this.applianceManager,ut=at.getAllScenePaths(),ot={},gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value,kt=at.getScene(zy(Mt)),zt=Mt.slice(0,-1),Ht="".concat(DR).concat(zt.join(DR));ot[Ht]=ot[Ht]||[],kt&&ot[Ht].push(kt)}}catch(rr){gt.e(rr)}finally{gt.f()}return ot}},{key:"getScene",value:function(at){var ut=$v.parse(at),ot=this.applianceManager.getScene(ut);return zy(ot)}},{key:"refreshViewSize",value:function(){var at;this.autoResize||(at=this.viewsHubProxy.owner)==null||at.forEach(function(ut){return ut.resizeScreen()})}},{key:"getCurrentSceneState",value:function(){for(var at=this.applianceManager,ut=y1(at.getCurrentScenePath()),ot=$v.stringify(ut),gt=ut.pop(),xt=at.getSceneNames(ut),Mt=$v.stringify(ut),kt=[],zt=Number.NaN,Ht=0;Ht<xt.length;++Ht){var rr=xt[Ht],ur=at.getScene([].concat(Ct(ut),[rr]));ur?.name===gt&&(zt=Ht),kt[Ht]=zy(ur)}return{sceneName:gt,scenePath:ot,contextPath:Mt,scenes:kt,index:zt}}},{key:"originsByRegion",value:function(at){if(at){var ut=[],ot=[];for(var gt in at)gt==="*"?ut.push.apply(ut,Ct(this.readStringArray(at[gt]))):gt===this.region&&ot.push.apply(ot,Ct(this.readStringArray(at[gt])));var xt=ot.concat(ut);if(xt.length>0)return xt.map(function(Mt){return Mt.includes("://")?Mt:"https://".concat(Mt)})}}},{key:"readStringArray",value:function(at){return Object.freeze(typeof at=="string"?[at]:Ct(at))}},{key:"assignAttributes",value:function(at,ut){if(this.context){var ot=ut;if(ot===void 0||cL(ot)){var gt=this.context.pluginManager.findPlugin(at);gt&&cL(gt.defaultAttributes)&&(ot=Qr(Qr({},gt.defaultAttributes),ot))}return ot}}},{key:"hasLibraryNode",get:function(){return!!this.context}},{key:"isEnableModifyWithoutThrowError",value:function(){return!1}},{key:"isEnableModify",value:function(){return!1}},{key:"getDefaultMemberState",value:function(){return{currentApplianceName:Hp.pencil,strokeColor:[0,0,0],strokeWidth:4,textSize:16,bold:!1,italic:!1,underline:!1,lineThrough:!1}}},{key:"bezierCurvePainter",get:function(){return this.context?this.context.bezierCurvePainter:null}},{key:"getCursorStyleWithRadius",value:function(at){return at===0?void 0:this.eraserRadiusCursor.cursorStyle(at)}},{key:"putPlayerState",value:function(at){var ut=Object.freeze(Qr(Qr({},this.viewsHubProxy.state.playerState),at));this.viewsHubProxy.putState({playerState:ut})}},{key:"updateLibraryNode",value:function(at){var ut;this.members=new o5(this.applianceManager),this.membersMapper=(ut=this.membersMapper)!=null?ut:this.members.createMapper(this.covertMemberDisplayerToMember);var ot=at.modules,gt=ot.WhiteRender,xt=gt.imagePreloader,Mt=gt.createDynamicPpt,kt=gt.EnginesHub,zt=gt.BezierCurvePainter;this.imagePreloader=xt;var Ht=this.createPluginManager(ot,this.pluginOperator,this.plugins),rr=this.createBezierCurvePainter(zt),ur=Mt(hn(Qr({},this.dynamicPptParams),{observerId:this.viewsHubProxy.state.observerId})),_r=kt&&new kt(this.viewsParams.renderEngine),Dr=Object.freeze({appVersion:at.appVersion,applianceManager:this.applianceManager,members:this.members,pluginManager:Ht,dynamicPpt:ur,bezierCurvePainter:rr,engines:_r,modules:ot});if(this.mouseFollowerHub.refreshEngine(_r.engines.mouseCurosrEngine),this.viewsHubProxy.owner)this.viewsHubProxy.owner.updateContext(Dr);else{var Br=this.viewsHubProxy.state,Ur=new ZB(this.viewsParams,Br,Dr);if(this.viewsHubProxy.updateOwner(Ur),this._views=new JB(Ur),this.mainViewProxy){var Zr=this.mainViewProxy.state,Tn=Ur.createView(Zr);Tn.mode=CR.FollowSceneAndCamera,this.mainViewProxy.updateOwner(Tn),this.cameraObserver.setupMainView(Tn),Tn.callbacks.forwardTo("onHandToolActive",this.callbacks),Tn.callbacks.forwardTo("onRenderDuration",this.callbacks)}}var jn=new SB({applianceManager:this.applianceManager,sceneNodeClass:ot.WhiteModel.SceneNode});this.context=Object.freeze({modules:ot,pluginManager:Ht,bezierCurvePainter:rr,scenesCallbacksHub:jn}),this.refreshViewSize()}},{key:"fireTriggerRebuild",value:function(){if(this.viewsHub.fireReloadLibrary(),this.members.refresh(),this.context){var at=this.context,ut=at.scenesCallbacksHub,ot=at.modules;ut.refresh({applianceManager:this.applianceManager,sceneNodeClass:ot.WhiteModel.SceneNode})}}},{key:"createPluginManager",value:function(at,ut,ot){var gt=at.WhiteRender.PluginManager,xt=ot?ot.plugins:{},Mt=new gt(xt,ut);return ot&&ot.setPluginManager(Mt),Mt}},{key:"createBezierCurvePainter",value:function(at){var ut=null;if(at){var ot=at;this.disablePencilWrittingLimitFrequency||(ot=l5(at)),ut=new ot(TN.curveConvergenceSteps),ut.bezierRenderGranularity=gq,ut.bezierMaxSegments=vq}return ut}},{key:"refreshRender",value:function(){var at;(at=this.viewsHubProxy.owner)==null||at.forEach(function(ut){return ut.refreshRender()})}},{key:"disableOthersSelectingBox",get:function(){return this.viewsHubProxy.state.disableOthersSelectingBox},set:function(at){this.viewsHubProxy.putState({disableOthersSelectingBox:at})}},{key:"views",get:function(){if(this.mainViewProxy)throw new Error("you can only read views when useMultiViews is true");if(!this._views)throw new Error("views is not ready");return this._views}},{key:"dispose",value:function(){var at,ut,ot,gt,xt;(at=this.imagePreloader)==null||at.clear(),(ut=this.viewsHubProxy.owner)==null||ut.forEach(function(Mt){return Mt.release()}),this.eraserRadiusCursor.release(),this.invisiblePluginNode.dispose(),this.cameraObserver.dispose(),(ot=this.membersMapper)==null||ot.dispose(),(gt=this.members)==null||gt.dispose(),(xt=this.memberStateStorage)==null||xt.dispose(),this.reactContext.dispose()}},{key:"setObserverId",value:function(at){var ut;(ut=this.viewsHubProxy.owner)!=null&&ut.putState({observerId:at})&&this.dynamicPpt.updateObserverId&&this.dynamicPpt.updateObserverId(at)}},{key:"dynamicPpt",get:function(){return this.viewsHubProxy.owner.dynamicPpt}},{key:"fetchNextPptSlideIfNeeded",value:function(at){var ut;if(this.preloadDynamicPPT&&at.index+1<at.scenes.length){var ot=(ut=at.scenes[at.index+1].ppt)==null?void 0:ut.src;this.dynamicPpt.getPptSildeDefinition(ot||"")}}},{key:"getRoomMembers",value:function(){return this.membersMapper.targets}},{key:"getInvisiblePlugin",value:function(at){return this.invisiblePluginNode.get(at)}},{key:"dispatchMagixEventWithObject",value:function(at,ut,ot){var gt=at;Sl(gt.payload)&&(gt=hn(Qr({},gt),{payload:gt.payload.primitiveBuffer})),this.magixEventsManager.dispatchEvent(gt,ut,ot)}},{key:"addMagixEventListener",value:function(at,ut,ot){var gt=this.standardizeOptions(ot),xt=!!gt.fireSelfEventAfterCommit,Mt=gt.fireInterval;Mt===void 0?this.magixEventsManager.addMagixEventListener(at,ut,xt):(Mt<RN&&(this.logger.warn("fireInterval ".concat(Mt,"ms of event ").concat(JSON.stringify(at)," can't less than ").concat(RN,"ms, it's will be reset as ").concat(RN,"ms")),Mt=RN),this.magixEventsManager.addMagixEventsListener(at,ut,Mt,xt))}},{key:"standardizeOptions",value:function(at){return typeof at>"u"?{}:typeof at=="number"?{fireInterval:at}:at}},{key:"removeMagixEventListener",value:function(at,ut){this.magixEventsManager.removeMagixEventListener(at,ut)}},{key:"waitMagixEvent",value:function(at){return this.magixEventsManager.waitMagixEvent(at)}},{key:"createScenesCallback",value:function(at,ut){return this.context&&this.context.scenesCallbacksHub.create(at,ut)}},{key:"memberState",value:function(at){return zy(this.applianceManager.getMemberState(at))}},{key:"getMemberInformation",value:function(at,ut){if(at.getMemberInformation)return at.getMemberInformation(ut);var ot=at.getMemberDisplayers(),gt=Jt(ot),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;if(Mt.memberId===ut)return Mt.information}}catch(kt){gt.e(kt)}finally{gt.f()}}},{key:"assertMainViewProxy",value:function(){var at=this.mainViewProxy;if(!at)throw new Error("can not use these methods or properties. you should pass useMultiViews: false");return at}},{key:"scenePreview",value:function(at,ut,ot,gt,xt){var Mt=this.assertMainViewProxy().owner;Mt&&Mt.scenePreview(at,ut,ot,gt,xt)}},{key:"generateScreenshot",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.abrupt("return",this.assertMainViewProxy().owner.generateScreenshot(ot,gt,xt));case 1:case"end":return kt.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()},{key:"fillSceneSnapshot",value:function(at,ut,ot,gt,xt){var Mt;(Mt=this.assertMainViewProxy().owner)==null||Mt.fillSceneSnapshot(at,ut,ot,gt,xt)}},{key:"screenshotToCanvas",value:function(at,ut,ot,gt,xt,Mt){var kt;(kt=this.assertMainViewProxy().owner)==null||kt.screenshotToCanvas(at,ut,ot,gt,xt,Mt)}},{key:"screenshotToCanvasAsync",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt,Mt,kt,zt,Ht){var rr;return regeneratorRuntime.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,(rr=this.assertMainViewProxy().owner)==null?void 0:rr.screenshotToCanvasAsync(ot,gt,xt,Mt,kt,zt,Ht);case 2:case"end":return _r.stop()}},ut,this)}));function at(ut,ot,gt,xt,Mt,kt,zt){return ct.apply(this,arguments)}return at})()},{key:"getBoundingRect",value:function(at){return this.assertMainViewProxy().owner.getBoundingRect(at)}},{key:"convertToPointInWorld",value:function(at){var ut=this.assertMainViewProxy().owner;return ut?ut.convertToPointInWorld(at):{x:at.x,y:at.y}}},{key:"handToolActive",get:function(){return this.assertMainViewProxy().state.handToolActive},set:function(at){this.assertMainViewProxy().putState({handToolActive:at})&&this.onlyCallbackRemoteStateModify&&this.callbacks.dispatch("onHandToolActive",function(ut){return ut(at)})}},{key:"handToolKey",get:function(){return this.assertMainViewProxy().state.handToolKey}},{key:"disableCameraTransform",get:function(){return this.assertMainViewProxy().state.disableCameraTransform},set:function(at){this.assertMainViewProxy().putState({disableCameraTransform:at})&&this.onlyCallbackRemoteStateModify&&this.callbacks.dispatch("onHandToolActive",function(ut){return ut(at)})}},{key:"commandWheelToZoom",get:function(){var at;return((at=this.assertMainViewProxy().owner)==null?void 0:at.commandWheelToZoom)||!1},set:function(at){this.assertMainViewProxy().owner.commandWheelToZoom=at}},{key:"bindHtmlElement",value:function(at){this.assertMainViewProxy().putState({divElement:at})}},{key:"setCameraBound",value:function(at){this.assertMainViewProxy().putState({cameraBound:at})}},{key:"moveCamera",value:function(at){this.assertMainViewProxy().putState({cameraMoving:{camera:at}})}},{key:"moveCameraToContain",value:function(at){this.assertMainViewProxy().putState({cameraMoving:{toContaint:at}})}},{key:"refresh",value:function(){this.viewsHub.fireReloadLibrary()}}]),yt})(),pv;(function(yt){yt.Connecting="connecting",yt.Connected="connected",yt.Reconnecting="reconnecting",yt.Disconnecting="disconnecting",yt.Disconnected="disconnected"})(pv||(pv={}));var WM;(function(yt){yt.ThrowError="throwError",yt.Warn="warn",yt.Ignore="ignore"})(WM||(WM={}));var h5=ln(require$$125),PN,hL=function(ct){if(PN)return PN;var at=Zy.shuntApiHosts.agora;return ct.includes("cn")&&(at=Zy.shuntApiHosts.shengwang),PN=new Zo({fetcher:window.fetch.bind(window),retryCount:2,retryLoopsCount:0,configmap:{api:{hosts:{"*":at}},"ppt-api":{hosts:{"*":Zy.hosts.pptApi}}}}),PN},AO=ln(requireReact()),fL=ln(requireReact()),f5=ln(require$$116),ix=ln(requireReact()),j0=ln(requireReact());function ax(yt){return tv[yt]}var pL=ln(requireReact()),yS=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.didUnmount=!1,ot.onMouseDown=function(gt){var xt=0;if(gt.button===xt){ot.setState({isPressed:!0});var Mt=function kt(zt){zt.button===xt&&(document.body.removeEventListener("mouseup",kt),ot.didUnmount||ot.setState({isPressed:!1}))};document.body.addEventListener("mouseup",Mt)}},ot.state={isHover:!1,isPressed:!1},ot}return Bt(at,[{key:"componentWillUnmount",value:function(){this.didUnmount=!0}},{key:"render",value:function(){var ot=this,gt=this.props.className;gt!==void 0?gt="button "+gt:gt="button",this.props.disable&&(gt+=" disable");var xt=this.props.refObject;return pL.createElement("div",{className:gt,ref:xt,onMouseEnter:function(){return ot.setState({isHover:!0})},onMouseLeave:function(){return ot.setState({isHover:!1})},onMouseDown:this.onMouseDown,onTouchEnd:this.props.onClick,onClick:this.props.onClick},this.props.children)}}]),at})(pL.Component),CO=ln(requireReact()),MR=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.divRef=CO.createRef(),ot.onMouseDown=function(gt){var xt=ot.divRef.current,Mt=gt.target;if(xt&&!at.isEventFiredOnElement(Mt,xt)){var kt=ot.props.onShouldBecomeHide;kt(Mt)}},document.body.addEventListener("mousedown",ot.onMouseDown),ot}return Bt(at,[{key:"componentWillUnmount",value:function(){document.body.removeEventListener("mousedown",this.onMouseDown)}},{key:"render",value:function(){var ot=hn(Qr({},this.props),{ref:this.divRef});delete ot.onShouldBecomeHide;var gt=ot.children;return CO.createElement("div",Qr({},ot),gt)}}],[{key:"isEventFiredOnElement",value:function(ot,gt){for(var xt=ot;xt;){if(xt===gt)return!0;xt=xt.parentElement}return!1}}]),at})(CO.Component);function p5(yt){var ct=yt.viewMovingState,at=yt.delegate,ut=yt.components;return{width:95,height:40,node:function(gt,xt,Mt,kt,zt,Ht){var rr=xt+kt/2<=Ht/2;return j0.createElement(Bx,{key:"font-size",delegate:at,viewMovingState:ct,components:ut,isMenuToDown:rr})}}}function mL(yt){var ct=Math.floor(yt);return yt>=ct+.5&&(ct+=1),ct}var Bx=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.inputRef=j0.createRef(),ot.upArrowButton=Object.freeze({iconName:"arrow-up",isUp:!0,ref:j0.createRef()}),ot.downArrowButton=Object.freeze({iconName:"arrow-down",isUp:!1,ref:j0.createRef()}),ot.onFocusInput=function(){var gt=ot.inputRef.current;gt&&(gt.type="text",gt.setSelectionRange(0,gt.value.length),gt.type="number",ot.setState({isFocusInput:!0}))},ot.onShouldBecomeHide=function(gt){var xt=ot.inputRef.current,Mt=ot.upArrowButton.ref.current,kt=ot.downArrowButton.ref.current;xt&&Mt&&kt&&!MR.isEventFiredOnElement(gt,Mt)&&!MR.isEventFiredOnElement(gt,kt)&&ot.commitFontSizeWithString(xt.value)},ot.onPressKeyInput=function(gt){gt.key==="Enter"&&ot.commitFontSizeWithString(gt.target.value)},ot.state={overrideFontSize:void 0,hoverIndex:void 0,isFocusInput:!1},ot}return Bt(at,[{key:"onSelectFontSize",value:function(ot){this.commitFontSizeWithInt(ot),this.setState({overrideFontSize:void 0,hoverIndex:void 0,isFocusInput:!1})}},{key:"getFontSize",value:function(){var ot=this.props.components,gt,xt=Jt(ot),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.currentScale,Ht=kt.textSize,rr=mL(zt*Ht);if(gt===void 0)gt=rr;else if(gt!==rr){gt=void 0;break}}}catch(ur){xt.e(ur)}finally{xt.f()}return gt}},{key:"shouldUpdateFontSize",value:function(ot){var gt=this.props.components,xt=Jt(gt),Mt;try{for(xt.s();!(Mt=xt.n()).done;){var kt=Mt.value,zt=kt.currentScale,Ht=kt.textSize;if(zt*Ht!==ot)return!0}}catch(rr){xt.e(rr)}finally{xt.f()}return!1}},{key:"commitFontSizeWithString",value:function(ot){var gt,xt=Number.parseFloat(ot);Number.isNaN(xt)||(xt=mL(xt),xt=Math.max(xt,Bx.minFontSize),xt=Math.min(xt,Bx.maxFontSize),this.commitFontSizeWithInt(xt),(gt=this.inputRef.current)==null||gt.blur(),this.setState({overrideFontSize:void 0,isFocusInput:!1,hoverIndex:void 0}))}},{key:"commitFontSizeWithInt",value:function(ot){if(this.shouldUpdateFontSize(ot)){var gt=this.props,xt=gt.viewMovingState,Mt=gt.delegate;xt.maskHideFloatBarSometime(),Mt.updateTextareaFontSize(ot)}}},{key:"renderMenu",value:function(ot){var gt=this,xt=this.inputRef.current;if(!xt)return null;var Mt=Bx,kt=Mt.menuMargin,zt=Mt.menuSize,Ht=zt.width,rr=zt.height,ur=this.props.isMenuToDown,_r=xt.offsetLeft+(xt.offsetWidth-Ht)/2,Dr;return ur?Dr=xt.offsetTop+xt.offsetHeight+kt:Dr=xt.offsetTop-kt-rr,j0.createElement(MR,{className:"font-size-menu",style:{left:_r,top:Dr,width:Ht,height:rr},onMouseLeave:function(){return gt.setState({hoverIndex:void 0})},onShouldBecomeHide:this.onShouldBecomeHide},this.renderFontSizeList(ot))}},{key:"renderFontSizeList",value:function(ot){for(var gt=this,xt=parseInt(ot,10),Mt=Bx,kt=Mt.fontSizeList,zt=[],Ht=function(_r){var Dr=kt[_r],Br=null,Ur="cell";xt===Dr&&(Br=j0.createElement("img",{className:"check",alt:"check",src:ax("check")}));var Zr=gt.state.hoverIndex;_r===Zr&&(Ur+=" hover"),zt.push(j0.createElement("div",{key:"".concat(_r),className:Ur,onMouseEnter:function(){return gt.setState({hoverIndex:_r})},onClick:function(){return gt.onSelectFontSize(Dr)}},Br&&j0.createElement("div",{className:"check"}),j0.createElement("span",null,Dr),Br))},rr=0;rr<kt.length;++rr)Ht(rr);return zt}},{key:"renderArrowButton",value:function(ot,gt){var xt=this,Mt,kt=Number.parseFloat(ot),zt=Bx,Ht=zt.fontSizeList;if(!Number.isNaN(kt))if(gt.isUp)for(var rr=0;rr<Ht.length;++rr){var ur=Ht[rr];if(ur>kt){Mt=ur;break}}else for(var _r=Ht.length-1;_r>=0;--_r){var Dr=Ht[_r];if(Dr<kt){Mt=Dr;break}}var Br=gt.iconName,Ur=function(){if(Mt!==void 0){var Tn=xt.props.viewMovingState;Tn.maskHideFloatBarSometime(),xt.commitFontSizeWithInt(Mt),xt.setState({overrideFontSize:void 0,hoverIndex:void 0})}};return j0.createElement(yS,{className:"arrow-button "+(gt.isUp?"up":"down"),disable:Mt===void 0,refObject:gt.ref,onClick:Ur},j0.createElement("img",{alt:"icon",src:ax(Br)}))}},{key:"render",value:function(){var ot=this,gt=this.state,xt=gt.overrideFontSize,Mt=gt.isFocusInput,kt=xt;if(kt===void 0){var zt=this.getFontSize();zt===void 0?kt="":kt="".concat(zt)}return j0.createElement(j0.Fragment,{key:"font-size"},j0.createElement("div",{className:"decorator"},j0.createElement("img",{className:"font-size-icon",alt:"icon",src:ax(Mt?"font-size-active":"font-size")})),j0.createElement("input",{className:"font-size-input",type:"number",value:kt,ref:this.inputRef,onFocus:this.onFocusInput,onKeyUp:this.onPressKeyInput,onChange:function(rr){return ot.setState({overrideFontSize:rr.target.value})}}),Mt&&this.renderMenu(kt),j0.createElement("div",{className:"decorator"},j0.createElement("div",{className:"font-size-buttons"},this.renderArrowButton(kt,this.upArrowButton),this.renderArrowButton(kt,this.downArrowButton))))}}]),at})(j0.Component);Bx.minFontSize=1,Bx.maxFontSize=999,Bx.fontSizeList=Object.freeze([12,14,18,24,36,48,64,80,144,288]),Bx.menuMargin=21,Bx.menuSize=Object.freeze({width:64,height:248}),Bx=kn([sA],Bx);var P1=ln(requireReact());function NN(yt,ct,at){var ut=yt.viewMovingState,ot=yt.components,gt=yt.colors;return{width:40,height:40,node:function(Mt,kt,zt,Ht,rr,ur){var _r=kt+Ht/2<=ur/2;return P1.createElement(sx,{key:at?"fill-colors":"font-colors",viewMovingState:ut,colors:gt,components:ot,parentWidth:zt,parentHeight:Ht,isFillColor:at,isMenuToDown:_r,onUpdateColor:ct})}}}function gL(yt,ct){if(yt.length!==ct.length)return!1;for(var at=0;at<yt.length;++at)if(yt[at]!==ct[at])return!1;return!0}var sx=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.onClickDisplayButton=function(){var gt=ot.state.isDisplayMenu;gt||ot.setState({isDisplayMenu:!0})},ot.state={isDisplayMenu:!1},ot}return Bt(at,[{key:"onClickColorButton",value:function(ot){var gt=this.props.onUpdateColor;gt(ot?Ct(ot):void 0),this.setState({isDisplayMenu:!1})}},{key:"getSelectedColor",value:function(ot){var gt,xt=this.props.components,Mt=Jt(xt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value,Ht=this.getComponentColor(zt,ot);if(Ht){if(!gt)gt=Ht;else if(!gL(gt,Ht)){gt=void 0;break}}}}catch(rr){Mt.e(rr)}finally{Mt.f()}return gt}},{key:"getComponentColor",value:function(ot,gt){var xt,Mt;return gt?((xt=ot.state)==null?void 0:xt.fillColor)||ot.fillColor:ot.color||((Mt=ot.state)==null?void 0:Mt.strokeColor)||ot.strokeColor}},{key:"renderMenu",value:function(ot){var gt=this,xt=this.props,Mt=xt.isMenuToDown,kt=xt.isFillColor,zt=xt.colors,Ht=xt.parentWidth,rr=xt.parentHeight,ur=zt.length+(kt?1:0),_r=Math.ceil(ur/sx.menuLineCellsCount),Dr=Math.min(ur,sx.menuLineCellsCount)*sx.menuCellSize.width+2*sx.menuPadding,Br=_r*sx.menuCellSize.height+2*sx.menuPadding,Ur=sx,Zr=Ur.menuMargin,Tn=Ht-Dr,jn;return Mt?jn=rr+Zr:jn=-(Zr+Br),P1.createElement(MR,{className:"font-colors-menu",style:{left:Tn,top:jn,width:Dr,height:Br},onShouldBecomeHide:function(){return gt.setState({isDisplayMenu:!1})}},this.renderColorButtons(ot))}},{key:"renderColorButtons",value:function(ot){for(var gt=this,xt=this.props,Mt=xt.colors,kt=xt.isFillColor,zt=[],Ht=!1,rr=function(Br){var Ur=Mt[Br],Zr="rgb(".concat(Ur[0],", ").concat(Ur[1],", ").concat(Ur[2],")"),Tn="font-color-button";ot&&gL(ot,Ur)?(Tn+=" font-color-selected",Ht=!0):Tn+=" font-color-not-selected",zt.push(P1.createElement("div",{key:"".concat(Br),className:Tn,onTouchEnd:function(){return gt.onClickColorButton(Ur)},onClick:function(){return gt.onClickColorButton(Ur)}},P1.createElement("div",{className:"core",style:{backgroundColor:Zr}})))},ur=0;ur<Mt.length;++ur)rr(ur);if(kt){var _r="font-color-button";Ht?_r+=" font-color-not-selected":_r+=" font-color-selected",zt.push(P1.createElement("div",{key:"transparent",className:_r,onTouchEnd:function(){return gt.onClickColorButton(void 0)},onClick:function(){return gt.onClickColorButton(void 0)}},P1.createElement("div",{className:"core chessboard"})))}return zt}},{key:"render",value:function(){var ot=this.props.isFillColor,gt=this.getSelectedColor(ot),xt=gt&&"rgb(".concat(gt[0],",").concat(gt[1],",").concat(gt[2],")"),Mt=xt&&P1.createElement("div",{className:"bar",style:{backgroundColor:xt}}),kt=this.state.isDisplayMenu,zt=kt?"font-colors-active":"font-colors",Ht="font-color-button";return ot&&gt?Ht+=" font-color-selected":Ht+=" font-color-not-selected",P1.createElement(P1.Fragment,null,P1.createElement(yS,{className:"normal-button",onClick:this.onClickDisplayButton},ot?P1.createElement("div",{className:Ht},P1.createElement("div",{className:gt?"core":"core chessboard",style:{backgroundColor:xt}})):P1.createElement("div",{className:"font-colors-icon"},P1.createElement("img",{alt:"icon",src:ax(zt)}),Mt)),kt&&this.renderMenu(gt))}}]),at})(P1.Component);sx.menuMargin=8,sx.menuPadding=8,sx.menuLineCellsCount=4,sx.menuCellSize=Object.freeze({width:28,height:28}),sx=kn([sA],sx);var bS=ln(requireReact());function DO(yt){var ct=yt.delegate;return{width:40,height:40,node:function(ut,ot,gt,xt,Mt,kt){var zt=ot+xt/2<=kt/2;return bS.createElement(JC,{key:"image-layer-button",isMenuToDown:zt,delegate:ct})}}}var JC=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.buttonRef=bS.createRef(),ot.state={isDisplayMenu:!1},ot}return Bt(at,[{key:"renderMenu",value:function(){var ot=this,gt=this.buttonRef.current;if(!gt)return null;var xt=JC.menuSize,Mt=xt.width,kt=xt.height,zt=JC,Ht=zt.menuMargin,rr=this.props,ur=rr.isMenuToDown,_r=rr.delegate,Dr=gt.offsetLeft+(gt.offsetWidth-Mt)/2,Br;return ur?Br=gt.offsetTop+gt.offsetHeight+Ht:Br=gt.offsetTop-Ht-kt,bS.createElement(MR,{className:"image-layer-menu",style:{left:Dr,top:Br,width:Mt,height:kt},onShouldBecomeHide:function(){return ot.setState({isDisplayMenu:!1})}},bS.createElement(yS,{key:"layer-unlock",className:"normal-button",onClick:function(){return _r.moveSelectedComponentsToTop()}},bS.createElement("img",{alt:"icon",src:ax("to-top")})),bS.createElement(yS,{key:"layer-lock",className:"normal-button",onClick:function(){return _r.moveSelectedComponentsToBottom()}},bS.createElement("img",{alt:"icon",src:ax("to-bottom")})))}},{key:"render",value:function(){var ot=this,gt=this.state.isDisplayMenu,xt=gt?"layer-pressed":"layer";return bS.createElement(bS.Fragment,null,bS.createElement(yS,{key:"layer",className:"normal-button ".concat(gt?"highlight-button":""),refObject:this.buttonRef,onClick:function(){return ot.setState({isDisplayMenu:!gt})}},bS.createElement("img",{alt:"icon",src:ax(xt)})),gt&&this.renderMenu())}}]),at})(bS.Component);JC.menuMargin=21,JC.menuSize=Object.freeze({width:72,height:40}),JC=kn([sA],JC);var DA=Object.freeze({top:12,bottom:24,left:12,right:12}),kN=Object.freeze({top:1,bottom:1,left:1,right:1});function m5(yt){var ct=yt.whiteModel,at=ct.BezierCurveShape,ut=ct.ImageShape,ot=ct.TextareaShape,gt=ct.Shape,xt=ct.RectangleShape,Mt=ct.EllipseShape,kt=ct.VectorShape,zt=[],Ht=yt.components;if(Ht.length===0)return zt;var rr=0,ur=0,_r=0,Dr=0,Br=!1,Ur=!0,Zr=!0,Tn=!0,jn=!0,ts=!0,us=Jt(Ht),Os;try{for(us.s();!(Os=us.n()).done;){var Hs=Os.value;if(hm(Hs,at))rr+=1;else if(hm(Hs,ut))ur+=1;else if(hm(Hs,ot)){var Ks=Hs,so=Ks.format;so.bold||(Zr=!1),so.italic||(Tn=!1),so.underline||(jn=!1),so.lineThrough||(ts=!1),_r+=1}else hm(Hs,xt)||hm(Hs,Mt)||hm(Hs,gt)?(Br=!0,Dr+=1):hm(Hs,kt)&&(Dr+=1);Hs.locked||(Ur=!1)}}catch(yu){us.e(yu)}finally{us.f()}var To=40,Oo=40;if(rr===Ht.length){var Au=yt.delegate;zt.push({width:To,height:Oo,node:function(){return ON(yt)}}),zt.push(DO(yt)),zt.push({width:To,height:Oo,node:function(){return qN(yt)}}),zt.push(NN(yt,function(yu){yu&&Au.updatePencilColor(yu)}))}else if(yt.delegate.updateShapeColor&&Dr===Ht.length){var Tu=yt.delegate;zt.push({width:To,height:Oo,node:function(){return ON(yt)}}),zt.push(DO(yt)),zt.push({width:To,height:Oo,node:function(){return qN(yt)}}),zt.push(NN(yt,function(yu){yu&&Tu.updateShapeColor(yu)})),yt.delegate.updateShapeFillColor&&Br&&zt.push(NN(yt,function(yu){Tu.updateShapeFillColor(yu)},!0))}else if(ur===Ht.length)zt.push({width:To,height:Oo,node:function(){return ON(yt)}}),zt.push({width:To,height:Oo,node:function(){return g5(yt,Ur)}}),Ur||zt.push(DO(yt)),zt.push({width:To,height:Oo,node:function(){return qN(yt)}});else if(_r===Ht.length){var xu=yt.delegate;zt.push({width:To,height:Oo,node:function(){return ON(yt)}}),zt.push({width:To,height:Oo,node:function(){return qN(yt)}}),zt.push({width:To,height:Oo,node:function(){return y5(yt,Zr)}}),zt.push({width:To,height:Oo,node:function(){return b5(yt,Tn)}}),zt.push({width:To,height:Oo,node:function(){return _5(yt,ts)}}),zt.push({width:To,height:Oo,node:function(){return x5(yt,jn)}}),zt.push(p5(yt)),zt.push(NN(yt,function(yu){return xu.updateTextareaFormat({color:yu})}))}return zt}function ON(yt){var ct=yt.delegate,at=yt.isEditTextarea;return ix.createElement(yS,{key:"delete",className:"normal-button",onClick:function(){return ct.delete()},disable:at},ix.createElement("img",{alt:"delete",src:ax("delete")}))}function g5(yt,ct){var at=yt.delegate,ut=!ct;return ix.createElement(yS,{key:"lock",className:"normal-button",onClick:function(){return at.lockImages(ut)}},ix.createElement("img",{alt:"lock",src:ax(ct?"unlock-new":"lock-new")}))}function y5(yt,ct){var at=yt.viewMovingState,ut=yt.delegate,ot=!ct;return ix.createElement(yS,{key:"text-blob",className:"normal-button",onClick:function(){at.maskHideFloatBarSometime(),ut.updateTextareaFormat({bold:ot})}},ix.createElement("img",{alt:"text-blob",src:ax(ct?"bold-active":"bold")}))}function b5(yt,ct){var at=yt.viewMovingState,ut=yt.delegate,ot=!ct;return ix.createElement(yS,{key:"text-italic",className:"normal-button",onClick:function(){at.maskHideFloatBarSometime(),ut.updateTextareaFormat({italic:ot})}},ix.createElement("img",{alt:"text-italic",src:ax(ct?"italic-active":"italic")}))}function _5(yt,ct){var at=yt.viewMovingState,ut=yt.delegate,ot=!ct;return ix.createElement(yS,{key:"text-line-through",className:"normal-button",onClick:function(){at.maskHideFloatBarSometime(),ut.updateTextareaFormat({lineThrough:ot})}},ix.createElement("img",{alt:"text-line-through",src:ax(ct?"line-through-active":"line-through")}))}function x5(yt,ct){var at=yt.viewMovingState,ut=yt.delegate,ot=!ct;return ix.createElement(yS,{key:"text-underline",className:"normal-button",onClick:function(){at.maskHideFloatBarSometime(),ut.updateTextareaFormat({underline:ot})}},ix.createElement("img",{alt:"text-underline",src:ax(ct?"underline-active":"underline")}))}function qN(yt){var ct=yt.delegate,at=yt.isEditTextarea;return ix.createElement(yS,{key:"duplicate",className:"normal-button",onClick:function(){return ct.duplicate()},disable:at},ix.createElement("img",{alt:"duplicate",src:ax("duplicate")}))}var IR=ln(require$$116);function LN(yt,ct){return Math.abs(yt-ct)<=.01}var S5=(function(){function yt(ct){var at=this;Ot(this,yt),this.latestCallMaskTimestamp=0,this.timer=null,this._shouldHideFloatBar=!1,this.onAfterMoving=function(){at._shouldHideFloatBar&&(at._shouldHideFloatBar=!1),at.timer=null},this.rectangle=ct,(0,IR.makeObservable)(this,{_shouldHideFloatBar:IR.observable,setState:IR.action,release:IR.action})}return Bt(yt,[{key:"shouldHideFloatBar",get:function(){return this._shouldHideFloatBar}},{key:"setState",value:function(at,ut){var ot=this,gt=this.rectangle,xt=!LN(gt.originX,at.originX)||!LN(gt.originY,at.originY),Mt=!LN(gt.width,at.width)||!LN(gt.height,at.height);(xt||!ut&&Mt)&&(!this._shouldHideFloatBar&&Date.now()>=this.latestCallMaskTimestamp+yt.maskDuration&&(this._shouldHideFloatBar=!0),this.timer!==null&&clearTimeout(this.timer),this.timer=setTimeout(function(){return(0,IR.runInAction)(ot.onAfterMoving)},yt.cameraTouchInterval)),(xt||Mt)&&(this.rectangle=at)}},{key:"maskHideFloatBarSometime",value:function(){this.latestCallMaskTimestamp=Date.now()}},{key:"release",value:function(){this.timer!==null&&(clearTimeout(this.timer),this.timer=null,this._shouldHideFloatBar=!1)}}]),yt})(),MO=S5;MO.cameraTouchInterval=300,MO.maskDuration=100;var vL;(function(yt){yt[yt.Top=0]="Top",yt[yt.Bottom=1]="Bottom",yt[yt.Left=2]="Left",yt[yt.Right=3]="Right",yt[yt.Center=4]="Center"})(vL||(vL={}));var FN=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,ut),ot.lockView=function(gt){ot.setState({lockedPosition:gt})},ot.state={lockedPosition:void 0},ot.viewMovingState=new MO(ut.rectangle),ot}return Bt(at,[{key:"componentDidMount",value:function(){var ot=this,gt=!0;this.disposer=(0,f5.autorun)(function(){ot.viewMovingState.shouldHideFloatBar?gt||(ot.unlockView(),gt=!0):gt=!1})}},{key:"componentDidUpdate",value:function(){var ot=this.props.rectangle;this.viewMovingState.setState(ot,this.isEditTextarea())}},{key:"componentWillUnmount",value:function(){var ot;this.viewMovingState.release(),(ot=this.disposer)==null||ot.call(this)}},{key:"isEditTextarea",value:function(){var ot=this.props,gt=ot.components,xt=ot.whiteModel.TextareaShape,Mt=Jt(gt),kt;try{for(Mt.s();!(kt=Mt.n()).done;){var zt=kt.value;if(hm(zt,xt)&&zt.editedBy!==void 0)return!0}}catch(Ht){Mt.e(Ht)}finally{Mt.f()}return!1}},{key:"position",value:function(ot,gt){var xt=ot.originX,Mt=ot.originY,kt=xt+ot.width,zt=Mt+ot.height,Ht=kN.left+kN.right,rr=kN.top+kN.bottom,ur=0,_r=Jt(gt),Dr;try{for(_r.s();!(Dr=_r.n()).done;){var Br=Dr.value,Ur=Br.width,Zr=Br.height;Ht+=Ur,ur=Math.max(ur,Zr)}}catch(Ks){_r.e(Ks)}finally{_r.f()}rr+=ur;var Tn=Ht+DA.left+DA.right,jn=rr+DA.top+DA.bottom,ts=this.props.screenSize,us=ts.width,Os=ts.height,Hs;return Mt>=jn?Hs=0:Os-zt>=jn?Hs=1:xt>=Tn?Hs=2:us-kt>=Tn?Hs=3:Hs=4,{left:xt,right:kt,top:Mt,bottom:zt,position:Hs,boxWidth:Ht,boxHeight:rr,width:Tn,height:jn}}},{key:"centerXWithTopOrBottom",value:function(ot,gt){var xt=Math.max(ot.left,0),Mt=Math.min(ot.right,gt),kt=ot.width/2,zt=(xt+Mt)/2;return zt-kt<0?zt=kt:zt+kt>gt&&(zt=gt-kt),zt}},{key:"unlockView",value:function(){this.setState({lockedPosition:void 0})}},{key:"render",value:function(){var ot=this,gt=this.props,xt=gt.whiteModel,Mt=gt.components,kt=gt.screenSize,zt=gt.rectangle,Ht=gt.view,rr=gt.cnode,ur=gt.room;if(!ur||this.viewMovingState.shouldHideFloatBar)return null;var _r;Ht?_r=Ht.floatBarDelegate:_r=ur.getMainViewIfExits().floatBarDelegate;var Dr=this.state.lockedPosition,Br=m5({viewMovingState:this.viewMovingState,isEditTextarea:this.isEditTextarea(),whiteModel:xt,components:Mt,delegate:_r,colors:ur.floatBarOptions.colors});if(Br.length<=0)return null;var Ur=Dr||this.position(zt,Br),Zr=kt.width,Tn=kt.height,jn,ts;switch(Ur.position){case 0:{jn=this.centerXWithTopOrBottom(Ur,Zr),ts=Ur.top-Ur.height/2;break}case 1:{jn=this.centerXWithTopOrBottom(Ur,Zr),ts=Ur.bottom+Ur.height/2;break}case 2:{jn=Ur.left-Ur.width/2,ts=Math.max(Ur.top,0)+Ur.height/2;break}case 3:{jn=Ur.right+Ur.width/2,ts=Math.max(Ur.top,0)+Ur.height/2;break}case 4:{var us=Math.max(Ur.left,0),Os=Math.min(Ur.right,Zr),Hs=Math.max(Ur.top,0);jn=(us+Os)/2,ts=Hs+Ur.height/2;break}}var Ks=jn-Ur.width/2,so=ts-Ur.height/2,To="translate(".concat(Ks,"px,").concat(so,"px)"),Oo=[],Au=Ks,Tu=Jt(Br),xu;try{for(Tu.s();!(xu=Tu.n()).done;){var yu=xu.value,sp=yu.width,Jl=yu.node,Ml=Jl(Au,so,Ur.boxWidth,Ur.boxHeight,Zr,Tn);Oo.push(Ml),Au+=sp}}catch(Qp){Tu.e(Qp)}finally{Tu.f()}return fL.createElement(Gw,{context:rr,className:"float-bar",onMouseEnter:function(){return ot.lockView(Ur)},style:{WebkitTransform:To,transform:To,width:Ur.boxWidth,height:Ur.boxHeight,padding:0,marginLeft:DA.left,marginRight:DA.right,marginTop:DA.top,marginBottom:DA.bottom}},Oo)}}],[{key:"willInterruptEvent",value:function(){return!0}}]),at})(fL.Component);FN=kn([sA],FN);var w5=(function(yt){It(at,yt);var ct=qt(at);function at(){return Ot(this,at),ct.apply(this,arguments)}return Bt(at,[{key:"render",value:function(){var ot=this;return AO.createElement(aL,null,function(gt){return AO.createElement(FN,hn(Qr({},ot.props),{room:gt}))})}}],[{key:"willInterruptEvent",value:function(){return FN.willInterruptEvent()}}]),at})(AO.Component);function T5(yt){var ct;return typeof yt=="boolean"?yt?ct=Object.freeze({colors:yL()}):ct=void 0:yt&&(ct=Object.freeze({colors:yL(yt.colors)})),ct}function yL(yt){return yt?Object.freeze(yt.map(function(ct){return Object.freeze(Ct(ct))})):E5}var E5=Object.freeze([Object.freeze([224,32,32]),Object.freeze([250,100,0]),Object.freeze([247,181,0]),Object.freeze([109,212,0]),Object.freeze([68,215,182]),Object.freeze([50,197,255]),Object.freeze([0,145,255]),Object.freeze([98,54,255]),Object.freeze([182,32,224]),Object.freeze([109,114,120]),Object.freeze([0,0,0])]),A5=(function(){function yt(ct){Ot(this,yt),this.lastCommitValues={},this.sumNodes={},this.maxValues={},this.minValues={},this.lastCommitTimestamp=Date.now(),this.backgroundValues=Object.freeze(Qr({},ct))}return Bt(yt,[{key:"report",value:function(){var at={},ut={},ot={};for(var gt in this.backgroundValues){var xt=this.backgroundValues[gt],Mt=this.sumNodes[gt],kt=this.maxValues[gt],zt=this.minValues[gt];if(Mt===void 0)at[gt]=xt;else if(Mt.otherValueSum===void 0)at[gt]=Mt.firstValue;else{var Ht=this.lastCommitTimestamp-Mt.beginAt,rr=Ht/Mt.count,ur=Mt.firstValue*rr+Mt.otherValueSum,_r=rr+Ht;_r>0?at[gt]=ur/_r:at[gt]=xt}kt===void 0?ut[gt]=xt:ut[gt]=kt,zt===void 0?ot[gt]=xt:ot[gt]=zt}return this.lastCommitTimestamp=Date.now(),this.sumNodes={},this.maxValues={},this.minValues={},{averageValues:at,maxValues:ut,minValues:ot}}},{key:"clean",value:function(){this.lastCommitTimestamp=Date.now(),this.sumNodes={},this.maxValues={},this.minValues={};for(var at in this.lastCommitValues)delete this.lastCommitValues[at]}},{key:"commit",value:function(at){var ut=Date.now();this.commitSumValues(ut,at),this.commitMaxAndMinValues(at),this.lastCommitTimestamp=ut}},{key:"commitSumValues",value:function(at,ut){for(var ot in ut)ut[ot]!==void 0&&(this.lastCommitValues[ot]=ut[ot]);for(var gt in this.lastCommitValues){var xt=this.lastCommitValues[gt],Mt=this.sumNodes[gt];Mt===void 0?this.sumNodes[gt]={beginAt:at,firstValue:xt,count:1,otherValueSum:xt}:(Mt.count+=1,Mt.otherValueSum===void 0?Mt.otherValueSum=xt*(at-Mt.beginAt):Mt.otherValueSum+=xt*(at-this.lastCommitTimestamp))}}},{key:"commitMaxAndMinValues",value:function(at){for(var ut in at){var ot=at[ut],gt=this.maxValues[ut],xt=this.minValues[ut];gt===void 0?this.maxValues[ut]=ot:this.maxValues[ut]=Math.max(gt,ot),xt===void 0?this.minValues[ut]=ot:this.minValues[ut]=Math.min(xt,ot)}}}]),yt})(),C5=(function(){function yt(ct,at){var ut=this,ot=ct.connection,gt=ct.disconnection,xt=ct.sample;Ot(this,yt),this.statisticsTimer=null,this.onReportStatistics=function(){ut.statisticsTimer=null,ut.latestReportAt=Date.now();var Mt=ut.statistics.report(),kt=Mt.maxValues,zt=Mt.minValues,Ht=Mt.averageValues;ut.sampleCommitter.commit({maxRTT:kt.rtt,minRTT:zt.rtt,averageRTT:Ht.rtt,maxQueue:kt.illusionQueueLength,minQueue:zt.illusionQueueLength,averageQueue:Ht.illusionQueueLength,maxInterval:kt.frameReceivedInterval,minInterval:zt.frameReceivedInterval,averageInterval:Ht.frameReceivedInterval}),ut.tracker.commit({name:"akko-rtt",result:"",reason:"",payload:{min:Math.round(zt.rtt),max:Math.round(kt.rtt),avg:Math.round(Ht.rtt)}}),ut.tracker.commit({name:"akko-interval",result:"",reason:"",payload:{min:Math.round(zt.frameReceivedInterval),max:Math.round(kt.frameReceivedInterval),avg:Math.round(Ht.frameReceivedInterval)}})},this.connectionCommitter=ot,this.disconnectionCommitter=gt,this.sampleCommitter=xt,this.statistics=new A5({rtt:0,frameReceivedInterval:0,illusionQueueLength:0}),this.tracker=at}return Bt(yt,[{key:"commitConnection",value:function(at){this.connectionCommitter.commit(at)}},{key:"commitDisconnection",value:function(at){this.disconnectionCommitter.commit(at)}},{key:"commitStatistics",value:function(at){if(this.latestReportAt===void 0&&(this.latestReportAt=Date.now()),this.statisticsTimer===null){var ut=this.latestReportAt+yt.reportStatisticsInterval,ot=Date.now(),gt=ut-ot;gt<0&&(gt=yt.reportStatisticsInterval,this.statistics.clean()),this.statisticsTimer=setTimeout(this.onReportStatistics,gt)}this.statistics.commit(at)}},{key:"stop",value:function(){this.statisticsTimer!==null&&(clearTimeout(this.statisticsTimer),this.statisticsTimer=null)}}]),yt})(),bL=C5;bL.reportStatisticsInterval=60*1e3;var Iv;(function(yt){yt.Hand="cursor-hand",yt.HandGrasp="cursor-hand-grasp",yt.LaserPointer="cursor-laserPointer",yt.Selector="cursor-selector",yt.Pencil="cursor-pencil",yt.Eraser="cursor-eraser",yt.PencilEraser1="cursor-pencil-eraser-1",yt.PencilEraser2="cursor-pencil-eraser-2",yt.PencilEraser3="cursor-pencil-eraser-3",yt.Rectangle="cursor-rectangle",yt.Ellipse="cursor-ellipse",yt.Shape="cursor-shape",yt.Straight="cursor-straight",yt.Arrow="cursor-arrow",yt.Text="cursor-text",yt.Nwse="cursor-nwse",yt.Nesw="cursor-nesw",yt.Ns="cursor-ns",yt.Ew="cursor-ew",yt.Rotation="cursor-rotation",yt.Ban="cursor-ban"})(Iv||(Iv={}));var _L=Object.freeze((tt={},rt(tt,Iv.Hand,Object.freeze(["url(".concat(tv["hand-loosen"],") 7 7, auto;"),"-webkit-image-set(url(".concat(tv["hand-loosen"],") 7 7, auto);")])),rt(tt,Iv.HandGrasp,Object.freeze(["url(".concat(tv["hand-grasp"],") 6 6, auto;"),"-webkit-image-set(url(".concat(tv["hand-grasp"],") 6 6, auto);")])),rt(tt,Iv.LaserPointer,Object.freeze(["url(".concat(tv["laser-pointer-cursor"],") 14 14, auto;"),"-webkit-image-set(url(".concat(tv["laser-pointer-cursor"],") 14 14, auto);")])),rt(tt,Iv.Rotation,Object.freeze(["url(".concat(tv.rotation,") 12 12, auto;"),"-webkit-image-set(url(".concat(tv.rotation,") 12 12, auto);")])),rt(tt,Iv.Selector,Object.freeze(["url(".concat(tv["selector-cursor"],") 5 4, auto;"),"-webkit-image-set(url(".concat(tv["selector-cursor"],") 1x, url(").concat(tv["selector-cursor@2x"],") 2x) 5 4, auto;")])),rt(tt,Iv.Pencil,Object.freeze(["url(".concat(tv["pencil-cursor"],") 2 22, auto;"),"-webkit-image-set(url(".concat(tv["pencil-cursor"],") 1x, url(").concat(tv["pencil-cursor@2x"],") 2x) 2 22, auto;")])),rt(tt,Iv.Eraser,Object.freeze(["url(".concat(tv["eraser-cursor"],") 8 18, auto;"),"-webkit-image-set(url(".concat(tv["eraser-cursor"],") 1x, url(").concat(tv["eraser-cursor@2x"],") 2x) 8 18, auto;")])),rt(tt,Iv.PencilEraser1,Object.freeze(["url(".concat(tv["pencil-eraser-1"],") 9 13, auto;"),"-webkit-image-set(url(".concat(tv["pencil-eraser-1"],") 9 13, auto);")])),rt(tt,Iv.PencilEraser2,Object.freeze(["url(".concat(tv["pencil-eraser-2"],") 13 17, auto;"),"-webkit-image-set(url(".concat(tv["pencil-eraser-2"],") 13 17, auto);")])),rt(tt,Iv.PencilEraser3,Object.freeze(["url(".concat(tv["pencil-eraser-3"],") 17 25, auto;"),"-webkit-image-set(url(".concat(tv["pencil-eraser-3"],") 17 25, auto);")])),rt(tt,Iv.Rectangle,Object.freeze(["crosshair;"])),rt(tt,Iv.Ellipse,Object.freeze(["crosshair;"])),rt(tt,Iv.Shape,Object.freeze(["crosshair;"])),rt(tt,Iv.Straight,Object.freeze(["crosshair;"])),rt(tt,Iv.Arrow,Object.freeze(["crosshair;"])),rt(tt,Iv.Text,Object.freeze(["text;"])),rt(tt,Iv.Nwse,Object.freeze(["nwse-resize;"])),rt(tt,Iv.Nesw,Object.freeze(["nesw-resize;"])),rt(tt,Iv.Ns,Object.freeze(["ns-resize;"])),rt(tt,Iv.Ew,Object.freeze(["ew-resize;"])),rt(tt,Iv.Ban,Object.freeze(["not-allowed"])),tt)),D5=(function(){function yt(){Ot(this,yt),this.isInjected=!1}return Bt(yt,[{key:"injectDefaultStyleIfNotInjectBefore",value:function(){this.isInjected||(this.injectToDom(_L),this.isInjected=!0)}},{key:"injectCustomStyle",value:function(at){if(this.isInjected)throw new Error("cannot be called repeatedly, or after new WhiteWebSdk().");var ut=Qr(Qr({},_L),at);this.injectToDom(ut),this.isInjected=!0}},{key:"injectToDom",value:function(at){if(Object.keys(at).length>0){var ut=document.createElement("style"),ot=[];for(var gt in at){var xt=at[gt];if(xt){var Mt=".netless-whiteboard.".concat(gt," {").concat(xt.map(function(zt){return"cursor: ".concat(zt)}).join(""),"}");ot.push(Mt)}}ut.appendChild(document.createTextNode(ot.join("")));var kt=document.head;kt&&kt.appendChild(ut)}}}]),yt})(),xL=new D5;function M5(yt){xL.injectCustomStyle(yt)}var IO=ln(require$$116),I5=(function(){function yt(ct){Ot(this,yt),this.useMobX=ct}return Bt(yt,[{key:"filter",value:function(at){return this.useMobX?this.copyValue(at):at}},{key:"copyValue",value:function(at){return tr(at)!="object"||at===null?at:(0,IO.isObservableObject)(at)?this.copyObservableObject(at):(0,IO.isObservableArray)(at)||at instanceof Array?this.copyArray(at):this.copyObject(at)}},{key:"copyObservableObject",value:function(at){var ut={},ot=Jt((0,IO.keys)(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;ut[xt]=this.copyValue(at[xt])}}catch(Mt){ot.e(Mt)}finally{ot.f()}return ut}},{key:"copyArray",value:function(at){for(var ut=[],ot=at.length,gt=0;gt<ot;++gt)ut[gt]=this.copyValue(at[gt]);return ut}},{key:"copyObject",value:function(at){var ut={};for(var ot in at)ut[ot]=this.copyValue(at[ot]);return ut}}]),yt})(),R5=(function(){function yt(ct,at,ut){var ot=this;Ot(this,yt),this.queue=[],this.limiter=new Nu(at,function(){var gt=ot.queue.shift();if(gt){try{ut(gt.event,gt.payload)}catch(xt){ct.error(xt)}ot.queue.length>0&&ot.limiter.invoke()}})}return Bt(yt,[{key:"dispatch",value:function(at,ut){this.queue.push({event:at,payload:ut}),this.limiter.invoke()}}]),yt})(),P5=(function(){function yt(){Ot(this,yt),this.copyBuffer=null}return Bt(yt,[{key:"cleanBuffer",value:function(){this.copyBuffer=null}},{key:"duplicate",value:function(at,ut){return at.duplicate(this.createDelta(),this.createDelta(),ut)}},{key:"copy",value:function(at,ut){this.copyBuffer=at.copy(null,ut)}},{key:"paste",value:function(at,ut){var ot=null;return this.copyBuffer&&(ot=at.paste(this.copyBuffer,this.createDelta(),this.createDelta(),ut)),ot}},{key:"toBase64",value:function(){if(this.copyBuffer){var at=this.copyBuffer.primitiveBuffer,ut=new Uint8Array(at);if(ut.length<65535)return btoa(String.fromCharCode.apply(this,ut));{for(var ot="",gt=0;gt<ut.length;gt+=1)ot+=String.fromCharCode(ut[gt]);return btoa(ot)}}return""}},{key:"fromBase64",value:function(at){for(var ut=atob(at),ot=new Uint8Array(ut.length),gt=0;gt<ut.length;gt+=1)ot[gt]=ut.charCodeAt(gt);this.copyBuffer=Iu(ot.buffer)}},{key:"createDelta",value:function(){var at=yt.maxDeltaDistance;return at*(Math.random()*2-1)}}]),yt})(),SL=P5;SL.maxDeltaDistance=12;var N5=function yt(){var ct=this;Ot(this,yt),this.onPageJumpTo=function(at,ut){var ot="".concat(at,"/").concat(ut,".slide"),gt=ct.room.state.sceneState.scenes,xt=gt.findIndex(function(Mt){return!!Mt.ppt&&Mt.ppt.src.endsWith(ot)});xt>=0&&ct.room.setSceneIndex(xt)},this.onPageToNext=function(){var at=ct.room.state.sceneState,ut=at.scenes,ot=at.index;ot<ut.length-1&&ct.room.setSceneIndex(ot+1)},this.onPageToPrev=function(){var at=ct.room.state.sceneState.index;at>=1&&ct.room.setSceneIndex(at-1)}},k5=500,O5="__netlessMemberState",q5=1,RR="modules",L5=(function(){function yt(ct){var at=this;Ot(this,yt),this.writingBuffer=null,this.invoker=function(){var ut=at.writingBuffer;ut&&ht(regeneratorRuntime.mark(function ot(){var gt;return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return at.limiter.freeze(),Mt.prev=1,gt={uid:at.uid,timestamp:Date.now(),memberState:ut},Mt.next=5,at.write(at.uuid,JSON.stringify(gt));case 5:return Mt.prev=5,at.limiter.unfreeze(),Mt.finish(5);case 8:case"end":return Mt.stop()}},ot,null,[[1,,5,8]])}))().catch(function(ot){return console.error(ot)})},this.uid=ct,this.limiter=new Nu(k5,this.invoker)}return Bt(yt,[{key:"getMemberState",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.prev=0,zt.next=3,this.read(ot);case 3:xt=zt.sent,zt.next=9;break;case 6:return zt.prev=6,zt.t0=zt.catch(0),zt.abrupt("return",(console.warn("read from indexedDB failed: ".concat(zt.t0.message)),null));case 9:if(!xt){zt.next=13;break}if(Mt=JSON.parse(xt),Mt.uid!==gt){zt.next=13;break}return zt.abrupt("return",this.writingBuffer=Mt.memberState);case 13:return zt.abrupt("return",null);case 14:case"end":return zt.stop()}},ut,this,[[0,6]])}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"setMemberState",value:function(at){var ut={},ot=Jt(H4),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value,Mt=at[xt];Mt!==void 0&&(ut[xt]=Mt)}}catch(kt){ot.e(kt)}finally{ot.f()}this.limiter.invoke(),this.writingBuffer=Qr(Qr({},this.writingBuffer),zy(ut))}},{key:"dispose",value:function(){this.limiter.cancel(),this.writingBuffer=null}},{key:"read",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,yt.dbp;case 2:return gt=kt.sent.transaction([RR],"readonly").objectStore(RR).get(ot),kt.next=5,RO(gt);case 5:return xt=kt.sent,kt.abrupt("return",(typeof xt!="string"&&(xt=void 0),xt));case 7:case"end":return kt.stop()}},ut)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"write",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,yt.dbp;case 2:return xt=kt.sent.transaction([RR],"readwrite").objectStore(RR).put(gt,ot),kt.next=5,RO(xt);case 5:case"end":return kt.stop()}},ut)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()}],[{key:"dbp",get:function(){if(!this._dbp)if(typeof indexedDB>"u")this._dbp=Promise.reject(new Error("indexedDB is not supported"));else{var at=indexedDB.open(O5,q5);at.onupgradeneeded=function(ut){ut.target.result.createObjectStore(RR)},this._dbp=RO(at)}return this._dbp}}]),yt})();function RO(yt){return new Promise(function(ct,at){yt.onsuccess=function(){return ct(yt.result)},yt.onerror=function(){if(yt.error){var ut=new Error(yt.error.message);ut.name=yt.error.name,at(ut)}else at(new Error("failed with null Error"))}})}var PO=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;return Ot(this,at),ot=ct.call(this,{whiteTracker:ut.whiteTracker,logger:ut.whiteLogger,region:ut.region,useMobXState:ut.useMobXState,screenType:ut.screenType,renderEngine:ut.renderEngine,boundless:ut.boundless,cameraBound:ut.cameraBound,autoResize:ut.autoResize,plugins:ut.plugins,invisiblePlugins:ut.invisiblePlugins,wrappedComponents:ut.wrappedComponents,preloadDynamicPPT:ut.preloadDynamicPPT,disableCameraTransform:ut.disableCameraTransform,useMultiViews:ut.useMultiViews,userFonts:ut.userFonts,handToolKey:ut.handToolKey,fontFamily:ut.fontFamily,pptHandler:ut.useMultiViews?void 0:new N5,memberStateStorage:ut.disableKeepMemberState?void 0:new L5(ut.userPayload.uid),onlyCallbackRemoteStateModify:ut.onlyCallbackRemoteStateModify,enableTextareHub:ut.enableTextareHub,floatBarClass:ut.floatBarOptions&&w5,globalStateUpdater:function(xt){return ot.setGlobalState(xt)},disableOperations:!1,disableOthersSelectingBox:ut.disableOthersSelectingBox,disableCurveAnimes:ut.disableCurveAnimes,disableRotation:ut.disableRotation,disableNewPencilStroke:ut.disableNewPencilStroke,willHideSelfCursor:!1,cursorAdapter:ut.cursorAdapter,eraserRadiusCursor:ut.eraserRadiusCursor,eventInterrupter:function(xt){return ot.willInterruptEvent(xt)},urlInterrupter:ut.urlInterrupter,callbacks:ut.callbacks,pptParams:ut.pptParams,userPayload:ut.userPayload,hotKeys:new _B(ut.hotKeys),copyOperator:new SL,enableSelfCurveAnime:!1,undoStacksHub:new jq(ut.undoCacheScenesCount,function(gt,xt){ot.applianceManager.execute(gt,xt)}),commandWheelToZoom:ut.commandWheelToZoom,modulesOrigin:ut.modulesOrigin}),ot._phase=pv.Connecting,ot._isWritable=!1,ot._enableWriteNow=!1,ot.isEraser=!1,ot.disableSerializationCache=!0,ot.didConnected=!1,ot.viewInputsHub=null,ot.viewStateObserver=null,ot.beginReconnectAt=0,ot.isHandGrasp=!1,ot.lastRoomPhase=null,ot.componentsLimit={limit:0,timer:0},ot.onRoomStateChanged=function(gt){gt.globalState&&ot.dynamicPpt.setGlobalState(zy(gt.globalState)),gt.memberState&&(ot.isEraser=at.checkIsEraser(gt.memberState.currentApplianceName),ot.refreshShouldDisableImageHit(),ot.refreshCursorClass()),gt.sceneState&&ot.fetchNextPptSlideIfNeeded(gt.sceneState),ot.callbacks.dispatch("onRoomStateChanged",function(xt){return xt(gt)})},ot.onReceivedHandMouseEvent=function(gt,xt,Mt){if(ot.magix.phase===ql.Connected)switch(xt.kind){case Ls.MouseDown:case Ls.SortedTouchStart:{ot.isHandGrasp=!0,gt.putState({handToolActive:!0}),ot.refreshCursorClass();break}case Ls.MouseUp:case Ls.SortedTouchEnd:case Ls.SortedTouchCancel:{ot.isHandGrasp=!1,gt.putState({handToolActive:!1}),ot.refreshCursorClass();break}}},ot.onHandMouseEventCompleted=function(gt){ot.isHandGrasp=!1,gt.putState({handToolActive:!1}),ot.refreshCursorClass()},ot.onModified=function(){if(ot._phase===pv.Connected){var gt=ot.viewStateObserver;v0.Follower===gt.getCurrentMode()&&gt.refreshCameraRectangle()}},ot.onReconnected=function(gt){var xt;(xt=ot.statistics)==null||xt.commitConnection(hn(Qr({},gt),{isReconnection:!0})),ot.fireTriggerRebuild(),ot.syncCameraToRemote(),ot.magix.isWritable&&(ot.receoverDisableSerialization(),ot.recoverMemberState().catch(function(Mt){return console.error(Mt)}),ot.refreshPptState())},ot.onDisconnectWithError=function(gt){var xt,Mt;ot.beginReconnectAt!==0&&((xt=ot.statistics)==null||xt.commitDisconnection({isReconnection:!0,duration:Date.now()-ot.beginReconnectAt})),ot.callbacks.dispatch("onDisconnectWithError",function(kt){return kt(gt)}),ot.logger.error("onDisconnectWithError",gt),(Mt=ot.tracker)==null||Mt.commit({name:"disconnect",result:"",payload:{errorMessage:gt.message},reason:ot.disconnectErrorClassification(gt.message)})},ot.updateSelfUserId=function(gt){gt===void 0?(ot.setObserverId(Pr),ot._isWritable=!1):(ot.setObserverId(gt),ot._isWritable=!0),ot.refreshSyncOperations(),ot.refreshCursorClass(),ot.isEnableModifyWithoutThrowError()&&ot.receoverDisableSerialization()},ot.onCameraTransform=function(gt){pv.Connected===ot._phase&&oS.Begin===gt&&v0.Follower===ot.stateTrigger.state.broadcastState.mode&&(ot._isWritable?ot.applianceManager.setViewState({mode:v0.Freedom}):ot.viewStateObserver.overrideWithFreedom(!0))},ot.onCameraUpdated=function(){if(ot._isWritable)switch(ot.stateTrigger.state.broadcastState.mode){case v0.Broadcaster:case v0.Freedom:{ot.syncCameraToRemoteLimiter.invoke();break}}},ot.syncCameraToRemote=function(){ot.syncMainView(ot.mainView)},ot.updateSession=function(gt){ot.logger.context=hn(Qr({},ot.logger.context),{session:gt})},ot.onPhaseChanged=function(gt){var xt;ot.logger.info("change room phase to "+gt),gt===ql.Disconnected&&ot.dispose();var Mt=pv.Connecting;switch(gt){case ql.Ready:case ql.Connecting:{Mt=pv.Connecting;break}case ql.Connected:{Mt=pv.Connected;break}case ql.Reconnecting:{Mt=pv.Reconnecting;break}case ql.Disconnecting:{Mt=pv.Disconnecting;break}case ql.Disconnected:{Mt=pv.Disconnected;break}}switch(Mt){case pv.Reconnecting:{ot.beginReconnectAt=Date.now();break}case pv.Connected:{ot.beginReconnectAt=0;break}}var kt=ot._phase!==Mt;ot._phase=Mt,ot.refreshSyncOperations(),ot.didConnected&&ot.refreshCursorClass(),kt&&ot.callbacks.dispatch("onPhaseChanged",function(zt){return zt(Mt)}),ot.lastRoomPhase&&ot.lastRoomPhase.phase===pv.Reconnecting&&Mt===pv.Connected&&((xt=ot.tracker)==null||xt.commit({name:"reconnect",result:"success",reason:"",payload:{duration:Date.now()-ot.lastRoomPhase.at}})),ot.lastRoomPhase={phase:Mt,at:Date.now()}},ot.dispatchEvent=function(gt,xt){var Mt=xt;Mt instanceof ArrayBuffer&&(Mt=Iu(Mt)),ot.magix.dispatch(gt,Mt)},ot.apiFetch=hL(ut.region).fetch("api"),ot.uid=ut.userPayload.uid,ot.statistics=ut.qualityComitters&&new bL(ut.qualityComitters,ut.whiteTracker),ot.rejectWhenReadonlyErrorLevel=ut.rejectWhenReadonlyErrorLevel||WM.ThrowError,ot.disablePencilWrittingLimitFrequency=ut.disablePencilWrittingLimitFrequency,ot.magix=ut.akkoApp.createMagix({logger:ot.logger,userPayload:ut.userPayload,libraryNodeFetcher:ot.libraryNodeFetcher,callbacks:{onConnection:function(xt){return ot.callbacks.dispatch("onConnection",function(Mt){return Mt(xt)})},onPhaseChanged:ot.onPhaseChanged,onDisconnectWithError:ot.onDisconnectWithError,onModified:ot.onModified,onSelfUserIdUpdate:ot.updateSelfUserId,onSessionChanged:ot.updateSession,onEventFire:function(xt){return ot.dispatchMagixEventWithObject(xt,!1,xt.authorId===ot.observerId)},onEventFireACK:function(xt){return ot.dispatchMagixEventWithObject(xt,!0,xt.authorId===ot.observerId)},onReconnected:ot.onReconnected,onKickedWithReason:function(xt){return ot.callbacks.dispatch("onKickedWithReason",function(Mt){return Mt(xt)})},onCatchErrorWhenAppendFrame:function(xt,Mt){ot.callbacks.dispatch("onCatchErrorWhenAppendFrame",function(kt){return kt(xt,Mt)})},onSliceChanged:function(xt){return ot.callbacks.dispatch("onSliceChanged",function(Mt){return Mt(xt)})},onReceivedRttReport:ot.statistics&&function(gt){return ot.statistics.commitStatistics({rtt:gt})},onIllusionQueueLengthChanged:ot.statistics&&function(gt){ot.statistics.commitStatistics({illusionQueueLength:gt})},onFrameReceivedInterval:ot.statistics&&function(gt){ot.statistics.commitStatistics({frameReceivedInterval:gt})}}}),ot.eventsQueue=ut.disableMagixEventDispatchLimit?null:new R5(ot.logger,Q4,ot.dispatchEvent),ot.useNativeClipboard=ut.useNativeClipboard||!1,ot._disableDeviceInputs=ut.disableDeviceInputs,ot._disableEraseImage=ut.disableEraseImage,ot.syncCameraToRemoteLimiter=new Nu(K4,ot.syncCameraToRemote),ot.newPencilWritingQuality=ut.newPencilWritingQuality,ot.parametersFilter=new I5(ut.useMobXState),ot.floatBarOptions=ut.floatBarOptions,ot.pptHandler&&(ot.pptHandler.room=Kt(ot)),ot}return Bt(at,[{key:"applianceManager",get:function(){return this.magix.trigger}},{key:"isWritable",get:function(){return this.magix.isWritable}},{key:"enableWriteNow",get:function(){return this._enableWriteNow}},{key:"setWritable",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt=this,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(this.logger.info("set writable "+xt),kt=this.viewStateObserver,!xt){ur.next=14;break}return ur.next=5,this.magix.setWritable(xt,this.deviceType);case 5:return this.pencilOptions.becomeWritable(this.applianceManager),zt=this.applianceManager.getViewState().mode,zt!==v0.Broadcaster&&(Ht=kt.getCurrentMode(),Ht!==zt&&this.stateTrigger.activeUpdate("broadcastState",function(){return Mt.applianceManager.setViewState({mode:Ht}),kt.getBroadcastState()})),ur.next=10,this.recoverMemberState();case 10:this.syncCameraToRemote(),kt.setReadonlyMode(!1),ur.next=17;break;case 14:return kt.setReadonlyMode(!0),ur.next=17,this.magix.setWritable(xt);case 17:case"end":return ur.stop()}},gt,this)}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"disableDeviceInputs",get:function(){return this._disableDeviceInputs},set:function(ot){this._disableDeviceInputs=ot,this.refreshSyncOperations(),this.refreshCursorClass()}},{key:"disableEraseImage",get:function(){return this._disableEraseImage},set:function(ot){this._disableEraseImage=ot,this.refreshShouldDisableImageHit()}},{key:"disableSerialization",get:function(){return this._phase===pv.Connected?this.disableSerializationCache:!0},set:function(ot){this.isEnableModify()&&(ot&&this.copyOperator.cleanBuffer(),this.applianceManager.setEnableExecute(!ot),this.disableSerializationCache=ot)}},{key:"uuid",get:function(){return this._uuid}},{key:"session",get:function(){return this.magix.session}},{key:"slice",get:function(){return this.magix.slice}},{key:"roomToken",get:function(){return this._roomToken}},{key:"phase",get:function(){return this._phase}},{key:"calibrationTimestamp",get:function(){return this.magix.calibrationTimestamp}},{key:"state",get:function(){return this.stateTrigger.state}},{key:"timeDelay",get:function(){return this.magix.timeDelay},set:function(ot){this.magix.timeDelay=ot}},{key:"syncMode",get:function(){return this.magix.syncMode},set:function(ot){this.magix.syncMode=ot}},{key:"setupLibraryNode",value:function(ot,gt){var xt=this,Mt,kt=this.mainView;this.viewInputsHub=new qB({deviceType:ot,screenType:this.screenType,magix:this.magix,pencilOptions:this.pencilOptions,onReceivedHandMouseEvent:this.onReceivedHandMouseEvent,onHandMouseEventCompleted:this.onHandMouseEventCompleted}),this.updateLibraryNode(gt),this.viewStateObserver=new tL(this.viewsHub,this.magix.trigger),this.viewsHub.setupViewInput({viewInputsHub:this.viewInputsHub,magix:this.magix,viewsHub:this.viewsHub,cameraObserver:this.cameraObserver,pencilOptions:this.pencilOptions,bezierCurvePainter:this.bezierCurvePainter,disablePencilWrittingLimitFrequency:this.disablePencilWrittingLimitFrequency,newPencilWritingQuality:this.newPencilWritingQuality,getCursorStyleWithRadius:function(ur){return xt.getCursorStyleWithRadius(ur)}}),kt&&this.unregisterMainView(kt),this.mainView&&this.registerMainView(this.mainView);var zt=this.cameraObserver,Ht=this.applianceManager;this.stateTrigger=new kq({useMobXMode:this.useMobXState,disableMaskKey:this.onlyCallbackRemoteStateModify,onStateChanged:this.onRoomStateChanged,propertyGetters:{globalState:function(){return Ht.getGlobalState()},memberState:function(){return Ht.getMemberState()||xt.getDefaultMemberState()},roomMembers:function(){return xt.getRoomMembers()},sceneState:function(){return xt.getCurrentSceneState()},broadcastState:function(){return xt.viewStateObserver.getBroadcastState()},cameraState:function(){return zt.cameraState}}}),this.invisiblePluginNode.isWatching=!0,this.isEraser=at.checkIsEraser((Mt=this.stateTrigger.state.memberState)==null?void 0:Mt.currentApplianceName),this.dynamicPpt.setGlobalState(zy(Ht.getGlobalState())),this.refreshSyncOperations(),this.refreshCursorClass(),this.refreshShouldDisableImageHit()}},{key:"registerMainView",value:function(ot){var gt=this;ot.callbacks.on("onKeyDown",function(xt){return gt.callbacks.dispatch("onKeyDown",function(Mt){return Mt(xt)})}),ot.callbacks.on("onKeyUp",function(xt){return gt.callbacks.dispatch("onKeyUp",function(Mt){return Mt(xt)})}),ot.callbacks.on("onCanRedoStepsUpdate",function(xt){return gt.callbacks.dispatch("onCanRedoStepsUpdate",function(Mt){return Mt(xt)})}),ot.callbacks.on("onCanUndoStepsUpdate",function(xt){return gt.callbacks.dispatch("onCanUndoStepsUpdate",function(Mt){return Mt(xt)})}),ot.callbacks.on("onActiveHotkey",function(xt){return gt.callbacks.dispatch("onActiveHotkey",function(Mt){return Mt(xt)})}),ot.cameraman.addCameraTransformationListener(this.onCameraTransform),ot.screen.addCameraUpdatedListener(this.onCameraUpdated)}},{key:"unregisterMainView",value:function(ot){ot.callbacks.off("onKeyDown"),ot.callbacks.off("onKeyUp"),ot.callbacks.off("onCanRedoStepsUpdate"),ot.callbacks.off("onCanUndoStepsUpdate"),ot.callbacks.off("onActiveHotkey"),ot.cameraman.removeCameraTransformationListener(this.onCameraTransform),ot.screen.removeCameraUpdatedListener(this.onCameraUpdated)}},{key:"dispose",value:function(){var ot;st(Ut(at.prototype),"dispose",this).call(this),this.didConnected&&this.viewsHub.releaseViewInput(),(ot=this.viewStateObserver)==null||ot.release(),this.didConnected&&this.stateTrigger.release(),clearInterval(this.componentsLimit.timer)}},{key:"willInterruptEvent",value:function(ot){if(ot instanceof KeyboardEvent){var gt=!1;return this.callbacks.dispatch("willInterceptKeyboardEvent",function(xt){xt(ot)&&(gt=!0)}),gt}return!1}},{key:"refreshSyncOperations",value:function(){var ot=!this._isWritable||this._phase===pv.Reconnecting||this._phase===pv.Disconnecting||this._phase===pv.Disconnected,gt=ot||this._disableDeviceInputs;this.hasLibraryNode&&(this.viewsHub.putState({disableBoundlessEvent:gt}),this.dynamicPpt.setDisableInteractive(gt)),this._enableWriteNow!==ot&&(this._enableWriteNow=ot,this.viewInputsHub&&!ot&&this.viewInputsHub.cleanWaitingEvents(),this.callbacks.dispatch("onEnableWriteNowChanged",function(xt){return xt(ot)}))}},{key:"disconnectErrorClassification",value:function(ot){return/connect fail/.test(ot)?"network error":/did dispose/.test(ot)?"room status error":/action bytes is over/.test(ot)?"user operation error":/cannot find pod uid/.test(ot)?"server error":"uncategorized error"}},{key:"syncMainView",value:function(ot){if(this._isWritable&&ot&&this.phase===pv.Connected){var gt=ot.screen,xt=gt.visionRectangle,Mt=gt.camera.scale*_O(this.screenType);this.applianceManager.setViewState({originX:xt.originX,originY:xt.originY,width:xt.width,height:xt.height,pixelWidth:Mt})}}},{key:"connect",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt=this,kt,zt,Ht,rr,ur,_r,Dr,Br,Ur,Zr;return regeneratorRuntime.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:return _r=Date.now(),jn.prev=1,this._uuid=xt.uuid,this._roomToken=xt.roomToken,this.pencilOptions=new W4(xt.enableDrawPoint,xt.disableNewPencil),this.memberStateStorage&&(this.memberStateStorage.uuid=xt.uuid),jn.next=5,this.magix.connect({uuid:xt.uuid,region:xt.region||Zy.defaultRegion,roomToken:xt.roomToken,connectedPayload:xt.deviceType,isWritable:xt.isWritable});case 5:if(Dr=jn.sent,Br=Dr.libraryNode,Ur=Dr.statistics,this.logger.context=hn(Qr({},this.logger.context),{session:this.magix.session}),this.setupLibraryNode(xt.deviceType,Br),this.magix.isWritable&&this.updateSelfUserId(this.magix.selfUserId),this._isWritable||this.viewStateObserver.setReadonlyMode(!0),jn.t0=this._isWritable,!jn.t0){jn.next=18;break}return this.pencilOptions.becomeWritable(this.applianceManager),jn.next=17,this.recoverMemberState();case 17:this.refreshPptState();case 18:(kt=this.statistics)==null||kt.commitConnection(hn(Qr({},Ur),{isReconnection:!1})),this.logger.info("join room success"),this.fetchNextPptSlideIfNeeded(this.state.sceneState),Zr=[500,1e3],this.componentsLimit={limit:Zr[0],timer:setInterval(function(){var ts=Mt.componentsLimit,us=ts.limit,Os=ts.timer,Hs=Mt.applianceManager.scene.components.length;if(us>0&&Hs>=us){var Ks=Zr.indexOf(us),so=Ks>=0&&Ks<Zr.length-1;Mt.callbacks.dispatch("onObjectsLimit",function(Oo){return Oo(us,so)}),console.warn("exceeds the limit of ".concat(us," components, current: ").concat(Hs));var To=so?Zr[Ks+1]:0;Mt.componentsLimit.limit=To,so||clearInterval(Os)}},5e3)},this.didConnected=!0,(zt=this.tracker)==null||zt.beginSession(),(Ht=this.tracker)==null||Ht.commit({name:"joinRoom",result:"success",reason:"",payload:{duration:Date.now()-_r}}),jn.next=28;break;case 25:throw jn.prev=25,jn.t1=jn.catch(1),(rr=this.statistics)==null||rr.commitDisconnection({isReconnection:!1,duration:Date.now()-_r}),this.logger.error("join room fail "+jn.t1),this.logger.error(jn.t1),(ur=this.tracker)==null||ur.commit({name:"joinRoom",result:"fail",reason:"uncategorized error",payload:{errorMessage:jn.t1.message,duration:Date.now()-_r}}),jn.t1;case 28:case"end":return jn.stop()}},gt,this,[[1,25]])}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"recoverMemberState",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(){var xt=this,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,(Mt=this.memberStateStorage)==null?void 0:Mt.getMemberState(this._uuid,this.uid);case 2:kt=Ht.sent,kt&&this.stateTrigger.activeUpdate("memberState",function(){return xt.applianceManager.setMemberState(kt)});case 4:case"end":return Ht.stop()}},gt,this)}));function ot(){return ut.apply(this,arguments)}return ot})()},{key:"onScreenSizeUpdated",value:function(){this.stateTrigger.state.broadcastState.mode!==v0.Follower&&this.syncCameraToRemoteLimiter.invoke()}},{key:"syncBlockTimestamp",value:function(ot){this.magix.syncBlockTimestamp(ot)}},{key:"stopBlockTimestamp",value:function(){this.magix.stopBlockTimestamp()}},{key:"dispatchMagixEvent",value:function(ot,gt){if(this.isEnableModify())if(this.eventsQueue)this.eventsQueue.dispatch(ot,gt);else try{this.dispatchEvent(ot,gt)}catch(xt){this.logger.error(xt)}}},{key:"disconnect",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(){return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(this.logger.info("disconnect"),this._phase!==pv.Disconnected){Mt.next=2;break}throw new Error("room did disconnect");case 2:return Mt.next=4,this.magix.disconnect();case 4:case"end":return Mt.stop()}},gt,this)}));function ot(){return ut.apply(this,arguments)}return ot})()},{key:"setGlobalState",value:function(ot){var gt=this;return this.isEnableModify()?this.stateTrigger.activeUpdate("globalState",function(){var xt=gt.parametersFilter.filter(ot),Mt=gt.applianceManager.setGlobalState(xt);return gt.dynamicPpt.setGlobalState(zy(Mt)),Mt}):this.stateTrigger.state.globalState}},{key:"setMemberState",value:function(ot){var gt=JSON.parse(JSON.stringify(ot));return this.assertMainViewProxy().owner.setMemberState(gt)}},{key:"wrapSetMemberState",value:function(ot,gt,xt){var Mt;if(this.isEnableModify()){var kt=this.parametersFilter.filter(ot);kt.currentApplianceName&&(gt.cancelCurrentContinuityEvent(),this.beforeSceneChangeStoreCommit(gt));var zt=this.stateTrigger.activeUpdate("memberState",function(){return xt(kt)});return this.refreshCursorClass(),(Mt=this.memberStateStorage)==null||Mt.setMemberState(kt),zy(zt)}else return this.stateTrigger.state.memberState}},{key:"setViewMode",value:function(ot){var gt=this;this.logger.info("set view mode "+ot),this.assertRoomIsConnected();var xt=this.viewStateObserver;if(this._isWritable)this.stateTrigger.activeUpdate("broadcastState",function(){return gt.applianceManager.setViewState({mode:ot}),xt.getBroadcastState()}),ot===v0.Follower&&xt.refreshCameraRectangle();else switch(ot){case v0.Follower:{xt.overrideWithFreedom(!1),xt.refreshCameraRectangle();break}case v0.Freedom:{xt.overrideWithFreedom(!0);break}case v0.Broadcaster:throw new Error("cannot be broadcaster when room.isWritable is false")}}},{key:"updatePptPageInfo",value:function(){var ot=this.stateTrigger.state.sceneState,gt=ot.scenes,xt=ot.index,Mt=gt[xt],kt=Mt.ppt&&Mt.ppt.src,zt=kt&&this.dynamicPpt.getSlideUrl&&this.dynamicPpt.getSlideUrl(kt);zt&&this.setGlobalState(zy(this.dynamicPpt.globalStateWith({uuid:zt.uuid,pageIndex:zt.index,disableAutoPlay:!1})))}},{key:"setScenePath",value:function(ot){var gt=this;if(this.isEnableModify()){this.logger.info("change scene path ".concat(ot));var xt=this.applianceManager,Mt=this.scenePathType(ot),kt=ot;if(Mt===Lx.Dir){var zt=y1(xt.getSceneNames($v.parse(ot))).shift();kt=zt===void 0?kt:[kt,zt].join(DR)}this.beforeSceneChangeStoreCommit(),this.stateTrigger.activeUpdate("sceneState",function(){return xt.changeScene($v.parse(kt)),gt.getCurrentSceneState()}),this.updatePptPageInfo()}}},{key:"setSceneIndex",value:function(ot){var gt=this;if(this.isEnableModify()){var xt=this.stateTrigger.state.sceneState.scenes[ot];if(!xt)throw new Error("index ".concat(ot," is out of range"));var Mt=this.applianceManager,kt=Ct(Mt.getCurrentScenePath());kt.pop(),kt.push(xt.name),this.logger.info("change scene index ".concat(ot," /").concat(kt.join("/"))),this.beforeSceneChangeStoreCommit(),this.stateTrigger.activeUpdate("sceneState",function(){return Mt.changeScene(kt),gt.getCurrentSceneState()}),this.updatePptPageInfo()}}},{key:"moveCamera",value:function(ot){this.assertRoomIsConnected(),st(Ut(at.prototype),"moveCamera",this).call(this,ot)}},{key:"moveCameraToContain",value:function(ot){this.assertRoomIsConnected(),st(Ut(at.prototype),"moveCameraToContain",this).call(this,ot)}},{key:"putScenes",value:function(ot,gt,xt){var Mt=this;if(this.isEnableModify()){var kt=[],zt=Jt(gt),Ht;try{for(zt.s();!(Ht=zt.n()).done;){var rr=Ht.value;rr.name!==void 0?kt.push(this.parametersFilter.filter(rr)):kt.push({name:(0,h5.v1)().replace(/-/g,""),ppt:rr.ppt})}}catch(ur){zt.e(ur)}finally{zt.f()}this.logger.info("put Scenes ".concat(ot)),this.stateTrigger.activeUpdate("sceneState",function(){return Mt.applianceManager.putScenes($v.parse(ot),kt,xt),Mt.getCurrentSceneState()})}}},{key:"cleanCurrentScene",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,gt;this.logger.info("clean current scene"),(gt=this.assertMainViewProxy().owner)==null||gt.cleanCurrentScene(ot)}},{key:"removeScenes",value:function(ot){var gt=this;this.isEnableModify()&&(this.logger.info("remove scenes "+ot),this.stateTrigger.activeUpdate("sceneState",function(){return gt.applianceManager.removeScenes($v.parse(ot)),gt.getCurrentSceneState()}))}},{key:"moveScene",value:function(ot,gt){var xt=this;this.isEnableModify()&&this.stateTrigger.activeUpdate("sceneState",function(){return xt.applianceManager.moveScene($v.parse(ot),$v.parse(gt)),xt.getCurrentSceneState()})}},{key:"createWrappedComponents",value:function(){return[].concat(Ct(st(Ut(at.prototype),"createWrappedComponents",this).call(this)),[this.reactContext.createWrappedComponent(nL,this)])}},{key:"createPluginOperator",value:function(){var ot=this;return Object.freeze(hn(Qr({},st(Ut(at.prototype),"createPluginOperator",this).call(this)),{remove:function(xt){return ot.removePlugin(xt)},update:function(xt,Mt){return ot.updatePlugin(xt,Mt)},getPlugin:function(xt){return ot.applianceManager.getPlugin(xt)}}))}},{key:"insertImage",value:function(ot){var gt;(gt=this.assertMainViewProxy().owner)==null||gt.insertImage(ot)}},{key:"completeImageUpload",value:function(ot,gt){var xt;(xt=this.assertMainViewProxy().owner)==null||xt.completeImageUpload(ot,gt)}},{key:"lockImage",value:function(ot,gt){var xt;(xt=this.assertMainViewProxy().owner)==null||xt.lockImage(ot,gt)}},{key:"createInvisiblePlugin",value:function(ot,gt){return this.invisiblePluginNode.create(ot,gt)}},{key:"insertPlugin",value:function(ot,gt){if(this.assertMainViewProxy(),this.isEnableModify()){var xt=gt,Mt=xt&&xt.attributes,kt=this.assignAttributes(ot,Mt);return kt!==Mt&&(xt=hn(Qr({},xt),{attributes:kt})),this.applianceManager.insertPlugin(ot,xt).identifier}else return vl}},{key:"removePlugin",value:function(ot){var gt=!1;return this.isEnableModify()&&(gt=!!this.applianceManager.removePlugin(ot)),gt}},{key:"updatePlugin",value:function(ot,gt){var xt=!1;return this.isEnableModify()&&(xt=!!this.applianceManager.updatePlugin(ot,gt)),xt}},{key:"getPluginAttributes",value:function(ot){this.assertRoomIsConnected();var gt=this.applianceManager.getPlugin(ot);return gt&&gt.attributes}},{key:"getPluginRectangle",value:function(ot){this.assertRoomIsConnected();var gt=this.applianceManager.getPlugin(ot);return gt&&{originX:gt.originX,originY:gt.originY,width:gt.width,height:gt.height}}},{key:"insertText",value:function(ot,gt,xt){var Mt,kt=(Mt=this.assertMainViewProxy().owner)==null?void 0:Mt.insertText(ot,gt,xt);return kt===void 0&&(kt=vl),kt}},{key:"updateText",value:function(ot,gt){var xt;(xt=this.assertMainViewProxy().owner)==null||xt.updateText(ot,gt)}},{key:"updateSelectedText",value:function(ot){var gt;(gt=this.assertMainViewProxy().owner)==null||gt.updateSelectedText(ot)}},{key:"duplicate",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.duplicate()}},{key:"copy",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.copy()}},{key:"paste",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.paste()}},{key:"canUndoSteps",get:function(){var ot;return((ot=this.assertMainViewProxy().owner)==null?void 0:ot.canUndoSteps)||0}},{key:"canRedoSteps",get:function(){var ot;return((ot=this.assertMainViewProxy().owner)==null?void 0:ot.canUndoSteps)||0}},{key:"undo",value:function(){var ot=this.assertMainViewProxy().owner;return ot?ot.undo():0}},{key:"redo",value:function(){var ot=this.assertMainViewProxy().owner;return ot?ot.redo():0}},{key:"clearUndoHistory",value:function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,gt=this.assertMainViewProxy().owner;gt&&gt.clearUndoHistory(ot)}},{key:"delete",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.delete()}},{key:"lockImages",value:function(ot){var gt;(gt=this.assertMainViewProxy().owner)==null||gt.lockImages(ot)}},{key:"moveSelectedComponentsToTop",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.moveSelectedComponentsToTop()}},{key:"moveSelectedComponentsToBottom",value:function(){var ot;(ot=this.assertMainViewProxy().owner)==null||ot.moveSelectedComponentsToBottom()}},{key:"pptNextStep",value:function(){this.isEnableModify()&&this.pptMoveStep(1)}},{key:"pptPreviousStep",value:function(){this.isEnableModify()&&this.pptMoveStep(-1)}},{key:"pptMoveStep",value:function(ot){var gt=this.stateTrigger.state.sceneState,xt=gt.scenes,Mt=gt.index,kt=xt[Mt],zt=kt.ppt&&kt.ppt.src;if(zt&&this.dynamicPpt.getSlideUrl(zt))this.dynamicPpt.moveStep(ot);else{var Ht=Mt+ot;Ht>=0&&Ht<xt.length&&this.setSceneIndex(Ht)}}},{key:"refreshCursorClass",value:function(){var ot;switch(this.phase){case pv.Reconnecting:case pv.Disconnecting:case pv.Disconnected:{ot=Iv.Ban;break}case pv.Connected:{if(this.stateTrigger){var gt=this.stateTrigger.state.memberState;if(gt&&this._isWritable&&!this._disableDeviceInputs)switch(gt.currentApplianceName){case Hp.hand:{ot=this.isHandGrasp?Iv.HandGrasp:Iv.Hand;break}case Hp.pencilEraser:{var xt=gt.pencilEraserSize;typeof xt!="number"&&(xt=1),xt=Math.min(3,Math.max(1,Math.floor(xt))),ot="cursor-pencil-eraser-"+xt;break}default:{ot="cursor-"+gt.currentApplianceName;break}}else ot=null}break}}ot!==void 0&&this.viewsHub.putState({cursorClass:ot})}},{key:"refreshPptState",value:function(){this.updatePptPageInfo()}},{key:"receoverDisableSerialization",value:function(){this.disableSerializationCache||this.applianceManager.setEnableExecute(!0)}},{key:"refreshShouldDisableImageHit",value:function(){this.viewsHub.putState({disalbeImageHit:this._disableEraseImage&&this.isEraser})}},{key:"exportScene",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Mt=this.scenePathType(xt),Mt===Lx.Page){Ht.next=3;break}throw new Error("can export a page, because of ".concat(xt,"'s scene path type is ").concat(Mt));case 3:return Ht.next=5,this.apiFetch("http://api/v5/rooms/".concat(this.uuid,"/scenes-export/"),{method:"POST",headers:{token:this.roomToken,"content-type":"application/json",region:this.region},body:JSON.stringify({path:xt})});case 5:if(kt=Ht.sent,kt.status!==201){Ht.next=10;break}return Ht.next=9,kt.blob();case 9:return Ht.abrupt("return",Ht.sent);case 10:return Ht.t0=Error,Ht.t1="export scene fail: ",Ht.next=14,kt.text();case 14:throw Ht.t2=Ht.sent,Ht.t3=Ht.t1.concat.call(Ht.t1,Ht.t2),new Ht.t0(Ht.t3);case 17:case"end":return Ht.stop()}},gt,this)}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"importScene",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt,Mt,kt){var zt,Ht,rr,ur,_r,Dr,Br;return regeneratorRuntime.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:if(zt=this.scenePathType(xt),!(zt===Lx.Page||zt===Lx.Conflict)){Zr.next=4;break}throw Ht=zt===Lx.Page?"".concat(xt," is a scene page"):"".concat(xt," path contains a page"),new Error("can't import a scene in ".concat(xt,", because of ").concat(Ht));case 4:return Zr.next=6,this.getSceneFromBlob(Mt);case 6:if(rr=Zr.sent,ur=rr.name,_r=[xt,ur].join(DR),this.scenePathType(_r)!==Lx.Dir){Zr.next=11;break}throw new Error("can't import a scene in ".concat(_r," because of ").concat(_r," contains scene page"));case 11:return Dr=new FormData,Dr.append("dir",xt),Dr.append("payload",Mt),Dr.append("name",kt||ur||""),Zr.next=15,this.apiFetch("http://api/v5/rooms/".concat(this.uuid,"/scenes-import/"),{method:"POST",headers:{token:this.roomToken,region:this.region},body:Dr});case 15:if(Br=Zr.sent,!(Br.status>=300)){Zr.next=24;break}return Zr.t0=Error,Zr.t1="import scene fail: ",Zr.next=21,Br.text();case 21:throw Zr.t2=Zr.sent,Zr.t3=Zr.t1.concat.call(Zr.t1,Zr.t2),new Zr.t0(Zr.t3);case 24:return Zr.abrupt("return",(kt&&(rr.name=kt),rr));case 25:case"end":return Zr.stop()}},gt,this)}));function ot(gt,xt,Mt){return ut.apply(this,arguments)}return ot})()},{key:"getImagesInformation",value:function(ot){var gt=this.applianceManager;if(gt.getImagesInformation){var xt=$v.parse(ot);return zy(gt.getImagesInformation(xt))}return[]}},{key:"getSceneFromBlob",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){var Mt=this;return regeneratorRuntime.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.abrupt("return",new Promise(function(Ht,rr){var ur=new FileReader;ur.readAsArrayBuffer(xt),ur.onloadend=function(){if(ur.result instanceof ArrayBuffer)try{var _r=Iu(ur.result),Dr=Mt.applianceManager.getSceneFromFile(_r);Ht(zy(Dr))}catch(Br){rr(Br)}else rr(new Error("wrong content"))},ur.onerror=function(_r){rr(_r)}}));case 1:case"end":return zt.stop()}},gt)}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"isEnableModifyWithoutThrowError",value:function(){return this._phase!==pv.Connected?!1:!!this._isWritable}},{key:"isEnableModify",value:function(){if(this.assertRoomIsConnected(),this._isWritable)return!0;switch(this.rejectWhenReadonlyErrorLevel){case WM.ThrowError:throw new Error("you can only call it when room is writable");case WM.Warn:{this.logger.warn("you can only call it when room is writable");break}}return!1}},{key:"assertRoomIsConnected",value:function(){if(this._phase!==pv.Connected)throw new Error("you can only call it when room is connected. the phase of room is "+this._phase)}},{key:"beforeSceneChangeStoreCommit",value:function(ot){var gt=this.applianceManager.releaseAllTextarea(null,ot?.focusSceneId),xt=ot?.undoStack;xt&&gt&&xt.commit(gt)}}],[{key:"checkIsEraser",value:function(ot){switch(ot){case Hp.eraser:case Hp.pencilEraser:return!0;default:return!1}}}]),at})(dL),N1;(function(yt){yt.WaitingFirstFrame="waitingFirstFrame",yt.Playing="playing",yt.Pause="pause",yt.Stopped="stop",yt.Ended="ended",yt.Buffering="buffering"})(N1||(N1={}));var MA;(function(yt){yt.Directory="directory",yt.Freedom="freedom"})(MA||(MA={}));var XM;(function(yt){yt.Success="success",yt.SuccessButUnnecessary="successButUnnecessary",yt.Override="override",yt.Stopped="stopped"})(XM||(XM={}));var wL=ln(require$$116),F5=(function(){function yt(ct,at,ut){Ot(this,yt),this.isSeeking=!1,this.timer=0,this.delegate=ut,this.interval=at||3e3,this.threshold=ct||600}return Bt(yt,[{key:"align",value:function(at){var ut=this;window.clearTimeout(this.timer),this.delegate.setPlaybackSpeed(1);var ot=this.delegate.currentTime();if(!(Math.abs(at-ot)<this.threshold)){if(this.isSeeking){this.delegate.setPlaybackSpeed(1);return}if(ot<at){var gt=at-ot;if(gt<this.interval){var xt=gt/this.interval;this.delegate.setPlaybackSpeed(1+xt)}else this.isSeeking=!0,this.delegate.setPlaybackSpeed(1),this.delegate.seek(at).finally(function(){ut.isSeeking=!1})}else if(ot>at){var Mt=ot-at;if(Mt<this.interval){var kt=Mt/this.interval;this.delegate.setPlaybackSpeed(1-kt)}else this.isSeeking=!0,this.delegate.setPlaybackSpeed(1),this.delegate.seek(at).finally(function(){ut.isSeeking=!1})}this.timer=setTimeout(function(){ut.delegate.setPlaybackSpeed(1)},this.interval)}}}]),yt})(),B5=new Date("2019-06-23Z00:00:00").getTime(),TL=(function(yt){It(at,yt);var ct=qt(at);function at(ut){var ot;Ot(this,at),ot=ct.call(this,{whiteTracker:null,logger:ut.logger,region:ut.region,useMobXState:ut.useMobXState,screenType:ut.screenType,renderEngine:ut.renderEngine,boundless:ut.boundless,cameraBound:ut.cameraBound,autoResize:ut.autoResize,plugins:ut.plugins,invisiblePlugins:ut.invisiblePlugins,wrappedComponents:ut.wrappedComponents,preloadDynamicPPT:ut.preloadDynamicPPT,userFonts:ut.userFonts,handToolKey:ut.handToolKey,fontFamily:ut.fontFamily,onlyCallbackRemoteStateModify:ut.onlyCallbackRemoteStateModify,disableOthersSelectingBox:ut.disableOthersSelectingBox,disableCameraTransform:ut.disableCameraTransform,disableNewPencilStroke:ut.disableNewPencilStroke,useMultiViews:ut.useMultiViews,disableOperations:!0,willHideSelfCursor:!0,cursorAdapter:ut.cursorAdapter,eraserRadiusCursor:ut.eraserRadiusCursor,urlInterrupter:ut.urlInterrupter,pptParams:ut.pptParams,disableCurveAnimes:ut.disableCurveAnimes,disableRotation:ut.disableRotation,enableTextareHub:!1,enableSelfCurveAnime:!0,callbacks:ut.callbacks,modulesOrigin:ut.modulesOrigin,commandWheelToZoom:ut.commandWheelToZoom}),ot.useNativeClipboard=!1,ot.didLoadFirstFrame=!1,ot.observerMode=MA.Directory,ot.crops=null,ot.cropCheckPoint=null,ot.cachedCropPoint=null,ot.onTriggerBuilt=function(){ot.hasLibraryNode&&ot.fireTriggerRebuild()},ot.onLibraryNodeChanged=function(xt,Mt){var kt,zt=ot.hasLibraryNode;if(ot.updateLibraryNode(Mt),!zt){var Ht=Kt(ot),rr=Ht.applianceManager,ur=Ht.cameraObserver;ot.viewStateObserver=new tL(ot.viewsHub,rr),ot.stateTrigger=new kq({useMobXMode:ot.useMobXState,disableMaskKey:ot.onlyCallbackRemoteStateModify,onStateChanged:ot.onPlayerStateChanged,propertyGetters:{observerMode:function(){return ot.observerMode},globalState:function(){return rr.getGlobalState()},roomMembers:function(){return ot.getRoomMembers()},sceneState:function(){return ot.getCurrentSceneState()},cameraState:function(){return ur.cameraState}}}),(kt=ot.mainView)==null||kt.callbacks.on("onCameraTransform",ot.onCameraTransform)}},ot.onPhaseChanged=function(xt){var Mt=!1;!ot.didLoadFirstFrame&&ot.hasFrameToDisplay(xt)&&(ot.didLoadFirstFrame=!0,Mt=!0,ot.fetchNextPptSlideIfNeeded(ot.state.sceneState),ot.setupAfterLoadFirstFrame()),ot.updatePhaseByReconstructorPhase(ot.reconstructor.phase)&&(ot.logger.info("change player phase to "+ot._phase),ot.callbacks.dispatch("onPhaseChanged",function(kt){return kt(ot._phase)}),ot.dynamicPpt&&ot.dynamicPpt.replayPasue&&ot.dynamicPpt.replayPasue(ot._phase!==N1.Playing)),Mt&&ot.callbacks.dispatch("onLoadFirstFrame",function(kt){return kt()}),ot.invisiblePluginNode.isWatching=ot._phase===N1.Playing||ot._phase===N1.Pause},ot.onPlayerStateChanged=function(xt){xt.globalState&&ot.dynamicPpt.setGlobalState(zy(xt.globalState)),xt.sceneState&&ot.fetchNextPptSlideIfNeeded(xt.sceneState),ot.callbacks.dispatch("onPlayerStateChanged",function(Mt){return Mt(xt)})},ot.onSliceChanged=function(xt){ot.logger.context=hn(Qr({},ot.logger.context),{slice:xt&&xt.uuid}),ot.refreshForcePPTLandscapeWithSlice(xt),ot.callbacks.dispatch("onSliceChanged",function(Mt){return Mt(xt.uuid)})},ot.onCameraTransform=function(xt){xt===oS.Begin&&ot.observerMode===MA.Directory&&(ot.observerMode=MA.Freedom)},ot.onModified=function(){ot.viewStateObserver&&ot.observerMode===MA.Directory&&ot.viewStateObserver.refreshCameraRectangle(),ot.refreshRender()};var gt;return ut.crops&&(ot.crops=ut.crops.map(function(xt){return hn(Qr({},xt),{cached:!1})})),ot.crops&&(ot.cropCheckPoint=(gt=ot.crops[0])!=null?gt:null),ot.callbacks.on("onProgressTimeChanged",function(xt){ot.preloadCrop(xt),ot.putPlayerState({timestamp:xt})}),ot.alignmentTask=new F5(ut.alignmentThreshold,ut.alignmentInterval,{seek:function(Mt){return ot.seekToProgressTime(Mt)},currentTime:function(){return ot.reconstructor.progressTime},setPlaybackSpeed:function(Mt){ot.reconstructor.playbackSpeed=Mt},getPlaybackSpeed:function(){return ot.reconstructor.playbackSpeed}}),(0,wL.makeObservable)(Kt(ot),{observerMode:wL.observable}),ot}return Bt(at,[{key:"preloadCrop",value:function(ot){var gt=this;if(!(!this.crops||this.crops.length<1||!this.cropCheckPoint)){var xt=this.crops.findIndex(function(zt){return zt.from===gt.cropCheckPoint.from&&zt.to===gt.cropCheckPoint.to}),Mt=xt>=0?this.crops[xt+1]:null,kt=ot/1e3;Math.abs(kt-this.cropCheckPoint.to)<.4&&Mt&&(this.seekToProgressTime(Mt.from*1e3).catch(function(){}),this.cropCheckPoint=Mt),kt<this.cropCheckPoint.to&&this.cropCheckPoint.to-kt<5&&!this.cropCheckPoint.cached&&Mt&&(this.cropCheckPoint.cached=!0,this.cachedCropPoint!==null&&this.reconstructor.deleteCachedReconstructorLineWithProgressTime(this.cachedCropPoint.from*1e3),this.cachedCropPoint=Mt,this.reconstructor.createdCachedReconstructorLineWithProgressTime(Mt.from*1e3).catch(function(){}))}}},{key:"applianceManager",get:function(){return this.reconstructor.trigger}},{key:"parametersFilter",get:function(){}},{key:"playbackSpeed",get:function(){return this.reconstructor.playbackSpeed},set:function(ot){this.reconstructor.playbackSpeed=ot,this.putPlayerState({playbackSpeed:ot})}},{key:"disablePencilWrittingLimitFrequency",get:function(){return!1}},{key:"wrapSetMemberState",value:function(){throw new Error("can only call this method on room")}},{key:"setupReconstructor",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.prev=0,kt.next=3,xt.akkoApp.createReconstructor({logger:this.logger,roomToken:xt.roomToken,clientVersion:Zy.sdkVersion,libraryNodeFetcher:this.libraryNodeFetcher,callbacks:this.createReconstructorCallbacks(),rangeQuery:{region:xt.region,room:xt.room,roomToken:xt.roomToken,slice:xt.slice,beginTimestamp:xt.beginTimestamp,duration:xt.duration}});case 3:this.reconstructor=kt.sent,this.updatePhaseByReconstructorPhase(this.reconstructor.phase),this.logger.info("setup player success"),this.logger.context=hn(Qr({},this.logger.context),{uuid:this.reconstructor.roomUUID,slice:this.reconstructor.slice&&this.reconstructor.slice.uuid}),kt.next=12;break;case 9:throw kt.prev=9,kt.t0=kt.catch(0),this.logger.error("setup player fail "+kt.t0),this.logger.error(kt.t0),kt.t0;case 12:case"end":return kt.stop()}},gt,this,[[0,9]])}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"createReconstructorCallbacks",value:function(){var ot=this;return{onEventFire:function(xt){return ot.dispatchMagixEventWithObject(xt,!1,!1)},onSliceChanged:this.onSliceChanged,onTriggerBuilt:this.onTriggerBuilt,onLibraryNodeChanged:this.onLibraryNodeChanged,onPhaseChanged:this.onPhaseChanged,onModified:this.onModified,onIsPlayableChanged:function(xt){return ot.callbacks.dispatch("onIsPlayableChanged",function(Mt){return Mt(xt)})},onProgressTimeChanged:function(xt){return ot.callbacks.dispatch("onProgressTimeChanged",function(Mt){return Mt(xt)})},onStoppedWithError:function(xt){return ot.callbacks.dispatch("onStoppedWithError",function(Mt){return Mt(xt)})},onCatchErrorWhenAppendFrame:function(xt,Mt){ot.callbacks.dispatch("onCatchErrorWhenAppendFrame",function(kt){return kt(xt,Mt)})}}}},{key:"hasFrameToDisplay",value:function(ot){switch(ot){case dv.Playing:case dv.Pause:case dv.Buffering:case dv.Ended:return!0;default:return!1}}},{key:"setupAfterLoadFirstFrame",value:function(){this.reconstructor.slice&&this.refreshForcePPTLandscapeWithSlice(this.reconstructor.slice),this.dynamicPpt.setGlobalState(zy(this.applianceManager.getGlobalState()))}},{key:"dispose",value:function(){var ot;st(Ut(at.prototype),"dispose",this).call(this),this.viewStateObserver&&this.viewStateObserver.release(),this.stateTrigger&&this.stateTrigger.release(),(ot=this.mainView)==null||ot.callbacks.on("onCameraTransform",this.onCameraTransform)}},{key:"createWrappedComponents",value:function(){return[].concat(Ct(st(Ut(at.prototype),"createWrappedComponents",this).call(this)),[this.reactContext.createWrappedComponent(iL,this)])}},{key:"refreshForcePPTLandscapeWithSlice",value:function(ot){ot.beginTimestamp<=B5?this.viewsHub.putState({forcePPTLandscape:!0}):this.viewsHub.putState({forcePPTLandscape:!1})}},{key:"setObserverMode",value:function(ot){var gt=this;this.stateTrigger.activeUpdate("observerMode",function(){return gt.observerMode=ot}),this.viewStateObserver&&ot===MA.Directory&&this.viewStateObserver.refreshCameraRectangle()}},{key:"state",get:function(){if(!this.hasLibraryNode)throw new Error("can't read state before load first frame");return this.stateTrigger.state}},{key:"roomUUID",get:function(){return this.reconstructor.roomUUID}},{key:"slice",get:function(){return this.reconstructor.slice&&this.reconstructor.slice.uuid}},{key:"isPlayable",get:function(){return this.reconstructor.isPlayable}},{key:"phase",get:function(){return this._phase}},{key:"progressTime",get:function(){return this.reconstructor.progressTime}},{key:"timeDuration",get:function(){return this.reconstructor.duration}},{key:"framesCount",get:function(){return this.reconstructor.framesCount}},{key:"beginTimestamp",get:function(){return this.reconstructor.beginTimestamp}},{key:"play",value:function(){this.assertRoomIsConnected(),this.reconstructor.play()}},{key:"pause",value:function(){this.assertRoomIsConnected(),this.reconstructor.pause()}},{key:"stop",value:function(){if(this._phase===N1.Stopped)throw new Error("player did stop");this.reconstructor.stop(),this.dispose()}},{key:"alignmentProgressTime",value:function(ot){this.alignmentTask.align(ot)}},{key:"seekToProgressTime",value:(function(){var ut=ht(regeneratorRuntime.mark(function gt(xt){return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return this.assertRoomIsConnected(),kt.next=3,this.reconstructor.seekToProgressTime(xt);case 3:kt.t0=kt.sent,kt.next=kt.t0===__.Success?6:kt.t0===__.SuccessButUnnecessary?7:kt.t0===__.Override?8:kt.t0===__.Stopped?9:10;break;case 6:return kt.abrupt("return",XM.Success);case 7:return kt.abrupt("return",XM.SuccessButUnnecessary);case 8:return kt.abrupt("return",XM.Override);case 9:return kt.abrupt("return",XM.Stopped);case 10:throw new Error("invalid result");case 11:case"end":return kt.stop()}},gt,this)}));function ot(gt){return ut.apply(this,arguments)}return ot})()},{key:"updatePhaseByReconstructorPhase",value:function(ot){var gt=at.covertPhase(ot),xt=this._phase!==gt;return xt&&(this._phase=gt,this.putPlayerState({isPlaying:gt===N1.Playing})),xt}},{key:"assertRoomIsConnected",value:function(){if(this._phase===N1.Stopped)throw new Error("you cannot call it when phase of player is stopped")}}],[{key:"covertPhase",value:function(ot){switch(ot){case dv.WaitingFirstFrame:return N1.WaitingFirstFrame;case dv.Playing:return N1.Playing;case dv.Pause:return N1.Pause;case dv.Stopped:return N1.Stopped;case dv.Ended:return N1.Ended;case dv.Buffering:case dv.Seeking:return N1.Buffering;default:throw new Error("invalid phase ".concat(ot))}}}]),at})(dL),j5=(function(){function yt(){Ot(this,yt),this.listenerNodes=[]}return Bt(yt,[{key:"isOnline",get:function(){return navigator.onLine}},{key:"addListener",value:function(at){var ut={origin:at,onOffline:function(){return at.onOffline()},onOnline:function(){return at.onOnline()}};this.listenerNodes.push(ut),window.addEventListener("online",ut.onOnline),window.addEventListener("offline",ut.onOffline),navigator.onLine||console.warn("navigator.onLine is false, are you offline?")}},{key:"removeListener",value:function(at){var ut=this.listenerNodes.findIndex(function(Mt){return Mt.origin===at});if(ut!==-1){var ot=this.listenerNodes.splice(ut,1),gt=mt(ot,1),xt=gt[0];window.removeEventListener("online",xt.onOnline),window.removeEventListener("offline",xt.onOffline)}}}]),yt})(),$5=ln(requireQueryString()),PR;(function(yt){yt.Dynamic="dynamic",yt.Static="static"})(PR||(PR={}));var NO;(function(yt){yt.Waiting="Waiting",yt.Converting="Converting"})(NO||(NO={}));var kO;(function(yt){yt.Extracting="Extracting",yt.Packaging="Packaging",yt.GeneratingPreview="GeneratingPreview",yt.MediaTranscode="MediaTranscode"})(kO||(kO={}));function U5(yt){return new OO(yt)}var z5=(function(){function yt(ct){Ot(this,yt),this.pptPromise=null,this.uuid=ct.uuid,this.region=ct.region||Zy.defaultRegion,this.kind=ct.kind,this.apiFetch=hL(this.region).fetch("api"),this.taskToken=ct.taskToken,this.checkProgressInterval=ct.checkProgressInterval||yt.defaultCheckProgressInterval,this.checkProgressTimeout=ct.checkProgressTimeout||yt.defaultCheckProgressTimeout,this.callbacks=new CA(ct.callbacks)}return Bt(yt,[{key:"checkUtilGet",value:function(){var at=this;return this.pptPromise?this.pptPromise:(this.pptPromise=this.getPPTResult(),this.pptPromise.then(function(ut){at.callbacks.dispatch("onTaskSuccess",function(ot){return ot(ut)})}).catch(function(ut){at.callbacks.dispatch("onTaskFail",function(ot){return ot(ut)})}),this.pptPromise)}},{key:"getPPTResult",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(){var ot=this,gt,xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:gt=!1,xt=Date.now(),Mt=regeneratorRuntime.mark(function rr(){var ur,_r,Dr,Br;return regeneratorRuntime.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:return ur=Date.now(),Zr.next=3,ot.fetchProgress(ot.uuid,ot.kind,ot.taskToken);case 3:_r=Zr.sent,Zr.t0=_r.status,Zr.next=Zr.t0==="Waiting"||Zr.t0==="Converting"?7:Zr.t0==="Finished"?9:Zr.t0==="Fail"?10:11;break;case 7:return ot.updateProgress(_r),Zr.abrupt("break",11);case 9:return Zr.abrupt("return",{v:(gt||ot.updateProgress(_r),ot.toPPT(_r))});case 10:throw new Error(_r.failedReason);case 11:if(Dr=ur+ot.checkProgressInterval,!(Dr>=xt+ot.checkProgressTimeout)){Zr.next=14;break}throw new Error("timeout");case 14:if(_r.progress.convertedPercentage===100&&(gt=!0),Br=Dr-Date.now(),Zr.t1=Br>0,!Zr.t1){Zr.next=20;break}return Zr.next=20,new Promise(function(Tn){return setTimeout(Tn,Br)});case 20:case"end":return Zr.stop()}},rr)});case 2:return Ht.delegateYield(Mt(),"t0",3);case 3:if(kt=Ht.t0,tr(kt)!=="object"){Ht.next=6;break}return Ht.abrupt("return",kt.v);case 6:Ht.next=2;break;case 8:case"end":return Ht.stop()}},ut)}));function at(){return ct.apply(this,arguments)}return at})()},{key:"updateProgress",value:function(at){var ut=Object.freeze({status:at.status,currentStep:at.progress.currentStep,totalPageSize:at.progress.totalPageSize,convertedPageSize:at.progress.convertedPageSize,convertedPercentage:at.progress.convertedPercentage});this.callbacks.dispatch("onProgressUpdated",function(ot){return ot(ut)})}},{key:"toPPT",value:function(at){for(var ut=at.progress.convertedFileList,ot=[],gt=0,xt=0,Mt=0;Mt<ut.length;++Mt){var kt=ut[Mt],zt={name:"".concat(Mt+1),ppt:{src:kt.conversionFileUrl,previewURL:kt.preview,width:kt.width,height:kt.height}};gt=Math.max(gt,kt.width),xt=Math.max(xt,kt.height),ot.push(zt)}return{uuid:this.uuid,kind:this.kind,width:gt,height:xt,scenes:ot}}},{key:"fetchProgress",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt,xt){var Mt,kt,zt,Ht;return regeneratorRuntime.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return Mt="http://ppt-api/v5/services/conversion/tasks/".concat(ot),kt=(0,$5.stringify)({type:gt}),ur.next=4,this.apiFetch(Mt+"?"+kt,{method:"get",headers:{"content-type":"application/json",token:xt,region:this.region}});case 4:if(zt=ur.sent,zt.status===200){ur.next=10;break}return ur.next=8,zt.json();case 8:throw Ht=ur.sent,new Error(Ht.error.title);case 10:return ur.next=12,zt.json();case 12:return ur.abrupt("return",ur.sent);case 13:case"end":return ur.stop()}},ut,this)}));function at(ut,ot,gt){return ct.apply(this,arguments)}return at})()}]),yt})(),OO=z5;OO.defaultCheckProgressInterval=1500,OO.defaultCheckProgressTimeout=300*1e3;var EL=ln(requireQueryString()),G5=(function(){function yt(ct){Ot(this,yt),this.roomToken=ct}return Bt(yt,[{key:"convert",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt;return regeneratorRuntime.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,this.createPPTTask(ot);case 2:return gt=kt.sent,kt.next=5,this.checkUtilHasResult(gt,ot);case 5:return xt=kt.sent,kt.abrupt("return",yt.wrapPPTDescriptions(gt,ot.kind,xt));case 7:case"end":return kt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"createPPTTask",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt,xt,Mt,kt,zt,Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return gt=yt.prefix+"/services/conversion/tasks",xt=(0,EL.stringify)({roomToken:this.roomToken}),Dr.next=4,fetch(gt+"?"+xt,{method:"post",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({sourceUrl:ot.url,serviceType:yt.convertPPTKindToServiceType(ot.kind)})});case 4:if(Mt=Dr.sent,Mt.status===200){Dr.next=13;break}return Dr.t0=Error,Dr.t1="failed to convert ".concat(JSON.stringify(ot.url)," with status ").concat(Mt.status," message:"),Dr.next=10,Mt.text();case 10:throw Dr.t2=Dr.sent,Dr.t3=Dr.t1.concat.call(Dr.t1,Dr.t2),new Dr.t0(Dr.t3);case 13:return Dr.next=15,Mt.json();case 15:if(kt=Dr.sent,zt=kt.msg,Ht=zt.succeed,rr=zt.reason,ur=zt.taskUUID,Ht){Dr.next=22;break}throw new Error("create ppt task failed: "+rr);case 22:return Dr.abrupt("return",ur);case 23:case"end":return Dr.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"checkUtilHasResult",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt=this,Mt,kt,zt,Ht,rr,ur;return regeneratorRuntime.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:Mt=!1,kt=Date.now(),zt=gt.checkProgressInterval||yt.defaultCheckProgressInterval,Ht=gt.checkProgressTimeout||yt.defaultCheckProgressTimeout,rr=regeneratorRuntime.mark(function Br(){var Ur,Zr,Tn,jn,ts,us,Os;return regeneratorRuntime.wrap(function(Ks){for(;;)switch(Ks.prev=Ks.next){case 0:return Ur=Date.now(),Ks.next=3,xt.fetchProgress(ot,gt.kind);case 3:Zr=Ks.sent,Ks.t0=Zr.convertStatus,Ks.next=Ks.t0==="Finished"?7:Ks.t0==="Fail"||Ks.t0==="NotFound"?8:9;break;case 7:return Ks.abrupt("return",{v:(gt.onProgressUpdated&&!Mt&&gt.onProgressUpdated(1),Zr.convertedFileList.map(function(so){return{width:so.width,height:so.height,src:Zr.prefix+so.conversionFileUrl}}))});case 8:throw new Error("failed to convert ".concat(JSON.stringify(gt.url),": ").concat(Zr.reason));case 9:if(Tn=Zr.totalPageSize,jn=Zr.convertedPercentage,ts=Tn===0?0:jn/100,us=Ur+zt,!(us>=kt+Ht)){Ks.next=12;break}throw new Error("failed to convert ".concat(JSON.stringify(gt.url),": timeout"));case 12:if(gt.onProgressUpdated&&gt.onProgressUpdated(ts),ts===1&&(Mt=!0),Os=us-Date.now(),Ks.t1=Os>0,!Ks.t1){Ks.next=18;break}return Ks.next=18,new Promise(function(so){return setTimeout(so,Os)});case 18:case"end":return Ks.stop()}},Br)});case 2:return Dr.delegateYield(rr(),"t0",3);case 3:if(ur=Dr.t0,tr(ur)!=="object"){Dr.next=6;break}return Dr.abrupt("return",ur.v);case 6:Dr.next=2;break;case 8:case"end":return Dr.stop()}},ut)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"fetchProgress",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return xt="".concat(yt.prefix,"/services/conversion/tasks/").concat(ot,"/progress"),Mt=(0,EL.stringify)({roomToken:this.roomToken,serviceType:yt.convertPPTKindToServiceType(gt)}),Ht.next=4,fetch(xt+"?"+Mt,{headers:{"content-type":"application/json",Accept:"application/json"}});case 4:if(kt=Ht.sent,kt.status===200){Ht.next=7;break}throw new Error("failed to fetch progress of ".concat(JSON.stringify(xt)));case 7:return Ht.next=9,kt.json();case 9:return Ht.abrupt("return",Ht.sent.msg.task);case 10:case"end":return Ht.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()}],[{key:"wrapPPTDescriptions",value:function(at,ut,ot){for(var gt=[],xt=[],Mt=0,kt=0,zt=0;zt<ot.length;++zt){var Ht=ot[zt],rr=Ht.src,ur=Ht.width,_r=Ht.height;gt[zt]=rr,xt[zt]={name:"".concat(zt+1),ppt:{src:rr,width:ur,height:_r}},Mt=ur,kt=_r}return{uuid:at,kind:ut,width:Mt,height:kt,slideURLs:gt,scenes:xt}}},{key:"convertPPTKindToServiceType",value:function(at){switch(at){case PR.Dynamic:return"dynamic_conversion";case PR.Static:return"static_conversion";default:throw new Error("invalid kind ".concat(JSON.stringify(at)))}}}]),yt})(),BN=G5;BN.prefix="https://console-api.netless.link",BN.defaultCheckProgressInterval=1500,BN.defaultCheckProgressTimeout=300*1e3;var V5=Object.defineProperty,H5=Object.defineProperties,W5=Object.getOwnPropertyDescriptors,AL=Object.getOwnPropertySymbols,X5=Object.prototype.hasOwnProperty,Y5=Object.prototype.propertyIsEnumerable,CL=function(ct,at,ut){return at in ct?V5(ct,at,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ct[at]=ut},DL=function(ct,at){for(var ut in at||(at={}))X5.call(at,ut)&&CL(ct,ut,at[ut]);if(AL){var ot=Jt(AL(at)),gt;try{for(ot.s();!(gt=ot.n()).done;){var ut=gt.value;Y5.call(at,ut)&&CL(ct,ut,at[ut])}}catch(xt){ot.e(xt)}finally{ot.f()}}return ct},Q5=function(ct,at){return H5(ct,W5(at))},K5=(function(){var yt=ht(regeneratorRuntime.mark(function ct(at,ut){var ot;return regeneratorRuntime.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return xt.next=2,window.fetch(ut,{method:"post",body:JSON.stringify(at),headers:{"Content-Type":"application/json"}});case 2:if(ot=xt.sent,ot.ok){xt.next=5;break}throw new Error("report log failed, request status code: ".concat(ot.status,", statusText: ").concat(ot.statusText));case 5:case"end":return xt.stop()}},ct)}));return function(at,ut){return yt.apply(this,arguments)}})(),Z5=(function(){function yt(ct,at,ut){Ot(this,yt),this.argusEncoder=ct,this.timestampKey=ut,this.reportQueueManage=new kE(yt.logQueue,at,K5,console.warn)}return Bt(yt,[{key:"report",value:function(at,ut){var ot=this.convertToBody(at),gt=this.argusEncoder.encode(ut,ot);this.reportQueueManage.report(gt).catch(function(){})}},{key:"convertToBody",value:function(at){var ut=at.timestamp,ot=at.logObject,gt={};this.timestampKey!==void 0&&(gt[this.timestampKey]="".concat(ut));for(var xt in ot)gt[xt]="".concat(ot[xt]);return gt}}]),yt})(),ML=Z5;ML.logQueue=new NE;var IL=(function(){function yt(ct){Ot(this,yt),this.events=ct.events,this.argusEncoder=new GA(ct.events,ct.vid),this.reporter=new ML(this.argusEncoder,ct.reportResourceURL,ct.timestampKey),this.logger=new DE({prefix:ct.prefix,levelMask:ct.printLevelMask}),this.reportLevelMaskIndex=wT[ct.reportLevelMask||"info"],this.eventEmitter=new X1(ct.on)}return Bt(yt,[{key:"commit",value:function(at,ut){this.reportLogNode(at,{timestamp:Date.now(),logObject:DL({},ut)})}},{key:"log",value:function(at,ut,ot,gt){if(this.logger.log(at,ut,ot),wT[ut]>=this.reportLevelMaskIndex){var xt={timestamp:Date.now(),logObject:Q5(DL({},gt),{level:ut,message:ot})};this.eventEmitter.emit(ut,xt),this.reportLogNode(at,xt)}}},{key:"isSupportedEvents",value:function(at){return at in this.events}},{key:"reportLogNode",value:function(at,ut){try{this.reporter.report(ut,at)}catch(ot){console.warn(ot)}}}]),yt})(),lT=ln(requireMinimal()),y0=lT.Reader,NR=lT.Writer,bo=lT.util,b0=lT.roots.default||(lT.roots.default={}),J5=b0.WhiteBoardPlayer=(function(){function yt(ct){if(ct)for(var at=Object.keys(ct),ut=0;ut<at.length;++ut)ct[at[ut]]!=null&&(this[at[ut]]=ct[at[ut]])}return yt.prototype.lts=bo.Long?bo.Long.fromBits(0,0,!1):0,yt.prototype.uuid="",yt.prototype.region="",yt.prototype.slice="",yt.prototype.team="",yt.prototype.app="",yt.prototype.akkoVersion="",yt.prototype.sdkVersion="",yt.prototype.nativeVersion="",yt.prototype.platform="",yt.prototype.os="",yt.prototype.createdAt="",yt.prototype.level="",yt.prototype.message="",yt.prototype.vid=0,yt.prototype.clientIP="",yt.prototype.netlessUA="",yt.create=function(ct){return new yt(ct)},yt.encode=function(ct,at){return at||(at=NR.create()),ct.lts!=null&&Object.hasOwnProperty.call(ct,"lts")&&at.uint32(8).int64(ct.lts),ct.uuid!=null&&Object.hasOwnProperty.call(ct,"uuid")&&at.uint32(18).string(ct.uuid),ct.region!=null&&Object.hasOwnProperty.call(ct,"region")&&at.uint32(26).string(ct.region),ct.slice!=null&&Object.hasOwnProperty.call(ct,"slice")&&at.uint32(34).string(ct.slice),ct.team!=null&&Object.hasOwnProperty.call(ct,"team")&&at.uint32(42).string(ct.team),ct.app!=null&&Object.hasOwnProperty.call(ct,"app")&&at.uint32(50).string(ct.app),ct.akkoVersion!=null&&Object.hasOwnProperty.call(ct,"akkoVersion")&&at.uint32(58).string(ct.akkoVersion),ct.sdkVersion!=null&&Object.hasOwnProperty.call(ct,"sdkVersion")&&at.uint32(66).string(ct.sdkVersion),ct.nativeVersion!=null&&Object.hasOwnProperty.call(ct,"nativeVersion")&&at.uint32(74).string(ct.nativeVersion),ct.platform!=null&&Object.hasOwnProperty.call(ct,"platform")&&at.uint32(82).string(ct.platform),ct.os!=null&&Object.hasOwnProperty.call(ct,"os")&&at.uint32(90).string(ct.os),ct.createdAt!=null&&Object.hasOwnProperty.call(ct,"createdAt")&&at.uint32(98).string(ct.createdAt),ct.level!=null&&Object.hasOwnProperty.call(ct,"level")&&at.uint32(106).string(ct.level),ct.message!=null&&Object.hasOwnProperty.call(ct,"message")&&at.uint32(114).string(ct.message),ct.vid!=null&&Object.hasOwnProperty.call(ct,"vid")&&at.uint32(120).int32(ct.vid),ct.clientIP!=null&&Object.hasOwnProperty.call(ct,"clientIP")&&at.uint32(130).string(ct.clientIP),ct.netlessUA!=null&&Object.hasOwnProperty.call(ct,"netlessUA")&&at.uint32(138).string(ct.netlessUA),at},yt.encodeDelimited=function(ct,at){return this.encode(ct,at).ldelim()},yt.decode=function(ct,at){ct instanceof y0||(ct=y0.create(ct));for(var ut=at===void 0?ct.len:ct.pos+at,ot=new b0.WhiteBoardPlayer;ct.pos<ut;){var gt=ct.uint32();switch(gt>>>3){case 1:{ot.lts=ct.int64();break}case 2:{ot.uuid=ct.string();break}case 3:{ot.region=ct.string();break}case 4:{ot.slice=ct.string();break}case 5:{ot.team=ct.string();break}case 6:{ot.app=ct.string();break}case 7:{ot.akkoVersion=ct.string();break}case 8:{ot.sdkVersion=ct.string();break}case 9:{ot.nativeVersion=ct.string();break}case 10:{ot.platform=ct.string();break}case 11:{ot.os=ct.string();break}case 12:{ot.createdAt=ct.string();break}case 13:{ot.level=ct.string();break}case 14:{ot.message=ct.string();break}case 15:{ot.vid=ct.int32();break}case 16:{ot.clientIP=ct.string();break}case 17:{ot.netlessUA=ct.string();break}default:ct.skipType(gt&7);break}}return ot},yt.decodeDelimited=function(ct){return ct instanceof y0||(ct=new y0(ct)),this.decode(ct,ct.uint32())},yt.verify=function(ct){return tr(ct)!="object"||ct===null?"object expected":ct.lts!=null&&ct.hasOwnProperty("lts")&&!bo.isInteger(ct.lts)&&!(ct.lts&&bo.isInteger(ct.lts.low)&&bo.isInteger(ct.lts.high))?"lts: integer|Long expected":ct.uuid!=null&&ct.hasOwnProperty("uuid")&&!bo.isString(ct.uuid)?"uuid: string expected":ct.region!=null&&ct.hasOwnProperty("region")&&!bo.isString(ct.region)?"region: string expected":ct.slice!=null&&ct.hasOwnProperty("slice")&&!bo.isString(ct.slice)?"slice: string expected":ct.team!=null&&ct.hasOwnProperty("team")&&!bo.isString(ct.team)?"team: string expected":ct.app!=null&&ct.hasOwnProperty("app")&&!bo.isString(ct.app)?"app: string expected":ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&!bo.isString(ct.akkoVersion)?"akkoVersion: string expected":ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&!bo.isString(ct.sdkVersion)?"sdkVersion: string expected":ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&!bo.isString(ct.nativeVersion)?"nativeVersion: string expected":ct.platform!=null&&ct.hasOwnProperty("platform")&&!bo.isString(ct.platform)?"platform: string expected":ct.os!=null&&ct.hasOwnProperty("os")&&!bo.isString(ct.os)?"os: string expected":ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&!bo.isString(ct.createdAt)?"createdAt: string expected":ct.level!=null&&ct.hasOwnProperty("level")&&!bo.isString(ct.level)?"level: string expected":ct.message!=null&&ct.hasOwnProperty("message")&&!bo.isString(ct.message)?"message: string expected":ct.vid!=null&&ct.hasOwnProperty("vid")&&!bo.isInteger(ct.vid)?"vid: integer expected":ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&!bo.isString(ct.clientIP)?"clientIP: string expected":ct.netlessUA!=null&&ct.hasOwnProperty("netlessUA")&&!bo.isString(ct.netlessUA)?"netlessUA: string expected":null},yt.fromObject=function(ct){if(ct instanceof b0.WhiteBoardPlayer)return ct;var at=new b0.WhiteBoardPlayer;return ct.lts!=null&&(bo.Long?(at.lts=bo.Long.fromValue(ct.lts)).unsigned=!1:typeof ct.lts=="string"?at.lts=parseInt(ct.lts,10):typeof ct.lts=="number"?at.lts=ct.lts:tr(ct.lts)=="object"&&(at.lts=new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber())),ct.uuid!=null&&(at.uuid=String(ct.uuid)),ct.region!=null&&(at.region=String(ct.region)),ct.slice!=null&&(at.slice=String(ct.slice)),ct.team!=null&&(at.team=String(ct.team)),ct.app!=null&&(at.app=String(ct.app)),ct.akkoVersion!=null&&(at.akkoVersion=String(ct.akkoVersion)),ct.sdkVersion!=null&&(at.sdkVersion=String(ct.sdkVersion)),ct.nativeVersion!=null&&(at.nativeVersion=String(ct.nativeVersion)),ct.platform!=null&&(at.platform=String(ct.platform)),ct.os!=null&&(at.os=String(ct.os)),ct.createdAt!=null&&(at.createdAt=String(ct.createdAt)),ct.level!=null&&(at.level=String(ct.level)),ct.message!=null&&(at.message=String(ct.message)),ct.vid!=null&&(at.vid=ct.vid|0),ct.clientIP!=null&&(at.clientIP=String(ct.clientIP)),ct.netlessUA!=null&&(at.netlessUA=String(ct.netlessUA)),at},yt.toObject=function(ct,at){at||(at={});var ut={};if(at.defaults){if(bo.Long){var ot=new bo.Long(0,0,!1);ut.lts=at.longs===String?ot.toString():at.longs===Number?ot.toNumber():ot}else ut.lts=at.longs===String?"0":0;ut.uuid="",ut.region="",ut.slice="",ut.team="",ut.app="",ut.akkoVersion="",ut.sdkVersion="",ut.nativeVersion="",ut.platform="",ut.os="",ut.createdAt="",ut.level="",ut.message="",ut.vid=0,ut.clientIP="",ut.netlessUA=""}return ct.lts!=null&&ct.hasOwnProperty("lts")&&(typeof ct.lts=="number"?ut.lts=at.longs===String?String(ct.lts):ct.lts:ut.lts=at.longs===String?bo.Long.prototype.toString.call(ct.lts):at.longs===Number?new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber():ct.lts),ct.uuid!=null&&ct.hasOwnProperty("uuid")&&(ut.uuid=ct.uuid),ct.region!=null&&ct.hasOwnProperty("region")&&(ut.region=ct.region),ct.slice!=null&&ct.hasOwnProperty("slice")&&(ut.slice=ct.slice),ct.team!=null&&ct.hasOwnProperty("team")&&(ut.team=ct.team),ct.app!=null&&ct.hasOwnProperty("app")&&(ut.app=ct.app),ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&(ut.akkoVersion=ct.akkoVersion),ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&(ut.sdkVersion=ct.sdkVersion),ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&(ut.nativeVersion=ct.nativeVersion),ct.platform!=null&&ct.hasOwnProperty("platform")&&(ut.platform=ct.platform),ct.os!=null&&ct.hasOwnProperty("os")&&(ut.os=ct.os),ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&(ut.createdAt=ct.createdAt),ct.level!=null&&ct.hasOwnProperty("level")&&(ut.level=ct.level),ct.message!=null&&ct.hasOwnProperty("message")&&(ut.message=ct.message),ct.vid!=null&&ct.hasOwnProperty("vid")&&(ut.vid=ct.vid),ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&(ut.clientIP=ct.clientIP),ct.netlessUA!=null&&ct.hasOwnProperty("netlessUA")&&(ut.netlessUA=ct.netlessUA),ut},yt.prototype.toJSON=function(){return this.constructor.toObject(this,lT.util.toJSONOptions)},yt.getTypeUrl=function(ct){return ct===void 0&&(ct="type.googleapis.com"),ct+"/WhiteBoardPlayer"},yt})(),e3=b0.WhiteBoardQualityConnection=(function(){function yt(ct){if(ct)for(var at=Object.keys(ct),ut=0;ut<at.length;++ut)ct[at[ut]]!=null&&(this[at[ut]]=ct[at[ut]])}return yt.prototype.lts=bo.Long?bo.Long.fromBits(0,0,!1):0,yt.prototype.team="",yt.prototype.app="",yt.prototype.akkoVersion="",yt.prototype.sdkVersion="",yt.prototype.nativeVersion="",yt.prototype.platform="",yt.prototype.os="",yt.prototype.kind="",yt.prototype.uuid="",yt.prototype.region="",yt.prototype.userId="",yt.prototype.session="",yt.prototype.isReconnection="",yt.prototype.retryCount="",yt.prototype.buildWebSocketDuration="",yt.prototype.buildMagixDuration="",yt.prototype.createdAt="",yt.prototype.vid=0,yt.prototype.clientIP="",yt.create=function(ct){return new yt(ct)},yt.encode=function(ct,at){return at||(at=NR.create()),ct.lts!=null&&Object.hasOwnProperty.call(ct,"lts")&&at.uint32(8).int64(ct.lts),ct.team!=null&&Object.hasOwnProperty.call(ct,"team")&&at.uint32(18).string(ct.team),ct.app!=null&&Object.hasOwnProperty.call(ct,"app")&&at.uint32(26).string(ct.app),ct.akkoVersion!=null&&Object.hasOwnProperty.call(ct,"akkoVersion")&&at.uint32(34).string(ct.akkoVersion),ct.sdkVersion!=null&&Object.hasOwnProperty.call(ct,"sdkVersion")&&at.uint32(42).string(ct.sdkVersion),ct.nativeVersion!=null&&Object.hasOwnProperty.call(ct,"nativeVersion")&&at.uint32(50).string(ct.nativeVersion),ct.platform!=null&&Object.hasOwnProperty.call(ct,"platform")&&at.uint32(58).string(ct.platform),ct.os!=null&&Object.hasOwnProperty.call(ct,"os")&&at.uint32(66).string(ct.os),ct.kind!=null&&Object.hasOwnProperty.call(ct,"kind")&&at.uint32(74).string(ct.kind),ct.uuid!=null&&Object.hasOwnProperty.call(ct,"uuid")&&at.uint32(82).string(ct.uuid),ct.region!=null&&Object.hasOwnProperty.call(ct,"region")&&at.uint32(90).string(ct.region),ct.userId!=null&&Object.hasOwnProperty.call(ct,"userId")&&at.uint32(98).string(ct.userId),ct.session!=null&&Object.hasOwnProperty.call(ct,"session")&&at.uint32(106).string(ct.session),ct.isReconnection!=null&&Object.hasOwnProperty.call(ct,"isReconnection")&&at.uint32(114).string(ct.isReconnection),ct.retryCount!=null&&Object.hasOwnProperty.call(ct,"retryCount")&&at.uint32(122).string(ct.retryCount),ct.buildWebSocketDuration!=null&&Object.hasOwnProperty.call(ct,"buildWebSocketDuration")&&at.uint32(130).string(ct.buildWebSocketDuration),ct.buildMagixDuration!=null&&Object.hasOwnProperty.call(ct,"buildMagixDuration")&&at.uint32(138).string(ct.buildMagixDuration),ct.createdAt!=null&&Object.hasOwnProperty.call(ct,"createdAt")&&at.uint32(146).string(ct.createdAt),ct.vid!=null&&Object.hasOwnProperty.call(ct,"vid")&&at.uint32(152).int32(ct.vid),ct.clientIP!=null&&Object.hasOwnProperty.call(ct,"clientIP")&&at.uint32(162).string(ct.clientIP),at},yt.encodeDelimited=function(ct,at){return this.encode(ct,at).ldelim()},yt.decode=function(ct,at){ct instanceof y0||(ct=y0.create(ct));for(var ut=at===void 0?ct.len:ct.pos+at,ot=new b0.WhiteBoardQualityConnection;ct.pos<ut;){var gt=ct.uint32();switch(gt>>>3){case 1:{ot.lts=ct.int64();break}case 2:{ot.team=ct.string();break}case 3:{ot.app=ct.string();break}case 4:{ot.akkoVersion=ct.string();break}case 5:{ot.sdkVersion=ct.string();break}case 6:{ot.nativeVersion=ct.string();break}case 7:{ot.platform=ct.string();break}case 8:{ot.os=ct.string();break}case 9:{ot.kind=ct.string();break}case 10:{ot.uuid=ct.string();break}case 11:{ot.region=ct.string();break}case 12:{ot.userId=ct.string();break}case 13:{ot.session=ct.string();break}case 14:{ot.isReconnection=ct.string();break}case 15:{ot.retryCount=ct.string();break}case 16:{ot.buildWebSocketDuration=ct.string();break}case 17:{ot.buildMagixDuration=ct.string();break}case 18:{ot.createdAt=ct.string();break}case 19:{ot.vid=ct.int32();break}case 20:{ot.clientIP=ct.string();break}default:ct.skipType(gt&7);break}}return ot},yt.decodeDelimited=function(ct){return ct instanceof y0||(ct=new y0(ct)),this.decode(ct,ct.uint32())},yt.verify=function(ct){return tr(ct)!="object"||ct===null?"object expected":ct.lts!=null&&ct.hasOwnProperty("lts")&&!bo.isInteger(ct.lts)&&!(ct.lts&&bo.isInteger(ct.lts.low)&&bo.isInteger(ct.lts.high))?"lts: integer|Long expected":ct.team!=null&&ct.hasOwnProperty("team")&&!bo.isString(ct.team)?"team: string expected":ct.app!=null&&ct.hasOwnProperty("app")&&!bo.isString(ct.app)?"app: string expected":ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&!bo.isString(ct.akkoVersion)?"akkoVersion: string expected":ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&!bo.isString(ct.sdkVersion)?"sdkVersion: string expected":ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&!bo.isString(ct.nativeVersion)?"nativeVersion: string expected":ct.platform!=null&&ct.hasOwnProperty("platform")&&!bo.isString(ct.platform)?"platform: string expected":ct.os!=null&&ct.hasOwnProperty("os")&&!bo.isString(ct.os)?"os: string expected":ct.kind!=null&&ct.hasOwnProperty("kind")&&!bo.isString(ct.kind)?"kind: string expected":ct.uuid!=null&&ct.hasOwnProperty("uuid")&&!bo.isString(ct.uuid)?"uuid: string expected":ct.region!=null&&ct.hasOwnProperty("region")&&!bo.isString(ct.region)?"region: string expected":ct.userId!=null&&ct.hasOwnProperty("userId")&&!bo.isString(ct.userId)?"userId: string expected":ct.session!=null&&ct.hasOwnProperty("session")&&!bo.isString(ct.session)?"session: string expected":ct.isReconnection!=null&&ct.hasOwnProperty("isReconnection")&&!bo.isString(ct.isReconnection)?"isReconnection: string expected":ct.retryCount!=null&&ct.hasOwnProperty("retryCount")&&!bo.isString(ct.retryCount)?"retryCount: string expected":ct.buildWebSocketDuration!=null&&ct.hasOwnProperty("buildWebSocketDuration")&&!bo.isString(ct.buildWebSocketDuration)?"buildWebSocketDuration: string expected":ct.buildMagixDuration!=null&&ct.hasOwnProperty("buildMagixDuration")&&!bo.isString(ct.buildMagixDuration)?"buildMagixDuration: string expected":ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&!bo.isString(ct.createdAt)?"createdAt: string expected":ct.vid!=null&&ct.hasOwnProperty("vid")&&!bo.isInteger(ct.vid)?"vid: integer expected":ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&!bo.isString(ct.clientIP)?"clientIP: string expected":null},yt.fromObject=function(ct){if(ct instanceof b0.WhiteBoardQualityConnection)return ct;var at=new b0.WhiteBoardQualityConnection;return ct.lts!=null&&(bo.Long?(at.lts=bo.Long.fromValue(ct.lts)).unsigned=!1:typeof ct.lts=="string"?at.lts=parseInt(ct.lts,10):typeof ct.lts=="number"?at.lts=ct.lts:tr(ct.lts)=="object"&&(at.lts=new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber())),ct.team!=null&&(at.team=String(ct.team)),ct.app!=null&&(at.app=String(ct.app)),ct.akkoVersion!=null&&(at.akkoVersion=String(ct.akkoVersion)),ct.sdkVersion!=null&&(at.sdkVersion=String(ct.sdkVersion)),ct.nativeVersion!=null&&(at.nativeVersion=String(ct.nativeVersion)),ct.platform!=null&&(at.platform=String(ct.platform)),ct.os!=null&&(at.os=String(ct.os)),ct.kind!=null&&(at.kind=String(ct.kind)),ct.uuid!=null&&(at.uuid=String(ct.uuid)),ct.region!=null&&(at.region=String(ct.region)),ct.userId!=null&&(at.userId=String(ct.userId)),ct.session!=null&&(at.session=String(ct.session)),ct.isReconnection!=null&&(at.isReconnection=String(ct.isReconnection)),ct.retryCount!=null&&(at.retryCount=String(ct.retryCount)),ct.buildWebSocketDuration!=null&&(at.buildWebSocketDuration=String(ct.buildWebSocketDuration)),ct.buildMagixDuration!=null&&(at.buildMagixDuration=String(ct.buildMagixDuration)),ct.createdAt!=null&&(at.createdAt=String(ct.createdAt)),ct.vid!=null&&(at.vid=ct.vid|0),ct.clientIP!=null&&(at.clientIP=String(ct.clientIP)),at},yt.toObject=function(ct,at){at||(at={});var ut={};if(at.defaults){if(bo.Long){var ot=new bo.Long(0,0,!1);ut.lts=at.longs===String?ot.toString():at.longs===Number?ot.toNumber():ot}else ut.lts=at.longs===String?"0":0;ut.team="",ut.app="",ut.akkoVersion="",ut.sdkVersion="",ut.nativeVersion="",ut.platform="",ut.os="",ut.kind="",ut.uuid="",ut.region="",ut.userId="",ut.session="",ut.isReconnection="",ut.retryCount="",ut.buildWebSocketDuration="",ut.buildMagixDuration="",ut.createdAt="",ut.vid=0,ut.clientIP=""}return ct.lts!=null&&ct.hasOwnProperty("lts")&&(typeof ct.lts=="number"?ut.lts=at.longs===String?String(ct.lts):ct.lts:ut.lts=at.longs===String?bo.Long.prototype.toString.call(ct.lts):at.longs===Number?new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber():ct.lts),ct.team!=null&&ct.hasOwnProperty("team")&&(ut.team=ct.team),ct.app!=null&&ct.hasOwnProperty("app")&&(ut.app=ct.app),ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&(ut.akkoVersion=ct.akkoVersion),ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&(ut.sdkVersion=ct.sdkVersion),ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&(ut.nativeVersion=ct.nativeVersion),ct.platform!=null&&ct.hasOwnProperty("platform")&&(ut.platform=ct.platform),ct.os!=null&&ct.hasOwnProperty("os")&&(ut.os=ct.os),ct.kind!=null&&ct.hasOwnProperty("kind")&&(ut.kind=ct.kind),ct.uuid!=null&&ct.hasOwnProperty("uuid")&&(ut.uuid=ct.uuid),ct.region!=null&&ct.hasOwnProperty("region")&&(ut.region=ct.region),ct.userId!=null&&ct.hasOwnProperty("userId")&&(ut.userId=ct.userId),ct.session!=null&&ct.hasOwnProperty("session")&&(ut.session=ct.session),ct.isReconnection!=null&&ct.hasOwnProperty("isReconnection")&&(ut.isReconnection=ct.isReconnection),ct.retryCount!=null&&ct.hasOwnProperty("retryCount")&&(ut.retryCount=ct.retryCount),ct.buildWebSocketDuration!=null&&ct.hasOwnProperty("buildWebSocketDuration")&&(ut.buildWebSocketDuration=ct.buildWebSocketDuration),ct.buildMagixDuration!=null&&ct.hasOwnProperty("buildMagixDuration")&&(ut.buildMagixDuration=ct.buildMagixDuration),ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&(ut.createdAt=ct.createdAt),ct.vid!=null&&ct.hasOwnProperty("vid")&&(ut.vid=ct.vid),ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&(ut.clientIP=ct.clientIP),ut},yt.prototype.toJSON=function(){return this.constructor.toObject(this,lT.util.toJSONOptions)},yt.getTypeUrl=function(ct){return ct===void 0&&(ct="type.googleapis.com"),ct+"/WhiteBoardQualityConnection"},yt})(),t3=b0.WhiteBoardQualityDisconnection=(function(){function yt(ct){if(ct)for(var at=Object.keys(ct),ut=0;ut<at.length;++ut)ct[at[ut]]!=null&&(this[at[ut]]=ct[at[ut]])}return yt.prototype.lts=bo.Long?bo.Long.fromBits(0,0,!1):0,yt.prototype.team="",yt.prototype.app="",yt.prototype.akkoVersion="",yt.prototype.sdkVersion="",yt.prototype.nativeVersion="",yt.prototype.platform="",yt.prototype.os="",yt.prototype.kind="",yt.prototype.uuid="",yt.prototype.region="",yt.prototype.userId="",yt.prototype.session="",yt.prototype.duration="",yt.prototype.createdAt="",yt.prototype.vid=0,yt.prototype.isReconnection="",yt.prototype.clientIP="",yt.create=function(ct){return new yt(ct)},yt.encode=function(ct,at){return at||(at=NR.create()),ct.lts!=null&&Object.hasOwnProperty.call(ct,"lts")&&at.uint32(8).int64(ct.lts),ct.team!=null&&Object.hasOwnProperty.call(ct,"team")&&at.uint32(18).string(ct.team),ct.app!=null&&Object.hasOwnProperty.call(ct,"app")&&at.uint32(26).string(ct.app),ct.akkoVersion!=null&&Object.hasOwnProperty.call(ct,"akkoVersion")&&at.uint32(34).string(ct.akkoVersion),ct.sdkVersion!=null&&Object.hasOwnProperty.call(ct,"sdkVersion")&&at.uint32(42).string(ct.sdkVersion),ct.nativeVersion!=null&&Object.hasOwnProperty.call(ct,"nativeVersion")&&at.uint32(50).string(ct.nativeVersion),ct.platform!=null&&Object.hasOwnProperty.call(ct,"platform")&&at.uint32(58).string(ct.platform),ct.os!=null&&Object.hasOwnProperty.call(ct,"os")&&at.uint32(66).string(ct.os),ct.kind!=null&&Object.hasOwnProperty.call(ct,"kind")&&at.uint32(74).string(ct.kind),ct.uuid!=null&&Object.hasOwnProperty.call(ct,"uuid")&&at.uint32(82).string(ct.uuid),ct.region!=null&&Object.hasOwnProperty.call(ct,"region")&&at.uint32(90).string(ct.region),ct.userId!=null&&Object.hasOwnProperty.call(ct,"userId")&&at.uint32(98).string(ct.userId),ct.session!=null&&Object.hasOwnProperty.call(ct,"session")&&at.uint32(106).string(ct.session),ct.duration!=null&&Object.hasOwnProperty.call(ct,"duration")&&at.uint32(122).string(ct.duration),ct.createdAt!=null&&Object.hasOwnProperty.call(ct,"createdAt")&&at.uint32(130).string(ct.createdAt),ct.vid!=null&&Object.hasOwnProperty.call(ct,"vid")&&at.uint32(136).int32(ct.vid),ct.isReconnection!=null&&Object.hasOwnProperty.call(ct,"isReconnection")&&at.uint32(146).string(ct.isReconnection),ct.clientIP!=null&&Object.hasOwnProperty.call(ct,"clientIP")&&at.uint32(154).string(ct.clientIP),at},yt.encodeDelimited=function(ct,at){return this.encode(ct,at).ldelim()},yt.decode=function(ct,at){ct instanceof y0||(ct=y0.create(ct));for(var ut=at===void 0?ct.len:ct.pos+at,ot=new b0.WhiteBoardQualityDisconnection;ct.pos<ut;){var gt=ct.uint32();switch(gt>>>3){case 1:{ot.lts=ct.int64();break}case 2:{ot.team=ct.string();break}case 3:{ot.app=ct.string();break}case 4:{ot.akkoVersion=ct.string();break}case 5:{ot.sdkVersion=ct.string();break}case 6:{ot.nativeVersion=ct.string();break}case 7:{ot.platform=ct.string();break}case 8:{ot.os=ct.string();break}case 9:{ot.kind=ct.string();break}case 10:{ot.uuid=ct.string();break}case 11:{ot.region=ct.string();break}case 12:{ot.userId=ct.string();break}case 13:{ot.session=ct.string();break}case 15:{ot.duration=ct.string();break}case 16:{ot.createdAt=ct.string();break}case 17:{ot.vid=ct.int32();break}case 18:{ot.isReconnection=ct.string();break}case 19:{ot.clientIP=ct.string();break}default:ct.skipType(gt&7);break}}return ot},yt.decodeDelimited=function(ct){return ct instanceof y0||(ct=new y0(ct)),this.decode(ct,ct.uint32())},yt.verify=function(ct){return tr(ct)!="object"||ct===null?"object expected":ct.lts!=null&&ct.hasOwnProperty("lts")&&!bo.isInteger(ct.lts)&&!(ct.lts&&bo.isInteger(ct.lts.low)&&bo.isInteger(ct.lts.high))?"lts: integer|Long expected":ct.team!=null&&ct.hasOwnProperty("team")&&!bo.isString(ct.team)?"team: string expected":ct.app!=null&&ct.hasOwnProperty("app")&&!bo.isString(ct.app)?"app: string expected":ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&!bo.isString(ct.akkoVersion)?"akkoVersion: string expected":ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&!bo.isString(ct.sdkVersion)?"sdkVersion: string expected":ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&!bo.isString(ct.nativeVersion)?"nativeVersion: string expected":ct.platform!=null&&ct.hasOwnProperty("platform")&&!bo.isString(ct.platform)?"platform: string expected":ct.os!=null&&ct.hasOwnProperty("os")&&!bo.isString(ct.os)?"os: string expected":ct.kind!=null&&ct.hasOwnProperty("kind")&&!bo.isString(ct.kind)?"kind: string expected":ct.uuid!=null&&ct.hasOwnProperty("uuid")&&!bo.isString(ct.uuid)?"uuid: string expected":ct.region!=null&&ct.hasOwnProperty("region")&&!bo.isString(ct.region)?"region: string expected":ct.userId!=null&&ct.hasOwnProperty("userId")&&!bo.isString(ct.userId)?"userId: string expected":ct.session!=null&&ct.hasOwnProperty("session")&&!bo.isString(ct.session)?"session: string expected":ct.duration!=null&&ct.hasOwnProperty("duration")&&!bo.isString(ct.duration)?"duration: string expected":ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&!bo.isString(ct.createdAt)?"createdAt: string expected":ct.vid!=null&&ct.hasOwnProperty("vid")&&!bo.isInteger(ct.vid)?"vid: integer expected":ct.isReconnection!=null&&ct.hasOwnProperty("isReconnection")&&!bo.isString(ct.isReconnection)?"isReconnection: string expected":ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&!bo.isString(ct.clientIP)?"clientIP: string expected":null},yt.fromObject=function(ct){if(ct instanceof b0.WhiteBoardQualityDisconnection)return ct;var at=new b0.WhiteBoardQualityDisconnection;return ct.lts!=null&&(bo.Long?(at.lts=bo.Long.fromValue(ct.lts)).unsigned=!1:typeof ct.lts=="string"?at.lts=parseInt(ct.lts,10):typeof ct.lts=="number"?at.lts=ct.lts:tr(ct.lts)=="object"&&(at.lts=new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber())),ct.team!=null&&(at.team=String(ct.team)),ct.app!=null&&(at.app=String(ct.app)),ct.akkoVersion!=null&&(at.akkoVersion=String(ct.akkoVersion)),ct.sdkVersion!=null&&(at.sdkVersion=String(ct.sdkVersion)),ct.nativeVersion!=null&&(at.nativeVersion=String(ct.nativeVersion)),ct.platform!=null&&(at.platform=String(ct.platform)),ct.os!=null&&(at.os=String(ct.os)),ct.kind!=null&&(at.kind=String(ct.kind)),ct.uuid!=null&&(at.uuid=String(ct.uuid)),ct.region!=null&&(at.region=String(ct.region)),ct.userId!=null&&(at.userId=String(ct.userId)),ct.session!=null&&(at.session=String(ct.session)),ct.duration!=null&&(at.duration=String(ct.duration)),ct.createdAt!=null&&(at.createdAt=String(ct.createdAt)),ct.vid!=null&&(at.vid=ct.vid|0),ct.isReconnection!=null&&(at.isReconnection=String(ct.isReconnection)),ct.clientIP!=null&&(at.clientIP=String(ct.clientIP)),at},yt.toObject=function(ct,at){at||(at={});var ut={};if(at.defaults){if(bo.Long){var ot=new bo.Long(0,0,!1);ut.lts=at.longs===String?ot.toString():at.longs===Number?ot.toNumber():ot}else ut.lts=at.longs===String?"0":0;ut.team="",ut.app="",ut.akkoVersion="",ut.sdkVersion="",ut.nativeVersion="",ut.platform="",ut.os="",ut.kind="",ut.uuid="",ut.region="",ut.userId="",ut.session="",ut.duration="",ut.createdAt="",ut.vid=0,ut.isReconnection="",ut.clientIP=""}return ct.lts!=null&&ct.hasOwnProperty("lts")&&(typeof ct.lts=="number"?ut.lts=at.longs===String?String(ct.lts):ct.lts:ut.lts=at.longs===String?bo.Long.prototype.toString.call(ct.lts):at.longs===Number?new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber():ct.lts),ct.team!=null&&ct.hasOwnProperty("team")&&(ut.team=ct.team),ct.app!=null&&ct.hasOwnProperty("app")&&(ut.app=ct.app),ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&(ut.akkoVersion=ct.akkoVersion),ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&(ut.sdkVersion=ct.sdkVersion),ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&(ut.nativeVersion=ct.nativeVersion),ct.platform!=null&&ct.hasOwnProperty("platform")&&(ut.platform=ct.platform),ct.os!=null&&ct.hasOwnProperty("os")&&(ut.os=ct.os),ct.kind!=null&&ct.hasOwnProperty("kind")&&(ut.kind=ct.kind),ct.uuid!=null&&ct.hasOwnProperty("uuid")&&(ut.uuid=ct.uuid),ct.region!=null&&ct.hasOwnProperty("region")&&(ut.region=ct.region),ct.userId!=null&&ct.hasOwnProperty("userId")&&(ut.userId=ct.userId),ct.session!=null&&ct.hasOwnProperty("session")&&(ut.session=ct.session),ct.duration!=null&&ct.hasOwnProperty("duration")&&(ut.duration=ct.duration),ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&(ut.createdAt=ct.createdAt),ct.vid!=null&&ct.hasOwnProperty("vid")&&(ut.vid=ct.vid),ct.isReconnection!=null&&ct.hasOwnProperty("isReconnection")&&(ut.isReconnection=ct.isReconnection),ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&(ut.clientIP=ct.clientIP),ut},yt.prototype.toJSON=function(){return this.constructor.toObject(this,lT.util.toJSONOptions)},yt.getTypeUrl=function(ct){return ct===void 0&&(ct="type.googleapis.com"),ct+"/WhiteBoardQualityDisconnection"},yt})(),r3=b0.WhiteBoardQualitySample=(function(){function yt(ct){if(ct)for(var at=Object.keys(ct),ut=0;ut<at.length;++ut)ct[at[ut]]!=null&&(this[at[ut]]=ct[at[ut]])}return yt.prototype.lts=bo.Long?bo.Long.fromBits(0,0,!1):0,yt.prototype.team="",yt.prototype.app="",yt.prototype.akkoVersion="",yt.prototype.sdkVersion="",yt.prototype.nativeVersion="",yt.prototype.platform="",yt.prototype.os="",yt.prototype.kind="",yt.prototype.uuid="",yt.prototype.region="",yt.prototype.userId="",yt.prototype.session="",yt.prototype.maxRTT="",yt.prototype.minRTT="",yt.prototype.averageRTT="",yt.prototype.maxQueue="",yt.prototype.minQueue="",yt.prototype.averageQueue="",yt.prototype.maxInterval="",yt.prototype.minInterval="",yt.prototype.averageInterval="",yt.prototype.vid=0,yt.prototype.createdAt="",yt.prototype.clientIP="",yt.create=function(ct){return new yt(ct)},yt.encode=function(ct,at){return at||(at=NR.create()),ct.lts!=null&&Object.hasOwnProperty.call(ct,"lts")&&at.uint32(8).int64(ct.lts),ct.team!=null&&Object.hasOwnProperty.call(ct,"team")&&at.uint32(18).string(ct.team),ct.app!=null&&Object.hasOwnProperty.call(ct,"app")&&at.uint32(26).string(ct.app),ct.akkoVersion!=null&&Object.hasOwnProperty.call(ct,"akkoVersion")&&at.uint32(34).string(ct.akkoVersion),ct.sdkVersion!=null&&Object.hasOwnProperty.call(ct,"sdkVersion")&&at.uint32(42).string(ct.sdkVersion),ct.nativeVersion!=null&&Object.hasOwnProperty.call(ct,"nativeVersion")&&at.uint32(50).string(ct.nativeVersion),ct.platform!=null&&Object.hasOwnProperty.call(ct,"platform")&&at.uint32(58).string(ct.platform),ct.os!=null&&Object.hasOwnProperty.call(ct,"os")&&at.uint32(66).string(ct.os),ct.kind!=null&&Object.hasOwnProperty.call(ct,"kind")&&at.uint32(74).string(ct.kind),ct.uuid!=null&&Object.hasOwnProperty.call(ct,"uuid")&&at.uint32(82).string(ct.uuid),ct.region!=null&&Object.hasOwnProperty.call(ct,"region")&&at.uint32(90).string(ct.region),ct.userId!=null&&Object.hasOwnProperty.call(ct,"userId")&&at.uint32(98).string(ct.userId),ct.session!=null&&Object.hasOwnProperty.call(ct,"session")&&at.uint32(106).string(ct.session),ct.maxRTT!=null&&Object.hasOwnProperty.call(ct,"maxRTT")&&at.uint32(114).string(ct.maxRTT),ct.minRTT!=null&&Object.hasOwnProperty.call(ct,"minRTT")&&at.uint32(122).string(ct.minRTT),ct.averageRTT!=null&&Object.hasOwnProperty.call(ct,"averageRTT")&&at.uint32(130).string(ct.averageRTT),ct.maxQueue!=null&&Object.hasOwnProperty.call(ct,"maxQueue")&&at.uint32(138).string(ct.maxQueue),ct.minQueue!=null&&Object.hasOwnProperty.call(ct,"minQueue")&&at.uint32(146).string(ct.minQueue),ct.averageQueue!=null&&Object.hasOwnProperty.call(ct,"averageQueue")&&at.uint32(154).string(ct.averageQueue),ct.maxInterval!=null&&Object.hasOwnProperty.call(ct,"maxInterval")&&at.uint32(162).string(ct.maxInterval),ct.minInterval!=null&&Object.hasOwnProperty.call(ct,"minInterval")&&at.uint32(170).string(ct.minInterval),ct.averageInterval!=null&&Object.hasOwnProperty.call(ct,"averageInterval")&&at.uint32(178).string(ct.averageInterval),ct.vid!=null&&Object.hasOwnProperty.call(ct,"vid")&&at.uint32(184).int32(ct.vid),ct.createdAt!=null&&Object.hasOwnProperty.call(ct,"createdAt")&&at.uint32(194).string(ct.createdAt),ct.clientIP!=null&&Object.hasOwnProperty.call(ct,"clientIP")&&at.uint32(202).string(ct.clientIP),at},yt.encodeDelimited=function(ct,at){return this.encode(ct,at).ldelim()},yt.decode=function(ct,at){ct instanceof y0||(ct=y0.create(ct));for(var ut=at===void 0?ct.len:ct.pos+at,ot=new b0.WhiteBoardQualitySample;ct.pos<ut;){var gt=ct.uint32();switch(gt>>>3){case 1:{ot.lts=ct.int64();break}case 2:{ot.team=ct.string();break}case 3:{ot.app=ct.string();break}case 4:{ot.akkoVersion=ct.string();break}case 5:{ot.sdkVersion=ct.string();break}case 6:{ot.nativeVersion=ct.string();break}case 7:{ot.platform=ct.string();break}case 8:{ot.os=ct.string();break}case 9:{ot.kind=ct.string();break}case 10:{ot.uuid=ct.string();break}case 11:{ot.region=ct.string();break}case 12:{ot.userId=ct.string();break}case 13:{ot.session=ct.string();break}case 14:{ot.maxRTT=ct.string();break}case 15:{ot.minRTT=ct.string();break}case 16:{ot.averageRTT=ct.string();break}case 17:{ot.maxQueue=ct.string();break}case 18:{ot.minQueue=ct.string();break}case 19:{ot.averageQueue=ct.string();break}case 20:{ot.maxInterval=ct.string();break}case 21:{ot.minInterval=ct.string();break}case 22:{ot.averageInterval=ct.string();break}case 23:{ot.vid=ct.int32();break}case 24:{ot.createdAt=ct.string();break}case 25:{ot.clientIP=ct.string();break}default:ct.skipType(gt&7);break}}return ot},yt.decodeDelimited=function(ct){return ct instanceof y0||(ct=new y0(ct)),this.decode(ct,ct.uint32())},yt.verify=function(ct){return tr(ct)!="object"||ct===null?"object expected":ct.lts!=null&&ct.hasOwnProperty("lts")&&!bo.isInteger(ct.lts)&&!(ct.lts&&bo.isInteger(ct.lts.low)&&bo.isInteger(ct.lts.high))?"lts: integer|Long expected":ct.team!=null&&ct.hasOwnProperty("team")&&!bo.isString(ct.team)?"team: string expected":ct.app!=null&&ct.hasOwnProperty("app")&&!bo.isString(ct.app)?"app: string expected":ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&!bo.isString(ct.akkoVersion)?"akkoVersion: string expected":ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&!bo.isString(ct.sdkVersion)?"sdkVersion: string expected":ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&!bo.isString(ct.nativeVersion)?"nativeVersion: string expected":ct.platform!=null&&ct.hasOwnProperty("platform")&&!bo.isString(ct.platform)?"platform: string expected":ct.os!=null&&ct.hasOwnProperty("os")&&!bo.isString(ct.os)?"os: string expected":ct.kind!=null&&ct.hasOwnProperty("kind")&&!bo.isString(ct.kind)?"kind: string expected":ct.uuid!=null&&ct.hasOwnProperty("uuid")&&!bo.isString(ct.uuid)?"uuid: string expected":ct.region!=null&&ct.hasOwnProperty("region")&&!bo.isString(ct.region)?"region: string expected":ct.userId!=null&&ct.hasOwnProperty("userId")&&!bo.isString(ct.userId)?"userId: string expected":ct.session!=null&&ct.hasOwnProperty("session")&&!bo.isString(ct.session)?"session: string expected":ct.maxRTT!=null&&ct.hasOwnProperty("maxRTT")&&!bo.isString(ct.maxRTT)?"maxRTT: string expected":ct.minRTT!=null&&ct.hasOwnProperty("minRTT")&&!bo.isString(ct.minRTT)?"minRTT: string expected":ct.averageRTT!=null&&ct.hasOwnProperty("averageRTT")&&!bo.isString(ct.averageRTT)?"averageRTT: string expected":ct.maxQueue!=null&&ct.hasOwnProperty("maxQueue")&&!bo.isString(ct.maxQueue)?"maxQueue: string expected":ct.minQueue!=null&&ct.hasOwnProperty("minQueue")&&!bo.isString(ct.minQueue)?"minQueue: string expected":ct.averageQueue!=null&&ct.hasOwnProperty("averageQueue")&&!bo.isString(ct.averageQueue)?"averageQueue: string expected":ct.maxInterval!=null&&ct.hasOwnProperty("maxInterval")&&!bo.isString(ct.maxInterval)?"maxInterval: string expected":ct.minInterval!=null&&ct.hasOwnProperty("minInterval")&&!bo.isString(ct.minInterval)?"minInterval: string expected":ct.averageInterval!=null&&ct.hasOwnProperty("averageInterval")&&!bo.isString(ct.averageInterval)?"averageInterval: string expected":ct.vid!=null&&ct.hasOwnProperty("vid")&&!bo.isInteger(ct.vid)?"vid: integer expected":ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&!bo.isString(ct.createdAt)?"createdAt: string expected":ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&!bo.isString(ct.clientIP)?"clientIP: string expected":null},yt.fromObject=function(ct){if(ct instanceof b0.WhiteBoardQualitySample)return ct;var at=new b0.WhiteBoardQualitySample;return ct.lts!=null&&(bo.Long?(at.lts=bo.Long.fromValue(ct.lts)).unsigned=!1:typeof ct.lts=="string"?at.lts=parseInt(ct.lts,10):typeof ct.lts=="number"?at.lts=ct.lts:tr(ct.lts)=="object"&&(at.lts=new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber())),ct.team!=null&&(at.team=String(ct.team)),ct.app!=null&&(at.app=String(ct.app)),ct.akkoVersion!=null&&(at.akkoVersion=String(ct.akkoVersion)),ct.sdkVersion!=null&&(at.sdkVersion=String(ct.sdkVersion)),ct.nativeVersion!=null&&(at.nativeVersion=String(ct.nativeVersion)),ct.platform!=null&&(at.platform=String(ct.platform)),ct.os!=null&&(at.os=String(ct.os)),ct.kind!=null&&(at.kind=String(ct.kind)),ct.uuid!=null&&(at.uuid=String(ct.uuid)),ct.region!=null&&(at.region=String(ct.region)),ct.userId!=null&&(at.userId=String(ct.userId)),ct.session!=null&&(at.session=String(ct.session)),ct.maxRTT!=null&&(at.maxRTT=String(ct.maxRTT)),ct.minRTT!=null&&(at.minRTT=String(ct.minRTT)),ct.averageRTT!=null&&(at.averageRTT=String(ct.averageRTT)),ct.maxQueue!=null&&(at.maxQueue=String(ct.maxQueue)),ct.minQueue!=null&&(at.minQueue=String(ct.minQueue)),ct.averageQueue!=null&&(at.averageQueue=String(ct.averageQueue)),ct.maxInterval!=null&&(at.maxInterval=String(ct.maxInterval)),ct.minInterval!=null&&(at.minInterval=String(ct.minInterval)),ct.averageInterval!=null&&(at.averageInterval=String(ct.averageInterval)),ct.vid!=null&&(at.vid=ct.vid|0),ct.createdAt!=null&&(at.createdAt=String(ct.createdAt)),ct.clientIP!=null&&(at.clientIP=String(ct.clientIP)),at},yt.toObject=function(ct,at){at||(at={});var ut={};if(at.defaults){if(bo.Long){var ot=new bo.Long(0,0,!1);ut.lts=at.longs===String?ot.toString():at.longs===Number?ot.toNumber():ot}else ut.lts=at.longs===String?"0":0;ut.team="",ut.app="",ut.akkoVersion="",ut.sdkVersion="",ut.nativeVersion="",ut.platform="",ut.os="",ut.kind="",ut.uuid="",ut.region="",ut.userId="",ut.session="",ut.maxRTT="",ut.minRTT="",ut.averageRTT="",ut.maxQueue="",ut.minQueue="",ut.averageQueue="",ut.maxInterval="",ut.minInterval="",ut.averageInterval="",ut.vid=0,ut.createdAt="",ut.clientIP=""}return ct.lts!=null&&ct.hasOwnProperty("lts")&&(typeof ct.lts=="number"?ut.lts=at.longs===String?String(ct.lts):ct.lts:ut.lts=at.longs===String?bo.Long.prototype.toString.call(ct.lts):at.longs===Number?new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber():ct.lts),ct.team!=null&&ct.hasOwnProperty("team")&&(ut.team=ct.team),ct.app!=null&&ct.hasOwnProperty("app")&&(ut.app=ct.app),ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&(ut.akkoVersion=ct.akkoVersion),ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&(ut.sdkVersion=ct.sdkVersion),ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&(ut.nativeVersion=ct.nativeVersion),ct.platform!=null&&ct.hasOwnProperty("platform")&&(ut.platform=ct.platform),ct.os!=null&&ct.hasOwnProperty("os")&&(ut.os=ct.os),ct.kind!=null&&ct.hasOwnProperty("kind")&&(ut.kind=ct.kind),ct.uuid!=null&&ct.hasOwnProperty("uuid")&&(ut.uuid=ct.uuid),ct.region!=null&&ct.hasOwnProperty("region")&&(ut.region=ct.region),ct.userId!=null&&ct.hasOwnProperty("userId")&&(ut.userId=ct.userId),ct.session!=null&&ct.hasOwnProperty("session")&&(ut.session=ct.session),ct.maxRTT!=null&&ct.hasOwnProperty("maxRTT")&&(ut.maxRTT=ct.maxRTT),ct.minRTT!=null&&ct.hasOwnProperty("minRTT")&&(ut.minRTT=ct.minRTT),ct.averageRTT!=null&&ct.hasOwnProperty("averageRTT")&&(ut.averageRTT=ct.averageRTT),ct.maxQueue!=null&&ct.hasOwnProperty("maxQueue")&&(ut.maxQueue=ct.maxQueue),ct.minQueue!=null&&ct.hasOwnProperty("minQueue")&&(ut.minQueue=ct.minQueue),ct.averageQueue!=null&&ct.hasOwnProperty("averageQueue")&&(ut.averageQueue=ct.averageQueue),ct.maxInterval!=null&&ct.hasOwnProperty("maxInterval")&&(ut.maxInterval=ct.maxInterval),ct.minInterval!=null&&ct.hasOwnProperty("minInterval")&&(ut.minInterval=ct.minInterval),ct.averageInterval!=null&&ct.hasOwnProperty("averageInterval")&&(ut.averageInterval=ct.averageInterval),ct.vid!=null&&ct.hasOwnProperty("vid")&&(ut.vid=ct.vid),ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&(ut.createdAt=ct.createdAt),ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&(ut.clientIP=ct.clientIP),ut},yt.prototype.toJSON=function(){return this.constructor.toObject(this,lT.util.toJSONOptions)},yt.getTypeUrl=function(ct){return ct===void 0&&(ct="type.googleapis.com"),ct+"/WhiteBoardQualitySample"},yt})(),n3=b0.WhiteBoardRealtime=(function(){function yt(ct){if(ct)for(var at=Object.keys(ct),ut=0;ut<at.length;++ut)ct[at[ut]]!=null&&(this[at[ut]]=ct[at[ut]])}return yt.prototype.lts=bo.Long?bo.Long.fromBits(0,0,!1):0,yt.prototype.akkoVersion="",yt.prototype.app="",yt.prototype.createdAt="",yt.prototype.level="",yt.prototype.message="",yt.prototype.os="",yt.prototype.platform="",yt.prototype.region="",yt.prototype.sdkVersion="",yt.prototype.session="",yt.prototype.team="",yt.prototype.userId="",yt.prototype.uuid="",yt.prototype.vid=0,yt.prototype.nativeVersion="",yt.prototype.clientIP="",yt.prototype.suid="",yt.prototype.netlessUA="",yt.create=function(ct){return new yt(ct)},yt.encode=function(ct,at){return at||(at=NR.create()),ct.lts!=null&&Object.hasOwnProperty.call(ct,"lts")&&at.uint32(8).int64(ct.lts),ct.akkoVersion!=null&&Object.hasOwnProperty.call(ct,"akkoVersion")&&at.uint32(18).string(ct.akkoVersion),ct.app!=null&&Object.hasOwnProperty.call(ct,"app")&&at.uint32(26).string(ct.app),ct.createdAt!=null&&Object.hasOwnProperty.call(ct,"createdAt")&&at.uint32(34).string(ct.createdAt),ct.level!=null&&Object.hasOwnProperty.call(ct,"level")&&at.uint32(42).string(ct.level),ct.message!=null&&Object.hasOwnProperty.call(ct,"message")&&at.uint32(50).string(ct.message),ct.os!=null&&Object.hasOwnProperty.call(ct,"os")&&at.uint32(58).string(ct.os),ct.platform!=null&&Object.hasOwnProperty.call(ct,"platform")&&at.uint32(66).string(ct.platform),ct.region!=null&&Object.hasOwnProperty.call(ct,"region")&&at.uint32(74).string(ct.region),ct.sdkVersion!=null&&Object.hasOwnProperty.call(ct,"sdkVersion")&&at.uint32(82).string(ct.sdkVersion),ct.session!=null&&Object.hasOwnProperty.call(ct,"session")&&at.uint32(90).string(ct.session),ct.team!=null&&Object.hasOwnProperty.call(ct,"team")&&at.uint32(98).string(ct.team),ct.userId!=null&&Object.hasOwnProperty.call(ct,"userId")&&at.uint32(106).string(ct.userId),ct.uuid!=null&&Object.hasOwnProperty.call(ct,"uuid")&&at.uint32(114).string(ct.uuid),ct.vid!=null&&Object.hasOwnProperty.call(ct,"vid")&&at.uint32(120).int32(ct.vid),ct.nativeVersion!=null&&Object.hasOwnProperty.call(ct,"nativeVersion")&&at.uint32(130).string(ct.nativeVersion),ct.clientIP!=null&&Object.hasOwnProperty.call(ct,"clientIP")&&at.uint32(138).string(ct.clientIP),ct.suid!=null&&Object.hasOwnProperty.call(ct,"suid")&&at.uint32(146).string(ct.suid),ct.netlessUA!=null&&Object.hasOwnProperty.call(ct,"netlessUA")&&at.uint32(154).string(ct.netlessUA),at},yt.encodeDelimited=function(ct,at){return this.encode(ct,at).ldelim()},yt.decode=function(ct,at){ct instanceof y0||(ct=y0.create(ct));for(var ut=at===void 0?ct.len:ct.pos+at,ot=new b0.WhiteBoardRealtime;ct.pos<ut;){var gt=ct.uint32();switch(gt>>>3){case 1:{ot.lts=ct.int64();break}case 2:{ot.akkoVersion=ct.string();break}case 3:{ot.app=ct.string();break}case 4:{ot.createdAt=ct.string();break}case 5:{ot.level=ct.string();break}case 6:{ot.message=ct.string();break}case 7:{ot.os=ct.string();break}case 8:{ot.platform=ct.string();break}case 9:{ot.region=ct.string();break}case 10:{ot.sdkVersion=ct.string();break}case 11:{ot.session=ct.string();break}case 12:{ot.team=ct.string();break}case 13:{ot.userId=ct.string();break}case 14:{ot.uuid=ct.string();break}case 15:{ot.vid=ct.int32();break}case 16:{ot.nativeVersion=ct.string();break}case 17:{ot.clientIP=ct.string();break}case 18:{ot.suid=ct.string();break}case 19:{ot.netlessUA=ct.string();break}default:ct.skipType(gt&7);break}}return ot},yt.decodeDelimited=function(ct){return ct instanceof y0||(ct=new y0(ct)),this.decode(ct,ct.uint32())},yt.verify=function(ct){return tr(ct)!="object"||ct===null?"object expected":ct.lts!=null&&ct.hasOwnProperty("lts")&&!bo.isInteger(ct.lts)&&!(ct.lts&&bo.isInteger(ct.lts.low)&&bo.isInteger(ct.lts.high))?"lts: integer|Long expected":ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&!bo.isString(ct.akkoVersion)?"akkoVersion: string expected":ct.app!=null&&ct.hasOwnProperty("app")&&!bo.isString(ct.app)?"app: string expected":ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&!bo.isString(ct.createdAt)?"createdAt: string expected":ct.level!=null&&ct.hasOwnProperty("level")&&!bo.isString(ct.level)?"level: string expected":ct.message!=null&&ct.hasOwnProperty("message")&&!bo.isString(ct.message)?"message: string expected":ct.os!=null&&ct.hasOwnProperty("os")&&!bo.isString(ct.os)?"os: string expected":ct.platform!=null&&ct.hasOwnProperty("platform")&&!bo.isString(ct.platform)?"platform: string expected":ct.region!=null&&ct.hasOwnProperty("region")&&!bo.isString(ct.region)?"region: string expected":ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&!bo.isString(ct.sdkVersion)?"sdkVersion: string expected":ct.session!=null&&ct.hasOwnProperty("session")&&!bo.isString(ct.session)?"session: string expected":ct.team!=null&&ct.hasOwnProperty("team")&&!bo.isString(ct.team)?"team: string expected":ct.userId!=null&&ct.hasOwnProperty("userId")&&!bo.isString(ct.userId)?"userId: string expected":ct.uuid!=null&&ct.hasOwnProperty("uuid")&&!bo.isString(ct.uuid)?"uuid: string expected":ct.vid!=null&&ct.hasOwnProperty("vid")&&!bo.isInteger(ct.vid)?"vid: integer expected":ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&!bo.isString(ct.nativeVersion)?"nativeVersion: string expected":ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&!bo.isString(ct.clientIP)?"clientIP: string expected":ct.suid!=null&&ct.hasOwnProperty("suid")&&!bo.isString(ct.suid)?"suid: string expected":ct.netlessUA!=null&&ct.hasOwnProperty("netlessUA")&&!bo.isString(ct.netlessUA)?"netlessUA: string expected":null},yt.fromObject=function(ct){if(ct instanceof b0.WhiteBoardRealtime)return ct;var at=new b0.WhiteBoardRealtime;return ct.lts!=null&&(bo.Long?(at.lts=bo.Long.fromValue(ct.lts)).unsigned=!1:typeof ct.lts=="string"?at.lts=parseInt(ct.lts,10):typeof ct.lts=="number"?at.lts=ct.lts:tr(ct.lts)=="object"&&(at.lts=new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber())),ct.akkoVersion!=null&&(at.akkoVersion=String(ct.akkoVersion)),ct.app!=null&&(at.app=String(ct.app)),ct.createdAt!=null&&(at.createdAt=String(ct.createdAt)),ct.level!=null&&(at.level=String(ct.level)),ct.message!=null&&(at.message=String(ct.message)),ct.os!=null&&(at.os=String(ct.os)),ct.platform!=null&&(at.platform=String(ct.platform)),ct.region!=null&&(at.region=String(ct.region)),ct.sdkVersion!=null&&(at.sdkVersion=String(ct.sdkVersion)),ct.session!=null&&(at.session=String(ct.session)),ct.team!=null&&(at.team=String(ct.team)),ct.userId!=null&&(at.userId=String(ct.userId)),ct.uuid!=null&&(at.uuid=String(ct.uuid)),ct.vid!=null&&(at.vid=ct.vid|0),ct.nativeVersion!=null&&(at.nativeVersion=String(ct.nativeVersion)),ct.clientIP!=null&&(at.clientIP=String(ct.clientIP)),ct.suid!=null&&(at.suid=String(ct.suid)),ct.netlessUA!=null&&(at.netlessUA=String(ct.netlessUA)),at},yt.toObject=function(ct,at){at||(at={});var ut={};if(at.defaults){if(bo.Long){var ot=new bo.Long(0,0,!1);ut.lts=at.longs===String?ot.toString():at.longs===Number?ot.toNumber():ot}else ut.lts=at.longs===String?"0":0;ut.akkoVersion="",ut.app="",ut.createdAt="",ut.level="",ut.message="",ut.os="",ut.platform="",ut.region="",ut.sdkVersion="",ut.session="",ut.team="",ut.userId="",ut.uuid="",ut.vid=0,ut.nativeVersion="",ut.clientIP="",ut.suid="",ut.netlessUA=""}return ct.lts!=null&&ct.hasOwnProperty("lts")&&(typeof ct.lts=="number"?ut.lts=at.longs===String?String(ct.lts):ct.lts:ut.lts=at.longs===String?bo.Long.prototype.toString.call(ct.lts):at.longs===Number?new bo.LongBits(ct.lts.low>>>0,ct.lts.high>>>0).toNumber():ct.lts),ct.akkoVersion!=null&&ct.hasOwnProperty("akkoVersion")&&(ut.akkoVersion=ct.akkoVersion),ct.app!=null&&ct.hasOwnProperty("app")&&(ut.app=ct.app),ct.createdAt!=null&&ct.hasOwnProperty("createdAt")&&(ut.createdAt=ct.createdAt),ct.level!=null&&ct.hasOwnProperty("level")&&(ut.level=ct.level),ct.message!=null&&ct.hasOwnProperty("message")&&(ut.message=ct.message),ct.os!=null&&ct.hasOwnProperty("os")&&(ut.os=ct.os),ct.platform!=null&&ct.hasOwnProperty("platform")&&(ut.platform=ct.platform),ct.region!=null&&ct.hasOwnProperty("region")&&(ut.region=ct.region),ct.sdkVersion!=null&&ct.hasOwnProperty("sdkVersion")&&(ut.sdkVersion=ct.sdkVersion),ct.session!=null&&ct.hasOwnProperty("session")&&(ut.session=ct.session),ct.team!=null&&ct.hasOwnProperty("team")&&(ut.team=ct.team),ct.userId!=null&&ct.hasOwnProperty("userId")&&(ut.userId=ct.userId),ct.uuid!=null&&ct.hasOwnProperty("uuid")&&(ut.uuid=ct.uuid),ct.vid!=null&&ct.hasOwnProperty("vid")&&(ut.vid=ct.vid),ct.nativeVersion!=null&&ct.hasOwnProperty("nativeVersion")&&(ut.nativeVersion=ct.nativeVersion),ct.clientIP!=null&&ct.hasOwnProperty("clientIP")&&(ut.clientIP=ct.clientIP),ct.suid!=null&&ct.hasOwnProperty("suid")&&(ut.suid=ct.suid),ct.netlessUA!=null&&ct.hasOwnProperty("netlessUA")&&(ut.netlessUA=ct.netlessUA),ut},yt.prototype.toJSON=function(){return this.constructor.toObject(this,lT.util.toJSONOptions)},yt.getTypeUrl=function(ct){return ct===void 0&&(ct="type.googleapis.com"),ct+"/WhiteBoardRealtime"},yt})(),kR;(function(yt){yt.Connected="connected",yt.ConnectFailed="connectFailed",yt.Sample="sample"})(kR||(kR={}));var i3=Object.freeze({Realtime:Object.freeze({eventID:9115,proto:n3}),Player:Object.freeze({eventID:9118,proto:J5})}),a3=Object.freeze({QualityConnection:Object.freeze({eventID:9120,proto:e3}),QualityDisconnection:Object.freeze({eventID:9121,proto:t3}),QualitySample:Object.freeze({eventID:9123,proto:r3})});function YM(yt,ct){var at,ut=o3(),ot={team:yt,app:ct,platform:ut?.platform||"browser",akkoVersion:Hu,sdkVersion:Zy.sdkVersion,nativeVersion:ut?.nativeVersion,os:(at=window.navigator)==null?void 0:at.platform,netlessUA:s3()};for(var gt in ot)ot[gt]===void 0&&delete ot[gt];return ot}function s3(){var yt=window.__netlessUA;if(typeof yt=="string")return yt.slice(0,255).split(/\s+/).filter(function(ct){return ct.includes("/")}).join(" ")}function o3(){var yt=window.__nativeTags;if(tr(yt)=="object"&&yt!==null){var ct=yt.nativeVersion,at=yt.platform;if(typeof ct=="string"&&typeof at=="string")return{nativeVersion:ct,platform:at}}return null}var IA;(function(yt){yt.AlwaysReport="alwaysReport",yt.BanReport="banReport",yt.DependsOnRemote="dependsOnRemote"})(IA||(IA={}));var u3=(function(){function yt(ct,at,ut){Ot(this,yt),this.teamUUID=ct,this.appUUID=at,this.loggerHub=this.createLoggerHub(ut)}return Bt(yt,[{key:"createLoggerHub",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ut="[White]",ot=at.reportDebugLogMode||IA.AlwaysReport,gt;switch(ot){case IA.BanReport:{gt=new DE({prefix:ut,levelMask:at.printLevelMask});break}case IA.AlwaysReport:case IA.DependsOnRemote:{var xt=Zy.log.argusOptions,Mt=xt.reportResourceURL,kt=xt.vid;gt=new IL({vid:kt,reportResourceURL:Mt,prefix:ut,reportLevelMask:at.reportLevelMask,printLevelMask:at.printLevelMask,timestampKey:"createdAt",events:i3,on:at.callbacksWhenReceiveLog});break}default:throw new Error("unrecognized LoggerReportMode ".concat(JSON.stringify(ot)))}return gt}},{key:"createRealtimeLogger",value:function(at,ut,ot){var gt=Object.freeze(hn(Qr({},YM(this.teamUUID,this.appUUID)),{uuid:at,uid:ut,suid:ut,region:ot})),xt=RE(this.loggerHub,"Realtime",gt);return window._whitelogger=xt,xt}},{key:"createPlayerLogger",value:function(at){var ut=Object.freeze(hn(Qr({},YM(this.teamUUID,this.appUUID)),{region:at}));return RE(this.loggerHub,"Player",ut)}}]),yt})(),l3=(function(){function yt(ct,at){Ot(this,yt);var ut=Zy.log.argusOptions,ot=ut.reportResourceURL,gt=ut.vid;this.loggerHub=new IL({vid:gt,reportResourceURL:ot,timestampKey:"createdAt",events:a3}),this.teamUUID=ct,this.appUUID=at}return Bt(yt,[{key:"createQualityConnectionCommitter",value:function(at,ut){var ot=Object.freeze(hn(Qr({},YM(this.teamUUID,this.appUUID)),{kind:kR.Connected,uuid:at,region:ut}));return Rw(this.loggerHub,"QualityConnection",ot)}},{key:"createQualityDisconnectionCommitter",value:function(at,ut){var ot=Object.freeze(hn(Qr({},YM(this.teamUUID,this.appUUID)),{kind:kR.ConnectFailed,uuid:at,region:ut}));return Rw(this.loggerHub,"QualityDisconnection",ot)}},{key:"createQualitySampleCommitter",value:function(at,ut){var ot=Object.freeze(hn(Qr({},YM(this.teamUUID,this.appUUID)),{kind:kR.Sample,uuid:at,region:ut}));return Rw(this.loggerHub,"QualitySample",ot)}}]),yt})();function c3(yt){return yt}var d3=ln(require$$125),h3=(function(){function yt(){Ot(this,yt),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}return Bt(yt,[{key:"calcFps",value:function(){var at=this;requestAnimationFrame(function(ut){var ot=ut-at.prevTime;at.valueTotal+=ot,at.times+=1,at.times>20&&(at.value=Math.floor(1e3*at.times/at.valueTotal),at.valueTotal=0,at.times=0),at.prevTime=ut,at.destroyed||at.calcFps()})}},{key:"destroy",value:function(){this.destroyed=!0}}]),yt})();function f3(yt){var ct=yt.slice().sort(function(Mt,kt){return Mt-kt}),at=ct.length,ut=Math.floor(.1*at),ot=ct.slice(ut,at-ut);if(ot.length%2==0){var gt=ot.length/2;return(ot[gt-1]+ot[gt])/2}else{var xt=Math.floor(ot.length/2);return ot[xt]}}var p3=(function(){function yt(ct){var at=this;Ot(this,yt),this.events=[],this.fps=new h3,this.fpsList=[];var ut=YM(ct.teamId,ct.appId);this.meta={teamId:ct.teamId,appId:ct.appId,roomId:ct.roomId,userId:ct.userId,platform:ut.platform,os:ut.os,sdkVersion:ct.sdkVersion,akkoVersion:ut.akkoVersion,nativeVersion:ut.nativeVersion},clearInterval(yt.timer),yt.timer=setInterval(function(){at.flush(at.events.splice(0))},5e3),clearInterval(this.fpsTimer),this.fpsTimer=setInterval(function(){at.commitFPS(at.fps.value)},1e3),yt.pendingErrors.forEach(function(ot){at.commit({name:"akko-setup-failed",reason:ot.error+"",result:"fail",payload:{}})}),yt.pendingErrors=[]}return Bt(yt,[{key:"beginSession",value:function(){this.meta.session=(0,d3.v1)().replace(/-/g,"")}},{key:"commitFPS",value:function(at){if(this.fpsList.push(at),this.fpsList.length>=30){var ut=this.fpsList.splice(0);this.commit({name:"runtime-fps",result:"",reason:"",payload:{min:Math.min.apply(Math,Ct(ut)),max:Math.max.apply(Math,Ct(ut)),p90:Math.round(f3(ut))}})}}},{key:"commit",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=Object.keys(at.payload).reduce(function(xt,Mt){return xt["payload_".concat(Mt)]=at.payload[Mt],xt},{}),gt={name:at.name,result:at.result,reason:at.reason};this.events.push(Qr(hn(Qr(Qr({},ut),gt),{timestamp:Date.now().toString()}),ot)),this.events.length>50&&this.flush(this.events.splice(0))}},{key:"destroy",value:function(){clearInterval(this.fpsTimer),clearInterval(yt.timer)}},{key:"flush",value:function(at){at.length>0&&fetch("https://event.whiteboard.sd-rtn.com",{method:"POST",body:JSON.stringify(hn(Qr({},this.meta),{events:at}))}).catch(function(){})}}]),yt})(),qO=p3;qO.pendingErrors=[];var RL=1024,_S;(function(yt){yt.Desktop="desktop",yt.Phone="phone",yt.Pad="pad",yt.TV="tv"})(_S||(_S={}));var m3=(function(){function yt(ct){Ot(this,yt),this.version=Zy.sdkVersion;var at,ut=this.parseAppIdentifier(ct.appIdentifier),ot=ut.teamUUID,gt=ut.appUUID;if(this.teamUUID=ot,this.appUUID=gt,ct.deviceType&&ct.screenType)this.deviceType=ct.deviceType,this.screenType=ct.screenType;else if(ct.deviceType&&!ct.screenType)this.deviceType=ct.deviceType,this.screenType=ct.deviceType===d0.Touch?_S.Phone:_S.Desktop;else if(!ct.deviceType&&ct.screenType)this.deviceType=d0.Surface,this.screenType=ct.screenType;else{switch(O4.default.deviceType){case"mouseOnly":{this.screenType=_S.Desktop;break}case"touchOnly":{this.screenType=_S.Phone;break}case"hybrid":{this.screenType=_S.Desktop;break}}this.deviceType=d0.Surface}if(ct.renderEngine!==sT.SVG&&!this.isCanvasRenderEngineAvailable()?this.renderEngine=sT.SVG:ct.renderEngine?this.renderEngine=ct.renderEngine:this.renderEngine=sT.Canvas,this.region=vN(ct.region||Zy.defaultRegion),this.pptParams=ct.pptParams,((at=ct.loggerOptions)==null?void 0:at.disableReportLog)!==void 0)throw new Error("loggserOptions.disableReportLog is deprecated. please replace it with reportDebugLogMode or reportQualityMode");this.enableReportQuality(ct.loggerOptions)&&(this.qualityLoggerFactory=new l3(ot,gt)),this.whiteLoggerFactory=new u3(ot,gt,ct.loggerOptions),this.akkoApp=new CE({appIdentifier:ct.appIdentifier,observerAdapter:new j4,clientVersion:Zy.sdkVersion,enableAnimationFrame:!0,jsxFactory:lq.createElement,escapeObjectFilter:lq.isValidElement,reconnectionOptions:ct.reconnectionOptions,convertIdToUrl:ct.urlInterrupter||function(xt){return xt},configsInterrupter:c3,shuntApiHosts:M4(this.region,ct.apiHosts||(this.region.includes("cn-hz")?Zy.shuntApiHosts.shengwang:Zy.shuntApiHosts.agora)),onAkkoSetupFailed:function(Mt){qO.pendingErrors.push({timestamp:Date.now(),error:Mt}),ct.onWhiteSetupFailed&&ct.onWhiteSetupFailed(Mt)}}),this.preloadDynamicPPT=!!ct.preloadDynamicPPT,this.fonts=Object.freeze(Qr({},ct.fonts)),this.handToolKey=ct.handToolKey,this.fontFamily=ct.fontFamily,this.disableCurveAnimes=yt.defaultValue(ct.disableCurveAnimes,!0),this.disableNewPencilStroke=yt.defaultValue(ct.disableNewPencilStroke,!1),this.disableRotation=!!ct.disableRotation,this.urlInterrupter=ct.urlInterrupter||function(xt){return xt},this.boundless=new Yw(this.deviceType),this.plugins=this.assertPlugins(ct.plugins),this.invisiblePlugins=this.assertInvisiblePlugins(ct.invisiblePlugins),this.wrappedComponents=Object.freeze(ct.wrappedComponents?Ct(ct.wrappedComponents):[]),this.useMobXState=!!ct.useMobXState,this.onlyCallbackRemoteStateModify=!!ct.onlyCallbackRemoteStateModify,xL.injectDefaultStyleIfNotInjectBefore()}return Bt(yt,[{key:"joinRoom",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt,zt,Ht,rr,ur,_r,Dr;return regeneratorRuntime.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(xt=ot.uuid,!(ot.useMultiViews&&ot.cursorAdapter)){Ur.next=3;break}throw new Error("cannot pass cursorAdapter when open useMultiViews");case 3:return Mt=vN(ot.region||this.region),kt=this.standardizeUserPayload(ot.uid,ot.userPayload),zt=this.whiteLoggerFactory.createRealtimeLogger(xt,kt.uid,Mt),Ht=T5(ot.floatBar),rr=this.qualityLoggerFactory&&{connection:this.qualityLoggerFactory.createQualityConnectionCommitter(xt,Mt),disconnection:this.qualityLoggerFactory.createQualityDisconnectionCommitter(xt,Mt),sample:this.qualityLoggerFactory.createQualitySampleCommitter(xt,Mt)},ot.newPencilWritingQuality!==void 0?ur=ot.newPencilWritingQuality:ur=xN.Hight,ot.optimizeOptions&&this.boundless.setOptimizeOptions(ot.optimizeOptions),_r=new qO({teamId:this.teamUUID,appId:this.appUUID,roomId:ot.uuid,userId:kt.uid}),Dr=new PO({whiteTracker:_r,whiteLogger:zt,qualityComitters:rr,region:Mt,floatBarOptions:Ht,boundless:this.boundless,screenType:this.screenType,renderEngine:this.renderEngine,autoResize:!ot.disableAutoResize,plugins:this.plugins,invisiblePlugins:this.mergeArray(this.invisiblePlugins,this.assertInvisiblePlugins(ot.invisiblePlugins)),wrappedComponents:this.mergeArray(this.wrappedComponents,ot.wrappedComponents),akkoApp:this.akkoApp,preloadDynamicPPT:this.preloadDynamicPPT,userFonts:this.fonts,handToolKey:this.handToolKey,fontFamily:this.fontFamily,undoCacheScenesCount:yt.defaultValue(ot.undoCacheScenesCount,12),cameraBound:this.standardizeCameraBound(ot.cameraBound),userPayload:kt,disableKeepMemberState:typeof indexedDB>"u",disableDeviceInputs:!!ot.disableDeviceInputs,disableCameraTransform:ot.disableCameraTransform,disableMagixEventDispatchLimit:!!ot.disableMagixEventDispatchLimit,disableEraseImage:yt.defaultValue(ot.disableEraseImage,!0),disableOthersSelectingBox:!!ot.disableOthersSelectingBox,disablePencilWrittingLimitFrequency:!!ot.disablePencilWrittingLimitFrequency,disableCurveAnimes:this.disableCurveAnimes,disableRotation:this.disableRotation,disableNewPencilStroke:this.disableNewPencilStroke,newPencilWritingQuality:ur,enableTextareHub:!!Ht||!ot.disableTextOperations,useMultiViews:ot.useMultiViews,onlyCallbackRemoteStateModify:this.onlyCallbackRemoteStateModify,cursorAdapter:ot.cursorAdapter,hotKeys:ot.hotKeys,rejectWhenReadonlyErrorLevel:ot.rejectWhenReadonlyErrorLevel,eraserRadiusCursor:new Bq(zt),urlInterrupter:this.urlInterrupter,pptParams:this.pptParams,useMobXState:this.useMobXState,modulesOrigin:ot.modulesOrigin,useNativeClipboard:ot.useNativeClipboard,commandWheelToZoom:ot.commandWheelToZoom,callbacks:gt}),Ur.next=8,Dr.connect({uuid:xt,region:Mt,roomToken:ot.roomToken,userPayload:kt,deviceType:this.deviceType,isWritable:yt.defaultValue(ot.isWritable,!0),enableDrawPoint:yt.defaultValue(ot.enableDrawPoint,!1),disableNewPencil:yt.defaultValue(ot.disableNewPencil,!0)});case 8:return Ur.abrupt("return",Dr);case 9:case"end":return Ur.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"isPlayable",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot){var gt;return regeneratorRuntime.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return gt={region:vN(ot.region||this.region),room:ot.room,roomToken:ot.roomToken,slice:ot.slice,beginTimestamp:ot.beginTimestamp,duration:ot.duration},Mt.next=3,this.akkoApp.searchSlices(gt);case 3:return Mt.t0=Mt.sent.length,Mt.abrupt("return",Mt.t0>0);case 5:case"end":return Mt.stop()}},ut,this)}));function at(ut){return ct.apply(this,arguments)}return at})()},{key:"replayRoom",value:(function(){var ct=ht(regeneratorRuntime.mark(function ut(ot,gt){var xt,Mt,kt;return regeneratorRuntime.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!ot.mediaURL){Ht.next=2;break}throw new Error("mediaURL was deprecated. please to see https://github.com/netless-io/netless-combine-player");case 2:if(!(ot.useMultiViews&&ot.cursorAdapter)){Ht.next=4;break}throw new Error("cannot pass cursorAdapter when open useMultiViews");case 4:return xt=vN(ot.region||this.region),Mt=this.whiteLoggerFactory.createPlayerLogger(xt),kt=new TL({logger:Mt,region:xt,boundless:this.boundless,screenType:this.screenType,renderEngine:this.renderEngine,autoResize:!ot.disableAutoResize,plugins:this.plugins,invisiblePlugins:this.mergeArray(this.invisiblePlugins,this.assertInvisiblePlugins(ot.invisiblePlugins)),wrappedComponents:this.mergeArray(this.wrappedComponents,ot.wrappedComponents),preloadDynamicPPT:this.preloadDynamicPPT,userFonts:this.fonts,handToolKey:this.handToolKey,fontFamily:this.fontFamily,cameraBound:this.standardizeCameraBound(ot.cameraBound),onlyCallbackRemoteStateModify:this.onlyCallbackRemoteStateModify,disableCameraTransform:ot.disableCameraTransform,disableOthersSelectingBox:!!ot.disableOthersSelectingBox,disableNewPencilStroke:this.disableNewPencilStroke,useMultiViews:ot.useMultiViews,cursorAdapter:ot.cursorAdapter,disableCurveAnimes:this.disableCurveAnimes,disableRotation:this.disableRotation,eraserRadiusCursor:new Bq(Mt),urlInterrupter:this.urlInterrupter,pptParams:this.pptParams,useMobXState:this.useMobXState,crops:ot.crops,alignmentInterval:ot.alignmentInterval,alignmentThreshold:ot.alignmentThreshold,callbacks:gt}),Ht.next=7,kt.setupReconstructor({akkoApp:this.akkoApp,region:xt,slice:ot.slice,room:ot.room,roomToken:ot.roomToken,beginTimestamp:ot.beginTimestamp,duration:ot.duration});case 7:return Ht.abrupt("return",kt);case 8:case"end":return Ht.stop()}},ut,this)}));function at(ut,ot){return ct.apply(this,arguments)}return at})()},{key:"standardizeUserPayload",value:function(at){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=ut;if(at===void 0)throw new Error("expect uid on parameters");if(typeof at!="string")throw new Error("invalid uid. ".concat(at," should be string"));if(at.length>RL)throw new Error("invalid uid. length cannot over ".concat(RL));if(tr(ot)!="object"||ot===null)throw new Error("invalid payload. ".concat(ot," should be object"));if(ot=Qr({},ot),"uid"in ot&&ot.uid!==at)throw new Error("payload did have uid ".concat(ot.uid," that is not equals to ").concat(at));return ot.uid=at,ot}},{key:"pptConverter",value:function(at){return new BN(at)}},{key:"standardizeCameraBound",value:function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Qr({maxContentMode:hO(10),minContentMode:hO(.1),width:1/0,height:1/0},at)}},{key:"enableReportQuality",value:function(at){return at?.reportQualityMode!==IA.BanReport}},{key:"isCanvasRenderEngineAvailable",value:function(){var at=["setTransform","translate","scale","drawImage","getTransform","resetTransform","clearRect","fillStyle","lineWidth","strokeStyle","lineJoin","lineCap","beginPath","moveTo","quadraticCurveTo","bezierCurveTo","stroke","lineTo","arc","fill","ellipse","setLineDash","strokeRect","closePath"],ut=document.createElement("canvas");if(ut===void 0)return!1;var ot=ut.getContext("2d");if(ot===null)return!1;for(var gt=0,xt=at;gt<xt.length;gt++){var Mt=xt[gt];if(!(Mt in ot))return!1}return!0}},{key:"parseAppIdentifier",value:function(at){if(!/^[0-9a-zA-Z\-_]+\/[0-9a-zA-Z\-_]+$/.test(at))throw new Error("find invalid appIdentifier: ".concat(JSON.stringify(at)));var ut=at.split("/"),ot=mt(ut,2),gt=ot[0],xt=ot[1];return{teamUUID:gt,appUUID:xt}}},{key:"assertPlugins",value:function(at){var ut;return at&&(at instanceof TO?ut=at:console.warn("plugins is not instance of Plugins. plugins will not be working. you should call createPlugins() to create it")),ut||(ut=new TO({})),ut}},{key:"assertInvisiblePlugins",value:function(at){var ut=[];if(at){var ot=Jt(at),gt;try{for(ot.s();!(gt=ot.n()).done;){var xt=gt.value;this.isValidInvisiblePluginClass(xt)&&ut.push(xt)}}catch(Mt){ot.e(Mt)}finally{ot.f()}}return Object.freeze(ut)}},{key:"isValidInvisiblePluginClass",value:function(at){if(typeof at.kind!="string")return console.warn("invisible plugin class is invalid. expect `public static readonly kind: string = 'xxx';`"),!1;for(var ut=at.prototype;ut!==null;){if(ut===sL.prototype)return!0;ut=Object.getPrototypeOf(ut)}return console.warn("invisible plugin class is not extends InvisiblePlugin"),!1}},{key:"mergeArray",value:function(at,ut){var ot=Ct(at);if(ut){var gt=Jt(ut),xt;try{for(gt.s();!(xt=gt.n()).done;){var Mt=xt.value;at.indexOf(Mt)===-1&&ot.push(Mt)}}catch(kt){gt.e(kt)}finally{gt.f()}}return ot}}],[{key:"defaultValue",value:function(at,ut){return at===void 0?ut:at}}]),yt})(),PL=m3;PL.netState=new j5;var g3=Zy.sdkVersion;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
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.
***************************************************************************** *//**
* @preserve JavaScript implementation of
* Algorithm for Automatically Fitting Digitized Curves
* by Philip J. Schneider
* "Graphics Gems", Academic Press, 1990
*
* The MIT License (MIT)
*
* https://github.com/soswow/fit-curves
*/})(whiteWebSdk)),whiteWebSdk}var whiteWebSdkExports=requireWhiteWebSdk(),pRetry$1={exports:{}},retry$2={},retry_operation,hasRequiredRetry_operation;function requireRetry_operation(){if(hasRequiredRetry_operation)return retry_operation;hasRequiredRetry_operation=1;function et(_e,tt){typeof tt=="boolean"&&(tt={forever:tt}),this._originalTimeouts=JSON.parse(JSON.stringify(_e)),this._timeouts=_e,this._options=tt||{},this._maxRetryTime=tt&&tt.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return retry_operation=et,et.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},et.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},et.prototype.retry=function(_e){if(this._timeout&&clearTimeout(this._timeout),!_e)return!1;var tt=new Date().getTime();if(_e&&tt-this._operationStart>=this._maxRetryTime)return this._errors.push(_e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(_e);var rt=this._timeouts.shift();if(rt===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),rt=this._cachedTimeouts.slice(-1);else return!1;var nt=this;return this._timer=setTimeout(function(){nt._attempts++,nt._operationTimeoutCb&&(nt._timeout=setTimeout(function(){nt._operationTimeoutCb(nt._attempts)},nt._operationTimeout),nt._options.unref&&nt._timeout.unref()),nt._fn(nt._attempts)},rt),this._options.unref&&this._timer.unref(),!0},et.prototype.attempt=function(_e,tt){this._fn=_e,tt&&(tt.timeout&&(this._operationTimeout=tt.timeout),tt.cb&&(this._operationTimeoutCb=tt.cb));var rt=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){rt._operationTimeoutCb()},rt._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},et.prototype.try=function(_e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(_e)},et.prototype.start=function(_e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(_e)},et.prototype.start=et.prototype.try,et.prototype.errors=function(){return this._errors},et.prototype.attempts=function(){return this._attempts},et.prototype.mainError=function(){if(this._errors.length===0)return null;for(var _e={},tt=null,rt=0,nt=0;nt<this._errors.length;nt++){var st=this._errors[nt],dt=st.message,ft=(_e[dt]||0)+1;_e[dt]=ft,ft>=rt&&(tt=st,rt=ft)}return tt},retry_operation}var hasRequiredRetry$2;function requireRetry$2(){return hasRequiredRetry$2||(hasRequiredRetry$2=1,(function(et){var _e=requireRetry_operation();et.operation=function(tt){var rt=et.timeouts(tt);return new _e(rt,{forever:tt&&(tt.forever||tt.retries===1/0),unref:tt&&tt.unref,maxRetryTime:tt&&tt.maxRetryTime})},et.timeouts=function(tt){if(tt instanceof Array)return[].concat(tt);var rt={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var nt in tt)rt[nt]=tt[nt];if(rt.minTimeout>rt.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var st=[],dt=0;dt<rt.retries;dt++)st.push(this.createTimeout(dt,rt));return tt&&tt.forever&&!st.length&&st.push(this.createTimeout(dt,rt)),st.sort(function(ft,ht){return ft-ht}),st},et.createTimeout=function(tt,rt){var nt=rt.randomize?Math.random()+1:1,st=Math.round(nt*Math.max(rt.minTimeout,1)*Math.pow(rt.factor,tt));return st=Math.min(st,rt.maxTimeout),st},et.wrap=function(tt,rt,nt){if(rt instanceof Array&&(nt=rt,rt=null),!nt){nt=[];for(var st in tt)typeof tt[st]=="function"&&nt.push(st)}for(var dt=0;dt<nt.length;dt++){var ft=nt[dt],ht=tt[ft];tt[ft]=(function(bt){var St=et.operation(rt),Et=Array.prototype.slice.call(arguments,1),Ct=Et.pop();Et.push(function(Rt){St.retry(Rt)||(Rt&&(arguments[0]=St.mainError()),Ct.apply(this,arguments))}),St.attempt(function(){bt.apply(tt,Et)})}).bind(tt,ht),tt[ft].options=rt}}})(retry$2)),retry$2}var retry$1,hasRequiredRetry$1;function requireRetry$1(){return hasRequiredRetry$1||(hasRequiredRetry$1=1,retry$1=requireRetry$2()),retry$1}var hasRequiredPRetry;function requirePRetry(){if(hasRequiredPRetry)return pRetry$1.exports;hasRequiredPRetry=1;const et=requireRetry$1(),_e=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class tt extends Error{constructor(ft){super(),ft instanceof Error?(this.originalError=ft,{message:ft}=ft):(this.originalError=new Error(ft),this.originalError.stack=this.stack),this.name="AbortError",this.message=ft}}const rt=(dt,ft,ht)=>{const mt=ht.retries-(ft-1);return dt.attemptNumber=ft,dt.retriesLeft=mt,dt},nt=dt=>_e.includes(dt),st=(dt,ft)=>new Promise((ht,mt)=>{ft={onFailedAttempt:()=>{},retries:10,...ft};const bt=et.operation(ft);bt.attempt(async St=>{try{ht(await dt(St))}catch(Et){if(!(Et instanceof Error)){mt(new TypeError(`Non-error was thrown: "${Et}". You should only throw errors.`));return}if(Et instanceof tt)bt.stop(),mt(Et.originalError);else if(Et instanceof TypeError&&!nt(Et.message))bt.stop(),mt(Et);else{rt(Et,St,ft);try{await ft.onFailedAttempt(Et)}catch(Ct){mt(Ct);return}bt.retry(Et)||mt(bt.mainError())}}})});return pRetry$1.exports=st,pRetry$1.exports.default=st,pRetry$1.exports.AbortError=tt,pRetry$1.exports}var pRetryExports=requirePRetry();const pRetry=getDefaultExportFromCjs(pRetryExports);var emittery,hasRequiredEmittery;function requireEmittery(){if(hasRequiredEmittery)return emittery;hasRequiredEmittery=1;const et=new WeakMap,_e=new WeakMap,tt=new WeakMap,rt=Symbol("anyProducer"),nt=Promise.resolve(),st=Symbol("listenerAdded"),dt=Symbol("listenerRemoved");let ft=!1;function ht(Nt){if(typeof Nt!="string"&&typeof Nt!="symbol")throw new TypeError("eventName must be a string or a symbol")}function mt(Nt){if(typeof Nt!="function")throw new TypeError("listener must be a function")}function bt(Nt,Pt){const It=_e.get(Nt);return It.has(Pt)||It.set(Pt,new Set),It.get(Pt)}function St(Nt,Pt){const It=typeof Pt=="string"||typeof Pt=="symbol"?Pt:rt,Ft=tt.get(Nt);return Ft.has(It)||Ft.set(It,new Set),Ft.get(It)}function Et(Nt,Pt,It){const Ft=tt.get(Nt);if(Ft.has(Pt))for(const qt of Ft.get(Pt))qt.enqueue(It);if(Ft.has(rt)){const qt=Promise.all([Pt,It]);for(const Vt of Ft.get(rt))Vt.enqueue(qt)}}function Ct(Nt,Pt){Pt=Array.isArray(Pt)?Pt:[Pt];let It=!1,Ft=()=>{},qt=[];const Vt={enqueue(Kt){qt.push(Kt),Ft()},finish(){It=!0,Ft()}};for(const Kt of Pt)St(Nt,Kt).add(Vt);return{async next(){return qt?qt.length===0?It?(qt=void 0,this.next()):(await new Promise(Kt=>{Ft=Kt}),this.next()):{done:!1,value:await qt.shift()}:{done:!0}},async return(Kt){qt=void 0;for(const jt of Pt)St(Nt,jt).delete(Vt);return Ft(),arguments.length>0?{done:!0,value:await Kt}:{done:!0}},[Symbol.asyncIterator](){return this}}}function Rt(Nt){if(Nt===void 0)return At;if(!Array.isArray(Nt))throw new TypeError("`methodNames` must be an array of strings");for(const Pt of Nt)if(!At.includes(Pt))throw typeof Pt!="string"?new TypeError("`methodNames` element must be a string"):new Error(`${Pt} is not Emittery method`);return Nt}const Tt=Nt=>Nt===st||Nt===dt;class wt{static mixin(Pt,It){return It=Rt(It),Ft=>{if(typeof Ft!="function")throw new TypeError("`target` must be function");for(const Kt of It)if(Ft.prototype[Kt]!==void 0)throw new Error(`The property \`${Kt}\` already exists on \`target\``);function qt(){return Object.defineProperty(this,Pt,{enumerable:!1,value:new wt}),this[Pt]}Object.defineProperty(Ft.prototype,Pt,{enumerable:!1,get:qt});const Vt=Kt=>function(...jt){return this[Pt][Kt](...jt)};for(const Kt of It)Object.defineProperty(Ft.prototype,Kt,{enumerable:!1,value:Vt(Kt)});return Ft}}static get isDebugEnabled(){if(typeof process!="object")return ft;const{env:Pt}=process||{env:{}};return Pt.DEBUG==="emittery"||Pt.DEBUG==="*"||ft}static set isDebugEnabled(Pt){ft=Pt}constructor(Pt={}){et.set(this,new Set),_e.set(this,new Map),tt.set(this,new Map),this.debug=Pt.debug||{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(It,Ft,qt,Vt)=>{Vt=JSON.stringify(Vt),typeof qt=="symbol"&&(qt=qt.toString());const Kt=new Date,jt=`${Kt.getHours()}:${Kt.getMinutes()}:${Kt.getSeconds()}.${Kt.getMilliseconds()}`;console.log(`[${jt}][emittery:${It}][${Ft}] Event Name: ${qt}
data: ${Vt}`)})}logIfDebugEnabled(Pt,It,Ft){(wt.isDebugEnabled||this.debug.enabled)&&this.debug.logger(Pt,this.debug.name,It,Ft)}on(Pt,It){mt(It),Pt=Array.isArray(Pt)?Pt:[Pt];for(const Ft of Pt)ht(Ft),bt(this,Ft).add(It),this.logIfDebugEnabled("subscribe",Ft,void 0),Tt(Ft)||this.emit(st,{eventName:Ft,listener:It});return this.off.bind(this,Pt,It)}off(Pt,It){mt(It),Pt=Array.isArray(Pt)?Pt:[Pt];for(const Ft of Pt)ht(Ft),bt(this,Ft).delete(It),this.logIfDebugEnabled("unsubscribe",Ft,void 0),Tt(Ft)||this.emit(dt,{eventName:Ft,listener:It})}once(Pt){return new Promise(It=>{const Ft=this.on(Pt,qt=>{Ft(),It(qt)})})}events(Pt){Pt=Array.isArray(Pt)?Pt:[Pt];for(const It of Pt)ht(It);return Ct(this,Pt)}async emit(Pt,It){ht(Pt),this.logIfDebugEnabled("emit",Pt,It),Et(this,Pt,It);const Ft=bt(this,Pt),qt=et.get(this),Vt=[...Ft],Kt=Tt(Pt)?[]:[...qt];await nt,await Promise.all([...Vt.map(async jt=>{if(Ft.has(jt))return jt(It)}),...Kt.map(async jt=>{if(qt.has(jt))return jt(Pt,It)})])}async emitSerial(Pt,It){ht(Pt),this.logIfDebugEnabled("emitSerial",Pt,It);const Ft=bt(this,Pt),qt=et.get(this),Vt=[...Ft],Kt=[...qt];await nt;for(const jt of Vt)Ft.has(jt)&&await jt(It);for(const jt of Kt)qt.has(jt)&&await jt(Pt,It)}onAny(Pt){return mt(Pt),this.logIfDebugEnabled("subscribeAny",void 0,void 0),et.get(this).add(Pt),this.emit(st,{listener:Pt}),this.offAny.bind(this,Pt)}anyEvent(){return Ct(this)}offAny(Pt){mt(Pt),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),this.emit(dt,{listener:Pt}),et.get(this).delete(Pt)}clearListeners(Pt){Pt=Array.isArray(Pt)?Pt:[Pt];for(const It of Pt)if(this.logIfDebugEnabled("clear",It,void 0),typeof It=="string"||typeof It=="symbol"){bt(this,It).clear();const Ft=St(this,It);for(const qt of Ft)qt.finish();Ft.clear()}else{et.get(this).clear();for(const Ft of _e.get(this).values())Ft.clear();for(const Ft of tt.get(this).values()){for(const qt of Ft)qt.finish();Ft.clear()}}}listenerCount(Pt){Pt=Array.isArray(Pt)?Pt:[Pt];let It=0;for(const Ft of Pt){if(typeof Ft=="string"){It+=et.get(this).size+bt(this,Ft).size+St(this,Ft).size+St(this).size;continue}typeof Ft<"u"&&ht(Ft),It+=et.get(this).size;for(const qt of _e.get(this).values())It+=qt.size;for(const qt of tt.get(this).values())It+=qt.size}return It}bindMethods(Pt,It){if(typeof Pt!="object"||Pt===null)throw new TypeError("`target` must be an object");It=Rt(It);for(const Ft of It){if(Pt[Ft]!==void 0)throw new Error(`The property \`${Ft}\` already exists on \`target\``);Object.defineProperty(Pt,Ft,{enumerable:!1,value:this[Ft].bind(this)})}}}const At=Object.getOwnPropertyNames(wt.prototype).filter(Nt=>Nt!=="constructor");return Object.defineProperty(wt,"listenerAdded",{value:st,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(wt,"listenerRemoved",{value:dt,writable:!1,enumerable:!0,configurable:!1}),emittery=wt,emittery}var emitteryExports=requireEmittery();const Emittery=getDefaultExportFromCjs(emitteryExports);var lodash$1={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/var lodash=lodash$1.exports,hasRequiredLodash;function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,(function(et,_e){(function(){var tt,rt="4.17.21",nt=200,st="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",dt="Expected a function",ft="Invalid `variable` option passed into `_.template`",ht="__lodash_hash_undefined__",mt=500,bt="__lodash_placeholder__",St=1,Et=2,Ct=4,Rt=1,Tt=2,wt=1,At=2,Nt=4,Pt=8,It=16,Ft=32,qt=64,Vt=128,Kt=256,jt=512,Ut=30,Ot="...",Wt=800,Bt=16,tr=1,Jt=2,ar=3,pr=1/0,cr=9007199254740991,gr=17976931348623157e292,Sr=NaN,Er=4294967295,Vr=Er-1,Wr=Er>>>1,Mr=[["ary",Vt],["bind",wt],["bindKey",At],["curry",Pt],["curryRight",It],["flip",jt],["partial",Ft],["partialRight",qt],["rearg",Kt]],Nr="[object Arguments]",Yr="[object Array]",Or="[object AsyncFunction]",Ar="[object Boolean]",Qr="[object Date]",hn="[object DOMException]",Sn="[object Error]",Kr="[object Function]",Hn="[object GeneratorFunction]",ln="[object Map]",kn="[object Number]",xn="[object Null]",An="[object Object]",rs="[object Promise]",qs="[object Proxy]",Ln="[object RegExp]",Cn="[object Set]",Nn="[object String]",Gr="[object Symbol]",tn="[object Undefined]",dn="[object WeakMap]",Rn="[object WeakSet]",wn="[object ArrayBuffer]",Un="[object DataView]",Zn="[object Float32Array]",pn="[object Float64Array]",Dn="[object Int8Array]",qn="[object Int16Array]",_a="[object Int32Array]",Vn="[object Uint8Array]",bs="[object Uint8ClampedArray]",Is="[object Uint16Array]",uo="[object Uint32Array]",Rs=/\b__p \+= '';/g,io=/\b(__p \+=) '' \+/g,vo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bo=/&(?:amp|lt|gt|quot|#39);/g,En=/[&<>"']/g,In=RegExp(Bo.source),ds=RegExp(En.source),Ps=/<%-([\s\S]+?)%>/g,yo=/<%([\s\S]+?)%>/g,rn=/<%=([\s\S]+?)%>/g,es=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gs=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ru=/[\\^$.*+?()[\]{}|]/g,du=RegExp(ru.source),Iu=/^\s+/,Sl=/\s/,Ko=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fl=/\{\n\/\* \[wrapped with (.+)\] \*/,gl=/,? & /,Gu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Lu=/[()=,{}\[\]\/\s]/,Ku=/\\(\\)?/g,uu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,en=/\w*$/,Jr=/^[-+]0x[0-9a-f]+$/i,vn=/^0b[01]+$/i,fn=/^\[object .+?Constructor\]$/,gn=/^0o[0-7]+$/i,mn=/^(?:0|[1-9]\d*)$/,ss=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ga=/($^)/,Ns=/['\n\r\u2028\u2029\\]/g,vs="\\ud800-\\udfff",Xs="\\u0300-\\u036f",co="\\ufe20-\\ufe2f",ls="\\u20d0-\\u20ff",Mo=Xs+co+ls,Nu="\\u2700-\\u27bf",Ou="a-z\\xdf-\\xf6\\xf8-\\xff",$u="\\xac\\xb1\\xd7\\xf7",Hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kl="\\u2000-\\u206f",Uu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",tl="A-Z\\xc0-\\xd6\\xd8-\\xde",rl="\\ufe0e\\ufe0f",Wu=$u+Hu+kl+Uu,tp="[']",Al="["+vs+"]",om="["+Wu+"]",Op="["+Mo+"]",op="\\d+",wl="["+Nu+"]",um="["+Ou+"]",Im="[^"+vs+Wu+op+Nu+Ou+tl+"]",Il="\\ud83c[\\udffb-\\udfff]",sn="(?:"+Op+"|"+Il+")",mr="[^"+vs+"]",fr="(?:\\ud83c[\\udde6-\\uddff]){2}",yr="[\\ud800-\\udbff][\\udc00-\\udfff]",jr="["+tl+"]",un="\\u200d",$n="(?:"+um+"|"+Im+")",Yn="(?:"+jr+"|"+Im+")",os="(?:"+tp+"(?:d|ll|m|re|s|t|ve))?",Vs="(?:"+tp+"(?:D|LL|M|RE|S|T|VE))?",eo=sn+"?",qo="["+rl+"]?",Po="(?:"+un+"(?:"+[mr,fr,yr].join("|")+")"+qo+eo+")*",su="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zu=qo+eo+Po,lu="(?:"+[wl,fr,yr].join("|")+")"+zu,vl="(?:"+[mr+Op+"?",Op,fr,yr,Al].join("|")+")",up=RegExp(tp,"g"),_c=RegExp(Op,"g"),Bl=RegExp(Il+"(?="+Il+")|"+vl+zu,"g"),rp=RegExp([jr+"?"+um+"+"+os+"(?="+[om,jr,"$"].join("|")+")",Yn+"+"+Vs+"(?="+[om,jr+$n,"$"].join("|")+")",jr+"?"+$n+"+"+os,jr+"+"+Vs,mu,su,op,lu].join("|"),"g"),Kp=RegExp("["+un+vs+Mo+rl+"]"),lp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lm=-1,dl={};dl[Zn]=dl[pn]=dl[Dn]=dl[qn]=dl[_a]=dl[Vn]=dl[bs]=dl[Is]=dl[uo]=!0,dl[Nr]=dl[Yr]=dl[wn]=dl[Ar]=dl[Un]=dl[Qr]=dl[Sn]=dl[Kr]=dl[ln]=dl[kn]=dl[An]=dl[Ln]=dl[Cn]=dl[Nn]=dl[dn]=!1;var el={};el[Nr]=el[Yr]=el[wn]=el[Un]=el[Ar]=el[Qr]=el[Zn]=el[pn]=el[Dn]=el[qn]=el[_a]=el[ln]=el[kn]=el[An]=el[Ln]=el[Cn]=el[Nn]=el[Gr]=el[Vn]=el[bs]=el[Is]=el[uo]=!0,el[Sn]=el[Kr]=el[dn]=!1;var gv={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Vm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nl={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Xo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xm=parseFloat,nm=parseInt,vv=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,rv=typeof self=="object"&&self&&self.Object===Object&&self,Lp=vv||rv||Function("return this")(),cp=_e&&!_e.nodeType&&_e,nv=cp&&!0&&et&&!et.nodeType&&et,Hm=nv&&nv.exports===cp,Rv=Hm&&vv.process,mm=(function(){try{var Bs=nv&&nv.require&&nv.require("util").types;return Bs||Rv&&Rv.binding&&Rv.binding("util")}catch{}})(),Wm=mm&&mm.isArrayBuffer,uy=mm&&mm.isDate,Sm=mm&&mm.isMap,wm=mm&&mm.isRegExp,tm=mm&&mm.isSet,iv=mm&&mm.isTypedArray;function _d(Bs,Do,fo){switch(fo.length){case 0:return Bs.call(Do);case 1:return Bs.call(Do,fo[0]);case 2:return Bs.call(Do,fo[0],fo[1]);case 3:return Bs.call(Do,fo[0],fo[1],fo[2])}return Bs.apply(Do,fo)}function Xm(Bs,Do,fo,bu){for(var Qu=-1,jl=Bs==null?0:Bs.length;++Qu<jl;){var Yp=Bs[Qu];Do(bu,Yp,fo(Yp),Bs)}return bu}function Cl(Bs,Do){for(var fo=-1,bu=Bs==null?0:Bs.length;++fo<bu&&Do(Bs[fo],fo,Bs)!==!1;);return Bs}function Cy(Bs,Do){for(var fo=Bs==null?0:Bs.length;fo--&&Do(Bs[fo],fo,Bs)!==!1;);return Bs}function zv(Bs,Do){for(var fo=-1,bu=Bs==null?0:Bs.length;++fo<bu;)if(!Do(Bs[fo],fo,Bs))return!1;return!0}function Fp(Bs,Do){for(var fo=-1,bu=Bs==null?0:Bs.length,Qu=0,jl=[];++fo<bu;){var Yp=Bs[fo];Do(Yp,fo,Bs)&&(jl[Qu++]=Yp)}return jl}function Tm(Bs,Do){var fo=Bs==null?0:Bs.length;return!!fo&&nr(Bs,Do,0)>-1}function yv(Bs,Do,fo){for(var bu=-1,Qu=Bs==null?0:Bs.length;++bu<Qu;)if(fo(Do,Bs[bu]))return!0;return!1}function _l(Bs,Do){for(var fo=-1,bu=Bs==null?0:Bs.length,Qu=Array(bu);++fo<bu;)Qu[fo]=Do(Bs[fo],fo,Bs);return Qu}function Wp(Bs,Do){for(var fo=-1,bu=Do.length,Qu=Bs.length;++fo<bu;)Bs[Qu+fo]=Do[fo];return Bs}function Zp(Bs,Do,fo,bu){var Qu=-1,jl=Bs==null?0:Bs.length;for(bu&&jl&&(fo=Bs[++Qu]);++Qu<jl;)fo=Do(fo,Bs[Qu],Qu,Bs);return fo}function Xp(Bs,Do,fo,bu){var Qu=Bs==null?0:Bs.length;for(bu&&Qu&&(fo=Bs[--Qu]);Qu--;)fo=Do(fo,Bs[Qu],Qu,Bs);return fo}function np(Bs,Do){for(var fo=-1,bu=Bs==null?0:Bs.length;++fo<bu;)if(Do(Bs[fo],fo,Bs))return!0;return!1}var Rm=bn("length");function _0(Bs){return Bs.split("")}function bv(Bs){return Bs.match(Gu)||[]}function Cr(Bs,Do,fo){var bu;return fo(Bs,function(Qu,jl,Yp){if(Do(Qu,jl,Yp))return bu=jl,!1}),bu}function ir(Bs,Do,fo,bu){for(var Qu=Bs.length,jl=fo+(bu?1:-1);bu?jl--:++jl<Qu;)if(Do(Bs[jl],jl,Bs))return jl;return-1}function nr(Bs,Do,fo){return Do===Do?Bp(Bs,Do,fo):ir(Bs,Pr,fo)}function dr(Bs,Do,fo,bu){for(var Qu=fo-1,jl=Bs.length;++Qu<jl;)if(bu(Bs[Qu],Do))return Qu;return-1}function Pr(Bs){return Bs!==Bs}function Hr(Bs,Do){var fo=Bs==null?0:Bs.length;return fo?Es(Bs,Do)/fo:Sr}function bn(Bs){return function(Do){return Do==null?tt:Do[Bs]}}function Pn(Bs){return function(Do){return Bs==null?tt:Bs[Do]}}function Wn(Bs,Do,fo,bu,Qu){return Qu(Bs,function(jl,Yp,_h){fo=bu?(bu=!1,jl):Do(fo,jl,Yp,_h)}),fo}function ms(Bs,Do){var fo=Bs.length;for(Bs.sort(Do);fo--;)Bs[fo]=Bs[fo].value;return Bs}function Es(Bs,Do){for(var fo,bu=-1,Qu=Bs.length;++bu<Qu;){var jl=Do(Bs[bu]);jl!==tt&&(fo=fo===tt?jl:fo+jl)}return fo}function ao(Bs,Do){for(var fo=-1,bu=Array(Bs);++fo<Bs;)bu[fo]=Do(fo);return bu}function Js(Bs,Do){return _l(Do,function(fo){return[fo,Bs[fo]]})}function po(Bs){return Bs&&Bs.slice(0,hp(Bs)+1).replace(Iu,"")}function So(Bs){return function(Do){return Bs(Do)}}function $o(Bs,Do){return _l(Do,function(fo){return Bs[fo]})}function Zo(Bs,Do){return Bs.has(Do)}function au(Bs,Do){for(var fo=-1,bu=Bs.length;++fo<bu&&nr(Do,Bs[fo],0)>-1;);return fo}function ou(Bs,Do){for(var fo=Bs.length;fo--&&nr(Do,Bs[fo],0)>-1;);return fo}function Yo(Bs,Do){for(var fo=Bs.length,bu=0;fo--;)Bs[fo]===Do&&++bu;return bu}var Ru=Pn(gv),ku=Pn(Vm);function Vu(Bs){return"\\"+Xo[Bs]}function sl(Bs,Do){return Bs==null?tt:Bs[Do]}function nu(Bs){return Kp.test(Bs)}function fu(Bs){return lp.test(Bs)}function Vo(Bs){for(var Do,fo=[];!(Do=Bs.next()).done;)fo.push(Do.value);return fo}function ll(Bs){var Do=-1,fo=Array(Bs.size);return Bs.forEach(function(bu,Qu){fo[++Do]=[Qu,bu]}),fo}function zl(Bs,Do){return function(fo){return Bs(Do(fo))}}function Gl(Bs,Do){for(var fo=-1,bu=Bs.length,Qu=0,jl=[];++fo<bu;){var Yp=Bs[fo];(Yp===Do||Yp===bt)&&(Bs[fo]=bt,jl[Qu++]=fo)}return jl}function Dl(Bs){var Do=-1,fo=Array(Bs.size);return Bs.forEach(function(bu){fo[++Do]=bu}),fo}function dp(Bs){var Do=-1,fo=Array(Bs.size);return Bs.forEach(function(bu){fo[++Do]=[bu,bu]}),fo}function Bp(Bs,Do,fo){for(var bu=fo-1,Qu=Bs.length;++bu<Qu;)if(Bs[bu]===Do)return bu;return-1}function cm(Bs,Do,fo){for(var bu=fo+1;bu--;)if(Bs[bu]===Do)return bu;return bu}function Rl(Bs){return nu(Bs)?il(Bs):Rm(Bs)}function hl(Bs){return nu(Bs)?Jp(Bs):_0(Bs)}function hp(Bs){for(var Do=Bs.length;Do--&&Sl.test(Bs.charAt(Do)););return Do}var Cp=Pn(nl);function il(Bs){for(var Do=Bl.lastIndex=0;Bl.test(Bs);)++Do;return Do}function Jp(Bs){return Bs.match(Bl)||[]}function fp(Bs){return Bs.match(rp)||[]}var Jy=(function Bs(Do){Do=Do==null?Lp:ip.defaults(Lp.Object(),Do,ip.pick(Lp,qp));var fo=Do.Array,bu=Do.Date,Qu=Do.Error,jl=Do.Function,Yp=Do.Math,_h=Do.Object,Pm=Do.RegExp,Lm=Do.String,_v=Do.TypeError,gp=fo.prototype,o_=jl.prototype,Gv=_h.prototype,ly=Do["__core-js_shared__"],Dy=o_.toString,Zu=Gv.hasOwnProperty,N_=0,u_=(function(){var Qt=/[^.]+$/.exec(ly&&ly.keys&&ly.keys.IE_PROTO||"");return Qt?"Symbol(src)_1."+Qt:""})(),cy=Gv.toString,Pv=Dy.call(_h),vp=Lp._,Fu=Pm("^"+Dy.call(Zu).replace(ru,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zv=Hm?Do.Buffer:tt,Nv=Do.Symbol,av=Do.Uint8Array,Gy=Zv?Zv.allocUnsafe:tt,My=zl(_h.getPrototypeOf,_h),$0=_h.create,Iy=Gv.propertyIsEnumerable,Ym=gp.splice,yp=Nv?Nv.isConcatSpreadable:tt,pp=Nv?Nv.iterator:tt,xv=Nv?Nv.toStringTag:tt,Yl=(function(){try{var Qt=m1(_h,"defineProperty");return Qt({},"",{}),Qt}catch{}})(),l_=Do.clearTimeout!==Lp.clearTimeout&&Do.clearTimeout,e0=bu&&bu.now!==Lp.Date.now&&bu.now,Vv=Do.setTimeout!==Lp.setTimeout&&Do.setTimeout,dy=Yp.ceil,hy=Yp.floor,Jv=_h.getOwnPropertySymbols,Jn=Zv?Zv.isBuffer:tt,Ql=Do.isFinite,fy=gp.join,U0=zl(_h.keys,_h),Pl=Yp.max,gm=Yp.min,z0=bu.now,G0=Do.parseInt,Nm=Yp.random,x0=gp.reverse,kv=m1(Do,"DataView"),$l=m1(Do,"Map"),sv=m1(Do,"Promise"),wp=m1(Do,"Set"),yl=m1(Do,"WeakMap"),Tp=m1(_h,"create"),Hv=yl&&new yl,vm={},Qm=vb(kv),V0=vb($l),Ov=vb(sv),Sv=vb(wp),c_=vb(yl),ey=Nv?Nv.prototype:tt,py=ey?ey.valueOf:tt,Tr=ey?ey.toString:tt;function br(Qt){if(Fv(Qt)&&!Ls(Qt)&&!(Qt instanceof yn)){if(Qt instanceof an)return Qt;if(Zu.call(Qt,"__wrapped__"))return bE(Qt)}return new an(Qt)}var zr=(function(){function Qt(){}return function(sr){if(!Mv(sr))return{};if($0)return $0(sr);Qt.prototype=sr;var Rr=new Qt;return Qt.prototype=tt,Rr}})();function $r(){}function an(Qt,sr){this.__wrapped__=Qt,this.__actions__=[],this.__chain__=!!sr,this.__index__=0,this.__values__=tt}br.templateSettings={escape:Ps,evaluate:yo,interpolate:rn,variable:"",imports:{_:br}},br.prototype=$r.prototype,br.prototype.constructor=br,an.prototype=zr($r.prototype),an.prototype.constructor=an;function yn(Qt){this.__wrapped__=Qt,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Er,this.__views__=[]}function as(){var Qt=new yn(this.__wrapped__);return Qt.__actions__=_y(this.__actions__),Qt.__dir__=this.__dir__,Qt.__filtered__=this.__filtered__,Qt.__iteratees__=_y(this.__iteratees__),Qt.__takeCount__=this.__takeCount__,Qt.__views__=_y(this.__views__),Qt}function hs(){if(this.__filtered__){var Qt=new yn(this);Qt.__dir__=-1,Qt.__filtered__=!0}else Qt=this.clone(),Qt.__dir__*=-1;return Qt}function ys(){var Qt=this.__wrapped__.value(),sr=this.__dir__,Rr=Ls(Qt),cn=sr<0,Bn=Rr?Qt.length:0,ns=R0(0,Bn,this.__views__),Ds=ns.start,Fs=ns.end,ro=Fs-Ds,Go=cn?Fs:Ds-1,Uo=this.__iteratees__,tu=Uo.length,Su=0,qu=gm(ro,this.__takeCount__);if(!Rr||!cn&&Bn==ro&&qu==ro)return MS(Qt,this.__actions__);var xl=[];e:for(;ro--&&Su<qu;){Go+=sr;for(var Kl=-1,Tl=Qt[Go];++Kl<tu;){var ep=Uo[Kl],Rp=ep.iteratee,S_=ep.type,Yy=Rp(Tl);if(S_==Jt)Tl=Yy;else if(!Yy){if(S_==tr)continue e;break e}}xl[Su++]=Tl}return xl}yn.prototype=zr($r.prototype),yn.prototype.constructor=yn;function Ss(Qt){var sr=-1,Rr=Qt==null?0:Qt.length;for(this.clear();++sr<Rr;){var cn=Qt[sr];this.set(cn[0],cn[1])}}function zs(){this.__data__=Tp?Tp(null):{},this.size=0}function wo(Qt){var sr=this.has(Qt)&&delete this.__data__[Qt];return this.size-=sr?1:0,sr}function hu(Qt){var sr=this.__data__;if(Tp){var Rr=sr[Qt];return Rr===ht?tt:Rr}return Zu.call(sr,Qt)?sr[Qt]:tt}function ko(Qt){var sr=this.__data__;return Tp?sr[Qt]!==tt:Zu.call(sr,Qt)}function Xu(Qt,sr){var Rr=this.__data__;return this.size+=this.has(Qt)?0:1,Rr[Qt]=Tp&&sr===tt?ht:sr,this}Ss.prototype.clear=zs,Ss.prototype.delete=wo,Ss.prototype.get=hu,Ss.prototype.has=ko,Ss.prototype.set=Xu;function Ju(Qt){var sr=-1,Rr=Qt==null?0:Qt.length;for(this.clear();++sr<Rr;){var cn=Qt[sr];this.set(cn[0],cn[1])}}function jp(){this.__data__=[],this.size=0}function wv(Qt){var sr=this.__data__,Rr=t0(sr,Qt);if(Rr<0)return!1;var cn=sr.length-1;return Rr==cn?sr.pop():Ym.call(sr,Rr,1),--this.size,!0}function Vy(Qt){var sr=this.__data__,Rr=t0(sr,Qt);return Rr<0?tt:sr[Rr][1]}function S0(Qt){return t0(this.__data__,Qt)>-1}function Tv(Qt,sr){var Rr=this.__data__,cn=t0(Rr,Qt);return cn<0?(++this.size,Rr.push([Qt,sr])):Rr[cn][1]=sr,this}Ju.prototype.clear=jp,Ju.prototype.delete=wv,Ju.prototype.get=Vy,Ju.prototype.has=S0,Ju.prototype.set=Tv;function Fm(Qt){var sr=-1,Rr=Qt==null?0:Qt.length;for(this.clear();++sr<Rr;){var cn=Qt[sr];this.set(cn[0],cn[1])}}function w0(){this.size=0,this.__data__={hash:new Ss,map:new($l||Ju),string:new Ss}}function qv(Qt){var sr=z1(this,Qt).delete(Qt);return this.size-=sr?1:0,sr}function bp(Qt){return z1(this,Qt).get(Qt)}function T0(Qt){return z1(this,Qt).has(Qt)}function Bm(Qt,sr){var Rr=z1(this,Qt),cn=Rr.size;return Rr.set(Qt,sr),this.size+=Rr.size==cn?0:1,this}Fm.prototype.clear=w0,Fm.prototype.delete=qv,Fm.prototype.get=bp,Fm.prototype.has=T0,Fm.prototype.set=Bm;function H0(Qt){var sr=-1,Rr=Qt==null?0:Qt.length;for(this.__data__=new Fm;++sr<Rr;)this.add(Qt[sr])}function jx(Qt){return this.__data__.set(Qt,ht),this}function am(Qt){return this.__data__.has(Qt)}H0.prototype.add=H0.prototype.push=jx,H0.prototype.has=am;function _p(Qt){var sr=this.__data__=new Ju(Qt);this.size=sr.size}function ux(){this.__data__=new Ju,this.size=0}function k_(Qt){var sr=this.__data__,Rr=sr.delete(Qt);return this.size=sr.size,Rr}function i1(Qt){return this.__data__.get(Qt)}function lx(Qt){return this.__data__.has(Qt)}function cx(Qt,sr){var Rr=this.__data__;if(Rr instanceof Ju){var cn=Rr.__data__;if(!$l||cn.length<nt-1)return cn.push([Qt,sr]),this.size=++Rr.size,this;Rr=this.__data__=new Fm(cn)}return Rr.set(Qt,sr),this.size=Rr.size,this}_p.prototype.clear=ux,_p.prototype.delete=k_,_p.prototype.get=i1,_p.prototype.has=lx,_p.prototype.set=cx;function dx(Qt,sr){var Rr=Ls(Qt),cn=!Rr&&Zm(Qt),Bn=!Rr&&!cn&&Jx(Qt),ns=!Rr&&!cn&&!Bn&&kw(Qt),Ds=Rr||cn||Bn||ns,Fs=Ds?ao(Qt.length,Lm):[],ro=Fs.length;for(var Go in Qt)(sr||Zu.call(Qt,Go))&&!(Ds&&(Go=="length"||Bn&&(Go=="offset"||Go=="parent")||ns&&(Go=="buffer"||Go=="byteLength"||Go=="byteOffset")||ny(Go,ro)))&&Fs.push(Go);return Fs}function O_(Qt){var sr=Qt.length;return sr?Qt[hw(0,sr-1)]:tt}function Hy(Qt,sr){return bw(_y(Qt),q1(sr,0,Qt.length))}function Ev(Qt){return bw(_y(Qt))}function Ry(Qt,sr,Rr){(Rr!==tt&&!_b(Qt[sr],Rr)||Rr===tt&&!(sr in Qt))&&W0(Qt,sr,Rr)}function fl(Qt,sr,Rr){var cn=Qt[sr];(!(Zu.call(Qt,sr)&&_b(cn,Rr))||Rr===tt&&!(sr in Qt))&&W0(Qt,sr,Rr)}function t0(Qt,sr){for(var Rr=Qt.length;Rr--;)if(_b(Qt[Rr][0],sr))return Rr;return-1}function Xn(Qt,sr,Rr,cn){return h_(Qt,function(Bn,ns,Ds){sr(cn,Bn,Rr(Bn),Ds)}),cn}function wS(Qt,sr){return Qt&&i0(sr,jy(sr),Qt)}function k1(Qt,sr){return Qt&&i0(sr,e_(sr),Qt)}function W0(Qt,sr,Rr){sr=="__proto__"&&Yl?Yl(Qt,sr,{configurable:!0,enumerable:!0,value:Rr,writable:!0}):Qt[sr]=Rr}function O1(Qt,sr){for(var Rr=-1,cn=sr.length,Bn=fo(cn),ns=Qt==null;++Rr<cn;)Bn[Rr]=ns?tt:jE(Qt,sr[Rr]);return Bn}function q1(Qt,sr,Rr){return Qt===Qt&&(Rr!==tt&&(Qt=Qt<=Rr?Qt:Rr),sr!==tt&&(Qt=Qt>=sr?Qt:sr)),Qt}function Py(Qt,sr,Rr,cn,Bn,ns){var Ds,Fs=sr&St,ro=sr&Et,Go=sr&Ct;if(Rr&&(Ds=Bn?Rr(Qt,cn,Bn,ns):Rr(Qt)),Ds!==tt)return Ds;if(!Mv(Qt))return Qt;var Uo=Ls(Qt);if(Uo){if(Ds=qS(Qt),!Fs)return _y(Qt,Ds)}else{var tu=lv(Qt),Su=tu==Kr||tu==Hn;if(Jx(Qt))return j_(Qt,Fs);if(tu==An||tu==Nr||Su&&!Bn){if(Ds=ro||Su?{}:G1(Qt),!Fs)return ro?cE(Qt,k1(Ds,Qt)):PS(Qt,wS(Ds,Qt))}else{if(!el[tu])return Bn?Qt:{};Ds=LS(Qt,tu,Fs)}}ns||(ns=new _p);var qu=ns.get(Qt);if(qu)return qu;ns.set(Qt,Ds),NT(Qt)?Qt.forEach(function(Tl){Ds.add(Py(Tl,sr,Rr,Tl,Qt,ns))}):PT(Qt)&&Qt.forEach(function(Tl,ep){Ds.set(ep,Py(Tl,sr,Rr,ep,Qt,ns))});var xl=Go?ro?Dv:Sy:ro?e_:jy,Kl=Uo?tt:xl(Qt);return Cl(Kl||Qt,function(Tl,ep){Kl&&(ep=Tl,Tl=Qt[ep]),fl(Ds,ep,Py(Tl,sr,Rr,ep,Qt,ns))}),Ds}function d_(Qt){var sr=jy(Qt);return function(Rr){return hx(Rr,Qt,sr)}}function hx(Qt,sr,Rr){var cn=Rr.length;if(Qt==null)return!cn;for(Qt=_h(Qt);cn--;){var Bn=Rr[cn],ns=sr[Bn],Ds=Qt[Bn];if(Ds===tt&&!(Bn in Qt)||!ns(Ds))return!1}return!0}function uw(Qt,sr,Rr){if(typeof Qt!="function")throw new _v(dt);return Zx(function(){Qt.apply(tt,Rr)},sr)}function $x(Qt,sr,Rr,cn){var Bn=-1,ns=Tm,Ds=!0,Fs=Qt.length,ro=[],Go=sr.length;if(!Fs)return ro;Rr&&(sr=_l(sr,So(Rr))),cn?(ns=yv,Ds=!1):sr.length>=nt&&(ns=Zo,Ds=!1,sr=new H0(sr));e:for(;++Bn<Fs;){var Uo=Qt[Bn],tu=Rr==null?Uo:Rr(Uo);if(Uo=cn||Uo!==0?Uo:0,Ds&&tu===tu){for(var Su=Go;Su--;)if(sr[Su]===tu)continue e;ro.push(Uo)}else ns(sr,tu,cn)||ro.push(Uo)}return ro}var h_=dE(xp),my=dE(m_,!0);function Ux(Qt,sr){var Rr=!0;return h_(Qt,function(cn,Bn,ns){return Rr=!!sr(cn,Bn,ns),Rr}),Rr}function L1(Qt,sr,Rr){for(var cn=-1,Bn=Qt.length;++cn<Bn;){var ns=Qt[cn],Ds=sr(ns);if(Ds!=null&&(Fs===tt?Ds===Ds&&!km(Ds):Rr(Ds,Fs)))var Fs=Ds,ro=ns}return ro}function oE(Qt,sr,Rr,cn){var Bn=Qt.length;for(Rr=Xc(Rr),Rr<0&&(Rr=-Rr>Bn?0:Bn+Rr),cn=cn===tt||cn>Bn?Bn:Xc(cn),cn<0&&(cn+=Bn),cn=Rr>cn?0:N0(cn);Rr<cn;)Qt[Rr++]=sr;return Qt}function f_(Qt,sr){var Rr=[];return h_(Qt,function(cn,Bn,ns){sr(cn,Bn,ns)&&Rr.push(cn)}),Rr}function jm(Qt,sr,Rr,cn,Bn){var ns=-1,Ds=Qt.length;for(Rr||(Rr=FS),Bn||(Bn=[]);++ns<Ds;){var Fs=Qt[ns];sr>0&&Rr(Fs)?sr>1?jm(Fs,sr-1,Rr,cn,Bn):Wp(Bn,Fs):cn||(Bn[Bn.length]=Fs)}return Bn}var X0=$_(),p_=$_(!0);function xp(Qt,sr){return Qt&&X0(Qt,sr,jy)}function m_(Qt,sr){return Qt&&p_(Qt,sr,jy)}function g_(Qt,sr){return Fp(sr,function(Rr){return u0(Qt[Rr])})}function r0(Qt,sr){sr=qy(sr,Qt);for(var Rr=0,cn=sr.length;Qt!=null&&Rr<cn;)Qt=Qt[cv(sr[Rr++])];return Rr&&Rr==cn?Qt:tt}function q_(Qt,sr,Rr){var cn=sr(Qt);return Ls(Qt)?cn:Wp(cn,Rr(Qt))}function Av(Qt){return Qt==null?Qt===tt?tn:xn:xv&&xv in _h(Qt)?ub(Qt):gE(Qt)}function v_(Qt,sr){return Qt>sr}function Km(Qt,sr){return Qt!=null&&Zu.call(Qt,sr)}function F1(Qt,sr){return Qt!=null&&sr in _h(Qt)}function TS(Qt,sr,Rr){return Qt>=gm(sr,Rr)&&Qt<Pl(sr,Rr)}function E0(Qt,sr,Rr){for(var cn=Rr?yv:Tm,Bn=Qt[0].length,ns=Qt.length,Ds=ns,Fs=fo(ns),ro=1/0,Go=[];Ds--;){var Uo=Qt[Ds];Ds&&sr&&(Uo=_l(Uo,So(sr))),ro=gm(Uo.length,ro),Fs[Ds]=!Rr&&(sr||Bn>=120&&Uo.length>=120)?new H0(Ds&&Uo):tt}Uo=Qt[0];var tu=-1,Su=Fs[0];e:for(;++tu<Bn&&Go.length<ro;){var qu=Uo[tu],xl=sr?sr(qu):qu;if(qu=Rr||qu!==0?qu:0,!(Su?Zo(Su,xl):cn(Go,xl,Rr))){for(Ds=ns;--Ds;){var Kl=Fs[Ds];if(!(Kl?Zo(Kl,xl):cn(Qt[Ds],xl,Rr)))continue e}Su&&Su.push(xl),Go.push(qu)}}return Go}function A0(Qt,sr,Rr,cn){return xp(Qt,function(Bn,ns,Ds){sr(cn,Rr(Bn),ns,Ds)}),cn}function C0(Qt,sr,Rr){sr=qy(sr,Qt),Qt=BS(Qt,sr);var cn=Qt==null?Qt:Qt[cv(iy(sr))];return cn==null?tt:_d(cn,Qt,Rr)}function Em(Qt){return Fv(Qt)&&Av(Qt)==Nr}function Ny(Qt){return Fv(Qt)&&Av(Qt)==wn}function ty(Qt){return Fv(Qt)&&Av(Qt)==Qr}function a1(Qt,sr,Rr,cn,Bn){return Qt===sr?!0:Qt==null||sr==null||!Fv(Qt)&&!Fv(sr)?Qt!==Qt&&sr!==sr:gy(Qt,sr,Rr,cn,a1,Bn)}function gy(Qt,sr,Rr,cn,Bn,ns){var Ds=Ls(Qt),Fs=Ls(sr),ro=Ds?Yr:lv(Qt),Go=Fs?Yr:lv(sr);ro=ro==Nr?An:ro,Go=Go==Nr?An:Go;var Uo=ro==An,tu=Go==An,Su=ro==Go;if(Su&&Jx(Qt)){if(!Jx(sr))return!1;Ds=!0,Uo=!1}if(Su&&!Uo)return ns||(ns=new _p),Ds||kw(Qt)?I0(Qt,sr,Rr,cn,Bn,ns):Nl(Qt,sr,ro,Rr,cn,Bn,ns);if(!(Rr&Rt)){var qu=Uo&&Zu.call(Qt,"__wrapped__"),xl=tu&&Zu.call(sr,"__wrapped__");if(qu||xl){var Kl=qu?Qt.value():Qt,Tl=xl?sr.value():sr;return ns||(ns=new _p),Bn(Kl,Tl,Rr,cn,ns)}}return Su?(ns||(ns=new _p),Xy(Qt,sr,Rr,cn,Bn,ns)):!1}function lw(Qt){return Fv(Qt)&&lv(Qt)==ln}function ES(Qt,sr,Rr,cn){var Bn=Rr.length,ns=Bn,Ds=!cn;if(Qt==null)return!ns;for(Qt=_h(Qt);Bn--;){var Fs=Rr[Bn];if(Ds&&Fs[2]?Fs[1]!==Qt[Fs[0]]:!(Fs[0]in Qt))return!1}for(;++Bn<ns;){Fs=Rr[Bn];var ro=Fs[0],Go=Qt[ro],Uo=Fs[1];if(Ds&&Fs[2]){if(Go===tt&&!(ro in Qt))return!1}else{var tu=new _p;if(cn)var Su=cn(Go,Uo,ro,Qt,sr,tu);if(!(Su===tt?a1(Uo,Go,Rt|Tt,cn,tu):Su))return!1}}return!0}function s1(Qt){if(!Mv(Qt)||a0(Qt))return!1;var sr=u0(Qt)?Fu:fn;return sr.test(vb(Qt))}function o1(Qt){return Fv(Qt)&&Av(Qt)==Ln}function B1(Qt){return Fv(Qt)&&lv(Qt)==Cn}function fx(Qt){return Fv(Qt)&&Ax(Qt.length)&&!!dl[Av(Qt)]}function AS(Qt){return typeof Qt=="function"?Qt:Qt==null?O0:typeof Qt=="object"?Ls(Qt)?Am(Qt[0],Qt[1]):j1(Qt):KE(Qt)}function CS(Qt){if(!V1(Qt))return U0(Qt);var sr=[];for(var Rr in _h(Qt))Zu.call(Qt,Rr)&&Rr!="constructor"&&sr.push(Rr);return sr}function dm(Qt){if(!Mv(Qt))return y1(Qt);var sr=V1(Qt),Rr=[];for(var cn in Qt)cn=="constructor"&&(sr||!Zu.call(Qt,cn))||Rr.push(cn);return Rr}function D0(Qt,sr){return Qt<sr}function cw(Qt,sr){var Rr=-1,cn=o0(Qt)?fo(Qt.length):[];return h_(Qt,function(Bn,ns,Ds){cn[++Rr]=sr(Bn,ns,Ds)}),cn}function j1(Qt){var sr=Qx(Qt);return sr.length==1&&sr[0][2]?hT(sr[0][0],sr[0][1]):function(Rr){return Rr===Qt||ES(Rr,Qt,sr)}}function Am(Qt,sr){return hm(Qt)&&pE(sr)?hT(cv(Qt),sr):function(Rr){var cn=jE(Rr,Qt);return cn===tt&&cn===sr?$E(Rr,Qt):a1(sr,cn,Rt|Tt)}}function vy(Qt,sr,Rr,cn,Bn){Qt!==sr&&X0(sr,function(ns,Ds){if(Bn||(Bn=new _p),Mv(ns))u1(Qt,sr,Ds,Rr,vy,cn,Bn);else{var Fs=cn?cn(pT(Qt,Ds),ns,Ds+"",Qt,sr,Bn):tt;Fs===tt&&(Fs=ns),Ry(Qt,Ds,Fs)}},e_)}function u1(Qt,sr,Rr,cn,Bn,ns,Ds){var Fs=pT(Qt,Rr),ro=pT(sr,Rr),Go=Ds.get(ro);if(Go){Ry(Qt,Rr,Go);return}var Uo=ns?ns(Fs,ro,Rr+"",Qt,sr,Ds):tt,tu=Uo===tt;if(tu){var Su=Ls(ro),qu=!Su&&Jx(ro),xl=!Su&&!qu&&kw(ro);Uo=ro,Su||qu||xl?Ls(Fs)?Uo=Fs:Jm(Fs)?Uo=_y(Fs):qu?(tu=!1,Uo=j_(ro,!0)):xl?(tu=!1,Uo=gx(ro,!0)):Uo=[]:rS(ro)||Zm(ro)?(Uo=Fs,Zm(Fs)?Uo=YA(Fs):(!Mv(Fs)||u0(Fs))&&(Uo=G1(ro))):tu=!1}tu&&(Ds.set(ro,Uo),Bn(Uo,ro,cn,ns,Ds),Ds.delete(ro)),Ry(Qt,Rr,Uo)}function dw(Qt,sr){var Rr=Qt.length;if(Rr)return sr+=sr<0?Rr:0,ny(sr,Rr)?Qt[sr]:tt}function zx(Qt,sr,Rr){sr.length?sr=_l(sr,function(ns){return Ls(ns)?function(Ds){return r0(Ds,ns.length===1?ns[0]:ns)}:ns}):sr=[O0];var cn=-1;sr=_l(sr,So(al()));var Bn=cw(Qt,function(ns,Ds,Fs){var ro=_l(sr,function(Go){return Go(ns)});return{criteria:ro,index:++cn,value:ns}});return ms(Bn,function(ns,Ds){return kA(ns,Ds,Rr)})}function cT(Qt,sr){return l1(Qt,sr,function(Rr,cn){return $E(Qt,cn)})}function l1(Qt,sr,Rr){for(var cn=-1,Bn=sr.length,ns={};++cn<Bn;){var Ds=sr[cn],Fs=r0(Qt,Ds);Rr(Fs,Ds)&&Wv(ns,qy(Ds,Qt),Fs)}return ns}function c1(Qt){return function(sr){return r0(sr,Qt)}}function ky(Qt,sr,Rr,cn){var Bn=cn?dr:nr,ns=-1,Ds=sr.length,Fs=Qt;for(Qt===sr&&(sr=_y(sr)),Rr&&(Fs=_l(Qt,So(Rr)));++ns<Ds;)for(var ro=0,Go=sr[ns],Uo=Rr?Rr(Go):Go;(ro=Bn(Fs,Uo,ro,cn))>-1;)Fs!==Qt&&Ym.call(Fs,ro,1),Ym.call(Qt,ro,1);return Qt}function $1(Qt,sr){for(var Rr=Qt?sr.length:0,cn=Rr-1;Rr--;){var Bn=sr[Rr];if(Rr==cn||Bn!==ns){var ns=Bn;ny(Bn)?Ym.call(Qt,Bn,1):U1(Qt,Bn)}}return Qt}function hw(Qt,sr){return Qt+hy(Nm()*(sr-Qt+1))}function d1(Qt,sr,Rr,cn){for(var Bn=-1,ns=Pl(dy((sr-Qt)/(Rr||1)),0),Ds=fo(ns);ns--;)Ds[cn?ns:++Bn]=Qt,Qt+=Rr;return Ds}function $m(Qt,sr){var Rr="";if(!Qt||sr<1||sr>cr)return Rr;do sr%2&&(Rr+=Qt),sr=hy(sr/2),sr&&(Qt+=Qt);while(sr);return Rr}function Vl(Qt,sr){return jS(fT(Qt,sr,O0),Qt+"")}function Y0(Qt){return O_(aS(Qt))}function Cv(Qt,sr){var Rr=aS(Qt);return bw(Rr,q1(sr,0,Rr.length))}function Wv(Qt,sr,Rr,cn){if(!Mv(Qt))return Qt;sr=qy(sr,Qt);for(var Bn=-1,ns=sr.length,Ds=ns-1,Fs=Qt;Fs!=null&&++Bn<ns;){var ro=cv(sr[Bn]),Go=Rr;if(ro==="__proto__"||ro==="constructor"||ro==="prototype")return Qt;if(Bn!=Ds){var Uo=Fs[ro];Go=cn?cn(Uo,ro,Fs):tt,Go===tt&&(Go=Mv(Uo)?Uo:ny(sr[Bn+1])?[]:{})}fl(Fs,ro,Go),Fs=Fs[ro]}return Qt}var n0=Hv?function(Qt,sr){return Hv.set(Qt,sr),Qt}:O0,uE=Yl?function(Qt,sr){return Yl(Qt,"toString",{configurable:!0,enumerable:!1,value:XE(sr),writable:!0})}:O0;function fw(Qt){return bw(aS(Qt))}function ov(Qt,sr,Rr){var cn=-1,Bn=Qt.length;sr<0&&(sr=-sr>Bn?0:Bn+sr),Rr=Rr>Bn?Bn:Rr,Rr<0&&(Rr+=Bn),Bn=sr>Rr?0:Rr-sr>>>0,sr>>>=0;for(var ns=fo(Bn);++cn<Bn;)ns[cn]=Qt[cn+sr];return ns}function Q0(Qt,sr){var Rr;return h_(Qt,function(cn,Bn,ns){return Rr=sr(cn,Bn,ns),!Rr}),!!Rr}function h1(Qt,sr,Rr){var cn=0,Bn=Qt==null?cn:Qt.length;if(typeof sr=="number"&&sr===sr&&Bn<=Wr){for(;cn<Bn;){var ns=cn+Bn>>>1,Ds=Qt[ns];Ds!==null&&!km(Ds)&&(Rr?Ds<=sr:Ds<sr)?cn=ns+1:Bn=ns}return Bn}return Oy(Qt,sr,O0,Rr)}function Oy(Qt,sr,Rr,cn){var Bn=0,ns=Qt==null?0:Qt.length;if(ns===0)return 0;sr=Rr(sr);for(var Ds=sr!==sr,Fs=sr===null,ro=km(sr),Go=sr===tt;Bn<ns;){var Uo=hy((Bn+ns)/2),tu=Rr(Qt[Uo]),Su=tu!==tt,qu=tu===null,xl=tu===tu,Kl=km(tu);if(Ds)var Tl=cn||xl;else Go?Tl=xl&&(cn||Su):Fs?Tl=xl&&Su&&(cn||!qu):ro?Tl=xl&&Su&&!qu&&(cn||!Kl):qu||Kl?Tl=!1:Tl=cn?tu<=sr:tu<sr;Tl?Bn=Uo+1:ns=Uo}return gm(ns,Vr)}function DS(Qt,sr){for(var Rr=-1,cn=Qt.length,Bn=0,ns=[];++Rr<cn;){var Ds=Qt[Rr],Fs=sr?sr(Ds):Ds;if(!Rr||!_b(Fs,ro)){var ro=Fs;ns[Bn++]=Ds===0?0:Ds}}return ns}function yy(Qt){return typeof Qt=="number"?Qt:km(Qt)?Sr:+Qt}function sm(Qt){if(typeof Qt=="string")return Qt;if(Ls(Qt))return _l(Qt,sm)+"";if(km(Qt))return Tr?Tr.call(Qt):"";var sr=Qt+"";return sr=="0"&&1/Qt==-pr?"-0":sr}function L_(Qt,sr,Rr){var cn=-1,Bn=Tm,ns=Qt.length,Ds=!0,Fs=[],ro=Fs;if(Rr)Ds=!1,Bn=yv;else if(ns>=nt){var Go=sr?null:Z0(Qt);if(Go)return Dl(Go);Ds=!1,Bn=Zo,ro=new H0}else ro=sr?[]:Fs;e:for(;++cn<ns;){var Uo=Qt[cn],tu=sr?sr(Uo):Uo;if(Uo=Rr||Uo!==0?Uo:0,Ds&&tu===tu){for(var Su=ro.length;Su--;)if(ro[Su]===tu)continue e;sr&&ro.push(tu),Fs.push(Uo)}else Bn(ro,tu,Rr)||(ro!==Fs&&ro.push(tu),Fs.push(Uo))}return Fs}function U1(Qt,sr){return sr=qy(sr,Qt),Qt=BS(Qt,sr),Qt==null||delete Qt[cv(iy(sr))]}function Wy(Qt,sr,Rr,cn){return Wv(Qt,sr,Rr(r0(Qt,sr)),cn)}function F_(Qt,sr,Rr,cn){for(var Bn=Qt.length,ns=cn?Bn:-1;(cn?ns--:++ns<Bn)&&sr(Qt[ns],ns,Qt););return Rr?ov(Qt,cn?0:ns,cn?ns+1:Bn):ov(Qt,cn?ns+1:0,cn?Bn:ns)}function MS(Qt,sr){var Rr=Qt;return Rr instanceof yn&&(Rr=Rr.value()),Zp(sr,function(cn,Bn){return Bn.func.apply(Bn.thisArg,Wp([cn],Bn.args))},Rr)}function y_(Qt,sr,Rr){var cn=Qt.length;if(cn<2)return cn?L_(Qt[0]):[];for(var Bn=-1,ns=fo(cn);++Bn<cn;)for(var Ds=Qt[Bn],Fs=-1;++Fs<cn;)Fs!=Bn&&(ns[Bn]=$x(ns[Bn]||Ds,Qt[Fs],sr,Rr));return L_(jm(ns,1),sr,Rr)}function Gx(Qt,sr,Rr){for(var cn=-1,Bn=Qt.length,ns=sr.length,Ds={};++cn<Bn;){var Fs=cn<ns?sr[cn]:tt;Rr(Ds,Qt[cn],Fs)}return Ds}function Vx(Qt){return Jm(Qt)?Qt:[]}function mx(Qt){return typeof Qt=="function"?Qt:O0}function qy(Qt,sr){return Ls(Qt)?Qt:hm(Qt,sr)?[Qt]:H1(Ip(Qt))}var Hx=Vl;function B_(Qt,sr,Rr){var cn=Qt.length;return Rr=Rr===tt?cn:Rr,!sr&&Rr>=cn?Qt:ov(Qt,sr,Rr)}var ry=l_||function(Qt){return Lp.clearTimeout(Qt)};function j_(Qt,sr){if(sr)return Qt.slice();var Rr=Qt.length,cn=Gy?Gy(Rr):new Qt.constructor(Rr);return Qt.copy(cn),cn}function IS(Qt){var sr=new Qt.constructor(Qt.byteLength);return new av(sr).set(new av(Qt)),sr}function RS(Qt,sr){var Rr=sr?IS(Qt.buffer):Qt.buffer;return new Qt.constructor(Rr,Qt.byteOffset,Qt.byteLength)}function lE(Qt){var sr=new Qt.constructor(Qt.source,en.exec(Qt));return sr.lastIndex=Qt.lastIndex,sr}function pw(Qt){return py?_h(py.call(Qt)):{}}function gx(Qt,sr){var Rr=sr?IS(Qt.buffer):Qt.buffer;return new Qt.constructor(Rr,Qt.byteOffset,Qt.length)}function mw(Qt,sr){if(Qt!==sr){var Rr=Qt!==tt,cn=Qt===null,Bn=Qt===Qt,ns=km(Qt),Ds=sr!==tt,Fs=sr===null,ro=sr===sr,Go=km(sr);if(!Fs&&!Go&&!ns&&Qt>sr||ns&&Ds&&ro&&!Fs&&!Go||cn&&Ds&&ro||!Rr&&ro||!Bn)return 1;if(!cn&&!ns&&!Go&&Qt<sr||Go&&Rr&&Bn&&!cn&&!ns||Fs&&Rr&&Bn||!Ds&&Bn||!ro)return-1}return 0}function kA(Qt,sr,Rr){for(var cn=-1,Bn=Qt.criteria,ns=sr.criteria,Ds=Bn.length,Fs=Rr.length;++cn<Ds;){var ro=mw(Bn[cn],ns[cn]);if(ro){if(cn>=Fs)return ro;var Go=Rr[cn];return ro*(Go=="desc"?-1:1)}}return Qt.index-sr.index}function gw(Qt,sr,Rr,cn){for(var Bn=-1,ns=Qt.length,Ds=Rr.length,Fs=-1,ro=sr.length,Go=Pl(ns-Ds,0),Uo=fo(ro+Go),tu=!cn;++Fs<ro;)Uo[Fs]=sr[Fs];for(;++Bn<Ds;)(tu||Bn<ns)&&(Uo[Rr[Bn]]=Qt[Bn]);for(;Go--;)Uo[Fs++]=Qt[Bn++];return Uo}function by(Qt,sr,Rr,cn){for(var Bn=-1,ns=Qt.length,Ds=-1,Fs=Rr.length,ro=-1,Go=sr.length,Uo=Pl(ns-Fs,0),tu=fo(Uo+Go),Su=!cn;++Bn<Uo;)tu[Bn]=Qt[Bn];for(var qu=Bn;++ro<Go;)tu[qu+ro]=sr[ro];for(;++Ds<Fs;)(Su||Bn<ns)&&(tu[qu+Rr[Ds]]=Qt[Bn++]);return tu}function _y(Qt,sr){var Rr=-1,cn=Qt.length;for(sr||(sr=fo(cn));++Rr<cn;)sr[Rr]=Qt[Rr];return sr}function i0(Qt,sr,Rr,cn){var Bn=!Rr;Rr||(Rr={});for(var ns=-1,Ds=sr.length;++ns<Ds;){var Fs=sr[ns],ro=cn?cn(Rr[Fs],Qt[Fs],Fs,Rr,Qt):tt;ro===tt&&(ro=Qt[Fs]),Bn?W0(Rr,Fs,ro):fl(Rr,Fs,ro)}return Rr}function PS(Qt,sr){return i0(Qt,Yu(Qt),sr)}function cE(Qt,sr){return i0(Qt,z_(Qt),sr)}function M0(Qt,sr){return function(Rr,cn){var Bn=Ls(Rr)?Xm:Xn,ns=sr?sr():{};return Bn(Rr,Qt,al(cn,2),ns)}}function K0(Qt){return Vl(function(sr,Rr){var cn=-1,Bn=Rr.length,ns=Bn>1?Rr[Bn-1]:tt,Ds=Bn>2?Rr[2]:tt;for(ns=Qt.length>3&&typeof ns=="function"?(Bn--,ns):tt,Ds&&ym(Rr[0],Rr[1],Ds)&&(ns=Bn<3?tt:ns,Bn=1),sr=_h(sr);++cn<Bn;){var Fs=Rr[cn];Fs&&Qt(sr,Fs,cn,ns)}return sr})}function dE(Qt,sr){return function(Rr,cn){if(Rr==null)return Rr;if(!o0(Rr))return Qt(Rr,cn);for(var Bn=Rr.length,ns=sr?Bn:-1,Ds=_h(Rr);(sr?ns--:++ns<Bn)&&cn(Ds[ns],ns,Ds)!==!1;);return Rr}}function $_(Qt){return function(sr,Rr,cn){for(var Bn=-1,ns=_h(sr),Ds=cn(sr),Fs=Ds.length;Fs--;){var ro=Ds[Qt?Fs:++Bn];if(Rr(ns[ro],ro,ns)===!1)break}return sr}}function hE(Qt,sr,Rr){var cn=sr&wt,Bn=xy(Qt);function ns(){var Ds=this&&this!==Lp&&this instanceof ns?Bn:Qt;return Ds.apply(cn?Rr:this,arguments)}return ns}function Ep(Qt){return function(sr){sr=Ip(sr);var Rr=nu(sr)?hl(sr):tt,cn=Rr?Rr[0]:sr.charAt(0),Bn=Rr?B_(Rr,1).join(""):sr.slice(1);return cn[Qt]()+Bn}}function vx(Qt){return function(sr){return Zp(VS(nC(sr).replace(up,"")),Qt,"")}}function xy(Qt){return function(){var sr=arguments;switch(sr.length){case 0:return new Qt;case 1:return new Qt(sr[0]);case 2:return new Qt(sr[0],sr[1]);case 3:return new Qt(sr[0],sr[1],sr[2]);case 4:return new Qt(sr[0],sr[1],sr[2],sr[3]);case 5:return new Qt(sr[0],sr[1],sr[2],sr[3],sr[4]);case 6:return new Qt(sr[0],sr[1],sr[2],sr[3],sr[4],sr[5]);case 7:return new Qt(sr[0],sr[1],sr[2],sr[3],sr[4],sr[5],sr[6])}var Rr=zr(Qt.prototype),cn=Qt.apply(Rr,sr);return Mv(cn)?cn:Rr}}function f1(Qt,sr,Rr){var cn=xy(Qt);function Bn(){for(var ns=arguments.length,Ds=fo(ns),Fs=ns,ro=uv(Bn);Fs--;)Ds[Fs]=arguments[Fs];var Go=ns<3&&Ds[0]!==ro&&Ds[ns-1]!==ro?[]:Gl(Ds,ro);if(ns-=Go.length,ns<Rr)return kS(Qt,sr,p1,Bn.placeholder,tt,Ds,Go,tt,tt,Rr-ns);var Uo=this&&this!==Lp&&this instanceof Bn?cn:Qt;return _d(Uo,this,Ds)}return Bn}function Wx(Qt){return function(sr,Rr,cn){var Bn=_h(sr);if(!o0(sr)){var ns=al(Rr,3);sr=jy(sr),Rr=function(Fs){return ns(Bn[Fs],Fs,Bn)}}var Ds=Qt(sr,Rr,cn);return Ds>-1?Bn[ns?sr[Ds]:Ds]:tt}}function NS(Qt){return pl(function(sr){var Rr=sr.length,cn=Rr,Bn=an.prototype.thru;for(Qt&&sr.reverse();cn--;){var ns=sr[cn];if(typeof ns!="function")throw new _v(dt);if(Bn&&!Ds&&J0(ns)=="wrapper")var Ds=new an([],!0)}for(cn=Ds?cn:Rr;++cn<Rr;){ns=sr[cn];var Fs=J0(ns),ro=Fs=="wrapper"?_x(ns):tt;ro&&Kx(ro[0])&&ro[1]==(Vt|Pt|Ft|Kt)&&!ro[4].length&&ro[9]==1?Ds=Ds[J0(ro[0])].apply(Ds,ro[3]):Ds=ns.length==1&&Kx(ns)?Ds[Fs]():Ds.thru(ns)}return function(){var Go=arguments,Uo=Go[0];if(Ds&&Go.length==1&&Ls(Uo))return Ds.plant(Uo).value();for(var tu=0,Su=Rr?sr[tu].apply(this,Go):Uo;++tu<Rr;)Su=sr[tu].call(this,Su);return Su}})}function p1(Qt,sr,Rr,cn,Bn,ns,Ds,Fs,ro,Go){var Uo=sr&Vt,tu=sr&wt,Su=sr&At,qu=sr&(Pt|It),xl=sr&jt,Kl=Su?tt:xy(Qt);function Tl(){for(var ep=arguments.length,Rp=fo(ep),S_=ep;S_--;)Rp[S_]=arguments[S_];if(qu)var Yy=uv(Tl),fm=Yo(Rp,Yy);if(cn&&(Rp=gw(Rp,cn,Bn,qu)),ns&&(Rp=by(Rp,ns,Ds,qu)),ep-=fm,qu&&ep<Go){var Bv=Gl(Rp,Yy);return kS(Qt,sr,p1,Tl.placeholder,Rr,Rp,Bv,Fs,ro,Go-ep)}var w1=tu?Rr:this,Om=Su?w1[Qt]:Qt;return ep=Rp.length,Fs?Rp=vE(Rp,Fs):xl&&ep>1&&Rp.reverse(),Uo&&ro<ep&&(Rp.length=ro),this&&this!==Lp&&this instanceof Tl&&(Om=Kl||xy(Om)),Om.apply(w1,Rp)}return Tl}function Xx(Qt,sr){return function(Rr,cn){return A0(Rr,Qt,sr(cn),{})}}function yx(Qt,sr){return function(Rr,cn){var Bn;if(Rr===tt&&cn===tt)return sr;if(Rr!==tt&&(Bn=Rr),cn!==tt){if(Bn===tt)return cn;typeof Rr=="string"||typeof cn=="string"?(Rr=sm(Rr),cn=sm(cn)):(Rr=yy(Rr),cn=yy(cn)),Bn=Qt(Rr,cn)}return Bn}}function Um(Qt){return pl(function(sr){return sr=_l(sr,So(al())),Vl(function(Rr){var cn=this;return Qt(sr,function(Bn){return _d(Bn,cn,Rr)})})})}function Yx(Qt,sr){sr=sr===tt?" ":sm(sr);var Rr=sr.length;if(Rr<2)return Rr?$m(sr,Qt):sr;var cn=$m(sr,dy(Qt/Rl(sr)));return nu(sr)?B_(hl(cn),0,Qt).join(""):cn.slice(0,Qt)}function em(Qt,sr,Rr,cn){var Bn=sr&wt,ns=xy(Qt);function Ds(){for(var Fs=-1,ro=arguments.length,Go=-1,Uo=cn.length,tu=fo(Uo+ro),Su=this&&this!==Lp&&this instanceof Ds?ns:Qt;++Go<Uo;)tu[Go]=cn[Go];for(;ro--;)tu[Go++]=arguments[++Fs];return _d(Su,Bn?Rr:this,tu)}return Ds}function Ly(Qt){return function(sr,Rr,cn){return cn&&typeof cn!="number"&&ym(sr,Rr,cn)&&(Rr=cn=tt),sr=K1(sr),Rr===tt?(Rr=sr,sr=0):Rr=K1(Rr),cn=cn===tt?sr<Rr?1:-1:K1(cn),d1(sr,Rr,cn,Qt)}}function Dp(Qt){return function(sr,Rr){return typeof sr=="string"&&typeof Rr=="string"||(sr=l0(sr),Rr=l0(Rr)),Qt(sr,Rr)}}function kS(Qt,sr,Rr,cn,Bn,ns,Ds,Fs,ro,Go){var Uo=sr&Pt,tu=Uo?Ds:tt,Su=Uo?tt:Ds,qu=Uo?ns:tt,xl=Uo?tt:ns;sr|=Uo?Ft:qt,sr&=~(Uo?qt:Ft),sr&Nt||(sr&=-4);var Kl=[Qt,sr,Bn,qu,tu,xl,Su,Fs,ro,Go],Tl=Rr.apply(tt,Kl);return Kx(Qt)&&mT(Tl,Kl),Tl.placeholder=cn,b1(Tl,Qt,sr)}function bl(Qt){var sr=Yp[Qt];return function(Rr,cn){if(Rr=l0(Rr),cn=cn==null?0:gm(Xc(cn),292),cn&&Ql(Rr)){var Bn=(Ip(Rr)+"e").split("e"),ns=sr(Bn[0]+"e"+(+Bn[1]+cn));return Bn=(Ip(ns)+"e").split("e"),+(Bn[0]+"e"+(+Bn[1]-cn))}return sr(Rr)}}var Z0=wp&&1/Dl(new wp([,-0]))[1]==pr?function(Qt){return new wp(Qt)}:BT;function U_(Qt){return function(sr){var Rr=lv(sr);return Rr==ln?ll(sr):Rr==Cn?dp(sr):Js(sr,Qt(sr))}}function $p(Qt,sr,Rr,cn,Bn,ns,Ds,Fs){var ro=sr&At;if(!ro&&typeof Qt!="function")throw new _v(dt);var Go=cn?cn.length:0;if(Go||(sr&=-97,cn=Bn=tt),Ds=Ds===tt?Ds:Pl(Xc(Ds),0),Fs=Fs===tt?Fs:Xc(Fs),Go-=Bn?Bn.length:0,sr&qt){var Uo=cn,tu=Bn;cn=Bn=tt}var Su=ro?tt:_x(Qt),qu=[Qt,sr,Rr,cn,Bn,Uo,tu,ns,Ds,Fs];if(Su&&xx(qu,Su),Qt=qu[0],sr=qu[1],Rr=qu[2],cn=qu[3],Bn=qu[4],Fs=qu[9]=qu[9]===tt?ro?0:Qt.length:Pl(qu[9]-Go,0),!Fs&&sr&(Pt|It)&&(sr&=-25),!sr||sr==wt)var xl=hE(Qt,sr,Rr);else sr==Pt||sr==It?xl=f1(Qt,sr,Fs):(sr==Ft||sr==(wt|Ft))&&!Bn.length?xl=em(Qt,sr,Rr,cn):xl=p1.apply(tt,qu);var Kl=Su?n0:mT;return b1(Kl(xl,qu),Qt,sr)}function Lv(Qt,sr,Rr,cn){return Qt===tt||_b(Qt,Gv[Rr])&&!Zu.call(cn,Rr)?sr:Qt}function OS(Qt,sr,Rr,cn,Bn,ns){return Mv(Qt)&&Mv(sr)&&(ns.set(sr,Qt),vy(Qt,sr,tt,OS,ns),ns.delete(sr)),Qt}function bx(Qt){return rS(Qt)?tt:Qt}function I0(Qt,sr,Rr,cn,Bn,ns){var Ds=Rr&Rt,Fs=Qt.length,ro=sr.length;if(Fs!=ro&&!(Ds&&ro>Fs))return!1;var Go=ns.get(Qt),Uo=ns.get(sr);if(Go&&Uo)return Go==sr&&Uo==Qt;var tu=-1,Su=!0,qu=Rr&Tt?new H0:tt;for(ns.set(Qt,sr),ns.set(sr,Qt);++tu<Fs;){var xl=Qt[tu],Kl=sr[tu];if(cn)var Tl=Ds?cn(Kl,xl,tu,sr,Qt,ns):cn(xl,Kl,tu,Qt,sr,ns);if(Tl!==tt){if(Tl)continue;Su=!1;break}if(qu){if(!np(sr,function(ep,Rp){if(!Zo(qu,Rp)&&(xl===ep||Bn(xl,ep,Rr,cn,ns)))return qu.push(Rp)})){Su=!1;break}}else if(!(xl===Kl||Bn(xl,Kl,Rr,cn,ns))){Su=!1;break}}return ns.delete(Qt),ns.delete(sr),Su}function Nl(Qt,sr,Rr,cn,Bn,ns,Ds){switch(Rr){case Un:if(Qt.byteLength!=sr.byteLength||Qt.byteOffset!=sr.byteOffset)return!1;Qt=Qt.buffer,sr=sr.buffer;case wn:return!(Qt.byteLength!=sr.byteLength||!ns(new av(Qt),new av(sr)));case Ar:case Qr:case kn:return _b(+Qt,+sr);case Sn:return Qt.name==sr.name&&Qt.message==sr.message;case Ln:case Nn:return Qt==sr+"";case ln:var Fs=ll;case Cn:var ro=cn&Rt;if(Fs||(Fs=Dl),Qt.size!=sr.size&&!ro)return!1;var Go=Ds.get(Qt);if(Go)return Go==sr;cn|=Tt,Ds.set(Qt,sr);var Uo=I0(Fs(Qt),Fs(sr),cn,Bn,ns,Ds);return Ds.delete(Qt),Uo;case Gr:if(py)return py.call(Qt)==py.call(sr)}return!1}function Xy(Qt,sr,Rr,cn,Bn,ns){var Ds=Rr&Rt,Fs=Sy(Qt),ro=Fs.length,Go=Sy(sr),Uo=Go.length;if(ro!=Uo&&!Ds)return!1;for(var tu=ro;tu--;){var Su=Fs[tu];if(!(Ds?Su in sr:Zu.call(sr,Su)))return!1}var qu=ns.get(Qt),xl=ns.get(sr);if(qu&&xl)return qu==sr&&xl==Qt;var Kl=!0;ns.set(Qt,sr),ns.set(sr,Qt);for(var Tl=Ds;++tu<ro;){Su=Fs[tu];var ep=Qt[Su],Rp=sr[Su];if(cn)var S_=Ds?cn(Rp,ep,Su,sr,Qt,ns):cn(ep,Rp,Su,Qt,sr,ns);if(!(S_===tt?ep===Rp||Bn(ep,Rp,Rr,cn,ns):S_)){Kl=!1;break}Tl||(Tl=Su=="constructor")}if(Kl&&!Tl){var Yy=Qt.constructor,fm=sr.constructor;Yy!=fm&&"constructor"in Qt&&"constructor"in sr&&!(typeof Yy=="function"&&Yy instanceof Yy&&typeof fm=="function"&&fm instanceof fm)&&(Kl=!1)}return ns.delete(Qt),ns.delete(sr),Kl}function pl(Qt){return jS(fT(Qt,tt,ww),Qt+"")}function Sy(Qt){return q_(Qt,jy,Yu)}function Dv(Qt){return q_(Qt,e_,z_)}var _x=Hv?function(Qt){return Hv.get(Qt)}:BT;function J0(Qt){for(var sr=Qt.name+"",Rr=vm[sr],cn=Zu.call(vm,sr)?Rr.length:0;cn--;){var Bn=Rr[cn],ns=Bn.func;if(ns==null||ns==Qt)return Bn.name}return sr}function uv(Qt){var sr=Zu.call(br,"placeholder")?br:Qt;return sr.placeholder}function al(){var Qt=br.iteratee||YE;return Qt=Qt===YE?AS:Qt,arguments.length?Qt(arguments[0],arguments[1]):Qt}function z1(Qt,sr){var Rr=Qt.__data__;return yw(sr)?Rr[typeof sr=="string"?"string":"hash"]:Rr.map}function Qx(Qt){for(var sr=jy(Qt),Rr=sr.length;Rr--;){var cn=sr[Rr],Bn=Qt[cn];sr[Rr]=[cn,Bn,pE(Bn)]}return sr}function m1(Qt,sr){var Rr=sl(Qt,sr);return s1(Rr)?Rr:tt}function ub(Qt){var sr=Zu.call(Qt,xv),Rr=Qt[xv];try{Qt[xv]=tt;var cn=!0}catch{}var Bn=cy.call(Qt);return cn&&(sr?Qt[xv]=Rr:delete Qt[xv]),Bn}var Yu=Jv?function(Qt){return Qt==null?[]:(Qt=_h(Qt),Fp(Jv(Qt),function(sr){return Iy.call(Qt,sr)}))}:W_,z_=Jv?function(Qt){for(var sr=[];Qt;)Wp(sr,Yu(Qt)),Qt=My(Qt);return sr}:W_,lv=Av;(kv&&lv(new kv(new ArrayBuffer(1)))!=Un||$l&&lv(new $l)!=ln||sv&&lv(sv.resolve())!=rs||wp&&lv(new wp)!=Cn||yl&&lv(new yl)!=dn)&&(lv=function(Qt){var sr=Av(Qt),Rr=sr==An?Qt.constructor:tt,cn=Rr?vb(Rr):"";if(cn)switch(cn){case Qm:return Un;case V0:return ln;case Ov:return rs;case Sv:return Cn;case c_:return dn}return sr});function R0(Qt,sr,Rr){for(var cn=-1,Bn=Rr.length;++cn<Bn;){var ns=Rr[cn],Ds=ns.size;switch(ns.type){case"drop":Qt+=Ds;break;case"dropRight":sr-=Ds;break;case"take":sr=gm(sr,Qt+Ds);break;case"takeRight":Qt=Pl(Qt,sr-Ds);break}}return{start:Qt,end:sr}}function vw(Qt){var sr=Qt.match(Fl);return sr?sr[1].split(gl):[]}function g1(Qt,sr,Rr){sr=qy(sr,Qt);for(var cn=-1,Bn=sr.length,ns=!1;++cn<Bn;){var Ds=cv(sr[cn]);if(!(ns=Qt!=null&&Rr(Qt,Ds)))break;Qt=Qt[Ds]}return ns||++cn!=Bn?ns:(Bn=Qt==null?0:Qt.length,!!Bn&&Ax(Bn)&&ny(Ds,Bn)&&(Ls(Qt)||Zm(Qt)))}function qS(Qt){var sr=Qt.length,Rr=new Qt.constructor(sr);return sr&&typeof Qt[0]=="string"&&Zu.call(Qt,"index")&&(Rr.index=Qt.index,Rr.input=Qt.input),Rr}function G1(Qt){return typeof Qt.constructor=="function"&&!V1(Qt)?zr(My(Qt)):{}}function LS(Qt,sr,Rr){var cn=Qt.constructor;switch(sr){case wn:return IS(Qt);case Ar:case Qr:return new cn(+Qt);case Un:return RS(Qt,Rr);case Zn:case pn:case Dn:case qn:case _a:case Vn:case bs:case Is:case uo:return gx(Qt,Rr);case ln:return new cn;case kn:case Nn:return new cn(Qt);case Ln:return lE(Qt);case Cn:return new cn;case Gr:return pw(Qt)}}function dT(Qt,sr){var Rr=sr.length;if(!Rr)return Qt;var cn=Rr-1;return sr[cn]=(Rr>1?"& ":"")+sr[cn],sr=sr.join(Rr>2?", ":" "),Qt.replace(Ko,`{
/* [wrapped with `+sr+`] */
`)}function FS(Qt){return Ls(Qt)||Zm(Qt)||!!(yp&&Qt&&Qt[yp])}function ny(Qt,sr){var Rr=typeof Qt;return sr=sr??cr,!!sr&&(Rr=="number"||Rr!="symbol"&&mn.test(Qt))&&Qt>-1&&Qt%1==0&&Qt<sr}function ym(Qt,sr,Rr){if(!Mv(Rr))return!1;var cn=typeof sr;return(cn=="number"?o0(Rr)&&ny(sr,Rr.length):cn=="string"&&sr in Rr)?_b(Rr[sr],Qt):!1}function hm(Qt,sr){if(Ls(Qt))return!1;var Rr=typeof Qt;return Rr=="number"||Rr=="symbol"||Rr=="boolean"||Qt==null||km(Qt)?!0:Gs.test(Qt)||!es.test(Qt)||sr!=null&&Qt in _h(sr)}function yw(Qt){var sr=typeof Qt;return sr=="string"||sr=="number"||sr=="symbol"||sr=="boolean"?Qt!=="__proto__":Qt===null}function Kx(Qt){var sr=J0(Qt),Rr=br[sr];if(typeof Rr!="function"||!(sr in yn.prototype))return!1;if(Qt===Rr)return!0;var cn=_x(Rr);return!!cn&&Qt===cn[0]}function a0(Qt){return!!u_&&u_ in Qt}var fE=ly?u0:pC;function V1(Qt){var sr=Qt&&Qt.constructor,Rr=typeof sr=="function"&&sr.prototype||Gv;return Qt===Rr}function pE(Qt){return Qt===Qt&&!Mv(Qt)}function hT(Qt,sr){return function(Rr){return Rr==null?!1:Rr[Qt]===sr&&(sr!==tt||Qt in _h(Rr))}}function mE(Qt){var sr=DT(Qt,function(cn){return Rr.size===mt&&Rr.clear(),cn}),Rr=sr.cache;return sr}function xx(Qt,sr){var Rr=Qt[1],cn=sr[1],Bn=Rr|cn,ns=Bn<(wt|At|Vt),Ds=cn==Vt&&Rr==Pt||cn==Vt&&Rr==Kt&&Qt[7].length<=sr[8]||cn==(Vt|Kt)&&sr[7].length<=sr[8]&&Rr==Pt;if(!(ns||Ds))return Qt;cn&wt&&(Qt[2]=sr[2],Bn|=Rr&wt?0:Nt);var Fs=sr[3];if(Fs){var ro=Qt[3];Qt[3]=ro?gw(ro,Fs,sr[4]):Fs,Qt[4]=ro?Gl(Qt[3],bt):sr[4]}return Fs=sr[5],Fs&&(ro=Qt[5],Qt[5]=ro?by(ro,Fs,sr[6]):Fs,Qt[6]=ro?Gl(Qt[5],bt):sr[6]),Fs=sr[7],Fs&&(Qt[7]=Fs),cn&Vt&&(Qt[8]=Qt[8]==null?sr[8]:gm(Qt[8],sr[8])),Qt[9]==null&&(Qt[9]=sr[9]),Qt[0]=sr[0],Qt[1]=Bn,Qt}function y1(Qt){var sr=[];if(Qt!=null)for(var Rr in _h(Qt))sr.push(Rr);return sr}function gE(Qt){return cy.call(Qt)}function fT(Qt,sr,Rr){return sr=Pl(sr===tt?Qt.length-1:sr,0),function(){for(var cn=arguments,Bn=-1,ns=Pl(cn.length-sr,0),Ds=fo(ns);++Bn<ns;)Ds[Bn]=cn[sr+Bn];Bn=-1;for(var Fs=fo(sr+1);++Bn<sr;)Fs[Bn]=cn[Bn];return Fs[sr]=Rr(Ds),_d(Qt,this,Fs)}}function BS(Qt,sr){return sr.length<2?Qt:r0(Qt,ov(sr,0,-1))}function vE(Qt,sr){for(var Rr=Qt.length,cn=gm(sr.length,Rr),Bn=_y(Qt);cn--;){var ns=sr[cn];Qt[cn]=ny(ns,Rr)?Bn[ns]:tt}return Qt}function pT(Qt,sr){if(!(sr==="constructor"&&typeof Qt[sr]=="function")&&sr!="__proto__")return Qt[sr]}var mT=yE(n0),Zx=Vv||function(Qt,sr){return Lp.setTimeout(Qt,sr)},jS=yE(uE);function b1(Qt,sr,Rr){var cn=sr+"";return jS(Qt,dT(cn,_1(vw(cn),Rr)))}function yE(Qt){var sr=0,Rr=0;return function(){var cn=z0(),Bn=Bt-(cn-Rr);if(Rr=cn,Bn>0){if(++sr>=Wt)return arguments[0]}else sr=0;return Qt.apply(tt,arguments)}}function bw(Qt,sr){var Rr=-1,cn=Qt.length,Bn=cn-1;for(sr=sr===tt?cn:sr;++Rr<sr;){var ns=hw(Rr,Bn),Ds=Qt[ns];Qt[ns]=Qt[Rr],Qt[Rr]=Ds}return Qt.length=sr,Qt}var H1=mE(function(Qt){var sr=[];return Qt.charCodeAt(0)===46&&sr.push(""),Qt.replace(Ro,function(Rr,cn,Bn,ns){sr.push(Bn?ns.replace(Ku,"$1"):cn||Rr)}),sr});function cv(Qt){if(typeof Qt=="string"||km(Qt))return Qt;var sr=Qt+"";return sr=="0"&&1/Qt==-pr?"-0":sr}function vb(Qt){if(Qt!=null){try{return Dy.call(Qt)}catch{}try{return Qt+""}catch{}}return""}function _1(Qt,sr){return Cl(Mr,function(Rr){var cn="_."+Rr[0];sr&Rr[1]&&!Tm(Qt,cn)&&Qt.push(cn)}),Qt.sort()}function bE(Qt){if(Qt instanceof yn)return Qt.clone();var sr=new an(Qt.__wrapped__,Qt.__chain__);return sr.__actions__=_y(Qt.__actions__),sr.__index__=Qt.__index__,sr.__values__=Qt.__values__,sr}function _E(Qt,sr,Rr){(Rr?ym(Qt,sr,Rr):sr===tt)?sr=1:sr=Pl(Xc(sr),0);var cn=Qt==null?0:Qt.length;if(!cn||sr<1)return[];for(var Bn=0,ns=0,Ds=fo(dy(cn/sr));Bn<cn;)Ds[ns++]=ov(Qt,Bn,Bn+=sr);return Ds}function G_(Qt){for(var sr=-1,Rr=Qt==null?0:Qt.length,cn=0,Bn=[];++sr<Rr;){var ns=Qt[sr];ns&&(Bn[cn++]=ns)}return Bn}function gT(){var Qt=arguments.length;if(!Qt)return[];for(var sr=fo(Qt-1),Rr=arguments[0],cn=Qt;cn--;)sr[cn-1]=arguments[cn];return Wp(Ls(Rr)?_y(Rr):[Rr],jm(sr,1))}var _w=Vl(function(Qt,sr){return Jm(Qt)?$x(Qt,jm(sr,1,Jm,!0)):[]}),xE=Vl(function(Qt,sr){var Rr=iy(sr);return Jm(Rr)&&(Rr=tt),Jm(Qt)?$x(Qt,jm(sr,1,Jm,!0),al(Rr,2)):[]}),SE=Vl(function(Qt,sr){var Rr=iy(sr);return Jm(Rr)&&(Rr=tt),Jm(Qt)?$x(Qt,jm(sr,1,Jm,!0),tt,Rr):[]});function b_(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;return cn?(sr=Rr||sr===tt?1:Xc(sr),ov(Qt,sr<0?0:sr,cn)):[]}function $S(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;return cn?(sr=Rr||sr===tt?1:Xc(sr),sr=cn-sr,ov(Qt,0,sr<0?0:sr)):[]}function OA(Qt,sr){return Qt&&Qt.length?F_(Qt,al(sr,3),!0,!0):[]}function Sx(Qt,sr){return Qt&&Qt.length?F_(Qt,al(sr,3),!0):[]}function xw(Qt,sr,Rr,cn){var Bn=Qt==null?0:Qt.length;return Bn?(Rr&&typeof Rr!="number"&&ym(Qt,sr,Rr)&&(Rr=0,cn=Bn),oE(Qt,sr,Rr,cn)):[]}function V_(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;if(!cn)return-1;var Bn=Rr==null?0:Xc(Rr);return Bn<0&&(Bn=Pl(cn+Bn,0)),ir(Qt,al(sr,3),Bn)}function Sw(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;if(!cn)return-1;var Bn=cn-1;return Rr!==tt&&(Bn=Xc(Rr),Bn=Rr<0?Pl(cn+Bn,0):gm(Bn,cn-1)),ir(Qt,al(sr,3),Bn,!0)}function ww(Qt){var sr=Qt==null?0:Qt.length;return sr?jm(Qt,1):[]}function qA(Qt){var sr=Qt==null?0:Qt.length;return sr?jm(Qt,pr):[]}function wE(Qt,sr){var Rr=Qt==null?0:Qt.length;return Rr?(sr=sr===tt?1:Xc(sr),jm(Qt,sr)):[]}function W1(Qt){for(var sr=-1,Rr=Qt==null?0:Qt.length,cn={};++sr<Rr;){var Bn=Qt[sr];cn[Bn[0]]=Bn[1]}return cn}function vT(Qt){return Qt&&Qt.length?Qt[0]:tt}function Tw(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;if(!cn)return-1;var Bn=Rr==null?0:Xc(Rr);return Bn<0&&(Bn=Pl(cn+Bn,0)),nr(Qt,sr,Bn)}function Ew(Qt){var sr=Qt==null?0:Qt.length;return sr?ov(Qt,0,-1):[]}var Aw=Vl(function(Qt){var sr=_l(Qt,Vx);return sr.length&&sr[0]===Qt[0]?E0(sr):[]}),TE=Vl(function(Qt){var sr=iy(Qt),Rr=_l(Qt,Vx);return sr===iy(Rr)?sr=tt:Rr.pop(),Rr.length&&Rr[0]===Qt[0]?E0(Rr,al(sr,2)):[]}),yT=Vl(function(Qt){var sr=iy(Qt),Rr=_l(Qt,Vx);return sr=typeof sr=="function"?sr:tt,sr&&Rr.pop(),Rr.length&&Rr[0]===Qt[0]?E0(Rr,tt,sr):[]});function bT(Qt,sr){return Qt==null?"":fy.call(Qt,sr)}function iy(Qt){var sr=Qt==null?0:Qt.length;return sr?Qt[sr-1]:tt}function cl(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;if(!cn)return-1;var Bn=cn;return Rr!==tt&&(Bn=Xc(Rr),Bn=Bn<0?Pl(cn+Bn,0):gm(Bn,cn-1)),sr===sr?cm(Qt,sr,Bn):ir(Qt,Pr,Bn,!0)}function Ol(Qt,sr){return Qt&&Qt.length?dw(Qt,Xc(sr)):tt}var Cw=Vl(Ho);function Ho(Qt,sr){return Qt&&Qt.length&&sr&&sr.length?ky(Qt,sr):Qt}function Fy(Qt,sr,Rr){return Qt&&Qt.length&&sr&&sr.length?ky(Qt,sr,al(Rr,2)):Qt}function Gt(Qt,sr,Rr){return Qt&&Qt.length&&sr&&sr.length?ky(Qt,sr,tt,Rr):Qt}var er=pl(function(Qt,sr){var Rr=Qt==null?0:Qt.length,cn=O1(Qt,sr);return $1(Qt,_l(sr,function(Bn){return ny(Bn,Rr)?+Bn:Bn}).sort(mw)),cn});function hr(Qt,sr){var Rr=[];if(!(Qt&&Qt.length))return Rr;var cn=-1,Bn=[],ns=Qt.length;for(sr=al(sr,3);++cn<ns;){var Ds=Qt[cn];sr(Ds,cn,Qt)&&(Rr.push(Ds),Bn.push(cn))}return $1(Qt,Bn),Rr}function Fr(Qt){return Qt==null?Qt:x0.call(Qt)}function nn(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;return cn?(Rr&&typeof Rr!="number"&&ym(Qt,sr,Rr)?(sr=0,Rr=cn):(sr=sr==null?0:Xc(sr),Rr=Rr===tt?cn:Xc(Rr)),ov(Qt,sr,Rr)):[]}function zn(Qt,sr){return h1(Qt,sr)}function _i(Qt,sr,Rr){return Oy(Qt,sr,al(Rr,2))}function As(Qt,sr){var Rr=Qt==null?0:Qt.length;if(Rr){var cn=h1(Qt,sr);if(cn<Rr&&_b(Qt[cn],sr))return cn}return-1}function ps(Qt,sr){return h1(Qt,sr,!0)}function xo(Qt,sr,Rr){return Oy(Qt,sr,al(Rr,2),!0)}function Pu(Qt,sr){var Rr=Qt==null?0:Qt.length;if(Rr){var cn=h1(Qt,sr,!0)-1;if(_b(Qt[cn],sr))return cn}return-1}function Bu(Qt){return Qt&&Qt.length?DS(Qt):[]}function _f(Qt,sr){return Qt&&Qt.length?DS(Qt,al(sr,2)):[]}function zp(Qt){var sr=Qt==null?0:Qt.length;return sr?ov(Qt,1,sr):[]}function s0(Qt,sr,Rr){return Qt&&Qt.length?(sr=Rr||sr===tt?1:Xc(sr),ov(Qt,0,sr<0?0:sr)):[]}function Xv(Qt,sr,Rr){var cn=Qt==null?0:Qt.length;return cn?(sr=Rr||sr===tt?1:Xc(sr),sr=cn-sr,ov(Qt,sr<0?0:sr,cn)):[]}function ho(Qt,sr){return Qt&&Qt.length?F_(Qt,al(sr,3),!1,!0):[]}function Zs(Qt,sr){return Qt&&Qt.length?F_(Qt,al(sr,3)):[]}var No=Vl(function(Qt){return L_(jm(Qt,1,Jm,!0))}),iu=Vl(function(Qt){var sr=iy(Qt);return Jm(sr)&&(sr=tt),L_(jm(Qt,1,Jm,!0),al(sr,2))}),wu=Vl(function(Qt){var sr=iy(Qt);return sr=typeof sr=="function"?sr:tt,L_(jm(Qt,1,Jm,!0),tt,sr)});function ju(Qt){return Qt&&Qt.length?L_(Qt):[]}function ml(Qt,sr){return Qt&&Qt.length?L_(Qt,al(sr,2)):[]}function Mp(Qt,sr){return sr=typeof sr=="function"?sr:tt,Qt&&Qt.length?L_(Qt,tt,sr):[]}function Cm(Qt){if(!(Qt&&Qt.length))return[];var sr=0;return Qt=Fp(Qt,function(Rr){if(Jm(Rr))return sr=Pl(Rr.length,sr),!0}),ao(sr,function(Rr){return _l(Qt,bn(Rr))})}function Wl(Qt,sr){if(!(Qt&&Qt.length))return[];var Rr=Cm(Qt);return sr==null?Rr:_l(Rr,function(cn){return _d(sr,tt,cn)})}var x1=Vl(function(Qt,sr){return Jm(Qt)?$x(Qt,sr):[]}),EE=Vl(function(Qt){return y_(Fp(Qt,Jm))}),tD=Vl(function(Qt){var sr=iy(Qt);return Jm(sr)&&(sr=tt),y_(Fp(Qt,Jm),al(sr,2))}),rD=Vl(function(Qt){var sr=iy(Qt);return sr=typeof sr=="function"?sr:tt,y_(Fp(Qt,Jm),tt,sr)}),US=Vl(Cm);function nD(Qt,sr){return Gx(Qt||[],sr||[],fl)}function ql(Qt,sr){return Gx(Qt||[],sr||[],Wv)}var LA=Vl(function(Qt){var sr=Qt.length,Rr=sr>1?Qt[sr-1]:tt;return Rr=typeof Rr=="function"?(Qt.pop(),Rr):tt,Wl(Qt,Rr)});function _T(Qt){var sr=br(Qt);return sr.__chain__=!0,sr}function iD(Qt,sr){return sr(Qt),Qt}function wx(Qt,sr){return sr(Qt)}var FA=pl(function(Qt){var sr=Qt.length,Rr=sr?Qt[0]:0,cn=this.__wrapped__,Bn=function(ns){return O1(ns,Qt)};return sr>1||this.__actions__.length||!(cn instanceof yn)||!ny(Rr)?this.thru(Bn):(cn=cn.slice(Rr,+Rr+(sr?1:0)),cn.__actions__.push({func:wx,args:[Bn],thisArg:tt}),new an(cn,this.__chain__).thru(function(ns){return sr&&!ns.length&&ns.push(tt),ns}))});function AE(){return _T(this)}function aD(){return new an(this.value(),this.__chain__)}function sD(){this.__values__===tt&&(this.__values__=XA(this.value()));var Qt=this.__index__>=this.__values__.length,sr=Qt?tt:this.__values__[this.__index__++];return{done:Qt,value:sr}}function Tx(){return this}function Dw(Qt){for(var sr,Rr=this;Rr instanceof $r;){var cn=bE(Rr);cn.__index__=0,cn.__values__=tt,sr?Bn.__wrapped__=cn:sr=cn;var Bn=cn;Rr=Rr.__wrapped__}return Bn.__wrapped__=Qt,sr}function oD(){var Qt=this.__wrapped__;if(Qt instanceof yn){var sr=Qt;return this.__actions__.length&&(sr=new yn(this)),sr=sr.reverse(),sr.__actions__.push({func:wx,args:[Fr],thisArg:tt}),new an(sr,this.__chain__)}return this.thru(Fr)}function xT(){return MS(this.__wrapped__,this.__actions__)}var uD=M0(function(Qt,sr,Rr){Zu.call(Qt,Rr)?++Qt[Rr]:W0(Qt,Rr,1)});function ST(Qt,sr,Rr){var cn=Ls(Qt)?zv:Ux;return Rr&&ym(Qt,sr,Rr)&&(sr=tt),cn(Qt,al(sr,3))}function lD(Qt,sr){var Rr=Ls(Qt)?Fp:f_;return Rr(Qt,al(sr,3))}var dv=Wx(V_),__=Wx(Sw);function CE(Qt,sr){return jm(Mw(Qt,sr),1)}function BA(Qt,sr){return jm(Mw(Qt,sr),pr)}function cD(Qt,sr,Rr){return Rr=Rr===tt?1:Xc(Rr),jm(Mw(Qt,sr),Rr)}function jA(Qt,sr){var Rr=Ls(Qt)?Cl:h_;return Rr(Qt,al(sr,3))}function $A(Qt,sr){var Rr=Ls(Qt)?Cy:my;return Rr(Qt,al(sr,3))}var dD=M0(function(Qt,sr,Rr){Zu.call(Qt,Rr)?Qt[Rr].push(sr):W0(Qt,Rr,[sr])});function UA(Qt,sr,Rr,cn){Qt=o0(Qt)?Qt:aS(Qt),Rr=Rr&&!cn?Xc(Rr):0;var Bn=Qt.length;return Rr<0&&(Rr=Pl(Bn+Rr,0)),P0(Qt)?Rr<=Bn&&Qt.indexOf(sr,Rr)>-1:!!Bn&&nr(Qt,sr,Rr)>-1}var hD=Vl(function(Qt,sr,Rr){var cn=-1,Bn=typeof sr=="function",ns=o0(Qt)?fo(Qt.length):[];return h_(Qt,function(Ds){ns[++cn]=Bn?_d(sr,Ds,Rr):C0(Ds,sr,Rr)}),ns}),fD=M0(function(Qt,sr,Rr){W0(Qt,Rr,sr)});function Mw(Qt,sr){var Rr=Ls(Qt)?_l:cw;return Rr(Qt,al(sr,3))}function Iw(Qt,sr,Rr,cn){return Qt==null?[]:(Ls(sr)||(sr=sr==null?[]:[sr]),Rr=cn?tt:Rr,Ls(Rr)||(Rr=Rr==null?[]:[Rr]),zx(Qt,sr,Rr))}var pD=M0(function(Qt,sr,Rr){Qt[Rr?0:1].push(sr)},function(){return[[],[]]});function wT(Qt,sr,Rr){var cn=Ls(Qt)?Zp:Wn,Bn=arguments.length<3;return cn(Qt,al(sr,4),Rr,Bn,h_)}function DE(Qt,sr,Rr){var cn=Ls(Qt)?Xp:Wn,Bn=arguments.length<3;return cn(Qt,al(sr,4),Rr,Bn,my)}function zA(Qt,sr){var Rr=Ls(Qt)?Fp:f_;return Rr(Qt,zS(al(sr,3)))}function ME(Qt){var sr=Ls(Qt)?O_:Y0;return sr(Qt)}function RE(Qt,sr,Rr){(Rr?ym(Qt,sr,Rr):sr===tt)?sr=1:sr=Xc(sr);var cn=Ls(Qt)?Hy:Cv;return cn(Qt,sr)}function PE(Qt){var sr=Ls(Qt)?Ev:fw;return sr(Qt)}function TT(Qt){if(Qt==null)return 0;if(o0(Qt))return P0(Qt)?Rl(Qt):Qt.length;var sr=lv(Qt);return sr==ln||sr==Cn?Qt.size:CS(Qt).length}function mD(Qt,sr,Rr){var cn=Ls(Qt)?np:Q0;return Rr&&ym(Qt,sr,Rr)&&(sr=tt),cn(Qt,al(sr,3))}var ET=Vl(function(Qt,sr){if(Qt==null)return[];var Rr=sr.length;return Rr>1&&ym(Qt,sr[0],sr[1])?sr=[]:Rr>2&&ym(sr[0],sr[1],sr[2])&&(sr=[sr[0]]),zx(Qt,jm(sr,1),[])}),Rw=e0||function(){return Lp.Date.now()};function JM(Qt,sr){if(typeof sr!="function")throw new _v(dt);return Qt=Xc(Qt),function(){if(--Qt<1)return sr.apply(this,arguments)}}function GA(Qt,sr,Rr){return sr=Rr?tt:sr,sr=Qt&&sr==null?Qt.length:sr,$p(Qt,Vt,tt,tt,tt,tt,sr)}function NE(Qt,sr){var Rr;if(typeof sr!="function")throw new _v(dt);return Qt=Xc(Qt),function(){return--Qt>0&&(Rr=sr.apply(this,arguments)),Qt<=1&&(sr=tt),Rr}}var AT=Vl(function(Qt,sr,Rr){var cn=wt;if(Rr.length){var Bn=Gl(Rr,uv(AT));cn|=Ft}return $p(Qt,cn,sr,Rr,Bn)}),CT=Vl(function(Qt,sr,Rr){var cn=wt|At;if(Rr.length){var Bn=Gl(Rr,uv(CT));cn|=Ft}return $p(sr,cn,Qt,Rr,Bn)});function VA(Qt,sr,Rr){sr=Rr?tt:sr;var cn=$p(Qt,Pt,tt,tt,tt,tt,tt,sr);return cn.placeholder=VA.placeholder,cn}function kE(Qt,sr,Rr){sr=Rr?tt:sr;var cn=$p(Qt,It,tt,tt,tt,tt,tt,sr);return cn.placeholder=kE.placeholder,cn}function X1(Qt,sr,Rr){var cn,Bn,ns,Ds,Fs,ro,Go=0,Uo=!1,tu=!1,Su=!0;if(typeof Qt!="function")throw new _v(dt);sr=l0(sr)||0,Mv(Rr)&&(Uo=!!Rr.leading,tu="maxWait"in Rr,ns=tu?Pl(l0(Rr.maxWait)||0,sr):ns,Su="trailing"in Rr?!!Rr.trailing:Su);function qu(Bv){var w1=cn,Om=Bn;return cn=Bn=tt,Go=Bv,Ds=Qt.apply(Om,w1),Ds}function xl(Bv){return Go=Bv,Fs=Zx(ep,sr),Uo?qu(Bv):Ds}function Kl(Bv){var w1=Bv-ro,Om=Bv-Go,UT=sr-w1;return tu?gm(UT,ns-Om):UT}function Tl(Bv){var w1=Bv-ro,Om=Bv-Go;return ro===tt||w1>=sr||w1<0||tu&&Om>=ns}function ep(){var Bv=Rw();if(Tl(Bv))return Rp(Bv);Fs=Zx(ep,Kl(Bv))}function Rp(Bv){return Fs=tt,Su&&cn?qu(Bv):(cn=Bn=tt,Ds)}function S_(){Fs!==tt&&ry(Fs),Go=0,cn=ro=Bn=Fs=tt}function Yy(){return Fs===tt?Ds:Rp(Rw())}function fm(){var Bv=Rw(),w1=Tl(Bv);if(cn=arguments,Bn=this,ro=Bv,w1){if(Fs===tt)return xl(ro);if(tu)return ry(Fs),Fs=Zx(ep,sr),qu(ro)}return Fs===tt&&(Fs=Zx(ep,sr)),Ds}return fm.cancel=S_,fm.flush=Yy,fm}var Pw=Vl(function(Qt,sr){return uw(Qt,1,sr)}),Nw=Vl(function(Qt,sr,Rr){return uw(Qt,l0(sr)||0,Rr)});function HA(Qt){return $p(Qt,jt)}function DT(Qt,sr){if(typeof Qt!="function"||sr!=null&&typeof sr!="function")throw new _v(dt);var Rr=function(){var cn=arguments,Bn=sr?sr.apply(this,cn):cn[0],ns=Rr.cache;if(ns.has(Bn))return ns.get(Bn);var Ds=Qt.apply(this,cn);return Rr.cache=ns.set(Bn,Ds)||ns,Ds};return Rr.cache=new(DT.Cache||Fm),Rr}DT.Cache=Fm;function zS(Qt){if(typeof Qt!="function")throw new _v(dt);return function(){var sr=arguments;switch(sr.length){case 0:return!Qt.call(this);case 1:return!Qt.call(this,sr[0]);case 2:return!Qt.call(this,sr[0],sr[1]);case 3:return!Qt.call(this,sr[0],sr[1],sr[2])}return!Qt.apply(this,sr)}}function zm(Qt){return NE(2,Qt)}var Y1=Hx(function(Qt,sr){sr=sr.length==1&&Ls(sr[0])?_l(sr[0],So(al())):_l(jm(sr,1),So(al()));var Rr=sr.length;return Vl(function(cn){for(var Bn=-1,ns=gm(cn.length,Rr);++Bn<ns;)cn[Bn]=sr[Bn].call(this,cn[Bn]);return _d(Qt,this,cn)})}),Ex=Vl(function(Qt,sr){var Rr=Gl(sr,uv(Ex));return $p(Qt,Ft,tt,sr,Rr)}),gD=Vl(function(Qt,sr){var Rr=Gl(sr,uv(gD));return $p(Qt,qt,tt,sr,Rr)}),OE=pl(function(Qt,sr){return $p(Qt,Kt,tt,tt,tt,sr)});function eI(Qt,sr){if(typeof Qt!="function")throw new _v(dt);return sr=sr===tt?sr:Xc(sr),Vl(Qt,sr)}function Q1(Qt,sr){if(typeof Qt!="function")throw new _v(dt);return sr=sr==null?0:Pl(Xc(sr),0),Vl(function(Rr){var cn=Rr[sr],Bn=B_(Rr,0,sr);return cn&&Wp(Bn,cn),_d(Qt,this,Bn)})}function vD(Qt,sr,Rr){var cn=!0,Bn=!0;if(typeof Qt!="function")throw new _v(dt);return Mv(Rr)&&(cn="leading"in Rr?!!Rr.leading:cn,Bn="trailing"in Rr?!!Rr.trailing:Bn),X1(Qt,sr,{leading:cn,maxWait:sr,trailing:Bn})}function MT(Qt){return GA(Qt,1)}function Dm(Qt,sr){return Ex(mx(sr),Qt)}function ap(){if(!arguments.length)return[];var Qt=arguments[0];return Ls(Qt)?Qt:[Qt]}function ol(Qt){return Py(Qt,Ct)}function qE(Qt,sr){return sr=typeof sr=="function"?sr:tt,Py(Qt,Ct,sr)}function yD(Qt){return Py(Qt,St|Ct)}function WA(Qt,sr){return sr=typeof sr=="function"?sr:tt,Py(Qt,St|Ct,sr)}function tI(Qt,sr){return sr==null||hx(Qt,sr,jy(sr))}function _b(Qt,sr){return Qt===sr||Qt!==Qt&&sr!==sr}var S1=Dp(v_),Ll=Dp(function(Qt,sr){return Qt>=sr}),Zm=Em((function(){return arguments})())?Em:function(Qt){return Fv(Qt)&&Zu.call(Qt,"callee")&&!Iy.call(Qt,"callee")},Ls=fo.isArray,By=Wm?So(Wm):Ny;function o0(Qt){return Qt!=null&&Ax(Qt.length)&&!u0(Qt)}function Jm(Qt){return Fv(Qt)&&o0(Qt)}function rI(Qt){return Qt===!0||Qt===!1||Fv(Qt)&&Av(Qt)==Ar}var Jx=Jn||pC,bD=uy?So(uy):ty;function wb(Qt){return Fv(Qt)&&Qt.nodeType===1&&!rS(Qt)}function IT(Qt){if(Qt==null)return!0;if(o0(Qt)&&(Ls(Qt)||typeof Qt=="string"||typeof Qt.splice=="function"||Jx(Qt)||kw(Qt)||Zm(Qt)))return!Qt.length;var sr=lv(Qt);if(sr==ln||sr==Cn)return!Qt.size;if(V1(Qt))return!CS(Qt).length;for(var Rr in Qt)if(Zu.call(Qt,Rr))return!1;return!0}function nI(Qt,sr){return a1(Qt,sr)}function eS(Qt,sr,Rr){Rr=typeof Rr=="function"?Rr:tt;var cn=Rr?Rr(Qt,sr):tt;return cn===tt?a1(Qt,sr,tt,Rr):!!cn}function LE(Qt){if(!Fv(Qt))return!1;var sr=Av(Qt);return sr==Sn||sr==hn||typeof Qt.message=="string"&&typeof Qt.name=="string"&&!rS(Qt)}function tS(Qt){return typeof Qt=="number"&&Ql(Qt)}function u0(Qt){if(!Mv(Qt))return!1;var sr=Av(Qt);return sr==Kr||sr==Hn||sr==Or||sr==qs}function RT(Qt){return typeof Qt=="number"&&Qt==Xc(Qt)}function Ax(Qt){return typeof Qt=="number"&&Qt>-1&&Qt%1==0&&Qt<=cr}function Mv(Qt){var sr=typeof Qt;return Qt!=null&&(sr=="object"||sr=="function")}function Fv(Qt){return Qt!=null&&typeof Qt=="object"}var PT=Sm?So(Sm):lw;function iI(Qt,sr){return Qt===sr||ES(Qt,sr,Qx(sr))}function aI(Qt,sr,Rr){return Rr=typeof Rr=="function"?Rr:tt,ES(Qt,sr,Qx(sr),Rr)}function sI(Qt){return xD(Qt)&&Qt!=+Qt}function oI(Qt){if(fE(Qt))throw new Qu(st);return s1(Qt)}function _D(Qt){return Qt===null}function uI(Qt){return Qt==null}function xD(Qt){return typeof Qt=="number"||Fv(Qt)&&Av(Qt)==kn}function rS(Qt){if(!Fv(Qt)||Av(Qt)!=An)return!1;var sr=My(Qt);if(sr===null)return!0;var Rr=Zu.call(sr,"constructor")&&sr.constructor;return typeof Rr=="function"&&Rr instanceof Rr&&Dy.call(Rr)==Pv}var FE=wm?So(wm):o1;function x_(Qt){return RT(Qt)&&Qt>=-cr&&Qt<=cr}var NT=tm?So(tm):B1;function P0(Qt){return typeof Qt=="string"||!Ls(Qt)&&Fv(Qt)&&Av(Qt)==Nn}function km(Qt){return typeof Qt=="symbol"||Fv(Qt)&&Av(Qt)==Gr}var kw=iv?So(iv):fx;function SD(Qt){return Qt===tt}function wD(Qt){return Fv(Qt)&&lv(Qt)==dn}function TD(Qt){return Fv(Qt)&&Av(Qt)==Rn}var H_=Dp(D0),nS=Dp(function(Qt,sr){return Qt<=sr});function XA(Qt){if(!Qt)return[];if(o0(Qt))return P0(Qt)?hl(Qt):_y(Qt);if(pp&&Qt[pp])return Vo(Qt[pp]());var sr=lv(Qt),Rr=sr==ln?ll:sr==Cn?Dl:aS;return Rr(Qt)}function K1(Qt){if(!Qt)return Qt===0?Qt:0;if(Qt=l0(Qt),Qt===pr||Qt===-pr){var sr=Qt<0?-1:1;return sr*gr}return Qt===Qt?Qt:0}function Xc(Qt){var sr=K1(Qt),Rr=sr%1;return sr===sr?Rr?sr-Rr:sr:0}function N0(Qt){return Qt?q1(Xc(Qt),0,Er):0}function l0(Qt){if(typeof Qt=="number")return Qt;if(km(Qt))return Sr;if(Mv(Qt)){var sr=typeof Qt.valueOf=="function"?Qt.valueOf():Qt;Qt=Mv(sr)?sr+"":sr}if(typeof Qt!="string")return Qt===0?Qt:+Qt;Qt=po(Qt);var Rr=vn.test(Qt);return Rr||gn.test(Qt)?nm(Qt.slice(2),Rr?2:8):Jr.test(Qt)?Sr:+Qt}function YA(Qt){return i0(Qt,e_(Qt))}function BE(Qt){return Qt?q1(Xc(Qt),-cr,cr):Qt===0?Qt:0}function Ip(Qt){return Qt==null?"":sm(Qt)}var QA=K0(function(Qt,sr){if(V1(sr)||o0(sr)){i0(sr,jy(sr),Qt);return}for(var Rr in sr)Zu.call(sr,Rr)&&fl(Qt,Rr,sr[Rr])}),KA=K0(function(Qt,sr){i0(sr,e_(sr),Qt)}),GS=K0(function(Qt,sr,Rr,cn){i0(sr,e_(sr),Qt,cn)}),lI=K0(function(Qt,sr,Rr,cn){i0(sr,jy(sr),Qt,cn)}),Cx=pl(O1);function Ow(Qt,sr){var Rr=zr(Qt);return sr==null?Rr:wS(Rr,sr)}var cI=Vl(function(Qt,sr){Qt=_h(Qt);var Rr=-1,cn=sr.length,Bn=cn>2?sr[2]:tt;for(Bn&&ym(sr[0],sr[1],Bn)&&(cn=1);++Rr<cn;)for(var ns=sr[Rr],Ds=e_(ns),Fs=-1,ro=Ds.length;++Fs<ro;){var Go=Ds[Fs],Uo=Qt[Go];(Uo===tt||_b(Uo,Gv[Go])&&!Zu.call(Qt,Go))&&(Qt[Go]=ns[Go])}return Qt}),ED=Vl(function(Qt){return Qt.push(tt,OS),_d($w,tt,Qt)});function qw(Qt,sr){return Cr(Qt,al(sr,3),xp)}function ZA(Qt,sr){return Cr(Qt,al(sr,3),m_)}function Lw(Qt,sr){return Qt==null?Qt:X0(Qt,al(sr,3),e_)}function AD(Qt,sr){return Qt==null?Qt:p_(Qt,al(sr,3),e_)}function dI(Qt,sr){return Qt&&xp(Qt,al(sr,3))}function hI(Qt,sr){return Qt&&m_(Qt,al(sr,3))}function fI(Qt){return Qt==null?[]:g_(Qt,jy(Qt))}function Fw(Qt){return Qt==null?[]:g_(Qt,e_(Qt))}function jE(Qt,sr,Rr){var cn=Qt==null?tt:r0(Qt,sr);return cn===tt?Rr:cn}function Bw(Qt,sr){return Qt!=null&&g1(Qt,sr,Km)}function $E(Qt,sr){return Qt!=null&&g1(Qt,sr,F1)}var jw=Xx(function(Qt,sr,Rr){sr!=null&&typeof sr.toString!="function"&&(sr=cy.call(sr)),Qt[sr]=Rr},XE(O0)),iS=Xx(function(Qt,sr,Rr){sr!=null&&typeof sr.toString!="function"&&(sr=cy.call(sr)),Zu.call(Qt,sr)?Qt[sr].push(Rr):Qt[sr]=[Rr]},al),kT=Vl(C0);function jy(Qt){return o0(Qt)?dx(Qt):CS(Qt)}function e_(Qt){return o0(Qt)?dx(Qt,!0):dm(Qt)}function JA(Qt,sr){var Rr={};return sr=al(sr,3),xp(Qt,function(cn,Bn,ns){W0(Rr,sr(cn,Bn,ns),cn)}),Rr}function wy(Qt,sr){var Rr={};return sr=al(sr,3),xp(Qt,function(cn,Bn,ns){W0(Rr,Bn,sr(cn,Bn,ns))}),Rr}var CD=K0(function(Qt,sr,Rr){vy(Qt,sr,Rr)}),$w=K0(function(Qt,sr,Rr,cn){vy(Qt,sr,Rr,cn)}),OT=pl(function(Qt,sr){var Rr={};if(Qt==null)return Rr;var cn=!1;sr=_l(sr,function(ns){return ns=qy(ns,Qt),cn||(cn=ns.length>1),ns}),i0(Qt,Dv(Qt),Rr),cn&&(Rr=Py(Rr,St|Et|Ct,bx));for(var Bn=sr.length;Bn--;)U1(Rr,sr[Bn]);return Rr});function pI(Qt,sr){return Ty(Qt,zS(al(sr)))}var _g=pl(function(Qt,sr){return Qt==null?{}:cT(Qt,sr)});function Ty(Qt,sr){if(Qt==null)return{};var Rr=_l(Dv(Qt),function(cn){return[cn]});return sr=al(sr),l1(Qt,Rr,function(cn,Bn){return sr(cn,Bn[0])})}function UE(Qt,sr,Rr){sr=qy(sr,Qt);var cn=-1,Bn=sr.length;for(Bn||(Bn=1,Qt=tt);++cn<Bn;){var ns=Qt==null?tt:Qt[cv(sr[cn])];ns===tt&&(cn=Bn,ns=Rr),Qt=u0(ns)?ns.call(Qt):ns}return Qt}function DD(Qt,sr,Rr){return Qt==null?Qt:Wv(Qt,sr,Rr)}function Uw(Qt,sr,Rr,cn){return cn=typeof cn=="function"?cn:tt,Qt==null?Qt:Wv(Qt,sr,Rr,cn)}var eC=U_(jy),zE=U_(e_);function GE(Qt,sr,Rr){var cn=Ls(Qt),Bn=cn||Jx(Qt)||kw(Qt);if(sr=al(sr,4),Rr==null){var ns=Qt&&Qt.constructor;Bn?Rr=cn?new ns:[]:Mv(Qt)?Rr=u0(ns)?zr(My(Qt)):{}:Rr={}}return(Bn?Cl:xp)(Qt,function(Ds,Fs,ro){return sr(Rr,Ds,Fs,ro)}),Rr}function Z1(Qt,sr){return Qt==null?!0:U1(Qt,sr)}function mI(Qt,sr,Rr){return Qt==null?Qt:Wy(Qt,sr,mx(Rr))}function tC(Qt,sr,Rr,cn){return cn=typeof cn=="function"?cn:tt,Qt==null?Qt:Wy(Qt,sr,mx(Rr),cn)}function aS(Qt){return Qt==null?[]:$o(Qt,jy(Qt))}function gI(Qt){return Qt==null?[]:$o(Qt,e_(Qt))}function rC(Qt,sr,Rr){return Rr===tt&&(Rr=sr,sr=tt),Rr!==tt&&(Rr=l0(Rr),Rr=Rr===Rr?Rr:0),sr!==tt&&(sr=l0(sr),sr=sr===sr?sr:0),q1(l0(Qt),sr,Rr)}function vI(Qt,sr,Rr){return sr=K1(sr),Rr===tt?(Rr=sr,sr=0):Rr=K1(Rr),Qt=l0(Qt),TS(Qt,sr,Rr)}function Dx(Qt,sr,Rr){if(Rr&&typeof Rr!="boolean"&&ym(Qt,sr,Rr)&&(sr=Rr=tt),Rr===tt&&(typeof sr=="boolean"?(Rr=sr,sr=tt):typeof Qt=="boolean"&&(Rr=Qt,Qt=tt)),Qt===tt&&sr===tt?(Qt=0,sr=1):(Qt=K1(Qt),sr===tt?(sr=Qt,Qt=0):sr=K1(sr)),Qt>sr){var cn=Qt;Qt=sr,sr=cn}if(Rr||Qt%1||sr%1){var Bn=Nm();return gm(Qt+Bn*(sr-Qt+xm("1e-"+((Bn+"").length-1))),sr)}return hw(Qt,sr)}var qT=vx(function(Qt,sr,Rr){return sr=sr.toLowerCase(),Qt+(Rr?zw(sr):sr)});function zw(Qt){return Vw(Ip(Qt).toLowerCase())}function nC(Qt){return Qt=Ip(Qt),Qt&&Qt.replace(ss,Ru).replace(_c,"")}function MD(Qt,sr,Rr){Qt=Ip(Qt),sr=sm(sr);var cn=Qt.length;Rr=Rr===tt?cn:q1(Xc(Rr),0,cn);var Bn=Rr;return Rr-=sr.length,Rr>=0&&Qt.slice(Rr,Bn)==sr}function ID(Qt){return Qt=Ip(Qt),Qt&&ds.test(Qt)?Qt.replace(En,ku):Qt}function RD(Qt){return Qt=Ip(Qt),Qt&&du.test(Qt)?Qt.replace(ru,"\\$&"):Qt}var yI=vx(function(Qt,sr,Rr){return Qt+(Rr?"-":"")+sr.toLowerCase()}),Gw=vx(function(Qt,sr,Rr){return Qt+(Rr?" ":"")+sr.toLowerCase()}),bI=Ep("toLowerCase");function PD(Qt,sr,Rr){Qt=Ip(Qt),sr=Xc(sr);var cn=sr?Rl(Qt):0;if(!sr||cn>=sr)return Qt;var Bn=(sr-cn)/2;return Yx(hy(Bn),Rr)+Qt+Yx(dy(Bn),Rr)}function _I(Qt,sr,Rr){Qt=Ip(Qt),sr=Xc(sr);var cn=sr?Rl(Qt):0;return sr&&cn<sr?Qt+Yx(sr-cn,Rr):Qt}function VE(Qt,sr,Rr){Qt=Ip(Qt),sr=Xc(sr);var cn=sr?Rl(Qt):0;return sr&&cn<sr?Yx(sr-cn,Rr)+Qt:Qt}function iC(Qt,sr,Rr){return Rr||sr==null?sr=0:sr&&(sr=+sr),G0(Ip(Qt).replace(Iu,""),sr||0)}function LT(Qt,sr,Rr){return(Rr?ym(Qt,sr,Rr):sr===tt)?sr=1:sr=Xc(sr),$m(Ip(Qt),sr)}function aC(){var Qt=arguments,sr=Ip(Qt[0]);return Qt.length<3?sr:sr.replace(Qt[1],Qt[2])}var FT=vx(function(Qt,sr,Rr){return Qt+(Rr?"_":"")+sr.toLowerCase()});function HE(Qt,sr,Rr){return Rr&&typeof Rr!="number"&&ym(Qt,sr,Rr)&&(sr=Rr=tt),Rr=Rr===tt?Er:Rr>>>0,Rr?(Qt=Ip(Qt),Qt&&(typeof sr=="string"||sr!=null&&!FE(sr))&&(sr=sm(sr),!sr&&nu(Qt))?B_(hl(Qt),0,Rr):Qt.split(sr,Rr)):[]}var xI=vx(function(Qt,sr,Rr){return Qt+(Rr?" ":"")+Vw(sr)});function Mx(Qt,sr,Rr){return Qt=Ip(Qt),Rr=Rr==null?0:q1(Xc(Rr),0,Qt.length),sr=sm(sr),Qt.slice(Rr,Rr+sr.length)==sr}function ND(Qt,sr,Rr){var cn=br.templateSettings;Rr&&ym(Qt,sr,Rr)&&(sr=tt),Qt=Ip(Qt),sr=GS({},sr,cn,Lv);var Bn=GS({},sr.imports,cn.imports,Lv),ns=jy(Bn),Ds=$o(Bn,ns),Fs,ro,Go=0,Uo=sr.interpolate||ga,tu="__p += '",Su=Pm((sr.escape||ga).source+"|"+Uo.source+"|"+(Uo===rn?uu:ga).source+"|"+(sr.evaluate||ga).source+"|$","g"),qu="//# sourceURL="+(Zu.call(sr,"sourceURL")?(sr.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lm+"]")+`
`;Qt.replace(Su,function(Tl,ep,Rp,S_,Yy,fm){return Rp||(Rp=S_),tu+=Qt.slice(Go,fm).replace(Ns,Vu),ep&&(Fs=!0,tu+=`' +
__e(`+ep+`) +
'`),Yy&&(ro=!0,tu+=`';
`+Yy+`;
__p += '`),Rp&&(tu+=`' +
((__t = (`+Rp+`)) == null ? '' : __t) +
'`),Go=fm+Tl.length,Tl}),tu+=`';
`;var xl=Zu.call(sr,"variable")&&sr.variable;if(!xl)tu=`with (obj) {
`+tu+`
}
`;else if(Lu.test(xl))throw new Qu(ft);tu=(ro?tu.replace(Rs,""):tu).replace(io,"$1").replace(vo,"$1;"),tu="function("+(xl||"obj")+`) {
`+(xl?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Fs?", __e = _.escape":"")+(ro?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+tu+`return __p
}`;var Kl=oC(function(){return jl(ns,qu+"return "+tu).apply(tt,Ds)});if(Kl.source=tu,LE(Kl))throw Kl;return Kl}function WE(Qt){return Ip(Qt).toLowerCase()}function SI(Qt){return Ip(Qt).toUpperCase()}function k0(Qt,sr,Rr){if(Qt=Ip(Qt),Qt&&(Rr||sr===tt))return po(Qt);if(!Qt||!(sr=sm(sr)))return Qt;var cn=hl(Qt),Bn=hl(sr),ns=au(cn,Bn),Ds=ou(cn,Bn)+1;return B_(cn,ns,Ds).join("")}function c0(Qt,sr,Rr){if(Qt=Ip(Qt),Qt&&(Rr||sr===tt))return Qt.slice(0,hp(Qt)+1);if(!Qt||!(sr=sm(sr)))return Qt;var cn=hl(Qt),Bn=ou(cn,hl(sr))+1;return B_(cn,0,Bn).join("")}function sC(Qt,sr,Rr){if(Qt=Ip(Qt),Qt&&(Rr||sr===tt))return Qt.replace(Iu,"");if(!Qt||!(sr=sm(sr)))return Qt;var cn=hl(Qt),Bn=au(cn,hl(sr));return B_(cn,Bn).join("")}function kD(Qt,sr){var Rr=Ut,cn=Ot;if(Mv(sr)){var Bn="separator"in sr?sr.separator:Bn;Rr="length"in sr?Xc(sr.length):Rr,cn="omission"in sr?sm(sr.omission):cn}Qt=Ip(Qt);var ns=Qt.length;if(nu(Qt)){var Ds=hl(Qt);ns=Ds.length}if(Rr>=ns)return Qt;var Fs=Rr-Rl(cn);if(Fs<1)return cn;var ro=Ds?B_(Ds,0,Fs).join(""):Qt.slice(0,Fs);if(Bn===tt)return ro+cn;if(Ds&&(Fs+=ro.length-Fs),FE(Bn)){if(Qt.slice(Fs).search(Bn)){var Go,Uo=ro;for(Bn.global||(Bn=Pm(Bn.source,Ip(en.exec(Bn))+"g")),Bn.lastIndex=0;Go=Bn.exec(Uo);)var tu=Go.index;ro=ro.slice(0,tu===tt?Fs:tu)}}else if(Qt.indexOf(sm(Bn),Fs)!=Fs){var Su=ro.lastIndexOf(Bn);Su>-1&&(ro=ro.slice(0,Su))}return ro+cn}function wI(Qt){return Qt=Ip(Qt),Qt&&In.test(Qt)?Qt.replace(Bo,Cp):Qt}var OD=vx(function(Qt,sr,Rr){return Qt+(Rr?" ":"")+sr.toUpperCase()}),Vw=Ep("toUpperCase");function VS(Qt,sr,Rr){return Qt=Ip(Qt),sr=Rr?tt:sr,sr===tt?fu(Qt)?fp(Qt):bv(Qt):Qt.match(sr)||[]}var oC=Vl(function(Qt,sr){try{return _d(Qt,tt,sr)}catch(Rr){return LE(Rr)?Rr:new Qu(Rr)}}),TI=pl(function(Qt,sr){return Cl(sr,function(Rr){Rr=cv(Rr),W0(Qt,Rr,AT(Qt[Rr],Qt))}),Qt});function qD(Qt){var sr=Qt==null?0:Qt.length,Rr=al();return Qt=sr?_l(Qt,function(cn){if(typeof cn[1]!="function")throw new _v(dt);return[Rr(cn[0]),cn[1]]}):[],Vl(function(cn){for(var Bn=-1;++Bn<sr;){var ns=Qt[Bn];if(_d(ns[0],this,cn))return _d(ns[1],this,cn)}})}function EI(Qt){return d_(Py(Qt,St))}function XE(Qt){return function(){return Qt}}function LD(Qt,sr){return Qt==null||Qt!==Qt?sr:Qt}var FD=NS(),uC=NS(!0);function O0(Qt){return Qt}function YE(Qt){return AS(typeof Qt=="function"?Qt:Py(Qt,St))}function lC(Qt){return j1(Py(Qt,St))}function cC(Qt,sr){return Am(Qt,Py(sr,St))}var BD=Vl(function(Qt,sr){return function(Rr){return C0(Rr,Qt,sr)}}),dC=Vl(function(Qt,sr){return function(Rr){return C0(Qt,Rr,sr)}});function QE(Qt,sr,Rr){var cn=jy(sr),Bn=g_(sr,cn);Rr==null&&!(Mv(sr)&&(Bn.length||!cn.length))&&(Rr=sr,sr=Qt,Qt=this,Bn=g_(sr,jy(sr)));var ns=!(Mv(Rr)&&"chain"in Rr)||!!Rr.chain,Ds=u0(Qt);return Cl(Bn,function(Fs){var ro=sr[Fs];Qt[Fs]=ro,Ds&&(Qt.prototype[Fs]=function(){var Go=this.__chain__;if(ns||Go){var Uo=Qt(this.__wrapped__),tu=Uo.__actions__=_y(this.__actions__);return tu.push({func:ro,args:arguments,thisArg:Qt}),Uo.__chain__=Go,Uo}return ro.apply(Qt,Wp([this.value()],arguments))})}),Qt}function hC(){return Lp._===this&&(Lp._=vp),this}function BT(){}function jD(Qt){return Qt=Xc(Qt),Vl(function(sr){return dw(sr,Qt)})}var $D=Um(_l),UD=Um(zv),jT=Um(np);function KE(Qt){return hm(Qt)?bn(cv(Qt)):c1(Qt)}function Hw(Qt){return function(sr){return Qt==null?tt:r0(Qt,sr)}}var fC=Ly(),zD=Ly(!0);function W_(){return[]}function pC(){return!1}function GD(){return{}}function mC(){return""}function AI(){return!0}function gC(Qt,sr){if(Qt=Xc(Qt),Qt<1||Qt>cr)return[];var Rr=Er,cn=gm(Qt,Er);sr=al(sr),Qt-=Er;for(var Bn=ao(cn,sr);++Rr<Qt;)sr(Rr);return Bn}function $T(Qt){return Ls(Qt)?_l(Qt,cv):km(Qt)?[Qt]:_y(H1(Ip(Qt)))}function vC(Qt){var sr=++N_;return Ip(Qt)+sr}var VD=yx(function(Qt,sr){return Qt+sr},0),Ww=bl("ceil"),yC=yx(function(Qt,sr){return Qt/sr},1),HD=bl("floor");function bC(Qt){return Qt&&Qt.length?L1(Qt,O0,v_):tt}function WD(Qt,sr){return Qt&&Qt.length?L1(Qt,al(sr,2),v_):tt}function _C(Qt){return Hr(Qt,O0)}function Xw(Qt,sr){return Hr(Qt,al(sr,2))}function XD(Qt){return Qt&&Qt.length?L1(Qt,O0,D0):tt}function ZE(Qt,sr){return Qt&&Qt.length?L1(Qt,al(sr,2),D0):tt}var xC=yx(function(Qt,sr){return Qt*sr},1),JE=bl("round"),YD=yx(function(Qt,sr){return Qt-sr},0);function Ix(Qt){return Qt&&Qt.length?Es(Qt,O0):0}function SC(Qt,sr){return Qt&&Qt.length?Es(Qt,al(sr,2)):0}return br.after=JM,br.ary=GA,br.assign=QA,br.assignIn=KA,br.assignInWith=GS,br.assignWith=lI,br.at=Cx,br.before=NE,br.bind=AT,br.bindAll=TI,br.bindKey=CT,br.castArray=ap,br.chain=_T,br.chunk=_E,br.compact=G_,br.concat=gT,br.cond=qD,br.conforms=EI,br.constant=XE,br.countBy=uD,br.create=Ow,br.curry=VA,br.curryRight=kE,br.debounce=X1,br.defaults=cI,br.defaultsDeep=ED,br.defer=Pw,br.delay=Nw,br.difference=_w,br.differenceBy=xE,br.differenceWith=SE,br.drop=b_,br.dropRight=$S,br.dropRightWhile=OA,br.dropWhile=Sx,br.fill=xw,br.filter=lD,br.flatMap=CE,br.flatMapDeep=BA,br.flatMapDepth=cD,br.flatten=ww,br.flattenDeep=qA,br.flattenDepth=wE,br.flip=HA,br.flow=FD,br.flowRight=uC,br.fromPairs=W1,br.functions=fI,br.functionsIn=Fw,br.groupBy=dD,br.initial=Ew,br.intersection=Aw,br.intersectionBy=TE,br.intersectionWith=yT,br.invert=jw,br.invertBy=iS,br.invokeMap=hD,br.iteratee=YE,br.keyBy=fD,br.keys=jy,br.keysIn=e_,br.map=Mw,br.mapKeys=JA,br.mapValues=wy,br.matches=lC,br.matchesProperty=cC,br.memoize=DT,br.merge=CD,br.mergeWith=$w,br.method=BD,br.methodOf=dC,br.mixin=QE,br.negate=zS,br.nthArg=jD,br.omit=OT,br.omitBy=pI,br.once=zm,br.orderBy=Iw,br.over=$D,br.overArgs=Y1,br.overEvery=UD,br.overSome=jT,br.partial=Ex,br.partialRight=gD,br.partition=pD,br.pick=_g,br.pickBy=Ty,br.property=KE,br.propertyOf=Hw,br.pull=Cw,br.pullAll=Ho,br.pullAllBy=Fy,br.pullAllWith=Gt,br.pullAt=er,br.range=fC,br.rangeRight=zD,br.rearg=OE,br.reject=zA,br.remove=hr,br.rest=eI,br.reverse=Fr,br.sampleSize=RE,br.set=DD,br.setWith=Uw,br.shuffle=PE,br.slice=nn,br.sortBy=ET,br.sortedUniq=Bu,br.sortedUniqBy=_f,br.split=HE,br.spread=Q1,br.tail=zp,br.take=s0,br.takeRight=Xv,br.takeRightWhile=ho,br.takeWhile=Zs,br.tap=iD,br.throttle=vD,br.thru=wx,br.toArray=XA,br.toPairs=eC,br.toPairsIn=zE,br.toPath=$T,br.toPlainObject=YA,br.transform=GE,br.unary=MT,br.union=No,br.unionBy=iu,br.unionWith=wu,br.uniq=ju,br.uniqBy=ml,br.uniqWith=Mp,br.unset=Z1,br.unzip=Cm,br.unzipWith=Wl,br.update=mI,br.updateWith=tC,br.values=aS,br.valuesIn=gI,br.without=x1,br.words=VS,br.wrap=Dm,br.xor=EE,br.xorBy=tD,br.xorWith=rD,br.zip=US,br.zipObject=nD,br.zipObjectDeep=ql,br.zipWith=LA,br.entries=eC,br.entriesIn=zE,br.extend=KA,br.extendWith=GS,QE(br,br),br.add=VD,br.attempt=oC,br.camelCase=qT,br.capitalize=zw,br.ceil=Ww,br.clamp=rC,br.clone=ol,br.cloneDeep=yD,br.cloneDeepWith=WA,br.cloneWith=qE,br.conformsTo=tI,br.deburr=nC,br.defaultTo=LD,br.divide=yC,br.endsWith=MD,br.eq=_b,br.escape=ID,br.escapeRegExp=RD,br.every=ST,br.find=dv,br.findIndex=V_,br.findKey=qw,br.findLast=__,br.findLastIndex=Sw,br.findLastKey=ZA,br.floor=HD,br.forEach=jA,br.forEachRight=$A,br.forIn=Lw,br.forInRight=AD,br.forOwn=dI,br.forOwnRight=hI,br.get=jE,br.gt=S1,br.gte=Ll,br.has=Bw,br.hasIn=$E,br.head=vT,br.identity=O0,br.includes=UA,br.indexOf=Tw,br.inRange=vI,br.invoke=kT,br.isArguments=Zm,br.isArray=Ls,br.isArrayBuffer=By,br.isArrayLike=o0,br.isArrayLikeObject=Jm,br.isBoolean=rI,br.isBuffer=Jx,br.isDate=bD,br.isElement=wb,br.isEmpty=IT,br.isEqual=nI,br.isEqualWith=eS,br.isError=LE,br.isFinite=tS,br.isFunction=u0,br.isInteger=RT,br.isLength=Ax,br.isMap=PT,br.isMatch=iI,br.isMatchWith=aI,br.isNaN=sI,br.isNative=oI,br.isNil=uI,br.isNull=_D,br.isNumber=xD,br.isObject=Mv,br.isObjectLike=Fv,br.isPlainObject=rS,br.isRegExp=FE,br.isSafeInteger=x_,br.isSet=NT,br.isString=P0,br.isSymbol=km,br.isTypedArray=kw,br.isUndefined=SD,br.isWeakMap=wD,br.isWeakSet=TD,br.join=bT,br.kebabCase=yI,br.last=iy,br.lastIndexOf=cl,br.lowerCase=Gw,br.lowerFirst=bI,br.lt=H_,br.lte=nS,br.max=bC,br.maxBy=WD,br.mean=_C,br.meanBy=Xw,br.min=XD,br.minBy=ZE,br.stubArray=W_,br.stubFalse=pC,br.stubObject=GD,br.stubString=mC,br.stubTrue=AI,br.multiply=xC,br.nth=Ol,br.noConflict=hC,br.noop=BT,br.now=Rw,br.pad=PD,br.padEnd=_I,br.padStart=VE,br.parseInt=iC,br.random=Dx,br.reduce=wT,br.reduceRight=DE,br.repeat=LT,br.replace=aC,br.result=UE,br.round=JE,br.runInContext=Bs,br.sample=ME,br.size=TT,br.snakeCase=FT,br.some=mD,br.sortedIndex=zn,br.sortedIndexBy=_i,br.sortedIndexOf=As,br.sortedLastIndex=ps,br.sortedLastIndexBy=xo,br.sortedLastIndexOf=Pu,br.startCase=xI,br.startsWith=Mx,br.subtract=YD,br.sum=Ix,br.sumBy=SC,br.template=ND,br.times=gC,br.toFinite=K1,br.toInteger=Xc,br.toLength=N0,br.toLower=WE,br.toNumber=l0,br.toSafeInteger=BE,br.toString=Ip,br.toUpper=SI,br.trim=k0,br.trimEnd=c0,br.trimStart=sC,br.truncate=kD,br.unescape=wI,br.uniqueId=vC,br.upperCase=OD,br.upperFirst=Vw,br.each=jA,br.eachRight=$A,br.first=vT,QE(br,(function(){var Qt={};return xp(br,function(sr,Rr){Zu.call(br.prototype,Rr)||(Qt[Rr]=sr)}),Qt})(),{chain:!1}),br.VERSION=rt,Cl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(Qt){br[Qt].placeholder=br}),Cl(["drop","take"],function(Qt,sr){yn.prototype[Qt]=function(Rr){Rr=Rr===tt?1:Pl(Xc(Rr),0);var cn=this.__filtered__&&!sr?new yn(this):this.clone();return cn.__filtered__?cn.__takeCount__=gm(Rr,cn.__takeCount__):cn.__views__.push({size:gm(Rr,Er),type:Qt+(cn.__dir__<0?"Right":"")}),cn},yn.prototype[Qt+"Right"]=function(Rr){return this.reverse()[Qt](Rr).reverse()}}),Cl(["filter","map","takeWhile"],function(Qt,sr){var Rr=sr+1,cn=Rr==tr||Rr==ar;yn.prototype[Qt]=function(Bn){var ns=this.clone();return ns.__iteratees__.push({iteratee:al(Bn,3),type:Rr}),ns.__filtered__=ns.__filtered__||cn,ns}}),Cl(["head","last"],function(Qt,sr){var Rr="take"+(sr?"Right":"");yn.prototype[Qt]=function(){return this[Rr](1).value()[0]}}),Cl(["initial","tail"],function(Qt,sr){var Rr="drop"+(sr?"":"Right");yn.prototype[Qt]=function(){return this.__filtered__?new yn(this):this[Rr](1)}}),yn.prototype.compact=function(){return this.filter(O0)},yn.prototype.find=function(Qt){return this.filter(Qt).head()},yn.prototype.findLast=function(Qt){return this.reverse().find(Qt)},yn.prototype.invokeMap=Vl(function(Qt,sr){return typeof Qt=="function"?new yn(this):this.map(function(Rr){return C0(Rr,Qt,sr)})}),yn.prototype.reject=function(Qt){return this.filter(zS(al(Qt)))},yn.prototype.slice=function(Qt,sr){Qt=Xc(Qt);var Rr=this;return Rr.__filtered__&&(Qt>0||sr<0)?new yn(Rr):(Qt<0?Rr=Rr.takeRight(-Qt):Qt&&(Rr=Rr.drop(Qt)),sr!==tt&&(sr=Xc(sr),Rr=sr<0?Rr.dropRight(-sr):Rr.take(sr-Qt)),Rr)},yn.prototype.takeRightWhile=function(Qt){return this.reverse().takeWhile(Qt).reverse()},yn.prototype.toArray=function(){return this.take(Er)},xp(yn.prototype,function(Qt,sr){var Rr=/^(?:filter|find|map|reject)|While$/.test(sr),cn=/^(?:head|last)$/.test(sr),Bn=br[cn?"take"+(sr=="last"?"Right":""):sr],ns=cn||/^find/.test(sr);Bn&&(br.prototype[sr]=function(){var Ds=this.__wrapped__,Fs=cn?[1]:arguments,ro=Ds instanceof yn,Go=Fs[0],Uo=ro||Ls(Ds),tu=function(ep){var Rp=Bn.apply(br,Wp([ep],Fs));return cn&&Su?Rp[0]:Rp};Uo&&Rr&&typeof Go=="function"&&Go.length!=1&&(ro=Uo=!1);var Su=this.__chain__,qu=!!this.__actions__.length,xl=ns&&!Su,Kl=ro&&!qu;if(!ns&&Uo){Ds=Kl?Ds:new yn(this);var Tl=Qt.apply(Ds,Fs);return Tl.__actions__.push({func:wx,args:[tu],thisArg:tt}),new an(Tl,Su)}return xl&&Kl?Qt.apply(this,Fs):(Tl=this.thru(tu),xl?cn?Tl.value()[0]:Tl.value():Tl)})}),Cl(["pop","push","shift","sort","splice","unshift"],function(Qt){var sr=gp[Qt],Rr=/^(?:push|sort|unshift)$/.test(Qt)?"tap":"thru",cn=/^(?:pop|shift)$/.test(Qt);br.prototype[Qt]=function(){var Bn=arguments;if(cn&&!this.__chain__){var ns=this.value();return sr.apply(Ls(ns)?ns:[],Bn)}return this[Rr](function(Ds){return sr.apply(Ls(Ds)?Ds:[],Bn)})}}),xp(yn.prototype,function(Qt,sr){var Rr=br[sr];if(Rr){var cn=Rr.name+"";Zu.call(vm,cn)||(vm[cn]=[]),vm[cn].push({name:sr,func:Rr})}}),vm[p1(tt,At).name]=[{name:"wrapper",func:tt}],yn.prototype.clone=as,yn.prototype.reverse=hs,yn.prototype.value=ys,br.prototype.at=FA,br.prototype.chain=AE,br.prototype.commit=aD,br.prototype.next=sD,br.prototype.plant=Dw,br.prototype.reverse=oD,br.prototype.toJSON=br.prototype.valueOf=br.prototype.value=xT,br.prototype.first=br.prototype.head,pp&&(br.prototype[pp]=Tx),br}),ip=Jy();nv?((nv.exports=ip)._=ip,cp._=ip):Lp._=ip}).call(lodash)})(lodash$1,lodash$1.exports)),lodash$1.exports}var lodashExports=requireLodash(),window_1,hasRequiredWindow;function requireWindow(){if(hasRequiredWindow)return window_1;hasRequiredWindow=1;var et;return typeof window<"u"?et=window:typeof commonjsGlobal<"u"?et=commonjsGlobal:typeof self<"u"?et=self:et={},window_1=et,window_1}var windowExports=requireWindow();const window$1=getDefaultExportFromCjs(windowExports);var document_1,hasRequiredDocument;function requireDocument(){if(hasRequiredDocument)return document_1;hasRequiredDocument=1;var et=typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:{},_e=require$$0,tt;return typeof document<"u"?tt=document:(tt=et["__GLOBAL_DOCUMENT_CACHE@4"],tt||(tt=et["__GLOBAL_DOCUMENT_CACHE@4"]=_e)),document_1=tt,document_1}var documentExports=requireDocument();const document$1=getDefaultExportFromCjs(documentExports);var lib$1={exports:{}},isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1,isFunction_1=_e;var et=Object.prototype.toString;function _e(tt){if(!tt)return!1;var rt=et.call(tt);return rt==="[object Function]"||typeof tt=="function"&&rt!=="[object RegExp]"||typeof window<"u"&&(tt===window.setTimeout||tt===window.alert||tt===window.confirm||tt===window.prompt)}return isFunction_1}var interceptors,hasRequiredInterceptors;function requireInterceptors(){if(hasRequiredInterceptors)return interceptors;hasRequiredInterceptors=1;function et(nt,st){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(dt)return(dt=dt.call(nt)).next.bind(dt);if(Array.isArray(nt)||(dt=_e(nt))||st){dt&&(nt=dt);var ft=0;return function(){return ft>=nt.length?{done:!0}:{done:!1,value:nt[ft++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _e(nt,st){if(nt){if(typeof nt=="string")return tt(nt,st);var dt=Object.prototype.toString.call(nt).slice(8,-1);if(dt==="Object"&&nt.constructor&&(dt=nt.constructor.name),dt==="Map"||dt==="Set")return Array.from(nt);if(dt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(dt))return tt(nt,st)}}function tt(nt,st){(st==null||st>nt.length)&&(st=nt.length);for(var dt=0,ft=new Array(st);dt<st;dt++)ft[dt]=nt[dt];return ft}var rt=(function(){function nt(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var st=nt.prototype;return st.getIsEnabled=function(){return this.enabled_},st.enable=function(){this.enabled_=!0},st.disable=function(){this.enabled_=!1},st.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},st.addInterceptor=function(ft,ht){this.typeToInterceptorsMap_.has(ft)||this.typeToInterceptorsMap_.set(ft,new Set);var mt=this.typeToInterceptorsMap_.get(ft);return mt.has(ht)?!1:(mt.add(ht),!0)},st.removeInterceptor=function(ft,ht){var mt=this.typeToInterceptorsMap_.get(ft);return mt&&mt.has(ht)?(mt.delete(ht),!0):!1},st.clearInterceptorsByType=function(ft){var ht=this.typeToInterceptorsMap_.get(ft);return ht?(this.typeToInterceptorsMap_.delete(ft),this.typeToInterceptorsMap_.set(ft,new Set),!0):!1},st.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},st.getForType=function(ft){return this.typeToInterceptorsMap_.get(ft)||new Set},st.execute=function(ft,ht){for(var mt=this.getForType(ft),bt=et(mt),St;!(St=bt()).done;){var Et=St.value;try{ht=Et(ht)}catch{}}return ht},nt})();return interceptors=rt,interceptors}var retry,hasRequiredRetry;function requireRetry(){if(hasRequiredRetry)return retry;hasRequiredRetry=1;var et=(function(){function tt(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var rt=tt.prototype;return rt.getIsEnabled=function(){return this.enabled_},rt.enable=function(){this.enabled_=!0},rt.disable=function(){this.enabled_=!1},rt.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},rt.getMaxAttempts=function(){return this.maxAttempts_},rt.setMaxAttempts=function(st){this.maxAttempts_=st},rt.getDelayFactor=function(){return this.delayFactor_},rt.setDelayFactor=function(st){this.delayFactor_=st},rt.getFuzzFactor=function(){return this.fuzzFactor_},rt.setFuzzFactor=function(st){this.fuzzFactor_=st},rt.getInitialDelay=function(){return this.initialDelay_},rt.setInitialDelay=function(st){this.initialDelay_=st},rt.createRetry=function(st){var dt=st===void 0?{}:st,ft=dt.maxAttempts,ht=dt.delayFactor,mt=dt.fuzzFactor,bt=dt.initialDelay;return new _e({maxAttempts:ft||this.maxAttempts_,delayFactor:ht||this.delayFactor_,fuzzFactor:mt||this.fuzzFactor_,initialDelay:bt||this.initialDelay_})},tt})(),_e=(function(){function tt(nt){this.maxAttempts_=nt.maxAttempts,this.delayFactor_=nt.delayFactor,this.fuzzFactor_=nt.fuzzFactor,this.currentDelay_=nt.initialDelay,this.currentAttempt_=1}var rt=tt.prototype;return rt.moveToNextAttempt=function(){this.currentAttempt_++;var st=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+st},rt.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},rt.getCurrentDelay=function(){return this.currentDelay_},rt.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},rt.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},rt.getCurrentFuzzedDelay=function(){var st=this.getCurrentMinPossibleDelay(),dt=this.getCurrentMaxPossibleDelay();return st+Math.random()*(dt-st)},tt})();return retry=et,retry}var httpHandler,hasRequiredHttpHandler;function requireHttpHandler(){if(hasRequiredHttpHandler)return httpHandler;hasRequiredHttpHandler=1;var et=requireWindow(),_e=function(nt,st){return st===void 0&&(st=!1),function(dt,ft,ht){if(dt){nt(dt);return}if(ft.statusCode>=400&&ft.statusCode<=599){var mt=ht;if(st)if(et.TextDecoder){var bt=tt(ft.headers&&ft.headers["content-type"]);try{mt=new TextDecoder(bt).decode(ht)}catch{}}else mt=String.fromCharCode.apply(null,new Uint8Array(ht));nt({cause:mt});return}nt(null,ht)}};function tt(rt){return rt===void 0&&(rt=""),rt.toLowerCase().split(";").reduce(function(nt,st){var dt=st.split("="),ft=dt[0],ht=dt[1];return ft.trim()==="charset"?ht.trim():nt},"utf-8")}return httpHandler=_e,httpHandler}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1.exports;hasRequiredLib$1=1;var et=requireWindow(),_e=require_extends(),tt=requireIsFunction(),rt=requireInterceptors(),nt=requireRetry();mt.httpHandler=requireHttpHandler(),mt.requestInterceptorsStorage=new rt,mt.responseInterceptorsStorage=new rt,mt.retryManager=new nt;/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/var st=function(Rt){var Tt={};return Rt&&Rt.trim().split(`
`).forEach(function(wt){var At=wt.indexOf(":"),Nt=wt.slice(0,At).trim().toLowerCase(),Pt=wt.slice(At+1).trim();typeof Tt[Nt]>"u"?Tt[Nt]=Pt:Array.isArray(Tt[Nt])?Tt[Nt].push(Pt):Tt[Nt]=[Tt[Nt],Pt]}),Tt};lib$1.exports=mt,lib$1.exports.default=mt,mt.XMLHttpRequest=et.XMLHttpRequest||Et,mt.XDomainRequest="withCredentials"in new mt.XMLHttpRequest?mt.XMLHttpRequest:et.XDomainRequest,dt(["get","put","post","patch","head","delete"],function(Ct){mt[Ct==="delete"?"del":Ct]=function(Rt,Tt,wt){return Tt=ht(Rt,Tt,wt),Tt.method=Ct.toUpperCase(),bt(Tt)}});function dt(Ct,Rt){for(var Tt=0;Tt<Ct.length;Tt++)Rt(Ct[Tt])}function ft(Ct){for(var Rt in Ct)if(Ct.hasOwnProperty(Rt))return!1;return!0}function ht(Ct,Rt,Tt){var wt=Ct;return tt(Rt)?(Tt=Rt,typeof Ct=="string"&&(wt={uri:Ct})):wt=_e({},Rt,{uri:Ct}),wt.callback=Tt,wt}function mt(Ct,Rt,Tt){return Rt=ht(Ct,Rt,Tt),bt(Rt)}function bt(Ct){if(typeof Ct.callback>"u")throw new Error("callback argument missing");if(Ct.requestType&&mt.requestInterceptorsStorage.getIsEnabled()){var Rt={uri:Ct.uri||Ct.url,headers:Ct.headers||{},body:Ct.body,metadata:Ct.metadata||{},retry:Ct.retry,timeout:Ct.timeout},Tt=mt.requestInterceptorsStorage.execute(Ct.requestType,Rt);Ct.uri=Tt.uri,Ct.headers=Tt.headers,Ct.body=Tt.body,Ct.metadata=Tt.metadata,Ct.retry=Tt.retry,Ct.timeout=Tt.timeout}var wt=!1,At=function(cr,gr,Sr){wt||(wt=!0,Ct.callback(cr,gr,Sr))};function Nt(){qt.readyState===4&&!mt.responseInterceptorsStorage.getIsEnabled()&&setTimeout(Ft,0)}function Pt(){var pr=void 0;if(qt.response?pr=qt.response:pr=qt.responseText||St(qt),tr)try{pr=JSON.parse(pr)}catch{}return pr}function It(pr){if(clearTimeout(Jt),clearTimeout(Ct.retryTimeout),pr instanceof Error||(pr=new Error(""+(pr||"Unknown XMLHttpRequest Error"))),pr.statusCode=0,!Kt&&mt.retryManager.getIsEnabled()&&Ct.retry&&Ct.retry.shouldRetry()){Ct.retryTimeout=setTimeout(function(){Ct.retry.moveToNextAttempt(),Ct.xhr=qt,bt(Ct)},Ct.retry.getCurrentFuzzedDelay());return}if(Ct.requestType&&mt.responseInterceptorsStorage.getIsEnabled()){var cr={headers:ar.headers||{},body:ar.body,responseUrl:qt.responseURL,responseType:qt.responseType},gr=mt.responseInterceptorsStorage.execute(Ct.requestType,cr);ar.body=gr.body,ar.headers=gr.headers}return At(pr,ar)}function Ft(){if(!Kt){var pr;clearTimeout(Jt),clearTimeout(Ct.retryTimeout),Ct.useXDR&&qt.status===void 0?pr=200:pr=qt.status===1223?204:qt.status;var cr=ar,gr=null;if(pr!==0?(cr={body:Pt(),statusCode:pr,method:Ut,headers:{},url:jt,rawRequest:qt},qt.getAllResponseHeaders&&(cr.headers=st(qt.getAllResponseHeaders()))):gr=new Error("Internal XMLHttpRequest Error"),Ct.requestType&&mt.responseInterceptorsStorage.getIsEnabled()){var Sr={headers:cr.headers||{},body:cr.body,responseUrl:qt.responseURL,responseType:qt.responseType},Er=mt.responseInterceptorsStorage.execute(Ct.requestType,Sr);cr.body=Er.body,cr.headers=Er.headers}return At(gr,cr,cr.body)}}var qt=Ct.xhr||null;qt||(Ct.cors||Ct.useXDR?qt=new mt.XDomainRequest:qt=new mt.XMLHttpRequest);var Vt,Kt,jt=qt.url=Ct.uri||Ct.url,Ut=qt.method=Ct.method||"GET",Ot=Ct.body||Ct.data,Wt=qt.headers=Ct.headers||{},Bt=!!Ct.sync,tr=!1,Jt,ar={body:void 0,headers:{},statusCode:0,method:Ut,url:jt,rawRequest:qt};if("json"in Ct&&Ct.json!==!1&&(tr=!0,Wt.accept||Wt.Accept||(Wt.Accept="application/json"),Ut!=="GET"&&Ut!=="HEAD"&&(Wt["content-type"]||Wt["Content-Type"]||(Wt["Content-Type"]="application/json"),Ot=JSON.stringify(Ct.json===!0?Ot:Ct.json))),qt.onreadystatechange=Nt,qt.onload=Ft,qt.onerror=It,qt.onprogress=function(){},qt.onabort=function(){Kt=!0,clearTimeout(Ct.retryTimeout)},qt.ontimeout=It,qt.open(Ut,jt,!Bt,Ct.username,Ct.password),Bt||(qt.withCredentials=!!Ct.withCredentials),!Bt&&Ct.timeout>0&&(Jt=setTimeout(function(){if(!Kt){Kt=!0,qt.abort("timeout");var pr=new Error("XMLHttpRequest timeout");pr.code="ETIMEDOUT",It(pr)}},Ct.timeout)),qt.setRequestHeader)for(Vt in Wt)Wt.hasOwnProperty(Vt)&&qt.setRequestHeader(Vt,Wt[Vt]);else if(Ct.headers&&!ft(Ct.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in Ct&&(qt.responseType=Ct.responseType),"beforeSend"in Ct&&typeof Ct.beforeSend=="function"&&Ct.beforeSend(qt),qt.send(Ot||null),qt}function St(Ct){try{if(Ct.responseType==="document")return Ct.responseXML;var Rt=Ct.responseXML&&Ct.responseXML.documentElement.nodeName==="parsererror";if(Ct.responseType===""&&!Rt)return Ct.responseXML}catch{}return null}function Et(){}return lib$1.exports}var libExports$1=requireLib$1();const XHR=getDefaultExportFromCjs(libExports$1);var browserIndex={exports:{}},vtt$1,hasRequiredVtt;function requireVtt(){if(hasRequiredVtt)return vtt$1;hasRequiredVtt=1;var et=requireDocument(),_e=Object.create||(function(){function jt(){}return function(Ut){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return jt.prototype=Ut,new jt}})();function tt(jt,Ut){this.name="ParsingError",this.code=jt.code,this.message=Ut||jt.message}tt.prototype=_e(Error.prototype),tt.prototype.constructor=tt,tt.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function rt(jt){function Ut(Wt,Bt,tr,Jt){return(Wt|0)*3600+(Bt|0)*60+(tr|0)+(Jt|0)/1e3}var Ot=jt.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return Ot?Ot[3]?Ut(Ot[1],Ot[2],Ot[3].replace(":",""),Ot[4]):Ot[1]>59?Ut(Ot[1],Ot[2],0,Ot[4]):Ut(0,Ot[1],Ot[2],Ot[4]):null}function nt(){this.values=_e(null)}nt.prototype={set:function(jt,Ut){!this.get(jt)&&Ut!==""&&(this.values[jt]=Ut)},get:function(jt,Ut,Ot){return Ot?this.has(jt)?this.values[jt]:Ut[Ot]:this.has(jt)?this.values[jt]:Ut},has:function(jt){return jt in this.values},alt:function(jt,Ut,Ot){for(var Wt=0;Wt<Ot.length;++Wt)if(Ut===Ot[Wt]){this.set(jt,Ut);break}},integer:function(jt,Ut){/^-?\d+$/.test(Ut)&&this.set(jt,parseInt(Ut,10))},percent:function(jt,Ut){return Ut.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(Ut=parseFloat(Ut),Ut>=0&&Ut<=100)?(this.set(jt,Ut),!0):!1}};function st(jt,Ut,Ot,Wt){var Bt=Wt?jt.split(Wt):[jt];for(var tr in Bt)if(typeof Bt[tr]=="string"){var Jt=Bt[tr].split(Ot);if(Jt.length===2){var ar=Jt[0].trim(),pr=Jt[1].trim();Ut(ar,pr)}}}function dt(jt,Ut,Ot){var Wt=jt;function Bt(){var ar=rt(jt);if(ar===null)throw new tt(tt.Errors.BadTimeStamp,"Malformed timestamp: "+Wt);return jt=jt.replace(/^[^\sa-zA-Z-]+/,""),ar}function tr(ar,pr){var cr=new nt;st(ar,function(gr,Sr){switch(gr){case"region":for(var Er=Ot.length-1;Er>=0;Er--)if(Ot[Er].id===Sr){cr.set(gr,Ot[Er].region);break}break;case"vertical":cr.alt(gr,Sr,["rl","lr"]);break;case"line":var Vr=Sr.split(","),Wr=Vr[0];cr.integer(gr,Wr),cr.percent(gr,Wr)&&cr.set("snapToLines",!1),cr.alt(gr,Wr,["auto"]),Vr.length===2&&cr.alt("lineAlign",Vr[1],["start","center","end"]);break;case"position":Vr=Sr.split(","),cr.percent(gr,Vr[0]),Vr.length===2&&cr.alt("positionAlign",Vr[1],["start","center","end"]);break;case"size":cr.percent(gr,Sr);break;case"align":cr.alt(gr,Sr,["start","center","end","left","right"]);break}},/:/,/\s/),pr.region=cr.get("region",null),pr.vertical=cr.get("vertical","");try{pr.line=cr.get("line","auto")}catch{}pr.lineAlign=cr.get("lineAlign","start"),pr.snapToLines=cr.get("snapToLines",!0),pr.size=cr.get("size",100);try{pr.align=cr.get("align","center")}catch{pr.align=cr.get("align","middle")}try{pr.position=cr.get("position","auto")}catch{pr.position=cr.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},pr.align)}pr.positionAlign=cr.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},pr.align)}function Jt(){jt=jt.replace(/^\s+/,"")}if(Jt(),Ut.startTime=Bt(),Jt(),jt.substr(0,3)!=="-->")throw new tt(tt.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+Wt);jt=jt.substr(3),Jt(),Ut.endTime=Bt(),Jt(),tr(jt,Ut)}var ft=et.createElement&&et.createElement("textarea"),ht={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},mt={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},bt={v:"title",lang:"lang"},St={rt:"ruby"};function Et(jt,Ut){function Ot(){if(!Ut)return null;function Wr(Nr){return Ut=Ut.substr(Nr.length),Nr}var Mr=Ut.match(/^([^<]*)(<[^>]*>?)?/);return Wr(Mr[1]?Mr[1]:Mr[2])}function Wt(Wr){return ft.innerHTML=Wr,Wr=ft.textContent,ft.textContent="",Wr}function Bt(Wr,Mr){return!St[Mr.localName]||St[Mr.localName]===Wr.localName}function tr(Wr,Mr){var Nr=ht[Wr];if(!Nr)return null;var Yr=jt.document.createElement(Nr),Or=bt[Wr];return Or&&Mr&&(Yr[Or]=Mr.trim()),Yr}for(var Jt=jt.document.createElement("div"),ar=Jt,pr,cr=[];(pr=Ot())!==null;){if(pr[0]==="<"){if(pr[1]==="/"){cr.length&&cr[cr.length-1]===pr.substr(2).replace(">","")&&(cr.pop(),ar=ar.parentNode);continue}var gr=rt(pr.substr(1,pr.length-2)),Sr;if(gr){Sr=jt.document.createProcessingInstruction("timestamp",gr),ar.appendChild(Sr);continue}var Er=pr.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!Er||(Sr=tr(Er[1],Er[3]),!Sr)||!Bt(ar,Sr))continue;if(Er[2]){var Vr=Er[2].split(".");Vr.forEach(function(Wr){var Mr=/^bg_/.test(Wr),Nr=Mr?Wr.slice(3):Wr;if(mt.hasOwnProperty(Nr)){var Yr=Mr?"background-color":"color",Or=mt[Nr];Sr.style[Yr]=Or}}),Sr.className=Vr.join(" ")}cr.push(Er[1]),ar.appendChild(Sr),ar=Sr;continue}ar.appendChild(jt.document.createTextNode(Wt(pr)))}return Jt}var Ct=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Rt(jt){for(var Ut=0;Ut<Ct.length;Ut++){var Ot=Ct[Ut];if(jt>=Ot[0]&&jt<=Ot[1])return!0}return!1}function Tt(jt){var Ut=[],Ot="",Wt;if(!jt||!jt.childNodes)return"ltr";function Bt(ar,pr){for(var cr=pr.childNodes.length-1;cr>=0;cr--)ar.push(pr.childNodes[cr])}function tr(ar){if(!ar||!ar.length)return null;var pr=ar.pop(),cr=pr.textContent||pr.innerText;if(cr){var gr=cr.match(/^.*(\n|\r)/);return gr?(ar.length=0,gr[0]):cr}if(pr.tagName==="ruby")return tr(ar);if(pr.childNodes)return Bt(ar,pr),tr(ar)}for(Bt(Ut,jt);Ot=tr(Ut);)for(var Jt=0;Jt<Ot.length;Jt++)if(Wt=Ot.charCodeAt(Jt),Rt(Wt))return"rtl";return"ltr"}function wt(jt){if(typeof jt.line=="number"&&(jt.snapToLines||jt.line>=0&&jt.line<=100))return jt.line;if(!jt.track||!jt.track.textTrackList||!jt.track.textTrackList.mediaElement)return-1;for(var Ut=jt.track,Ot=Ut.textTrackList,Wt=0,Bt=0;Bt<Ot.length&&Ot[Bt]!==Ut;Bt++)Ot[Bt].mode==="showing"&&Wt++;return++Wt*-1}function At(){}At.prototype.applyStyles=function(jt,Ut){Ut=Ut||this.div;for(var Ot in jt)jt.hasOwnProperty(Ot)&&(Ut.style[Ot]=jt[Ot])},At.prototype.formatStyle=function(jt,Ut){return jt===0?0:jt+Ut};function Nt(jt,Ut,Ot){At.call(this),this.cue=Ut,this.cueDiv=Et(jt,Ut.text);var Wt={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:Ut.vertical===""?"horizontal-tb":Ut.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(Wt,this.cueDiv),this.div=jt.document.createElement("div"),Wt={direction:Tt(this.cueDiv),writingMode:Ut.vertical===""?"horizontal-tb":Ut.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:Ut.align==="middle"?"center":Ut.align,font:Ot.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(Wt),this.div.appendChild(this.cueDiv);var Bt=0;switch(Ut.positionAlign){case"start":case"line-left":Bt=Ut.position;break;case"center":Bt=Ut.position-Ut.size/2;break;case"end":case"line-right":Bt=Ut.position-Ut.size;break}Ut.vertical===""?this.applyStyles({left:this.formatStyle(Bt,"%"),width:this.formatStyle(Ut.size,"%")}):this.applyStyles({top:this.formatStyle(Bt,"%"),height:this.formatStyle(Ut.size,"%")}),this.move=function(tr){this.applyStyles({top:this.formatStyle(tr.top,"px"),bottom:this.formatStyle(tr.bottom,"px"),left:this.formatStyle(tr.left,"px"),right:this.formatStyle(tr.right,"px"),height:this.formatStyle(tr.height,"px"),width:this.formatStyle(tr.width,"px")})}}Nt.prototype=_e(At.prototype),Nt.prototype.constructor=Nt;function Pt(jt){var Ut,Ot,Wt,Bt;if(jt.div){Ot=jt.div.offsetHeight,Wt=jt.div.offsetWidth,Bt=jt.div.offsetTop;var tr=(tr=jt.div.childNodes)&&(tr=tr[0])&&tr.getClientRects&&tr.getClientRects();jt=jt.div.getBoundingClientRect(),Ut=tr?Math.max(tr[0]&&tr[0].height||0,jt.height/tr.length):0}this.left=jt.left,this.right=jt.right,this.top=jt.top||Bt,this.height=jt.height||Ot,this.bottom=jt.bottom||Bt+(jt.height||Ot),this.width=jt.width||Wt,this.lineHeight=Ut!==void 0?Ut:jt.lineHeight}Pt.prototype.move=function(jt,Ut){switch(Ut=Ut!==void 0?Ut:this.lineHeight,jt){case"+x":this.left+=Ut,this.right+=Ut;break;case"-x":this.left-=Ut,this.right-=Ut;break;case"+y":this.top+=Ut,this.bottom+=Ut;break;case"-y":this.top-=Ut,this.bottom-=Ut;break}},Pt.prototype.overlaps=function(jt){return this.left<jt.right&&this.right>jt.left&&this.top<jt.bottom&&this.bottom>jt.top},Pt.prototype.overlapsAny=function(jt){for(var Ut=0;Ut<jt.length;Ut++)if(this.overlaps(jt[Ut]))return!0;return!1},Pt.prototype.within=function(jt){return this.top>=jt.top&&this.bottom<=jt.bottom&&this.left>=jt.left&&this.right<=jt.right},Pt.prototype.overlapsOppositeAxis=function(jt,Ut){switch(Ut){case"+x":return this.left<jt.left;case"-x":return this.right>jt.right;case"+y":return this.top<jt.top;case"-y":return this.bottom>jt.bottom}},Pt.prototype.intersectPercentage=function(jt){var Ut=Math.max(0,Math.min(this.right,jt.right)-Math.max(this.left,jt.left)),Ot=Math.max(0,Math.min(this.bottom,jt.bottom)-Math.max(this.top,jt.top)),Wt=Ut*Ot;return Wt/(this.height*this.width)},Pt.prototype.toCSSCompatValues=function(jt){return{top:this.top-jt.top,bottom:jt.bottom-this.bottom,left:this.left-jt.left,right:jt.right-this.right,height:this.height,width:this.width}},Pt.getSimpleBoxPosition=function(jt){var Ut=jt.div?jt.div.offsetHeight:jt.tagName?jt.offsetHeight:0,Ot=jt.div?jt.div.offsetWidth:jt.tagName?jt.offsetWidth:0,Wt=jt.div?jt.div.offsetTop:jt.tagName?jt.offsetTop:0;jt=jt.div?jt.div.getBoundingClientRect():jt.tagName?jt.getBoundingClientRect():jt;var Bt={left:jt.left,right:jt.right,top:jt.top||Wt,height:jt.height||Ut,bottom:jt.bottom||Wt+(jt.height||Ut),width:jt.width||Ot};return Bt};function It(jt,Ut,Ot,Wt){function Bt(Nr,Yr){for(var Or,Ar=new Pt(Nr),Qr=1,hn=0;hn<Yr.length;hn++){for(;Nr.overlapsOppositeAxis(Ot,Yr[hn])||Nr.within(Ot)&&Nr.overlapsAny(Wt);)Nr.move(Yr[hn]);if(Nr.within(Ot))return Nr;var Sn=Nr.intersectPercentage(Ot);Qr>Sn&&(Or=new Pt(Nr),Qr=Sn),Nr=new Pt(Ar)}return Or||Ar}var tr=new Pt(Ut),Jt=Ut.cue,ar=wt(Jt),pr=[];if(Jt.snapToLines){var cr;switch(Jt.vertical){case"":pr=["+y","-y"],cr="height";break;case"rl":pr=["+x","-x"],cr="width";break;case"lr":pr=["-x","+x"],cr="width";break}var gr=tr.lineHeight,Sr=gr*Math.round(ar),Er=Ot[cr]+gr,Vr=pr[0];Math.abs(Sr)>Er&&(Sr=Sr<0?-1:1,Sr*=Math.ceil(Er/gr)*gr),ar<0&&(Sr+=Jt.vertical===""?Ot.height:Ot.width,pr=pr.reverse()),tr.move(Vr,Sr)}else{var Wr=tr.lineHeight/Ot.height*100;switch(Jt.lineAlign){case"center":ar-=Wr/2;break;case"end":ar-=Wr;break}switch(Jt.vertical){case"":Ut.applyStyles({top:Ut.formatStyle(ar,"%")});break;case"rl":Ut.applyStyles({left:Ut.formatStyle(ar,"%")});break;case"lr":Ut.applyStyles({right:Ut.formatStyle(ar,"%")});break}pr=["+y","-x","+x","-y"],tr=new Pt(Ut)}var Mr=Bt(tr,pr);Ut.move(Mr.toCSSCompatValues(Ot))}function Ft(){}Ft.StringDecoder=function(){return{decode:function(jt){if(!jt)return"";if(typeof jt!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(jt))}}},Ft.convertCueToDOMTree=function(jt,Ut){return!jt||!Ut?null:Et(jt,Ut)};var qt=.05,Vt="sans-serif",Kt="1.5%";return Ft.processCues=function(jt,Ut,Ot){if(!jt||!Ut||!Ot)return null;for(;Ot.firstChild;)Ot.removeChild(Ot.firstChild);var Wt=jt.document.createElement("div");Wt.style.position="absolute",Wt.style.left="0",Wt.style.right="0",Wt.style.top="0",Wt.style.bottom="0",Wt.style.margin=Kt,Ot.appendChild(Wt);function Bt(gr){for(var Sr=0;Sr<gr.length;Sr++)if(gr[Sr].hasBeenReset||!gr[Sr].displayState)return!0;return!1}if(!Bt(Ut)){for(var tr=0;tr<Ut.length;tr++)Wt.appendChild(Ut[tr].displayState);return}var Jt=[],ar=Pt.getSimpleBoxPosition(Wt),pr=Math.round(ar.height*qt*100)/100,cr={font:pr+"px "+Vt};(function(){for(var gr,Sr,Er=0;Er<Ut.length;Er++)Sr=Ut[Er],gr=new Nt(jt,Sr,cr),Wt.appendChild(gr.div),It(jt,gr,ar,Jt),Sr.displayState=gr.div,Jt.push(Pt.getSimpleBoxPosition(gr))})()},Ft.Parser=function(jt,Ut,Ot){Ot||(Ot=Ut,Ut={}),Ut||(Ut={}),this.window=jt,this.vttjs=Ut,this.state="INITIAL",this.buffer="",this.decoder=Ot||new TextDecoder("utf8"),this.regionList=[]},Ft.Parser.prototype={reportOrThrowError:function(jt){if(jt instanceof tt)this.onparsingerror&&this.onparsingerror(jt);else throw jt},parse:function(jt){var Ut=this;jt&&(Ut.buffer+=Ut.decoder.decode(jt,{stream:!0}));function Ot(){for(var gr=Ut.buffer,Sr=0;Sr<gr.length&&gr[Sr]!=="\r"&&gr[Sr]!==`
`;)++Sr;var Er=gr.substr(0,Sr);return gr[Sr]==="\r"&&++Sr,gr[Sr]===`
`&&++Sr,Ut.buffer=gr.substr(Sr),Er}function Wt(gr){var Sr=new nt;if(st(gr,function(Vr,Wr){switch(Vr){case"id":Sr.set(Vr,Wr);break;case"width":Sr.percent(Vr,Wr);break;case"lines":Sr.integer(Vr,Wr);break;case"regionanchor":case"viewportanchor":var Mr=Wr.split(",");if(Mr.length!==2)break;var Nr=new nt;if(Nr.percent("x",Mr[0]),Nr.percent("y",Mr[1]),!Nr.has("x")||!Nr.has("y"))break;Sr.set(Vr+"X",Nr.get("x")),Sr.set(Vr+"Y",Nr.get("y"));break;case"scroll":Sr.alt(Vr,Wr,["up"]);break}},/=/,/\s/),Sr.has("id")){var Er=new(Ut.vttjs.VTTRegion||Ut.window.VTTRegion);Er.width=Sr.get("width",100),Er.lines=Sr.get("lines",3),Er.regionAnchorX=Sr.get("regionanchorX",0),Er.regionAnchorY=Sr.get("regionanchorY",100),Er.viewportAnchorX=Sr.get("viewportanchorX",0),Er.viewportAnchorY=Sr.get("viewportanchorY",100),Er.scroll=Sr.get("scroll",""),Ut.onregion&&Ut.onregion(Er),Ut.regionList.push({id:Sr.get("id"),region:Er})}}function Bt(gr){var Sr=new nt;st(gr,function(Er,Vr){switch(Er){case"MPEGT":Sr.integer(Er+"S",Vr);break;case"LOCA":Sr.set(Er+"L",rt(Vr));break}},/[^\d]:/,/,/),Ut.ontimestampmap&&Ut.ontimestampmap({MPEGTS:Sr.get("MPEGTS"),LOCAL:Sr.get("LOCAL")})}function tr(gr){gr.match(/X-TIMESTAMP-MAP/)?st(gr,function(Sr,Er){switch(Sr){case"X-TIMESTAMP-MAP":Bt(Er);break}},/=/):st(gr,function(Sr,Er){switch(Sr){case"Region":Wt(Er);break}},/:/)}try{var Jt;if(Ut.state==="INITIAL"){if(!/\r\n|\n/.test(Ut.buffer))return this;Jt=Ot();var ar=Jt.match(/^WEBVTT([ \t].*)?$/);if(!ar||!ar[0])throw new tt(tt.Errors.BadSignature);Ut.state="HEADER"}for(var pr=!1;Ut.buffer;){if(!/\r\n|\n/.test(Ut.buffer))return this;switch(pr?pr=!1:Jt=Ot(),Ut.state){case"HEADER":/:/.test(Jt)?tr(Jt):Jt||(Ut.state="ID");continue;case"NOTE":Jt||(Ut.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(Jt)){Ut.state="NOTE";break}if(!Jt)continue;Ut.cue=new(Ut.vttjs.VTTCue||Ut.window.VTTCue)(0,0,"");try{Ut.cue.align="center"}catch{Ut.cue.align="middle"}if(Ut.state="CUE",Jt.indexOf("-->")===-1){Ut.cue.id=Jt;continue}case"CUE":try{dt(Jt,Ut.cue,Ut.regionList)}catch(gr){Ut.reportOrThrowError(gr),Ut.cue=null,Ut.state="BADCUE";continue}Ut.state="CUETEXT";continue;case"CUETEXT":var cr=Jt.indexOf("-->")!==-1;if(!Jt||cr&&(pr=!0)){Ut.oncue&&Ut.oncue(Ut.cue),Ut.cue=null,Ut.state="ID";continue}Ut.cue.text&&(Ut.cue.text+=`
`),Ut.cue.text+=Jt.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":Jt||(Ut.state="ID");continue}}}catch(gr){Ut.reportOrThrowError(gr),Ut.state==="CUETEXT"&&Ut.cue&&Ut.oncue&&Ut.oncue(Ut.cue),Ut.cue=null,Ut.state=Ut.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var jt=this;try{if(jt.buffer+=jt.decoder.decode(),(jt.cue||jt.state==="HEADER")&&(jt.buffer+=`
`,jt.parse()),jt.state==="INITIAL")throw new tt(tt.Errors.BadSignature)}catch(Ut){jt.reportOrThrowError(Ut)}return jt.onflush&&jt.onflush(),this}},vtt$1=Ft,vtt$1}var vttcue,hasRequiredVttcue;function requireVttcue(){if(hasRequiredVttcue)return vttcue;hasRequiredVttcue=1;var et="auto",_e={"":1,lr:1,rl:1},tt={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function rt(dt){if(typeof dt!="string")return!1;var ft=_e[dt.toLowerCase()];return ft?dt.toLowerCase():!1}function nt(dt){if(typeof dt!="string")return!1;var ft=tt[dt.toLowerCase()];return ft?dt.toLowerCase():!1}function st(dt,ft,ht){this.hasBeenReset=!1;var mt="",bt=!1,St=dt,Et=ft,Ct=ht,Rt=null,Tt="",wt=!0,At="auto",Nt="start",Pt="auto",It="auto",Ft=100,qt="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return mt},set:function(Vt){mt=""+Vt}},pauseOnExit:{enumerable:!0,get:function(){return bt},set:function(Vt){bt=!!Vt}},startTime:{enumerable:!0,get:function(){return St},set:function(Vt){if(typeof Vt!="number")throw new TypeError("Start time must be set to a number.");St=Vt,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return Et},set:function(Vt){if(typeof Vt!="number")throw new TypeError("End time must be set to a number.");Et=Vt,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return Ct},set:function(Vt){Ct=""+Vt,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return Rt},set:function(Vt){Rt=Vt,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return Tt},set:function(Vt){var Kt=rt(Vt);if(Kt===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");Tt=Kt,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return wt},set:function(Vt){wt=!!Vt,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return At},set:function(Vt){if(typeof Vt!="number"&&Vt!==et)throw new SyntaxError("Line: an invalid number or illegal string was specified.");At=Vt,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return Nt},set:function(Vt){var Kt=nt(Vt);Kt?(Nt=Kt,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Pt},set:function(Vt){if(Vt<0||Vt>100)throw new Error("Position must be between 0 and 100.");Pt=Vt,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return It},set:function(Vt){var Kt=nt(Vt);Kt?(It=Kt,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Ft},set:function(Vt){if(Vt<0||Vt>100)throw new Error("Size must be between 0 and 100.");Ft=Vt,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return qt},set:function(Vt){var Kt=nt(Vt);if(!Kt)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");qt=Kt,this.hasBeenReset=!0}}}),this.displayState=void 0}return st.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},vttcue=st,vttcue}var vttregion,hasRequiredVttregion;function requireVttregion(){if(hasRequiredVttregion)return vttregion;hasRequiredVttregion=1;var et={"":!0,up:!0};function _e(nt){if(typeof nt!="string")return!1;var st=et[nt.toLowerCase()];return st?nt.toLowerCase():!1}function tt(nt){return typeof nt=="number"&&nt>=0&&nt<=100}function rt(){var nt=100,st=3,dt=0,ft=100,ht=0,mt=100,bt="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return nt},set:function(St){if(!tt(St))throw new Error("Width must be between 0 and 100.");nt=St}},lines:{enumerable:!0,get:function(){return st},set:function(St){if(typeof St!="number")throw new TypeError("Lines must be set to a number.");st=St}},regionAnchorY:{enumerable:!0,get:function(){return ft},set:function(St){if(!tt(St))throw new Error("RegionAnchorX must be between 0 and 100.");ft=St}},regionAnchorX:{enumerable:!0,get:function(){return dt},set:function(St){if(!tt(St))throw new Error("RegionAnchorY must be between 0 and 100.");dt=St}},viewportAnchorY:{enumerable:!0,get:function(){return mt},set:function(St){if(!tt(St))throw new Error("ViewportAnchorY must be between 0 and 100.");mt=St}},viewportAnchorX:{enumerable:!0,get:function(){return ht},set:function(St){if(!tt(St))throw new Error("ViewportAnchorX must be between 0 and 100.");ht=St}},scroll:{enumerable:!0,get:function(){return bt},set:function(St){var Et=_e(St);Et===!1?console.warn("Scroll: an invalid or illegal string was specified."):bt=Et}}})}return vttregion=rt,vttregion}var hasRequiredBrowserIndex;function requireBrowserIndex(){if(hasRequiredBrowserIndex)return browserIndex.exports;hasRequiredBrowserIndex=1;var et=requireWindow(),_e=browserIndex.exports={WebVTT:requireVtt(),VTTCue:requireVttcue(),VTTRegion:requireVttregion()};et.vttjs=_e,et.WebVTT=_e.WebVTT;var tt=_e.VTTCue,rt=_e.VTTRegion,nt=et.VTTCue,st=et.VTTRegion;return _e.shim=function(){et.VTTCue=tt,et.VTTRegion=rt},_e.restore=function(){et.VTTCue=nt,et.VTTRegion=st},et.VTTCue||_e.shim(),browserIndex.exports}var browserIndexExports=requireBrowserIndex();const vtt=getDefaultExportFromCjs(browserIndexExports);function _extends(){return _extends=Object.assign?Object.assign.bind():function(et){for(var _e=1;_e<arguments.length;_e++){var tt=arguments[_e];for(var rt in tt)({}).hasOwnProperty.call(tt,rt)&&(et[rt]=tt[rt])}return et},_extends.apply(null,arguments)}var DEFAULT_LOCATION="https://example.com",resolveUrl$1=function et(_e,tt){if(/^[a-z]+:/i.test(tt))return tt;/^data:/.test(_e)&&(_e=window$1.location&&window$1.location.href||"");var rt=/^\/\//.test(_e),nt=!window$1.location&&!/\/\//i.test(_e);_e=new window$1.URL(_e,window$1.location||DEFAULT_LOCATION);var st=new URL(tt,_e);return nt?st.href.slice(DEFAULT_LOCATION.length):rt?st.href.slice(st.protocol.length):st.href},Stream=(function(){function et(){this.listeners={}}var _e=et.prototype;return _e.on=function(rt,nt){this.listeners[rt]||(this.listeners[rt]=[]),this.listeners[rt].push(nt)},_e.off=function(rt,nt){if(!this.listeners[rt])return!1;var st=this.listeners[rt].indexOf(nt);return this.listeners[rt]=this.listeners[rt].slice(0),this.listeners[rt].splice(st,1),st>-1},_e.trigger=function(rt){var nt=this.listeners[rt];if(nt)if(arguments.length===2)for(var st=nt.length,dt=0;dt<st;++dt)nt[dt].call(this,arguments[1]);else for(var ft=Array.prototype.slice.call(arguments,1),ht=nt.length,mt=0;mt<ht;++mt)nt[mt].apply(this,ft)},_e.dispose=function(){this.listeners={}},_e.pipe=function(rt){this.on("data",function(nt){rt.push(nt)})},et})(),atob$1=function et(_e){return window$1.atob?window$1.atob(_e):Buffer.from(_e,"base64").toString("binary")};function decodeB64ToUint8Array(et){for(var _e=atob$1(et),tt=new Uint8Array(_e.length),rt=0;rt<_e.length;rt++)tt[rt]=_e.charCodeAt(rt);return tt}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class LineStream extends Stream{constructor(){super(),this.buffer=""}push(_e){let tt;for(this.buffer+=_e,tt=this.buffer.indexOf(`
`);tt>-1;tt=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,tt)),this.buffer=this.buffer.substring(tt+1)}}const TAB=" ",parseByterange=function(et){const _e=/([0-9.]*)?@?([0-9.]*)?/.exec(et||""),tt={};return _e[1]&&(tt.length=parseInt(_e[1],10)),_e[2]&&(tt.offset=parseInt(_e[2],10)),tt},attributeSeparator=function(){const tt="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+tt+")")},parseAttributes$1=function(et){const _e={};if(!et)return _e;const tt=et.split(attributeSeparator());let rt=tt.length,nt;for(;rt--;)tt[rt]!==""&&(nt=/([^=]*)=(.*)/.exec(tt[rt]).slice(1),nt[0]=nt[0].replace(/^\s+|\s+$/g,""),nt[1]=nt[1].replace(/^\s+|\s+$/g,""),nt[1]=nt[1].replace(/^['"](.*)['"]$/g,"$1"),_e[nt[0]]=nt[1]);return _e},parseResolution=et=>{const _e=et.split("x"),tt={};return _e[0]&&(tt.width=parseInt(_e[0],10)),_e[1]&&(tt.height=parseInt(_e[1],10)),tt};class ParseStream extends Stream{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(_e){let tt,rt;if(_e=_e.trim(),_e.length===0)return;if(_e[0]!=="#"){this.trigger("data",{type:"uri",uri:_e});return}this.tagMappers.reduce((st,dt)=>{const ft=dt(_e);return ft===_e?st:st.concat([ft])},[_e]).forEach(st=>{for(let dt=0;dt<this.customParsers.length;dt++)if(this.customParsers[dt].call(this,st))return;if(st.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:st.slice(1)});return}if(st=st.replace("\r",""),tt=/^#EXTM3U/.exec(st),tt){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(tt=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(st),tt){rt={type:"tag",tagType:"inf"},tt[1]&&(rt.duration=parseFloat(tt[1])),tt[2]&&(rt.title=tt[2]),this.trigger("data",rt);return}if(tt=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(st),tt){rt={type:"tag",tagType:"targetduration"},tt[1]&&(rt.duration=parseInt(tt[1],10)),this.trigger("data",rt);return}if(tt=/^#EXT-X-VERSION:([0-9.]*)?/.exec(st),tt){rt={type:"tag",tagType:"version"},tt[1]&&(rt.version=parseInt(tt[1],10)),this.trigger("data",rt);return}if(tt=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(st),tt){rt={type:"tag",tagType:"media-sequence"},tt[1]&&(rt.number=parseInt(tt[1],10)),this.trigger("data",rt);return}if(tt=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(st),tt){rt={type:"tag",tagType:"discontinuity-sequence"},tt[1]&&(rt.number=parseInt(tt[1],10)),this.trigger("data",rt);return}if(tt=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(st),tt){rt={type:"tag",tagType:"playlist-type"},tt[1]&&(rt.playlistType=tt[1]),this.trigger("data",rt);return}if(tt=/^#EXT-X-BYTERANGE:(.*)?$/.exec(st),tt){rt=_extends(parseByterange(tt[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",rt);return}if(tt=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(st),tt){rt={type:"tag",tagType:"allow-cache"},tt[1]&&(rt.allowed=!/NO/.test(tt[1])),this.trigger("data",rt);return}if(tt=/^#EXT-X-MAP:(.*)$/.exec(st),tt){if(rt={type:"tag",tagType:"map"},tt[1]){const dt=parseAttributes$1(tt[1]);dt.URI&&(rt.uri=dt.URI),dt.BYTERANGE&&(rt.byterange=parseByterange(dt.BYTERANGE))}this.trigger("data",rt);return}if(tt=/^#EXT-X-STREAM-INF:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"stream-inf"},tt[1]&&(rt.attributes=parseAttributes$1(tt[1]),rt.attributes.RESOLUTION&&(rt.attributes.RESOLUTION=parseResolution(rt.attributes.RESOLUTION)),rt.attributes.BANDWIDTH&&(rt.attributes.BANDWIDTH=parseInt(rt.attributes.BANDWIDTH,10)),rt.attributes["FRAME-RATE"]&&(rt.attributes["FRAME-RATE"]=parseFloat(rt.attributes["FRAME-RATE"])),rt.attributes["PROGRAM-ID"]&&(rt.attributes["PROGRAM-ID"]=parseInt(rt.attributes["PROGRAM-ID"],10))),this.trigger("data",rt);return}if(tt=/^#EXT-X-MEDIA:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"media"},tt[1]&&(rt.attributes=parseAttributes$1(tt[1])),this.trigger("data",rt);return}if(tt=/^#EXT-X-ENDLIST/.exec(st),tt){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(tt=/^#EXT-X-DISCONTINUITY/.exec(st),tt){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(tt=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"program-date-time"},tt[1]&&(rt.dateTimeString=tt[1],rt.dateTimeObject=new Date(tt[1])),this.trigger("data",rt);return}if(tt=/^#EXT-X-KEY:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"key"},tt[1]&&(rt.attributes=parseAttributes$1(tt[1]),rt.attributes.IV&&(rt.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(rt.attributes.IV=rt.attributes.IV.substring(2)),rt.attributes.IV=rt.attributes.IV.match(/.{8}/g),rt.attributes.IV[0]=parseInt(rt.attributes.IV[0],16),rt.attributes.IV[1]=parseInt(rt.attributes.IV[1],16),rt.attributes.IV[2]=parseInt(rt.attributes.IV[2],16),rt.attributes.IV[3]=parseInt(rt.attributes.IV[3],16),rt.attributes.IV=new Uint32Array(rt.attributes.IV))),this.trigger("data",rt);return}if(tt=/^#EXT-X-START:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"start"},tt[1]&&(rt.attributes=parseAttributes$1(tt[1]),rt.attributes["TIME-OFFSET"]=parseFloat(rt.attributes["TIME-OFFSET"]),rt.attributes.PRECISE=/YES/.test(rt.attributes.PRECISE)),this.trigger("data",rt);return}if(tt=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(st),tt){rt={type:"tag",tagType:"cue-out-cont"},tt[1]?rt.data=tt[1]:rt.data="",this.trigger("data",rt);return}if(tt=/^#EXT-X-CUE-OUT:(.*)?$/.exec(st),tt){rt={type:"tag",tagType:"cue-out"},tt[1]?rt.data=tt[1]:rt.data="",this.trigger("data",rt);return}if(tt=/^#EXT-X-CUE-IN:?(.*)?$/.exec(st),tt){rt={type:"tag",tagType:"cue-in"},tt[1]?rt.data=tt[1]:rt.data="",this.trigger("data",rt);return}if(tt=/^#EXT-X-SKIP:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"skip"},rt.attributes=parseAttributes$1(tt[1]),rt.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(rt.attributes["SKIPPED-SEGMENTS"]=parseInt(rt.attributes["SKIPPED-SEGMENTS"],10)),rt.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(rt.attributes["RECENTLY-REMOVED-DATERANGES"]=rt.attributes["RECENTLY-REMOVED-DATERANGES"].split(TAB)),this.trigger("data",rt);return}if(tt=/^#EXT-X-PART:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"part"},rt.attributes=parseAttributes$1(tt[1]),["DURATION"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=parseFloat(rt.attributes[dt]))}),["INDEPENDENT","GAP"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=/YES/.test(rt.attributes[dt]))}),rt.attributes.hasOwnProperty("BYTERANGE")&&(rt.attributes.byterange=parseByterange(rt.attributes.BYTERANGE)),this.trigger("data",rt);return}if(tt=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"server-control"},rt.attributes=parseAttributes$1(tt[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=parseFloat(rt.attributes[dt]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=/YES/.test(rt.attributes[dt]))}),this.trigger("data",rt);return}if(tt=/^#EXT-X-PART-INF:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"part-inf"},rt.attributes=parseAttributes$1(tt[1]),["PART-TARGET"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=parseFloat(rt.attributes[dt]))}),this.trigger("data",rt);return}if(tt=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"preload-hint"},rt.attributes=parseAttributes$1(tt[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(dt){if(rt.attributes.hasOwnProperty(dt)){rt.attributes[dt]=parseInt(rt.attributes[dt],10);const ft=dt==="BYTERANGE-LENGTH"?"length":"offset";rt.attributes.byterange=rt.attributes.byterange||{},rt.attributes.byterange[ft]=rt.attributes[dt],delete rt.attributes[dt]}}),this.trigger("data",rt);return}if(tt=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"rendition-report"},rt.attributes=parseAttributes$1(tt[1]),["LAST-MSN","LAST-PART"].forEach(function(dt){rt.attributes.hasOwnProperty(dt)&&(rt.attributes[dt]=parseInt(rt.attributes[dt],10))}),this.trigger("data",rt);return}if(tt=/^#EXT-X-DATERANGE:(.*)$/.exec(st),tt&&tt[1]){rt={type:"tag",tagType:"daterange"},rt.attributes=parseAttributes$1(tt[1]),["ID","CLASS"].forEach(function(ft){rt.attributes.hasOwnProperty(ft)&&(rt.attributes[ft]=String(rt.attributes[ft]))}),["START-DATE","END-DATE"].forEach(function(ft){rt.attributes.hasOwnProperty(ft)&&(rt.attributes[ft]=new Date(rt.attributes[ft]))}),["DURATION","PLANNED-DURATION"].forEach(function(ft){rt.attributes.hasOwnProperty(ft)&&(rt.attributes[ft]=parseFloat(rt.attributes[ft]))}),["END-ON-NEXT"].forEach(function(ft){rt.attributes.hasOwnProperty(ft)&&(rt.attributes[ft]=/YES/i.test(rt.attributes[ft]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(ft){rt.attributes.hasOwnProperty(ft)&&(rt.attributes[ft]=rt.attributes[ft].toString(16))});const dt=/^X-([A-Z]+-)+[A-Z]+$/;for(const ft in rt.attributes){if(!dt.test(ft))continue;const ht=/[0-9A-Fa-f]{6}/g.test(rt.attributes[ft]),mt=/^\d+(\.\d+)?$/.test(rt.attributes[ft]);rt.attributes[ft]=ht?rt.attributes[ft].toString(16):mt?parseFloat(rt.attributes[ft]):String(rt.attributes[ft])}this.trigger("data",rt);return}if(tt=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(st),tt){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(tt=/^#EXT-X-I-FRAMES-ONLY/.exec(st),tt){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(tt=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"content-steering"},rt.attributes=parseAttributes$1(tt[1]),this.trigger("data",rt);return}if(tt=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"i-frame-playlist"},rt.attributes=parseAttributes$1(tt[1]),rt.attributes.URI&&(rt.uri=rt.attributes.URI),rt.attributes.BANDWIDTH&&(rt.attributes.BANDWIDTH=parseInt(rt.attributes.BANDWIDTH,10)),rt.attributes.RESOLUTION&&(rt.attributes.RESOLUTION=parseResolution(rt.attributes.RESOLUTION)),rt.attributes["AVERAGE-BANDWIDTH"]&&(rt.attributes["AVERAGE-BANDWIDTH"]=parseInt(rt.attributes["AVERAGE-BANDWIDTH"],10)),rt.attributes["FRAME-RATE"]&&(rt.attributes["FRAME-RATE"]=parseFloat(rt.attributes["FRAME-RATE"])),this.trigger("data",rt);return}if(tt=/^#EXT-X-DEFINE:(.*)$/.exec(st),tt){rt={type:"tag",tagType:"define"},rt.attributes=parseAttributes$1(tt[1]),this.trigger("data",rt);return}this.trigger("data",{type:"tag",data:st.slice(4)})})}addParser({expression:_e,customType:tt,dataParser:rt,segment:nt}){typeof rt!="function"&&(rt=st=>st),this.customParsers.push(st=>{if(_e.exec(st))return this.trigger("data",{type:"custom",data:rt(st),customType:tt,segment:nt}),!0})}addTagMapper({expression:_e,map:tt}){const rt=nt=>_e.test(nt)?tt(nt):nt;this.tagMappers.push(rt)}}const camelCase=et=>et.toLowerCase().replace(/-(\w)/g,_e=>_e[1].toUpperCase()),camelCaseKeys=function(et){const _e={};return Object.keys(et).forEach(function(tt){_e[camelCase(tt)]=et[tt]}),_e},setHoldBack=function(et){const{serverControl:_e,targetDuration:tt,partTargetDuration:rt}=et;if(!_e)return;const nt="#EXT-X-SERVER-CONTROL",st="holdBack",dt="partHoldBack",ft=tt&&tt*3,ht=rt&&rt*2;tt&&!_e.hasOwnProperty(st)&&(_e[st]=ft,this.trigger("info",{message:`${nt} defaulting HOLD-BACK to targetDuration * 3 (${ft}).`})),ft&&_e[st]<ft&&(this.trigger("warn",{message:`${nt} clamping HOLD-BACK (${_e[st]}) to targetDuration * 3 (${ft})`}),_e[st]=ft),rt&&!_e.hasOwnProperty(dt)&&(_e[dt]=rt*3,this.trigger("info",{message:`${nt} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${_e[dt]}).`})),rt&&_e[dt]<ht&&(this.trigger("warn",{message:`${nt} clamping PART-HOLD-BACK (${_e[dt]}) to partTargetDuration * 2 (${ht}).`}),_e[dt]=ht)};class Parser extends Stream{constructor(_e={}){super(),this.lineStream=new LineStream,this.parseStream=new ParseStream,this.lineStream.pipe(this.parseStream),this.mainDefinitions=_e.mainDefinitions||{},this.params=new URL(_e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const tt=this,rt=[];let nt={},st,dt,ft=!1;const ht=function(){},mt={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},bt="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let St=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let Et=0,Ct=0;const Rt={};this.on("end",()=>{nt.uri||!nt.parts&&!nt.preloadHints||(!nt.map&&st&&(nt.map=st),!nt.key&&dt&&(nt.key=dt),!nt.timeline&&typeof St=="number"&&(nt.timeline=St),this.manifest.preloadSegment=nt)}),this.parseStream.on("data",function(Tt){let wt,At;if(tt.manifest.definitions){for(const Nt in tt.manifest.definitions)if(Tt.uri&&(Tt.uri=Tt.uri.replace(`{$${Nt}}`,tt.manifest.definitions[Nt])),Tt.attributes)for(const Pt in Tt.attributes)typeof Tt.attributes[Pt]=="string"&&(Tt.attributes[Pt]=Tt.attributes[Pt].replace(`{$${Nt}}`,tt.manifest.definitions[Nt]))}({tag(){({version(){Tt.version&&(this.manifest.version=Tt.version)},"allow-cache"(){this.manifest.allowCache=Tt.allowed,"allowed"in Tt||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const Nt={};"length"in Tt&&(nt.byterange=Nt,Nt.length=Tt.length,"offset"in Tt||(Tt.offset=Et)),"offset"in Tt&&(nt.byterange=Nt,Nt.offset=Tt.offset),Et=Nt.offset+Nt.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),Tt.title&&(nt.title=Tt.title),Tt.duration>0&&(nt.duration=Tt.duration),Tt.duration===0&&(nt.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=rt},key(){if(!Tt.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(Tt.attributes.METHOD==="NONE"){dt=null;return}if(!Tt.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(Tt.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:Tt.attributes};return}if(Tt.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:Tt.attributes.URI};return}if(Tt.attributes.KEYFORMAT===bt){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(Tt.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(Tt.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),Tt.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(Tt.attributes.KEYID&&Tt.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:Tt.attributes.KEYFORMAT,keyId:Tt.attributes.KEYID.substring(2)},pssh:decodeB64ToUint8Array(Tt.attributes.URI.split(",")[1])};return}Tt.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),dt={method:Tt.attributes.METHOD||"AES-128",uri:Tt.attributes.URI},typeof Tt.attributes.IV<"u"&&(dt.iv=Tt.attributes.IV)},"media-sequence"(){if(!isFinite(Tt.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+Tt.number});return}this.manifest.mediaSequence=Tt.number},"discontinuity-sequence"(){if(!isFinite(Tt.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+Tt.number});return}this.manifest.discontinuitySequence=Tt.number,St=Tt.number},"playlist-type"(){if(!/VOD|EVENT/.test(Tt.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+Tt.playlist});return}this.manifest.playlistType=Tt.playlistType},map(){st={},Tt.uri&&(st.uri=Tt.uri),Tt.byterange&&(st.byterange=Tt.byterange),dt&&(st.key=dt)},"stream-inf"(){if(this.manifest.playlists=rt,this.manifest.mediaGroups=this.manifest.mediaGroups||mt,!Tt.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}nt.attributes||(nt.attributes={}),_extends(nt.attributes,Tt.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||mt,!(Tt.attributes&&Tt.attributes.TYPE&&Tt.attributes["GROUP-ID"]&&Tt.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const Nt=this.manifest.mediaGroups[Tt.attributes.TYPE];Nt[Tt.attributes["GROUP-ID"]]=Nt[Tt.attributes["GROUP-ID"]]||{},wt=Nt[Tt.attributes["GROUP-ID"]],At={default:/yes/i.test(Tt.attributes.DEFAULT)},At.default?At.autoselect=!0:At.autoselect=/yes/i.test(Tt.attributes.AUTOSELECT),Tt.attributes.LANGUAGE&&(At.language=Tt.attributes.LANGUAGE),Tt.attributes.URI&&(At.uri=Tt.attributes.URI),Tt.attributes["INSTREAM-ID"]&&(At.instreamId=Tt.attributes["INSTREAM-ID"]),Tt.attributes.CHARACTERISTICS&&(At.characteristics=Tt.attributes.CHARACTERISTICS),Tt.attributes.FORCED&&(At.forced=/yes/i.test(Tt.attributes.FORCED)),wt[Tt.attributes.NAME]=At},discontinuity(){St+=1,nt.discontinuity=!0,this.manifest.discontinuityStarts.push(rt.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=Tt.dateTimeString,this.manifest.dateTimeObject=Tt.dateTimeObject),nt.dateTimeString=Tt.dateTimeString,nt.dateTimeObject=Tt.dateTimeObject;const{lastProgramDateTime:Nt}=this;this.lastProgramDateTime=new Date(Tt.dateTimeString).getTime(),Nt===null&&this.manifest.segments.reduceRight((Pt,It)=>(It.programDateTime=Pt-It.duration*1e3,It.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(Tt.duration)||Tt.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+Tt.duration});return}this.manifest.targetDuration=Tt.duration,setHoldBack.call(this,this.manifest)},start(){if(!Tt.attributes||isNaN(Tt.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:Tt.attributes["TIME-OFFSET"],precise:Tt.attributes.PRECISE}},"cue-out"(){nt.cueOut=Tt.data},"cue-out-cont"(){nt.cueOutCont=Tt.data},"cue-in"(){nt.cueIn=Tt.data},skip(){this.manifest.skip=camelCaseKeys(Tt.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",Tt.attributes,["SKIPPED-SEGMENTS"])},part(){ft=!0;const Nt=this.manifest.segments.length,Pt=camelCaseKeys(Tt.attributes);nt.parts=nt.parts||[],nt.parts.push(Pt),Pt.byterange&&(Pt.byterange.hasOwnProperty("offset")||(Pt.byterange.offset=Ct),Ct=Pt.byterange.offset+Pt.byterange.length);const It=nt.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${It} for segment #${Nt}`,Tt.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((Ft,qt)=>{Ft.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${qt} lacks required attribute(s): LAST-PART`})})},"server-control"(){const Nt=this.manifest.serverControl=camelCaseKeys(Tt.attributes);Nt.hasOwnProperty("canBlockReload")||(Nt.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),setHoldBack.call(this,this.manifest),Nt.canSkipDateranges&&!Nt.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const Nt=this.manifest.segments.length,Pt=camelCaseKeys(Tt.attributes),It=Pt.type&&Pt.type==="PART";nt.preloadHints=nt.preloadHints||[],nt.preloadHints.push(Pt),Pt.byterange&&(Pt.byterange.hasOwnProperty("offset")||(Pt.byterange.offset=It?Ct:0,It&&(Ct=Pt.byterange.offset+Pt.byterange.length)));const Ft=nt.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${Ft} for segment #${Nt}`,Tt.attributes,["TYPE","URI"]),!!Pt.type)for(let qt=0;qt<nt.preloadHints.length-1;qt++){const Vt=nt.preloadHints[qt];Vt.type&&Vt.type===Pt.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${Ft} for segment #${Nt} has the same TYPE ${Pt.type} as preload hint #${qt}`})}},"rendition-report"(){const Nt=camelCaseKeys(Tt.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(Nt);const Pt=this.manifest.renditionReports.length-1,It=["LAST-MSN","URI"];ft&&It.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${Pt}`,Tt.attributes,It)},"part-inf"(){this.manifest.partInf=camelCaseKeys(Tt.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",Tt.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),setHoldBack.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(camelCaseKeys(Tt.attributes));const Nt=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${Nt}`,Tt.attributes,["ID","START-DATE"]);const Pt=this.manifest.dateRanges[Nt];Pt.endDate&&Pt.startDate&&new Date(Pt.endDate)<new Date(Pt.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),Pt.duration&&Pt.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),Pt.plannedDuration&&Pt.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const It=!!Pt.endOnNext;if(It&&!Pt.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),It&&(Pt.duration||Pt.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),Pt.duration&&Pt.endDate){const qt=Pt.startDate.getTime()+Pt.duration*1e3;this.manifest.dateRanges[Nt].endDate=new Date(qt)}if(!Rt[Pt.id])Rt[Pt.id]=Pt;else{for(const qt in Rt[Pt.id])if(Pt[qt]&&JSON.stringify(Rt[Pt.id][qt])!==JSON.stringify(Pt[qt])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const Ft=this.manifest.dateRanges.findIndex(qt=>qt.id===Pt.id);this.manifest.dateRanges[Ft]=_extends(this.manifest.dateRanges[Ft],Pt),Rt[Pt.id]=_extends(Rt[Pt.id],Pt),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=camelCaseKeys(Tt.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",Tt.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const Nt=(Pt,It)=>{if(Pt in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${Pt}`});return}this.manifest.definitions[Pt]=It};if("QUERYPARAM"in Tt.attributes){if("NAME"in Tt.attributes||"IMPORT"in Tt.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const Pt=this.params.get(Tt.attributes.QUERYPARAM);if(!Pt){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${Tt.attributes.QUERYPARAM}`});return}Nt(Tt.attributes.QUERYPARAM,decodeURIComponent(Pt));return}if("NAME"in Tt.attributes){if("IMPORT"in Tt.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in Tt.attributes)||typeof Tt.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${Tt.attributes.NAME}`});return}Nt(Tt.attributes.NAME,Tt.attributes.VALUE);return}if("IMPORT"in Tt.attributes){if(!this.mainDefinitions[Tt.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${Tt.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}Nt(Tt.attributes.IMPORT,this.mainDefinitions[Tt.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:Tt.attributes,uri:Tt.uri,timeline:St}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",Tt.attributes,["BANDWIDTH","URI"])}}[Tt.tagType]||ht).call(tt)},uri(){nt.uri=Tt.uri,rt.push(nt),this.manifest.targetDuration&&!("duration"in nt)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),nt.duration=this.manifest.targetDuration),dt&&(nt.key=dt),nt.timeline=St,st&&(nt.map=st),Ct=0,this.lastProgramDateTime!==null&&(nt.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=nt.duration*1e3),nt={}},comment(){},custom(){Tt.segment?(nt.custom=nt.custom||{},nt.custom[Tt.customType]=Tt.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[Tt.customType]=Tt.data)}})[Tt.type].call(tt)})}requiredCompatibilityversion(_e,tt){(_e<tt||!_e)&&this.trigger("warn",{message:`manifest must be at least version ${tt}`})}warnOnMissingAttributes_(_e,tt,rt){const nt=[];rt.forEach(function(st){tt.hasOwnProperty(st)||nt.push(st)}),nt.length&&this.trigger("warn",{message:`${_e} lacks required attribute(s): ${nt.join(", ")}`})}push(_e){this.lineStream.push(_e)}end(){this.lineStream.push(`
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(_e){this.parseStream.addParser(_e)}addTagMapper(_e){this.parseStream.addTagMapper(_e)}}var regexs={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},mediaTypes=["video","audio","text"],upperMediaTypes=["Video","Audio","Text"],translateLegacyCodec=function et(_e){return _e&&_e.replace(/avc1\.(\d+)\.(\d+)/i,function(tt,rt,nt){var st=("00"+Number(rt).toString(16)).slice(-2),dt=("00"+Number(nt).toString(16)).slice(-2);return"avc1."+st+"00"+dt})},parseCodecs=function et(_e){_e===void 0&&(_e="");var tt=_e.split(","),rt=[];return tt.forEach(function(nt){nt=nt.trim();var st;mediaTypes.forEach(function(dt){var ft=regexs[dt].exec(nt.toLowerCase());if(!(!ft||ft.length<=1)){st=dt;var ht=nt.substring(0,ft[1].length),mt=nt.replace(ht,"");rt.push({type:ht,details:mt,mediaType:dt})}}),st||rt.push({type:nt,details:"",mediaType:"unknown"})}),rt},codecsFromDefault=function et(_e,tt){if(!_e.mediaGroups.AUDIO||!tt)return null;var rt=_e.mediaGroups.AUDIO[tt];if(!rt)return null;for(var nt in rt){var st=rt[nt];if(st.default&&st.playlists)return parseCodecs(st.playlists[0].attributes.CODECS)}return null},isAudioCodec=function et(_e){return _e===void 0&&(_e=""),regexs.audio.test(_e.trim().toLowerCase())},isTextCodec=function et(_e){return _e===void 0&&(_e=""),regexs.text.test(_e.trim().toLowerCase())},getMimeForCodec=function et(_e){if(!(!_e||typeof _e!="string")){var tt=_e.toLowerCase().split(",").map(function(st){return translateLegacyCodec(st.trim())}),rt="video";tt.length===1&&isAudioCodec(tt[0])?rt="audio":tt.length===1&&isTextCodec(tt[0])&&(rt="application");var nt="mp4";return tt.every(function(st){return regexs.mp4.test(st)})?nt="mp4":tt.every(function(st){return regexs.webm.test(st)})?nt="webm":tt.every(function(st){return regexs.ogg.test(st)})&&(nt="ogg"),rt+"/"+nt+';codecs="'+_e+'"'}},browserSupportsCodec=function et(_e,tt){return _e===void 0&&(_e=""),tt===void 0&&(tt=!1),window$1.MediaSource&&window$1.MediaSource.isTypeSupported&&window$1.MediaSource.isTypeSupported(getMimeForCodec(_e))||tt&&window$1.ManagedMediaSource&&window$1.ManagedMediaSource.isTypeSupported&&window$1.ManagedMediaSource.isTypeSupported(getMimeForCodec(_e))||!1},muxerSupportsCodec=function et(_e){return _e===void 0&&(_e=""),_e.toLowerCase().split(",").every(function(tt){tt=tt.trim();for(var rt=0;rt<upperMediaTypes.length;rt++){var nt=upperMediaTypes[rt];if(regexs["muxer"+nt].test(tt))return!0}return!1})},DEFAULT_AUDIO_CODEC="mp4a.40.2",DEFAULT_VIDEO_CODEC="avc1.4d400d",MPEGURL_REGEX=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,DASH_REGEX=/^application\/dash\+xml/i,simpleTypeFromSourceType=function et(_e){return MPEGURL_REGEX.test(_e)?"hls":DASH_REGEX.test(_e)?"dash":_e==="application/vnd.videojs.vhs+json"?"vhs-json":null},countBits=function et(_e){return _e.toString(2).length},countBytes=function et(_e){return Math.ceil(countBits(_e)/8)},isArrayBufferView=function et(_e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(_e):_e&&_e.buffer instanceof ArrayBuffer},isTypedArray=function et(_e){return isArrayBufferView(_e)},toUint8=function et(_e){return _e instanceof Uint8Array?_e:(!Array.isArray(_e)&&!isTypedArray(_e)&&!(_e instanceof ArrayBuffer)&&(typeof _e!="number"||typeof _e=="number"&&_e!==_e?_e=0:_e=[_e]),new Uint8Array(_e&&_e.buffer||_e,_e&&_e.byteOffset||0,_e&&_e.byteLength||0))},BigInt$1=window$1.BigInt||Number,BYTE_TABLE=[BigInt$1("0x1"),BigInt$1("0x100"),BigInt$1("0x10000"),BigInt$1("0x1000000"),BigInt$1("0x100000000"),BigInt$1("0x10000000000"),BigInt$1("0x1000000000000"),BigInt$1("0x100000000000000"),BigInt$1("0x10000000000000000")];(function(){var et=new Uint16Array([65484]),_e=new Uint8Array(et.buffer,et.byteOffset,et.byteLength);return _e[0]===255?"big":_e[0]===204?"little":"unknown"})();var bytesToNumber=function et(_e,tt){var rt=tt===void 0?{}:tt,nt=rt.signed,st=nt===void 0?!1:nt,dt=rt.le,ft=dt===void 0?!1:dt;_e=toUint8(_e);var ht=ft?"reduce":"reduceRight",mt=_e[ht]?_e[ht]:Array.prototype[ht],bt=mt.call(_e,function(Et,Ct,Rt){var Tt=ft?Rt:Math.abs(Rt+1-_e.length);return Et+BigInt$1(Ct)*BYTE_TABLE[Tt]},BigInt$1(0));if(st){var St=BYTE_TABLE[_e.length]/BigInt$1(2)-BigInt$1(1);bt=BigInt$1(bt),bt>St&&(bt-=St,bt-=St,bt-=BigInt$1(2))}return Number(bt)},numberToBytes=function et(_e,tt){var rt={},nt=rt.le,st=nt===void 0?!1:nt;(typeof _e!="bigint"&&typeof _e!="number"||typeof _e=="number"&&_e!==_e)&&(_e=0),_e=BigInt$1(_e);for(var dt=countBytes(_e),ft=new Uint8Array(new ArrayBuffer(dt)),ht=0;ht<dt;ht++){var mt=st?ht:Math.abs(ht+1-ft.length);ft[mt]=Number(_e/BYTE_TABLE[ht]&BigInt$1(255)),_e<0&&(ft[mt]=Math.abs(~ft[mt]),ft[mt]-=ht===0?1:2)}return ft},stringToBytes=function et(_e,tt){if(typeof _e!="string"&&_e&&typeof _e.toString=="function"&&(_e=_e.toString()),typeof _e!="string")return new Uint8Array;tt||(_e=unescape(encodeURIComponent(_e)));for(var rt=new Uint8Array(_e.length),nt=0;nt<_e.length;nt++)rt[nt]=_e.charCodeAt(nt);return rt},concatTypedArrays=function et(){for(var _e=arguments.length,tt=new Array(_e),rt=0;rt<_e;rt++)tt[rt]=arguments[rt];if(tt=tt.filter(function(ft){return ft&&(ft.byteLength||ft.length)&&typeof ft!="string"}),tt.length<=1)return toUint8(tt[0]);var nt=tt.reduce(function(ft,ht,mt){return ft+(ht.byteLength||ht.length)},0),st=new Uint8Array(nt),dt=0;return tt.forEach(function(ft){ft=toUint8(ft),st.set(ft,dt),dt+=ft.byteLength}),st},bytesMatch=function et(_e,tt,rt){var nt=rt===void 0?{}:rt,st=nt.offset,dt=st===void 0?0:st,ft=nt.mask,ht=ft===void 0?[]:ft;_e=toUint8(_e),tt=toUint8(tt);var mt=tt.every?tt.every:Array.prototype.every;return tt.length&&_e.length-dt>=tt.length&&mt.call(tt,function(bt,St){var Et=ht[St]?ht[St]&_e[dt+St]:_e[dt+St];return bt===Et})},forEachMediaGroup$1=function et(_e,tt,rt){tt.forEach(function(nt){for(var st in _e.mediaGroups[nt])for(var dt in _e.mediaGroups[nt][st]){var ft=_e.mediaGroups[nt][st][dt];rt(ft,nt,st,dt)}})},lib={},dom={},conventions={},hasRequiredConventions;function requireConventions(){if(hasRequiredConventions)return conventions;hasRequiredConventions=1;function et(st,dt,ft){if(ft===void 0&&(ft=Array.prototype),st&&typeof ft.find=="function")return ft.find.call(st,dt);for(var ht=0;ht<st.length;ht++)if(Object.prototype.hasOwnProperty.call(st,ht)){var mt=st[ht];if(dt.call(void 0,mt,ht,st))return mt}}function _e(st,dt){return dt===void 0&&(dt=Object),dt&&typeof dt.freeze=="function"?dt.freeze(st):st}function tt(st,dt){if(st===null||typeof st!="object")throw new TypeError("target is not an object");for(var ft in dt)Object.prototype.hasOwnProperty.call(dt,ft)&&(st[ft]=dt[ft]);return st}var rt=_e({HTML:"text/html",isHTML:function(st){return st===rt.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),nt=_e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(st){return st===nt.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return conventions.assign=tt,conventions.find=et,conventions.freeze=_e,conventions.MIME_TYPE=rt,conventions.NAMESPACE=nt,conventions}var hasRequiredDom;function requireDom(){if(hasRequiredDom)return dom;hasRequiredDom=1;var et=requireConventions(),_e=et.find,tt=et.NAMESPACE;function rt(En){return En!==""}function nt(En){return En?En.split(/[\t\n\f\r ]+/).filter(rt):[]}function st(En,In){return En.hasOwnProperty(In)||(En[In]=!0),En}function dt(En){if(!En)return[];var In=nt(En);return Object.keys(In.reduce(st,{}))}function ft(En){return function(In){return En&&En.indexOf(In)!==-1}}function ht(En,In){for(var ds in En)Object.prototype.hasOwnProperty.call(En,ds)&&(In[ds]=En[ds])}function mt(En,In){var ds=En.prototype;if(!(ds instanceof In)){let Ps=function(){};Ps.prototype=In.prototype,Ps=new Ps,ht(ds,Ps),En.prototype=ds=Ps}ds.constructor!=En&&(typeof En!="function"&&console.error("unknown Class:"+En),ds.constructor=En)}var bt={},St=bt.ELEMENT_NODE=1,Et=bt.ATTRIBUTE_NODE=2,Ct=bt.TEXT_NODE=3,Rt=bt.CDATA_SECTION_NODE=4,Tt=bt.ENTITY_REFERENCE_NODE=5,wt=bt.ENTITY_NODE=6,At=bt.PROCESSING_INSTRUCTION_NODE=7,Nt=bt.COMMENT_NODE=8,Pt=bt.DOCUMENT_NODE=9,It=bt.DOCUMENT_TYPE_NODE=10,Ft=bt.DOCUMENT_FRAGMENT_NODE=11,qt=bt.NOTATION_NODE=12,Vt={},Kt={};Vt.INDEX_SIZE_ERR=(Kt[1]="Index size error",1),Vt.DOMSTRING_SIZE_ERR=(Kt[2]="DOMString size error",2);var jt=Vt.HIERARCHY_REQUEST_ERR=(Kt[3]="Hierarchy request error",3);Vt.WRONG_DOCUMENT_ERR=(Kt[4]="Wrong document",4),Vt.INVALID_CHARACTER_ERR=(Kt[5]="Invalid character",5),Vt.NO_DATA_ALLOWED_ERR=(Kt[6]="No data allowed",6),Vt.NO_MODIFICATION_ALLOWED_ERR=(Kt[7]="No modification allowed",7);var Ut=Vt.NOT_FOUND_ERR=(Kt[8]="Not found",8);Vt.NOT_SUPPORTED_ERR=(Kt[9]="Not supported",9);var Ot=Vt.INUSE_ATTRIBUTE_ERR=(Kt[10]="Attribute in use",10);Vt.INVALID_STATE_ERR=(Kt[11]="Invalid state",11),Vt.SYNTAX_ERR=(Kt[12]="Syntax error",12),Vt.INVALID_MODIFICATION_ERR=(Kt[13]="Invalid modification",13),Vt.NAMESPACE_ERR=(Kt[14]="Invalid namespace",14),Vt.INVALID_ACCESS_ERR=(Kt[15]="Invalid access",15);function Wt(En,In){if(In instanceof Error)var ds=In;else ds=this,Error.call(this,Kt[En]),this.message=Kt[En],Error.captureStackTrace&&Error.captureStackTrace(this,Wt);return ds.code=En,In&&(this.message=this.message+": "+In),ds}Wt.prototype=Error.prototype,ht(Vt,Wt);function Bt(){}Bt.prototype={length:0,item:function(En){return En>=0&&En<this.length?this[En]:null},toString:function(En,In){for(var ds=[],Ps=0;Ps<this.length;Ps++)Rs(this[Ps],ds,En,In);return ds.join("")},filter:function(En){return Array.prototype.filter.call(this,En)},indexOf:function(En){return Array.prototype.indexOf.call(this,En)}};function tr(En,In){this._node=En,this._refresh=In,Jt(this)}function Jt(En){var In=En._node._inc||En._node.ownerDocument._inc;if(En._inc!==In){var ds=En._refresh(En._node);if(Bo(En,"length",ds.length),!En.$$length||ds.length<En.$$length)for(var Ps=ds.length;Ps in En;Ps++)Object.prototype.hasOwnProperty.call(En,Ps)&&delete En[Ps];ht(ds,En),En._inc=In}}tr.prototype.item=function(En){return Jt(this),this[En]||null},mt(tr,Bt);function ar(){}function pr(En,In){for(var ds=En.length;ds--;)if(En[ds]===In)return ds}function cr(En,In,ds,Ps){if(Ps?In[pr(In,Ps)]=ds:In[In.length++]=ds,En){ds.ownerElement=En;var yo=En.ownerDocument;yo&&(Ps&&Yr(yo,En,Ps),Nr(yo,En,ds))}}function gr(En,In,ds){var Ps=pr(In,ds);if(Ps>=0){for(var yo=In.length-1;Ps<yo;)In[Ps]=In[++Ps];if(In.length=yo,En){var rn=En.ownerDocument;rn&&(Yr(rn,En,ds),ds.ownerElement=null)}}else throw new Wt(Ut,new Error(En.tagName+"@"+ds))}ar.prototype={length:0,item:Bt.prototype.item,getNamedItem:function(En){for(var In=this.length;In--;){var ds=this[In];if(ds.nodeName==En)return ds}},setNamedItem:function(En){var In=En.ownerElement;if(In&&In!=this._ownerElement)throw new Wt(Ot);var ds=this.getNamedItem(En.nodeName);return cr(this._ownerElement,this,En,ds),ds},setNamedItemNS:function(En){var In=En.ownerElement,ds;if(In&&In!=this._ownerElement)throw new Wt(Ot);return ds=this.getNamedItemNS(En.namespaceURI,En.localName),cr(this._ownerElement,this,En,ds),ds},removeNamedItem:function(En){var In=this.getNamedItem(En);return gr(this._ownerElement,this,In),In},removeNamedItemNS:function(En,In){var ds=this.getNamedItemNS(En,In);return gr(this._ownerElement,this,ds),ds},getNamedItemNS:function(En,In){for(var ds=this.length;ds--;){var Ps=this[ds];if(Ps.localName==In&&Ps.namespaceURI==En)return Ps}return null}};function Sr(){}Sr.prototype={hasFeature:function(En,In){return!0},createDocument:function(En,In,ds){var Ps=new Mr;if(Ps.implementation=this,Ps.childNodes=new Bt,Ps.doctype=ds||null,ds&&Ps.appendChild(ds),In){var yo=Ps.createElementNS(En,In);Ps.appendChild(yo)}return Ps},createDocumentType:function(En,In,ds){var Ps=new Un;return Ps.name=En,Ps.nodeName=En,Ps.publicId=In||"",Ps.systemId=ds||"",Ps}};function Er(){}Er.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(En,In){return qs(this,En,In)},replaceChild:function(En,In){qs(this,En,In,rs),In&&this.removeChild(In)},removeChild:function(En){return Ar(this,En)},appendChild:function(En){return this.insertBefore(En,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(En){return vo(this.ownerDocument||this,this,En)},normalize:function(){for(var En=this.firstChild;En;){var In=En.nextSibling;In&&In.nodeType==Ct&&En.nodeType==Ct?(this.removeChild(In),En.appendData(In.data)):(En.normalize(),En=In)}},isSupported:function(En,In){return this.ownerDocument.implementation.hasFeature(En,In)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(En){for(var In=this;In;){var ds=In._nsMap;if(ds){for(var Ps in ds)if(Object.prototype.hasOwnProperty.call(ds,Ps)&&ds[Ps]===En)return Ps}In=In.nodeType==Et?In.ownerDocument:In.parentNode}return null},lookupNamespaceURI:function(En){for(var In=this;In;){var ds=In._nsMap;if(ds&&Object.prototype.hasOwnProperty.call(ds,En))return ds[En];In=In.nodeType==Et?In.ownerDocument:In.parentNode}return null},isDefaultNamespace:function(En){var In=this.lookupPrefix(En);return In==null}};function Vr(En){return En=="<"&&"&lt;"||En==">"&&"&gt;"||En=="&"&&"&amp;"||En=='"'&&"&quot;"||"&#"+En.charCodeAt()+";"}ht(bt,Er),ht(bt,Er.prototype);function Wr(En,In){if(In(En))return!0;if(En=En.firstChild)do if(Wr(En,In))return!0;while(En=En.nextSibling)}function Mr(){this.ownerDocument=this}function Nr(En,In,ds){En&&En._inc++;var Ps=ds.namespaceURI;Ps===tt.XMLNS&&(In._nsMap[ds.prefix?ds.localName:""]=ds.value)}function Yr(En,In,ds,Ps){En&&En._inc++;var yo=ds.namespaceURI;yo===tt.XMLNS&&delete In._nsMap[ds.prefix?ds.localName:""]}function Or(En,In,ds){if(En&&En._inc){En._inc++;var Ps=In.childNodes;if(ds)Ps[Ps.length++]=ds;else{for(var yo=In.firstChild,rn=0;yo;)Ps[rn++]=yo,yo=yo.nextSibling;Ps.length=rn,delete Ps[Ps.length]}}}function Ar(En,In){var ds=In.previousSibling,Ps=In.nextSibling;return ds?ds.nextSibling=Ps:En.firstChild=Ps,Ps?Ps.previousSibling=ds:En.lastChild=ds,In.parentNode=null,In.previousSibling=null,In.nextSibling=null,Or(En.ownerDocument,En),In}function Qr(En){return En&&(En.nodeType===Er.DOCUMENT_NODE||En.nodeType===Er.DOCUMENT_FRAGMENT_NODE||En.nodeType===Er.ELEMENT_NODE)}function hn(En){return En&&(Kr(En)||Hn(En)||Sn(En)||En.nodeType===Er.DOCUMENT_FRAGMENT_NODE||En.nodeType===Er.COMMENT_NODE||En.nodeType===Er.PROCESSING_INSTRUCTION_NODE)}function Sn(En){return En&&En.nodeType===Er.DOCUMENT_TYPE_NODE}function Kr(En){return En&&En.nodeType===Er.ELEMENT_NODE}function Hn(En){return En&&En.nodeType===Er.TEXT_NODE}function ln(En,In){var ds=En.childNodes||[];if(_e(ds,Kr)||Sn(In))return!1;var Ps=_e(ds,Sn);return!(In&&Ps&&ds.indexOf(Ps)>ds.indexOf(In))}function kn(En,In){var ds=En.childNodes||[];function Ps(rn){return Kr(rn)&&rn!==In}if(_e(ds,Ps))return!1;var yo=_e(ds,Sn);return!(In&&yo&&ds.indexOf(yo)>ds.indexOf(In))}function xn(En,In,ds){if(!Qr(En))throw new Wt(jt,"Unexpected parent node type "+En.nodeType);if(ds&&ds.parentNode!==En)throw new Wt(Ut,"child not in parent");if(!hn(In)||Sn(In)&&En.nodeType!==Er.DOCUMENT_NODE)throw new Wt(jt,"Unexpected node type "+In.nodeType+" for parent node type "+En.nodeType)}function An(En,In,ds){var Ps=En.childNodes||[],yo=In.childNodes||[];if(In.nodeType===Er.DOCUMENT_FRAGMENT_NODE){var rn=yo.filter(Kr);if(rn.length>1||_e(yo,Hn))throw new Wt(jt,"More than one element or text in fragment");if(rn.length===1&&!ln(En,ds))throw new Wt(jt,"Element in fragment can not be inserted before doctype")}if(Kr(In)&&!ln(En,ds))throw new Wt(jt,"Only one element can be added and only after doctype");if(Sn(In)){if(_e(Ps,Sn))throw new Wt(jt,"Only one doctype is allowed");var es=_e(Ps,Kr);if(ds&&Ps.indexOf(es)<Ps.indexOf(ds))throw new Wt(jt,"Doctype can only be inserted before an element");if(!ds&&es)throw new Wt(jt,"Doctype can not be appended since element is present")}}function rs(En,In,ds){var Ps=En.childNodes||[],yo=In.childNodes||[];if(In.nodeType===Er.DOCUMENT_FRAGMENT_NODE){var rn=yo.filter(Kr);if(rn.length>1||_e(yo,Hn))throw new Wt(jt,"More than one element or text in fragment");if(rn.length===1&&!kn(En,ds))throw new Wt(jt,"Element in fragment can not be inserted before doctype")}if(Kr(In)&&!kn(En,ds))throw new Wt(jt,"Only one element can be added and only after doctype");if(Sn(In)){if(_e(Ps,function(Ro){return Sn(Ro)&&Ro!==ds}))throw new Wt(jt,"Only one doctype is allowed");var es=_e(Ps,Kr);if(ds&&Ps.indexOf(es)<Ps.indexOf(ds))throw new Wt(jt,"Doctype can only be inserted before an element")}}function qs(En,In,ds,Ps){xn(En,In,ds),En.nodeType===Er.DOCUMENT_NODE&&(Ps||An)(En,In,ds);var yo=In.parentNode;if(yo&&yo.removeChild(In),In.nodeType===Ft){var rn=In.firstChild;if(rn==null)return In;var es=In.lastChild}else rn=es=In;var Gs=ds?ds.previousSibling:En.lastChild;rn.previousSibling=Gs,es.nextSibling=ds,Gs?Gs.nextSibling=rn:En.firstChild=rn,ds==null?En.lastChild=es:ds.previousSibling=es;do{rn.parentNode=En;var Ro=En.ownerDocument||En;Ln(rn,Ro)}while(rn!==es&&(rn=rn.nextSibling));return Or(En.ownerDocument||En,En),In.nodeType==Ft&&(In.firstChild=In.lastChild=null),In}function Ln(En,In){if(En.ownerDocument!==In){if(En.ownerDocument=In,En.nodeType===St&&En.attributes)for(var ds=0;ds<En.attributes.length;ds++){var Ps=En.attributes.item(ds);Ps&&(Ps.ownerDocument=In)}for(var yo=En.firstChild;yo;)Ln(yo,In),yo=yo.nextSibling}}function Cn(En,In){In.parentNode&&In.parentNode.removeChild(In),In.parentNode=En,In.previousSibling=En.lastChild,In.nextSibling=null,In.previousSibling?In.previousSibling.nextSibling=In:En.firstChild=In,En.lastChild=In,Or(En.ownerDocument,En,In);var ds=En.ownerDocument||En;return Ln(In,ds),In}Mr.prototype={nodeName:"#document",nodeType:Pt,doctype:null,documentElement:null,_inc:1,insertBefore:function(En,In){if(En.nodeType==Ft){for(var ds=En.firstChild;ds;){var Ps=ds.nextSibling;this.insertBefore(ds,In),ds=Ps}return En}return qs(this,En,In),Ln(En,this),this.documentElement===null&&En.nodeType===St&&(this.documentElement=En),En},removeChild:function(En){return this.documentElement==En&&(this.documentElement=null),Ar(this,En)},replaceChild:function(En,In){qs(this,En,In,rs),Ln(En,this),In&&this.removeChild(In),Kr(En)&&(this.documentElement=En)},importNode:function(En,In){return io(this,En,In)},getElementById:function(En){var In=null;return Wr(this.documentElement,function(ds){if(ds.nodeType==St&&ds.getAttribute("id")==En)return In=ds,!0}),In},getElementsByClassName:function(En){var In=dt(En);return new tr(this,function(ds){var Ps=[];return In.length>0&&Wr(ds.documentElement,function(yo){if(yo!==ds&&yo.nodeType===St){var rn=yo.getAttribute("class");if(rn){var es=En===rn;if(!es){var Gs=dt(rn);es=In.every(ft(Gs))}es&&Ps.push(yo)}}}),Ps})},createElement:function(En){var In=new Nn;In.ownerDocument=this,In.nodeName=En,In.tagName=En,In.localName=En,In.childNodes=new Bt;var ds=In.attributes=new ar;return ds._ownerElement=In,In},createDocumentFragment:function(){var En=new qn;return En.ownerDocument=this,En.childNodes=new Bt,En},createTextNode:function(En){var In=new dn;return In.ownerDocument=this,In.appendData(En),In},createComment:function(En){var In=new Rn;return In.ownerDocument=this,In.appendData(En),In},createCDATASection:function(En){var In=new wn;return In.ownerDocument=this,In.appendData(En),In},createProcessingInstruction:function(En,In){var ds=new _a;return ds.ownerDocument=this,ds.tagName=ds.nodeName=ds.target=En,ds.nodeValue=ds.data=In,ds},createAttribute:function(En){var In=new Gr;return In.ownerDocument=this,In.name=En,In.nodeName=En,In.localName=En,In.specified=!0,In},createEntityReference:function(En){var In=new Dn;return In.ownerDocument=this,In.nodeName=En,In},createElementNS:function(En,In){var ds=new Nn,Ps=In.split(":"),yo=ds.attributes=new ar;return ds.childNodes=new Bt,ds.ownerDocument=this,ds.nodeName=In,ds.tagName=In,ds.namespaceURI=En,Ps.length==2?(ds.prefix=Ps[0],ds.localName=Ps[1]):ds.localName=In,yo._ownerElement=ds,ds},createAttributeNS:function(En,In){var ds=new Gr,Ps=In.split(":");return ds.ownerDocument=this,ds.nodeName=In,ds.name=In,ds.namespaceURI=En,ds.specified=!0,Ps.length==2?(ds.prefix=Ps[0],ds.localName=Ps[1]):ds.localName=In,ds}},mt(Mr,Er);function Nn(){this._nsMap={}}Nn.prototype={nodeType:St,hasAttribute:function(En){return this.getAttributeNode(En)!=null},getAttribute:function(En){var In=this.getAttributeNode(En);return In&&In.value||""},getAttributeNode:function(En){return this.attributes.getNamedItem(En)},setAttribute:function(En,In){var ds=this.ownerDocument.createAttribute(En);ds.value=ds.nodeValue=""+In,this.setAttributeNode(ds)},removeAttribute:function(En){var In=this.getAttributeNode(En);In&&this.removeAttributeNode(In)},appendChild:function(En){return En.nodeType===Ft?this.insertBefore(En,null):Cn(this,En)},setAttributeNode:function(En){return this.attributes.setNamedItem(En)},setAttributeNodeNS:function(En){return this.attributes.setNamedItemNS(En)},removeAttributeNode:function(En){return this.attributes.removeNamedItem(En.nodeName)},removeAttributeNS:function(En,In){var ds=this.getAttributeNodeNS(En,In);ds&&this.removeAttributeNode(ds)},hasAttributeNS:function(En,In){return this.getAttributeNodeNS(En,In)!=null},getAttributeNS:function(En,In){var ds=this.getAttributeNodeNS(En,In);return ds&&ds.value||""},setAttributeNS:function(En,In,ds){var Ps=this.ownerDocument.createAttributeNS(En,In);Ps.value=Ps.nodeValue=""+ds,this.setAttributeNode(Ps)},getAttributeNodeNS:function(En,In){return this.attributes.getNamedItemNS(En,In)},getElementsByTagName:function(En){return new tr(this,function(In){var ds=[];return Wr(In,function(Ps){Ps!==In&&Ps.nodeType==St&&(En==="*"||Ps.tagName==En)&&ds.push(Ps)}),ds})},getElementsByTagNameNS:function(En,In){return new tr(this,function(ds){var Ps=[];return Wr(ds,function(yo){yo!==ds&&yo.nodeType===St&&(En==="*"||yo.namespaceURI===En)&&(In==="*"||yo.localName==In)&&Ps.push(yo)}),Ps})}},Mr.prototype.getElementsByTagName=Nn.prototype.getElementsByTagName,Mr.prototype.getElementsByTagNameNS=Nn.prototype.getElementsByTagNameNS,mt(Nn,Er);function Gr(){}Gr.prototype.nodeType=Et,mt(Gr,Er);function tn(){}tn.prototype={data:"",substringData:function(En,In){return this.data.substring(En,En+In)},appendData:function(En){En=this.data+En,this.nodeValue=this.data=En,this.length=En.length},insertData:function(En,In){this.replaceData(En,0,In)},appendChild:function(En){throw new Error(Kt[jt])},deleteData:function(En,In){this.replaceData(En,In,"")},replaceData:function(En,In,ds){var Ps=this.data.substring(0,En),yo=this.data.substring(En+In);ds=Ps+ds+yo,this.nodeValue=this.data=ds,this.length=ds.length}},mt(tn,Er);function dn(){}dn.prototype={nodeName:"#text",nodeType:Ct,splitText:function(En){var In=this.data,ds=In.substring(En);In=In.substring(0,En),this.data=this.nodeValue=In,this.length=In.length;var Ps=this.ownerDocument.createTextNode(ds);return this.parentNode&&this.parentNode.insertBefore(Ps,this.nextSibling),Ps}},mt(dn,tn);function Rn(){}Rn.prototype={nodeName:"#comment",nodeType:Nt},mt(Rn,tn);function wn(){}wn.prototype={nodeName:"#cdata-section",nodeType:Rt},mt(wn,tn);function Un(){}Un.prototype.nodeType=It,mt(Un,Er);function Zn(){}Zn.prototype.nodeType=qt,mt(Zn,Er);function pn(){}pn.prototype.nodeType=wt,mt(pn,Er);function Dn(){}Dn.prototype.nodeType=Tt,mt(Dn,Er);function qn(){}qn.prototype.nodeName="#document-fragment",qn.prototype.nodeType=Ft,mt(qn,Er);function _a(){}_a.prototype.nodeType=At,mt(_a,Er);function Vn(){}Vn.prototype.serializeToString=function(En,In,ds){return bs.call(En,In,ds)},Er.prototype.toString=bs;function bs(En,In){var ds=[],Ps=this.nodeType==9&&this.documentElement||this,yo=Ps.prefix,rn=Ps.namespaceURI;if(rn&&yo==null){var yo=Ps.lookupPrefix(rn);if(yo==null)var es=[{namespace:rn,prefix:null}]}return Rs(this,ds,En,In,es),ds.join("")}function Is(En,In,ds){var Ps=En.prefix||"",yo=En.namespaceURI;if(!yo||Ps==="xml"&&yo===tt.XML||yo===tt.XMLNS)return!1;for(var rn=ds.length;rn--;){var es=ds[rn];if(es.prefix===Ps)return es.namespace!==yo}return!0}function uo(En,In,ds){En.push(" ",In,'="',ds.replace(/[<>&"\t\n\r]/g,Vr),'"')}function Rs(En,In,ds,Ps,yo){if(yo||(yo=[]),Ps)if(En=Ps(En),En){if(typeof En=="string"){In.push(En);return}}else return;switch(En.nodeType){case St:var rn=En.attributes,es=rn.length,Lu=En.firstChild,Gs=En.tagName;ds=tt.isHTML(En.namespaceURI)||ds;var Ro=Gs;if(!ds&&!En.prefix&&En.namespaceURI){for(var ru,du=0;du<rn.length;du++)if(rn.item(du).name==="xmlns"){ru=rn.item(du).value;break}if(!ru)for(var Iu=yo.length-1;Iu>=0;Iu--){var Sl=yo[Iu];if(Sl.prefix===""&&Sl.namespace===En.namespaceURI){ru=Sl.namespace;break}}if(ru!==En.namespaceURI)for(var Iu=yo.length-1;Iu>=0;Iu--){var Sl=yo[Iu];if(Sl.namespace===En.namespaceURI){Sl.prefix&&(Ro=Sl.prefix+":"+Gs);break}}}In.push("<",Ro);for(var Ko=0;Ko<es;Ko++){var Fl=rn.item(Ko);Fl.prefix=="xmlns"?yo.push({prefix:Fl.localName,namespace:Fl.value}):Fl.nodeName=="xmlns"&&yo.push({prefix:"",namespace:Fl.value})}for(var Ko=0;Ko<es;Ko++){var Fl=rn.item(Ko);if(Is(Fl,ds,yo)){var gl=Fl.prefix||"",Gu=Fl.namespaceURI;uo(In,gl?"xmlns:"+gl:"xmlns",Gu),yo.push({prefix:gl,namespace:Gu})}Rs(Fl,In,ds,Ps,yo)}if(Gs===Ro&&Is(En,ds,yo)){var gl=En.prefix||"",Gu=En.namespaceURI;uo(In,gl?"xmlns:"+gl:"xmlns",Gu),yo.push({prefix:gl,namespace:Gu})}if(Lu||ds&&!/^(?:meta|link|img|br|hr|input)$/i.test(Gs)){if(In.push(">"),ds&&/^script$/i.test(Gs))for(;Lu;)Lu.data?In.push(Lu.data):Rs(Lu,In,ds,Ps,yo.slice()),Lu=Lu.nextSibling;else for(;Lu;)Rs(Lu,In,ds,Ps,yo.slice()),Lu=Lu.nextSibling;In.push("</",Ro,">")}else In.push("/>");return;case Pt:case Ft:for(var Lu=En.firstChild;Lu;)Rs(Lu,In,ds,Ps,yo.slice()),Lu=Lu.nextSibling;return;case Et:return uo(In,En.name,En.value);case Ct:return In.push(En.data.replace(/[<&>]/g,Vr));case Rt:return In.push("<![CDATA[",En.data,"]]>");case Nt:return In.push("<!--",En.data,"-->");case It:var Ku=En.publicId,uu=En.systemId;if(In.push("<!DOCTYPE ",En.name),Ku)In.push(" PUBLIC ",Ku),uu&&uu!="."&&In.push(" ",uu),In.push(">");else if(uu&&uu!=".")In.push(" SYSTEM ",uu,">");else{var en=En.internalSubset;en&&In.push(" [",en,"]"),In.push(">")}return;case At:return In.push("<?",En.target," ",En.data,"?>");case Tt:return In.push("&",En.nodeName,";");default:In.push("??",En.nodeName)}}function io(En,In,ds){var Ps;switch(In.nodeType){case St:Ps=In.cloneNode(!1),Ps.ownerDocument=En;case Ft:break;case Et:ds=!0;break}if(Ps||(Ps=In.cloneNode(!1)),Ps.ownerDocument=En,Ps.parentNode=null,ds)for(var yo=In.firstChild;yo;)Ps.appendChild(io(En,yo,ds)),yo=yo.nextSibling;return Ps}function vo(En,In,ds){var Ps=new In.constructor;for(var yo in In)if(Object.prototype.hasOwnProperty.call(In,yo)){var rn=In[yo];typeof rn!="object"&&rn!=Ps[yo]&&(Ps[yo]=rn)}switch(In.childNodes&&(Ps.childNodes=new Bt),Ps.ownerDocument=En,Ps.nodeType){case St:var es=In.attributes,Gs=Ps.attributes=new ar,Ro=es.length;Gs._ownerElement=Ps;for(var ru=0;ru<Ro;ru++)Ps.setAttributeNode(vo(En,es.item(ru),!0));break;case Et:ds=!0}if(ds)for(var du=In.firstChild;du;)Ps.appendChild(vo(En,du,ds)),du=du.nextSibling;return Ps}function Bo(En,In,ds){En[In]=ds}try{if(Object.defineProperty){let En=function(In){switch(In.nodeType){case St:case Ft:var ds=[];for(In=In.firstChild;In;)In.nodeType!==7&&In.nodeType!==8&&ds.push(En(In)),In=In.nextSibling;return ds.join("");default:return In.nodeValue}};Object.defineProperty(tr.prototype,"length",{get:function(){return Jt(this),this.$$length}}),Object.defineProperty(Er.prototype,"textContent",{get:function(){return En(this)},set:function(In){switch(this.nodeType){case St:case Ft:for(;this.firstChild;)this.removeChild(this.firstChild);(In||String(In))&&this.appendChild(this.ownerDocument.createTextNode(In));break;default:this.data=In,this.value=In,this.nodeValue=In}}}),Bo=function(In,ds,Ps){In["$$"+ds]=Ps}}}catch{}return dom.DocumentType=Un,dom.DOMException=Wt,dom.DOMImplementation=Sr,dom.Element=Nn,dom.Node=Er,dom.NodeList=Bt,dom.XMLSerializer=Vn,dom}var domParser={},entities={},hasRequiredEntities;function requireEntities(){return hasRequiredEntities||(hasRequiredEntities=1,(function(et){var _e=requireConventions().freeze;et.XML_ENTITIES=_e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),et.HTML_ENTITIES=_e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"",dd:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"",escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",ExponentialE:"",exponentiale:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",Fscr:"",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"",hfr:"𝔥",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",Lscr:"",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",Or:"⩔",or:"",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",Popf:"",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"",rationals:"",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",Rscr:"",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",Tilde:"",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"",vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),et.entityMap=et.HTML_ENTITIES})(entities)),entities}var sax={},hasRequiredSax;function requireSax(){if(hasRequiredSax)return sax;hasRequiredSax=1;var et=requireConventions().NAMESPACE,_e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,tt=new RegExp("[\\-\\.0-9"+_e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),rt=new RegExp("^"+_e.source+tt.source+"*(?::"+_e.source+tt.source+"*)?$"),nt=0,st=1,dt=2,ft=3,ht=4,mt=5,bt=6,St=7;function Et(jt,Ut){this.message=jt,this.locator=Ut,Error.captureStackTrace&&Error.captureStackTrace(this,Et)}Et.prototype=new Error,Et.prototype.name=Et.name;function Ct(){}Ct.prototype={parse:function(jt,Ut,Ot){var Wt=this.domBuilder;Wt.startDocument(),It(Ut,Ut={}),Rt(jt,Ut,Ot,Wt,this.errorHandler),Wt.endDocument()}};function Rt(jt,Ut,Ot,Wt,Bt){function tr(Cn){if(Cn>65535){Cn-=65536;var Nn=55296+(Cn>>10),Gr=56320+(Cn&1023);return String.fromCharCode(Nn,Gr)}else return String.fromCharCode(Cn)}function Jt(Cn){var Nn=Cn.slice(1,-1);return Object.hasOwnProperty.call(Ot,Nn)?Ot[Nn]:Nn.charAt(0)==="#"?tr(parseInt(Nn.substr(1).replace("x","0x"))):(Bt.error("entity not found:"+Cn),Cn)}function ar(Cn){if(Cn>Mr){var Nn=jt.substring(Mr,Cn).replace(/&#?\w+;/g,Jt);Er&&pr(Mr),Wt.characters(Nn,0,Cn-Mr),Mr=Cn}}function pr(Cn,Nn){for(;Cn>=gr&&(Nn=Sr.exec(jt));)cr=Nn.index,gr=cr+Nn[0].length,Er.lineNumber++;Er.columnNumber=Cn-cr+1}for(var cr=0,gr=0,Sr=/.*(?:\r\n?|\n)|.*$/g,Er=Wt.locator,Vr=[{currentNSMap:Ut}],Wr={},Mr=0;;){try{var Nr=jt.indexOf("<",Mr);if(Nr<0){if(!jt.substr(Mr).match(/^\s*$/)){var Yr=Wt.doc,Or=Yr.createTextNode(jt.substr(Mr));Yr.appendChild(Or),Wt.currentElement=Or}return}switch(Nr>Mr&&ar(Nr),jt.charAt(Nr+1)){case"/":var xn=jt.indexOf(">",Nr+3),Ar=jt.substring(Nr+2,xn).replace(/[ \t\n\r]+$/g,""),Qr=Vr.pop();xn<0?(Ar=jt.substring(Nr+2).replace(/[\s<].*/,""),Bt.error("end tag name: "+Ar+" is not complete:"+Qr.tagName),xn=Nr+1+Ar.length):Ar.match(/\s</)&&(Ar=Ar.replace(/[\s<].*/,""),Bt.error("end tag name: "+Ar+" maybe not complete"),xn=Nr+1+Ar.length);var hn=Qr.localNSMap,Sn=Qr.tagName==Ar,Kr=Sn||Qr.tagName&&Qr.tagName.toLowerCase()==Ar.toLowerCase();if(Kr){if(Wt.endElement(Qr.uri,Qr.localName,Ar),hn)for(var Hn in hn)Object.prototype.hasOwnProperty.call(hn,Hn)&&Wt.endPrefixMapping(Hn);Sn||Bt.fatalError("end tag name: "+Ar+" is not match the current start tagName:"+Qr.tagName)}else Vr.push(Qr);xn++;break;case"?":Er&&pr(Nr),xn=qt(jt,Nr,Wt);break;case"!":Er&&pr(Nr),xn=Ft(jt,Nr,Wt,Bt);break;default:Er&&pr(Nr);var ln=new Vt,kn=Vr[Vr.length-1].currentNSMap,xn=wt(jt,Nr,ln,kn,Jt,Bt),An=ln.length;if(!ln.closed&&Pt(jt,xn,ln.tagName,Wr)&&(ln.closed=!0,Ot.nbsp||Bt.warning("unclosed xml attribute")),Er&&An){for(var rs=Tt(Er,{}),qs=0;qs<An;qs++){var Ln=ln[qs];pr(Ln.offset),Ln.locator=Tt(Er,{})}Wt.locator=rs,At(ln,Wt,kn)&&Vr.push(ln),Wt.locator=Er}else At(ln,Wt,kn)&&Vr.push(ln);et.isHTML(ln.uri)&&!ln.closed?xn=Nt(jt,xn,ln.tagName,Jt,Wt):xn++}}catch(Cn){if(Cn instanceof Et)throw Cn;Bt.error("element parse error: "+Cn),xn=-1}xn>Mr?Mr=xn:ar(Math.max(Nr,Mr)+1)}}function Tt(jt,Ut){return Ut.lineNumber=jt.lineNumber,Ut.columnNumber=jt.columnNumber,Ut}function wt(jt,Ut,Ot,Wt,Bt,tr){function Jt(Er,Vr,Wr){Ot.attributeNames.hasOwnProperty(Er)&&tr.fatalError("Attribute "+Er+" redefined"),Ot.addValue(Er,Vr.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,Bt),Wr)}for(var ar,pr,cr=++Ut,gr=nt;;){var Sr=jt.charAt(cr);switch(Sr){case"=":if(gr===st)ar=jt.slice(Ut,cr),gr=ft;else if(gr===dt)gr=ft;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(gr===ft||gr===st)if(gr===st&&(tr.warning('attribute value must after "="'),ar=jt.slice(Ut,cr)),Ut=cr+1,cr=jt.indexOf(Sr,Ut),cr>0)pr=jt.slice(Ut,cr),Jt(ar,pr,Ut-1),gr=mt;else throw new Error("attribute value no end '"+Sr+"' match");else if(gr==ht)pr=jt.slice(Ut,cr),Jt(ar,pr,Ut),tr.warning('attribute "'+ar+'" missed start quot('+Sr+")!!"),Ut=cr+1,gr=mt;else throw new Error('attribute value must after "="');break;case"/":switch(gr){case nt:Ot.setTagName(jt.slice(Ut,cr));case mt:case bt:case St:gr=St,Ot.closed=!0;case ht:case st:break;case dt:Ot.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return tr.error("unexpected end of input"),gr==nt&&Ot.setTagName(jt.slice(Ut,cr)),cr;case">":switch(gr){case nt:Ot.setTagName(jt.slice(Ut,cr));case mt:case bt:case St:break;case ht:case st:pr=jt.slice(Ut,cr),pr.slice(-1)==="/"&&(Ot.closed=!0,pr=pr.slice(0,-1));case dt:gr===dt&&(pr=ar),gr==ht?(tr.warning('attribute "'+pr+'" missed quot(")!'),Jt(ar,pr,Ut)):((!et.isHTML(Wt[""])||!pr.match(/^(?:disabled|checked|selected)$/i))&&tr.warning('attribute "'+pr+'" missed value!! "'+pr+'" instead!!'),Jt(pr,pr,Ut));break;case ft:throw new Error("attribute value missed!!")}return cr;case"€":Sr=" ";default:if(Sr<=" ")switch(gr){case nt:Ot.setTagName(jt.slice(Ut,cr)),gr=bt;break;case st:ar=jt.slice(Ut,cr),gr=dt;break;case ht:var pr=jt.slice(Ut,cr);tr.warning('attribute "'+pr+'" missed quot(")!!'),Jt(ar,pr,Ut);case mt:gr=bt;break}else switch(gr){case dt:Ot.tagName,(!et.isHTML(Wt[""])||!ar.match(/^(?:disabled|checked|selected)$/i))&&tr.warning('attribute "'+ar+'" missed value!! "'+ar+'" instead2!!'),Jt(ar,ar,Ut),Ut=cr,gr=st;break;case mt:tr.warning('attribute space is required"'+ar+'"!!');case bt:gr=st,Ut=cr;break;case ft:gr=ht,Ut=cr;break;case St:throw new Error("elements closed character '/' and '>' must be connected to")}}cr++}}function At(jt,Ut,Ot){for(var Wt=jt.tagName,Bt=null,Sr=jt.length;Sr--;){var tr=jt[Sr],Jt=tr.qName,ar=tr.value,Er=Jt.indexOf(":");if(Er>0)var pr=tr.prefix=Jt.slice(0,Er),cr=Jt.slice(Er+1),gr=pr==="xmlns"&&cr;else cr=Jt,pr=null,gr=Jt==="xmlns"&&"";tr.localName=cr,gr!==!1&&(Bt==null&&(Bt={},It(Ot,Ot={})),Ot[gr]=Bt[gr]=ar,tr.uri=et.XMLNS,Ut.startPrefixMapping(gr,ar))}for(var Sr=jt.length;Sr--;){tr=jt[Sr];var pr=tr.prefix;pr&&(pr==="xml"&&(tr.uri=et.XML),pr!=="xmlns"&&(tr.uri=Ot[pr||""]))}var Er=Wt.indexOf(":");Er>0?(pr=jt.prefix=Wt.slice(0,Er),cr=jt.localName=Wt.slice(Er+1)):(pr=null,cr=jt.localName=Wt);var Vr=jt.uri=Ot[pr||""];if(Ut.startElement(Vr,cr,Wt,jt),jt.closed){if(Ut.endElement(Vr,cr,Wt),Bt)for(pr in Bt)Object.prototype.hasOwnProperty.call(Bt,pr)&&Ut.endPrefixMapping(pr)}else return jt.currentNSMap=Ot,jt.localNSMap=Bt,!0}function Nt(jt,Ut,Ot,Wt,Bt){if(/^(?:script|textarea)$/i.test(Ot)){var tr=jt.indexOf("</"+Ot+">",Ut),Jt=jt.substring(Ut+1,tr);if(/[&<]/.test(Jt))return/^script$/i.test(Ot)?(Bt.characters(Jt,0,Jt.length),tr):(Jt=Jt.replace(/&#?\w+;/g,Wt),Bt.characters(Jt,0,Jt.length),tr)}return Ut+1}function Pt(jt,Ut,Ot,Wt){var Bt=Wt[Ot];return Bt==null&&(Bt=jt.lastIndexOf("</"+Ot+">"),Bt<Ut&&(Bt=jt.lastIndexOf("</"+Ot)),Wt[Ot]=Bt),Bt<Ut}function It(jt,Ut){for(var Ot in jt)Object.prototype.hasOwnProperty.call(jt,Ot)&&(Ut[Ot]=jt[Ot])}function Ft(jt,Ut,Ot,Wt){var Bt=jt.charAt(Ut+2);switch(Bt){case"-":if(jt.charAt(Ut+3)==="-"){var tr=jt.indexOf("-->",Ut+4);return tr>Ut?(Ot.comment(jt,Ut+4,tr-Ut-4),tr+3):(Wt.error("Unclosed comment"),-1)}else return-1;default:if(jt.substr(Ut+3,6)=="CDATA["){var tr=jt.indexOf("]]>",Ut+9);return Ot.startCDATA(),Ot.characters(jt,Ut+9,tr-Ut-9),Ot.endCDATA(),tr+3}var Jt=Kt(jt,Ut),ar=Jt.length;if(ar>1&&/!doctype/i.test(Jt[0][0])){var pr=Jt[1][0],cr=!1,gr=!1;ar>3&&(/^public$/i.test(Jt[2][0])?(cr=Jt[3][0],gr=ar>4&&Jt[4][0]):/^system$/i.test(Jt[2][0])&&(gr=Jt[3][0]));var Sr=Jt[ar-1];return Ot.startDTD(pr,cr,gr),Ot.endDTD(),Sr.index+Sr[0].length}}return-1}function qt(jt,Ut,Ot){var Wt=jt.indexOf("?>",Ut);if(Wt){var Bt=jt.substring(Ut,Wt).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Bt?(Bt[0].length,Ot.processingInstruction(Bt[1],Bt[2]),Wt+2):-1}return-1}function Vt(){this.attributeNames={}}Vt.prototype={setTagName:function(jt){if(!rt.test(jt))throw new Error("invalid tagName:"+jt);this.tagName=jt},addValue:function(jt,Ut,Ot){if(!rt.test(jt))throw new Error("invalid attribute:"+jt);this.attributeNames[jt]=this.length,this[this.length++]={qName:jt,value:Ut,offset:Ot}},length:0,getLocalName:function(jt){return this[jt].localName},getLocator:function(jt){return this[jt].locator},getQName:function(jt){return this[jt].qName},getURI:function(jt){return this[jt].uri},getValue:function(jt){return this[jt].value}};function Kt(jt,Ut){var Ot,Wt=[],Bt=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Bt.lastIndex=Ut,Bt.exec(jt);Ot=Bt.exec(jt);)if(Wt.push(Ot),Ot[1])return Wt}return sax.XMLReader=Ct,sax.ParseError=Et,sax}var hasRequiredDomParser;function requireDomParser(){if(hasRequiredDomParser)return domParser;hasRequiredDomParser=1;var et=requireConventions(),_e=requireDom(),tt=requireEntities(),rt=requireSax(),nt=_e.DOMImplementation,st=et.NAMESPACE,dt=rt.ParseError,ft=rt.XMLReader;function ht(wt){return wt.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function mt(wt){this.options=wt||{locator:{}}}mt.prototype.parseFromString=function(wt,At){var Nt=this.options,Pt=new ft,It=Nt.domBuilder||new St,Ft=Nt.errorHandler,qt=Nt.locator,Vt=Nt.xmlns||{},Kt=/\/x?html?$/.test(At),jt=Kt?tt.HTML_ENTITIES:tt.XML_ENTITIES;qt&&It.setDocumentLocator(qt),Pt.errorHandler=bt(Ft,It,qt),Pt.domBuilder=Nt.domBuilder||It,Kt&&(Vt[""]=st.HTML),Vt.xml=Vt.xml||st.XML;var Ut=Nt.normalizeLineEndings||ht;return wt&&typeof wt=="string"?Pt.parse(Ut(wt),Vt,jt):Pt.errorHandler.error("invalid doc source"),It.doc};function bt(wt,At,Nt){if(!wt){if(At instanceof St)return At;wt=At}var Pt={},It=wt instanceof Function;Nt=Nt||{};function Ft(qt){var Vt=wt[qt];!Vt&&It&&(Vt=wt.length==2?function(Kt){wt(qt,Kt)}:wt),Pt[qt]=Vt&&function(Kt){Vt("[xmldom "+qt+"] "+Kt+Ct(Nt))}||function(){}}return Ft("warning"),Ft("error"),Ft("fatalError"),Pt}function St(){this.cdata=!1}function Et(wt,At){At.lineNumber=wt.lineNumber,At.columnNumber=wt.columnNumber}St.prototype={startDocument:function(){this.doc=new nt().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(wt,At,Nt,Pt){var It=this.doc,Ft=It.createElementNS(wt,Nt||At),qt=Pt.length;Tt(this,Ft),this.currentElement=Ft,this.locator&&Et(this.locator,Ft);for(var Vt=0;Vt<qt;Vt++){var wt=Pt.getURI(Vt),Kt=Pt.getValue(Vt),Nt=Pt.getQName(Vt),jt=It.createAttributeNS(wt,Nt);this.locator&&Et(Pt.getLocator(Vt),jt),jt.value=jt.nodeValue=Kt,Ft.setAttributeNode(jt)}},endElement:function(wt,At,Nt){var Pt=this.currentElement;Pt.tagName,this.currentElement=Pt.parentNode},startPrefixMapping:function(wt,At){},endPrefixMapping:function(wt){},processingInstruction:function(wt,At){var Nt=this.doc.createProcessingInstruction(wt,At);this.locator&&Et(this.locator,Nt),Tt(this,Nt)},ignorableWhitespace:function(wt,At,Nt){},characters:function(wt,At,Nt){if(wt=Rt.apply(this,arguments),wt){if(this.cdata)var Pt=this.doc.createCDATASection(wt);else var Pt=this.doc.createTextNode(wt);this.currentElement?this.currentElement.appendChild(Pt):/^\s*$/.test(wt)&&this.doc.appendChild(Pt),this.locator&&Et(this.locator,Pt)}},skippedEntity:function(wt){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(wt){(this.locator=wt)&&(wt.lineNumber=0)},comment:function(wt,At,Nt){wt=Rt.apply(this,arguments);var Pt=this.doc.createComment(wt);this.locator&&Et(this.locator,Pt),Tt(this,Pt)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(wt,At,Nt){var Pt=this.doc.implementation;if(Pt&&Pt.createDocumentType){var It=Pt.createDocumentType(wt,At,Nt);this.locator&&Et(this.locator,It),Tt(this,It),this.doc.doctype=It}},warning:function(wt){console.warn("[xmldom warning] "+wt,Ct(this.locator))},error:function(wt){console.error("[xmldom error] "+wt,Ct(this.locator))},fatalError:function(wt){throw new dt(wt,this.locator)}};function Ct(wt){if(wt)return`
@`+(wt.systemId||"")+"#[line:"+wt.lineNumber+",col:"+wt.columnNumber+"]"}function Rt(wt,At,Nt){return typeof wt=="string"?wt.substr(At,Nt):wt.length>=At+Nt||At?new java.lang.String(wt,At,Nt)+"":wt}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(wt){St.prototype[wt]=function(){return null}});function Tt(wt,At){wt.currentElement?wt.currentElement.appendChild(At):wt.doc.appendChild(At)}return domParser.__DOMHandler=St,domParser.normalizeLineEndings=ht,domParser.DOMParser=mt,domParser}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var et=requireDom();return lib.DOMImplementation=et.DOMImplementation,lib.XMLSerializer=et.XMLSerializer,lib.DOMParser=requireDomParser().DOMParser,lib}var libExports=requireLib();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const isObject$2=et=>!!et&&typeof et=="object",merge$2=(...et)=>et.reduce((_e,tt)=>(typeof tt!="object"||Object.keys(tt).forEach(rt=>{Array.isArray(_e[rt])&&Array.isArray(tt[rt])?_e[rt]=_e[rt].concat(tt[rt]):isObject$2(_e[rt])&&isObject$2(tt[rt])?_e[rt]=merge$2(_e[rt],tt[rt]):_e[rt]=tt[rt]}),_e),{}),values$1=et=>Object.keys(et).map(_e=>et[_e]),range=(et,_e)=>{const tt=[];for(let rt=et;rt<_e;rt++)tt.push(rt);return tt},flatten=et=>et.reduce((_e,tt)=>_e.concat(tt),[]),from$1=et=>{if(!et.length)return[];const _e=[];for(let tt=0;tt<et.length;tt++)_e.push(et[tt]);return _e},findIndexes=(et,_e)=>et.reduce((tt,rt,nt)=>(rt[_e]&&tt.push(nt),tt),[]),union=(et,_e)=>values$1(et.reduce((tt,rt)=>(rt.forEach(nt=>{tt[_e(nt)]=nt}),tt),{}));var errors={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const urlTypeToSegment=({baseUrl:et="",source:_e="",range:tt="",indexRange:rt=""})=>{const nt={uri:_e,resolvedUri:resolveUrl$1(et||"",_e)};if(tt||rt){const dt=(tt||rt).split("-");let ft=window$1.BigInt?window$1.BigInt(dt[0]):parseInt(dt[0],10),ht=window$1.BigInt?window$1.BigInt(dt[1]):parseInt(dt[1],10);ft<Number.MAX_SAFE_INTEGER&&typeof ft=="bigint"&&(ft=Number(ft)),ht<Number.MAX_SAFE_INTEGER&&typeof ht=="bigint"&&(ht=Number(ht));let mt;typeof ht=="bigint"||typeof ft=="bigint"?mt=window$1.BigInt(ht)-window$1.BigInt(ft)+window$1.BigInt(1):mt=ht-ft+1,typeof mt=="bigint"&&mt<Number.MAX_SAFE_INTEGER&&(mt=Number(mt)),nt.byterange={length:mt,offset:ft}}return nt},byteRangeToString=et=>{let _e;return typeof et.offset=="bigint"||typeof et.length=="bigint"?_e=window$1.BigInt(et.offset)+window$1.BigInt(et.length)-window$1.BigInt(1):_e=et.offset+et.length-1,`${et.offset}-${_e}`},parseEndNumber=et=>(et&&typeof et!="number"&&(et=parseInt(et,10)),isNaN(et)?null:et),segmentRange={static(et){const{duration:_e,timescale:tt=1,sourceDuration:rt,periodDuration:nt}=et,st=parseEndNumber(et.endNumber),dt=_e/tt;return typeof st=="number"?{start:0,end:st}:typeof nt=="number"?{start:0,end:nt/dt}:{start:0,end:rt/dt}},dynamic(et){const{NOW:_e,clientOffset:tt,availabilityStartTime:rt,timescale:nt=1,duration:st,periodStart:dt=0,minimumUpdatePeriod:ft=0,timeShiftBufferDepth:ht=1/0}=et,mt=parseEndNumber(et.endNumber),bt=(_e+tt)/1e3,St=rt+dt,Ct=bt+ft-St,Rt=Math.ceil(Ct*nt/st),Tt=Math.floor((bt-St-ht)*nt/st),wt=Math.floor((bt-St)*nt/st);return{start:Math.max(0,Tt),end:typeof mt=="number"?mt:Math.min(Rt,wt)}}},toSegments=et=>_e=>{const{duration:tt,timescale:rt=1,periodStart:nt,startNumber:st=1}=et;return{number:st+_e,duration:tt/rt,timeline:nt,time:_e*tt}},parseByDuration=et=>{const{type:_e,duration:tt,timescale:rt=1,periodDuration:nt,sourceDuration:st}=et,{start:dt,end:ft}=segmentRange[_e](et),ht=range(dt,ft).map(toSegments(et));if(_e==="static"){const mt=ht.length-1,bt=typeof nt=="number"?nt:st;ht[mt].duration=bt-tt/rt*mt}return ht},segmentsFromBase=et=>{const{baseUrl:_e,initialization:tt={},sourceDuration:rt,indexRange:nt="",periodStart:st,presentationTime:dt,number:ft=0,duration:ht}=et;if(!_e)throw new Error(errors.NO_BASE_URL);const mt=urlTypeToSegment({baseUrl:_e,source:tt.sourceURL,range:tt.range}),bt=urlTypeToSegment({baseUrl:_e,source:_e,indexRange:nt});if(bt.map=mt,ht){const St=parseByDuration(et);St.length&&(bt.duration=St[0].duration,bt.timeline=St[0].timeline)}else rt&&(bt.duration=rt,bt.timeline=st);return bt.presentationTime=dt||st,bt.number=ft,[bt]},addSidxSegmentsToPlaylist$1=(et,_e,tt)=>{const rt=et.sidx.map?et.sidx.map:null,nt=et.sidx.duration,st=et.timeline||0,dt=et.sidx.byterange,ft=dt.offset+dt.length,ht=_e.timescale,mt=_e.references.filter(wt=>wt.referenceType!==1),bt=[],St=et.endList?"static":"dynamic",Et=et.sidx.timeline;let Ct=Et,Rt=et.mediaSequence||0,Tt;typeof _e.firstOffset=="bigint"?Tt=window$1.BigInt(ft)+_e.firstOffset:Tt=ft+_e.firstOffset;for(let wt=0;wt<mt.length;wt++){const At=_e.references[wt],Nt=At.referencedSize,Pt=At.subsegmentDuration;let It;typeof Tt=="bigint"?It=Tt+window$1.BigInt(Nt)-window$1.BigInt(1):It=Tt+Nt-1;const Ft=`${Tt}-${It}`,Vt=segmentsFromBase({baseUrl:tt,timescale:ht,timeline:st,periodStart:Et,presentationTime:Ct,number:Rt,duration:Pt,sourceDuration:nt,indexRange:Ft,type:St})[0];rt&&(Vt.map=rt),bt.push(Vt),typeof Tt=="bigint"?Tt+=window$1.BigInt(Nt):Tt+=Nt,Ct+=Pt/ht,Rt++}return et.segments=bt,et},SUPPORTED_MEDIA_TYPES=["AUDIO","SUBTITLES"],TIME_FUDGE=1/60,getUniqueTimelineStarts=et=>union(et,({timeline:_e})=>_e).sort((_e,tt)=>_e.timeline>tt.timeline?1:-1),findPlaylistWithName=(et,_e)=>{for(let tt=0;tt<et.length;tt++)if(et[tt].attributes.NAME===_e)return et[tt];return null},getMediaGroupPlaylists=et=>{let _e=[];return forEachMediaGroup$1(et,SUPPORTED_MEDIA_TYPES,(tt,rt,nt,st)=>{_e=_e.concat(tt.playlists||[])}),_e},updateMediaSequenceForPlaylist=({playlist:et,mediaSequence:_e})=>{et.mediaSequence=_e,et.segments.forEach((tt,rt)=>{tt.number=et.mediaSequence+rt})},updateSequenceNumbers=({oldPlaylists:et,newPlaylists:_e,timelineStarts:tt})=>{_e.forEach(rt=>{rt.discontinuitySequence=tt.findIndex(function({timeline:ht}){return ht===rt.timeline});const nt=findPlaylistWithName(et,rt.attributes.NAME);if(!nt||rt.sidx)return;const st=rt.segments[0],dt=nt.segments.findIndex(function(ht){return Math.abs(ht.presentationTime-st.presentationTime)<TIME_FUDGE});if(dt===-1){updateMediaSequenceForPlaylist({playlist:rt,mediaSequence:nt.mediaSequence+nt.segments.length}),rt.segments[0].discontinuity=!0,rt.discontinuityStarts.unshift(0),(!nt.segments.length&&rt.timeline>nt.timeline||nt.segments.length&&rt.timeline>nt.segments[nt.segments.length-1].timeline)&&rt.discontinuitySequence--;return}nt.segments[dt].discontinuity&&!st.discontinuity&&(st.discontinuity=!0,rt.discontinuityStarts.unshift(0),rt.discontinuitySequence--),updateMediaSequenceForPlaylist({playlist:rt,mediaSequence:nt.segments[dt].number})})},positionManifestOnTimeline=({oldManifest:et,newManifest:_e})=>{const tt=et.playlists.concat(getMediaGroupPlaylists(et)),rt=_e.playlists.concat(getMediaGroupPlaylists(_e));return _e.timelineStarts=getUniqueTimelineStarts([et.timelineStarts,_e.timelineStarts]),updateSequenceNumbers({oldPlaylists:tt,newPlaylists:rt,timelineStarts:_e.timelineStarts}),_e},generateSidxKey=et=>et&&et.uri+"-"+byteRangeToString(et.byterange),mergeDiscontiguousPlaylists=et=>{const _e=et.reduce(function(rt,nt){return rt[nt.attributes.baseUrl]||(rt[nt.attributes.baseUrl]=[]),rt[nt.attributes.baseUrl].push(nt),rt},{});let tt=[];return Object.values(_e).forEach(rt=>{const nt=values$1(rt.reduce((st,dt)=>{const ft=dt.attributes.id+(dt.attributes.lang||"");return st[ft]?(dt.segments&&(dt.segments[0]&&(dt.segments[0].discontinuity=!0),st[ft].segments.push(...dt.segments)),dt.attributes.contentProtection&&(st[ft].attributes.contentProtection=dt.attributes.contentProtection)):(st[ft]=dt,st[ft].attributes.timelineStarts=[]),st[ft].attributes.timelineStarts.push({start:dt.attributes.periodStart,timeline:dt.attributes.periodStart}),st},{}));tt=tt.concat(nt)}),tt.map(rt=>(rt.discontinuityStarts=findIndexes(rt.segments||[],"discontinuity"),rt))},addSidxSegmentsToPlaylist=(et,_e)=>{const tt=generateSidxKey(et.sidx),rt=tt&&_e[tt]&&_e[tt].sidx;return rt&&addSidxSegmentsToPlaylist$1(et,rt,et.sidx.resolvedUri),et},addSidxSegmentsToPlaylists=(et,_e={})=>{if(!Object.keys(_e).length)return et;for(const tt in et)et[tt]=addSidxSegmentsToPlaylist(et[tt],_e);return et},formatAudioPlaylist=({attributes:et,segments:_e,sidx:tt,mediaSequence:rt,discontinuitySequence:nt,discontinuityStarts:st},dt)=>{const ft={attributes:{NAME:et.id,BANDWIDTH:et.bandwidth,CODECS:et.codecs,"PROGRAM-ID":1},uri:"",endList:et.type==="static",timeline:et.periodStart,resolvedUri:et.baseUrl||"",targetDuration:et.duration,discontinuitySequence:nt,discontinuityStarts:st,timelineStarts:et.timelineStarts,mediaSequence:rt,segments:_e};return et.contentProtection&&(ft.contentProtection=et.contentProtection),et.serviceLocation&&(ft.attributes.serviceLocation=et.serviceLocation),tt&&(ft.sidx=tt),dt&&(ft.attributes.AUDIO="audio",ft.attributes.SUBTITLES="subs"),ft},formatVttPlaylist=({attributes:et,segments:_e,mediaSequence:tt,discontinuityStarts:rt,discontinuitySequence:nt})=>{typeof _e>"u"&&(_e=[{uri:et.baseUrl,timeline:et.periodStart,resolvedUri:et.baseUrl||"",duration:et.sourceDuration,number:0}],et.duration=et.sourceDuration);const st={NAME:et.id,BANDWIDTH:et.bandwidth,"PROGRAM-ID":1};et.codecs&&(st.CODECS=et.codecs);const dt={attributes:st,uri:"",endList:et.type==="static",timeline:et.periodStart,resolvedUri:et.baseUrl||"",targetDuration:et.duration,timelineStarts:et.timelineStarts,discontinuityStarts:rt,discontinuitySequence:nt,mediaSequence:tt,segments:_e};return et.serviceLocation&&(dt.attributes.serviceLocation=et.serviceLocation),dt},organizeAudioPlaylists=(et,_e={},tt=!1)=>{let rt;const nt=et.reduce((st,dt)=>{const ft=dt.attributes.role&&dt.attributes.role.value||"",ht=dt.attributes.lang||"";let mt=dt.attributes.label||"main";if(ht&&!dt.attributes.label){const St=ft?` (${ft})`:"";mt=`${dt.attributes.lang}${St}`}st[mt]||(st[mt]={language:ht,autoselect:!0,default:ft==="main",playlists:[],uri:""});const bt=addSidxSegmentsToPlaylist(formatAudioPlaylist(dt,tt),_e);return st[mt].playlists.push(bt),typeof rt>"u"&&ft==="main"&&(rt=dt,rt.default=!0),st},{});if(!rt){const st=Object.keys(nt)[0];nt[st].default=!0}return nt},organizeVttPlaylists=(et,_e={})=>et.reduce((tt,rt)=>{const nt=rt.attributes.label||rt.attributes.lang||"text",st=rt.attributes.lang||"und";return tt[nt]||(tt[nt]={language:st,default:!1,autoselect:!1,playlists:[],uri:""}),tt[nt].playlists.push(addSidxSegmentsToPlaylist(formatVttPlaylist(rt),_e)),tt},{}),organizeCaptionServices=et=>et.reduce((_e,tt)=>(tt&&tt.forEach(rt=>{const{channel:nt,language:st}=rt;_e[st]={autoselect:!1,default:!1,instreamId:nt,language:st},rt.hasOwnProperty("aspectRatio")&&(_e[st].aspectRatio=rt.aspectRatio),rt.hasOwnProperty("easyReader")&&(_e[st].easyReader=rt.easyReader),rt.hasOwnProperty("3D")&&(_e[st]["3D"]=rt["3D"])}),_e),{}),formatVideoPlaylist=({attributes:et,segments:_e,sidx:tt,discontinuityStarts:rt})=>{const nt={attributes:{NAME:et.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:et.width,height:et.height},CODECS:et.codecs,BANDWIDTH:et.bandwidth,"PROGRAM-ID":1},uri:"",endList:et.type==="static",timeline:et.periodStart,resolvedUri:et.baseUrl||"",targetDuration:et.duration,discontinuityStarts:rt,timelineStarts:et.timelineStarts,segments:_e};return et.frameRate&&(nt.attributes["FRAME-RATE"]=et.frameRate),et.contentProtection&&(nt.contentProtection=et.contentProtection),et.serviceLocation&&(nt.attributes.serviceLocation=et.serviceLocation),tt&&(nt.sidx=tt),nt},videoOnly=({attributes:et})=>et.mimeType==="video/mp4"||et.mimeType==="video/webm"||et.contentType==="video",audioOnly=({attributes:et})=>et.mimeType==="audio/mp4"||et.mimeType==="audio/webm"||et.contentType==="audio",vttOnly=({attributes:et})=>et.mimeType==="text/vtt"||et.contentType==="text",addMediaSequenceValues=(et,_e)=>{et.forEach(tt=>{tt.mediaSequence=0,tt.discontinuitySequence=_e.findIndex(function({timeline:rt}){return rt===tt.timeline}),tt.segments&&tt.segments.forEach((rt,nt)=>{rt.number=nt})})},flattenMediaGroupPlaylists=et=>et?Object.keys(et).reduce((_e,tt)=>{const rt=et[tt];return _e.concat(rt.playlists)},[]):[],toM3u8=({dashPlaylists:et,locations:_e,contentSteering:tt,sidxMapping:rt={},previousManifest:nt,eventStream:st})=>{if(!et.length)return{};const{sourceDuration:dt,type:ft,suggestedPresentationDelay:ht,minimumUpdatePeriod:mt}=et[0].attributes,bt=mergeDiscontiguousPlaylists(et.filter(videoOnly)).map(formatVideoPlaylist),St=mergeDiscontiguousPlaylists(et.filter(audioOnly)),Et=mergeDiscontiguousPlaylists(et.filter(vttOnly)),Ct=et.map(It=>It.attributes.captionServices).filter(Boolean),Rt={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:dt,playlists:addSidxSegmentsToPlaylists(bt,rt)};mt>=0&&(Rt.minimumUpdatePeriod=mt*1e3),_e&&(Rt.locations=_e),tt&&(Rt.contentSteering=tt),ft==="dynamic"&&(Rt.suggestedPresentationDelay=ht),st&&st.length>0&&(Rt.eventStream=st);const Tt=Rt.playlists.length===0,wt=St.length?organizeAudioPlaylists(St,rt,Tt):null,At=Et.length?organizeVttPlaylists(Et,rt):null,Nt=bt.concat(flattenMediaGroupPlaylists(wt),flattenMediaGroupPlaylists(At)),Pt=Nt.map(({timelineStarts:It})=>It);return Rt.timelineStarts=getUniqueTimelineStarts(Pt),addMediaSequenceValues(Nt,Rt.timelineStarts),wt&&(Rt.mediaGroups.AUDIO.audio=wt),At&&(Rt.mediaGroups.SUBTITLES.subs=At),Ct.length&&(Rt.mediaGroups["CLOSED-CAPTIONS"].cc=organizeCaptionServices(Ct)),nt?positionManifestOnTimeline({oldManifest:nt,newManifest:Rt}):Rt},getLiveRValue=(et,_e,tt)=>{const{NOW:rt,clientOffset:nt,availabilityStartTime:st,timescale:dt=1,periodStart:ft=0,minimumUpdatePeriod:ht=0}=et,mt=(rt+nt)/1e3,bt=st+ft,Et=mt+ht-bt;return Math.ceil((Et*dt-_e)/tt)},parseByTimeline=(et,_e)=>{const{type:tt,minimumUpdatePeriod:rt=0,media:nt="",sourceDuration:st,timescale:dt=1,startNumber:ft=1,periodStart:ht}=et,mt=[];let bt=-1;for(let St=0;St<_e.length;St++){const Et=_e[St],Ct=Et.d,Rt=Et.r||0,Tt=Et.t||0;bt<0&&(bt=Tt),Tt&&Tt>bt&&(bt=Tt);let wt;if(Rt<0){const Pt=St+1;Pt===_e.length?tt==="dynamic"&&rt>0&&nt.indexOf("$Number$")>0?wt=getLiveRValue(et,bt,Ct):wt=(st*dt-bt)/Ct:wt=(_e[Pt].t-bt)/Ct}else wt=Rt+1;const At=ft+mt.length+wt;let Nt=ft+mt.length;for(;Nt<At;)mt.push({number:Nt,duration:Ct/dt,time:bt,timeline:ht}),bt+=Ct,Nt++}return mt},identifierPattern=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,identifierReplacement=et=>(_e,tt,rt,nt)=>{if(_e==="$$")return"$";if(typeof et[tt]>"u")return _e;const st=""+et[tt];return tt==="RepresentationID"||(rt?nt=parseInt(nt,10):nt=1,st.length>=nt)?st:`${new Array(nt-st.length+1).join("0")}${st}`},constructTemplateUrl=(et,_e)=>et.replace(identifierPattern,identifierReplacement(_e)),parseTemplateInfo=(et,_e)=>!et.duration&&!_e?[{number:et.startNumber||1,duration:et.sourceDuration,time:0,timeline:et.periodStart}]:et.duration?parseByDuration(et):parseByTimeline(et,_e),segmentsFromTemplate=(et,_e)=>{const tt={RepresentationID:et.id,Bandwidth:et.bandwidth||0},{initialization:rt={sourceURL:"",range:""}}=et,nt=urlTypeToSegment({baseUrl:et.baseUrl,source:constructTemplateUrl(rt.sourceURL,tt),range:rt.range});return parseTemplateInfo(et,_e).map(dt=>{tt.Number=dt.number,tt.Time=dt.time;const ft=constructTemplateUrl(et.media||"",tt),ht=et.timescale||1,mt=et.presentationTimeOffset||0,bt=et.periodStart+(dt.time-mt)/ht;return{uri:ft,timeline:dt.timeline,duration:dt.duration,resolvedUri:resolveUrl$1(et.baseUrl||"",ft),map:nt,number:dt.number,presentationTime:bt}})},SegmentURLToSegmentObject=(et,_e)=>{const{baseUrl:tt,initialization:rt={}}=et,nt=urlTypeToSegment({baseUrl:tt,source:rt.sourceURL,range:rt.range}),st=urlTypeToSegment({baseUrl:tt,source:_e.media,range:_e.mediaRange});return st.map=nt,st},segmentsFromList=(et,_e)=>{const{duration:tt,segmentUrls:rt=[],periodStart:nt}=et;if(!tt&&!_e||tt&&_e)throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);const st=rt.map(ht=>SegmentURLToSegmentObject(et,ht));let dt;return tt&&(dt=parseByDuration(et)),_e&&(dt=parseByTimeline(et,_e)),dt.map((ht,mt)=>{if(st[mt]){const bt=st[mt],St=et.timescale||1,Et=et.presentationTimeOffset||0;return bt.timeline=ht.timeline,bt.duration=ht.duration,bt.number=ht.number,bt.presentationTime=nt+(ht.time-Et)/St,bt}}).filter(ht=>ht)},generateSegments=({attributes:et,segmentInfo:_e})=>{let tt,rt;_e.template?(rt=segmentsFromTemplate,tt=merge$2(et,_e.template)):_e.base?(rt=segmentsFromBase,tt=merge$2(et,_e.base)):_e.list&&(rt=segmentsFromList,tt=merge$2(et,_e.list));const nt={attributes:et};if(!rt)return nt;const st=rt(tt,_e.segmentTimeline);if(tt.duration){const{duration:dt,timescale:ft=1}=tt;tt.duration=dt/ft}else st.length?tt.duration=st.reduce((dt,ft)=>Math.max(dt,Math.ceil(ft.duration)),0):tt.duration=0;return nt.attributes=tt,nt.segments=st,_e.base&&tt.indexRange&&(nt.sidx=st[0],nt.segments=[]),nt},toPlaylists=et=>et.map(generateSegments),findChildren=(et,_e)=>from$1(et.childNodes).filter(({tagName:tt})=>tt===_e),getContent=et=>et.textContent.trim(),parseDivisionValue=et=>parseFloat(et.split("/").reduce((_e,tt)=>_e/tt)),parseDuration=et=>{const ft=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(et);if(!ft)return 0;const[ht,mt,bt,St,Et,Ct]=ft.slice(1);return parseFloat(ht||0)*31536e3+parseFloat(mt||0)*2592e3+parseFloat(bt||0)*86400+parseFloat(St||0)*3600+parseFloat(Et||0)*60+parseFloat(Ct||0)},parseDate=et=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(et)&&(et+="Z"),Date.parse(et)),parsers={mediaPresentationDuration(et){return parseDuration(et)},availabilityStartTime(et){return parseDate(et)/1e3},minimumUpdatePeriod(et){return parseDuration(et)},suggestedPresentationDelay(et){return parseDuration(et)},type(et){return et},timeShiftBufferDepth(et){return parseDuration(et)},start(et){return parseDuration(et)},width(et){return parseInt(et,10)},height(et){return parseInt(et,10)},bandwidth(et){return parseInt(et,10)},frameRate(et){return parseDivisionValue(et)},startNumber(et){return parseInt(et,10)},timescale(et){return parseInt(et,10)},presentationTimeOffset(et){return parseInt(et,10)},duration(et){const _e=parseInt(et,10);return isNaN(_e)?parseDuration(et):_e},d(et){return parseInt(et,10)},t(et){return parseInt(et,10)},r(et){return parseInt(et,10)},presentationTime(et){return parseInt(et,10)},DEFAULT(et){return et}},parseAttributes=et=>et&&et.attributes?from$1(et.attributes).reduce((_e,tt)=>{const rt=parsers[tt.name]||parsers.DEFAULT;return _e[tt.name]=rt(tt.value),_e},{}):{},keySystemsMap={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},buildBaseUrls=(et,_e)=>_e.length?flatten(et.map(function(tt){return _e.map(function(rt){const nt=getContent(rt),st=resolveUrl$1(tt.baseUrl,nt),dt=merge$2(parseAttributes(rt),{baseUrl:st});return st!==nt&&!dt.serviceLocation&&tt.serviceLocation&&(dt.serviceLocation=tt.serviceLocation),dt})})):et,getSegmentInformation=et=>{const _e=findChildren(et,"SegmentTemplate")[0],tt=findChildren(et,"SegmentList")[0],rt=tt&&findChildren(tt,"SegmentURL").map(St=>merge$2({tag:"SegmentURL"},parseAttributes(St))),nt=findChildren(et,"SegmentBase")[0],st=tt||_e,dt=st&&findChildren(st,"SegmentTimeline")[0],ft=tt||nt||_e,ht=ft&&findChildren(ft,"Initialization")[0],mt=_e&&parseAttributes(_e);mt&&ht?mt.initialization=ht&&parseAttributes(ht):mt&&mt.initialization&&(mt.initialization={sourceURL:mt.initialization});const bt={template:mt,segmentTimeline:dt&&findChildren(dt,"S").map(St=>parseAttributes(St)),list:tt&&merge$2(parseAttributes(tt),{segmentUrls:rt,initialization:parseAttributes(ht)}),base:nt&&merge$2(parseAttributes(nt),{initialization:parseAttributes(ht)})};return Object.keys(bt).forEach(St=>{bt[St]||delete bt[St]}),bt},inheritBaseUrls=(et,_e,tt)=>rt=>{const nt=findChildren(rt,"BaseURL"),st=buildBaseUrls(_e,nt),dt=merge$2(et,parseAttributes(rt)),ft=getSegmentInformation(rt);return st.map(ht=>({segmentInfo:merge$2(tt,ft),attributes:merge$2(dt,ht)}))},generateKeySystemInformation=et=>et.reduce((_e,tt)=>{const rt=parseAttributes(tt);rt.schemeIdUri&&(rt.schemeIdUri=rt.schemeIdUri.toLowerCase());const nt=keySystemsMap[rt.schemeIdUri];if(nt){_e[nt]={attributes:rt};const st=findChildren(tt,"cenc:pssh")[0];if(st){const dt=getContent(st);_e[nt].pssh=dt&&decodeB64ToUint8Array(dt)}}return _e},{}),parseCaptionServiceMetadata=et=>{if(et.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof et.value!="string"?[]:et.value.split(";")).map(tt=>{let rt,nt;return nt=tt,/^CC\d=/.test(tt)?[rt,nt]=tt.split("="):/^CC\d$/.test(tt)&&(rt=tt),{channel:rt,language:nt}});if(et.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof et.value!="string"?[]:et.value.split(";")).map(tt=>{const rt={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(tt)){const[nt,st=""]=tt.split("=");rt.channel=nt,rt.language=tt,st.split(",").forEach(dt=>{const[ft,ht]=dt.split(":");ft==="lang"?rt.language=ht:ft==="er"?rt.easyReader=Number(ht):ft==="war"?rt.aspectRatio=Number(ht):ft==="3D"&&(rt["3D"]=Number(ht))})}else rt.language=tt;return rt.channel&&(rt.channel="SERVICE"+rt.channel),rt})},toEventStream=et=>flatten(findChildren(et.node,"EventStream").map(_e=>{const tt=parseAttributes(_e),rt=tt.schemeIdUri;return findChildren(_e,"Event").map(nt=>{const st=parseAttributes(nt),dt=st.presentationTime||0,ft=tt.timescale||1,ht=st.duration||0,mt=dt/ft+et.attributes.start;return{schemeIdUri:rt,value:tt.value,id:st.id,start:mt,end:mt+ht/ft,messageData:getContent(nt)||st.messageData,contentEncoding:tt.contentEncoding,presentationTimeOffset:tt.presentationTimeOffset||0}})})),toRepresentations=(et,_e,tt)=>rt=>{const nt=parseAttributes(rt),st=buildBaseUrls(_e,findChildren(rt,"BaseURL")),dt=findChildren(rt,"Role")[0],ft={role:parseAttributes(dt)};let ht=merge$2(et,nt,ft);const mt=findChildren(rt,"Accessibility")[0],bt=parseCaptionServiceMetadata(parseAttributes(mt));bt&&(ht=merge$2(ht,{captionServices:bt}));const St=findChildren(rt,"Label")[0];if(St&&St.childNodes.length){const wt=St.childNodes[0].nodeValue.trim();ht=merge$2(ht,{label:wt})}const Et=generateKeySystemInformation(findChildren(rt,"ContentProtection"));Object.keys(Et).length&&(ht=merge$2(ht,{contentProtection:Et}));const Ct=getSegmentInformation(rt),Rt=findChildren(rt,"Representation"),Tt=merge$2(tt,Ct);return flatten(Rt.map(inheritBaseUrls(ht,st,Tt)))},toAdaptationSets=(et,_e)=>(tt,rt)=>{const nt=buildBaseUrls(_e,findChildren(tt.node,"BaseURL")),st=merge$2(et,{periodStart:tt.attributes.start});typeof tt.attributes.duration=="number"&&(st.periodDuration=tt.attributes.duration);const dt=findChildren(tt.node,"AdaptationSet"),ft=getSegmentInformation(tt.node);return flatten(dt.map(toRepresentations(st,nt,ft)))},generateContentSteeringInformation=(et,_e)=>{if(et.length>1&&_e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!et.length)return null;const tt=merge$2({serverURL:getContent(et[0])},parseAttributes(et[0]));return tt.queryBeforeStart=tt.queryBeforeStart==="true",tt},getPeriodStart=({attributes:et,priorPeriodAttributes:_e,mpdType:tt})=>typeof et.start=="number"?et.start:_e&&typeof _e.start=="number"&&typeof _e.duration=="number"?_e.start+_e.duration:!_e&&tt==="static"?0:null,inheritAttributes=(et,_e={})=>{const{manifestUri:tt="",NOW:rt=Date.now(),clientOffset:nt=0,eventHandler:st=function(){}}=_e,dt=findChildren(et,"Period");if(!dt.length)throw new Error(errors.INVALID_NUMBER_OF_PERIOD);const ft=findChildren(et,"Location"),ht=parseAttributes(et),mt=buildBaseUrls([{baseUrl:tt}],findChildren(et,"BaseURL")),bt=findChildren(et,"ContentSteering");ht.type=ht.type||"static",ht.sourceDuration=ht.mediaPresentationDuration||0,ht.NOW=rt,ht.clientOffset=nt,ft.length&&(ht.locations=ft.map(getContent));const St=[];return dt.forEach((Et,Ct)=>{const Rt=parseAttributes(Et),Tt=St[Ct-1];Rt.start=getPeriodStart({attributes:Rt,priorPeriodAttributes:Tt?Tt.attributes:null,mpdType:ht.type}),St.push({node:Et,attributes:Rt})}),{locations:ht.locations,contentSteeringInfo:generateContentSteeringInformation(bt,st),representationInfo:flatten(St.map(toAdaptationSets(ht,mt))),eventStream:flatten(St.map(toEventStream))}},stringToMpdXml=et=>{if(et==="")throw new Error(errors.DASH_EMPTY_MANIFEST);const _e=new libExports.DOMParser;let tt,rt;try{tt=_e.parseFromString(et,"application/xml"),rt=tt&&tt.documentElement.tagName==="MPD"?tt.documentElement:null}catch{}if(!rt||rt&&rt.getElementsByTagName("parsererror").length>0)throw new Error(errors.DASH_INVALID_XML);return rt},parseUTCTimingScheme=et=>{const _e=findChildren(et,"UTCTiming")[0];if(!_e)return null;const tt=parseAttributes(_e);switch(tt.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":tt.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":tt.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":tt.method="DIRECT",tt.value=Date.parse(tt.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME)}return tt},parse=(et,_e={})=>{const tt=inheritAttributes(stringToMpdXml(et),_e),rt=toPlaylists(tt.representationInfo);return toM3u8({dashPlaylists:rt,locations:tt.locations,contentSteering:tt.contentSteeringInfo,sidxMapping:_e.sidxMapping,previousManifest:_e.previousManifest,eventStream:tt.eventStream})},parseUTCTiming=et=>parseUTCTimingScheme(stringToMpdXml(et));var numbers,hasRequiredNumbers;function requireNumbers(){if(hasRequiredNumbers)return numbers;hasRequiredNumbers=1;var et=Math.pow(2,32),_e=function(tt){var rt=new DataView(tt.buffer,tt.byteOffset,tt.byteLength),nt;return rt.getBigUint64?(nt=rt.getBigUint64(0),nt<Number.MAX_SAFE_INTEGER?Number(nt):nt):rt.getUint32(0)*et+rt.getUint32(4)};return numbers={getUint64:_e,MAX_UINT32:et},numbers}var parseSidx_1,hasRequiredParseSidx;function requireParseSidx(){if(hasRequiredParseSidx)return parseSidx_1;hasRequiredParseSidx=1;var et=requireNumbers().getUint64,_e=function(tt){var rt=new DataView(tt.buffer,tt.byteOffset,tt.byteLength),nt={version:tt[0],flags:new Uint8Array(tt.subarray(1,4)),references:[],referenceId:rt.getUint32(4),timescale:rt.getUint32(8)},st=12;nt.version===0?(nt.earliestPresentationTime=rt.getUint32(st),nt.firstOffset=rt.getUint32(st+4),st+=8):(nt.earliestPresentationTime=et(tt.subarray(st)),nt.firstOffset=et(tt.subarray(st+8)),st+=16),st+=2;var dt=rt.getUint16(st);for(st+=2;dt>0;st+=12,dt--)nt.references.push({referenceType:(tt[st]&128)>>>7,referencedSize:rt.getUint32(st)&2147483647,subsegmentDuration:rt.getUint32(st+4),startsWithSap:!!(tt[st+8]&128),sapType:(tt[st+8]&112)>>>4,sapDeltaTime:rt.getUint32(st+8)&268435455});return nt};return parseSidx_1=_e,parseSidx_1}var parseSidxExports=requireParseSidx();const parseSidx=getDefaultExportFromCjs(parseSidxExports);var ID3=toUint8([73,68,51]),getId3Size=function et(_e,tt){tt===void 0&&(tt=0),_e=toUint8(_e);var rt=_e[tt+5],nt=_e[tt+6]<<21|_e[tt+7]<<14|_e[tt+8]<<7|_e[tt+9],st=(rt&16)>>4;return st?nt+20:nt+10},getId3Offset=function et(_e,tt){return tt===void 0&&(tt=0),_e=toUint8(_e),_e.length-tt<10||!bytesMatch(_e,ID3,{offset:tt})?tt:(tt+=getId3Size(_e,tt),et(_e,tt))},normalizePath$1=function et(_e){return typeof _e=="string"?stringToBytes(_e):_e},normalizePaths$1=function et(_e){return Array.isArray(_e)?_e.map(function(tt){return normalizePath$1(tt)}):[normalizePath$1(_e)]},findBox=function et(_e,tt,rt){rt===void 0&&(rt=!1),tt=normalizePaths$1(tt),_e=toUint8(_e);var nt=[];if(!tt.length)return nt;for(var st=0;st<_e.length;){var dt=(_e[st]<<24|_e[st+1]<<16|_e[st+2]<<8|_e[st+3])>>>0,ft=_e.subarray(st+4,st+8);if(dt===0)break;var ht=st+dt;if(ht>_e.length){if(rt)break;ht=_e.length}var mt=_e.subarray(st+8,ht);bytesMatch(ft,tt[0])&&(tt.length===1?nt.push(mt):nt.push.apply(nt,et(mt,tt.slice(1),rt))),st=ht}return nt},EBML_TAGS={EBML:toUint8([26,69,223,163]),DocType:toUint8([66,130]),Segment:toUint8([24,83,128,103]),SegmentInfo:toUint8([21,73,169,102]),Tracks:toUint8([22,84,174,107]),Track:toUint8([174]),TrackNumber:toUint8([215]),DefaultDuration:toUint8([35,227,131]),TrackEntry:toUint8([174]),TrackType:toUint8([131]),FlagDefault:toUint8([136]),CodecID:toUint8([134]),CodecPrivate:toUint8([99,162]),VideoTrack:toUint8([224]),AudioTrack:toUint8([225]),Cluster:toUint8([31,67,182,117]),Timestamp:toUint8([231]),TimestampScale:toUint8([42,215,177]),BlockGroup:toUint8([160]),BlockDuration:toUint8([155]),Block:toUint8([161]),SimpleBlock:toUint8([163])},LENGTH_TABLE=[128,64,32,16,8,4,2,1],getLength=function et(_e){for(var tt=1,rt=0;rt<LENGTH_TABLE.length&&!(_e&LENGTH_TABLE[rt]);rt++)tt++;return tt},getvint=function et(_e,tt,rt,nt){rt===void 0&&(rt=!0),nt===void 0&&(nt=!1);var st=getLength(_e[tt]),dt=_e.subarray(tt,tt+st);return rt&&(dt=Array.prototype.slice.call(_e,tt,tt+st),dt[0]^=LENGTH_TABLE[st-1]),{length:st,value:bytesToNumber(dt,{signed:nt}),bytes:dt}},normalizePath=function et(_e){return typeof _e=="string"?_e.match(/.{1,2}/g).map(function(tt){return et(tt)}):typeof _e=="number"?numberToBytes(_e):_e},normalizePaths=function et(_e){return Array.isArray(_e)?_e.map(function(tt){return normalizePath(tt)}):[normalizePath(_e)]},getInfinityDataSize=function et(_e,tt,rt){if(rt>=tt.length)return tt.length;var nt=getvint(tt,rt,!1);if(bytesMatch(_e.bytes,nt.bytes))return rt;var st=getvint(tt,rt+nt.length);return et(_e,tt,rt+st.length+st.value+nt.length)},findEbml=function et(_e,tt){tt=normalizePaths(tt),_e=toUint8(_e);var rt=[];if(!tt.length)return rt;for(var nt=0;nt<_e.length;){var st=getvint(_e,nt,!1),dt=getvint(_e,nt+st.length),ft=nt+st.length+dt.length;dt.value===127&&(dt.value=getInfinityDataSize(st,_e,ft),dt.value!==_e.length&&(dt.value-=ft));var ht=ft+dt.value>_e.length?_e.length:ft+dt.value,mt=_e.subarray(ft,ht);bytesMatch(tt[0],st.bytes)&&(tt.length===1?rt.push(mt):rt=rt.concat(et(mt,tt.slice(1))));var bt=st.length+dt.length+mt.length;nt+=bt}return rt},NAL_TYPE_ONE=toUint8([0,0,0,1]),NAL_TYPE_TWO=toUint8([0,0,1]),EMULATION_PREVENTION=toUint8([0,0,3]),discardEmulationPreventionBytes=function et(_e){for(var tt=[],rt=1;rt<_e.length-2;)bytesMatch(_e.subarray(rt,rt+3),EMULATION_PREVENTION)&&(tt.push(rt+2),rt++),rt++;if(tt.length===0)return _e;var nt=_e.length-tt.length,st=new Uint8Array(nt),dt=0;for(rt=0;rt<nt;dt++,rt++)dt===tt[0]&&(dt++,tt.shift()),st[rt]=_e[dt];return st},findNal=function et(_e,tt,rt,nt){_e=toUint8(_e),rt=[].concat(rt);for(var st=0,dt,ft=0;st<_e.length&&(ft<nt||dt);){var ht=void 0;if(bytesMatch(_e.subarray(st),NAL_TYPE_ONE)?ht=4:bytesMatch(_e.subarray(st),NAL_TYPE_TWO)&&(ht=3),!ht){st++;continue}if(ft++,dt)return discardEmulationPreventionBytes(_e.subarray(dt,st));var mt=void 0;tt==="h264"?mt=_e[st+ht]&31:tt==="h265"&&(mt=_e[st+ht]>>1&63),rt.indexOf(mt)!==-1&&(dt=st+ht),st+=ht+(tt==="h264"?1:2)}return _e.subarray(0,0)},findH264Nal=function et(_e,tt,rt){return findNal(_e,"h264",tt,rt)},findH265Nal=function et(_e,tt,rt){return findNal(_e,"h265",tt,rt)},CONSTANTS={webm:toUint8([119,101,98,109]),matroska:toUint8([109,97,116,114,111,115,107,97]),flac:toUint8([102,76,97,67]),ogg:toUint8([79,103,103,83]),ac3:toUint8([11,119]),riff:toUint8([82,73,70,70]),avi:toUint8([65,86,73]),wav:toUint8([87,65,86,69]),"3gp":toUint8([102,116,121,112,51,103]),mp4:toUint8([102,116,121,112]),fmp4:toUint8([115,116,121,112]),mov:toUint8([102,116,121,112,113,116]),moov:toUint8([109,111,111,118]),moof:toUint8([109,111,111,102])},_isLikely={aac:function et(_e){var tt=getId3Offset(_e);return bytesMatch(_e,[255,16],{offset:tt,mask:[255,22]})},mp3:function et(_e){var tt=getId3Offset(_e);return bytesMatch(_e,[255,2],{offset:tt,mask:[255,6]})},webm:function et(_e){var tt=findEbml(_e,[EBML_TAGS.EBML,EBML_TAGS.DocType])[0];return bytesMatch(tt,CONSTANTS.webm)},mkv:function et(_e){var tt=findEbml(_e,[EBML_TAGS.EBML,EBML_TAGS.DocType])[0];return bytesMatch(tt,CONSTANTS.matroska)},mp4:function et(_e){if(_isLikely["3gp"](_e)||_isLikely.mov(_e))return!1;if(bytesMatch(_e,CONSTANTS.mp4,{offset:4})||bytesMatch(_e,CONSTANTS.fmp4,{offset:4})||bytesMatch(_e,CONSTANTS.moof,{offset:4})||bytesMatch(_e,CONSTANTS.moov,{offset:4}))return!0},mov:function et(_e){return bytesMatch(_e,CONSTANTS.mov,{offset:4})},"3gp":function et(_e){return bytesMatch(_e,CONSTANTS["3gp"],{offset:4})},ac3:function et(_e){var tt=getId3Offset(_e);return bytesMatch(_e,CONSTANTS.ac3,{offset:tt})},ts:function et(_e){if(_e.length<189&&_e.length>=1)return _e[0]===71;for(var tt=0;tt+188<_e.length&&tt<188;){if(_e[tt]===71&&_e[tt+188]===71)return!0;tt+=1}return!1},flac:function et(_e){var tt=getId3Offset(_e);return bytesMatch(_e,CONSTANTS.flac,{offset:tt})},ogg:function et(_e){return bytesMatch(_e,CONSTANTS.ogg)},avi:function et(_e){return bytesMatch(_e,CONSTANTS.riff)&&bytesMatch(_e,CONSTANTS.avi,{offset:8})},wav:function et(_e){return bytesMatch(_e,CONSTANTS.riff)&&bytesMatch(_e,CONSTANTS.wav,{offset:8})},h264:function et(_e){return findH264Nal(_e,7,3).length},h265:function et(_e){return findH265Nal(_e,[32,33],3).length}},isLikelyTypes=Object.keys(_isLikely).filter(function(et){return et!=="ts"&&et!=="h264"&&et!=="h265"}).concat(["ts","h264","h265"]);isLikelyTypes.forEach(function(et){var _e=_isLikely[et];_isLikely[et]=function(tt){return _e(toUint8(tt))}});var isLikely=_isLikely,detectContainerForBytes=function et(_e){_e=toUint8(_e);for(var tt=0;tt<isLikelyTypes.length;tt++){var rt=isLikelyTypes[tt];if(isLikely[rt](_e))return rt}return""},isLikelyFmp4MediaSegment=function et(_e){return findBox(_e,["moof"]).length>0},clock,hasRequiredClock;function requireClock(){if(hasRequiredClock)return clock;hasRequiredClock=1;var et=9e4,_e,tt,rt,nt,st,dt,ft;return _e=function(ht){return ht*et},tt=function(ht,mt){return ht*mt},rt=function(ht){return ht/et},nt=function(ht,mt){return ht/mt},st=function(ht,mt){return _e(nt(ht,mt))},dt=function(ht,mt){return tt(rt(ht),mt)},ft=function(ht,mt,bt){return rt(bt?ht:ht-mt)},clock={ONE_SECOND_IN_TS:et,secondsToVideoTs:_e,secondsToAudioTs:tt,videoTsToSeconds:rt,audioTsToSeconds:nt,audioTsToVideoTs:st,videoTsToAudioTs:dt,metadataTsToSeconds:ft},clock}var clockExports=requireClock();/**
* @license
* Video.js 8.23.4 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
*/var version$6="8.23.4";const hooks_={},hooks=function(et,_e){return hooks_[et]=hooks_[et]||[],_e&&(hooks_[et]=hooks_[et].concat(_e)),hooks_[et]},hook=function(et,_e){hooks(et,_e)},removeHook=function(et,_e){const tt=hooks(et).indexOf(_e);return tt<=-1?!1:(hooks_[et]=hooks_[et].slice(),hooks_[et].splice(tt,1),!0)},hookOnce=function(et,_e){hooks(et,[].concat(_e).map(tt=>{const rt=(...nt)=>(removeHook(et,rt),tt(...nt));return rt}))},FullscreenApi={prefixed:!0},apiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],specApi=apiMap[0];let browserApi;for(let et=0;et<apiMap.length;et++)if(apiMap[et][1]in document$1){browserApi=apiMap[et];break}if(browserApi){for(let et=0;et<browserApi.length;et++)FullscreenApi[specApi[et]]=browserApi[et];FullscreenApi.prefixed=browserApi[0]!==specApi[0]}let history=[];const LogByTypeFactory=(et,_e,tt)=>(rt,nt,st)=>{const dt=_e.levels[nt],ft=new RegExp(`^(${dt})$`);let ht=et;if(rt!=="log"&&st.unshift(rt.toUpperCase()+":"),tt&&(ht=`%c${et}`,st.unshift(tt)),st.unshift(ht+":"),history){history.push([].concat(st));const bt=history.length-1e3;history.splice(0,bt>0?bt:0)}if(!window$1.console)return;let mt=window$1.console[rt];!mt&&rt==="debug"&&(mt=window$1.console.info||window$1.console.log),!(!mt||!dt||!ft.test(rt))&&mt[Array.isArray(st)?"apply":"call"](window$1.console,st)};function createLogger$1(et,_e=":",tt=""){let rt="info",nt;function st(...dt){nt("log",rt,dt)}return nt=LogByTypeFactory(et,st,tt),st.createLogger=(dt,ft,ht)=>{const mt=ft!==void 0?ft:_e,bt=ht!==void 0?ht:tt,St=`${et} ${mt} ${dt}`;return createLogger$1(St,mt,bt)},st.createNewLogger=(dt,ft,ht)=>createLogger$1(dt,ft,ht),st.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:rt},st.level=dt=>{if(typeof dt=="string"){if(!st.levels.hasOwnProperty(dt))throw new Error(`"${dt}" in not a valid log level`);rt=dt}return rt},st.history=()=>history?[].concat(history):[],st.history.filter=dt=>(history||[]).filter(ft=>new RegExp(`.*${dt}.*`).test(ft[0])),st.history.clear=()=>{history&&(history.length=0)},st.history.disable=()=>{history!==null&&(history.length=0,history=null)},st.history.enable=()=>{history===null&&(history=[])},st.error=(...dt)=>nt("error",rt,dt),st.warn=(...dt)=>nt("warn",rt,dt),st.debug=(...dt)=>nt("debug",rt,dt),st}const log$1$1=createLogger$1("VIDEOJS"),createLogger=log$1$1.createLogger,toString=Object.prototype.toString,keys=function(et){return isObject$1(et)?Object.keys(et):[]};function each(et,_e){keys(et).forEach(tt=>_e(et[tt],tt))}function reduce(et,_e,tt=0){return keys(et).reduce((rt,nt)=>_e(rt,et[nt],nt),tt)}function isObject$1(et){return!!et&&typeof et=="object"}function isPlain(et){return isObject$1(et)&&toString.call(et)==="[object Object]"&&et.constructor===Object}function merge$1(...et){const _e={};return et.forEach(tt=>{tt&&each(tt,(rt,nt)=>{if(!isPlain(rt)){_e[nt]=rt;return}isPlain(_e[nt])||(_e[nt]={}),_e[nt]=merge$1(_e[nt],rt)})}),_e}function values(et={}){const _e=[];for(const tt in et)if(et.hasOwnProperty(tt)){const rt=et[tt];_e.push(rt)}return _e}function defineLazyProperty(et,_e,tt,rt=!0){const nt=dt=>Object.defineProperty(et,_e,{value:dt,enumerable:!0,writable:!0}),st={configurable:!0,enumerable:!0,get(){const dt=tt();return nt(dt),dt}};return rt&&(st.set=nt),Object.defineProperty(et,_e,st)}var Obj=Object.freeze({__proto__:null,each,reduce,isObject:isObject$1,isPlain,merge:merge$1,values,defineLazyProperty});let IS_IPOD=!1,IOS_VERSION=null,IS_ANDROID=!1,ANDROID_VERSION,IS_FIREFOX=!1,IS_EDGE=!1,IS_CHROMIUM=!1,IS_CHROME=!1,CHROMIUM_VERSION=null,CHROME_VERSION=null;const IS_CHROMECAST_RECEIVER=!!(window$1.cast&&window$1.cast.framework&&window$1.cast.framework.CastReceiverContext);let IE_VERSION=null,IS_SAFARI=!1,IS_WINDOWS=!1,IS_IPAD=!1,IS_IPHONE=!1,IS_TIZEN=!1,IS_WEBOS=!1,IS_SMART_TV=!1;const TOUCH_ENABLED=!!(isReal()&&("ontouchstart"in window$1||window$1.navigator.maxTouchPoints||window$1.DocumentTouch&&window$1.document instanceof window$1.DocumentTouch)),UAD=window$1.navigator&&window$1.navigator.userAgentData;UAD&&UAD.platform&&UAD.brands&&(IS_ANDROID=UAD.platform==="Android",IS_EDGE=!!UAD.brands.find(et=>et.brand==="Microsoft Edge"),IS_CHROMIUM=!!UAD.brands.find(et=>et.brand==="Chromium"),IS_CHROME=!IS_EDGE&&IS_CHROMIUM,CHROMIUM_VERSION=CHROME_VERSION=(UAD.brands.find(et=>et.brand==="Chromium")||{}).version||null,IS_WINDOWS=UAD.platform==="Windows");if(!IS_CHROMIUM){const et=window$1.navigator&&window$1.navigator.userAgent||"";IS_IPOD=/iPod/i.test(et),IOS_VERSION=(function(){const _e=et.match(/OS (\d+)_/i);return _e&&_e[1]?_e[1]:null})(),IS_ANDROID=/Android/i.test(et),ANDROID_VERSION=(function(){const _e=et.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!_e)return null;const tt=_e[1]&&parseFloat(_e[1]),rt=_e[2]&&parseFloat(_e[2]);return tt&&rt?parseFloat(_e[1]+"."+_e[2]):tt||null})(),IS_FIREFOX=/Firefox/i.test(et),IS_EDGE=/Edg/i.test(et),IS_CHROMIUM=/Chrome/i.test(et)||/CriOS/i.test(et),IS_CHROME=!IS_EDGE&&IS_CHROMIUM,CHROMIUM_VERSION=CHROME_VERSION=(function(){const _e=et.match(/(Chrome|CriOS)\/(\d+)/);return _e&&_e[2]?parseFloat(_e[2]):null})(),IE_VERSION=(function(){const _e=/MSIE\s(\d+)\.\d/.exec(et);let tt=_e&&parseFloat(_e[1]);return!tt&&/Trident\/7.0/i.test(et)&&/rv:11.0/.test(et)&&(tt=11),tt})(),IS_TIZEN=/Tizen/i.test(et),IS_WEBOS=/Web0S/i.test(et),IS_SMART_TV=IS_TIZEN||IS_WEBOS,IS_SAFARI=/Safari/i.test(et)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE&&!IS_SMART_TV,IS_WINDOWS=/Windows/i.test(et),IS_IPAD=/iPad/i.test(et)||IS_SAFARI&&TOUCH_ENABLED&&!/iPhone/i.test(et),IS_IPHONE=/iPhone/i.test(et)&&!IS_IPAD}const IS_IOS=IS_IPHONE||IS_IPAD||IS_IPOD,IS_ANY_SAFARI=(IS_SAFARI||IS_IOS)&&!IS_CHROME;var browser=Object.freeze({__proto__:null,get IS_IPOD(){return IS_IPOD},get IOS_VERSION(){return IOS_VERSION},get IS_ANDROID(){return IS_ANDROID},get ANDROID_VERSION(){return ANDROID_VERSION},get IS_FIREFOX(){return IS_FIREFOX},get IS_EDGE(){return IS_EDGE},get IS_CHROMIUM(){return IS_CHROMIUM},get IS_CHROME(){return IS_CHROME},get CHROMIUM_VERSION(){return CHROMIUM_VERSION},get CHROME_VERSION(){return CHROME_VERSION},IS_CHROMECAST_RECEIVER,get IE_VERSION(){return IE_VERSION},get IS_SAFARI(){return IS_SAFARI},get IS_WINDOWS(){return IS_WINDOWS},get IS_IPAD(){return IS_IPAD},get IS_IPHONE(){return IS_IPHONE},get IS_TIZEN(){return IS_TIZEN},get IS_WEBOS(){return IS_WEBOS},get IS_SMART_TV(){return IS_SMART_TV},TOUCH_ENABLED,IS_IOS,IS_ANY_SAFARI});function isNonBlankString(et){return typeof et=="string"&&!!et.trim()}function throwIfWhitespace(et){if(et.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function isReal(){return document$1===window$1.document}function isEl(et){return isObject$1(et)&&et.nodeType===1}function isInFrame(){try{return window$1.parent!==window$1.self}catch{return!0}}function createQuerier(et){return function(_e,tt){if(!isNonBlankString(_e))return document$1[et](null);isNonBlankString(tt)&&(tt=document$1.querySelector(tt));const rt=isEl(tt)?tt:document$1;return rt[et]&&rt[et](_e)}}function createEl(et="div",_e={},tt={},rt){const nt=document$1.createElement(et);return Object.getOwnPropertyNames(_e).forEach(function(st){const dt=_e[st];st==="textContent"?textContent(nt,dt):(nt[st]!==dt||st==="tabIndex")&&(nt[st]=dt)}),Object.getOwnPropertyNames(tt).forEach(function(st){nt.setAttribute(st,tt[st])}),rt&&appendContent(nt,rt),nt}function textContent(et,_e){return typeof et.textContent>"u"?et.innerText=_e:et.textContent=_e,et}function prependTo(et,_e){_e.firstChild?_e.insertBefore(et,_e.firstChild):_e.appendChild(et)}function hasClass(et,_e){return throwIfWhitespace(_e),et.classList.contains(_e)}function addClass$2(et,..._e){return et.classList.add(..._e.reduce((tt,rt)=>tt.concat(rt.split(/\s+/)),[])),et}function removeClass$2(et,..._e){return et?(et.classList.remove(..._e.reduce((tt,rt)=>tt.concat(rt.split(/\s+/)),[])),et):(log$1$1.warn("removeClass was called with an element that doesn't exist"),null)}function toggleClass(et,_e,tt){return typeof tt=="function"&&(tt=tt(et,_e)),typeof tt!="boolean"&&(tt=void 0),_e.split(/\s+/).forEach(rt=>et.classList.toggle(rt,tt)),et}function setAttributes(et,_e){Object.getOwnPropertyNames(_e).forEach(function(tt){const rt=_e[tt];rt===null||typeof rt>"u"||rt===!1?et.removeAttribute(tt):et.setAttribute(tt,rt===!0?"":rt)})}function getAttributes(et){const _e={},tt=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(et&&et.attributes&&et.attributes.length>0){const rt=et.attributes;for(let nt=rt.length-1;nt>=0;nt--){const st=rt[nt].name;let dt=rt[nt].value;tt.includes(st)&&(dt=dt!==null),_e[st]=dt}}return _e}function getAttribute(et,_e){return et.getAttribute(_e)}function setAttribute(et,_e,tt){et.setAttribute(_e,tt)}function removeAttribute(et,_e){et.removeAttribute(_e)}function blockTextSelection(){document$1.body.focus(),document$1.onselectstart=function(){return!1}}function unblockTextSelection(){document$1.onselectstart=function(){return!0}}function getBoundingClientRect(et){if(et&&et.getBoundingClientRect&&et.parentNode){const _e=et.getBoundingClientRect(),tt={};return["bottom","height","left","right","top","width"].forEach(rt=>{_e[rt]!==void 0&&(tt[rt]=_e[rt])}),tt.height||(tt.height=parseFloat(computedStyle(et,"height"))),tt.width||(tt.width=parseFloat(computedStyle(et,"width"))),tt}}function findPosition(et){if(!et||et&&!et.offsetParent)return{left:0,top:0,width:0,height:0};const _e=et.offsetWidth,tt=et.offsetHeight;let rt=0,nt=0;for(;et.offsetParent&&et!==document$1[FullscreenApi.fullscreenElement];)rt+=et.offsetLeft,nt+=et.offsetTop,et=et.offsetParent;return{left:rt,top:nt,width:_e,height:tt}}function getPointerPosition(et,_e){const tt={x:0,y:0};if(IS_IOS){let bt=et;for(;bt&&bt.nodeName.toLowerCase()!=="html";){const St=computedStyle(bt,"transform");if(/^matrix/.test(St)){const Et=St.slice(7,-1).split(/,\s/).map(Number);tt.x+=Et[4],tt.y+=Et[5]}else if(/^matrix3d/.test(St)){const Et=St.slice(9,-1).split(/,\s/).map(Number);tt.x+=Et[12],tt.y+=Et[13]}if(bt.assignedSlot&&bt.assignedSlot.parentElement&&window$1.WebKitCSSMatrix){const Et=window$1.getComputedStyle(bt.assignedSlot.parentElement).transform,Ct=new window$1.WebKitCSSMatrix(Et);tt.x+=Ct.m41,tt.y+=Ct.m42}bt=bt.parentNode||bt.host}}const rt={},nt=findPosition(_e.target),st=findPosition(et),dt=st.width,ft=st.height;let ht=_e.offsetY-(st.top-nt.top),mt=_e.offsetX-(st.left-nt.left);return _e.changedTouches&&(mt=_e.changedTouches[0].pageX-st.left,ht=_e.changedTouches[0].pageY+st.top,IS_IOS&&(mt-=tt.x,ht-=tt.y)),rt.y=1-Math.max(0,Math.min(1,ht/ft)),rt.x=Math.max(0,Math.min(1,mt/dt)),rt}function isTextNode(et){return isObject$1(et)&&et.nodeType===3}function emptyEl(et){for(;et.firstChild;)et.removeChild(et.firstChild);return et}function normalizeContent(et){return typeof et=="function"&&(et=et()),(Array.isArray(et)?et:[et]).map(_e=>{if(typeof _e=="function"&&(_e=_e()),isEl(_e)||isTextNode(_e))return _e;if(typeof _e=="string"&&/\S/.test(_e))return document$1.createTextNode(_e)}).filter(_e=>_e)}function appendContent(et,_e){return normalizeContent(_e).forEach(tt=>et.appendChild(tt)),et}function insertContent(et,_e){return appendContent(emptyEl(et),_e)}function isSingleLeftClick(et){return et.button===void 0&&et.buttons===void 0||et.button===0&&et.buttons===void 0||et.type==="mouseup"&&et.button===0&&et.buttons===0||et.type==="mousedown"&&et.button===0&&et.buttons===0?!0:!(et.button!==0||et.buttons!==1)}const $$1=createQuerier("querySelector"),$$=createQuerier("querySelectorAll");function computedStyle(et,_e){if(!et||!_e)return"";if(typeof window$1.getComputedStyle=="function"){let tt;try{tt=window$1.getComputedStyle(et)}catch{return""}return tt?tt.getPropertyValue(_e)||tt[_e]:""}return""}function copyStyleSheetsToWindow(et){[...document$1.styleSheets].forEach(_e=>{try{const tt=[..._e.cssRules].map(nt=>nt.cssText).join(""),rt=document$1.createElement("style");rt.textContent=tt,et.document.head.appendChild(rt)}catch{const rt=document$1.createElement("link");rt.rel="stylesheet",rt.type=_e.type,rt.media=_e.media.mediaText,rt.href=_e.href,et.document.head.appendChild(rt)}})}var Dom=Object.freeze({__proto__:null,isReal,isEl,isInFrame,createEl,textContent,prependTo,hasClass,addClass:addClass$2,removeClass:removeClass$2,toggleClass,setAttributes,getAttributes,getAttribute,setAttribute,removeAttribute,blockTextSelection,unblockTextSelection,getBoundingClientRect,findPosition,getPointerPosition,isTextNode,emptyEl,normalizeContent,appendContent,insertContent,isSingleLeftClick,$:$$1,$$,computedStyle,copyStyleSheetsToWindow});let _windowLoaded=!1,videojs$1;const autoSetup=function(){if(videojs$1.options.autoSetup===!1)return;const et=Array.prototype.slice.call(document$1.getElementsByTagName("video")),_e=Array.prototype.slice.call(document$1.getElementsByTagName("audio")),tt=Array.prototype.slice.call(document$1.getElementsByTagName("video-js")),rt=et.concat(_e,tt);if(rt&&rt.length>0)for(let nt=0,st=rt.length;nt<st;nt++){const dt=rt[nt];if(dt&&dt.getAttribute)dt.player===void 0&&dt.getAttribute("data-setup")!==null&&videojs$1(dt);else{autoSetupTimeout(1);break}}else _windowLoaded||autoSetupTimeout(1)};function autoSetupTimeout(et,_e){isReal()&&(_e&&(videojs$1=_e),window$1.setTimeout(autoSetup,et))}function setWindowLoaded(){_windowLoaded=!0,window$1.removeEventListener("load",setWindowLoaded)}isReal()&&(document$1.readyState==="complete"?setWindowLoaded():window$1.addEventListener("load",setWindowLoaded));const createStyleElement=function(et){const _e=document$1.createElement("style");return _e.className=et,_e},setTextContent=function(et,_e){et.styleSheet?et.styleSheet.cssText=_e:et.textContent=_e};var DomData=new WeakMap;const _initialGuid=3;let _guid=_initialGuid;function newGUID(){return _guid++}function _cleanUpEvents(et,_e){if(!DomData.has(et))return;const tt=DomData.get(et);tt.handlers[_e].length===0&&(delete tt.handlers[_e],et.removeEventListener?et.removeEventListener(_e,tt.dispatcher,!1):et.detachEvent&&et.detachEvent("on"+_e,tt.dispatcher)),Object.getOwnPropertyNames(tt.handlers).length<=0&&(delete tt.handlers,delete tt.dispatcher,delete tt.disabled),Object.getOwnPropertyNames(tt).length===0&&DomData.delete(et)}function _handleMultipleEvents(et,_e,tt,rt){tt.forEach(function(nt){et(_e,nt,rt)})}function fixEvent(et){if(et.fixed_)return et;function _e(){return!0}function tt(){return!1}if(!et||!et.isPropagationStopped||!et.isImmediatePropagationStopped){const rt=et||window$1.event;et={};const nt=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const st in rt)nt.includes(st)||st==="returnValue"&&rt.preventDefault||(et[st]=rt[st]);if(et.target||(et.target=et.srcElement||document$1),et.relatedTarget||(et.relatedTarget=et.fromElement===et.target?et.toElement:et.fromElement),et.preventDefault=function(){rt.preventDefault&&rt.preventDefault(),et.returnValue=!1,rt.returnValue=!1,et.defaultPrevented=!0},et.defaultPrevented=!1,et.stopPropagation=function(){rt.stopPropagation&&rt.stopPropagation(),et.cancelBubble=!0,rt.cancelBubble=!0,et.isPropagationStopped=_e},et.isPropagationStopped=tt,et.stopImmediatePropagation=function(){rt.stopImmediatePropagation&&rt.stopImmediatePropagation(),et.isImmediatePropagationStopped=_e,et.stopPropagation()},et.isImmediatePropagationStopped=tt,et.clientX!==null&&et.clientX!==void 0){const st=document$1.documentElement,dt=document$1.body;et.pageX=et.clientX+(st&&st.scrollLeft||dt&&dt.scrollLeft||0)-(st&&st.clientLeft||dt&&dt.clientLeft||0),et.pageY=et.clientY+(st&&st.scrollTop||dt&&dt.scrollTop||0)-(st&&st.clientTop||dt&&dt.clientTop||0)}et.which=et.charCode||et.keyCode,et.button!==null&&et.button!==void 0&&(et.button=et.button&1?0:et.button&4?1:et.button&2?2:0)}return et.fixed_=!0,et}let _supportsPassive;const supportsPassive=function(){if(typeof _supportsPassive!="boolean"){_supportsPassive=!1;try{const et=Object.defineProperty({},"passive",{get(){_supportsPassive=!0}});window$1.addEventListener("test",null,et),window$1.removeEventListener("test",null,et)}catch{}}return _supportsPassive},passiveEvents=["touchstart","touchmove"];function on(et,_e,tt){if(Array.isArray(_e))return _handleMultipleEvents(on,et,_e,tt);DomData.has(et)||DomData.set(et,{});const rt=DomData.get(et);if(rt.handlers||(rt.handlers={}),rt.handlers[_e]||(rt.handlers[_e]=[]),tt.guid||(tt.guid=newGUID()),rt.handlers[_e].push(tt),rt.dispatcher||(rt.disabled=!1,rt.dispatcher=function(nt,st){if(rt.disabled)return;nt=fixEvent(nt);const dt=rt.handlers[nt.type];if(dt){const ft=dt.slice(0);for(let ht=0,mt=ft.length;ht<mt&&!nt.isImmediatePropagationStopped();ht++)try{ft[ht].call(et,nt,st)}catch(bt){log$1$1.error(bt)}}}),rt.handlers[_e].length===1)if(et.addEventListener){let nt=!1;supportsPassive()&&passiveEvents.indexOf(_e)>-1&&(nt={passive:!0}),et.addEventListener(_e,rt.dispatcher,nt)}else et.attachEvent&&et.attachEvent("on"+_e,rt.dispatcher)}function off(et,_e,tt){if(!DomData.has(et))return;const rt=DomData.get(et);if(!rt.handlers)return;if(Array.isArray(_e))return _handleMultipleEvents(off,et,_e,tt);const nt=function(dt,ft){rt.handlers[ft]=[],_cleanUpEvents(dt,ft)};if(_e===void 0){for(const dt in rt.handlers)Object.prototype.hasOwnProperty.call(rt.handlers||{},dt)&&nt(et,dt);return}const st=rt.handlers[_e];if(st){if(!tt){nt(et,_e);return}if(tt.guid)for(let dt=0;dt<st.length;dt++)st[dt].guid===tt.guid&&st.splice(dt--,1);_cleanUpEvents(et,_e)}}function trigger$1(et,_e,tt){const rt=DomData.has(et)?DomData.get(et):{},nt=et.parentNode||et.ownerDocument;if(typeof _e=="string"?_e={type:_e,target:et}:_e.target||(_e.target=et),_e=fixEvent(_e),rt.dispatcher&&rt.dispatcher.call(et,_e,tt),nt&&!_e.isPropagationStopped()&&_e.bubbles===!0)trigger$1.call(null,nt,_e,tt);else if(!nt&&!_e.defaultPrevented&&_e.target&&_e.target[_e.type]){DomData.has(_e.target)||DomData.set(_e.target,{});const st=DomData.get(_e.target);_e.target[_e.type]&&(st.disabled=!0,typeof _e.target[_e.type]=="function"&&_e.target[_e.type](),st.disabled=!1)}return!_e.defaultPrevented}function one(et,_e,tt){if(Array.isArray(_e))return _handleMultipleEvents(one,et,_e,tt);const rt=function(){off(et,_e,rt),tt.apply(this,arguments)};rt.guid=tt.guid=tt.guid||newGUID(),on(et,_e,rt)}function any(et,_e,tt){const rt=function(){off(et,_e,rt),tt.apply(this,arguments)};rt.guid=tt.guid=tt.guid||newGUID(),on(et,_e,rt)}var Events$1=Object.freeze({__proto__:null,fixEvent,on,off,trigger:trigger$1,one,any});const UPDATE_REFRESH_INTERVAL=30,bind_=function(et,_e,tt){_e.guid||(_e.guid=newGUID());const rt=_e.bind(et);return rt.guid=tt?tt+"_"+_e.guid:_e.guid,rt},throttle=function(et,_e){let tt=window$1.performance.now();return function(...nt){const st=window$1.performance.now();st-tt>=_e&&(et(...nt),tt=st)}},debounce$1=function(et,_e,tt,rt=window$1){let nt;const st=()=>{rt.clearTimeout(nt),nt=null},dt=function(){const ft=this,ht=arguments;let mt=function(){nt=null,mt=null,tt||et.apply(ft,ht)};!nt&&tt&&et.apply(ft,ht),rt.clearTimeout(nt),nt=rt.setTimeout(mt,_e)};return dt.cancel=st,dt};var Fn=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL,bind_,throttle,debounce:debounce$1});let EVENT_MAP;class EventTarget$2{on(_e,tt){const rt=this.addEventListener;this.addEventListener=()=>{},on(this,_e,tt),this.addEventListener=rt}off(_e,tt){off(this,_e,tt)}one(_e,tt){const rt=this.addEventListener;this.addEventListener=()=>{},one(this,_e,tt),this.addEventListener=rt}any(_e,tt){const rt=this.addEventListener;this.addEventListener=()=>{},any(this,_e,tt),this.addEventListener=rt}trigger(_e){const tt=_e.type||_e;typeof _e=="string"&&(_e={type:tt}),_e=fixEvent(_e),this.allowedEvents_[tt]&&this["on"+tt]&&this["on"+tt](_e),trigger$1(this,_e)}queueTrigger(_e){EVENT_MAP||(EVENT_MAP=new Map);const tt=_e.type||_e;let rt=EVENT_MAP.get(this);rt||(rt=new Map,EVENT_MAP.set(this,rt));const nt=rt.get(tt);rt.delete(tt),window$1.clearTimeout(nt);const st=window$1.setTimeout(()=>{rt.delete(tt),rt.size===0&&(rt=null,EVENT_MAP.delete(this)),this.trigger(_e)},0);rt.set(tt,st)}}EventTarget$2.prototype.allowedEvents_={};EventTarget$2.prototype.addEventListener=EventTarget$2.prototype.on;EventTarget$2.prototype.removeEventListener=EventTarget$2.prototype.off;EventTarget$2.prototype.dispatchEvent=EventTarget$2.prototype.trigger;const objName=et=>typeof et.name=="function"?et.name():typeof et.name=="string"?et.name:et.name_?et.name_:et.constructor&&et.constructor.name?et.constructor.name:typeof et,isEvented=et=>et instanceof EventTarget$2||!!et.eventBusEl_&&["on","one","off","trigger"].every(_e=>typeof et[_e]=="function"),addEventedCallback=(et,_e)=>{isEvented(et)?_e():(et.eventedCallbacks||(et.eventedCallbacks=[]),et.eventedCallbacks.push(_e))},isValidEventType=et=>typeof et=="string"&&/\S/.test(et)||Array.isArray(et)&&!!et.length,validateTarget=(et,_e,tt)=>{if(!et||!et.nodeName&&!isEvented(et))throw new Error(`Invalid target for ${objName(_e)}#${tt}; must be a DOM node or evented object.`)},validateEventType=(et,_e,tt)=>{if(!isValidEventType(et))throw new Error(`Invalid event type for ${objName(_e)}#${tt}; must be a non-empty string or array.`)},validateListener=(et,_e,tt)=>{if(typeof et!="function")throw new Error(`Invalid listener for ${objName(_e)}#${tt}; must be a function.`)},normalizeListenArgs=(et,_e,tt)=>{const rt=_e.length<3||_e[0]===et||_e[0]===et.eventBusEl_;let nt,st,dt;return rt?(nt=et.eventBusEl_,_e.length>=3&&_e.shift(),[st,dt]=_e):(nt=_e[0],st=_e[1],dt=_e[2]),validateTarget(nt,et,tt),validateEventType(st,et,tt),validateListener(dt,et,tt),dt=bind_(et,dt),{isTargetingSelf:rt,target:nt,type:st,listener:dt}},listen=(et,_e,tt,rt)=>{validateTarget(et,et,_e),et.nodeName?Events$1[_e](et,tt,rt):et[_e](tt,rt)},EventedMixin={on(...et){const{isTargetingSelf:_e,target:tt,type:rt,listener:nt}=normalizeListenArgs(this,et,"on");if(listen(tt,"on",rt,nt),!_e){const st=()=>this.off(tt,rt,nt);st.guid=nt.guid;const dt=()=>this.off("dispose",st);dt.guid=nt.guid,listen(this,"on","dispose",st),listen(tt,"on","dispose",dt)}},one(...et){const{isTargetingSelf:_e,target:tt,type:rt,listener:nt}=normalizeListenArgs(this,et,"one");if(_e)listen(tt,"one",rt,nt);else{const st=(...dt)=>{this.off(tt,rt,st),nt.apply(null,dt)};st.guid=nt.guid,listen(tt,"one",rt,st)}},any(...et){const{isTargetingSelf:_e,target:tt,type:rt,listener:nt}=normalizeListenArgs(this,et,"any");if(_e)listen(tt,"any",rt,nt);else{const st=(...dt)=>{this.off(tt,rt,st),nt.apply(null,dt)};st.guid=nt.guid,listen(tt,"any",rt,st)}},off(et,_e,tt){if(!et||isValidEventType(et))off(this.eventBusEl_,et,_e);else{const rt=et,nt=_e;validateTarget(rt,this,"off"),validateEventType(nt,this,"off"),validateListener(tt,this,"off"),tt=bind_(this,tt),this.off("dispose",tt),rt.nodeName?(off(rt,nt,tt),off(rt,"dispose",tt)):isEvented(rt)&&(rt.off(nt,tt),rt.off("dispose",tt))}},trigger(et,_e){validateTarget(this.eventBusEl_,this,"trigger");const tt=et&&typeof et!="string"?et.type:et;if(!isValidEventType(tt))throw new Error(`Invalid event type for ${objName(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return trigger$1(this.eventBusEl_,et,_e)}};function evented(et,_e={}){const{eventBusKey:tt}=_e;if(tt){if(!et[tt].nodeName)throw new Error(`The eventBusKey "${tt}" does not refer to an element.`);et.eventBusEl_=et[tt]}else et.eventBusEl_=createEl("span",{className:"vjs-event-bus"});return Object.assign(et,EventedMixin),et.eventedCallbacks&&et.eventedCallbacks.forEach(rt=>{rt()}),et.on("dispose",()=>{et.off(),[et,et.el_,et.eventBusEl_].forEach(function(rt){rt&&DomData.has(rt)&&DomData.delete(rt)}),window$1.setTimeout(()=>{et.eventBusEl_=null},0)}),et}const StatefulMixin={state:{},setState(et){typeof et=="function"&&(et=et());let _e;return each(et,(tt,rt)=>{this.state[rt]!==tt&&(_e=_e||{},_e[rt]={from:this.state[rt],to:tt}),this.state[rt]=tt}),_e&&isEvented(this)&&this.trigger({changes:_e,type:"statechanged"}),_e}};function stateful(et,_e){return Object.assign(et,StatefulMixin),et.state=Object.assign({},et.state,_e),typeof et.handleStateChanged=="function"&&isEvented(et)&&et.on("statechanged",et.handleStateChanged),et}const toLowerCase=function(et){return typeof et!="string"?et:et.replace(/./,_e=>_e.toLowerCase())},toTitleCase$1=function(et){return typeof et!="string"?et:et.replace(/./,_e=>_e.toUpperCase())},titleCaseEquals=function(et,_e){return toTitleCase$1(et)===toTitleCase$1(_e)};var Str=Object.freeze({__proto__:null,toLowerCase,toTitleCase:toTitleCase$1,titleCaseEquals});class Component$1{constructor(_e,tt,rt){if(!_e&&this.play?this.player_=_e=this:this.player_=_e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=merge$1({},this.options_),tt=this.options_=merge$1(this.options_,tt),this.id_=tt.id||tt.el&&tt.el.id,!this.id_){const nt=_e&&_e.id&&_e.id()||"no_player";this.id_=`${nt}_component_${newGUID()}`}this.name_=tt.name||null,tt.el?this.el_=tt.el:tt.createEl!==!1&&(this.el_=this.createEl()),tt.className&&this.el_&&tt.className.split(" ").forEach(nt=>this.addClass(nt)),["on","off","one","any","trigger"].forEach(nt=>{this[nt]=void 0}),tt.evented!==!1&&(evented(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),stateful(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,tt.initChildren!==!1&&this.initChildren(),this.ready(rt),tt.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(_e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let tt=this.children_.length-1;tt>=0;tt--)this.children_[tt].dispose&&this.children_[tt].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(_e.restoreEl?this.el_.parentNode.replaceChild(_e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(_e){return _e?(this.options_=merge$1(this.options_,_e),this.options_):this.options_}el(){return this.el_}createEl(_e,tt,rt){return createEl(_e,tt,rt)}localize(_e,tt,rt=_e){const nt=this.player_.language&&this.player_.language(),st=this.player_.languages&&this.player_.languages(),dt=st&&st[nt],ft=nt&&nt.split("-")[0],ht=st&&st[ft];let mt=rt;return dt&&dt[_e]?mt=dt[_e]:ht&&ht[_e]&&(mt=ht[_e]),tt&&(mt=mt.replace(/\{(\d+)\}/g,function(bt,St){const Et=tt[St-1];let Ct=Et;return typeof Et>"u"&&(Ct=bt),Ct})),mt}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(_e){return this.childIndex_[_e]}getChild(_e){if(_e)return this.childNameIndex_[_e]}getDescendant(..._e){_e=_e.reduce((rt,nt)=>rt.concat(nt),[]);let tt=this;for(let rt=0;rt<_e.length;rt++)if(tt=tt.getChild(_e[rt]),!tt||!tt.getChild)return;return tt}setIcon(_e,tt=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const rt="http://www.w3.org/2000/svg",nt=createEl("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),st=document$1.createElementNS(rt,"svg");st.setAttributeNS(null,"viewBox","0 0 512 512");const dt=document$1.createElementNS(rt,"use");return st.appendChild(dt),dt.setAttributeNS(null,"href",`#vjs-icon-${_e}`),nt.appendChild(st),this.iconIsSet_?tt.replaceChild(nt,tt.querySelector(".vjs-icon-placeholder")):tt.appendChild(nt),this.iconIsSet_=!0,nt}addChild(_e,tt={},rt=this.children_.length){let nt,st;if(typeof _e=="string"){st=toTitleCase$1(_e);const dt=tt.componentClass||st;tt.name=st;const ft=Component$1.getComponent(dt);if(!ft)throw new Error(`Component ${dt} does not exist`);if(typeof ft!="function")return null;nt=new ft(this.player_||this,tt)}else nt=_e;if(nt.parentComponent_&&nt.parentComponent_.removeChild(nt),this.children_.splice(rt,0,nt),nt.parentComponent_=this,typeof nt.id=="function"&&(this.childIndex_[nt.id()]=nt),st=st||nt.name&&toTitleCase$1(nt.name()),st&&(this.childNameIndex_[st]=nt,this.childNameIndex_[toLowerCase(st)]=nt),typeof nt.el=="function"&&nt.el()){let dt=null;this.children_[rt+1]&&(this.children_[rt+1].el_?dt=this.children_[rt+1].el_:isEl(this.children_[rt+1])&&(dt=this.children_[rt+1])),this.contentEl().insertBefore(nt.el(),dt)}return nt}removeChild(_e){if(typeof _e=="string"&&(_e=this.getChild(_e)),!_e||!this.children_)return;let tt=!1;for(let nt=this.children_.length-1;nt>=0;nt--)if(this.children_[nt]===_e){tt=!0,this.children_.splice(nt,1);break}if(!tt)return;_e.parentComponent_=null,this.childIndex_[_e.id()]=null,this.childNameIndex_[toTitleCase$1(_e.name())]=null,this.childNameIndex_[toLowerCase(_e.name())]=null;const rt=_e.el();rt&&rt.parentNode===this.contentEl()&&this.contentEl().removeChild(_e.el())}initChildren(){const _e=this.options_.children;if(_e){const tt=this.options_,rt=dt=>{const ft=dt.name;let ht=dt.opts;if(tt[ft]!==void 0&&(ht=tt[ft]),ht===!1)return;ht===!0&&(ht={}),ht.playerOptions=this.options_.playerOptions;const mt=this.addChild(ft,ht);mt&&(this[ft]=mt)};let nt;const st=Component$1.getComponent("Tech");Array.isArray(_e)?nt=_e:nt=Object.keys(_e),nt.concat(Object.keys(this.options_).filter(function(dt){return!nt.some(function(ft){return typeof ft=="string"?dt===ft:dt===ft.name})})).map(dt=>{let ft,ht;return typeof dt=="string"?(ft=dt,ht=_e[ft]||this.options_[ft]||{}):(ft=dt.name,ht=dt),{name:ft,opts:ht}}).filter(dt=>{const ft=Component$1.getComponent(dt.opts.componentClass||toTitleCase$1(dt.name));return ft&&!st.isTech(ft)}).forEach(rt)}}buildCSSClass(){return""}ready(_e,tt=!1){if(_e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(_e);return}tt?_e.call(this):this.setTimeout(_e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const _e=this.readyQueue_;this.readyQueue_=[],_e&&_e.length>0&&_e.forEach(function(tt){tt.call(this)},this),this.trigger("ready")},1)}$(_e,tt){return $$1(_e,tt||this.contentEl())}$$(_e,tt){return $$(_e,tt||this.contentEl())}hasClass(_e){return hasClass(this.el_,_e)}addClass(..._e){addClass$2(this.el_,..._e)}removeClass(..._e){removeClass$2(this.el_,..._e)}toggleClass(_e,tt){toggleClass(this.el_,_e,tt)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(_e){return getAttribute(this.el_,_e)}setAttribute(_e,tt){setAttribute(this.el_,_e,tt)}removeAttribute(_e){removeAttribute(this.el_,_e)}width(_e,tt){return this.dimension("width",_e,tt)}height(_e,tt){return this.dimension("height",_e,tt)}dimensions(_e,tt){this.width(_e,!0),this.height(tt)}dimension(_e,tt,rt){if(tt!==void 0){(tt===null||tt!==tt)&&(tt=0),(""+tt).indexOf("%")!==-1||(""+tt).indexOf("px")!==-1?this.el_.style[_e]=tt:tt==="auto"?this.el_.style[_e]="":this.el_.style[_e]=tt+"px",rt||this.trigger("componentresize");return}if(!this.el_)return 0;const nt=this.el_.style[_e],st=nt.indexOf("px");return parseInt(st!==-1?nt.slice(0,st):this.el_["offset"+toTitleCase$1(_e)],10)}currentDimension(_e){let tt=0;if(_e!=="width"&&_e!=="height")throw new Error("currentDimension only accepts width or height value");if(tt=computedStyle(this.el_,_e),tt=parseFloat(tt),tt===0||isNaN(tt)){const rt=`offset${toTitleCase$1(_e)}`;tt=this.el_[rt]}return tt}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const _e=this.el_.getBoundingClientRect(),tt={x:_e.x,y:_e.y,width:_e.width,height:_e.height,top:_e.top,right:_e.right,bottom:_e.bottom,left:_e.left},rt={x:_e.left+_e.width/2,y:_e.top+_e.height/2,width:0,height:0,top:_e.top+_e.height/2,right:_e.left+_e.width/2,bottom:_e.top+_e.height/2,left:_e.left+_e.width/2};return{boundingClientRect:tt,center:rt}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(_e){this.player_&&(_e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&_e.stopPropagation(),this.player_.handleKeyDown(_e))}handleKeyPress(_e){this.handleKeyDown(_e)}emitTapEvents(){let _e=0,tt=null;const rt=10,nt=200;let st;this.on("touchstart",function(ft){ft.touches.length===1&&(tt={pageX:ft.touches[0].pageX,pageY:ft.touches[0].pageY},_e=window$1.performance.now(),st=!0)}),this.on("touchmove",function(ft){if(ft.touches.length>1)st=!1;else if(tt){const ht=ft.touches[0].pageX-tt.pageX,mt=ft.touches[0].pageY-tt.pageY;Math.sqrt(ht*ht+mt*mt)>rt&&(st=!1)}});const dt=function(){st=!1};this.on("touchleave",dt),this.on("touchcancel",dt),this.on("touchend",function(ft){tt=null,st===!0&&window$1.performance.now()-_e<nt&&(ft.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const _e=bind_(this.player(),this.player().reportUserActivity);let tt;this.on("touchstart",function(){_e(),this.clearInterval(tt),tt=this.setInterval(_e,250)});const rt=function(nt){_e(),this.clearInterval(tt)};this.on("touchmove",_e),this.on("touchend",rt),this.on("touchcancel",rt)}setTimeout(_e,tt){var rt;return _e=bind_(this,_e),this.clearTimersOnDispose_(),rt=window$1.setTimeout(()=>{this.setTimeoutIds_.has(rt)&&this.setTimeoutIds_.delete(rt),_e()},tt),this.setTimeoutIds_.add(rt),rt}clearTimeout(_e){return this.setTimeoutIds_.has(_e)&&(this.setTimeoutIds_.delete(_e),window$1.clearTimeout(_e)),_e}setInterval(_e,tt){_e=bind_(this,_e),this.clearTimersOnDispose_();const rt=window$1.setInterval(_e,tt);return this.setIntervalIds_.add(rt),rt}clearInterval(_e){return this.setIntervalIds_.has(_e)&&(this.setIntervalIds_.delete(_e),window$1.clearInterval(_e)),_e}requestAnimationFrame(_e){this.clearTimersOnDispose_();var tt;return _e=bind_(this,_e),tt=window$1.requestAnimationFrame(()=>{this.rafIds_.has(tt)&&this.rafIds_.delete(tt),_e()}),this.rafIds_.add(tt),tt}requestNamedAnimationFrame(_e,tt){this.namedRafs_.has(_e)&&this.cancelNamedAnimationFrame(_e),this.clearTimersOnDispose_(),tt=bind_(this,tt);const rt=this.requestAnimationFrame(()=>{tt(),this.namedRafs_.has(_e)&&this.namedRafs_.delete(_e)});return this.namedRafs_.set(_e,rt),_e}cancelNamedAnimationFrame(_e){this.namedRafs_.has(_e)&&(this.cancelAnimationFrame(this.namedRafs_.get(_e)),this.namedRafs_.delete(_e))}cancelAnimationFrame(_e){return this.rafIds_.has(_e)&&(this.rafIds_.delete(_e),window$1.cancelAnimationFrame(_e)),_e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([_e,tt])=>{this[_e].forEach((rt,nt)=>this[tt](nt))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(_e){return(_e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(_e){function tt(st){const dt=window$1.getComputedStyle(st,null),ft=dt.getPropertyValue("visibility");return dt.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(ft)}function rt(st){return!(!tt(st.parentElement)||!tt(st)||st.style.opacity==="0"||window$1.getComputedStyle(st).height==="0px"||window$1.getComputedStyle(st).width==="0px")}function nt(st){if(st.offsetWidth+st.offsetHeight+st.getBoundingClientRect().height+st.getBoundingClientRect().width===0)return!1;const dt={x:st.getBoundingClientRect().left+st.offsetWidth/2,y:st.getBoundingClientRect().top+st.offsetHeight/2};if(dt.x<0||dt.x>(document$1.documentElement.clientWidth||window$1.innerWidth)||dt.y<0||dt.y>(document$1.documentElement.clientHeight||window$1.innerHeight))return!1;let ft=document$1.elementFromPoint(dt.x,dt.y);for(;ft;){if(ft===st)return!0;if(ft.parentNode)ft=ft.parentNode;else return!1}}return _e||(_e=this.el()),!!(nt(_e)&&rt(_e)&&(!_e.parentElement||_e.tabIndex>=0))}static registerComponent(_e,tt){if(typeof _e!="string"||!_e)throw new Error(`Illegal component name, "${_e}"; must be a non-empty string.`);const rt=Component$1.getComponent("Tech"),nt=rt&&rt.isTech(tt),st=Component$1===tt||Component$1.prototype.isPrototypeOf(tt.prototype);if(nt||!st){let ft;throw nt?ft="techs must be registered using Tech.registerTech()":ft="must be a Component subclass",new Error(`Illegal component, "${_e}"; ${ft}.`)}_e=toTitleCase$1(_e),Component$1.components_||(Component$1.components_={});const dt=Component$1.getComponent("Player");if(_e==="Player"&&dt&&dt.players){const ft=dt.players,ht=Object.keys(ft);if(ft&&ht.length>0){for(let mt=0;mt<ht.length;mt++)if(ft[ht[mt]]!==null)throw new Error("Can not register Player component after player has been created.")}}return Component$1.components_[_e]=tt,Component$1.components_[toLowerCase(_e)]=tt,tt}static getComponent(_e){if(!(!_e||!Component$1.components_))return Component$1.components_[_e]}}Component$1.registerComponent("Component",Component$1);function rangeCheck(et,_e,tt){if(typeof _e!="number"||_e<0||_e>tt)throw new Error(`Failed to execute '${et}' on 'TimeRanges': The index provided (${_e}) is non-numeric or out of bounds (0-${tt}).`)}function getRange(et,_e,tt,rt){return rangeCheck(et,rt,tt.length-1),tt[rt][_e]}function createTimeRangesObj(et){let _e;return et===void 0||et.length===0?_e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:_e={length:et.length,start:getRange.bind(null,"start",0,et),end:getRange.bind(null,"end",1,et)},window$1.Symbol&&window$1.Symbol.iterator&&(_e[window$1.Symbol.iterator]=()=>(et||[]).values()),_e}function createTimeRanges$1(et,_e){return Array.isArray(et)?createTimeRangesObj(et):et===void 0||_e===void 0?createTimeRangesObj():createTimeRangesObj([[et,_e]])}const defaultImplementation=function(et,_e){et=et<0?0:et;let tt=Math.floor(et%60),rt=Math.floor(et/60%60),nt=Math.floor(et/3600);const st=Math.floor(_e/60%60),dt=Math.floor(_e/3600);return(isNaN(et)||et===1/0)&&(nt=rt=tt="-"),nt=nt>0||dt>0?nt+":":"",rt=((nt||st>=10)&&rt<10?"0"+rt:rt)+":",tt=tt<10?"0"+tt:tt,nt+rt+tt};let implementation=defaultImplementation;function setFormatTime(et){implementation=et}function resetFormatTime(){implementation=defaultImplementation}function formatTime(et,_e=et){return implementation(et,_e)}var Time=Object.freeze({__proto__:null,createTimeRanges:createTimeRanges$1,createTimeRange:createTimeRanges$1,setFormatTime,resetFormatTime,formatTime});function bufferedPercent(et,_e){let tt=0,rt,nt;if(!_e)return 0;(!et||!et.length)&&(et=createTimeRanges$1(0,0));for(let st=0;st<et.length;st++)rt=et.start(st),nt=et.end(st),nt>_e&&(nt=_e),tt+=nt-rt;return tt/_e}function MediaError(et){if(et instanceof MediaError)return et;typeof et=="number"?this.code=et:typeof et=="string"?this.message=et:isObject$1(et)&&(typeof et.code=="number"&&(this.code=et.code),Object.assign(this,et)),this.message||(this.message=MediaError.defaultMessages[this.code]||"")}MediaError.prototype.code=0;MediaError.prototype.message="";MediaError.prototype.status=null;MediaError.prototype.metadata=null;MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];MediaError.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};MediaError.MEDIA_ERR_CUSTOM=0;MediaError.prototype.MEDIA_ERR_CUSTOM=0;MediaError.MEDIA_ERR_ABORTED=1;MediaError.prototype.MEDIA_ERR_ABORTED=1;MediaError.MEDIA_ERR_NETWORK=2;MediaError.prototype.MEDIA_ERR_NETWORK=2;MediaError.MEDIA_ERR_DECODE=3;MediaError.prototype.MEDIA_ERR_DECODE=3;MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED=4;MediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;MediaError.MEDIA_ERR_ENCRYPTED=5;MediaError.prototype.MEDIA_ERR_ENCRYPTED=5;function isPromise(et){return et!=null&&typeof et.then=="function"}function silencePromise(et){isPromise(et)&&et.then(null,_e=>{})}const trackToJson=function(et){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((tt,rt,nt)=>(et[rt]&&(tt[rt]=et[rt]),tt),{cues:et.cues&&Array.prototype.map.call(et.cues,function(tt){return{startTime:tt.startTime,endTime:tt.endTime,text:tt.text,id:tt.id}})})},textTracksToJson=function(et){const _e=et.$$("track"),tt=Array.prototype.map.call(_e,nt=>nt.track);return Array.prototype.map.call(_e,function(nt){const st=trackToJson(nt.track);return nt.src&&(st.src=nt.src),st}).concat(Array.prototype.filter.call(et.textTracks(),function(nt){return tt.indexOf(nt)===-1}).map(trackToJson))},jsonToTextTracks=function(et,_e){return et.forEach(function(tt){const rt=_e.addRemoteTextTrack(tt).track;!tt.src&&tt.cues&&tt.cues.forEach(nt=>rt.addCue(nt))}),_e.textTracks()};var textTrackConverter={textTracksToJson,jsonToTextTracks,trackToJson};const MODAL_CLASS_NAME="vjs-modal-dialog";class ModalDialog extends Component$1{constructor(_e,tt){super(_e,tt),this.handleKeyDown_=rt=>this.handleKeyDown(rt),this.close_=rt=>this.close(rt),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=createEl("div",{className:`${MODAL_CLASS_NAME}-content`},{role:"document"}),this.descEl_=createEl("p",{className:`${MODAL_CLASS_NAME}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),textContent(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let _e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(_e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),_e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const _e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!_e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&_e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=_e.controls(),_e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(_e){return typeof _e=="boolean"&&this[_e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const _e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&_e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&_e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(_e){if(typeof _e=="boolean"){const tt=this.closeable_=!!_e;let rt=this.getChild("closeButton");if(tt&&!rt){const nt=this.contentEl_;this.contentEl_=this.el_,rt=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=nt,this.on(rt,"close",this.close_)}!tt&&rt&&(this.off(rt,"close",this.close_),this.removeChild(rt),rt.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(_e){const tt=this.contentEl(),rt=tt.parentNode,nt=tt.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,rt.removeChild(tt),this.empty(),insertContent(tt,_e),this.trigger("modalfill"),nt?rt.insertBefore(tt,nt):rt.appendChild(tt);const st=this.getChild("closeButton");st&&rt.appendChild(st.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),emptyEl(this.contentEl()),this.trigger("modalempty")}content(_e){return typeof _e<"u"&&(this.content_=_e),this.content_}conditionalFocus_(){const _e=document$1.activeElement,tt=this.player_.el_;this.previouslyActiveEl_=null,(tt.contains(_e)||tt===_e)&&(this.previouslyActiveEl_=_e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(_e){if(this.trigger({type:"modalKeydown",originalEvent:_e,target:this,bubbles:!0}),_e.stopPropagation(),_e.key==="Escape"&&this.closeable()){_e.preventDefault(),this.close();return}if(_e.key!=="Tab")return;const tt=this.focusableEls_(),rt=this.el_.querySelector(":focus");let nt;for(let st=0;st<tt.length;st++)if(rt===tt[st]){nt=st;break}document$1.activeElement===this.el_&&(nt=0),_e.shiftKey&&nt===0?(tt[tt.length-1].focus(),_e.preventDefault()):!_e.shiftKey&&nt===tt.length-1&&(tt[0].focus(),_e.preventDefault())}focusableEls_(){const _e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(_e,tt=>(tt instanceof window$1.HTMLAnchorElement||tt instanceof window$1.HTMLAreaElement)&&tt.hasAttribute("href")||(tt instanceof window$1.HTMLInputElement||tt instanceof window$1.HTMLSelectElement||tt instanceof window$1.HTMLTextAreaElement||tt instanceof window$1.HTMLButtonElement)&&!tt.hasAttribute("disabled")||tt instanceof window$1.HTMLIFrameElement||tt instanceof window$1.HTMLObjectElement||tt instanceof window$1.HTMLEmbedElement||tt.hasAttribute("tabindex")&&tt.getAttribute("tabindex")!==-1||tt.hasAttribute("contenteditable"))}}ModalDialog.prototype.options_={pauseOnOpen:!0,temporary:!0};Component$1.registerComponent("ModalDialog",ModalDialog);class TrackList extends EventTarget$2{constructor(_e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let tt=0;tt<_e.length;tt++)this.addTrack(_e[tt])}addTrack(_e){const tt=this.tracks_.length;""+tt in this||Object.defineProperty(this,tt,{get(){return this.tracks_[tt]}}),this.tracks_.indexOf(_e)===-1&&(this.tracks_.push(_e),this.trigger({track:_e,type:"addtrack",target:this})),_e.labelchange_=()=>{this.trigger({track:_e,type:"labelchange",target:this})},isEvented(_e)&&_e.addEventListener("labelchange",_e.labelchange_)}removeTrack(_e){let tt;for(let rt=0,nt=this.length;rt<nt;rt++)if(this[rt]===_e){tt=this[rt],tt.off&&tt.off(),this.tracks_.splice(rt,1);break}tt&&this.trigger({track:tt,type:"removetrack",target:this})}getTrackById(_e){let tt=null;for(let rt=0,nt=this.length;rt<nt;rt++){const st=this[rt];if(st.id===_e){tt=st;break}}return tt}}TrackList.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const et in TrackList.prototype.allowedEvents_)TrackList.prototype["on"+et]=null;const disableOthers$1=function(et,_e){for(let tt=0;tt<et.length;tt++)!Object.keys(et[tt]).length||_e.id===et[tt].id||(et[tt].enabled=!1)};class AudioTrackList extends TrackList{constructor(_e=[]){for(let tt=_e.length-1;tt>=0;tt--)if(_e[tt].enabled){disableOthers$1(_e,_e[tt]);break}super(_e),this.changing_=!1}addTrack(_e){_e.enabled&&disableOthers$1(this,_e),super.addTrack(_e),_e.addEventListener&&(_e.enabledChange_=()=>{this.changing_||(this.changing_=!0,disableOthers$1(this,_e),this.changing_=!1,this.trigger("change"))},_e.addEventListener("enabledchange",_e.enabledChange_))}removeTrack(_e){super.removeTrack(_e),_e.removeEventListener&&_e.enabledChange_&&(_e.removeEventListener("enabledchange",_e.enabledChange_),_e.enabledChange_=null)}}const disableOthers=function(et,_e){for(let tt=0;tt<et.length;tt++)!Object.keys(et[tt]).length||_e.id===et[tt].id||(et[tt].selected=!1)};class VideoTrackList extends TrackList{constructor(_e=[]){for(let tt=_e.length-1;tt>=0;tt--)if(_e[tt].selected){disableOthers(_e,_e[tt]);break}super(_e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let tt=0;tt<this.length;tt++)if(this[tt].selected)return tt;return-1},set(){}})}addTrack(_e){_e.selected&&disableOthers(this,_e),super.addTrack(_e),_e.addEventListener&&(_e.selectedChange_=()=>{this.changing_||(this.changing_=!0,disableOthers(this,_e),this.changing_=!1,this.trigger("change"))},_e.addEventListener("selectedchange",_e.selectedChange_))}removeTrack(_e){super.removeTrack(_e),_e.removeEventListener&&_e.selectedChange_&&(_e.removeEventListener("selectedchange",_e.selectedChange_),_e.selectedChange_=null)}}class TextTrackList extends TrackList{addTrack(_e){super.addTrack(_e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),_e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(_e.kind)===-1&&_e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(_e){super.removeTrack(_e),_e.removeEventListener&&(this.queueChange_&&_e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&_e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(_e=>_e.toJSON())}}class HtmlTrackElementList{constructor(_e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let tt=0,rt=_e.length;tt<rt;tt++)this.addTrackElement_(_e[tt])}addTrackElement_(_e){const tt=this.trackElements_.length;""+tt in this||Object.defineProperty(this,tt,{get(){return this.trackElements_[tt]}}),this.trackElements_.indexOf(_e)===-1&&this.trackElements_.push(_e)}getTrackElementByTrack_(_e){let tt;for(let rt=0,nt=this.trackElements_.length;rt<nt;rt++)if(_e===this.trackElements_[rt].track){tt=this.trackElements_[rt];break}return tt}removeTrackElement_(_e){for(let tt=0,rt=this.trackElements_.length;tt<rt;tt++)if(_e===this.trackElements_[tt]){this.trackElements_[tt].track&&typeof this.trackElements_[tt].track.off=="function"&&this.trackElements_[tt].track.off(),typeof this.trackElements_[tt].off=="function"&&this.trackElements_[tt].off(),this.trackElements_.splice(tt,1);break}}}class TextTrackCueList{constructor(_e){TextTrackCueList.prototype.setCues_.call(this,_e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(_e){const tt=this.length||0;let rt=0;const nt=_e.length;this.cues_=_e,this.length_=_e.length;const st=function(dt){""+dt in this||Object.defineProperty(this,""+dt,{get(){return this.cues_[dt]}})};if(tt<nt)for(rt=tt;rt<nt;rt++)st.call(this,rt)}getCueById(_e){let tt=null;for(let rt=0,nt=this.length;rt<nt;rt++){const st=this[rt];if(st.id===_e){tt=st;break}}return tt}}const VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"};class Track extends EventTarget$2{constructor(_e={}){super();const tt={id:_e.id||"vjs_track_"+newGUID(),kind:_e.kind||"",language:_e.language||""};let rt=_e.label||"";for(const nt in tt)Object.defineProperty(this,nt,{get(){return tt[nt]},set(){}});Object.defineProperty(this,"label",{get(){return rt},set(nt){nt!==rt&&(rt=nt,this.trigger("labelchange"))}})}}const parseUrl=function(et){return new URL(et,document$1.baseURI)},getAbsoluteURL=function(et){return new URL(et,document$1.baseURI).href},getFileExtension=function(et){if(typeof et=="string"){const tt=et.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return tt?tt[1].toLowerCase():""}return""},isCrossOrigin=function(et,_e=window$1.location){return parseUrl(et).origin!==_e.origin};var Url=Object.freeze({__proto__:null,parseUrl,getAbsoluteURL,getFileExtension,isCrossOrigin});const parseCues=function(et,_e){const tt=new window$1.WebVTT.Parser(window$1,window$1.vttjs,window$1.WebVTT.StringDecoder()),rt=[];tt.oncue=function(nt){_e.addCue(nt)},tt.onparsingerror=function(nt){rt.push(nt)},tt.onflush=function(){_e.trigger({type:"loadeddata",target:_e})},tt.parse(et),rt.length>0&&(window$1.console&&window$1.console.groupCollapsed&&window$1.console.groupCollapsed(`Text Track parsing errors for ${_e.src}`),rt.forEach(nt=>log$1$1.error(nt)),window$1.console&&window$1.console.groupEnd&&window$1.console.groupEnd()),tt.flush()},loadTrack=function(et,_e){const tt={uri:et},rt=isCrossOrigin(et);rt&&(tt.cors=rt);const nt=_e.tech_.crossOrigin()==="use-credentials";nt&&(tt.withCredentials=nt),XHR(tt,bind_(this,function(st,dt,ft){if(st)return log$1$1.error(st,dt);_e.loaded_=!0,typeof window$1.WebVTT!="function"?_e.tech_&&_e.tech_.any(["vttjsloaded","vttjserror"],ht=>{if(ht.type==="vttjserror"){log$1$1.error(`vttjs failed to load, stopping trying to process ${_e.src}`);return}return parseCues(ft,_e)}):parseCues(ft,_e)}))};class TextTrack extends Track{constructor(_e={}){if(!_e.tech)throw new Error("A tech was not provided.");const tt=merge$1(_e,{kind:TextTrackKind[_e.kind]||"subtitles",language:_e.language||_e.srclang||""});let rt=TextTrackMode[tt.mode]||"disabled";const nt=tt.default;(tt.kind==="metadata"||tt.kind==="chapters")&&(rt="hidden"),super(tt),this.tech_=tt.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const st=new TextTrackCueList(this.cues_),dt=new TextTrackCueList(this.activeCues_);let ft=!1;this.timeupdateHandler=bind_(this,function(mt={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){mt.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,ft&&(this.trigger("cuechange"),ft=!1),mt.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const ht=()=>{this.stopTracking()};this.tech_.one("dispose",ht),rt!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return nt},set(){}},mode:{get(){return rt},set(mt){TextTrackMode[mt]&&rt!==mt&&(rt=mt,!this.preload_&&rt!=="disabled"&&this.cues.length===0&&loadTrack(this.src,this),this.stopTracking(),rt!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?st:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return dt;const mt=this.tech_.currentTime(),bt=[];for(let St=0,Et=this.cues.length;St<Et;St++){const Ct=this.cues[St];Ct.startTime<=mt&&Ct.endTime>=mt&&bt.push(Ct)}if(ft=!1,bt.length!==this.activeCues_.length)ft=!0;else for(let St=0;St<bt.length;St++)this.activeCues_.indexOf(bt[St])===-1&&(ft=!0);return this.activeCues_=bt,dt.setCues_(this.activeCues_),dt},set(){}}}),tt.src?(this.src=tt.src,this.preload_||(this.loaded_=!0),(this.preload_||tt.kind!=="subtitles"&&tt.kind!=="captions")&&loadTrack(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(_e){let tt=_e;if(!("getCueAsHTML"in tt)){tt=new window$1.vttjs.VTTCue(_e.startTime,_e.endTime,_e.text);for(const nt in _e)nt in tt||(tt[nt]=_e[nt]);tt.id=_e.id,tt.originalCue_=_e}const rt=this.tech_.textTracks();for(let nt=0;nt<rt.length;nt++)rt[nt]!==this&&rt[nt].removeCue(tt);this.cues_.push(tt),this.cues.setCues_(this.cues_)}toJSON(){return textTrackConverter.trackToJson(this)}removeCue(_e){let tt=this.cues_.length;for(;tt--;){const rt=this.cues_[tt];if(rt===_e||rt.originalCue_&&rt.originalCue_===_e){this.cues_.splice(tt,1),this.cues.setCues_(this.cues_);break}}}}TextTrack.prototype.allowedEvents_={cuechange:"cuechange"};class AudioTrack extends Track{constructor(_e={}){const tt=merge$1(_e,{kind:AudioTrackKind[_e.kind]||""});super(tt);let rt=!1;Object.defineProperty(this,"enabled",{get(){return rt},set(nt){typeof nt!="boolean"||nt===rt||(rt=nt,this.trigger("enabledchange"))}}),tt.enabled&&(this.enabled=tt.enabled),this.loaded_=!0}}class VideoTrack extends Track{constructor(_e={}){const tt=merge$1(_e,{kind:VideoTrackKind[_e.kind]||""});super(tt);let rt=!1;Object.defineProperty(this,"selected",{get(){return rt},set(nt){typeof nt!="boolean"||nt===rt||(rt=nt,this.trigger("selectedchange"))}}),tt.selected&&(this.selected=tt.selected)}}class HTMLTrackElement extends EventTarget$2{constructor(_e={}){super();let tt;const rt=new TextTrack(_e);this.kind=rt.kind,this.src=rt.src,this.srclang=rt.language,this.label=rt.label,this.default=rt.default,Object.defineProperties(this,{readyState:{get(){return tt}},track:{get(){return rt}}}),tt=HTMLTrackElement.NONE,rt.addEventListener("loadeddata",()=>{tt=HTMLTrackElement.LOADED,this.trigger({type:"load",target:this})})}}HTMLTrackElement.prototype.allowedEvents_={load:"load"};HTMLTrackElement.NONE=0;HTMLTrackElement.LOADING=1;HTMLTrackElement.LOADED=2;HTMLTrackElement.ERROR=3;const NORMAL={audio:{ListClass:AudioTrackList,TrackClass:AudioTrack,capitalName:"Audio"},video:{ListClass:VideoTrackList,TrackClass:VideoTrack,capitalName:"Video"},text:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"Text"}};Object.keys(NORMAL).forEach(function(et){NORMAL[et].getterName=`${et}Tracks`,NORMAL[et].privateName=`${et}Tracks_`});const REMOTE={remoteText:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:HtmlTrackElementList,TrackClass:HTMLTrackElement,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ALL=Object.assign({},NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE);NORMAL.names=Object.keys(NORMAL);ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);function createTrackHelper(et,_e,tt,rt,nt={}){const st=et.textTracks();nt.kind=_e,tt&&(nt.label=tt),rt&&(nt.language=rt),nt.tech=et;const dt=new ALL.text.TrackClass(nt);return st.addTrack(dt),dt}class Tech extends Component$1{constructor(_e={},tt=function(){}){_e.reportTouchActivity=!1,super(null,_e,tt),this.onDurationChange_=rt=>this.onDurationChange(rt),this.trackProgress_=rt=>this.trackProgress(rt),this.trackCurrentTime_=rt=>this.trackCurrentTime(rt),this.stopTrackingCurrentTime_=rt=>this.stopTrackingCurrentTime(rt),this.disposeSourceHandler_=rt=>this.disposeSourceHandler(rt),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(rt=>{const nt=ALL[rt];_e&&_e[nt.getterName]&&(this[nt.privateName]=_e[nt.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(rt=>{_e[`native${rt}Tracks`]===!1&&(this[`featuresNative${rt}Tracks`]=!1)}),_e.nativeCaptions===!1||_e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(_e.nativeCaptions===!0||_e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=_e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new ALL.text.ListClass,this.initTrackListeners(),_e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(_e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(_e),1)),this.trigger({src:_e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(_e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind_(this,function(){const tt=this.bufferedPercent();this.bufferedPercent_!==tt&&this.trigger("progress"),this.bufferedPercent_=tt,tt===1&&this.stopTrackingProgress()}),500)}onDurationChange(_e){this.duration_=this.duration()}buffered(){return createTimeRanges$1(0,0)}bufferedPercent(){return bufferedPercent(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(_e){_e=[].concat(_e),_e.forEach(tt=>{const rt=this[`${tt}Tracks`]()||[];let nt=rt.length;for(;nt--;){const st=rt[nt];tt==="text"&&this.removeRemoteTextTrack(st),rt.removeTrack(st)}})}cleanupAutoTextTracks(){const _e=this.autoRemoteTextTracks_||[];let tt=_e.length;for(;tt--;){const rt=_e[tt];this.removeRemoteTextTrack(rt)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(_e){return _e!==void 0&&(this.error_=new MediaError(_e),this.trigger("error")),this.error_}played(){return this.hasStarted_?createTimeRanges$1(0,0):createTimeRanges$1()}play(){}setScrubbing(_e){}scrubbing(){}setCurrentTime(_e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){NORMAL.names.forEach(_e=>{const tt=NORMAL[_e],rt=()=>{this.trigger(`${_e}trackchange`)},nt=this[tt.getterName]();nt.addEventListener("removetrack",rt),nt.addEventListener("addtrack",rt),this.on("dispose",()=>{nt.removeEventListener("removetrack",rt),nt.removeEventListener("addtrack",rt)})})}addWebVttScript_(){if(!window$1.WebVTT)if(document$1.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(vtt)&&Object.keys(vtt).length>0){this.trigger("vttjsloaded");return}const _e=document$1.createElement("script");_e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",_e.onload=()=>{this.trigger("vttjsloaded")},_e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{_e.onload=null,_e.onerror=null}),window$1.WebVTT=!0,this.el().parentNode.appendChild(_e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const _e=this.textTracks(),tt=this.remoteTextTracks(),rt=ft=>_e.addTrack(ft.track),nt=ft=>_e.removeTrack(ft.track);tt.on("addtrack",rt),tt.on("removetrack",nt),this.addWebVttScript_();const st=()=>this.trigger("texttrackchange"),dt=()=>{st();for(let ft=0;ft<_e.length;ft++){const ht=_e[ft];ht.removeEventListener("cuechange",st),ht.mode==="showing"&&ht.addEventListener("cuechange",st)}};dt(),_e.addEventListener("change",dt),_e.addEventListener("addtrack",dt),_e.addEventListener("removetrack",dt),this.on("dispose",function(){tt.off("addtrack",rt),tt.off("removetrack",nt),_e.removeEventListener("change",dt),_e.removeEventListener("addtrack",dt),_e.removeEventListener("removetrack",dt);for(let ft=0;ft<_e.length;ft++)_e[ft].removeEventListener("cuechange",st)})}addTextTrack(_e,tt,rt){if(!_e)throw new Error("TextTrack kind is required but was not provided");return createTrackHelper(this,_e,tt,rt)}createRemoteTextTrack(_e){const tt=merge$1(_e,{tech:this});return new REMOTE.remoteTextEl.TrackClass(tt)}addRemoteTextTrack(_e={},tt){const rt=this.createRemoteTextTrack(_e);return typeof tt!="boolean"&&(tt=!1),this.remoteTextTrackEls().addTrackElement_(rt),this.remoteTextTracks().addTrack(rt.track),tt===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(rt.track)),rt}removeRemoteTextTrack(_e){const tt=this.remoteTextTrackEls().getTrackElementByTrack_(_e);this.remoteTextTrackEls().removeTrackElement_(tt),this.remoteTextTracks().removeTrack(_e),this.autoRemoteTextTracks_.removeTrack(_e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(_e){const tt=newGUID();return!this.isReady_||this.paused()?(this.queuedHanders_.add(tt),this.one("playing",()=>{this.queuedHanders_.has(tt)&&(this.queuedHanders_.delete(tt),_e())})):this.requestNamedAnimationFrame(tt,_e),tt}cancelVideoFrameCallback(_e){this.queuedHanders_.has(_e)?this.queuedHanders_.delete(_e):this.cancelNamedAnimationFrame(_e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(_e){}overrideNativeVideoTracks(_e){}canPlayType(_e){return""}static canPlayType(_e){return""}static canPlaySource(_e,tt){return Tech.canPlayType(_e.type)}static isTech(_e){return _e.prototype instanceof Tech||_e instanceof Tech||_e===Tech}static registerTech(_e,tt){if(Tech.techs_||(Tech.techs_={}),!Tech.isTech(tt))throw new Error(`Tech ${_e} must be a Tech`);if(!Tech.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Tech.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return _e=toTitleCase$1(_e),Tech.techs_[_e]=tt,Tech.techs_[toLowerCase(_e)]=tt,_e!=="Tech"&&Tech.defaultTechOrder_.push(_e),tt}static getTech(_e){if(_e){if(Tech.techs_&&Tech.techs_[_e])return Tech.techs_[_e];if(_e=toTitleCase$1(_e),window$1&&window$1.videojs&&window$1.videojs[_e])return log$1$1.warn(`The ${_e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),window$1.videojs[_e]}}}ALL.names.forEach(function(et){const _e=ALL[et];Tech.prototype[_e.getterName]=function(){return this[_e.privateName]=this[_e.privateName]||new _e.ListClass,this[_e.privateName]}});Tech.prototype.featuresVolumeControl=!0;Tech.prototype.featuresMuteControl=!0;Tech.prototype.featuresFullscreenResize=!1;Tech.prototype.featuresPlaybackRate=!1;Tech.prototype.featuresProgressEvents=!1;Tech.prototype.featuresSourceset=!1;Tech.prototype.featuresTimeupdateEvents=!1;Tech.prototype.featuresNativeTextTracks=!1;Tech.prototype.featuresVideoFrameCallback=!1;Tech.withSourceHandlers=function(et){et.registerSourceHandler=function(tt,rt){let nt=et.sourceHandlers;nt||(nt=et.sourceHandlers=[]),rt===void 0&&(rt=nt.length),nt.splice(rt,0,tt)},et.canPlayType=function(tt){const rt=et.sourceHandlers||[];let nt;for(let st=0;st<rt.length;st++)if(nt=rt[st].canPlayType(tt),nt)return nt;return""},et.selectSourceHandler=function(tt,rt){const nt=et.sourceHandlers||[];let st;for(let dt=0;dt<nt.length;dt++)if(st=nt[dt].canHandleSource(tt,rt),st)return nt[dt];return null},et.canPlaySource=function(tt,rt){const nt=et.selectSourceHandler(tt,rt);return nt?nt.canHandleSource(tt,rt):""},["seekable","seeking","duration"].forEach(function(tt){const rt=this[tt];typeof rt=="function"&&(this[tt]=function(){return this.sourceHandler_&&this.sourceHandler_[tt]?this.sourceHandler_[tt].apply(this.sourceHandler_,arguments):rt.apply(this,arguments)})},et.prototype),et.prototype.setSource=function(tt){let rt=et.selectSourceHandler(tt,this.options_);rt||(et.nativeSourceHandler?rt=et.nativeSourceHandler:log$1$1.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),rt!==et.nativeSourceHandler&&(this.currentSource_=tt),this.sourceHandler_=rt.handleSource(tt,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},et.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};Component$1.registerComponent("Tech",Tech);Tech.registerTech("Tech",Tech);Tech.defaultTechOrder_=[];const middlewares={},middlewareInstances={},TERMINATOR={};function use(et,_e){middlewares[et]=middlewares[et]||[],middlewares[et].push(_e)}function setSource(et,_e,tt){et.setTimeout(()=>setSourceHelper(_e,middlewares[_e.type],tt,et),1)}function setTech(et,_e){et.forEach(tt=>tt.setTech&&tt.setTech(_e))}function get(et,_e,tt){return et.reduceRight(middlewareIterator(tt),_e[tt]())}function set(et,_e,tt,rt){return _e[tt](et.reduce(middlewareIterator(tt),rt))}function mediate(et,_e,tt,rt=null){const nt="call"+toTitleCase$1(tt),st=et.reduce(middlewareIterator(nt),rt),dt=st===TERMINATOR,ft=dt?null:_e[tt](st);return executeRight(et,tt,ft,dt),ft}const allowedGetters={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},allowedSetters={setCurrentTime:1,setMuted:1,setVolume:1},allowedMediators={play:1,pause:1};function middlewareIterator(et){return(_e,tt)=>_e===TERMINATOR?TERMINATOR:tt[et]?tt[et](_e):_e}function executeRight(et,_e,tt,rt){for(let nt=et.length-1;nt>=0;nt--){const st=et[nt];st[_e]&&st[_e](rt,tt)}}function clearCacheForPlayer(et){middlewareInstances.hasOwnProperty(et.id())&&delete middlewareInstances[et.id()]}function getOrCreateFactory(et,_e){const tt=middlewareInstances[et.id()];let rt=null;if(tt==null)return rt=_e(et),middlewareInstances[et.id()]=[[_e,rt]],rt;for(let nt=0;nt<tt.length;nt++){const[st,dt]=tt[nt];st===_e&&(rt=dt)}return rt===null&&(rt=_e(et),tt.push([_e,rt])),rt}function setSourceHelper(et={},_e=[],tt,rt,nt=[],st=!1){const[dt,...ft]=_e;if(typeof dt=="string")setSourceHelper(et,middlewares[dt],tt,rt,nt,st);else if(dt){const ht=getOrCreateFactory(rt,dt);if(!ht.setSource)return nt.push(ht),setSourceHelper(et,ft,tt,rt,nt,st);ht.setSource(Object.assign({},et),function(mt,bt){if(mt)return setSourceHelper(et,ft,tt,rt,nt,st);nt.push(ht),setSourceHelper(bt,et.type===bt.type?ft:middlewares[bt.type],tt,rt,nt,st)})}else ft.length?setSourceHelper(et,ft,tt,rt,nt,st):st?tt(et,nt):setSourceHelper(et,middlewares["*"],tt,rt,nt,!0)}const MimetypesKind={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},getMimetype=function(et=""){const _e=getFileExtension(et);return MimetypesKind[_e.toLowerCase()]||""},findMimetype=(et,_e)=>{if(!_e)return"";if(et.cache_.source.src===_e&&et.cache_.source.type)return et.cache_.source.type;const tt=et.cache_.sources.filter(nt=>nt.src===_e);if(tt.length)return tt[0].type;const rt=et.$$("source");for(let nt=0;nt<rt.length;nt++){const st=rt[nt];if(st.type&&st.src&&st.src===_e)return st.type}return getMimetype(_e)},filterSource=function(et){if(Array.isArray(et)){let _e=[];et.forEach(function(tt){tt=filterSource(tt),Array.isArray(tt)?_e=_e.concat(tt):isObject$1(tt)&&_e.push(tt)}),et=_e}else typeof et=="string"&&et.trim()?et=[fixSource({src:et})]:isObject$1(et)&&typeof et.src=="string"&&et.src&&et.src.trim()?et=[fixSource(et)]:et=[];return et};function fixSource(et){if(!et.type){const _e=getMimetype(et.src);_e&&(et.type=_e)}return et}var icons=`<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
<path d="M16 10v28l22-14z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
</symbol>
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
</symbol>
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
<circle cx="24" cy="24" r="20"></circle>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
</symbol>
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
</symbol>
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
<path fill="none" d="M-1-3h24v24H-1z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
</symbol>
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
</symbol>
</defs>
</svg>`;const backKeyCode=IS_TIZEN?10009:IS_WEBOS?461:8,SpatialNavKeyCodes={codes:{play:415,pause:19,ff:417,rw:412,back:backKeyCode},names:{415:"play",19:"pause",417:"ff",412:"rw",[backKeyCode]:"back"},isEventKey(et,_e){return _e=_e.toLowerCase(),!!(this.names[et.keyCode]&&this.names[et.keyCode]===_e)},getEventName(et){if(this.names[et.keyCode])return this.names[et.keyCode];if(this.codes[et.code]){const _e=this.codes[et.code];return this.names[_e]}return null}},STEP_SECONDS=5;class SpatialNavigation extends EventTarget$2{constructor(_e){super(),this.player_=_e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(_e){const tt=_e.originalEvent?_e.originalEvent:_e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(tt.key)){if(this.isPaused_)return;tt.preventDefault();const rt=tt.key.substring(5).toLowerCase();this.move(rt)}else if(SpatialNavKeyCodes.isEventKey(tt,"play")||SpatialNavKeyCodes.isEventKey(tt,"pause")||SpatialNavKeyCodes.isEventKey(tt,"ff")||SpatialNavKeyCodes.isEventKey(tt,"rw")){tt.preventDefault();const rt=SpatialNavKeyCodes.getEventName(tt);this.performMediaAction_(rt)}else SpatialNavKeyCodes.isEventKey(tt,"Back")&&_e.target&&typeof _e.target.closeable=="function"&&_e.target.closeable()&&(tt.preventDefault(),_e.target.close())}performMediaAction_(_e){if(this.player_)switch(_e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+STEP_SECONDS);break;case"rw":this.userSeek_(this.player_.currentTime()-STEP_SECONDS);break}}userSeek_(_e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(_e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(_e){const tt=_e.relatedTarget;let rt=null;const nt=this.getCurrentComponent(_e.target);tt&&(rt=!!tt.closest(".video-js"),tt.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!_e.currentTarget.contains(_e.relatedTarget)&&!rt||!tt)&&(nt&&nt.name()==="CloseButton"?this.refocusComponent():(this.pause(),nt&&nt.el()&&(this.lastFocusedComponent_=nt)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const _e=this.player_,tt=[];function rt(nt){for(const st of nt)st.hasOwnProperty("el_")&&st.getIsFocusable()&&st.getIsAvailableToBeFocused(st.el())&&tt.push(st),st.hasOwnProperty("children_")&&st.children_.length>0&&rt(st.children_)}return _e.children_.forEach(nt=>{if(nt.hasOwnProperty("el_"))if(nt.getIsFocusable&&nt.getIsAvailableToBeFocused&&nt.getIsFocusable()&&nt.getIsAvailableToBeFocused(nt.el())){tt.push(nt);return}else nt.hasOwnProperty("children_")&&nt.children_.length>0?rt(nt.children_):nt.hasOwnProperty("items")&&nt.items.length>0?rt(nt.items):this.findSuitableDOMChild(nt)&&tt.push(nt);if(nt.name_==="ErrorDisplay"&&nt.opened_){const st=nt.el_.querySelector(".vjs-errors-ok-button-container");st&&st.querySelectorAll("button").forEach((ft,ht)=>{tt.push({name:()=>"ModalButton"+(ht+1),el:()=>ft,getPositions:()=>{const mt=ft.getBoundingClientRect(),bt={x:mt.x,y:mt.y,width:mt.width,height:mt.height,top:mt.top,right:mt.right,bottom:mt.bottom,left:mt.left},St={x:mt.left+mt.width/2,y:mt.top+mt.height/2,width:0,height:0,top:mt.top+mt.height/2,right:mt.left+mt.width/2,bottom:mt.top+mt.height/2,left:mt.left+mt.width/2};return{boundingClientRect:bt,center:St}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:mt=>!0,focus:()=>ft.focus()})})}}),this.focusableComponents=tt,this.focusableComponents}findSuitableDOMChild(_e){function tt(rt){if(_e.getIsFocusable(rt)&&_e.getIsAvailableToBeFocused(rt))return rt;for(let nt=0;nt<rt.children.length;nt++){const st=rt.children[nt],dt=tt(st);if(dt)return dt}return null}return _e.el()?tt(_e.el()):null}getCurrentComponent(_e){this.updateFocusableComponents();const tt=_e||document.activeElement;if(this.focusableComponents.length){for(const rt of this.focusableComponents)if(rt.el()===tt)return rt}}add(_e){const tt=[...this.focusableComponents];_e.hasOwnProperty("el_")&&_e.getIsFocusable()&&_e.getIsAvailableToBeFocused(_e.el())&&tt.push(_e),this.focusableComponents=tt,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(_e){for(let tt=0;tt<this.focusableComponents.length;tt++)if(this.focusableComponents[tt].name()===_e.name()){this.focusableComponents.splice(tt,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(_e){const tt=this.getCurrentComponent();if(!tt)return;const rt=tt.getPositions(),nt=this.focusableComponents.filter(dt=>dt!==tt&&this.isInDirection_(rt.boundingClientRect,dt.getPositions().boundingClientRect,_e)),st=this.findBestCandidate_(rt.center,nt,_e);st?this.focus(st):this.trigger({type:"endOfFocusableComponents",direction:_e,focusedComponent:tt})}findBestCandidate_(_e,tt,rt){let nt=1/0,st=null;for(const dt of tt){const ft=dt.getPositions().center,ht=this.calculateDistance_(_e,ft,rt);ht<nt&&(nt=ht,st=dt)}return st}isInDirection_(_e,tt,rt){switch(rt){case"right":return tt.left>=_e.right;case"left":return tt.right<=_e.left;case"down":return tt.top>=_e.bottom;case"up":return tt.bottom<=_e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let _e=0;_e<this.focusableComponents.length;_e++)if(this.focusableComponents[_e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[_e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(_e){typeof _e=="object"&&(_e.getIsAvailableToBeFocused(_e.el())?_e.focus():this.findSuitableDOMChild(_e)&&this.findSuitableDOMChild(_e).focus())}calculateDistance_(_e,tt,rt){const nt=Math.abs(_e.x-tt.x),st=Math.abs(_e.y-tt.y);let dt;switch(rt){case"right":case"left":dt=nt+st*100;break;case"up":dt=st*2+nt*.5;break;case"down":dt=st*5+nt;break;default:dt=nt+st}return dt}searchForTrackSelect_(){const _e=this;for(const tt of _e.updateFocusableComponents())if(tt.constructor.name==="TextTrackSelect"){_e.focus(tt);break}}}class MediaLoader extends Component$1{constructor(_e,tt,rt){const nt=merge$1({createEl:!1},tt);if(super(_e,nt,rt),!tt.playerOptions.sources||tt.playerOptions.sources.length===0)for(let st=0,dt=tt.playerOptions.techOrder;st<dt.length;st++){const ft=toTitleCase$1(dt[st]);let ht=Tech.getTech(ft);if(ft||(ht=Component$1.getComponent(ft)),ht&&ht.isSupported()){_e.loadTech_(ft);break}}else _e.src(tt.playerOptions.sources)}}Component$1.registerComponent("MediaLoader",MediaLoader);class ClickableComponent extends Component$1{constructor(_e,tt){super(_e,tt),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=rt=>this.handleMouseOver(rt),this.handleMouseOut_=rt=>this.handleMouseOut(rt),this.handleClick_=rt=>this.handleClick(rt),this.handleKeyDown_=rt=>this.handleKeyDown(rt),this.emitTapEvents(),this.enable()}createEl(_e="div",tt={},rt={}){tt=Object.assign({className:this.buildCSSClass(),tabIndex:0},tt),_e==="button"&&log$1$1.error(`Creating a ClickableComponent with an HTML element of ${_e} is not supported; use a Button instead.`),rt=Object.assign({role:"button"},rt),this.tabIndex_=tt.tabIndex;const nt=createEl(_e,tt,rt);return this.player_.options_.experimentalSvgIcons||nt.appendChild(createEl("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(nt),nt}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(_e){return this.controlTextEl_=createEl("span",{className:"vjs-control-text"},{"aria-live":"polite"}),_e&&_e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,_e),this.controlTextEl_}controlText(_e,tt=this.el()){if(_e===void 0)return this.controlText_||"Need Text";const rt=this.localize(_e);this.controlText_=_e,textContent(this.controlTextEl_,rt),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&tt.setAttribute("title",rt)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(_e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(_e){_e.key===" "||_e.key==="Enter"?(_e.preventDefault(),_e.stopPropagation(),this.trigger("click")):super.handleKeyDown(_e)}}Component$1.registerComponent("ClickableComponent",ClickableComponent);class PosterImage extends ClickableComponent{constructor(_e,tt){super(_e,tt),this.update(),this.update_=rt=>this.update(rt),_e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return createEl("div",{className:"vjs-poster"})}crossOrigin(_e){if(typeof _e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(_e!==null&&_e!=="anonymous"&&_e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${_e}"`);return}this.$("img")&&(this.$("img").crossOrigin=_e)}update(_e){const tt=this.player().poster();this.setSrc(tt),tt?this.show():this.hide()}setSrc(_e){if(!_e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(createEl("picture",{className:"vjs-poster",tabIndex:-1},{},createEl("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=_e}handleClick(_e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?silencePromise(this.player_.play()):this.player_.pause())}}PosterImage.prototype.crossorigin=PosterImage.prototype.crossOrigin;Component$1.registerComponent("PosterImage",PosterImage);const darkGray="#222",lightGray="#ccc",fontMap={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function constructColor(et,_e){let tt;if(et.length===4)tt=et[1]+et[1]+et[2]+et[2]+et[3]+et[3];else if(et.length===7)tt=et.slice(1);else throw new Error("Invalid color code provided, "+et+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(tt.slice(0,2),16)+","+parseInt(tt.slice(2,4),16)+","+parseInt(tt.slice(4,6),16)+","+_e+")"}function tryUpdateStyle(et,_e,tt){try{et.style[_e]=tt}catch{return}}function getCSSPositionValue(et){return et?`${et}px`:""}class TextTrackDisplay extends Component$1{constructor(_e,tt,rt){super(_e,tt,rt);const nt=dt=>this.updateDisplay(dt),st=dt=>{this.updateDisplayOverlay(),this.updateDisplay(dt)};_e.on("loadstart",dt=>this.toggleDisplay(dt)),_e.on("useractive",nt),_e.on("userinactive",nt),_e.on("texttrackchange",nt),_e.on("loadedmetadata",dt=>{this.updateDisplayOverlay(),this.preselectTrack(dt)}),_e.ready(bind_(this,function(){if(_e.tech_&&_e.tech_.featuresNativeTextTracks){this.hide();return}_e.on("fullscreenchange",st),_e.on("playerresize",st);const dt=window$1.screen.orientation||window$1,ft=window$1.screen.orientation?"change":"orientationchange";dt.addEventListener(ft,st),_e.on("dispose",()=>dt.removeEventListener(ft,st));const ht=this.options_.playerOptions.tracks||[];for(let mt=0;mt<ht.length;mt++)this.player_.addRemoteTextTrack(ht[mt],!0);this.preselectTrack()}))}preselectTrack(){const _e={captions:1,subtitles:1},tt=this.player_.textTracks(),rt=this.player_.cache_.selectedLanguage;let nt,st,dt;for(let ft=0;ft<tt.length;ft++){const ht=tt[ft];rt&&rt.enabled&&rt.language&&rt.language===ht.language&&ht.kind in _e?ht.kind===rt.kind?dt=ht:dt||(dt=ht):rt&&!rt.enabled?(dt=null,nt=null,st=null):ht.default&&(ht.kind==="descriptions"&&!nt?nt=ht:ht.kind in _e&&!st&&(st=ht))}dt?dt.mode="showing":st?st.mode="showing":nt&&(nt.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof window$1.WebVTT=="function"&&window$1.WebVTT.processCues(window$1,[],this.el_)}updateDisplay(){const _e=this.player_.textTracks(),tt=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),tt){const dt=[];for(let ft=0;ft<_e.length;++ft){const ht=_e[ft];ht.mode==="showing"&&dt.push(ht)}this.updateForTrack(dt);return}let rt=null,nt=null,st=_e.length;for(;st--;){const dt=_e[st];dt.mode==="showing"&&(dt.kind==="descriptions"?rt=dt:nt=dt)}if(nt?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(nt)):rt&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(rt)),!window$1.CSS.supports("inset","10px")){const dt=this.el_,ft=dt.querySelectorAll(".vjs-text-track-cue"),ht=this.player_.controlBar.el_.getBoundingClientRect().height,mt=this.player_.el_.getBoundingClientRect().height;dt.style="",tryUpdateStyle(dt,"position","relative"),tryUpdateStyle(dt,"height",mt-ht+"px"),tryUpdateStyle(dt,"top","unset"),IS_SMART_TV?tryUpdateStyle(dt,"bottom",mt+"px"):tryUpdateStyle(dt,"bottom","0px"),ft.length>0&&ft.forEach(bt=>{if(bt.style.inset){const St=bt.style.inset.split(" ");St.length===3&&Object.assign(bt.style,{top:St[0],right:St[1],bottom:St[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!window$1.CSS.supports("inset-inline: 10px"))return;const _e=this.player_.currentWidth(),tt=this.player_.currentHeight(),rt=_e/tt,nt=this.player_.videoWidth()/this.player_.videoHeight();let st=0,dt=0;Math.abs(rt-nt)>.1&&(rt>nt?st=Math.round((_e-tt*nt)/2):dt=Math.round((tt-_e/nt)/2)),tryUpdateStyle(this.el_,"insetInline",getCSSPositionValue(st)),tryUpdateStyle(this.el_,"insetBlock",getCSSPositionValue(dt))}updateDisplayState(_e){const tt=this.player_.textTrackSettings.getValues(),rt=_e.activeCues;let nt=rt.length;for(;nt--;){const st=rt[nt];if(!st)continue;const dt=st.displayState;if(tt.color&&(dt.firstChild.style.color=tt.color),tt.textOpacity&&tryUpdateStyle(dt.firstChild,"color",constructColor(tt.color||"#fff",tt.textOpacity)),tt.backgroundColor&&(dt.firstChild.style.backgroundColor=tt.backgroundColor),tt.backgroundOpacity&&tryUpdateStyle(dt.firstChild,"backgroundColor",constructColor(tt.backgroundColor||"#000",tt.backgroundOpacity)),tt.windowColor&&(tt.windowOpacity?tryUpdateStyle(dt,"backgroundColor",constructColor(tt.windowColor,tt.windowOpacity)):dt.style.backgroundColor=tt.windowColor),tt.edgeStyle&&(tt.edgeStyle==="dropshadow"?dt.firstChild.style.textShadow=`2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`:tt.edgeStyle==="raised"?dt.firstChild.style.textShadow=`1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`:tt.edgeStyle==="depressed"?dt.firstChild.style.textShadow=`1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`:tt.edgeStyle==="uniform"&&(dt.firstChild.style.textShadow=`0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`)),tt.fontPercent&&tt.fontPercent!==1){const ft=window$1.parseFloat(dt.style.fontSize);dt.style.fontSize=ft*tt.fontPercent+"px",dt.style.height="auto",dt.style.top="auto"}tt.fontFamily&&tt.fontFamily!=="default"&&(tt.fontFamily==="small-caps"?dt.firstChild.style.fontVariant="small-caps":dt.firstChild.style.fontFamily=fontMap[tt.fontFamily])}}updateForTrack(_e){if(Array.isArray(_e)||(_e=[_e]),typeof window$1.WebVTT!="function"||_e.every(rt=>!rt.activeCues))return;const tt=[];for(let rt=0;rt<_e.length;++rt){const nt=_e[rt];for(let st=0;st<nt.activeCues.length;++st)tt.push(nt.activeCues[st])}window$1.WebVTT.processCues(window$1,tt,this.el_);for(let rt=0;rt<_e.length;++rt){const nt=_e[rt];for(let st=0;st<nt.activeCues.length;++st){const dt=nt.activeCues[st].displayState;addClass$2(dt,"vjs-text-track-cue","vjs-text-track-cue-"+(nt.language?nt.language:rt)),nt.language&&setAttribute(dt,"lang",nt.language)}this.player_.textTrackSettings&&this.updateDisplayState(nt)}}}Component$1.registerComponent("TextTrackDisplay",TextTrackDisplay);class LoadingSpinner extends Component$1{createEl(){const _e=this.player_.isAudio(),tt=this.localize(_e?"Audio Player":"Video Player"),rt=createEl("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[tt])}),nt=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return nt.appendChild(rt),nt}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}Component$1.registerComponent("LoadingSpinner",LoadingSpinner);class Button extends ClickableComponent{createEl(_e,tt={},rt={}){_e="button",tt=Object.assign({className:this.buildCSSClass()},tt),rt=Object.assign({type:"button"},rt);const nt=createEl(_e,tt,rt);return this.player_.options_.experimentalSvgIcons||nt.appendChild(createEl("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(nt),nt}addChild(_e,tt={}){const rt=this.constructor.name;return log$1$1.warn(`Adding an actionable (user controllable) child to a Button (${rt}) is not supported; use a ClickableComponent instead.`),Component$1.prototype.addChild.call(this,_e,tt)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(_e){if(_e.key===" "||_e.key==="Enter"){_e.stopPropagation();return}super.handleKeyDown(_e)}}Component$1.registerComponent("Button",Button);class BigPlayButton extends Button{constructor(_e,tt){super(_e,tt),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",rt=>this.handleMouseDown(rt))}buildCSSClass(){return"vjs-big-play-button"}handleClick(_e){const tt=this.player_.play();if(_e.type==="tap"||this.mouseused_&&"clientX"in _e&&"clientY"in _e){silencePromise(tt),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const rt=this.player_.getChild("controlBar"),nt=rt&&rt.getChild("playToggle");if(!nt){this.player_.tech(!0).focus();return}const st=()=>nt.focus();isPromise(tt)?tt.then(st,()=>{}):this.setTimeout(st,1)}handleKeyDown(_e){this.mouseused_=!1,super.handleKeyDown(_e)}handleMouseDown(_e){this.mouseused_=!0}}BigPlayButton.prototype.controlText_="Play Video";Component$1.registerComponent("BigPlayButton",BigPlayButton);class CloseButton extends Button{constructor(_e,tt){super(_e,tt),this.setIcon("cancel"),this.controlText(tt&&tt.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(_e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(_e){_e.key==="Escape"?(_e.preventDefault(),_e.stopPropagation(),this.trigger("click")):super.handleKeyDown(_e)}}Component$1.registerComponent("CloseButton",CloseButton);class PlayToggle extends Button{constructor(_e,tt={}){super(_e,tt),tt.replay=tt.replay===void 0||tt.replay,this.setIcon("play"),this.on(_e,"play",rt=>this.handlePlay(rt)),this.on(_e,"pause",rt=>this.handlePause(rt)),tt.replay&&this.on(_e,"ended",rt=>this.handleEnded(rt))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(_e){this.player_.paused()?silencePromise(this.player_.play()):this.player_.pause()}handleSeeked(_e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(_e):this.handlePlay(_e)}handlePlay(_e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(_e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(_e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",tt=>this.handleSeeked(tt))}}PlayToggle.prototype.controlText_="Play";Component$1.registerComponent("PlayToggle",PlayToggle);class TimeDisplay extends Component$1{constructor(_e,tt){super(_e,tt),this.on(_e,["timeupdate","ended","seeking"],rt=>this.update(rt)),this.updateTextNode_()}createEl(){const _e=this.buildCSSClass(),tt=super.createEl("div",{className:`${_e} vjs-time-control vjs-control`}),rt=createEl("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return tt.appendChild(rt),this.contentEl_=createEl("span",{className:`${_e}-display`},{role:"presentation"}),tt.appendChild(this.contentEl_),tt}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(_e){!this.player_.options_.enableSmoothSeeking&&_e.type==="seeking"||this.updateContent(_e)}updateTextNode_(_e=0){_e=formatTime(_e),this.formattedTime_!==_e&&(this.formattedTime_=_e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let tt=this.textNode_;tt&&this.contentEl_.firstChild!==tt&&(tt=null,log$1$1.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=document$1.createTextNode(this.formattedTime_),this.textNode_&&(tt?this.contentEl_.replaceChild(this.textNode_,tt):this.contentEl_.appendChild(this.textNode_))}))}updateContent(_e){}}TimeDisplay.prototype.labelText_="Time";TimeDisplay.prototype.controlText_="Time";Component$1.registerComponent("TimeDisplay",TimeDisplay);class CurrentTimeDisplay extends TimeDisplay{buildCSSClass(){return"vjs-current-time"}updateContent(_e){let tt;this.player_.ended()?tt=this.player_.duration():_e&&_e.target&&typeof _e.target.pendingSeekTime=="function"?tt=_e.target.pendingSeekTime():tt=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(tt)}}CurrentTimeDisplay.prototype.labelText_="Current Time";CurrentTimeDisplay.prototype.controlText_="Current Time";Component$1.registerComponent("CurrentTimeDisplay",CurrentTimeDisplay);class DurationDisplay extends TimeDisplay{constructor(_e,tt){super(_e,tt);const rt=nt=>this.updateContent(nt);this.on(_e,"durationchange",rt),this.on(_e,"loadstart",rt),this.on(_e,"loadedmetadata",rt)}buildCSSClass(){return"vjs-duration"}updateContent(_e){const tt=this.player_.duration();this.updateTextNode_(tt)}}DurationDisplay.prototype.labelText_="Duration";DurationDisplay.prototype.controlText_="Duration";Component$1.registerComponent("DurationDisplay",DurationDisplay);class TimeDivider extends Component$1{createEl(){const _e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),tt=super.createEl("div"),rt=super.createEl("span",{textContent:"/"});return tt.appendChild(rt),_e.appendChild(tt),_e}}Component$1.registerComponent("TimeDivider",TimeDivider);class RemainingTimeDisplay extends TimeDisplay{constructor(_e,tt){super(_e,tt),this.on(_e,"durationchange",rt=>this.updateContent(rt))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const _e=super.createEl();return this.options_.displayNegative!==!1&&_e.insertBefore(createEl("span",{},{"aria-hidden":!0},"-"),this.contentEl_),_e}updateContent(_e){if(typeof this.player_.duration()!="number")return;let tt;this.player_.ended()?tt=0:this.player_.remainingTimeDisplay?tt=this.player_.remainingTimeDisplay():tt=this.player_.remainingTime(),this.updateTextNode_(tt)}}RemainingTimeDisplay.prototype.labelText_="Remaining Time";RemainingTimeDisplay.prototype.controlText_="Remaining Time";Component$1.registerComponent("RemainingTimeDisplay",RemainingTimeDisplay);class LiveDisplay extends Component$1{constructor(_e,tt){super(_e,tt),this.updateShowing(),this.on(this.player(),"durationchange",rt=>this.updateShowing(rt))}createEl(){const _e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=createEl("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(createEl("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(document$1.createTextNode(this.localize("LIVE"))),_e.appendChild(this.contentEl_),_e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(_e){this.player().duration()===1/0?this.show():this.hide()}}Component$1.registerComponent("LiveDisplay",LiveDisplay);class SeekToLive extends Button{constructor(_e,tt){super(_e,tt),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=rt=>this.updateLiveEdgeStatus(rt),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const _e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",_e),this.textEl_=createEl("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),_e.appendChild(this.textEl_),_e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}SeekToLive.prototype.controlText_="Seek to live, currently playing live";Component$1.registerComponent("SeekToLive",SeekToLive);function clamp$4(et,_e,tt){return et=Number(et),Math.min(tt,Math.max(_e,isNaN(et)?_e:et))}var Num=Object.freeze({__proto__:null,clamp:clamp$4});class Slider extends Component$1{constructor(_e,tt){super(_e,tt),this.handleMouseDown_=rt=>this.handleMouseDown(rt),this.handleMouseUp_=rt=>this.handleMouseUp(rt),this.handleKeyDown_=rt=>this.handleKeyDown(rt),this.handleClick_=rt=>this.handleClick(rt),this.handleMouseMove_=rt=>this.handleMouseMove(rt),this.update_=rt=>this.update(rt),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const _e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(_e,"mousemove",this.handleMouseMove_),this.off(_e,"mouseup",this.handleMouseUp_),this.off(_e,"touchmove",this.handleMouseMove_),this.off(_e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(_e,tt={},rt={}){return tt.className=tt.className+" vjs-slider",tt=Object.assign({tabIndex:0},tt),rt=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},rt),super.createEl(_e,tt,rt)}handleMouseDown(_e){const tt=this.bar.el_.ownerDocument;_e.type==="mousedown"&&_e.preventDefault(),_e.type==="touchstart"&&!IS_CHROME&&_e.preventDefault(),blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(tt,"mousemove",this.handleMouseMove_),this.on(tt,"mouseup",this.handleMouseUp_),this.on(tt,"touchmove",this.handleMouseMove_),this.on(tt,"touchend",this.handleMouseUp_),this.handleMouseMove(_e,!0)}handleMouseMove(_e){}handleMouseUp(_e){const tt=this.bar.el_.ownerDocument;unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(tt,"mousemove",this.handleMouseMove_),this.off(tt,"mouseup",this.handleMouseUp_),this.off(tt,"touchmove",this.handleMouseMove_),this.off(tt,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const _e=this.getProgress();return _e===this.progress_||(this.progress_=_e,this.requestNamedAnimationFrame("Slider#update",()=>{const tt=this.vertical()?"height":"width";this.bar.el().style[tt]=(_e*100).toFixed(2)+"%"})),_e}getProgress(){return Number(clamp$4(this.getPercent(),0,1).toFixed(4))}calculateDistance(_e){const tt=getPointerPosition(this.el_,_e);return this.vertical()?tt.y:tt.x}handleKeyDown(_e){const tt=this.options_.playerOptions.spatialNavigation,rt=tt&&tt.enabled,nt=tt&&tt.horizontalSeek;rt?nt&&_e.key==="ArrowLeft"||!nt&&_e.key==="ArrowDown"?(_e.preventDefault(),_e.stopPropagation(),this.stepBack()):nt&&_e.key==="ArrowRight"||!nt&&_e.key==="ArrowUp"?(_e.preventDefault(),_e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(_e)):_e.key==="ArrowLeft"||_e.key==="ArrowDown"?(_e.preventDefault(),_e.stopPropagation(),this.stepBack()):_e.key==="ArrowUp"||_e.key==="ArrowRight"?(_e.preventDefault(),_e.stopPropagation(),this.stepForward()):super.handleKeyDown(_e)}handleClick(_e){_e.stopPropagation(),_e.preventDefault()}vertical(_e){if(_e===void 0)return this.vertical_||!1;this.vertical_=!!_e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Component$1.registerComponent("Slider",Slider);const percentify=(et,_e)=>clamp$4(et/_e*100,0,100).toFixed(2)+"%";class LoadProgressBar extends Component$1{constructor(_e,tt){super(_e,tt),this.partEls_=[],this.on(_e,"progress",rt=>this.update(rt))}createEl(){const _e=super.createEl("div",{className:"vjs-load-progress"}),tt=createEl("span",{className:"vjs-control-text"}),rt=createEl("span",{textContent:this.localize("Loaded")}),nt=document$1.createTextNode(": ");return this.percentageEl_=createEl("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),_e.appendChild(tt),tt.appendChild(rt),tt.appendChild(nt),tt.appendChild(this.percentageEl_),_e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(_e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const tt=this.player_.liveTracker,rt=this.player_.buffered(),nt=tt&&tt.isLive()?tt.seekableEnd():this.player_.duration(),st=this.player_.bufferedEnd(),dt=this.partEls_,ft=percentify(st,nt);this.percent_!==ft&&(this.el_.style.width=ft,textContent(this.percentageEl_,ft),this.percent_=ft);for(let ht=0;ht<rt.length;ht++){const mt=rt.start(ht),bt=rt.end(ht);let St=dt[ht];St||(St=this.el_.appendChild(createEl()),dt[ht]=St),!(St.dataset.start===mt&&St.dataset.end===bt)&&(St.dataset.start=mt,St.dataset.end=bt,St.style.left=percentify(mt,st),St.style.width=percentify(bt-mt,st))}for(let ht=dt.length;ht>rt.length;ht--)this.el_.removeChild(dt[ht-1]);dt.length=rt.length})}}Component$1.registerComponent("LoadProgressBar",LoadProgressBar);class TimeTooltip extends Component$1{constructor(_e,tt){super(_e,tt),this.update=throttle(bind_(this,this.update),UPDATE_REFRESH_INTERVAL)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(_e,tt,rt){const nt=findPosition(this.el_),st=getBoundingClientRect(this.player_.el()),dt=_e.width*tt;if(!st||!nt)return;let ft=_e.left-st.left+dt,ht=_e.width-dt+(st.right-_e.right);ht||(ht=_e.width-dt,ft=dt);let mt=nt.width/2;ft<mt?mt+=mt-ft:ht<mt&&(mt=ht),mt<0?mt=0:mt>nt.width&&(mt=nt.width),mt=Math.round(mt),this.el_.style.right=`-${mt}px`,this.write(rt)}write(_e){textContent(this.el_,_e)}updateTime(_e,tt,rt,nt){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let st;const dt=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const ft=this.player_.liveTracker.liveWindow(),ht=ft-tt*ft;st=(ht<1?"":"-")+formatTime(ht,ft)}else st=formatTime(rt,dt);this.update(_e,tt,st),nt&&nt()})}}Component$1.registerComponent("TimeTooltip",TimeTooltip);class PlayProgressBar extends Component$1{constructor(_e,tt){super(_e,tt),this.setIcon("circle"),this.update=throttle(bind_(this,this.update),UPDATE_REFRESH_INTERVAL)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(_e,tt,rt){const nt=this.getChild("timeTooltip");if(!nt)return;const st=rt&&rt.target&&typeof rt.target.pendingSeekTime=="function"?rt.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();nt.updateTime(_e,tt,st)}}PlayProgressBar.prototype.options_={children:[]};!IS_IOS&&!IS_ANDROID&&PlayProgressBar.prototype.options_.children.push("timeTooltip");Component$1.registerComponent("PlayProgressBar",PlayProgressBar);class MouseTimeDisplay extends Component$1{constructor(_e,tt){super(_e,tt),this.update=throttle(bind_(this,this.update),UPDATE_REFRESH_INTERVAL)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(_e,tt){const rt=tt*this.player_.duration();this.getChild("timeTooltip").updateTime(_e,tt,rt,()=>{this.el_.style.left=`${_e.width*tt}px`})}}MouseTimeDisplay.prototype.options_={children:["timeTooltip"]};Component$1.registerComponent("MouseTimeDisplay",MouseTimeDisplay);class SeekBar extends Slider{constructor(_e,tt){tt=merge$1(SeekBar.prototype.options_,tt),tt.children=[...tt.children];const rt=_e.options_.disableSeekWhileScrubbingOnMobile&&(IS_IOS||IS_ANDROID)||_e.options_.disableSeekWhileScrubbingOnSTV;(!IS_IOS&&!IS_ANDROID||rt)&&tt.children.splice(1,0,"mouseTimeDisplay"),super(_e,tt),this.shouldDisableSeekWhileScrubbing_=rt,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=bind_(this,this.update),this.update=throttle(this.update_,UPDATE_REFRESH_INTERVAL),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=_e=>this.enableInterval_(_e),this.disableIntervalHandler_=_e=>this.disableInterval_(_e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document$1&&"visibilityState"in document$1&&this.on(document$1,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(_e){document$1.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(_e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,UPDATE_REFRESH_INTERVAL))}disableInterval_(_e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&_e&&_e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(_e){if(document$1.visibilityState==="hidden")return;const tt=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const rt=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),nt=this.player_.liveTracker;let st=this.player_.duration();nt&&nt.isLive()&&(st=this.player_.liveTracker.liveCurrentTime()),this.percent_!==tt&&(this.el_.setAttribute("aria-valuenow",(tt*100).toFixed(2)),this.percent_=tt),(this.currentTime_!==rt||this.duration_!==st)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[formatTime(rt,st),formatTime(st,st)],"{1} of {2}")),this.currentTime_=rt,this.duration_=st),this.bar&&this.bar.update(getBoundingClientRect(this.el()),this.getProgress(),_e)}),tt}userSeek_(_e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(_e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(_e){if(_e!==void 0)if(_e!==null){const tt=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(_e,tt))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const _e=this.getCurrentTime_();let tt;const rt=this.player_.liveTracker;return rt&&rt.isLive()?(tt=(_e-rt.seekableStart())/rt.liveWindow(),rt.atLiveEdge()&&(tt=1)):tt=_e/this.player_.duration(),tt}handleMouseDown(_e){isSingleLeftClick(_e)&&(_e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(_e))}handleMouseMove(_e,tt=!1){if(!isSingleLeftClick(_e)||isNaN(this.player_.duration()))return;!tt&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let rt;const nt=this.calculateDistance(_e),st=this.player_.liveTracker;if(!st||!st.isLive())rt=nt*this.player_.duration(),rt===this.player_.duration()&&(rt=rt-.1);else{if(nt>=.99){st.seekToLiveEdge();return}const dt=st.seekableStart(),ft=st.liveCurrentTime();if(rt=dt+nt*st.liveWindow(),rt>=ft&&(rt=ft),rt<=dt&&(rt=dt+.1),rt===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(rt):this.userSeek_(rt),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const _e=this.getChild("mouseTimeDisplay");_e&&_e.show()}disable(){super.disable();const _e=this.getChild("mouseTimeDisplay");_e&&_e.hide()}handleMouseUp(_e){super.handleMouseUp(_e),_e&&_e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?silencePromise(this.player_.play()):this.update_()}handlePendingSeek_(_e){this.player_.paused()||this.player_.pause();const tt=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(tt+_e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(_e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(_e){const tt=this.player_.liveTracker;if(_e.key===" "||_e.key==="Enter")_e.preventDefault(),_e.stopPropagation(),this.handleAction(_e);else if(_e.key==="Home")_e.preventDefault(),_e.stopPropagation(),this.userSeek_(0);else if(_e.key==="End")_e.preventDefault(),_e.stopPropagation(),tt&&tt.isLive()?this.userSeek_(tt.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(_e.key)){_e.preventDefault(),_e.stopPropagation();const rt=parseInt(_e.key,10)*.1;tt&&tt.isLive()?this.userSeek_(tt.seekableStart()+tt.liveWindow()*rt):this.userSeek_(this.player_.duration()*rt)}else _e.key==="PageDown"?(_e.preventDefault(),_e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):_e.key==="PageUp"?(_e.preventDefault(),_e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(_e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in document$1&&"visibilityState"in document$1&&this.off(document$1,"visibilitychange",this.toggleVisibility_),super.dispose()}}SeekBar.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};Component$1.registerComponent("SeekBar",SeekBar);class ProgressControl extends Component$1{constructor(_e,tt){super(_e,tt),this.handleMouseMove=throttle(bind_(this,this.handleMouseMove),UPDATE_REFRESH_INTERVAL),this.throttledHandleMouseSeek=throttle(bind_(this,this.handleMouseSeek),UPDATE_REFRESH_INTERVAL),this.handleMouseUpHandler_=rt=>this.handleMouseUp(rt),this.handleMouseDownHandler_=rt=>this.handleMouseDown(rt),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(_e){const tt=this.getChild("seekBar");if(!tt)return;const rt=tt.getChild("playProgressBar"),nt=tt.getChild("mouseTimeDisplay");if(!rt&&!nt)return;const st=tt.el(),dt=findPosition(st);let ft=getPointerPosition(st,_e).x;ft=clamp$4(ft,0,1),nt&&nt.update(dt,ft),rt&&rt.update(dt,tt.getProgress())}handleMouseSeek(_e){const tt=this.getChild("seekBar");tt&&tt.handleMouseMove(_e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(_e=>_e.disable&&_e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const _e=this.getChild("seekBar");this.player_.scrubbing(!1),_e.videoWasPlaying&&silencePromise(this.player_.play())}}enable(){this.children().forEach(_e=>_e.enable&&_e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const _e=this.el_.ownerDocument;this.off(_e,"mousemove",this.throttledHandleMouseSeek),this.off(_e,"touchmove",this.throttledHandleMouseSeek),this.off(_e,"mouseup",this.handleMouseUpHandler_),this.off(_e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(_e){const tt=this.el_.ownerDocument,rt=this.getChild("seekBar");rt&&rt.handleMouseDown(_e),this.on(tt,"mousemove",this.throttledHandleMouseSeek),this.on(tt,"touchmove",this.throttledHandleMouseSeek),this.on(tt,"mouseup",this.handleMouseUpHandler_),this.on(tt,"touchend",this.handleMouseUpHandler_)}handleMouseUp(_e){const tt=this.getChild("seekBar");tt&&tt.handleMouseUp(_e),this.removeListenersAddedOnMousedownAndTouchstart()}}ProgressControl.prototype.options_={children:["seekBar"]};Component$1.registerComponent("ProgressControl",ProgressControl);class PictureInPictureToggle extends Button{constructor(_e,tt){super(_e,tt),this.setIcon("picture-in-picture-enter"),this.on(_e,["enterpictureinpicture","leavepictureinpicture"],rt=>this.handlePictureInPictureChange(rt)),this.on(_e,["disablepictureinpicturechanged","loadedmetadata"],rt=>this.handlePictureInPictureEnabledChange(rt)),this.on(_e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){document$1.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in window$1?this.enable():this.disable()}handlePictureInPictureChange(_e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(_e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof document$1.exitPictureInPicture=="function"&&super.show()}}PictureInPictureToggle.prototype.controlText_="Picture-in-Picture";Component$1.registerComponent("PictureInPictureToggle",PictureInPictureToggle);class FullscreenToggle extends Button{constructor(_e,tt){super(_e,tt),this.setIcon("fullscreen-enter"),this.on(_e,"fullscreenchange",rt=>this.handleFullscreenChange(rt)),document$1[_e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(_e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(_e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}FullscreenToggle.prototype.controlText_="Fullscreen";Component$1.registerComponent("FullscreenToggle",FullscreenToggle);const checkVolumeSupport=function(et,_e){_e.tech_&&!_e.tech_.featuresVolumeControl&&et.addClass("vjs-hidden"),et.on(_e,"loadstart",function(){_e.tech_.featuresVolumeControl?et.removeClass("vjs-hidden"):et.addClass("vjs-hidden")})};class VolumeLevel extends Component$1{createEl(){const _e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",_e),_e.appendChild(super.createEl("span",{className:"vjs-control-text"})),_e}}Component$1.registerComponent("VolumeLevel",VolumeLevel);class VolumeLevelTooltip extends Component$1{constructor(_e,tt){super(_e,tt),this.update=throttle(bind_(this,this.update),UPDATE_REFRESH_INTERVAL)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(_e,tt,rt,nt){if(!rt){const st=getBoundingClientRect(this.el_),dt=getBoundingClientRect(this.player_.el()),ft=_e.width*tt;if(!dt||!st)return;const ht=_e.left-dt.left+ft,mt=_e.width-ft+(dt.right-_e.right);let bt=st.width/2;ht<bt?bt+=bt-ht:mt<bt&&(bt=mt),bt<0?bt=0:bt>st.width&&(bt=st.width),this.el_.style.right=`-${bt}px`}this.write(`${nt}%`)}write(_e){textContent(this.el_,_e)}updateVolume(_e,tt,rt,nt,st){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(_e,tt,rt,nt.toFixed(0)),st&&st()})}}Component$1.registerComponent("VolumeLevelTooltip",VolumeLevelTooltip);class MouseVolumeLevelDisplay extends Component$1{constructor(_e,tt){super(_e,tt),this.update=throttle(bind_(this,this.update),UPDATE_REFRESH_INTERVAL)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(_e,tt,rt){const nt=100*tt;this.getChild("volumeLevelTooltip").updateVolume(_e,tt,rt,nt,()=>{rt?this.el_.style.bottom=`${_e.height*tt}px`:this.el_.style.left=`${_e.width*tt}px`})}}MouseVolumeLevelDisplay.prototype.options_={children:["volumeLevelTooltip"]};Component$1.registerComponent("MouseVolumeLevelDisplay",MouseVolumeLevelDisplay);class VolumeBar extends Slider{constructor(_e,tt){super(_e,tt),this.on("slideractive",rt=>this.updateLastVolume_(rt)),this.on(_e,"volumechange",rt=>this.updateARIAAttributes(rt)),_e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(_e){isSingleLeftClick(_e)&&super.handleMouseDown(_e)}handleMouseMove(_e){const tt=this.getChild("mouseVolumeLevelDisplay");if(tt){const rt=this.el(),nt=getBoundingClientRect(rt),st=this.vertical();let dt=getPointerPosition(rt,_e);dt=st?dt.y:dt.x,dt=clamp$4(dt,0,1),tt.update(nt,dt,st)}isSingleLeftClick(_e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(_e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(_e){const tt=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",tt),this.el_.setAttribute("aria-valuetext",tt+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const _e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(_e)})}}VolumeBar.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!IS_IOS&&!IS_ANDROID&&VolumeBar.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");VolumeBar.prototype.playerEvent="volumechange";Component$1.registerComponent("VolumeBar",VolumeBar);class VolumeControl extends Component$1{constructor(_e,tt={}){tt.vertical=tt.vertical||!1,(typeof tt.volumeBar>"u"||isPlain(tt.volumeBar))&&(tt.volumeBar=tt.volumeBar||{},tt.volumeBar.vertical=tt.vertical),super(_e,tt),checkVolumeSupport(this,_e),this.throttledHandleMouseMove=throttle(bind_(this,this.handleMouseMove),UPDATE_REFRESH_INTERVAL),this.handleMouseUpHandler_=rt=>this.handleMouseUp(rt),this.on("mousedown",rt=>this.handleMouseDown(rt)),this.on("touchstart",rt=>this.handleMouseDown(rt)),this.on("mousemove",rt=>this.handleMouseMove(rt)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let _e="vjs-volume-horizontal";return this.options_.vertical&&(_e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${_e}`})}handleMouseDown(_e){const tt=this.el_.ownerDocument;this.on(tt,"mousemove",this.throttledHandleMouseMove),this.on(tt,"touchmove",this.throttledHandleMouseMove),this.on(tt,"mouseup",this.handleMouseUpHandler_),this.on(tt,"touchend",this.handleMouseUpHandler_)}handleMouseUp(_e){const tt=this.el_.ownerDocument;this.off(tt,"mousemove",this.throttledHandleMouseMove),this.off(tt,"touchmove",this.throttledHandleMouseMove),this.off(tt,"mouseup",this.handleMouseUpHandler_),this.off(tt,"touchend",this.handleMouseUpHandler_)}handleMouseMove(_e){this.volumeBar.handleMouseMove(_e)}}VolumeControl.prototype.options_={children:["volumeBar"]};Component$1.registerComponent("VolumeControl",VolumeControl);const checkMuteSupport=function(et,_e){_e.tech_&&!_e.tech_.featuresMuteControl&&et.addClass("vjs-hidden"),et.on(_e,"loadstart",function(){_e.tech_.featuresMuteControl?et.removeClass("vjs-hidden"):et.addClass("vjs-hidden")})};class MuteToggle extends Button{constructor(_e,tt){super(_e,tt),checkMuteSupport(this,_e),this.on(_e,["loadstart","volumechange"],rt=>this.update(rt))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(_e){const tt=this.player_.volume(),rt=this.player_.lastVolume_();if(tt===0){const nt=rt<.1?.1:rt;this.player_.volume(nt),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(_e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const _e=this.player_.volume();let tt=3;this.setIcon("volume-high"),IS_IOS&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),_e===0||this.player_.muted()?(this.setIcon("volume-mute"),tt=0):_e<.33?(this.setIcon("volume-low"),tt=1):_e<.67&&(this.setIcon("volume-medium"),tt=2),removeClass$2(this.el_,[0,1,2,3].reduce((rt,nt)=>rt+`${nt?" ":""}vjs-vol-${nt}`,"")),addClass$2(this.el_,`vjs-vol-${tt}`)}updateControlText_(){const tt=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==tt&&this.controlText(tt)}}MuteToggle.prototype.controlText_="Mute";Component$1.registerComponent("MuteToggle",MuteToggle);class VolumePanel extends Component$1{constructor(_e,tt={}){typeof tt.inline<"u"?tt.inline=tt.inline:tt.inline=!0,(typeof tt.volumeControl>"u"||isPlain(tt.volumeControl))&&(tt.volumeControl=tt.volumeControl||{},tt.volumeControl.vertical=!tt.inline),super(_e,tt),this.handleKeyPressHandler_=rt=>this.handleKeyPress(rt),this.on(_e,["loadstart"],rt=>this.volumePanelState_(rt)),this.on(this.muteToggle,"keyup",rt=>this.handleKeyPress(rt)),this.on(this.volumeControl,"keyup",rt=>this.handleVolumeControlKeyUp(rt)),this.on("keydown",rt=>this.handleKeyPress(rt)),this.on("mouseover",rt=>this.handleMouseOver(rt)),this.on("mouseout",rt=>this.handleMouseOut(rt)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let _e="vjs-volume-panel-horizontal";return this.options_.inline||(_e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${_e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(_e){_e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(_e){this.addClass("vjs-hover"),on(document$1,"keyup",this.handleKeyPressHandler_)}handleMouseOut(_e){this.removeClass("vjs-hover"),off(document$1,"keyup",this.handleKeyPressHandler_)}handleKeyPress(_e){_e.key==="Escape"&&this.handleMouseOut()}}VolumePanel.prototype.options_={children:["muteToggle","volumeControl"]};Component$1.registerComponent("VolumePanel",VolumePanel);class SkipForward extends Button{constructor(_e,tt){super(_e,tt),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(_e.language())])),this.show()):this.hide()}getSkipForwardTime(){const _e=this.options_.playerOptions;return _e.controlBar&&_e.controlBar.skipButtons&&_e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(_e){if(isNaN(this.player_.duration()))return;const tt=this.player_.currentTime(),rt=this.player_.liveTracker,nt=rt&&rt.isLive()?rt.seekableEnd():this.player_.duration();let st;tt+this.skipTime<=nt?st=tt+this.skipTime:st=nt,this.player_.currentTime(st)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}SkipForward.prototype.controlText_="Skip Forward";Component$1.registerComponent("SkipForward",SkipForward);class SkipBackward extends Button{constructor(_e,tt){super(_e,tt),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(_e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const _e=this.options_.playerOptions;return _e.controlBar&&_e.controlBar.skipButtons&&_e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(_e){const tt=this.player_.currentTime(),rt=this.player_.liveTracker,nt=rt&&rt.isLive()&&rt.seekableStart();let st;nt&&tt-this.skipTime<=nt?st=nt:tt>=this.skipTime?st=tt-this.skipTime:st=0,this.player_.currentTime(st)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}SkipBackward.prototype.controlText_="Skip Backward";Component$1.registerComponent("SkipBackward",SkipBackward);class Menu extends Component$1{constructor(_e,tt){super(_e,tt),tt&&(this.menuButton_=tt.menuButton),this.focusedChild_=-1,this.on("keydown",rt=>this.handleKeyDown(rt)),this.boundHandleBlur_=rt=>this.handleBlur(rt),this.boundHandleTapClick_=rt=>this.handleTapClick(rt)}addEventListenerForItem(_e){_e instanceof Component$1&&(this.on(_e,"blur",this.boundHandleBlur_),this.on(_e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(_e){_e instanceof Component$1&&(this.off(_e,"blur",this.boundHandleBlur_),this.off(_e,["tap","click"],this.boundHandleTapClick_))}removeChild(_e){typeof _e=="string"&&(_e=this.getChild(_e)),this.removeEventListenerForItem(_e),super.removeChild(_e)}addItem(_e){const tt=this.addChild(_e);tt&&this.addEventListenerForItem(tt)}createEl(){const _e=this.options_.contentElType||"ul";this.contentEl_=createEl(_e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const tt=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return tt.appendChild(this.contentEl_),on(tt,"click",function(rt){rt.preventDefault(),rt.stopImmediatePropagation()}),tt}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(_e){const tt=_e.relatedTarget||document$1.activeElement;if(!this.children().some(rt=>rt.el()===tt)){const rt=this.menuButton_;rt&&rt.buttonPressed_&&tt!==rt.el().firstChild&&rt.unpressButton()}}handleTapClick(_e){if(this.menuButton_){this.menuButton_.unpressButton();const tt=this.children();if(!Array.isArray(tt))return;const rt=tt.filter(nt=>nt.el()===_e.target)[0];if(!rt)return;rt.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(_e){_e.key==="ArrowLeft"||_e.key==="ArrowDown"?(_e.preventDefault(),_e.stopPropagation(),this.stepForward()):(_e.key==="ArrowRight"||_e.key==="ArrowUp")&&(_e.preventDefault(),_e.stopPropagation(),this.stepBack())}stepForward(){let _e=0;this.focusedChild_!==void 0&&(_e=this.focusedChild_+1),this.focus(_e)}stepBack(){let _e=0;this.focusedChild_!==void 0&&(_e=this.focusedChild_-1),this.focus(_e)}focus(_e=0){const tt=this.children().slice();tt.length&&tt[0].hasClass("vjs-menu-title")&&tt.shift(),tt.length>0&&(_e<0?_e=0:_e>=tt.length&&(_e=tt.length-1),this.focusedChild_=_e,tt[_e].el_.focus())}}Component$1.registerComponent("Menu",Menu);class MenuButton extends Component$1{constructor(_e,tt={}){super(_e,tt),this.menuButton_=new Button(_e,tt),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const rt=Button.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+rt,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const nt=st=>this.handleClick(st);this.handleMenuKeyUp_=st=>this.handleMenuKeyUp(st),this.on(this.menuButton_,"tap",nt),this.on(this.menuButton_,"click",nt),this.on(this.menuButton_,"keydown",st=>this.handleKeyDown(st)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),on(document$1,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",st=>this.handleMouseLeave(st)),this.on("keydown",st=>this.handleSubmenuKeyDown(st))}update(){const _e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=_e,this.addChild(_e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const _e=new Menu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const tt=createEl("li",{className:"vjs-menu-title",textContent:toTitleCase$1(this.options_.title),tabIndex:-1}),rt=new Component$1(this.player_,{el:tt});_e.addItem(rt)}if(this.items=this.createItems(),this.items)for(let tt=0;tt<this.items.length;tt++)_e.addItem(this.items[tt]);return _e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(_e){super.setIcon(_e,this.menuButton_.el_)}buildWrapperCSSClass(){let _e="vjs-menu-button";this.options_.inline===!0?_e+="-inline":_e+="-popup";const tt=Button.prototype.buildCSSClass();return`vjs-menu-button ${_e} ${tt} ${super.buildCSSClass()}`}buildCSSClass(){let _e="vjs-menu-button";return this.options_.inline===!0?_e+="-inline":_e+="-popup",`vjs-menu-button ${_e} ${super.buildCSSClass()}`}controlText(_e,tt=this.menuButton_.el()){return this.menuButton_.controlText(_e,tt)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(_e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(_e){this.removeClass("vjs-hover"),off(document$1,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(_e){_e.key==="Escape"||_e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!_e.key==="Tab"&&(_e.preventDefault(),this.menuButton_.focus())):(_e.key==="Up"||_e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(_e.preventDefault(),this.pressButton()))}handleMenuKeyUp(_e){(_e.key==="Escape"||_e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(_e){this.handleSubmenuKeyDown(_e)}handleSubmenuKeyDown(_e){(_e.key==="Escape"||_e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!_e.key==="Tab"&&(_e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),IS_IOS&&isInFrame())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Component$1.registerComponent("MenuButton",MenuButton);class TrackButton extends MenuButton{constructor(_e,tt){const rt=tt.tracks;if(super(_e,tt),this.items.length<=1&&this.hide(),!rt)return;const nt=bind_(this,this.update);rt.addEventListener("removetrack",nt),rt.addEventListener("addtrack",nt),rt.addEventListener("labelchange",nt),this.player_.on("ready",nt),this.player_.on("dispose",function(){rt.removeEventListener("removetrack",nt),rt.removeEventListener("addtrack",nt),rt.removeEventListener("labelchange",nt)})}}Component$1.registerComponent("TrackButton",TrackButton);class MenuItem extends ClickableComponent{constructor(_e,tt){super(_e,tt),this.selectable=tt.selectable,this.isSelected_=tt.selected||!1,this.multiSelectable=tt.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(_e,tt,rt){this.nonIconControl=!0;const nt=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},tt),rt),st=createEl("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?nt.appendChild(st):nt.replaceChild(st,nt.querySelector(".vjs-icon-placeholder")),nt}handleKeyDown(_e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(_e.key)||super.handleKeyDown(_e)}handleClick(_e){this.selected(!0)}selected(_e){this.selectable&&(_e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}Component$1.registerComponent("MenuItem",MenuItem);class TextTrackMenuItem extends MenuItem{constructor(_e,tt){const rt=tt.track,nt=_e.textTracks();tt.label=rt.label||rt.language||"Unknown",tt.selected=rt.mode==="showing",super(_e,tt),this.track=rt,this.kinds=(tt.kinds||[tt.kind||this.track.kind]).filter(Boolean);const st=(...ft)=>{this.handleTracksChange.apply(this,ft)},dt=(...ft)=>{this.handleSelectedLanguageChange.apply(this,ft)};if(_e.on(["loadstart","texttrackchange"],st),nt.addEventListener("change",st),nt.addEventListener("selectedlanguagechange",dt),this.on("dispose",function(){_e.off(["loadstart","texttrackchange"],st),nt.removeEventListener("change",st),nt.removeEventListener("selectedlanguagechange",dt)}),nt.onchange===void 0){let ft;this.on(["tap","click"],function(){if(typeof window$1.Event!="object")try{ft=new window$1.Event("change")}catch{}ft||(ft=document$1.createEvent("Event"),ft.initEvent("change",!0,!0)),nt.dispatchEvent(ft)})}this.handleTracksChange()}handleClick(_e){const tt=this.track,rt=this.player_.textTracks();if(super.handleClick(_e),!!rt)for(let nt=0;nt<rt.length;nt++){const st=rt[nt];this.kinds.indexOf(st.kind)!==-1&&(st===tt?st.mode!=="showing"&&(st.mode="showing"):st.mode!=="disabled"&&(st.mode="disabled"))}}handleTracksChange(_e){const tt=this.track.mode==="showing";tt!==this.isSelected_&&this.selected(tt)}handleSelectedLanguageChange(_e){if(this.track.mode==="showing"){const tt=this.player_.cache_.selectedLanguage;if(tt&&tt.enabled&&tt.language===this.track.language&&tt.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Component$1.registerComponent("TextTrackMenuItem",TextTrackMenuItem);class OffTextTrackMenuItem extends TextTrackMenuItem{constructor(_e,tt){tt.track={player:_e,kind:tt.kind,kinds:tt.kinds,default:!1,mode:"disabled"},tt.kinds||(tt.kinds=[tt.kind]),tt.label?tt.track.label=tt.label:tt.track.label=tt.kinds.join(" and ")+" off",tt.selectable=!0,tt.multiSelectable=!1,super(_e,tt)}handleTracksChange(_e){const tt=this.player().textTracks();let rt=!0;for(let nt=0,st=tt.length;nt<st;nt++){const dt=tt[nt];if(this.options_.kinds.indexOf(dt.kind)>-1&&dt.mode==="showing"){rt=!1;break}}rt!==this.isSelected_&&this.selected(rt)}handleSelectedLanguageChange(_e){const tt=this.player().textTracks();let rt=!0;for(let nt=0,st=tt.length;nt<st;nt++){const dt=tt[nt];if(["captions","descriptions","subtitles"].indexOf(dt.kind)>-1&&dt.mode==="showing"){rt=!1;break}}rt&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Component$1.registerComponent("OffTextTrackMenuItem",OffTextTrackMenuItem);class TextTrackButton extends TrackButton{constructor(_e,tt={}){tt.tracks=_e.textTracks(),super(_e,tt)}createItems(_e=[],tt=TextTrackMenuItem){let rt;this.label_&&(rt=`${this.label_} off`),_e.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:rt})),this.hideThreshold_+=1;const nt=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let st=0;st<nt.length;st++){const dt=nt[st];if(this.kinds_.indexOf(dt.kind)>-1){const ft=new tt(this.player_,{track:dt,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});ft.addClass(`vjs-${dt.kind}-menu-item`),_e.push(ft)}}return _e}}Component$1.registerComponent("TextTrackButton",TextTrackButton);class ChaptersTrackMenuItem extends MenuItem{constructor(_e,tt){const rt=tt.track,nt=tt.cue,st=_e.currentTime();tt.selectable=!0,tt.multiSelectable=!1,tt.label=nt.text,tt.selected=nt.startTime<=st&&st<nt.endTime,super(_e,tt),this.track=rt,this.cue=nt}handleClick(_e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Component$1.registerComponent("ChaptersTrackMenuItem",ChaptersTrackMenuItem);class ChaptersButton extends TextTrackButton{constructor(_e,tt,rt){super(_e,tt,rt),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(nt=>{nt.selected(this.track_.activeCues[0]===nt.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(_e){if(_e&&_e.track&&_e.track.kind!=="chapters")return;const tt=this.findChaptersTrack();tt!==this.track_?(this.setTrack(tt),super.update()):(!this.items||tt&&tt.cues&&tt.cues.length!==this.items.length)&&super.update()}setTrack(_e){if(this.track_!==_e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const tt=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);tt&&tt.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=_e,this.track_){this.track_.mode="hidden";const tt=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);tt&&tt.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const _e=this.player_.textTracks()||[];for(let tt=_e.length-1;tt>=0;tt--){const rt=_e[tt];if(rt.kind===this.kind_)return rt}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(toTitleCase$1(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const _e=[];if(!this.track_)return _e;const tt=this.track_.cues;if(!tt)return _e;for(let rt=0,nt=tt.length;rt<nt;rt++){const st=tt[rt],dt=new ChaptersTrackMenuItem(this.player_,{track:this.track_,cue:st});_e.push(dt)}return _e}}ChaptersButton.prototype.kind_="chapters";ChaptersButton.prototype.controlText_="Chapters";Component$1.registerComponent("ChaptersButton",ChaptersButton);class DescriptionsButton extends TextTrackButton{constructor(_e,tt,rt){super(_e,tt,rt),this.setIcon("audio-description");const nt=_e.textTracks(),st=bind_(this,this.handleTracksChange);nt.addEventListener("change",st),this.on("dispose",function(){nt.removeEventListener("change",st)})}handleTracksChange(_e){const tt=this.player().textTracks();let rt=!1;for(let nt=0,st=tt.length;nt<st;nt++){const dt=tt[nt];if(dt.kind!==this.kind_&&dt.mode==="showing"){rt=!0;break}}rt?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}DescriptionsButton.prototype.kind_="descriptions";DescriptionsButton.prototype.controlText_="Descriptions";Component$1.registerComponent("DescriptionsButton",DescriptionsButton);class SubtitlesButton extends TextTrackButton{constructor(_e,tt,rt){super(_e,tt,rt),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}SubtitlesButton.prototype.kind_="subtitles";SubtitlesButton.prototype.controlText_="Subtitles";Component$1.registerComponent("SubtitlesButton",SubtitlesButton);class CaptionSettingsMenuItem extends TextTrackMenuItem{constructor(_e,tt){tt.track={player:_e,kind:tt.kind,label:tt.kind+" settings",selectable:!1,default:!1,mode:"disabled"},tt.selectable=!1,tt.name="CaptionSettingsMenuItem",super(_e,tt),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+tt.kind+" settings dialog")}handleClick(_e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Component$1.registerComponent("CaptionSettingsMenuItem",CaptionSettingsMenuItem);class CaptionsButton extends TextTrackButton{constructor(_e,tt,rt){super(_e,tt,rt),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const _e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(_e.push(new CaptionSettingsMenuItem(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(_e)}}CaptionsButton.prototype.kind_="captions";CaptionsButton.prototype.controlText_="Captions";Component$1.registerComponent("CaptionsButton",CaptionsButton);class SubsCapsMenuItem extends TextTrackMenuItem{createEl(_e,tt,rt){const nt=super.createEl(_e,tt,rt),st=nt.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",nt):st.appendChild(createEl("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),st.appendChild(createEl("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),nt}}Component$1.registerComponent("SubsCapsMenuItem",SubsCapsMenuItem);class SubsCapsButton extends TextTrackButton{constructor(_e,tt={}){super(_e,tt),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(toTitleCase$1(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let _e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(_e.push(new CaptionSettingsMenuItem(this.player_,{kind:this.label_})),this.hideThreshold_+=1),_e=super.createItems(_e,SubsCapsMenuItem),_e}}SubsCapsButton.prototype.kinds_=["captions","subtitles"];SubsCapsButton.prototype.controlText_="Subtitles";Component$1.registerComponent("SubsCapsButton",SubsCapsButton);class AudioTrackMenuItem extends MenuItem{constructor(_e,tt){const rt=tt.track,nt=_e.audioTracks();tt.label=rt.label||rt.language||"Unknown",tt.selected=rt.enabled,super(_e,tt),this.track=rt,this.addClass(`vjs-${rt.kind}-menu-item`);const st=(...dt)=>{this.handleTracksChange.apply(this,dt)};nt.addEventListener("change",st),this.on("dispose",()=>{nt.removeEventListener("change",st)})}createEl(_e,tt,rt){const nt=super.createEl(_e,tt,rt),st=nt.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(st.appendChild(createEl("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),st.appendChild(createEl("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),nt}handleClick(_e){if(super.handleClick(_e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const tt=this.player_.audioTracks();for(let rt=0;rt<tt.length;rt++){const nt=tt[rt];nt!==this.track&&(nt.enabled=nt===this.track)}}}handleTracksChange(_e){this.selected(this.track.enabled)}}Component$1.registerComponent("AudioTrackMenuItem",AudioTrackMenuItem);class AudioTrackButton extends TrackButton{constructor(_e,tt={}){tt.tracks=_e.audioTracks(),super(_e,tt),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(_e=[]){this.hideThreshold_=1;const tt=this.player_.audioTracks();for(let rt=0;rt<tt.length;rt++){const nt=tt[rt];_e.push(new AudioTrackMenuItem(this.player_,{track:nt,selectable:!0,multiSelectable:!1}))}return _e}}AudioTrackButton.prototype.controlText_="Audio Track";Component$1.registerComponent("AudioTrackButton",AudioTrackButton);class PlaybackRateMenuItem extends MenuItem{constructor(_e,tt){const rt=tt.rate,nt=parseFloat(rt,10);tt.label=rt,tt.selected=nt===_e.playbackRate(),tt.selectable=!0,tt.multiSelectable=!1,super(_e,tt),this.label=rt,this.rate=nt,this.on(_e,"ratechange",st=>this.update(st))}handleClick(_e){super.handleClick(),this.player().playbackRate(this.rate)}update(_e){this.selected(this.player().playbackRate()===this.rate)}}PlaybackRateMenuItem.prototype.contentElType="button";Component$1.registerComponent("PlaybackRateMenuItem",PlaybackRateMenuItem);class PlaybackRateMenuButton extends MenuButton{constructor(_e,tt){super(_e,tt),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(_e,"loadstart",rt=>this.updateVisibility(rt)),this.on(_e,"ratechange",rt=>this.updateLabel(rt)),this.on(_e,"playbackrateschange",rt=>this.handlePlaybackRateschange(rt))}createEl(){const _e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=createEl("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),_e.appendChild(this.labelEl_),_e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const _e=this.playbackRates(),tt=[];for(let rt=_e.length-1;rt>=0;rt--)tt.push(new PlaybackRateMenuItem(this.player(),{rate:_e[rt]+"x"}));return tt}handlePlaybackRateschange(_e){this.update()}playbackRates(){const _e=this.player();return _e.playbackRates&&_e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(_e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(_e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}PlaybackRateMenuButton.prototype.controlText_="Playback Rate";Component$1.registerComponent("PlaybackRateMenuButton",PlaybackRateMenuButton);class Spacer extends Component$1{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(_e="div",tt={},rt={}){return tt.className||(tt.className=this.buildCSSClass()),super.createEl(_e,tt,rt)}}Component$1.registerComponent("Spacer",Spacer);class CustomControlSpacer extends Spacer{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}Component$1.registerComponent("CustomControlSpacer",CustomControlSpacer);class ControlBar extends Component$1{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}ControlBar.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};Component$1.registerComponent("ControlBar",ControlBar);class ErrorDisplay extends ModalDialog{constructor(_e,tt){super(_e,tt),this.on(_e,"error",rt=>{this.open(rt)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const _e=this.player().error();return _e?this.localize(_e.message):""}}ErrorDisplay.prototype.options_=Object.assign({},ModalDialog.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});Component$1.registerComponent("ErrorDisplay",ErrorDisplay);class TextTrackSelect extends Component$1{constructor(_e,tt={}){super(_e,tt),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),createEl("select",{id:this.options_.id},{},this.options_.SelectOptions.map(tt=>{const rt=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${newGUID()}`)+"-"+tt[1].replace(/\W+/g,""),nt=createEl("option",{id:rt,value:this.localize(tt[0]),textContent:this.localize(tt[1])});return nt.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${rt}`),nt}))}}Component$1.registerComponent("TextTrackSelect",TextTrackSelect);class TextTrackFieldset extends Component$1{constructor(_e,tt={}){super(_e,tt);const rt=createEl("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(rt);const nt=this.options_.selects;for(const st of nt){const dt=this.options_.selectConfigs[st],ft=dt.className,ht=dt.id.replace("%s",this.options_.id_);let mt=null;const bt=`vjs_select_${newGUID()}`;if(this.options_.type==="colors"){mt=createEl("span",{className:ft});const Et=createEl("label",{id:ht,className:"vjs-label",textContent:this.localize(dt.label)});Et.setAttribute("for",bt),mt.appendChild(Et)}const St=new TextTrackSelect(_e,{SelectOptions:dt.options,legendId:this.options_.legendId,id:bt,labelId:ht});this.addChild(St),this.options_.type==="colors"&&(mt.appendChild(St.el()),this.el().appendChild(mt))}}createEl(){return createEl("fieldset",{className:this.options_.className})}}Component$1.registerComponent("TextTrackFieldset",TextTrackFieldset);class TextTrackSettingsColors extends Component$1{constructor(_e,tt={}){super(_e,tt);const rt=this.options_.textTrackComponentid,nt=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-text-legend-${rt}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(nt);const st=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-background-${rt}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(st);const dt=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-window-${rt}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(dt)}createEl(){return createEl("div",{className:"vjs-track-settings-colors"})}}Component$1.registerComponent("TextTrackSettingsColors",TextTrackSettingsColors);class TextTrackSettingsFont extends Component$1{constructor(_e,tt={}){super(_e,tt);const rt=this.options_.textTrackComponentid,nt=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-font-size-${rt}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(nt);const st=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-edge-style-${rt}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(st);const dt=new TextTrackFieldset(_e,{id_:rt,legendId:`captions-font-family-${rt}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(dt)}createEl(){return createEl("div",{className:"vjs-track-settings-font"})}}Component$1.registerComponent("TextTrackSettingsFont",TextTrackSettingsFont);class TrackSettingsControls extends Component$1{constructor(_e,tt={}){super(_e,tt);const rt=new Button(_e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});rt.el().classList.remove("vjs-control","vjs-button"),rt.el().textContent=this.localize("Reset"),this.addChild(rt);const nt=this.localize("Done"),st=new Button(_e,{controlText:nt,className:"vjs-done-button"});st.el().classList.remove("vjs-control","vjs-button"),st.el().textContent=nt,this.addChild(st)}createEl(){return createEl("div",{className:"vjs-track-settings-controls"})}}Component$1.registerComponent("TrackSettingsControls",TrackSettingsControls);const LOCAL_STORAGE_KEY$1="vjs-text-track-settings",COLOR_BLACK=["#000","Black"],COLOR_BLUE=["#00F","Blue"],COLOR_CYAN=["#0FF","Cyan"],COLOR_GREEN=["#0F0","Green"],COLOR_MAGENTA=["#F0F","Magenta"],COLOR_RED=["#F00","Red"],COLOR_WHITE=["#FFF","White"],COLOR_YELLOW=["#FF0","Yellow"],OPACITY_OPAQUE=["1","Opaque"],OPACITY_SEMI=["0.5","Semi-Transparent"],OPACITY_TRANS=["0","Transparent"],selectConfigs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[COLOR_BLACK,COLOR_WHITE,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[OPACITY_OPAQUE,OPACITY_SEMI,OPACITY_TRANS],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[COLOR_WHITE,COLOR_BLACK,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:et=>et==="1.00"?null:Number(et)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[OPACITY_OPAQUE,OPACITY_SEMI],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[OPACITY_TRANS,OPACITY_SEMI,OPACITY_OPAQUE],className:"vjs-window-opacity vjs-opacity"}};selectConfigs.windowColor.options=selectConfigs.backgroundColor.options;function parseOptionValue(et,_e){if(_e&&(et=_e(et)),et&&et!=="none")return et}function getSelectedOptionValue(et,_e){const tt=et.options[et.options.selectedIndex].value;return parseOptionValue(tt,_e)}function setSelectedOption(et,_e,tt){if(_e){for(let rt=0;rt<et.options.length;rt++)if(parseOptionValue(et.options[rt].value,tt)===_e){et.selectedIndex=rt;break}}}class TextTrackSettings extends ModalDialog{constructor(_e,tt){tt.temporary=!1,super(_e,tt),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(_e),this.endDialog=createEl("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),tt.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(_e){const tt=new TextTrackSettingsColors(_e,{textTrackComponentid:this.id_,selectConfigs,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(tt);const rt=new TextTrackSettingsFont(_e,{textTrackComponentid:this.id_,selectConfigs,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(rt);const nt=new TrackSettingsControls(_e);this.addChild(nt)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),each(selectConfigs,_e=>{this.on(this.$(_e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return reduce(selectConfigs,(_e,tt,rt)=>{const nt=getSelectedOptionValue(this.$(tt.selector),tt.parser);return nt!==void 0&&(_e[rt]=nt),_e},{})}setValues(_e){each(selectConfigs,(tt,rt)=>{setSelectedOption(this.$(tt.selector),_e[rt],tt.parser)})}setDefaults(){each(selectConfigs,_e=>{const tt=_e.hasOwnProperty("default")?_e.default:0;this.$(_e.selector).selectedIndex=tt})}restoreSettings(){let _e;try{_e=JSON.parse(window$1.localStorage.getItem(LOCAL_STORAGE_KEY$1))}catch(tt){log$1$1.warn(tt)}_e&&this.setValues(_e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const _e=this.getValues();try{Object.keys(_e).length?window$1.localStorage.setItem(LOCAL_STORAGE_KEY$1,JSON.stringify(_e)):window$1.localStorage.removeItem(LOCAL_STORAGE_KEY$1)}catch(tt){log$1$1.warn(tt)}}updateDisplay(){const _e=this.player_.getChild("textTrackDisplay");_e&&_e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}Component$1.registerComponent("TextTrackSettings",TextTrackSettings);class ResizeManager extends Component$1{constructor(_e,tt){let rt=tt.ResizeObserver||window$1.ResizeObserver;tt.ResizeObserver===null&&(rt=!1);const nt=merge$1({createEl:!rt,reportTouchActivity:!1},tt);super(_e,nt),this.ResizeObserver=tt.ResizeObserver||window$1.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=debounce$1(()=>{this.resizeHandler()},100,!1,this),rt?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(_e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const st=this.debouncedHandler_;let dt=this.unloadListener_=function(){off(this,"resize",st),off(this,"unload",dt),dt=null};on(this.el_.contentWindow,"unload",dt),on(this.el_.contentWindow,"resize",st)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}Component$1.registerComponent("ResizeManager",ResizeManager);const defaults$1={trackingThreshold:20,liveTolerance:15};class LiveTracker extends Component$1{constructor(_e,tt){const rt=merge$1(defaults$1,tt,{createEl:!1});super(_e,rt),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=nt=>this.handlePlay(nt),this.handleFirstTimeupdate_=nt=>this.handleFirstTimeupdate(nt),this.handleSeeked_=nt=>this.handleSeeked(nt),this.seekToLiveEdge_=nt=>this.seekToLiveEdge(nt),this.reset_(),this.on(this.player_,"durationchange",nt=>this.handleDurationchange(nt)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const _e=this.player_.seekable();if(!_e||!_e.length)return;const tt=Number(window$1.performance.now().toFixed(4)),rt=this.lastTime_===-1?0:(tt-this.lastTime_)/1e3;this.lastTime_=tt,this.pastSeekEnd_=this.pastSeekEnd()+rt;const nt=this.liveCurrentTime(),st=this.player_.currentTime();let dt=this.player_.paused()||this.seekedBehindLive_||Math.abs(nt-st)>this.options_.liveTolerance;(!this.timeupdateSeen_||nt===1/0)&&(dt=!1),dt!==this.behindLiveEdge_&&(this.behindLiveEdge_=dt,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,UPDATE_REFRESH_INTERVAL),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const _e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&_e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const _e=this.player_.seekable(),tt=[];let rt=_e?_e.length:0;for(;rt--;)tt.push(_e.end(rt));return tt.length?tt.sort()[tt.length-1]:1/0}seekableStart(){const _e=this.player_.seekable(),tt=[];let rt=_e?_e.length:0;for(;rt--;)tt.push(_e.start(rt));return tt.length?tt.sort()[0]:0}liveWindow(){const _e=this.liveCurrentTime();return _e===1/0?0:_e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const _e=this.seekableEnd();return this.lastSeekEnd_!==-1&&_e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=_e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}Component$1.registerComponent("LiveTracker",LiveTracker);class TitleBar extends Component$1{constructor(_e,tt){super(_e,tt),this.on("statechanged",rt=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:createEl("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${newGUID()}`}),description:createEl("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${newGUID()}`})},createEl("div",{className:"vjs-title-bar"},{},values(this.els))}updateDom_(){const _e=this.player_.tech_,tt=_e&&_e.el_,rt={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(nt=>{const st=this.state[nt],dt=this.els[nt],ft=rt[nt];emptyEl(dt),st&&textContent(dt,st),tt&&(tt.removeAttribute(ft),st&&tt.setAttribute(ft,dt.id))}),this.state.title||this.state.description?this.show():this.hide()}update(_e){this.setState(_e)}dispose(){const _e=this.player_.tech_,tt=_e&&_e.el_;tt&&(tt.removeAttribute("aria-labelledby"),tt.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}Component$1.registerComponent("TitleBar",TitleBar);const defaults={initialDisplay:4e3,position:[],takeFocus:!1};class TransientButton extends Button{constructor(_e,tt){tt=merge$1(defaults,tt),super(_e,tt),this.controlText(tt.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],rt=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(_e=>`vjs-${_e}`).join(" ")}`}createEl(){const _e=createEl("button",{},{type:"button",class:this.buildCSSClass()},createEl("span"));return this.controlTextEl_=_e.querySelector("span"),_e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}Component$1.registerComponent("TransientButton",TransientButton);const sourcesetLoad=et=>{const _e=et.el();if(_e.hasAttribute("src"))return et.triggerSourceset(_e.src),!0;const tt=et.$$("source"),rt=[];let nt="";if(!tt.length)return!1;for(let st=0;st<tt.length;st++){const dt=tt[st].src;dt&&rt.indexOf(dt)===-1&&rt.push(dt)}return rt.length?(rt.length===1&&(nt=rt[0]),et.triggerSourceset(nt),!0):!1},innerHTMLDescriptorPolyfill=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(et){const _e=document$1.createElement(this.nodeName.toLowerCase());_e.innerHTML=et;const tt=document$1.createDocumentFragment();for(;_e.childNodes.length;)tt.appendChild(_e.childNodes[0]);return this.innerText="",window$1.Element.prototype.appendChild.call(this,tt),this.innerHTML}}),getDescriptor=(et,_e)=>{let tt={};for(let rt=0;rt<et.length&&(tt=Object.getOwnPropertyDescriptor(et[rt],_e),!(tt&&tt.set&&tt.get));rt++);return tt.enumerable=!0,tt.configurable=!0,tt},getInnerHTMLDescriptor=et=>getDescriptor([et.el(),window$1.HTMLMediaElement.prototype,window$1.Element.prototype,innerHTMLDescriptorPolyfill],"innerHTML"),firstSourceWatch=function(et){const _e=et.el();if(_e.resetSourceWatch_)return;const tt={},rt=getInnerHTMLDescriptor(et),nt=st=>(...dt)=>{const ft=st.apply(_e,dt);return sourcesetLoad(et),ft};["append","appendChild","insertAdjacentHTML"].forEach(st=>{_e[st]&&(tt[st]=_e[st],_e[st]=nt(tt[st]))}),Object.defineProperty(_e,"innerHTML",merge$1(rt,{set:nt(rt.set)})),_e.resetSourceWatch_=()=>{_e.resetSourceWatch_=null,Object.keys(tt).forEach(st=>{_e[st]=tt[st]}),Object.defineProperty(_e,"innerHTML",rt)},et.one("sourceset",_e.resetSourceWatch_)},srcDescriptorPolyfill=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this,"src")):""},set(et){return window$1.Element.prototype.setAttribute.call(this,"src",et),et}}),getSrcDescriptor=et=>getDescriptor([et.el(),window$1.HTMLMediaElement.prototype,srcDescriptorPolyfill],"src"),setupSourceset=function(et){if(!et.featuresSourceset)return;const _e=et.el();if(_e.resetSourceset_)return;const tt=getSrcDescriptor(et),rt=_e.setAttribute,nt=_e.load;Object.defineProperty(_e,"src",merge$1(tt,{set:st=>{const dt=tt.set.call(_e,st);return et.triggerSourceset(_e.src),dt}})),_e.setAttribute=(st,dt)=>{const ft=rt.call(_e,st,dt);return/src/i.test(st)&&et.triggerSourceset(_e.src),ft},_e.load=()=>{const st=nt.call(_e);return sourcesetLoad(et)||(et.triggerSourceset(""),firstSourceWatch(et)),st},_e.currentSrc?et.triggerSourceset(_e.currentSrc):sourcesetLoad(et)||firstSourceWatch(et),_e.resetSourceset_=()=>{_e.resetSourceset_=null,_e.load=nt,_e.setAttribute=rt,Object.defineProperty(_e,"src",tt),_e.resetSourceWatch_&&_e.resetSourceWatch_()}};class Html5 extends Tech{constructor(_e,tt){super(_e,tt);const rt=_e.source;let nt=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",rt&&(this.el_.currentSrc!==rt.src||_e.tag&&_e.tag.initNetworkState_===3)?this.setSource(rt):this.handleLateInit_(this.el_),_e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const st=this.el_.childNodes;let dt=st.length;const ft=[];for(;dt--;){const ht=st[dt];ht.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(ht),this.remoteTextTracks().addTrack(ht.track),this.textTracks().addTrack(ht.track),!nt&&!this.el_.hasAttribute("crossorigin")&&isCrossOrigin(ht.src)&&(nt=!0)):ft.push(ht))}for(let ht=0;ht<ft.length;ht++)this.el_.removeChild(ft[ht])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&nt&&log$1$1.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(TOUCH_ENABLED||IS_IPHONE)&&_e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Html5.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){setupSourceset(this)}restoreMetadataTracksInIOSNativePlayer_(){const _e=this.textTracks();let tt;const rt=()=>{tt=[];for(let st=0;st<_e.length;st++){const dt=_e[st];dt.kind==="metadata"&&tt.push({track:dt,storedMode:dt.mode})}};rt(),_e.addEventListener("change",rt),this.on("dispose",()=>_e.removeEventListener("change",rt));const nt=()=>{for(let st=0;st<tt.length;st++){const dt=tt[st];dt.track.mode==="disabled"&&dt.track.mode!==dt.storedMode&&(dt.track.mode=dt.storedMode)}_e.removeEventListener("change",nt)};this.on("webkitbeginfullscreen",()=>{_e.removeEventListener("change",rt),_e.removeEventListener("change",nt),_e.addEventListener("change",nt)}),this.on("webkitendfullscreen",()=>{_e.removeEventListener("change",rt),_e.addEventListener("change",rt),_e.removeEventListener("change",nt)})}overrideNative_(_e,tt){if(tt!==this[`featuresNative${_e}Tracks`])return;const rt=_e.toLowerCase();this[`${rt}TracksListeners_`]&&Object.keys(this[`${rt}TracksListeners_`]).forEach(nt=>{this.el()[`${rt}Tracks`].removeEventListener(nt,this[`${rt}TracksListeners_`][nt])}),this[`featuresNative${_e}Tracks`]=!tt,this[`${rt}TracksListeners_`]=null,this.proxyNativeTracksForType_(rt)}overrideNativeAudioTracks(_e){this.overrideNative_("Audio",_e)}overrideNativeVideoTracks(_e){this.overrideNative_("Video",_e)}proxyNativeTracksForType_(_e){const tt=NORMAL[_e],rt=this.el()[tt.getterName],nt=this[tt.getterName]();if(!this[`featuresNative${tt.capitalName}Tracks`]||!rt||!rt.addEventListener)return;const st={change:ft=>{const ht={type:"change",target:nt,currentTarget:nt,srcElement:nt};nt.trigger(ht),_e==="text"&&this[REMOTE.remoteText.getterName]().trigger(ht)},addtrack(ft){nt.addTrack(ft.track)},removetrack(ft){nt.removeTrack(ft.track)}},dt=function(){const ft=[];for(let ht=0;ht<nt.length;ht++){let mt=!1;for(let bt=0;bt<rt.length;bt++)if(rt[bt]===nt[ht]){mt=!0;break}mt||ft.push(nt[ht])}for(;ft.length;)nt.removeTrack(ft.shift())};this[tt.getterName+"Listeners_"]=st,Object.keys(st).forEach(ft=>{const ht=st[ft];rt.addEventListener(ft,ht),this.on("dispose",mt=>rt.removeEventListener(ft,ht))}),this.on("loadstart",dt),this.on("dispose",ft=>this.off("loadstart",dt))}proxyNativeTracks_(){NORMAL.names.forEach(_e=>{this.proxyNativeTracksForType_(_e)})}createEl(){let _e=this.options_.tag;if(!_e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(_e){const rt=_e.cloneNode(!0);_e.parentNode&&_e.parentNode.insertBefore(rt,_e),Html5.disposeMediaElement(_e),_e=rt}else{_e=document$1.createElement("video");const rt=this.options_.tag&&getAttributes(this.options_.tag),nt=merge$1({},rt);(!TOUCH_ENABLED||this.options_.nativeControlsForTouch!==!0)&&delete nt.controls,setAttributes(_e,Object.assign(nt,{id:this.options_.techId,class:"vjs-tech"}))}_e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&setAttribute(_e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(_e.disablePictureInPicture=this.options_.disablePictureInPicture);const tt=["loop","muted","playsinline","autoplay"];for(let rt=0;rt<tt.length;rt++){const nt=tt[rt],st=this.options_[nt];typeof st<"u"&&(st?setAttribute(_e,nt,nt):removeAttribute(_e,nt),_e[nt]=st)}return _e}handleLateInit_(_e){if(_e.networkState===0||_e.networkState===3)return;if(_e.readyState===0){let rt=!1;const nt=function(){rt=!0};this.on("loadstart",nt);const st=function(){rt||this.trigger("loadstart")};this.on("loadedmetadata",st),this.ready(function(){this.off("loadstart",nt),this.off("loadedmetadata",st),rt||this.trigger("loadstart")});return}const tt=["loadstart"];tt.push("loadedmetadata"),_e.readyState>=2&&tt.push("loadeddata"),_e.readyState>=3&&tt.push("canplay"),_e.readyState>=4&&tt.push("canplaythrough"),this.ready(function(){tt.forEach(function(rt){this.trigger(rt)},this)})}setScrubbing(_e){this.isScrubbing_=_e}scrubbing(){return this.isScrubbing_}setCurrentTime(_e){try{this.isScrubbing_&&this.el_.fastSeek&&IS_ANY_SAFARI?this.el_.fastSeek(_e):this.el_.currentTime=_e}catch(tt){log$1$1(tt,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&IS_ANDROID&&IS_CHROME&&this.el_.currentTime===0){const _e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",_e))};return this.on("timeupdate",_e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const _e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},tt=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",_e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",tt),this.on("dispose",()=>{this.off("webkitbeginfullscreen",tt),this.off("webkitendfullscreen",_e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const _e=this.el_;if(_e.paused&&_e.networkState<=_e.HAVE_METADATA)silencePromise(this.el_.play()),this.setTimeout(function(){_e.pause();try{_e.webkitEnterFullScreen()}catch(tt){this.trigger("fullscreenerror",tt)}},0);else try{_e.webkitEnterFullScreen()}catch(tt){this.trigger("fullscreenerror",tt)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(_e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(_e):super.requestVideoFrameCallback(_e)}cancelVideoFrameCallback(_e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(_e):super.cancelVideoFrameCallback(_e)}src(_e){if(_e===void 0)return this.el_.src;this.setSrc(_e)}addSourceElement(_e,tt){if(!_e)return log$1$1.error("Invalid source URL."),!1;const rt={src:_e};tt&&(rt.type=tt);const nt=createEl("source",{},rt);return this.el_.appendChild(nt),!0}removeSourceElement(_e){if(!_e)return log$1$1.error("Source URL is required to remove the source element."),!1;const tt=this.el_.querySelectorAll("source");for(const rt of tt)if(rt.src===_e)return this.el_.removeChild(rt),!0;return log$1$1.warn(`No matching source element found with src: ${_e}`),!1}reset(){Html5.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(_e){this.el_.controls=!!_e}addTextTrack(_e,tt,rt){return this.featuresNativeTextTracks?this.el_.addTextTrack(_e,tt,rt):super.addTextTrack(_e,tt,rt)}createRemoteTextTrack(_e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(_e);const tt=document$1.createElement("track");return _e.kind&&(tt.kind=_e.kind),_e.label&&(tt.label=_e.label),(_e.language||_e.srclang)&&(tt.srclang=_e.language||_e.srclang),_e.default&&(tt.default=_e.default),_e.id&&(tt.id=_e.id),_e.src&&(tt.src=_e.src),tt}addRemoteTextTrack(_e,tt){const rt=super.addRemoteTextTrack(_e,tt);return this.featuresNativeTextTracks&&this.el().appendChild(rt),rt}removeRemoteTextTrack(_e){if(super.removeRemoteTextTrack(_e),this.featuresNativeTextTracks){const tt=this.$$("track");let rt=tt.length;for(;rt--;)(_e===tt[rt]||_e===tt[rt].track)&&this.el().removeChild(tt[rt])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const _e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(_e.droppedVideoFrames=this.el().webkitDroppedFrameCount,_e.totalVideoFrames=this.el().webkitDecodedFrameCount),window$1.performance&&(_e.creationTime=window$1.performance.now()),_e}}defineLazyProperty(Html5,"TEST_VID",function(){if(!isReal())return;const et=document$1.createElement("video"),_e=document$1.createElement("track");return _e.kind="captions",_e.srclang="en",_e.label="English",et.appendChild(_e),et});Html5.isSupported=function(){try{Html5.TEST_VID.volume=.5}catch{return!1}return!!(Html5.TEST_VID&&Html5.TEST_VID.canPlayType)};Html5.canPlayType=function(et){return Html5.TEST_VID.canPlayType(et)};Html5.canPlaySource=function(et,_e){return Html5.canPlayType(et.type)};Html5.canControlVolume=function(){try{const et=Html5.TEST_VID.volume;Html5.TEST_VID.volume=et/2+.1;const _e=et!==Html5.TEST_VID.volume;return _e&&IS_IOS?(window$1.setTimeout(()=>{Html5&&Html5.prototype&&(Html5.prototype.featuresVolumeControl=et!==Html5.TEST_VID.volume)}),!1):_e}catch{return!1}};Html5.canMuteVolume=function(){try{const et=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!et,Html5.TEST_VID.muted?setAttribute(Html5.TEST_VID,"muted","muted"):removeAttribute(Html5.TEST_VID,"muted","muted"),et!==Html5.TEST_VID.muted}catch{return!1}};Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{const et=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=et/2+.1,et!==Html5.TEST_VID.playbackRate}catch{return!1}};Html5.canOverrideAttributes=function(){try{const et=()=>{};Object.defineProperty(document$1.createElement("video"),"src",{get:et,set:et}),Object.defineProperty(document$1.createElement("audio"),"src",{get:et,set:et}),Object.defineProperty(document$1.createElement("video"),"innerHTML",{get:et,set:et}),Object.defineProperty(document$1.createElement("audio"),"innerHTML",{get:et,set:et})}catch{return!1}return!0};Html5.supportsNativeTextTracks=function(){return IS_ANY_SAFARI||IS_IOS&&IS_CHROME};Html5.supportsNativeVideoTracks=function(){return!!(Html5.TEST_VID&&Html5.TEST_VID.videoTracks)};Html5.supportsNativeAudioTracks=function(){return!!(Html5.TEST_VID&&Html5.TEST_VID.audioTracks)};Html5.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([et,_e]){defineLazyProperty(Html5.prototype,et,()=>Html5[_e](),!0)});Html5.prototype.featuresVolumeControl=Html5.canControlVolume();Html5.prototype.movingMediaElementInDOM=!IS_IOS;Html5.prototype.featuresFullscreenResize=!0;Html5.prototype.featuresProgressEvents=!0;Html5.prototype.featuresTimeupdateEvents=!0;Html5.prototype.featuresVideoFrameCallback=!!(Html5.TEST_VID&&Html5.TEST_VID.requestVideoFrameCallback);Html5.disposeMediaElement=function(et){if(et){for(et.parentNode&&et.parentNode.removeChild(et);et.hasChildNodes();)et.removeChild(et.firstChild);et.removeAttribute("src"),typeof et.load=="function"&&(function(){try{et.load()}catch{}})()}};Html5.resetMediaElement=function(et){if(!et)return;const _e=et.querySelectorAll("source");let tt=_e.length;for(;tt--;)et.removeChild(_e[tt]);et.removeAttribute("src"),typeof et.load=="function"&&(function(){try{et.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(et){Html5.prototype[et]=function(){return this.el_[et]||this.el_.hasAttribute(et)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(et){Html5.prototype["set"+toTitleCase$1(et)]=function(_e){this.el_[et]=_e,_e?this.el_.setAttribute(et,et):this.el_.removeAttribute(et)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(et){Html5.prototype[et]=function(){return this.el_[et]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(et){Html5.prototype["set"+toTitleCase$1(et)]=function(_e){this.el_[et]=_e}});["pause","load","play"].forEach(function(et){Html5.prototype[et]=function(){return this.el_[et]()}});Tech.withSourceHandlers(Html5);Html5.nativeSourceHandler={};Html5.nativeSourceHandler.canPlayType=function(et){try{return Html5.TEST_VID.canPlayType(et)}catch{return""}};Html5.nativeSourceHandler.canHandleSource=function(et,_e){if(et.type)return Html5.nativeSourceHandler.canPlayType(et.type);if(et.src){const tt=getFileExtension(et.src);return Html5.nativeSourceHandler.canPlayType(`video/${tt}`)}return""};Html5.nativeSourceHandler.handleSource=function(et,_e,tt){_e.setSrc(et.src)};Html5.nativeSourceHandler.dispose=function(){};Html5.registerSourceHandler(Html5.nativeSourceHandler);Tech.registerTech("Html5",Html5);const TECH_EVENTS_RETRIGGER=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],TECH_EVENTS_QUEUE={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},BREAKPOINT_ORDER=["tiny","xsmall","small","medium","large","xlarge","huge"],BREAKPOINT_CLASSES={};BREAKPOINT_ORDER.forEach(et=>{const _e=et.charAt(0)==="x"?`x-${et.substring(1)}`:et;BREAKPOINT_CLASSES[et]=`vjs-layout-${_e}`});const DEFAULT_BREAKPOINTS={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Player extends Component$1{constructor(_e,tt,rt){if(_e.id=_e.id||tt.id||`vjs_video_${newGUID()}`,tt=Object.assign(Player.getTagSettings(_e),tt),tt.initChildren=!1,tt.createEl=!1,tt.evented=!1,tt.reportTouchActivity=!1,!tt.language){const dt=_e.closest("[lang]");dt&&(tt.language=dt.getAttribute("lang"))}if(super(null,tt,rt),this.boundDocumentFullscreenChange_=dt=>this.documentFullscreenChange_(dt),this.boundFullWindowOnEscKey_=dt=>this.fullWindowOnEscKey(dt),this.boundUpdateStyleEl_=dt=>this.updateStyleEl_(dt),this.boundApplyInitTime_=dt=>this.applyInitTime_(dt),this.boundUpdateCurrentBreakpoint_=dt=>this.updateCurrentBreakpoint_(dt),this.boundHandleTechClick_=dt=>this.handleTechClick_(dt),this.boundHandleTechDoubleClick_=dt=>this.handleTechDoubleClick_(dt),this.boundHandleTechTouchStart_=dt=>this.handleTechTouchStart_(dt),this.boundHandleTechTouchMove_=dt=>this.handleTechTouchMove_(dt),this.boundHandleTechTouchEnd_=dt=>this.handleTechTouchEnd_(dt),this.boundHandleTechTap_=dt=>this.handleTechTap_(dt),this.boundUpdatePlayerHeightOnAudioOnlyMode_=dt=>this.updatePlayerHeightOnAudioOnlyMode_(dt),this.isFullscreen_=!1,this.log=createLogger(this.id_),this.fsApi_=FullscreenApi,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=_e,this.tagAttributes=_e&&getAttributes(_e),this.language(this.options_.language),tt.languages){const dt={};Object.getOwnPropertyNames(tt.languages).forEach(function(ft){dt[ft.toLowerCase()]=tt.languages[ft]}),this.languages_=dt}else this.languages_=Player.prototype.options_.languages;this.resetCache_(),this.poster_=tt.poster||"",this.controls_=!!tt.controls,_e.controls=!1,_e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],_e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),tt.plugins&&Object.keys(tt.plugins).forEach(dt=>{if(typeof this[dt]!="function")throw new Error(`plugin "${dt}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),evented(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(on(document$1,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const nt=merge$1(this.options_);if(tt.plugins&&Object.keys(tt.plugins).forEach(dt=>{this[dt](tt.plugins[dt])}),tt.debug&&this.debug(!0),this.options_.playerOptions=nt,this.middleware_=[],this.playbackRates(tt.playbackRates),tt.experimentalSvgIcons){const ft=new window$1.DOMParser().parseFromString(icons,"image/svg+xml");if(ft.querySelector("parsererror"))log$1$1.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const mt=ft.documentElement;mt.style.display="none",this.el_.appendChild(mt),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(_e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),tt.spatialNavigation&&tt.spatialNavigation.enabled&&(this.spatialNavigation=new SpatialNavigation(this),this.addClass("vjs-spatial-navigation-enabled")),TOUCH_ENABLED&&this.addClass("vjs-touch-enabled"),IS_IOS||this.addClass("vjs-workinghover"),Player.players[this.id_]=this;const st=version$6.split(".")[0];this.addClass(`vjs-v${st}`),this.userActive(!0),this.reportUserActivity(),this.one("play",dt=>this.listenForUserActivity_(dt)),this.on("keydown",dt=>this.handleKeyDown(dt)),this.on("languagechange",dt=>this.handleLanguagechange(dt)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),off(document$1,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),off(document$1,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Player.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),clearCacheForPlayer(this),ALL.names.forEach(_e=>{const tt=ALL[_e],rt=this[tt.getterName]();rt&&rt.off&&rt.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let _e=this.tag,tt,rt=this.playerElIngest_=_e.parentNode&&_e.parentNode.hasAttribute&&_e.parentNode.hasAttribute("data-vjs-player");const nt=this.tag.tagName.toLowerCase()==="video-js";rt?tt=this.el_=_e.parentNode:nt||(tt=this.el_=super.createEl("div"));const st=getAttributes(_e);if(nt){for(tt=this.el_=_e,_e=this.tag=document$1.createElement("video");tt.children.length;)_e.appendChild(tt.firstChild);hasClass(tt,"video-js")||addClass$2(tt,"video-js"),tt.appendChild(_e),rt=this.playerElIngest_=tt,Object.keys(tt).forEach(ht=>{try{_e[ht]=tt[ht]}catch{}})}_e.setAttribute("tabindex","-1"),st.tabindex="-1",IS_CHROME&&IS_WINDOWS&&(_e.setAttribute("role","application"),st.role="application"),_e.removeAttribute("width"),_e.removeAttribute("height"),"width"in st&&delete st.width,"height"in st&&delete st.height,Object.getOwnPropertyNames(st).forEach(function(ht){nt&&ht==="class"||tt.setAttribute(ht,st[ht]),nt&&_e.setAttribute(ht,st[ht])}),_e.playerId=_e.id,_e.id+="_html5_api",_e.className="vjs-tech",_e.player=tt.player=this,this.addClass("vjs-paused");const dt=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(ht=>browser[ht]).map(ht=>"vjs-device-"+ht.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...dt),window$1.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=createStyleElement("vjs-styles-dimensions");const ht=$$1(".vjs-styles-defaults"),mt=$$1("head");mt.insertBefore(this.styleEl_,ht?ht.nextSibling:mt.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const ft=_e.getElementsByTagName("a");for(let ht=0;ht<ft.length;ht++){const mt=ft.item(ht);addClass$2(mt,"vjs-hidden"),mt.setAttribute("hidden","hidden")}return _e.initNetworkState_=_e.networkState,_e.parentNode&&!rt&&_e.parentNode.insertBefore(tt,_e),prependTo(_e,tt),this.children_.unshift(_e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=tt,tt}crossOrigin(_e){if(typeof _e>"u")return this.techGet_("crossOrigin");if(_e!==null&&_e!=="anonymous"&&_e!=="use-credentials"){log$1$1.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${_e}"`);return}this.techCall_("setCrossOrigin",_e),this.posterImage&&this.posterImage.crossOrigin(_e)}width(_e){return this.dimension("width",_e)}height(_e){return this.dimension("height",_e)}dimension(_e,tt){const rt=_e+"_";if(tt===void 0)return this[rt]||0;if(tt===""||tt==="auto"){this[rt]=void 0,this.updateStyleEl_();return}const nt=parseFloat(tt);if(isNaN(nt)){log$1$1.error(`Improper value "${tt}" supplied for for ${_e}`);return}this[rt]=nt,this.updateStyleEl_()}fluid(_e){if(_e===void 0)return!!this.fluid_;this.fluid_=!!_e,isEvented(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),_e?(this.addClass("vjs-fluid"),this.fill(!1),addEventedCallback(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(_e){if(_e===void 0)return!!this.fill_;this.fill_=!!_e,_e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(_e){if(_e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(_e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=_e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(window$1.VIDEOJS_NO_DYNAMIC_STYLE===!0){const ft=typeof this.width_=="number"?this.width_:this.options_.width,ht=typeof this.height_=="number"?this.height_:this.options_.height,mt=this.tech_&&this.tech_.el();mt&&(ft>=0&&(mt.width=ft),ht>=0&&(mt.height=ht));return}let _e,tt,rt,nt;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?rt=this.aspectRatio_:this.videoWidth()>0?rt=this.videoWidth()+":"+this.videoHeight():rt="16:9";const st=rt.split(":"),dt=st[1]/st[0];this.width_!==void 0?_e=this.width_:this.height_!==void 0?_e=this.height_/dt:_e=this.videoWidth()||300,this.height_!==void 0?tt=this.height_:tt=_e*dt,/^[^a-zA-Z]/.test(this.id())?nt="dimensions-"+this.id():nt=this.id()+"-dimensions",this.addClass(nt),setTextContent(this.styleEl_,`
.${nt} {
width: ${_e}px;
height: ${tt}px;
}
.${nt}.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: ${dt*100}%;
}
`)}loadTech_(_e,tt){this.tech_&&this.unloadTech_();const rt=toTitleCase$1(_e),nt=_e.charAt(0).toLowerCase()+_e.slice(1);rt!=="Html5"&&this.tag&&(Tech.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=rt,this.isReady_=!1;let st=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(st=!1);const dt={source:tt,autoplay:st,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${nt}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};ALL.names.forEach(ht=>{const mt=ALL[ht];dt[mt.getterName]=this[mt.privateName]}),Object.assign(dt,this.options_[rt]),Object.assign(dt,this.options_[nt]),Object.assign(dt,this.options_[_e.toLowerCase()]),this.tag&&(dt.tag=this.tag),tt&&tt.src===this.cache_.src&&this.cache_.currentTime>0&&(dt.startTime=this.cache_.currentTime);const ft=Tech.getTech(_e);if(!ft)throw new Error(`No Tech named '${rt}' exists! '${rt}' should be registered using videojs.registerTech()'`);this.tech_=new ft(dt),this.tech_.ready(bind_(this,this.handleTechReady_),!0),textTrackConverter.jsonToTextTracks(this.textTracksJson_||[],this.tech_),TECH_EVENTS_RETRIGGER.forEach(ht=>{this.on(this.tech_,ht,mt=>this[`handleTech${toTitleCase$1(ht)}_`](mt))}),Object.keys(TECH_EVENTS_QUEUE).forEach(ht=>{this.on(this.tech_,ht,mt=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${TECH_EVENTS_QUEUE[ht]}_`].bind(this),event:mt});return}this[`handleTech${TECH_EVENTS_QUEUE[ht]}_`](mt)})}),this.on(this.tech_,"loadstart",ht=>this.handleTechLoadStart_(ht)),this.on(this.tech_,"sourceset",ht=>this.handleTechSourceset_(ht)),this.on(this.tech_,"waiting",ht=>this.handleTechWaiting_(ht)),this.on(this.tech_,"ended",ht=>this.handleTechEnded_(ht)),this.on(this.tech_,"seeking",ht=>this.handleTechSeeking_(ht)),this.on(this.tech_,"play",ht=>this.handleTechPlay_(ht)),this.on(this.tech_,"pause",ht=>this.handleTechPause_(ht)),this.on(this.tech_,"durationchange",ht=>this.handleTechDurationChange_(ht)),this.on(this.tech_,"fullscreenchange",(ht,mt)=>this.handleTechFullscreenChange_(ht,mt)),this.on(this.tech_,"fullscreenerror",(ht,mt)=>this.handleTechFullscreenError_(ht,mt)),this.on(this.tech_,"enterpictureinpicture",ht=>this.handleTechEnterPictureInPicture_(ht)),this.on(this.tech_,"leavepictureinpicture",ht=>this.handleTechLeavePictureInPicture_(ht)),this.on(this.tech_,"error",ht=>this.handleTechError_(ht)),this.on(this.tech_,"posterchange",ht=>this.handleTechPosterChange_(ht)),this.on(this.tech_,"textdata",ht=>this.handleTechTextData_(ht)),this.on(this.tech_,"ratechange",ht=>this.handleTechRateChange_(ht)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(rt!=="Html5"||!this.tag)&&prependTo(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){ALL.names.forEach(_e=>{const tt=ALL[_e];this[tt.privateName]=this[tt.getterName]()}),this.textTracksJson_=textTrackConverter.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(_e){return _e===void 0&&log$1$1.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_}version(){return{"video.js":version$6}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(_e){if(!this.tech_||typeof _e!="string")return;const tt=()=>{const nt=this.muted();this.muted(!0);const st=()=>{this.muted(nt)};this.playTerminatedQueue_.push(st);const dt=this.play();if(isPromise(dt))return dt.catch(ft=>{throw st(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${ft||""}`)})};let rt;if(_e==="any"&&!this.muted()?(rt=this.play(),isPromise(rt)&&(rt=rt.catch(tt))):_e==="muted"&&!this.muted()?rt=tt():rt=this.play(),!!isPromise(rt))return rt.then(()=>{this.trigger({type:"autoplay-success",autoplay:_e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:_e})})}updateSourceCaches_(_e=""){let tt=_e,rt="";typeof tt!="string"&&(tt=_e.src,rt=_e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],tt&&!rt&&(rt=findMimetype(this,tt)),this.cache_.source=merge$1({},_e,{src:tt,type:rt});const nt=this.cache_.sources.filter(ht=>ht.src&&ht.src===tt),st=[],dt=this.$$("source"),ft=[];for(let ht=0;ht<dt.length;ht++){const mt=getAttributes(dt[ht]);st.push(mt),mt.src&&mt.src===tt&&ft.push(mt.src)}ft.length&&!nt.length?this.cache_.sources=st:nt.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=tt}handleTechSourceset_(_e){if(!this.changingSrc_){let tt=st=>this.updateSourceCaches_(st);const rt=this.currentSource().src,nt=_e.src;rt&&!/^blob:/.test(rt)&&/^blob:/.test(nt)&&(!this.lastSource_||this.lastSource_.tech!==nt&&this.lastSource_.player!==rt)&&(tt=()=>{}),tt(nt),_e.src||this.tech_.any(["sourceset","loadstart"],st=>{if(st.type==="sourceset")return;const dt=this.techGet_("currentSrc");this.lastSource_.tech=dt,this.updateSourceCaches_(dt)})}this.lastSource_={player:this.currentSource().src,tech:_e.src},this.trigger({src:_e.src,type:"sourceset"})}hasStarted(_e){if(_e===void 0)return this.hasStarted_;_e!==this.hasStarted_&&(this.hasStarted_=_e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(_e=>_e.callback(_e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const _e=this.currentTime(),tt=()=>{_e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",tt))};this.on("timeupdate",tt)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(_e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,_e):this.paused()?silencePromise(this.play()):this.pause())}handleTechDoubleClick_(_e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),rt=>rt.contains(_e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,_e):this.isInPictureInPicture()&&!document$1.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(_e){_e.cancelable&&_e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(_e){const tt=_e.target.player;if(tt&&tt!==this)return;const rt=this.el();let nt=document$1[this.fsApi_.fullscreenElement]===rt;!nt&&rt.matches&&(nt=rt.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(nt)}handleTechFullscreenChange_(_e,tt){tt&&(tt.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(tt.isFullscreen))}handleTechFullscreenError_(_e,tt){this.trigger("fullscreenerror",tt)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(_e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(_e){this.isInPictureInPicture(!1)}handleTechError_(){const _e=this.tech_.error();_e&&this.error(_e)}handleTechTextData_(){let _e=null;arguments.length>1&&(_e=arguments[1]),this.trigger("textdata",_e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(_e,tt){this.ready(function(){if(_e in allowedSetters)return set(this.middleware_,this.tech_,_e,tt);if(_e in allowedMediators)return mediate(this.middleware_,this.tech_,_e,tt);try{this.tech_&&this.tech_[_e](tt)}catch(rt){throw log$1$1(rt),rt}},!0)}techGet_(_e){if(!(!this.tech_||!this.tech_.isReady_)){if(_e in allowedGetters)return get(this.middleware_,this.tech_,_e);if(_e in allowedMediators)return mediate(this.middleware_,this.tech_,_e);try{return this.tech_[_e]()}catch(tt){throw this.tech_[_e]===void 0?(log$1$1(`Video.js: ${_e} method not defined for ${this.techName_} playback technology.`,tt),tt):tt.name==="TypeError"?(log$1$1(`Video.js: ${_e} unavailable on ${this.techName_} playback technology element.`,tt),this.tech_.isReady_=!1,tt):(log$1$1(tt),tt)}}}play(){return new Promise(_e=>{this.play_(_e)})}play_(_e=silencePromise){this.playCallbacks_.push(_e);const tt=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),rt=!!(IS_ANY_SAFARI||IS_IOS);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!tt){this.waitToPlay_=dt=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!tt&&rt&&this.load();return}const nt=this.techGet_("play");rt&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),nt===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(nt)}runPlayTerminatedQueue_(){const _e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],_e.forEach(function(tt){tt()})}runPlayCallbacks_(_e){const tt=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],tt.forEach(function(rt){rt(_e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||createTimeRanges$1(0,0)}scrubbing(_e){if(typeof _e>"u")return this.scrubbing_;this.scrubbing_=!!_e,this.techCall_("setScrubbing",this.scrubbing_),_e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(_e){if(_e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(_e<0&&(_e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=_e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",_e),this.cache_.initTime=0,isFinite(_e)&&(this.cache_.currentTime=Number(_e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(_e){if(_e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;_e=parseFloat(_e),_e<0&&(_e=1/0),_e!==this.cache_.duration&&(this.cache_.duration=_e,_e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(_e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let _e=this.techGet_("buffered");return(!_e||!_e.length)&&(_e=createTimeRanges$1(0,0)),_e}seekable(){let _e=this.techGet_("seekable");return(!_e||!_e.length)&&(_e=createTimeRanges$1(0,0)),_e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return bufferedPercent(this.buffered(),this.duration())}bufferedEnd(){const _e=this.buffered(),tt=this.duration();let rt=_e.end(_e.length-1);return rt>tt&&(rt=tt),rt}volume(_e){let tt;if(_e!==void 0){tt=Math.max(0,Math.min(1,_e)),this.cache_.volume=tt,this.techCall_("setVolume",tt),tt>0&&this.lastVolume_(tt);return}return tt=parseFloat(this.techGet_("volume")),isNaN(tt)?1:tt}muted(_e){if(_e!==void 0){this.techCall_("setMuted",_e);return}return this.techGet_("muted")||!1}defaultMuted(_e){return _e!==void 0&&this.techCall_("setDefaultMuted",_e),this.techGet_("defaultMuted")||!1}lastVolume_(_e){if(_e!==void 0&&_e!==0){this.cache_.lastVolume=_e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(_e){if(_e!==void 0){const tt=this.isFullscreen_;this.isFullscreen_=!!_e,this.isFullscreen_!==tt&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(_e){this.isInPictureInPicture()&&this.exitPictureInPicture();const tt=this;return new Promise((rt,nt)=>{function st(){tt.off("fullscreenerror",ft),tt.off("fullscreenchange",dt)}function dt(){st(),rt()}function ft(mt,bt){st(),nt(bt)}tt.one("fullscreenchange",dt),tt.one("fullscreenerror",ft);const ht=tt.requestFullscreenHelper_(_e);ht&&(ht.then(st,st),ht.then(rt,nt))})}requestFullscreenHelper_(_e){let tt;if(this.fsApi_.prefixed||(tt=this.options_.fullscreen&&this.options_.fullscreen.options||{},_e!==void 0&&(tt=_e)),this.fsApi_.requestFullscreen){const rt=this.el_[this.fsApi_.requestFullscreen](tt);return rt&&rt.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),rt}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const _e=this;return new Promise((tt,rt)=>{function nt(){_e.off("fullscreenerror",dt),_e.off("fullscreenchange",st)}function st(){nt(),tt()}function dt(ht,mt){nt(),rt(mt)}_e.one("fullscreenchange",st),_e.one("fullscreenerror",dt);const ft=_e.exitFullscreenHelper_();ft&&(ft.then(nt,nt),ft.then(tt,rt))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const _e=document$1[this.fsApi_.exitFullscreen]();return _e&&silencePromise(_e.then(()=>this.isFullscreen(!1))),_e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=document$1.documentElement.style.overflow,on(document$1,"keydown",this.boundFullWindowOnEscKey_),document$1.documentElement.style.overflow="hidden",addClass$2(document$1.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(_e){_e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,off(document$1,"keydown",this.boundFullWindowOnEscKey_),document$1.documentElement.style.overflow=this.docOrigOverflow,removeClass$2(document$1.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(_e){if(_e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",_e),this.options_.disablePictureInPicture=_e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(_e){if(_e!==void 0){this.isInPictureInPicture_=!!_e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&window$1.documentPictureInPicture){const _e=document$1.createElement(this.el().tagName);return _e.classList=this.el().classList,_e.classList.add("vjs-pip-container"),this.posterImage&&_e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&_e.appendChild(this.titleBar.el().cloneNode(!0)),_e.appendChild(createEl("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),window$1.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(tt=>(copyStyleSheetsToWindow(tt),this.el_.parentNode.insertBefore(_e,this.el_),tt.document.body.appendChild(this.el_),tt.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:tt}),tt.addEventListener("pagehide",rt=>{const nt=rt.target.querySelector(".video-js");_e.parentNode.replaceChild(nt,_e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),tt))}return"pictureInPictureEnabled"in document$1&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(window$1.documentPictureInPicture&&window$1.documentPictureInPicture.window)return window$1.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in document$1)return document$1.exitPictureInPicture()}handleKeyDown(_e){const{userActions:tt}=this.options_;!tt||!tt.hotkeys||(nt=>{const st=nt.tagName.toLowerCase();if(nt.isContentEditable)return!0;const dt=["button","checkbox","hidden","radio","reset","submit"];return st==="input"?dt.indexOf(nt.type)===-1:["textarea"].indexOf(st)!==-1})(this.el_.ownerDocument.activeElement)||(typeof tt.hotkeys=="function"?tt.hotkeys.call(this,_e):this.handleHotkeys(_e))}handleHotkeys(_e){const tt=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:rt=dt=>_e.key.toLowerCase()==="f",muteKey:nt=dt=>_e.key.toLowerCase()==="m",playPauseKey:st=dt=>_e.key.toLowerCase()==="k"||_e.key.toLowerCase()===" "}=tt;if(rt.call(this,_e)){_e.preventDefault(),_e.stopPropagation();const dt=Component$1.getComponent("FullscreenToggle");document$1[this.fsApi_.fullscreenEnabled]!==!1&&dt.prototype.handleClick.call(this,_e)}else nt.call(this,_e)?(_e.preventDefault(),_e.stopPropagation(),Component$1.getComponent("MuteToggle").prototype.handleClick.call(this,_e)):st.call(this,_e)&&(_e.preventDefault(),_e.stopPropagation(),Component$1.getComponent("PlayToggle").prototype.handleClick.call(this,_e))}canPlayType(_e){let tt;for(let rt=0,nt=this.options_.techOrder;rt<nt.length;rt++){const st=nt[rt];let dt=Tech.getTech(st);if(dt||(dt=Component$1.getComponent(st)),!dt){log$1$1.error(`The "${st}" tech is undefined. Skipped browser support check for that tech.`);continue}if(dt.isSupported()&&(tt=dt.canPlayType(_e),tt))return tt}return""}selectSource(_e){const tt=this.options_.techOrder.map(ft=>[ft,Tech.getTech(ft)]).filter(([ft,ht])=>ht?ht.isSupported():(log$1$1.error(`The "${ft}" tech is undefined. Skipped browser support check for that tech.`),!1)),rt=function(ft,ht,mt){let bt;return ft.some(St=>ht.some(Et=>{if(bt=mt(St,Et),bt)return!0})),bt};let nt;const st=ft=>(ht,mt)=>ft(mt,ht),dt=([ft,ht],mt)=>{if(ht.canPlaySource(mt,this.options_[ft.toLowerCase()]))return{source:mt,tech:ft}};return this.options_.sourceOrder?nt=rt(_e,tt,st(dt)):nt=rt(tt,_e,dt),nt||!1}handleSrc_(_e,tt){if(typeof _e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const rt=filterSource(_e);if(!rt.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,tt||(this.cache_.sources=rt),this.updateSourceCaches_(rt[0]),setSource(this,rt[0],(nt,st)=>{if(this.middleware_=st,tt||(this.cache_.sources=rt),this.updateSourceCaches_(nt),this.src_(nt)){if(rt.length>1)return this.handleSrc_(rt.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}setTech(st,this.tech_)}),rt.length>1){const nt=()=>{this.error(null),this.handleSrc_(rt.slice(1),!0)},st=()=>{this.off("error",nt)};this.one("error",nt),this.one("playing",st),this.resetRetryOnError_=()=>{this.off("error",nt),this.off("playing",st)}}}src(_e){return this.handleSrc_(_e,!1)}src_(_e){const tt=this.selectSource([_e]);return tt?titleCaseEquals(tt.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",_e):this.techCall_("src",_e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(tt.tech,tt.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(_e,tt){return this.tech_?this.tech_.addSourceElement(_e,tt):!1}removeSourceElement(_e){return this.tech_?this.tech_.removeSourceElement(_e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const _e=this.play();silencePromise(_e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),isEvented(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:_e,durationDisplay:tt,progressControl:rt,remainingTimeDisplay:nt}=this.controlBar||{},{seekBar:st}=rt||{};_e&&_e.updateContent(),tt&&tt.updateContent(),nt&&nt.updateContent(),st&&(st.update(),st.loadProgressBar&&st.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const _e=this.currentSource(),tt=[];return Object.keys(_e).length!==0&&tt.push(_e),this.cache_.sources||tt}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(_e){if(_e!==void 0){this.techCall_("setPreload",_e),this.options_.preload=_e;return}return this.techGet_("preload")}autoplay(_e){if(_e===void 0)return this.options_.autoplay||!1;let tt;typeof _e=="string"&&/(any|play|muted)/.test(_e)||_e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=_e,this.manualAutoplay_(typeof _e=="string"?_e:"play"),tt=!1):_e?this.options_.autoplay=!0:this.options_.autoplay=!1,tt=typeof tt>"u"?this.options_.autoplay:tt,this.tech_&&this.techCall_("setAutoplay",tt)}playsinline(_e){return _e!==void 0&&(this.techCall_("setPlaysinline",_e),this.options_.playsinline=_e),this.techGet_("playsinline")}loop(_e){if(_e!==void 0){this.techCall_("setLoop",_e),this.options_.loop=_e;return}return this.techGet_("loop")}poster(_e){if(_e===void 0)return this.poster_;_e||(_e=""),_e!==this.poster_&&(this.poster_=_e,this.techCall_("setPoster",_e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const _e=this.tech_.poster()||"";_e!==this.poster_&&(this.poster_=_e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(_e){if(_e===void 0)return!!this.controls_;_e=!!_e,this.controls_!==_e&&(this.controls_=_e,this.usingNativeControls()&&this.techCall_("setControls",_e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(_e){if(_e===void 0)return!!this.usingNativeControls_;_e=!!_e,this.usingNativeControls_!==_e&&(this.usingNativeControls_=_e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(_e){if(_e===void 0)return this.error_||null;if(hooks("beforeerror").forEach(tt=>{const rt=tt(this,_e);if(!(isObject$1(rt)&&!Array.isArray(rt)||typeof rt=="string"||typeof rt=="number"||rt===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}_e=rt}),this.options_.suppressNotSupportedError&&_e&&_e.code===4){const tt=function(){this.error(_e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],tt),this.one("loadstart",function(){this.off(["click","touchstart"],tt)});return}if(_e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new MediaError(_e),this.addClass("vjs-error"),log$1$1.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),hooks("error").forEach(tt=>tt(this,this.error_))}reportUserActivity(_e){this.userActivity_=!0}userActive(_e){if(_e===void 0)return this.userActive_;if(_e=!!_e,_e!==this.userActive_){if(this.userActive_=_e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(tt){tt.stopPropagation(),tt.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let _e,tt,rt;const nt=bind_(this,this.reportUserActivity),st=function(St){(St.screenX!==tt||St.screenY!==rt)&&(tt=St.screenX,rt=St.screenY,nt())},dt=function(){nt(),this.clearInterval(_e),_e=this.setInterval(nt,250)},ft=function(St){nt(),this.clearInterval(_e)};this.on("mousedown",dt),this.on("mousemove",st),this.on("mouseup",ft),this.on("mouseleave",ft);const ht=this.getChild("controlBar");ht&&!IS_IOS&&!IS_ANDROID&&(ht.on("mouseenter",function(St){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),ht.on("mouseleave",function(St){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",nt),this.on("keyup",nt);let mt;const bt=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(mt);const St=this.options_.inactivityTimeout;St<=0||(mt=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},St))};this.setInterval(bt,250)}playbackRate(_e){if(_e!==void 0){this.techCall_("setPlaybackRate",_e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(_e){return _e!==void 0?this.techCall_("setDefaultPlaybackRate",_e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(_e){if(_e!==void 0){this.isAudio_=!!_e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const _e=this.getChild("ControlBar");!_e||this.audioOnlyCache_.controlBarHeight===_e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=_e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const _e=this.children(),tt=this.getChild("ControlBar"),rt=tt&&tt.currentHeight();_e.forEach(nt=>{nt!==tt&&nt.el_&&!nt.hasClass("vjs-hidden")&&(nt.hide(),this.audioOnlyCache_.hiddenChildren.push(nt))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=rt,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(rt),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(_e=>_e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(_e){if(typeof _e!="boolean"||_e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=_e,_e){const tt=[];return this.isInPictureInPicture()&&tt.push(this.exitPictureInPicture()),this.isFullscreen()&&tt.push(this.exitFullscreen()),this.audioPosterMode()&&tt.push(this.audioPosterMode(!1)),Promise.all(tt).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(_e){return typeof _e!="boolean"||_e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=_e,_e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(_e,tt,rt){if(this.tech_)return this.tech_.addTextTrack(_e,tt,rt)}addRemoteTextTrack(_e,tt){if(this.tech_)return this.tech_.addRemoteTextTrack(_e,tt)}removeRemoteTextTrack(_e={}){let{track:tt}=_e;if(tt||(tt=_e),this.tech_)return this.tech_.removeRemoteTextTrack(tt)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(_e){if(_e===void 0)return this.language_;this.language_!==String(_e).toLowerCase()&&(this.language_=String(_e).toLowerCase(),isEvented(this)&&this.trigger("languagechange"))}languages(){return merge$1(Player.prototype.options_.languages,this.languages_)}toJSON(){const _e=merge$1(this.options_),tt=_e.tracks;_e.tracks=[];for(let rt=0;rt<tt.length;rt++){let nt=tt[rt];nt=merge$1(nt),nt.player=void 0,_e.tracks[rt]=nt}return _e}createModal(_e,tt){tt=tt||{},tt.content=_e||"";const rt=new ModalDialog(this,tt);return this.addChild(rt),rt.on("dispose",()=>{this.removeChild(rt)}),rt.open(),rt}updateCurrentBreakpoint_(){if(!this.responsive())return;const _e=this.currentBreakpoint(),tt=this.currentWidth();for(let rt=0;rt<BREAKPOINT_ORDER.length;rt++){const nt=BREAKPOINT_ORDER[rt],st=this.breakpoints_[nt];if(tt<=st){if(_e===nt)return;_e&&this.removeClass(BREAKPOINT_CLASSES[_e]),this.addClass(BREAKPOINT_CLASSES[nt]),this.breakpoint_=nt;break}}}removeCurrentBreakpoint_(){const _e=this.currentBreakpointClass();this.breakpoint_="",_e&&this.removeClass(_e)}breakpoints(_e){return _e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},DEFAULT_BREAKPOINTS,_e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(_e){if(_e===void 0)return this.responsive_;_e=!!_e;const tt=this.responsive_;if(_e!==tt)return this.responsive_=_e,_e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),_e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return BREAKPOINT_CLASSES[this.breakpoint_]||""}loadMedia(_e,tt){if(!_e||typeof _e!="object")return;const rt=this.crossOrigin();this.reset(),this.cache_.media=merge$1(_e);const{artist:nt,artwork:st,description:dt,poster:ft,src:ht,textTracks:mt,title:bt}=this.cache_.media;!st&&ft&&(this.cache_.media.artwork=[{src:ft,type:getMimetype(ft)}]),rt&&this.crossOrigin(rt),ht&&this.src(ht),ft&&this.poster(ft),Array.isArray(mt)&&mt.forEach(St=>this.addRemoteTextTrack(St,!1)),this.titleBar&&this.titleBar.update({title:bt,description:dt||nt||""}),this.ready(tt)}getMedia(){if(!this.cache_.media){const _e=this.poster(),tt=this.currentSources(),rt=Array.prototype.map.call(this.remoteTextTracks(),st=>({kind:st.kind,label:st.label,language:st.language,src:st.src})),nt={src:tt,textTracks:rt};return _e&&(nt.poster=_e,nt.artwork=[{src:nt.poster,type:getMimetype(nt.poster)}]),nt}return merge$1(this.cache_.media)}static getTagSettings(_e){const tt={sources:[],tracks:[]},rt=getAttributes(_e),nt=rt["data-setup"];if(hasClass(_e,"vjs-fill")&&(rt.fill=!0),hasClass(_e,"vjs-fluid")&&(rt.fluid=!0),nt!==null)try{Object.assign(rt,JSON.parse(nt||"{}"))}catch(st){log$1$1.error("data-setup",st)}if(Object.assign(tt,rt),_e.hasChildNodes()){const st=_e.childNodes;for(let dt=0,ft=st.length;dt<ft;dt++){const ht=st[dt],mt=ht.nodeName.toLowerCase();mt==="source"?tt.sources.push(getAttributes(ht)):mt==="track"&&tt.tracks.push(getAttributes(ht))}}return tt}debug(_e){if(_e===void 0)return this.debugEnabled_;_e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(_e){if(_e===void 0)return this.cache_.playbackRates;Array.isArray(_e)&&_e.every(tt=>typeof tt=="number")&&(this.cache_.playbackRates=_e,this.trigger("playbackrateschange"))}}Player.prototype.videoTracks=()=>{};Player.prototype.audioTracks=()=>{};Player.prototype.textTracks=()=>{};Player.prototype.remoteTextTracks=()=>{};Player.prototype.remoteTextTrackEls=()=>{};ALL.names.forEach(function(et){const _e=ALL[et];Player.prototype[_e.getterName]=function(){return this.tech_?this.tech_[_e.getterName]():(this[_e.privateName]=this[_e.privateName]||new _e.ListClass,this[_e.privateName])}});Player.prototype.crossorigin=Player.prototype.crossOrigin;Player.players={};const navigator$1=window$1.navigator;Player.prototype.options_={techOrder:Tech.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:navigator$1&&(navigator$1.languages&&navigator$1.languages[0]||navigator$1.userLanguage||navigator$1.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};TECH_EVENTS_RETRIGGER.forEach(function(et){Player.prototype[`handleTech${toTitleCase$1(et)}_`]=function(){return this.trigger(et)}});Component$1.registerComponent("Player",Player);const BASE_PLUGIN_NAME="plugin",PLUGIN_CACHE_KEY="activePlugins_",pluginStorage={},pluginExists=et=>pluginStorage.hasOwnProperty(et),getPlugin=et=>pluginExists(et)?pluginStorage[et]:void 0,markPluginAsActive=(et,_e)=>{et[PLUGIN_CACHE_KEY]=et[PLUGIN_CACHE_KEY]||{},et[PLUGIN_CACHE_KEY][_e]=!0},triggerSetupEvent=(et,_e,tt)=>{const rt=(tt?"before":"")+"pluginsetup";et.trigger(rt,_e),et.trigger(rt+":"+_e.name,_e)},createBasicPlugin=function(et,_e){const tt=function(){triggerSetupEvent(this,{name:et,plugin:_e,instance:null},!0);const rt=_e.apply(this,arguments);return markPluginAsActive(this,et),triggerSetupEvent(this,{name:et,plugin:_e,instance:rt}),rt};return Object.keys(_e).forEach(function(rt){tt[rt]=_e[rt]}),tt},createPluginFactory=(et,_e)=>(_e.prototype.name=et,function(...tt){triggerSetupEvent(this,{name:et,plugin:_e,instance:null},!0);const rt=new _e(this,...tt);return this[et]=()=>rt,triggerSetupEvent(this,rt.getEventHash()),rt});class Plugin{constructor(_e){if(this.constructor===Plugin)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=_e,this.log||(this.log=this.player.log.createLogger(this.name)),evented(this),delete this.trigger,stateful(this,this.constructor.defaultState),markPluginAsActive(_e,this.name),this.dispose=this.dispose.bind(this),_e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(_e={}){return _e.name=this.name,_e.plugin=this.constructor,_e.instance=this,_e}trigger(_e,tt={}){return trigger$1(this.eventBusEl_,_e,this.getEventHash(tt))}handleStateChanged(_e){}dispose(){const{name:_e,player:tt}=this;this.trigger("dispose"),this.off(),tt.off("dispose",this.dispose),tt[PLUGIN_CACHE_KEY][_e]=!1,this.player=this.state=null,tt[_e]=createPluginFactory(_e,pluginStorage[_e])}static isBasic(_e){const tt=typeof _e=="string"?getPlugin(_e):_e;return typeof tt=="function"&&!Plugin.prototype.isPrototypeOf(tt.prototype)}static registerPlugin(_e,tt){if(typeof _e!="string")throw new Error(`Illegal plugin name, "${_e}", must be a string, was ${typeof _e}.`);if(pluginExists(_e))log$1$1.warn(`A plugin named "${_e}" already exists. You may want to avoid re-registering plugins!`);else if(Player.prototype.hasOwnProperty(_e))throw new Error(`Illegal plugin name, "${_e}", cannot share a name with an existing player method!`);if(typeof tt!="function")throw new Error(`Illegal plugin for "${_e}", must be a function, was ${typeof tt}.`);return pluginStorage[_e]=tt,_e!==BASE_PLUGIN_NAME&&(Plugin.isBasic(tt)?Player.prototype[_e]=createBasicPlugin(_e,tt):Player.prototype[_e]=createPluginFactory(_e,tt)),tt}static deregisterPlugin(_e){if(_e===BASE_PLUGIN_NAME)throw new Error("Cannot de-register base plugin.");pluginExists(_e)&&(delete pluginStorage[_e],delete Player.prototype[_e])}static getPlugins(_e=Object.keys(pluginStorage)){let tt;return _e.forEach(rt=>{const nt=getPlugin(rt);nt&&(tt=tt||{},tt[rt]=nt)}),tt}static getPluginVersion(_e){const tt=getPlugin(_e);return tt&&tt.VERSION||""}}Plugin.getPlugin=getPlugin;Plugin.BASE_PLUGIN_NAME=BASE_PLUGIN_NAME;Plugin.registerPlugin(BASE_PLUGIN_NAME,Plugin);Player.prototype.usingPlugin=function(et){return!!this[PLUGIN_CACHE_KEY]&&this[PLUGIN_CACHE_KEY][et]===!0};Player.prototype.hasPlugin=function(et){return!!pluginExists(et)};function deprecate(et,_e){let tt=!1;return function(...rt){return tt||log$1$1.warn(et),tt=!0,_e.apply(this,rt)}}function deprecateForMajor(et,_e,tt,rt){return deprecate(`${_e} is deprecated and will be removed in ${et}.0; please use ${tt} instead.`,rt)}var VjsErrors={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const normalizeId=et=>et.indexOf("#")===0?et.slice(1):et;function videojs(et,_e,tt){let rt=videojs.getPlayer(et);if(rt)return _e&&log$1$1.warn(`Player "${et}" is already initialised. Options will not be applied.`),tt&&rt.ready(tt),rt;const nt=typeof et=="string"?$$1("#"+normalizeId(et)):et;if(!isEl(nt))throw new TypeError("The element or ID supplied is not valid. (videojs)");const dt=("getRootNode"in nt?nt.getRootNode()instanceof window$1.ShadowRoot:!1)?nt.getRootNode():nt.ownerDocument.body;(!nt.ownerDocument.defaultView||!dt.contains(nt))&&log$1$1.warn("The element supplied is not included in the DOM"),_e=_e||{},_e.restoreEl===!0&&(_e.restoreEl=(nt.parentNode&&nt.parentNode.hasAttribute&&nt.parentNode.hasAttribute("data-vjs-player")?nt.parentNode:nt).cloneNode(!0)),hooks("beforesetup").forEach(ht=>{const mt=ht(nt,merge$1(_e));if(!isObject$1(mt)||Array.isArray(mt)){log$1$1.error("please return an object in beforesetup hooks");return}_e=merge$1(_e,mt)});const ft=Component$1.getComponent("Player");return rt=new ft(nt,_e,tt),hooks("setup").forEach(ht=>ht(rt)),rt}videojs.hooks_=hooks_;videojs.hooks=hooks;videojs.hook=hook;videojs.hookOnce=hookOnce;videojs.removeHook=removeHook;if(window$1.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&isReal()){let et=$$1(".vjs-styles-defaults");if(!et){et=createStyleElement("vjs-styles-defaults");const _e=$$1("head");_e&&_e.insertBefore(et,_e.firstChild),setTextContent(et,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}autoSetupTimeout(1,videojs);videojs.VERSION=version$6;videojs.options=Player.prototype.options_;videojs.getPlayers=()=>Player.players;videojs.getPlayer=et=>{const _e=Player.players;let tt;if(typeof et=="string"){const rt=normalizeId(et),nt=_e[rt];if(nt)return nt;tt=$$1("#"+rt)}else tt=et;if(isEl(tt)){const{player:rt,playerId:nt}=tt;if(rt||_e[nt])return rt||_e[nt]}};videojs.getAllPlayers=()=>Object.keys(Player.players).map(et=>Player.players[et]).filter(Boolean);videojs.players=Player.players;videojs.getComponent=Component$1.getComponent;videojs.registerComponent=(et,_e)=>(Tech.isTech(_e)&&log$1$1.warn(`The ${et} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),Component$1.registerComponent.call(Component$1,et,_e));videojs.getTech=Tech.getTech;videojs.registerTech=Tech.registerTech;videojs.use=use;Object.defineProperty(videojs,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(videojs.middleware,"TERMINATOR",{value:TERMINATOR,writeable:!1,enumerable:!0});videojs.browser=browser;videojs.obj=Obj;videojs.mergeOptions=deprecateForMajor(9,"videojs.mergeOptions","videojs.obj.merge",merge$1);videojs.defineLazyProperty=deprecateForMajor(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",defineLazyProperty);videojs.bind=deprecateForMajor(9,"videojs.bind","native Function.prototype.bind",bind_);videojs.registerPlugin=Plugin.registerPlugin;videojs.deregisterPlugin=Plugin.deregisterPlugin;videojs.plugin=(et,_e)=>(log$1$1.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Plugin.registerPlugin(et,_e));videojs.getPlugins=Plugin.getPlugins;videojs.getPlugin=Plugin.getPlugin;videojs.getPluginVersion=Plugin.getPluginVersion;videojs.addLanguage=function(et,_e){return et=(""+et).toLowerCase(),videojs.options.languages=merge$1(videojs.options.languages,{[et]:_e}),videojs.options.languages[et]};videojs.log=log$1$1;videojs.createLogger=createLogger;videojs.time=Time;videojs.createTimeRange=deprecateForMajor(9,"videojs.createTimeRange","videojs.time.createTimeRanges",createTimeRanges$1);videojs.createTimeRanges=deprecateForMajor(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",createTimeRanges$1);videojs.formatTime=deprecateForMajor(9,"videojs.formatTime","videojs.time.formatTime",formatTime);videojs.setFormatTime=deprecateForMajor(9,"videojs.setFormatTime","videojs.time.setFormatTime",setFormatTime);videojs.resetFormatTime=deprecateForMajor(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",resetFormatTime);videojs.parseUrl=deprecateForMajor(9,"videojs.parseUrl","videojs.url.parseUrl",parseUrl);videojs.isCrossOrigin=deprecateForMajor(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",isCrossOrigin);videojs.EventTarget=EventTarget$2;videojs.any=any;videojs.on=on;videojs.one=one;videojs.off=off;videojs.trigger=trigger$1;videojs.xhr=XHR;videojs.TrackList=TrackList;videojs.TextTrack=TextTrack;videojs.TextTrackList=TextTrackList;videojs.AudioTrack=AudioTrack;videojs.AudioTrackList=AudioTrackList;videojs.VideoTrack=VideoTrack;videojs.VideoTrackList=VideoTrackList;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(et=>{videojs[et]=function(){return log$1$1.warn(`videojs.${et}() is deprecated; use videojs.dom.${et}() instead`),Dom[et].apply(null,arguments)}});videojs.computedStyle=deprecateForMajor(9,"videojs.computedStyle","videojs.dom.computedStyle",computedStyle);videojs.dom=Dom;videojs.fn=Fn;videojs.num=Num;videojs.str=Str;videojs.url=Url;videojs.Error=VjsErrors;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class QualityLevel{constructor(_e){let tt=this;return tt.id=_e.id,tt.label=tt.id,tt.width=_e.width,tt.height=_e.height,tt.bitrate=_e.bandwidth,tt.frameRate=_e.frameRate,tt.enabled_=_e.enabled,Object.defineProperty(tt,"enabled",{get(){return tt.enabled_()},set(rt){tt.enabled_(rt)}}),tt}}class QualityLevelList extends videojs.EventTarget{constructor(){super();let _e=this;return _e.levels_=[],_e.selectedIndex_=-1,Object.defineProperty(_e,"selectedIndex",{get(){return _e.selectedIndex_}}),Object.defineProperty(_e,"length",{get(){return _e.levels_.length}}),_e[Symbol.iterator]=()=>_e.levels_.values(),_e}addQualityLevel(_e){let tt=this.getQualityLevelById(_e.id);if(tt)return tt;const rt=this.levels_.length;return tt=new QualityLevel(_e),""+rt in this||Object.defineProperty(this,rt,{get(){return this.levels_[rt]}}),this.levels_.push(tt),this.trigger({qualityLevel:tt,type:"addqualitylevel"}),tt}removeQualityLevel(_e){let tt=null;for(let rt=0,nt=this.length;rt<nt;rt++)if(this[rt]===_e){tt=this.levels_.splice(rt,1)[0],this.selectedIndex_===rt?this.selectedIndex_=-1:this.selectedIndex_>rt&&this.selectedIndex_--;break}return tt&&this.trigger({qualityLevel:_e,type:"removequalitylevel"}),tt}getQualityLevelById(_e){for(let tt=0,rt=this.length;tt<rt;tt++){const nt=this[tt];if(nt.id===_e)return nt}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}QualityLevelList.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const et in QualityLevelList.prototype.allowedEvents_)QualityLevelList.prototype["on"+et]=null;var version$5="4.1.0";const initPlugin$1=function(et,_e){const tt=et.qualityLevels,rt=new QualityLevelList,nt=function(){rt.dispose(),et.qualityLevels=tt,et.off("dispose",nt)};return et.on("dispose",nt),et.qualityLevels=()=>rt,et.qualityLevels.VERSION=version$5,rt},qualityLevels=function(et){return initPlugin$1(this,videojs.obj.merge({},et))};videojs.registerPlugin("qualityLevels",qualityLevels);qualityLevels.VERSION=version$5;/*! @name @videojs/http-streaming @version 3.17.2 @license Apache-2.0 */const resolveUrl=resolveUrl$1,resolveManifestRedirect=(et,_e)=>_e&&_e.responseURL&&et!==_e.responseURL?_e.responseURL:et,logger$1=et=>videojs.log.debug?videojs.log.debug.bind(videojs,"VHS:",`${et} >`):function(){};function merge(...et){const _e=videojs.obj||videojs;return(_e.merge||_e.mergeOptions).apply(_e,et)}function createTimeRanges(...et){const _e=videojs.time||videojs;return(_e.createTimeRanges||_e.createTimeRanges).apply(_e,et)}function bufferedRangesToString(et){if(et.length===0)return"Buffered Ranges are empty";let _e=`Buffered Ranges:
`;for(let tt=0;tt<et.length;tt++){const rt=et.start(tt),nt=et.end(tt);_e+=`${rt} --> ${nt}. Duration (${nt-rt})
`}return _e}const TIME_FUDGE_FACTOR=1/30,SAFE_TIME_DELTA=TIME_FUDGE_FACTOR*3,filterRanges=function(et,_e){const tt=[];let rt;if(et&&et.length)for(rt=0;rt<et.length;rt++)_e(et.start(rt),et.end(rt))&&tt.push([et.start(rt),et.end(rt)]);return createTimeRanges(tt)},findRange=function(et,_e){return filterRanges(et,function(tt,rt){return tt-SAFE_TIME_DELTA<=_e&&rt+SAFE_TIME_DELTA>=_e})},findNextRange=function(et,_e){return filterRanges(et,function(tt){return tt-TIME_FUDGE_FACTOR>=_e})},findGaps=function(et){if(et.length<2)return createTimeRanges();const _e=[];for(let tt=1;tt<et.length;tt++){const rt=et.end(tt-1),nt=et.start(tt);_e.push([rt,nt])}return createTimeRanges(_e)},bufferIntersection=function(et,_e){let tt=null,rt=null,nt=0;const st=[],dt=[];if(!et||!et.length||!_e||!_e.length)return createTimeRanges();let ft=et.length;for(;ft--;)st.push({time:et.start(ft),type:"start"}),st.push({time:et.end(ft),type:"end"});for(ft=_e.length;ft--;)st.push({time:_e.start(ft),type:"start"}),st.push({time:_e.end(ft),type:"end"});for(st.sort(function(ht,mt){return ht.time-mt.time}),ft=0;ft<st.length;ft++)st[ft].type==="start"?(nt++,nt===2&&(tt=st[ft].time)):st[ft].type==="end"&&(nt--,nt===1&&(rt=st[ft].time)),tt!==null&&rt!==null&&(dt.push([tt,rt]),tt=null,rt=null);return createTimeRanges(dt)},printableRange=et=>{const _e=[];if(!et||!et.length)return"";for(let tt=0;tt<et.length;tt++)_e.push(et.start(tt)+" => "+et.end(tt));return _e.join(", ")},timeUntilRebuffer=function(et,_e,tt=1){return((et.length?et.end(et.length-1):0)-_e)/tt},timeRangesToArray=et=>{const _e=[];for(let tt=0;tt<et.length;tt++)_e.push({start:et.start(tt),end:et.end(tt)});return _e},isRangeDifferent=function(et,_e){if(et===_e)return!1;if(!et&&_e||!_e&&et||et.length!==_e.length)return!0;for(let tt=0;tt<et.length;tt++)if(et.start(tt)!==_e.start(tt)||et.end(tt)!==_e.end(tt))return!0;return!1},lastBufferedEnd=function(et){if(!(!et||!et.length||!et.end))return et.end(et.length-1)},timeAheadOf=function(et,_e){let tt=0;if(!et||!et.length)return tt;for(let rt=0;rt<et.length;rt++){const nt=et.start(rt),st=et.end(rt);if(!(_e>st)){if(_e>nt&&_e<=st){tt+=st-_e;continue}tt+=st-nt}}return tt},segmentDurationWithParts=(et,_e)=>{if(!_e.preload)return _e.duration;let tt=0;return(_e.parts||[]).forEach(function(rt){tt+=rt.duration}),(_e.preloadHints||[]).forEach(function(rt){rt.type==="PART"&&(tt+=et.partTargetDuration)}),tt},getPartsAndSegments=et=>(et.segments||[]).reduce((_e,tt,rt)=>(tt.parts?tt.parts.forEach(function(nt,st){_e.push({duration:nt.duration,segmentIndex:rt,partIndex:st,part:nt,segment:tt})}):_e.push({duration:tt.duration,segmentIndex:rt,partIndex:null,segment:tt,part:null}),_e),[]),getLastParts=et=>{const _e=et.segments&&et.segments.length&&et.segments[et.segments.length-1];return _e&&_e.parts||[]},getKnownPartCount=({preloadSegment:et})=>{if(!et)return;const{parts:_e,preloadHints:tt}=et;let rt=(tt||[]).reduce((nt,st)=>nt+(st.type==="PART"?1:0),0);return rt+=_e&&_e.length?_e.length:0,rt},liveEdgeDelay=(et,_e)=>{if(_e.endList)return 0;if(et&&et.suggestedPresentationDelay)return et.suggestedPresentationDelay;const tt=getLastParts(_e).length>0;return tt&&_e.serverControl&&_e.serverControl.partHoldBack?_e.serverControl.partHoldBack:tt&&_e.partTargetDuration?_e.partTargetDuration*3:_e.serverControl&&_e.serverControl.holdBack?_e.serverControl.holdBack:_e.targetDuration?_e.targetDuration*3:0},backwardDuration=function(et,_e){let tt=0,rt=_e-et.mediaSequence,nt=et.segments[rt];if(nt){if(typeof nt.start<"u")return{result:nt.start,precise:!0};if(typeof nt.end<"u")return{result:nt.end-nt.duration,precise:!0}}for(;rt--;){if(nt=et.segments[rt],typeof nt.end<"u")return{result:tt+nt.end,precise:!0};if(tt+=segmentDurationWithParts(et,nt),typeof nt.start<"u")return{result:tt+nt.start,precise:!0}}return{result:tt,precise:!1}},forwardDuration=function(et,_e){let tt=0,rt,nt=_e-et.mediaSequence;for(;nt<et.segments.length;nt++){if(rt=et.segments[nt],typeof rt.start<"u")return{result:rt.start-tt,precise:!0};if(tt+=segmentDurationWithParts(et,rt),typeof rt.end<"u")return{result:rt.end-tt,precise:!0}}return{result:-1,precise:!1}},intervalDuration=function(et,_e,tt){if(typeof _e>"u"&&(_e=et.mediaSequence+et.segments.length),_e<et.mediaSequence)return 0;const rt=backwardDuration(et,_e);if(rt.precise)return rt.result;const nt=forwardDuration(et,_e);return nt.precise?nt.result:rt.result+tt},duration=function(et,_e,tt){if(!et)return 0;if(typeof tt!="number"&&(tt=0),typeof _e>"u"){if(et.totalDuration)return et.totalDuration;if(!et.endList)return window$1.Infinity}return intervalDuration(et,_e,tt)},sumDurations=function({defaultDuration:et,durationList:_e,startIndex:tt,endIndex:rt}){let nt=0;if(tt>rt&&([tt,rt]=[rt,tt]),tt<0){for(let st=tt;st<Math.min(0,rt);st++)nt+=et;tt=0}for(let st=tt;st<rt;st++)nt+=_e[st].duration;return nt},playlistEnd=function(et,_e,tt,rt){if(!et||!et.segments)return null;if(et.endList)return duration(et);if(_e===null)return null;_e=_e||0;let nt=intervalDuration(et,et.mediaSequence+et.segments.length,_e);return tt&&(rt=typeof rt=="number"?rt:liveEdgeDelay(null,et),nt-=rt),Math.max(0,nt)},seekable=function(et,_e,tt){const nt=_e||0;let st=playlistEnd(et,_e,!0,tt);return st===null?createTimeRanges():(st<nt&&(st=nt),createTimeRanges(nt,st))},getMediaInfoForTime=function({playlist:et,currentTime:_e,startingSegmentIndex:tt,startingPartIndex:rt,startTime:nt,exactManifestTimings:st}){let dt=_e-nt;const ft=getPartsAndSegments(et);let ht=0;for(let mt=0;mt<ft.length;mt++){const bt=ft[mt];if(tt===bt.segmentIndex&&!(typeof rt=="number"&&typeof bt.partIndex=="number"&&rt!==bt.partIndex)){ht=mt;break}}if(dt<0){if(ht>0)for(let mt=ht-1;mt>=0;mt--){const bt=ft[mt];if(dt+=bt.duration,st){if(dt<0)continue}else if(dt+TIME_FUDGE_FACTOR<=0)continue;return{partIndex:bt.partIndex,segmentIndex:bt.segmentIndex,startTime:nt-sumDurations({defaultDuration:et.targetDuration,durationList:ft,startIndex:ht,endIndex:mt})}}return{partIndex:ft[0]&&ft[0].partIndex||null,segmentIndex:ft[0]&&ft[0].segmentIndex||0,startTime:_e}}if(ht<0){for(let mt=ht;mt<0;mt++)if(dt-=et.targetDuration,dt<0)return{partIndex:ft[0]&&ft[0].partIndex||null,segmentIndex:ft[0]&&ft[0].segmentIndex||0,startTime:_e};ht=0}for(let mt=ht;mt<ft.length;mt++){const bt=ft[mt];dt-=bt.duration;const St=bt.duration>TIME_FUDGE_FACTOR,Et=dt===0,Ct=St&&dt+TIME_FUDGE_FACTOR>=0;if(!((Et||Ct)&&mt!==ft.length-1)){if(st){if(dt>0)continue}else if(dt-TIME_FUDGE_FACTOR>=0)continue;return{partIndex:bt.partIndex,segmentIndex:bt.segmentIndex,startTime:nt+sumDurations({defaultDuration:et.targetDuration,durationList:ft,startIndex:ht,endIndex:mt})}}}return{segmentIndex:ft[ft.length-1].segmentIndex,partIndex:ft[ft.length-1].partIndex,startTime:_e}},isExcluded=function(et){return et.excludeUntil&&et.excludeUntil>Date.now()},isIncompatible=function(et){return et.excludeUntil&&et.excludeUntil===1/0},isEnabled=function(et){const _e=isExcluded(et);return!et.disabled&&!_e},isDisabled=function(et){return et.disabled},isAes=function(et){for(let _e=0;_e<et.segments.length;_e++)if(et.segments[_e].key)return!0;return!1},hasAttribute=function(et,_e){return _e.attributes&&_e.attributes[et]},estimateSegmentRequestTime=function(et,_e,tt,rt=0){return hasAttribute("BANDWIDTH",tt)?(et*tt.attributes.BANDWIDTH-rt*8)/_e:NaN},isLowestEnabledRendition=(et,_e)=>{if(et.playlists.length===1)return!0;const tt=_e.attributes.BANDWIDTH||Number.MAX_VALUE;return et.playlists.filter(rt=>isEnabled(rt)?(rt.attributes.BANDWIDTH||0)<tt:!1).length===0},playlistMatch=(et,_e)=>!et&&!_e||!et&&_e||et&&!_e?!1:!!(et===_e||et.id&&_e.id&&et.id===_e.id||et.resolvedUri&&_e.resolvedUri&&et.resolvedUri===_e.resolvedUri||et.uri&&_e.uri&&et.uri===_e.uri),someAudioVariant=function(et,_e){const tt=et&&et.mediaGroups&&et.mediaGroups.AUDIO||{};let rt=!1;for(const nt in tt){for(const st in tt[nt])if(rt=_e(tt[nt][st]),rt)break;if(rt)break}return!!rt},isAudioOnly=et=>{if(!et||!et.playlists||!et.playlists.length)return someAudioVariant(et,tt=>tt.playlists&&tt.playlists.length||tt.uri);for(let _e=0;_e<et.playlists.length;_e++){const tt=et.playlists[_e],rt=tt.attributes&&tt.attributes.CODECS;if(!(rt&&rt.split(",").every(st=>isAudioCodec(st))||someAudioVariant(et,st=>playlistMatch(tt,st))))return!1}return!0};var Playlist={liveEdgeDelay,duration,seekable,getMediaInfoForTime,isEnabled,isDisabled,isExcluded,isIncompatible,playlistEnd,isAes,hasAttribute,estimateSegmentRequestTime,isLowestEnabledRendition,isAudioOnly,playlistMatch,segmentDurationWithParts};const{log:log$2}=videojs,createPlaylistID=(et,_e)=>`${et}-${_e}`,groupID=(et,_e,tt)=>`placeholder-uri-${et}-${_e}-${tt}`,parseManifest=({onwarn:et,oninfo:_e,manifestString:tt,customTagParsers:rt=[],customTagMappers:nt=[],llhls:st})=>{const dt=new Parser;et&&dt.on("warn",et),_e&&dt.on("info",_e),rt.forEach(mt=>dt.addParser(mt)),nt.forEach(mt=>dt.addTagMapper(mt)),dt.push(tt),dt.end();const ft=dt.manifest;if(st||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(mt){ft.hasOwnProperty(mt)&&delete ft[mt]}),ft.segments&&ft.segments.forEach(function(mt){["parts","preloadHints"].forEach(function(bt){mt.hasOwnProperty(bt)&&delete mt[bt]})})),!ft.targetDuration){let mt=10;ft.segments&&ft.segments.length&&(mt=ft.segments.reduce((bt,St)=>Math.max(bt,St.duration),0)),et&&et({message:`manifest has no targetDuration defaulting to ${mt}`}),ft.targetDuration=mt}const ht=getLastParts(ft);if(ht.length&&!ft.partTargetDuration){const mt=ht.reduce((bt,St)=>Math.max(bt,St.duration),0);et&&(et({message:`manifest has no partTargetDuration defaulting to ${mt}`}),log$2.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),ft.partTargetDuration=mt}return ft},forEachMediaGroup=(et,_e)=>{et.mediaGroups&&["AUDIO","SUBTITLES"].forEach(tt=>{if(et.mediaGroups[tt])for(const rt in et.mediaGroups[tt])for(const nt in et.mediaGroups[tt][rt]){const st=et.mediaGroups[tt][rt][nt];_e(st,tt,rt,nt)}})},setupMediaPlaylist=({playlist:et,uri:_e,id:tt})=>{et.id=tt,et.playlistErrors_=0,_e&&(et.uri=_e),et.attributes=et.attributes||{}},setupMediaPlaylists=et=>{let _e=et.playlists.length;for(;_e--;){const tt=et.playlists[_e];setupMediaPlaylist({playlist:tt,id:createPlaylistID(_e,tt.uri)}),tt.resolvedUri=resolveUrl(et.uri,tt.uri),et.playlists[tt.id]=tt,et.playlists[tt.uri]=tt,tt.attributes.BANDWIDTH||log$2.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},resolveMediaGroupUris=et=>{forEachMediaGroup(et,_e=>{_e.uri&&(_e.resolvedUri=resolveUrl(et.uri,_e.uri))})},mainForMedia=(et,_e)=>{const tt=createPlaylistID(0,_e),rt={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window$1.location.href,resolvedUri:window$1.location.href,playlists:[{uri:_e,id:tt,resolvedUri:_e,attributes:{}}]};return rt.playlists[tt]=rt.playlists[0],rt.playlists[_e]=rt.playlists[0],rt},addPropertiesToMain=(et,_e,tt=groupID)=>{et.uri=_e;for(let nt=0;nt<et.playlists.length;nt++)if(!et.playlists[nt].uri){const st=`placeholder-uri-${nt}`;et.playlists[nt].uri=st}const rt=isAudioOnly(et);forEachMediaGroup(et,(nt,st,dt,ft)=>{if(!nt.playlists||!nt.playlists.length){if(rt&&st==="AUDIO"&&!nt.uri)for(let ht=0;ht<et.playlists.length;ht++){const mt=et.playlists[ht];if(mt.attributes&&mt.attributes.AUDIO&&mt.attributes.AUDIO===dt)return}nt.playlists=[_extends({},nt)]}nt.playlists.forEach(function(ht,mt){const bt=tt(st,dt,ft,ht),St=createPlaylistID(mt,bt);ht.uri?ht.resolvedUri=ht.resolvedUri||resolveUrl(et.uri,ht.uri):(ht.uri=mt===0?bt:St,ht.resolvedUri=ht.uri),ht.id=ht.id||St,ht.attributes=ht.attributes||{},et.playlists[ht.id]=ht,et.playlists[ht.uri]=ht})}),setupMediaPlaylists(et),resolveMediaGroupUris(et)};class DateRangesStorage{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(_e=[]){if(this.offset_!==null||!_e.length)return;const[tt]=_e;tt.programDateTime!==void 0&&(this.offset_=tt.programDateTime/1e3)}setPendingDateRanges(_e=[]){if(!_e.length)return;const[tt]=_e,rt=tt.startDate.getTime();this.trimProcessedDateRanges_(rt),this.pendingDateRanges_=_e.reduce((nt,st)=>(nt.set(st.id,st),nt),new Map)}processDateRange(_e){this.pendingDateRanges_.delete(_e.id),this.processedDateRanges_.set(_e.id,_e)}getDateRangesToProcess(){if(this.offset_===null)return[];const _e={},tt=[];this.pendingDateRanges_.forEach((rt,nt)=>{if(!this.processedDateRanges_.has(nt)&&(rt.startTime=rt.startDate.getTime()/1e3-this.offset_,rt.processDateRange=()=>this.processDateRange(rt),tt.push(rt),!!rt.class))if(_e[rt.class]){const st=_e[rt.class].push(rt);rt.classListIndex=st-1}else _e[rt.class]=[rt],rt.classListIndex=0});for(const rt of tt){const nt=_e[rt.class]||[];rt.endDate?rt.endTime=rt.endDate.getTime()/1e3-this.offset_:rt.endOnNext&&nt[rt.classListIndex+1]?rt.endTime=nt[rt.classListIndex+1].startTime:rt.duration?rt.endTime=rt.startTime+rt.duration:rt.plannedDuration?rt.endTime=rt.startTime+rt.plannedDuration:rt.endTime=rt.startTime}return tt}trimProcessedDateRanges_(_e){new Map(this.processedDateRanges_).forEach((rt,nt)=>{rt.startDate.getTime()<_e&&this.processedDateRanges_.delete(nt)})}}const QUOTA_EXCEEDED_ERR=22,getStreamingNetworkErrorMetadata=({requestType:et,request:_e,error:tt,parseFailure:rt})=>{const nt=_e.status<200||_e.status>299,st=_e.status>=400&&_e.status<=499,dt={uri:_e.uri,requestType:et},ft=nt&&!st||rt;if(tt&&st)dt.error=_extends({},tt),dt.errorType=videojs.Error.NetworkRequestFailed;else if(_e.aborted)dt.errorType=videojs.Error.NetworkRequestAborted;else if(_e.timedout)dt.errorType=videojs.Error.NetworkRequestTimeout;else if(ft){const ht=rt?videojs.Error.NetworkBodyParserFailed:videojs.Error.NetworkBadStatus;dt.errorType=ht,dt.status=_e.status,dt.headers=_e.headers}return dt},logFn$1=logger$1("CodecUtils"),getCodecs=function(et){const _e=et.attributes||{};if(_e.CODECS)return parseCodecs(_e.CODECS)},isMaat=(et,_e)=>{const tt=_e.attributes||{};return et&&et.mediaGroups&&et.mediaGroups.AUDIO&&tt.AUDIO&&et.mediaGroups.AUDIO[tt.AUDIO]},isMuxed=(et,_e)=>{if(!isMaat(et,_e))return!0;const tt=_e.attributes||{},rt=et.mediaGroups.AUDIO[tt.AUDIO];for(const nt in rt)if(!rt[nt].uri&&!rt[nt].playlists)return!0;return!1},unwrapCodecList=function(et){const _e={};return et.forEach(({mediaType:tt,type:rt,details:nt})=>{_e[tt]=_e[tt]||[],_e[tt].push(translateLegacyCodec(`${rt}${nt}`))}),Object.keys(_e).forEach(function(tt){if(_e[tt].length>1){logFn$1(`multiple ${tt} codecs found as attributes: ${_e[tt].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),_e[tt]=null;return}_e[tt]=_e[tt][0]}),_e},codecCount=function(et){let _e=0;return et.audio&&_e++,et.video&&_e++,_e},codecsForPlaylist=function(et,_e){const tt=_e.attributes||{},rt=unwrapCodecList(getCodecs(_e)||[]);if(isMaat(et,_e)&&!rt.audio&&!isMuxed(et,_e)){const nt=unwrapCodecList(codecsFromDefault(et,tt.AUDIO)||[]);nt.audio&&(rt.audio=nt.audio)}return rt},{EventTarget:EventTarget$1}=videojs,addLLHLSQueryDirectives=(et,_e)=>{if(_e.endList||!_e.serverControl)return et;const tt={};if(_e.serverControl.canBlockReload){const{preloadSegment:rt}=_e;let nt=_e.mediaSequence+_e.segments.length;if(rt){const st=rt.parts||[],dt=getKnownPartCount(_e)-1;dt>-1&&dt!==st.length-1&&(tt._HLS_part=dt),(dt>-1||st.length)&&nt--}tt._HLS_msn=nt}if(_e.serverControl&&_e.serverControl.canSkipUntil&&(tt._HLS_skip=_e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(tt).length){const rt=new window$1.URL(et);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(nt){tt.hasOwnProperty(nt)&&rt.searchParams.set(nt,tt[nt])}),et=rt.toString()}return et},updateSegment=(et,_e)=>{if(!et)return _e;const tt=merge(et,_e);if(et.preloadHints&&!_e.preloadHints&&delete tt.preloadHints,et.parts&&!_e.parts)delete tt.parts;else if(et.parts&&_e.parts)for(let rt=0;rt<_e.parts.length;rt++)et.parts&&et.parts[rt]&&(tt.parts[rt]=merge(et.parts[rt],_e.parts[rt]));return!et.skipped&&_e.skipped&&(tt.skipped=!1),et.preload&&!_e.preload&&(tt.preload=!1),tt},updateSegments=(et,_e,tt)=>{const rt=et.slice(),nt=_e.slice();tt=tt||0;const st=[];let dt;for(let ft=0;ft<nt.length;ft++){const ht=rt[ft+tt],mt=nt[ft];ht?(dt=ht.map||dt,st.push(updateSegment(ht,mt))):(dt&&!mt.map&&(mt.map=dt),st.push(mt))}return st},resolveSegmentUris=(et,_e)=>{!et.resolvedUri&&et.uri&&(et.resolvedUri=resolveUrl(_e,et.uri)),et.key&&!et.key.resolvedUri&&(et.key.resolvedUri=resolveUrl(_e,et.key.uri)),et.map&&!et.map.resolvedUri&&(et.map.resolvedUri=resolveUrl(_e,et.map.uri)),et.map&&et.map.key&&!et.map.key.resolvedUri&&(et.map.key.resolvedUri=resolveUrl(_e,et.map.key.uri)),et.parts&&et.parts.length&&et.parts.forEach(tt=>{tt.resolvedUri||(tt.resolvedUri=resolveUrl(_e,tt.uri))}),et.preloadHints&&et.preloadHints.length&&et.preloadHints.forEach(tt=>{tt.resolvedUri||(tt.resolvedUri=resolveUrl(_e,tt.uri))})},getAllSegments=function(et){const _e=et.segments||[],tt=et.preloadSegment;if(tt&&tt.parts&&tt.parts.length){if(tt.preloadHints){for(let rt=0;rt<tt.preloadHints.length;rt++)if(tt.preloadHints[rt].type==="MAP")return _e}tt.duration=et.targetDuration,tt.preload=!0,_e.push(tt)}return _e},isPlaylistUnchanged=(et,_e)=>et===_e||et.segments&&_e.segments&&et.segments.length===_e.segments.length&&et.endList===_e.endList&&et.mediaSequence===_e.mediaSequence&&et.preloadSegment===_e.preloadSegment,updateMain$1=(et,_e,tt=isPlaylistUnchanged)=>{const rt=merge(et,{}),nt=rt.playlists[_e.id];if(!nt||tt(nt,_e))return null;_e.segments=getAllSegments(_e);const st=merge(nt,_e);if(st.preloadSegment&&!_e.preloadSegment&&delete st.preloadSegment,nt.segments){if(_e.skip){_e.segments=_e.segments||[];for(let dt=0;dt<_e.skip.skippedSegments;dt++)_e.segments.unshift({skipped:!0})}st.segments=updateSegments(nt.segments,_e.segments,_e.mediaSequence-nt.mediaSequence)}st.segments.forEach(dt=>{resolveSegmentUris(dt,st.resolvedUri)});for(let dt=0;dt<rt.playlists.length;dt++)rt.playlists[dt].id===_e.id&&(rt.playlists[dt]=st);return rt.playlists[_e.id]=st,rt.playlists[_e.uri]=st,forEachMediaGroup(et,(dt,ft,ht,mt)=>{if(dt.playlists)for(let bt=0;bt<dt.playlists.length;bt++)_e.id===dt.playlists[bt].id&&(dt.playlists[bt]=st)}),rt},refreshDelay=(et,_e)=>{const tt=et.segments||[],rt=tt[tt.length-1],nt=rt&&rt.parts&&rt.parts[rt.parts.length-1],st=nt&&nt.duration||rt&&rt.duration;return _e&&st?st*1e3:(et.partTargetDuration||et.targetDuration||10)*500},playlistMetadataPayload=(et,_e,tt)=>{if(!et)return;const rt=[];return et.forEach(nt=>{if(!nt.attributes)return;const{BANDWIDTH:st,RESOLUTION:dt,CODECS:ft}=nt.attributes;rt.push({id:nt.id,bandwidth:st,resolution:dt,codecs:ft})}),{type:_e,isLive:tt,renditions:rt}};class PlaylistLoader extends EventTarget$1{constructor(_e,tt,rt={}){if(super(),!_e)throw new Error("A non-empty playlist URL or object is required");this.logger_=logger$1("PlaylistLoader");const{withCredentials:nt=!1}=rt;this.src=_e,this.vhs_=tt,this.withCredentials=nt,this.addDateRangesToTextTrack_=rt.addDateRangesToTextTrack;const st=tt.options_;this.customTagParsers=st&&st.customTagParsers||[],this.customTagMappers=st&&st.customTagMappers||[],this.llhls=st&&st.llhls,this.dateRangesStorage_=new DateRangesStorage,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const _e=this.media();if(!_e)return;this.dateRangesStorage_.setOffset(_e.segments),this.dateRangesStorage_.setPendingDateRanges(_e.dateRanges);const tt=this.dateRangesStorage_.getDateRangesToProcess();!tt.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(tt)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const _e=this.media();let tt=resolveUrl(this.main.uri,_e.uri);this.llhls&&(tt=addLLHLSQueryDirectives(tt,_e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:tt,withCredentials:this.withCredentials,requestType:"hls-playlist"},(rt,nt)=>{if(this.request){if(rt)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(_e,tt,rt){const{uri:nt,id:st}=tt;this.request=null,rt&&(this.state=rt),this.error={playlist:this.main.playlists[st],status:_e.status,message:`HLS playlist request error at URL: ${nt}.`,responseText:_e.responseText,code:_e.status>=500?4:2,metadata:getStreamingNetworkErrorMetadata({requestType:_e.requestType,request:_e,error:_e.error})},this.trigger("error")}parseManifest_({url:_e,manifestString:tt}){try{const rt=parseManifest({onwarn:({message:nt})=>this.logger_(`m3u8-parser warn for ${_e}: ${nt}`),oninfo:({message:nt})=>this.logger_(`m3u8-parser info for ${_e}: ${nt}`),manifestString:tt,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!rt.playlists||!rt.playlists.length||this.excludeAudioOnlyVariants(rt.playlists),rt}catch(rt){this.error=rt,this.error.metadata={errorType:videojs.Error.StreamingHlsPlaylistParserError,error:rt}}}excludeAudioOnlyVariants(_e){const tt=rt=>{const nt=rt.attributes||{},{width:st,height:dt}=nt.RESOLUTION||{};if(st&&dt)return!0;const ft=getCodecs(rt)||[];return!!unwrapCodecList(ft).video};_e.some(tt)&&_e.forEach(rt=>{tt(rt)||(rt.excludeUntil=1/0)})}haveMetadata({playlistString:_e,playlistObject:tt,url:rt,id:nt}){this.request=null,this.state="HAVE_METADATA";const st={playlistInfo:{type:"media",uri:rt}};this.trigger({type:"playlistparsestart",metadata:st});const dt=tt||this.parseManifest_({url:rt,manifestString:_e});dt.lastRequest=Date.now(),setupMediaPlaylist({playlist:dt,uri:rt,id:nt});const ft=updateMain$1(this.main,dt);this.targetDuration=dt.partTargetDuration||dt.targetDuration,this.pendingMedia_=null,ft?(this.main=ft,this.media_=this.main.playlists[nt]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(refreshDelay(this.media(),!!ft)),st.parsedPlaylist=playlistMetadataPayload(this.main.playlists,st.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:st}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),window$1.clearTimeout(this.mediaUpdateTimeout),window$1.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new DateRangesStorage,this.off()}stopRequest(){if(this.request){const _e=this.request;this.request=null,_e.onreadystatechange=null,_e.abort()}}media(_e,tt){if(!_e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof _e=="string"){if(!this.main.playlists[_e])throw new Error("Unknown playlist URI: "+_e);_e=this.main.playlists[_e]}if(window$1.clearTimeout(this.finalRenditionTimeout),tt){const ft=(_e.partTargetDuration||_e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=window$1.setTimeout(this.media.bind(this,_e,!1),ft);return}const rt=this.state,nt=!this.media_||_e.id!==this.media_.id,st=this.main.playlists[_e.id];if(st&&st.endList||_e.endList&&_e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=_e,nt&&(this.trigger("mediachanging"),rt==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(refreshDelay(_e,!0)),!nt)return;if(this.state="SWITCHING_MEDIA",this.request){if(_e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=_e;const dt={playlistInfo:{type:"media",uri:_e.uri}};this.trigger({type:"playlistrequeststart",metadata:dt}),this.request=this.vhs_.xhr({uri:_e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(ft,ht)=>{if(this.request){if(_e.lastRequest=Date.now(),_e.resolvedUri=resolveManifestRedirect(_e.resolvedUri,ht),ft)return this.playlistRequestError(this.request,_e,rt);this.trigger({type:"playlistrequestcomplete",metadata:dt}),this.haveMetadata({playlistString:ht.responseText,url:_e.uri,id:_e.id}),rt==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(_e){this.mediaUpdateTimeout&&(window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const tt=this.media();if(_e){const rt=tt?(tt.partTargetDuration||tt.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=window$1.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},rt);return}if(!this.started){this.start();return}tt&&!tt.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(_e){this.mediaUpdateTimeout&&(window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=window$1.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(_e)},_e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=window$1.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const _e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:_e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(tt,rt)=>{if(!this.request)return;if(this.request=null,tt)return this.error={status:rt.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:rt.responseText,code:2,metadata:getStreamingNetworkErrorMetadata({requestType:rt.requestType,request:rt,error:tt})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:_e}),this.src=resolveManifestRedirect(this.src,rt),this.trigger({type:"playlistparsestart",metadata:_e});const nt=this.parseManifest_({manifestString:rt.responseText,url:this.src});_e.parsedPlaylist=playlistMetadataPayload(nt.playlists,_e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:_e}),this.setupInitialPlaylist(nt)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(_e){if(this.state="HAVE_MAIN_MANIFEST",_e.playlists){this.main=_e,addPropertiesToMain(this.main,this.srcUri()),_e.playlists.forEach(rt=>{rt.segments=getAllSegments(rt),rt.segments.forEach(nt=>{resolveSegmentUris(nt,rt.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const tt=this.srcUri()||window$1.location.href;this.main=mainForMedia(_e,tt),this.haveMetadata({playlistObject:_e,url:tt,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(_e,tt){const rt=this.main,nt=_e.ID;let st=rt.playlists.length;for(;st--;){const dt=rt.playlists[st];if(dt.attributes["PATHWAY-ID"]===nt){const ft=dt.resolvedUri,ht=dt.id;if(tt){const mt=this.createCloneURI_(dt.resolvedUri,_e),bt=createPlaylistID(nt,mt),St=this.createCloneAttributes_(nt,dt.attributes),Et=this.createClonePlaylist_(dt,bt,_e,St);rt.playlists[st]=Et,rt.playlists[bt]=Et,rt.playlists[mt]=Et}else rt.playlists.splice(st,1);delete rt.playlists[ht],delete rt.playlists[ft]}}this.updateOrDeleteCloneMedia(_e,tt)}updateOrDeleteCloneMedia(_e,tt){const rt=this.main,nt=_e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(st=>{if(!(!rt.mediaGroups[st]||!rt.mediaGroups[st][nt])){for(const dt in rt.mediaGroups[st])if(dt===nt){for(const ft in rt.mediaGroups[st][dt])rt.mediaGroups[st][dt][ft].playlists.forEach((mt,bt)=>{const St=rt.playlists[mt.id],Et=St.id,Ct=St.resolvedUri;delete rt.playlists[Et],delete rt.playlists[Ct]});delete rt.mediaGroups[st][dt]}}}),tt&&this.createClonedMediaGroups_(_e)}addClonePathway(_e,tt={}){const rt=this.main,nt=rt.playlists.length,st=this.createCloneURI_(tt.resolvedUri,_e),dt=createPlaylistID(_e.ID,st),ft=this.createCloneAttributes_(_e.ID,tt.attributes),ht=this.createClonePlaylist_(tt,dt,_e,ft);rt.playlists[nt]=ht,rt.playlists[dt]=ht,rt.playlists[st]=ht,this.createClonedMediaGroups_(_e)}createClonedMediaGroups_(_e){const tt=_e.ID,rt=_e["BASE-ID"],nt=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(st=>{if(!(!nt.mediaGroups[st]||nt.mediaGroups[st][tt]))for(const dt in nt.mediaGroups[st]){if(dt===rt)nt.mediaGroups[st][tt]={};else continue;for(const ft in nt.mediaGroups[st][dt]){const ht=nt.mediaGroups[st][dt][ft];nt.mediaGroups[st][tt][ft]=_extends({},ht);const mt=nt.mediaGroups[st][tt][ft],bt=this.createCloneURI_(ht.resolvedUri,_e);mt.resolvedUri=bt,mt.uri=bt,mt.playlists=[],ht.playlists.forEach((St,Et)=>{const Ct=nt.playlists[St.id],Rt=groupID(st,tt,ft),Tt=createPlaylistID(tt,Rt);if(Ct&&!nt.playlists[Tt]){const wt=this.createClonePlaylist_(Ct,Tt,_e),At=wt.resolvedUri;nt.playlists[Tt]=wt,nt.playlists[At]=wt}mt.playlists[Et]=this.createClonePlaylist_(St,Tt,_e)})}}})}createClonePlaylist_(_e,tt,rt,nt){const st=this.createCloneURI_(_e.resolvedUri,rt),dt={resolvedUri:st,uri:st,id:tt};return _e.segments&&(dt.segments=[]),nt&&(dt.attributes=nt),merge(_e,dt)}createCloneURI_(_e,tt){const rt=new URL(_e);rt.hostname=tt["URI-REPLACEMENT"].HOST;const nt=tt["URI-REPLACEMENT"].PARAMS;for(const st of Object.keys(nt))rt.searchParams.set(st,nt[st]);return rt.href}createCloneAttributes_(_e,tt){const rt={"PATHWAY-ID":_e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(nt=>{tt[nt]&&(rt[nt]=_e)}),rt}getKeyIdSet(_e){const tt=new Set;if(!_e||!_e.contentProtection)return tt;for(const rt in _e.contentProtection)if(_e.contentProtection[rt]&&_e.contentProtection[rt].attributes&&_e.contentProtection[rt].attributes.keyId){const nt=_e.contentProtection[rt].attributes.keyId;tt.add(nt.toLowerCase())}return tt}}const callbackWrapper=function(et,_e,tt,rt){const nt=et.responseType==="arraybuffer"?et.response:et.responseText;!_e&&nt&&(et.responseTime=Date.now(),et.roundTripTime=et.responseTime-et.requestTime,et.bytesReceived=nt.byteLength||nt.length,et.bandwidth||(et.bandwidth=Math.floor(et.bytesReceived/et.roundTripTime*8*1e3))),tt.headers&&(et.responseHeaders=tt.headers),_e&&_e.code==="ETIMEDOUT"&&(et.timedout=!0),!_e&&!et.aborted&&tt.statusCode!==200&&tt.statusCode!==206&&tt.statusCode!==0&&(_e=new Error("XHR Failed with a response of: "+(et&&(nt||et.responseText)))),rt(_e,et)},callAllRequestHooks=(et,_e)=>{if(!et||!et.size)return;let tt=_e;return et.forEach(rt=>{tt=rt(tt)}),tt},callAllResponseHooks=(et,_e,tt,rt)=>{!et||!et.size||et.forEach(nt=>{nt(_e,tt,rt)})},xhrFactory=function(){const et=function _e(tt,rt){tt=merge({timeout:45e3},tt);const nt=_e.beforeRequest||videojs.Vhs.xhr.beforeRequest,st=_e._requestCallbackSet||videojs.Vhs.xhr._requestCallbackSet||new Set,dt=_e._responseCallbackSet||videojs.Vhs.xhr._responseCallbackSet;nt&&typeof nt=="function"&&(videojs.log.warn("beforeRequest is deprecated, use onRequest instead."),st.add(nt));const ft=videojs.Vhs.xhr.original===!0?videojs.xhr:videojs.Vhs.xhr,ht=callAllRequestHooks(st,tt);st.delete(nt);const mt=ft(ht||tt,function(St,Et){return callAllResponseHooks(dt,mt,St,Et),callbackWrapper(mt,St,Et,rt)}),bt=mt.abort;return mt.abort=function(){return mt.aborted=!0,bt.apply(mt,arguments)},mt.uri=tt.uri,mt.requestType=tt.requestType,mt.requestTime=Date.now(),mt};return et.original=!0,et},byterangeStr=function(et){let _e;const tt=et.offset;return typeof et.offset=="bigint"||typeof et.length=="bigint"?_e=window$1.BigInt(et.offset)+window$1.BigInt(et.length)-window$1.BigInt(1):_e=et.offset+et.length-1,"bytes="+tt+"-"+_e},segmentXhrHeaders=function(et){const _e={};return et.byterange&&(_e.Range=byterangeStr(et.byterange)),_e},textRange=function(et,_e){return et.start(_e)+"-"+et.end(_e)},formatHexString=function(et,_e){const tt=et.toString(16);return"00".substring(0,2-tt.length)+tt+(_e%2?" ":"")},formatAsciiString=function(et){return et>=32&&et<126?String.fromCharCode(et):"."},createTransferableMessage=function(et){const _e={};return Object.keys(et).forEach(tt=>{const rt=et[tt];isArrayBufferView(rt)?_e[tt]={bytes:rt.buffer,byteOffset:rt.byteOffset,byteLength:rt.byteLength}:_e[tt]=rt}),_e},initSegmentId=function(et){const _e=et.byterange||{length:1/0,offset:0};return[_e.length,_e.offset,et.resolvedUri].join(",")},segmentKeyId=function(et){return et.resolvedUri},hexDump=et=>{const _e=Array.prototype.slice.call(et),tt=16;let rt="",nt,st;for(let dt=0;dt<_e.length/tt;dt++)nt=_e.slice(dt*tt,dt*tt+tt).map(formatHexString).join(""),st=_e.slice(dt*tt,dt*tt+tt).map(formatAsciiString).join(""),rt+=nt+" "+st+`
`;return rt},tagDump=({bytes:et})=>hexDump(et),textRanges=et=>{let _e="",tt;for(tt=0;tt<et.length;tt++)_e+=textRange(et,tt)+" ";return _e};var utils=Object.freeze({__proto__:null,createTransferableMessage,initSegmentId,segmentKeyId,hexDump,tagDump,textRanges});const SEGMENT_END_FUDGE_PERCENT=.25,playerTimeToProgramTime=(et,_e)=>{if(!_e.dateTimeObject)return null;const tt=_e.videoTimingInfo.transmuxerPrependedSeconds,nt=_e.videoTimingInfo.transmuxedPresentationStart+tt,st=et-nt;return new Date(_e.dateTimeObject.getTime()+st*1e3)},originalSegmentVideoDuration=et=>et.transmuxedPresentationEnd-et.transmuxedPresentationStart-et.transmuxerPrependedSeconds,findSegmentForProgramTime=(et,_e)=>{let tt;try{tt=new Date(et)}catch{return null}if(!_e||!_e.segments||_e.segments.length===0)return null;let rt=_e.segments[0];if(tt<new Date(rt.dateTimeObject))return null;for(let ht=0;ht<_e.segments.length-1;ht++){rt=_e.segments[ht];const mt=new Date(_e.segments[ht+1].dateTimeObject);if(tt<mt)break}const nt=_e.segments[_e.segments.length-1],st=nt.dateTimeObject,dt=nt.videoTimingInfo?originalSegmentVideoDuration(nt.videoTimingInfo):nt.duration+nt.duration*SEGMENT_END_FUDGE_PERCENT,ft=new Date(st.getTime()+dt*1e3);return tt>ft?null:(tt>new Date(st)&&(rt=nt),{segment:rt,estimatedStart:rt.videoTimingInfo?rt.videoTimingInfo.transmuxedPresentationStart:Playlist.duration(_e,_e.mediaSequence+_e.segments.indexOf(rt)),type:rt.videoTimingInfo?"accurate":"estimate"})},findSegmentForPlayerTime=(et,_e)=>{if(!_e||!_e.segments||_e.segments.length===0)return null;let tt=0,rt;for(let st=0;st<_e.segments.length&&(rt=_e.segments[st],tt=rt.videoTimingInfo?rt.videoTimingInfo.transmuxedPresentationEnd:tt+rt.duration,!(et<=tt));st++);const nt=_e.segments[_e.segments.length-1];if(nt.videoTimingInfo&&nt.videoTimingInfo.transmuxedPresentationEnd<et)return null;if(et>tt){if(et>tt+nt.duration*SEGMENT_END_FUDGE_PERCENT)return null;rt=nt}return{segment:rt,estimatedStart:rt.videoTimingInfo?rt.videoTimingInfo.transmuxedPresentationStart:tt-rt.duration,type:rt.videoTimingInfo?"accurate":"estimate"}},getOffsetFromTimestamp=(et,_e)=>{let tt,rt;try{tt=new Date(et),rt=new Date(_e)}catch{}const nt=tt.getTime();return(rt.getTime()-nt)/1e3},verifyProgramDateTimeTags=et=>{if(!et.segments||et.segments.length===0)return!1;for(let _e=0;_e<et.segments.length;_e++)if(!et.segments[_e].dateTimeObject)return!1;return!0},getProgramTime=({playlist:et,time:_e=void 0,callback:tt})=>{if(!tt)throw new Error("getProgramTime: callback must be provided");if(!et||_e===void 0)return tt({message:"getProgramTime: playlist and time must be provided"});const rt=findSegmentForPlayerTime(_e,et);if(!rt)return tt({message:"valid programTime was not found"});if(rt.type==="estimate")return tt({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:rt.estimatedStart});const nt={mediaSeconds:_e},st=playerTimeToProgramTime(_e,rt.segment);return st&&(nt.programDateTime=st.toISOString()),tt(null,nt)},seekToProgramTime=({programTime:et,playlist:_e,retryCount:tt=2,seekTo:rt,pauseAfterSeek:nt=!0,tech:st,callback:dt})=>{if(!dt)throw new Error("seekToProgramTime: callback must be provided");if(typeof et>"u"||!_e||!rt)return dt({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!_e.endList&&!st.hasStarted_)return dt({message:"player must be playing a live stream to start buffering"});if(!verifyProgramDateTimeTags(_e))return dt({message:"programDateTime tags must be provided in the manifest "+_e.resolvedUri});const ft=findSegmentForProgramTime(et,_e);if(!ft)return dt({message:`${et} was not found in the stream`});const ht=ft.segment,mt=getOffsetFromTimestamp(ht.dateTimeObject,et);if(ft.type==="estimate"){if(tt===0)return dt({message:`${et} is not buffered yet. Try again`});rt(ft.estimatedStart+mt),st.one("seeked",()=>{seekToProgramTime({programTime:et,playlist:_e,retryCount:tt-1,seekTo:rt,pauseAfterSeek:nt,tech:st,callback:dt})});return}const bt=ht.start+mt,St=()=>dt(null,st.currentTime());st.one("seeked",St),nt&&st.pause(),rt(bt)},callbackOnCompleted=(et,_e)=>{if(et.readyState===4)return _e()},containerRequest=(et,_e,tt,rt)=>{let nt=[],st,dt=!1;const ft=function(St,Et,Ct,Rt){return Et.abort(),dt=!0,tt(St,Et,Ct,Rt)},ht=function(St,Et){if(dt)return;if(St)return St.metadata=getStreamingNetworkErrorMetadata({requestType:rt,request:Et,error:St}),ft(St,Et,"",nt);const Ct=Et.responseText.substring(nt&&nt.byteLength||0,Et.responseText.length);if(nt=concatTypedArrays(nt,stringToBytes(Ct,!0)),st=st||getId3Offset(nt),nt.length<10||st&&nt.length<st+2)return callbackOnCompleted(Et,()=>ft(St,Et,"",nt));const Rt=detectContainerForBytes(nt);return Rt==="ts"&&nt.length<188?callbackOnCompleted(Et,()=>ft(St,Et,"",nt)):!Rt&&nt.length<376?callbackOnCompleted(Et,()=>ft(St,Et,"",nt)):ft(null,Et,Rt,nt)},bt=_e({uri:et,beforeSend(St){St.overrideMimeType("text/plain; charset=x-user-defined"),St.addEventListener("progress",function({total:Et,loaded:Ct}){return callbackWrapper(St,null,{statusCode:St.status},ht)})}},function(St,Et){return callbackWrapper(bt,St,Et,ht)});return bt},{EventTarget}=videojs,dashPlaylistUnchanged=function(et,_e){if(!isPlaylistUnchanged(et,_e)||et.sidx&&_e.sidx&&(et.sidx.offset!==_e.sidx.offset||et.sidx.length!==_e.sidx.length))return!1;if(!et.sidx&&_e.sidx||et.sidx&&!_e.sidx||et.segments&&!_e.segments||!et.segments&&_e.segments)return!1;if(!et.segments&&!_e.segments)return!0;for(let tt=0;tt<et.segments.length;tt++){const rt=et.segments[tt],nt=_e.segments[tt];if(rt.uri!==nt.uri)return!1;if(!rt.byterange&&!nt.byterange)continue;const st=rt.byterange,dt=nt.byterange;if(st&&!dt||!st&&dt||st.offset!==dt.offset||st.length!==dt.length)return!1}return!0},dashGroupId=(et,_e,tt,rt)=>{const nt=rt.attributes.NAME||tt;return`placeholder-uri-${et}-${_e}-${nt}`},parseMainXml=({mainXml:et,srcUrl:_e,clientOffset:tt,sidxMapping:rt,previousManifest:nt})=>{const st=parse(et,{manifestUri:_e,clientOffset:tt,sidxMapping:rt,previousManifest:nt});return addPropertiesToMain(st,_e,dashGroupId),st},removeOldMediaGroupLabels=(et,_e)=>{forEachMediaGroup(et,(tt,rt,nt,st)=>{(!_e.mediaGroups[rt][nt]||!(st in _e.mediaGroups[rt][nt]))&&delete et.mediaGroups[rt][nt][st]})},updateMain=(et,_e,tt)=>{let rt=!0,nt=merge(et,{duration:_e.duration,minimumUpdatePeriod:_e.minimumUpdatePeriod,timelineStarts:_e.timelineStarts});for(let st=0;st<_e.playlists.length;st++){const dt=_e.playlists[st];if(dt.sidx){const ht=generateSidxKey(dt.sidx);tt&&tt[ht]&&tt[ht].sidx&&addSidxSegmentsToPlaylist$1(dt,tt[ht].sidx,dt.sidx.resolvedUri)}const ft=updateMain$1(nt,dt,dashPlaylistUnchanged);ft&&(nt=ft,rt=!1)}return forEachMediaGroup(_e,(st,dt,ft,ht)=>{if(st.playlists&&st.playlists.length){const mt=st.playlists[0].id,bt=updateMain$1(nt,st.playlists[0],dashPlaylistUnchanged);bt&&(nt=bt,ht in nt.mediaGroups[dt][ft]||(nt.mediaGroups[dt][ft][ht]=st),nt.mediaGroups[dt][ft][ht].playlists[0]=nt.playlists[mt],rt=!1)}}),removeOldMediaGroupLabels(nt,_e),_e.minimumUpdatePeriod!==et.minimumUpdatePeriod&&(rt=!1),rt?null:nt},equivalentSidx=(et,_e)=>(!et.map&&!_e.map||!!(et.map&&_e.map&&et.map.byterange.offset===_e.map.byterange.offset&&et.map.byterange.length===_e.map.byterange.length))&&et.uri===_e.uri&&et.byterange.offset===_e.byterange.offset&&et.byterange.length===_e.byterange.length,compareSidxEntry=(et,_e)=>{const tt={};for(const rt in et){const st=et[rt].sidx;if(st){const dt=generateSidxKey(st);if(!_e[dt])break;const ft=_e[dt].sidxInfo;equivalentSidx(ft,st)&&(tt[dt]=_e[dt])}}return tt},filterChangedSidxMappings=(et,_e)=>{let rt=compareSidxEntry(et.playlists,_e);return forEachMediaGroup(et,(nt,st,dt,ft)=>{if(nt.playlists&&nt.playlists.length){const ht=nt.playlists;rt=merge(rt,compareSidxEntry(ht,_e))}}),rt};class DashPlaylistLoader extends EventTarget{constructor(_e,tt,rt={},nt){super(),this.isPaused_=!0,this.mainPlaylistLoader_=nt||this,nt||(this.isMain_=!0);const{withCredentials:st=!1}=rt;if(this.vhs_=tt,this.withCredentials=st,this.addMetadataToTextTrack=rt.addMetadataToTextTrack,!_e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=logger$1("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=_e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=_e}get isPaused(){return this.isPaused_}requestErrored_(_e,tt,rt){if(!this.request)return!0;if(this.request=null,_e)return this.error=typeof _e=="object"&&!(_e instanceof Error)?_e:{status:tt.status,message:"DASH request error at URL: "+tt.uri,response:tt.response,code:2,metadata:_e.metadata},rt&&(this.state=rt),this.trigger("error"),!0}addSidxSegments_(_e,tt,rt){const nt=_e.sidx&&generateSidxKey(_e.sidx);if(!_e.sidx||!nt||this.mainPlaylistLoader_.sidxMapping_[nt]){window$1.clearTimeout(this.mediaRequest_),this.mediaRequest_=window$1.setTimeout(()=>rt(!1),0);return}const st=resolveManifestRedirect(_e.sidx.resolvedUri),dt=(ht,mt)=>{if(this.requestErrored_(ht,mt,tt))return;const bt=this.mainPlaylistLoader_.sidxMapping_,{requestType:St}=mt;let Et;try{Et=parseSidx(toUint8(mt.response).subarray(8))}catch(Ct){Ct.metadata=getStreamingNetworkErrorMetadata({requestType:St,request:mt,parseFailure:!0}),this.requestErrored_(Ct,mt,tt);return}return bt[nt]={sidxInfo:_e.sidx,sidx:Et},addSidxSegmentsToPlaylist$1(_e,Et,_e.sidx.resolvedUri),rt(!0)},ft="dash-sidx";this.request=containerRequest(st,this.vhs_.xhr,(ht,mt,bt,St)=>{if(ht)return dt(ht,mt);if(!bt||bt!=="mp4"){const Rt=bt||"unknown";return dt({status:mt.status,message:`Unsupported ${Rt} container type for sidx segment at URL: ${st}`,response:"",playlist:_e,internal:!0,playlistExclusionDuration:1/0,code:2},mt)}const{offset:Et,length:Ct}=_e.sidx.byterange;if(St.length>=Ct+Et)return dt(ht,{response:St.subarray(Et,Et+Ct),status:mt.status,uri:mt.uri});this.request=this.vhs_.xhr({uri:st,responseType:"arraybuffer",requestType:"dash-sidx",headers:segmentXhrHeaders({byterange:_e.sidx.byterange})},dt)},ft)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window$1.clearTimeout(this.minimumUpdatePeriodTimeout_),window$1.clearTimeout(this.mediaRequest_),window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const _e=this.request;this.request=null,_e.onreadystatechange=null,_e.abort()}}media(_e){if(!_e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const tt=this.state;if(typeof _e=="string"){if(!this.mainPlaylistLoader_.main.playlists[_e])throw new Error("Unknown playlist URI: "+_e);_e=this.mainPlaylistLoader_.main.playlists[_e]}const rt=!this.media_||_e.id!==this.media_.id;if(rt&&this.loadedPlaylists_[_e.id]&&this.loadedPlaylists_[_e.id].endList){this.state="HAVE_METADATA",this.media_=_e,rt&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}rt&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(_e,tt,nt=>{this.haveMetadata({startingState:tt,playlist:_e})}))}haveMetadata({startingState:_e,playlist:tt}){this.state="HAVE_METADATA",this.loadedPlaylists_[tt.id]=tt,window$1.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(tt.id),_e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(window$1.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(_e){this.isPaused_=!1,window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const tt=this.media();if(_e){const rt=tt?tt.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=window$1.setTimeout(()=>this.load(),rt);return}if(!this.started){this.start();return}tt&&!tt.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){window$1.clearTimeout(this.mediaRequest_),this.mediaRequest_=window$1.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((_e,tt)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(_e){const tt={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:tt}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(rt,nt)=>{if(rt){const{requestType:dt}=nt;rt.metadata=getStreamingNetworkErrorMetadata({requestType:dt,request:nt,error:rt})}if(this.requestErrored_(rt,nt)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:tt});const st=nt.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=nt.responseText,nt.responseHeaders&&nt.responseHeaders.date?this.mainLoaded_=Date.parse(nt.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=resolveManifestRedirect(this.mainPlaylistLoader_.srcUrl,nt),st){this.handleMain_(),this.syncClientServerClock_(()=>_e(nt,st));return}return _e(nt,st)})}syncClientServerClock_(_e){const tt=parseUTCTiming(this.mainPlaylistLoader_.mainXml_);if(tt===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),_e();if(tt.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=tt.value-Date.now(),_e();this.request=this.vhs_.xhr({uri:resolveUrl(this.mainPlaylistLoader_.srcUrl,tt.value),method:tt.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(rt,nt)=>{if(!this.request)return;if(rt){const{requestType:dt}=nt;return this.error.metadata=getStreamingNetworkErrorMetadata({requestType:dt,request:nt,error:rt}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),_e()}let st;tt.method==="HEAD"?!nt.responseHeaders||!nt.responseHeaders.date?st=this.mainLoaded_:st=Date.parse(nt.responseHeaders.date):st=Date.parse(nt.responseText),this.mainPlaylistLoader_.clientOffset_=st-Date.now(),_e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){window$1.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const _e=this.mainPlaylistLoader_.main,tt={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:tt});let rt;try{rt=parseMainXml({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:_e})}catch(st){this.error=st,this.error.metadata={errorType:videojs.Error.StreamingDashManifestParserError,error:st},this.trigger("error")}_e&&(rt=updateMain(_e,rt,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=rt||_e;const nt=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(nt&&nt!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=nt),(!_e||rt&&rt.minimumUpdatePeriod!==_e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(rt),rt){const{duration:st,endList:dt}=rt,ft=[];rt.playlists.forEach(mt=>{ft.push({id:mt.id,bandwidth:mt.attributes.BANDWIDTH,resolution:mt.attributes.RESOLUTION,codecs:mt.attributes.CODECS})});const ht={duration:st,isLive:!dt,renditions:ft};tt.parsedManifest=ht,this.trigger({type:"manifestparsecomplete",metadata:tt})}return!!rt}updateMinimumUpdatePeriodTimeout_(){const _e=this.mainPlaylistLoader_;_e.createMupOnMedia_&&(_e.off("loadedmetadata",_e.createMupOnMedia_),_e.createMupOnMedia_=null),_e.minimumUpdatePeriodTimeout_&&(window$1.clearTimeout(_e.minimumUpdatePeriodTimeout_),_e.minimumUpdatePeriodTimeout_=null);let tt=_e.main&&_e.main.minimumUpdatePeriod;if(tt===0&&(_e.media()?tt=_e.media().targetDuration*1e3:(_e.createMupOnMedia_=_e.updateMinimumUpdatePeriodTimeout_,_e.one("loadedmetadata",_e.createMupOnMedia_))),typeof tt!="number"||tt<=0){tt<0&&this.logger_(`found invalid minimumUpdatePeriod of ${tt}, not setting a timeout`);return}this.createMUPTimeout_(tt)}createMUPTimeout_(_e){const tt=this.mainPlaylistLoader_;tt.minimumUpdatePeriodTimeout_=window$1.setTimeout(()=>{tt.minimumUpdatePeriodTimeout_=null,tt.trigger("minimumUpdatePeriod"),tt.createMUPTimeout_(_e)},_e)}refreshXml_(){this.requestMain_((_e,tt)=>{tt&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=filterChangedSidxMappings(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,rt=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(_e){if(!_e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const tt=this.mainPlaylistLoader_.main.playlists,rt=!this.media_||this.media_!==tt[_e];if(rt?this.media_=tt[_e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const nt=()=>{this.media().endList||(this.mediaUpdateTimeout=window$1.setTimeout(()=>{this.trigger("mediaupdatetimeout"),nt()},refreshDelay(this.media(),!!rt)))};nt()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(_e){if(_e&&this.mainPlaylistLoader_.main.eventStream){const tt=this.mainPlaylistLoader_.main.eventStream.map(rt=>({cueTime:rt.start,frames:[{data:rt.messageData}]}));this.addMetadataToTextTrack("EventStream",tt,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(_e){if(_e.contentProtection){const tt=new Set;for(const rt in _e.contentProtection){const nt=_e.contentProtection[rt].attributes["cenc:default_KID"];nt&&tt.add(nt.replace(/-/g,"").toLowerCase())}return tt}}}var Config={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const stringToArrayBuffer=et=>{const _e=new Uint8Array(new ArrayBuffer(et.length));for(let tt=0;tt<et.length;tt++)_e[tt]=et.charCodeAt(tt);return _e.buffer},browserWorkerPolyFill=function(et){return et.on=et.addEventListener,et.off=et.removeEventListener,et},createObjectURL=function(et){try{return URL.createObjectURL(new Blob([et],{type:"application/javascript"}))}catch{const tt=new BlobBuilder;return tt.append(et),URL.createObjectURL(tt.getBlob())}},factory=function(et){return function(){const _e=createObjectURL(et),tt=browserWorkerPolyFill(new Worker(_e));tt.objURL=_e;const rt=tt.terminate;return tt.on=tt.addEventListener,tt.off=tt.removeEventListener,tt.terminate=function(){return URL.revokeObjectURL(_e),rt.call(this)},tt}},transform=function(et){return`var browserWorkerPolyFill = ${browserWorkerPolyFill.toString()};
browserWorkerPolyFill(self);
`+et},getWorkerString=function(et){return et.toString().replace(/^function.+?{/,"").slice(0,-1)},workerCode$1=transform(getWorkerString(function(){var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_e=function(){this.init=function(){var Tr={};this.on=function(br,zr){Tr[br]||(Tr[br]=[]),Tr[br]=Tr[br].concat(zr)},this.off=function(br,zr){var $r;return Tr[br]?($r=Tr[br].indexOf(zr),Tr[br]=Tr[br].slice(),Tr[br].splice($r,1),$r>-1):!1},this.trigger=function(br){var zr,$r,an,yn;if(zr=Tr[br],!!zr)if(arguments.length===2)for(an=zr.length,$r=0;$r<an;++$r)zr[$r].call(this,arguments[1]);else{for(yn=[],$r=arguments.length,$r=1;$r<arguments.length;++$r)yn.push(arguments[$r]);for(an=zr.length,$r=0;$r<an;++$r)zr[$r].apply(this,yn)}},this.dispose=function(){Tr={}}}};_e.prototype.pipe=function(Tr){return this.on("data",function(br){Tr.push(br)}),this.on("done",function(br){Tr.flush(br)}),this.on("partialdone",function(br){Tr.partialFlush(br)}),this.on("endedtimeline",function(br){Tr.endTimeline(br)}),this.on("reset",function(br){Tr.reset(br)}),Tr},_e.prototype.push=function(Tr){this.trigger("data",Tr)},_e.prototype.flush=function(Tr){this.trigger("done",Tr)},_e.prototype.partialFlush=function(Tr){this.trigger("partialdone",Tr)},_e.prototype.endTimeline=function(Tr){this.trigger("endedtimeline",Tr)},_e.prototype.reset=function(Tr){this.trigger("reset",Tr)};var tt=_e,rt=Math.pow(2,32),nt=function(Tr){var br=new DataView(Tr.buffer,Tr.byteOffset,Tr.byteLength),zr;return br.getBigUint64?(zr=br.getBigUint64(0),zr<Number.MAX_SAFE_INTEGER?Number(zr):zr):br.getUint32(0)*rt+br.getUint32(4)},st={getUint64:nt,MAX_UINT32:rt},dt=st.MAX_UINT32,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt,Pt,It,Ft,qt,Vt,Kt,jt,Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr,Mr,Nr,Yr;(function(){var Tr;if(Bt={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(Tr in Bt)Bt.hasOwnProperty(Tr)&&(Bt[Tr]=[Tr.charCodeAt(0),Tr.charCodeAt(1),Tr.charCodeAt(2),Tr.charCodeAt(3)]);tr=new Uint8Array([105,115,111,109]),ar=new Uint8Array([97,118,99,49]),Jt=new Uint8Array([0,0,0,1]),pr=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),cr=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),gr={video:pr,audio:cr},Vr=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Er=new Uint8Array([0,0,0,0,0,0,0,0]),Wr=new Uint8Array([0,0,0,0,0,0,0,0]),Mr=Wr,Nr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Yr=Wr,Sr=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),ft=function(Tr){var br=[],zr=0,$r,an,yn;for($r=1;$r<arguments.length;$r++)br.push(arguments[$r]);for($r=br.length;$r--;)zr+=br[$r].byteLength;for(an=new Uint8Array(zr+8),yn=new DataView(an.buffer,an.byteOffset,an.byteLength),yn.setUint32(0,an.byteLength),an.set(Tr,4),$r=0,zr=8;$r<br.length;$r++)an.set(br[$r],zr),zr+=br[$r].byteLength;return an},ht=function(){return ft(Bt.dinf,ft(Bt.dref,Vr))},mt=function(Tr){return ft(Bt.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,Tr.audioobjecttype<<3|Tr.samplingfrequencyindex>>>1,Tr.samplingfrequencyindex<<7|Tr.channelcount<<3,6,1,2]))},bt=function(){return ft(Bt.ftyp,tr,Jt,tr,ar)},qt=function(Tr){return ft(Bt.hdlr,gr[Tr])},St=function(Tr){return ft(Bt.mdat,Tr)},Ft=function(Tr){var br=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,Tr.duration>>>24&255,Tr.duration>>>16&255,Tr.duration>>>8&255,Tr.duration&255,85,196,0,0]);return Tr.samplerate&&(br[12]=Tr.samplerate>>>24&255,br[13]=Tr.samplerate>>>16&255,br[14]=Tr.samplerate>>>8&255,br[15]=Tr.samplerate&255),ft(Bt.mdhd,br)},It=function(Tr){return ft(Bt.mdia,Ft(Tr),qt(Tr.type),Ct(Tr))},Et=function(Tr){return ft(Bt.mfhd,new Uint8Array([0,0,0,0,(Tr&4278190080)>>24,(Tr&16711680)>>16,(Tr&65280)>>8,Tr&255]))},Ct=function(Tr){return ft(Bt.minf,Tr.type==="video"?ft(Bt.vmhd,Sr):ft(Bt.smhd,Er),ht(),Kt(Tr))},Rt=function(Tr,br){for(var zr=[],$r=br.length;$r--;)zr[$r]=Ut(br[$r]);return ft.apply(null,[Bt.moof,Et(Tr)].concat(zr))},Tt=function(Tr){for(var br=Tr.length,zr=[];br--;)zr[br]=Nt(Tr[br]);return ft.apply(null,[Bt.moov,At(4294967295)].concat(zr).concat(wt(Tr)))},wt=function(Tr){for(var br=Tr.length,zr=[];br--;)zr[br]=Ot(Tr[br]);return ft.apply(null,[Bt.mvex].concat(zr))},At=function(Tr){var br=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(Tr&4278190080)>>24,(Tr&16711680)>>16,(Tr&65280)>>8,Tr&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return ft(Bt.mvhd,br)},Vt=function(Tr){var br=Tr.samples||[],zr=new Uint8Array(4+br.length),$r,an;for(an=0;an<br.length;an++)$r=br[an].flags,zr[an+4]=$r.dependsOn<<4|$r.isDependedOn<<2|$r.hasRedundancy;return ft(Bt.sdtp,zr)},Kt=function(Tr){return ft(Bt.stbl,jt(Tr),ft(Bt.stts,Yr),ft(Bt.stsc,Mr),ft(Bt.stsz,Nr),ft(Bt.stco,Wr))},(function(){var Tr,br;jt=function(zr){return ft(Bt.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),zr.type==="video"?Tr(zr):br(zr))},Tr=function(zr){var $r=zr.sps||[],an=zr.pps||[],yn=[],as=[],hs,ys;for(hs=0;hs<$r.length;hs++)yn.push(($r[hs].byteLength&65280)>>>8),yn.push($r[hs].byteLength&255),yn=yn.concat(Array.prototype.slice.call($r[hs]));for(hs=0;hs<an.length;hs++)as.push((an[hs].byteLength&65280)>>>8),as.push(an[hs].byteLength&255),as=as.concat(Array.prototype.slice.call(an[hs]));if(ys=[Bt.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(zr.width&65280)>>8,zr.width&255,(zr.height&65280)>>8,zr.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),ft(Bt.avcC,new Uint8Array([1,zr.profileIdc,zr.profileCompatibility,zr.levelIdc,255].concat([$r.length],yn,[an.length],as))),ft(Bt.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],zr.sarRatio){var Ss=zr.sarRatio[0],zs=zr.sarRatio[1];ys.push(ft(Bt.pasp,new Uint8Array([(Ss&4278190080)>>24,(Ss&16711680)>>16,(Ss&65280)>>8,Ss&255,(zs&4278190080)>>24,(zs&16711680)>>16,(zs&65280)>>8,zs&255])))}return ft.apply(null,ys)},br=function(zr){return ft(Bt.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(zr.channelcount&65280)>>8,zr.channelcount&255,(zr.samplesize&65280)>>8,zr.samplesize&255,0,0,0,0,(zr.samplerate&65280)>>8,zr.samplerate&255,0,0]),mt(zr))}})(),Pt=function(Tr){var br=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(Tr.id&4278190080)>>24,(Tr.id&16711680)>>16,(Tr.id&65280)>>8,Tr.id&255,0,0,0,0,(Tr.duration&4278190080)>>24,(Tr.duration&16711680)>>16,(Tr.duration&65280)>>8,Tr.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(Tr.width&65280)>>8,Tr.width&255,0,0,(Tr.height&65280)>>8,Tr.height&255,0,0]);return ft(Bt.tkhd,br)},Ut=function(Tr){var br,zr,$r,an,yn,as,hs;return br=ft(Bt.tfhd,new Uint8Array([0,0,0,58,(Tr.id&4278190080)>>24,(Tr.id&16711680)>>16,(Tr.id&65280)>>8,Tr.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),as=Math.floor(Tr.baseMediaDecodeTime/dt),hs=Math.floor(Tr.baseMediaDecodeTime%dt),zr=ft(Bt.tfdt,new Uint8Array([1,0,0,0,as>>>24&255,as>>>16&255,as>>>8&255,as&255,hs>>>24&255,hs>>>16&255,hs>>>8&255,hs&255])),yn=92,Tr.type==="audio"?($r=Wt(Tr,yn),ft(Bt.traf,br,zr,$r)):(an=Vt(Tr),$r=Wt(Tr,an.length+yn),ft(Bt.traf,br,zr,$r,an))},Nt=function(Tr){return Tr.duration=Tr.duration||4294967295,ft(Bt.trak,Pt(Tr),It(Tr))},Ot=function(Tr){var br=new Uint8Array([0,0,0,0,(Tr.id&4278190080)>>24,(Tr.id&16711680)>>16,(Tr.id&65280)>>8,Tr.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Tr.type!=="video"&&(br[br.length-1]=0),ft(Bt.trex,br)},(function(){var Tr,br,zr;zr=function($r,an){var yn=0,as=0,hs=0,ys=0;return $r.length&&($r[0].duration!==void 0&&(yn=1),$r[0].size!==void 0&&(as=2),$r[0].flags!==void 0&&(hs=4),$r[0].compositionTimeOffset!==void 0&&(ys=8)),[0,0,yn|as|hs|ys,1,($r.length&4278190080)>>>24,($r.length&16711680)>>>16,($r.length&65280)>>>8,$r.length&255,(an&4278190080)>>>24,(an&16711680)>>>16,(an&65280)>>>8,an&255]},br=function($r,an){var yn,as,hs,ys,Ss,zs;for(ys=$r.samples||[],an+=20+16*ys.length,hs=zr(ys,an),as=new Uint8Array(hs.length+ys.length*16),as.set(hs),yn=hs.length,zs=0;zs<ys.length;zs++)Ss=ys[zs],as[yn++]=(Ss.duration&4278190080)>>>24,as[yn++]=(Ss.duration&16711680)>>>16,as[yn++]=(Ss.duration&65280)>>>8,as[yn++]=Ss.duration&255,as[yn++]=(Ss.size&4278190080)>>>24,as[yn++]=(Ss.size&16711680)>>>16,as[yn++]=(Ss.size&65280)>>>8,as[yn++]=Ss.size&255,as[yn++]=Ss.flags.isLeading<<2|Ss.flags.dependsOn,as[yn++]=Ss.flags.isDependedOn<<6|Ss.flags.hasRedundancy<<4|Ss.flags.paddingValue<<1|Ss.flags.isNonSyncSample,as[yn++]=Ss.flags.degradationPriority&61440,as[yn++]=Ss.flags.degradationPriority&15,as[yn++]=(Ss.compositionTimeOffset&4278190080)>>>24,as[yn++]=(Ss.compositionTimeOffset&16711680)>>>16,as[yn++]=(Ss.compositionTimeOffset&65280)>>>8,as[yn++]=Ss.compositionTimeOffset&255;return ft(Bt.trun,as)},Tr=function($r,an){var yn,as,hs,ys,Ss,zs;for(ys=$r.samples||[],an+=20+8*ys.length,hs=zr(ys,an),yn=new Uint8Array(hs.length+ys.length*8),yn.set(hs),as=hs.length,zs=0;zs<ys.length;zs++)Ss=ys[zs],yn[as++]=(Ss.duration&4278190080)>>>24,yn[as++]=(Ss.duration&16711680)>>>16,yn[as++]=(Ss.duration&65280)>>>8,yn[as++]=Ss.duration&255,yn[as++]=(Ss.size&4278190080)>>>24,yn[as++]=(Ss.size&16711680)>>>16,yn[as++]=(Ss.size&65280)>>>8,yn[as++]=Ss.size&255;return ft(Bt.trun,yn)},Wt=function($r,an){return $r.type==="audio"?Tr($r,an):br($r,an)}})();var Or={ftyp:bt,mdat:St,moof:Rt,moov:Tt,initSegment:function(Tr){var br=bt(),zr=Tt(Tr),$r;return $r=new Uint8Array(br.byteLength+zr.byteLength),$r.set(br),$r.set(zr,br.byteLength),$r}},Ar=function(Tr){var br,zr,$r=[],an=[];for(an.byteLength=0,an.nalCount=0,an.duration=0,$r.byteLength=0,br=0;br<Tr.length;br++)zr=Tr[br],zr.nalUnitType==="access_unit_delimiter_rbsp"?($r.length&&($r.duration=zr.dts-$r.dts,an.byteLength+=$r.byteLength,an.nalCount+=$r.length,an.duration+=$r.duration,an.push($r)),$r=[zr],$r.byteLength=zr.data.byteLength,$r.pts=zr.pts,$r.dts=zr.dts):(zr.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&($r.keyFrame=!0),$r.duration=zr.dts-$r.dts,$r.byteLength+=zr.data.byteLength,$r.push(zr));return an.length&&(!$r.duration||$r.duration<=0)&&($r.duration=an[an.length-1].duration),an.byteLength+=$r.byteLength,an.nalCount+=$r.length,an.duration+=$r.duration,an.push($r),an},Qr=function(Tr){var br,zr,$r=[],an=[];for($r.byteLength=0,$r.nalCount=0,$r.duration=0,$r.pts=Tr[0].pts,$r.dts=Tr[0].dts,an.byteLength=0,an.nalCount=0,an.duration=0,an.pts=Tr[0].pts,an.dts=Tr[0].dts,br=0;br<Tr.length;br++)zr=Tr[br],zr.keyFrame?($r.length&&(an.push($r),an.byteLength+=$r.byteLength,an.nalCount+=$r.nalCount,an.duration+=$r.duration),$r=[zr],$r.nalCount=zr.length,$r.byteLength=zr.byteLength,$r.pts=zr.pts,$r.dts=zr.dts,$r.duration=zr.duration):($r.duration+=zr.duration,$r.nalCount+=zr.length,$r.byteLength+=zr.byteLength,$r.push(zr));return an.length&&$r.duration<=0&&($r.duration=an[an.length-1].duration),an.byteLength+=$r.byteLength,an.nalCount+=$r.nalCount,an.duration+=$r.duration,an.push($r),an},hn=function(Tr){var br;return!Tr[0][0].keyFrame&&Tr.length>1&&(br=Tr.shift(),Tr.byteLength-=br.byteLength,Tr.nalCount-=br.nalCount,Tr[0][0].dts=br.dts,Tr[0][0].pts=br.pts,Tr[0][0].duration+=br.duration),Tr},Sn=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Kr=function(Tr,br){var zr=Sn();return zr.dataOffset=br,zr.compositionTimeOffset=Tr.pts-Tr.dts,zr.duration=Tr.duration,zr.size=4*Tr.length,zr.size+=Tr.byteLength,Tr.keyFrame&&(zr.flags.dependsOn=2,zr.flags.isNonSyncSample=0),zr},Hn=function(Tr,br){var zr,$r,an,yn,as,hs=br||0,ys=[];for(zr=0;zr<Tr.length;zr++)for(yn=Tr[zr],$r=0;$r<yn.length;$r++)as=yn[$r],an=Kr(as,hs),hs+=an.size,ys.push(an);return ys},ln=function(Tr){var br,zr,$r,an,yn,as,hs=0,ys=Tr.byteLength,Ss=Tr.nalCount,zs=ys+4*Ss,wo=new Uint8Array(zs),hu=new DataView(wo.buffer);for(br=0;br<Tr.length;br++)for(an=Tr[br],zr=0;zr<an.length;zr++)for(yn=an[zr],$r=0;$r<yn.length;$r++)as=yn[$r],hu.setUint32(hs,as.data.byteLength),hs+=4,wo.set(as.data,hs),hs+=as.data.byteLength;return wo},kn=function(Tr,br){var zr,$r=br||0,an=[];return zr=Kr(Tr,$r),an.push(zr),an},xn=function(Tr){var br,zr,$r=0,an=Tr.byteLength,yn=Tr.length,as=an+4*yn,hs=new Uint8Array(as),ys=new DataView(hs.buffer);for(br=0;br<Tr.length;br++)zr=Tr[br],ys.setUint32($r,zr.data.byteLength),$r+=4,hs.set(zr.data,$r),$r+=zr.data.byteLength;return hs},An={groupNalsIntoFrames:Ar,groupFramesIntoGops:Qr,extendFirstKeyFrame:hn,generateSampleTable:Hn,concatenateNalData:ln,generateSampleTableForFrame:kn,concatenateNalDataForFrame:xn},rs=[33,16,5,32,164,27],qs=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ln=function(Tr){for(var br=[];Tr--;)br.push(0);return br},Cn=function(Tr){return Object.keys(Tr).reduce(function(br,zr){return br[zr]=new Uint8Array(Tr[zr].reduce(function($r,an){return $r.concat(an)},[])),br},{})},Nn,Gr=function(){if(!Nn){var Tr={96e3:[rs,[227,64],Ln(154),[56]],88200:[rs,[231],Ln(170),[56]],64e3:[rs,[248,192],Ln(240),[56]],48e3:[rs,[255,192],Ln(268),[55,148,128],Ln(54),[112]],44100:[rs,[255,192],Ln(268),[55,163,128],Ln(84),[112]],32e3:[rs,[255,192],Ln(268),[55,234],Ln(226),[112]],24e3:[rs,[255,192],Ln(268),[55,255,128],Ln(268),[111,112],Ln(126),[224]],16e3:[rs,[255,192],Ln(268),[55,255,128],Ln(268),[111,255],Ln(269),[223,108],Ln(195),[1,192]],12e3:[qs,Ln(268),[3,127,248],Ln(268),[6,255,240],Ln(268),[13,255,224],Ln(268),[27,253,128],Ln(259),[56]],11025:[qs,Ln(268),[3,127,248],Ln(268),[6,255,240],Ln(268),[13,255,224],Ln(268),[27,255,192],Ln(268),[55,175,128],Ln(108),[112]],8e3:[qs,Ln(268),[3,121,16],Ln(47),[7]]};Nn=Cn(Tr)}return Nn},tn=9e4,dn,Rn,wn,Un,Zn,pn,Dn;dn=function(Tr){return Tr*tn},Rn=function(Tr,br){return Tr*br},wn=function(Tr){return Tr/tn},Un=function(Tr,br){return Tr/br},Zn=function(Tr,br){return dn(Un(Tr,br))},pn=function(Tr,br){return Rn(wn(Tr),br)},Dn=function(Tr,br,zr){return wn(zr?Tr:Tr-br)};var qn={ONE_SECOND_IN_TS:tn,secondsToVideoTs:dn,secondsToAudioTs:Rn,videoTsToSeconds:wn,audioTsToSeconds:Un,audioTsToVideoTs:Zn,videoTsToAudioTs:pn,metadataTsToSeconds:Dn},_a=Gr,Vn=qn,bs=function(Tr){var br,zr,$r=0;for(br=0;br<Tr.length;br++)zr=Tr[br],$r+=zr.data.byteLength;return $r},Is=function(Tr,br,zr,$r){var an,yn=0,as=0,hs=0,ys=0,Ss,zs,wo;if(br.length&&(an=Vn.audioTsToVideoTs(Tr.baseMediaDecodeTime,Tr.samplerate),yn=Math.ceil(Vn.ONE_SECOND_IN_TS/(Tr.samplerate/1024)),zr&&$r&&(as=an-Math.max(zr,$r),hs=Math.floor(as/yn),ys=hs*yn),!(hs<1||ys>Vn.ONE_SECOND_IN_TS/2))){for(Ss=_a()[Tr.samplerate],Ss||(Ss=br[0].data),zs=0;zs<hs;zs++)wo=br[0],br.splice(0,0,{data:Ss,dts:wo.dts-yn,pts:wo.pts-yn});return Tr.baseMediaDecodeTime-=Math.floor(Vn.videoTsToAudioTs(ys,Tr.samplerate)),ys}},uo=function(Tr,br,zr){return br.minSegmentDts>=zr?Tr:(br.minSegmentDts=1/0,Tr.filter(function($r){return $r.dts>=zr?(br.minSegmentDts=Math.min(br.minSegmentDts,$r.dts),br.minSegmentPts=br.minSegmentDts,!0):!1}))},Rs=function(Tr){var br,zr,$r=[];for(br=0;br<Tr.length;br++)zr=Tr[br],$r.push({size:zr.data.byteLength,duration:1024});return $r},io=function(Tr){var br,zr,$r=0,an=new Uint8Array(bs(Tr));for(br=0;br<Tr.length;br++)zr=Tr[br],an.set(zr.data,$r),$r+=zr.data.byteLength;return an},vo={prefixWithSilence:Is,trimAdtsFramesByEarliestDts:uo,generateSampleTable:Rs,concatenateFrameData:io},Bo=qn.ONE_SECOND_IN_TS,En=function(Tr,br){typeof br.pts=="number"&&(Tr.timelineStartInfo.pts===void 0&&(Tr.timelineStartInfo.pts=br.pts),Tr.minSegmentPts===void 0?Tr.minSegmentPts=br.pts:Tr.minSegmentPts=Math.min(Tr.minSegmentPts,br.pts),Tr.maxSegmentPts===void 0?Tr.maxSegmentPts=br.pts:Tr.maxSegmentPts=Math.max(Tr.maxSegmentPts,br.pts)),typeof br.dts=="number"&&(Tr.timelineStartInfo.dts===void 0&&(Tr.timelineStartInfo.dts=br.dts),Tr.minSegmentDts===void 0?Tr.minSegmentDts=br.dts:Tr.minSegmentDts=Math.min(Tr.minSegmentDts,br.dts),Tr.maxSegmentDts===void 0?Tr.maxSegmentDts=br.dts:Tr.maxSegmentDts=Math.max(Tr.maxSegmentDts,br.dts))},In=function(Tr){delete Tr.minSegmentDts,delete Tr.maxSegmentDts,delete Tr.minSegmentPts,delete Tr.maxSegmentPts},ds=function(Tr,br){var zr,$r,an=Tr.minSegmentDts;return br||(an-=Tr.timelineStartInfo.dts),zr=Tr.timelineStartInfo.baseMediaDecodeTime,zr+=an,zr=Math.max(0,zr),Tr.type==="audio"&&($r=Tr.samplerate/Bo,zr*=$r,zr=Math.floor(zr)),zr},Ps={clearDtsInfo:In,calculateTrackBaseMediaDecodeTime:ds,collectDtsInfo:En},yo=4,rn=128,es=function(Tr){for(var br=0,zr={payloadType:-1,payloadSize:0},$r=0,an=0;br<Tr.byteLength&&Tr[br]!==rn;){for(;Tr[br]===255;)$r+=255,br++;for($r+=Tr[br++];Tr[br]===255;)an+=255,br++;if(an+=Tr[br++],!zr.payload&&$r===yo){var yn=String.fromCharCode(Tr[br+3],Tr[br+4],Tr[br+5],Tr[br+6]);if(yn==="GA94"){zr.payloadType=$r,zr.payloadSize=an,zr.payload=Tr.subarray(br,br+an);break}else zr.payload=void 0}br+=an,$r=0,an=0}return zr},Gs=function(Tr){return Tr.payload[0]!==181||(Tr.payload[1]<<8|Tr.payload[2])!==49||String.fromCharCode(Tr.payload[3],Tr.payload[4],Tr.payload[5],Tr.payload[6])!=="GA94"||Tr.payload[7]!==3?null:Tr.payload.subarray(8,Tr.payload.length-1)},Ro=function(Tr,br){var zr=[],$r,an,yn,as;if(!(br[0]&64))return zr;for(an=br[0]&31,$r=0;$r<an;$r++)yn=$r*3,as={type:br[yn+2]&3,pts:Tr},br[yn+2]&4&&(as.ccData=br[yn+3]<<8|br[yn+4],zr.push(as));return zr},ru=function(Tr){for(var br=Tr.byteLength,zr=[],$r=1,an,yn;$r<br-2;)Tr[$r]===0&&Tr[$r+1]===0&&Tr[$r+2]===3?(zr.push($r+2),$r+=2):$r++;if(zr.length===0)return Tr;an=br-zr.length,yn=new Uint8Array(an);var as=0;for($r=0;$r<an;as++,$r++)as===zr[0]&&(as++,zr.shift()),yn[$r]=Tr[as];return yn},du={parseSei:es,parseUserData:Gs,parseCaptionPackets:Ro,discardEmulationPreventionBytes:ru,USER_DATA_REGISTERED_ITU_T_T35:yo},Iu=tt,Sl=du,Ko=function(Tr){Tr=Tr||{},Ko.prototype.init.call(this),this.parse708captions_=typeof Tr.parse708captions=="boolean"?Tr.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new mn(0,0),new mn(0,1),new mn(1,0),new mn(1,1)],this.parse708captions_&&(this.cc708Stream_=new uu({captionServices:Tr.captionServices})),this.reset(),this.ccStreams_.forEach(function(br){br.on("data",this.trigger.bind(this,"data")),br.on("partialdone",this.trigger.bind(this,"partialdone")),br.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ko.prototype=new Iu,Ko.prototype.push=function(Tr){var br,zr,$r;if(Tr.nalUnitType==="sei_rbsp"&&(br=Sl.parseSei(Tr.escapedRBSP),!!br.payload&&br.payloadType===Sl.USER_DATA_REGISTERED_ITU_T_T35&&(zr=Sl.parseUserData(br),!!zr))){if(Tr.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(Tr.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}$r=Sl.parseCaptionPackets(Tr.pts,zr),this.captionPackets_=this.captionPackets_.concat($r),this.latestDts_!==Tr.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=Tr.dts}},Ko.prototype.flushCCStreams=function(Tr){this.ccStreams_.forEach(function(br){return Tr==="flush"?br.flush():br.partialFlush()},this)},Ko.prototype.flushStream=function(Tr){if(!this.captionPackets_.length){this.flushCCStreams(Tr);return}this.captionPackets_.forEach(function(br,zr){br.presortIndex=zr}),this.captionPackets_.sort(function(br,zr){return br.pts===zr.pts?br.presortIndex-zr.presortIndex:br.pts-zr.pts}),this.captionPackets_.forEach(function(br){br.type<2?this.dispatchCea608Packet(br):this.dispatchCea708Packet(br)},this),this.captionPackets_.length=0,this.flushCCStreams(Tr)},Ko.prototype.flush=function(){return this.flushStream("flush")},Ko.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ko.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(Tr){Tr.reset()})},Ko.prototype.dispatchCea608Packet=function(Tr){this.setsTextOrXDSActive(Tr)?this.activeCea608Channel_[Tr.type]=null:this.setsChannel1Active(Tr)?this.activeCea608Channel_[Tr.type]=0:this.setsChannel2Active(Tr)&&(this.activeCea608Channel_[Tr.type]=1),this.activeCea608Channel_[Tr.type]!==null&&this.ccStreams_[(Tr.type<<1)+this.activeCea608Channel_[Tr.type]].push(Tr)},Ko.prototype.setsChannel1Active=function(Tr){return(Tr.ccData&30720)===4096},Ko.prototype.setsChannel2Active=function(Tr){return(Tr.ccData&30720)===6144},Ko.prototype.setsTextOrXDSActive=function(Tr){return(Tr.ccData&28928)===256||(Tr.ccData&30974)===4138||(Tr.ccData&30974)===6186},Ko.prototype.dispatchCea708Packet=function(Tr){this.parse708captions_&&this.cc708Stream_.push(Tr)};var Fl={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},gl=function(Tr){var br=Fl[Tr]||Tr;return Tr&4096&&Tr===br?"":String.fromCharCode(br)},Gu=function(Tr){return 32<=Tr&&Tr<=127||160<=Tr&&Tr<=255},Lu=function(Tr){this.windowNum=Tr,this.reset()};Lu.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Lu.prototype.getText=function(){return this.rows.join(`
`)},Lu.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Lu.prototype.newLine=function(Tr){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(Tr),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Lu.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Lu.prototype.addText=function(Tr){this.rows[this.rowIdx]+=Tr},Lu.prototype.backspace=function(){if(!this.isEmpty()){var Tr=this.rows[this.rowIdx];this.rows[this.rowIdx]=Tr.substr(0,Tr.length-1)}};var Ku=function(Tr,br,zr){this.serviceNum=Tr,this.text="",this.currentWindow=new Lu(-1),this.windows=[],this.stream=zr,typeof br=="string"&&this.createTextDecoder(br)};Ku.prototype.init=function(Tr,br){this.startPts=Tr;for(var zr=0;zr<8;zr++)this.windows[zr]=new Lu(zr),typeof br=="function"&&(this.windows[zr].beforeRowOverflow=br)},Ku.prototype.setCurrentWindow=function(Tr){this.currentWindow=this.windows[Tr]},Ku.prototype.createTextDecoder=function(Tr){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(Tr)}catch(br){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+Tr+" encoding. "+br})}};var uu=function(Tr){Tr=Tr||{},uu.prototype.init.call(this);var br=this,zr=Tr.captionServices||{},$r={},an;Object.keys(zr).forEach(yn=>{an=zr[yn],/^SERVICE/.test(yn)&&($r[yn]=an.encoding)}),this.serviceEncodings=$r,this.current708Packet=null,this.services={},this.push=function(yn){yn.type===3?(br.new708Packet(),br.add708Bytes(yn)):(br.current708Packet===null&&br.new708Packet(),br.add708Bytes(yn))}};uu.prototype=new Iu,uu.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},uu.prototype.add708Bytes=function(Tr){var br=Tr.ccData,zr=br>>>8,$r=br&255;this.current708Packet.ptsVals.push(Tr.pts),this.current708Packet.data.push(zr),this.current708Packet.data.push($r)},uu.prototype.push708Packet=function(){var Tr=this.current708Packet,br=Tr.data,zr=null,$r=null,an=0,yn=br[an++];for(Tr.seq=yn>>6,Tr.sizeCode=yn&63;an<br.length;an++)yn=br[an++],zr=yn>>5,$r=yn&31,zr===7&&$r>0&&(yn=br[an++],zr=yn),this.pushServiceBlock(zr,an,$r),$r>0&&(an+=$r-1)},uu.prototype.pushServiceBlock=function(Tr,br,zr){var $r,an=br,yn=this.current708Packet.data,as=this.services[Tr];for(as||(as=this.initService(Tr,an));an<br+zr&&an<yn.length;an++)$r=yn[an],Gu($r)?an=this.handleText(an,as):$r===24?an=this.multiByteCharacter(an,as):$r===16?an=this.extendedCommands(an,as):128<=$r&&$r<=135?an=this.setCurrentWindow(an,as):152<=$r&&$r<=159?an=this.defineWindow(an,as):$r===136?an=this.clearWindows(an,as):$r===140?an=this.deleteWindows(an,as):$r===137?an=this.displayWindows(an,as):$r===138?an=this.hideWindows(an,as):$r===139?an=this.toggleWindows(an,as):$r===151?an=this.setWindowAttributes(an,as):$r===144?an=this.setPenAttributes(an,as):$r===145?an=this.setPenColor(an,as):$r===146?an=this.setPenLocation(an,as):$r===143?as=this.reset(an,as):$r===8?as.currentWindow.backspace():$r===12?as.currentWindow.clearText():$r===13?as.currentWindow.pendingNewLine=!0:$r===14?as.currentWindow.clearText():$r===141&&an++},uu.prototype.extendedCommands=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr];return Gu($r)&&(Tr=this.handleText(Tr,br,{isExtended:!0})),Tr},uu.prototype.getPts=function(Tr){return this.current708Packet.ptsVals[Math.floor(Tr/2)]},uu.prototype.initService=function(Tr,br){var $r="SERVICE"+Tr,zr=this,$r,an;return $r in this.serviceEncodings&&(an=this.serviceEncodings[$r]),this.services[Tr]=new Ku(Tr,an,zr),this.services[Tr].init(this.getPts(br),function(yn){zr.flushDisplayed(yn,zr.services[Tr])}),this.services[Tr]},uu.prototype.handleText=function(Tr,br,zr){var $r=zr&&zr.isExtended,an=zr&&zr.isMultiByte,yn=this.current708Packet.data,as=$r?4096:0,hs=yn[Tr],ys=yn[Tr+1],Ss=br.currentWindow,zs,wo;function hu(ko){return ko.map(Xu=>("0"+(Xu&255).toString(16)).slice(-2)).join("")}if(an?(wo=[hs,ys],Tr++):wo=[hs],br.textDecoder_&&!$r)zs=br.textDecoder_.decode(new Uint8Array(wo));else if(an){const ko=hu(wo);zs=String.fromCharCode(parseInt(ko,16))}else zs=gl(as|hs);return Ss.pendingNewLine&&!Ss.isEmpty()&&Ss.newLine(this.getPts(Tr)),Ss.pendingNewLine=!1,Ss.addText(zs),Tr},uu.prototype.multiByteCharacter=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr+1],an=zr[Tr+2];return Gu($r)&&Gu(an)&&(Tr=this.handleText(++Tr,br,{isMultiByte:!0})),Tr},uu.prototype.setCurrentWindow=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=$r&7;return br.setCurrentWindow(an),Tr},uu.prototype.defineWindow=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=$r&7;br.setCurrentWindow(an);var yn=br.currentWindow;return $r=zr[++Tr],yn.visible=($r&32)>>5,yn.rowLock=($r&16)>>4,yn.columnLock=($r&8)>>3,yn.priority=$r&7,$r=zr[++Tr],yn.relativePositioning=($r&128)>>7,yn.anchorVertical=$r&127,$r=zr[++Tr],yn.anchorHorizontal=$r,$r=zr[++Tr],yn.anchorPoint=($r&240)>>4,yn.rowCount=$r&15,$r=zr[++Tr],yn.columnCount=$r&63,$r=zr[++Tr],yn.windowStyle=($r&56)>>3,yn.penStyle=$r&7,yn.virtualRowCount=yn.rowCount+1,Tr},uu.prototype.setWindowAttributes=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=br.currentWindow.winAttr;return $r=zr[++Tr],an.fillOpacity=($r&192)>>6,an.fillRed=($r&48)>>4,an.fillGreen=($r&12)>>2,an.fillBlue=$r&3,$r=zr[++Tr],an.borderType=($r&192)>>6,an.borderRed=($r&48)>>4,an.borderGreen=($r&12)>>2,an.borderBlue=$r&3,$r=zr[++Tr],an.borderType+=($r&128)>>5,an.wordWrap=($r&64)>>6,an.printDirection=($r&48)>>4,an.scrollDirection=($r&12)>>2,an.justify=$r&3,$r=zr[++Tr],an.effectSpeed=($r&240)>>4,an.effectDirection=($r&12)>>2,an.displayEffect=$r&3,Tr},uu.prototype.flushDisplayed=function(Tr,br){for(var zr=[],$r=0;$r<8;$r++)br.windows[$r].visible&&!br.windows[$r].isEmpty()&&zr.push(br.windows[$r].getText());br.endPts=Tr,br.text=zr.join(`
`),this.pushCaption(br),br.startPts=Tr},uu.prototype.pushCaption=function(Tr){Tr.text!==""&&(this.trigger("data",{startPts:Tr.startPts,endPts:Tr.endPts,text:Tr.text,stream:"cc708_"+Tr.serviceNum}),Tr.text="",Tr.startPts=Tr.endPts)},uu.prototype.displayWindows=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr],an=this.getPts(Tr);this.flushDisplayed(an,br);for(var yn=0;yn<8;yn++)$r&1<<yn&&(br.windows[yn].visible=1);return Tr},uu.prototype.hideWindows=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr],an=this.getPts(Tr);this.flushDisplayed(an,br);for(var yn=0;yn<8;yn++)$r&1<<yn&&(br.windows[yn].visible=0);return Tr},uu.prototype.toggleWindows=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr],an=this.getPts(Tr);this.flushDisplayed(an,br);for(var yn=0;yn<8;yn++)$r&1<<yn&&(br.windows[yn].visible^=1);return Tr},uu.prototype.clearWindows=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr],an=this.getPts(Tr);this.flushDisplayed(an,br);for(var yn=0;yn<8;yn++)$r&1<<yn&&br.windows[yn].clearText();return Tr},uu.prototype.deleteWindows=function(Tr,br){var zr=this.current708Packet.data,$r=zr[++Tr],an=this.getPts(Tr);this.flushDisplayed(an,br);for(var yn=0;yn<8;yn++)$r&1<<yn&&br.windows[yn].reset();return Tr},uu.prototype.setPenAttributes=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=br.currentWindow.penAttr;return $r=zr[++Tr],an.textTag=($r&240)>>4,an.offset=($r&12)>>2,an.penSize=$r&3,$r=zr[++Tr],an.italics=($r&128)>>7,an.underline=($r&64)>>6,an.edgeType=($r&56)>>3,an.fontStyle=$r&7,Tr},uu.prototype.setPenColor=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=br.currentWindow.penColor;return $r=zr[++Tr],an.fgOpacity=($r&192)>>6,an.fgRed=($r&48)>>4,an.fgGreen=($r&12)>>2,an.fgBlue=$r&3,$r=zr[++Tr],an.bgOpacity=($r&192)>>6,an.bgRed=($r&48)>>4,an.bgGreen=($r&12)>>2,an.bgBlue=$r&3,$r=zr[++Tr],an.edgeRed=($r&48)>>4,an.edgeGreen=($r&12)>>2,an.edgeBlue=$r&3,Tr},uu.prototype.setPenLocation=function(Tr,br){var zr=this.current708Packet.data,$r=zr[Tr],an=br.currentWindow.penLoc;return br.currentWindow.pendingNewLine=!0,$r=zr[++Tr],an.row=$r&15,$r=zr[++Tr],an.column=$r&63,Tr},uu.prototype.reset=function(Tr,br){var zr=this.getPts(Tr);return this.flushDisplayed(zr,br),this.initService(br.serviceNum,Tr)};var en={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Jr=function(Tr){return Tr===null?"":(Tr=en[Tr]||Tr,String.fromCharCode(Tr))},vn=14,fn=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],gn=function(){for(var Tr=[],br=vn+1;br--;)Tr.push({text:"",indent:0,offset:0});return Tr},mn=function(Tr,br){mn.prototype.init.call(this),this.field_=Tr||0,this.dataChannel_=br||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(zr){var $r,an,yn,as,hs;if($r=zr.ccData&32639,$r===this.lastControlCode_){this.lastControlCode_=null;return}if(($r&61440)===4096?this.lastControlCode_=$r:$r!==this.PADDING_&&(this.lastControlCode_=null),yn=$r>>>8,as=$r&255,$r!==this.PADDING_)if($r===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if($r===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(zr.pts),this.flushDisplayed(zr.pts),an=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=an,this.startPts_=zr.pts;else if($r===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(zr.pts);else if($r===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(zr.pts);else if($r===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(zr.pts);else if($r===this.CARRIAGE_RETURN_)this.clearFormatting(zr.pts),this.flushDisplayed(zr.pts),this.shiftRowsUp_(),this.startPts_=zr.pts;else if($r===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if($r===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(zr.pts),this.displayed_=gn();else if($r===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=gn();else if($r===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(zr.pts),this.displayed_=gn()),this.mode_="paintOn",this.startPts_=zr.pts;else if(this.isSpecialCharacter(yn,as))yn=(yn&3)<<8,hs=Jr(yn|as),this[this.mode_](zr.pts,hs),this.column_++;else if(this.isExtCharacter(yn,as))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),yn=(yn&3)<<8,hs=Jr(yn|as),this[this.mode_](zr.pts,hs),this.column_++;else if(this.isMidRowCode(yn,as))this.clearFormatting(zr.pts),this[this.mode_](zr.pts," "),this.column_++,(as&14)===14&&this.addFormatting(zr.pts,["i"]),(as&1)===1&&this.addFormatting(zr.pts,["u"]);else if(this.isOffsetControlCode(yn,as)){const Ss=as&3;this.nonDisplayed_[this.row_].offset=Ss,this.column_+=Ss}else if(this.isPAC(yn,as)){var ys=fn.indexOf($r&7968);if(this.mode_==="rollUp"&&(ys-this.rollUpRows_+1<0&&(ys=this.rollUpRows_-1),this.setRollUp(zr.pts,ys)),ys!==this.row_&&ys>=0&&ys<=14&&(this.clearFormatting(zr.pts),this.row_=ys),as&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(zr.pts,["u"]),($r&16)===16){const Ss=($r&14)>>1;this.column_=Ss*4,this.nonDisplayed_[this.row_].indent+=Ss}this.isColorPAC(as)&&(as&14)===14&&this.addFormatting(zr.pts,["i"])}else this.isNormalChar(yn)&&(as===0&&(as=null),hs=Jr(yn),hs+=Jr(as),this[this.mode_](zr.pts,hs),this.column_+=hs.length)}};mn.prototype=new Iu,mn.prototype.flushDisplayed=function(Tr){const br=$r=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+$r+"."})},zr=[];this.displayed_.forEach(($r,an)=>{if($r&&$r.text&&$r.text.length){try{$r.text=$r.text.trim()}catch{br(an)}$r.text.length&&zr.push({text:$r.text,line:an+1,position:10+Math.min(70,$r.indent*10)+$r.offset*2.5})}else $r==null&&br(an)}),zr.length&&this.trigger("data",{startPts:this.startPts_,endPts:Tr,content:zr,stream:this.name_})},mn.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=gn(),this.nonDisplayed_=gn(),this.lastControlCode_=null,this.column_=0,this.row_=vn,this.rollUpRows_=2,this.formatting_=[]},mn.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},mn.prototype.isSpecialCharacter=function(Tr,br){return Tr===this.EXT_&&br>=48&&br<=63},mn.prototype.isExtCharacter=function(Tr,br){return(Tr===this.EXT_+1||Tr===this.EXT_+2)&&br>=32&&br<=63},mn.prototype.isMidRowCode=function(Tr,br){return Tr===this.EXT_&&br>=32&&br<=47},mn.prototype.isOffsetControlCode=function(Tr,br){return Tr===this.OFFSET_&&br>=33&&br<=35},mn.prototype.isPAC=function(Tr,br){return Tr>=this.BASE_&&Tr<this.BASE_+8&&br>=64&&br<=127},mn.prototype.isColorPAC=function(Tr){return Tr>=64&&Tr<=79||Tr>=96&&Tr<=127},mn.prototype.isNormalChar=function(Tr){return Tr>=32&&Tr<=127},mn.prototype.setRollUp=function(Tr,br){if(this.mode_!=="rollUp"&&(this.row_=vn,this.mode_="rollUp",this.flushDisplayed(Tr),this.nonDisplayed_=gn(),this.displayed_=gn()),br!==void 0&&br!==this.row_)for(var zr=0;zr<this.rollUpRows_;zr++)this.displayed_[br-zr]=this.displayed_[this.row_-zr],this.displayed_[this.row_-zr]={text:"",indent:0,offset:0};br===void 0&&(br=this.row_),this.topRow_=br-this.rollUpRows_+1},mn.prototype.addFormatting=function(Tr,br){this.formatting_=this.formatting_.concat(br);var zr=br.reduce(function($r,an){return $r+"<"+an+">"},"");this[this.mode_](Tr,zr)},mn.prototype.clearFormatting=function(Tr){if(this.formatting_.length){var br=this.formatting_.reverse().reduce(function(zr,$r){return zr+"</"+$r+">"},"");this.formatting_=[],this[this.mode_](Tr,br)}},mn.prototype.popOn=function(Tr,br){var zr=this.nonDisplayed_[this.row_].text;zr+=br,this.nonDisplayed_[this.row_].text=zr},mn.prototype.rollUp=function(Tr,br){var zr=this.displayed_[this.row_].text;zr+=br,this.displayed_[this.row_].text=zr},mn.prototype.shiftRowsUp_=function(){var Tr;for(Tr=0;Tr<this.topRow_;Tr++)this.displayed_[Tr]={text:"",indent:0,offset:0};for(Tr=this.row_+1;Tr<vn+1;Tr++)this.displayed_[Tr]={text:"",indent:0,offset:0};for(Tr=this.topRow_;Tr<this.row_;Tr++)this.displayed_[Tr]=this.displayed_[Tr+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},mn.prototype.paintOn=function(Tr,br){var zr=this.displayed_[this.row_].text;zr+=br,this.displayed_[this.row_].text=zr};var ss={CaptionStream:Ko,Cea608Stream:mn,Cea708Stream:uu},ga={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ns=tt,vs=8589934592,Xs=4294967296,co="shared",ls=function(Tr,br){var zr=1;for(Tr>br&&(zr=-1);Math.abs(br-Tr)>Xs;)Tr+=zr*vs;return Tr},Mo=function(Tr){var br,zr;Mo.prototype.init.call(this),this.type_=Tr||co,this.push=function($r){if($r.type==="metadata"){this.trigger("data",$r);return}this.type_!==co&&$r.type!==this.type_||(zr===void 0&&(zr=$r.dts),$r.dts=ls($r.dts,zr),$r.pts=ls($r.pts,zr),br=$r.dts,this.trigger("data",$r))},this.flush=function(){zr=br,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){zr=void 0,br=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Mo.prototype=new Ns;var Nu={TimestampRolloverStream:Mo,handleRollover:ls},Ou=(Tr,br,zr)=>{if(!Tr)return-1;for(var $r=zr;$r<Tr.length;$r++)if(Tr[$r]===br)return $r;return-1},$u={typedArrayIndexOf:Ou},Hu=$u.typedArrayIndexOf,kl={Utf8:3},Uu=function(Tr,br,zr){var $r,an="";for($r=br;$r<zr;$r++)an+="%"+("00"+Tr[$r].toString(16)).slice(-2);return an},tl=function(Tr,br,zr){return decodeURIComponent(Uu(Tr,br,zr))},rl=function(Tr,br,zr){return unescape(Uu(Tr,br,zr))},Wu=function(Tr){return Tr[0]<<21|Tr[1]<<14|Tr[2]<<7|Tr[3]},tp={APIC:function(Tr){var br=1,zr,$r,an="-->";Tr.data[0]===kl.Utf8&&(zr=Hu(Tr.data,0,br),!(zr<0)&&(Tr.mimeType=rl(Tr.data,br,zr),br=zr+1,Tr.pictureType=Tr.data[br],br++,$r=Hu(Tr.data,0,br),!($r<0)&&(Tr.description=tl(Tr.data,br,$r),br=$r+1,Tr.mimeType===an?Tr.url=rl(Tr.data,br,Tr.data.length):Tr.pictureData=Tr.data.subarray(br,Tr.data.length))))},"T*":function(Tr){Tr.data[0]===kl.Utf8&&(Tr.value=tl(Tr.data,1,Tr.data.length).replace(/\0*$/,""),Tr.values=Tr.value.split("\0"))},TXXX:function(Tr){var br;Tr.data[0]===kl.Utf8&&(br=Hu(Tr.data,0,1),br!==-1&&(Tr.description=tl(Tr.data,1,br),Tr.value=tl(Tr.data,br+1,Tr.data.length).replace(/\0*$/,""),Tr.data=Tr.value))},"W*":function(Tr){Tr.url=rl(Tr.data,0,Tr.data.length).replace(/\0.*$/,"")},WXXX:function(Tr){var br;Tr.data[0]===kl.Utf8&&(br=Hu(Tr.data,0,1),br!==-1&&(Tr.description=tl(Tr.data,1,br),Tr.url=rl(Tr.data,br+1,Tr.data.length).replace(/\0.*$/,"")))},PRIV:function(Tr){var br;for(br=0;br<Tr.data.length;br++)if(Tr.data[br]===0){Tr.owner=rl(Tr.data,0,br);break}Tr.privateData=Tr.data.subarray(br+1),Tr.data=Tr.privateData}},Al=function(Tr){var br,zr,$r=10,an=0,yn=[];if(!(Tr.length<10||Tr[0]!==73||Tr[1]!==68||Tr[2]!==51)){an=Wu(Tr.subarray(6,10)),an+=10;var as=Tr[5]&64;as&&($r+=4,$r+=Wu(Tr.subarray(10,14)),an-=Wu(Tr.subarray(16,20)));do{if(br=Wu(Tr.subarray($r+4,$r+8)),br<1)break;zr=String.fromCharCode(Tr[$r],Tr[$r+1],Tr[$r+2],Tr[$r+3]);var hs={id:zr,data:Tr.subarray($r+10,$r+br+10)};hs.key=hs.id,tp[hs.id]?tp[hs.id](hs):hs.id[0]==="T"?tp["T*"](hs):hs.id[0]==="W"&&tp["W*"](hs),yn.push(hs),$r+=10,$r+=br}while($r<an);return yn}},om={parseId3Frames:Al,parseSyncSafeInteger:Wu,frameParsers:tp},Op=tt,op=ga,wl=om,um;um=function(Tr){var br={descriptor:Tr&&Tr.descriptor},zr=0,$r=[],an=0,yn;if(um.prototype.init.call(this),this.dispatchType=op.METADATA_STREAM_TYPE.toString(16),br.descriptor)for(yn=0;yn<br.descriptor.length;yn++)this.dispatchType+=("00"+br.descriptor[yn].toString(16)).slice(-2);this.push=function(as){var hs,ys,Ss,zs,wo,hu;if(as.type==="timed-metadata"){if(as.dataAlignmentIndicator&&(an=0,$r.length=0),$r.length===0&&(as.data.length<10||as.data[0]!==73||as.data[1]!==68||as.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if($r.push(as),an+=as.data.byteLength,$r.length===1&&(zr=wl.parseSyncSafeInteger(as.data.subarray(6,10)),zr+=10),!(an<zr)){for(hs={data:new Uint8Array(zr),frames:[],pts:$r[0].pts,dts:$r[0].dts},wo=0;wo<zr;)hs.data.set($r[0].data.subarray(0,zr-wo),wo),wo+=$r[0].data.byteLength,an-=$r[0].data.byteLength,$r.shift();ys=10,hs.data[5]&64&&(ys+=4,ys+=wl.parseSyncSafeInteger(hs.data.subarray(10,14)),zr-=wl.parseSyncSafeInteger(hs.data.subarray(16,20)));do{if(Ss=wl.parseSyncSafeInteger(hs.data.subarray(ys+4,ys+8)),Ss<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(hu=String.fromCharCode(hs.data[ys],hs.data[ys+1],hs.data[ys+2],hs.data[ys+3]),zs={id:hu,data:hs.data.subarray(ys+10,ys+Ss+10)},zs.key=zs.id,wl.frameParsers[zs.id]?wl.frameParsers[zs.id](zs):zs.id[0]==="T"?wl.frameParsers["T*"](zs):zs.id[0]==="W"&&wl.frameParsers["W*"](zs),zs.owner==="com.apple.streaming.transportStreamTimestamp"){var ko=zs.data,Xu=(ko[3]&1)<<30|ko[4]<<22|ko[5]<<14|ko[6]<<6|ko[7]>>>2;Xu*=4,Xu+=ko[7]&3,zs.timeStamp=Xu,hs.pts===void 0&&hs.dts===void 0&&(hs.pts=zs.timeStamp,hs.dts=zs.timeStamp),this.trigger("timestamp",zs)}hs.frames.push(zs),ys+=10,ys+=Ss}while(ys<zr);this.trigger("data",hs)}}}},um.prototype=new Op;var Im=um,Il=tt,sn=ss,mr=ga,fr=Nu.TimestampRolloverStream,yr,jr,un,$n=188,Yn=71;yr=function(){var Tr=new Uint8Array($n),br=0;yr.prototype.init.call(this),this.push=function(zr){var $r=0,an=$n,yn;for(br?(yn=new Uint8Array(zr.byteLength+br),yn.set(Tr.subarray(0,br)),yn.set(zr,br),br=0):yn=zr;an<yn.byteLength;){if(yn[$r]===Yn&&yn[an]===Yn){this.trigger("data",yn.subarray($r,an)),$r+=$n,an+=$n;continue}$r++,an++}$r<yn.byteLength&&(Tr.set(yn.subarray($r),0),br=yn.byteLength-$r)},this.flush=function(){br===$n&&Tr[0]===Yn&&(this.trigger("data",Tr),br=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){br=0,this.trigger("reset")}},yr.prototype=new Il,jr=function(){var Tr,br,zr,$r;jr.prototype.init.call(this),$r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,Tr=function(an,yn){var as=0;yn.payloadUnitStartIndicator&&(as+=an[as]+1),yn.type==="pat"?br(an.subarray(as),yn):zr(an.subarray(as),yn)},br=function(an,yn){yn.section_number=an[7],yn.last_section_number=an[8],$r.pmtPid=(an[10]&31)<<8|an[11],yn.pmtPid=$r.pmtPid},zr=function(an,yn){var as,hs,ys,Ss;if(an[5]&1){for($r.programMapTable={video:null,audio:null,"timed-metadata":{}},as=(an[1]&15)<<8|an[2],hs=3+as-4,ys=(an[10]&15)<<8|an[11],Ss=12+ys;Ss<hs;){var zs=an[Ss],wo=(an[Ss+1]&31)<<8|an[Ss+2];zs===mr.H264_STREAM_TYPE&&$r.programMapTable.video===null?$r.programMapTable.video=wo:zs===mr.ADTS_STREAM_TYPE&&$r.programMapTable.audio===null?$r.programMapTable.audio=wo:zs===mr.METADATA_STREAM_TYPE&&($r.programMapTable["timed-metadata"][wo]=zs),Ss+=((an[Ss+3]&15)<<8|an[Ss+4])+5}yn.programMapTable=$r.programMapTable}},this.push=function(an){var yn={},as=4;if(yn.payloadUnitStartIndicator=!!(an[1]&64),yn.pid=an[1]&31,yn.pid<<=8,yn.pid|=an[2],(an[3]&48)>>>4>1&&(as+=an[as]+1),yn.pid===0)yn.type="pat",Tr(an.subarray(as),yn),this.trigger("data",yn);else if(yn.pid===this.pmtPid)for(yn.type="pmt",Tr(an.subarray(as),yn),this.trigger("data",yn);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([an,as,yn]):this.processPes_(an,as,yn)},this.processPes_=function(an,yn,as){as.pid===this.programMapTable.video?as.streamType=mr.H264_STREAM_TYPE:as.pid===this.programMapTable.audio?as.streamType=mr.ADTS_STREAM_TYPE:as.streamType=this.programMapTable["timed-metadata"][as.pid],as.type="pes",as.data=an.subarray(yn),this.trigger("data",as)}},jr.prototype=new Il,jr.STREAM_TYPES={h264:27,adts:15},un=function(){var Tr=this,br=!1,zr={data:[],size:0},$r={data:[],size:0},an={data:[],size:0},yn,as=function(ys,Ss){var zs;const wo=ys[0]<<16|ys[1]<<8|ys[2];Ss.data=new Uint8Array,wo===1&&(Ss.packetLength=6+(ys[4]<<8|ys[5]),Ss.dataAlignmentIndicator=(ys[6]&4)!==0,zs=ys[7],zs&192&&(Ss.pts=(ys[9]&14)<<27|(ys[10]&255)<<20|(ys[11]&254)<<12|(ys[12]&255)<<5|(ys[13]&254)>>>3,Ss.pts*=4,Ss.pts+=(ys[13]&6)>>>1,Ss.dts=Ss.pts,zs&64&&(Ss.dts=(ys[14]&14)<<27|(ys[15]&255)<<20|(ys[16]&254)<<12|(ys[17]&255)<<5|(ys[18]&254)>>>3,Ss.dts*=4,Ss.dts+=(ys[18]&6)>>>1)),Ss.data=ys.subarray(9+ys[8]))},hs=function(ys,Ss,zs){var wo=new Uint8Array(ys.size),hu={type:Ss},ko=0,Xu=0,Ju=!1,jp;if(!(!ys.data.length||ys.size<9)){for(hu.trackId=ys.data[0].pid,ko=0;ko<ys.data.length;ko++)jp=ys.data[ko],wo.set(jp.data,Xu),Xu+=jp.data.byteLength;as(wo,hu),Ju=Ss==="video"||hu.packetLength<=ys.size,(zs||Ju)&&(ys.size=0,ys.data.length=0),Ju&&Tr.trigger("data",hu)}};un.prototype.init.call(this),this.push=function(ys){({pat:function(){},pes:function(){var Ss,zs;switch(ys.streamType){case mr.H264_STREAM_TYPE:Ss=zr,zs="video";break;case mr.ADTS_STREAM_TYPE:Ss=$r,zs="audio";break;case mr.METADATA_STREAM_TYPE:Ss=an,zs="timed-metadata";break;default:return}ys.payloadUnitStartIndicator&&hs(Ss,zs,!0),Ss.data.push(ys),Ss.size+=ys.data.byteLength},pmt:function(){var Ss={type:"metadata",tracks:[]};yn=ys.programMapTable,yn.video!==null&&Ss.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+yn.video,codec:"avc",type:"video"}),yn.audio!==null&&Ss.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+yn.audio,codec:"adts",type:"audio"}),br=!0,Tr.trigger("data",Ss)}})[ys.type]()},this.reset=function(){zr.size=0,zr.data.length=0,$r.size=0,$r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){hs(zr,"video"),hs($r,"audio"),hs(an,"timed-metadata")},this.flush=function(){if(!br&&yn){var ys={type:"metadata",tracks:[]};yn.video!==null&&ys.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+yn.video,codec:"avc",type:"video"}),yn.audio!==null&&ys.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+yn.audio,codec:"adts",type:"audio"}),Tr.trigger("data",ys)}br=!1,this.flushStreams_(),this.trigger("done")}},un.prototype=new Il;var os={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:yr,TransportParseStream:jr,ElementaryStream:un,TimestampRolloverStream:fr,CaptionStream:sn.CaptionStream,Cea608Stream:sn.Cea608Stream,Cea708Stream:sn.Cea708Stream,MetadataStream:Im};for(var Vs in mr)mr.hasOwnProperty(Vs)&&(os[Vs]=mr[Vs]);var eo=os,qo=tt,Po=qn.ONE_SECOND_IN_TS,su,mu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];su=function(Tr){var br,zr=0;su.prototype.init.call(this),this.skipWarn_=function($r,an){this.trigger("log",{level:"warn",message:`adts skiping bytes ${$r} to ${an} in frame ${zr} outside syncword`})},this.push=function($r){var an=0,yn,as,hs,ys,Ss;if(Tr||(zr=0),$r.type==="audio"){br&&br.length?(hs=br,br=new Uint8Array(hs.byteLength+$r.data.byteLength),br.set(hs),br.set($r.data,hs.byteLength)):br=$r.data;for(var zs;an+7<br.length;){if(br[an]!==255||(br[an+1]&246)!==240){typeof zs!="number"&&(zs=an),an++;continue}if(typeof zs=="number"&&(this.skipWarn_(zs,an),zs=null),as=(~br[an+1]&1)*2,yn=(br[an+3]&3)<<11|br[an+4]<<3|(br[an+5]&224)>>5,ys=((br[an+6]&3)+1)*1024,Ss=ys*Po/mu[(br[an+2]&60)>>>2],br.byteLength-an<yn)break;this.trigger("data",{pts:$r.pts+zr*Ss,dts:$r.dts+zr*Ss,sampleCount:ys,audioobjecttype:(br[an+2]>>>6&3)+1,channelcount:(br[an+2]&1)<<2|(br[an+3]&192)>>>6,samplerate:mu[(br[an+2]&60)>>>2],samplingfrequencyindex:(br[an+2]&60)>>>2,samplesize:16,data:br.subarray(an+7+as,an+yn)}),zr++,an+=yn}typeof zs=="number"&&(this.skipWarn_(zs,an),zs=null),br=br.subarray(an)}},this.flush=function(){zr=0,this.trigger("done")},this.reset=function(){br=void 0,this.trigger("reset")},this.endTimeline=function(){br=void 0,this.trigger("endedtimeline")}},su.prototype=new qo;var zu=su,lu;lu=function(Tr){var br=Tr.byteLength,zr=0,$r=0;this.length=function(){return 8*br},this.bitsAvailable=function(){return 8*br+$r},this.loadWord=function(){var an=Tr.byteLength-br,yn=new Uint8Array(4),as=Math.min(4,br);if(as===0)throw new Error("no bytes available");yn.set(Tr.subarray(an,an+as)),zr=new DataView(yn.buffer).getUint32(0),$r=as*8,br-=as},this.skipBits=function(an){var yn;$r>an?(zr<<=an,$r-=an):(an-=$r,yn=Math.floor(an/8),an-=yn*8,br-=yn,this.loadWord(),zr<<=an,$r-=an)},this.readBits=function(an){var yn=Math.min($r,an),as=zr>>>32-yn;return $r-=yn,$r>0?zr<<=yn:br>0&&this.loadWord(),yn=an-yn,yn>0?as<<yn|this.readBits(yn):as},this.skipLeadingZeros=function(){var an;for(an=0;an<$r;++an)if((zr&2147483648>>>an)!==0)return zr<<=an,$r-=an,an;return this.loadWord(),an+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var an=this.skipLeadingZeros();return this.readBits(an+1)-1},this.readExpGolomb=function(){var an=this.readUnsignedExpGolomb();return 1&an?1+an>>>1:-1*(an>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var vl=lu,up=tt,_c=vl,Bl,rp,Kp;rp=function(){var Tr=0,br,zr;rp.prototype.init.call(this),this.push=function($r){var an;zr?(an=new Uint8Array(zr.byteLength+$r.data.byteLength),an.set(zr),an.set($r.data,zr.byteLength),zr=an):zr=$r.data;for(var yn=zr.byteLength;Tr<yn-3;Tr++)if(zr[Tr+2]===1){br=Tr+5;break}for(;br<yn;)switch(zr[br]){case 0:if(zr[br-1]!==0){br+=2;break}else if(zr[br-2]!==0){br++;break}Tr+3!==br-2&&this.trigger("data",zr.subarray(Tr+3,br-2));do br++;while(zr[br]!==1&&br<yn);Tr=br-2,br+=3;break;case 1:if(zr[br-1]!==0||zr[br-2]!==0){br+=3;break}this.trigger("data",zr.subarray(Tr+3,br-2)),Tr=br-2,br+=3;break;default:br+=3;break}zr=zr.subarray(Tr),br-=Tr,Tr=0},this.reset=function(){zr=null,Tr=0,this.trigger("reset")},this.flush=function(){zr&&zr.byteLength>3&&this.trigger("data",zr.subarray(Tr+3)),zr=null,Tr=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},rp.prototype=new up,Kp={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Bl=function(){var Tr=new rp,br,zr,$r,an,yn,as,hs;Bl.prototype.init.call(this),br=this,this.push=function(ys){ys.type==="video"&&(zr=ys.trackId,$r=ys.pts,an=ys.dts,Tr.push(ys))},Tr.on("data",function(ys){var Ss={trackId:zr,pts:$r,dts:an,data:ys,nalUnitTypeCode:ys[0]&31};switch(Ss.nalUnitTypeCode){case 5:Ss.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Ss.nalUnitType="sei_rbsp",Ss.escapedRBSP=yn(ys.subarray(1));break;case 7:Ss.nalUnitType="seq_parameter_set_rbsp",Ss.escapedRBSP=yn(ys.subarray(1)),Ss.config=as(Ss.escapedRBSP);break;case 8:Ss.nalUnitType="pic_parameter_set_rbsp";break;case 9:Ss.nalUnitType="access_unit_delimiter_rbsp";break}br.trigger("data",Ss)}),Tr.on("done",function(){br.trigger("done")}),Tr.on("partialdone",function(){br.trigger("partialdone")}),Tr.on("reset",function(){br.trigger("reset")}),Tr.on("endedtimeline",function(){br.trigger("endedtimeline")}),this.flush=function(){Tr.flush()},this.partialFlush=function(){Tr.partialFlush()},this.reset=function(){Tr.reset()},this.endTimeline=function(){Tr.endTimeline()},hs=function(ys,Ss){var zs=8,wo=8,hu,ko;for(hu=0;hu<ys;hu++)wo!==0&&(ko=Ss.readExpGolomb(),wo=(zs+ko+256)%256),zs=wo===0?zs:wo},yn=function(ys){for(var Ss=ys.byteLength,zs=[],wo=1,hu,ko;wo<Ss-2;)ys[wo]===0&&ys[wo+1]===0&&ys[wo+2]===3?(zs.push(wo+2),wo+=2):wo++;if(zs.length===0)return ys;hu=Ss-zs.length,ko=new Uint8Array(hu);var Xu=0;for(wo=0;wo<hu;Xu++,wo++)Xu===zs[0]&&(Xu++,zs.shift()),ko[wo]=ys[Xu];return ko},as=function(ys){var Ss=0,zs=0,wo=0,hu=0,ko,Xu,Ju,jp,wv,Vy,S0,Tv,Fm,w0,qv,bp=[1,1],T0,Bm;if(ko=new _c(ys),Xu=ko.readUnsignedByte(),jp=ko.readUnsignedByte(),Ju=ko.readUnsignedByte(),ko.skipUnsignedExpGolomb(),Kp[Xu]&&(wv=ko.readUnsignedExpGolomb(),wv===3&&ko.skipBits(1),ko.skipUnsignedExpGolomb(),ko.skipUnsignedExpGolomb(),ko.skipBits(1),ko.readBoolean()))for(qv=wv!==3?8:12,Bm=0;Bm<qv;Bm++)ko.readBoolean()&&(Bm<6?hs(16,ko):hs(64,ko));if(ko.skipUnsignedExpGolomb(),Vy=ko.readUnsignedExpGolomb(),Vy===0)ko.readUnsignedExpGolomb();else if(Vy===1)for(ko.skipBits(1),ko.skipExpGolomb(),ko.skipExpGolomb(),S0=ko.readUnsignedExpGolomb(),Bm=0;Bm<S0;Bm++)ko.skipExpGolomb();if(ko.skipUnsignedExpGolomb(),ko.skipBits(1),Tv=ko.readUnsignedExpGolomb(),Fm=ko.readUnsignedExpGolomb(),w0=ko.readBits(1),w0===0&&ko.skipBits(1),ko.skipBits(1),ko.readBoolean()&&(Ss=ko.readUnsignedExpGolomb(),zs=ko.readUnsignedExpGolomb(),wo=ko.readUnsignedExpGolomb(),hu=ko.readUnsignedExpGolomb()),ko.readBoolean()&&ko.readBoolean()){switch(T0=ko.readUnsignedByte(),T0){case 1:bp=[1,1];break;case 2:bp=[12,11];break;case 3:bp=[10,11];break;case 4:bp=[16,11];break;case 5:bp=[40,33];break;case 6:bp=[24,11];break;case 7:bp=[20,11];break;case 8:bp=[32,11];break;case 9:bp=[80,33];break;case 10:bp=[18,11];break;case 11:bp=[15,11];break;case 12:bp=[64,33];break;case 13:bp=[160,99];break;case 14:bp=[4,3];break;case 15:bp=[3,2];break;case 16:bp=[2,1];break;case 255:{bp=[ko.readUnsignedByte()<<8|ko.readUnsignedByte(),ko.readUnsignedByte()<<8|ko.readUnsignedByte()];break}}bp&&bp[0]/bp[1]}return{profileIdc:Xu,levelIdc:Ju,profileCompatibility:jp,width:(Tv+1)*16-Ss*2-zs*2,height:(2-w0)*(Fm+1)*16-wo*2-hu*2,sarRatio:bp}}},Bl.prototype=new up;var lp={H264Stream:Bl},qp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],lm=function(Tr,br){var zr=Tr[br+6]<<21|Tr[br+7]<<14|Tr[br+8]<<7|Tr[br+9],$r=Tr[br+5],an=($r&16)>>4;return zr=zr>=0?zr:0,an?zr+20:zr+10},dl=function(Tr,br){return Tr.length-br<10||Tr[br]!==73||Tr[br+1]!==68||Tr[br+2]!==51?br:(br+=lm(Tr,br),dl(Tr,br))},el=function(Tr){var br=dl(Tr,0);return Tr.length>=br+2&&(Tr[br]&255)===255&&(Tr[br+1]&240)===240&&(Tr[br+1]&22)===16},gv=function(Tr){return Tr[0]<<21|Tr[1]<<14|Tr[2]<<7|Tr[3]},Vm=function(Tr,br,zr){var $r,an="";for($r=br;$r<zr;$r++)an+="%"+("00"+Tr[$r].toString(16)).slice(-2);return an},nl=function(Tr,br,zr){return unescape(Vm(Tr,br,zr))},Xo=function(Tr,br){var zr=(Tr[br+5]&224)>>5,$r=Tr[br+4]<<3,an=Tr[br+3]&6144;return an|$r|zr},xm=function(Tr,br){return Tr[br]===73&&Tr[br+1]===68&&Tr[br+2]===51?"timed-metadata":Tr[br]&!0&&(Tr[br+1]&240)===240?"audio":null},nm=function(Tr){for(var br=0;br+5<Tr.length;){if(Tr[br]!==255||(Tr[br+1]&246)!==240){br++;continue}return qp[(Tr[br+2]&60)>>>2]}return null},vv=function(Tr){var br,zr,$r,an;br=10,Tr[5]&64&&(br+=4,br+=gv(Tr.subarray(10,14)));do{if(zr=gv(Tr.subarray(br+4,br+8)),zr<1)return null;if(an=String.fromCharCode(Tr[br],Tr[br+1],Tr[br+2],Tr[br+3]),an==="PRIV"){$r=Tr.subarray(br+10,br+zr+10);for(var yn=0;yn<$r.byteLength;yn++)if($r[yn]===0){var as=nl($r,0,yn);if(as==="com.apple.streaming.transportStreamTimestamp"){var hs=$r.subarray(yn+1),ys=(hs[3]&1)<<30|hs[4]<<22|hs[5]<<14|hs[6]<<6|hs[7]>>>2;return ys*=4,ys+=hs[7]&3,ys}break}}br+=10,br+=zr}while(br<Tr.byteLength);return null},rv={isLikelyAacData:el,parseId3TagSize:lm,parseAdtsSize:Xo,parseType:xm,parseSampleRate:nm,parseAacTimestamp:vv},Lp=tt,cp=rv,nv;nv=function(){var Tr=new Uint8Array,br=0;nv.prototype.init.call(this),this.setTimestamp=function(zr){br=zr},this.push=function(zr){var $r=0,an=0,yn,as,hs,ys;for(Tr.length?(ys=Tr.length,Tr=new Uint8Array(zr.byteLength+ys),Tr.set(Tr.subarray(0,ys)),Tr.set(zr,ys)):Tr=zr;Tr.length-an>=3;){if(Tr[an]===73&&Tr[an+1]===68&&Tr[an+2]===51){if(Tr.length-an<10||($r=cp.parseId3TagSize(Tr,an),an+$r>Tr.length))break;as={type:"timed-metadata",data:Tr.subarray(an,an+$r)},this.trigger("data",as),an+=$r;continue}else if((Tr[an]&255)===255&&(Tr[an+1]&240)===240){if(Tr.length-an<7||($r=cp.parseAdtsSize(Tr,an),an+$r>Tr.length))break;hs={type:"audio",data:Tr.subarray(an,an+$r),pts:br,dts:br},this.trigger("data",hs),an+=$r;continue}an++}yn=Tr.length-an,yn>0?Tr=Tr.subarray(an):Tr=new Uint8Array},this.reset=function(){Tr=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){Tr=new Uint8Array,this.trigger("endedtimeline")}},nv.prototype=new Lp;var Hm=nv,Rv=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],mm=Rv,Wm=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],uy=Wm,Sm=tt,wm=Or,tm=An,iv=vo,_d=Ps,Xm=eo,Cl=qn,Cy=zu,zv=lp.H264Stream,Fp=Hm,Tm=rv.isLikelyAacData,yv=qn.ONE_SECOND_IN_TS,_l=mm,Wp=uy,Zp,Xp,np,Rm,_0=function(Tr,br){br.stream=Tr,this.trigger("log",br)},bv=function(Tr,br){for(var zr=Object.keys(br),$r=0;$r<zr.length;$r++){var an=zr[$r];an==="headOfPipeline"||!br[an].on||br[an].on("log",_0.bind(Tr,an))}},Cr=function(Tr,br){var zr;if(Tr.length!==br.length)return!1;for(zr=0;zr<Tr.length;zr++)if(Tr[zr]!==br[zr])return!1;return!0},ir=function(Tr,br,zr,$r,an,yn){var as=zr-br,hs=$r-br,ys=an-zr;return{start:{dts:Tr,pts:Tr+as},end:{dts:Tr+hs,pts:Tr+ys},prependedContentDuration:yn,baseMediaDecodeTime:Tr}};Xp=function(Tr,br){var zr=[],$r,an=0,yn=0,as=1/0;br=br||{},$r=br.firstSequenceNumber||0,Xp.prototype.init.call(this),this.push=function(hs){_d.collectDtsInfo(Tr,hs),Tr&&_l.forEach(function(ys){Tr[ys]=hs[ys]}),zr.push(hs)},this.setEarliestDts=function(hs){an=hs},this.setVideoBaseMediaDecodeTime=function(hs){as=hs},this.setAudioAppendStart=function(hs){yn=hs},this.flush=function(){var hs,ys,Ss,zs,wo,hu,ko;if(zr.length===0){this.trigger("done","AudioSegmentStream");return}hs=iv.trimAdtsFramesByEarliestDts(zr,Tr,an),Tr.baseMediaDecodeTime=_d.calculateTrackBaseMediaDecodeTime(Tr,br.keepOriginalTimestamps),ko=iv.prefixWithSilence(Tr,hs,yn,as),Tr.samples=iv.generateSampleTable(hs),Ss=wm.mdat(iv.concatenateFrameData(hs)),zr=[],ys=wm.moof($r,[Tr]),zs=new Uint8Array(ys.byteLength+Ss.byteLength),$r++,zs.set(ys),zs.set(Ss,ys.byteLength),_d.clearDtsInfo(Tr),wo=Math.ceil(yv*1024/Tr.samplerate),hs.length&&(hu=hs.length*wo,this.trigger("segmentTimingInfo",ir(Cl.audioTsToVideoTs(Tr.baseMediaDecodeTime,Tr.samplerate),hs[0].dts,hs[0].pts,hs[0].dts+hu,hs[0].pts+hu,ko||0)),this.trigger("timingInfo",{start:hs[0].pts,end:hs[0].pts+hu})),this.trigger("data",{track:Tr,boxes:zs}),this.trigger("done","AudioSegmentStream")},this.reset=function(){_d.clearDtsInfo(Tr),zr=[],this.trigger("reset")}},Xp.prototype=new Sm,Zp=function(Tr,br){var zr,$r=[],an=[],yn,as;br=br||{},zr=br.firstSequenceNumber||0,Zp.prototype.init.call(this),delete Tr.minPTS,this.gopCache_=[],this.push=function(hs){_d.collectDtsInfo(Tr,hs),hs.nalUnitType==="seq_parameter_set_rbsp"&&!yn&&(yn=hs.config,Tr.sps=[hs.data],Wp.forEach(function(ys){Tr[ys]=yn[ys]},this)),hs.nalUnitType==="pic_parameter_set_rbsp"&&!as&&(as=hs.data,Tr.pps=[hs.data]),$r.push(hs)},this.flush=function(){for(var hs,ys,Ss,zs,wo,hu,ko=0,Xu,Ju;$r.length&&$r[0].nalUnitType!=="access_unit_delimiter_rbsp";)$r.shift();if($r.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(hs=tm.groupNalsIntoFrames($r),Ss=tm.groupFramesIntoGops(hs),Ss[0][0].keyFrame||(ys=this.getGopForFusion_($r[0],Tr),ys?(ko=ys.duration,Ss.unshift(ys),Ss.byteLength+=ys.byteLength,Ss.nalCount+=ys.nalCount,Ss.pts=ys.pts,Ss.dts=ys.dts,Ss.duration+=ys.duration):Ss=tm.extendFirstKeyFrame(Ss)),an.length){var jp;if(br.alignGopsAtEnd?jp=this.alignGopsAtEnd_(Ss):jp=this.alignGopsAtStart_(Ss),!jp){this.gopCache_.unshift({gop:Ss.pop(),pps:Tr.pps,sps:Tr.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),$r=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}_d.clearDtsInfo(Tr),Ss=jp}_d.collectDtsInfo(Tr,Ss),Tr.samples=tm.generateSampleTable(Ss),wo=wm.mdat(tm.concatenateNalData(Ss)),Tr.baseMediaDecodeTime=_d.calculateTrackBaseMediaDecodeTime(Tr,br.keepOriginalTimestamps),this.trigger("processedGopsInfo",Ss.map(function(wv){return{pts:wv.pts,dts:wv.dts,byteLength:wv.byteLength}})),Xu=Ss[0],Ju=Ss[Ss.length-1],this.trigger("segmentTimingInfo",ir(Tr.baseMediaDecodeTime,Xu.dts,Xu.pts,Ju.dts+Ju.duration,Ju.pts+Ju.duration,ko)),this.trigger("timingInfo",{start:Ss[0].pts,end:Ss[Ss.length-1].pts+Ss[Ss.length-1].duration}),this.gopCache_.unshift({gop:Ss.pop(),pps:Tr.pps,sps:Tr.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),$r=[],this.trigger("baseMediaDecodeTime",Tr.baseMediaDecodeTime),this.trigger("timelineStartInfo",Tr.timelineStartInfo),zs=wm.moof(zr,[Tr]),hu=new Uint8Array(zs.byteLength+wo.byteLength),zr++,hu.set(zs),hu.set(wo,zs.byteLength),this.trigger("data",{track:Tr,boxes:hu}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),$r=[],this.gopCache_.length=0,an.length=0,this.trigger("reset")},this.resetStream_=function(){_d.clearDtsInfo(Tr),yn=void 0,as=void 0},this.getGopForFusion_=function(hs){var ys=45e3,Ss=1/0,zs,wo,hu,ko,Xu;for(Xu=0;Xu<this.gopCache_.length;Xu++)ko=this.gopCache_[Xu],hu=ko.gop,!(!(Tr.pps&&Cr(Tr.pps[0],ko.pps[0]))||!(Tr.sps&&Cr(Tr.sps[0],ko.sps[0])))&&(hu.dts<Tr.timelineStartInfo.dts||(zs=hs.dts-hu.dts-hu.duration,zs>=-1e4&&zs<=ys&&(!wo||Ss>zs)&&(wo=ko,Ss=zs)));return wo?wo.gop:null},this.alignGopsAtStart_=function(hs){var ys,Ss,zs,wo,hu,ko,Xu,Ju;for(hu=hs.byteLength,ko=hs.nalCount,Xu=hs.duration,ys=Ss=0;ys<an.length&&Ss<hs.length&&(zs=an[ys],wo=hs[Ss],zs.pts!==wo.pts);){if(wo.pts>zs.pts){ys++;continue}Ss++,hu-=wo.byteLength,ko-=wo.nalCount,Xu-=wo.duration}return Ss===0?hs:Ss===hs.length?null:(Ju=hs.slice(Ss),Ju.byteLength=hu,Ju.duration=Xu,Ju.nalCount=ko,Ju.pts=Ju[0].pts,Ju.dts=Ju[0].dts,Ju)},this.alignGopsAtEnd_=function(hs){var ys,Ss,zs,wo,hu,ko;for(ys=an.length-1,Ss=hs.length-1,hu=null,ko=!1;ys>=0&&Ss>=0;){if(zs=an[ys],wo=hs[Ss],zs.pts===wo.pts){ko=!0;break}if(zs.pts>wo.pts){ys--;continue}ys===an.length-1&&(hu=Ss),Ss--}if(!ko&&hu===null)return null;var Xu;if(ko?Xu=Ss:Xu=hu,Xu===0)return hs;var Ju=hs.slice(Xu),jp=Ju.reduce(function(wv,Vy){return wv.byteLength+=Vy.byteLength,wv.duration+=Vy.duration,wv.nalCount+=Vy.nalCount,wv},{byteLength:0,duration:0,nalCount:0});return Ju.byteLength=jp.byteLength,Ju.duration=jp.duration,Ju.nalCount=jp.nalCount,Ju.pts=Ju[0].pts,Ju.dts=Ju[0].dts,Ju},this.alignGopsWith=function(hs){an=hs}},Zp.prototype=new Sm,Rm=function(Tr,br){this.numberOfTracks=0,this.metadataStream=br,Tr=Tr||{},typeof Tr.remux<"u"?this.remuxTracks=!!Tr.remux:this.remuxTracks=!0,typeof Tr.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=Tr.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Rm.prototype.init.call(this),this.push=function(zr){if(zr.content||zr.text)return this.pendingCaptions.push(zr);if(zr.frames)return this.pendingMetadata.push(zr);this.pendingTracks.push(zr.track),this.pendingBytes+=zr.boxes.byteLength,zr.track.type==="video"&&(this.videoTrack=zr.track,this.pendingBoxes.push(zr.boxes)),zr.track.type==="audio"&&(this.audioTrack=zr.track,this.pendingBoxes.unshift(zr.boxes))}},Rm.prototype=new Sm,Rm.prototype.flush=function(Tr){var br=0,zr={captions:[],captionStreams:{},metadata:[],info:{}},$r,an,yn,as=0,hs;if(this.pendingTracks.length<this.numberOfTracks){if(Tr!=="VideoSegmentStream"&&Tr!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(as=this.videoTrack.timelineStartInfo.pts,Wp.forEach(function(ys){zr.info[ys]=this.videoTrack[ys]},this)):this.audioTrack&&(as=this.audioTrack.timelineStartInfo.pts,_l.forEach(function(ys){zr.info[ys]=this.audioTrack[ys]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?zr.type=this.pendingTracks[0].type:zr.type="combined",this.emittedTracks+=this.pendingTracks.length,yn=wm.initSegment(this.pendingTracks),zr.initSegment=new Uint8Array(yn.byteLength),zr.initSegment.set(yn),zr.data=new Uint8Array(this.pendingBytes),hs=0;hs<this.pendingBoxes.length;hs++)zr.data.set(this.pendingBoxes[hs],br),br+=this.pendingBoxes[hs].byteLength;for(hs=0;hs<this.pendingCaptions.length;hs++)$r=this.pendingCaptions[hs],$r.startTime=Cl.metadataTsToSeconds($r.startPts,as,this.keepOriginalTimestamps),$r.endTime=Cl.metadataTsToSeconds($r.endPts,as,this.keepOriginalTimestamps),zr.captionStreams[$r.stream]=!0,zr.captions.push($r);for(hs=0;hs<this.pendingMetadata.length;hs++)an=this.pendingMetadata[hs],an.cueTime=Cl.metadataTsToSeconds(an.pts,as,this.keepOriginalTimestamps),zr.metadata.push(an);for(zr.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",zr),hs=0;hs<zr.captions.length;hs++)$r=zr.captions[hs],this.trigger("caption",$r);for(hs=0;hs<zr.metadata.length;hs++)an=zr.metadata[hs],this.trigger("id3Frame",an)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Rm.prototype.setRemux=function(Tr){this.remuxTracks=Tr},np=function(Tr){var br=this,zr=!0,$r,an;np.prototype.init.call(this),Tr=Tr||{},this.baseMediaDecodeTime=Tr.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var yn={};this.transmuxPipeline_=yn,yn.type="aac",yn.metadataStream=new Xm.MetadataStream,yn.aacStream=new Fp,yn.audioTimestampRolloverStream=new Xm.TimestampRolloverStream("audio"),yn.timedMetadataTimestampRolloverStream=new Xm.TimestampRolloverStream("timed-metadata"),yn.adtsStream=new Cy,yn.coalesceStream=new Rm(Tr,yn.metadataStream),yn.headOfPipeline=yn.aacStream,yn.aacStream.pipe(yn.audioTimestampRolloverStream).pipe(yn.adtsStream),yn.aacStream.pipe(yn.timedMetadataTimestampRolloverStream).pipe(yn.metadataStream).pipe(yn.coalesceStream),yn.metadataStream.on("timestamp",function(as){yn.aacStream.setTimestamp(as.timeStamp)}),yn.aacStream.on("data",function(as){as.type!=="timed-metadata"&&as.type!=="audio"||yn.audioSegmentStream||(an=an||{timelineStartInfo:{baseMediaDecodeTime:br.baseMediaDecodeTime},codec:"adts",type:"audio"},yn.coalesceStream.numberOfTracks++,yn.audioSegmentStream=new Xp(an,Tr),yn.audioSegmentStream.on("log",br.getLogTrigger_("audioSegmentStream")),yn.audioSegmentStream.on("timingInfo",br.trigger.bind(br,"audioTimingInfo")),yn.adtsStream.pipe(yn.audioSegmentStream).pipe(yn.coalesceStream),br.trigger("trackinfo",{hasAudio:!!an,hasVideo:!!$r}))}),yn.coalesceStream.on("data",this.trigger.bind(this,"data")),yn.coalesceStream.on("done",this.trigger.bind(this,"done")),bv(this,yn)},this.setupTsPipeline=function(){var yn={};this.transmuxPipeline_=yn,yn.type="ts",yn.metadataStream=new Xm.MetadataStream,yn.packetStream=new Xm.TransportPacketStream,yn.parseStream=new Xm.TransportParseStream,yn.elementaryStream=new Xm.ElementaryStream,yn.timestampRolloverStream=new Xm.TimestampRolloverStream,yn.adtsStream=new Cy,yn.h264Stream=new zv,yn.captionStream=new Xm.CaptionStream(Tr),yn.coalesceStream=new Rm(Tr,yn.metadataStream),yn.headOfPipeline=yn.packetStream,yn.packetStream.pipe(yn.parseStream).pipe(yn.elementaryStream).pipe(yn.timestampRolloverStream),yn.timestampRolloverStream.pipe(yn.h264Stream),yn.timestampRolloverStream.pipe(yn.adtsStream),yn.timestampRolloverStream.pipe(yn.metadataStream).pipe(yn.coalesceStream),yn.h264Stream.pipe(yn.captionStream).pipe(yn.coalesceStream),yn.elementaryStream.on("data",function(as){var hs;if(as.type==="metadata"){for(hs=as.tracks.length;hs--;)!$r&&as.tracks[hs].type==="video"?($r=as.tracks[hs],$r.timelineStartInfo.baseMediaDecodeTime=br.baseMediaDecodeTime):!an&&as.tracks[hs].type==="audio"&&(an=as.tracks[hs],an.timelineStartInfo.baseMediaDecodeTime=br.baseMediaDecodeTime);$r&&!yn.videoSegmentStream&&(yn.coalesceStream.numberOfTracks++,yn.videoSegmentStream=new Zp($r,Tr),yn.videoSegmentStream.on("log",br.getLogTrigger_("videoSegmentStream")),yn.videoSegmentStream.on("timelineStartInfo",function(ys){an&&!Tr.keepOriginalTimestamps&&(an.timelineStartInfo=ys,yn.audioSegmentStream.setEarliestDts(ys.dts-br.baseMediaDecodeTime))}),yn.videoSegmentStream.on("processedGopsInfo",br.trigger.bind(br,"gopInfo")),yn.videoSegmentStream.on("segmentTimingInfo",br.trigger.bind(br,"videoSegmentTimingInfo")),yn.videoSegmentStream.on("baseMediaDecodeTime",function(ys){an&&yn.audioSegmentStream.setVideoBaseMediaDecodeTime(ys)}),yn.videoSegmentStream.on("timingInfo",br.trigger.bind(br,"videoTimingInfo")),yn.h264Stream.pipe(yn.videoSegmentStream).pipe(yn.coalesceStream)),an&&!yn.audioSegmentStream&&(yn.coalesceStream.numberOfTracks++,yn.audioSegmentStream=new Xp(an,Tr),yn.audioSegmentStream.on("log",br.getLogTrigger_("audioSegmentStream")),yn.audioSegmentStream.on("timingInfo",br.trigger.bind(br,"audioTimingInfo")),yn.audioSegmentStream.on("segmentTimingInfo",br.trigger.bind(br,"audioSegmentTimingInfo")),yn.adtsStream.pipe(yn.audioSegmentStream).pipe(yn.coalesceStream)),br.trigger("trackinfo",{hasAudio:!!an,hasVideo:!!$r})}}),yn.coalesceStream.on("data",this.trigger.bind(this,"data")),yn.coalesceStream.on("id3Frame",function(as){as.dispatchType=yn.metadataStream.dispatchType,br.trigger("id3Frame",as)}),yn.coalesceStream.on("caption",this.trigger.bind(this,"caption")),yn.coalesceStream.on("done",this.trigger.bind(this,"done")),bv(this,yn)},this.setBaseMediaDecodeTime=function(yn){var as=this.transmuxPipeline_;Tr.keepOriginalTimestamps||(this.baseMediaDecodeTime=yn),an&&(an.timelineStartInfo.dts=void 0,an.timelineStartInfo.pts=void 0,_d.clearDtsInfo(an),as.audioTimestampRolloverStream&&as.audioTimestampRolloverStream.discontinuity()),$r&&(as.videoSegmentStream&&(as.videoSegmentStream.gopCache_=[]),$r.timelineStartInfo.dts=void 0,$r.timelineStartInfo.pts=void 0,_d.clearDtsInfo($r),as.captionStream.reset()),as.timestampRolloverStream&&as.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(yn){an&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(yn)},this.setRemux=function(yn){var as=this.transmuxPipeline_;Tr.remux=yn,as&&as.coalesceStream&&as.coalesceStream.setRemux(yn)},this.alignGopsWith=function(yn){$r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(yn)},this.getLogTrigger_=function(yn){var as=this;return function(hs){hs.stream=yn,as.trigger("log",hs)}},this.push=function(yn){if(zr){var as=Tm(yn);as&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!as&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),zr=!1}this.transmuxPipeline_.headOfPipeline.push(yn)},this.flush=function(){zr=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},np.prototype=new Sm;var nr={Transmuxer:np},dr=function(Tr){return Tr>>>0},Pr=function(Tr){return("00"+Tr.toString(16)).slice(-2)},Hr={toUnsigned:dr,toHexString:Pr},bn=function(Tr){var br="";return br+=String.fromCharCode(Tr[0]),br+=String.fromCharCode(Tr[1]),br+=String.fromCharCode(Tr[2]),br+=String.fromCharCode(Tr[3]),br},Pn=bn,Wn=Hr.toUnsigned,ms=Pn,Es=function(Tr,br){var zr=[],$r,an,yn,as,hs;if(!br.length)return null;for($r=0;$r<Tr.byteLength;)an=Wn(Tr[$r]<<24|Tr[$r+1]<<16|Tr[$r+2]<<8|Tr[$r+3]),yn=ms(Tr.subarray($r+4,$r+8)),as=an>1?$r+an:Tr.byteLength,yn===br[0]&&(br.length===1?zr.push(Tr.subarray($r+8,as)):(hs=Es(Tr.subarray($r+8,as),br.slice(1)),hs.length&&(zr=zr.concat(hs)))),$r=as;return zr},ao=Es,Js=Hr.toUnsigned,po=st.getUint64,So=function(Tr){var br={version:Tr[0],flags:new Uint8Array(Tr.subarray(1,4))};return br.version===1?br.baseMediaDecodeTime=po(Tr.subarray(4)):br.baseMediaDecodeTime=Js(Tr[4]<<24|Tr[5]<<16|Tr[6]<<8|Tr[7]),br},$o=So,Zo=function(Tr){var br=new DataView(Tr.buffer,Tr.byteOffset,Tr.byteLength),zr={version:Tr[0],flags:new Uint8Array(Tr.subarray(1,4)),trackId:br.getUint32(4)},$r=zr.flags[2]&1,an=zr.flags[2]&2,yn=zr.flags[2]&8,as=zr.flags[2]&16,hs=zr.flags[2]&32,ys=zr.flags[0]&65536,Ss=zr.flags[0]&131072,zs;return zs=8,$r&&(zs+=4,zr.baseDataOffset=br.getUint32(12),zs+=4),an&&(zr.sampleDescriptionIndex=br.getUint32(zs),zs+=4),yn&&(zr.defaultSampleDuration=br.getUint32(zs),zs+=4),as&&(zr.defaultSampleSize=br.getUint32(zs),zs+=4),hs&&(zr.defaultSampleFlags=br.getUint32(zs)),ys&&(zr.durationIsEmpty=!0),!$r&&Ss&&(zr.baseDataOffsetIsMoof=!0),zr},au=Zo,ou=function(Tr){return{isLeading:(Tr[0]&12)>>>2,dependsOn:Tr[0]&3,isDependedOn:(Tr[1]&192)>>>6,hasRedundancy:(Tr[1]&48)>>>4,paddingValue:(Tr[1]&14)>>>1,isNonSyncSample:Tr[1]&1,degradationPriority:Tr[2]<<8|Tr[3]}},Yo=ou,Ru=Yo,ku=function(Tr){var br={version:Tr[0],flags:new Uint8Array(Tr.subarray(1,4)),samples:[]},zr=new DataView(Tr.buffer,Tr.byteOffset,Tr.byteLength),$r=br.flags[2]&1,an=br.flags[2]&4,yn=br.flags[1]&1,as=br.flags[1]&2,hs=br.flags[1]&4,ys=br.flags[1]&8,Ss=zr.getUint32(4),zs=8,wo;for($r&&(br.dataOffset=zr.getInt32(zs),zs+=4),an&&Ss&&(wo={flags:Ru(Tr.subarray(zs,zs+4))},zs+=4,yn&&(wo.duration=zr.getUint32(zs),zs+=4),as&&(wo.size=zr.getUint32(zs),zs+=4),ys&&(br.version===1?wo.compositionTimeOffset=zr.getInt32(zs):wo.compositionTimeOffset=zr.getUint32(zs),zs+=4),br.samples.push(wo),Ss--);Ss--;)wo={},yn&&(wo.duration=zr.getUint32(zs),zs+=4),as&&(wo.size=zr.getUint32(zs),zs+=4),hs&&(wo.flags=Ru(Tr.subarray(zs,zs+4)),zs+=4),ys&&(br.version===1?wo.compositionTimeOffset=zr.getInt32(zs):wo.compositionTimeOffset=zr.getUint32(zs),zs+=4),br.samples.push(wo);return br},Vu=ku,sl={tfdt:$o,trun:Vu},nu={parseTfdt:sl.tfdt,parseTrun:sl.trun},fu=function(Tr){for(var br=0,zr=String.fromCharCode(Tr[br]),$r="";zr!=="\0";)$r+=zr,br++,zr=String.fromCharCode(Tr[br]);return $r+=zr,$r},Vo={uint8ToCString:fu},ll=Vo.uint8ToCString,zl=st.getUint64,Gl=function(Tr){var br=4,zr=Tr[0],$r,an,yn,as,hs,ys,Ss,zs;if(zr===0){$r=ll(Tr.subarray(br)),br+=$r.length,an=ll(Tr.subarray(br)),br+=an.length;var wo=new DataView(Tr.buffer);yn=wo.getUint32(br),br+=4,hs=wo.getUint32(br),br+=4,ys=wo.getUint32(br),br+=4,Ss=wo.getUint32(br),br+=4}else if(zr===1){var wo=new DataView(Tr.buffer);yn=wo.getUint32(br),br+=4,as=zl(Tr.subarray(br)),br+=8,ys=wo.getUint32(br),br+=4,Ss=wo.getUint32(br),br+=4,$r=ll(Tr.subarray(br)),br+=$r.length,an=ll(Tr.subarray(br)),br+=an.length}zs=new Uint8Array(Tr.subarray(br,Tr.byteLength));var hu={scheme_id_uri:$r,value:an,timescale:yn||1,presentation_time:as,presentation_time_delta:hs,event_duration:ys,id:Ss,message_data:zs};return dp(zr,hu)?hu:void 0},Dl=function(Tr,br,zr,$r){return Tr||Tr===0?Tr/br:$r+zr/br},dp=function(Tr,br){var zr=br.scheme_id_uri!=="\0",$r=Tr===0&&Bp(br.presentation_time_delta)&&zr,an=Tr===1&&Bp(br.presentation_time)&&zr;return!(Tr>1)&&$r||an},Bp=function(Tr){return Tr!==void 0||Tr!==null},cm={parseEmsgBox:Gl,scaleTime:Dl},Rl;typeof window<"u"?Rl=window:typeof et<"u"?Rl=et:typeof self<"u"?Rl=self:Rl={};var hl=Rl,hp=Hr.toUnsigned,Cp=Hr.toHexString,il=ao,Jp=Pn,fp=cm,Jy=au,ip=Vu,Bs=$o,Do=st.getUint64,fo,bu,Qu,jl,Yp,_h,Pm,Lm=hl,_v=om.parseId3Frames;fo=function(Tr){var br={},zr=il(Tr,["moov","trak"]);return zr.reduce(function($r,an){var yn,as,hs,ys,Ss;return yn=il(an,["tkhd"])[0],!yn||(as=yn[0],hs=as===0?12:20,ys=hp(yn[hs]<<24|yn[hs+1]<<16|yn[hs+2]<<8|yn[hs+3]),Ss=il(an,["mdia","mdhd"])[0],!Ss)?null:(as=Ss[0],hs=as===0?12:20,$r[ys]=hp(Ss[hs]<<24|Ss[hs+1]<<16|Ss[hs+2]<<8|Ss[hs+3]),$r)},br)},bu=function(Tr,br){var zr;zr=il(br,["moof","traf"]);var $r=zr.reduce(function(an,yn){var as=il(yn,["tfhd"])[0],hs=hp(as[4]<<24|as[5]<<16|as[6]<<8|as[7]),ys=Tr[hs]||9e4,Ss=il(yn,["tfdt"])[0],zs=new DataView(Ss.buffer,Ss.byteOffset,Ss.byteLength),wo;Ss[0]===1?wo=Do(Ss.subarray(4,12)):wo=zs.getUint32(4);let hu;return typeof wo=="bigint"?hu=wo/Lm.BigInt(ys):typeof wo=="number"&&!isNaN(wo)&&(hu=wo/ys),hu<Number.MAX_SAFE_INTEGER&&(hu=Number(hu)),hu<an&&(an=hu),an},1/0);return typeof $r=="bigint"||isFinite($r)?$r:0},Qu=function(Tr,br){var zr=il(br,["moof","traf"]),$r=0,an=0,yn;if(zr&&zr.length){var as=il(zr[0],["tfhd"])[0],hs=il(zr[0],["trun"])[0],ys=il(zr[0],["tfdt"])[0];if(as){var Ss=Jy(as);yn=Ss.trackId}if(ys){var zs=Bs(ys);$r=zs.baseMediaDecodeTime}if(hs){var wo=ip(hs);wo.samples&&wo.samples.length&&(an=wo.samples[0].compositionTimeOffset||0)}}var hu=Tr[yn]||9e4;typeof $r=="bigint"&&(an=Lm.BigInt(an),hu=Lm.BigInt(hu));var ko=($r+an)/hu;return typeof ko=="bigint"&&ko<Number.MAX_SAFE_INTEGER&&(ko=Number(ko)),ko},jl=function(Tr){var br=il(Tr,["moov","trak"]),zr=[];return br.forEach(function($r){var an=il($r,["mdia","hdlr"]),yn=il($r,["tkhd"]);an.forEach(function(as,hs){var ys=Jp(as.subarray(8,12)),Ss=yn[hs],zs,wo,hu;ys==="vide"&&(zs=new DataView(Ss.buffer,Ss.byteOffset,Ss.byteLength),wo=zs.getUint8(0),hu=wo===0?zs.getUint32(12):zs.getUint32(20),zr.push(hu))})}),zr},_h=function(Tr){var br=Tr[0],zr=br===0?12:20;return hp(Tr[zr]<<24|Tr[zr+1]<<16|Tr[zr+2]<<8|Tr[zr+3])},Yp=function(Tr){var br=il(Tr,["moov","trak"]),zr=[];return br.forEach(function($r){var an={},yn=il($r,["tkhd"])[0],as,hs;yn&&(as=new DataView(yn.buffer,yn.byteOffset,yn.byteLength),hs=as.getUint8(0),an.id=hs===0?as.getUint32(12):as.getUint32(20));var ys=il($r,["mdia","hdlr"])[0];if(ys){var Ss=Jp(ys.subarray(8,12));Ss==="vide"?an.type="video":Ss==="soun"?an.type="audio":an.type=Ss}var zs=il($r,["mdia","minf","stbl","stsd"])[0];if(zs){var wo=zs.subarray(8);an.codec=Jp(wo.subarray(4,8));var hu=il(wo,[an.codec])[0],ko,Xu;hu&&(/^[asm]vc[1-9]$/i.test(an.codec)?(ko=hu.subarray(78),Xu=Jp(ko.subarray(4,8)),Xu==="avcC"&&ko.length>11?(an.codec+=".",an.codec+=Cp(ko[9]),an.codec+=Cp(ko[10]),an.codec+=Cp(ko[11])):an.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(an.codec)?(ko=hu.subarray(28),Xu=Jp(ko.subarray(4,8)),Xu==="esds"&&ko.length>20&&ko[19]!==0?(an.codec+="."+Cp(ko[19]),an.codec+="."+Cp(ko[20]>>>2&63).replace(/^0/,"")):an.codec="mp4a.40.2"):an.codec=an.codec.toLowerCase())}var Ju=il($r,["mdia","mdhd"])[0];Ju&&(an.timescale=_h(Ju)),zr.push(an)}),zr},Pm=function(Tr,br=0){var zr=il(Tr,["emsg"]);return zr.map($r=>{var an=fp.parseEmsgBox(new Uint8Array($r)),yn=_v(an.message_data);return{cueTime:fp.scaleTime(an.presentation_time,an.timescale,an.presentation_time_delta,br),duration:fp.scaleTime(an.event_duration,an.timescale),frames:yn}})};var gp={findBox:il,parseType:Jp,timescale:fo,startTime:bu,compositionStartTime:Qu,videoTrackIds:jl,tracks:Yp,getTimescaleFromMediaHeader:_h,getEmsgID3:Pm};const{parseTrun:o_}=nu,{findBox:Gv}=gp;var ly=hl,Dy=function(Tr){var br=Gv(Tr,["moof","traf"]),zr=Gv(Tr,["mdat"]),$r=[];return zr.forEach(function(an,yn){var as=br[yn];$r.push({mdat:an,traf:as})}),$r},Zu=function(Tr,br,zr){var $r=br,an=zr.defaultSampleDuration||0,yn=zr.defaultSampleSize||0,as=zr.trackId,hs=[];return Tr.forEach(function(ys){var Ss=o_(ys),zs=Ss.samples;zs.forEach(function(wo){wo.duration===void 0&&(wo.duration=an),wo.size===void 0&&(wo.size=yn),wo.trackId=as,wo.dts=$r,wo.compositionTimeOffset===void 0&&(wo.compositionTimeOffset=0),typeof $r=="bigint"?(wo.pts=$r+ly.BigInt(wo.compositionTimeOffset),$r+=ly.BigInt(wo.duration)):(wo.pts=$r+wo.compositionTimeOffset,$r+=wo.duration)}),hs=hs.concat(zs)}),hs},N_={getMdatTrafPairs:Dy,parseSamples:Zu},u_=du.discardEmulationPreventionBytes,cy=ss.CaptionStream,Pv=ao,vp=$o,Fu=au,{getMdatTrafPairs:Zv,parseSamples:Nv}=N_,av=function(Tr,br){for(var zr=Tr,$r=0;$r<br.length;$r++){var an=br[$r];if(zr<an.size)return an;zr-=an.size}return null},Gy=function(Tr,br,zr){var $r=new DataView(Tr.buffer,Tr.byteOffset,Tr.byteLength),an={logs:[],seiNals:[]},yn,as,hs,ys;for(as=0;as+4<Tr.length;as+=hs)if(hs=$r.getUint32(as),as+=4,!(hs<=0))switch(Tr[as]&31){case 6:var Ss=Tr.subarray(as+1,as+1+hs),zs=av(as,br);if(yn={nalUnitType:"sei_rbsp",size:hs,data:Ss,escapedRBSP:u_(Ss),trackId:zr},zs)yn.pts=zs.pts,yn.dts=zs.dts,ys=zs;else if(ys)yn.pts=ys.pts,yn.dts=ys.dts;else{an.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+as+" for trackId "+zr+". See mux.js#223."});break}an.seiNals.push(yn);break}return an},My=function(Tr,br){var zr={},$r=Zv(Tr);return $r.forEach(function(an){var yn=an.mdat,as=an.traf,hs=Pv(as,["tfhd"]),ys=Fu(hs[0]),Ss=ys.trackId,zs=Pv(as,["tfdt"]),wo=zs.length>0?vp(zs[0]).baseMediaDecodeTime:0,hu=Pv(as,["trun"]),ko,Xu;br===Ss&&hu.length>0&&(ko=Nv(hu,wo,ys),Xu=Gy(yn,ko,Ss),zr[Ss]||(zr[Ss]={seiNals:[],logs:[]}),zr[Ss].seiNals=zr[Ss].seiNals.concat(Xu.seiNals),zr[Ss].logs=zr[Ss].logs.concat(Xu.logs))}),zr},$0=function(Tr,br,zr){var $r;if(br===null)return null;$r=My(Tr,br);var an=$r[br]||{};return{seiNals:an.seiNals,logs:an.logs,timescale:zr}},Iy=function(){var Tr=!1,br,zr,$r,an,yn,as;this.isInitialized=function(){return Tr},this.init=function(hs){br=new cy,Tr=!0,as=hs?hs.isPartial:!1,br.on("data",function(ys){ys.startTime=ys.startPts/an,ys.endTime=ys.endPts/an,yn.captions.push(ys),yn.captionStreams[ys.stream]=!0}),br.on("log",function(ys){yn.logs.push(ys)})},this.isNewInit=function(hs,ys){return hs&&hs.length===0||ys&&typeof ys=="object"&&Object.keys(ys).length===0?!1:$r!==hs[0]||an!==ys[$r]},this.parse=function(hs,ys,Ss){var zs;if(this.isInitialized()){if(!ys||!Ss)return null;if(this.isNewInit(ys,Ss))$r=ys[0],an=Ss[$r];else if($r===null||!an)return zr.push(hs),null}else return null;for(;zr.length>0;){var wo=zr.shift();this.parse(wo,ys,Ss)}return zs=$0(hs,$r,an),zs&&zs.logs&&(yn.logs=yn.logs.concat(zs.logs)),zs===null||!zs.seiNals?yn.logs.length?{logs:yn.logs,captions:[],captionStreams:[]}:null:(this.pushNals(zs.seiNals),this.flushStream(),yn)},this.pushNals=function(hs){if(!this.isInitialized()||!hs||hs.length===0)return null;hs.forEach(function(ys){br.push(ys)})},this.flushStream=function(){if(!this.isInitialized())return null;as?br.partialFlush():br.flush()},this.clearParsedCaptions=function(){yn.captions=[],yn.captionStreams={},yn.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;br.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){zr=[],$r=null,an=null,yn?this.clearParsedCaptions():yn={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Ym=Iy;const{parseTfdt:yp}=nu,pp=ao,{getTimescaleFromMediaHeader:xv}=gp,{parseSamples:Yl,getMdatTrafPairs:l_}=N_;var Vv=function(){let Tr=9e4;this.init=function(br){const zr=pp(br,["moov","trak","mdia","mdhd"])[0];zr&&(Tr=xv(zr))},this.parseSegment=function(br){const zr=[],$r=l_(br);let an=0;return $r.forEach(function(yn){const as=yn.mdat,hs=yn.traf,ys=pp(hs,["tfdt"])[0],Ss=pp(hs,["tfhd"])[0],zs=pp(hs,["trun"]);if(ys&&(an=yp(ys).baseMediaDecodeTime),zs.length&&Ss){const wo=Yl(zs,an,Ss);let hu=0;wo.forEach(function(ko){const Xu="utf-8",Ju=new TextDecoder(Xu),jp=as.slice(hu,hu+ko.size);if(pp(jp,["vtte"])[0]){hu+=ko.size;return}pp(jp,["vttc"]).forEach(function(S0){const Tv=pp(S0,["payl"])[0],Fm=pp(S0,["sttg"])[0],w0=ko.pts/Tr,qv=(ko.pts+ko.duration)/Tr;let bp,T0;if(Tv)try{bp=Ju.decode(Tv)}catch(Bm){console.error(Bm)}if(Fm)try{T0=Ju.decode(Fm)}catch(Bm){console.error(Bm)}ko.duration&&bp&&zr.push({cueText:bp,start:w0,end:qv,settings:T0})}),hu+=ko.size})}}),zr}},dy=ga,hy=function(Tr){var br=Tr[1]&31;return br<<=8,br|=Tr[2],br},Jv=function(Tr){return!!(Tr[1]&64)},Jn=function(Tr){var br=0;return(Tr[3]&48)>>>4>1&&(br+=Tr[4]+1),br},Ql=function(Tr,br){var zr=hy(Tr);return zr===0?"pat":zr===br?"pmt":br?"pes":null},fy=function(Tr){var br=Jv(Tr),zr=4+Jn(Tr);return br&&(zr+=Tr[zr]+1),(Tr[zr+10]&31)<<8|Tr[zr+11]},U0=function(Tr){var br={},zr=Jv(Tr),$r=4+Jn(Tr);if(zr&&($r+=Tr[$r]+1),!!(Tr[$r+5]&1)){var an,yn,as;an=(Tr[$r+1]&15)<<8|Tr[$r+2],yn=3+an-4,as=(Tr[$r+10]&15)<<8|Tr[$r+11];for(var hs=12+as;hs<yn;){var ys=$r+hs;br[(Tr[ys+1]&31)<<8|Tr[ys+2]]=Tr[ys],hs+=((Tr[ys+3]&15)<<8|Tr[ys+4])+5}return br}},Pl=function(Tr,br){var zr=hy(Tr),$r=br[zr];switch($r){case dy.H264_STREAM_TYPE:return"video";case dy.ADTS_STREAM_TYPE:return"audio";case dy.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},gm=function(Tr){var br=Jv(Tr);if(!br)return null;var zr=4+Jn(Tr);if(zr>=Tr.byteLength)return null;var $r=null,an;return an=Tr[zr+7],an&192&&($r={},$r.pts=(Tr[zr+9]&14)<<27|(Tr[zr+10]&255)<<20|(Tr[zr+11]&254)<<12|(Tr[zr+12]&255)<<5|(Tr[zr+13]&254)>>>3,$r.pts*=4,$r.pts+=(Tr[zr+13]&6)>>>1,$r.dts=$r.pts,an&64&&($r.dts=(Tr[zr+14]&14)<<27|(Tr[zr+15]&255)<<20|(Tr[zr+16]&254)<<12|(Tr[zr+17]&255)<<5|(Tr[zr+18]&254)>>>3,$r.dts*=4,$r.dts+=(Tr[zr+18]&6)>>>1)),$r},z0=function(Tr){switch(Tr){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},G0=function(Tr){for(var br=4+Jn(Tr),zr=Tr.subarray(br),$r=0,an=0,yn=!1,as;an<zr.byteLength-3;an++)if(zr[an+2]===1){$r=an+5;break}for(;$r<zr.byteLength;)switch(zr[$r]){case 0:if(zr[$r-1]!==0){$r+=2;break}else if(zr[$r-2]!==0){$r++;break}an+3!==$r-2&&(as=z0(zr[an+3]&31),as==="slice_layer_without_partitioning_rbsp_idr"&&(yn=!0));do $r++;while(zr[$r]!==1&&$r<zr.length);an=$r-2,$r+=3;break;case 1:if(zr[$r-1]!==0||zr[$r-2]!==0){$r+=3;break}as=z0(zr[an+3]&31),as==="slice_layer_without_partitioning_rbsp_idr"&&(yn=!0),an=$r-2,$r+=3;break;default:$r+=3;break}return zr=zr.subarray(an),$r-=an,an=0,zr&&zr.byteLength>3&&(as=z0(zr[an+3]&31),as==="slice_layer_without_partitioning_rbsp_idr"&&(yn=!0)),yn},Nm={parseType:Ql,parsePat:fy,parsePmt:U0,parsePayloadUnitStartIndicator:Jv,parsePesType:Pl,parsePesTime:gm,videoPacketContainsKeyFrame:G0},x0=ga,kv=Nu.handleRollover,$l={};$l.ts=Nm,$l.aac=rv;var sv=qn.ONE_SECOND_IN_TS,wp=188,yl=71,Tp=function(Tr,br){for(var zr=0,$r=wp,an,yn;$r<Tr.byteLength;){if(Tr[zr]===yl&&Tr[$r]===yl){switch(an=Tr.subarray(zr,$r),yn=$l.ts.parseType(an,br.pid),yn){case"pat":br.pid=$l.ts.parsePat(an);break;case"pmt":var as=$l.ts.parsePmt(an);br.table=br.table||{},Object.keys(as).forEach(function(hs){br.table[hs]=as[hs]});break}zr+=wp,$r+=wp;continue}zr++,$r++}},Hv=function(Tr,br,zr){for(var $r=0,an=wp,yn,as,hs,ys,Ss,zs=!1;an<=Tr.byteLength;){if(Tr[$r]===yl&&(Tr[an]===yl||an===Tr.byteLength)){switch(yn=Tr.subarray($r,an),as=$l.ts.parseType(yn,br.pid),as){case"pes":hs=$l.ts.parsePesType(yn,br.table),ys=$l.ts.parsePayloadUnitStartIndicator(yn),hs==="audio"&&ys&&(Ss=$l.ts.parsePesTime(yn),Ss&&(Ss.type="audio",zr.audio.push(Ss),zs=!0));break}if(zs)break;$r+=wp,an+=wp;continue}$r++,an++}for(an=Tr.byteLength,$r=an-wp,zs=!1;$r>=0;){if(Tr[$r]===yl&&(Tr[an]===yl||an===Tr.byteLength)){switch(yn=Tr.subarray($r,an),as=$l.ts.parseType(yn,br.pid),as){case"pes":hs=$l.ts.parsePesType(yn,br.table),ys=$l.ts.parsePayloadUnitStartIndicator(yn),hs==="audio"&&ys&&(Ss=$l.ts.parsePesTime(yn),Ss&&(Ss.type="audio",zr.audio.push(Ss),zs=!0));break}if(zs)break;$r-=wp,an-=wp;continue}$r--,an--}},vm=function(Tr,br,zr){for(var $r=0,an=wp,yn,as,hs,ys,Ss,zs,wo,hu,ko=!1,Xu={data:[],size:0};an<Tr.byteLength;){if(Tr[$r]===yl&&Tr[an]===yl){switch(yn=Tr.subarray($r,an),as=$l.ts.parseType(yn,br.pid),as){case"pes":if(hs=$l.ts.parsePesType(yn,br.table),ys=$l.ts.parsePayloadUnitStartIndicator(yn),hs==="video"&&(ys&&!ko&&(Ss=$l.ts.parsePesTime(yn),Ss&&(Ss.type="video",zr.video.push(Ss),ko=!0)),!zr.firstKeyFrame)){if(ys&&Xu.size!==0){for(zs=new Uint8Array(Xu.size),wo=0;Xu.data.length;)hu=Xu.data.shift(),zs.set(hu,wo),wo+=hu.byteLength;if($l.ts.videoPacketContainsKeyFrame(zs)){var Ju=$l.ts.parsePesTime(zs);Ju?(zr.firstKeyFrame=Ju,zr.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Xu.size=0}Xu.data.push(yn),Xu.size+=yn.byteLength}break}if(ko&&zr.firstKeyFrame)break;$r+=wp,an+=wp;continue}$r++,an++}for(an=Tr.byteLength,$r=an-wp,ko=!1;$r>=0;){if(Tr[$r]===yl&&Tr[an]===yl){switch(yn=Tr.subarray($r,an),as=$l.ts.parseType(yn,br.pid),as){case"pes":hs=$l.ts.parsePesType(yn,br.table),ys=$l.ts.parsePayloadUnitStartIndicator(yn),hs==="video"&&ys&&(Ss=$l.ts.parsePesTime(yn),Ss&&(Ss.type="video",zr.video.push(Ss),ko=!0));break}if(ko)break;$r-=wp,an-=wp;continue}$r--,an--}},Qm=function(Tr,br){if(Tr.audio&&Tr.audio.length){var zr=br;(typeof zr>"u"||isNaN(zr))&&(zr=Tr.audio[0].dts),Tr.audio.forEach(function(yn){yn.dts=kv(yn.dts,zr),yn.pts=kv(yn.pts,zr),yn.dtsTime=yn.dts/sv,yn.ptsTime=yn.pts/sv})}if(Tr.video&&Tr.video.length){var $r=br;if((typeof $r>"u"||isNaN($r))&&($r=Tr.video[0].dts),Tr.video.forEach(function(yn){yn.dts=kv(yn.dts,$r),yn.pts=kv(yn.pts,$r),yn.dtsTime=yn.dts/sv,yn.ptsTime=yn.pts/sv}),Tr.firstKeyFrame){var an=Tr.firstKeyFrame;an.dts=kv(an.dts,$r),an.pts=kv(an.pts,$r),an.dtsTime=an.dts/sv,an.ptsTime=an.pts/sv}}},V0=function(Tr){for(var br=!1,zr=0,$r=null,an=null,yn=0,as=0,hs;Tr.length-as>=3;){var ys=$l.aac.parseType(Tr,as);switch(ys){case"timed-metadata":if(Tr.length-as<10){br=!0;break}if(yn=$l.aac.parseId3TagSize(Tr,as),yn>Tr.length){br=!0;break}an===null&&(hs=Tr.subarray(as,as+yn),an=$l.aac.parseAacTimestamp(hs)),as+=yn;break;case"audio":if(Tr.length-as<7){br=!0;break}if(yn=$l.aac.parseAdtsSize(Tr,as),yn>Tr.length){br=!0;break}$r===null&&(hs=Tr.subarray(as,as+yn),$r=$l.aac.parseSampleRate(hs)),zr++,as+=yn;break;default:as++;break}if(br)return null}if($r===null||an===null)return null;var Ss=sv/$r,zs={audio:[{type:"audio",dts:an,pts:an},{type:"audio",dts:an+zr*1024*Ss,pts:an+zr*1024*Ss}]};return zs},Ov=function(Tr){var br={pid:null,table:null},zr={};Tp(Tr,br);for(var $r in br.table)if(br.table.hasOwnProperty($r)){var an=br.table[$r];switch(an){case x0.H264_STREAM_TYPE:zr.video=[],vm(Tr,br,zr),zr.video.length===0&&delete zr.video;break;case x0.ADTS_STREAM_TYPE:zr.audio=[],Hv(Tr,br,zr),zr.audio.length===0&&delete zr.audio;break}}return zr},Sv=function(Tr,br){var zr=$l.aac.isLikelyAacData(Tr),$r;return zr?$r=V0(Tr):$r=Ov(Tr),!$r||!$r.audio&&!$r.video?null:(Qm($r,br),$r)},c_={inspect:Sv,parseAudioPes_:Hv};const ey=function(Tr,br){br.on("data",function(zr){const $r=zr.initSegment;zr.initSegment={data:$r.buffer,byteOffset:$r.byteOffset,byteLength:$r.byteLength};const an=zr.data;zr.data=an.buffer,Tr.postMessage({action:"data",segment:zr,byteOffset:an.byteOffset,byteLength:an.byteLength},[zr.data])}),br.on("done",function(zr){Tr.postMessage({action:"done"})}),br.on("gopInfo",function(zr){Tr.postMessage({action:"gopInfo",gopInfo:zr})}),br.on("videoSegmentTimingInfo",function(zr){const $r={start:{decode:qn.videoTsToSeconds(zr.start.dts),presentation:qn.videoTsToSeconds(zr.start.pts)},end:{decode:qn.videoTsToSeconds(zr.end.dts),presentation:qn.videoTsToSeconds(zr.end.pts)},baseMediaDecodeTime:qn.videoTsToSeconds(zr.baseMediaDecodeTime)};zr.prependedContentDuration&&($r.prependedContentDuration=qn.videoTsToSeconds(zr.prependedContentDuration)),Tr.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:$r})}),br.on("audioSegmentTimingInfo",function(zr){const $r={start:{decode:qn.videoTsToSeconds(zr.start.dts),presentation:qn.videoTsToSeconds(zr.start.pts)},end:{decode:qn.videoTsToSeconds(zr.end.dts),presentation:qn.videoTsToSeconds(zr.end.pts)},baseMediaDecodeTime:qn.videoTsToSeconds(zr.baseMediaDecodeTime)};zr.prependedContentDuration&&($r.prependedContentDuration=qn.videoTsToSeconds(zr.prependedContentDuration)),Tr.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:$r})}),br.on("id3Frame",function(zr){Tr.postMessage({action:"id3Frame",id3Frame:zr})}),br.on("caption",function(zr){Tr.postMessage({action:"caption",caption:zr})}),br.on("trackinfo",function(zr){Tr.postMessage({action:"trackinfo",trackInfo:zr})}),br.on("audioTimingInfo",function(zr){Tr.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:qn.videoTsToSeconds(zr.start),end:qn.videoTsToSeconds(zr.end)}})}),br.on("videoTimingInfo",function(zr){Tr.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:qn.videoTsToSeconds(zr.start),end:qn.videoTsToSeconds(zr.end)}})}),br.on("log",function(zr){Tr.postMessage({action:"log",log:zr})})};class py{constructor(br,zr){this.options=zr||{},this.self=br,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new nr.Transmuxer(this.options),ey(this.self,this.transmuxer)}pushMp4Captions(br){this.captionParser||(this.captionParser=new Ym,this.captionParser.init());const zr=new Uint8Array(br.data,br.byteOffset,br.byteLength),$r=this.captionParser.parse(zr,br.trackIds,br.timescales);this.self.postMessage({action:"mp4Captions",captions:$r&&$r.captions||[],logs:$r&&$r.logs||[],data:zr.buffer},[zr.buffer])}initMp4WebVttParser(br){this.webVttParser||(this.webVttParser=new Vv);const zr=new Uint8Array(br.data,br.byteOffset,br.byteLength);this.webVttParser.init(zr)}getMp4WebVttText(br){this.webVttParser||(this.webVttParser=new Vv);const zr=new Uint8Array(br.data,br.byteOffset,br.byteLength),$r=this.webVttParser.parseSegment(zr);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:$r||[],data:zr.buffer},[zr.buffer])}probeMp4StartTime({timescales:br,data:zr}){const $r=gp.startTime(br,zr);this.self.postMessage({action:"probeMp4StartTime",startTime:$r,data:zr},[zr.buffer])}probeMp4Tracks({data:br}){const zr=gp.tracks(br);this.self.postMessage({action:"probeMp4Tracks",tracks:zr,data:br},[br.buffer])}probeEmsgID3({data:br,offset:zr}){const $r=gp.getEmsgID3(br,zr);this.self.postMessage({action:"probeEmsgID3",id3Frames:$r,emsgData:br},[br.buffer])}probeTs({data:br,baseStartTime:zr}){const $r=typeof zr=="number"&&!isNaN(zr)?zr*qn.ONE_SECOND_IN_TS:void 0,an=c_.inspect(br,$r);let yn=null;an&&(yn={hasVideo:an.video&&an.video.length===2||!1,hasAudio:an.audio&&an.audio.length===2||!1},yn.hasVideo&&(yn.videoStart=an.video[0].ptsTime),yn.hasAudio&&(yn.audioStart=an.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:yn,data:br},[br.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(br){const zr=new Uint8Array(br.data,br.byteOffset,br.byteLength);this.transmuxer.push(zr)}reset(){this.transmuxer.reset()}setTimestampOffset(br){const zr=br.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(qn.secondsToVideoTs(zr)))}setAudioAppendStart(br){this.transmuxer.setAudioAppendStart(Math.ceil(qn.secondsToVideoTs(br.appendStart)))}setRemux(br){this.transmuxer.setRemux(br.remux)}flush(br){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(br){this.transmuxer.alignGopsWith(br.gopsToAlignWith.slice())}}self.onmessage=function(Tr){if(Tr.data.action==="init"&&Tr.data.options){this.messageHandlers=new py(self,Tr.data.options);return}this.messageHandlers||(this.messageHandlers=new py(self)),Tr.data&&Tr.data.action&&Tr.data.action!=="init"&&this.messageHandlers[Tr.data.action]&&this.messageHandlers[Tr.data.action](Tr.data)}}));var TransmuxWorker=factory(workerCode$1);const handleData_=(et,_e,tt)=>{const{type:rt,initSegment:nt,captions:st,captionStreams:dt,metadata:ft,videoFrameDtsTime:ht,videoFramePtsTime:mt}=et.data.segment;_e.buffer.push({captions:st,captionStreams:dt,metadata:ft});const bt=et.data.segment.boxes||{data:et.data.segment.data},St={type:rt,data:new Uint8Array(bt.data,bt.data.byteOffset,bt.data.byteLength),initSegment:new Uint8Array(nt.data,nt.byteOffset,nt.byteLength)};typeof ht<"u"&&(St.videoFrameDtsTime=ht),typeof mt<"u"&&(St.videoFramePtsTime=mt),tt(St)},handleDone_=({transmuxedData:et,callback:_e})=>{et.buffer=[],_e(et)},handleGopInfo_=(et,_e)=>{_e.gopInfo=et.data.gopInfo},processTransmux=et=>{const{transmuxer:_e,bytes:tt,audioAppendStart:rt,gopsToAlignWith:nt,remux:st,onData:dt,onTrackInfo:ft,onAudioTimingInfo:ht,onVideoTimingInfo:mt,onVideoSegmentTimingInfo:bt,onAudioSegmentTimingInfo:St,onId3:Et,onCaptions:Ct,onDone:Rt,onEndedTimeline:Tt,onTransmuxerLog:wt,isEndOfTimeline:At,segment:Nt,triggerSegmentEventFn:Pt}=et,It={buffer:[]};let Ft=At;const qt=Kt=>{_e.currentTransmux===et&&(Kt.data.action==="data"&&handleData_(Kt,It,dt),Kt.data.action==="trackinfo"&&ft(Kt.data.trackInfo),Kt.data.action==="gopInfo"&&handleGopInfo_(Kt,It),Kt.data.action==="audioTimingInfo"&&ht(Kt.data.audioTimingInfo),Kt.data.action==="videoTimingInfo"&&mt(Kt.data.videoTimingInfo),Kt.data.action==="videoSegmentTimingInfo"&&bt(Kt.data.videoSegmentTimingInfo),Kt.data.action==="audioSegmentTimingInfo"&&St(Kt.data.audioSegmentTimingInfo),Kt.data.action==="id3Frame"&&Et([Kt.data.id3Frame],Kt.data.id3Frame.dispatchType),Kt.data.action==="caption"&&Ct(Kt.data.caption),Kt.data.action==="endedtimeline"&&(Ft=!1,Tt()),Kt.data.action==="log"&&wt(Kt.data.log),Kt.data.type==="transmuxed"&&(Ft||(_e.onmessage=null,handleDone_({transmuxedData:It,callback:Rt}),dequeue(_e))))},Vt=()=>{const Kt={message:"Received an error message from the transmuxer worker",metadata:{errorType:videojs.Error.StreamingFailedToTransmuxSegment,segmentInfo:segmentInfoPayload({segment:Nt})}};Rt(null,Kt)};if(_e.onmessage=qt,_e.onerror=Vt,rt&&_e.postMessage({action:"setAudioAppendStart",appendStart:rt}),Array.isArray(nt)&&_e.postMessage({action:"alignGopsWith",gopsToAlignWith:nt}),typeof st<"u"&&_e.postMessage({action:"setRemux",remux:st}),tt.byteLength){const Kt=tt instanceof ArrayBuffer?tt:tt.buffer,jt=tt instanceof ArrayBuffer?0:tt.byteOffset;Pt({type:"segmenttransmuxingstart",segment:Nt}),_e.postMessage({action:"push",data:Kt,byteOffset:jt,byteLength:tt.byteLength},[Kt])}At&&_e.postMessage({action:"endTimeline"}),_e.postMessage({action:"flush"})},dequeue=et=>{et.currentTransmux=null,et.transmuxQueue.length&&(et.currentTransmux=et.transmuxQueue.shift(),typeof et.currentTransmux=="function"?et.currentTransmux():processTransmux(et.currentTransmux))},processAction=(et,_e)=>{et.postMessage({action:_e}),dequeue(et)},enqueueAction=(et,_e)=>{if(!_e.currentTransmux){_e.currentTransmux=et,processAction(_e,et);return}_e.transmuxQueue.push(processAction.bind(null,_e,et))},reset=et=>{enqueueAction("reset",et)},endTimeline=et=>{enqueueAction("endTimeline",et)},transmux=et=>{if(!et.transmuxer.currentTransmux){et.transmuxer.currentTransmux=et,processTransmux(et);return}et.transmuxer.transmuxQueue.push(et)},createTransmuxer=et=>{const _e=new TransmuxWorker;_e.currentTransmux=null,_e.transmuxQueue=[];const tt=_e.terminate;return _e.terminate=()=>(_e.currentTransmux=null,_e.transmuxQueue.length=0,tt.call(_e)),_e.postMessage({action:"init",options:et}),_e};var segmentTransmuxer={reset,endTimeline,transmux,createTransmuxer};const workerCallback=function(et){const _e=et.transmuxer,tt=et.endAction||et.action,rt=et.callback,nt=_extends({},et,{endAction:null,transmuxer:null,callback:null}),st=dt=>{dt.data.action===tt&&(_e.removeEventListener("message",st),dt.data.data&&(dt.data.data=new Uint8Array(dt.data.data,et.byteOffset||0,et.byteLength||dt.data.data.byteLength),et.data&&(et.data=dt.data.data)),rt(dt.data))};if(_e.addEventListener("message",st),et.data){const dt=et.data instanceof ArrayBuffer;nt.byteOffset=dt?0:et.data.byteOffset,nt.byteLength=et.data.byteLength;const ft=[dt?et.data:et.data.buffer];_e.postMessage(nt,ft)}else _e.postMessage(nt)},REQUEST_ERRORS={FAILURE:2,TIMEOUT:-101,ABORTED:-102},WEB_VTT_CODEC="wvtt",abortAll=et=>{et.forEach(_e=>{_e.abort()})},getRequestStats=et=>({bandwidth:et.bandwidth,bytesReceived:et.bytesReceived||0,roundTripTime:et.roundTripTime||0}),getProgressStats=et=>{const _e=et.target,rt={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-_e.requestTime||0};return rt.bytesReceived=et.loaded,rt.bandwidth=Math.floor(rt.bytesReceived/rt.roundTripTime*8*1e3),rt},handleErrors=(et,_e)=>{const{requestType:tt}=_e,rt=getStreamingNetworkErrorMetadata({requestType:tt,request:_e,error:et});return _e.timedout?{status:_e.status,message:"HLS request timed-out at URL: "+_e.uri,code:REQUEST_ERRORS.TIMEOUT,xhr:_e,metadata:rt}:_e.aborted?{status:_e.status,message:"HLS request aborted at URL: "+_e.uri,code:REQUEST_ERRORS.ABORTED,xhr:_e,metadata:rt}:et?{status:_e.status,message:"HLS request errored at URL: "+_e.uri,code:REQUEST_ERRORS.FAILURE,xhr:_e,metadata:rt}:_e.responseType==="arraybuffer"&&_e.response.byteLength===0?{status:_e.status,message:"Empty HLS response at URL: "+_e.uri,code:REQUEST_ERRORS.FAILURE,xhr:_e,metadata:rt}:null},handleKeyResponse=(et,_e,tt,rt)=>(nt,st)=>{const dt=st.response,ft=handleErrors(nt,st);if(ft)return tt(ft,et);if(dt.byteLength!==16)return tt({status:st.status,message:"Invalid HLS key at URL: "+st.uri,code:REQUEST_ERRORS.FAILURE,xhr:st},et);const ht=new DataView(dt),mt=new Uint32Array([ht.getUint32(0),ht.getUint32(4),ht.getUint32(8),ht.getUint32(12)]);for(let St=0;St<_e.length;St++)_e[St].bytes=mt;const bt={uri:st.uri};return rt({type:"segmentkeyloadcomplete",segment:et,keyInfo:bt}),tt(null,et)},initMp4Text=(et,_e)=>{_e===WEB_VTT_CODEC&&et.transmuxer.postMessage({action:"initMp4WebVttParser",data:et.map.bytes})},parseMp4TextSegment=(et,_e,tt)=>{_e===WEB_VTT_CODEC&&workerCallback({action:"getMp4WebVttText",data:et.bytes,transmuxer:et.transmuxer,callback:({data:rt,mp4VttCues:nt})=>{et.bytes=rt,tt(null,et,{mp4VttCues:nt})}})},parseInitSegment=(et,_e)=>{const tt=detectContainerForBytes(et.map.bytes);if(tt!=="mp4"){const rt=et.map.resolvedUri||et.map.uri,nt=tt||"unknown";return _e({internal:!0,message:`Found unsupported ${nt} container for initialization segment at URL: ${rt}`,code:REQUEST_ERRORS.FAILURE,metadata:{mediaType:nt}})}workerCallback({action:"probeMp4Tracks",data:et.map.bytes,transmuxer:et.transmuxer,callback:({tracks:rt,data:nt})=>(et.map.bytes=nt,rt.forEach(function(st){et.map.tracks=et.map.tracks||{},!et.map.tracks[st.type]&&(et.map.tracks[st.type]=st,typeof st.id=="number"&&st.timescale&&(et.map.timescales=et.map.timescales||{},et.map.timescales[st.id]=st.timescale),st.type==="text"&&initMp4Text(et,st.codec))}),_e(null))})},handleInitSegmentResponse=({segment:et,finishProcessingFn:_e,triggerSegmentEventFn:tt})=>(rt,nt)=>{const st=handleErrors(rt,nt);if(st)return _e(st,et);const dt=new Uint8Array(nt.response);if(tt({type:"segmentloaded",segment:et}),et.map.key)return et.map.encryptedBytes=dt,_e(null,et);et.map.bytes=dt,parseInitSegment(et,function(ft){if(ft)return ft.xhr=nt,ft.status=nt.status,_e(ft,et);_e(null,et)})},handleSegmentResponse=({segment:et,finishProcessingFn:_e,responseType:tt,triggerSegmentEventFn:rt})=>(nt,st)=>{const dt=handleErrors(nt,st);if(dt)return _e(dt,et);rt({type:"segmentloaded",segment:et});const ft=tt==="arraybuffer"||!st.responseText?st.response:stringToArrayBuffer(st.responseText.substring(et.lastReachedChar||0));return et.stats=getRequestStats(st),et.key?et.encryptedBytes=new Uint8Array(ft):et.bytes=new Uint8Array(ft),_e(null,et)},transmuxAndNotify=({segment:et,bytes:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})=>{const Rt=et.map&&et.map.tracks||{},Tt=!!(Rt.audio&&Rt.video);let wt=rt.bind(null,et,"audio","start");const At=rt.bind(null,et,"audio","end");let Nt=rt.bind(null,et,"video","start");const Pt=rt.bind(null,et,"video","end"),It=()=>transmux({bytes:_e,transmuxer:et.transmuxer,audioAppendStart:et.audioAppendStart,gopsToAlignWith:et.gopsToAlignWith,remux:Tt,onData:Ft=>{Ft.type=Ft.type==="combined"?"video":Ft.type,bt(et,Ft)},onTrackInfo:Ft=>{tt&&(Tt&&(Ft.isMuxed=!0),tt(et,Ft))},onAudioTimingInfo:Ft=>{wt&&typeof Ft.start<"u"&&(wt(Ft.start),wt=null),At&&typeof Ft.end<"u"&&At(Ft.end)},onVideoTimingInfo:Ft=>{Nt&&typeof Ft.start<"u"&&(Nt(Ft.start),Nt=null),Pt&&typeof Ft.end<"u"&&Pt(Ft.end)},onVideoSegmentTimingInfo:Ft=>{const qt={pts:{start:Ft.start.presentation,end:Ft.end.presentation},dts:{start:Ft.start.decode,end:Ft.end.decode}};Ct({type:"segmenttransmuxingtiminginfoavailable",segment:et,timingInfo:qt}),nt(Ft)},onAudioSegmentTimingInfo:Ft=>{const qt={pts:{start:Ft.start.pts,end:Ft.end.pts},dts:{start:Ft.start.dts,end:Ft.end.dts}};Ct({type:"segmenttransmuxingtiminginfoavailable",segment:et,timingInfo:qt}),st(Ft)},onId3:(Ft,qt)=>{dt(et,Ft,qt)},onCaptions:Ft=>{ft(et,[Ft])},isEndOfTimeline:ht,onEndedTimeline:()=>{mt()},onTransmuxerLog:Et,onDone:(Ft,qt)=>{St&&(Ft.type=Ft.type==="combined"?"video":Ft.type,Ct({type:"segmenttransmuxingcomplete",segment:et}),St(qt,et,Ft))},segment:et,triggerSegmentEventFn:Ct});workerCallback({action:"probeTs",transmuxer:et.transmuxer,data:_e,baseStartTime:et.baseStartTime,callback:Ft=>{et.bytes=_e=Ft.data;const qt=Ft.result;qt&&(tt(et,{hasAudio:qt.hasAudio,hasVideo:qt.hasVideo,isMuxed:Tt}),tt=null),It()}})},handleSegmentBytes=({segment:et,bytes:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})=>{let Rt=new Uint8Array(_e);if(isLikelyFmp4MediaSegment(Rt)){et.isFmp4=!0;const{tracks:Tt}=et.map;if(Tt.text&&(!Tt.audio||!Tt.video)){bt(et,{data:Rt,type:"text"}),parseMp4TextSegment(et,Tt.text.codec,St);return}const At={isFmp4:!0,hasVideo:!!Tt.video,hasAudio:!!Tt.audio};Tt.audio&&Tt.audio.codec&&Tt.audio.codec!=="enca"&&(At.audioCodec=Tt.audio.codec),Tt.video&&Tt.video.codec&&Tt.video.codec!=="encv"&&(At.videoCodec=Tt.video.codec),Tt.video&&Tt.audio&&(At.isMuxed=!0),tt(et,At);const Nt=(Pt,It)=>{bt(et,{data:Rt,type:At.hasAudio&&!At.isMuxed?"audio":"video"}),It&&It.length&&dt(et,It),Pt&&Pt.length&&ft(et,Pt),St(null,et,{})};workerCallback({action:"probeMp4StartTime",timescales:et.map.timescales,data:Rt,transmuxer:et.transmuxer,callback:({data:Pt,startTime:It})=>{_e=Pt.buffer,et.bytes=Rt=Pt,At.hasAudio&&!At.isMuxed&&rt(et,"audio","start",It),At.hasVideo&&rt(et,"video","start",It),workerCallback({action:"probeEmsgID3",data:Rt,transmuxer:et.transmuxer,offset:It,callback:({emsgData:Ft,id3Frames:qt})=>{if(_e=Ft.buffer,et.bytes=Rt=Ft,!Tt.video||!Ft.byteLength||!et.transmuxer){Nt(void 0,qt);return}workerCallback({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:et.transmuxer,data:Rt,timescales:et.map.timescales,trackIds:[Tt.video.id],callback:Vt=>{_e=Vt.data.buffer,et.bytes=Rt=Vt.data,Vt.logs.forEach(function(Kt){Et(merge(Kt,{stream:"mp4CaptionParser"}))}),Nt(Vt.captions,qt)}})}})}});return}if(!et.transmuxer){St(null,et,{});return}if(typeof et.container>"u"&&(et.container=detectContainerForBytes(Rt)),et.container!=="ts"&&et.container!=="aac"){tt(et,{hasAudio:!1,hasVideo:!1}),St(null,et,{});return}transmuxAndNotify({segment:et,bytes:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})},decrypt=function({id:et,key:_e,encryptedBytes:tt,decryptionWorker:rt,segment:nt,doneFn:st},dt){const ft=mt=>{if(mt.data.source===et){rt.removeEventListener("message",ft);const bt=mt.data.decrypted;dt(new Uint8Array(bt.bytes,bt.byteOffset,bt.byteLength))}};rt.onerror=()=>{const mt="An error occurred in the decryption worker",bt=segmentInfoPayload({segment:nt}),St={message:mt,metadata:{error:new Error(mt),errorType:videojs.Error.StreamingFailedToDecryptSegment,segmentInfo:bt,keyInfo:{uri:nt.key.resolvedUri||nt.map.key.resolvedUri}}};st(St,nt)},rt.addEventListener("message",ft);let ht;_e.bytes.slice?ht=_e.bytes.slice():ht=new Uint32Array(Array.prototype.slice.call(_e.bytes)),rt.postMessage(createTransferableMessage({source:et,encrypted:tt,key:ht,iv:_e.iv}),[tt.buffer,ht.buffer])},decryptSegment=({decryptionWorker:et,segment:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})=>{Ct({type:"segmentdecryptionstart"}),decrypt({id:_e.requestId,key:_e.key,encryptedBytes:_e.encryptedBytes,decryptionWorker:et,segment:_e,doneFn:St},Rt=>{_e.bytes=Rt,Ct({type:"segmentdecryptioncomplete",segment:_e}),handleSegmentBytes({segment:_e,bytes:_e.bytes,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})})},waitForCompletion=({activeXhrs:et,decryptionWorker:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})=>{let Rt=0,Tt=!1;return(wt,At)=>{if(!Tt){if(wt)return Tt=!0,abortAll(et),St(wt,At);if(Rt+=1,Rt===et.length){const Nt=function(){if(At.encryptedBytes)return decryptSegment({decryptionWorker:_e,segment:At,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct});handleSegmentBytes({segment:At,bytes:At.bytes,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt,doneFn:St,onTransmuxerLog:Et,triggerSegmentEventFn:Ct})};if(At.endOfAllRequests=Date.now(),At.map&&At.map.encryptedBytes&&!At.map.bytes)return Ct({type:"segmentdecryptionstart",segment:At}),decrypt({decryptionWorker:_e,id:At.requestId+"-init",encryptedBytes:At.map.encryptedBytes,key:At.map.key,segment:At,doneFn:St},Pt=>{At.map.bytes=Pt,Ct({type:"segmentdecryptioncomplete",segment:At}),parseInitSegment(At,It=>{if(It)return abortAll(et),St(It,At);Nt()})});Nt()}}}},handleLoadEnd=({loadendState:et,abortFn:_e})=>tt=>{tt.target.aborted&&_e&&!et.calledAbortFn&&(_e(),et.calledAbortFn=!0)},handleProgress=({segment:et,progressFn:_e,trackInfoFn:tt,timingInfoFn:rt,videoSegmentTimingInfoFn:nt,audioSegmentTimingInfoFn:st,id3Fn:dt,captionsFn:ft,isEndOfTimeline:ht,endedTimelineFn:mt,dataFn:bt})=>St=>{if(!St.target.aborted)return et.stats=merge(et.stats,getProgressStats(St)),!et.stats.firstBytesReceivedAt&&et.stats.bytesReceived&&(et.stats.firstBytesReceivedAt=Date.now()),_e(St,et)},mediaSegmentRequest=({xhr:et,xhrOptions:_e,decryptionWorker:tt,segment:rt,abortFn:nt,progressFn:st,trackInfoFn:dt,timingInfoFn:ft,videoSegmentTimingInfoFn:ht,audioSegmentTimingInfoFn:mt,id3Fn:bt,captionsFn:St,isEndOfTimeline:Et,endedTimelineFn:Ct,dataFn:Rt,doneFn:Tt,onTransmuxerLog:wt,triggerSegmentEventFn:At})=>{const Nt=[],Pt=waitForCompletion({activeXhrs:Nt,decryptionWorker:tt,trackInfoFn:dt,timingInfoFn:ft,videoSegmentTimingInfoFn:ht,audioSegmentTimingInfoFn:mt,id3Fn:bt,captionsFn:St,isEndOfTimeline:Et,endedTimelineFn:Ct,dataFn:Rt,doneFn:Tt,onTransmuxerLog:wt,triggerSegmentEventFn:At});if(rt.key&&!rt.key.bytes){const Kt=[rt.key];rt.map&&!rt.map.bytes&&rt.map.key&&rt.map.key.resolvedUri===rt.key.resolvedUri&&Kt.push(rt.map.key);const jt=merge(_e,{uri:rt.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Ut=handleKeyResponse(rt,Kt,Pt,At),Ot={uri:rt.key.resolvedUri};At({type:"segmentkeyloadstart",segment:rt,keyInfo:Ot});const Wt=et(jt,Ut);Nt.push(Wt)}if(rt.map&&!rt.map.bytes){if(rt.map.key&&(!rt.key||rt.key.resolvedUri!==rt.map.key.resolvedUri)){const Wt=merge(_e,{uri:rt.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Bt=handleKeyResponse(rt,[rt.map.key],Pt,At),tr={uri:rt.map.key.resolvedUri};At({type:"segmentkeyloadstart",segment:rt,keyInfo:tr});const Jt=et(Wt,Bt);Nt.push(Jt)}const jt=merge(_e,{uri:rt.map.resolvedUri,responseType:"arraybuffer",headers:segmentXhrHeaders(rt.map),requestType:"segment-media-initialization"}),Ut=handleInitSegmentResponse({segment:rt,finishProcessingFn:Pt,triggerSegmentEventFn:At});At({type:"segmentloadstart",segment:rt});const Ot=et(jt,Ut);Nt.push(Ot)}const It=merge(_e,{uri:rt.part&&rt.part.resolvedUri||rt.resolvedUri,responseType:"arraybuffer",headers:segmentXhrHeaders(rt),requestType:"segment"}),Ft=handleSegmentResponse({segment:rt,finishProcessingFn:Pt,responseType:It.responseType,triggerSegmentEventFn:At});At({type:"segmentloadstart",segment:rt});const qt=et(It,Ft);qt.addEventListener("progress",handleProgress({segment:rt,progressFn:st,trackInfoFn:dt,timingInfoFn:ft,videoSegmentTimingInfoFn:ht,audioSegmentTimingInfoFn:mt,id3Fn:bt,captionsFn:St,isEndOfTimeline:Et,endedTimelineFn:Ct,dataFn:Rt})),Nt.push(qt);const Vt={};return Nt.forEach(Kt=>{Kt.addEventListener("loadend",handleLoadEnd({loadendState:Vt,abortFn:nt}))}),()=>abortAll(Nt)},logFn=logger$1("PlaylistSelector"),representationToString=function(et){if(!et||!et.playlist)return;const _e=et.playlist;return JSON.stringify({id:_e.id,bandwidth:et.bandwidth,width:et.width,height:et.height,codecs:_e.attributes&&_e.attributes.CODECS||""})},safeGetComputedStyle=function(et,_e){if(!et)return"";const tt=window$1.getComputedStyle(et);return tt?tt[_e]:""},stableSort=function(et,_e){const tt=et.slice();et.sort(function(rt,nt){const st=_e(rt,nt);return st===0?tt.indexOf(rt)-tt.indexOf(nt):st})},comparePlaylistBandwidth=function(et,_e){let tt,rt;return et.attributes.BANDWIDTH&&(tt=et.attributes.BANDWIDTH),tt=tt||window$1.Number.MAX_VALUE,_e.attributes.BANDWIDTH&&(rt=_e.attributes.BANDWIDTH),rt=rt||window$1.Number.MAX_VALUE,tt-rt},comparePlaylistResolution=function(et,_e){let tt,rt;return et.attributes.RESOLUTION&&et.attributes.RESOLUTION.width&&(tt=et.attributes.RESOLUTION.width),tt=tt||window$1.Number.MAX_VALUE,_e.attributes.RESOLUTION&&_e.attributes.RESOLUTION.width&&(rt=_e.attributes.RESOLUTION.width),rt=rt||window$1.Number.MAX_VALUE,tt===rt&&et.attributes.BANDWIDTH&&_e.attributes.BANDWIDTH?et.attributes.BANDWIDTH-_e.attributes.BANDWIDTH:tt-rt};let simpleSelector=function(et){const{main:_e,bandwidth:tt,playerWidth:rt,playerHeight:nt,playerObjectFit:st,limitRenditionByPlayerDimensions:dt,playlistController:ft}=et;if(!_e)return;const ht={bandwidth:tt,width:rt,height:nt,limitRenditionByPlayerDimensions:dt};let mt=_e.playlists;Playlist.isAudioOnly(_e)&&(mt=ft.getAudioTrackPlaylists_(),ht.audioOnly=!0);let bt=mt.map(Vt=>{let Kt;const jt=Vt.attributes&&Vt.attributes.RESOLUTION&&Vt.attributes.RESOLUTION.width,Ut=Vt.attributes&&Vt.attributes.RESOLUTION&&Vt.attributes.RESOLUTION.height;return Kt=Vt.attributes&&Vt.attributes.BANDWIDTH,Kt=Kt||window$1.Number.MAX_VALUE,{bandwidth:Kt,width:jt,height:Ut,playlist:Vt}});stableSort(bt,(Vt,Kt)=>Vt.bandwidth-Kt.bandwidth),bt=bt.filter(Vt=>!Playlist.isIncompatible(Vt.playlist));let St=bt.filter(Vt=>Playlist.isEnabled(Vt.playlist));St.length||(St=bt.filter(Vt=>!Playlist.isDisabled(Vt.playlist)));const Et=St.filter(Vt=>Vt.bandwidth*Config.BANDWIDTH_VARIANCE<tt);let Ct=Et[Et.length-1];const Rt=Et.filter(Vt=>Vt.bandwidth===Ct.bandwidth)[0];if(dt===!1){const Vt=Rt||St[0]||bt[0];if(Vt&&Vt.playlist){let Kt="sortedPlaylistReps";return Rt&&(Kt="bandwidthBestRep"),St[0]&&(Kt="enabledPlaylistReps"),logFn(`choosing ${representationToString(Vt)} using ${Kt} with options`,ht),Vt.playlist}return logFn("could not choose a playlist with options",ht),null}const Tt=Et.filter(Vt=>Vt.width&&Vt.height);stableSort(Tt,(Vt,Kt)=>Vt.width-Kt.width);const wt=Tt.filter(Vt=>Vt.width===rt&&Vt.height===nt);Ct=wt[wt.length-1];const At=wt.filter(Vt=>Vt.bandwidth===Ct.bandwidth)[0];let Nt,Pt,It;At||(Nt=Tt.filter(Vt=>st==="cover"?Vt.width>rt&&Vt.height>nt:Vt.width>rt||Vt.height>nt),Pt=Nt.filter(Vt=>Vt.width===Nt[0].width&&Vt.height===Nt[0].height),Ct=Pt[Pt.length-1],It=Pt.filter(Vt=>Vt.bandwidth===Ct.bandwidth)[0]);let Ft;if(ft.leastPixelDiffSelector){const Vt=Tt.map(Kt=>(Kt.pixelDiff=Math.abs(Kt.width-rt)+Math.abs(Kt.height-nt),Kt));stableSort(Vt,(Kt,jt)=>Kt.pixelDiff===jt.pixelDiff?jt.bandwidth-Kt.bandwidth:Kt.pixelDiff-jt.pixelDiff),Ft=Vt[0]}const qt=Ft||It||At||Rt||St[0]||bt[0];if(qt&&qt.playlist){let Vt="sortedPlaylistReps";return Ft?Vt="leastPixelDiffRep":It?Vt="resolutionPlusOneRep":At?Vt="resolutionBestRep":Rt?Vt="bandwidthBestRep":St[0]&&(Vt="enabledPlaylistReps"),logFn(`choosing ${representationToString(qt)} using ${Vt} with options`,ht),qt.playlist}return logFn("could not choose a playlist with options",ht),null};const lastBandwidthSelector=function(){let et=this.useDevicePixelRatio&&window$1.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(et=this.customPixelRatio),simpleSelector({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(safeGetComputedStyle(this.tech_.el(),"width"),10)*et,playerHeight:parseInt(safeGetComputedStyle(this.tech_.el(),"height"),10)*et,playerObjectFit:this.usePlayerObjectFit?safeGetComputedStyle(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},movingAverageBandwidthSelector=function(et){let _e=-1,tt=-1;if(et<0||et>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let rt=this.useDevicePixelRatio&&window$1.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(rt=this.customPixelRatio),_e<0&&(_e=this.systemBandwidth,tt=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==tt&&(_e=et*this.systemBandwidth+(1-et)*_e,tt=this.systemBandwidth),simpleSelector({main:this.playlists.main,bandwidth:_e,playerWidth:parseInt(safeGetComputedStyle(this.tech_.el(),"width"),10)*rt,playerHeight:parseInt(safeGetComputedStyle(this.tech_.el(),"height"),10)*rt,playerObjectFit:this.usePlayerObjectFit?safeGetComputedStyle(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},minRebufferMaxBandwidthSelector=function(et){const{main:_e,currentTime:tt,bandwidth:rt,duration:nt,segmentDuration:st,timeUntilRebuffer:dt,currentTimeline:ft,syncController:ht}=et,mt=_e.playlists.filter(Rt=>!Playlist.isIncompatible(Rt));let bt=mt.filter(Playlist.isEnabled);bt.length||(bt=mt.filter(Rt=>!Playlist.isDisabled(Rt)));const Et=bt.filter(Playlist.hasAttribute.bind(null,"BANDWIDTH")).map(Rt=>{const wt=ht.getSyncPoint(Rt,nt,ft,tt)?1:2,Nt=Playlist.estimateSegmentRequestTime(st,rt,Rt)*wt-dt;return{playlist:Rt,rebufferingImpact:Nt}}),Ct=Et.filter(Rt=>Rt.rebufferingImpact<=0);return stableSort(Ct,(Rt,Tt)=>comparePlaylistBandwidth(Tt.playlist,Rt.playlist)),Ct.length?Ct[0]:(stableSort(Et,(Rt,Tt)=>Rt.rebufferingImpact-Tt.rebufferingImpact),Et[0]||null)},lowestBitrateCompatibleVariantSelector=function(){const et=this.playlists.main.playlists.filter(Playlist.isEnabled);return stableSort(et,(tt,rt)=>comparePlaylistBandwidth(tt,rt)),et.filter(tt=>!!codecsForPlaylist(this.playlists.main,tt).video)[0]||null},concatSegments=et=>{let _e=0,tt;return et.bytes&&(tt=new Uint8Array(et.bytes),et.segments.forEach(rt=>{tt.set(rt,_e),_e+=rt.byteLength})),tt};function compactSegmentUrlDescription(et){try{return new URL(et).pathname.split("/").slice(-2).join("/")}catch{return""}}const createCaptionsTrackIfNotExists=function(et,_e,tt){if(!et[tt]){_e.trigger({type:"usage",name:"vhs-608"});let rt=tt;/^cc708_/.test(tt)&&(rt="SERVICE"+tt.split("_")[1]);const nt=_e.textTracks().getTrackById(rt);if(nt)et[tt]=nt;else{const st=_e.options_.vhs&&_e.options_.vhs.captionServices||{};let dt=tt,ft=tt,ht=!1;const mt=st[rt];mt&&(dt=mt.label,ft=mt.language,ht=mt.default),et[tt]=_e.addRemoteTextTrack({kind:"captions",id:rt,default:ht,label:dt,language:ft},!1).track}}},addCaptionData=function({inbandTextTracks:et,captionArray:_e,timestampOffset:tt}){if(!_e)return;const rt=window$1.WebKitDataCue||window$1.VTTCue;_e.forEach(nt=>{const st=nt.stream;nt.content?nt.content.forEach(dt=>{const ft=new rt(nt.startTime+tt,nt.endTime+tt,dt.text);ft.line=dt.line,ft.align="left",ft.position=dt.position,ft.positionAlign="line-left",et[st].addCue(ft)}):et[st].addCue(new rt(nt.startTime+tt,nt.endTime+tt,nt.text))})},deprecateOldCue=function(et){Object.defineProperties(et.frame,{id:{get(){return videojs.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),et.value.key}},value:{get(){return videojs.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),et.value.data}},privateData:{get(){return videojs.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),et.value.data}}})},addMetadata=({inbandTextTracks:et,metadataArray:_e,timestampOffset:tt,videoDuration:rt})=>{if(!_e)return;const nt=window$1.WebKitDataCue||window$1.VTTCue,st=et.metadataTrack_;if(!st||(_e.forEach(bt=>{const St=bt.cueTime+tt;typeof St!="number"||window$1.isNaN(St)||St<0||!(St<1/0)||!bt.frames||!bt.frames.length||bt.frames.forEach(Et=>{const Ct=new nt(St,St,Et.value||Et.url||Et.data||"");Ct.frame=Et,Ct.value=Et,deprecateOldCue(Ct),st.addCue(Ct)})}),!st.cues||!st.cues.length))return;const dt=st.cues,ft=[];for(let bt=0;bt<dt.length;bt++)dt[bt]&&ft.push(dt[bt]);const ht=ft.reduce((bt,St)=>{const Et=bt[St.startTime]||[];return Et.push(St),bt[St.startTime]=Et,bt},{}),mt=Object.keys(ht).sort((bt,St)=>Number(bt)-Number(St));mt.forEach((bt,St)=>{const Et=ht[bt],Ct=isFinite(rt)?rt:bt,Rt=Number(mt[St+1])||Ct;Et.forEach(Tt=>{Tt.endTime=Rt})})},dateRangeAttr={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},dateRangeKeysToOmit=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),addDateRangeMetadata=({inbandTextTracks:et,dateRanges:_e})=>{const tt=et.metadataTrack_;if(!tt)return;const rt=window$1.WebKitDataCue||window$1.VTTCue;_e.forEach(nt=>{for(const st of Object.keys(nt)){if(dateRangeKeysToOmit.has(st))continue;const dt=new rt(nt.startTime,nt.endTime,"");dt.id=nt.id,dt.type="com.apple.quicktime.HLS",dt.value={key:dateRangeAttr[st],data:nt[st]},(st==="scte35Out"||st==="scte35In")&&(dt.value.data=new Uint8Array(dt.value.data.match(/[\da-f]{2}/gi)).buffer),tt.addCue(dt)}nt.processDateRange()})},createMetadataTrackIfNotExists=(et,_e,tt)=>{et.metadataTrack_||(et.metadataTrack_=tt.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,videojs.browser.IS_ANY_SAFARI||(et.metadataTrack_.inBandMetadataTrackDispatchType=_e))},removeCuesFromTrack=function(et,_e,tt){let rt,nt;if(tt&&tt.cues)for(rt=tt.cues.length;rt--;)nt=tt.cues[rt],nt.startTime>=et&&nt.endTime<=_e&&tt.removeCue(nt)},removeDuplicateCuesFromTrack=function(et){const _e=et.cues;if(!_e)return;const tt={};for(let rt=_e.length-1;rt>=0;rt--){const nt=_e[rt],st=`${nt.startTime}-${nt.endTime}-${nt.text}`;tt[st]?et.removeCue(nt):tt[st]=nt}},gopsSafeToAlignWith=(et,_e,tt)=>{if(typeof _e>"u"||_e===null||!et.length)return[];const rt=Math.ceil((_e-tt+3)*clockExports.ONE_SECOND_IN_TS);let nt;for(nt=0;nt<et.length&&!(et[nt].pts>rt);nt++);return et.slice(nt)},updateGopBuffer=(et,_e,tt)=>{if(!_e.length)return et;if(tt)return _e.slice();const rt=_e[0].pts;let nt=0;for(nt;nt<et.length&&!(et[nt].pts>=rt);nt++);return et.slice(0,nt).concat(_e)},removeGopBuffer=(et,_e,tt,rt)=>{const nt=Math.ceil((_e-rt)*clockExports.ONE_SECOND_IN_TS),st=Math.ceil((tt-rt)*clockExports.ONE_SECOND_IN_TS),dt=et.slice();let ft=et.length;for(;ft--&&!(et[ft].pts<=st););if(ft===-1)return dt;let ht=ft+1;for(;ht--&&!(et[ht].pts<=nt););return ht=Math.max(ht,0),dt.splice(ht,ft-ht+1),dt},shallowEqual=function(et,_e){if(!et&&!_e||!et&&_e||et&&!_e)return!1;if(et===_e)return!0;const tt=Object.keys(et).sort(),rt=Object.keys(_e).sort();if(tt.length!==rt.length)return!1;for(let nt=0;nt<tt.length;nt++){const st=tt[nt];if(st!==rt[nt]||et[st]!==_e[st])return!1}return!0},getSyncSegmentCandidate=function(et,_e,tt){_e=_e||[];const rt=[];let nt=0;for(let st=0;st<_e.length;st++){const dt=_e[st];if(et===dt.timeline&&(rt.push(st),nt+=dt.duration,nt>tt))return st}return rt.length===0?0:rt[rt.length-1]},MIN_BACK_BUFFER=1,CHECK_BUFFER_DELAY=500,finite=et=>typeof et=="number"&&isFinite(et),MIN_SEGMENT_DURATION_TO_SAVE_STATS=1/60,illegalMediaSwitch=(et,_e,tt)=>et!=="main"||!_e||!tt?null:!tt.hasAudio&&!tt.hasVideo?"Neither audio nor video found in segment.":_e.hasVideo&&!tt.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!_e.hasVideo&&tt.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,safeBackBufferTrimTime=(et,_e,tt)=>{let rt=_e-Config.BACK_BUFFER_LENGTH;et.length&&(rt=Math.max(rt,et.start(0)));const nt=_e-tt;return Math.min(nt,rt)},segmentInfoString=et=>{const{startOfSegment:_e,duration:tt,segment:rt,part:nt,playlist:{mediaSequence:st,id:dt,segments:ft=[]},mediaIndex:ht,partIndex:mt,timeline:bt}=et,St=ft.length-1;let Et="mediaIndex/partIndex increment";et.getMediaInfoForTime?Et=`getMediaInfoForTime (${et.getMediaInfoForTime})`:et.isSyncRequest&&(Et="getSyncSegmentCandidate (isSyncRequest)"),et.independent&&(Et+=` with independent ${et.independent}`);const Ct=typeof mt=="number",Rt=et.segment.uri?"segment":"pre-segment",Tt=Ct?getKnownPartCount({preloadSegment:rt})-1:0;return`${Rt} [${st+ht}/${st+St}]`+(Ct?` part [${mt}/${Tt}]`:"")+` segment start/end [${rt.start} => ${rt.end}]`+(Ct?` part start/end [${nt.start} => ${nt.end}]`:"")+` startOfSegment [${_e}] duration [${tt}] timeline [${bt}] selected by [${Et}] playlist [${dt}]`},timingInfoPropertyForMedia=et=>`${et}TimingInfo`,timestampOffsetForSegment=({segmentTimeline:et,currentTimeline:_e,startOfSegment:tt,buffered:rt,overrideCheck:nt})=>!nt&&et===_e?null:et<_e?tt:rt.length?rt.end(rt.length-1):tt,shouldWaitForTimelineChange=({timelineChangeController:et,currentTimeline:_e,segmentTimeline:tt,loaderType:rt,audioDisabled:nt})=>{if(_e===tt)return!1;if(rt==="audio"){const st=et.lastTimelineChange({type:"main"});return!st||st.to!==tt}if(rt==="main"&&nt){const st=et.pendingTimelineChange({type:"audio"});return!(st&&st.to===tt)}return!1},shouldFixBadTimelineChanges=et=>{if(!et)return!1;const _e=et.pendingTimelineChange({type:"audio"}),tt=et.pendingTimelineChange({type:"main"}),rt=_e&&tt,nt=rt&&_e.to!==tt.to;return!!(rt&&_e.from!==-1&&tt.from!==-1&&nt)},isAudioTimelineBehind=et=>{const _e=et.timelineChangeController_.pendingTimelineChange({type:"audio"}),tt=et.timelineChangeController_.pendingTimelineChange({type:"main"});return _e&&tt&&_e.to<tt.to},checkAndFixTimelines=et=>{const _e=et.pendingSegment_;if(!_e)return;if(shouldWaitForTimelineChange({timelineChangeController:et.timelineChangeController_,currentTimeline:et.currentTimeline_,segmentTimeline:_e.timeline,loaderType:et.loaderType_,audioDisabled:et.audioDisabled_})&&shouldFixBadTimelineChanges(et.timelineChangeController_)){if(isAudioTimelineBehind(et)){et.timelineChangeController_.trigger("audioTimelineBehind");return}et.timelineChangeController_.trigger("fixBadTimelineChange")}},mediaDuration=et=>{let _e=0;return["video","audio"].forEach(function(tt){const rt=et[`${tt}TimingInfo`];if(!rt)return;const{start:nt,end:st}=rt;let dt;typeof nt=="bigint"||typeof st=="bigint"?dt=window$1.BigInt(st)-window$1.BigInt(nt):typeof nt=="number"&&typeof st=="number"&&(dt=st-nt),typeof dt<"u"&&dt>_e&&(_e=dt)}),typeof _e=="bigint"&&_e<Number.MAX_SAFE_INTEGER&&(_e=Number(_e)),_e},segmentTooLong=({segmentDuration:et,maxDuration:_e})=>et?Math.round(et)>_e+TIME_FUDGE_FACTOR:!1,getTroublesomeSegmentDurationMessage=(et,_e)=>{if(_e!=="hls")return null;const tt=mediaDuration({audioTimingInfo:et.audioTimingInfo,videoTimingInfo:et.videoTimingInfo});if(!tt)return null;const rt=et.playlist.targetDuration,nt=segmentTooLong({segmentDuration:tt,maxDuration:rt*2}),st=segmentTooLong({segmentDuration:tt,maxDuration:rt}),dt=`Segment with index ${et.mediaIndex} from playlist ${et.playlist.id} has a duration of ${tt} when the reported duration is ${et.duration} and the target duration is ${rt}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return nt||st?{severity:nt?"warn":"info",message:dt}:null},segmentInfoPayload=({type:et,segment:_e})=>{if(!_e)return;const tt=!!(_e.key||_e.map&&_e.map.ke),rt=!!(_e.map&&!_e.map.bytes),nt=_e.startOfSegment===void 0?_e.start:_e.startOfSegment;return{type:et||_e.type,uri:_e.resolvedUri||_e.uri,start:nt,duration:_e.duration,isEncrypted:tt,isMediaInitialization:rt}};class SegmentLoader extends videojs.EventTarget{constructor(_e,tt={}){if(super(),!_e)throw new TypeError("Initialization settings are required");if(typeof _e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!_e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=_e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=_e.hasPlayed,this.currentTime_=_e.currentTime,this.seekable_=_e.seekable,this.seeking_=_e.seeking,this.duration_=_e.duration,this.mediaSource_=_e.mediaSource,this.vhs_=_e.vhs,this.loaderType_=_e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=_e.segmentMetadataTrack,this.goalBufferLength_=_e.goalBufferLength,this.sourceType_=_e.sourceType,this.sourceUpdater_=_e.sourceUpdater,this.inbandTextTracks_=_e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=_e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=_e.parse708captions,this.useDtsForTimestampOffset_=_e.useDtsForTimestampOffset,this.captionServices_=_e.captionServices,this.exactManifestTimings=_e.exactManifestTimings,this.addMetadataToTextTrack=_e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=_e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=_e.decrypter,this.syncController_=_e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=logger$1(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(rt){rt!==this.state_&&(this.logger_(`${this.state_} -> ${rt}`),this.state_=rt,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():checkAndFixTimelines(this)}),this.sourceUpdater_.on("codecschange",rt=>{this.trigger(_extends({type:"codecschange"},rt))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():checkAndFixTimelines(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",rt=>{this.trigger(_extends({type:"timelinechange"},rt)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():checkAndFixTimelines(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():checkAndFixTimelines(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return segmentTransmuxer.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(_e){this.audioDisabled_=!_e,_e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,window$1.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(_e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==_e}error(_e){return typeof _e<"u"&&(this.logger_("error occurred:",_e),this.error_=_e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&segmentTransmuxer.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const _e=this.getMediaInfo_();if(!this.sourceUpdater_||!_e)return createTimeRanges();if(this.loaderType_==="main"){const{hasAudio:tt,hasVideo:rt,isMuxed:nt}=_e;if(rt&&tt&&!this.audioDisabled_&&!nt)return this.sourceUpdater_.buffered();if(rt)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(_e,tt=!1){if(!_e)return null;const rt=initSegmentId(_e);let nt=this.initSegments_[rt];return tt&&!nt&&_e.bytes&&(this.initSegments_[rt]=nt={resolvedUri:_e.resolvedUri,byterange:_e.byterange,bytes:_e.bytes,tracks:_e.tracks,timescales:_e.timescales}),nt||_e}segmentKey(_e,tt=!1){if(!_e)return null;const rt=segmentKeyId(_e);let nt=this.keyCache_[rt];this.cacheEncryptionKeys_&&tt&&!nt&&_e.bytes&&(this.keyCache_[rt]=nt={resolvedUri:_e.resolvedUri,bytes:_e.bytes});const st={resolvedUri:(nt||_e).resolvedUri};return nt&&(st.bytes=nt.bytes),st}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(_e,tt={}){if(!_e||this.playlist_&&this.playlist_.endList&&_e.endList&&this.playlist_.uri===_e.uri)return;const rt=this.playlist_,nt=this.pendingSegment_;this.playlist_=_e,this.xhrOptions_=tt,this.state==="INIT"&&(_e.syncInfo={mediaSequence:_e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(_e));let st=null;if(rt&&(rt.id?st=rt.id:rt.uri&&(st=rt.uri)),this.logger_(`playlist update [${st} => ${_e.id||_e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(_e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${lastBufferedEnd(this.buffered_())}
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!rt||rt.uri!==_e.uri){this.mediaIndex!==null&&(!_e.endList&&typeof _e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const dt=_e.mediaSequence-rt.mediaSequence;if(this.logger_(`live window shift [${dt}]`),this.mediaIndex!==null)if(this.mediaIndex-=dt,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const ft=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!ft.parts||!ft.parts.length||!ft.parts[this.partIndex])){const ht=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=ht}}nt&&(nt.mediaIndex-=dt,nt.mediaIndex<0?(nt.mediaIndex=null,nt.partIndex=null):(nt.mediaIndex>=0&&(nt.segment=_e.segments[nt.mediaIndex]),nt.partIndex>=0&&nt.segment.parts&&(nt.part=nt.segment.parts[nt.partIndex]))),this.syncController_.saveExpiredSegmentInfo(rt,_e)}pause(){this.checkBufferTimeout_&&(window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(_e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,_e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&segmentTransmuxer.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const _e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!_e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(_e,tt,rt=()=>{},nt=!1){if(tt===1/0&&(tt=this.duration_()),tt<=_e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let st=1;const dt=()=>{st--,st===0&&rt()};(nt||!this.audioDisabled_)&&(st++,this.sourceUpdater_.removeAudio(_e,tt,dt)),(nt||this.loaderType_==="main")&&(this.gopBuffer_=removeGopBuffer(this.gopBuffer_,_e,tt,this.timeMapping_),st++,this.sourceUpdater_.removeVideo(_e,tt,dt));for(const ft in this.inbandTextTracks_)removeCuesFromTrack(_e,tt,this.inbandTextTracks_[ft]);removeCuesFromTrack(_e,tt,this.segmentMetadataTrack_),dt()}monitorBuffer_(){this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window$1.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window$1.setTimeout(this.monitorBufferTick_.bind(this),CHECK_BUFFER_DELAY)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const _e=this.chooseNextRequest_();if(!_e)return;const tt={segmentInfo:segmentInfoPayload({type:this.loaderType_,segment:_e})};this.trigger({type:"segmentselected",metadata:tt}),typeof _e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:_e.timeline})),this.loadSegment_(_e)}isEndOfStream_(_e=this.mediaIndex,tt=this.playlist_,rt=this.partIndex){if(!tt||!this.mediaSource_)return!1;const nt=typeof _e=="number"&&tt.segments[_e],st=_e+1===tt.segments.length,dt=!nt||!nt.parts||rt+1===nt.parts.length;return tt.endList&&this.mediaSource_.readyState==="open"&&st&&dt}chooseNextRequest_(){const _e=this.buffered_(),tt=lastBufferedEnd(_e)||0,rt=timeAheadOf(_e,this.currentTime_()),nt=!this.hasPlayed_()&&rt>=1,st=rt>=this.goalBufferLength_(),dt=this.playlist_.segments;if(!dt.length||nt||st)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const ft={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(ft.isSyncRequest)ft.mediaIndex=getSyncSegmentCandidate(this.currentTimeline_,dt,tt),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${ft.mediaIndex}`);else if(this.mediaIndex!==null){const Et=dt[this.mediaIndex],Ct=typeof this.partIndex=="number"?this.partIndex:-1;ft.startOfSegment=Et.end?Et.end:tt,Et.parts&&Et.parts[Ct+1]?(ft.mediaIndex=this.mediaIndex,ft.partIndex=Ct+1):ft.mediaIndex=this.mediaIndex+1}else{let Et,Ct,Rt;const Tt=this.fetchAtBuffer_?tt:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${Tt}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${tt}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const wt=this.getSyncInfoFromMediaSequenceSync_(Tt);if(!wt){const At="No sync info found while using media sequence sync";return this.error({message:At,metadata:{errorType:videojs.Error.StreamingFailedToSelectNextSegment,error:new Error(At)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${wt.start} --> ${wt.end})`),Et=wt.segmentIndex,Ct=wt.partIndex,Rt=wt.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const wt=Playlist.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:Tt,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});Et=wt.segmentIndex,Ct=wt.partIndex,Rt=wt.startTime}ft.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${Tt}`:`currentTime ${Tt}`,ft.mediaIndex=Et,ft.startOfSegment=Rt,ft.partIndex=Ct,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${ft.mediaIndex} `)}const ht=dt[ft.mediaIndex];let mt=ht&&typeof ft.partIndex=="number"&&ht.parts&&ht.parts[ft.partIndex];if(!ht||typeof ft.partIndex=="number"&&!mt)return null;typeof ft.partIndex!="number"&&ht.parts&&(ft.partIndex=0,mt=ht.parts[0]);const bt=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!rt&&mt&&!bt&&!mt.independent)if(ft.partIndex===0){const Et=dt[ft.mediaIndex-1],Ct=Et.parts&&Et.parts.length&&Et.parts[Et.parts.length-1];Ct&&Ct.independent&&(ft.mediaIndex-=1,ft.partIndex=Et.parts.length-1,ft.independent="previous segment")}else ht.parts[ft.partIndex-1].independent&&(ft.partIndex-=1,ft.independent="previous part");const St=this.mediaSource_&&this.mediaSource_.readyState==="ended";return ft.mediaIndex>=dt.length-1&&St&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,ft.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(ft))}getSyncInfoFromMediaSequenceSync_(_e){if(!this.mediaSequenceSync_)return null;const tt=Math.max(_e,this.mediaSequenceSync_.start);_e!==tt&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${_e} to ${tt}`);const rt=this.mediaSequenceSync_.getSyncInfoForTime(tt);if(!rt)return null;if(!rt.isAppended)return rt;const nt=this.mediaSequenceSync_.getSyncInfoForTime(rt.end);return nt?(nt.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),nt):null}generateSegmentInfo_(_e){const{independent:tt,playlist:rt,mediaIndex:nt,startOfSegment:st,isSyncRequest:dt,partIndex:ft,forceTimestampOffset:ht,getMediaInfoForTime:mt}=_e,bt=rt.segments[nt],St=typeof ft=="number"&&bt.parts[ft],Et={requestId:"segment-loader-"+Math.random(),uri:St&&St.resolvedUri||bt.resolvedUri,mediaIndex:nt,partIndex:St?ft:null,isSyncRequest:dt,startOfSegment:st,playlist:rt,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:bt.timeline,duration:St&&St.duration||bt.duration,segment:bt,part:St,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:mt,independent:tt},Ct=typeof ht<"u"?ht:this.isPendingTimestampOffset_;Et.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:bt.timeline,currentTimeline:this.currentTimeline_,startOfSegment:st,buffered:this.buffered_(),overrideCheck:Ct});const Rt=lastBufferedEnd(this.sourceUpdater_.audioBuffered());return typeof Rt=="number"&&(Et.audioAppendStart=Rt-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(Et.gopsToAlignWith=gopsSafeToAlignWith(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),Et}timestampOffsetForSegment_(_e){return timestampOffsetForSegment(_e)}earlyAbortWhenNeeded_(_e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(_e.firstBytesReceivedAt||Date.now())<1e3)return;const tt=this.currentTime_(),rt=_e.bandwidth,nt=this.pendingSegment_.duration,st=Playlist.estimateSegmentRequestTime(nt,rt,this.playlist_,_e.bytesReceived),dt=timeUntilRebuffer(this.buffered_(),tt,this.vhs_.tech_.playbackRate())-1;if(st<=dt)return;const ft=minRebufferMaxBandwidthSelector({main:this.vhs_.playlists.main,currentTime:tt,bandwidth:rt,duration:this.duration_(),segmentDuration:nt,timeUntilRebuffer:dt,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!ft)return;const mt=st-dt-ft.rebufferingImpact;let bt=.5;dt<=TIME_FUDGE_FACTOR&&(bt=1),!(!ft.playlist||ft.playlist.uri===this.playlist_.uri||mt<bt)&&(this.bandwidth=ft.playlist.attributes.BANDWIDTH*Config.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(_e){this.logger_(`Aborting ${segmentInfoString(_e)}`),this.mediaRequestsAborted+=1}handleProgress_(_e,tt){this.earlyAbortWhenNeeded_(tt.stats),!this.checkForAbort_(tt.requestId)&&this.trigger("progress")}handleTrackInfo_(_e,tt){const{hasAudio:rt,hasVideo:nt}=tt,st={segmentInfo:segmentInfoPayload({type:this.loaderType_,segment:_e}),trackInfo:{hasAudio:rt,hasVideo:nt}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:st}),this.earlyAbortWhenNeeded_(_e.stats),!this.checkForAbort_(_e.requestId)&&(this.checkForIllegalMediaSwitch(tt)||(tt=tt||{},shallowEqual(this.currentMediaInfo_,tt)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=tt,this.currentMediaInfo_=tt,this.logger_("trackinfo update",tt),this.trigger("trackinfo")),!this.checkForAbort_(_e.requestId)&&(this.pendingSegment_.trackInfo=tt,this.hasEnoughInfoToAppend_()?this.processCallQueue_():checkAndFixTimelines(this))))}handleTimingInfo_(_e,tt,rt,nt){if(this.earlyAbortWhenNeeded_(_e.stats),this.checkForAbort_(_e.requestId))return;const st=this.pendingSegment_,dt=timingInfoPropertyForMedia(tt);st[dt]=st[dt]||{},st[dt][rt]=nt,this.logger_(`timinginfo: ${tt} - ${rt} - ${nt}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():checkAndFixTimelines(this)}handleCaptions_(_e,tt){if(this.earlyAbortWhenNeeded_(_e.stats),this.checkForAbort_(_e.requestId))return;if(tt.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,_e,tt));return}const nt=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),st={};tt.forEach(dt=>{st[dt.stream]=st[dt.stream]||{startTime:1/0,captions:[],endTime:0};const ft=st[dt.stream];ft.startTime=Math.min(ft.startTime,dt.startTime+nt),ft.endTime=Math.max(ft.endTime,dt.endTime+nt),ft.captions.push(dt)}),Object.keys(st).forEach(dt=>{const{startTime:ft,endTime:ht,captions:mt}=st[dt],bt=this.inbandTextTracks_;this.logger_(`adding cues from ${ft} -> ${ht} for ${dt}`),createCaptionsTrackIfNotExists(bt,this.vhs_.tech_,dt),removeCuesFromTrack(ft,ht,bt[dt]),addCaptionData({captionArray:mt,inbandTextTracks:bt,timestampOffset:nt})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(_e,tt,rt){if(this.earlyAbortWhenNeeded_(_e.stats),this.checkForAbort_(_e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,_e,tt,rt));return}this.addMetadataToTextTrack(rt,tt,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(_e=>_e()),this.metadataQueue_.caption.forEach(_e=>_e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const _e=this.callQueue_;this.callQueue_=[],_e.forEach(tt=>tt())}processLoadQueue_(){const _e=this.loadQueue_;this.loadQueue_=[],_e.forEach(tt=>tt())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const _e=this.pendingSegment_;return _e?this.getCurrentMediaInfo_()?!shouldWaitForTimelineChange({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:_e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(_e=this.pendingSegment_){return _e&&_e.trackInfo||this.currentMediaInfo_}getMediaInfo_(_e=this.pendingSegment_){return this.getCurrentMediaInfo_(_e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const _e=this.pendingSegment_,tt=this.getCurrentMediaInfo_();if(!_e||!tt)return!1;const{hasAudio:rt,hasVideo:nt,isMuxed:st}=tt;return!(nt&&!_e.videoTimingInfo||rt&&!this.audioDisabled_&&!st&&!_e.audioTimingInfo||shouldWaitForTimelineChange({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:_e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(_e,tt){if(this.earlyAbortWhenNeeded_(_e.stats),this.checkForAbort_(_e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){checkAndFixTimelines(this),this.callQueue_.push(this.handleData_.bind(this,_e,tt));return}const rt=this.pendingSegment_;if(this.setTimeMapping_(rt.timeline),this.updateMediaSecondsLoaded_(rt.part||rt.segment),this.mediaSource_.readyState!=="closed"){if(_e.map&&(_e.map=this.initSegmentForMap(_e.map,!0),rt.segment.map=_e.map),_e.key&&this.segmentKey(_e.key,!0),rt.isFmp4=_e.isFmp4,rt.timingInfo=rt.timingInfo||{},rt.isFmp4)this.trigger("fmp4"),rt.timingInfo.start=rt[timingInfoPropertyForMedia(tt.type)].start;else{const nt=this.getCurrentMediaInfo_(),st=this.loaderType_==="main"&&nt&&nt.hasVideo;let dt;st&&(dt=rt.videoTimingInfo.start),rt.timingInfo.start=this.trueSegmentStart_({currentStart:rt.timingInfo.start,playlist:rt.playlist,mediaIndex:rt.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:st,firstVideoFrameTimeForData:dt,videoTimingInfo:rt.videoTimingInfo,audioTimingInfo:rt.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(rt,tt.type),this.updateSourceBufferTimestampOffset_(rt),rt.isSyncRequest){this.updateTimingInfoEnd_(rt),this.syncController_.saveSegmentTimingInfo({segmentInfo:rt,shouldSaveTimelineMapping:this.loaderType_==="main"});const nt=this.chooseNextRequest_();if(nt.mediaIndex!==rt.mediaIndex||nt.partIndex!==rt.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}rt.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(rt,tt)}}updateAppendInitSegmentStatus(_e,tt){this.loaderType_==="main"&&typeof _e.timestampOffset=="number"&&!_e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[tt]!==_e.playlist&&(this.appendInitSegment_[tt]=!0)}getInitSegmentAndUpdateState_({type:_e,initSegment:tt,map:rt,playlist:nt}){if(rt){const st=initSegmentId(rt);if(this.activeInitSegmentId_===st)return null;tt=this.initSegmentForMap(rt,!0).bytes,this.activeInitSegmentId_=st}return tt&&this.appendInitSegment_[_e]?(this.playlistOfLastInitSegment_[_e]=nt,this.appendInitSegment_[_e]=!1,this.activeInitSegmentId_=null,tt):null}handleQuotaExceededError_({segmentInfo:_e,type:tt,bytes:rt},nt){const st=this.sourceUpdater_.audioBuffered(),dt=this.sourceUpdater_.videoBuffered();st.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+timeRangesToArray(st).join(", ")),dt.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+timeRangesToArray(dt).join(", "));const ft=st.length?st.start(0):0,ht=st.length?st.end(st.length-1):0,mt=dt.length?dt.start(0):0,bt=dt.length?dt.end(dt.length-1):0;if(ht-ft<=MIN_BACK_BUFFER&&bt-mt<=MIN_BACK_BUFFER){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${rt.byteLength}, audio buffer: ${timeRangesToArray(st).join(", ")}, video buffer: ${timeRangesToArray(dt).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:_e,type:tt,bytes:rt}));const Et=this.currentTime_()-MIN_BACK_BUFFER;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${Et}`),this.remove(0,Et,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${MIN_BACK_BUFFER}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=window$1.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},MIN_BACK_BUFFER*1e3)},!0)}handleAppendError_({segmentInfo:_e,type:tt,bytes:rt},nt){if(nt){if(nt.code===QUOTA_EXCEEDED_ERR){this.handleQuotaExceededError_({segmentInfo:_e,type:tt,bytes:rt});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",nt),this.error({message:`${tt} append of ${rt.length}b failed for segment #${_e.mediaIndex} in playlist ${_e.playlist.id}`,metadata:{errorType:videojs.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:_e,type:tt,initSegment:rt,data:nt,bytes:st}){if(!st){const ft=[nt];let ht=nt.byteLength;rt&&(ft.unshift(rt),ht+=rt.byteLength),st=concatSegments({bytes:ht,segments:ft})}const dt={segmentInfo:segmentInfoPayload({type:this.loaderType_,segment:_e})};this.trigger({type:"segmentappendstart",metadata:dt}),this.sourceUpdater_.appendBuffer({segmentInfo:_e,type:tt,bytes:st},this.handleAppendError_.bind(this,{segmentInfo:_e,type:tt,bytes:st}))}handleSegmentTimingInfo_(_e,tt,rt){if(!this.pendingSegment_||tt!==this.pendingSegment_.requestId)return;const nt=this.pendingSegment_.segment,st=`${_e}TimingInfo`;nt[st]||(nt[st]={}),nt[st].transmuxerPrependedSeconds=rt.prependedContentDuration||0,nt[st].transmuxedPresentationStart=rt.start.presentation,nt[st].transmuxedDecodeStart=rt.start.decode,nt[st].transmuxedPresentationEnd=rt.end.presentation,nt[st].transmuxedDecodeEnd=rt.end.decode,nt[st].baseMediaDecodeTime=rt.baseMediaDecodeTime}appendData_(_e,tt){const{type:rt,data:nt}=tt;if(!nt||!nt.byteLength||rt==="audio"&&this.audioDisabled_)return;const st=this.getInitSegmentAndUpdateState_({type:rt,initSegment:tt.initSegment,playlist:_e.playlist,map:_e.isFmp4?_e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:_e,type:rt,initSegment:st,data:nt})}loadSegment_(_e){if(this.state="WAITING",this.pendingSegment_=_e,this.trimBackBuffer_(_e),typeof _e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){checkAndFixTimelines(this),this.loadQueue_.push(()=>{const tt=_extends({},_e,{forceTimestampOffset:!0});_extends(_e,this.generateSegmentInfo_(tt)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(_e)});return}this.updateTransmuxerAndRequestSegment_(_e)}updateTransmuxerAndRequestSegment_(_e){this.shouldUpdateTransmuxerTimestampOffset_(_e.timestampOffset)&&(this.gopBuffer_.length=0,_e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:_e.timestampOffset}));const tt=this.createSimplifiedSegmentObj_(_e),rt=this.isEndOfStream_(_e.mediaIndex,_e.playlist,_e.partIndex),nt=this.mediaIndex!==null,st=_e.timeline!==this.currentTimeline_&&_e.timeline>0,dt=rt||nt&&st;this.logger_(`Requesting
${compactSegmentUrlDescription(_e.uri)}
${segmentInfoString(_e)}`),tt.map&&!tt.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),_e.abortRequests=mediaSegmentRequest({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:tt,abortFn:this.handleAbort_.bind(this,_e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",_e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",_e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:dt,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:ft,level:ht,stream:mt})=>{this.logger_(`${segmentInfoString(_e)} logged from transmuxer stream ${mt} as a ${ht}: ${ft}`)},triggerSegmentEventFn:({type:ft,segment:ht,keyInfo:mt,trackInfo:bt,timingInfo:St})=>{const Ct={segmentInfo:segmentInfoPayload({segment:ht})};mt&&(Ct.keyInfo=mt),bt&&(Ct.trackInfo=bt),St&&(Ct.timingInfo=St),this.trigger({type:ft,metadata:Ct})}})}trimBackBuffer_(_e){const tt=safeBackBufferTrimTime(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);tt>0&&this.remove(0,tt)}createSimplifiedSegmentObj_(_e){const tt=_e.segment,rt=_e.part,nt=_e.segment.key||_e.segment.map&&_e.segment.map.key,st=_e.segment.map&&!_e.segment.map.bytes,dt={resolvedUri:rt?rt.resolvedUri:tt.resolvedUri,byterange:rt?rt.byterange:tt.byterange,requestId:_e.requestId,transmuxer:_e.transmuxer,audioAppendStart:_e.audioAppendStart,gopsToAlignWith:_e.gopsToAlignWith,part:_e.part,type:this.loaderType_,start:_e.startOfSegment,duration:_e.duration,isEncrypted:nt,isMediaInitialization:st},ft=_e.playlist.segments[_e.mediaIndex-1];if(ft&&ft.timeline===tt.timeline&&(ft.videoTimingInfo?dt.baseStartTime=ft.videoTimingInfo.transmuxedDecodeEnd:ft.audioTimingInfo&&(dt.baseStartTime=ft.audioTimingInfo.transmuxedDecodeEnd)),tt.key){const ht=tt.key.iv||new Uint32Array([0,0,0,_e.mediaIndex+_e.playlist.mediaSequence]);dt.key=this.segmentKey(tt.key),dt.key.iv=ht}return tt.map&&(dt.map=this.initSegmentForMap(tt.map)),dt}saveTransferStats_(_e){this.mediaRequests+=1,_e&&(this.mediaBytesTransferred+=_e.bytesReceived,this.mediaTransferDuration+=_e.roundTripTime)}saveBandwidthRelatedStats_(_e,tt){if(this.pendingSegment_.byteLength=tt.bytesReceived,_e<MIN_SEGMENT_DURATION_TO_SAVE_STATS){this.logger_(`Ignoring segment's bandwidth because its duration of ${_e} is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);return}const rt={bandwidthInfo:{from:this.bandwidth,to:tt.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:rt}),this.bandwidth=tt.bandwidth,this.roundTrip=tt.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(_e,tt,rt){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,_e,tt,rt));return}if(this.saveTransferStats_(tt.stats),!this.pendingSegment_||tt.requestId!==this.pendingSegment_.requestId)return;if(_e){if(this.pendingSegment_=null,this.state="READY",_e.code===REQUEST_ERRORS.ABORTED)return;if(this.pause(),_e.code===REQUEST_ERRORS.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(_e),this.trigger("error");return}const nt=this.pendingSegment_;this.saveBandwidthRelatedStats_(nt.duration,tt.stats),nt.endOfAllRequests=tt.endOfAllRequests,rt.gopInfo&&(this.gopBuffer_=updateGopBuffer(this.gopBuffer_,rt.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(nt)}setTimeMapping_(_e){const tt=this.syncController_.mappingForTimeline(_e);tt!==null&&(this.timeMapping_=tt)}updateMediaSecondsLoaded_(_e){typeof _e.start=="number"&&typeof _e.end=="number"?this.mediaSecondsLoaded+=_e.end-_e.start:this.mediaSecondsLoaded+=_e.duration}shouldUpdateTransmuxerTimestampOffset_(_e){return _e===null?!1:this.loaderType_==="main"&&_e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&_e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:_e,playlist:tt,mediaIndex:rt,firstVideoFrameTimeForData:nt,currentVideoTimestampOffset:st,useVideoTimingInfo:dt,videoTimingInfo:ft,audioTimingInfo:ht}){if(typeof _e<"u")return _e;if(!dt)return ht.start;const mt=tt.segments[rt-1];return rt===0||!mt||typeof mt.start>"u"||mt.end!==nt+st?nt:ft.start}waitForAppendsToComplete_(_e){const tt=this.getCurrentMediaInfo_(_e);if(!tt){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:rt,hasVideo:nt,isMuxed:st}=tt,dt=this.loaderType_==="main"&&nt,ft=!this.audioDisabled_&&rt&&!st;if(_e.waitingOnAppends=0,!_e.hasAppendedData_){!_e.timingInfo&&typeof _e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),_e.timingInfo={start:0},_e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(_e),this.processMetadataQueue_()),this.checkAppendsDone_(_e);return}dt&&_e.waitingOnAppends++,ft&&_e.waitingOnAppends++,dt&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,_e)),ft&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,_e))}checkAppendsDone_(_e){this.checkForAbort_(_e.requestId)||(_e.waitingOnAppends--,_e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(_e){const tt=illegalMediaSwitch(this.loaderType_,this.getCurrentMediaInfo_(),_e);return tt?(this.error({message:tt,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(_e){if(_e.timestampOffset===null||typeof _e.timingInfo.start!="number"||_e.changedTimestampOffset||this.loaderType_!=="main")return;let tt=!1;_e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:_e.segment.videoTimingInfo,audioTimingInfo:_e.segment.audioTimingInfo,timingInfo:_e.timingInfo}),_e.changedTimestampOffset=!0,_e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(_e.timestampOffset),tt=!0),_e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(_e.timestampOffset),tt=!0),tt&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:_e,audioTimingInfo:tt,timingInfo:rt}){return this.useDtsForTimestampOffset_?_e&&typeof _e.transmuxedDecodeStart=="number"?_e.transmuxedDecodeStart:tt&&typeof tt.transmuxedDecodeStart=="number"?tt.transmuxedDecodeStart:rt.start:rt.start}updateTimingInfoEnd_(_e){_e.timingInfo=_e.timingInfo||{};const tt=this.getMediaInfo_(),nt=this.loaderType_==="main"&&tt&&tt.hasVideo&&_e.videoTimingInfo?_e.videoTimingInfo:_e.audioTimingInfo;nt&&(_e.timingInfo.end=typeof nt.end=="number"?nt.end:nt.start+_e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const ht={segmentInfo:segmentInfoPayload({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:ht})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const _e=this.pendingSegment_;_e.part&&_e.part.syncInfo?_e.part.syncInfo.markAppended():_e.segment.syncInfo&&_e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(_e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:_e,shouldSaveTimelineMapping:this.loaderType_==="main"});const tt=getTroublesomeSegmentDurationMessage(_e,this.sourceType_);if(tt&&(tt.severity==="warn"?videojs.log.warn(tt.message):this.logger_(tt.message)),this.recordThroughput_(_e),this.pendingSegment_=null,this.state="READY",_e.isSyncRequest&&(this.trigger("syncinfoupdate"),!_e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${segmentInfoString(_e)}`);return}this.logger_(`Appended ${segmentInfoString(_e)}`),this.addSegmentMetadataCue_(_e),this.fetchAtBuffer_=!0,this.currentTimeline_!==_e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:_e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:_e.timeline})),this.currentTimeline_=_e.timeline,this.trigger("syncinfoupdate");const rt=_e.segment,nt=_e.part,st=rt.end&&this.currentTime_()-rt.end>_e.playlist.targetDuration*3,dt=nt&&nt.end&&this.currentTime_()-nt.end>_e.playlist.partTargetDuration*3;if(st||dt){this.logger_(`bad ${st?"segment":"part"} ${segmentInfoString(_e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=_e.mediaIndex,this.partIndex=_e.partIndex,this.isEndOfStream_(_e.mediaIndex,_e.playlist,_e.partIndex)&&this.endOfStream(),this.trigger("appended"),_e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(_e){if(_e.duration<MIN_SEGMENT_DURATION_TO_SAVE_STATS){this.logger_(`Ignoring segment's throughput because its duration of ${_e.duration} is less than the min to record ${MIN_SEGMENT_DURATION_TO_SAVE_STATS}`);return}const tt=this.throughput.rate,rt=Date.now()-_e.endOfAllRequests+1,nt=Math.floor(_e.byteLength/rt*8*1e3);this.throughput.rate+=(nt-tt)/++this.throughput.count}addSegmentMetadataCue_(_e){if(!this.segmentMetadataTrack_)return;const tt=_e.segment,rt=tt.start,nt=tt.end;if(!finite(rt)||!finite(nt))return;removeCuesFromTrack(rt,nt,this.segmentMetadataTrack_);const st=window$1.WebKitDataCue||window$1.VTTCue,dt={custom:tt.custom,dateTimeObject:tt.dateTimeObject,dateTimeString:tt.dateTimeString,programDateTime:tt.programDateTime,bandwidth:_e.playlist.attributes.BANDWIDTH,resolution:_e.playlist.attributes.RESOLUTION,codecs:_e.playlist.attributes.CODECS,byteLength:_e.byteLength,uri:_e.uri,timeline:_e.timeline,playlist:_e.playlist.id,start:rt,end:nt},ft=JSON.stringify(dt),ht=new st(rt,nt,ft);ht.value=dt,this.segmentMetadataTrack_.addCue(ht)}}function noop$5(){}const toTitleCase=function(et){return typeof et!="string"?et:et.replace(/./,_e=>_e.toUpperCase())},bufferTypes=["video","audio"],updating=(et,_e)=>{const tt=_e[`${et}Buffer`];return tt&&tt.updating||_e.queuePending[et]},nextQueueIndexOfType=(et,_e)=>{for(let tt=0;tt<_e.length;tt++){const rt=_e[tt];if(rt.type==="mediaSource")return null;if(rt.type===et)return tt}return null},shiftQueue=(et,_e)=>{if(_e.queue.length===0)return;let tt=0,rt=_e.queue[tt];if(rt.type==="mediaSource"){!_e.updating()&&_e.mediaSource.readyState!=="closed"&&(_e.queue.shift(),rt.action(_e),rt.doneFn&&rt.doneFn(),shiftQueue("audio",_e),shiftQueue("video",_e));return}if(et!=="mediaSource"&&!(!_e.ready()||_e.mediaSource.readyState==="closed"||updating(et,_e))){if(rt.type!==et){if(tt=nextQueueIndexOfType(et,_e.queue),tt===null)return;rt=_e.queue[tt]}if(_e.queue.splice(tt,1),_e.queuePending[et]=rt,rt.action(et,_e),!rt.doneFn){_e.queuePending[et]=null,shiftQueue(et,_e);return}}},cleanupBuffer=(et,_e)=>{const tt=_e[`${et}Buffer`],rt=toTitleCase(et);tt&&(tt.removeEventListener("updateend",_e[`on${rt}UpdateEnd_`]),tt.removeEventListener("error",_e[`on${rt}Error_`]),_e.codecs[et]=null,_e[`${et}Buffer`]=null)},inSourceBuffers=(et,_e)=>et&&_e&&Array.prototype.indexOf.call(et.sourceBuffers,_e)!==-1,actions={appendBuffer:(et,_e,tt)=>(rt,nt)=>{const st=nt[`${rt}Buffer`];if(inSourceBuffers(nt.mediaSource,st)){nt.logger_(`Appending segment ${_e.mediaIndex}'s ${et.length} bytes to ${rt}Buffer`);try{st.appendBuffer(et)}catch(dt){nt.logger_(`Error with code ${dt.code} `+(dt.code===QUOTA_EXCEEDED_ERR?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${_e.mediaIndex} to ${rt}Buffer`),nt.queuePending[rt]=null,tt(dt)}}},remove:(et,_e)=>(tt,rt)=>{const nt=rt[`${tt}Buffer`];if(inSourceBuffers(rt.mediaSource,nt)){rt.logger_(`Removing ${et} to ${_e} from ${tt}Buffer`);try{nt.remove(et,_e)}catch{rt.logger_(`Remove ${et} to ${_e} from ${tt}Buffer failed`)}}},timestampOffset:et=>(_e,tt)=>{const rt=tt[`${_e}Buffer`];inSourceBuffers(tt.mediaSource,rt)&&(tt.logger_(`Setting ${_e}timestampOffset to ${et}`),rt.timestampOffset=et)},callback:et=>(_e,tt)=>{et()},endOfStream:et=>_e=>{if(_e.mediaSource.readyState==="open"){_e.logger_(`Calling mediaSource endOfStream(${et||""})`);try{_e.mediaSource.endOfStream(et)}catch(tt){videojs.log.warn("Failed to call media source endOfStream",tt)}}},duration:et=>_e=>{_e.logger_(`Setting mediaSource duration to ${et}`);try{_e.mediaSource.duration=et}catch(tt){videojs.log.warn("Failed to set media source duration",tt)}},abort:()=>(et,_e)=>{if(_e.mediaSource.readyState!=="open")return;const tt=_e[`${et}Buffer`];if(inSourceBuffers(_e.mediaSource,tt)){_e.logger_(`calling abort on ${et}Buffer`);try{tt.abort()}catch(rt){videojs.log.warn(`Failed to abort on ${et}Buffer`,rt)}}},addSourceBuffer:(et,_e)=>tt=>{const rt=toTitleCase(et),nt=getMimeForCodec(_e);tt.logger_(`Adding ${et}Buffer with codec ${_e} to mediaSource`);const st=tt.mediaSource.addSourceBuffer(nt);st.addEventListener("updateend",tt[`on${rt}UpdateEnd_`]),st.addEventListener("error",tt[`on${rt}Error_`]),tt.codecs[et]=_e,tt[`${et}Buffer`]=st},removeSourceBuffer:et=>_e=>{const tt=_e[`${et}Buffer`];if(cleanupBuffer(et,_e),!!inSourceBuffers(_e.mediaSource,tt)){_e.logger_(`Removing ${et}Buffer with codec ${_e.codecs[et]} from mediaSource`);try{_e.mediaSource.removeSourceBuffer(tt)}catch(rt){videojs.log.warn(`Failed to removeSourceBuffer ${et}Buffer`,rt)}}},changeType:et=>(_e,tt)=>{const rt=tt[`${_e}Buffer`],nt=getMimeForCodec(et);if(!inSourceBuffers(tt.mediaSource,rt))return;const st=et.substring(0,et.indexOf(".")),dt=tt.codecs[_e];if(dt.substring(0,dt.indexOf("."))===st)return;const ht={codecsChangeInfo:{from:dt,to:et}};tt.trigger({type:"codecschange",metadata:ht}),tt.logger_(`changing ${_e}Buffer codec from ${dt} to ${et}`);try{rt.changeType(nt),tt.codecs[_e]=et}catch(mt){ht.errorType=videojs.Error.StreamingCodecsChangeError,ht.error=mt,mt.metadata=ht,tt.error_=mt,tt.trigger("error"),videojs.log.warn(`Failed to changeType on ${_e}Buffer`,mt)}}},pushQueue=({type:et,sourceUpdater:_e,action:tt,doneFn:rt,name:nt})=>{_e.queue.push({type:et,action:tt,doneFn:rt,name:nt}),shiftQueue(et,_e)},onUpdateend=(et,_e)=>tt=>{const rt=_e[`${et}Buffered`](),nt=bufferedRangesToString(rt);if(_e.logger_(`received "updateend" event for ${et} Source Buffer: `,nt),_e.queuePending[et]){const st=_e.queuePending[et].doneFn;_e.queuePending[et]=null,st&&st(_e[`${et}Error_`])}shiftQueue(et,_e)};class SourceUpdater extends videojs.EventTarget{constructor(_e){super(),this.mediaSource=_e,this.sourceopenListener_=()=>shiftQueue("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=logger$1("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=onUpdateend("video",this),this.onAudioUpdateEnd_=onUpdateend("audio",this),this.onVideoError_=tt=>{this.videoError_=tt},this.onAudioError_=tt=>{this.audioError_=tt},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(_e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(_e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(_e,tt){pushQueue({type:"mediaSource",sourceUpdater:this,action:actions.addSourceBuffer(_e,tt),name:"addSourceBuffer"})}abort(_e){pushQueue({type:_e,sourceUpdater:this,action:actions.abort(_e),name:"abort"})}removeSourceBuffer(_e){if(!this.canRemoveSourceBuffer()){videojs.log.error("removeSourceBuffer is not supported!");return}pushQueue({type:"mediaSource",sourceUpdater:this,action:actions.removeSourceBuffer(_e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!videojs.browser.IS_FIREFOX&&window$1.MediaSource&&window$1.MediaSource.prototype&&typeof window$1.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return window$1.SourceBuffer&&window$1.SourceBuffer.prototype&&typeof window$1.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(_e,tt){if(!this.canChangeType()){videojs.log.error("changeType is not supported!");return}pushQueue({type:_e,sourceUpdater:this,action:actions.changeType(tt),name:"changeType"})}addOrChangeSourceBuffers(_e){if(!_e||typeof _e!="object"||Object.keys(_e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(_e).forEach(tt=>{const rt=_e[tt];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(tt,rt);this.canChangeType()&&this.changeType(tt,rt)})}appendBuffer(_e,tt){const{segmentInfo:rt,type:nt,bytes:st}=_e;if(this.processedAppend_=!0,nt==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([_e,tt]),this.logger_(`delayed audio append of ${st.length} until video append`);return}const dt=tt;if(pushQueue({type:nt,sourceUpdater:this,action:actions.appendBuffer(st,rt||{mediaIndex:-1},dt),doneFn:tt,name:"appendBuffer"}),nt==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const ft=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${ft.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,ft.forEach(ht=>{this.appendBuffer.apply(this,ht)})}}audioBuffered(){return inSourceBuffers(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:createTimeRanges()}videoBuffered(){return inSourceBuffers(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:createTimeRanges()}buffered(){const _e=inSourceBuffers(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,tt=inSourceBuffers(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return tt&&!_e?this.audioBuffered():_e&&!tt?this.videoBuffered():bufferIntersection(this.audioBuffered(),this.videoBuffered())}setDuration(_e,tt=noop$5){pushQueue({type:"mediaSource",sourceUpdater:this,action:actions.duration(_e),name:"duration",doneFn:tt})}endOfStream(_e=null,tt=noop$5){typeof _e!="string"&&(_e=void 0),pushQueue({type:"mediaSource",sourceUpdater:this,action:actions.endOfStream(_e),name:"endOfStream",doneFn:tt})}removeAudio(_e,tt,rt=noop$5){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){rt();return}pushQueue({type:"audio",sourceUpdater:this,action:actions.remove(_e,tt),doneFn:rt,name:"remove"})}removeVideo(_e,tt,rt=noop$5){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){rt();return}pushQueue({type:"video",sourceUpdater:this,action:actions.remove(_e,tt),doneFn:rt,name:"remove"})}updating(){return!!(updating("audio",this)||updating("video",this))}audioTimestampOffset(_e){return typeof _e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==_e&&(pushQueue({type:"audio",sourceUpdater:this,action:actions.timestampOffset(_e),name:"timestampOffset"}),this.audioTimestampOffset_=_e),this.audioTimestampOffset_}videoTimestampOffset(_e){return typeof _e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==_e&&(pushQueue({type:"video",sourceUpdater:this,action:actions.timestampOffset(_e),name:"timestampOffset"}),this.videoTimestampOffset_=_e),this.videoTimestampOffset_}audioQueueCallback(_e){this.audioBuffer&&pushQueue({type:"audio",sourceUpdater:this,action:actions.callback(_e),name:"callback"})}videoQueueCallback(_e){this.videoBuffer&&pushQueue({type:"video",sourceUpdater:this,action:actions.callback(_e),name:"callback"})}dispose(){this.trigger("dispose"),bufferTypes.forEach(_e=>{this.abort(_e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(_e):this[`${_e}QueueCallback`](()=>cleanupBuffer(_e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const uint8ToUtf8=et=>decodeURIComponent(escape(String.fromCharCode.apply(null,et))),bufferToHexString=et=>{const _e=new Uint8Array(et);return Array.from(_e).map(tt=>tt.toString(16).padStart(2,"0")).join("")},VTT_LINE_TERMINATORS=new Uint8Array(`
`.split("").map(et=>et.charCodeAt(0)));class NoVttJsError extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class VTTSegmentLoader extends SegmentLoader{constructor(_e,tt={}){super(_e,tt),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=_e.featuresNativeTextTracks,this.loadVttJs=_e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return createTimeRanges();const _e=this.subtitlesTrack_.cues,tt=_e[0].startTime,rt=_e[_e.length-1].startTime;return createTimeRanges([[tt,rt]])}initSegmentForMap(_e,tt=!1){if(!_e)return null;const rt=initSegmentId(_e);let nt=this.initSegments_[rt];if(tt&&!nt&&_e.bytes){const st=VTT_LINE_TERMINATORS.byteLength+_e.bytes.byteLength,dt=new Uint8Array(st);dt.set(_e.bytes),dt.set(VTT_LINE_TERMINATORS,_e.bytes.byteLength),this.initSegments_[rt]=nt={resolvedUri:_e.resolvedUri,byterange:_e.byterange,bytes:dt}}return nt||_e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(_e){return typeof _e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=_e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(_e,tt){removeCuesFromTrack(_e,tt,this.subtitlesTrack_)}fillBuffer_(){const _e=this.chooseNextRequest_();if(_e){if(this.syncController_.timestampOffsetForTimeline(_e.timeline)===null){const tt=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",tt),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(_e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(_e){for(;_e&&_e.segment.empty;){if(_e.mediaIndex+1>=_e.playlist.segments.length){_e=null;break}_e=this.generateSegmentInfo_({playlist:_e.playlist,mediaIndex:_e.mediaIndex+1,startOfSegment:_e.startOfSegment+_e.duration,isSyncRequest:_e.isSyncRequest})}return _e}stopForError(_e){this.error(_e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(_e,tt,rt){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(tt.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(_e){_e.code===REQUEST_ERRORS.TIMEOUT&&this.handleTimeout_(),_e.code===REQUEST_ERRORS.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(_e);return}const nt=this.pendingSegment_,st=rt.mp4VttCues&&rt.mp4VttCues.length;st&&(nt.mp4VttCues=rt.mp4VttCues),this.saveBandwidthRelatedStats_(nt.duration,tt.stats),tt.key&&this.segmentKey(tt.key,!0),this.state="APPENDING",this.trigger("appending");const dt=nt.segment;if(dt.map&&(dt.map.bytes=tt.map.bytes),nt.bytes=tt.bytes,typeof window$1.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(_e,tt,rt),()=>this.stopForError({message:"Error loading vtt.js"}));return}dt.requested=!0;try{this.parseVTTCues_(nt)}catch(ft){this.stopForError({message:ft.message,metadata:{errorType:videojs.Error.StreamingVttParserError,error:ft}});return}if(st||this.updateTimeMapping_(nt,this.syncController_.timelines[nt.timeline],this.playlist_),nt.cues.length?nt.timingInfo={start:nt.cues[0].startTime,end:nt.cues[nt.cues.length-1].endTime}:nt.timingInfo={start:nt.startOfSegment,end:nt.startOfSegment+nt.duration},nt.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}nt.byteLength=nt.bytes.byteLength,this.mediaSecondsLoaded+=dt.duration,nt.cues.forEach(ft=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new window$1.VTTCue(ft.startTime,ft.endTime,ft.text):ft)}),removeDuplicateCuesFromTrack(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(_e,tt){const rt=_e&&_e.type==="vtt",nt=tt&&tt.type==="text";rt&&nt&&super.handleData_(_e,tt)}updateTimingInfoEnd_(){}parseMp4VttCues_(_e){const tt=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();_e.mp4VttCues.forEach(rt=>{const nt=rt.start+tt,st=rt.end+tt,dt=new window$1.VTTCue(nt,st,rt.cueText);rt.settings&&rt.settings.split(" ").forEach(ft=>{const ht=ft.split(":"),mt=ht[0],bt=ht[1];dt[mt]=isNaN(bt)?bt:Number(bt)}),_e.cues.push(dt)})}parseVTTCues_(_e){let tt,rt=!1;if(typeof window$1.WebVTT!="function")throw new NoVttJsError;if(_e.cues=[],_e.timestampmap={MPEGTS:0,LOCAL:0},_e.mp4VttCues){this.parseMp4VttCues_(_e);return}typeof window$1.TextDecoder=="function"?tt=new window$1.TextDecoder("utf8"):(tt=window$1.WebVTT.StringDecoder(),rt=!0);const nt=new window$1.WebVTT.Parser(window$1,window$1.vttjs,tt);if(nt.oncue=_e.cues.push.bind(_e.cues),nt.ontimestampmap=dt=>{_e.timestampmap=dt},nt.onparsingerror=dt=>{videojs.log.warn("Error encountered when parsing cues: "+dt.message)},_e.segment.map){let dt=_e.segment.map.bytes;rt&&(dt=uint8ToUtf8(dt)),nt.parse(dt)}let st=_e.bytes;rt&&(st=uint8ToUtf8(st)),nt.parse(st),nt.flush()}updateTimeMapping_(_e,tt,rt){const nt=_e.segment;if(!tt)return;if(!_e.cues.length){nt.empty=!0;return}const{MPEGTS:st,LOCAL:dt}=_e.timestampmap,ht=st/clockExports.ONE_SECOND_IN_TS-dt+tt.mapping;if(_e.cues.forEach(mt=>{const bt=mt.endTime-mt.startTime,St=this.handleRollover_(mt.startTime+ht,tt.time);mt.startTime=Math.max(St,0),mt.endTime=Math.max(St+bt,0)}),!rt.syncInfo){const mt=_e.cues[0].startTime,bt=_e.cues[_e.cues.length-1].startTime;rt.syncInfo={mediaSequence:rt.mediaSequence+_e.mediaIndex,time:Math.min(mt,bt-nt.duration)}}}handleRollover_(_e,tt){if(tt===null)return _e;let rt=_e*clockExports.ONE_SECOND_IN_TS;const nt=tt*clockExports.ONE_SECOND_IN_TS;let st;for(nt<rt?st=-8589934592:st=8589934592;Math.abs(rt-nt)>4294967296;)rt+=st;return rt/clockExports.ONE_SECOND_IN_TS}}const findAdCue=function(et,_e){const tt=et.cues;for(let rt=0;rt<tt.length;rt++){const nt=tt[rt];if(_e>=nt.adStartTime&&_e<=nt.adEndTime)return nt}return null},updateAdCues=function(et,_e,tt=0){if(!et.segments)return;let rt=tt,nt;for(let st=0;st<et.segments.length;st++){const dt=et.segments[st];if(nt||(nt=findAdCue(_e,rt+dt.duration/2)),nt){if("cueIn"in dt){nt.endTime=rt,nt.adEndTime=rt,rt+=dt.duration,nt=null;continue}if(rt<nt.endTime){rt+=dt.duration;continue}nt.endTime+=dt.duration}else if("cueOut"in dt&&(nt=new window$1.VTTCue(rt,rt+dt.duration,dt.cueOut),nt.adStartTime=rt,nt.adEndTime=rt+parseFloat(dt.cueOut),_e.addCue(nt)),"cueOutCont"in dt){const[ft,ht]=dt.cueOutCont.split("/").map(parseFloat);nt=new window$1.VTTCue(rt,rt+dt.duration,""),nt.adStartTime=rt-ft,nt.adEndTime=nt.adStartTime+ht,_e.addCue(nt)}rt+=dt.duration}};class SyncInfo{constructor({start:_e,end:tt,segmentIndex:rt,partIndex:nt=null,appended:st=!1}){this.start_=_e,this.end_=tt,this.segmentIndex_=rt,this.partIndex_=nt,this.appended_=st}isInRange(_e){return _e>=this.start&&_e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class SyncInfoData{constructor(_e,tt=[]){this.segmentSyncInfo_=_e,this.partsSyncInfo_=tt}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(_e=>_e.resetAppendedStatus())}}class MediaSequenceSync{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(_e=>_e.resetAppendStatus())}update(_e,tt){const{mediaSequence:rt,segments:nt}=_e;if(this.isReliable_=this.isReliablePlaylist_(rt,nt),!!this.isReliable_)return this.updateStorage_(nt,rt,this.calculateBaseTime_(rt,nt,tt))}getSyncInfoForTime(_e){for(const{segmentSyncInfo:tt,partsSyncInfo:rt}of this.storage_.values())if(rt.length){for(const nt of rt)if(nt.isInRange(_e))return nt}else if(tt.isInRange(_e))return tt;return null}getSyncInfoForMediaSequence(_e){return this.storage_.get(_e)}updateStorage_(_e,tt,rt){const nt=new Map;let st=`
`,dt=rt,ft=tt;this.start_=dt,_e.forEach((ht,mt)=>{const bt=this.storage_.get(ft),St=dt,Et=St+ht.duration,Ct=!!(bt&&bt.segmentSyncInfo&&bt.segmentSyncInfo.isAppended),Rt=new SyncInfo({start:St,end:Et,appended:Ct,segmentIndex:mt});ht.syncInfo=Rt;let Tt=dt;const wt=(ht.parts||[]).map((At,Nt)=>{const Pt=Tt,It=Tt+At.duration,Ft=!!(bt&&bt.partsSyncInfo&&bt.partsSyncInfo[Nt]&&bt.partsSyncInfo[Nt].isAppended),qt=new SyncInfo({start:Pt,end:It,appended:Ft,segmentIndex:mt,partIndex:Nt});return Tt=It,st+=`Media Sequence: ${ft}.${Nt} | Range: ${Pt} --> ${It} | Appended: ${Ft}
`,At.syncInfo=qt,qt});nt.set(ft,new SyncInfoData(Rt,wt)),st+=`${compactSegmentUrlDescription(ht.resolvedUri)} | Media Sequence: ${ft} | Range: ${St} --> ${Et} | Appended: ${Ct}
`,ft++,dt=Et}),this.end_=dt,this.storage_=nt,this.diagnostics_=st}calculateBaseTime_(_e,tt,rt){if(!this.storage_.size)return 0;if(this.storage_.has(_e))return this.storage_.get(_e).segmentSyncInfo.start;const nt=Math.min(...this.storage_.keys());if(_e<nt){const st=nt-_e;let dt=this.storage_.get(nt).segmentSyncInfo.start;for(let ft=0;ft<st;ft++){const ht=tt[ft];dt-=ht.duration}return dt}return rt}isReliablePlaylist_(_e,tt){return _e!=null&&Array.isArray(tt)&&tt.length}}class DependantMediaSequenceSync extends MediaSequenceSync{constructor(_e){super(),this.parent_=_e}calculateBaseTime_(_e,tt,rt){if(!this.storage_.size){const nt=this.parent_.getSyncInfoForMediaSequence(_e);return nt?nt.segmentSyncInfo.start:0}return super.calculateBaseTime_(_e,tt,rt)}}const MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC=86400,syncPointStrategies=[{name:"VOD",run:(et,_e,tt,rt,nt)=>tt!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(et,_e,tt,rt,nt,st)=>{const dt=et.getMediaSequenceSync(st);if(!dt||!dt.isReliable)return null;const ft=dt.getSyncInfoForTime(nt);return ft?{time:ft.start,partIndex:ft.partIndex,segmentIndex:ft.segmentIndex}:null}},{name:"ProgramDateTime",run:(et,_e,tt,rt,nt)=>{if(!Object.keys(et.timelineToDatetimeMappings).length)return null;let st=null,dt=null;const ft=getPartsAndSegments(_e);nt=nt||0;for(let ht=0;ht<ft.length;ht++){const mt=_e.endList||nt===0?ht:ft.length-(ht+1),bt=ft[mt],St=bt.segment,Et=et.timelineToDatetimeMappings[St.timeline];if(!Et||!St.dateTimeObject)continue;let Rt=St.dateTimeObject.getTime()/1e3+Et;if(St.parts&&typeof bt.partIndex=="number")for(let wt=0;wt<bt.partIndex;wt++)Rt+=St.parts[wt].duration;const Tt=Math.abs(nt-Rt);if(dt!==null&&(Tt===0||dt<Tt))break;dt=Tt,st={time:Rt,segmentIndex:bt.segmentIndex,partIndex:bt.partIndex}}return st}},{name:"Segment",run:(et,_e,tt,rt,nt)=>{let st=null,dt=null;nt=nt||0;const ft=getPartsAndSegments(_e);for(let ht=0;ht<ft.length;ht++){const mt=_e.endList||nt===0?ht:ft.length-(ht+1),bt=ft[mt],St=bt.segment,Et=bt.part&&bt.part.start||St&&St.start;if(St.timeline===rt&&typeof Et<"u"){const Ct=Math.abs(nt-Et);if(dt!==null&&dt<Ct)break;(!st||dt===null||dt>=Ct)&&(dt=Ct,st={time:Et,segmentIndex:bt.segmentIndex,partIndex:bt.partIndex})}}return st}},{name:"Discontinuity",run:(et,_e,tt,rt,nt)=>{let st=null;if(nt=nt||0,_e.discontinuityStarts&&_e.discontinuityStarts.length){let dt=null;for(let ft=0;ft<_e.discontinuityStarts.length;ft++){const ht=_e.discontinuityStarts[ft],mt=_e.discontinuitySequence+ft+1,bt=et.discontinuities[mt];if(bt){const St=Math.abs(nt-bt.time);if(dt!==null&&dt<St)break;(!st||dt===null||dt>=St)&&(dt=St,st={time:bt.time,segmentIndex:ht,partIndex:null})}}}return st}},{name:"Playlist",run:(et,_e,tt,rt,nt)=>_e.syncInfo?{time:_e.syncInfo.time,segmentIndex:_e.syncInfo.mediaSequence-_e.mediaSequence,partIndex:null}:null}];class SyncController extends videojs.EventTarget{constructor(_e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const tt=new MediaSequenceSync,rt=new DependantMediaSequenceSync(tt),nt=new DependantMediaSequenceSync(tt);this.mediaSequenceStorage_={main:tt,audio:rt,vtt:nt},this.logger_=logger$1("SyncController")}getMediaSequenceSync(_e){return this.mediaSequenceStorage_[_e]||null}getSyncPoint(_e,tt,rt,nt,st){if(tt!==1/0)return syncPointStrategies.find(({name:ht})=>ht==="VOD").run(this,_e,tt);const dt=this.runStrategies_(_e,tt,rt,nt,st);if(!dt.length)return null;for(const ft of dt){const{syncPoint:ht,strategy:mt}=ft,{segmentIndex:bt,time:St}=ht;if(bt<0)continue;const Et=_e.segments[bt],Ct=St,Rt=Ct+Et.duration;if(this.logger_(`Strategy: ${mt}. Current time: ${nt}. selected segment: ${bt}. Time: [${Ct} -> ${Rt}]}`),nt>=Ct&&nt<Rt)return this.logger_("Found sync point with exact match: ",ht),ht}return this.selectSyncPoint_(dt,{key:"time",value:nt})}getExpiredTime(_e,tt){if(!_e||!_e.segments)return null;const rt=this.runStrategies_(_e,tt,_e.discontinuitySequence,0);if(!rt.length)return null;const nt=this.selectSyncPoint_(rt,{key:"segmentIndex",value:0});return nt.segmentIndex>0&&(nt.time*=-1),Math.abs(nt.time+sumDurations({defaultDuration:_e.targetDuration,durationList:_e.segments,startIndex:nt.segmentIndex,endIndex:0}))}runStrategies_(_e,tt,rt,nt,st){const dt=[];for(let ft=0;ft<syncPointStrategies.length;ft++){const ht=syncPointStrategies[ft],mt=ht.run(this,_e,tt,rt,nt,st);mt&&(mt.strategy=ht.name,dt.push({strategy:ht.name,syncPoint:mt}))}return dt}selectSyncPoint_(_e,tt){let rt=_e[0].syncPoint,nt=Math.abs(_e[0].syncPoint[tt.key]-tt.value),st=_e[0].strategy;for(let dt=1;dt<_e.length;dt++){const ft=Math.abs(_e[dt].syncPoint[tt.key]-tt.value);ft<nt&&(nt=ft,rt=_e[dt].syncPoint,st=_e[dt].strategy)}return this.logger_(`syncPoint for [${tt.key}: ${tt.value}] chosen with strategy [${st}]: [time:${rt.time}, segmentIndex:${rt.segmentIndex}`+(typeof rt.partIndex=="number"?`,partIndex:${rt.partIndex}`:"")+"]"),rt}saveExpiredSegmentInfo(_e,tt){const rt=tt.mediaSequence-_e.mediaSequence;if(rt>MAX_MEDIA_SEQUENCE_DIFF_FOR_SYNC){videojs.log.warn(`Not saving expired segment info. Media sequence gap ${rt} is too large.`);return}for(let nt=rt-1;nt>=0;nt--){const st=_e.segments[nt];if(st&&typeof st.start<"u"){tt.syncInfo={mediaSequence:_e.mediaSequence+nt,time:st.start},this.logger_(`playlist refresh sync: [time:${tt.syncInfo.time}, mediaSequence: ${tt.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(_e){if(this.timelineToDatetimeMappings={},_e.segments&&_e.segments.length&&_e.segments[0].dateTimeObject){const tt=_e.segments[0],rt=tt.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[tt.timeline]=-rt}}saveSegmentTimingInfo({segmentInfo:_e,shouldSaveTimelineMapping:tt}){const rt=this.calculateSegmentTimeMapping_(_e,_e.timingInfo,tt),nt=_e.segment;rt&&(this.saveDiscontinuitySyncInfo_(_e),_e.playlist.syncInfo||(_e.playlist.syncInfo={mediaSequence:_e.playlist.mediaSequence+_e.mediaIndex,time:nt.start}));const st=nt.dateTimeObject;nt.discontinuity&&tt&&st&&(this.timelineToDatetimeMappings[nt.timeline]=-(st.getTime()/1e3))}timestampOffsetForTimeline(_e){return typeof this.timelines[_e]>"u"?null:this.timelines[_e].time}mappingForTimeline(_e){return typeof this.timelines[_e]>"u"?null:this.timelines[_e].mapping}calculateSegmentTimeMapping_(_e,tt,rt){const nt=_e.segment,st=_e.part;let dt=this.timelines[_e.timeline],ft,ht;if(typeof _e.timestampOffset=="number")dt={time:_e.startOfSegment,mapping:_e.startOfSegment-tt.start},rt&&(this.timelines[_e.timeline]=dt,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${_e.timeline}: [time: ${dt.time}] [mapping: ${dt.mapping}]`)),ft=_e.startOfSegment,ht=tt.end+dt.mapping;else if(dt)ft=tt.start+dt.mapping,ht=tt.end+dt.mapping;else return!1;return st&&(st.start=ft,st.end=ht),(!nt.start||ft<nt.start)&&(nt.start=ft),nt.end=ht,!0}saveDiscontinuitySyncInfo_(_e){const tt=_e.playlist,rt=_e.segment;if(rt.discontinuity)this.discontinuities[rt.timeline]={time:rt.start,accuracy:0};else if(tt.discontinuityStarts&&tt.discontinuityStarts.length)for(let nt=0;nt<tt.discontinuityStarts.length;nt++){const st=tt.discontinuityStarts[nt],dt=tt.discontinuitySequence+nt+1,ft=st-_e.mediaIndex,ht=Math.abs(ft);if(!this.discontinuities[dt]||this.discontinuities[dt].accuracy>ht){let mt;ft<0?mt=rt.start-sumDurations({defaultDuration:tt.targetDuration,durationList:tt.segments,startIndex:_e.mediaIndex,endIndex:st}):mt=rt.end+sumDurations({defaultDuration:tt.targetDuration,durationList:tt.segments,startIndex:_e.mediaIndex+1,endIndex:st}),this.discontinuities[dt]={time:mt,accuracy:ht}}}}dispose(){this.trigger("dispose"),this.off()}}class TimelineChangeController extends videojs.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(_e){this.pendingTimelineChanges_[_e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:_e,from:tt,to:rt}){return typeof tt=="number"&&typeof rt=="number"&&(this.pendingTimelineChanges_[_e]={type:_e,from:tt,to:rt},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[_e]}lastTimelineChange({type:_e,from:tt,to:rt}){if(typeof tt=="number"&&typeof rt=="number"){this.lastTimelineChanges_[_e]={type:_e,from:tt,to:rt},delete this.pendingTimelineChanges_[_e];const nt={timelineChangeInfo:{from:tt,to:rt}};this.trigger({type:"timelinechange",metadata:nt})}return this.lastTimelineChanges_[_e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const workerCode=transform(getWorkerString(function(){var et=(function(){function Tt(){this.listeners={}}var wt=Tt.prototype;return wt.on=function(Nt,Pt){this.listeners[Nt]||(this.listeners[Nt]=[]),this.listeners[Nt].push(Pt)},wt.off=function(Nt,Pt){if(!this.listeners[Nt])return!1;var It=this.listeners[Nt].indexOf(Pt);return this.listeners[Nt]=this.listeners[Nt].slice(0),this.listeners[Nt].splice(It,1),It>-1},wt.trigger=function(Nt){var Pt=this.listeners[Nt];if(Pt)if(arguments.length===2)for(var It=Pt.length,Ft=0;Ft<It;++Ft)Pt[Ft].call(this,arguments[1]);else for(var qt=Array.prototype.slice.call(arguments,1),Vt=Pt.length,Kt=0;Kt<Vt;++Kt)Pt[Kt].apply(this,qt)},wt.dispose=function(){this.listeners={}},wt.pipe=function(Nt){this.on("data",function(Pt){Nt.push(Pt)})},Tt})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function _e(Tt){return Tt.subarray(0,Tt.byteLength-Tt[Tt.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const tt=function(){const Tt=[[[],[],[],[],[]],[[],[],[],[],[]]],wt=Tt[0],At=Tt[1],Nt=wt[4],Pt=At[4];let It,Ft,qt;const Vt=[],Kt=[];let jt,Ut,Ot,Wt,Bt,tr;for(It=0;It<256;It++)Kt[(Vt[It]=It<<1^(It>>7)*283)^It]=It;for(Ft=qt=0;!Nt[Ft];Ft^=jt||1,qt=Kt[qt]||1)for(Wt=qt^qt<<1^qt<<2^qt<<3^qt<<4,Wt=Wt>>8^Wt&255^99,Nt[Ft]=Wt,Pt[Wt]=Ft,Ot=Vt[Ut=Vt[jt=Vt[Ft]]],tr=Ot*16843009^Ut*65537^jt*257^Ft*16843008,Bt=Vt[Wt]*257^Wt*16843008,It=0;It<4;It++)wt[It][Ft]=Bt=Bt<<24^Bt>>>8,At[It][Wt]=tr=tr<<24^tr>>>8;for(It=0;It<5;It++)wt[It]=wt[It].slice(0),At[It]=At[It].slice(0);return Tt};let rt=null;class nt{constructor(wt){rt||(rt=tt()),this._tables=[[rt[0][0].slice(),rt[0][1].slice(),rt[0][2].slice(),rt[0][3].slice(),rt[0][4].slice()],[rt[1][0].slice(),rt[1][1].slice(),rt[1][2].slice(),rt[1][3].slice(),rt[1][4].slice()]];let At,Nt,Pt;const It=this._tables[0][4],Ft=this._tables[1],qt=wt.length;let Vt=1;if(qt!==4&&qt!==6&&qt!==8)throw new Error("Invalid aes key size");const Kt=wt.slice(0),jt=[];for(this._key=[Kt,jt],At=qt;At<4*qt+28;At++)Pt=Kt[At-1],(At%qt===0||qt===8&&At%qt===4)&&(Pt=It[Pt>>>24]<<24^It[Pt>>16&255]<<16^It[Pt>>8&255]<<8^It[Pt&255],At%qt===0&&(Pt=Pt<<8^Pt>>>24^Vt<<24,Vt=Vt<<1^(Vt>>7)*283)),Kt[At]=Kt[At-qt]^Pt;for(Nt=0;At;Nt++,At--)Pt=Kt[Nt&3?At:At-4],At<=4||Nt<4?jt[Nt]=Pt:jt[Nt]=Ft[0][It[Pt>>>24]]^Ft[1][It[Pt>>16&255]]^Ft[2][It[Pt>>8&255]]^Ft[3][It[Pt&255]]}decrypt(wt,At,Nt,Pt,It,Ft){const qt=this._key[1];let Vt=wt^qt[0],Kt=Pt^qt[1],jt=Nt^qt[2],Ut=At^qt[3],Ot,Wt,Bt;const tr=qt.length/4-2;let Jt,ar=4;const pr=this._tables[1],cr=pr[0],gr=pr[1],Sr=pr[2],Er=pr[3],Vr=pr[4];for(Jt=0;Jt<tr;Jt++)Ot=cr[Vt>>>24]^gr[Kt>>16&255]^Sr[jt>>8&255]^Er[Ut&255]^qt[ar],Wt=cr[Kt>>>24]^gr[jt>>16&255]^Sr[Ut>>8&255]^Er[Vt&255]^qt[ar+1],Bt=cr[jt>>>24]^gr[Ut>>16&255]^Sr[Vt>>8&255]^Er[Kt&255]^qt[ar+2],Ut=cr[Ut>>>24]^gr[Vt>>16&255]^Sr[Kt>>8&255]^Er[jt&255]^qt[ar+3],ar+=4,Vt=Ot,Kt=Wt,jt=Bt;for(Jt=0;Jt<4;Jt++)It[(3&-Jt)+Ft]=Vr[Vt>>>24]<<24^Vr[Kt>>16&255]<<16^Vr[jt>>8&255]<<8^Vr[Ut&255]^qt[ar++],Ot=Vt,Vt=Kt,Kt=jt,jt=Ut,Ut=Ot}}class st extends et{constructor(){super(et),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(wt){this.jobs.push(wt),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const dt=function(Tt){return Tt<<24|(Tt&65280)<<8|(Tt&16711680)>>8|Tt>>>24},ft=function(Tt,wt,At){const Nt=new Int32Array(Tt.buffer,Tt.byteOffset,Tt.byteLength>>2),Pt=new nt(Array.prototype.slice.call(wt)),It=new Uint8Array(Tt.byteLength),Ft=new Int32Array(It.buffer);let qt,Vt,Kt,jt,Ut,Ot,Wt,Bt,tr;for(qt=At[0],Vt=At[1],Kt=At[2],jt=At[3],tr=0;tr<Nt.length;tr+=4)Ut=dt(Nt[tr]),Ot=dt(Nt[tr+1]),Wt=dt(Nt[tr+2]),Bt=dt(Nt[tr+3]),Pt.decrypt(Ut,Ot,Wt,Bt,Ft,tr),Ft[tr]=dt(Ft[tr]^qt),Ft[tr+1]=dt(Ft[tr+1]^Vt),Ft[tr+2]=dt(Ft[tr+2]^Kt),Ft[tr+3]=dt(Ft[tr+3]^jt),qt=Ut,Vt=Ot,Kt=Wt,jt=Bt;return It};class ht{constructor(wt,At,Nt,Pt){const It=ht.STEP,Ft=new Int32Array(wt.buffer),qt=new Uint8Array(wt.byteLength);let Vt=0;for(this.asyncStream_=new st,this.asyncStream_.push(this.decryptChunk_(Ft.subarray(Vt,Vt+It),At,Nt,qt)),Vt=It;Vt<Ft.length;Vt+=It)Nt=new Uint32Array([dt(Ft[Vt-4]),dt(Ft[Vt-3]),dt(Ft[Vt-2]),dt(Ft[Vt-1])]),this.asyncStream_.push(this.decryptChunk_(Ft.subarray(Vt,Vt+It),At,Nt,qt));this.asyncStream_.push(function(){Pt(null,_e(qt))})}static get STEP(){return 32e3}decryptChunk_(wt,At,Nt,Pt){return function(){const It=ft(wt,At,Nt);Pt.set(It,wt.byteOffset)}}}var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},bt;typeof window<"u"?bt=window:typeof mt<"u"?bt=mt:typeof self<"u"?bt=self:bt={};var St=bt,Et=function(wt){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(wt):wt&&wt.buffer instanceof ArrayBuffer},Ct=St.BigInt||Number;Ct("0x1"),Ct("0x100"),Ct("0x10000"),Ct("0x1000000"),Ct("0x100000000"),Ct("0x10000000000"),Ct("0x1000000000000"),Ct("0x100000000000000"),Ct("0x10000000000000000"),(function(){var Tt=new Uint16Array([65484]),wt=new Uint8Array(Tt.buffer,Tt.byteOffset,Tt.byteLength);return wt[0]===255?"big":wt[0]===204?"little":"unknown"})();const Rt=function(Tt){const wt={};return Object.keys(Tt).forEach(At=>{const Nt=Tt[At];Et(Nt)?wt[At]={bytes:Nt.buffer,byteOffset:Nt.byteOffset,byteLength:Nt.byteLength}:wt[At]=Nt}),wt};self.onmessage=function(Tt){const wt=Tt.data,At=new Uint8Array(wt.encrypted.bytes,wt.encrypted.byteOffset,wt.encrypted.byteLength),Nt=new Uint32Array(wt.key.bytes,wt.key.byteOffset,wt.key.byteLength/4),Pt=new Uint32Array(wt.iv.bytes,wt.iv.byteOffset,wt.iv.byteLength/4);new ht(At,Nt,Pt,function(It,Ft){self.postMessage(Rt({source:wt.source,decrypted:Ft}),[Ft.buffer])})}}));var Decrypter=factory(workerCode);const audioTrackKind_=et=>{let _e=et.default?"main":"alternative";return et.characteristics&&et.characteristics.indexOf("public.accessibility.describes-video")>=0&&(_e="main-desc"),_e},stopLoaders=(et,_e)=>{et.abort(),et.pause(),_e&&_e.activePlaylistLoader&&(_e.activePlaylistLoader.pause(),_e.activePlaylistLoader=null)},startLoaders=(et,_e)=>{_e.activePlaylistLoader=et,et.load()},onGroupChanged=(et,_e)=>()=>{const{segmentLoaders:{[et]:tt,main:rt},mediaTypes:{[et]:nt}}=_e,st=nt.activeTrack(),dt=nt.getActiveGroup(),ft=nt.activePlaylistLoader,ht=nt.lastGroup_;if(!(dt&&ht&&dt.id===ht.id)&&(nt.lastGroup_=dt,nt.lastTrack_=st,stopLoaders(tt,nt),!(!dt||dt.isMainPlaylist))){if(!dt.playlistLoader){ft&&rt.resetEverything();return}tt.resyncLoader(),startLoaders(dt.playlistLoader,nt)}},onGroupChanging=(et,_e)=>()=>{const{segmentLoaders:{[et]:tt},mediaTypes:{[et]:rt}}=_e;rt.lastGroup_=null,tt.abort(),tt.pause()},onTrackChanged=(et,_e)=>()=>{const{mainPlaylistLoader:tt,segmentLoaders:{[et]:rt,main:nt},mediaTypes:{[et]:st}}=_e,dt=st.activeTrack(),ft=st.getActiveGroup(),ht=st.activePlaylistLoader,mt=st.lastTrack_;if(!(mt&&dt&&mt.id===dt.id)&&(st.lastGroup_=ft,st.lastTrack_=dt,stopLoaders(rt,st),!!ft)){if(ft.isMainPlaylist){if(!dt||!mt||dt.id===mt.id)return;const bt=_e.vhs.playlistController_,St=bt.selectPlaylist();if(bt.media()===St)return;st.logger_(`track change. Switching main audio from ${mt.id} to ${dt.id}`),tt.pause(),nt.resetEverything(),bt.fastQualityChange_(St);return}if(et==="AUDIO"){if(!ft.playlistLoader){nt.setAudio(!0),nt.resetEverything();return}rt.setAudio(!0),nt.setAudio(!1)}if(ht===ft.playlistLoader){startLoaders(ft.playlistLoader,st);return}rt.track&&rt.track(dt),rt.resetEverything(),startLoaders(ft.playlistLoader,st)}},onError={AUDIO:(et,_e)=>()=>{const{mediaTypes:{[et]:tt},excludePlaylist:rt}=_e,nt=tt.activeTrack(),st=tt.activeGroup(),dt=(st.filter(ht=>ht.default)[0]||st[0]).id,ft=tt.tracks[dt];if(nt===ft){rt({error:{message:"Problem encountered loading the default audio track."}});return}videojs.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const ht in tt.tracks)tt.tracks[ht].enabled=tt.tracks[ht]===ft;tt.onTrackChanged()},SUBTITLES:(et,_e)=>()=>{const{mediaTypes:{[et]:tt}}=_e;videojs.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const rt=tt.activeTrack();rt&&(rt.mode="disabled"),tt.onTrackChanged()}},setupListeners={AUDIO:(et,_e,tt)=>{if(!_e)return;const{tech:rt,requestOptions:nt,segmentLoaders:{[et]:st}}=tt;_e.on("loadedmetadata",()=>{const dt=_e.media();st.playlist(dt,nt),(!rt.paused()||dt.endList&&rt.preload()!=="none")&&st.load()}),_e.on("loadedplaylist",()=>{st.playlist(_e.media(),nt),rt.paused()||st.load()}),_e.on("error",onError[et](et,tt))},SUBTITLES:(et,_e,tt)=>{const{tech:rt,requestOptions:nt,segmentLoaders:{[et]:st},mediaTypes:{[et]:dt}}=tt;_e.on("loadedmetadata",()=>{const ft=_e.media();st.playlist(ft,nt),st.track(dt.activeTrack()),(!rt.paused()||ft.endList&&rt.preload()!=="none")&&st.load()}),_e.on("loadedplaylist",()=>{st.playlist(_e.media(),nt),rt.paused()||st.load()}),_e.on("error",onError[et](et,tt))}},initialize={AUDIO:(et,_e)=>{const{vhs:tt,sourceType:rt,segmentLoaders:{[et]:nt},requestOptions:st,main:{mediaGroups:dt},mediaTypes:{[et]:{groups:ft,tracks:ht,logger_:mt}},mainPlaylistLoader:bt}=_e,St=isAudioOnly(bt.main);(!dt[et]||Object.keys(dt[et]).length===0)&&(dt[et]={main:{default:{default:!0}}},St&&(dt[et].main.default.playlists=bt.main.playlists));for(const Et in dt[et]){ft[Et]||(ft[Et]=[]);for(const Ct in dt[et][Et]){let Rt=dt[et][Et][Ct],Tt;if(St?(mt(`AUDIO group '${Et}' label '${Ct}' is a main playlist`),Rt.isMainPlaylist=!0,Tt=null):rt==="vhs-json"&&Rt.playlists?Tt=new PlaylistLoader(Rt.playlists[0],tt,st):Rt.resolvedUri?Tt=new PlaylistLoader(Rt.resolvedUri,tt,st):Rt.playlists&&rt==="dash"?Tt=new DashPlaylistLoader(Rt.playlists[0],tt,st,bt):Tt=null,Rt=merge({id:Ct,playlistLoader:Tt},Rt),setupListeners[et](et,Rt.playlistLoader,_e),ft[Et].push(Rt),typeof ht[Ct]>"u"){const wt=new videojs.AudioTrack({id:Ct,kind:audioTrackKind_(Rt),enabled:!1,language:Rt.language,default:Rt.default,label:Ct});ht[Ct]=wt}}}nt.on("error",onError[et](et,_e))},SUBTITLES:(et,_e)=>{const{tech:tt,vhs:rt,sourceType:nt,segmentLoaders:{[et]:st},requestOptions:dt,main:{mediaGroups:ft},mediaTypes:{[et]:{groups:ht,tracks:mt}},mainPlaylistLoader:bt}=_e;for(const St in ft[et]){ht[St]||(ht[St]=[]);for(const Et in ft[et][St]){if(!rt.options_.useForcedSubtitles&&ft[et][St][Et].forced)continue;let Ct=ft[et][St][Et],Rt;if(nt==="hls")Rt=new PlaylistLoader(Ct.resolvedUri,rt,dt);else if(nt==="dash"){if(!Ct.playlists.filter(wt=>wt.excludeUntil!==1/0).length)return;Rt=new DashPlaylistLoader(Ct.playlists[0],rt,dt,bt)}else nt==="vhs-json"&&(Rt=new PlaylistLoader(Ct.playlists?Ct.playlists[0]:Ct.resolvedUri,rt,dt));if(Ct=merge({id:Et,playlistLoader:Rt},Ct),setupListeners[et](et,Ct.playlistLoader,_e),ht[St].push(Ct),typeof mt[Et]>"u"){const Tt=tt.addRemoteTextTrack({id:Et,kind:"subtitles",default:Ct.default&&Ct.autoselect,language:Ct.language,label:Et},!1).track;mt[Et]=Tt}}}st.on("error",onError[et](et,_e))},"CLOSED-CAPTIONS":(et,_e)=>{const{tech:tt,main:{mediaGroups:rt},mediaTypes:{[et]:{groups:nt,tracks:st}}}=_e;for(const dt in rt[et]){nt[dt]||(nt[dt]=[]);for(const ft in rt[et][dt]){const ht=rt[et][dt][ft];if(!/^(?:CC|SERVICE)/.test(ht.instreamId))continue;const mt=tt.options_.vhs&&tt.options_.vhs.captionServices||{};let bt={label:ft,language:ht.language,instreamId:ht.instreamId,default:ht.default&&ht.autoselect};if(mt[bt.instreamId]&&(bt=merge(bt,mt[bt.instreamId])),bt.default===void 0&&delete bt.default,nt[dt].push(merge({id:ft},ht)),typeof st[ft]>"u"){const St=tt.addRemoteTextTrack({id:bt.instreamId,kind:"captions",default:bt.default,language:bt.language,label:bt.label},!1).track;st[ft]=St}}}}},groupMatch=(et,_e)=>{for(let tt=0;tt<et.length;tt++)if(playlistMatch(_e,et[tt])||et[tt].playlists&&groupMatch(et[tt].playlists,_e))return!0;return!1},activeGroup=(et,_e)=>tt=>{const{mainPlaylistLoader:rt,mediaTypes:{[et]:{groups:nt}}}=_e,st=rt.media();if(!st)return null;let dt=null;st.attributes[et]&&(dt=nt[st.attributes[et]]);const ft=Object.keys(nt);if(!dt)if(et==="AUDIO"&&ft.length>1&&isAudioOnly(_e.main))for(let ht=0;ht<ft.length;ht++){const mt=nt[ft[ht]];if(groupMatch(mt,st)){dt=mt;break}}else nt.main?dt=nt.main:ft.length===1&&(dt=nt[ft[0]]);return typeof tt>"u"?dt:tt===null||!dt?null:dt.filter(ht=>ht.id===tt.id)[0]||null},activeTrack={AUDIO:(et,_e)=>()=>{const{mediaTypes:{[et]:{tracks:tt}}}=_e;for(const rt in tt)if(tt[rt].enabled)return tt[rt];return null},SUBTITLES:(et,_e)=>()=>{const{mediaTypes:{[et]:{tracks:tt}}}=_e;for(const rt in tt)if(tt[rt].mode==="showing"||tt[rt].mode==="hidden")return tt[rt];return null}},getActiveGroup=(et,{mediaTypes:_e})=>()=>{const tt=_e[et].activeTrack();return tt?_e[et].activeGroup(tt):null},setupMediaGroups=et=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(mt=>{initialize[mt](mt,et)});const{mediaTypes:_e,mainPlaylistLoader:tt,tech:rt,vhs:nt,segmentLoaders:{["AUDIO"]:st,main:dt}}=et;["AUDIO","SUBTITLES"].forEach(mt=>{_e[mt].activeGroup=activeGroup(mt,et),_e[mt].activeTrack=activeTrack[mt](mt,et),_e[mt].onGroupChanged=onGroupChanged(mt,et),_e[mt].onGroupChanging=onGroupChanging(mt,et),_e[mt].onTrackChanged=onTrackChanged(mt,et),_e[mt].getActiveGroup=getActiveGroup(mt,et)});const ft=_e.AUDIO.activeGroup();if(ft){const mt=(ft.filter(St=>St.default)[0]||ft[0]).id;_e.AUDIO.tracks[mt].enabled=!0,_e.AUDIO.onGroupChanged(),_e.AUDIO.onTrackChanged(),_e.AUDIO.getActiveGroup().playlistLoader?(dt.setAudio(!1),st.setAudio(!0)):dt.setAudio(!0)}tt.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(mt=>_e[mt].onGroupChanged())}),tt.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(mt=>_e[mt].onGroupChanging())});const ht=()=>{_e.AUDIO.onTrackChanged(),rt.trigger({type:"usage",name:"vhs-audio-change"})};rt.audioTracks().addEventListener("change",ht),rt.remoteTextTracks().addEventListener("change",_e.SUBTITLES.onTrackChanged),nt.on("dispose",()=>{rt.audioTracks().removeEventListener("change",ht),rt.remoteTextTracks().removeEventListener("change",_e.SUBTITLES.onTrackChanged)}),rt.clearTracks("audio");for(const mt in _e.AUDIO.tracks)rt.audioTracks().addTrack(_e.AUDIO.tracks[mt])},createMediaTypes=()=>{const et={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(_e=>{et[_e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:noop$5,activeTrack:noop$5,getActiveGroup:noop$5,onGroupChanged:noop$5,onTrackChanged:noop$5,lastTrack_:null,logger_:logger$1(`MediaGroups[${_e}]`)}}),et};class SteeringManifest{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(_e){_e===1&&(this.version_=_e)}set ttl(_e){this.ttl_=_e||300}set reloadUri(_e){_e&&(this.reloadUri_=resolveUrl(this.reloadUri_,_e))}set priority(_e){_e&&_e.length&&(this.priority_=_e)}set pathwayClones(_e){_e&&_e.length&&(this.pathwayClones_=new Map(_e.map(tt=>[tt.ID,tt])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class ContentSteeringController extends videojs.EventTarget{constructor(_e,tt){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new SteeringManifest,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=logger$1("Content Steering"),this.xhr_=_e,this.getBandwidth_=tt}assignTagProperties(_e,tt){this.manifestType_=tt.serverUri?"HLS":"DASH";const rt=tt.serverUri||tt.serverURL;if(!rt){this.logger_(`steering manifest URL is ${rt}, cannot request steering manifest.`),this.trigger("error");return}if(rt.startsWith("data:")){this.decodeDataUriManifest_(rt.substring(rt.indexOf(",")+1));return}this.steeringManifest.reloadUri=resolveUrl(_e,rt),this.defaultPathway=tt.pathwayId||tt.defaultServiceLocation,this.queryBeforeStart=tt.queryBeforeStart,this.proxyServerUrl_=tt.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(_e){const tt=this.steeringManifest.reloadUri;if(!tt)return;const rt=_e?tt:this.getRequestURI(tt);if(!rt){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const nt={contentSteeringInfo:{uri:rt}};this.trigger({type:"contentsteeringloadstart",metadata:nt}),this.request_=this.xhr_({uri:rt,requestType:"content-steering-manifest"},(st,dt)=>{if(st){if(dt.status===410){this.logger_(`manifest request 410 ${st}.`),this.logger_(`There will be no more content steering requests to ${rt} this session.`),this.excludedSteeringManifestURLs.add(rt);return}if(dt.status===429){const mt=dt.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${st}.`),this.logger_(`content steering will retry in ${mt} seconds.`),this.startTTLTimeout_(parseInt(mt,10));return}this.logger_(`manifest failed to load ${st}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:nt});let ft;try{ft=JSON.parse(this.request_.responseText)}catch(mt){const bt={errorType:videojs.Error.StreamingContentSteeringParserError,error:mt};this.trigger({type:"error",metadata:bt})}this.assignSteeringProperties_(ft);const ht={contentSteeringInfo:nt.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:ht}),this.startTTLTimeout_()})}setProxyServerUrl_(_e){const tt=new window$1.URL(_e),rt=new window$1.URL(this.proxyServerUrl_);return rt.searchParams.set("url",encodeURI(tt.toString())),this.setSteeringParams_(rt.toString())}decodeDataUriManifest_(_e){const tt=JSON.parse(window$1.atob(_e));this.assignSteeringProperties_(tt)}setSteeringParams_(_e){const tt=new window$1.URL(_e),rt=this.getPathway(),nt=this.getBandwidth_();if(rt){const st=`_${this.manifestType_}_pathway`;tt.searchParams.set(st,rt)}if(nt){const st=`_${this.manifestType_}_throughput`;tt.searchParams.set(st,nt)}return tt.toString()}assignSteeringProperties_(_e){if(this.steeringManifest.version=_e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${_e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=_e.TTL,this.steeringManifest.reloadUri=_e["RELOAD-URI"],this.steeringManifest.priority=_e["PATHWAY-PRIORITY"]||_e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=_e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const rt=(nt=>{for(const st of nt)if(this.availablePathways_.has(st))return st;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==rt&&(this.currentPathway=rt,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(_e){if(!_e)return null;const tt=nt=>this.excludedSteeringManifestURLs.has(nt);if(this.proxyServerUrl_){const nt=this.setProxyServerUrl_(_e);if(!tt(nt))return nt}const rt=this.setSteeringParams_(_e);return tt(rt)?null:rt}startTTLTimeout_(_e=this.steeringManifest.ttl){const tt=_e*1e3;this.ttlTimeout_=window$1.setTimeout(()=>{this.requestSteeringManifest()},tt)}clearTTLTimeout_(){window$1.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new SteeringManifest}addAvailablePathway(_e){_e&&this.availablePathways_.add(_e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(_e){return this.availablePathways_.delete(_e)}didDASHTagChange(_e,tt){return!tt&&this.steeringManifest.reloadUri||tt&&(resolveUrl(_e,tt.serverURL)!==this.steeringManifest.reloadUri||tt.defaultServiceLocation!==this.defaultPathway||tt.queryBeforeStart!==this.queryBeforeStart||tt.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const debounce=(et,_e)=>{let tt=null;return(...rt)=>{clearTimeout(tt),tt=setTimeout(()=>{et.apply(null,rt)},_e)}},ABORT_EARLY_EXCLUSION_SECONDS=10;let Vhs$1;const loaderStats=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],sumLoaderStat=function(et){return this.audioSegmentLoader_[et]+this.mainSegmentLoader_[et]},shouldSwitchToMedia=function({currentPlaylist:et,buffered:_e,currentTime:tt,nextPlaylist:rt,bufferLowWaterLine:nt,bufferHighWaterLine:st,duration:dt,bufferBasedABR:ft,log:ht}){if(!rt)return videojs.log.warn("We received no playlist to switch to. Please check your stream."),!1;const mt=`allowing switch ${et&&et.id||"null"} -> ${rt.id}`;if(!et)return ht(`${mt} as current playlist is not set`),!0;if(rt.id===et.id)return!1;const bt=!!findRange(_e,tt).length;if(!et.endList)return!bt&&typeof et.partTargetDuration=="number"?(ht(`not ${mt} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(ht(`${mt} as current playlist is live`),!0);const St=timeAheadOf(_e,tt),Et=ft?Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Config.MAX_BUFFER_LOW_WATER_LINE;if(dt<Et)return ht(`${mt} as duration < max low water line (${dt} < ${Et})`),!0;const Ct=rt.attributes.BANDWIDTH,Rt=et.attributes.BANDWIDTH;if(Ct<Rt&&(!ft||St<st)){let Tt=`${mt} as next bandwidth < current bandwidth (${Ct} < ${Rt})`;return ft&&(Tt+=` and forwardBuffer < bufferHighWaterLine (${St} < ${st})`),ht(Tt),!0}if((!ft||Ct>Rt)&&St>=nt){let Tt=`${mt} as forwardBuffer >= bufferLowWaterLine (${St} >= ${nt})`;return ft&&(Tt+=` and next bandwidth > current bandwidth (${Ct} > ${Rt})`),ht(Tt),!0}return ht(`not ${mt} as no switching criteria met`),!1};class PlaylistController extends videojs.EventTarget{constructor(_e){super(),this.fastQualityChange_=debounce(this.fastQualityChange_.bind(this),100);const{src:tt,withCredentials:rt,tech:nt,bandwidth:st,externVhs:dt,useCueTags:ft,playlistExclusionDuration:ht,enableLowInitialPlaylist:mt,sourceType:bt,cacheEncryptionKeys:St,bufferBasedABR:Et,leastPixelDiffSelector:Ct,captionServices:Rt,experimentalUseMMS:Tt}=_e;if(!tt)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:wt}=_e;(wt===null||typeof wt>"u")&&(wt=1/0),Vhs$1=dt,this.bufferBasedABR=!!Et,this.leastPixelDiffSelector=!!Ct,this.withCredentials=rt,this.tech_=nt,this.vhs_=nt.vhs,this.player_=_e.player_,this.sourceType_=bt,this.useCueTags_=ft,this.playlistExclusionDuration=ht,this.maxPlaylistRetries=wt,this.enableLowInitialPlaylist=mt,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:rt,maxPlaylistRetries:wt,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=createMediaTypes(),Tt&&window$1.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new window$1.ManagedMediaSource,this.usingManagedMediaSource_=!0,videojs.log("Using ManagedMediaSource")):window$1.MediaSource&&(this.mediaSource=new window$1.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=createTimeRanges(),this.hasPlayed_=!1,this.syncController_=new SyncController(_e),this.segmentMetadataTrack_=nt.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Decrypter,this.sourceUpdater_=new SourceUpdater(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new TimelineChangeController,this.keyStatusMap_=new Map;const At={vhs:this.vhs_,parse708captions:_e.parse708captions,useDtsForTimestampOffset:_e.useDtsForTimestampOffset,captionServices:Rt,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:st,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:St,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:_e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new DashPlaylistLoader(tt,this.vhs_,merge(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new PlaylistLoader(tt,this.vhs_,merge(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new SegmentLoader(merge(At,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),_e),this.audioSegmentLoader_=new SegmentLoader(merge(At,{loaderType:"audio"}),_e),this.subtitleSegmentLoader_=new VTTSegmentLoader(merge(At,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((It,Ft)=>{function qt(){nt.off("vttjserror",Vt),It()}function Vt(){nt.off("vttjsloaded",qt),Ft()}nt.one("vttjsloaded",qt),nt.one("vttjserror",Vt),nt.addWebVttScript_()})}),_e);const Nt=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new ContentSteeringController(this.vhs_.xhr,Nt),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),loaderStats.forEach(It=>{this[It+"_"]=sumLoaderStat.bind(this,It)}),this.logger_=logger$1("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const Pt=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(Pt,()=>{const It=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-It,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const _e=this.mainAppendsToLoadedData_(),tt=this.audioAppendsToLoadedData_();return _e===-1||tt===-1?-1:_e+tt}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(_e="abr"){const tt=this.selectPlaylist();tt&&this.shouldSwitchToMedia_(tt)&&this.switchMedia_(tt,_e)}switchMedia_(_e,tt,rt){const nt=this.media(),st=nt&&(nt.id||nt.uri),dt=_e&&(_e.id||_e.uri);if(st&&st!==dt){this.logger_(`switch media ${st} -> ${dt} from ${tt}`);const ft={renditionInfo:{id:dt,bandwidth:_e.attributes.BANDWIDTH,resolution:_e.attributes.RESOLUTION,codecs:_e.attributes.CODECS},cause:tt};this.trigger({type:"renditionselected",metadata:ft}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${tt}`})}this.mainPlaylistLoader_.media(_e,rt)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(_e=>{const tt=this.mediaTypes_[_e],rt=tt?tt.activeGroup():null,nt=this.contentSteeringController_.getPathway();if(rt&&nt){const dt=(rt.length?rt[0].playlists:rt.playlists).filter(ft=>ft.attributes.serviceLocation===nt);dt.length&&this.mediaTypes_[_e].activePlaylistLoader.media(dt[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=window$1.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window$1.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const _e=this.main(),tt=_e&&_e.playlists||[];if(!_e||!_e.mediaGroups||!_e.mediaGroups.AUDIO)return tt;const rt=_e.mediaGroups.AUDIO,nt=Object.keys(rt);let st;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)st=this.mediaTypes_.AUDIO.activeTrack();else{const ft=rt.main||nt.length&&rt[nt[0]];for(const ht in ft)if(ft[ht].default){st={label:ht};break}}if(!st)return tt;const dt=[];for(const ft in rt)if(rt[ft][st.label]){const ht=rt[ft][st.label];if(ht.playlists&&ht.playlists.length)dt.push.apply(dt,ht.playlists);else if(ht.uri)dt.push(ht);else if(_e.playlists.length)for(let mt=0;mt<_e.playlists.length;mt++){const bt=_e.playlists[mt];bt.attributes&&bt.attributes.AUDIO&&bt.attributes.AUDIO===ft&&dt.push(bt)}}return dt.length?dt:tt}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const tt=this.mainPlaylistLoader_.media(),rt=tt.targetDuration*1.5*1e3;isLowestEnabledRendition(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=rt,tt.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(tt,this.requestOptions_),this.mainSegmentLoader_.load()),setupMediaGroups({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),tt),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let tt=this.mainPlaylistLoader_.media();if(!tt){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let rt;if(this.enableLowInitialPlaylist&&(rt=this.selectInitialPlaylist()),rt||(rt=this.selectPlaylist()),!rt||!this.shouldSwitchToMedia_(rt)||(this.initialMedia_=rt,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;tt=this.initialMedia_}this.handleUpdatedMediaPlaylist(tt)}),this.mainPlaylistLoader_.on("error",()=>{const tt=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:tt.playlist,error:tt})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const tt=this.mainPlaylistLoader_.media(),rt=tt.targetDuration*1.5*1e3;isLowestEnabledRendition(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=rt,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(tt,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const tt=this.mainPlaylistLoader_.media();if(tt.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(tt)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(tt=>{this.mainPlaylistLoader_.on(tt,rt=>{this.player_.trigger(_extends({},rt))})})}handleUpdatedMediaPlaylist(_e){this.useCueTags_&&this.updateAdCues_(_e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(_e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!_e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(_e,tt){const rt=_e.mediaGroups||{};let nt=!0;const st=Object.keys(rt.AUDIO);for(const dt in rt.AUDIO)for(const ft in rt.AUDIO[dt])rt.AUDIO[dt][ft].uri||(nt=!1);nt&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(rt.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Vhs$1.Playlist.isAes(tt)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),st.length&&Object.keys(rt.AUDIO[st[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(_e){const tt=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,rt=this.tech_.currentTime(),nt=this.bufferLowWaterLine(),st=this.bufferHighWaterLine(),dt=this.tech_.buffered();return shouldSwitchToMedia({buffered:dt,currentTime:rt,currentPlaylist:tt,nextPlaylist:_e,bufferLowWaterLine:nt,bufferHighWaterLine:st,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const rt=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:rt.playlist,error:rt})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const rt=this.audioSegmentLoader_.pendingSegment_;if(!rt||!rt.segment||!rt.segment.syncInfo)return;const nt=rt.segment.syncInfo.end+.01;this.tech_.setCurrentTime(nt)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",rt=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:ABORT_EARLY_EXCLUSION_SECONDS}))});const _e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const rt=this.getCodecsOrExclude_();rt&&this.sourceUpdater_.addOrChangeSourceBuffers(rt)};this.mainSegmentLoader_.on("trackinfo",_e),this.audioSegmentLoader_.on("trackinfo",_e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(rt=>{this.mainSegmentLoader_.on(rt,nt=>{this.player_.trigger(_extends({},nt))}),this.audioSegmentLoader_.on(rt,nt=>{this.player_.trigger(_extends({},nt))}),this.subtitleSegmentLoader_.on(rt,nt=>{this.player_.trigger(_extends({},nt))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(_e=this.selectPlaylist()){if(_e&&_e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(_e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const _e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<_e.start(0))return this.tech_.setCurrentTime(_e.end(_e.length-1))}setupFirstPlay(){const _e=this.mainPlaylistLoader_.media();if(!_e||this.tech_.paused()||this.hasPlayed_)return!1;if(!_e.endList||_e.start){const tt=this.seekable();if(!tt.length)return!1;const rt=tt.end(0);let nt=rt;if(_e.start){const st=_e.start.timeOffset;st<0?nt=Math.max(rt+st,tt.start(0)):nt=Math.min(rt,st)}this.trigger("firstplay"),this.tech_.setCurrentTime(nt)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const _e=this.tech_.play();typeof _e<"u"&&typeof _e.then=="function"&&_e.then(null,tt=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const _e=this.inbandTextTracks_.metadataTrack_.cues;if(!_e||!_e.length)return;const tt=this.duration();_e[_e.length-1].endTime=isNaN(tt)||Math.abs(tt)===1/0?Number.MAX_VALUE:tt}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let _e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const tt=this.mainSegmentLoader_.getCurrentMediaInfo_();!tt||tt.hasVideo?_e=_e&&this.audioSegmentLoader_.ended_:_e=this.audioSegmentLoader_.ended_}_e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(_e){if(!this.seekable().length)return!1;const rt=this.syncController_.getExpiredTime(_e,this.duration());if(rt===null)return!1;const nt=Vhs$1.Playlist.playlistEnd(_e,rt),st=this.tech_.currentTime(),dt=this.tech_.buffered();if(!dt.length)return nt-st<=SAFE_TIME_DELTA;const ft=dt.end(dt.length-1);return ft-st<=SAFE_TIME_DELTA&&nt-ft<=SAFE_TIME_DELTA}excludePlaylist({playlistToExclude:_e=this.mainPlaylistLoader_.media(),error:tt={},playlistExclusionDuration:rt}){if(_e=_e||this.mainPlaylistLoader_.media(),rt=rt||tt.playlistExclusionDuration||this.playlistExclusionDuration,!_e){this.error=tt,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}_e.playlistErrors_++;const nt=this.mainPlaylistLoader_.main.playlists,st=nt.filter(isEnabled),dt=st.length===1&&st[0]===_e;if(nt.length===1&&rt!==1/0)return videojs.log.warn(`Problem encountered with playlist ${_e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(dt);if(dt){if(this.main().contentSteering){const Rt=this.pathwayAttribute_(_e),Tt=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(Rt),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(Rt)},Tt);return}let Ct=!1;nt.forEach(Rt=>{if(Rt===_e)return;const Tt=Rt.excludeUntil;typeof Tt<"u"&&Tt!==1/0&&(Ct=!0,delete Rt.excludeUntil)}),Ct&&(videojs.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let ft;_e.playlistErrors_>this.maxPlaylistRetries?ft=1/0:ft=Date.now()+rt*1e3,_e.excludeUntil=ft,tt.reason&&(_e.lastExcludeReason_=tt.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const ht=this.selectPlaylist();if(!ht){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const mt=tt.internal?this.logger_:videojs.log.warn,bt=tt.message?" "+tt.message:"";mt(`${tt.internal?"Internal problem":"Problem"} encountered with playlist ${_e.id}.${bt} Switching to playlist ${ht.id}.`),ht.attributes.AUDIO!==_e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),ht.attributes.SUBTITLES!==_e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const St=ht.targetDuration/2*1e3||5*1e3,Et=typeof ht.lastRequest=="number"&&Date.now()-ht.lastRequest<=St;return this.switchMedia_(ht,"exclude",dt||Et)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(_e,tt){const rt=[],nt=_e==="all";(nt||_e==="main")&&rt.push(this.mainPlaylistLoader_);const st=[];(nt||_e==="audio")&&st.push("AUDIO"),(nt||_e==="subtitle")&&(st.push("CLOSED-CAPTIONS"),st.push("SUBTITLES")),st.forEach(dt=>{const ft=this.mediaTypes_[dt]&&this.mediaTypes_[dt].activePlaylistLoader;ft&&rt.push(ft)}),["main","audio","subtitle"].forEach(dt=>{const ft=this[`${dt}SegmentLoader_`];ft&&(_e===dt||_e==="all")&&rt.push(ft)}),rt.forEach(dt=>tt.forEach(ft=>{typeof dt[ft]=="function"&&dt[ft]()}))}setCurrentTime(_e){const tt=findRange(this.tech_.buffered(),_e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(tt&&tt.length)return _e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const _e=this.mainPlaylistLoader_.media();return _e?_e.endList?this.mediaSource?this.mediaSource.duration:Vhs$1.Playlist.duration(_e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(_e,tt){const rt=_e.media();if(!rt)return null;const nt=this.syncController_.getMediaSequenceSync(tt);if(nt&&nt.isReliable){const ft=nt.start,ht=nt.end;if(!isFinite(ft)||!isFinite(ht))return null;const mt=Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,rt),bt=Math.max(ft,ht-mt);return createTimeRanges([[ft,bt]])}const st=this.syncController_.getExpiredTime(rt,this.duration());if(st===null)return null;const dt=Vhs$1.Playlist.seekable(rt,st,Vhs$1.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,rt));return dt.length?dt:null}computeFinalSeekable_(_e,tt){if(!tt)return _e;const rt=_e.start(0),nt=_e.end(0),st=tt.start(0),dt=tt.end(0);return st>nt||rt>dt?_e:createTimeRanges([[Math.max(rt,st),Math.min(nt,dt)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const _e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!_e)return;let tt;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(tt=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!tt))return;const rt=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(_e,tt),!this.seekable_||rt&&rt.length&&this.seekable_.length&&rt.start(0)===this.seekable_.start(0)&&rt.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${printableRange(this.seekable_)}]`);const nt={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:nt}),this.tech_.trigger("seekablechanged")}updateDuration(_e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,_e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(_e){const nt=this.seekable();if(!nt.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<nt.end(nt.length-1))&&this.sourceUpdater_.setDuration(nt.end(nt.length-1));return}const tt=this.tech_.buffered();let rt=Vhs$1.Playlist.duration(this.mainPlaylistLoader_.media());tt.length>0&&(rt=Math.max(rt,tt.end(tt.length-1))),this.mediaSource.duration!==rt&&this.sourceUpdater_.setDuration(rt)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(_e=>{const tt=this.mediaTypes_[_e].groups;for(const rt in tt)tt[rt].forEach(nt=>{nt.playlistLoader&&nt.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const _e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,tt=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),rt=_e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!tt||!rt)}getCodecsOrExclude_(){const _e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},tt=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();_e.video=_e.main;const rt=codecsForPlaylist(this.main(),tt),nt={},st=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(_e.main.hasVideo&&(nt.video=rt.video||_e.main.videoCodec||DEFAULT_VIDEO_CODEC),_e.main.isMuxed&&(nt.video+=`,${rt.audio||_e.main.audioCodec||DEFAULT_AUDIO_CODEC}`),(_e.main.hasAudio&&!_e.main.isMuxed||_e.audio.hasAudio||st)&&(nt.audio=rt.audio||_e.main.audioCodec||_e.audio.audioCodec||DEFAULT_AUDIO_CODEC,_e.audio.isFmp4=_e.main.hasAudio&&!_e.main.isMuxed?_e.main.isFmp4:_e.audio.isFmp4),!nt.audio&&!nt.video){this.excludePlaylist({playlistToExclude:tt,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const dt=(mt,bt)=>mt?browserSupportsCodec(bt,this.usingManagedMediaSource_):muxerSupportsCodec(bt),ft={};let ht;if(["video","audio"].forEach(function(mt){if(nt.hasOwnProperty(mt)&&!dt(_e[mt].isFmp4,nt[mt])){const bt=_e[mt].isFmp4?"browser":"muxer";ft[bt]=ft[bt]||[],ft[bt].push(nt[mt]),mt==="audio"&&(ht=bt)}}),st&&ht&&tt.attributes.AUDIO){const mt=tt.attributes.AUDIO;this.main().playlists.forEach(bt=>{(bt.attributes&&bt.attributes.AUDIO)===mt&&bt!==tt&&(bt.excludeUntil=1/0)}),this.logger_(`excluding audio group ${mt} as ${ht} does not support codec(s): "${nt.audio}"`)}if(Object.keys(ft).length){const mt=Object.keys(ft).reduce((bt,St)=>(bt&&(bt+=", "),bt+=`${St} does not support codec(s): "${ft[St].join(",")}"`,bt),"")+".";this.excludePlaylist({playlistToExclude:tt,error:{internal:!0,message:mt},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const mt=[];if(["video","audio"].forEach(bt=>{const St=(parseCodecs(this.sourceUpdater_.codecs[bt]||"")[0]||{}).type,Et=(parseCodecs(nt[bt]||"")[0]||{}).type;St&&Et&&St.toLowerCase()!==Et.toLowerCase()&&mt.push(`"${this.sourceUpdater_.codecs[bt]}" -> "${nt[bt]}"`)}),mt.length){this.excludePlaylist({playlistToExclude:tt,error:{message:`Codec switching not supported: ${mt.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return nt}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const _e=this.getCodecsOrExclude_();if(!_e)return;this.sourceUpdater_.createSourceBuffers(_e);const tt=[_e.video,_e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(tt)}excludeUnsupportedVariants_(){const _e=this.main().playlists,tt=[];Object.keys(_e).forEach(rt=>{const nt=_e[rt];if(tt.indexOf(nt.id)!==-1)return;tt.push(nt.id);const st=codecsForPlaylist(this.main,nt),dt=[];st.audio&&!muxerSupportsCodec(st.audio)&&!browserSupportsCodec(st.audio,this.usingManagedMediaSource_)&&dt.push(`audio codec ${st.audio}`),st.video&&!muxerSupportsCodec(st.video)&&!browserSupportsCodec(st.video,this.usingManagedMediaSource_)&&dt.push(`video codec ${st.video}`),st.text&&st.text==="stpp.ttml.im1t"&&dt.push(`text codec ${st.text}`),dt.length&&(nt.excludeUntil=1/0,this.logger_(`excluding ${nt.id} for unsupported: ${dt.join(", ")}`))})}excludeIncompatibleVariants_(_e){const tt=[],rt=this.main().playlists,nt=unwrapCodecList(parseCodecs(_e)),st=codecCount(nt),dt=nt.video&&parseCodecs(nt.video)[0]||null,ft=nt.audio&&parseCodecs(nt.audio)[0]||null;Object.keys(rt).forEach(ht=>{const mt=rt[ht];if(tt.indexOf(mt.id)!==-1||mt.excludeUntil===1/0)return;tt.push(mt.id);const bt=[],St=codecsForPlaylist(this.mainPlaylistLoader_.main,mt),Et=codecCount(St);if(!(!St.audio&&!St.video)){if(Et!==st&&bt.push(`codec count "${Et}" !== "${st}"`),!this.sourceUpdater_.canChangeType()){const Ct=St.video&&parseCodecs(St.video)[0]||null,Rt=St.audio&&parseCodecs(St.audio)[0]||null;Ct&&dt&&Ct.type.toLowerCase()!==dt.type.toLowerCase()&&bt.push(`video codec "${Ct.type}" !== "${dt.type}"`),Rt&&ft&&Rt.type.toLowerCase()!==ft.type.toLowerCase()&&bt.push(`audio codec "${Rt.type}" !== "${ft.type}"`)}bt.length&&(mt.excludeUntil=1/0,this.logger_(`excluding ${mt.id}: ${bt.join(" && ")}`))}})}updateAdCues_(_e){let tt=0;const rt=this.seekable();rt.length&&(tt=rt.start(0)),updateAdCues(_e,this.cueTagsTrack_,tt)}goalBufferLength(){const _e=this.tech_.currentTime(),tt=Config.GOAL_BUFFER_LENGTH,rt=Config.GOAL_BUFFER_LENGTH_RATE,nt=Math.max(tt,Config.MAX_GOAL_BUFFER_LENGTH);return Math.min(tt+_e*rt,nt)}bufferLowWaterLine(){const _e=this.tech_.currentTime(),tt=Config.BUFFER_LOW_WATER_LINE,rt=Config.BUFFER_LOW_WATER_LINE_RATE,nt=Math.max(tt,Config.MAX_BUFFER_LOW_WATER_LINE),st=Math.max(tt,Config.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(tt+_e*rt,this.bufferBasedABR?st:nt)}bufferHighWaterLine(){return Config.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(_e){createMetadataTrackIfNotExists(this.inbandTextTracks_,"com.apple.streaming",this.tech_),addDateRangeMetadata({inbandTextTracks:this.inbandTextTracks_,dateRanges:_e})}addMetadataToTextTrack(_e,tt,rt){const nt=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();createMetadataTrackIfNotExists(this.inbandTextTracks_,_e,this.tech_),addMetadata({inbandTextTracks:this.inbandTextTracks_,metadataArray:tt,timestampOffset:nt,videoDuration:rt})}pathwayAttribute_(_e){return _e.attributes["PATHWAY-ID"]||_e.attributes.serviceLocation}initContentSteeringController_(){const _e=this.main();if(_e.contentSteering){for(const tt of _e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(tt));if(this.contentSteeringController_.assignTagProperties(_e.uri,_e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(tt=>{this.contentSteeringController_.on(tt,rt=>{this.trigger(_extends({},rt))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const tt=this.main();(this.contentSteeringController_.didDASHTagChange(tt.uri,tt.contentSteering)||(()=>{const st=this.contentSteeringController_.getAvailablePathways(),dt=[];for(const ft of tt.playlists){const ht=ft.attributes.serviceLocation;if(ht&&(dt.push(ht),!st.has(ht)))return!0}return!!(!dt.length&&st.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const _e=this.contentSteeringController_.getPathway();if(!_e)return;this.handlePathwayClones_();const rt=this.main().playlists,nt=new Set;let st=!1;Object.keys(rt).forEach(dt=>{const ft=rt[dt],ht=this.pathwayAttribute_(ft),mt=ht&&_e!==ht;ft.excludeUntil===1/0&&ft.lastExcludeReason_==="content-steering"&&!mt&&(delete ft.excludeUntil,delete ft.lastExcludeReason_,st=!0);const St=!ft.excludeUntil&&ft.excludeUntil!==1/0;!nt.has(ft.id)&&mt&&St&&(nt.add(ft.id),ft.excludeUntil=1/0,ft.lastExcludeReason_="content-steering",this.logger_(`excluding ${ft.id} for ${ft.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(dt=>{const ft=this.mediaTypes_[dt];if(ft.activePlaylistLoader){const ht=ft.activePlaylistLoader.media_;ht&&ht.attributes.serviceLocation!==_e&&(st=!0)}}),st&&this.changeSegmentPathway_()}handlePathwayClones_(){const tt=this.main().playlists,rt=this.contentSteeringController_.currentPathwayClones,nt=this.contentSteeringController_.nextPathwayClones;if(rt&&rt.size||nt&&nt.size){for(const[dt,ft]of rt.entries())nt.get(dt)||(this.mainPlaylistLoader_.updateOrDeleteClone(ft),this.contentSteeringController_.excludePathway(dt));for(const[dt,ft]of nt.entries()){const ht=rt.get(dt);if(!ht){tt.filter(bt=>bt.attributes["PATHWAY-ID"]===ft["BASE-ID"]).forEach(bt=>{this.mainPlaylistLoader_.addClonePathway(ft,bt)}),this.contentSteeringController_.addAvailablePathway(dt);continue}this.equalPathwayClones_(ht,ft)||(this.mainPlaylistLoader_.updateOrDeleteClone(ft,!0),this.contentSteeringController_.addAvailablePathway(dt))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...nt])))}}equalPathwayClones_(_e,tt){if(_e["BASE-ID"]!==tt["BASE-ID"]||_e.ID!==tt.ID||_e["URI-REPLACEMENT"].HOST!==tt["URI-REPLACEMENT"].HOST)return!1;const rt=_e["URI-REPLACEMENT"].PARAMS,nt=tt["URI-REPLACEMENT"].PARAMS;for(const st in rt)if(rt[st]!==nt[st])return!1;for(const st in nt)if(rt[st]!==nt[st])return!1;return!0}changeSegmentPathway_(){const _e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(_e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let _e=0;const tt="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(rt=>{const nt=this.mainPlaylistLoader_.getKeyIdSet(rt);!nt||!nt.size||nt.forEach(st=>{const dt="usable",ft=this.keyStatusMap_.has(st)&&this.keyStatusMap_.get(st)===dt,ht=rt.lastExcludeReason_===tt&&rt.excludeUntil===1/0;ft?ft&&ht&&(delete rt.excludeUntil,delete rt.lastExcludeReason_,this.logger_(`enabling playlist ${rt.id} because key ID ${st} is ${dt}`)):(rt.excludeUntil!==1/0&&rt.lastExcludeReason_!==tt&&(rt.excludeUntil=1/0,rt.lastExcludeReason_=tt,this.logger_(`excluding playlist ${rt.id} because the key ID ${st} doesn't exist in the keyStatusMap or is not ${dt}`)),_e++)})}),_e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(rt=>{const nt=rt&&rt.attributes&&rt.attributes.RESOLUTION&&rt.attributes.RESOLUTION.height<720,st=rt.excludeUntil===1/0&&rt.lastExcludeReason_===tt;nt&&st&&(delete rt.excludeUntil,videojs.log.warn(`enabling non-HD playlist ${rt.id} because all playlists were excluded due to ${tt} key IDs`))})}addKeyStatus_(_e,tt){const st=(typeof _e=="string"?_e:bufferToHexString(_e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${tt}' with key ID ${st} added to the keyStatusMap`),this.keyStatusMap_.set(st,tt)}updatePlaylistByKeyStatus(_e,tt){this.addKeyStatus_(_e,tt),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const enableFunction=(et,_e,tt)=>rt=>{const nt=et.main.playlists[_e],st=isIncompatible(nt),dt=isEnabled(nt);if(typeof rt>"u")return dt;rt?delete nt.disabled:nt.disabled=!0;const ft={renditionInfo:{id:_e,bandwidth:nt.attributes.BANDWIDTH,resolution:nt.attributes.RESOLUTION,codecs:nt.attributes.CODECS},cause:"fast-quality"};return rt!==dt&&!st&&(rt?(tt(nt),et.trigger({type:"renditionenabled",metadata:ft})):et.trigger({type:"renditiondisabled",metadata:ft})),rt};class Representation{constructor(_e,tt,rt){const{playlistController_:nt}=_e,st=nt.fastQualityChange_.bind(nt);if(tt.attributes){const dt=tt.attributes.RESOLUTION;this.width=dt&&dt.width,this.height=dt&&dt.height,this.bandwidth=tt.attributes.BANDWIDTH,this.frameRate=tt.attributes["FRAME-RATE"]}this.codecs=codecsForPlaylist(nt.main(),tt),this.playlist=tt,this.id=rt,this.enabled=enableFunction(_e.playlists,tt.id,st)}}const renditionSelectionMixin=function(et){et.representations=()=>{const _e=et.playlistController_.main(),tt=isAudioOnly(_e)?et.playlistController_.getAudioTrackPlaylists_():_e.playlists;return tt?tt.filter(rt=>!isIncompatible(rt)).map((rt,nt)=>new Representation(et,rt,rt.id)):[]}},timerCancelEvents=["seeking","seeked","pause","playing","error"];class PlaybackWatcher extends videojs.EventTarget{constructor(_e){super(),this.playlistController_=_e.playlistController,this.tech_=_e.tech,this.seekable=_e.seekable,this.allowSeeksWithinUnsafeLiveWindow=_e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=_e.liveRangeSafeTimeDelta,this.media=_e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=logger$1("PlaybackWatcher"),this.logger_("initialize");const tt=()=>this.monitorCurrentTime_(),rt=()=>this.monitorCurrentTime_(),nt=()=>this.techWaiting_(),st=()=>this.resetTimeUpdate_(),dt=this.playlistController_,ft=["main","subtitle","audio"],ht={};ft.forEach(bt=>{ht[bt]={reset:()=>this.resetSegmentDownloads_(bt),updateend:()=>this.checkSegmentDownloads_(bt)},dt[`${bt}SegmentLoader_`].on("appendsdone",ht[bt].updateend),dt[`${bt}SegmentLoader_`].on("playlistupdate",ht[bt].reset),this.tech_.on(["seeked","seeking"],ht[bt].reset)});const mt=bt=>{["main","audio"].forEach(St=>{dt[`${St}SegmentLoader_`][bt]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),mt("off"))},this.clearSeekingAppendCheck_=()=>mt("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),mt("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",nt),this.tech_.on(timerCancelEvents,st),this.tech_.on("canplay",rt),this.tech_.one("play",tt),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",nt),this.tech_.off(timerCancelEvents,st),this.tech_.off("canplay",rt),this.tech_.off("play",tt),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),ft.forEach(bt=>{dt[`${bt}SegmentLoader_`].off("appendsdone",ht[bt].updateend),dt[`${bt}SegmentLoader_`].off("playlistupdate",ht[bt].reset),this.tech_.off(["seeked","seeking"],ht[bt].reset)}),this.checkCurrentTimeTimeout_&&window$1.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&window$1.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=window$1.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(_e){const tt=this.playlistController_[`${_e}SegmentLoader_`];this[`${_e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${_e} loader`),this[`${_e}StalledDownloads_`]=0,this[`${_e}Buffered_`]=tt.buffered_()}checkSegmentDownloads_(_e){const tt=this.playlistController_,rt=tt[`${_e}SegmentLoader_`],nt=rt.buffered_(),st=isRangeDifferent(this[`${_e}Buffered_`],nt);if(this[`${_e}Buffered_`]=nt,st){const dt={bufferedRanges:nt};tt.trigger({type:"bufferedrangeschanged",metadata:dt}),this.resetSegmentDownloads_(_e);return}this[`${_e}StalledDownloads_`]++,this.logger_(`found #${this[`${_e}StalledDownloads_`]} ${_e} appends that did not increase buffer (possible stalled download)`,{playlistId:rt.playlist_&&rt.playlist_.id,buffered:timeRangesToArray(nt)}),!(this[`${_e}StalledDownloads_`]<10)&&(this.logger_(`${_e} loader stalled download exclusion`),this.resetSegmentDownloads_(_e),this.tech_.trigger({type:"usage",name:`vhs-${_e}-download-exclusion`}),_e!=="subtitle"&&tt.excludePlaylist({error:{message:`Excessive ${_e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const _e=this.tech_.currentTime(),tt=this.tech_.buffered();if(this.lastRecordedTime===_e&&(!tt.length||_e+SAFE_TIME_DELTA>=tt.end(tt.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&_e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(_e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(createTimeRanges([this.lastRecordedTime,_e]));const rt={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:rt}),this.consecutiveUpdates=0,this.lastRecordedTime=_e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const tt=this.seekable(),rt=this.tech_.currentTime(),nt=this.afterSeekableWindow_(tt,rt,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let st;if(nt&&(st=tt.end(tt.length-1)),this.beforeSeekableWindow_(tt,rt)){const Rt=tt.start(0);st=Rt+(Rt===tt.end(0)?0:SAFE_TIME_DELTA)}if(typeof st<"u")return this.logger_(`Trying to seek outside of seekable at time ${rt} with seekable range ${printableRange(tt)}. Seeking to ${st}.`),this.tech_.setCurrentTime(st),!0;const dt=this.playlistController_.sourceUpdater_,ft=this.tech_.buffered(),ht=dt.audioBuffer?dt.audioBuffered():null,mt=dt.videoBuffer?dt.videoBuffered():null,bt=this.media(),St=bt.partTargetDuration?bt.partTargetDuration:(bt.targetDuration-TIME_FUDGE_FACTOR)*2,Et=[ht,mt];for(let Rt=0;Rt<Et.length;Rt++){if(!Et[Rt])continue;if(timeAheadOf(Et[Rt],rt)<St)return!1}const Ct=findNextRange(ft,rt);return Ct.length===0?!1:(st=Ct.start(0)+SAFE_TIME_DELTA,this.logger_(`Buffered region starts (${Ct.start(0)}) just beyond seek point (${rt}). Seeking to ${st}.`),this.tech_.setCurrentTime(st),!0)}waiting_(){if(this.techWaiting_())return;const _e=this.tech_.currentTime(),tt=this.tech_.buffered(),rt=findRange(tt,_e);if(rt.length&&_e+3<=rt.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(_e),this.logger_(`Stopped at ${_e} while inside a buffered region [${rt.start(0)} -> ${rt.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const _e=this.seekable(),tt=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(_e,tt)){const ft=_e.end(_e.length-1);return this.logger_(`Fell out of live window at time ${tt}. Seeking to live point (seekable end) ${ft}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(ft),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const rt=this.tech_.vhs.playlistController_.sourceUpdater_,nt=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:rt.audioBuffered(),videoBuffered:rt.videoBuffered(),currentTime:tt}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(tt),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const dt=findNextRange(nt,tt);return dt.length>0?(this.logger_(`Stopped at ${tt} and seeking to ${dt.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(tt),!0):!1}afterSeekableWindow_(_e,tt,rt,nt=!1){if(!_e.length)return!1;let st=_e.end(_e.length-1)+SAFE_TIME_DELTA;const dt=!rt.endList,ft=typeof rt.partTargetDuration=="number";return dt&&(ft||nt)&&(st=_e.end(_e.length-1)+rt.targetDuration*3),tt>st}beforeSeekableWindow_(_e,tt){return!!(_e.length&&_e.start(0)>0&&tt<_e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:_e,audioBuffered:tt,currentTime:rt}){if(!_e)return;let nt;if(_e.length&&tt.length){const st=findRange(_e,rt-3),dt=findRange(_e,rt),ft=findRange(tt,rt);ft.length&&!dt.length&&st.length&&(nt={start:st.end(0),end:ft.end(0)})}else findNextRange(_e,rt).length||(nt=this.gapFromVideoUnderflow_(_e,rt));return nt?(this.logger_(`Encountered a gap in video from ${nt.start} to ${nt.end}. Seeking to current time ${rt}`),!0):!1}skipTheGap_(_e){const tt=this.tech_.buffered(),rt=this.tech_.currentTime(),nt=findNextRange(tt,rt);if(this.resetTimeUpdate_(),nt.length===0||rt!==_e)return;this.logger_("skipTheGap_:","currentTime:",rt,"scheduled currentTime:",_e,"nextRange start:",nt.start(0)),this.tech_.setCurrentTime(nt.start(0)+TIME_FUDGE_FACTOR);const st={gapInfo:{from:rt,to:nt.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:st}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(_e,tt){const rt=findGaps(_e);for(let nt=0;nt<rt.length;nt++){const st=rt.start(nt),dt=rt.end(nt);if(tt-st<4&&tt-st>2)return{start:st,end:dt}}return null}}const defaultOptions={errorInterval:30,getSource(et){const tt=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return et(tt)}},initPlugin=function(et,_e){let tt=0,rt=0;const nt=merge(defaultOptions,_e);et.ready(()=>{et.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const st=function(){rt&&et.currentTime(rt)},dt=function(bt){bt!=null&&(rt=et.duration()!==1/0&&et.currentTime()||0,et.one("loadedmetadata",st),et.src(bt),et.trigger({type:"usage",name:"vhs-error-reload"}),et.play())},ft=function(){if(Date.now()-tt<nt.errorInterval*1e3){et.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!nt.getSource||typeof nt.getSource!="function"){videojs.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return tt=Date.now(),nt.getSource.call(et,dt)},ht=function(){et.off("loadedmetadata",st),et.off("error",ft),et.off("dispose",ht)},mt=function(bt){ht(),initPlugin(et,bt)};et.on("error",ft),et.on("dispose",ht),et.reloadSourceOnError=mt},reloadSourceOnError=function(et){initPlugin(this,et)};var version$4="3.17.2",version$3="7.1.0",version$2="1.3.1",version$1$1="7.2.0",version$7="4.0.2";const Vhs={PlaylistLoader,Playlist,utils,STANDARD_PLAYLIST_SELECTOR:lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:lowestBitrateCompatibleVariantSelector,lastBandwidthSelector,movingAverageBandwidthSelector,comparePlaylistBandwidth,comparePlaylistResolution,xhr:xhrFactory()};Object.keys(Config).forEach(et=>{Object.defineProperty(Vhs,et,{get(){return videojs.log.warn(`using Vhs.${et} is UNSAFE be sure you know what you are doing`),Config[et]},set(_e){if(videojs.log.warn(`using Vhs.${et} is UNSAFE be sure you know what you are doing`),typeof _e!="number"||_e<0){videojs.log.warn(`value of Vhs.${et} must be greater than or equal to 0`);return}Config[et]=_e}})});const LOCAL_STORAGE_KEY="videojs-vhs",handleVhsMediaChange=function(et,_e){const tt=_e.media();let rt=-1;for(let nt=0;nt<et.length;nt++)if(et[nt].id===tt.id){rt=nt;break}et.selectedIndex_=rt,et.trigger({selectedIndex:rt,type:"change"})},handleVhsLoadedMetadata=function(et,_e){_e.representations().forEach(tt=>{et.addQualityLevel(tt)}),handleVhsMediaChange(et,_e.playlists)};Vhs.canPlaySource=function(){return videojs.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const emeKeySystems=(et,_e,tt)=>{if(!et)return et;let rt={};_e&&_e.attributes&&_e.attributes.CODECS&&(rt=unwrapCodecList(parseCodecs(_e.attributes.CODECS))),tt&&tt.attributes&&tt.attributes.CODECS&&(rt.audio=tt.attributes.CODECS);const nt=getMimeForCodec(rt.video),st=getMimeForCodec(rt.audio),dt={};for(const ft in et)dt[ft]={},st&&(dt[ft].audioContentType=st),nt&&(dt[ft].videoContentType=nt),_e.contentProtection&&_e.contentProtection[ft]&&_e.contentProtection[ft].pssh&&(dt[ft].pssh=_e.contentProtection[ft].pssh),typeof et[ft]=="string"&&(dt[ft].url=et[ft]);return merge(et,dt)},getAllPsshKeySystemsOptions=(et,_e)=>et.reduce((tt,rt)=>{if(!rt.contentProtection)return tt;const nt=_e.reduce((st,dt)=>{const ft=rt.contentProtection[dt];return ft&&ft.pssh&&(st[dt]={pssh:ft.pssh}),st},{});return Object.keys(nt).length&&tt.push(nt),tt},[]),waitForKeySessionCreation=({player:et,sourceKeySystems:_e,audioMedia:tt,mainPlaylists:rt})=>{if(!et.eme.initializeMediaKeys)return Promise.resolve();const nt=tt?rt.concat([tt]):rt,st=getAllPsshKeySystemsOptions(nt,Object.keys(_e)),dt=[],ft=[];return st.forEach(ht=>{ft.push(new Promise((mt,bt)=>{et.tech_.one("keysessioncreated",mt)})),dt.push(new Promise((mt,bt)=>{et.eme.initializeMediaKeys({keySystems:ht},St=>{if(St){bt(St);return}mt()})}))}),Promise.race([Promise.all(dt),Promise.race(ft)])},setupEmeOptions=({player:et,sourceKeySystems:_e,media:tt,audioMedia:rt})=>{const nt=emeKeySystems(_e,tt,rt);return nt?(et.currentSource().keySystems=nt,nt&&!et.eme?(videojs.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},getVhsLocalStorage=()=>{if(!window$1.localStorage)return null;const et=window$1.localStorage.getItem(LOCAL_STORAGE_KEY);if(!et)return null;try{return JSON.parse(et)}catch{return null}},updateVhsLocalStorage=et=>{if(!window$1.localStorage)return!1;let _e=getVhsLocalStorage();_e=_e?merge(_e,et):et;try{window$1.localStorage.setItem(LOCAL_STORAGE_KEY,JSON.stringify(_e))}catch{return!1}return _e},expandDataUri=et=>et.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(et.substring(et.indexOf(",")+1)):et,addOnRequestHook=(et,_e)=>{et._requestCallbackSet||(et._requestCallbackSet=new Set),et._requestCallbackSet.add(_e)},addOnResponseHook=(et,_e)=>{et._responseCallbackSet||(et._responseCallbackSet=new Set),et._responseCallbackSet.add(_e)},removeOnRequestHook=(et,_e)=>{et._requestCallbackSet&&(et._requestCallbackSet.delete(_e),et._requestCallbackSet.size||delete et._requestCallbackSet)},removeOnResponseHook=(et,_e)=>{et._responseCallbackSet&&(et._responseCallbackSet.delete(_e),et._responseCallbackSet.size||delete et._responseCallbackSet)};Vhs.supportsNativeHls=(function(){if(!document$1||!document$1.createElement)return!1;const et=document$1.createElement("video");return videojs.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(tt){return/maybe|probably/i.test(et.canPlayType(tt))}):!1})();Vhs.supportsNativeDash=(function(){return!document$1||!document$1.createElement||!videojs.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(document$1.createElement("video").canPlayType("application/dash+xml"))})();Vhs.supportsTypeNatively=et=>et==="hls"?Vhs.supportsNativeHls:et==="dash"?Vhs.supportsNativeDash:!1;Vhs.isSupported=function(){return videojs.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Vhs.xhr.onRequest=function(et){addOnRequestHook(Vhs.xhr,et)};Vhs.xhr.onResponse=function(et){addOnResponseHook(Vhs.xhr,et)};Vhs.xhr.offRequest=function(et){removeOnRequestHook(Vhs.xhr,et)};Vhs.xhr.offResponse=function(et){removeOnResponseHook(Vhs.xhr,et)};const Component=videojs.getComponent("Component");class VhsHandler extends Component{constructor(_e,tt,rt){if(super(tt,rt.vhs),typeof rt.initialBandwidth=="number"&&(this.options_.bandwidth=rt.initialBandwidth),this.logger_=logger$1("VhsHandler"),tt.options_&&tt.options_.playerId){const nt=videojs.getPlayer(tt.options_.playerId);this.player_=nt}if(this.tech_=tt,this.source_=_e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&tt.overrideNativeAudioTracks&&tt.overrideNativeVideoTracks)tt.overrideNativeAudioTracks(!0),tt.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(tt.featuresNativeVideoTracks||tt.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(document$1,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],nt=>{const st=document$1.fullscreenElement||document$1.webkitFullscreenElement||document$1.mozFullScreenElement||document$1.msFullscreenElement;st&&st.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(_e={}){if(this.options_=merge(this.options_,_e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const rt=getVhsLocalStorage();rt&&rt.bandwidth&&(this.options_.bandwidth=rt.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),rt&&rt.throughput&&(this.options_.throughput=rt.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Config.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Config.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(rt=>{typeof this.source_[rt]<"u"&&(this.options_[rt]=this.source_[rt])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const tt=this.options_.customPixelRatio;typeof tt=="number"&&tt>=0&&(this.customPixelRatio=tt)}setOptions(_e={}){this.setOptions_(_e)}src(_e,tt){if(!_e)return;this.setOptions_(),this.options_.src=expandDataUri(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Vhs,this.options_.sourceType=simpleTypeFromSourceType(tt),this.options_.seekTo=st=>{this.tech_.setCurrentTime(st)},this.options_.player_=this.player_,this.playlistController_=new PlaylistController(this.options_);const rt=merge({liveRangeSafeTimeDelta:SAFE_TIME_DELTA},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new PlaybackWatcher(rt),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const st=videojs.players[this.tech_.options_.playerId];let dt=this.playlistController_.error;typeof dt=="object"&&!dt.code?dt.code=3:typeof dt=="string"&&(dt={message:dt,code:3}),st.error(dt)});const nt=this.options_.bufferBasedABR?Vhs.movingAverageBandwidthSelector(.55):Vhs.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):nt.bind(this),this.playlistController_.selectInitialPlaylist=Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(st){this.playlistController_.selectPlaylist=st.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(st){this.playlistController_.mainSegmentLoader_.throughput.rate=st,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let st=this.playlistController_.mainSegmentLoader_.bandwidth;const dt=window$1.navigator.connection||window$1.navigator.mozConnection||window$1.navigator.webkitConnection,ft=1e7;if(this.options_.useNetworkInformationApi&&dt){const ht=dt.downlink*1e3*1e3;ht>=ft&&st>=ft?st=Math.max(st,ht):st=ht}return st},set(st){this.playlistController_.mainSegmentLoader_.bandwidth=st,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const st=1/(this.bandwidth||1);let dt;return this.throughput>0?dt=1/this.throughput:dt=0,Math.floor(1/(st+dt))},set(){videojs.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>timeRangesToArray(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>timeRangesToArray(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&updateVhsLocalStorage({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{renditionSelectionMixin(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=window$1.URL.createObjectURL(this.playlistController_.mediaSource),(videojs.browser.IS_ANY_SAFARI||videojs.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const _e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),waitForKeySessionCreation({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:_e&&_e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(tt=>{this.logger_("error while creating EME key session",tt),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const _e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,tt=setupEmeOptions({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:_e&&_e.media()});if(this.player_.tech_.on("keystatuschange",rt=>{this.playlistController_.updatePlaylistByKeyStatus(rt.keyId,rt.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!tt){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const _e=videojs.players[this.tech_.options_.playerId];!_e||!_e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=_e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{handleVhsLoadedMetadata(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{handleVhsMediaChange(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":version$4,"mux.js":version$3,"mpd-parser":version$2,"m3u8-parser":version$1$1,"aes-decrypter":version$7}}version(){return this.constructor.version()}canChangeType(){return SourceUpdater.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(_e){this.playlistController_.setCurrentTime(_e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&window$1.URL.revokeObjectURL&&(window$1.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(_e,tt){return getProgramTime({playlist:this.playlistController_.media(),time:_e,callback:tt})}seekToProgramTime(_e,tt,rt=!0,nt=2){return seekToProgramTime({programTime:_e,playlist:this.playlistController_.media(),retryCount:nt,pauseAfterSeek:rt,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:tt})}setupXhrHooks_(){this.xhr.onRequest=_e=>{addOnRequestHook(this.xhr,_e)},this.xhr.onResponse=_e=>{addOnResponseHook(this.xhr,_e)},this.xhr.offRequest=_e=>{removeOnRequestHook(this.xhr,_e)},this.xhr.offResponse=_e=>{removeOnResponseHook(this.xhr,_e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const _e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],tt=["gapjumped","playedrangeschanged"];_e.forEach(rt=>{this.playlistController_.on(rt,nt=>{this.player_.trigger(_extends({},nt))})}),tt.forEach(rt=>{this.playbackWatcher_.on(rt,nt=>{this.player_.trigger(_extends({},nt))})})}}const VhsSourceHandler={name:"videojs-http-streaming",VERSION:version$4,canHandleSource(et,_e={}){const tt=merge(videojs.options,_e);return!tt.vhs.experimentalUseMMS&&!browserSupportsCodec("avc1.4d400d,mp4a.40.2",!1)?!1:VhsSourceHandler.canPlayType(et.type,tt)},handleSource(et,_e,tt={}){const rt=merge(videojs.options,tt);return _e.vhs=new VhsHandler(et,_e,rt),_e.vhs.xhr=xhrFactory(),_e.vhs.setupXhrHooks_(),_e.vhs.src(et.src,et.type),_e.vhs},canPlayType(et,_e){const tt=simpleTypeFromSourceType(et);if(!tt)return"";const rt=VhsSourceHandler.getOverrideNative(_e);return!Vhs.supportsTypeNatively(tt)||rt?"maybe":""},getOverrideNative(et={}){const{vhs:_e={}}=et,tt=!(videojs.browser.IS_ANY_SAFARI||videojs.browser.IS_IOS),{overrideNative:rt=tt}=_e;return rt}},supportsNativeMediaSources=()=>browserSupportsCodec("avc1.4d400d,mp4a.40.2",!0);supportsNativeMediaSources()&&videojs.getTech("Html5").registerSourceHandler(VhsSourceHandler,0);videojs.VhsHandler=VhsHandler;videojs.VhsSourceHandler=VhsSourceHandler;videojs.Vhs=Vhs;videojs.use||videojs.registerComponent("Vhs",Vhs);videojs.options.vhs=videojs.options.vhs||{};(!videojs.getPlugin||!videojs.getPlugin("reloadSourceOnError"))&&videojs.registerPlugin("reloadSourceOnError",reloadSourceOnError);var Events=(et=>(et.AppMove="AppMove",et.AppFocus="AppFocus",et.AppResize="AppResize",et.AppBoxStateChange="AppBoxStateChange",et.GetAttributes="GetAttributes",et.UpdateWindowManagerWrapper="UpdateWindowManagerWrapper",et.InitReplay="InitReplay",et.WindowCreated="WindowCreated",et.SetMainViewScenePath="SetMainViewScenePath",et.SetMainViewSceneIndex="SetMainViewSceneIndex",et.SetAppFocusIndex="SetAppFocusIndex",et.SwitchViewsToFreedom="SwitchViewsToFreedom",et.MoveCamera="MoveCamera",et.MoveCameraToContain="MoveCameraToContain",et.CursorMove="CursorMove",et.RootDirRemoved="RootDirRemoved",et.Refresh="Refresh",et.InitMainViewCamera="InitMainViewCamera",et))(Events||{});const MagixEventName="__WindowManger",EnsureReconnectEvent="__WindowMangerEnsureReconnected__";var AppAttributes=(et=>(et.Size="size",et.Position="position",et.SceneIndex="SceneIndex",et.ZIndex="zIndex",et))(AppAttributes||{}),AppEvents=(et=>(et.setBoxSize="setBoxSize",et.setBoxMinSize="setBoxMinSize",et.destroy="destroy",et))(AppEvents||{}),AppStatus=(et=>(et.StartCreate="StartCreate",et))(AppStatus||{}),CursorState=(et=>(et.Leave="leave",et.Normal="normal",et))(CursorState||{});const REQUIRE_VERSION="2.16.1",MIN_WIDTH=340/720,MIN_HEIGHT=340/720,DEFAULT_CONTAINER_RATIO=9/16,ROOT_DIR="/",INIT_DIR="/init",SETUP_APP_DELAY=50,callbacks$1=new Emittery;class AppCreateQueue{constructor(){this.list=[],this.isEmit=!1,this.invoked=()=>{this.currentInvoker=void 0,this.list.length===0&&(this.clear(),this.emitReady())},this.clear=()=>{clearInterval(this.timer),this.timer=void 0}}initInterval(){return setInterval(()=>{this.invoke()},50)}push(_e){this.list.push(_e),this.invoke(),this.timer===void 0&&this.list.length>0&&(this.timer=this.initInterval())}invoke(){if(this.list.length===0||this.currentInvoker!==void 0)return;const _e=this.list.shift();_e&&(this.currentInvoker=_e,_e().then(()=>{this.invoked()}).catch(tt=>{console.error(`[WindowManager]: create app error: ${tt.message}`),this.invoked()}))}emitReady(){this.isEmit||setTimeout(()=>{callbacks$1.emit("ready")},SETUP_APP_DELAY),this.isEmit=!0}empty(){this.list=[],this.clear()}destroy(){this.timer&&this.clear()}}const internalEmitter=new Emittery,DatabaseName="__WindowManagerAppCache";let db$1,store;const initDb=async()=>{db$1=await createDb()},setItem=(et,_e)=>{if(db$1)return addRecord(db$1,{kind:et,sourceCode:_e})},getItem=async et=>db$1?await query(db$1,et):null;function createDb(){return new Promise((et,_e)=>{const tt=indexedDB.open(DatabaseName,2);tt.onerror=rt=>{_e(rt)},tt.onupgradeneeded=rt=>{const nt=rt.target.result;nt.objectStoreNames.contains("apps")||(store=nt.createObjectStore("apps",{keyPath:"kind"}),store.createIndex("kind","kind",{unique:!0}))},tt.onsuccess=()=>{const rt=tt.result;et(rt)}})}function query(et,_e){return new Promise((tt,rt)=>{const st=et.transaction(["apps"]).objectStore("apps").index("kind").get(_e);st.onerror=dt=>rt(dt),st.onsuccess=()=>{st.result?tt(st.result):tt(null)}})}function addRecord(et,_e){return new Promise((tt,rt)=>{const nt=et.transaction(["apps"],"readwrite").objectStore("apps").add(_e);nt.onsuccess=()=>tt(),nt.onerror=()=>rt()})}const Prefix="NetlessApp",TIMEOUT=1e4,getScript=async et=>{const _e=await getItem(et);if(_e)return _e.sourceCode;{const rt=await(await fetchWithTimeout(et,{timeout:TIMEOUT})).text();return await setItem(et,rt),rt}},executeScript=(et,_e)=>{let tt=Function(et+`
;return ${_e}`)();return typeof tt>"u"&&(tt=window[_e]),tt},loadApp=async(et,_e,tt)=>{const rt=tt||Prefix+_e;callbacks$1.emit("loadApp",{kind:_e,status:"start"});let nt;try{if(nt=await getScript(et),!nt||nt.length===0)throw callbacks$1.emit("loadApp",{kind:_e,status:"failed",reason:"script is empty."}),new Error("[WindowManager]: script is empty.")}catch(st){throw callbacks$1.emit("loadApp",{kind:_e,status:"failed",reason:st.message}),st}return getResult(nt,rt,_e)},getResult=(et,_e,tt)=>{try{const rt=executeScript(et,_e);return callbacks$1.emit("loadApp",{kind:tt,status:"success"}),rt}catch(rt){if(rt.message.includes("Can only have one anonymous define call per script file")){const nt=window.define;typeof nt=="function"&&nt.amd&&delete nt.amd;const st=executeScript(et,_e);return callbacks$1.emit("loadApp",{kind:tt,status:"success"}),st}throw callbacks$1.emit("loadApp",{kind:tt,status:"failed",reason:rt.message}),rt}};async function fetchWithTimeout(et,_e){const{timeout:tt=1e4}=_e,rt=new AbortController,nt=setTimeout(()=>rt.abort(),tt),st=await fetch(et,{..._e,signal:rt.signal,headers:{"content-type":"text/plain"}});return clearTimeout(nt),st}class AppRegister{constructor(){this.kindEmitters=new Map,this.registered=new Map,this.appClassesCache=new Map,this.appClasses=new Map,this.syncRegisterApp=null,this.onSyncRegisterAppChange=_e=>{this.register({kind:_e.kind,src:_e.src})}}setSyncRegisterApp(_e){this.syncRegisterApp=_e}async register(_e){this.appClassesCache.delete(_e.kind),this.registered.set(_e.kind,_e);const tt=_e.src;let rt;if(typeof tt=="string"&&(rt=async()=>{const nt=await loadApp(tt,_e.kind,_e.name);return nt.__esModule?nt.default:nt},this.syncRegisterApp&&this.syncRegisterApp({kind:_e.kind,src:tt,name:_e.name})),typeof tt=="function"&&(rt=async()=>{let nt=await tt();if(nt)return(nt.__esModule||nt.default)&&(nt=nt.default),nt;throw new Error(`[WindowManager]: load remote script failed, ${tt}`)}),typeof tt=="object"&&(rt=async()=>tt),this.appClasses.set(_e.kind,async()=>{let nt=this.appClassesCache.get(_e.kind);return nt||(nt=rt(),this.appClassesCache.set(_e.kind,nt)),nt}),_e.addHooks){const nt=this.createKindEmitter(_e.kind);nt&&_e.addHooks(nt)}}unregister(_e){this.appClasses.delete(_e),this.appClassesCache.delete(_e),this.registered.delete(_e);const tt=this.kindEmitters.get(_e);tt&&(tt.clearListeners(),this.kindEmitters.delete(_e))}async notifyApp(_e,tt,rt){const nt=this.kindEmitters.get(_e);await nt?.emit(tt,rt)}createKindEmitter(_e){if(!this.kindEmitters.has(_e)){const tt=new Emittery;this.kindEmitters.set(_e,tt)}return this.kindEmitters.get(_e)}}const appRegister=new AppRegister,genAppId=async et=>{var _e,tt;const rt=await((_e=appRegister.appClasses.get(et))==null?void 0:_e());return rt&&((tt=rt.config)!=null&&tt.singleton)?et:`${et}-${v4().replace("-","").slice(0,8)}`},setViewFocusScenePath=(et,_e)=>{if(et.focusScenePath!==_e)return et.focusScenePath=_e,et},setScenePath=(et,_e)=>{if(et&&et.isWritable&&et.state.sceneState.scenePath!==_e){const tt=_e==="/"?"":_e;et.setScenePath(tt)}},getScenePath=(et,_e,tt)=>{var rt;if(et&&_e){const st=(rt=entireScenes(et)[_e])==null?void 0:rt[tt];if(st)return`${_e}/${st.name}`}},removeScenes=(et,_e,tt)=>{et&&et.scenePathType(_e)!==whiteWebSdkExports.ScenePathType.None&&et.removeScenes(_e,tt)},addEmitterOnceListener=(et,_e)=>{internalEmitter.once(et).then(_e)};lodashExports.debounce((et,_e)=>{et.emit("mainViewModeChange",_e)},200);const makeValidScenePath=(et,_e,tt=0)=>{const rt=entireScenes(et)[_e];if(!rt)return;const nt=rt[tt];if(!nt)return;const st=nt.name;return _e===ROOT_DIR?`/${st}`:`${_e}/${st}`},entireScenes=et=>et.entireScenes(),putScenes=(et,_e,tt,rt)=>{var nt;for(let st=0;st<tt.length;++st)if((nt=tt[st].name)!=null&&nt.includes("/"))throw new Error("scenes name can not have '/'");return et?.putScenes(_e,tt,rt)},isValidScenePath=et=>et.startsWith("/"),parseSceneDir=et=>{const _e=et.split("/");_e.pop();let tt=_e.join("/");return tt===""&&(tt="/"),tt},ensureValidScenePath=et=>et.endsWith("/")?et.slice(0,-1):et,getVersionNumber=et=>{const _e=et.split(".").map(tt=>tt.padStart(2,"0")).join("");return parseInt(_e)},wait=et=>new Promise(_e=>setTimeout(_e,et)),isRootDirPage=et=>et.split("").reduce((tt,rt)=>(rt===ROOT_DIR&&(tt+=1),tt),0)===1;class AppListeners{constructor(_e){this.manager=_e,this.displayer=this.manager.displayer,this.mainMagixEventListener=tt=>{if(tt.authorId!==this.displayer.observerId){const rt=tt.payload;switch(rt.eventName){case Events.AppMove:{this.appMoveHandler(rt.payload);break}case Events.AppResize:{this.appResizeHandler(rt.payload);break}case Events.AppBoxStateChange:{this.boxStateChangeHandler(rt.payload);break}case Events.SetMainViewScenePath:{this.setMainViewScenePathHandler(rt.payload);break}case Events.CursorMove:{this.cursorMoveHandler(rt.payload);break}case Events.RootDirRemoved:{this.rootDirRemovedHandler();break}case Events.Refresh:{this.refreshHandler();break}case Events.InitMainViewCamera:{this.initMainViewCameraHandler();break}case Events.SetAppFocusIndex:{this.setAppFocusViewIndexHandler(rt.payload);break}}}},this.appMoveHandler=tt=>{var rt;(rt=this.boxManager)==null||rt.moveBox(tt)},this.appResizeHandler=tt=>{var rt,nt;(rt=this.boxManager)==null||rt.resizeBox(Object.assign(tt,{skipUpdate:!0})),(nt=this.manager.room)==null||nt.refreshViewSize()},this.boxStateChangeHandler=tt=>{callbacks$1.emit("boxStateChange",tt)},this.setMainViewScenePathHandler=({nextScenePath:tt})=>{setViewFocusScenePath(this.manager.mainView,tt),callbacks$1.emit("mainViewScenePathChange",tt)},this.cursorMoveHandler=tt=>{internalEmitter.emit("cursorMove",tt)},this.rootDirRemovedHandler=()=>{this.manager.createRootDirScenesCallback(),this.manager.mainViewProxy.rebind(),internalEmitter.emit("rootDirRemoved")},this.refreshHandler=()=>{this.manager.windowManger._refresh()},this.initMainViewCameraHandler=()=>{this.manager.mainViewProxy.addCameraReaction()},this.setAppFocusViewIndexHandler=tt=>{if(tt.type==="main")this.manager.setSceneIndexWithoutSync(tt.index);else if(tt.type==="app"&&tt.appID){const rt=this.manager.appProxies.get(tt.appID);rt&&rt.setSceneIndexWithoutSync(tt.index)}}}get boxManager(){return this.manager.boxManager}addListeners(){this.displayer.addMagixEventListener(MagixEventName,this.mainMagixEventListener)}removeListeners(){this.displayer.removeMagixEventListener(MagixEventName,this.mainMagixEventListener)}}class AppCreateError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: app duplicate exists and cannot be created again"}}class AppManagerNotInitError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: AppManager must be initialized"}}class WhiteWebSDKInvalidError extends Error{constructor(_e){super(`[WindowManager]: white-web-sdk version must large than ${_e}`)}}class ParamsInvalidError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: kind must be a valid string"}}class BoxNotCreatedError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: box need created"}}class InvalidScenePath extends Error{constructor(){super(...arguments),this.message='[WindowManager]: ScenePath should start with "/"'}}class BoxManagerNotFoundError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: boxManager not found"}}class BindContainerRoomPhaseInvalidError extends Error{constructor(){super(...arguments),this.message="[WindowManager]: room phase only Connected can be bindContainer"}}const e$3="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s$3=e$3.length,t$3=Array(20),r$4=()=>{for(let et=0;et<20;et++)t$3[et]=e$3.charAt(Math.random()*s$3);return t$3.join("")};class o$2{constructor(){this.disposers=new Map}add(_e,tt=r$4()){return this.flush(tt),this.disposers.set(tt,_e()),tt}addDisposer(_e,tt=r$4()){return this.flush(tt),this.disposers.set(tt,_e),tt}addEventListener(_e,tt,rt,nt,st=r$4()){return this.add(()=>(_e.addEventListener(tt,rt,nt),()=>_e.removeEventListener(tt,rt,nt)),st),st}setTimeout(_e,tt,rt=r$4()){return this.add(()=>{const nt=window.setTimeout(()=>{this.remove(rt),_e()},tt);return()=>window.clearTimeout(nt)},rt)}setInterval(_e,tt,rt=r$4()){return this.add(()=>{const nt=window.setInterval(_e,tt);return()=>window.clearInterval(nt)},rt)}remove(_e){const tt=this.disposers.get(_e);return this.disposers.delete(_e),tt}flush(_e){const tt=this.remove(_e);if(tt)try{tt()}catch(rt){console.error(rt)}}flushAll(){this.disposers.forEach(_e=>{try{_e()}catch(tt){console.error(tt)}}),this.disposers.clear()}}const onObjectByEvent=et=>(_e,tt)=>{if(_e!==void 0)if(whiteWebSdkExports.listenUpdated){const rt=nt=>{nt.map(dt=>dt.kind).includes(et)&&tt()};return whiteWebSdkExports.listenUpdated(_e,rt),tt(),()=>whiteWebSdkExports.unlistenUpdated(_e,rt)}else return whiteWebSdkExports.reaction(()=>_e,()=>{tt()},{fireImmediately:!0})},safeListenPropsUpdated=(et,_e,tt)=>{let rt=null;const nt=whiteWebSdkExports.reaction(et,()=>{rt&&(rt(),rt=null);const st=et();lodashExports.isObject(st)?(rt=()=>whiteWebSdkExports.unlistenUpdated(st,_e),whiteWebSdkExports.listenUpdated(st,_e)):tt?.(st)},{fireImmediately:!0});return()=>{rt?.(),nt()}};onObjectByEvent(whiteWebSdkExports.UpdateEventKind.Removed);onObjectByEvent(whiteWebSdkExports.UpdateEventKind.Inserted);class StorageEvent{constructor(){this.listeners=new Set}get length(){return this.listeners.size}dispatch(_e){this.listeners.forEach(tt=>tt(_e))}addListener(_e){this.listeners.add(_e)}removeListener(_e){this.listeners.delete(_e)}}const plainObjectKeys$1=Object.keys;function isRef(et){return!!lodashExports.has(et,"__isRef")}function makeRef(et){return{k:r$4(),v:et,__isRef:!0}}const STORAGE_NS$1="_WM-STORAGE_";let Storage$1=class{constructor(_e,tt,rt){if(this.maxIllusionQueueSize=500,this._sideEffect=new o$2,this._destroyed=!1,this._refMap=new WeakMap,this._lastValue=new Map,this.onStateChanged=new StorageEvent,rt&&!lodashExports.isObject(rt))throw new Error(`Default state for Storage ${tt} is not an object.`);this._context=_e,this.id=tt||null,this._state={};const nt=this._getRawState(this._state);this._context.getIsWritable()&&(this.id===null?_e.isAddApp&&rt&&this.setState(rt):(nt===this._state||!lodashExports.isObject(nt))&&(lodashExports.get(this._context.getAttributes(),[STORAGE_NS$1])||this._context.updateAttributes([STORAGE_NS$1],{}),this._context.updateAttributes([STORAGE_NS$1,this.id],this._state),rt&&this.setState(rt))),plainObjectKeys$1(nt).forEach(st=>{if(!(this.id===null&&st===STORAGE_NS$1))try{const dt=lodashExports.isObject(nt[st])?JSON.parse(JSON.stringify(nt[st])):nt[st];isRef(dt)?(this._state[st]=dt.v,lodashExports.isObject(dt.v)&&this._refMap.set(dt.v,dt)):this._state[st]=dt}catch(dt){console.error(dt)}}),this._sideEffect.addDisposer(safeListenPropsUpdated(()=>this.id===null?_e.getAttributes():lodashExports.get(_e.getAttributes(),[STORAGE_NS$1,this.id]),this._updateProperties.bind(this),this.destroy.bind(this)))}get state(){return this._destroyed&&console.warn(`Accessing state on destroyed Storage "${this.id}"`),this._state}addStateChangedListener(_e){return this.onStateChanged.addListener(_e),()=>this.onStateChanged.removeListener(_e)}ensureState(_e){return this.setState(plainObjectKeys$1(_e).reduce((tt,rt)=>(lodashExports.has(this._state,rt)||(tt[rt]=_e[rt]),tt),{}))}setState(_e){if(this._destroyed){console.error(new Error(`Cannot call setState on destroyed Storage "${this.id}".`));return}if(!this._context.getIsWritable()){console.error(new Error(`Cannot setState on Storage "${this.id}" without writable access`),_e);return}const tt=plainObjectKeys$1(_e);tt.length>0&&tt.forEach(rt=>{const nt=_e[rt];if(nt!==this._state[rt])if(nt===void 0)this._lastValue.set(rt,this._state[rt]),delete this._state[rt],this._setRawState(rt,nt);else{this._lastValue.set(rt,this._state[rt]),this._state[rt]=nt;let st=nt;if(lodashExports.isObject(nt)){let dt=this._refMap.get(nt);dt||(dt=makeRef(nt),this._refMap.set(nt,dt)),st=dt}this._setRawState(rt,st)}})}emptyStorage(){if(!(lodashExports.size(this._state)<=0)){if(this._destroyed){console.error(new Error(`Cannot empty destroyed Storage "${this.id}".`));return}if(!this._context.getIsWritable()){console.error(new Error(`Cannot empty Storage "${this.id}" without writable access.`));return}this.setState(lodashExports.mapValues(this._state,lodashExports.noop))}}deleteStorage(){if(this.id===null)throw new Error("Cannot delete main Storage");if(!this._context.getIsWritable()){console.error(new Error(`Cannot delete Storage "${this.id}" without writable access.`));return}this.destroy(),this._context.updateAttributes([STORAGE_NS$1,this.id],void 0)}get destroyed(){return this._destroyed}destroy(){this._destroyed=!0,this._sideEffect.flushAll()}_getRawState(_e){var tt;return this.id===null?(tt=this._context.getAttributes())!=null?tt:_e:lodashExports.get(this._context.getAttributes(),[STORAGE_NS$1,this.id],_e)}_setRawState(_e,tt){if(this.id===null){if(_e===STORAGE_NS$1)throw new Error(`Cannot set attribute internal filed "${STORAGE_NS$1}"`);return this._context.updateAttributes([_e],tt)}else return this._context.updateAttributes([STORAGE_NS$1,this.id,_e],tt)}_updateProperties(_e){var tt;if(this._destroyed){console.error(new Error(`Cannot call _updateProperties on destroyed Storage "${this.id}".`));return}if(_e.length>0){const rt={};for(let nt=0;nt<_e.length;nt++)try{const st=_e[nt],dt=st.key;if(this.id===null&&dt===STORAGE_NS$1)continue;const ft=lodashExports.isObject(st.value)?JSON.parse(JSON.stringify(st.value)):st.value;let ht;switch(this._lastValue.has(dt)&&(ht=this._lastValue.get(dt),this._lastValue.delete(dt)),st.kind){case 2:{lodashExports.has(this._state,dt)&&(ht=this._state[dt],delete this._state[dt]),rt[dt]={oldValue:ht};break}default:{let mt=ft;if(isRef(ft)){const{k:bt,v:St}=ft,Et=this._state[dt];lodashExports.isObject(Et)&&((tt=this._refMap.get(Et))==null?void 0:tt.k)===bt?mt=Et:(mt=St,lodashExports.isObject(St)&&this._refMap.set(St,ft))}mt!==this._state[dt]&&(ht=this._state[dt],this._state[dt]=mt),rt[dt]={newValue:mt,oldValue:ht};break}}}catch(st){console.error(st)}this.onStateChanged.dispatch(rt)}}};class AppContext{constructor(_e,tt,rt,nt,st){this.manager=_e,this.boxManager=tt,this.appId=rt,this.appProxy=nt,this.appOptions=st,this.mobxUtils={autorun:whiteWebSdkExports.autorun,reaction:whiteWebSdkExports.reaction,toJS:whiteWebSdkExports.toJS},this.objectUtils={listenUpdated:whiteWebSdkExports.listenUpdated,unlistenUpdated:whiteWebSdkExports.unlistenUpdated,listenDisposed:whiteWebSdkExports.listenDisposed,unlistenDisposed:whiteWebSdkExports.unlistenDisposed},this.store=this.manager.store,this.isReplay=this.manager.isReplay,this.getManager=()=>this.manager,this.getBoxManager=()=>this.boxManager,this.getWindowManager=()=>this.manager.windowManger,this.getBoxStatus=()=>this.manager.store.getBoxStatus(this.appId),this.getLastNotMinimizedBoxStatus=()=>this.manager.store.getLastNotMinimizedBoxStatus(this.appId),this.getDisplayer=()=>this.manager.displayer,this.getAppProxy=()=>this.appProxy,this.getAttributes=()=>this.appProxy.attributes,this.getScenes=()=>{const dt=this.store.getAppAttributes(this.appId);return dt?.isDynamicPPT?this.appProxy.scenes:dt?.options.scenes},this.getView=()=>this.appProxy.view,this.mountView=dt=>{const ft=this.getView();ft&&(ft.divElement=dt,setTimeout(()=>{var ht;(ht=this.getRoom())==null||ht.refreshViewSize(),callbacks$1.emit("onAppViewMounted",{appId:this.appId,view:ft})},1e3))},this.getInitScenePath=()=>this.manager.getAppInitPath(this.appId),this.getIsWritable=()=>this.manager.canOperate,this.getBox=()=>{const dt=this.boxManager.getBox(this.appId);if(dt)return dt;throw new BoxNotCreatedError},this.getRoom=()=>this.manager.room,this.setAttributes=dt=>{this.manager.safeSetAttributes({[this.appId]:dt})},this.updateAttributes=(dt,ft)=>{this.manager.attributes[this.appId]&&this.manager.safeUpdateAttributes([this.appId,...dt],ft)},this.setScenePath=async dt=>{var ft;this.appProxy.box&&(this.appProxy.setFullPath(dt),(ft=this.getRoom())==null||ft.setScenePath(dt))},this.getAppOptions=()=>typeof this.appOptions=="function"?this.appOptions():this.appOptions,this.createStorage=(dt,ft)=>{const ht=new Storage$1(this,dt,ft);return this.emitter.on("destroy",()=>{ht.destroy()}),ht},this.dispatchMagixEvent=(...dt)=>{var ft;const ht=`${this.appId}:${dt[0]}`;return(ft=this.manager.room)==null?void 0:ft.dispatchMagixEvent(ht,dt[1])},this.addMagixEventListener=(dt,ft,ht)=>{const mt=`${this.appId}:${dt}`;return this.manager.displayer.addMagixEventListener(mt,ft,ht),()=>this.manager.displayer.removeMagixEventListener(mt,ft)},this.removeMagixEventListener=this.manager.displayer.removeMagixEventListener.bind(this.manager.displayer),this.nextPage=async()=>{const dt=this.pageState.index+1;return dt>this.pageState.length-1?(console.warn("[WindowManager] nextPage: index out of range"),!1):(this.appProxy.setSceneIndex(dt),!0)},this.jumpPage=async dt=>0<=dt&&dt<this.pageState.length?(this.appProxy.setSceneIndex(dt),!0):(console.warn("[WindowManager] nextPage: index out of range"),!1),this.prevPage=async()=>{const dt=this.pageState.index-1;return dt<0?(console.warn("[WindowManager] prevPage: index out of range"),!1):(this.appProxy.setSceneIndex(dt),!0)},this.addPage=async dt=>{const ft=dt?.after,ht=dt?.scene,mt=this.appProxy.scenePath;if(mt)if(ft){const bt=this.pageState.index+1;putScenes(this.manager.room,mt,[ht||{}],bt)}else putScenes(this.manager.room,mt,[ht||{}])},this.removePage=async dt=>{const ft=dt===void 0?this.pageState.index:dt;return this.pageState.length===1?(console.warn("[WindowManager]: can not remove the last page"),!1):ft<0||ft>=this.pageState.length?(console.warn(`[WindowManager]: page index ${dt} out of range`),!1):this.appProxy.removeSceneByIndex(ft)},this.emitter=nt.appEmitter,this.isAddApp=nt.isAddApp}get storage(){return this._storage||(this._storage=new Storage$1(this)),this._storage}get pageState(){return this.appProxy.pageState}get kind(){return this.appProxy.kind}dispatchAppEvent(_e,tt){internalEmitter.emit(`custom-${this.kind}`,{kind:this.kind,appId:this.appId,type:_e,value:tt})}}AppContext.kind="AppContext";class AppPageStateImpl{constructor(_e){this.params=_e,this.sceneNode=null,this.onSceneChange=nt=>{this.sceneNode=nt,this.params.notifyPageStateChange()};const{displayer:tt,scenePath:rt}=this.params;rt&&(this.sceneNode=tt.createScenesCallback(rt,{onAddScene:this.onSceneChange,onRemoveScene:this.onSceneChange}))}getFullPath(_e){var tt;const rt=(tt=this.sceneNode)==null?void 0:tt.scenes;if(this.params.scenePath&&rt){const nt=rt[_e];if(nt)return`${this.params.scenePath}/${nt}`}}toObject(){var _e,tt;return{index:((_e=this.params.view)==null?void 0:_e.focusSceneIndex)||0,length:((tt=this.sceneNode)==null?void 0:tt.scenes.length)||0}}destroy(){var _e;(_e=this.sceneNode)==null||_e.dispose()}}var eventemitter3={exports:{}};(function(et){var _e=Object.prototype.hasOwnProperty,tt="~";function rt(){}Object.create&&(rt.prototype=Object.create(null),new rt().__proto__||(tt=!1));function nt(ht,mt,bt){this.fn=ht,this.context=mt,this.once=bt||!1}function st(ht,mt,bt,St,Et){if(typeof bt!="function")throw new TypeError("The listener must be a function");var Ct=new nt(bt,St||ht,Et),Rt=tt?tt+mt:mt;return ht._events[Rt]?ht._events[Rt].fn?ht._events[Rt]=[ht._events[Rt],Ct]:ht._events[Rt].push(Ct):(ht._events[Rt]=Ct,ht._eventsCount++),ht}function dt(ht,mt){--ht._eventsCount===0?ht._events=new rt:delete ht._events[mt]}function ft(){this._events=new rt,this._eventsCount=0}ft.prototype.eventNames=function(){var mt=[],bt,St;if(this._eventsCount===0)return mt;for(St in bt=this._events)_e.call(bt,St)&&mt.push(tt?St.slice(1):St);return Object.getOwnPropertySymbols?mt.concat(Object.getOwnPropertySymbols(bt)):mt},ft.prototype.listeners=function(mt){var bt=tt?tt+mt:mt,St=this._events[bt];if(!St)return[];if(St.fn)return[St.fn];for(var Et=0,Ct=St.length,Rt=new Array(Ct);Et<Ct;Et++)Rt[Et]=St[Et].fn;return Rt},ft.prototype.listenerCount=function(mt){var bt=tt?tt+mt:mt,St=this._events[bt];return St?St.fn?1:St.length:0},ft.prototype.emit=function(mt,bt,St,Et,Ct,Rt){var Tt=tt?tt+mt:mt;if(!this._events[Tt])return!1;var wt=this._events[Tt],At=arguments.length,Nt,Pt;if(wt.fn){switch(wt.once&&this.removeListener(mt,wt.fn,void 0,!0),At){case 1:return wt.fn.call(wt.context),!0;case 2:return wt.fn.call(wt.context,bt),!0;case 3:return wt.fn.call(wt.context,bt,St),!0;case 4:return wt.fn.call(wt.context,bt,St,Et),!0;case 5:return wt.fn.call(wt.context,bt,St,Et,Ct),!0;case 6:return wt.fn.call(wt.context,bt,St,Et,Ct,Rt),!0}for(Pt=1,Nt=new Array(At-1);Pt<At;Pt++)Nt[Pt-1]=arguments[Pt];wt.fn.apply(wt.context,Nt)}else{var It=wt.length,Ft;for(Pt=0;Pt<It;Pt++)switch(wt[Pt].once&&this.removeListener(mt,wt[Pt].fn,void 0,!0),At){case 1:wt[Pt].fn.call(wt[Pt].context);break;case 2:wt[Pt].fn.call(wt[Pt].context,bt);break;case 3:wt[Pt].fn.call(wt[Pt].context,bt,St);break;case 4:wt[Pt].fn.call(wt[Pt].context,bt,St,Et);break;default:if(!Nt)for(Ft=1,Nt=new Array(At-1);Ft<At;Ft++)Nt[Ft-1]=arguments[Ft];wt[Pt].fn.apply(wt[Pt].context,Nt)}}return!0},ft.prototype.on=function(mt,bt,St){return st(this,mt,bt,St,!1)},ft.prototype.once=function(mt,bt,St){return st(this,mt,bt,St,!0)},ft.prototype.removeListener=function(mt,bt,St,Et){var Ct=tt?tt+mt:mt;if(!this._events[Ct])return this;if(!bt)return dt(this,Ct),this;var Rt=this._events[Ct];if(Rt.fn)Rt.fn===bt&&(!Et||Rt.once)&&(!St||Rt.context===St)&&dt(this,Ct);else{for(var Tt=0,wt=[],At=Rt.length;Tt<At;Tt++)(Rt[Tt].fn!==bt||Et&&!Rt[Tt].once||St&&Rt[Tt].context!==St)&&wt.push(Rt[Tt]);wt.length?this._events[Ct]=wt.length===1?wt[0]:wt:dt(this,Ct)}return this},ft.prototype.removeAllListeners=function(mt){var bt;return mt?(bt=tt?tt+mt:mt,this._events[bt]&&dt(this,bt)):(this._events=new rt,this._eventsCount=0),this},ft.prototype.off=ft.prototype.removeListener,ft.prototype.addListener=ft.prototype.on,ft.prefixed=tt,ft.EventEmitter=ft,et.exports=ft})(eventemitter3);var EventEmitter=eventemitter3.exports;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
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 __assign=function(){return __assign=Object.assign||function(_e){for(var tt,rt=1,nt=arguments.length;rt<nt;rt++){tt=arguments[rt];for(var st in tt)Object.prototype.hasOwnProperty.call(tt,st)&&(_e[st]=tt[st])}return _e},__assign.apply(this,arguments)};function __rest(et,_e){var tt={};for(var rt in et)Object.prototype.hasOwnProperty.call(et,rt)&&_e.indexOf(rt)<0&&(tt[rt]=et[rt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(et);nt<rt.length;nt++)_e.indexOf(rt[nt])<0&&Object.prototype.propertyIsEnumerable.call(et,rt[nt])&&(tt[rt[nt]]=et[rt[nt]]);return tt}var prevTime=0,onNextFrame=typeof window<"u"&&window.requestAnimationFrame!==void 0?function(et){return window.requestAnimationFrame(et)}:function(et){var _e=Date.now(),tt=Math.max(0,16.7-(_e-prevTime));prevTime=_e+tt,setTimeout(function(){return et(prevTime)},tt)},createStep=function(et){var _e=[],tt=[],rt=0,nt=!1,st=0,dt=new WeakSet,ft=new WeakSet,ht={cancel:function(mt){var bt=tt.indexOf(mt);dt.add(mt),bt!==-1&&tt.splice(bt,1)},process:function(mt){var bt;if(nt=!0,bt=[tt,_e],_e=bt[0],tt=bt[1],tt.length=0,rt=_e.length,rt){var St;for(st=0;st<rt;st++)St=_e[st],St(mt),ft.has(St)===!0&&!dt.has(St)&&(ht.schedule(St),et(!0))}nt=!1},schedule:function(mt,bt,St){bt===void 0&&(bt=!1),St===void 0&&(St=!1);var Et=St&&nt,Ct=Et?_e:tt;dt.delete(mt),bt&&ft.add(mt),Ct.indexOf(mt)===-1&&(Ct.push(mt),Et&&(rt=_e.length))}};return ht},maxElapsed=40,defaultElapsed=1/60*1e3,useDefaultElapsed=!0,willRunNextFrame=!1,isProcessing=!1,frame={delta:0,timestamp:0},stepsOrder=["read","update","preRender","render","postRender"],setWillRunNextFrame=function(et){return willRunNextFrame=et},steps=stepsOrder.reduce(function(et,_e){return et[_e]=createStep(setWillRunNextFrame),et},{}),sync=stepsOrder.reduce(function(et,_e){var tt=steps[_e];return et[_e]=function(rt,nt,st){return nt===void 0&&(nt=!1),st===void 0&&(st=!1),willRunNextFrame||startLoop(),tt.schedule(rt,nt,st),rt},et},{}),processStep=function(et){return steps[et].process(frame)},processFrame=function(et){willRunNextFrame=!1,frame.delta=useDefaultElapsed?defaultElapsed:Math.max(Math.min(et-frame.timestamp,maxElapsed),1),useDefaultElapsed||(defaultElapsed=frame.delta),frame.timestamp=et,isProcessing=!0,stepsOrder.forEach(processStep),isProcessing=!1,willRunNextFrame&&(useDefaultElapsed=!1,onNextFrame(processFrame))},startLoop=function(){willRunNextFrame=!0,useDefaultElapsed=!0,isProcessing||onNextFrame(processFrame)},clamp$1$1=function(et,_e){return function(tt){return Math.max(Math.min(tt,_e),et)}},sanitize=function(et){return et%1?Number(et.toFixed(5)):et},singleColorRegex=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i,number={test:function(et){return typeof et=="number"},parse:parseFloat,transform:function(et){return et}},alpha=__assign(__assign({},number),{transform:clamp$1$1(0,1)}),scale=__assign(__assign({},number),{default:1}),createUnitType=function(et){return{test:function(_e){return typeof _e=="string"&&_e.endsWith(et)&&_e.split(" ").length===1},parse:parseFloat,transform:function(_e){return""+_e+et}}},degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),progressPercentage=__assign(__assign({},percent),{parse:function(et){return percent.parse(et)/100},transform:function(et){return percent.transform(et*100)}}),getValueFromFunctionString=function(et){return et.substring(et.indexOf("(")+1,et.lastIndexOf(")"))},clampRgbUnit=clamp$1$1(0,255),isRgba=function(et){return et.red!==void 0},isHsla=function(et){return et.hue!==void 0};function getValuesAsArray(et){return getValueFromFunctionString(et).replace(/(,|\/)/g," ").split(/ \s*/)}var splitColorValues=function(et){return function(_e){if(typeof _e!="string")return _e;for(var tt={},rt=getValuesAsArray(_e),nt=0;nt<4;nt++)tt[et[nt]]=rt[nt]!==void 0?parseFloat(rt[nt]):1;return tt}},rgbaTemplate=function(et){var _e=et.red,tt=et.green,rt=et.blue,nt=et.alpha,st=nt===void 0?1:nt;return"rgba("+_e+", "+tt+", "+rt+", "+st+")"},hslaTemplate=function(et){var _e=et.hue,tt=et.saturation,rt=et.lightness,nt=et.alpha,st=nt===void 0?1:nt;return"hsla("+_e+", "+tt+", "+rt+", "+st+")"},rgbUnit=__assign(__assign({},number),{transform:function(et){return Math.round(clampRgbUnit(et))}});function isColorString(et,_e){return et.startsWith(_e)&&singleColorRegex.test(et)}var rgba={test:function(et){return typeof et=="string"?isColorString(et,"rgb"):isRgba(et)},parse:splitColorValues(["red","green","blue","alpha"]),transform:function(et){var _e=et.red,tt=et.green,rt=et.blue,nt=et.alpha,st=nt===void 0?1:nt;return rgbaTemplate({red:rgbUnit.transform(_e),green:rgbUnit.transform(tt),blue:rgbUnit.transform(rt),alpha:sanitize(alpha.transform(st))})}},hsla={test:function(et){return typeof et=="string"?isColorString(et,"hsl"):isHsla(et)},parse:splitColorValues(["hue","saturation","lightness","alpha"]),transform:function(et){var _e=et.hue,tt=et.saturation,rt=et.lightness,nt=et.alpha,st=nt===void 0?1:nt;return hslaTemplate({hue:Math.round(_e),saturation:percent.transform(sanitize(tt)),lightness:percent.transform(sanitize(rt)),alpha:sanitize(alpha.transform(st))})}},hex=__assign(__assign({},rgba),{test:function(et){return typeof et=="string"&&isColorString(et,"#")},parse:function(et){var _e="",tt="",rt="";return et.length>4?(_e=et.substr(1,2),tt=et.substr(3,2),rt=et.substr(5,2)):(_e=et.substr(1,1),tt=et.substr(2,1),rt=et.substr(3,1),_e+=_e,tt+=tt,rt+=rt),{red:parseInt(_e,16),green:parseInt(tt,16),blue:parseInt(rt,16),alpha:1}}}),color={test:function(et){return typeof et=="string"&&singleColorRegex.test(et)||isRgba(et)||isHsla(et)},parse:function(et){return rgba.test(et)?rgba.parse(et):hsla.test(et)?hsla.parse(et):hex.test(et)?hex.parse(et):et},transform:function(et){return isRgba(et)?rgba.transform(et):isHsla(et)?hsla.transform(et):et}},createStyler=function(et){var _e=et.onRead,tt=et.onRender,rt=et.uncachedValues,nt=rt===void 0?new Set:rt,st=et.useCache,dt=st===void 0?!0:st;return function(ft){ft===void 0&&(ft={});var ht=__rest(ft,[]),mt={},bt=[],St=!1;function Et(Rt,Tt){Rt.startsWith("--")&&(ht.hasCSSVariable=!0);var wt=mt[Rt];mt[Rt]=Tt,mt[Rt]!==wt&&(bt.indexOf(Rt)===-1&&bt.push(Rt),St||(St=!0,sync.render(Ct.render)))}var Ct={get:function(Rt,Tt){Tt===void 0&&(Tt=!1);var wt=!Tt&&dt&&!nt.has(Rt)&&mt[Rt]!==void 0;return wt?mt[Rt]:_e(Rt,ht)},set:function(Rt,Tt){if(typeof Rt=="string")Et(Rt,Tt);else for(var wt in Rt)Et(wt,Rt[wt]);return this},render:function(Rt){return Rt===void 0&&(Rt=!1),(St||Rt===!0)&&(tt(mt,ht,bt),St=!1,bt.length=0),this}};return Ct}},CAMEL_CASE_PATTERN=/([a-z])([A-Z])/g,REPLACE_TEMPLATE="$1-$2",camelToDash=function(et){return et.replace(CAMEL_CASE_PATTERN,REPLACE_TEMPLATE).toLowerCase()},camelCache=new Map,dashCache=new Map,prefixes=["Webkit","Moz","O","ms",""],numPrefixes=prefixes.length,isBrowser=typeof document<"u",testElement,setDashPrefix=function(et,_e){return dashCache.set(et,camelToDash(_e))},testPrefix=function(et){testElement=testElement||document.createElement("div");for(var _e=0;_e<numPrefixes;_e++){var tt=prefixes[_e],rt=tt==="",nt=rt?et:tt+et.charAt(0).toUpperCase()+et.slice(1);if(nt in testElement.style||rt){if(rt&&et==="clipPath"&&dashCache.has(et))return;camelCache.set(et,nt),setDashPrefix(et,(rt?"":"-")+camelToDash(nt))}}},setServerProperty=function(et){return setDashPrefix(et,et)},prefixer=function(et,_e){_e===void 0&&(_e=!1);var tt=_e?dashCache:camelCache;return tt.has(et)||(isBrowser?testPrefix(et):setServerProperty(et)),tt.get(et)||et},axes=["","X","Y","Z"],order=["translate","scale","rotate","skew","transformPerspective"],transformProps=order.reduce(function(et,_e){return axes.reduce(function(tt,rt){return tt.push(_e+rt),tt},et)},["x","y","z"]),transformPropDictionary=transformProps.reduce(function(et,_e){return et[_e]=!0,et},{});function isTransformProp(et){return transformPropDictionary[et]===!0}function sortTransformProps(et,_e){return transformProps.indexOf(et)-transformProps.indexOf(_e)}var transformOriginProps=new Set(["originX","originY","originZ"]);function isTransformOriginProp(et){return transformOriginProps.has(et)}var int=__assign(__assign({},number),{transform:Math.round}),valueTypes={color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int},getValueType=function(et){return valueTypes[et]},getValueAsType=function(et,_e){return _e&&typeof et=="number"?_e.transform(et):et},SCROLL_LEFT="scrollLeft",SCROLL_TOP="scrollTop",scrollKeys=new Set([SCROLL_LEFT,SCROLL_TOP]),blacklist=new Set([SCROLL_LEFT,SCROLL_TOP,"transform"]),translateAlias={x:"translateX",y:"translateY",z:"translateZ"};function isCustomTemplate(et){return typeof et=="function"}function buildTransform(et,_e,tt,rt,nt,st){st===void 0&&(st=!0);var dt="",ft=!1;tt.sort(sortTransformProps);for(var ht=tt.length,mt=0;mt<ht;mt++){var bt=tt[mt];dt+=(translateAlias[bt]||bt)+"("+_e[bt]+") ",ft=bt==="z"?!0:ft}return!ft&&nt?dt+="translateZ(0)":dt=dt.trim(),isCustomTemplate(et.transform)?dt=et.transform(_e,rt?"":dt):st&&rt&&(dt="none"),dt}function buildStyleProperty(et,_e,tt,rt,nt,st,dt,ft){_e===void 0&&(_e=!0),tt===void 0&&(tt={}),rt===void 0&&(rt={}),nt===void 0&&(nt={}),st===void 0&&(st=[]),dt===void 0&&(dt=!1),ft===void 0&&(ft=!0);var ht=!0,mt=!1,bt=!1;for(var St in et){var Et=et[St],Ct=getValueType(St),Rt=getValueAsType(Et,Ct);isTransformProp(St)?(mt=!0,rt[St]=Rt,st.push(St),ht&&(Ct.default&&Et!==Ct.default||!Ct.default&&Et!==0)&&(ht=!1)):isTransformOriginProp(St)?(nt[St]=Rt,bt=!0):(!blacklist.has(St)||!isCustomTemplate(Rt))&&(tt[prefixer(St,dt)]=Rt)}return(mt||typeof et.transform=="function")&&(tt.transform=buildTransform(et,rt,st,ht,_e,ft)),bt&&(tt.transformOrigin=(nt.originX||"50%")+" "+(nt.originY||"50%")+" "+(nt.originZ||0)),tt}function createStyleBuilder(et){var _e=et===void 0?{}:et,tt=_e.enableHardwareAcceleration,rt=tt===void 0?!0:tt,nt=_e.isDashCase,st=nt===void 0?!0:nt,dt=_e.allowTransformNone,ft=dt===void 0?!0:dt,ht={},mt={},bt={},St=[];return function(Et){return St.length=0,buildStyleProperty(Et,rt,ht,mt,bt,St,st,ft),ht}}function onRead(et,_e){var tt=_e.element,rt=_e.preparseOutput,nt=getValueType(et);if(isTransformProp(et))return nt&&nt.default||0;if(scrollKeys.has(et))return tt[et];var st=window.getComputedStyle(tt,null).getPropertyValue(prefixer(et,!0))||0;return rt&&nt&&nt.test(st)&&nt.parse?nt.parse(st):st}function onRender(et,_e,tt){var rt=_e.element,nt=_e.buildStyles,st=_e.hasCSSVariable;if(Object.assign(rt.style,nt(et)),st)for(var dt=tt.length,ft=0;ft<dt;ft++){var ht=tt[ft];ht.startsWith("--")&&rt.style.setProperty(ht,et[ht])}tt.indexOf(SCROLL_LEFT)!==-1&&(rt[SCROLL_LEFT]=et[SCROLL_LEFT]),tt.indexOf(SCROLL_TOP)!==-1&&(rt[SCROLL_TOP]=et[SCROLL_TOP])}var cssStyler=createStyler({onRead,onRender,uncachedValues:scrollKeys});function createCssStyler(et,_e){_e===void 0&&(_e={});var tt=_e.enableHardwareAcceleration,rt=_e.allowTransformNone,nt=__rest(_e,["enableHardwareAcceleration","allowTransformNone"]);return cssStyler(__assign({element:et,buildStyles:createStyleBuilder({enableHardwareAcceleration:tt,allowTransformNone:rt}),preparseOutput:!0},nt))}var camelCaseAttributes=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),defaultOrigin=.5,svgAttrsTemplate=function(){return{style:{}}},progressToPixels=function(et,_e){return px.transform(et*_e)},unmeasured={x:0,y:0,width:0,height:0};function calcOrigin(et,_e,tt){return typeof et=="string"?et:px.transform(_e+tt*et)}function calculateSVGTransformOrigin(et,_e,tt){return calcOrigin(_e,et.x,et.width)+" "+calcOrigin(tt,et.y,et.height)}var svgStyleConfig={enableHardwareAcceleration:!1,isDashCase:!1};function buildSVGAttrs(et,_e,tt,rt,nt,st){_e===void 0&&(_e=unmeasured),rt===void 0&&(rt=createStyleBuilder(svgStyleConfig)),nt===void 0&&(nt=svgAttrsTemplate()),st===void 0&&(st=!0);var dt=et.attrX,ft=et.attrY,ht=et.originX,mt=et.originY,bt=et.pathLength,St=et.pathSpacing,Et=St===void 0?1:St,Ct=et.pathOffset,Rt=Ct===void 0?0:Ct,Tt=__rest(et,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),wt=rt(Tt);for(var At in wt)if(At==="transform")nt.style.transform=wt[At];else{var Nt=st&&!camelCaseAttributes.has(At)?camelToDash(At):At;nt[Nt]=wt[At]}return(ht!==void 0||mt!==void 0||wt.transform)&&(nt.style.transformOrigin=calculateSVGTransformOrigin(_e,ht!==void 0?ht:defaultOrigin,mt!==void 0?mt:defaultOrigin)),dt!==void 0&&(nt.x=dt),ft!==void 0&&(nt.y=ft),tt!==void 0&&bt!==void 0&&(nt[st?"stroke-dashoffset":"strokeDashoffset"]=progressToPixels(-Rt,tt),nt[st?"stroke-dasharray":"strokeDasharray"]=progressToPixels(bt,tt)+" "+progressToPixels(Et,tt)),nt}function createAttrBuilder(et,_e,tt){tt===void 0&&(tt=!0);var rt=svgAttrsTemplate(),nt=createStyleBuilder(svgStyleConfig);return function(st){return buildSVGAttrs(st,et,_e,nt,rt,tt)}}var getDimensions=function(et){return typeof et.getBBox=="function"?et.getBBox():et.getBoundingClientRect()},getSVGElementDimensions=function(et){try{return getDimensions(et)}catch{return{x:0,y:0,width:0,height:0}}},isPath=function(et){return et.tagName==="path"},svgStyler=createStyler({onRead:function(et,_e){var tt=_e.element;if(et=camelCaseAttributes.has(et)?et:camelToDash(et),isTransformProp(et)){var rt=getValueType(et);return rt&&rt.default||0}else return tt.getAttribute(et)},onRender:function(et,_e){var tt=_e.element,rt=_e.buildAttrs,nt=rt(et);for(var st in nt)st==="style"?Object.assign(tt.style,nt.style):tt.setAttribute(st,nt[st])}}),svg=function(et){var _e=getSVGElementDimensions(et),tt=isPath(et)&&et.getTotalLength?et.getTotalLength():void 0;return svgStyler({element:et,buildAttrs:createAttrBuilder(_e,tt)})},viewport=createStyler({useCache:!1,onRead:function(et){return et==="scrollTop"?window.pageYOffset:window.pageXOffset},onRender:function(et){var _e=et.scrollTop,tt=_e===void 0?0:_e,rt=et.scrollLeft,nt=rt===void 0?0:rt;return window.scrollTo(nt,tt)}}),cache$1=new WeakMap,isHTMLElement=function(et){return et instanceof HTMLElement||typeof et.click=="function"},isSVGElement=function(et){return et instanceof SVGElement||"ownerSVGElement"in et},createDOMStyler=function(et,_e){var tt;return et===window?tt=viewport(et):isHTMLElement(et)?tt=createCssStyler(et,_e):isSVGElement(et)&&(tt=svg(et)),cache$1.set(et,tt),tt},getStyler=function(et,_e){return cache$1.has(et)?cache$1.get(et):createDOMStyler(et,_e)};function index$2(et,_e){var tt=typeof et=="string"?document.querySelector(et):et;return getStyler(tt,_e)}var shallowequal=function et(_e,tt,rt,nt){var st=rt?rt.call(nt,_e,tt):void 0;if(st!==void 0)return!!st;if(_e===tt)return!0;if(typeof _e!="object"||!_e||typeof tt!="object"||!tt)return!1;var dt=Object.keys(_e),ft=Object.keys(tt);if(dt.length!==ft.length)return!1;for(var ht=Object.prototype.hasOwnProperty.bind(tt),mt=0;mt<dt.length;mt++){var bt=dt[mt];if(!ht(bt))return!1;var St=_e[bt],Et=tt[bt];if(st=rt?rt.call(nt,St,Et,bt):void 0,st===!1||st===void 0&&St!==Et)return!1}return!0};const e$1="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s$1=e$1.length,t$1$1=Array(20),r$1$1=()=>{for(let et=0;et<20;et++)t$1$1[et]=e$1.charAt(Math.random()*s$1);return t$1$1.join("")};class o$1{constructor(){this.disposers=new Map}add(_e,tt=r$1$1()){return this.flush(tt),this.disposers.set(tt,_e()),tt}addDisposer(_e,tt=r$1$1()){return this.flush(tt),this.disposers.set(tt,_e),tt}addEventListener(_e,tt,rt,nt,st=r$1$1()){return this.add(()=>(_e.addEventListener(tt,rt,nt),()=>_e.removeEventListener(tt,rt,nt)),st),st}setTimeout(_e,tt,rt=r$1$1()){return this.add(()=>{const nt=window.setTimeout(()=>{this.remove(rt),_e()},tt);return()=>window.clearTimeout(nt)},rt)}setInterval(_e,tt,rt=r$1$1()){return this.add(()=>{const nt=window.setInterval(_e,tt);return()=>window.clearInterval(nt)},rt)}remove(_e){const tt=this.disposers.get(_e);return this.disposers.delete(_e),tt}flush(_e){const tt=this.remove(_e);if(tt)try{tt()}catch(rt){console.error(rt)}}flushAll(){this.disposers.forEach(_e=>{try{_e()}catch(tt){console.error(tt)}}),this.disposers.clear()}}var e$2=Object.defineProperty,s$2=(typeof require<"u"&&require,(et,_e,tt)=>(((rt,nt,st)=>{nt in rt?e$2(rt,nt,{enumerable:!0,configurable:!0,writable:!0,value:st}):rt[nt]=st})(et,typeof _e!="symbol"?_e+"":_e,tt),tt));class r$3{constructor(_e,tt){s$2(this,"_value"),s$2(this,"_beforeDestroys"),s$2(this,"_subscribers"),this._value=_e,tt&&(this.compare=tt)}get value(){return this._value}setValue(_e,tt){if(!this.compare(_e,this._value)){const rt=this._value;this._value=_e,this._subscribers&&this._subscribers.forEach(nt=>nt(_e,rt,tt))}}reaction(_e){return this._subscribers||(this._subscribers=new Set),this._subscribers.add(_e),()=>{this._subscribers&&this._subscribers.delete(_e)}}subscribe(_e,tt){const rt=this.reaction(_e);return _e(this._value,void 0,tt),rt}derive(_e,tt,rt){const nt=new r$3(_e(this.value,void 0,rt),tt),st=this.reaction((dt,ft,ht)=>{nt.setValue(_e(dt,ft,ht))});return nt.addBeforeDestroy(st),nt}destroy(){this._beforeDestroys&&(this._beforeDestroys.forEach(_e=>_e()),this._beforeDestroys.clear()),this._subscribers&&this._subscribers.clear()}addBeforeDestroy(_e){return this._beforeDestroys||(this._beforeDestroys=new Set),this._beforeDestroys.add(_e),()=>{this._beforeDestroys&&this._beforeDestroys.delete(_e)}}compare(_e,tt){return _e===tt}}function t$2(et,_e,tt,rt){let nt=et.map(dt=>dt.value);const st=new r$3(_e(nt,void 0,rt),tt);return et.forEach((dt,ft)=>{const ht=dt.reaction((mt,bt,St)=>{const Et=nt.slice();Et[ft]=mt;const Ct=nt;nt=Et,st.setValue(_e(Et,Ct,St),St)});st.addBeforeDestroy(ht)}),st}function i$1(et,_e){Object.keys(_e).forEach(tt=>{u$2(et,tt,_e[tt])})}function u$2(et,_e,tt){var rt;return Object.defineProperties(et,{[_e]:{get:()=>tt.value},[`_${_e}$`]:{value:tt},[`set${rt=_e,rt[0].toUpperCase()+rt.slice(1)}`]:{value:(nt,st)=>tt.setValue(nt,st)}}),et}function c(et){const _e=tt=>{const rt=et.addDisposer(()=>{tt.destroy()});return tt.addBeforeDestroy(()=>{et.remove(rt)}),tt};return{bindSideEffect:_e,combine:(tt,rt,nt,st)=>_e(t$2(tt,rt,nt,st)),createVal:(tt,rt)=>_e(new r$3(tt,rt))}}var TELE_BOX_COLOR_SCHEME=(et=>(et.Light="light",et.Dark="dark",et.Auto="auto",et))(TELE_BOX_COLOR_SCHEME||{}),TELE_BOX_STATE=(et=>(et.Normal="normal",et.Minimized="minimized",et.Maximized="maximized",et))(TELE_BOX_STATE||{}),TELE_BOX_EVENT=(et=>(et.DarkMode="dark_mode",et.PrefersColorScheme="prefers_color_scheme",et.Close="close",et.Focus="focus",et.Blur="blur",et.Move="move",et.Resize="resize",et.IntrinsicMove="intrinsic_move",et.IntrinsicResize="intrinsic_resize",et.VisualResize="visual_resize",et.ZIndex="z_index",et.State="state",et.Minimized="minimized",et.Maximized="maximized",et.Readonly="readonly",et.Destroyed="destroyed",et.BoxStatus="box_status",et.LastNotMinimizedBoxStatus="last_not_minimized_box_status",et.ForceTop="force_top",et.ForceNormal="force_normal",et))(TELE_BOX_EVENT||{}),TELE_BOX_DELEGATE_EVENT=(et=>(et.Close="close",et.Maximize="maximize",et.Minimize="minimize",et))(TELE_BOX_DELEGATE_EVENT||{}),TELE_BOX_RESIZE_HANDLE=(et=>(et.North="n",et.South="s",et.West="w",et.East="e",et.NorthWest="nw",et.NorthEast="ne",et.SouthEast="se",et.SouthWest="sw",et))(TELE_BOX_RESIZE_HANDLE||{});const TeleBoxDragHandleType="dh";function clamp$2(et,_e,tt){return Math.min(Math.max(et,_e),tt)}function preventEvent$1(et){et.stopPropagation(),et.cancelable&&et.preventDefault()}function flattenEvent$1(et){return et.touches?et.touches[0]:et}function genUniqueKey(){return Date.now().toString().slice(6)+Math.random().toString().slice(2,8)}let defaultBoxCount=1;function getBoxDefaultName(){return`New Box ${defaultBoxCount++}`}function isTruthy(et){return!!et}function isFalsy(et){return!et}class DefaultTitleBar{constructor({readonly:_e=!1,title:tt,buttons:rt,onEvent:nt,onDragStart:st,namespace:dt="telebox",state:ft=TELE_BOX_STATE.Normal,boxStatus:ht,forceTop:mt=!1,forceNormal:bt=!1}={}){this.$btns=[],this.sideEffect=new o$1,this.lastTitleBarClick={timestamp:0,clientX:-100,clientY:-100},this.handleTitleBarClick=St=>{var Et;if(this.readonly||St.button!==0||(Et=St.target.dataset)!=null&&Et.teleTitleBarNoDblClick)return;preventEvent$1(St);const Ct=Date.now();Ct-this.lastTitleBarClick.timestamp<=500?Math.abs(St.clientX-this.lastTitleBarClick.clientX)<=5&&Math.abs(St.clientY-this.lastTitleBarClick.clientY)<=5&&this.onEvent&&this.onEvent({type:TELE_BOX_DELEGATE_EVENT.Maximize}):this.onDragStart&&this.onDragStart(St),this.lastTitleBarClick.timestamp=Ct,this.lastTitleBarClick.clientX=St.clientX,this.lastTitleBarClick.clientY=St.clientY},this.lastTitleBarTouch={timestamp:0,clientX:-100,clientY:-100},this.handleTitleBarTouch=St=>{var Et;if(this.readonly||(Et=St.target.dataset)!=null&&Et.teleTitleBarNoDblClick)return;preventEvent$1(St);const Ct=Date.now(),{clientX:Rt=this.lastTitleBarTouch.clientX+100,clientY:Tt=this.lastTitleBarTouch.clientY+100}=St.touches[0]||{};Ct-this.lastTitleBarTouch.timestamp<=500?Math.abs(Rt-this.lastTitleBarTouch.clientX)<=10&&Math.abs(Tt-this.lastTitleBarTouch.clientY)<=10&&this.onEvent&&this.onEvent({type:TELE_BOX_DELEGATE_EVENT.Maximize}):this.onDragStart&&this.onDragStart(St),this.lastTitleBarTouch.timestamp=Ct,this.lastTitleBarTouch.clientX=Rt,this.lastTitleBarTouch.clientY=Tt},this.readonly=_e,this.onEvent=nt,this.onDragStart=st,this.namespace=dt,this.title=tt,this.state=ft,this.boxStatus=ht,this.forceTop=mt,this.forceNormal=bt,this.buttons=rt||(bt?[{type:TELE_BOX_DELEGATE_EVENT.Close,iconClassName:this.wrapClassName("titlebar-icon-close")}]:[{type:TELE_BOX_DELEGATE_EVENT.Minimize,iconClassName:this.wrapClassName("titlebar-icon-minimize")},{type:TELE_BOX_DELEGATE_EVENT.Maximize,iconClassName:this.wrapClassName("titlebar-icon-maximize"),isActive:St=>St===TELE_BOX_STATE.Maximized},{type:TELE_BOX_DELEGATE_EVENT.Close,iconClassName:this.wrapClassName("titlebar-icon-close")}]),this.$dragArea=this.renderDragArea()}setTitle(_e){this.title=_e,this.$title&&(this.$title.textContent=_e,this.$title.title=_e)}setState(_e){this.state!==_e&&(this.state=_e,this.buttons.forEach((tt,rt)=>{tt.isActive&&this.$btns[rt].classList.toggle("is-active",tt.isActive(_e))}))}setBoxStatus(_e){this.boxStatus!==_e&&(this.boxStatus=_e,_e&&this.buttons.forEach((tt,rt)=>{tt.isActive&&this.$btns[rt].classList.toggle("is-active",tt.isActive(_e))}))}setReadonly(_e){this.readonly!==_e&&(this.readonly=_e)}render(){if(!this.$titleBar){this.$titleBar=document.createElement("div"),this.$titleBar.className=this.wrapClassName("titlebar");const _e=document.createElement("div");_e.className=this.wrapClassName("title-area"),_e.dataset.teleBoxHandle=TeleBoxDragHandleType,this.$title=document.createElement("h1"),this.$title.className=this.wrapClassName("title"),this.$title.dataset.teleBoxHandle=TeleBoxDragHandleType,this.title&&(this.$title.textContent=this.title,this.$title.title=this.title),_e.appendChild(this.$title),_e.appendChild(this.$dragArea);const tt=document.createElement("div");tt.className=this.wrapClassName("titlebar-btns"),this.buttons.forEach(({iconClassName:rt,isActive:nt},st)=>{const dt=String(st),ft=document.createElement("button");ft.className=`${this.wrapClassName("titlebar-btn")} ${rt}`,ft.dataset.teleTitleBarBtnIndex=dt,ft.dataset.teleTitleBarNoDblClick="true",nt&&ft.classList.toggle("is-active",nt(this.boxStatus||this.state)),this.$btns.push(ft),tt.appendChild(ft)}),this.sideEffect.addEventListener(tt,"click",rt=>{var nt;if(this.readonly)return;const st=rt.target,dt=Number((nt=st.dataset)==null?void 0:nt.teleTitleBarBtnIndex);if(!Number.isNaN(dt)&&dt<this.buttons.length){preventEvent$1(rt);const ft=this.buttons[dt];this.onEvent&&this.onEvent({type:ft.type,value:ft.value})}}),this.$titleBar.appendChild(_e),this.$titleBar.appendChild(tt)}return this.$titleBar}renderDragArea(){const _e=document.createElement("div");return _e.className=this.wrapClassName("drag-area"),_e.dataset.teleBoxHandle=TeleBoxDragHandleType,this.sideEffect.addEventListener(_e,"mousedown",this.handleTitleBarClick),this.sideEffect.addEventListener(_e,"touchstart",this.handleTitleBarTouch,{passive:!0}),_e}dragHandle(){return this.$titleBar}wrapClassName(_e){return`${this.namespace}-${_e}`}destroy(){this.sideEffect.flushAll(),this.$titleBar&&(this.$titleBar=void 0,this.$title=void 0,this.$btns.length=0,this.onDragStart=void 0,this.onEvent=void 0)}}class TeleBox{constructor({id:_e=genUniqueKey(),title:tt=getBoxDefaultName(),prefersColorScheme:rt=TELE_BOX_COLOR_SCHEME.Light,darkMode:nt,visible:st=!0,width:dt=.5,height:ft=.5,minWidth:ht=0,minHeight:mt=0,x:bt=.1,y:St=.1,minimized:Et=!1,maximized:Ct=!1,readonly:Rt=!1,resizable:Tt=!0,draggable:wt=!0,fence:At=!0,fixRatio:Nt=!1,focus:Pt=!1,zIndex:It=100,namespace:Ft="telebox",titleBar:qt,content:Vt,footer:Kt,styles:jt,containerRect:Ut={x:0,y:0,width:window.innerWidth,height:window.innerHeight},collectorRect:Ot,boxStatus:Wt,lastNotMinimizedBoxStatus:Bt,forceTop:tr=!1,forceNormal:Jt=!1,isDragContent:ar=!1}={}){this._renderSideEffect=new o$1,this.handleTrackStart=pn=>{var Dn;return(Dn=this._handleTrackStart)==null?void 0:Dn.call(this,pn)},this._sideEffect=new o$1,this._valSideEffectBinder=c(this._sideEffect);const{combine:pr,createVal:cr}=this._valSideEffectBinder;this.id=_e,this.namespace=Ft,this.events=new EventEmitter,this._delegateEvents=new EventEmitter;const gr=cr(Wt),Sr=cr(Bt),Er=cr(rt);Er.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.PrefersColorScheme,pn)});const Vr=cr(!!nt);nt==null&&Er.subscribe((pn,Dn,qn)=>{this._sideEffect.add(()=>{if(pn==="auto"){const _a=window.matchMedia("(prefers-color-scheme: dark)");if(_a){Vr.setValue(_a.matches,qn);const Vn=bs=>{Vr.setValue(bs.matches,qn)};return _a.addListener(Vn),()=>_a.removeListener(Vn)}else return noop$1$1}else return Vr.setValue(pn==="dark",qn),noop$1$1},"prefers-color-scheme")}),Vr.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.DarkMode,pn)});const Wr=cr(Ut,shallowequal),Mr=cr(Ot,shallowequal),Nr=cr(tr);Nr.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.ForceTop,pn||!1)});const Yr=cr(Jt);Yr.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.ForceNormal,pn||!1)});const Or=cr(ar),Ar=cr(tt);Ar.reaction((pn,Dn,qn)=>{qn||this.titleBar.setTitle(pn)});const Qr=cr(st);Qr.reaction((pn,Dn,qn)=>{!qn&&!pn&&this.events.emit(TELE_BOX_EVENT.Close)});const hn=cr(Rt);hn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.Readonly,pn)});const Sn=cr(Tt),Kr=cr(wt),Hn=cr(At),ln=cr(Nt),kn=cr(It);kn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.ZIndex,pn)});const xn=cr(Pt);xn.reaction((pn,Dn,qn)=>{qn||this.events.emit(pn?TELE_BOX_EVENT.Focus:TELE_BOX_EVENT.Blur)});const An=cr(Et);An.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.Minimized,pn)});const rs=cr(Ct);rs.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.Maximized,pn)});const qs=pr([An,rs,gr],([pn,Dn,qn])=>pn?TELE_BOX_STATE.Minimized:Dn?TELE_BOX_STATE.Maximized:qn||TELE_BOX_STATE.Normal);qs.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.State,pn)});const Ln=cr({width:clamp$2(ht,0,1),height:clamp$2(mt,0,1)},shallowequal),Cn=cr({width:clamp$2(dt,Ln.value.width,1),height:clamp$2(ft,Ln.value.height,1)},shallowequal);Ln.reaction((pn,Dn,qn)=>{Cn.setValue({width:clamp$2(dt,pn.width,1),height:clamp$2(ft,pn.height,1)},qn)}),Cn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.IntrinsicResize,pn)});const Nn=pr([Cn,rs,gr],([pn,Dn,qn])=>Dn||qn===TELE_BOX_STATE.Maximized?{width:1,height:1}:pn,shallowequal);Nn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.Resize,pn)});const Gr=pr([Nn,An,Wr,Mr,gr],([pn,Dn,qn,_a,Vn])=>(Dn||Vn===TELE_BOX_STATE.Minimized)&&_a?{width:_a.width/pn.width/qn.width,height:_a.height/pn.height/qn.height}:pn,shallowequal);Gr.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.VisualResize,pn)});const tn=cr({x:clamp$2(bt,0,1),y:clamp$2(St,0,1)},shallowequal);tn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.IntrinsicMove,pn)});const dn=pr([tn,Cn,Wr,Mr,An,rs,gr,Sr],([pn,Dn,qn,_a,Vn,bs,Is,uo])=>(Vn||Is===TELE_BOX_STATE.Minimized)&&_a?bs||uo===TELE_BOX_STATE.Maximized?{x:(_a.x+_a.width/2)/qn.width-1/2,y:(_a.y+_a.height/2)/qn.height-1/2}:{x:(_a.x+_a.width/2)/qn.width-Dn.width/2,y:(_a.y+_a.height/2)/qn.height-Dn.height/2}:bs||Is===TELE_BOX_STATE.Maximized?{x:0,y:0}:pn,shallowequal);dn.reaction((pn,Dn,qn)=>{qn||this.events.emit(TELE_BOX_EVENT.Move,pn)}),this.titleBar=qt||new DefaultTitleBar({readonly:hn.value,title:Ar.value,namespace:this.namespace,boxStatus:gr.value,forceTop:Nr.value,forceNormal:Yr.value,onDragStart:pn=>{var Dn;return(Dn=this._handleTrackStart)==null?void 0:Dn.call(this,pn)},onEvent:pn=>{if(this._delegateEvents.listeners.length>0)this._delegateEvents.emit(pn.type);else switch(pn.type){case TELE_BOX_DELEGATE_EVENT.Maximize:{gr.value||rs.setValue(!rs.value);break}case TELE_BOX_DELEGATE_EVENT.Minimize:{gr.value||An.setValue(!0);break}case TELE_BOX_DELEGATE_EVENT.Close:{Qr.setValue(!1);break}default:{console.error("Unsupported titleBar event:",pn);break}}}}),hn.reaction(pn=>{this.titleBar.setReadonly(pn)}),gr.reaction(pn=>{this.titleBar.setBoxStatus(pn)});const Rn=cr(Vt),wn=cr(Kt),Un=cr(jt);i$1(this,{prefersColorScheme:Er,darkMode:Vr,containerRect:Wr,collectorRect:Mr,title:Ar,visible:Qr,readonly:hn,resizable:Sn,draggable:Kr,fence:Hn,fixRatio:ln,focus:xn,zIndex:kn,minimized:An,maximized:rs,$userContent:Rn,$userFooter:wn,$userStyles:Un,forceTop:Nr,forceNormal:Yr,isDragContent:Or}),this._state$=qs,this._minSize$=Ln,this._size$=Nn,this._intrinsicSize$=Cn,this._visualSize$=Gr,this._coord$=dn,this._intrinsicCoord$=tn,this._boxStatus$=gr,this._lastNotMinimizedBoxStatus$=Sr,this.fixRatio&&this.transform(dn.value.x,dn.value.y,Nn.value.width,Nn.value.height,!0),this.$box=this.render()}get boxStatus(){return this._boxStatus$.value}set boxStatus(_e){this._boxStatus$.setValue(_e)}get lastNotMinimizedBoxStatus(){return this._lastNotMinimizedBoxStatus$.value}get darkMode(){return this._darkMode$.value}get state(){return this._state$.value}setState(_e,tt=!1){switch(_e){case TELE_BOX_STATE.Maximized:{this.setMinimized(!1,tt),this.setMaximized(!0,tt);break}case TELE_BOX_STATE.Minimized:{this.setMinimized(!0,tt),this.setMaximized(!1,tt);break}default:{this.setMinimized(!1,tt),this.setMaximized(!1,tt);break}}return this}setBoxStatus(_e,tt=!1){return _e===TELE_BOX_STATE.Minimized?this._boxStatus$.value&&this._boxStatus$.value!==TELE_BOX_STATE.Minimized&&this.setLastNotMinimizedBoxStatus(this._boxStatus$.value,tt):this.setLastNotMinimizedBoxStatus(void 0,tt),this._boxStatus$.setValue(_e,tt),tt||this.events.emit(TELE_BOX_EVENT.BoxStatus,{id:this.id,boxStatus:_e}),this}setLastNotMinimizedBoxStatus(_e,tt=!1){return this._lastNotMinimizedBoxStatus$.setValue(_e,tt),tt||this.events.emit(TELE_BOX_EVENT.LastNotMinimizedBoxStatus,{id:this.id,lastNotMinimizedBoxStatus:_e}),this}get minWidth(){return this._minSize$.value.width}get minHeight(){return this._minSize$.value.height}setMinWidth(_e,tt=!1){return this._minSize$.setValue({width:_e,height:this.minHeight},tt),this}setMinHeight(_e,tt=!1){return this._minSize$.setValue({width:this.minWidth,height:_e},tt),this}get intrinsicWidth(){return this._intrinsicSize$.value.width}get intrinsicHeight(){return this._intrinsicSize$.value.height}resize(_e,tt,rt=!1){return this._intrinsicSize$.setValue({width:_e,height:tt},rt),this}get width(){return this._size$.value.width}get height(){return this._size$.value.height}get absoluteWidth(){return this.width*this.containerRect.width}get absoluteHeight(){return this.height*this.containerRect.height}get visualWidth(){return this._visualSize$.value.width}get visualHeight(){return this._visualSize$.value.height}get intrinsicX(){return this._intrinsicCoord$.value.x}get intrinsicY(){return this._intrinsicCoord$.value.y}move(_e,tt,rt=!1){return this._intrinsicCoord$.setValue({x:_e,y:tt},rt),this}get x(){return this._coord$.value.x}get y(){return this._coord$.value.y}transform(_e,tt,rt,nt,st=!1){if(this.fixRatio){const dt=this.intrinsicHeight/this.intrinsicWidth*rt;tt!==this.intrinsicY&&(tt-=dt-nt),nt=dt}return tt<0&&(tt=0,nt>this.intrinsicHeight&&(nt=this.intrinsicHeight)),this._intrinsicCoord$.setValue({x:rt>=this.minWidth?_e:this.intrinsicX,y:nt>=this.minHeight?tt:this.intrinsicY},st),this._intrinsicSize$.setValue({width:clamp$2(rt,this.minWidth,1),height:clamp$2(nt,this.minHeight,1)},st),this}mount(_e){return _e.appendChild(this.render()),this}unmount(){return this.$box&&this.$box.remove(),this}mountContent(_e){return this.set$userContent(_e),this}unmountContent(){return this.set$userContent(void 0),this}mountFooter(_e){return this.set$userFooter(_e),this}unmountFooter(){return this.set$userFooter(void 0),this}getUserStyles(){return this.$userStyles}mountStyles(_e){let tt;return typeof _e=="string"?(tt=document.createElement("style"),tt.textContent=_e):tt=_e,this.set$userStyles(tt),this}unmountStyles(){return this.set$userStyles(void 0),this}render(_e){if(_e){if(_e===this.$box)return this.$box;this.$box=_e}else{if(this.$box)return this.$box;this.$box=document.createElement("div")}this._renderSideEffect.flushAll(),this.$box.classList.add(this.wrapClassName("box"));const tt=(St,Et,Ct,Rt=isTruthy)=>this._renderSideEffect.add(()=>{const Tt=this.wrapClassName(Ct);return Et.subscribe(wt=>{St.classList.toggle(Tt,Rt(wt))})});tt(this.$box,this._readonly$,"readonly"),tt(this.$box,this._draggable$,"no-drag",isFalsy),tt(this.$box,this._resizable$,"no-resize",isFalsy),tt(this.$box,this._focus$,"blur",isFalsy),tt(this.$box,this._darkMode$,"color-scheme-dark"),tt(this.$box,this._darkMode$,"color-scheme-light",isFalsy),this._renderSideEffect.add(()=>{const St=this.wrapClassName("minimized"),Et=this.wrapClassName("maximized"),Ct="box-maximized-timer";return this._state$.subscribe(Rt=>{this.$box.classList.toggle(St,Rt===TELE_BOX_STATE.Minimized),Rt===TELE_BOX_STATE.Maximized?(this._renderSideEffect.flush(Ct),this.$box.classList.toggle(Et,!0)):this._renderSideEffect.setTimeout(()=>{this.$box.classList.toggle(Et,!1)},0,Ct)})}),this._renderSideEffect.add(()=>this._visible$.subscribe(St=>{St?this.$box.style.removeProperty("display"):this.$box.style.display="none"})),this._renderSideEffect.add(()=>this._zIndex$.subscribe(St=>{this.$box.style.zIndex=String(St)}));const rt=index$2(this.$box);this.$box.dataset.teleBoxID=this.id,this.$box.style.width=this.absoluteWidth+"px",this.$box.style.height=this.absoluteHeight+"px";const nt=this.x*this.containerRect.width+this.containerRect.x,st=this.y*this.containerRect.height+this.containerRect.y;this.$box.style.transform=`translate(${nt-10}px,${st-10}px)`,this._valSideEffectBinder.combine([this._coord$,this._size$,this._minimized$,this._containerRect$,this._collectorRect$,this._boxStatus$],([St,Et,Ct,Rt,Tt,wt])=>{const At=Et.width*Rt.width,Nt=Et.height*Rt.height;return{width:At+((Ct||wt===TELE_BOX_STATE.Minimized)&&Tt?1:0),height:Nt+((Ct||wt===TELE_BOX_STATE.Minimized)&&Tt?1:0),x:St.x*Rt.width,y:St.y*Rt.height,scaleX:(Ct||wt===TELE_BOX_STATE.Minimized)&&Tt?Tt.width/At:1,scaleY:(Ct||wt===TELE_BOX_STATE.Minimized)&&Tt?Tt.height/Nt:1}},shallowequal).subscribe(St=>{rt.set(St)}),rt.set({x:nt,y:st});const dt=document.createElement("div");dt.className=this.wrapClassName("box-main"),this.$box.appendChild(dt);const ft=document.createElement("div");ft.className=this.wrapClassName("titlebar-wrap"),ft.appendChild(this.titleBar.render()),this.$titleBar=ft;const ht=document.createElement("div");ht.className=this.wrapClassName("content-wrap");const mt=document.createElement("div");mt.className=this.wrapClassName("content")+" tele-fancy-scrollbar",this.$content=mt,this.isDragContent&&this.$content.appendChild(this.titleBar.$dragArea),this._renderSideEffect.add(()=>{let St;return this._$userStyles$.subscribe(Et=>{St&&St.remove(),St=Et,Et&&ht.appendChild(Et)})}),this._renderSideEffect.add(()=>{let St;return this._$userContent$.subscribe(Et=>{St&&St.remove(),St=Et,Et&&mt.appendChild(Et)})}),ht.appendChild(mt);const bt=document.createElement("div");return bt.className=this.wrapClassName("footer-wrap"),this.$footer=bt,this._renderSideEffect.add(()=>{let St;return this._$userFooter$.subscribe(Et=>{St&&St.remove(),St=Et,Et&&bt.appendChild(Et)})}),dt.appendChild(ft),dt.appendChild(ht),dt.appendChild(bt),this._renderResizeHandlers(),this.$box}_renderResizeHandlers(){const _e=document.createElement("div");_e.className=this.wrapClassName("resize-handles"),Object.values(TELE_BOX_RESIZE_HANDLE).forEach(Tt=>{const wt=document.createElement("div");wt.className=this.wrapClassName(Tt)+" "+this.wrapClassName("resize-handle"),wt.dataset.teleBoxHandle=Tt,_e.appendChild(wt)}),this.$box.appendChild(_e);const tt="handle-tracking-listener",rt=this.wrapClassName("transforming");let nt,st=0,dt=0,ft=0,ht=0,mt=0,bt=0,St;const Et=Tt=>{if(this.state!==TELE_BOX_STATE.Normal)return;preventEvent$1(Tt);let{pageX:wt,pageY:At}=flattenEvent$1(Tt);At<0&&(At=0);const Nt=(wt-mt)/this.containerRect.width,Pt=(At-bt)/this.containerRect.height;switch(St){case TELE_BOX_RESIZE_HANDLE.North:{this.transform(this.x,dt+Pt,this.width,ht-Pt);break}case TELE_BOX_RESIZE_HANDLE.South:{this.transform(this.x,this.y,this.width,ht+Pt);break}case TELE_BOX_RESIZE_HANDLE.West:{this.transform(st+Nt,this.y,ft-Nt,this.height);break}case TELE_BOX_RESIZE_HANDLE.East:{this.transform(this.x,this.y,ft+Nt,this.height);break}case TELE_BOX_RESIZE_HANDLE.NorthWest:{this.transform(st+Nt,dt+Pt,ft-Nt,ht-Pt);break}case TELE_BOX_RESIZE_HANDLE.NorthEast:{this.transform(this.x,dt+Pt,ft+Nt,ht-Pt);break}case TELE_BOX_RESIZE_HANDLE.SouthEast:{this.transform(this.x,this.y,ft+Nt,ht+Pt);break}case TELE_BOX_RESIZE_HANDLE.SouthWest:{this.transform(st+Nt,this.y,ft-Nt,ht+Pt);break}default:{if(this.fence)this.move(clamp$2(st+Nt,0,1-this.width),clamp$2(dt+Pt,0,1-this.height));else{const It=20/this.containerRect.width,Ft=20/this.containerRect.height;this.move(clamp$2(st+Nt,It-this.width,1-It),clamp$2(dt+Pt,0,1-Ft))}break}}},Ct=Tt=>{St=void 0,nt&&(preventEvent$1(Tt),this.$box.classList.toggle(rt,!1),this._sideEffect.flush(tt),nt.remove())},Rt=Tt=>{var wt;if(this.readonly||Tt.button!=null&&Tt.button!==0||!this.draggable||St||this.state!==TELE_BOX_STATE.Normal)return;const At=Tt.target;if((wt=At.dataset)!=null&&wt.teleBoxHandle){preventEvent$1(Tt),st=this.x,dt=this.y,ft=this.width,ht=this.height,{pageX:mt,pageY:bt}=flattenEvent$1(Tt),St=At.dataset.teleBoxHandle,nt||(nt=document.createElement("div"));const Nt=St?this.wrapClassName(`cursor-${St}`):"";nt.className=this.wrapClassName(`track-mask${Nt?` ${Nt}`:""}`),this.$box.appendChild(nt),this.$box.classList.add(rt),this._sideEffect.add(()=>(window.addEventListener("mousemove",Et),window.addEventListener("touchmove",Et,{passive:!1}),window.addEventListener("mouseup",Ct),window.addEventListener("touchend",Ct,{passive:!1}),window.addEventListener("touchcancel",Ct,{passive:!1}),()=>{window.removeEventListener("mousemove",Et),window.removeEventListener("touchmove",Et),window.removeEventListener("mouseup",Ct),window.removeEventListener("touchend",Ct),window.removeEventListener("touchcancel",Ct)}),tt)}};this._handleTrackStart=Rt,this._sideEffect.addEventListener(_e,"mousedown",Rt,{},"box-resizeHandles-mousedown"),this._sideEffect.addEventListener(_e,"touchstart",Rt,{passive:!1},"box-resizeHandles-touchstart")}destroy(){this.$box.remove(),this.events.emit(TELE_BOX_EVENT.Destroyed),this._sideEffect.flushAll(),this._renderSideEffect.flushAll(),this.events.removeAllListeners(),this._delegateEvents.removeAllListeners()}wrapClassName(_e){return`${this.namespace}-${_e}`}}function noop$1$1(){}var collectorSVG="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxNiI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxwYXRoIHN0cm9rZT0iIzdCODhBMCIgc3Ryb2tlLXdpZHRoPSIxLjQiIGQ9Ik0uNyAxLjJoMTYuNnYxMy42SC43eiIgLz4KICAgICAgICA8cGF0aCBmaWxsPSIjN0I4OEEwIiBkPSJNNCA1LjVoNnYxLjRINHpNNCA5LjVoMTB2MS40SDR6IiAvPgogICAgPC9nPgo8L3N2Zz4K";class TeleBoxCollector{constructor({visible:_e=!0,readonly:tt=!1,darkMode:rt=!1,namespace:nt="telebox",styles:st={},onClick:dt,getBoxesStatus:ft}){this.$appMenuContainer=document.createElement("div"),this.handleCollectorClick=()=>{!this._readonly&&this.onClick&&this.onClick()},this._visible=_e,this._readonly=tt,this._darkMode=rt,this.namespace=nt,this.styles=st,this.onClick=dt,this.getBoxesStatus=ft}get boxesStatus(){var _e;return(_e=this.getBoxesStatus)==null?void 0:_e.call(this)}get visible(){return this._visible}get readonly(){return this._readonly}get darkMode(){return this._darkMode}mount(_e){return _e.appendChild(this.render()),this}unmount(){return this.$collector&&this.$collector.remove(),this}hasMinimizedBox(){const _e=this.boxesStatus;if(_e){for(const tt of _e.values())if(tt===TELE_BOX_STATE.Minimized)return!0}return!1}updateBoxesStatus(){const _e=this.hasMinimizedBox();this.setVisible(_e)}setVisible(_e){return this._visible!==_e&&(this._visible=_e,this.$collector&&this.$collector.classList.toggle(this.wrapClassName("collector-visible"),_e)),this}setReadonly(_e){return this._readonly!==_e&&(this._readonly=_e,this.$collector&&this.$collector.classList.toggle(this.wrapClassName("collector-readonly"),_e)),this}setDarkMode(_e){return this._darkMode!==_e&&(this._darkMode=_e,this.$collector&&(this.$collector.classList.toggle(this.wrapClassName("color-scheme-dark"),_e),this.$collector.classList.toggle(this.wrapClassName("color-scheme-light"),!_e))),this}setStyles(_e){if(Object.assign(this.styles,_e),this.$collector){const tt=this.$collector;Object.keys(_e).forEach(rt=>{const nt=_e[rt];nt!=null&&(tt.style[rt]=nt)})}return this}render(){return this.$collector||(this.$collector=document.createElement("button"),this.$collector.className=this.wrapClassName("collector"),this.$collector.style.backgroundImage=`url('${collectorSVG}')`,this.$collector.addEventListener("click",this.handleCollectorClick),this._visible&&this.$collector.classList.add(this.wrapClassName("collector-visible")),this._readonly&&this.$collector.classList.add(this.wrapClassName("collector-readonly")),this.$collector.classList.add(this.wrapClassName(this._darkMode?"color-scheme-dark":"color-scheme-light")),this.$appMenuContainer.classList.add(this.wrapClassName("collector-shadow")),this.$collector.append(this.$appMenuContainer),this.setStyles(this.styles)),this.$collector}destroy(){this.$collector&&(this.$collector.removeEventListener("click",this.handleCollectorClick),this.$collector.remove(),this.$collector=void 0),this.onClick=void 0}wrapClassName(_e){return`${this.namespace}-${_e}`}}TeleBoxCollector.kind="TeleBoxCollector";var TELE_BOX_MANAGER_EVENT=(et=>(et.Focused="focused",et.Blurred="blurred",et.Created="created",et.Removed="removed",et.State="state",et.Maximized="maximized",et.Minimized="minimized",et.Move="move",et.Resize="resize",et.IntrinsicMove="intrinsic_move",et.IntrinsicResize="intrinsic_resize",et.VisualResize="visual_resize",et.ZIndex="z_index",et.PrefersColorScheme="prefers_color_scheme",et.DarkMode="dark_mode",et.BoxStatus="box_status",et.LastNotMinimizedBoxStatus="last_not_minimized_box_status",et))(TELE_BOX_MANAGER_EVENT||{});class MaxTitleBar extends DefaultTitleBar{constructor(_e){super(_e),this.boxes=_e.boxes,this.focusedBox=_e.focusedBox,this.containerRect=_e.containerRect,this.darkMode=_e.darkMode,this.getBoxesStatus=_e.getBoxesStatus}get boxesStatus(){var _e;return(_e=this.getBoxesStatus)==null?void 0:_e.call(this)}hasMaximizedBoxInStatus(){if(this.getBoxesStatus){const _e=this.getBoxesStatus();if(_e.size)return!![..._e.values()].find(rt=>rt===TELE_BOX_STATE.Maximized)}return!1}get MaximizedBoxes(){if(this.getBoxesStatus){const _e=this.getBoxesStatus();if(_e)return this.boxes.filter(tt=>_e&&_e.get(tt.id)===TELE_BOX_STATE.Maximized&&!tt.forceTop)}return[]}focusBox(_e){var tt,rt;if(!(this.focusedBox&&this.focusedBox===_e)){if(this.$titles){const{children:nt}=this.$titles.firstElementChild;if(this.state===TELE_BOX_STATE.Maximized&&!this.hasMaximizedBoxInStatus())for(let st=nt.length-1;st>=0;st-=1){const dt=nt[st],ft=(tt=dt.dataset)==null?void 0:tt.teleBoxID;ft&&(_e&&ft===_e.id?dt.classList.toggle(this.wrapClassName("titles-tab-focus"),!0):this.focusedBox&&ft===this.focusedBox.id&&dt.classList.toggle(this.wrapClassName("titles-tab-focus"),!1))}else if(this.hasMaximizedBoxInStatus())for(let st=nt.length-1;st>=0;st-=1){const dt=nt[st],ft=(rt=dt.dataset)==null?void 0:rt.teleBoxID;ft&&(_e&&ft===_e.id?dt.classList.toggle(this.wrapClassName("titles-tab-focus"),!0):this.focusedBox&&ft===this.focusedBox.id&&dt.classList.toggle(this.wrapClassName("titles-tab-focus"),!1))}}this.focusedBox=_e}}setContainerRect(_e){if(this.containerRect=_e,this.$titleBar){const{x:tt,y:rt,width:nt}=_e;this.$titleBar.style.transform=`translate(${tt}px, ${rt}px)`,this.$titleBar.style.width=nt+"px"}}updateBoxesStatus(){this.hasMaximizedBoxInStatus()&&this.setBoxStatus(TELE_BOX_STATE.Maximized),this.$titleBar&&this.$titleBar.classList.toggle(this.wrapClassName("max-titlebar-maximized"),this.state===TELE_BOX_STATE.Maximized&&this.boxes.length>0||this.hasMaximizedBoxInStatus()),this.updateTitles()}setBoxes(_e){this.boxes=_e,this.$titleBar&&this.$titleBar.classList.toggle(this.wrapClassName("max-titlebar-maximized"),this.state===TELE_BOX_STATE.Maximized&&_e.length>0||this.hasMaximizedBoxInStatus()),this.updateTitles()}setState(_e){super.setState(_e),this.$titleBar&&this.$titleBar.classList.toggle(this.wrapClassName("max-titlebar-maximized"),_e===TELE_BOX_STATE.Maximized&&this.boxes.length>0||this.hasMaximizedBoxInStatus()),this.updateTitles()}setReadonly(_e){super.setReadonly(_e),this.$titleBar&&this.$titleBar.classList.toggle(this.wrapClassName("readonly"),this.readonly)}setDarkMode(_e){_e!==this.darkMode&&(this.darkMode=_e,this.$titleBar&&(this.$titleBar.classList.toggle(this.wrapClassName("color-scheme-dark"),_e),this.$titleBar.classList.toggle(this.wrapClassName("color-scheme-light"),!_e)))}render(){const _e=super.render(),{x:tt,y:rt,width:nt}=this.containerRect;_e.style.transform=`translate(${tt}px, ${rt}px)`,_e.style.width=nt+"px",_e.classList.add(this.wrapClassName("max-titlebar")),_e.classList.toggle(this.wrapClassName("max-titlebar-maximized"),this.state===TELE_BOX_STATE.Maximized&&this.boxes.length>0),_e.classList.toggle(this.wrapClassName("readonly"),this.readonly),_e.classList.add(this.wrapClassName(this.darkMode?"color-scheme-dark":"color-scheme-light"));const st=document.createElement("div");return st.classList.add(this.wrapClassName("titles-area")),_e.insertBefore(st,_e.firstElementChild),this.updateTitles(),_e}destroy(){super.destroy(),this.$titles=void 0,this.boxes.length=0,this.focusedBox=void 0}updateTitles(){this.$titleBar&&(this.state===TELE_BOX_STATE.Maximized||this.hasMaximizedBoxInStatus())&&(this.$titleBar.classList.toggle(this.wrapClassName("max-titlebar-single-title"),this.boxes.length===1||this.hasMaximizedBoxInStatus()&&this.MaximizedBoxes.length===1),this.boxes.length===1||this.hasMaximizedBoxInStatus()&&this.MaximizedBoxes.length===1?this.setTitle(this.boxes[0].title):this.$titleBar.replaceChild(this.renderTitles(),this.$titleBar.firstElementChild))}renderTitles(){this.$titles=document.createElement("div"),this.$titles.className=this.wrapClassName("titles"),this.$titles.addEventListener("wheel",tt=>{tt.currentTarget.scrollBy({left:tt.deltaY>0?250:-250,behavior:"smooth"})},{passive:!1});const _e=document.createElement("div");return _e.className=this.wrapClassName("titles-content"),this.$titles.appendChild(_e),(this.hasMaximizedBoxInStatus()?this.MaximizedBoxes:this.boxes).forEach(tt=>{const rt=document.createElement("button");rt.className=this.wrapClassName("titles-tab"),rt.textContent=tt.title,rt.dataset.teleBoxID=tt.id,rt.dataset.teleTitleBarNoDblClick="true",this.focusedBox&&tt.id===this.focusedBox.id&&rt.classList.add(this.wrapClassName("titles-tab-focus")),_e.appendChild(rt)}),this.$titles}}class AppMenu{constructor(_e){this.namespace="telebox-app-menu",this.badge=document.createElement("div"),this.menuView=document.createElement("div"),this.containerClickHandler=()=>{if(this.manager.readonly)return;getComputedStyle(this.menuView).display==="flex"?this.menuView.style.display="none":this.menuView.style.display="flex"},this.menuViewClickHandler=tt=>{tt.stopPropagation(),tt.stopImmediatePropagation();const nt=tt.target.getAttribute(`data-${this.c("app-id")}`);if(nt){const st=this.manager.getLastNotMinimizedBoxStatus(nt)||TELE_BOX_STATE.Normal,dt=(st===TELE_BOX_STATE.Maximized?this.manager.getMaxMaximizedBoxZIndex():this.manager.getMaxNormalBoxZIndex())+1;this.manager.setBox(nt,{status:st,zIndex:dt},!1,()=>{this.manager.focusBox(nt)});return}},this.updatePrefersColorSchemeHandler=()=>{this.container.classList.remove(this.theme),this.theme=this.manager.prefersColorScheme,this.container.classList.add(this.theme)},this.appMenuChange=()=>{const tt=this.manager.getMinimizedBoxesStatus();this.render(tt)},this.container=_e.container,this.manager=_e.manager,this.theme=_e.theme,this.getBoxesStatus=_e.getBoxesStatus,this.init()}get boxesStatus(){var _e;return((_e=this.getBoxesStatus)==null?void 0:_e.call(this))||new Map}get minimizedBoxesStatus(){const _e=[];return this.boxesStatus.forEach(tt=>{tt===TELE_BOX_STATE.Minimized&&_e.push(tt)}),_e}c(_e){return`${this.namespace}-${_e}`}setContainer(_e){this.container&&this.container.remove(),this.container=_e,this.init()}createDefaultAppMenu(){this.badge.classList.add(this.c("app-menu-badge")),this.menuView.classList.add(this.c("app-menu-tooltip")),this.container.classList.add(this.c("app-menu-container"),this.theme),this.menuView.addEventListener("click",this.menuViewClickHandler),this.container.append(this.badge,this.menuView)}async init(){this.createDefaultAppMenu(),this.appMenuChange()}createMinimizedItem(_e){const tt=document.createElement("div");tt.classList.add(this.c("app-menu-item")),tt.setAttribute(`data-${this.c("app-id")}`,_e);const rt=document.createElement("div");rt.classList.add(this.c("app-menu-item-title"));const nt=this.manager.getBox(_e);return rt.innerText=nt?.title||_e,tt.appendChild(rt),tt}renderMenuView(_e){const tt=[];_e.forEach((rt,nt)=>{tt.push(this.createMinimizedItem(nt))}),this.menuView.append(...tt)}render(_e){this.menuView.style.display="none",this.badge.innerText="",this.menuView.innerHTML="",_e.size===0?this.container.style.display="none":(this.badge.innerText=_e.size.toString(),this.renderMenuView(_e),this.container.style.display="block")}destroy(){this.badge.remove(),this.menuView.removeEventListener("click",this.menuViewClickHandler),this.menuView.remove(),this.container.remove()}}class TeleBoxManager{constructor({root:_e=document.body,prefersColorScheme:tt=TELE_BOX_COLOR_SCHEME.Light,minimized:rt=!1,maximized:nt=!1,fence:st=!0,containerRect:dt={x:0,y:0,width:window.innerWidth,height:window.innerHeight},collector:ft,namespace:ht="telebox",readonly:mt=!1,useBoxesStatus:bt=!1}={}){this.events=new EventEmitter,this._sideEffect=new o$1,this.useBoxesStatus=bt;const{combine:St,createVal:Et}=c(this._sideEffect);this.root=_e,this.namespace=ht,this.boxes$=Et([]),this.topBox$=this.boxes$.derive(Ot=>{if(Ot.length>0)return Ot.reduce((tr,Jt)=>Jt.forceTop||Jt.boxStatus&&Jt.boxStatus===TELE_BOX_STATE.Minimized?tr:tr?tr.zIndex>Jt.zIndex?tr:Jt:(tr=Jt,tr),void 0)}),this.boxesStatus$=new Map,this.lastNotMinimizedBoxesStatus$=new Map;const Ct=window.matchMedia("(prefers-color-scheme: dark)"),Rt=Et(!1);Ct&&(Rt.setValue(Ct.matches),this._sideEffect.add(()=>{const Ot=Wt=>{Rt.setValue(Wt.matches)};return Ct.addListener(Ot),()=>Ct.removeListener(Ot)}));const Tt=Et(tt);Tt.reaction((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setPrefersColorScheme(Ot,Bt)),Bt||this.events.emit(TELE_BOX_MANAGER_EVENT.PrefersColorScheme,Ot)}),this._darkMode$=St([Rt,Tt],([Ot,Wt])=>Wt==="auto"?Ot:Wt==="dark"),this._darkMode$.reaction((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setDarkMode(Ot,Bt)),Bt||this.events.emit(TELE_BOX_MANAGER_EVENT.DarkMode,Ot)});const wt=Et(mt);wt.reaction((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setReadonly(Ot,Bt))});const At=Et(rt),Nt=Et(nt);Nt.reaction((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setMaximized(Ot,Bt)),Bt||this.events.emit(TELE_BOX_MANAGER_EVENT.Maximized,Ot)});const Pt=St([At,Nt],([Ot,Wt])=>Ot?TELE_BOX_STATE.Minimized:Wt?TELE_BOX_STATE.Maximized:TELE_BOX_STATE.Normal);Pt.reaction((Ot,Wt,Bt)=>{this.maxTitleBar.setState(Ot),Bt||this.events.emit(TELE_BOX_MANAGER_EVENT.State,Ot)});const It=Et(st);It.subscribe((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setFence(Ot,Bt))});const Ft=Et(dt,shallowequal);Ft.reaction((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>tr.setContainerRect(Ot,Bt)),this.maxTitleBar.setContainerRect(Ot)});const qt=Et(ft===null?null:ft||new TeleBoxCollector({visible:rt,readonly:mt,namespace:ht}).mount(_e));qt.subscribe(Ot=>{Ot&&(Ot.setVisible(At.value),Ot.setReadonly(wt.value),Ot.setDarkMode(this._darkMode$.value),this.useBoxesStatus&&this.appMenu&&this.appMenu.setContainer(Ot.$appMenuContainer),this._sideEffect.add(()=>(Ot.getBoxesStatus=()=>this.boxesStatus$,Ot.onClick=()=>{wt.value||(this.useBoxesStatus?this.useBoxesStatus&&this.appMenu&&this.appMenu.containerClickHandler():At.setValue(!1))},()=>Ot.destroy()),"collect-onClick"))}),wt.subscribe(Ot=>{var Wt;return(Wt=qt.value)==null?void 0:Wt.setReadonly(Ot)}),this._darkMode$.subscribe(Ot=>{var Wt;(Wt=qt.value)==null||Wt.setDarkMode(Ot)}),this._calcCollectorRect=()=>{var Ot;if((Ot=qt.value)!=null&&Ot.$collector){const{x:Wt,y:Bt,width:tr,height:Jt}=qt.value.$collector.getBoundingClientRect(),ar=this.root.getBoundingClientRect();return{x:Wt-ar.x,y:Bt-ar.y,width:tr,height:Jt}}},this._setCollectorRect=Ot=>{var Wt;(Wt=qt.value)!=null&&Wt.$collector&&Vt.setValue(Ot)};const Vt=Et(At.value?this._calcCollectorRect():void 0);Vt.subscribe((Ot,Wt,Bt)=>{this.boxes.forEach(tr=>{tr.setCollectorRect(Ot,Bt)})}),At.subscribe((Ot,Wt,Bt)=>{var tr;(tr=qt.value)==null||tr.setVisible(Ot),Ot&&this._setCollectorRect(this._calcCollectorRect()),this.boxes.forEach(Jt=>Jt.setMinimized(Ot,Bt)),Bt||this.events.emit(TELE_BOX_MANAGER_EVENT.Minimized,Ot)});const Kt=this.wrapClassName("titlebar-icon-close"),jt=Ot=>{var Wt;if(wt.value)return;const Bt=Ot.target;if(Bt.tagName)for(let tr=Bt;tr;tr=tr.parentElement){if(tr.classList&&tr.classList.contains(Kt))return;const Jt=(Wt=tr.dataset)==null?void 0:Wt.teleBoxID;if(Jt){const ar=this.getBox(Jt);if(ar){if(!this.useBoxesStatus)this.makeBoxTop(ar);else if(ar.boxStatus&&ar.boxStatus===TELE_BOX_STATE.Normal){const pr=this.getMaxNormalBoxZIndex();pr>ar.zIndex&&this.setBox(ar,{zIndex:pr+1},!1)}else if(ar.boxStatus&&ar.boxStatus===TELE_BOX_STATE.Maximized){const pr=this.getMaxMaximizedBoxZIndex();pr>ar.zIndex&&this.setBox(ar,{zIndex:pr+1},!1),this.makeMaximizedTopBoxFocus()}this.focusBox(ar);return}}}};this._sideEffect.addEventListener(window,"mousedown",jt,!0),this._sideEffect.addEventListener(window,"touchstart",jt,!0),this.maxTitleBar=new MaxTitleBar({darkMode:this.darkMode,readonly:wt.value,namespace:this.namespace,state:Pt.value,boxes:this.boxes$.value,containerRect:Ft.value,getBoxesStatus:()=>this.boxesStatus$,onEvent:Ot=>{switch(Ot.type){case TELE_BOX_DELEGATE_EVENT.Maximize:{if(this.hasBoxesStatus()){let Wt=this.maxTitleBar.focusedBox;if(Wt||(Wt=this.getMaximizedTopBox()),Wt?.id){const Bt=this.getBox(Wt.id);Bt&&this.setBox(Bt,{status:TELE_BOX_STATE.Normal,zIndex:this.getMaxNormalBoxZIndex()+1},!1,()=>{this.makeMaximizedTopBoxFocus()})}}else Nt.setValue(!Nt.value);break}case TELE_BOX_DELEGATE_EVENT.Minimize:{if(this.hasBoxesStatus()){let Wt=this.maxTitleBar.focusedBox;if(Wt||(Wt=this.getMaximizedTopBox()),Wt?.id){const Bt=this.getBox(Wt.id);if(Bt){let tr=!1;Bt.focus&&(this.blurBox(Bt),tr=!0),this.setBox(Bt,{status:TELE_BOX_STATE.Minimized,zIndex:-1},!1),tr?this.focusTopBox():this.makeMaximizedTopBoxFocus()}}}else At.setValue(!0);break}case TELE_BOX_EVENT.Close:{if(this.hasBoxesStatus()){let Wt=this.maxTitleBar.focusedBox;if(Wt||(Wt=this.getMaximizedTopBox()),Wt?.id){const Bt=this.getBox(Wt.id);if(Bt){let tr=!1;Bt.focus&&(this.blurBox(Bt),tr=!0),this.remove(Bt,!1),tr?this.focusTopBox():this.makeMaximizedTopBoxFocus()}}}else this.removeTopBox(),this.focusTopBox();break}}}}),wt.subscribe(Ot=>this.maxTitleBar.setReadonly(Ot)),this._darkMode$.subscribe(Ot=>{this.maxTitleBar.setDarkMode(Ot)}),this.boxes$.reaction(Ot=>{this.maxTitleBar.setBoxes(Ot)}),i$1(this,{prefersColorScheme:Tt,containerRect:Ft,collector:qt,collectorRect:Vt,readonly:wt,fence:It,minimized:At,maximized:Nt}),this._state$=Pt,this.root.appendChild(this.maxTitleBar.render()),bt&&(this.appMenu=this.createMinimizedAppMenu())}get boxes(){return this.boxes$.value}get topBox(){return this.topBox$.value}get forceTopBoxes(){return this.boxes.find(_e=>_e.forceTop)}get maxForceTopBox(){return this.boxes.reduce((_e,tt)=>{var rt;return tt.forceTop&&tt.zIndex>((rt=_e?.zIndex)!=null?rt:0)?tt:_e},void 0)}get forceNormalBoxes(){return this.boxes.find(_e=>_e.forceNormal)}get darkMode(){return this._darkMode$.value}get state(){return this._state$.value}setState(_e,tt=!1){switch(_e){case TELE_BOX_STATE.Maximized:{this.setMinimized(!1,tt),this.setMaximized(!0,tt);break}case TELE_BOX_STATE.Minimized:{this.setMinimized(!0,tt),this.setMaximized(!1,tt);break}default:{this.setMinimized(!1,tt),this.setMaximized(!1,tt);break}}return this}setBoxStatus(_e,tt,rt=!1){if(tt){const nt=this.boxesStatus$.get(_e);this.boxesStatus$.set(_e,tt),tt===TELE_BOX_STATE.Minimized&&nt!==TELE_BOX_STATE.Minimized?this.setLastNotMinimizedBoxStatus(_e,nt,rt):nt===TELE_BOX_STATE.Minimized&&tt!==TELE_BOX_STATE.Minimized&&this.setLastNotMinimizedBoxStatus(_e,void 0,rt)}else this.boxesStatus$.delete(_e),this.setLastNotMinimizedBoxStatus(_e,void 0,rt);rt||this.events.emit(TELE_BOX_MANAGER_EVENT.BoxStatus,{id:_e,boxStatus:tt})}getBoxStatus(_e){return this.boxesStatus$.get(_e)}get boxesStatus(){return this.boxesStatus$}get lastNotMinimizedBoxesStatus(){return this.lastNotMinimizedBoxesStatus$}setBoxesStatus(_e,tt=!1){this.boxesStatus$=_e,this.effectBoxesStatusChange(tt)}getBoxesStatus(){return this.boxesStatus$}effectBoxStatusChange(){this.useBoxesStatus&&(this.collector&&(this.collector.updateBoxesStatus(),this.hasMinimizedBox()&&this._setCollectorRect(this._calcCollectorRect())),this.appMenu&&this.appMenu.appMenuChange(),this.maxTitleBar&&this.maxTitleBar.updateBoxesStatus())}effectBoxesStatusTimerFunc(_e){if(!this.useBoxesStatus)return;let tt;const rt=this.topBox;this.boxes.forEach(nt=>{var st;const dt=this.boxesStatus$.get(nt.id);dt&&(dt!==TELE_BOX_STATE.Minimized&&!this.isForceTop(nt)&&nt.zIndex>((st=tt?.zIndex)!=null?st:0)&&(tt=nt),nt.setBoxStatus(dt,_e))}),this.effectBoxStatusChange(),tt&&rt!==tt&&this.topBox$.setValue(tt),!tt&&rt&&this.topBox$.setValue(void 0)}async effectBoxesStatusChange(_e=!1){var tt,rt;if(!this.useBoxesStatus){this.effectBoxesStatusTimer&&this.effectBoxesStatusTimer.timer&&(clearTimeout(this.effectBoxesStatusTimer.timer),this.effectBoxesStatusTimer.resolve&&this.effectBoxesStatusTimer.resolve(!!((tt=this.effectBoxesStatusTimer)!=null&&tt.skipUpdate))),this.effectBoxesStatusTimer=void 0;return}if(this.effectBoxesStatusTimer&&this.effectBoxesStatusTimer.timer)if(this.effectBoxesStatusTimer.skipUpdate!==_e)clearTimeout(this.effectBoxesStatusTimer.timer),this.effectBoxesStatusTimer.resolve&&this.effectBoxesStatusTimer.resolve(!!((rt=this.effectBoxesStatusTimer)!=null&&rt.skipUpdate)),this.effectBoxesStatusTimer.skipUpdate=_e;else return;if(this.effectBoxesStatusTimer||(this.effectBoxesStatusTimer={skipUpdate:_e,timer:void 0,resolve:void 0}),this.effectBoxesStatusTimer){const nt=await new Promise(st=>{this.effectBoxesStatusTimer.resolve=st,this.effectBoxesStatusTimer.timer=setTimeout(()=>{this.effectBoxesStatusTimer&&this.effectBoxesStatusTimer.resolve&&this.effectBoxesStatusTimer.resolve(this.effectBoxesStatusTimer.skipUpdate)},100)});this.effectBoxesStatusTimerFunc(nt),this.effectBoxesStatusTimer=void 0}}hasBoxesStatus(){return this.useBoxesStatus?this.boxesStatus$.size>0:!1}hasMinimizedBox(){return this.useBoxesStatus?this.boxes.some(_e=>_e.boxStatus&&_e.boxStatus===TELE_BOX_STATE.Minimized):!1}getMinimizedBoxesStatus(){const _e=new Map;return this.boxesStatus$.forEach((tt,rt)=>{tt===TELE_BOX_STATE.Minimized&&_e.set(rt,tt)}),_e}getNotMinimizedBoxesStatus(){const _e=new Map;return this.boxesStatus$.forEach((tt,rt)=>{tt!==TELE_BOX_STATE.Minimized&&_e.set(rt,tt)}),_e}getAllMaximizedBoxesStatus(){const _e=new Map;return this.boxesStatus$.forEach((tt,rt)=>{tt===TELE_BOX_STATE.Maximized&&_e.set(rt,tt)}),_e}getAllNormalBoxesStatus(){const _e=new Map;return this.boxesStatus$.forEach((tt,rt)=>{tt===TELE_BOX_STATE.Normal&&_e.set(rt,tt)}),_e}getLastNotMinimizedBoxStatus(_e){return this.lastNotMinimizedBoxesStatus$.get(_e)}setLastNotMinimizedBoxStatus(_e,tt,rt=!1){tt?this.lastNotMinimizedBoxesStatus$.set(_e,tt):this.lastNotMinimizedBoxesStatus$.delete(_e),rt||this.events.emit(TELE_BOX_MANAGER_EVENT.LastNotMinimizedBoxStatus,{id:_e,boxStatus:tt})}setLastNotMinimizedBoxesStatus(_e,tt=!1){this.lastNotMinimizedBoxesStatus$=_e,this.effectLastNotMinimizedBoxStatusChange(tt)}async effectLastNotMinimizedBoxStatusChange(_e=!1){var tt,rt;if(!this.useBoxesStatus){this.effectLastNotMinimizedBoxStatusTimer&&this.effectLastNotMinimizedBoxStatusTimer.timer&&(clearTimeout(this.effectLastNotMinimizedBoxStatusTimer.timer),this.effectLastNotMinimizedBoxStatusTimer.resolve&&this.effectLastNotMinimizedBoxStatusTimer.resolve(!!((tt=this.effectLastNotMinimizedBoxStatusTimer)!=null&&tt.skipUpdate))),this.effectLastNotMinimizedBoxStatusTimer=void 0;return}if(this.effectLastNotMinimizedBoxStatusTimer&&this.effectLastNotMinimizedBoxStatusTimer.timer)if(clearTimeout(this.effectLastNotMinimizedBoxStatusTimer.timer),this.effectLastNotMinimizedBoxStatusTimer.skipUpdate!==_e)this.effectLastNotMinimizedBoxStatusTimer.resolve&&this.effectLastNotMinimizedBoxStatusTimer.resolve(!!((rt=this.effectLastNotMinimizedBoxStatusTimer)!=null&&rt.skipUpdate)),this.effectLastNotMinimizedBoxStatusTimer.skipUpdate=_e;else return;if(this.effectLastNotMinimizedBoxStatusTimer||(this.effectLastNotMinimizedBoxStatusTimer={skipUpdate:_e,timer:void 0,resolve:void 0}),this.effectLastNotMinimizedBoxStatusTimer){const nt=await new Promise(st=>{this.effectLastNotMinimizedBoxStatusTimer.resolve=st,this.effectLastNotMinimizedBoxStatusTimer.timer=setTimeout(()=>{this.effectLastNotMinimizedBoxStatusTimer&&this.effectLastNotMinimizedBoxStatusTimer.resolve&&this.effectLastNotMinimizedBoxStatusTimer.resolve(this.effectLastNotMinimizedBoxStatusTimer.skipUpdate)},100)});this.effectLastNotMinimizedBoxStatusFunc(nt),this.effectLastNotMinimizedBoxStatusTimer=void 0}}effectLastNotMinimizedBoxStatusFunc(_e=!1){this.useBoxesStatus&&this.boxes.forEach(tt=>{const rt=this.lastNotMinimizedBoxesStatus$.get(tt.id);rt&&tt.setLastNotMinimizedBoxStatus(rt,_e)})}getUnabledBoxesStatusZIndex(){return this.topBox?this.topBox.zIndex:99}getMaxMaximizedBoxZIndex(){return this.useBoxesStatus?this.boxes.reduce((_e,tt)=>tt.boxStatus&&tt.boxStatus===TELE_BOX_STATE.Maximized&&!this.isForceTop(tt)?Math.max(_e,tt.zIndex):_e,99):this.getUnabledBoxesStatusZIndex()}getMaxNormalBoxZIndex(){return this.useBoxesStatus?this.boxes.reduce((_e,tt)=>tt.boxStatus&&tt.boxStatus===TELE_BOX_STATE.Normal&&!this.isForceTop(tt)?Math.max(_e,tt.zIndex):_e,299):this.getUnabledBoxesStatusZIndex()}getMaxForceTopBoxZIndex(){return this.useBoxesStatus?this.boxes.reduce((_e,tt)=>tt.boxStatus&&this.isForceTop(tt)?Math.max(_e,tt.zIndex):_e,699):this.getUnabledBoxesStatusZIndex()}isForceNormal(_e){return _e._forceNormal$.value}isForceTop(_e){return _e._forceTop$.value}create(_e={},tt=!0){const rt=new TeleBox({zIndex:_e.forceTop?this.getMaxForceTopBoxZIndex()+1:this.getMaxNormalBoxZIndex()+1,...tt?this.smartPosition(_e):_e,darkMode:this.darkMode,prefersColorScheme:this.prefersColorScheme,maximized:this.maximized,minimized:this.minimized,fence:this.fence,namespace:this.namespace,containerRect:this.containerRect,readonly:this.readonly,collectorRect:this.collectorRect});return rt.mount(this.root),this.boxes$.setValue([...this.boxes,rt]),rt.boxStatus&&this.useBoxesStatus&&this.setBox(rt,{status:rt.boxStatus,lastNotMinimizedBoxStatus:rt._lastNotMinimizedBoxStatus$.value},!0),rt.focus&&(this.focusBox(rt),tt&&this.makeBoxTop(rt)),rt._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Maximize,()=>{if(this.useBoxesStatus&&rt.boxStatus){if(rt._forceNormal$.value)return;rt.boxStatus===TELE_BOX_STATE.Maximized?this.setBox(rt.id,{status:TELE_BOX_STATE.Normal,zIndex:this.getMaxNormalBoxZIndex()+1},!1):([...this.boxes].filter(nt=>nt.boxStatus===TELE_BOX_STATE.Normal&&!this.isForceNormal(nt)).sort((nt,st)=>nt.zIndex-st.zIndex).forEach(nt=>{nt.boxStatus===TELE_BOX_STATE.Normal&&this.setBox(nt.id,{status:TELE_BOX_STATE.Maximized,zIndex:this.getMaxMaximizedBoxZIndex()+1},!1)}),this.makeMaximizedTopBoxFocus())}else this.setMaximized(!this.maximized)}),rt._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Minimize,()=>{if(rt.boxStatus&&this.useBoxesStatus){if(rt._forceNormal$.value)return;rt.focus&&this.blurBox(rt),this.setBox(rt,{status:TELE_BOX_STATE.Minimized,zIndex:-1},!1,()=>{this.focusTopBox()})}else this.setMinimized(!0)}),rt._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Close,()=>{this.useBoxesStatus&&rt.focus&&this.blurBox(rt),this.remove(rt),this.focusTopBox()}),rt._coord$.reaction((nt,st,dt)=>{dt||this.events.emit(TELE_BOX_MANAGER_EVENT.Move,rt)}),rt._size$.reaction((nt,st,dt)=>{dt||this.events.emit(TELE_BOX_MANAGER_EVENT.Resize,rt)}),rt._intrinsicCoord$.reaction((nt,st,dt)=>{dt||this.events.emit(TELE_BOX_MANAGER_EVENT.IntrinsicMove,rt)}),rt._intrinsicSize$.reaction((nt,st,dt)=>{dt||this.events.emit(TELE_BOX_MANAGER_EVENT.IntrinsicResize,rt)}),rt._visualSize$.reaction((nt,st,dt)=>{dt||this.events.emit(TELE_BOX_MANAGER_EVENT.VisualResize,rt)}),rt._zIndex$.reaction((nt,st,dt)=>{if(this.boxes.length>0){const ht=this.boxes.reduce((mt,bt)=>this.isForceTop(bt)||bt.boxStatus&&bt.boxStatus===TELE_BOX_STATE.Minimized?mt:mt?mt.zIndex>bt.zIndex?mt:bt:(mt=bt,mt),void 0);this.topBox$.setValue(ht)}dt||this.events.emit(TELE_BOX_MANAGER_EVENT.ZIndex,rt)}),this.events.emit(TELE_BOX_MANAGER_EVENT.Created,rt),rt}query(_e){return _e?this.boxes.filter(this.teleBoxMatcher(_e)):[...this.boxes]}queryOne(_e){return _e?this.boxes.find(this.teleBoxMatcher(_e)):this.boxes[0]}update(_e,tt,rt=!1){const nt=this.boxes.find(st=>st.id===_e);if(nt)return this.updateBox(nt,tt,rt)}updateAll(_e,tt=!1){this.boxes.forEach(rt=>{this.updateBox(rt,_e,tt)})}setBox(_e,tt,rt=!1,nt){const st=this.getBox(_e);if(st){const{status:dt,zIndex:ft,lastNotMinimizedBoxStatus:ht}=tt;dt&&(this.setBoxStatus(st.id,dt,rt),st.setBoxStatus(dt,rt),this.effectBoxStatusChange()),ft&&st.setZIndex(ft,rt),ht&&(this.setLastNotMinimizedBoxStatus(st.id,ht,rt),st.setLastNotMinimizedBoxStatus(ht,rt)),nt&&nt()}}remove(_e,tt=!1,rt){const nt=this.getBox(_e),st=this.getBoxIndex(_e);if(st>=0){const dt=this.boxes.slice(),ft=dt.splice(st,1);return this.boxes$.setValue(dt),ft.forEach(ht=>ht.destroy()),nt&&this.useBoxesStatus&&(this.setBoxStatus(nt.id,void 0,tt),this.setLastNotMinimizedBoxStatus(nt.id,void 0,tt),this.effectBoxStatusChange(),rt&&rt()),tt||(this.boxes.length<=0&&(this.setMaximized(!1),this.setMinimized(!1)),this.events.emit(TELE_BOX_MANAGER_EVENT.Removed,ft)),ft[0]}}removeTopBox(){if(this.topBox)return this.remove(this.topBox)}removeAll(_e=!1){const tt=this.boxes$.value;return this.boxes$.setValue([]),tt.forEach(rt=>rt.destroy()),this.boxesStatus$.clear(),this.lastNotMinimizedBoxesStatus$.clear(),_e||(this.boxes.length<=0&&(this.setMaximized(!1),this.setMinimized(!1)),this.events.emit(TELE_BOX_MANAGER_EVENT.Removed,tt)),tt}destroy(_e=!1){this.events.removeAllListeners(),this._sideEffect.flushAll(),this.removeAll(_e),Object.keys(this).forEach(tt=>{const rt=this[tt];rt instanceof r$3&&rt.destroy()})}wrapClassName(_e){return`${this.namespace}-${_e}`}focusBox(_e,tt=!1){const rt=this.getBox(_e);rt&&(this.boxes.forEach(nt=>{if(rt===nt){let st=!1;rt.focus||(st=!0,rt.setFocus(!0,tt)),st&&!tt&&this.events.emit(TELE_BOX_MANAGER_EVENT.Focused,rt)}else nt.focus&&this.blurBox(nt,tt)}),this.useBoxesStatus?this.useBoxesStatus&&this.maxTitleBar.hasMaximizedBoxInStatus()&&this.makeMaximizedTopBoxFocus():this.maxTitleBar.focusBox(rt))}focusTopBox(){if(this.topBox&&!this.topBox.focus)return this.focusBox(this.topBox)}blurBox(_e,tt=!1){const rt=this.getBox(_e);rt&&(rt.focus&&(rt.setFocus(!1,tt),tt||this.events.emit(TELE_BOX_MANAGER_EVENT.Blurred,rt)),this.maxTitleBar.focusedBox===rt&&this.maxTitleBar.focusBox())}blurAll(_e=!1){this.boxes.forEach(tt=>{tt.focus&&(tt.setFocus(!1,_e),_e||this.events.emit(TELE_BOX_MANAGER_EVENT.Blurred,tt))}),this.maxTitleBar.focusedBox&&this.maxTitleBar.focusBox()}teleBoxMatcher(_e){const tt=Object.keys(_e);return rt=>tt.every(nt=>_e[nt]===rt[nt])}updateBox(_e,tt,rt=!1){(tt.x!=null||tt.y!=null)&&_e.move(tt.x==null?_e.intrinsicX:tt.x,tt.y==null?_e.intrinsicY:tt.y,rt),(tt.width!=null||tt.height!=null)&&_e.resize(tt.width==null?_e.intrinsicWidth:tt.width,tt.height==null?_e.intrinsicHeight:tt.height,rt),tt.title!=null&&(_e.setTitle(tt.title),this.maxTitleBar.updateTitles()),tt.visible!=null&&_e.setVisible(tt.visible,rt),tt.minHeight!=null&&_e.setMinHeight(tt.minHeight,rt),tt.minWidth!=null&&_e.setMinWidth(tt.minWidth,rt),tt.resizable!=null&&_e.setResizable(tt.resizable,rt),tt.draggable!=null&&_e.setDraggable(tt.draggable,rt),tt.fixRatio!=null&&_e.setFixRatio(tt.fixRatio,rt),tt.zIndex!=null&&_e.setZIndex(tt.zIndex,rt),tt.content!=null&&_e.mountContent(tt.content),tt.footer!=null&&_e.mountFooter(tt.footer),this.useBoxesStatus&&(tt.boxStatus||tt.lastNotMinimizedBoxStatus)&&this.setBox(_e,{status:tt.boxStatus,lastNotMinimizedBoxStatus:tt.lastNotMinimizedBoxStatus},rt),tt.forceTop!=null&&_e.setForceTop(tt.forceTop,rt),tt.forceNormal!=null&&_e.setForceNormal(tt.forceNormal,rt)}smartPosition(_e={}){let{x:tt,y:rt}=_e;const{width:nt=.5,height:st=.5}=_e;if(tt==null){let dt=20;if(_e.forceTop){const ft=this.maxForceTopBox||this.topBox;ft&&(dt=ft.intrinsicX*this.containerRect.width+20,dt>this.containerRect.width-nt*this.containerRect.width&&(dt=20))}else this.topBox?(dt=this.topBox.intrinsicX*this.containerRect.width+20,dt>this.containerRect.width-nt*this.containerRect.width&&(dt=20)):this.hasMinimizedBox()&&(dt=[...this.boxes].filter(ft=>ft.boxStatus&&ft.boxStatus===TELE_BOX_STATE.Minimized&&ft.lastNotMinimizedBoxStatus&&ft.lastNotMinimizedBoxStatus===TELE_BOX_STATE.Normal).reduce((ft,ht)=>Math.max(ft,ht.intrinsicX*this.containerRect.width+20),dt));tt=dt/this.containerRect.width}if(rt==null){let dt=20;if(_e.forceTop){const ft=this.maxForceTopBox||this.topBox;ft&&(dt=ft.intrinsicY*this.containerRect.height+20,dt>this.containerRect.height-st*this.containerRect.height&&(dt=20))}else this.topBox?(dt=this.topBox.intrinsicY*this.containerRect.height+20,dt>this.containerRect.height-st*this.containerRect.height&&(dt=20)):this.hasMinimizedBox()&&(dt=[...this.boxes].filter(ft=>ft.boxStatus&&ft.boxStatus===TELE_BOX_STATE.Minimized&&ft.lastNotMinimizedBoxStatus&&ft.lastNotMinimizedBoxStatus===TELE_BOX_STATE.Normal).reduce((ft,ht)=>Math.max(ft,ht.intrinsicY*this.containerRect.height+20),dt));rt=dt/this.containerRect.height}return{..._e,x:tt,y:rt,width:nt,height:st}}makeBoxTop(_e,tt=!1){!this.useBoxesStatus&&this.topBox?_e!==this.topBox&&_e.setZIndex(this.topBox.zIndex+1,tt):this.useBoxesStatus}getMaximizedTopBox(){if(!this.useBoxesStatus)return;let _e;return this.maxTitleBar.hasMaximizedBoxInStatus()&&(_e=this.maxTitleBar.MaximizedBoxes.reduce((tt,rt)=>tt&&tt.zIndex>rt.zIndex?tt:rt)),_e}makeMaximizedTopBoxFocus(){if(!this.useBoxesStatus)return;const _e=this.getMaximizedTopBox();this.maxTitleBar.focusBox(_e)}getBoxIndex(_e){return typeof _e=="string"?this.boxes.findIndex(tt=>tt.id===_e):this.boxes.findIndex(tt=>tt===_e)}getBox(_e){return typeof _e=="string"?this.boxes.find(tt=>tt.id===_e):_e}createMinimizedAppMenu(){var _e,tt;if((_e=this.collector)!=null&&_e.$appMenuContainer)return new AppMenu({manager:this,container:(tt=this.collector)==null?void 0:tt.$appMenuContainer,theme:this.prefersColorScheme?"dark":"light",getBoxesStatus:()=>this.boxesStatus$})}}TeleBoxManager.kind="TeleBoxManager";const createBoxManager=(et,_e,tt,rt,nt)=>{const st=getExtendClass$1(BoxManager,WindowManager.extendClass);return new st({safeSetAttributes:dt=>et.safeSetAttributes(dt),getMainView:()=>et.mainView,updateAppState:(...dt)=>{var ft;return(ft=et.appManager)==null?void 0:ft.store.updateAppState(...dt)},setBoxStatus:(dt,ft)=>{var ht;return(ht=et.appManager)==null?void 0:ht.store.setBoxStatus(dt,ft)},setLastNotMinimizedBoxStatus:(dt,ft)=>{var ht;return(ht=et.appManager)==null?void 0:ht.store.setLastNotMinimizedBoxStatus(dt,ft)},canOperate:()=>et.canOperate,notifyContainerRectUpdate:dt=>{var ft;return(ft=et.appManager)==null?void 0:ft.notifyContainerRectUpdate(dt)},cleanFocus:()=>{var dt;return(dt=et.appManager)==null?void 0:dt.store.cleanFocus()},setAppFocus:dt=>{var ft;return(ft=et.appManager)==null?void 0:ft.store.setAppFocus(dt,!0)},callbacks:_e,emitter:tt,boxEmitter:rt},nt)};class BoxManager{constructor(_e,tt){this.context=_e,this.createTeleBoxManagerConfig=tt;const{emitter:rt,callbacks:nt,boxEmitter:st}=_e;this.teleBoxManager=this.setupBoxManager(tt),this.teleBoxManager._state$.reaction(dt=>{nt.emit("boxStateChange",dt),rt.emit("boxStateChange",dt)}),this.teleBoxManager._darkMode$.reaction(dt=>{nt.emit("darkModeChange",dt)}),this.teleBoxManager._prefersColorScheme$.reaction(dt=>{nt.emit("prefersColorSchemeChange",dt)}),this.teleBoxManager._minimized$.reaction(dt=>{dt||setTimeout(()=>{const ft=.001*(Math.random()>.5?1:-1);this.teleBoxManager.boxes.forEach(ht=>{ht.resize(ht.intrinsicWidth+ft,ht.intrinsicHeight+ft,!0)})},400)}),this.teleBoxManager.events.on("minimized",dt=>{if(this.context.safeSetAttributes({minimized:dt}),dt)this.context.cleanFocus(),this.blurAllBox();else{const ft=this.getTopBox();ft&&(this.context.setAppFocus(ft.id),this.focusBox({appId:ft.id},!1))}}),this.teleBoxManager.events.on("maximized",dt=>{this.context.safeSetAttributes({maximized:dt})}),this.teleBoxManager.events.on("removed",dt=>{dt.forEach(ft=>{st.emit("close",{appId:ft.id})})}),this.teleBoxManager.events.on("intrinsic_move",lodashExports.debounce(dt=>{st.emit("move",{appId:dt.id,x:dt.intrinsicX,y:dt.intrinsicY})},50)),this.teleBoxManager.events.on("intrinsic_resize",lodashExports.debounce(dt=>{st.emit("resize",{appId:dt.id,width:dt.intrinsicWidth,height:dt.intrinsicHeight})},200)),this.teleBoxManager.events.on("focused",dt=>{dt&&(this.canOperate?st.emit("focus",{appId:dt.id}):this.teleBoxManager.blurBox(dt.id))}),this.teleBoxManager.events.on("blurred",dt=>{dt&&this.canOperate&&st.emit("blurred",{appId:dt.id})}),this.teleBoxManager.events.on("z_index",dt=>{this.context.updateAppState(dt.id,AppAttributes.ZIndex,dt.zIndex)}),this.teleBoxManager.events.on("box_status",dt=>{this.canOperate&&this.context.setBoxStatus(dt.id,dt.boxStatus)}),this.teleBoxManager.events.on("last_not_minimized_box_status",dt=>{this.canOperate&&this.context.setLastNotMinimizedBoxStatus(dt.id,dt.boxStatus)}),rt.on("playgroundSizeChange",()=>this.updateManagerRect()),rt.on("updateManagerRect",()=>this.updateManagerRect())}get mainView(){return this.context.getMainView()}get canOperate(){return this.context.canOperate()}get boxState(){return this.teleBoxManager.state}get maximized(){return this.teleBoxManager.maximized}get minimized(){return this.teleBoxManager.minimized}get darkMode(){return this.teleBoxManager.darkMode}get prefersColorScheme(){return this.teleBoxManager.prefersColorScheme}get boxSize(){return this.teleBoxManager.boxes.length}createBox(_e){var tt,rt,nt;if(!this.teleBoxManager)return;let{minwidth:st=MIN_WIDTH,minheight:dt=MIN_HEIGHT}=(tt=_e.app.config)!=null?tt:{};const{width:ft,height:ht}=(rt=_e.app.config)!=null?rt:{},mt=((nt=_e.options)==null?void 0:nt.title)||_e.appId,bt=this.teleBoxManager.containerRect;st>1&&(st=st/bt.width),dt>1&&(dt=dt/bt.height);const St={title:mt,minWidth:st,minHeight:dt,width:ft,height:ht,id:_e.appId,boxStatus:_e.boxStatus,forceTop:_e.forceTop,forceNormal:_e.forceNormal,isDragContent:_e.isDragContent};this.teleBoxManager.create(St,_e.smartPosition),this.context.emitter.emit(`${_e.appId}${Events.WindowCreated}`)}setBoxInitState(_e){const tt=this.teleBoxManager.queryOne({id:_e});tt&&tt.state===TELE_BOX_STATE.Maximized&&this.context.boxEmitter.emit("resize",{appId:_e,x:tt.x,y:tt.y,width:tt.intrinsicWidth,height:tt.intrinsicHeight})}setBoxesStatus(_e){const tt=new Map(Object.entries(_e??{}));this.teleBoxManager.setBoxesStatus(tt,!0),this.context.callbacks.emit("onBoxesStatusChange",tt),this.context.emitter.emit("boxesStatusChange",tt)}setLastNotMinimizedBoxesStatus(_e){const tt=new Map(Object.entries(_e??{}));this.teleBoxManager.setLastNotMinimizedBoxesStatus(tt,!0),this.context.callbacks.emit("onLastNotMinimizedBoxesStatusChange",tt),this.context.emitter.emit("lastNotMinimizedBoxesStatusChange",tt)}setupBoxManager(_e){const tt=WindowManager.wrapper?WindowManager.wrapper:document.body,rt=tt.getBoundingClientRect(),nt={root:tt,containerRect:{x:0,y:0,width:rt.width,height:rt.height},fence:!1,prefersColorScheme:_e?.prefersColorScheme,useBoxesStatus:_e?.useBoxesStatus||!1},st=getExtendClass$1(TeleBoxManager,WindowManager.extendClass),dt=new st(nt);this.teleBoxManager&&this.teleBoxManager.destroy(),this.teleBoxManager=dt;const ft=_e?.collectorContainer||WindowManager.wrapper;return ft&&this.setCollectorContainer(ft),dt}setCollectorContainer(_e){var tt;const rt=getExtendClass$1(TeleBoxCollector,WindowManager.extendClass),nt=new rt({styles:(tt=this.createTeleBoxManagerConfig)==null?void 0:tt.collectorStyles}).mount(_e);this.teleBoxManager.setCollector(nt)}getBox(_e){return this.teleBoxManager.queryOne({id:_e})}closeBox(_e,tt=!1){return this.teleBoxManager.remove(_e,tt)}boxIsFocus(_e){const tt=this.getBox(_e);return tt?.focus}getFocusBox(){return this.teleBoxManager.query({focus:!0})[0]}getTopBox(){return this.teleBoxManager.topBox}updateBoxState(_e){if(!_e)return;const tt=this.getBox(_e.id);tt&&(this.teleBoxManager.update(tt.id,{x:_e.x,y:_e.y,width:_e.width||.5,height:_e.height||.5,zIndex:_e.zIndex,boxStatus:_e.boxStatus,lastNotMinimizedBoxStatus:_e.lastNotMinimizedBoxStatus,forceTop:_e.forceTop,forceNormal:_e.forceNormal,isDragContent:_e.isDragContent},!0),setTimeout(()=>{_e.focus&&this.teleBoxManager.focusBox(tt.id,!0),_e.maximized!=null&&this.teleBoxManager.setMaximized(!!_e.maximized,!0),_e.minimized!=null&&this.teleBoxManager.setMinimized(!!_e.minimized,!0)},50),this.context.callbacks.emit("boxStateChange",this.teleBoxManager.state))}updateManagerRect(){var _e;const tt=(_e=this.mainView.divElement)==null?void 0:_e.getBoundingClientRect();if(tt&&tt.width>0&&tt.height>0){const rt={x:0,y:0,width:tt.width,height:tt.height};this.teleBoxManager.setContainerRect(rt),this.context.notifyContainerRectUpdate(this.teleBoxManager.containerRect)}}moveBox({appId:_e,x:tt,y:rt}){this.teleBoxManager.update(_e,{x:tt,y:rt},!0)}focusBox({appId:_e},tt=!0){this.teleBoxManager.focusBox(_e,tt)}resizeBox({appId:_e,width:tt,height:rt,skipUpdate:nt}){this.teleBoxManager.update(_e,{width:tt,height:rt},nt)}setBoxMinSize(_e){this.teleBoxManager.update(_e.appId,{minWidth:_e.minWidth,minHeight:_e.minHeight},!0)}setBoxTitle(_e){this.teleBoxManager.update(_e.appId,{title:_e.title},!0)}blurAllBox(){this.teleBoxManager.blurAll()}updateAll(_e){this.teleBoxManager.updateAll(_e)}setMaximized(_e,tt=!0){_e!==this.maximized&&this.teleBoxManager.setMaximized(_e,tt)}setMinimized(_e,tt=!0){this.teleBoxManager.setMinimized(_e,tt)}focusTopBox(){if(this.teleBoxManager.query().length>=1){const tt=this.getTopBox();tt&&this.focusBox({appId:tt.id},!1)}}updateBox(_e,tt,rt=!0){this.teleBoxManager.update(_e,tt,rt)}setReadonly(_e){this.teleBoxManager.setReadonly(_e)}setPrefersColorScheme(_e){this.teleBoxManager.setPrefersColorScheme(_e)}setZIndex(_e,tt,rt=!0){this.teleBoxManager.update(_e,{zIndex:tt},rt)}destroy(){this.teleBoxManager.destroy()}}BoxManager.kind="BoxManager";const log$1=(...et)=>{WindowManager.debug&&console.log("[WindowManager]:",...et)},setupWrapper=et=>{const _e=document.createElement("div");_e.className="netless-window-manager-playground";const tt=document.createElement("div");tt.className="netless-window-manager-sizer";const rt=document.createElement("div");rt.className="netless-window-manager-wrapper";const nt=document.createElement("div");return nt.className="netless-window-manager-main-view",_e.appendChild(tt),tt.appendChild(rt),rt.appendChild(nt),et.appendChild(_e),WindowManager.wrapper=rt,{playground:_e,wrapper:rt,sizer:tt,mainViewElement:nt}},checkVersion=()=>{if(getVersionNumber(whiteWebSdkExports.WhiteVersion)<getVersionNumber(REQUIRE_VERSION))throw new WhiteWebSDKInvalidError(REQUIRE_VERSION)},findMemberByUid=(et,_e)=>{var tt;const rt=et?.state.roomMembers||[];let nt=-1,st;for(const dt of rt)((tt=dt.payload)==null?void 0:tt.uid)===_e&&nt<dt.memberId&&(nt=dt.memberId,st=dt);return st},createInvisiblePlugin=async et=>{let _e=et.getInvisiblePlugin(WindowManager.kind);if(_e)return _e;let tt;const rt=new Promise(mt=>{WindowManager._resolve=tt=mt});let nt=!1;const st=isRoomTokenWritable(et);!et.isWritable&&st&&(nt=!0,await pRetry(async mt=>{log$1(`switching to writable (x${mt})`),await et.setWritable(!0)},{retries:10,maxTimeout:5e3})),et.isWritable?(log$1("creating InvisiblePlugin..."),et.createInvisiblePlugin(WindowManager,{}).catch(console.warn)):(st&&console.warn("[WindowManager]: failed to switch to writable"),console.warn("[WindowManager]: waiting for others to create the plugin..."));const dt=setTimeout(()=>{console.warn("[WindowManager]: no one called createInvisiblePlugin() after 20 seconds")},2e4),ft=setTimeout(()=>{throw new Error("[WindowManager]: no one called createInvisiblePlugin() after 60 seconds")},6e4),ht=setInterval(()=>{_e=et.getInvisiblePlugin(WindowManager.kind),_e&&(clearTimeout(ft),clearTimeout(dt),clearInterval(ht),tt(_e),nt&&et.isWritable&&setTimeout(()=>et.setWritable(!1).catch(console.warn),500))},200);return rt},isRoomTokenWritable=et=>{try{const _e=atob(et.roomToken.slice(12)),tt=_e.indexOf("&role=");return+_e[tt+6]<2}catch(_e){return console.error(_e),!1}};function noop$4(){}function run(et){return et()}function blank_object(){return Object.create(null)}function run_all(et){et.forEach(run)}function is_function(et){return typeof et=="function"}function safe_not_equal$1(et,_e){return et!=et?_e==_e:et!==_e||et&&typeof et=="object"||typeof et=="function"}let src_url_equal_anchor;function src_url_equal(et,_e){return src_url_equal_anchor||(src_url_equal_anchor=document.createElement("a")),src_url_equal_anchor.href=_e,et===src_url_equal_anchor.href}function is_empty(et){return Object.keys(et).length===0}function append(et,_e){et.appendChild(_e)}function insert(et,_e,tt){et.insertBefore(_e,tt||null)}function detach(et){et.parentNode&&et.parentNode.removeChild(et)}function element(et){return document.createElement(et)}function text$1(et){return document.createTextNode(et)}function space(){return text$1(" ")}function attr(et,_e,tt){tt==null?et.removeAttribute(_e):et.getAttribute(_e)!==tt&&et.setAttribute(_e,tt)}function children(et){return Array.from(et.childNodes)}function set_data(et,_e){_e=""+_e,et.data!==_e&&(et.data=_e)}function set_style(et,_e,tt,rt){tt==null?et.style.removeProperty(_e):et.style.setProperty(_e,tt,"")}let current_component;function set_current_component(et){current_component=et}const dirty_components=[],binding_callbacks=[];let render_callbacks=[];const flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush$1))}function add_render_callback(et){render_callbacks.push(et)}const seen_callbacks=new Set;let flushidx=0;function flush$1(){if(flushidx!==0)return;const et=current_component;do{try{for(;flushidx<dirty_components.length;){const _e=dirty_components[flushidx];flushidx++,set_current_component(_e),update(_e.$$)}}catch(_e){throw dirty_components.length=0,flushidx=0,_e}for(set_current_component(null),dirty_components.length=0,flushidx=0;binding_callbacks.length;)binding_callbacks.pop()();for(let _e=0;_e<render_callbacks.length;_e+=1){const tt=render_callbacks[_e];seen_callbacks.has(tt)||(seen_callbacks.add(tt),tt())}render_callbacks.length=0}while(dirty_components.length);for(;flush_callbacks.length;)flush_callbacks.pop()();update_scheduled=!1,seen_callbacks.clear(),set_current_component(et)}function update(et){if(et.fragment!==null){et.update(),run_all(et.before_update);const _e=et.dirty;et.dirty=[-1],et.fragment&&et.fragment.p(et.ctx,_e),et.after_update.forEach(add_render_callback)}}function flush_render_callbacks(et){const _e=[],tt=[];render_callbacks.forEach(rt=>et.indexOf(rt)===-1?_e.push(rt):tt.push(rt)),tt.forEach(rt=>rt()),render_callbacks=_e}const outroing=new Set;function transition_in(et,_e){et&&et.i&&(outroing.delete(et),et.i(_e))}function mount_component(et,_e,tt,rt){const{fragment:nt,after_update:st}=et.$$;nt&&nt.m(_e,tt),rt||add_render_callback(()=>{const dt=et.$$.on_mount.map(run).filter(is_function);et.$$.on_destroy?et.$$.on_destroy.push(...dt):run_all(dt),et.$$.on_mount=[]}),st.forEach(add_render_callback)}function destroy_component(et,_e){const tt=et.$$;tt.fragment!==null&&(flush_render_callbacks(tt.after_update),run_all(tt.on_destroy),tt.fragment&&tt.fragment.d(_e),tt.on_destroy=tt.fragment=null,tt.ctx=[])}function make_dirty(et,_e){et.$$.dirty[0]===-1&&(dirty_components.push(et),schedule_update(),et.$$.dirty.fill(0)),et.$$.dirty[_e/31|0]|=1<<_e%31}function init(et,_e,tt,rt,nt,st,dt,ft=[-1]){const ht=current_component;set_current_component(et);const mt=et.$$={fragment:null,ctx:[],props:st,update:noop$4,not_equal:nt,bound:blank_object(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(_e.context||(ht?ht.$$.context:[])),callbacks:blank_object(),dirty:ft,skip_bound:!1,root:_e.target||ht.$$.root};let bt=!1;if(mt.ctx=tt?tt(et,_e.props||{},(St,Et,...Ct)=>{const Rt=Ct.length?Ct[0]:Et;return mt.ctx&&nt(mt.ctx[St],mt.ctx[St]=Rt)&&(!mt.skip_bound&&mt.bound[St]&&mt.bound[St](Rt),bt&&make_dirty(et,St)),Et}):[],mt.update(),bt=!0,run_all(mt.before_update),mt.fragment=rt?rt(mt.ctx):!1,_e.target){if(_e.hydrate){const St=children(_e.target);mt.fragment&&mt.fragment.l(St),St.forEach(detach)}else mt.fragment&&mt.fragment.c();_e.intro&&transition_in(et.$$.fragment),mount_component(et,_e.target,_e.anchor,_e.customElement),flush$1()}set_current_component(ht)}class SvelteComponent{$destroy(){destroy_component(this,1),this.$destroy=noop$4}$on(_e,tt){if(!is_function(tt))return noop$4;const rt=this.$$.callbacks[_e]||(this.$$.callbacks[_e]=[]);return rt.push(tt),()=>{const nt=rt.indexOf(tt);nt!==-1&&rt.splice(nt,1)}}$set(_e){this.$$set&&!is_empty(_e)&&(this.$$.skip_bound=!0,this.$$set(_e),this.$$.skip_bound=!1)}}function create_if_block(et){let _e,tt,rt,nt,st,dt,ft,ht=et[18]&&create_if_block_2(et),mt=et[19]&&create_if_block_1(et);return{c(){_e=element("div"),tt=element("div"),ht&&ht.c(),rt=space(),nt=element("span"),st=text$1(et[1]),dt=space(),mt&&mt.c(),set_style(nt,"overflow","hidden"),set_style(nt,"white-space","nowrap"),set_style(nt,"text-overflow","ellipsis"),set_style(nt,"max-width","80px"),attr(tt,"class",et[9]),set_style(tt,"background-color",et[3]),set_style(tt,"color",et[10]),set_style(tt,"opacity",et[12]),attr(_e,"class",ft="netless-window-manager-cursor-name "+et[16]+" "+et[15])},m(bt,St){insert(bt,_e,St),append(_e,tt),ht&&ht.m(tt,null),append(tt,rt),append(tt,nt),append(nt,st),append(tt,dt),mt&&mt.m(tt,null)},p(bt,St){bt[18]?ht?ht.p(bt,St):(ht=create_if_block_2(bt),ht.c(),ht.m(tt,rt)):ht&&(ht.d(1),ht=null),St&2&&set_data(st,bt[1]),bt[19]?mt?mt.p(bt,St):(mt=create_if_block_1(bt),mt.c(),mt.m(tt,null)):mt&&(mt.d(1),mt=null),St&512&&attr(tt,"class",bt[9]),St&8&&set_style(tt,"background-color",bt[3]),St&1024&&set_style(tt,"color",bt[10]),St&4096&&set_style(tt,"opacity",bt[12]),St&98304&&ft!==(ft="netless-window-manager-cursor-name "+bt[16]+" "+bt[15])&&attr(_e,"class",ft)},d(bt){bt&&detach(_e),ht&&ht.d(),mt&&mt.d()}}}function create_if_block_2(et){let _e,tt;return{c(){_e=element("img"),attr(_e,"class","netless-window-manager-cursor-selector-avatar"),attr(_e,"style",et[20]()),src_url_equal(_e.src,tt=et[8])||attr(_e,"src",tt),attr(_e,"alt","avatar")},m(rt,nt){insert(rt,_e,nt)},p(rt,nt){nt&256&&!src_url_equal(_e.src,tt=rt[8])&&attr(_e,"src",tt)},d(rt){rt&&detach(_e)}}}function create_if_block_1(et){let _e,tt;return{c(){_e=element("span"),tt=text$1(et[2]),attr(_e,"class","netless-window-manager-cursor-tag-name"),set_style(_e,"background-color",et[11])},m(rt,nt){insert(rt,_e,nt),append(_e,tt)},p(rt,nt){nt&4&&set_data(tt,rt[2]),nt&2048&&set_style(_e,"background-color",rt[11])},d(rt){rt&&detach(_e)}}}function create_fragment(et){let _e,tt,rt,nt,st,dt,ft,ht=!et[14]&&create_if_block(et);return{c(){_e=element("div"),ht&&ht.c(),tt=space(),rt=element("div"),nt=element("img"),attr(nt,"class",st="netless-window-manager-cursor-"+et[4]+"-image "+et[15]),src_url_equal(nt.src,dt=et[7])||attr(nt,"src",dt),attr(nt,"alt",et[4]),attr(rt,"class","cursor-image-wrapper"),attr(_e,"class",ft="netless-window-manager-cursor-mid"+(et[13]?" netless-window-manager-cursor-custom":"")),set_style(_e,"transform","translateX("+et[5]+"px) translateY("+et[6]+"px)"),set_style(_e,"display",et[17]),attr(_e,"data-cursor-uid",et[0])},m(mt,bt){insert(mt,_e,bt),ht&&ht.m(_e,null),append(_e,tt),append(_e,rt),append(rt,nt)},p(mt,[bt]){mt[14]?ht&&(ht.d(1),ht=null):ht?ht.p(mt,bt):(ht=create_if_block(mt),ht.c(),ht.m(_e,tt)),bt&32784&&st!==(st="netless-window-manager-cursor-"+mt[4]+"-image "+mt[15])&&attr(nt,"class",st),bt&128&&!src_url_equal(nt.src,dt=mt[7])&&attr(nt,"src",dt),bt&16&&attr(nt,"alt",mt[4]),bt&8192&&ft!==(ft="netless-window-manager-cursor-mid"+(mt[13]?" netless-window-manager-cursor-custom":""))&&attr(_e,"class",ft),bt&96&&set_style(_e,"transform","translateX("+mt[5]+"px) translateY("+mt[6]+"px)"),bt&131072&&set_style(_e,"display",mt[17]),bt&1&&attr(_e,"data-cursor-uid",mt[0])},i:noop$4,o:noop$4,d(mt){mt&&detach(_e),ht&&ht.d()}}}function instance(et,_e,tt){let rt,nt,st,dt,ft,ht,mt,bt,{uid:St}=_e,{cursorName:Et}=_e,{tagName:Ct}=_e,{backgroundColor:Rt}=_e,{appliance:Tt}=_e,{x:wt}=_e,{y:At}=_e,{src:Nt}=_e,{visible:Pt}=_e,{avatar:It}=_e,{theme:Ft}=_e,{color:qt}=_e,{cursorTagBackgroundColor:Vt}=_e,{opacity:Kt}=_e,{pencilEraserSize:jt}=_e,{custom:Ut}=_e;const Ot=()=>Object.entries({width:(rt?19:28)+"px",height:(rt?19:28)+"px",position:rt?"initial":"absolute","border-color":rt?"white":Rt,"margin-right":(rt?4:0)+"px"}).map(([Wt,Bt])=>`${Wt}: ${Bt}`).join(";");return et.$$set=Wt=>{"uid"in Wt&&tt(0,St=Wt.uid),"cursorName"in Wt&&tt(1,Et=Wt.cursorName),"tagName"in Wt&&tt(2,Ct=Wt.tagName),"backgroundColor"in Wt&&tt(3,Rt=Wt.backgroundColor),"appliance"in Wt&&tt(4,Tt=Wt.appliance),"x"in Wt&&tt(5,wt=Wt.x),"y"in Wt&&tt(6,At=Wt.y),"src"in Wt&&tt(7,Nt=Wt.src),"visible"in Wt&&tt(21,Pt=Wt.visible),"avatar"in Wt&&tt(8,It=Wt.avatar),"theme"in Wt&&tt(9,Ft=Wt.theme),"color"in Wt&&tt(10,qt=Wt.color),"cursorTagBackgroundColor"in Wt&&tt(11,Vt=Wt.cursorTagBackgroundColor),"opacity"in Wt&&tt(12,Kt=Wt.opacity),"pencilEraserSize"in Wt&&tt(22,jt=Wt.pencilEraserSize),"custom"in Wt&&tt(13,Ut=Wt.custom)},et.$$.update=()=>{et.$$.dirty&2&&(rt=!lodashExports.isEmpty(Et)),et.$$.dirty&4&&tt(19,nt=!lodashExports.isEmpty(Ct)),et.$$.dirty&256&&tt(18,st=!lodashExports.isEmpty(It)),et.$$.dirty&2097152&&tt(17,dt=Pt?"":"none"),et.$$.dirty&16&&tt(14,ft=Tt===whiteWebSdkExports.ApplianceNames.laserPointer),et.$$.dirty&16400&&tt(23,ht=ft||Tt===whiteWebSdkExports.ApplianceNames.pencilEraser),et.$$.dirty&8388608&&tt(16,mt=ht?"netless-window-manager-laserPointer-pencilEraser-offset":""),et.$$.dirty&4194304&&tt(15,bt=jt===3?"netless-window-manager-pencilEraser-3-offset":"")},[St,Et,Ct,Rt,Tt,wt,At,Nt,It,Ft,qt,Vt,Kt,Ut,ft,bt,mt,dt,st,nt,Ot,Pt,jt,ht]}class Cursor$1 extends SvelteComponent{constructor(_e){super(),init(this,_e,instance,create_fragment,safe_not_equal$1,{uid:0,cursorName:1,tagName:2,backgroundColor:3,appliance:4,x:5,y:6,src:7,visible:21,avatar:8,theme:9,color:10,cursorTagBackgroundColor:11,opacity:12,pencilEraserSize:22,custom:13})}}const staticCircle="data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='12' cy='12' r='2.5' stroke='%23000' stroke-linejoin='square'/%3E%3Ccircle cx='12' cy='12' r='3.5' stroke='%23FFF'/%3E%3C/g%3E%3C/svg%3E";function circleUrl(et){return`data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='12' cy='12' r='2.5' stroke='%23${et}' stroke-linejoin='square'/%3E%3Ccircle cx='12' cy='12' r='3.5' stroke='%23${et}'/%3E%3C/g%3E%3C/svg%3E`}function crossUrl(et){return`data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg' fill='none'%3E%3Cpath d='M5 12H19' stroke='%23${et}' stroke-linejoin='round'/%3E%3Cpath d='M12 5V19' stroke='%23${et}' stroke-linejoin='round'/%3E%3C/svg%3E`}function cssCursor(et){return`url("${et}") 12 12, auto`}function makeStyleContent(et){let _e="";for(const tt in et)_e+=`.netless-whiteboard.${tt} {cursor: ${et[tt]}}
`;return _e}const $style=document.createElement("style");function enableLocal(et){const[_e,tt,rt]=et.strokeColor,nt=((1<<24)+(_e<<16)+(tt<<8)+rt).toString(16).slice(1);return $style.textContent=makeStyleContent({"cursor-pencil":cssCursor(circleUrl(nt)),"cursor-eraser":cssCursor(staticCircle),"cursor-rectangle":cssCursor(crossUrl(nt)),"cursor-ellipse":cssCursor(crossUrl(nt)),"cursor-straight":cssCursor(crossUrl(nt)),"cursor-arrow":cssCursor(crossUrl(nt)),"cursor-shape":cssCursor(crossUrl(nt))}),document.head.appendChild($style),()=>{$style.parentNode!=null&&document.head.removeChild($style)}}const shapeAppliances=new Set([whiteWebSdkExports.ApplianceNames.rectangle,whiteWebSdkExports.ApplianceNames.ellipse,whiteWebSdkExports.ApplianceNames.straight,whiteWebSdkExports.ApplianceNames.arrow,whiteWebSdkExports.ApplianceNames.shape]);function remoteIcon(et,_e){if(et===whiteWebSdkExports.ApplianceNames.pencil)return circleUrl(_e);if(et===whiteWebSdkExports.ApplianceNames.eraser)return staticCircle;if(shapeAppliances.has(et))return crossUrl(_e)}class Cursor{constructor(_e,tt,rt,nt){this.manager=_e,this.memberId=tt,this.cursorManager=rt,this.wrapper=nt,this.style="default",this.move=st=>{var dt;if(st.type==="main"){const ft=this.cursorManager.wrapperRect;this.component&&ft&&(this.autoHidden(),this.moveCursor(st,ft,this.manager.mainView))}else{const ft=this.cursorManager.focusView,ht=(dt=ft?.divElement)==null?void 0:dt.getBoundingClientRect(),mt=ft?.camera;ft&&ht&&mt&&this.component&&(this.autoHidden(),this.moveCursor(st,ht,ft))}},this.setStyle=st=>{this.style=st,this.component&&this.component.$set({src:this.getIcon(),custom:this.isCustomIcon()})},this.leave=()=>{this.hide()},this.updateMember(),this.createCursor(),this.autoHidden(),this.setStyle(rt.style)}moveCursor(_e,tt,rt){var nt,st;const{x:dt,y:ft,type:ht}=_e,mt=rt?.screen.convertPointToScreen(dt,ft);if(mt){let bt=mt.x-2,St=mt.y-18;if(this.isCustomIcon()&&(bt-=11,St+=4),ht==="app"){const Et=this.cursorManager.wrapperRect;Et&&(bt=bt+tt.x-Et.x,St=St+tt.y-Et.y)}mt.x<0||mt.x>tt.width||mt.y<0||mt.y>tt.height?(nt=this.component)==null||nt.$set({visible:!1,x:bt,y:St}):(st=this.component)==null||st.$set({visible:!0,x:bt,y:St})}}get memberApplianceName(){var _e,tt;return(tt=(_e=this.member)==null?void 0:_e.memberState)==null?void 0:tt.currentApplianceName}get memberColor(){var _e,tt;return`rgb(${(tt=(_e=this.member)==null?void 0:_e.memberState)==null?void 0:tt.strokeColor.join(",")})`}get memberColorHex(){var _e,tt;const[rt,nt,st]=((tt=(_e=this.member)==null?void 0:_e.memberState)==null?void 0:tt.strokeColor)||[236,52,85];return((1<<24)+(rt<<16)+(nt<<8)+st).toString(16).slice(1)}get payload(){var _e;return(_e=this.member)==null?void 0:_e.payload}get memberCursorName(){var _e,tt;return((_e=this.payload)==null?void 0:_e.nickName)||((tt=this.payload)==null?void 0:tt.cursorName)||this.memberId}get memberTheme(){var _e;return(_e=this.payload)!=null&&_e.theme?"netless-window-manager-cursor-inner-mellow":"netless-window-manager-cursor-inner"}get memberCursorTextColor(){var _e;return((_e=this.payload)==null?void 0:_e.cursorTextColor)||"#FFFFFF"}get memberCursorTagBackgroundColor(){var _e;return((_e=this.payload)==null?void 0:_e.cursorTagBackgroundColor)||this.memberColor}get memberAvatar(){var _e;return(_e=this.payload)==null?void 0:_e.avatar}get memberOpacity(){return!this.memberCursorName&&!this.memberAvatar?0:1}get memberTagName(){var _e;return(_e=this.payload)==null?void 0:_e.cursorTagName}autoHidden(){this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout(()=>{this.hide()},1e3*10)}async createCursor(){this.member&&this.wrapper&&(this.component=new Cursor$1({target:this.wrapper,props:this.initProps()}))}initProps(){var _e;return{uid:this.memberId,x:0,y:0,appliance:this.memberApplianceName,avatar:this.memberAvatar,src:this.getIcon(),custom:this.isCustomIcon(),visible:!1,backgroundColor:this.memberColor,cursorName:this.memberCursorName,theme:this.memberTheme,color:this.memberCursorTextColor,cursorTagBackgroundColor:this.memberCursorTagBackgroundColor,opacity:this.memberOpacity,tagName:this.memberTagName,pencilEraserSize:(_e=this.member)==null?void 0:_e.memberState.pencilEraserSize}}getIcon(){var _e;if(!this.member)return;const{memberApplianceName:tt,memberColorHex:rt}=this,{userApplianceIcons:nt,applianceIcons:st}=this.cursorManager;let dt=this.memberApplianceName;dt===whiteWebSdkExports.ApplianceNames.pencilEraser&&(dt=`${dt}${((_e=this.member)==null?void 0:_e.memberState.pencilEraserSize)||1}`);const ft=dt&&nt[dt];if(ft)return ft;if(this.style==="custom"&&tt){const mt=remoteIcon(tt,rt);if(mt)return mt}return st[dt||whiteWebSdkExports.ApplianceNames.shape]||st[whiteWebSdkExports.ApplianceNames.shape]}isCustomIcon(){var _e;if(!this.member)return!1;const{memberApplianceName:tt,memberColorHex:rt}=this,{userApplianceIcons:nt}=this.cursorManager;let st=this.memberApplianceName;return st===whiteWebSdkExports.ApplianceNames.pencilEraser&&(st=`${st}${((_e=this.member)==null?void 0:_e.memberState.pencilEraserSize)||1}`),st&&nt[st]?!1:!!(this.style==="custom"&&tt&&remoteIcon(tt,rt))}updateMember(){return this.member=findMemberByUid(this.manager.room,this.memberId),this.updateComponent(),this.member}updateComponent(){var _e;(_e=this.component)==null||_e.$set(lodashExports.omit(this.initProps(),["x","y"]))}destroy(){this.component&&this.component.$destroy(),this.cursorManager.cursorInstances.delete(this.memberId),this.timer&&clearTimeout(this.timer)}hide(){this.component&&(this.component.$set({visible:!1}),this.destroy())}}var pencil="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYISURBVHgB7ZpNSCtXFIBPEuvz+dMGpYUKD/sWFX+Qti6kK7Hqpm6e9q0rIoIUFUShPLV10VZx4+JZqa9v20LBhdq9fyBUCtKNPH8qYl2IOw3G38Rkek4y15y5uTOZJDOWggcOSSYzN/ebc+45554JwIM8iBCPyTEP+86T4vyMfsRN4b+nQTKIJp0vzuGvlpID7os8EQNEIBD4oKio6Bm9DwaDv/v9/n/076JgbtWUYPchwrW8qD7UnOvr6wFNkpubm+/wu7f0c7y6mrnlvQufxB0Iau7V1dX3BDA/P6/V1dVpzc3N2uLiIofK1c8VYHys/wRKBUN3/hGHqaysNOjc3FwMis6hc0FtLTHuvYLxCCZgci8uLn4wg5Gh6Fy8Jk+/NkcCAlAAuUkoW4g0B+d5tLS05O/r67O8eGxsDNra2uDy8nKsoKCAwCIQDxQa0yTxgrvCYXyTk5Ml+Orf2dlJeeHIyAigFSE/P38ELfUNqNdSkjgF5FF89jL1TU1NlQwODl5gZPujp6cHWltbUw7Koc7Pz8mkZpHPFeFrJuZeqLnoMoPoZqe0JjDP/IZgnyLUG/o8NDRkuo5Ua2pjY6MC4oFCFf1cA0oKzRSOp6enRfTaGh0d/QxBt+1CUVgnOTs7+xrHfQzGyOcKkK3QTJMnQffZ6e/v/xwttmsHqqmpKXbdycnJCxy7ABLh3FEgVZ6hZJhnFZoFFMF0d3c/w7v+dyookXBnZ2c/xvHfhriVcvXfdBRItsxjnOhYqjwjoAimq6vrCysoGofk+Ph4Esd/F/UdiFtJAGUd2DygTpp5dmBUUJ2dnc9VUALm8PDwJY7/BPU9VD8k3M4RC6kskxZMKigKIMLN9vf3p3H8DyWgfEhEOwOQD9IXOTz7EObbwsLC4YWFBRgeHrY9ECXYo6MjaGlpKWlsbPxkYGDgRW1tbSEWquVlZWXBzc3Nl1VVVa8hXiXc6ioqBqGaPDk7AACJTRZ3NS9lcUp86cJwoSQ7Pj4Op6enfxUXF3/V0NCQv7q6GsCvwrqGUG/01xAD4+VQTOxaSF43d5bBOisrGBJRCtXX17+/trb268rKSgASFgmz97KFkmo6OztWuVyPweiWGc4WRkhFRQVEIpHg8vJyQAIQVlLBROVxvBYQHsXnO8tk62ZcyN0wecLBwcEvYHSzEPscBqOLCRhLC4n9uqaA8UAWAcAKhtbQ3t7eTHl5+Y9gtAp3twhT056CDMQ7MRzIFTeTYKb1yYYVQFH9VdzsqNmYKpfTJBDX3Ixgdnd3XyHMT2AMALJlBBSPaMpNngrIsTyTCgaj288YDGakictrxizvKFNOjgSSBLS+vv6UYHDb7DgMVgsChjTEgCIKGG4ZU+EWkgNBzN1qamq+pAMTExPgFMzW1tZrhHkFyWE5KxgSszx0527RaDRmOSpRshEOU11dPQPG8CwHARHJlMnTSrwSRFIlfXt7m3V5ngJGuJtqzaQtZkFBVNJezN5ZAdmwjKo2k9tVtrcI3OXk4tPgcg7ChCDZ1URgMOu72Xa5VFHOkymQhWVU60YVmjN6wiC7k6p+S1syCACOwJBYFaexV+yhBekNPsMBO6KAEeE4BMaCU67RsoYhSbXgaT//ht709vZCaWmp6YkEbLFmVJWzas04+iBL7EKpm0J7duqu0B7+CTUpNJuyvb1NCfMj1CqI9wLKUOlOUMeG+gGFkHii4HizUF4z/KFUrPsJ8WbEIyx7nnZ0dDynME6BAuce09iFHo+GrnmGltltb2//E4wVAN82y7vOjKOZXSBhJdHNiT3TYWD8OY2PTUJkdd7MkJMnT5wZVQF2RFX6yBMUdzPMvvfqxz3sXHF+GNT9ANXit/10O1sgHkZvdQAOKvs9B5L7ARELGAAXLSTvM8QExTE+YbHe+HURhZp1aRyF4CJXClbbWwGketgkW9VsY+YaiBCVhfgE+XvxRwgZSM4jUVCDZFQ9pytmXR8hUTB2gnidx4XffVWydN0yQjwmx/jkAZJBrIBI5J7ZvQGZWUgVSuU/EqmOAzicKNMVu816DdRWUV1/7xAP8n+SfwF3Du3NF2sYhwAAAABJRU5ErkJggg==",selector="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAZoSURBVHgB7VlLSCRXFL3ljNEhEXTGhMQJmOjCz8ZNVLKICz9xIYhCNi7UgINkGEk2En8hW5cBUQNxo05GAoKikuCAmvGzGMdPcCUGjDPxD/4Vv/3JvWW97luvq7ur+hMZ8MKlqrteNfe8e965970GuLVbC5kpJr53+hjHx9yY3TUxJgLMAQG4ITARfp5T4Mri4uL9q6urnxwOxz/oY5eXl1/Pzs7e195X2FX4jZsIhAK7gx5ps9m6nGj9/f3OtbU1pzAE0318fPwVjYHrrN7R3AjU/wpOBwA9Cmf/9ejoqDMtLU31iooKGdA+ATo4OMiXAEWAHhBAGEApXj4rPAik0vPt7e0vCgoKPH4gMzMTSktLIS8vD2JiYgABvcHMTZyennbHxsaOg3udOJmLzwqEYB0ZgRCZENm4u7e39yQuLq65srISZmZmvP5Ybm4u5OfnQ0lJyXWUCAgzNLS+vt6SnJz8WgvYwV5xSlcRgyVg3ha2Dkxzc3MvfZmVlQW+bGxsDBobGyE7O1u94uJPjIqKqklKSvrbbrfPnp+ff7e8vJwMnlSTKWfJjDKhywJo6wLp0YcZ+dyIUr7s4cOHLsrRlQwBTSBFuzc2NiZYhjjVAIyzZBqEwgCQv0OOM/gNzuiP/ijlDxBRjgClpqa6AF1cXDydmpoaLCws3JcAGYHyC4JMzoKaibKysvienp6FtrY2IA/WCFB5ebkqCHSvARo8Ozt7igIxwIJ2gJ+seFMnDoIyEUV+dHT0G3qWVUr5M043DdAB0m2IKZwAYpgZX+qkywR6NFbuR0iDxmAoZRUQKRxSLTMnJ8eIaqqSeVMnIYUOdu+sq6vrp4f+VCoYo8khZaNs01VRlERUu2/BrWAA7sl2Anink1Ao18JGjyY/PDx8hq1GZqgp5c2mp6chMjLy2b179x7hRzvoqeUUwXIzqq4O5nZsNUaEbIbLqPLTou/s7FTvT05OpsA9sXJG1AVsZDwjutqBIN6gUlWjxod8XRBNKXgsrqpqYZfwEqX9h8TExD7wbFm8LmzxHQ0QHSlXKZVSqFC/hkqlaKapTaGgCQTK7PHW1lb/wsLC86KiokkccoV+qV1tcE0pO7AWxmhTxBszDzqRr66ujqanp2cRpQLNBgUsCh8BwQ54bn5+/s+mpqa+4eHhfS1gb52vwuP0trPjhSZCBtLQ0NA3MDDQQIFYAUHBYhuvzjpVbJr1lZWVP3p7e19UVVXNgHumXYrI4uBx6Yqevz02b0FcRQ8CoBQF3dXVpQLZ3d39C7n+ora29vfJyclDYFnWgFyxK3cxhss/+KoT/N6DVkQpKypFGUCp3Ozo6HgSHx//GLW/BwHsg57zl5pzADajwLn52mPL1ZHPloMoRYPMFL6EhAR18e7s7MxVV1fPsAAp4Avteq7dC/c1+wKI4g+EfGzDM+EYHBw8RDrNiA2QL6upqVGvKJ2/gHu2L1nA5wwEB2YDfSYMO1x/px0cgEc2zBY+eo67u6H29vZ/wU2VC8l58JxKNjDOgojNEp08aFVfX++3l6JMEdDx8fEB0FNIBsDXBc8ArwuW1EkeI1RKdLWmCx+1DhkZGRvR0dFfSsHKxYtnW0iqvJAN9xNm6MR/QO5sfapUSkqKmqW5ubmfwVgyZdpw/vPZl2kUEAinBMSUStG+gwra0NDQSynQKyloIxnlewafjDFLJzLRBJqiFMnqyMgIbG5uDuD996Dnv8iAPOMAPmbcm5lVJwA/vZRMKZGZlpaWVtAvUL4GZMqE1fjRJrUd76LHoX+InlhcXPwZnWW2tra6jjrpiBM3UK/weQr6J+gfodMh9HtwncG7YLA3CMSsLmxx5WuDCt8B7vZeicInTjCWlpb6wc15mfey7oc9E8LElpVmMgb9AXoC+qcTExOPKRu4NlTHs6Q10GfhgfYOvRsJQZ76BWMKuDtaolQs+gfoH6Mn436gDg+e+5BKXUQx/C5Je/a+NpbeiQJPKgUdlNXx/BCBKxVdxW5Q0I3XBqFKRhU4KLtjYawi3csuTKdc4FnIXNvKUJkVEGRG20QZAAUpA5DbaYAQLmQzfzxyk/ffdnCD4NWVnGdE7kQBQvQHC5lVEDxgMaM29lkxGCNLKrDnIbFAMkFmBIaDkHstU41coGZ1TZD5UjReCGUAYbNgdNqoXZB/T67yYbFAMiGML3BhYeH8rb0t9h/zgcTBcTNGiQAAAABJRU5ErkJggg==",eraser="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAgrSURBVHgB7ZprTBRXFIDP7gIt8lQppTwE5V0KaAn6o1pqNGkDDTEmTUhsgKRp+gNJw68CFkLbVC2QkDS+gD8KJdWmARvbFBNNWpuIRGPFWBXQRMPDqIki+KLATs+ZnTvcvXtnX8w2beJJToaduTP3fHPOPffcOwC8kP+2WCDwIvahGFxTuN8KmNSZmULPNjLeqF9F8rdPkIEGEn+r+vjx46LQ0NA8/Dsader58+e/h4WFDWntFO7ot6fMFAt3JLWi2lCDpqamCux2+2+KROj82NhYGrXT2lu5Z/DP/deFByElA4Pv3LlTiHY/nJ6eVnbv3q1s2bJFyc7OVrZu3arU1dUp4+PjxPUQoT+g9tp9PkMFgpo9kxljHRoaWp2Xl3duYmIiurKyEvDoclNCQgIcPnxYPc7MzHwcGRnZhaft4Ag7O9fUbRhaITCie4lgcnNzT7qDIaHz27dvh+vXr0NEREQneqoCHKFnAR+8ZCaQGGq2CxcurCGYycnJZHcwTNAzUFFRoUJFRUV1IFQ5OKBsXB9uxSwgl0TQ3d29Yt26dccwoyVXV1d7hGEiQmGi2AzOUHx/hob4K2yuYS9G987s7OwPISEh7xPM6dOnwVfBsIMjR45AZmbmo5s3b76Xnp7+J55egMVxBSAZT0v1ED+76yn66dOnLQSzd+9ev2BIyFP0MjBco1JTU/sxfFeDazp3cYgZHmKqdoaGNISHh9fv378fSJcqlPV6e3sBJ+I/goOD34VFL0k95Y+HxPHCYGxmw5DQ2NuzZw8EBQVtunXr1jvgwUP+hhz/QDXMMCNVE8zx48dNg2FCz6QQjI2N/RA8VBFmANnu3btXihnpG8pM9fX1EAi5du0aeWkVOAMBCF7yN+R0z4yOjq6NiYlpp9CgdBtIwXpPH6vgDKWLt0CygtM6MDCwBuUYZSKaOCksAiVY9wFOBePgDOOytPAGSKzNVCCC2bBhw69YdK7ypgpYimzbtk2dl7CM+hFcveOUHDylbTFO1YdhFbByx44dA1QFUP0VSJj4+Hjo6+sDq9U6iEmHKvFZTedQ50GYbN15SITVlwNlZWUnLRZL8s6dOwMOQ9UCTtKTra2ttdppt9V2kMF5cbmsjxuM43bMNrmUzc6fP6+GQiDGDoOJi4ubwb4qm5ubafyIE6nLxGqTPEsGo1cBOGNX0TyDYafC0CyOaxcVziyh53Z2dkJycvLMvn37PmpoaBgFR4jxYSbWdVIgI89Iq4CjR48CZjlYv369+tssqI6ODsjPz4f+/v668vLycxrEHHfkYdwC8SB6mGEV8Cl64cuuri5oa2tTG+EyGjZu3AiXLl1qefDgwV8lJSUFZkDV1tZCcXExXLx4sbWoqKgPFj0zx8GI9ZwO5W4M6ekZYeqpaqbqmaSqqkpNpcPDw4dwzfM9nrLduHEjEs+X0XV/Sx96LnqE1kLtBQUF3eDwCO8dGQyzV5rl+JyuegfXI29jRotiRlKnpFghHMzKyjqotVXS0tLacKPjF3bdHxjSq1evduAkepAD+ZsDYlC8V5w8ZBVg+PPq2MGMlkInqE4joTf45MmT4YyMjAPcA+ltLSQlJX2BafxnX6HI29QeK44TOTk57mCYZ0QoJ8OBM4yB6dkNkwGlSygsLFQvYtYB3BTMxFL+M+0eFgZqp4mJiU2+QKGX1fGIk/QIrn0aYXGsyDxjmAyMhO2jhaCGoUbX1NSkLSwsPMJqV8Fspu6lIZS6OYhjiOLwdU7fQM1HfRPD7wS1obZ0j0xpb4726Z49ezaJf2/S7s9ATUGNR41BjdJseRnke3WGwhrRTS9pD1mOGoeG15BxOOfoxuCkp0Ih6NeaEaSZGlieJyiCoc1FgsGldokGk8nBvAKOrWIGQ5uPsm0tt0BWDiicAaGuGhkZ+YqMw9StGzU4OKhCnT179hNsswY1FTXdE5QEJhc1S3tGogazXLOBwQSBl3tzIhQPtAL1VQJCTcNx8y1vHIUghSKFZE9PT7H2dlM1b+Wgrr1y5Uq77J75+fnplpaWMg2ch4nlYEI5z7hdensDpI4hrYNErcMMXJ32koG4ztf3pultz83NjWG99Ra2WQ0OL2VjZjwgeufUqVOqV8+cOdPIwdBLSNJeHg8TAh5WqJ6EfSmgt7IMNRJ1JThiOlnrOAMHshprmMKdoGSCpb9s3B3SYLIFGIqICJB7xisYi+RvfiypXw40DWGdlJaWRmMd141hk8V2OWm7ieYTXhBc3+BgaZyqAISjOYxSMVvXsBTNlzdiNQDgRao2AtK3pjggpmrqbGpqSsLPIN/dv38/gaBwUjTshMHcvn27JyUlpRmc5xpPMD599LIYnLNyUKKndKjGxsakXbt2deMCLIE8IVvs0YRM1fjdu3d/wrXN5+BcnzEgvor2uN3rjzAYMp5lPEoQlE5fA0fWo8GfhlCbKVFQ1pKNIfzcOHH58mWqaimVUwJI0+6n59D4pIlzmdZPMPiZzXjDjX47Le5g0Uu8x2zgPqWyKpjVe7x3+AUbq9NYjQbgp2dsBud5o8TP7d5kHAWcQchQfoEmLgn8HjOiBIF7o5hI1x6CEbLNP3bdqYAF44JzyWLzcN1i8DcT/o3awbm8Fz3DAy2A62INwPV/E3wWdx5inmBHuwChCBD6R2JwHge80TIQRQLjt7e8DTkGZgfX8cUMZTDAteFDkveaIlzjX9ySQs8X18r2t2VHUURPKoICmDR+eCO9aSdmOIub3/w9RgpgUpiJhvraXpa6jZKHGEqyusw0GLFzX+5RhN/8kYnMSNMMfyH/V/kHST6OYVElTPAAAAAASUVORK5CYII=",shape="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDBweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDAgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDYwLjEgKDg4MTMzKSAtIGh0dHBzOi8vc2tldGNoLmNvbSAtLT4KICAgIDx0aXRsZT5zaGFwZS1jdXJzb3I8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz4KICAgICAgICA8cGF0aCBkPSJNMjAsMjEuNSBDMjAuMjQ1NDU5OSwyMS41IDIwLjQ0OTYwODQsMjEuNjc2ODc1MiAyMC40OTE5NDQzLDIxLjkxMDEyNDQgTDIwLjUsMjIgTDIwLjUsMjcgQzIwLjUsMjcuMjc2MTQyNCAyMC4yNzYxNDI0LDI3LjUgMjAsMjcuNSBDMTkuNzU0NTQwMSwyNy41IDE5LjU1MDM5MTYsMjcuMzIzMTI0OCAxOS41MDgwNTU3LDI3LjA4OTg3NTYgTDE5LjUsMjcgTDE5LjUsMjIgQzE5LjUsMjEuNzIzODU3NiAxOS43MjM4NTc2LDIxLjUgMjAsMjEuNSBaIE0yNywxOS41IEMyNy4yNzYxNDI0LDE5LjUgMjcuNSwxOS43MjM4NTc2IDI3LjUsMjAgQzI3LjUsMjAuMjQ1NDU5OSAyNy4zMjMxMjQ4LDIwLjQ0OTYwODQgMjcuMDg5ODc1NiwyMC40OTE5NDQzIEwyNywyMC41IEwyMiwyMC41IEMyMS43MjM4NTc2LDIwLjUgMjEuNSwyMC4yNzYxNDI0IDIxLjUsMjAgQzIxLjUsMTkuNzU0NTQwMSAyMS42NzY4NzUyLDE5LjU1MDM5MTYgMjEuOTEwMTI0NCwxOS41MDgwNTU3IEwyMiwxOS41IEwyNywxOS41IFogTTE4LDE5LjUgQzE4LjI3NjE0MjQsMTkuNSAxOC41LDE5LjcyMzg1NzYgMTguNSwyMCBDMTguNSwyMC4yNDU0NTk5IDE4LjMyMzEyNDgsMjAuNDQ5NjA4NCAxOC4wODk4NzU2LDIwLjQ5MTk0NDMgTDE4LDIwLjUgTDEzLDIwLjUgQzEyLjcyMzg1NzYsMjAuNSAxMi41LDIwLjI3NjE0MjQgMTIuNSwyMCBDMTIuNSwxOS43NTQ1NDAxIDEyLjY3Njg3NTIsMTkuNTUwMzkxNiAxMi45MTAxMjQ0LDE5LjUwODA1NTcgTDEzLDE5LjUgTDE4LDE5LjUgWiBNMjAsMTIuNSBDMjAuMjQ1NDU5OSwxMi41IDIwLjQ0OTYwODQsMTIuNjc2ODc1MiAyMC40OTE5NDQzLDEyLjkxMDEyNDQgTDIwLjUsMTMgTDIwLjUsMTggQzIwLjUsMTguMjc2MTQyNCAyMC4yNzYxNDI0LDE4LjUgMjAsMTguNSBDMTkuNzU0NTQwMSwxOC41IDE5LjU1MDM5MTYsMTguMzIzMTI0OCAxOS41MDgwNTU3LDE4LjA4OTg3NTYgTDE5LjUsMTggTDE5LjUsMTMgQzE5LjUsMTIuNzIzODU3NiAxOS43MjM4NTc2LDEyLjUgMjAsMTIuNSBaIiBpZD0icGF0aC0xIj48L3BhdGg+CiAgICAgICAgPGZpbHRlciB4PSItNjQuNiUiIHk9Ii01OS41JSIgd2lkdGg9IjIyOS4zJSIgaGVpZ2h0PSIyNDYuMSUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0yIj4KICAgICAgICAgICAgPGZlTW9ycGhvbG9neSByYWRpdXM9IjEiIG9wZXJhdG9yPSJkaWxhdGUiIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dTcHJlYWRPdXRlcjEiPjwvZmVNb3JwaG9sb2d5PgogICAgICAgICAgICA8ZmVPZmZzZXQgZHg9IjAiIGR5PSIyIiBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSI+PC9mZU9mZnNldD4KICAgICAgICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIgaW49InNoYWRvd09mZnNldE91dGVyMSIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIj48L2ZlR2F1c3NpYW5CbHVyPgogICAgICAgICAgICA8ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUNvbXBvc2l0ZT4KICAgICAgICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgICAwIDAgMCAwIDAgICAwIDAgMCAwIDAgIDAgMCAwIDAuMTYgMCIgdHlwZT0ibWF0cml4IiBpbj0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUNvbG9yTWF0cml4PgogICAgICAgIDwvZmlsdGVyPgogICAgPC9kZWZzPgogICAgPGcgaWQ9Iumhtemdoi00IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iV2hpdGVib2FyZC1HdWlkZWxpbmVzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzQ0LjAwMDAwMCwgLTc1MS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9InNoYXBlLWN1cnNvciIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzQ0LjAwMDAwMCwgNzUxLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9ouWkh+S7vS00NCIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMC4wMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iMiI+PC9yZWN0PgogICAgICAgICAgICAgICAgPGcgaWQ9IuW9oueKtue7k+WQiCIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgICAgICAgICA8dXNlIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjEiIGZpbHRlcj0idXJsKCNmaWx0ZXItMikiIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIHN0cm9rZT0iI0ZGRkZGRiIgc3Ryb2tlLXdpZHRoPSIxIiBkPSJNMjAsMjEgQzIwLjQ4NTQxMDMsMjEgMjAuODk4MDg1LDIxLjM0Nzk5OTMgMjAuOTg5OTQ3OSwyMS44NjU0ODc3IEwyMSwyMiBMMjEsMjcgQzIxLDI3LjU1MjI4NDcgMjAuNTUyMjg0NywyOCAyMCwyOCBDMTkuNTE0NTg5NywyOCAxOS4xMDE5MTUsMjcuNjUyMDAwNyAxOS4wMTAwNTIxLDI3LjEzNDUxMjMgTDE5LDI3IEwxOSwyMiBDMTksMjEuNDQ3NzE1MyAxOS40NDc3MTUzLDIxIDIwLDIxIFogTTI3LDE5IEMyNy41NTIyODQ3LDE5IDI4LDE5LjQ0NzcxNTMgMjgsMjAgQzI4LDIwLjQ4NTQxMDMgMjcuNjUyMDAwNywyMC44OTgwODUgMjcuMTM0NTEyMywyMC45ODk5NDc5IEwyNywyMSBMMjIsMjEgQzIxLjQ0NzcxNTMsMjEgMjEsMjAuNTUyMjg0NyAyMSwyMCBDMjEsMTkuNTE0NTg5NyAyMS4zNDc5OTkzLDE5LjEwMTkxNSAyMS44NjU0ODc3LDE5LjAxMDA1MjEgTDIyLDE5IEwyNywxOSBaIE0xOCwxOSBDMTguNTUyMjg0NywxOSAxOSwxOS40NDc3MTUzIDE5LDIwIEMxOSwyMC40ODU0MTAzIDE4LjY1MjAwMDcsMjAuODk4MDg1IDE4LjEzNDUxMjMsMjAuOTg5OTQ3OSBMMTgsMjEgTDEzLDIxIEMxMi40NDc3MTUzLDIxIDEyLDIwLjU1MjI4NDcgMTIsMjAgQzEyLDE5LjUxNDU4OTcgMTIuMzQ3OTk5MywxOS4xMDE5MTUgMTIuODY1NDg3NywxOS4wMTAwNTIxIEwxMywxOSBMMTgsMTkgWiBNMjAsMTIgQzIwLjQ4NTQxMDMsMTIgMjAuODk4MDg1LDEyLjM0Nzk5OTMgMjAuOTg5OTQ3OSwxMi44NjU0ODc3IEwyMSwxMyBMMjEsMTggQzIxLDE4LjU1MjI4NDcgMjAuNTUyMjg0NywxOSAyMCwxOSBDMTkuNTE0NTg5NywxOSAxOS4xMDE5MTUsMTguNjUyMDAwNyAxOS4wMTAwNTIxLDE4LjEzNDUxMjMgTDE5LDE4IEwxOSwxMyBDMTksMTIuNDQ3NzE1MyAxOS40NDc3MTUzLDEyIDIwLDEyIFoiIGZpbGw9IiMyMTIzMjQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgZmlsbD0iI0ZGRkZGRiIgeD0iMTguNSIgeT0iMTciIHdpZHRoPSIzIiBoZWlnaHQ9IjYiPjwvcmVjdD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaIiIGZpbGw9IiNGRkZGRkYiIHg9IjE3IiB5PSIxOC41IiB3aWR0aD0iNiIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjAsMjEuNSBDMjAuMjQ1NDU5OSwyMS41IDIwLjQ0OTYwODQsMjEuNjc2ODc1MiAyMC40OTE5NDQzLDIxLjkxMDEyNDQgTDIwLjUsMjIgTDIwLjUsMjcgQzIwLjUsMjcuMjc2MTQyNCAyMC4yNzYxNDI0LDI3LjUgMjAsMjcuNSBDMTkuNzU0NTQwMSwyNy41IDE5LjU1MDM5MTYsMjcuMzIzMTI0OCAxOS41MDgwNTU3LDI3LjA4OTg3NTYgTDE5LjUsMjcgTDE5LjUsMjIgQzE5LjUsMjEuNzIzODU3NiAxOS43MjM4NTc2LDIxLjUgMjAsMjEuNSBaIE0yNywxOS41IEMyNy4yNzYxNDI0LDE5LjUgMjcuNSwxOS43MjM4NTc2IDI3LjUsMjAgQzI3LjUsMjAuMjQ1NDU5OSAyNy4zMjMxMjQ4LDIwLjQ0OTYwODQgMjcuMDg5ODc1NiwyMC40OTE5NDQzIEwyNywyMC41IEwyMiwyMC41IEMyMS43MjM4NTc2LDIwLjUgMjEuNSwyMC4yNzYxNDI0IDIxLjUsMjAgQzIxLjUsMTkuNzU0NTQwMSAyMS42NzY4NzUyLDE5LjU1MDM5MTYgMjEuOTEwMTI0NCwxOS41MDgwNTU3IEwyMiwxOS41IEwyNywxOS41IFogTTE4LDE5LjUgQzE4LjI3NjE0MjQsMTkuNSAxOC41LDE5LjcyMzg1NzYgMTguNSwyMCBDMTguNSwyMC4yNDU0NTk5IDE4LjMyMzEyNDgsMjAuNDQ5NjA4NCAxOC4wODk4NzU2LDIwLjQ5MTk0NDMgTDE4LDIwLjUgTDEzLDIwLjUgQzEyLjcyMzg1NzYsMjAuNSAxMi41LDIwLjI3NjE0MjQgMTIuNSwyMCBDMTIuNSwxOS43NTQ1NDAxIDEyLjY3Njg3NTIsMTkuNTUwMzkxNiAxMi45MTAxMjQ0LDE5LjUwODA1NTcgTDEzLDE5LjUgTDE4LDE5LjUgWiBNMjAsMTIuNSBDMjAuMjQ1NDU5OSwxMi41IDIwLjQ0OTYwODQsMTIuNjc2ODc1MiAyMC40OTE5NDQzLDEyLjkxMDEyNDQgTDIwLjUsMTMgTDIwLjUsMTggQzIwLjUsMTguMjc2MTQyNCAyMC4yNzYxNDI0LDE4LjUgMjAsMTguNSBDMTkuNzU0NTQwMSwxOC41IDE5LjU1MDM5MTYsMTguMzIzMTI0OCAxOS41MDgwNTU3LDE4LjA4OTg3NTYgTDE5LjUsMTggTDE5LjUsMTMgQzE5LjUsMTIuNzIzODU3NiAxOS43MjM4NTc2LDEyLjUgMjAsMTIuNSBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjMjEyMzI0IiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",text="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNDdweCIgaGVpZ2h0PSI0MHB4IiB2aWV3Qm94PSIwIDAgNDcgNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDYwLjEgKDg4MTMzKSAtIGh0dHBzOi8vc2tldGNoLmNvbSAtLT4KICAgIDx0aXRsZT50ZXh0LWN1cnNvcjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxwYXRoIGQ9Ik0xNiwyNi41IEMxNS43MjM4NTc2LDI2LjUgMTUuNSwyNi4yNzYxNDI0IDE1LjUsMjYgQzE1LjUsMjUuNzU0NTQwMSAxNS42NzY4NzUyLDI1LjU1MDM5MTYgMTUuOTEwMTI0NCwyNS41MDgwNTU3IEwxNiwyNS41IEwxOS41LDI1LjUgTDE5LjUsMTQuNSBMMTYsMTQuNSBDMTUuNzIzODU3NiwxNC41IDE1LjUsMTQuMjc2MTQyNCAxNS41LDE0IEMxNS41LDEzLjc1NDU0MDEgMTUuNjc2ODc1MiwxMy41NTAzOTE2IDE1LjkxMDEyNDQsMTMuNTA4MDU1NyBMMTYsMTMuNSBMMjQsMTMuNSBDMjQuMjc2MTQyNCwxMy41IDI0LjUsMTMuNzIzODU3NiAyNC41LDE0IEMyNC41LDE0LjI0NTQ1OTkgMjQuMzIzMTI0OCwxNC40NDk2MDg0IDI0LjA4OTg3NTYsMTQuNDkxOTQ0MyBMMjQsMTQuNSBMMjAuNSwxNC41IEwyMC41LDI1LjUgTDI0LDI1LjUgQzI0LjI3NjE0MjQsMjUuNSAyNC41LDI1LjcyMzg1NzYgMjQuNSwyNiBDMjQuNSwyNi4yNDU0NTk5IDI0LjMyMzEyNDgsMjYuNDQ5NjA4NCAyNC4wODk4NzU2LDI2LjQ5MTk0NDMgTDI0LDI2LjUgTDE2LDI2LjUgWiIgaWQ9InBhdGgtMSI+PC9wYXRoPgogICAgICAgIDxmaWx0ZXIgeD0iLTI4NC4wJSIgeT0iLTgxLjUlIiB3aWR0aD0iNjY4LjElIiBoZWlnaHQ9IjI5My45JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0iZmlsdGVyLTIiPgogICAgICAgICAgICA8ZmVNb3JwaG9sb2d5IHJhZGl1cz0iMSIgb3BlcmF0b3I9ImRpbGF0ZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSI+PC9mZU1vcnBob2xvZ3k+CiAgICAgICAgICAgIDxmZU9mZnNldCBkeD0iMCIgZHk9IjIiIGluPSJzaGFkb3dTcHJlYWRPdXRlcjEiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIj48L2ZlT2Zmc2V0PgogICAgICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVHYXVzc2lhbkJsdXI+CiAgICAgICAgICAgIDxmZUNvbXBvc2l0ZSBpbj0ic2hhZG93Qmx1ck91dGVyMSIgaW4yPSJTb3VyY2VBbHBoYSIgb3BlcmF0b3I9Im91dCIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIj48L2ZlQ29tcG9zaXRlPgogICAgICAgICAgICA8ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgMCAwIDAgMC4xNiAwIiB0eXBlPSJtYXRyaXgiIGluPSJzaGFkb3dCbHVyT3V0ZXIxIj48L2ZlQ29sb3JNYXRyaXg+CiAgICAgICAgPC9maWx0ZXI+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0i6aG16Z2iLTQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJXaGl0ZWJvYXJkLUd1aWRlbGluZXMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zODguMDAwMDAwLCAtNjcyLjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0idGV4dC1jdXJzb3IiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDM5Mi4wMDAwMDAsIDY3Mi4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSLnn6nlvaLlpIfku70tNDAiIGZpbGw9IiNGRkZGRkYiIG9wYWNpdHk9IjAuMDEiIHg9IjAiIHk9IjAiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcng9IjIiPjwvcmVjdD4KICAgICAgICAgICAgICAgIDxnIGlkPSLlvaLnirbnu5PlkIgiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgICAgICAgICAgPHVzZSBmaWxsPSJibGFjayIgZmlsbC1vcGFjaXR5PSIxIiBmaWx0ZXI9InVybCgjZmlsdGVyLTIpIiB4bGluazpocmVmPSIjcGF0aC0xIj48L3VzZT4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBzdHJva2U9IiNGRkZGRkYiIHN0cm9rZS13aWR0aD0iMSIgZD0iTTE5LDI1IEwxOSwxNSBMMTYsMTUgQzE1LjQ0NzcxNTMsMTUgMTUsMTQuNTUyMjg0NyAxNSwxNCBDMTUsMTMuNTE0NTg5NyAxNS4zNDc5OTkzLDEzLjEwMTkxNSAxNS44NjU0ODc3LDEzLjAxMDA1MjEgTDE2LDEzIEwyNCwxMyBDMjQuNTUyMjg0NywxMyAyNSwxMy40NDc3MTUzIDI1LDE0IEMyNSwxNC40ODU0MTAzIDI0LjY1MjAwMDcsMTQuODk4MDg1IDI0LjEzNDUxMjMsMTQuOTg5OTQ3OSBMMjQsMTUgTDIxLDE1IEwyMSwyNSBMMjQsMjUgQzI0LjU1MjI4NDcsMjUgMjUsMjUuNDQ3NzE1MyAyNSwyNiBDMjUsMjYuNDg1NDEwMyAyNC42NTIwMDA3LDI2Ljg5ODA4NSAyNC4xMzQ1MTIzLDI2Ljk4OTk0NzkgTDI0LDI3IEwxNiwyNyBDMTUuNDQ3NzE1MywyNyAxNSwyNi41NTIyODQ3IDE1LDI2IEMxNSwyNS41MTQ1ODk3IDE1LjM0Nzk5OTMsMjUuMTAxOTE1IDE1Ljg2NTQ4NzcsMjUuMDEwMDUyMSBMMTYsMjUgTDE5LDI1IFoiIGZpbGw9IiMyMTIzMjQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PC9wYXRoPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=",laser="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjhweCIgaGVpZ2h0PSIyOHB4IiB2aWV3Qm94PSIwIDAgMjggMjgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU1LjEgKDc4MTM2KSAtIGh0dHBzOi8vc2tldGNoYXBwLmNvbSAtLT4KICAgIDx0aXRsZT7nvJbnu4QgMjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPgogICAgICAgIDxmaWx0ZXIgeD0iLTEyMC4wJSIgeT0iLTEyMC4wJSIgd2lkdGg9IjM0MC4wJSIgaGVpZ2h0PSIzNDAuMCUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0xIj4KICAgICAgICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iNCIgaW49IlNvdXJjZUdyYXBoaWMiPjwvZmVHYXVzc2lhbkJsdXI+CiAgICAgICAgPC9maWx0ZXI+CiAgICA8L2RlZnM+CiAgICA8ZyBpZD0i6aG16Z2iMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Iue8lue7hC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgOS4wMDAwMDApIiBmaWxsPSIjRkYwMTAwIj4KICAgICAgICAgICAgPGNpcmNsZSBpZD0i5qSt5ZyG5b2iIiBmaWx0ZXI9InVybCgjZmlsdGVyLTEpIiBjeD0iNSIgY3k9IjUiIHI9IjUiPjwvY2lyY2xlPgogICAgICAgICAgICA8cGF0aCBkPSJNNSw4IEM2LjY1Njg1NDI1LDggOCw2LjY1Njg1NDI1IDgsNSBDOCwzLjM0MzE0NTc1IDYuNjU2ODU0MjUsMiA1LDIgQzMuMzQzMTQ1NzUsMiAyLDMuMzQzMTQ1NzUgMiw1IEMyLDYuNjU2ODU0MjUgMy4zNDMxNDU3NSw4IDUsOCBaIE01LDYuMjg1NzE0MjkgQzQuMjg5OTE5NjEsNi4yODU3MTQyOSAzLjcxNDI4NTcxLDUuNzEwMDgwMzkgMy43MTQyODU3MSw1IEMzLjcxNDI4NTcxLDQuMjg5OTE5NjEgNC4yODk5MTk2MSwzLjcxNDI4NTcxIDUsMy43MTQyODU3MSBDNS43MTAwODAzOSwzLjcxNDI4NTcxIDYuMjg1NzE0MjksNC4yODk5MTk2MSA2LjI4NTcxNDI5LDUgQzYuMjg1NzE0MjksNS43MTAwODAzOSA1LjcxMDA4MDM5LDYuMjg1NzE0MjkgNSw2LjI4NTcxNDI5IFoiIGlkPSLmpK3lnIblvaIiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",pencilEraser1="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAxOCAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIxNyIgaGVpZ2h0PSIyNSIgcng9IjMuNSIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC4zNSIgc3Ryb2tlPSJ3aGl0ZSIvPgo8L3N2Zz4K",pencilEraser2="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAyNiAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIyNSIgaGVpZ2h0PSIzMyIgcng9IjMuNSIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC4zNSIgc3Ryb2tlPSJ3aGl0ZSIvPgo8L3N2Zz4K",pencilEraser3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iNTAiIHZpZXdCb3g9IjAgMCAzNCA1MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIzMyIgaGVpZ2h0PSI0OSIgcng9IjMuNSIgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMC4zNSIgc3Ryb2tlPSJ3aGl0ZSIvPgo8L3N2Zz4K";const ApplianceMap={[whiteWebSdkExports.ApplianceNames.pencil]:pencil,[whiteWebSdkExports.ApplianceNames.selector]:selector,[whiteWebSdkExports.ApplianceNames.eraser]:eraser,[whiteWebSdkExports.ApplianceNames.shape]:shape,[whiteWebSdkExports.ApplianceNames.text]:text,[whiteWebSdkExports.ApplianceNames.laserPointer]:laser,pencilEraser1,pencilEraser2,pencilEraser3},LocalCursorSideEffectId="local-cursor";class CursorManager{constructor(_e,tt,rt,nt){var st;this.manager=_e,this.enableCursor=tt,this.cursorInstances=new Map,this.userApplianceIcons={},this.sideEffectManager=new o$2,this.store=this.manager.store,this.leaveFlag=!0,this._style="default",this.onCursorMove=ht=>{const mt=this.initCursorInstance(ht.uid);if(ht.state===CursorState.Leave)mt.leave();else{const bt=mt.updateMember();this.canMoveCursor(bt)&&mt.move(ht.position)}},this.initCursorInstance=ht=>{let mt=this.cursorInstances.get(ht);return mt||(mt=new Cursor(this.manager,ht,this,WindowManager.wrapper),this.cursorInstances.set(ht,mt)),mt},this.mouseMoveListener_=(ht,mt)=>{const bt=this.getType(ht);this.updateCursor(bt,ht.clientX,ht.clientY),mt&&this.showPencilEraserIfNeeded(bt,ht.clientX,ht.clientY)},this.mouseMoveTimer=0,this.mouseMoveListener=ht=>{const mt=ht.pointerType==="touch";if(mt&&!ht.isPrimary)return;const bt=Date.now();if(bt-this.mouseMoveTimer>48){if(this.mouseMoveTimer=bt,WindowManager.supportAppliancePlugin&&whiteWebSdkExports.isRoom(WindowManager.displayer)&&WindowManager.displayer.disableDeviceInputs){this.leaveFlag&&(this.manager.dispatchInternalEvent(Events.CursorMove,{uid:this.manager.uid,state:CursorState.Leave}),this.leaveFlag=!1);return}this.mouseMoveListener_(ht,mt),this.leaveFlag=!0}},this.mouseLeaveListener=()=>{this.hideCursor(this.manager.uid)},this.getPoint=(ht,mt,bt)=>{var St;const Et=(St=ht?.divElement)==null?void 0:St.getBoundingClientRect();if(Et)return ht?.convertToPointInWorld({x:mt-Et.x,y:bt-Et.y})},this.getType=ht=>{var mt;const bt=ht.target,St=this.manager.focusApp;switch(bt.parentElement){case this.mainViewElement:return{type:"main"};case((mt=St?.view)==null?void 0:mt.divElement):return{type:"app"};default:return{type:"main"}}},this.roomMembers=(st=this.manager.room)==null?void 0:st.state.roomMembers;const dt=WindowManager.wrapper;dt&&this.setupWrapper(dt),this.sideEffectManager.add(()=>internalEmitter.on("cursorMove",this.onCursorMove)),this.sideEffectManager.add(()=>internalEmitter.on("playgroundSizeChange",()=>this.updateContainerRect()));const ft=this.manager.room;ft&&this.sideEffectManager.add(()=>{const ht=mt=>{this.style==="custom"&&mt.memberState&&this.enableCustomCursor()};return ft.callbacks.on("onRoomStateChanged",ht),()=>ft.callbacks.off("onRoomStateChanged",ht)}),nt&&(this.userApplianceIcons=nt),this.style=rt?.style||"default"}get applianceIcons(){return{...ApplianceMap,...this.userApplianceIcons}}get style(){return this._style}set style(_e){this._style!==_e&&(this._style=_e,this.cursorInstances.forEach(tt=>{tt.setStyle(_e)}),_e==="custom"?this.enableCustomCursor():this.sideEffectManager.flush(LocalCursorSideEffectId))}enableCustomCursor(){this.sideEffectManager.add(()=>enableLocal(this.manager.getMemberState()),LocalCursorSideEffectId)}canMoveCursor(_e){const tt=_e?.memberState.currentApplianceName===whiteWebSdkExports.ApplianceNames.laserPointer;return this.enableCursor||tt}setupWrapper(_e){this.sideEffectManager.add(()=>(_e.addEventListener("pointerenter",this.mouseMoveListener),_e.addEventListener("pointermove",this.mouseMoveListener),_e.addEventListener("pointerleave",this.mouseLeaveListener),()=>{_e.removeEventListener("pointerenter",this.mouseMoveListener),_e.removeEventListener("pointermove",this.mouseMoveListener),_e.removeEventListener("pointerleave",this.mouseLeaveListener)})),this.wrapperRect=_e.getBoundingClientRect()}setMainViewDivElement(_e){this.mainViewElement=_e}get boxState(){return this.store.getBoxState()}get focusView(){var _e;return(_e=this.manager.focusApp)==null?void 0:_e.view}showPencilEraserIfNeeded(_e,tt,rt){const nt=findMemberByUid(this.manager.room,this.manager.uid),st=nt?.memberState.currentApplianceName===whiteWebSdkExports.ApplianceNames.pencilEraser;if(this.wrapperRect&&this.manager.canOperate&&this.canMoveCursor(nt)&&st){const dt=_e.type==="main"?this.manager.mainView:this.focusView,ft=this.getPoint(dt,tt,rt);ft&&this.onCursorMove({uid:this.manager.uid,position:{x:ft.x,y:ft.y,type:_e.type}})}}updateCursor(_e,tt,rt){const nt=findMemberByUid(this.manager.room,this.manager.uid);if(this.wrapperRect&&this.manager.canOperate&&this.canMoveCursor(nt)){const st=_e.type==="main"?this.manager.mainView:this.focusView,dt=this.getPoint(st,tt,rt);dt&&this.manager.dispatchInternalEvent(Events.CursorMove,{uid:this.manager.uid,position:{x:dt.x,y:dt.y,type:_e.type}})}}updateContainerRect(){var _e,tt;this.containerRect=(_e=WindowManager.container)==null?void 0:_e.getBoundingClientRect(),this.wrapperRect=(tt=WindowManager.wrapper)==null?void 0:tt.getBoundingClientRect()}deleteCursor(_e){this.store.cleanCursor(_e);const tt=this.cursorInstances.get(_e);tt&&tt.destroy()}hideCursor(_e){const tt=this.cursorInstances.get(_e);tt&&tt.hide()}destroy(){this.sideEffectManager.flushAll(),this.cursorInstances.size&&(this.cursorInstances.forEach(_e=>{_e.destroy()}),this.cursorInstances.clear())}}CursorManager.kind="CursorManager";function getExtendClass$1(et,_e){if(et.kind&&_e&&Object.keys(_e).includes(et.kind))switch(et.kind){case"AppManager":return _e?.AppManager||AppManager;case"BoxManager":return _e?.BoxManager||BoxManager;case"AttributesDelegate":return _e?.AttributesDelegate||AttributesDelegate;case"CursorManager":return _e?.CursorManager||CursorManager;case"AppProxy":return _e?.AppProxy||AppProxy;case"AppContext":return _e?.AppContext||AppContext;case"TeleBoxManager":return _e?.TeleBoxManager||TeleBoxManager;case"TeleBoxCollector":return _e?.TeleBoxCollector||TeleBoxCollector;default:return et}return et}var Fields=(et=>(et.Apps="apps",et.Focus="focus",et.State="state",et.BoxState="boxState",et.MainViewCamera="mainViewCamera",et.MainViewSize="mainViewSize",et.Broadcaster="broadcaster",et.Cursors="cursors",et.Position="position",et.CursorState="cursorState",et.FullPath="fullPath",et.Registered="registered",et.IframeBridge="iframeBridge",et.BoxesStatus="boxesStatus",et.LastNotMinimizedBoxesStatus="lastNotMinimizedBoxesStatus",et))(Fields||{});class AttributesDelegate{constructor(_e){this.context=_e,this.setAppFocus=(tt,rt)=>{rt?this.context.safeSetAttributes({focus:tt}):this.context.safeSetAttributes({focus:void 0})}}setContext(_e){this.context=_e}get attributes(){return this.context.getAttributes()}apps(){return lodashExports.get(this.attributes,["apps"])}get focus(){return lodashExports.get(this.attributes,["focus"])}getAppAttributes(_e){return lodashExports.get(this.apps(),[_e])}getAppState(_e){return lodashExports.get(this.apps(),[_e,"state"])}getMaximized(){return lodashExports.get(this.attributes,["maximized"])}getMinimized(){return lodashExports.get(this.attributes,["minimized"])}getBoxesStatus(){return lodashExports.get(this.attributes,["boxesStatus"])}getBoxStatus(_e){return lodashExports.get(this.attributes,["boxesStatus",_e])}setBoxStatus(_e,tt){this.attributes.boxesStatus||this.context.safeSetAttributes({boxesStatus:{}}),this.getBoxStatus(_e)!==tt&&this.context.safeUpdateAttributes(["boxesStatus",_e],tt)}getLastNotMinimizedBoxesStatus(){return lodashExports.get(this.attributes,["lastNotMinimizedBoxesStatus"])}getLastNotMinimizedBoxStatus(_e){return lodashExports.get(this.attributes,["lastNotMinimizedBoxesStatus",_e])}setLastNotMinimizedBoxStatus(_e,tt){this.attributes.lastNotMinimizedBoxesStatus||this.context.safeSetAttributes({lastNotMinimizedBoxesStatus:{}}),this.getLastNotMinimizedBoxStatus(_e)!==tt&&this.context.safeUpdateAttributes(["lastNotMinimizedBoxesStatus",_e],tt)}setupAppAttributes(_e,tt,rt){this.attributes.apps||this.context.safeSetAttributes({apps:{}});const st=["scenePath","title"];rt||st.push("scenes");const dt=lodashExports.pick(_e.options,st),ft={kind:_e.kind,options:dt,isDynamicPPT:rt,forceTop:_e.forceTop,forceNormal:_e.forceNormal,isDragContent:_e.isDragContent};typeof _e.src=="string"&&(ft.src=_e.src),ft.createdAt=Date.now(),this.context.safeUpdateAttributes(["apps",tt],ft),this.context.safeUpdateAttributes(["apps",tt,"state"],{[AppAttributes.Size]:{},[AppAttributes.Position]:{},[AppAttributes.SceneIndex]:0})}updateAppState(_e,tt,rt){lodashExports.get(this.attributes,["apps",_e,"state"])&&this.context.safeUpdateAttributes(["apps",_e,"state",tt],rt)}cleanAppAttributes(_e){this.context.safeUpdateAttributes(["apps",_e],void 0),this.context.safeSetAttributes({[_e]:void 0}),this.attributes.focus===_e&&this.cleanFocus()}cleanFocus(){this.context.safeSetAttributes({focus:void 0})}getAppSceneIndex(_e){var tt;return(tt=this.getAppState(_e))==null?void 0:tt[AppAttributes.SceneIndex]}getAppScenePath(_e){var tt,rt;return(rt=(tt=this.getAppAttributes(_e))==null?void 0:tt.options)==null?void 0:rt.scenePath}getMainViewScenePath(){return this.attributes._mainScenePath}getMainViewSceneIndex(){return this.attributes._mainSceneIndex}getBoxState(){return this.attributes.boxState}setMainViewScenePath(_e){this.context.safeSetAttributes({_mainScenePath:_e})}setMainViewSceneIndex(_e){this.context.safeSetAttributes({_mainSceneIndex:_e})}getMainViewCamera(){return lodashExports.get(this.attributes,["mainViewCamera"])}getMainViewSize(){return lodashExports.get(this.attributes,["mainViewSize"])}setMainViewCamera(_e){this.context.safeSetAttributes({mainViewCamera:{..._e}})}setMainViewSize(_e){_e.width===0||_e.height===0||this.context.safeSetAttributes({mainViewSize:{..._e}})}setMainViewCameraAndSize(_e,tt){tt.width===0||tt.height===0||this.context.safeSetAttributes({mainViewCamera:{..._e},mainViewSize:{...tt}})}updateCursor(_e,tt){lodashExports.get(this.attributes,["cursors"])||this.context.safeUpdateAttributes(["cursors"],{}),lodashExports.get(this.attributes,["cursors",_e])||this.context.safeUpdateAttributes(["cursors",_e],{}),this.context.safeUpdateAttributes(["cursors",_e,"position"],tt)}updateCursorState(_e,tt){lodashExports.get(this.attributes,["cursors",_e])||this.context.safeUpdateAttributes(["cursors",_e],{}),this.context.safeUpdateAttributes(["cursors",_e,"cursorState"],tt)}getCursorState(_e){return lodashExports.get(this.attributes,["cursors",_e,"cursorState"])}cleanCursor(_e){this.context.safeUpdateAttributes(["cursors",_e],void 0)}setMainViewFocusPath(_e){const tt=this.getMainViewScenePath();tt&&setViewFocusScenePath(_e,tt)}getIframeBridge(){return lodashExports.get(this.attributes,["iframeBridge"])}setIframeBridge(_e){if(lodashExports.isObject(_e)){const tt=this.getIframeBridge();for(const rt in _e){const nt=_e[rt];tt[rt]!==nt&&this.context.safeUpdateAttributes(["iframeBridge",rt],nt)}}}}AttributesDelegate.kind="AttributesDelegate";const createAttributesDelegate=(et,_e={getAttributes:()=>{throw new Error("getAttributes not implemented")},safeSetAttributes:()=>{throw new Error("safeSetAttributes not implemented")},safeUpdateAttributes:()=>{throw new Error("safeUpdateAttributes not implemented")}})=>{const tt=getExtendClass$1(AttributesDelegate,et);return new tt(_e)},calculateNextIndex=(et,_e)=>{let tt=0;const rt=_e.length-1;return et===_e.index?et===rt?tt=et-1:tt=_e.index+1:tt=_e.index,tt},boxEmitter=new Emittery,_AppProxy=class{constructor(et,_e,tt,rt){var nt;this.params=et,this.manager=_e,this.boxManager=this.manager.boxManager,this.appProxies=this.manager.appProxies,this.viewManager=this.manager.viewManager,this.store=this.manager.store,this.status="normal",this.getAppInitState=st=>{var dt,ft,ht,mt;const bt=this.store.getAppState(st);if(!bt)return;const St=bt?.[AppAttributes.Position],Et=this.store.focus,Ct=bt?.[AppAttributes.Size],Rt=bt?.[AppAttributes.SceneIndex],Tt=(dt=this.attributes)==null?void 0:dt.maximized,wt=(ft=this.attributes)==null?void 0:ft.minimized,At=(ht=this.store.getBoxStatus(st))!=null?ht:void 0,Nt=(mt=this.store.getLastNotMinimizedBoxStatus(st))!=null?mt:void 0,{forceTop:Pt,forceNormal:It,isDragContent:Ft}=this.store.getAppAttributes(st),qt=bt?.zIndex;let Vt={maximized:Tt,minimized:wt,zIndex:qt};return St&&(Vt={...Vt,id:st,x:St.x,y:St.y}),Et===st&&(Vt={...Vt,focus:!0}),Ct&&(Vt={...Vt,width:Ct.width,height:Ct.height}),Rt&&(Vt={...Vt,sceneIndex:Rt}),At&&(Vt={...Vt,boxStatus:At}),Nt&&(Vt={...Vt,lastNotMinimizedBoxStatus:Nt}),Pt&&(Vt={...Vt,forceTop:Pt}),It&&(Vt={...Vt,forceNormal:It}),Ft&&(Vt={...Vt,isDragContent:Ft}),Vt},this.appAttributesUpdateListener=st=>{this.manager.refresher.add(st,()=>whiteWebSdkExports.autorun(()=>{const dt=this.manager.attributes[st];dt&&this.appEmitter.emit("attributesUpdate",dt)})),this.manager.refresher.add(this.stateKey,()=>whiteWebSdkExports.autorun(()=>{var dt,ft,ht,mt;const bt=(dt=this.appAttributes)==null?void 0:dt.state;bt?.zIndex>0&&bt.zIndex!==((ft=this.box)==null?void 0:ft.zIndex)&&((ht=this.boxManager)==null||ht.setZIndex(st,bt.zIndex),(mt=this.boxManager)==null||mt.focusBox({appId:st}))})),this.manager.refresher.add(`${st}-fullPath`,()=>whiteWebSdkExports.autorun(()=>{var dt;const ft=(dt=this.appAttributes)==null?void 0:dt.fullPath;this.setFocusScenePathHandler(ft),this._prevFullPath!==ft&&(this.notifyPageStateChange(),this._prevFullPath=ft)}))},this.setFocusScenePathHandler=lodashExports.debounce(st=>{var dt;this.view&&st&&st!==((dt=this.view)==null?void 0:dt.focusScenePath)&&(setViewFocusScenePath(this.view,st),callbacks$1.emit("onAppScenePathChange",{appId:this.id,view:this.view}))},50),this.notifyPageStateChange=lodashExports.debounce(()=>{this.appEmitter.emit("pageStateChange",this.pageState)},50),this.notifyBoxStatusChange=st=>{this.appEmitter.emit("boxStatusChange",{appId:this.id,status:st})},this.kind=et.kind,this.id=tt,this.stateKey=`${this.id}_state`,this.appProxies.set(this.id,this),this.appEmitter=new Emittery,this.appListener=this.makeAppEventListener(this.id),this.isAddApp=rt,this.initScenes(),(nt=this.params.options)!=null&&nt.scenePath&&this.createView(),this._pageState=new AppPageStateImpl({displayer:this.manager.displayer,scenePath:this.scenePath,view:this.view,notifyPageStateChange:this.notifyPageStateChange})}initScenes(){var et;const _e=this.params.options;_e&&(this.scenePath=_e.scenePath,(et=this.appAttributes)!=null&&et.isDynamicPPT&&this.scenePath?this.scenes=entireScenes(this.manager.displayer)[this.scenePath]:this.scenes=_e.scenes)}get view(){return this.manager.viewManager.getView(this.id)}get viewIndex(){var et;return(et=this.view)==null?void 0:et.focusSceneIndex}get isWritable(){var et;return this.manager.canOperate&&!((et=this.box)!=null&&et.readonly)}get attributes(){return this.manager.attributes[this.id]}get appAttributes(){return this.store.getAppAttributes(this.id)}getFullScenePath(){if(this.scenePath)return lodashExports.get(this.appAttributes,[Fields.FullPath])||this.getFullScenePathFromScenes()}getFullScenePathFromScenes(){const et=lodashExports.get(this.appAttributes,["state","SceneIndex"],0),_e=getScenePath(this.manager.room,this.scenePath,et);return _e&&this.setFullPath(_e),_e}setFullPath(et){this.manager.safeUpdateAttributes(["apps",this.id,Fields.FullPath],et)}async baseInsertApp(et=!1){var _e;const tt=this.params;if(!tt.kind)throw new Error("[WindowManager]: kind require");const rt=await((_e=appRegister.appClasses.get(tt.kind))==null?void 0:_e()),nt=appRegister.registered.get(tt.kind);if(rt)await this.setupApp(this.id,et,rt,tt.options,nt?.appOptions,this.manager.useBoxesStatus?TELE_BOX_STATE.Normal:void 0,tt.forceTop,tt.forceNormal,tt.isDragContent);else throw new Error(`[WindowManager]: app load failed ${tt.kind} ${tt.src}`);return internalEmitter.emit("updateManagerRect"),{appId:this.id,app:rt}}get box(){var et;return(et=this.boxManager)==null?void 0:et.getBox(this.id)}async setupApp(et,_e,tt,rt,nt,st,dt,ft,ht){var mt;if(log$1("setupApp",et,tt,rt,st,dt,ft,ht),!this.boxManager)throw new BoxManagerNotFoundError;const bt=getExtendClass$1(AppContext,WindowManager.extendClass),St=new bt(this.manager,this.boxManager,et,this,nt);this.appContext=St;try{internalEmitter.once(`${et}${Events.WindowCreated}`).then(async()=>{var Et;let Ct;_e||(Ct=this.getAppInitState(et),(Et=this.boxManager)==null||Et.updateBoxState(Ct)),this.appEmitter.onAny(this.appListener),this.appAttributesUpdateListener(et),this.setViewFocusScenePath();let Rt;this.manager.isReplay&&(Rt=this.manager.mainView.scenePath),setTimeout(async()=>{console.log("setup app",tt);const Tt=await tt.setup(St);this.appResult=Tt,appRegister.notifyApp(this.kind,"created",{appId:et,result:Tt}),this.afterSetupApp(Ct),this.fixMobileSize(),Rt&&this.manager.mainViewProxy.setFocusScenePath(Rt),callbacks$1.emit("onAppSetup",et)},SETUP_APP_DELAY)}),(mt=this.boxManager)==null||mt.createBox({appId:et,app:tt,options:rt,canOperate:this.manager.canOperate,smartPosition:this.isAddApp,boxStatus:st,forceTop:dt,forceNormal:ft,isDragContent:ht}),this.isAddApp&&this.box&&(st&&this.store.setBoxStatus(et,st),this.store.updateAppState(et,AppAttributes.ZIndex,this.box.zIndex),this.store.updateAppState(et,AppAttributes.Size,{width:this.box.intrinsicWidth,height:this.box.intrinsicHeight}),this.boxManager.focusBox({appId:et},!1))}catch(Et){throw console.error(Et),new Error(`[WindowManager]: app setup error: ${Et.message}`)}}fixMobileSize(){var et,_e;const tt=(et=this.boxManager)==null?void 0:et.getBox(this.id);tt&&((_e=this.boxManager)==null||_e.resizeBox({appId:this.id,width:tt.intrinsicWidth+.001,height:tt.intrinsicHeight+.001,skipUpdate:!0}))}afterSetupApp(et){var _e;et&&(!et?.x||!et.y)&&((_e=this.boxManager)==null||_e.setBoxInitState(this.id))}async onSeek(et){var _e;this.appEmitter.emit("seek",et).catch(rt=>{console.log(`[WindowManager]: emit seek error: ${rt.message}`)});const tt=this.getAppInitState(this.id);(_e=this.boxManager)==null||_e.updateBoxState(tt)}async onReconnected(){var et;if(!!!this.manager.attributes.apps[this.id]){await this.destroy(!0,!1,!0);return}this.appEmitter.emit("reconnected",void 0);const tt=this.getAppInitState(this.id);await this.destroy(!0,!1,!0);const rt=this.params,nt=getExtendClass$1(_AppProxy,WindowManager.extendClass);await new nt(rt,this.manager,this.id,this.isAddApp).baseInsertApp(!0),(et=this.boxManager)==null||et.updateBoxState(tt)}async onRemoveScene(et){if(this.scenePath&&et.startsWith(this.scenePath+"/")){let _e=this.pageState.index,tt=this._pageState.getFullPath(_e);tt||(_e=0,tt=this._pageState.getFullPath(_e)),tt&&this.setFullPath(tt),this.setViewFocusScenePath(),this.view&&(this.view.focusSceneIndex=_e)}}emitAppSceneStateChange(et){this.appEmitter.emit("sceneStateChange",et)}emitAppIsWritableChange(){this.appEmitter.emit("writableChange",this.isWritable)}makeAppEventListener(et){return(_e,tt)=>{var rt,nt,st,dt;if(this.manager.canOperate)switch(_e){case"setBoxSize":{(rt=this.boxManager)==null||rt.resizeBox({appId:et,width:tt.width,height:tt.height,skipUpdate:!1});break}case"setBoxMinSize":{(nt=this.boxManager)==null||nt.setBoxMinSize({appId:et,minWidth:tt.minwidth,minHeight:tt.minheight});break}case"setBoxTitle":{(st=this.boxManager)==null||st.setBoxTitle({appId:et,title:tt.title});break}case AppEvents.destroy:{if(this.status==="destroyed")return;this.destroy(!0,!1,!0,tt?.error),tt?.error&&console.error(tt?.error);break}case"focus":{(dt=this.boxManager)==null||dt.focusBox({appId:this.id}),boxEmitter.emit("focus",{appId:this.id});break}}}}setScenePath(){if(!this.manager.canOperate)return;const et=this.getFullScenePath();this.manager.room&&et&&this.view&&setScenePath(this.manager.room,et)}setViewFocusScenePath(){const et=this.getFullScenePath();return et&&this.view&&setViewFocusScenePath(this.view,et),et}async createView(){const et=await this.viewManager.createView(this.id);return this.setViewFocusScenePath(),et}get pageState(){return this._pageState.toObject()}async removeSceneByIndex(et){const _e=this._pageState.getFullPath(et);if(_e){const tt=calculateNextIndex(et,this.pageState);return this.setSceneIndexWithoutSync(tt),this.manager.dispatchInternalEvent(Events.SetAppFocusIndex,{type:"app",appID:this.id,index:tt}),setTimeout(()=>{removeScenes(this.manager.room,_e,et)},100),!0}else return!1}setSceneIndexWithoutSync(et){this.view&&(this.view.focusSceneIndex=et)}setSceneIndex(et){if(this.view){this.view.focusSceneIndex=et;const _e=this._pageState.getFullPath(et);_e&&this.setFullPath(_e)}}async destroy(et,_e,tt,rt){var nt;if(this.status!=="destroyed"){this.status="destroyed";try{await appRegister.notifyApp(this.kind,"destroy",{appId:this.id}),await this.appEmitter.emit("destroy",{error:rt})}catch(st){console.error("[WindowManager]: notifyApp error",st.message,st.stack)}this.appEmitter.clearListeners(),internalEmitter.emit(`destroy-${this.id}`,{error:rt}),et&&((nt=this.boxManager)==null||nt.closeBox(this.id,tt)),_e&&(this.store.cleanAppAttributes(this.id),this.scenePath&&removeScenes(this.manager.room,this.scenePath)),this.appProxies.delete(this.id),this._pageState.destroy(),this.viewManager.destroyView(this.id),this.manager.appStatus.delete(this.id),this.manager.refresher.remove(this.id),this.manager.refresher.remove(this.stateKey),this.manager.refresher.remove(`${this.id}-fullPath`),this._prevFullPath=void 0}}close(){return this.destroy(!0,!0,!1)}};let AppProxy=_AppProxy;AppProxy.kind="AppProxy";class ViewManager{constructor(_e){this.displayer=_e,this.views=new Map}createView(_e){const tt=createView(this.displayer);return this.views.set(_e,tt),tt}getView(_e){return this.views.get(_e)}destroyView(_e){const tt=this.views.get(_e);if(tt){try{tt.release()}catch{}this.views.delete(_e)}}setViewScenePath(_e,tt){const rt=this.views.get(_e);rt&&(rt.focusScenePath=tt)}destroy(){this.views.forEach(_e=>{try{_e.release()}catch{}}),this.views.clear()}}const createView=et=>{const _e=et.views.createView();return setDefaultCameraBound(_e),_e},setDefaultCameraBound=et=>{et.setCameraBound({maxContentMode:()=>10,minContentMode:()=>.1})};class MainViewProxy{constructor(_e){this.manager=_e,this.polling=!1,this.started=!1,this.mainViewIsAddListener=!1,this.store=this.manager.store,this.viewMode=this.manager.windowManger.viewMode,this.sideEffectManager=new o$2,this.syncCamera=()=>{if(!this.polling||this.viewMode!==whiteWebSdkExports.ViewMode.Broadcaster)return;const{mainViewCamera:rt}=this;rt&&rt.id!==this.manager.uid&&this.moveCameraSizeByAttributes()},this.startListenWritableChange=()=>{this.sideEffectManager.add(()=>internalEmitter.on("writableChange",rt=>{rt&&this.ensureCameraAndSize(),this.manager.room&&this.syncMainView(this.manager.room)}))},this.addCameraReaction=()=>{this.manager.refresher.add(Fields.MainViewCamera,this.cameraReaction)},this.cameraReaction=()=>whiteWebSdkExports.reaction(()=>this.mainViewCamera,rt=>{rt&&rt.id!==this.manager.uid&&(this.moveCameraToContian(this.mainViewSize),this.moveCamera(rt))},{fireImmediately:!0}),this.sizeChangeHandler=lodashExports.debounce(rt=>{rt&&(this.moveCameraToContian(rt),this.moveCamera(this.mainViewCamera)),this.ensureMainViewSize()},30),this.onUpdateContainerSizeRatio=()=>{const rt=this.store.getMainViewSize();this.sizeChangeHandler(rt)},this.onCameraUpdatedByDevice=rt=>{this.viewMode!==whiteWebSdkExports.ViewMode.Follower&&(this.store.setMainViewCamera({...rt,id:this.manager.uid}),lodashExports.isEqual(this.mainViewSize,{...this.mainView.size,id:this.manager.uid})||this.setMainViewSize(this.view.size))},this.mainViewClickListener=()=>{this.mainViewClickHandler()},this.setMainViewSize=lodashExports.debounce(rt=>{this.store.setMainViewSize({...rt,id:this.manager.uid})},50),this._syncMainViewTimer=0,this.onCameraOrSizeUpdated=()=>{callbacks$1.emit("cameraStateChange",this.cameraState),this.manager.room&&this.manager.room.syncMainView&&(clearTimeout(this._syncMainViewTimer),this._syncMainViewTimer=setTimeout(this.syncMainView,100,this.manager.room)),this.ensureMainViewSize()},this.syncMainView=rt=>{rt.isWritable&&rt.syncMainView(this.mainView)},this.setViewMode=rt=>{this.viewMode=rt},this.mainView=this.createMainView(),this.moveCameraSizeByAttributes(),internalEmitter.once("mainViewMounted").then(()=>{this.addMainViewListener(),this.start(),this.ensureCameraAndSize(),this.startListenWritableChange()});const tt=()=>{this.sizeChangeHandler(this.mainViewSize)};this.sideEffectManager.add(()=>internalEmitter.on("playgroundSizeChange",tt)),this.sideEffectManager.add(()=>internalEmitter.on("containerSizeRatioUpdate",this.onUpdateContainerSizeRatio)),this.sideEffectManager.add(()=>internalEmitter.on("startReconnect",()=>{this.didRelease||this.mainView.release()})),this.sideEffectManager.setInterval(this.syncCamera,1500)}ensureCameraAndSize(){this.viewMode===whiteWebSdkExports.ViewMode.Broadcaster&&(!this.mainViewCamera||!this.mainViewSize)&&(this.manager.dispatchInternalEvent(Events.InitMainViewCamera),this.setCameraAndSize())}get mainViewCamera(){return this.store.getMainViewCamera()}get mainViewSize(){return this.store.getMainViewSize()}get didRelease(){return lodashExports.get(this.view,["didRelease"])}moveCameraSizeByAttributes(){this.moveCameraToContian(this.mainViewSize),this.moveCamera(this.mainViewCamera)}start(){this.sizeChangeHandler(this.mainViewSize),!this.started&&(this.addCameraListener(),this.addCameraReaction(),this.manager.room&&this.syncMainView(this.manager.room),this.started=!0)}setCameraAndSize(){const _e={...this.mainView.camera,id:this.manager.uid},tt={...this.mainView.size,id:this.manager.uid};this.store.setMainViewCameraAndSize(_e,tt)}get view(){return this.mainView}get cameraState(){return{...this.view.camera,...this.view.size}}createMainView(){const _e=createView(this.manager.displayer),tt=this.store.getMainViewScenePath();return tt&&setViewFocusScenePath(_e,tt),_e}onReconnect(){if(this.didRelease)this.rebind();else{const _e=this.store.getMainViewScenePath();this.setFocusScenePath(_e)}}setFocusScenePath(_e){if(_e)return setViewFocusScenePath(this.view,_e)}rebind(){const _e=this.mainView.divElement,tt=this.mainView.disableCameraTransform;this.stop(),this.didRelease||this.mainView.release(),this.removeMainViewListener(),this.mainView=this.createMainView(),this.mainView.disableCameraTransform=tt,this.mainView.divElement=_e,this.addMainViewListener(),this.start(),callbacks$1.emit("onMainViewRebind",this.mainView)}addMainViewListener(){this.mainViewIsAddListener||this.view.divElement&&(this.view.divElement.addEventListener("click",this.mainViewClickListener),this.view.divElement.addEventListener("touchend",this.mainViewClickListener),this.mainViewIsAddListener=!0)}removeMainViewListener(){this.view.divElement&&(this.view.divElement.removeEventListener("click",this.mainViewClickListener),this.view.divElement.removeEventListener("touchend",this.mainViewClickListener)),this.mainViewIsAddListener=!1}async mainViewClickHandler(){var _e;this.manager.canOperate&&(this.store.cleanFocus(),(_e=this.manager.boxManager)==null||_e.blurAllBox())}addCameraListener(){this.view.callbacks.on("onCameraUpdatedByDevice",this.onCameraUpdatedByDevice),this.view.callbacks.on("onCameraUpdated",this.onCameraOrSizeUpdated),this.view.callbacks.on("onSizeUpdated",this.onCameraOrSizeUpdated)}removeCameraListener(){this.view.callbacks.off("onCameraUpdatedByDevice",this.onCameraUpdatedByDevice),this.view.callbacks.off("onCameraUpdated",this.onCameraOrSizeUpdated),this.view.callbacks.off("onSizeUpdated",this.onCameraOrSizeUpdated)}ensureMainViewSize(){(!this.mainViewSize||this.mainViewSize.width===0||this.mainViewSize.height===0)&&this.mainView.size.width>0&&this.mainView.size.height>0&&this.setMainViewSize(this.mainView.size)}moveCameraToContian(_e){lodashExports.isEmpty(_e)||(this.view.moveCameraToContain({width:_e.width,height:_e.height,originX:-_e.width/2,originY:-_e.height/2,animationMode:whiteWebSdkExports.AnimationMode.Immediately}),this.scale=this.view.camera.scale)}moveCamera(_e){if(!lodashExports.isEmpty(_e)){if(lodashExports.isEqual(_e,this.view.camera))return;const{centerX:tt,centerY:rt,scale:nt}=_e,st=nt*(this.scale||1);this.view.moveCamera({centerX:tt,centerY:rt,scale:st,animationMode:whiteWebSdkExports.AnimationMode.Immediately})}}stop(){this.removeCameraListener(),this.manager.refresher.remove(Fields.MainViewCamera),this.manager.refresher.remove(Fields.MainViewSize),this.started=!1}destroy(){this.removeMainViewListener(),this.stop(),this.sideEffectManager.flushAll()}}class RedoUndo{constructor(_e){this.context=_e,this.addRedoUndoListeners=tt=>{if(tt===void 0)this.addViewCallbacks(this.context.mainView(),this.onCanRedoStepsUpdate,this.onCanUndoStepsUpdate);else{const rt=this.context.getAppProxy(tt);rt&&rt.view&&this.addViewCallbacks(rt.view,this.onCanRedoStepsUpdate,this.onCanUndoStepsUpdate)}},this.addViewCallbacks=(tt,rt,nt)=>{rt(tt.canRedoSteps),nt(tt.canUndoSteps),tt.callbacks.on("onCanRedoStepsUpdate",rt),tt.callbacks.on("onCanUndoStepsUpdate",nt)},this.disposeViewCallbacks=tt=>{tt.callbacks.off("onCanRedoStepsUpdate",this.onCanRedoStepsUpdate),tt.callbacks.off("onCanUndoStepsUpdate",this.onCanUndoStepsUpdate)},this.onCanRedoStepsUpdate=tt=>{callbacks$1.emit("canRedoStepsChange",tt)},this.onCanUndoStepsUpdate=tt=>{callbacks$1.emit("canUndoStepsChange",tt)},this.disposePrevFocusViewRedoUndoListeners=tt=>{let rt;if(tt===void 0)rt=this.context.mainView();else{const nt=this.context.getAppProxy(tt);nt&&nt.view&&(rt=nt.view)}rt&&this.disposeViewCallbacks(rt)},internalEmitter.on("focusedChange",tt=>{this.disposePrevFocusViewRedoUndoListeners(tt.prev),setTimeout(()=>{this.addRedoUndoListeners(tt.focused)},0)}),internalEmitter.on("rootDirRemoved",()=>{this.disposePrevFocusViewRedoUndoListeners(_e.focus()),this.addRedoUndoListeners(_e.focus())}),this.addRedoUndoListeners(_e.focus())}destroy(){this.disposePrevFocusViewRedoUndoListeners(this.context.focus())}}class AppManager{constructor(_e){this.windowManger=_e,this.appProxies=new Map,this.appStatus=new Map,this.isReplay=this.windowManger.isReplay,this.mainViewScenesLength=0,this.callbacksNode=null,this.appCreateQueue=new AppCreateQueue,this.sideEffectManager=new o$2,this.sceneState=null,this.rootDirRemoving=!1,this._useBoxesStatus=!1,this.onRemoveScenes=async tt=>{var rt,nt;const{scenePath:st}=tt;if(st===ROOT_DIR){await this.onRootDirRemoved(),this.dispatchInternalEvent(Events.RootDirRemoved);return}if(isRootDirPage(st)){let dt=this.mainView.focusSceneIndex||0,ft=(rt=this.callbacksNode)==null?void 0:rt.scenes[dt];ft||(dt=0,ft=(nt=this.callbacksNode)==null?void 0:nt.scenes[dt]),ft&&this.setMainViewScenePath(`${ROOT_DIR}${ft}`),await this.setMainViewSceneIndex(dt)}else this.appProxies.forEach(dt=>{dt.onRemoveScene(st)})},this.onReadonlyChanged=()=>{this.appProxies.forEach(tt=>{tt.emitAppIsWritableChange()})},this.onPlayerSeekStart=async()=>{await this.closeAll()},this.onPlayerSeekDone=async tt=>{await this.attributesUpdateCallback(this.attributes.apps),this.appProxies.forEach(rt=>{rt.onSeek(tt)})},this.createRootDirScenesCallback=()=>{let tt=!1;this.callbacksNode&&(this.callbacksNode.dispose(),tt=!0),this.callbacksNode=this.displayer.createScenesCallback(ROOT_DIR,{onAddScene:this.onSceneChange,onRemoveScene:async(rt,nt)=>{await this.onSceneChange(rt),internalEmitter.emit("rootDirSceneRemoved",nt)}}),this.callbacksNode&&(this.updateSceneState(this.callbacksNode),this.mainViewScenesLength=this.callbacksNode.scenes.length,tt&&this.emitMainViewScenesChange(this.callbacksNode.scenes.length))},this.removeSceneByIndex=async tt=>{var rt;const nt=calculateNextIndex(tt,this.windowManger.pageState);this.setSceneIndexWithoutSync(nt),this.dispatchInternalEvent(Events.SetAppFocusIndex,{type:"main",index:nt});const st=(rt=this.callbacksNode)==null?void 0:rt.scenes[tt];return setTimeout(()=>{st&&removeScenes(this.room,`${ROOT_DIR}${st}`,tt)},100),new Promise((dt,ft)=>{internalEmitter.once("rootDirSceneRemoved").then(ht=>{ht===st&&dt(!0)}).catch(ht=>{console.log(`[WindowManager]: removePage error: ${ht}`),ft(!1)})})},this.setSceneIndexWithoutSync=tt=>{var rt;const nt=(rt=this.callbacksNode)==null?void 0:rt.scenes[tt];nt&&this.mainViewProxy.setFocusScenePath(`${ROOT_DIR}${nt}`)},this.onSceneChange=tt=>(this.mainViewScenesLength=tt.scenes.length,this.updateSceneState(tt),this.emitMainViewScenesChange(this.mainViewScenesLength)),this.emitMainViewScenesChange=tt=>Promise.all([callbacks$1.emit("mainViewScenesLengthChange",tt),internalEmitter.emit("changePageState")]),this.updateSceneState=tt=>{const rt=this.store.getMainViewSceneIndex()||0;let nt=tt.scenes[rt];nt||(nt=tt.scenes[this.mainView.focusSceneIndex||0]),this.sceneState={scenePath:`${ROOT_DIR}${nt}`,contextPath:tt.path,index:rt,scenes:tt.scenes.map(st=>({name:st})),sceneName:nt},callbacks$1.emit("sceneStateChange",this.sceneState)},this.onBoxMove=tt=>{this.dispatchInternalEvent(Events.AppMove,tt),this.store.updateAppState(tt.appId,AppAttributes.Position,{x:tt.x,y:tt.y}),callbacks$1.emit("onBoxMove",tt)},this.onBoxResize=tt=>{tt.width&&tt.height&&(this.dispatchInternalEvent(Events.AppResize,tt),this.store.updateAppState(tt.appId,AppAttributes.Size,{width:tt.width,height:tt.height}),callbacks$1.emit("onBoxResize",tt))},this.onBoxFocus=tt=>{this.windowManger.safeSetAttributes({focus:tt.appId}),callbacks$1.emit("onBoxFocus",tt)},this.onBoxBlurred=tt=>{this.attributes.focus===tt.appId&&(this.windowManger.safeSetAttributes({focus:void 0}),callbacks$1.emit("onBoxBlurred",tt))},this.onBoxClose=tt=>{const rt=this.appProxies.get(tt.appId);rt&&rt.destroy(!1,!0,!0,tt.error),callbacks$1.emit("onBoxClose",tt)},this.onBoxStateChange=tt=>{this.dispatchInternalEvent(Events.AppBoxStateChange,tt),callbacks$1.emit("onBoxStateChange",tt)},this.notifyBoxesStatusChange=lodashExports.debounce(()=>{const tt=Object.entries(this.attributes.boxesStatus);tt.length>0&&tt.forEach(([rt,nt])=>{const st=this.appProxies.get(rt);st&&st.notifyBoxStatusChange(nt)})},50),this.addBoxesStatusChangeListener=()=>{this.refresher.add("boxesStatus",()=>safeListenPropsUpdated(()=>this.attributes.boxesStatus,()=>{var tt;(tt=this.boxManager)==null||tt.setBoxesStatus(this.attributes.boxesStatus),this.notifyBoxesStatusChange()})),this.refresher.add("lastNotMinimizedBoxesStatus",()=>safeListenPropsUpdated(()=>this.attributes.lastNotMinimizedBoxesStatus,()=>{var tt;(tt=this.boxManager)==null||tt.setLastNotMinimizedBoxesStatus(this.attributes.lastNotMinimizedBoxesStatus)}))},this.addAppsChangeListener=()=>{this.refresher.add("apps",()=>safeListenPropsUpdated(()=>this.attributes.apps,()=>{this.attributesUpdateCallback(this.attributes.apps)}))},this.addAppCloseListener=()=>{this.refresher.add("appsClose",()=>safeListenPropsUpdated(()=>this.attributes.apps,tt=>{tt.some(rt=>rt.kind===whiteWebSdkExports.UpdateEventKind.Removed)&&this.onAppDelete(this.attributes.apps)}))},this.onMainViewIndexChange=tt=>{tt!==void 0&&this._prevSceneIndex!==tt&&(callbacks$1.emit("mainViewSceneIndexChange",tt),internalEmitter.emit("changePageState"),this.callbacksNode&&this.updateSceneState(this.callbacksNode),this._prevSceneIndex=tt)},this.onFocusChange=tt=>{var rt;this._prevFocused!==tt&&(callbacks$1.emit("focusedChange",tt),internalEmitter.emit("focusedChange",{focused:tt,prev:this._prevFocused}),this._prevFocused=tt,tt!==void 0&&((rt=this.boxManager)==null||rt.focusBox({appId:tt}),setTimeout(()=>{const nt=this.appProxies.get(tt);nt&&appRegister.notifyApp(nt.kind,"focus",{appId:tt})},0)))},this.attributesUpdateCallback=lodashExports.debounce(tt=>this._attributesUpdateCallback(tt),100),this._appIds=[],this.onRegisteredChange=tt=>{tt&&Object.entries(tt).forEach(([rt,nt])=>{appRegister.appClasses.has(rt)||appRegister.register({kind:rt,src:nt.src,name:nt.name})})},this.onMinimized=tt=>{var rt,nt;((rt=this.boxManager)==null?void 0:rt.minimized)!==tt&&(tt===!0&&((nt=this.boxManager)==null||nt.blurAllBox()),setTimeout(()=>{var st;(st=this.boxManager)==null||st.setMinimized(!!tt)},0))},this.onAppDelete=async tt=>{const rt=Object.keys(tt);for(const[nt,st]of this.appProxies.entries())rt.includes(nt)||await st.destroy(!0,!1,!0)},this.closeAll=async()=>{for(const[tt,rt]of this.appProxies.entries())await rt.destroy(!0,!1,!0)},this.displayerStateListener=tt=>{this.appProxies.forEach(rt=>{rt.appEmitter.emit("roomStateChange",tt)}),internalEmitter.emit("observerIdChange",this.displayer.observerId)},this.displayerWritableListener=tt=>{var rt,nt;const st=!tt,dt=this.windowManger.readonly===void 0||this.windowManger.readonly===!1;this.windowManger.readonly===void 0?(rt=this.boxManager)==null||rt.setReadonly(tt):(nt=this.boxManager)==null||nt.setReadonly(!(st&&dt)),this.appProxies.forEach(ft=>{ft.emitAppIsWritableChange()}),internalEmitter.emit("writableChange",st)},this.updateSceneIndex=()=>{const tt=this.store.getMainViewScenePath(),rt=parseSceneDir(tt),nt=entireScenes(this.displayer)[rt];if(nt.length){const st=tt.replace(rt,"").replace("/",""),dt=nt.findIndex(ft=>ft.name===st);lodashExports.isInteger(dt)&&dt>=0&&this.safeSetAttributes({_mainSceneIndex:dt})}},this.updateRootDirRemoving=tt=>{this.rootDirRemoving=tt},this.displayer=_e.displayer,this.store=createAttributesDelegate(WindowManager.extendClass,{getAttributes:()=>this.attributes,safeSetAttributes:tt=>this.safeSetAttributes(tt),safeUpdateAttributes:(tt,rt)=>this.safeUpdateAttributes(tt,rt)}),this.mainViewProxy=new MainViewProxy(this),this.viewManager=new ViewManager(this.displayer),this.appListeners=new AppListeners(this),this.displayer.callbacks.on(this.eventName,this.displayerStateListener),this.appListeners.addListeners(),this.refresher=reconnectRefresher,this.refresher.setRoom(this.room),this.refresher.setContext({emitter:internalEmitter}),this.sideEffectManager.addDisposer(()=>{var tt,rt;this.appCreateQueue.destroy(),this.mainViewProxy.destroy(),this.refresher.destroy(),this.viewManager.destroy(),(tt=this.boxManager)==null||tt.destroy(),(rt=this.callbacksNode)==null||rt.dispose()}),internalEmitter.once("onCreated").then(()=>this.onCreated()),internalEmitter.on("onReconnected",()=>this.onReconnected()),whiteWebSdkExports.isPlayer(this.displayer)&&(internalEmitter.on("seekStart",this.onPlayerSeekStart),internalEmitter.on("seek",this.onPlayerSeekDone)),internalEmitter.on("removeScenes",this.onRemoveScenes),internalEmitter.on("setReadonly",this.onReadonlyChanged),this.createRootDirScenesCallback(),appRegister.setSyncRegisterApp(tt=>{this.safeUpdateAttributes([Fields.Registered,tt.kind],tt)})}get useBoxesStatus(){return this._useBoxesStatus}set useBoxesStatus(_e){this._useBoxesStatus=_e}getMemberState(){var _e;return((_e=this.room)==null?void 0:_e.state.memberState)||{strokeColor:[0,0,0]}}async onRootDirRemoved(_e=!0){this.setMainViewScenePath(INIT_DIR),this.createRootDirScenesCallback();for(const[tt,rt]of this.appProxies.entries())rt.view&&await this.closeApp(tt,_e);this.mainViewProxy.rebind(),internalEmitter.emit("rootDirRemoved"),this.updateRootDirRemoving(!1)}get eventName(){return whiteWebSdkExports.isRoom(this.displayer)?"onRoomStateChanged":"onPlayerStateChanged"}get attributes(){return this.windowManger.attributes}get canOperate(){return this.windowManger.canOperate}get room(){return whiteWebSdkExports.isRoom(this.displayer)?this.displayer:void 0}get mainView(){return this.mainViewProxy.view}get polling(){return this.mainViewProxy.polling}set polling(_e){this.mainViewProxy.polling=_e}get focusApp(){if(this.store.focus)return this.appProxies.get(this.store.focus)}get uid(){var _e;return((_e=this.room)==null?void 0:_e.uid)||""}getMainViewSceneDir(){const _e=this.store.getMainViewScenePath();if(_e)return parseSceneDir(_e);throw new Error("[WindowManager]: mainViewSceneDir not found")}async onCreated(){var _e;if(Object.keys(this.attributes.apps).length&&this.store.focus&&(this._focusAppId=this.store.focus,await new Promise(tt=>{this._focusAppCreatedResolve=tt,this._resolveTimer=setTimeout(()=>{tt(this.appProxies.get(this._focusAppId||""))},500)}).then(()=>{this.focusByAttributes(this.attributes.apps)})),await this.attributesUpdateCallback(this.attributes.apps),this.focusByAttributes(this.attributes.apps),internalEmitter.emit("updateManagerRect"),boxEmitter.on("move",this.onBoxMove),boxEmitter.on("resize",this.onBoxResize),boxEmitter.on("focus",this.onBoxFocus),boxEmitter.on("close",this.onBoxClose),boxEmitter.on("boxStateChange",this.onBoxStateChange),boxEmitter.on("blurred",this.onBoxBlurred),this.addAppsChangeListener(),this.addAppCloseListener(),this.addBoxesStatusChangeListener(),this.refresher.add("maximized",()=>whiteWebSdkExports.autorun(()=>{var tt;const rt=this.attributes.maximized;(tt=this.boxManager)==null||tt.setMaximized(!!rt)})),this.refresher.add("minimized",()=>whiteWebSdkExports.autorun(()=>{const tt=this.attributes.minimized;this.onMinimized(tt)})),this.refresher.add("mainViewIndex",()=>whiteWebSdkExports.autorun(()=>{const tt=lodashExports.get(this.attributes,"_mainSceneIndex");this.onMainViewIndexChange(tt)})),this.refresher.add("focusedChange",()=>whiteWebSdkExports.autorun(()=>{const tt=lodashExports.get(this.attributes,"focus");this.onFocusChange(tt)})),this.refresher.add("registeredChange",()=>whiteWebSdkExports.autorun(()=>{const tt=lodashExports.get(this.attributes,Fields.Registered);this.onRegisteredChange(tt)})),!this.attributes.apps||Object.keys(this.attributes.apps).length===0){const tt=this.store.getMainViewScenePath();if(!tt)return;this.resetScenePath(tt)}this.displayerWritableListener(!((_e=this.room)!=null&&_e.isWritable)),this.displayer.callbacks.on("onEnableWriteNowChanged",this.displayerWritableListener),this._prevFocused=this.attributes.focus,this.sideEffectManager.add(()=>{const tt=new RedoUndo({mainView:()=>this.mainViewProxy.view,focus:()=>this.attributes.focus,getAppProxy:rt=>this.appProxies.get(rt)});return()=>tt.destroy()})}notifyAppsChange(_e){(this._appIds.length!==_e.length||!this._appIds.every(tt=>_e.includes(tt)))&&(this._appIds=_e,callbacks$1.emit("appsChange",_e))}async _attributesUpdateCallback(_e){if(_e&&WindowManager.container){const tt=Object.keys(_e);tt.length===0&&this.appCreateQueue.emitReady();const nt=lodashExports.orderBy(tt.map(st=>({id:st,createdAt:_e[st].createdAt})),"createdAt","asc").map(({id:st})=>st);this.notifyAppsChange(nt);for(const st of nt)if(!this.appProxies.has(st)&&!this.appStatus.has(st)){const dt=_e[st];try{if(!this.attributes[st])throw new Error("appAttributes is undefined");this.appCreateQueue.push(async()=>{this.appStatus.set(st,AppStatus.StartCreate);const ht=await this.baseInsertApp({kind:dt.kind,options:dt.options,isDynamicPPT:dt.isDynamicPPT,forceNormal:dt.forceNormal,forceTop:dt.forceTop,isDragContent:dt.isDragContent},st,!1);return ht&&this._focusAppId===st&&this._focusAppCreatedResolve&&(this._resolveTimer&&clearTimeout(this._resolveTimer),this._focusAppCreatedResolve(ht)),ht}),this.focusByAttributes(_e)}catch(ft){console.warn("[WindowManager]: Insert App Error",ft)}}}}refresh(){this.attributesUpdateCallback(this.attributes.apps)}setBoxManager(_e){this.boxManager=_e}resetMaximized(){var _e;(_e=this.boxManager)==null||_e.setMaximized(!!this.store.getMaximized())}resetMinimized(){var _e;(_e=this.boxManager)==null||_e.setMinimized(!!this.store.getMinimized())}bindMainView(_e,tt){const rt=this.mainViewProxy.view;rt.disableCameraTransform=tt,rt.divElement=_e,rt.focusScenePath||this.setMainViewFocusPath(),internalEmitter.emit("mainViewMounted"),callbacks$1.emit("onMainViewMounted",rt)}setMainViewFocusPath(_e){var tt;const rt=_e||this.store.getMainViewScenePath();if(rt)return setViewFocusScenePath(this.mainView,rt),((tt=this.mainView)==null?void 0:tt.focusScenePath)===rt}resetScenePath(_e){this.displayer.state.sceneState.scenePath!==_e&&setScenePath(this.room,_e)}async addApp(_e,tt){log$1("addApp",_e);const{appId:rt,needFocus:nt}=await this.beforeAddApp(_e,tt),st=await this.baseInsertApp(_e,rt,!0,nt);return this.afterAddApp(st),st?.id}async beforeAddApp(_e,tt){var rt,nt;const st=await genAppId(_e.kind);this.appStatus.set(st,AppStatus.StartCreate);const dt=(rt=_e.attributes)!=null?rt:{};this.safeUpdateAttributes([st],dt),this.store.setupAppAttributes(_e,st,tt);const ft=!((nt=this.boxManager)!=null&&nt.minimized);return ft&&this.store.setAppFocus(st,!0),{appId:st,needFocus:ft}}afterAddApp(_e){var tt,rt;if(_e&&_e.box){const nt=_e.box;boxEmitter.emit("move",{appId:_e.id,x:nt?.intrinsicX,y:nt?.intrinsicY}),this.store.updateAppState(_e.id,AppAttributes.ZIndex,nt.zIndex)}(tt=this.boxManager)!=null&&tt.minimized&&((rt=this.boxManager)==null||rt.setMinimized(!1,!1))}async closeApp(_e,tt=!0){const rt=this.appProxies.get(_e);rt&&rt.destroy(!0,tt,!1)}async baseInsertApp(_e,tt,rt,nt){if(this.appProxies.has(tt)){console.warn("[WindowManager]: app duplicate exists and cannot be created again");return}const st=getExtendClass$1(AppProxy,WindowManager.extendClass),dt=new st(_e,this,tt,rt);if(dt)return await dt.baseInsertApp(nt),this.appStatus.delete(tt),dt;throw this.appStatus.delete(tt),new Error("[WindowManger]: initialize AppProxy failed")}safeSetAttributes(_e){this.windowManger.safeSetAttributes(_e)}safeUpdateAttributes(_e,tt){this.windowManger.safeUpdateAttributes(_e,tt)}async setMainViewScenePath(_e){if(this.room){const tt=this.displayer.scenePathType(_e);if(parseSceneDir(_e)!==ROOT_DIR)throw new Error('[WindowManager]: main view scenePath must in root dir "/"');if(tt===whiteWebSdkExports.ScenePathType.None)throw new Error(`[WindowManager]: ${_e} not valid scene`);if(tt===whiteWebSdkExports.ScenePathType.Page)await this._setMainViewScenePath(_e);else if(tt===whiteWebSdkExports.ScenePathType.Dir){const nt=makeValidScenePath(this.displayer,_e);nt&&await this._setMainViewScenePath(nt)}}}async _setMainViewScenePath(_e){this.setMainViewFocusPath(_e)&&(this.safeSetAttributes({_mainScenePath:_e}),this.store.setMainViewFocusPath(this.mainView),this.updateSceneIndex(),this.dispatchSetMainViewScenePath(_e))}async setMainViewSceneIndex(_e){var tt;if(this.room){if(this.store.getMainViewSceneIndex()===_e)return;const rt=(tt=this.callbacksNode)==null?void 0:tt.scenes[_e],nt=`${ROOT_DIR}${rt}`;if(rt)this.setMainViewFocusPath(nt)&&(this.store.setMainViewScenePath(nt),this.store.setMainViewSceneIndex(_e),this.dispatchSetMainViewScenePath(nt));else throw new Error(`[WindowManager]: ${_e} not valid index`)}}dispatchSetMainViewScenePath(_e){this.dispatchInternalEvent(Events.SetMainViewScenePath,{nextScenePath:_e}),callbacks$1.emit("mainViewScenePathChange",_e),setScenePath(this.room,_e)}getAppInitPath(_e){var tt;const rt=this.store.getAppAttributes(_e);if(rt)return(tt=rt?.options)==null?void 0:tt.scenePath}safeDispatchMagixEvent(_e,tt){this.canOperate&&this.displayer.dispatchMagixEvent(_e,tt)}focusByAttributes(_e){var tt;if(_e&&Object.keys(_e).length===((tt=this.boxManager)==null?void 0:tt.boxSize)){const rt=this.store.focus;rt&&this.boxManager.focusBox({appId:rt})}}async onReconnected(){this.attributesUpdateCallback(this.attributes.apps);const tt=Array.from(this.appProxies.values()).map(rt=>rt.onReconnected());this.mainViewProxy.onReconnect(),await Promise.all(tt),this.callbacksNode&&this.onSceneChange(this.callbacksNode)}notifyContainerRectUpdate(_e){this.appProxies.forEach(tt=>{tt.appEmitter.emit("containerRectUpdate",_e)})}dispatchInternalEvent(_e,tt){this.safeDispatchMagixEvent(MagixEventName,{eventName:_e,payload:tt})}destroy(){this.displayer.callbacks.off(this.eventName,this.displayerStateListener),this.displayer.callbacks.off("onEnableWriteNowChanged",this.displayerWritableListener),this.appListeners.removeListeners(),boxEmitter.clearListeners(),internalEmitter.clearListeners(),this.appProxies.size&&this.appProxies.forEach(_e=>{_e.destroy(!0,!1,!0)}),callbacks$1.clearListeners(),this.sideEffectManager.flushAll(),this._prevFocused=void 0,this._prevSceneIndex=void 0,this._resolveTimer&&clearTimeout(this._resolveTimer),this._focusAppCreatedResolve=void 0,this._resolveTimer=void 0}}AppManager.kind="AppManager";const ResizeObserver$2=window.ResizeObserver||ResizeObserver$4;class ContainerResizeObserver{constructor(_e){this.emitter=_e}static create(_e,tt,rt,nt){const st=new ContainerResizeObserver(nt);return st.observePlaygroundSize(_e,tt,rt),st}observePlaygroundSize(_e,tt,rt){this.updateSizer(_e.getBoundingClientRect(),tt,rt),this.containerResizeObserver=new ResizeObserver$2(nt=>{var st;const dt=(st=nt[0])==null?void 0:st.contentRect;dt&&(this.updateSizer(dt,tt,rt),this.emitter.emit("playgroundSizeChange",dt))}),this.disposer=this.emitter.on("containerSizeRatioUpdate",()=>{const nt=_e.getBoundingClientRect();this.updateSizer(nt,tt,rt),this.emitter.emit("playgroundSizeChange",nt)}),this.containerResizeObserver.observe(_e)}updateSizer({width:_e,height:tt},rt,nt){_e&&tt&&(tt/_e>WindowManager.containerSizeRatio?(tt=_e*WindowManager.containerSizeRatio,rt.classList.toggle("netless-window-manager-sizer-horizontal",!0)):(_e=tt/WindowManager.containerSizeRatio,rt.classList.toggle("netless-window-manager-sizer-horizontal",!1)),nt.style.width=`${_e}px`,nt.style.height=`${tt}px`)}disconnect(){var _e;(_e=this.containerResizeObserver)==null||_e.disconnect(),lodashExports.isFunction(this.disposer)&&(this.disposer(),this.disposer=void 0)}}class PageStateImpl{constructor(_e){this.manager=_e,internalEmitter.on("changePageState",()=>{callbacks$1.emit("pageStateChange",this.toObject())})}get index(){return this.manager.store.getMainViewSceneIndex()||0}get length(){return this.manager.mainViewScenesLength||0}toObject(){return{index:this.index>=this.length?this.length-1:this.index,length:this.length}}}class ReconnectRefresher{constructor(_e){this.ctx=_e,this.reactors=new Map,this.disposers=new Map,this.onPhaseChanged=async tt=>{var rt,nt;tt===whiteWebSdkExports.RoomPhase.Reconnecting&&this.ctx.emitter.emit("startReconnect"),tt===whiteWebSdkExports.RoomPhase.Connected&&this.phase===whiteWebSdkExports.RoomPhase.Reconnecting&&((rt=this.room)!=null&&rt.isWritable?(nt=this.room)==null||nt.dispatchMagixEvent(EnsureReconnectEvent,{}):(await wait(500),this.onReconnected())),this.phase=tt},this.onReconnected=lodashExports.debounce(()=>{this._onReconnected()},1e3),this._onReconnected=()=>{log$1("onReconnected refresh reactors"),this.releaseDisposers(),this.reactors.forEach((tt,rt)=>{lodashExports.isFunction(tt)&&this.disposers.set(rt,tt())}),this.ctx.emitter.emit("onReconnected")}}setRoom(_e){this.room=_e,this.phase=_e?.phase,_e&&(_e.callbacks.off("onPhaseChanged",this.onPhaseChanged),_e.callbacks.on("onPhaseChanged",this.onPhaseChanged),_e.addMagixEventListener(EnsureReconnectEvent,tt=>{tt.authorId===_e.observerId&&this.onReconnected()},{fireSelfEventAfterCommit:!0}))}setContext(_e){this.ctx=_e}releaseDisposers(){this.disposers.forEach(_e=>{lodashExports.isFunction(_e)&&_e()}),this.disposers.clear()}refresh(){this._onReconnected()}add(_e,tt){const rt=this.disposers.get(_e);rt&&lodashExports.isFunction(rt)&&rt(),lodashExports.isFunction(tt)&&(this.reactors.set(_e,tt),this.disposers.set(_e,tt()))}remove(_e){this.reactors.has(_e)&&this.reactors.delete(_e);const tt=this.disposers.get(_e);tt&&(lodashExports.isFunction(tt)&&tt(),this.disposers.delete(_e))}hasReactor(_e){return this.reactors.has(_e)}destroy(){var _e,tt;(_e=this.room)==null||_e.callbacks.off("onPhaseChanged",this.onPhaseChanged),(tt=this.room)==null||tt.removeMagixEventListener(EnsureReconnectEvent,this.onReconnected),this.releaseDisposers()}}const replaceRoomFunction=(et,_e)=>{if(whiteWebSdkExports.isPlayer(et))delegateSeekToProgressTime(et);else{if(et=et,Object.getOwnPropertyDescriptor(et,"disableCameraTransform"))return;Object.defineProperty(et,"disableCameraTransform",{get(){return _e.mainView.disableCameraTransform},set(rt){_e.mainView.disableCameraTransform=rt}}),Object.defineProperty(et,"canUndoSteps",{get(){return _e.canUndoSteps}}),Object.defineProperty(et,"canRedoSteps",{get(){return _e.canRedoSteps}}),et.moveCamera=rt=>_e.moveCamera(rt),et.moveCameraToContain=(...rt)=>_e.moveCameraToContain(...rt),et.convertToPointInWorld=(...rt)=>_e.mainView.convertToPointInWorld(...rt),et.setCameraBound=(...rt)=>_e.mainView.setCameraBound(...rt),et.scenePreview=(...rt)=>_e.mainView.scenePreview(...rt),et.fillSceneSnapshot=(...rt)=>_e.mainView.fillSceneSnapshot(...rt),et.generateScreenshot=(...rt)=>_e.mainView.generateScreenshot(...rt),et.setMemberState=(...rt)=>_e.mainView.setMemberState(...rt),et.redo=()=>_e.redo(),et.undo=()=>_e.undo(),et.cleanCurrentScene=()=>_e.cleanCurrentScene(),et.delete=()=>_e.delete(),et.copy=()=>_e.copy(),et.paste=()=>_e.paste(),et.duplicate=()=>_e.duplicate(),et.insertImage=(...rt)=>_e.insertImage(...rt),et.completeImageUpload=(...rt)=>_e.completeImageUpload(...rt),et.insertText=(...rt)=>_e.insertText(...rt),et.lockImage=(...rt)=>_e.lockImage(...rt),et.lockImages=(...rt)=>_e.lockImages(...rt),delegateRemoveScenes(et,_e)}},delegateRemoveScenes=(et,_e)=>{const tt=et.removeScenes;et.removeScenes=(rt,nt)=>{var st;rt===ROOT_DIR&&((st=_e.appManager)==null||st.updateRootDirRemoving(!0));const dt=tt.call(et,rt);return internalEmitter.emit("removeScenes",{scenePath:rt,index:nt}),dt}},delegateSeekToProgressTime=et=>{const _e=et.seekToProgressTime;async function tt(rt){await internalEmitter.emit("seekStart");const nt=await _e.call(et,rt);return internalEmitter.emit("seek",rt),nt}et.seekToProgressTime=tt};var styles$1=`.netless-app-docs-viewer-content{position:relative;height:100%;overflow:hidden}.netless-app-docs-viewer-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-docs-viewer-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-docs-viewer-preview-active .netless-app-docs-viewer-preview-mask{display:block}.netless-app-docs-viewer-preview-active .netless-app-docs-viewer-preview{transform:translate(0)}.netless-app-docs-viewer-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-docs-viewer-preview-page:hover,.netless-app-docs-viewer-preview-page.netless-app-docs-viewer-preview-page-active{border-color:#444e601a}.netless-app-docs-viewer-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-docs-viewer-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-docs-viewer-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-docs-viewer-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-docs-viewer-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-docs-viewer-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-docs-viewer-footer-btn:hover{background:transparent!important}}.netless-app-docs-viewer-footer-btn>svg{width:100%;height:100%}.netless-app-docs-viewer-footer-btn>svg:nth-of-type(2){display:none}.netless-app-docs-viewer-footer-btn.netless-app-docs-viewer-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-docs-viewer-footer-btn.netless-app-docs-viewer-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-docs-viewer-footer-btn~.netless-app-docs-viewer-footer-btn{margin-left:15px}.netless-app-docs-viewer-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-docs-viewer-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-docs-viewer-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-docs-viewer-page-number-input:hover,.netless-app-docs-viewer-page-number-input:focus,.netless-app-docs-viewer-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-footer-btn{cursor:not-allowed}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-footer-btn:hover{background:transparent}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-page-number-input{cursor:not-allowed}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-page-number-input:hover,.netless-app-docs-viewer-readonly .netless-app-docs-viewer-page-number-input:focus,.netless-app-docs-viewer-readonly .netless-app-docs-viewer-page-number-input:active{background:transparent;box-shadow:none}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-page-number-input:disabled{color:inherit}.netless-app-docs-viewer-readonly.netless-app-docs-viewer-float-footer{display:none}.telebox-color-scheme-dark .netless-app-docs-viewer-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-docs-viewer-page-number-input:active,.telebox-color-scheme-dark .netless-app-docs-viewer-page-number-input:focus,.telebox-color-scheme-dark .netless-app-docs-viewer-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-docs-viewer-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-docs-viewer-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-docs-viewer-preview{background:rgba(50,50,50,.9)}.netless-app-docs-viewer-static-scrollbar{position:absolute;top:0;right:0;z-index:2147483647;width:8px;min-height:30px;margin:0;padding:0;border:none;outline:none;border-radius:4px;background:rgba(68,78,96,.4);box-shadow:1px 1px 8px #ffffffb3;opacity:0;transition:background .4s,opacity .4s 3s,transform .2s;user-select:none}.netless-app-docs-viewer-static-scrollbar.netless-app-docs-viewer-static-scrollbar-dragging{background:rgba(68,78,96,.6);opacity:1;transition:background .4s,opacity .4s 3s!important}.netless-app-docs-viewer-static-scrollbar:hover,.netless-app-docs-viewer-static-scrollbar:focus{background:rgba(68,78,96,.5)}.netless-app-docs-viewer-static-scrollbar:active{background:rgba(68,78,96,.6)}.netless-app-docs-viewer-content:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.netless-app-docs-viewer-readonly .netless-app-docs-viewer-static-scrollbar{display:none}.netless-app-docs-viewer-static-pages:hover .netless-app-docs-viewer-static-scrollbar{opacity:1;transition:background .4s,opacity .4s,transform .2s}.page-renderer-pages-container{position:relative;overflow:hidden}.page-renderer-page{position:absolute;top:0;left:0;background-position:center;background-size:cover;background-repeat:no-repeat}.page-renderer-pages-container.is-hwa .page-renderer-page{will-change:transform}.page-renderer-page-img{display:block;width:100%;height:auto;user-select:none}.netless-app-docs-viewer-static-pages{overflow:hidden;position:relative;height:100%;user-select:none}.netless-app-docs-viewer-static-page{display:block;width:100%;height:auto;user-select:none}.netless-app-docs-viewer-static-wb-view,.netless-app-docs-viewer-dynamic-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden}.netless-app-docs-viewer-dynamic-wb-view .cursor-clicker .ppt-event-source{cursor:pointer}
`;const copyProperty=(et,_e,tt,rt)=>{if(tt==="length"||tt==="prototype"||tt==="arguments"||tt==="caller")return;const nt=Object.getOwnPropertyDescriptor(et,tt),st=Object.getOwnPropertyDescriptor(_e,tt);!canCopyProperty(nt,st)&&rt||Object.defineProperty(et,tt,st)},canCopyProperty=function(et,_e){return et===void 0||et.configurable||et.writable===_e.writable&&et.enumerable===_e.enumerable&&et.configurable===_e.configurable&&(et.writable||et.value===_e.value)},changePrototype=(et,_e)=>{const tt=Object.getPrototypeOf(_e);tt!==Object.getPrototypeOf(et)&&Object.setPrototypeOf(et,tt)},wrappedToString=(et,_e)=>`/* Wrapped ${et}*/
${_e}`,toStringDescriptor=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),toStringName=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),changeToString=(et,_e,tt)=>{const rt=tt===""?"":`with ${tt.trim()}() `,nt=wrappedToString.bind(null,rt,_e.toString());Object.defineProperty(nt,"name",toStringName),Object.defineProperty(et,"toString",{...toStringDescriptor,value:nt})};function mimicFunction(et,_e,{ignoreNonConfigurable:tt=!1}={}){const{name:rt}=et;for(const nt of Reflect.ownKeys(_e))copyProperty(et,_e,nt,tt);return changePrototype(et,_e),changeToString(et,_e,rt),et}const debounceFn=(et,_e={})=>{if(typeof et!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof et}\``);const{wait:tt=0,maxWait:rt=Number.POSITIVE_INFINITY,before:nt=!1,after:st=!0}=_e;if(!nt&&!st)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let dt,ft,ht;const mt=function(...bt){const St=this,Et=()=>{dt=void 0,ft&&(clearTimeout(ft),ft=void 0),st&&(ht=et.apply(St,bt))},Ct=()=>{ft=void 0,dt&&(clearTimeout(dt),dt=void 0),st&&(ht=et.apply(St,bt))},Rt=nt&&!dt;return clearTimeout(dt),dt=setTimeout(Et,tt),rt>0&&rt!==Number.POSITIVE_INFINITY&&!ft&&(ft=setTimeout(Ct,rt)),Rt&&(ht=et.apply(St,bt)),ht};return mimicFunction(mt,et),mt.cancel=()=>{dt&&(clearTimeout(dt),dt=void 0),ft&&(clearTimeout(ft),ft=void 0)},mt};var SOUP$3="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",SOUP_LEN$3=87,ID_LEN$3=20,reusedIdCarrier$3=[],genUID$3=()=>{for(let et=0;et<ID_LEN$3;et++)reusedIdCarrier$3[et]=SOUP$3.charAt(Math.random()*SOUP_LEN$3);return reusedIdCarrier$3.join("")};function invoke$4(et){try{return et()}catch(_e){console.error(_e)}}var SideEffectManager$2=class{constructor(){this.push=this.addDisposer,this.disposers=new Map}addDisposer(_e,tt=this.genUID()){return this.flush(tt),this.disposers.set(tt,Array.isArray(_e)?joinDisposers$2(_e):_e),tt}add(_e,tt=this.genUID()){const rt=_e();return rt?this.addDisposer(rt,tt):tt}addEventListener(_e,tt,rt,nt,st=this.genUID()){return _e.addEventListener(tt,rt,nt),this.addDisposer(()=>_e.removeEventListener(tt,rt,nt),st),st}setTimeout(_e,tt,rt=this.genUID()){const nt=window.setTimeout(()=>{this.remove(rt),_e()},tt);return this.addDisposer(()=>window.clearTimeout(nt),rt)}setInterval(_e,tt,rt=this.genUID()){const nt=window.setInterval(_e,tt);return this.addDisposer(()=>window.clearInterval(nt),rt)}remove(_e){const tt=this.disposers.get(_e);return this.disposers.delete(_e),tt}flush(_e){const tt=this.remove(_e);tt&&tt()}flushAll(){this.disposers.forEach(invoke$4),this.disposers.clear()}genUID(){let _e;do _e=genUID$3();while(this.disposers.has(_e));return _e}};function joinDisposers$2(et){return()=>et.forEach(invoke$4)}var resizeObservers=[],hasActiveObservations=function(){return resizeObservers.some(function(et){return et.activeTargets.length>0})},hasSkippedObservations=function(){return resizeObservers.some(function(et){return et.skippedTargets.length>0})},msg="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError=function(){var et;typeof ErrorEvent=="function"?et=new ErrorEvent("error",{message:msg}):(et=document.createEvent("Event"),et.initEvent("error",!1,!1),et.message=msg),window.dispatchEvent(et)},ResizeObserverBoxOptions;(function(et){et.BORDER_BOX="border-box",et.CONTENT_BOX="content-box",et.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ResizeObserverBoxOptions||(ResizeObserverBoxOptions={}));var freeze=function(et){return Object.freeze(et)},ResizeObserverSize=(function(){function et(_e,tt){this.inlineSize=_e,this.blockSize=tt,freeze(this)}return et})(),DOMRectReadOnly=(function(){function et(_e,tt,rt,nt){return this.x=_e,this.y=tt,this.width=rt,this.height=nt,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze(this)}return et.prototype.toJSON=function(){var _e=this,tt=_e.x,rt=_e.y,nt=_e.top,st=_e.right,dt=_e.bottom,ft=_e.left,ht=_e.width,mt=_e.height;return{x:tt,y:rt,top:nt,right:st,bottom:dt,left:ft,width:ht,height:mt}},et.fromRect=function(_e){return new et(_e.x,_e.y,_e.width,_e.height)},et})(),isSVG=function(et){return et instanceof SVGElement&&"getBBox"in et},isHidden=function(et){if(isSVG(et)){var _e=et.getBBox(),tt=_e.width,rt=_e.height;return!tt&&!rt}var nt=et,st=nt.offsetWidth,dt=nt.offsetHeight;return!(st||dt||et.getClientRects().length)},isElement=function(et){var _e;if(et instanceof Element)return!0;var tt=(_e=et?.ownerDocument)===null||_e===void 0?void 0:_e.defaultView;return!!(tt&&et instanceof tt.Element)},isReplacedElement=function(et){switch(et.tagName){case"INPUT":if(et.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},global$1=typeof window<"u"?window:{},cache=new WeakMap,scrollRegexp=/auto|scroll/,verticalRegexp=/^tb|vertical/,IE=/msie|trident/i.test(global$1.navigator&&global$1.navigator.userAgent),parseDimension=function(et){return parseFloat(et||"0")},size=function(et,_e,tt){return et===void 0&&(et=0),_e===void 0&&(_e=0),tt===void 0&&(tt=!1),new ResizeObserverSize((tt?_e:et)||0,(tt?et:_e)||0)},zeroBoxes=freeze({devicePixelContentBoxSize:size(),borderBoxSize:size(),contentBoxSize:size(),contentRect:new DOMRectReadOnly(0,0,0,0)}),calculateBoxSizes=function(et,_e){if(_e===void 0&&(_e=!1),cache.has(et)&&!_e)return cache.get(et);if(isHidden(et))return cache.set(et,zeroBoxes),zeroBoxes;var tt=getComputedStyle(et),rt=isSVG(et)&&et.ownerSVGElement&&et.getBBox(),nt=!IE&&tt.boxSizing==="border-box",st=verticalRegexp.test(tt.writingMode||""),dt=!rt&&scrollRegexp.test(tt.overflowY||""),ft=!rt&&scrollRegexp.test(tt.overflowX||""),ht=rt?0:parseDimension(tt.paddingTop),mt=rt?0:parseDimension(tt.paddingRight),bt=rt?0:parseDimension(tt.paddingBottom),St=rt?0:parseDimension(tt.paddingLeft),Et=rt?0:parseDimension(tt.borderTopWidth),Ct=rt?0:parseDimension(tt.borderRightWidth),Rt=rt?0:parseDimension(tt.borderBottomWidth),Tt=rt?0:parseDimension(tt.borderLeftWidth),wt=St+mt,At=ht+bt,Nt=Tt+Ct,Pt=Et+Rt,It=ft?et.offsetHeight-Pt-et.clientHeight:0,Ft=dt?et.offsetWidth-Nt-et.clientWidth:0,qt=nt?wt+Nt:0,Vt=nt?At+Pt:0,Kt=rt?rt.width:parseDimension(tt.width)-qt-Ft,jt=rt?rt.height:parseDimension(tt.height)-Vt-It,Ut=Kt+wt+Ft+Nt,Ot=jt+At+It+Pt,Wt=freeze({devicePixelContentBoxSize:size(Math.round(Kt*devicePixelRatio),Math.round(jt*devicePixelRatio),st),borderBoxSize:size(Ut,Ot,st),contentBoxSize:size(Kt,jt,st),contentRect:new DOMRectReadOnly(St,ht,Kt,jt)});return cache.set(et,Wt),Wt},calculateBoxSize=function(et,_e,tt){var rt=calculateBoxSizes(et,tt),nt=rt.borderBoxSize,st=rt.contentBoxSize,dt=rt.devicePixelContentBoxSize;switch(_e){case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:return dt;case ResizeObserverBoxOptions.BORDER_BOX:return nt;default:return st}},ResizeObserverEntry=(function(){function et(_e){var tt=calculateBoxSizes(_e);this.target=_e,this.contentRect=tt.contentRect,this.borderBoxSize=freeze([tt.borderBoxSize]),this.contentBoxSize=freeze([tt.contentBoxSize]),this.devicePixelContentBoxSize=freeze([tt.devicePixelContentBoxSize])}return et})(),calculateDepthForNode=function(et){if(isHidden(et))return 1/0;for(var _e=0,tt=et.parentNode;tt;)_e+=1,tt=tt.parentNode;return _e},broadcastActiveObservations=function(){var et=1/0,_e=[];resizeObservers.forEach(function(dt){if(dt.activeTargets.length!==0){var ft=[];dt.activeTargets.forEach(function(mt){var bt=new ResizeObserverEntry(mt.target),St=calculateDepthForNode(mt.target);ft.push(bt),mt.lastReportedSize=calculateBoxSize(mt.target,mt.observedBox),St<et&&(et=St)}),_e.push(function(){dt.callback.call(dt.observer,ft,dt.observer)}),dt.activeTargets.splice(0,dt.activeTargets.length)}});for(var tt=0,rt=_e;tt<rt.length;tt++){var nt=rt[tt];nt()}return et},gatherActiveObservationsAtDepth=function(et){resizeObservers.forEach(function(tt){tt.activeTargets.splice(0,tt.activeTargets.length),tt.skippedTargets.splice(0,tt.skippedTargets.length),tt.observationTargets.forEach(function(nt){nt.isActive()&&(calculateDepthForNode(nt.target)>et?tt.activeTargets.push(nt):tt.skippedTargets.push(nt))})})},process$1=function(){var et=0;for(gatherActiveObservationsAtDepth(et);hasActiveObservations();)et=broadcastActiveObservations(),gatherActiveObservationsAtDepth(et);return hasSkippedObservations()&&deliverResizeLoopError(),et>0},trigger,callbacks=[],notify=function(){return callbacks.splice(0).forEach(function(et){return et()})},queueMicroTask=function(et){if(!trigger){var _e=0,tt=document.createTextNode(""),rt={characterData:!0};new MutationObserver(function(){return notify()}).observe(tt,rt),trigger=function(){tt.textContent="".concat(_e?_e--:_e++)}}callbacks.push(et),trigger()},queueResizeObserver=function(et){queueMicroTask(function(){requestAnimationFrame(et)})},watching=0,isWatching=function(){return!!watching},CATCH_PERIOD=250,observerConfig={attributes:!0,characterData:!0,childList:!0,subtree:!0},events=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time=function(et){return et===void 0&&(et=0),Date.now()+et},scheduled=!1,Scheduler=(function(){function et(){var _e=this;this.stopped=!0,this.listener=function(){return _e.schedule()}}return et.prototype.run=function(_e){var tt=this;if(_e===void 0&&(_e=CATCH_PERIOD),!scheduled){scheduled=!0;var rt=time(_e);queueResizeObserver(function(){var nt=!1;try{nt=process$1()}finally{if(scheduled=!1,_e=rt-time(),!isWatching())return;nt?tt.run(1e3):_e>0?tt.run(_e):tt.start()}})}},et.prototype.schedule=function(){this.stop(),this.run()},et.prototype.observe=function(){var _e=this,tt=function(){return _e.observer&&_e.observer.observe(document.body,observerConfig)};document.body?tt():global$1.addEventListener("DOMContentLoaded",tt)},et.prototype.start=function(){var _e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),events.forEach(function(tt){return global$1.addEventListener(tt,_e.listener,!0)}))},et.prototype.stop=function(){var _e=this;this.stopped||(this.observer&&this.observer.disconnect(),events.forEach(function(tt){return global$1.removeEventListener(tt,_e.listener,!0)}),this.stopped=!0)},et})(),scheduler$1=new Scheduler,updateCount=function(et){!watching&&et>0&&scheduler$1.start(),watching+=et,!watching&&scheduler$1.stop()},skipNotifyOnElement=function(et){return!isSVG(et)&&!isReplacedElement(et)&&getComputedStyle(et).display==="inline"},ResizeObservation=(function(){function et(_e,tt){this.target=_e,this.observedBox=tt||ResizeObserverBoxOptions.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return et.prototype.isActive=function(){var _e=calculateBoxSize(this.target,this.observedBox,!0);return skipNotifyOnElement(this.target)&&(this.lastReportedSize=_e),this.lastReportedSize.inlineSize!==_e.inlineSize||this.lastReportedSize.blockSize!==_e.blockSize},et})(),ResizeObserverDetail=(function(){function et(_e,tt){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=_e,this.callback=tt}return et})(),observerMap=new WeakMap,getObservationIndex=function(et,_e){for(var tt=0;tt<et.length;tt+=1)if(et[tt].target===_e)return tt;return-1},ResizeObserverController=(function(){function et(){}return et.connect=function(_e,tt){var rt=new ResizeObserverDetail(_e,tt);observerMap.set(_e,rt)},et.observe=function(_e,tt,rt){var nt=observerMap.get(_e),st=nt.observationTargets.length===0;getObservationIndex(nt.observationTargets,tt)<0&&(st&&resizeObservers.push(nt),nt.observationTargets.push(new ResizeObservation(tt,rt&&rt.box)),updateCount(1),scheduler$1.schedule())},et.unobserve=function(_e,tt){var rt=observerMap.get(_e),nt=getObservationIndex(rt.observationTargets,tt),st=rt.observationTargets.length===1;nt>=0&&(st&&resizeObservers.splice(resizeObservers.indexOf(rt),1),rt.observationTargets.splice(nt,1),updateCount(-1))},et.disconnect=function(_e){var tt=this,rt=observerMap.get(_e);rt.observationTargets.slice().forEach(function(nt){return tt.unobserve(_e,nt.target)}),rt.activeTargets.splice(0,rt.activeTargets.length)},et})(),ResizeObserver$1=(function(){function et(_e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof _e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ResizeObserverController.connect(this,_e)}return et.prototype.observe=function(_e,tt){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement(_e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.observe(this,_e,tt)},et.prototype.unobserve=function(_e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement(_e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ResizeObserverController.unobserve(this,_e)},et.prototype.disconnect=function(){ResizeObserverController.disconnect(this)},et.toString=function(){return"function ResizeObserver () { [polyfill code] }"},et})();function sidebarSVG$1(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-sidebar`),tt.setAttribute("viewBox","0 0 64 64");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),tt.appendChild(rt),tt}function arrowLeftSVG$1(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-arrow-left`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),tt.appendChild(rt),tt}function arrowRightSVG$1(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-arrow-right`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),tt.appendChild(rt),tt}function playSVG$1(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-play`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),tt.appendChild(rt),tt}function pauseSVG$1(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-pause`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),tt.appendChild(rt),tt}const runningOnBrowser$1=typeof window<"u",isBot$1=runningOnBrowser$1&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),supportsIntersectionObserver$1=runningOnBrowser$1&&"IntersectionObserver"in window,supportsClassList$1=runningOnBrowser$1&&"classList"in document.createElement("p"),isHiDpi$1=runningOnBrowser$1&&window.devicePixelRatio>1,defaultSettings$1={elements_selector:".lazy",container:isBot$1||runningOnBrowser$1?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},getExtendedSettings$1=et=>Object.assign({},defaultSettings$1,et),createInstance$1=function(et,_e){let tt;const rt="LazyLoad::Initialized",nt=new et(_e);try{tt=new CustomEvent(rt,{detail:{instance:nt}})}catch{tt=document.createEvent("CustomEvent"),tt.initCustomEvent(rt,!1,!1,{instance:nt})}window.dispatchEvent(tt)},autoInitialize$1=(et,_e)=>{if(_e)if(!_e.length)createInstance$1(et,_e);else for(let tt=0,rt;rt=_e[tt];tt+=1)createInstance$1(et,rt)},SRC$1="src",SRCSET$1="srcset",SIZES$1="sizes",POSTER$1="poster",ORIGINALS$1="llOriginalAttrs",DATA$1="data",statusLoading$1="loading",statusLoaded$1="loaded",statusApplied$1="applied",statusEntered$1="entered",statusError$1="error",statusNative$1="native",dataPrefix$1="data-",statusDataName$1="ll-status",getData$1=(et,_e)=>et.getAttribute(dataPrefix$1+_e),setData$1=(et,_e,tt)=>{const rt=dataPrefix$1+_e;if(tt===null){et.removeAttribute(rt);return}et.setAttribute(rt,tt)},getStatus$1=et=>getData$1(et,statusDataName$1),setStatus$1=(et,_e)=>setData$1(et,statusDataName$1,_e),resetStatus$1=et=>setStatus$1(et,null),hasEmptyStatus$1=et=>getStatus$1(et)===null,hasStatusLoading$1=et=>getStatus$1(et)===statusLoading$1,hasStatusError$1=et=>getStatus$1(et)===statusError$1,hasStatusNative$1=et=>getStatus$1(et)===statusNative$1,statusesAfterLoading$1=[statusLoading$1,statusLoaded$1,statusApplied$1,statusError$1],hadStartedLoading$1=et=>statusesAfterLoading$1.indexOf(getStatus$1(et))>=0,safeCallback$1=(et,_e,tt,rt)=>{if(!(!et||typeof et!="function")){if(rt!==void 0){et(_e,tt,rt);return}if(tt!==void 0){et(_e,tt);return}et(_e)}},addClass$1=(et,_e)=>{if(_e!==""){if(supportsClassList$1){et.classList.add(_e);return}et.className+=(et.className?" ":"")+_e}},removeClass$1=(et,_e)=>{if(_e!==""){if(supportsClassList$1){et.classList.remove(_e);return}et.className=et.className.replace(new RegExp("(^|\\s+)"+_e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}},addTempImage$1=et=>{et.llTempImage=document.createElement("IMG")},deleteTempImage$1=et=>{delete et.llTempImage},getTempImage$1=et=>et.llTempImage,unobserve$1=(et,_e)=>{if(!_e)return;const tt=_e._observer;tt&&tt.unobserve(et)},resetObserver$1=et=>{et.disconnect()},unobserveEntered$1=(et,_e,tt)=>{_e.unobserve_entered&&unobserve$1(et,tt)},updateLoadingCount$1=(et,_e)=>{et&&(et.loadingCount+=_e)},decreaseToLoadCount$1=et=>{et&&(et.toLoadCount-=1)},setToLoadCount$1=(et,_e)=>{et&&(et.toLoadCount=_e)},isSomethingLoading$1=et=>et.loadingCount>0,haveElementsToLoad$1=et=>et.toLoadCount>0,getSourceTags$1=et=>{let _e=[];for(let tt=0,rt;rt=et.children[tt];tt+=1)rt.tagName==="SOURCE"&&_e.push(rt);return _e},forEachPictureSource$1=(et,_e)=>{const tt=et.parentNode;if(!tt||tt.tagName!=="PICTURE")return;getSourceTags$1(tt).forEach(_e)},forEachVideoSource$1=(et,_e)=>{getSourceTags$1(et).forEach(_e)},attrsSrc$1=[SRC$1],attrsSrcPoster$1=[SRC$1,POSTER$1],attrsSrcSrcsetSizes$1=[SRC$1,SRCSET$1,SIZES$1],attrsData$1=[DATA$1],hasOriginalAttrs$1=et=>!!et[ORIGINALS$1],getOriginalAttrs$1=et=>et[ORIGINALS$1],deleteOriginalAttrs$1=et=>delete et[ORIGINALS$1],setOriginalsObject$1=(et,_e)=>{if(hasOriginalAttrs$1(et))return;const tt={};_e.forEach(rt=>{tt[rt]=et.getAttribute(rt)}),et[ORIGINALS$1]=tt},saveOriginalBackgroundStyle$1=et=>{hasOriginalAttrs$1(et)||(et[ORIGINALS$1]={backgroundImage:et.style.backgroundImage})},setOrResetAttribute$1=(et,_e,tt)=>{if(!tt){et.removeAttribute(_e);return}et.setAttribute(_e,tt)},restoreOriginalAttrs$1=(et,_e)=>{if(!hasOriginalAttrs$1(et))return;const tt=getOriginalAttrs$1(et);_e.forEach(rt=>{setOrResetAttribute$1(et,rt,tt[rt])})},restoreOriginalBgImage$1=et=>{if(!hasOriginalAttrs$1(et))return;const _e=getOriginalAttrs$1(et);et.style.backgroundImage=_e.backgroundImage},manageApplied$1=(et,_e,tt)=>{addClass$1(et,_e.class_applied),setStatus$1(et,statusApplied$1),tt&&(_e.unobserve_completed&&unobserve$1(et,_e),safeCallback$1(_e.callback_applied,et,tt))},manageLoading$1=(et,_e,tt)=>{addClass$1(et,_e.class_loading),setStatus$1(et,statusLoading$1),tt&&(updateLoadingCount$1(tt,1),safeCallback$1(_e.callback_loading,et,tt))},setAttributeIfValue$1=(et,_e,tt)=>{tt&&et.setAttribute(_e,tt)},setImageAttributes$1=(et,_e)=>{setAttributeIfValue$1(et,SIZES$1,getData$1(et,_e.data_sizes)),setAttributeIfValue$1(et,SRCSET$1,getData$1(et,_e.data_srcset)),setAttributeIfValue$1(et,SRC$1,getData$1(et,_e.data_src))},setSourcesImg$1=(et,_e)=>{forEachPictureSource$1(et,tt=>{setOriginalsObject$1(tt,attrsSrcSrcsetSizes$1),setImageAttributes$1(tt,_e)}),setOriginalsObject$1(et,attrsSrcSrcsetSizes$1),setImageAttributes$1(et,_e)},setSourcesIframe$1=(et,_e)=>{setOriginalsObject$1(et,attrsSrc$1),setAttributeIfValue$1(et,SRC$1,getData$1(et,_e.data_src))},setSourcesVideo$1=(et,_e)=>{forEachVideoSource$1(et,tt=>{setOriginalsObject$1(tt,attrsSrc$1),setAttributeIfValue$1(tt,SRC$1,getData$1(tt,_e.data_src))}),setOriginalsObject$1(et,attrsSrcPoster$1),setAttributeIfValue$1(et,POSTER$1,getData$1(et,_e.data_poster)),setAttributeIfValue$1(et,SRC$1,getData$1(et,_e.data_src)),et.load()},setSourcesObject$1=(et,_e)=>{setOriginalsObject$1(et,attrsData$1),setAttributeIfValue$1(et,DATA$1,getData$1(et,_e.data_src))},setBackground$1=(et,_e,tt)=>{const rt=getData$1(et,_e.data_bg),nt=getData$1(et,_e.data_bg_hidpi),st=isHiDpi$1&&nt?nt:rt;st&&(et.style.backgroundImage=`url("${st}")`,getTempImage$1(et).setAttribute(SRC$1,st),manageLoading$1(et,_e,tt))},setMultiBackground$1=(et,_e,tt)=>{const rt=getData$1(et,_e.data_bg_multi),nt=getData$1(et,_e.data_bg_multi_hidpi),st=isHiDpi$1&&nt?nt:rt;st&&(et.style.backgroundImage=st,manageApplied$1(et,_e,tt))},setImgsetBackground$1=(et,_e,tt)=>{const rt=getData$1(et,_e.data_bg_set);if(!rt)return;const nt=rt.split("|");let st=nt.map(dt=>`image-set(${dt})`);et.style.backgroundImage=st.join(),et.style.backgroundImage===""&&(st=nt.map(dt=>`-webkit-image-set(${dt})`),et.style.backgroundImage=st.join()),manageApplied$1(et,_e,tt)},setSourcesFunctions$1={IMG:setSourcesImg$1,IFRAME:setSourcesIframe$1,VIDEO:setSourcesVideo$1,OBJECT:setSourcesObject$1},setSourcesNative$1=(et,_e)=>{const tt=setSourcesFunctions$1[et.tagName];tt&&tt(et,_e)},setSources$1=(et,_e,tt)=>{const rt=setSourcesFunctions$1[et.tagName];rt&&(rt(et,_e),manageLoading$1(et,_e,tt))},elementsWithLoadEvent$1=["IMG","IFRAME","VIDEO","OBJECT"],hasLoadEvent$1=et=>elementsWithLoadEvent$1.indexOf(et.tagName)>-1,checkFinish$1=(et,_e)=>{_e&&!isSomethingLoading$1(_e)&&!haveElementsToLoad$1(_e)&&safeCallback$1(et.callback_finish,_e)},addEventListener$1=(et,_e,tt)=>{et.addEventListener(_e,tt),et.llEvLisnrs[_e]=tt},removeEventListener$1=(et,_e,tt)=>{et.removeEventListener(_e,tt)},hasEventListeners$1=et=>!!et.llEvLisnrs,addEventListeners$1=(et,_e,tt)=>{hasEventListeners$1(et)||(et.llEvLisnrs={});const rt=et.tagName==="VIDEO"?"loadeddata":"load";addEventListener$1(et,rt,_e),addEventListener$1(et,"error",tt)},removeEventListeners$1=et=>{if(!hasEventListeners$1(et))return;const _e=et.llEvLisnrs;for(let tt in _e){const rt=_e[tt];removeEventListener$1(et,tt,rt)}delete et.llEvLisnrs},doneHandler$1=(et,_e,tt)=>{deleteTempImage$1(et),updateLoadingCount$1(tt,-1),decreaseToLoadCount$1(tt),removeClass$1(et,_e.class_loading),_e.unobserve_completed&&unobserve$1(et,tt)},loadHandler$1=(et,_e,tt,rt)=>{const nt=hasStatusNative$1(_e);doneHandler$1(_e,tt,rt),addClass$1(_e,tt.class_loaded),setStatus$1(_e,statusLoaded$1),safeCallback$1(tt.callback_loaded,_e,rt),nt||checkFinish$1(tt,rt)},errorHandler$1=(et,_e,tt,rt)=>{const nt=hasStatusNative$1(_e);doneHandler$1(_e,tt,rt),addClass$1(_e,tt.class_error),setStatus$1(_e,statusError$1),safeCallback$1(tt.callback_error,_e,rt),tt.restore_on_error&&restoreOriginalAttrs$1(_e,attrsSrcSrcsetSizes$1),nt||checkFinish$1(tt,rt)},addOneShotEventListeners$1=(et,_e,tt)=>{const rt=getTempImage$1(et)||et;if(hasEventListeners$1(rt))return;addEventListeners$1(rt,dt=>{loadHandler$1(dt,et,_e,tt),removeEventListeners$1(rt)},dt=>{errorHandler$1(dt,et,_e,tt),removeEventListeners$1(rt)})},loadBackground$1=(et,_e,tt)=>{addTempImage$1(et),addOneShotEventListeners$1(et,_e,tt),saveOriginalBackgroundStyle$1(et),setBackground$1(et,_e,tt),setMultiBackground$1(et,_e,tt),setImgsetBackground$1(et,_e,tt)},loadRegular$1=(et,_e,tt)=>{addOneShotEventListeners$1(et,_e,tt),setSources$1(et,_e,tt)},load$1=(et,_e,tt)=>{hasLoadEvent$1(et)?loadRegular$1(et,_e,tt):loadBackground$1(et,_e,tt)},loadNative$1=(et,_e,tt)=>{et.setAttribute("loading","lazy"),addOneShotEventListeners$1(et,_e,tt),setSourcesNative$1(et,_e),setStatus$1(et,statusNative$1)},removeImageAttributes$1=et=>{et.removeAttribute(SRC$1),et.removeAttribute(SRCSET$1),et.removeAttribute(SIZES$1)},resetSourcesImg$1=et=>{forEachPictureSource$1(et,_e=>{removeImageAttributes$1(_e)}),removeImageAttributes$1(et)},restoreImg$1=et=>{forEachPictureSource$1(et,_e=>{restoreOriginalAttrs$1(_e,attrsSrcSrcsetSizes$1)}),restoreOriginalAttrs$1(et,attrsSrcSrcsetSizes$1)},restoreVideo$1=et=>{forEachVideoSource$1(et,_e=>{restoreOriginalAttrs$1(_e,attrsSrc$1)}),restoreOriginalAttrs$1(et,attrsSrcPoster$1),et.load()},restoreIframe$1=et=>{restoreOriginalAttrs$1(et,attrsSrc$1)},restoreObject$1=et=>{restoreOriginalAttrs$1(et,attrsData$1)},restoreFunctions$1={IMG:restoreImg$1,IFRAME:restoreIframe$1,VIDEO:restoreVideo$1,OBJECT:restoreObject$1},restoreAttributes$1=et=>{const _e=restoreFunctions$1[et.tagName];if(!_e){restoreOriginalBgImage$1(et);return}_e(et)},resetClasses$1=(et,_e)=>{hasEmptyStatus$1(et)||hasStatusNative$1(et)||(removeClass$1(et,_e.class_entered),removeClass$1(et,_e.class_exited),removeClass$1(et,_e.class_applied),removeClass$1(et,_e.class_loading),removeClass$1(et,_e.class_loaded),removeClass$1(et,_e.class_error))},restore$1=(et,_e)=>{restoreAttributes$1(et),resetClasses$1(et,_e),resetStatus$1(et),deleteOriginalAttrs$1(et)},cancelLoading$1=(et,_e,tt,rt)=>{tt.cancel_on_exit&&hasStatusLoading$1(et)&&et.tagName==="IMG"&&(removeEventListeners$1(et),resetSourcesImg$1(et),restoreImg$1(et),removeClass$1(et,tt.class_loading),updateLoadingCount$1(rt,-1),resetStatus$1(et),safeCallback$1(tt.callback_cancel,et,_e,rt))},onEnter$1=(et,_e,tt,rt)=>{const nt=hadStartedLoading$1(et);setStatus$1(et,statusEntered$1),addClass$1(et,tt.class_entered),removeClass$1(et,tt.class_exited),unobserveEntered$1(et,tt,rt),safeCallback$1(tt.callback_enter,et,_e,rt),!nt&&load$1(et,tt,rt)},onExit$1=(et,_e,tt,rt)=>{hasEmptyStatus$1(et)||(addClass$1(et,tt.class_exited),cancelLoading$1(et,_e,tt,rt),safeCallback$1(tt.callback_exit,et,_e,rt))},tagsWithNativeLazy$1=["IMG","IFRAME","VIDEO"],shouldUseNative$1=et=>et.use_native&&"loading"in HTMLImageElement.prototype,loadAllNative$1=(et,_e,tt)=>{et.forEach(rt=>{tagsWithNativeLazy$1.indexOf(rt.tagName)!==-1&&loadNative$1(rt,_e,tt)}),setToLoadCount$1(tt,0)},isIntersecting$1=et=>et.isIntersecting||et.intersectionRatio>0,getObserverSettings$1=et=>({root:et.container===document?null:et.container,rootMargin:et.thresholds||et.threshold+"px"}),intersectionHandler$1=(et,_e,tt)=>{et.forEach(rt=>isIntersecting$1(rt)?onEnter$1(rt.target,rt,_e,tt):onExit$1(rt.target,rt,_e,tt))},observeElements$1=(et,_e)=>{_e.forEach(tt=>{et.observe(tt)})},updateObserver$1=(et,_e)=>{resetObserver$1(et),observeElements$1(et,_e)},setObserver$1=(et,_e)=>{!supportsIntersectionObserver$1||shouldUseNative$1(et)||(_e._observer=new IntersectionObserver(tt=>{intersectionHandler$1(tt,et,_e)},getObserverSettings$1(et)))},toArray$1=et=>Array.prototype.slice.call(et),queryElements$1=et=>et.container.querySelectorAll(et.elements_selector),excludeManagedElements$1=et=>toArray$1(et).filter(hasEmptyStatus$1),hasError$1=et=>hasStatusError$1(et),filterErrorElements$1=et=>toArray$1(et).filter(hasError$1),getElementsToLoad$1=(et,_e)=>excludeManagedElements$1(et||queryElements$1(_e)),retryLazyLoad$1=(et,_e)=>{filterErrorElements$1(queryElements$1(et)).forEach(rt=>{removeClass$1(rt,et.class_error),resetStatus$1(rt)}),_e.update()},setOnlineCheck$1=(et,_e)=>{runningOnBrowser$1&&(_e._onlineHandler=()=>{retryLazyLoad$1(et,_e)},window.addEventListener("online",_e._onlineHandler))},resetOnlineCheck$1=et=>{runningOnBrowser$1&&window.removeEventListener("online",et._onlineHandler)},LazyLoad$1=function(et,_e){const tt=getExtendedSettings$1(et);this._settings=tt,this.loadingCount=0,setObserver$1(tt,this),setOnlineCheck$1(tt,this),this.update(_e)};LazyLoad$1.prototype={update:function(et){const _e=this._settings,tt=getElementsToLoad$1(et,_e);if(setToLoadCount$1(this,tt.length),isBot$1||!supportsIntersectionObserver$1){this.loadAll(tt);return}if(shouldUseNative$1(_e)){loadAllNative$1(tt,_e,this);return}updateObserver$1(this._observer,tt)},destroy:function(){this._observer&&this._observer.disconnect(),resetOnlineCheck$1(this),queryElements$1(this._settings).forEach(et=>{deleteOriginalAttrs$1(et)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(et){const _e=this._settings;getElementsToLoad$1(et,_e).forEach(rt=>{unobserve$1(rt,this),load$1(rt,_e,this)})},restoreAll:function(){const et=this._settings;queryElements$1(et).forEach(_e=>{restore$1(_e,et)})}};LazyLoad$1.load=(et,_e)=>{const tt=getExtendedSettings$1(_e);load$1(et,tt)};LazyLoad$1.resetStatus=et=>{resetStatus$1(et)};runningOnBrowser$1&&autoInitialize$1(LazyLoad$1,window.lazyLoadOptions);let DocsViewer$1=class{constructor({readonly:_e,box:tt,pages:rt,onNewPageIndex:nt,onPlay:st}){if(this.pageIndex=0,this.namespace="netless-app-docs-viewer",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new SideEffectManager$2,rt.length<=0)throw new Error("[DocsViewer] Empty pages.");this.readonly=_e,this.box=tt,this.pages=rt,this.onNewPageIndex=nt,this.onPlay=st,this.onPageIndexChanged=()=>{},this.render()}mount(){this.box.mountContent(this.$content),this.box.mountFooter(this.$footer),this.sideEffect.add(()=>{const _e=new LazyLoad$1({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`});return()=>_e.destroy()},"preview-lazyload")}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(_e){this.readonly!==_e&&(this.readonly=_e,this.$content.classList.toggle(this.wrapClassName("readonly"),_e),this.$footer.classList.toggle(this.wrapClassName("readonly"),_e),this.$pageNumberInput.disabled=_e)}destroy(){this.sideEffect.flushAll(),this.unmount()}setPageIndex(_e){Number.isNaN(_e)||(this.pageIndex=_e,this.$pageNumberInput.value=String(_e+1),this.onPageIndexChanged(_e))}setSmallBox(_e){this.isSmallBox!==_e&&(this.isSmallBox=_e,this.$footer.classList.toggle(this.wrapClassName("float-footer"),_e))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const _e=document.createElement("div");_e.className=this.wrapClassName("content"),this.$content=_e,this.readonly&&_e.classList.add(this.wrapClassName("readonly")),_e.appendChild(this.renderPreviewMask()),_e.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const _e=document.createElement("div");_e.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=_e;const tt=this.wrapClassName("preview-page"),rt=this.wrapClassName("preview-page-name");this.pages.forEach((nt,st)=>{var dt;const ft=(dt=nt.thumbnail)!=null?dt:nt.src.startsWith("ppt")?void 0:nt.src;if(!ft)return;const ht=String(st),mt=document.createElement("a");mt.className=tt+" "+this.wrapClassName(`preview-page-${st}`),mt.setAttribute("href","#"),mt.dataset.pageIndex=ht;const bt=document.createElement("span");bt.className=rt,bt.textContent=String(st+1),bt.dataset.pageIndex=ht;const St=document.createElement("img");St.width=nt.width,St.height=nt.height,St.dataset.src=ft,St.dataset.pageIndex=ht,mt.appendChild(St),mt.appendChild(bt),_e.appendChild(mt)}),this.sideEffect.addEventListener(_e,"click",nt=>{var st;if(this.readonly)return;const dt=(st=nt.target.dataset)==null?void 0:st.pageIndex;dt&&(nt.preventDefault(),nt.stopPropagation(),nt.stopImmediatePropagation(),this.onNewPageIndex(Number(dt)),this.togglePreview(!1))})}return this.$preview}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",_e=>{this.readonly||_e.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}renderFooter(){if(!this.$footer){const _e=document.createElement("div");if(_e.className=this.wrapClassName("footer"),this.$footer=_e,this.readonly&&_e.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&_e.classList.add(this.wrapClassName("float-footer")),this.pages.some(ht=>ht.thumbnail||!ht.src.startsWith("ppt"))){const ht=this.renderFooterBtn("btn-sidebar",sidebarSVG$1(this.namespace));this.sideEffect.addEventListener(ht,"click",()=>{this.readonly||this.togglePreview()}),this.$footer.appendChild(ht)}const tt=document.createElement("div");tt.className=this.wrapClassName("page-jumps");const rt=this.renderFooterBtn("btn-page-back",arrowLeftSVG$1(this.namespace));if(this.sideEffect.addEventListener(rt,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1)}),tt.appendChild(rt),this.onPlay){const ht=this.renderFooterBtn("btn-page-play",playSVG$1(this.namespace),pauseSVG$1(this.namespace)),mt=()=>{this.sideEffect.setTimeout(()=>{ht.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},500,"returnPlay")};this.sideEffect.addEventListener(ht,"click",()=>{this.readonly||(ht.classList.toggle(this.wrapClassName("footer-btn-playing"),!0),this.onPlay&&this.onPlay(),mt())}),tt.appendChild(ht)}const nt=this.renderFooterBtn("btn-page-next",arrowRightSVG$1(this.namespace));this.sideEffect.addEventListener(nt,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1)}),tt.appendChild(nt);const st=document.createElement("div");st.className=this.wrapClassName("page-number");const dt=document.createElement("input");dt.className=this.wrapClassName("page-number-input"),dt.value=String(this.pageIndex+1),this.readonly&&(dt.disabled=!0),this.$pageNumberInput=dt,this.sideEffect.addEventListener(dt,"focus",()=>{dt.select()}),this.sideEffect.addEventListener(dt,"change",()=>{this.readonly||dt.value&&this.onNewPageIndex(Number(dt.value)-1)});const ft=document.createElement("span");ft.textContent=" / "+this.pages.length,st.appendChild(dt),st.appendChild(ft),this.$footer.appendChild(tt),this.$footer.appendChild(st)}return this.$footer}renderFooterBtn(_e,tt,rt){const nt=document.createElement("button");return nt.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(_e),nt.appendChild(tt),rt&&nt.appendChild(rt),nt}togglePreview(_e){if(this.isShowPreview=_e??!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const tt=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));tt&&this.$preview.scrollTo({top:tt.offsetTop-16})}}wrapClassName(_e){return`${this.namespace}-${_e}`}};function clamp$3(et,_e,tt){return Math.min(Math.max(et,_e),tt)}function flattenEvent(et){return et.touches?et.touches[0]:et}function preventEvent(et){et.stopPropagation(),et.cancelable&&et.preventDefault()}function isEditable$1(et){if(!et)return!1;const _e=et.tagName;return _e==="INPUT"||_e==="TEXTAREA"||_e==="SELECT"}class Stepper{constructor(_e){var tt,rt,nt;this.velocity=0,this.paused=!0,this._animationFrameID=null,this._loopTimestamp=0,this.looper=st=>{if(this.paused)return;let dt=Math.floor((st-this._loopTimestamp)/1e3*60)+1;for(this._loopTimestamp=st;dt-- >0;)this.stepper();this.onStep(this.current,this),!this.paused&&this.current!==this.target&&window.requestAnimationFrame(this.looper)},this.current=(tt=_e.start)!=null?tt:0,this.target=this.current,this.stiffness=(rt=_e.stiffness)!=null?rt:170,this.damping=(nt=_e.damping)!=null?nt:26,this.onStep=_e.onStep}stepTo(_e,tt){this.paused&&tt!=null&&(this.current=tt),this.paused=!1,this.target=_e,this.onStep(this.current,this),this._loopTimestamp=Date.now(),window.requestAnimationFrame(this.looper)}pause(){this.paused=!0}destroy(){this.pause()}stepper(){const _e=-this.stiffness*(this.current-this.target),tt=-this.damping*this.velocity,rt=this.velocity+(_e+tt)/60,nt=this.current+rt/60;Math.abs(rt-0)<.01&&Math.abs(nt-this.target)<.01?(this.current=this.target,this.velocity=0):(this.current=nt,this.velocity=rt)}}class PageEl{constructor(_e,tt,rt,nt){this.scale=1,this.lastVisit=Date.now(),this.pageOffsetY=0,this.pageOffsetX=0,this.visible=!0,this.index=_e,this.page=tt,this.scale=rt,this.pageOffsetX=(nt-tt.width)/2;const st=document.createElement("div");st.className="page-renderer-page",st.dataset.index=`${_e}`,st.style.width=`${tt.width*rt}px`,st.style.height=`${tt.height*rt}px`,tt.thumbnail&&(st.style.backgroundImage=`url("${tt.thumbnail}")`);const dt=document.createElement("img");dt.className="page-renderer-page-img",dt.width=tt.width,dt.height=tt.height,dt.src=tt.src,st.appendChild(dt),this.$page=st}translateY(_e){Math.abs(_e-this.pageOffsetY)>=.001&&(this.pageOffsetY=_e,this.$page.style.transform=`translate(${this.pageOffsetX*this.scale}px, ${this.pageOffsetY*this.scale}px)`)}setScale(_e){Math.abs(_e-this.scale)>=.001&&(this.scale=_e,this.$page.style.width=`${this.page.width*this.scale}px`,this.$page.style.height=`${this.page.height*this.scale}px`,this.$page.style.transform=`translate(${this.pageOffsetX*this.scale}px, ${this.pageOffsetY*this.scale}px)`)}setVisible(_e){_e!==this.visible&&(this.visible=_e,this.$page.style.opacity=_e?"1":"0")}}const schedule$1=window.requestIdleCallback||(et=>window.setTimeout(et,5e3)),cancelSchedule=window.cancelIdleCallback||window.clearTimeout;class PageElManager{constructor(_e,tt,rt){this.pages=_e,this.pagesIntrinsicWidth=tt,this.scale=rt,this.els=new Map,this.maxElCount=200,this.gcTimer=null,this.gc=()=>{if(this.gcTimer=null,this.els.size>this.maxElCount){const nt=[...this.els.values()].sort((st,dt)=>dt.lastVisit-st.lastVisit);for(let st=Math.floor(this.maxElCount/4);st<nt.length;st++)this.els.delete(nt[st].index)}}}getEl(_e){let tt=this.els.get(_e);return tt||(tt=new PageEl(_e,this.pages[_e],this.scale,this.pagesIntrinsicWidth),this.els.set(_e,tt)),tt.lastVisit=Date.now(),this.els.size>this.maxElCount&&this.gcTimer===null&&(this.gcTimer=schedule$1(this.gc)),tt}setScale(_e){_e!==this.scale&&(this.scale=_e,this.els.forEach(tt=>tt.setScale(_e)))}destroy(){this.els.clear(),this.gcTimer!==null&&(cancelSchedule(this.gcTimer),this.gcTimer=null)}}class PageRenderer{constructor(_e){this._hwaTimeout=NaN,this._turnOffHWA=()=>{window.clearTimeout(this._hwaTimeout),this._hwaTimeout=NaN,this.$pages.classList.toggle("is-hwa",!1)},this.pagesScrollTop=_e.pagesScrollTop||0,this.containerWidth=_e.containerWidth||1,this.containerHeight=_e.containerHeight||1,this.pages=_e.pages.map(st=>{if(st.thumbnail)return st;try{const dt=new URL(st.src);return dt.searchParams.set("x-oss-process","image/resize,l_50"),{...st,thumbnail:dt.toString()}}catch(dt){return console.error(dt),st}});const tt=Array(this.pages.length);let rt=1/0,nt=0;this.pagesIntrinsicHeight=this.pages.reduce((st,dt,ft)=>(tt[ft]=st,dt.width>nt&&(nt=dt.width),dt.height<=rt&&(rt=dt.height),st+dt.height),0),this.pagesIntrinsicWidth=nt,this.pagesMinHeight=rt,this.pagesIntrinsicYs=tt,this.scale=this._calcScale(),this.threshold=this._calcThreshold(),this.onPageIndexChanged=_e.onPageIndexChanged,this.pageScrollIndex=0,this.pagesScrollTop!==0&&(this.pageScrollIndex=this.findScrollPageIndex(),this.onPageIndexChanged&&this.pageScrollIndex>0&&this.onPageIndexChanged(this.pageScrollIndex)),this.pageElManager=new PageElManager(this.pages,nt,this.scale),this.$pages=this.renderPages()}setContainerSize(_e,tt){_e>0&&tt>0&&(_e!==this.containerWidth||tt!==this.containerHeight)&&(this.containerWidth=_e,this.containerHeight=tt,this.$pages.style.width=`${this.containerWidth}px`,this.$pages.style.height=`${this.containerHeight}px`,this.scale=this._calcScale(),this.threshold=this._calcThreshold(),this.pageElManager.setScale(this.scale),this.$pages.parentElement&&this.pagesScrollTo(this.pagesScrollTop,!0))}renderPages(){const _e=document.createElement("div");return _e.className="page-renderer-pages-container",_e.style.width=`${this.containerWidth}px`,_e.style.height=`${this.containerHeight}px`,_e}pagesScrollTo(_e,tt){if(_e=clamp$3(_e,0,this.pagesIntrinsicHeight-this.containerHeight/this.scale),tt||Math.abs(_e-this.pagesScrollTop)>=.001){this._turnOnHWA(),this.pagesScrollTop=_e;const rt=this.findScrollPageIndex(),nt=Math.max(rt-this.threshold,0),st=Math.min(rt+this.threshold,this.pages.length-1);for(let dt=0;dt<this.$pages.children.length;dt++){const ft=this.$pages.children[dt],ht=Number(ft.dataset.index);ht>=nt&&ht<=st||(ft.remove(),dt--)}for(let dt=nt;dt<=st;dt++){const ft=this.pageElManager.getEl(dt);ft.$page.parentElement!==this.$pages&&this.$pages.appendChild(ft.$page),ft.translateY(this.pagesIntrinsicYs[dt]-this.pagesScrollTop)}rt!==this.pageScrollIndex&&(this.pageScrollIndex=rt,this.onPageIndexChanged&&this.onPageIndexChanged(rt))}}findScrollPageIndex(){for(let _e=0;_e<this.pagesIntrinsicYs.length;_e++)if(this.pagesIntrinsicYs[_e]+this.pages[_e].height-this.pagesScrollTop>=.001)return _e;return this.pagesIntrinsicYs.length-1}mount(_e){_e.appendChild(this.$pages),this.pagesScrollTo(this.pagesScrollTop,!0)}unmount(){this.$pages.remove()}destroy(){this.unmount(),this.onPageIndexChanged=void 0,this.pageElManager.destroy(),this._hwaTimeout&&(window.clearTimeout(this._hwaTimeout),this._hwaTimeout=NaN)}_calcScale(){return this.containerWidth/this.pagesIntrinsicWidth||1}_calcThreshold(){return clamp$3(Math.ceil(this.containerHeight/this.scale/this.pagesMinHeight/2),1,this.pages.length)}_turnOnHWA(){this._hwaTimeout?window.clearTimeout(this._hwaTimeout):this.$pages.classList.toggle("is-hwa",!0),this._hwaTimeout=window.setTimeout(this._turnOffHWA,1e3)}}const SCROLLBAR_DEFAULT_MIN_HEIGHT=30;let ScrollBar$1=class{constructor(_e){this.sideEffect=new SideEffectManager$2,this.pagesScrollTop=_e.pagesScrollTop||0,this.containerWidth=_e.containerWidth||1,this.containerHeight=_e.containerHeight||1,this.pagesWidth=_e.pagesWidth||1,this.pagesHeight=_e.pagesHeight||1,this.scale=this._calcScale(),this.scrollbarMinHeight=_e.scrollbarMinHeight||SCROLLBAR_DEFAULT_MIN_HEIGHT,this.scrollbarHeight=this._calcScrollbarHeight(),this.readonly=_e.readonly,this.wrapClassName=_e.wrapClassName,this.onDragScroll=_e.onDragScroll,this.$scrollbar=this.renderScrollbar()}mount(_e){_e.appendChild(this.$scrollbar),this.pagesScrollTo(this.pagesScrollTop,!0)}unmount(){this.$scrollbar.remove()}setReadonly(_e){this.readonly=_e}setContainerSize(_e,tt){_e>0&&tt>0&&(_e!==this.containerWidth||tt!==this.containerHeight)&&(this.containerWidth=_e,this.containerHeight=tt,this.scale=this._calcScale(),this._updateScrollbarHeight(),this.$scrollbar.parentElement&&this.pagesScrollTo(this.pagesScrollTop,!0))}pagesScrollTo(_e,tt){if(_e=clamp$3(_e,0,this.pagesHeight-this.containerHeight/this.scale),tt||Math.abs(_e-this.pagesScrollTop)>=.001){this.pagesScrollTop=_e;const rt=this.pagesScrollTop*this.scale,nt=this.pagesHeight*this.scale,st=rt/(nt-this.containerHeight)*(this.containerHeight-this.scrollbarHeight);window.requestAnimationFrame?window.requestAnimationFrame(()=>{this.$scrollbar.style.transform=`translateY(${st}px)`}):this.$scrollbar.style.transform=`translateY(${st}px)`}}destroy(){this.unmount(),this.onDragScroll=void 0,this.sideEffect.flushAll()}renderScrollbar(){const _e=document.createElement("button");_e.className=this.wrapClassName("scrollbar"),_e.style.minHeight=`${this.scrollbarMinHeight}px`,_e.style.height=`${this.scrollbarHeight}px`;const tt=rt=>{if(this.readonly||rt.button!=null&&rt.button!==0)return;preventEvent(rt);const nt=this.wrapClassName("scrollbar-dragging");_e.classList.toggle(nt,!0);const st=this.pagesScrollTop,{clientY:dt}=flattenEvent(rt),ft=mt=>{if(this.readonly)return;const{clientY:bt}=flattenEvent(mt),St=(bt-dt)/this.scale;Math.abs(St)>0&&this.onDragScroll&&this.onDragScroll(st+St*(this.pagesHeight*this.scale/this.containerHeight))},ht=()=>{_e.classList.toggle(nt,!1),window.removeEventListener("mousemove",ft,!0),window.removeEventListener("touchmove",ft,!0),window.removeEventListener("mouseup",ht,!0),window.removeEventListener("touchend",ht,!0),window.removeEventListener("touchcancel",ht,!0)};window.addEventListener("mousemove",ft,!0),window.addEventListener("touchmove",ft,!0),window.addEventListener("mouseup",ht,!0),window.addEventListener("touchend",ht,!0),window.addEventListener("touchcancel",ht,!0)};return this.sideEffect.addEventListener(_e,"mousedown",tt),this.sideEffect.addEventListener(_e,"touchstart",tt),_e}_calcScale(){return this.containerWidth/this.pagesWidth||1}_calcScrollbarHeight(){return clamp$3(this.containerHeight/(this.pagesHeight*this.scale)*this.containerHeight,this.scrollbarMinHeight,this.containerHeight)}_updateScrollbarHeight(){const _e=this._calcScrollbarHeight();Math.abs(_e-this.scrollbarHeight)>.001&&(this.scrollbarHeight=_e,this.$scrollbar.style.height=`${_e}px`)}};const ResizeObserver$3=window.ResizeObserver||ResizeObserver$1,RATIO_BASE_CONTAINER_HEIGHT=640;class StaticDocsViewer{constructor({context:_e,whiteboardView:tt,readonly:rt,box:nt,pages:st,pageScrollTop:dt=0,mountWhiteboard:ft,onUserScroll:ht,baseScenePath:mt,appId:bt}){this.sideEffect=new SideEffectManager$2,this.userScrolling=!1,this.docsViewReadonly=!1,this.onNewPageIndex=Rt=>{this.scrollToPage(Rt)},this.toPdf=async()=>{const Rt=document.createElement("canvas"),Tt=Rt.getContext("2d");if(!Tt||!this.baseScenePath){this.reportProgress(100,null);return}const wt=this.whiteboardView.focusScenePath||`${this.baseScenePath}/1`,At=this.pages[0],{jsPDF:Nt}=await __vitePreload(async()=>{const{jsPDF:Ft}=await import("./jspdf.es.min-B0xhe8Uc.js").then(qt=>qt.j);return{jsPDF:Ft}},__vite__mapDeps([0,1,2])),Pt=new Nt({format:[At.width,At.height],orientation:At.width>At.height?"l":"p",compress:!0});for(const[Ft,qt]of this.pages.entries()){const{width:Vt,height:Kt,src:jt}=qt;Rt.width=Vt,Rt.height=Kt;const Ut=Vt>Kt?"l":"p";Ft>0&&Pt.addPage([Vt,Kt],Ut);const Ot=await this.getBase64FromUrl(jt),Wt=document.createElement("img");Wt.src=Ot,await new Promise(cr=>Wt.onload=cr),Tt.drawImage(Wt,0,0);const Bt=Rt.toDataURL("image/jpeg",.6);Tt.clearRect(0,0,Vt,Kt);const tr={centerX:Vt/2,centerY:Kt/2+Ft*Kt,scale:1},Jt=this.context.manager.windowManger;Jt._appliancePlugin?await Jt._appliancePlugin.screenshotToCanvasAsync(Tt,wt,Vt,Kt,tr):this.whiteboardView.screenshotToCanvas(Tt,wt,Vt,Kt,tr);const ar=Rt.toDataURL("image/png");Pt.addImage(Bt,"JPEG",0,0,Vt,Kt,"","FAST"),Pt.addImage(ar,"PNG",0,0,Vt,Kt,"","FAST"),Tt.clearRect(0,0,Vt,Kt),Math.ceil((Ft+1)/this.pages.length*100)<100&&this.reportProgress(Math.ceil((Ft+1)/this.pages.length*100),null)}const It=Pt.output("arraybuffer");this.reportProgress(100,{pdf:It,title:this.box.title})},this.context=_e,this.whiteboardView=tt,this.readonly=rt,this.box=nt,this.pages=st,this.baseScenePath=mt,this.appId=bt,this.mountWhiteboard=ft,this._onUserScroll=ht;const St=this.debounce(()=>{this.userScrolling=!1,this._onUserScroll&&this._onUserScroll(this.pageRenderer.pagesScrollTop)},{wait:80},"debounce-updateUserScroll");this.updateUserScroll=()=>{this.userScrolling=!0,St()},this.viewer=new DocsViewer$1({readonly:rt,box:nt,pages:st,onNewPageIndex:this.onNewPageIndex});const{width:Et,height:Ct}=this.whiteboardView.size;this.pageRenderer=new PageRenderer({pagesScrollTop:dt,pages:this.pages,containerWidth:Et,containerHeight:Ct,onPageIndexChanged:this.viewer.setPageIndex.bind(this.viewer)}),this.scrollbar=new ScrollBar$1({pagesScrollTop:this.pageRenderer.pagesScrollTop,containerWidth:Et,containerHeight:Ct,pagesWidth:this.pageRenderer.pagesIntrinsicWidth,pagesHeight:this.pageRenderer.pagesIntrinsicHeight,readonly:this.readonly,wrapClassName:this.wrapClassName.bind(this),onDragScroll:Rt=>{this.pageScrollTo(Rt),this.updateUserScroll()}}),this.pageScrollStepper=new Stepper({start:this.pageRenderer.pagesScrollTop,onStep:Rt=>{this.pageScrollTo(Rt)}}),this.render()}setDocsViewReadonly(_e){this.docsViewReadonly=_e}mount(){this.viewer.mount(),this.setupScrollListener();const _e=this.debounce(this.renderRatioHeight.bind(this),{wait:80});return this.sideEffect.add(()=>{const tt=new ResizeObserver$3(_e);return tt.observe(this.viewer.$content),()=>tt.disconnect()}),this.sideEffect.setTimeout(()=>{this.userScrolling||this.pageScrollTo(this.pageRenderer.pagesScrollTop)},100),this.sideEffect.add(()=>{const tt=rt=>{rt.data.type==="@netless/_request_save_pdf_"&&rt.data.appId===this.appId&&this.toPdf().catch(()=>this.reportProgress(100,null))};return window.addEventListener("message",tt),()=>{window.removeEventListener("message",tt)}}),this}unmount(){return this.viewer.unmount(),this}setReadonly(_e){this.readonly!==_e&&(this.readonly=_e,this.viewer.setReadonly(_e),this.scrollbar.setReadonly(_e))}destroy(){this.sideEffect.flushAll(),this.pageScrollStepper.destroy(),this._onUserScroll=void 0,this.unmount(),this.viewer.destroy(),this.pageRenderer.destroy(),this.scrollbar.destroy()}syncPageScrollTop(_e){!this.userScrolling&&_e>=0&&Math.abs(this.pageRenderer.pagesScrollTop-_e)>.01&&this.pageScrollStepper.stepTo(_e,this.pageRenderer.pagesScrollTop)}render(){this.pageRenderer.mount(this.viewer.$content),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.scrollbar.mount(this.viewer.$content),this.renderRatioHeight()}renderRatioHeight(){const _e=this.box.absoluteHeight,tt=_e<=RATIO_BASE_CONTAINER_HEIGHT;if(this.viewer.setSmallBox(tt),tt){const rt=26/RATIO_BASE_CONTAINER_HEIGHT,nt=26/_e,st=26/RATIO_BASE_CONTAINER_HEIGHT,dt=0,ft=Math.max((rt+st-(nt+dt))/2,0);if(this.box.$titleBar){const ht=nt+ft;this.box.$titleBar.style.height=`${ht*100}%`}if(this.box.$footer){const ht=dt+ft;this.box.$footer.style.height=`${ht*100}%`}}else{if(this.box.$titleBar){const rt=Math.max(26/RATIO_BASE_CONTAINER_HEIGHT,26/_e);this.box.$titleBar.style.height=`${rt*100}%`}if(this.box.$footer){const rt=Math.max(26/RATIO_BASE_CONTAINER_HEIGHT,26/_e);this.box.$footer.style.height=`${rt*100}%`}}}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view"),this.mountWhiteboard(this.$whiteboardView),this.sideEffect.addEventListener(this.$whiteboardView,"wheel",_e=>{preventEvent(_e),this.readonly||(this.pageScrollTo(this.pageRenderer.pagesScrollTop+_e.deltaY),this.updateUserScroll())},{passive:!1,capture:!0}),this.sideEffect.addEventListener(this.$whiteboardView,"touchmove",_e=>{this.readonly||_e.touches.length<=1||this.updateUserScroll()},{passive:!0,capture:!0})),this.$whiteboardView}scrollTopPageToEl(_e){return _e*this.pageRenderer.scale}scrollTopElToPage(_e){return _e/this.pageRenderer.scale}elScrollTo(_e){this.pageScrollTo(this.scrollTopElToPage(_e))}pageScrollTo(_e){const tt=this.scrollTopElToPage(this.whiteboardView.size.height/2);this.whiteboardView.moveCamera({centerY:clamp$3(_e+tt,tt,this.pageRenderer.pagesIntrinsicHeight-tt),animationMode:"immediately"})}scrollToPage(_e){if(!this.readonly&&!Number.isNaN(_e)){const tt=this.pageRenderer.pagesIntrinsicYs[_e];tt>=0&&(this.pageScrollTo(tt+5/this.pageRenderer.scale),this.updateUserScroll())}}setupScrollListener(){this.sideEffect.add(()=>{const _e=tt=>{const{width:rt,height:nt}=this.whiteboardView.size;if(rt<=0||nt<=0)return;const st=tt.centerY-this.pageRenderer.containerHeight/this.pageRenderer.scale/2;this.pageRenderer.pagesScrollTo(st),this.scrollbar.pagesScrollTo(st)};return this.whiteboardView.callbacks.on("onCameraUpdated",_e),()=>this.whiteboardView.callbacks.off("onCameraUpdated",_e)}),this.sideEffect.add(()=>{const{updateUserScroll:_e}=this;return this.whiteboardView.callbacks.on("onCameraUpdatedByDevice",_e),()=>this.whiteboardView.callbacks.off("onCameraUpdatedByDevice",_e)}),this.sideEffect.add(()=>{const _e=({width:tt,height:rt})=>{if(tt<=0||rt<=0)return;this.pageRenderer.setContainerSize(tt,rt),this.scrollbar.setContainerSize(tt,rt);const{pagesIntrinsicWidth:nt,pagesIntrinsicHeight:st}=this.pageRenderer;this.whiteboardView.moveCameraToContain({originX:0,originY:this.pageRenderer.pagesScrollTop,width:nt,height:rt/this.pageRenderer.scale,animationMode:"immediately"}),this.whiteboardView.setCameraBound({damping:1,maxContentMode:()=>this.pageRenderer.scale,minContentMode:()=>this.pageRenderer.scale,centerX:nt/2,centerY:st/2,width:nt,height:st})};return this.whiteboardView.callbacks.on("onSizeUpdated",_e),()=>{this.whiteboardView.callbacks.off("onSizeUpdated",_e)}},"whiteboard-size-update"),this.sideEffect.addEventListener(window,"keyup",_e=>{if(this.readonly||!this.box.focus||this.box.minimized||isEditable$1(_e.target)||this.docsViewReadonly)return;let tt=null;switch(_e.key){case"PageDown":{tt=this.pageRenderer.pagesScrollTop+this.pageRenderer.containerHeight/this.pageRenderer.scale;break}case"PageUp":{tt=this.pageRenderer.pagesScrollTop-this.pageRenderer.containerHeight/this.pageRenderer.scale;break}case"ArrowDown":{tt=this.pageRenderer.pagesScrollTop+this.pageRenderer.containerHeight/4/this.pageRenderer.scale;break}case"ArrowUp":{tt=this.pageRenderer.pagesScrollTop-this.pageRenderer.containerHeight/4/this.pageRenderer.scale;break}}tt!==null&&(this._onUserScroll?this._onUserScroll(tt):(this.pageScrollTo(tt),this.updateUserScroll()))},{capture:!0})}debounce(_e,tt,rt){const nt=debounceFn(_e,tt);return this.sideEffect.addDisposer(()=>nt.cancel(),rt),nt}wrapClassName(_e){return"netless-app-docs-viewer-static-"+_e}async getBase64FromUrl(_e){const rt=await(await fetch(this._invalidate(_e))).blob();return new Promise(nt=>{const st=new FileReader;st.readAsDataURL(rt),st.onloadend=()=>{const dt=st.result;nt(dt)}})}_invalidate(_e){try{const tt=new URL(_e);return tt.searchParams.set("t",Date.now().toString()),tt.toString()}catch{return _e}}reportProgress(_e,tt){window.postMessage({type:"@netless/_result_save_pdf_",appId:this.appId,progress:_e,result:tt})}}class DynamicDocsViewer{constructor({context:_e,whiteboardView:tt,box:rt,pages:nt}){this.sideEffect=new SideEffectManager$2,this.docsViewReadonly=!1,this.onPlayPPT=()=>{const st=this.context.getRoom();st&&st.pptNextStep()},this._scaleDocsToFitImpl=()=>{const st=this.pages[this.getPageIndex()];st&&(this.whiteboardView.moveCameraToContain({originX:-st.width/2,originY:-st.height/2,width:st.width,height:st.height,animationMode:"immediately"}),this.whiteboardView.setCameraBound({damping:1,maxContentMode:()=>this.whiteboardView.camera.scale,minContentMode:()=>this.whiteboardView.camera.scale,centerX:0,centerY:0,width:st.width,height:st.height}))},this._scaleDocsToFitDebounced=()=>{this.sideEffect.setTimeout(this._scaleDocsToFitImpl,1e3,"_scaleDocsToFitDebounced")},this.scaleDocsToFit=()=>{this._scaleDocsToFitImpl(),this._scaleDocsToFitDebounced()},this.onNewPageIndex=st=>{this.jumpToPage(st,!0)},this.context=_e,this.whiteboardView=tt,this.box=rt,this.pages=nt,this.displayer=_e.getDisplayer(),this.viewer=new DocsViewer$1({readonly:!_e.getIsWritable(),box:rt,pages:nt,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlayPPT}),this.render(),this.sideEffect.add(()=>{const st=dt=>{this.viewer.setReadonly(!dt)};return this.context.emitter.on("writableChange",st),()=>this.context.emitter.off("writableChange",st)}),this.sideEffect.add(()=>{const st=dt=>{this.jumpToPage(dt.index)};return this.context.emitter.on("sceneStateChange",st),()=>this.context.emitter.off("sceneStateChange",st)})}setDocsViewReadonly(_e){this.docsViewReadonly=_e}mount(){this.viewer.mount();const _e=this.getPageIndex();return _e!==0&&this.jumpToPage(_e),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>{this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit)})),this}unmount(){return this.viewer.unmount(),this}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}getPageIndex(){return this.displayer.state.sceneState.index}jumpToPage(_e,tt){var rt,nt;if(_e=clamp$3(_e,0,this.pages.length-1),_e!==this.getPageIndex()&&this.context.getIsWritable()){const st=this.context.getInitScenePath(),dt=(nt=(rt=this.context.getScenes())==null?void 0:rt[_e])==null?void 0:nt.name;st&&dt&&this.context.setScenePath(`${st}/${dt}`),this.scaleDocsToFit()}if(_e!==this.viewer.pageIndex&&this.viewer.setPageIndex(_e),tt){const st=this.context.getRoom();if(st){const dt=st.state.globalState.__pptState;st.setGlobalState({__pptState:dt&&{uuid:dt.uuid,pageIndex:_e,disableAutoPlay:dt.disableAutoPlay}})}}}render(){this.viewer.$content.appendChild(this.renderMask()),this.viewer.$content.appendChild(this.renderWhiteboardView()),this.sideEffect.addEventListener(window,"keydown",_e=>{var tt;if(!this.docsViewReadonly&&this.box.focus&&!isEditable$1(_e.target))switch(_e.key){case"ArrowUp":case"ArrowLeft":{this.jumpToPage(this.getPageIndex()-1,!0);break}case"ArrowRight":case"ArrowDown":{(tt=this.context.getRoom())==null||tt.pptNextStep();break}}})}renderMask(){if(!this.$mask){const _e=document.createElement("div");_e.className=this.wrapClassName("mask"),this.$mask=_e;const tt=document.createElement("button");tt.className=this.wrapClassName("back");const rt=document.createElement("button");rt.className=this.wrapClassName("next")}return this.$mask}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view"),this.sideEffect.addEventListener(this.$whiteboardView,"click",_e=>{var tt;const rt=this.context.getRoom();if(rt&&rt.state.memberState.currentApplianceName==="clicker"){for(let nt=_e.target;nt;nt=nt.parentElement)if((tt=nt.classList)!=null&&tt.contains("ppt-event-source"))return;rt.pptNextStep()}}),this.context.mountView(this.$whiteboardView)),this.$whiteboardView}wrapClassName(_e){return"netless-app-docs-viewer-dynamic-"+_e}}const kind="DocsViewer",NetlessAppDocsViewer={kind,setup(et){const _e=et.getBox(),tt=et.getScenes();if(!tt)throw new Error("[Docs Viewer]: scenes not found.");const rt=et.getView();if(!rt)throw new Error("[Docs Viewer]: no whiteboard view.");const nt=tt.map(({ppt:ft})=>ft?{width:ft.width,height:ft.height,src:ft.src,thumbnail:ft.previewURL}:null).filter(ft=>!!ft);if(nt.length<=0)throw new Error("[Docs Viewer]: empty scenes.");_e.mountStyles(styles$1);let st=null;return nt[0].src.startsWith("ppt")?st=setupDynamicDocsViewer(et,rt,_e,nt):st=setupStaticDocsViewer(et,rt,_e,nt),(et.getAppOptions()||{}).justDocsViewReadonly&&st.setDocsViewReadonly(!0),{setDocsViewReadonly:ft=>{st?.setDocsViewReadonly(ft)}}}};function setupStaticDocsViewer(et,_e,tt,rt){var nt;_e.disableCameraTransform=!et.getIsWritable();const st=new StaticDocsViewer({context:et,whiteboardView:_e,readonly:!et.getIsWritable(),box:tt,pages:rt,pageScrollTop:(nt=et.getAttributes())==null?void 0:nt.pageScrollTop,mountWhiteboard:et.mountView.bind(et),onUserScroll:dt=>{var ft;((ft=et.getAttributes())==null?void 0:ft.pageScrollTop)!==dt&&!tt.readonly&&et.updateAttributes(["pageScrollTop"],dt)},baseScenePath:et.getInitScenePath(),appId:et.appId}).mount();return st.viewer.onPageIndexChanged=dt=>{et.dispatchAppEvent("pageStateChange",{index:dt,length:rt.length})},et.dispatchAppEvent("pageStateChange",{index:st.viewer.pageIndex,length:rt.length}),et.emitter.on("attributesUpdate",dt=>{dt&&dt.pageScrollTop!=null&&st.syncPageScrollTop(dt.pageScrollTop)}),et.emitter.on("writableChange",dt=>{st.setReadonly(!dt),_e.disableCameraTransform=!dt}),st}function setupDynamicDocsViewer(et,_e,tt,rt){_e.disableCameraTransform=!0;const nt=new DynamicDocsViewer({context:et,whiteboardView:_e,box:tt,pages:rt}).mount();return nt.viewer.onPageIndexChanged=st=>{et.dispatchAppEvent("pageStateChange",{index:st,length:rt.length})},et.dispatchAppEvent("pageStateChange",{index:nt.getPageIndex(),length:rt.length}),et.mountView(nt.$whiteboardView),et.isAddApp&&_e.callbacks.once("onSizeUpdated",({width:st,height:dt})=>{if(rt.length>0&&tt.state!=="maximized"){const{width:ft,height:ht}=rt[0],bt=ht/ft*st-dt;bt!==0&&et.getIsWritable()&&et.emitter.emit("setBoxSize",{width:tt.width,height:tt.height+bt/tt.containerRect.height})}}),nt}var react={exports:{}},react_production_min={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty$2=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(et){if(et==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(et)}function shouldUseNative$2(){try{if(!Object.assign)return!1;var et=new String("abc");if(et[5]="de",Object.getOwnPropertyNames(et)[0]==="5")return!1;for(var _e={},tt=0;tt<10;tt++)_e["_"+String.fromCharCode(tt)]=tt;var rt=Object.getOwnPropertyNames(_e).map(function(st){return _e[st]});if(rt.join("")!=="0123456789")return!1;var nt={};return"abcdefghijklmnopqrst".split("").forEach(function(st){nt[st]=st}),Object.keys(Object.assign({},nt)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var objectAssign=shouldUseNative$2()?Object.assign:function(et,_e){for(var tt,rt=toObject(et),nt,st=1;st<arguments.length;st++){tt=Object(arguments[st]);for(var dt in tt)hasOwnProperty$2.call(tt,dt)&&(rt[dt]=tt[dt]);if(getOwnPropertySymbols){nt=getOwnPropertySymbols(tt);for(var ft=0;ft<nt.length;ft++)propIsEnumerable.call(tt,nt[ft])&&(rt[nt[ft]]=tt[nt[ft]])}}return rt};/** @license React v16.14.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var l$1=objectAssign,n$2=typeof Symbol=="function"&&Symbol.for,p=n$2?Symbol.for("react.element"):60103,q$1=n$2?Symbol.for("react.portal"):60106,r$2=n$2?Symbol.for("react.fragment"):60107,t$1=n$2?Symbol.for("react.strict_mode"):60108,u$1=n$2?Symbol.for("react.profiler"):60114,v$2=n$2?Symbol.for("react.provider"):60109,w$1=n$2?Symbol.for("react.context"):60110,x$1=n$2?Symbol.for("react.forward_ref"):60112,y$1=n$2?Symbol.for("react.suspense"):60113,z$1=n$2?Symbol.for("react.memo"):60115,A$1=n$2?Symbol.for("react.lazy"):60116,B$1=typeof Symbol=="function"&&Symbol.iterator;function C$2(et){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+et,tt=1;tt<arguments.length;tt++)_e+="&args[]="+encodeURIComponent(arguments[tt]);return"Minified React error #"+et+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var D$1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E$2={};function F$2(et,_e,tt){this.props=et,this.context=_e,this.refs=E$2,this.updater=tt||D$1}F$2.prototype.isReactComponent={};F$2.prototype.setState=function(et,_e){if(typeof et!="object"&&typeof et!="function"&&et!=null)throw Error(C$2(85));this.updater.enqueueSetState(this,et,_e,"setState")};F$2.prototype.forceUpdate=function(et){this.updater.enqueueForceUpdate(this,et,"forceUpdate")};function G$2(){}G$2.prototype=F$2.prototype;function H$2(et,_e,tt){this.props=et,this.context=_e,this.refs=E$2,this.updater=tt||D$1}var I$2=H$2.prototype=new G$2;I$2.constructor=H$2;l$1(I$2,F$2.prototype);I$2.isPureReactComponent=!0;var J$2={current:null},K$2=Object.prototype.hasOwnProperty,L$2={key:!0,ref:!0,__self:!0,__source:!0};function M$2(et,_e,tt){var rt,nt={},st=null,dt=null;if(_e!=null)for(rt in _e.ref!==void 0&&(dt=_e.ref),_e.key!==void 0&&(st=""+_e.key),_e)K$2.call(_e,rt)&&!L$2.hasOwnProperty(rt)&&(nt[rt]=_e[rt]);var ft=arguments.length-2;if(ft===1)nt.children=tt;else if(1<ft){for(var ht=Array(ft),mt=0;mt<ft;mt++)ht[mt]=arguments[mt+2];nt.children=ht}if(et&&et.defaultProps)for(rt in ft=et.defaultProps,ft)nt[rt]===void 0&&(nt[rt]=ft[rt]);return{$$typeof:p,type:et,key:st,ref:dt,props:nt,_owner:J$2.current}}function N$2(et,_e){return{$$typeof:p,type:et.type,key:_e,ref:et.ref,props:et.props,_owner:et._owner}}function O$2(et){return typeof et=="object"&&et!==null&&et.$$typeof===p}function escape$1(et){var _e={"=":"=0",":":"=2"};return"$"+(""+et).replace(/[=:]/g,function(tt){return _e[tt]})}var P$2=/\/+/g,Q$2=[];function R$2(et,_e,tt,rt){if(Q$2.length){var nt=Q$2.pop();return nt.result=et,nt.keyPrefix=_e,nt.func=tt,nt.context=rt,nt.count=0,nt}return{result:et,keyPrefix:_e,func:tt,context:rt,count:0}}function S$2(et){et.result=null,et.keyPrefix=null,et.func=null,et.context=null,et.count=0,10>Q$2.length&&Q$2.push(et)}function T$2(et,_e,tt,rt){var nt=typeof et;(nt==="undefined"||nt==="boolean")&&(et=null);var st=!1;if(et===null)st=!0;else switch(nt){case"string":case"number":st=!0;break;case"object":switch(et.$$typeof){case p:case q$1:st=!0}}if(st)return tt(rt,et,_e===""?"."+U$2(et,0):_e),1;if(st=0,_e=_e===""?".":_e+":",Array.isArray(et))for(var dt=0;dt<et.length;dt++){nt=et[dt];var ft=_e+U$2(nt,dt);st+=T$2(nt,ft,tt,rt)}else if(et===null||typeof et!="object"?ft=null:(ft=B$1&&et[B$1]||et["@@iterator"],ft=typeof ft=="function"?ft:null),typeof ft=="function")for(et=ft.call(et),dt=0;!(nt=et.next()).done;)nt=nt.value,ft=_e+U$2(nt,dt++),st+=T$2(nt,ft,tt,rt);else if(nt==="object")throw tt=""+et,Error(C$2(31,tt==="[object Object]"?"object with keys {"+Object.keys(et).join(", ")+"}":tt,""));return st}function V$2(et,_e,tt){return et==null?0:T$2(et,"",_e,tt)}function U$2(et,_e){return typeof et=="object"&&et!==null&&et.key!=null?escape$1(et.key):_e.toString(36)}function W$2(et,_e){et.func.call(et.context,_e,et.count++)}function aa$1(et,_e,tt){var rt=et.result,nt=et.keyPrefix;et=et.func.call(et.context,_e,et.count++),Array.isArray(et)?X$2(et,rt,tt,function(st){return st}):et!=null&&(O$2(et)&&(et=N$2(et,nt+(!et.key||_e&&_e.key===et.key?"":(""+et.key).replace(P$2,"$&/")+"/")+tt)),rt.push(et))}function X$2(et,_e,tt,rt,nt){var st="";tt!=null&&(st=(""+tt).replace(P$2,"$&/")+"/"),_e=R$2(_e,st,rt,nt),V$2(et,aa$1,_e),S$2(_e)}var Y$2={current:null};function Z$2(){var et=Y$2.current;if(et===null)throw Error(C$2(321));return et}var ba$1={ReactCurrentDispatcher:Y$2,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J$2,IsSomeRendererActing:{current:!1},assign:l$1};react_production_min.Children={map:function(et,_e,tt){if(et==null)return et;var rt=[];return X$2(et,rt,null,_e,tt),rt},forEach:function(et,_e,tt){if(et==null)return et;_e=R$2(null,null,_e,tt),V$2(et,W$2,_e),S$2(_e)},count:function(et){return V$2(et,function(){return null},null)},toArray:function(et){var _e=[];return X$2(et,_e,null,function(tt){return tt}),_e},only:function(et){if(!O$2(et))throw Error(C$2(143));return et}};react_production_min.Component=F$2;react_production_min.Fragment=r$2;react_production_min.Profiler=u$1;react_production_min.PureComponent=H$2;react_production_min.StrictMode=t$1;react_production_min.Suspense=y$1;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba$1;react_production_min.cloneElement=function(et,_e,tt){if(et==null)throw Error(C$2(267,et));var rt=l$1({},et.props),nt=et.key,st=et.ref,dt=et._owner;if(_e!=null){if(_e.ref!==void 0&&(st=_e.ref,dt=J$2.current),_e.key!==void 0&&(nt=""+_e.key),et.type&&et.type.defaultProps)var ft=et.type.defaultProps;for(ht in _e)K$2.call(_e,ht)&&!L$2.hasOwnProperty(ht)&&(rt[ht]=_e[ht]===void 0&&ft!==void 0?ft[ht]:_e[ht])}var ht=arguments.length-2;if(ht===1)rt.children=tt;else if(1<ht){ft=Array(ht);for(var mt=0;mt<ht;mt++)ft[mt]=arguments[mt+2];rt.children=ft}return{$$typeof:p,type:et.type,key:nt,ref:st,props:rt,_owner:dt}};react_production_min.createContext=function(et,_e){return _e===void 0&&(_e=null),et={$$typeof:w$1,_calculateChangedBits:_e,_currentValue:et,_currentValue2:et,_threadCount:0,Provider:null,Consumer:null},et.Provider={$$typeof:v$2,_context:et},et.Consumer=et};react_production_min.createElement=M$2;react_production_min.createFactory=function(et){var _e=M$2.bind(null,et);return _e.type=et,_e};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(et){return{$$typeof:x$1,render:et}};react_production_min.isValidElement=O$2;react_production_min.lazy=function(et){return{$$typeof:A$1,_ctor:et,_status:-1,_result:null}};react_production_min.memo=function(et,_e){return{$$typeof:z$1,type:et,compare:_e===void 0?null:_e}};react_production_min.useCallback=function(et,_e){return Z$2().useCallback(et,_e)};react_production_min.useContext=function(et,_e){return Z$2().useContext(et,_e)};react_production_min.useDebugValue=function(){};react_production_min.useEffect=function(et,_e){return Z$2().useEffect(et,_e)};react_production_min.useImperativeHandle=function(et,_e,tt){return Z$2().useImperativeHandle(et,_e,tt)};react_production_min.useLayoutEffect=function(et,_e){return Z$2().useLayoutEffect(et,_e)};react_production_min.useMemo=function(et,_e){return Z$2().useMemo(et,_e)};react_production_min.useReducer=function(et,_e,tt){return Z$2().useReducer(et,_e,tt)};react_production_min.useRef=function(et){return Z$2().useRef(et)};react_production_min.useState=function(et){return Z$2().useState(et)};react_production_min.version="16.14.0";react.exports=react_production_min;var l=react.exports,reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/** @license React v0.19.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(et){var _e,tt,rt,nt,st;if(typeof window>"u"||typeof MessageChannel!="function"){var dt=null,ft=null,ht=function(){if(dt!==null)try{var Mr=et.unstable_now();dt(!0,Mr),dt=null}catch(Nr){throw setTimeout(ht,0),Nr}},mt=Date.now();et.unstable_now=function(){return Date.now()-mt},_e=function(Mr){dt!==null?setTimeout(_e,0,Mr):(dt=Mr,setTimeout(ht,0))},tt=function(Mr,Nr){ft=setTimeout(Mr,Nr)},rt=function(){clearTimeout(ft)},nt=function(){return!1},st=et.unstable_forceFrameRate=function(){}}else{var bt=window.performance,St=window.Date,Et=window.setTimeout,Ct=window.clearTimeout;if(typeof console<"u"){var Rt=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://fb.me/react-polyfills"),typeof Rt!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof bt=="object"&&typeof bt.now=="function")et.unstable_now=function(){return bt.now()};else{var Tt=St.now();et.unstable_now=function(){return St.now()-Tt}}var wt=!1,At=null,Nt=-1,Pt=5,It=0;nt=function(){return et.unstable_now()>=It},st=function(){},et.unstable_forceFrameRate=function(Mr){0>Mr||125<Mr?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):Pt=0<Mr?Math.floor(1e3/Mr):5};var Ft=new MessageChannel,qt=Ft.port2;Ft.port1.onmessage=function(){if(At!==null){var Mr=et.unstable_now();It=Mr+Pt;try{At(!0,Mr)?qt.postMessage(null):(wt=!1,At=null)}catch(Nr){throw qt.postMessage(null),Nr}}else wt=!1},_e=function(Mr){At=Mr,wt||(wt=!0,qt.postMessage(null))},tt=function(Mr,Nr){Nt=Et(function(){Mr(et.unstable_now())},Nr)},rt=function(){Ct(Nt),Nt=-1}}function Vt(Mr,Nr){var Yr=Mr.length;Mr.push(Nr);e:for(;;){var Or=Yr-1>>>1,Ar=Mr[Or];if(Ar!==void 0&&0<Ut(Ar,Nr))Mr[Or]=Nr,Mr[Yr]=Ar,Yr=Or;else break e}}function Kt(Mr){return Mr=Mr[0],Mr===void 0?null:Mr}function jt(Mr){var Nr=Mr[0];if(Nr!==void 0){var Yr=Mr.pop();if(Yr!==Nr){Mr[0]=Yr;e:for(var Or=0,Ar=Mr.length;Or<Ar;){var Qr=2*(Or+1)-1,hn=Mr[Qr],Sn=Qr+1,Kr=Mr[Sn];if(hn!==void 0&&0>Ut(hn,Yr))Kr!==void 0&&0>Ut(Kr,hn)?(Mr[Or]=Kr,Mr[Sn]=Yr,Or=Sn):(Mr[Or]=hn,Mr[Qr]=Yr,Or=Qr);else if(Kr!==void 0&&0>Ut(Kr,Yr))Mr[Or]=Kr,Mr[Sn]=Yr,Or=Sn;else break e}}return Nr}return null}function Ut(Mr,Nr){var Yr=Mr.sortIndex-Nr.sortIndex;return Yr!==0?Yr:Mr.id-Nr.id}var Ot=[],Wt=[],Bt=1,tr=null,Jt=3,ar=!1,pr=!1,cr=!1;function gr(Mr){for(var Nr=Kt(Wt);Nr!==null;){if(Nr.callback===null)jt(Wt);else if(Nr.startTime<=Mr)jt(Wt),Nr.sortIndex=Nr.expirationTime,Vt(Ot,Nr);else break;Nr=Kt(Wt)}}function Sr(Mr){if(cr=!1,gr(Mr),!pr)if(Kt(Ot)!==null)pr=!0,_e(Er);else{var Nr=Kt(Wt);Nr!==null&&tt(Sr,Nr.startTime-Mr)}}function Er(Mr,Nr){pr=!1,cr&&(cr=!1,rt()),ar=!0;var Yr=Jt;try{for(gr(Nr),tr=Kt(Ot);tr!==null&&(!(tr.expirationTime>Nr)||Mr&&!nt());){var Or=tr.callback;if(Or!==null){tr.callback=null,Jt=tr.priorityLevel;var Ar=Or(tr.expirationTime<=Nr);Nr=et.unstable_now(),typeof Ar=="function"?tr.callback=Ar:tr===Kt(Ot)&&jt(Ot),gr(Nr)}else jt(Ot);tr=Kt(Ot)}if(tr!==null)var Qr=!0;else{var hn=Kt(Wt);hn!==null&&tt(Sr,hn.startTime-Nr),Qr=!1}return Qr}finally{tr=null,Jt=Yr,ar=!1}}function Vr(Mr){switch(Mr){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Wr=st;et.unstable_IdlePriority=5,et.unstable_ImmediatePriority=1,et.unstable_LowPriority=4,et.unstable_NormalPriority=3,et.unstable_Profiling=null,et.unstable_UserBlockingPriority=2,et.unstable_cancelCallback=function(Mr){Mr.callback=null},et.unstable_continueExecution=function(){pr||ar||(pr=!0,_e(Er))},et.unstable_getCurrentPriorityLevel=function(){return Jt},et.unstable_getFirstCallbackNode=function(){return Kt(Ot)},et.unstable_next=function(Mr){switch(Jt){case 1:case 2:case 3:var Nr=3;break;default:Nr=Jt}var Yr=Jt;Jt=Nr;try{return Mr()}finally{Jt=Yr}},et.unstable_pauseExecution=function(){},et.unstable_requestPaint=Wr,et.unstable_runWithPriority=function(Mr,Nr){switch(Mr){case 1:case 2:case 3:case 4:case 5:break;default:Mr=3}var Yr=Jt;Jt=Mr;try{return Nr()}finally{Jt=Yr}},et.unstable_scheduleCallback=function(Mr,Nr,Yr){var Or=et.unstable_now();if(typeof Yr=="object"&&Yr!==null){var Ar=Yr.delay;Ar=typeof Ar=="number"&&0<Ar?Or+Ar:Or,Yr=typeof Yr.timeout=="number"?Yr.timeout:Vr(Mr)}else Yr=Vr(Mr),Ar=Or;return Yr=Ar+Yr,Mr={id:Bt++,callback:Nr,priorityLevel:Mr,startTime:Ar,expirationTime:Yr,sortIndex:-1},Ar>Or?(Mr.sortIndex=Ar,Vt(Wt,Mr),Kt(Ot)===null&&Mr===Kt(Wt)&&(cr?rt():cr=!0,tt(Sr,Ar-Or))):(Mr.sortIndex=Yr,Vt(Ot,Mr),pr||ar||(pr=!0,_e(Er))),Mr},et.unstable_shouldYield=function(){var Mr=et.unstable_now();gr(Mr);var Nr=Kt(Ot);return Nr!==tr&&tr!==null&&Nr!==null&&Nr.callback!==null&&Nr.startTime<=Mr&&Nr.expirationTime<tr.expirationTime||nt()},et.unstable_wrapCallback=function(Mr){var Nr=Jt;return function(){var Yr=Jt;Jt=Nr;try{return Mr.apply(this,arguments)}finally{Jt=Yr}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;/** @license React v16.14.0
* 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 aa=react.exports,n$1=objectAssign,r$1=scheduler.exports;function u(et){for(var _e="https://reactjs.org/docs/error-decoder.html?invariant="+et,tt=1;tt<arguments.length;tt++)_e+="&args[]="+encodeURIComponent(arguments[tt]);return"Minified React error #"+et+"; visit "+_e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));function ba(et,_e,tt,rt,nt,st,dt,ft,ht){var mt=Array.prototype.slice.call(arguments,3);try{_e.apply(tt,mt)}catch(bt){this.onError(bt)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(et){da=!0,ea=et}};function ja(et,_e,tt,rt,nt,st,dt,ft,ht){da=!1,ea=null,ba.apply(ia,arguments)}function ka(et,_e,tt,rt,nt,st,dt,ft,ht){if(ja.apply(this,arguments),da){if(da){var mt=ea;da=!1,ea=null}else throw Error(u(198));fa||(fa=!0,ha=mt)}}var la=null,ma=null,na=null;function oa(et,_e,tt){var rt=et.type||"unknown-event";et.currentTarget=na(tt),ka(rt,_e,void 0,et),et.currentTarget=null}var pa=null,qa={};function ra(){if(pa)for(var et in qa){var _e=qa[et],tt=pa.indexOf(et);if(!(-1<tt))throw Error(u(96,et));if(!sa[tt]){if(!_e.extractEvents)throw Error(u(97,et));sa[tt]=_e,tt=_e.eventTypes;for(var rt in tt){var nt=void 0,st=tt[rt],dt=_e,ft=rt;if(ta.hasOwnProperty(ft))throw Error(u(99,ft));ta[ft]=st;var ht=st.phasedRegistrationNames;if(ht){for(nt in ht)ht.hasOwnProperty(nt)&&ua(ht[nt],dt,ft);nt=!0}else st.registrationName?(ua(st.registrationName,dt,ft),nt=!0):nt=!1;if(!nt)throw Error(u(98,rt,et))}}}}function ua(et,_e,tt){if(va[et])throw Error(u(100,et));va[et]=_e,wa[et]=_e.eventTypes[tt].dependencies}var sa=[],ta={},va={},wa={};function xa(et){var _e=!1,tt;for(tt in et)if(et.hasOwnProperty(tt)){var rt=et[tt];if(!qa.hasOwnProperty(tt)||qa[tt]!==rt){if(qa[tt])throw Error(u(102,tt));qa[tt]=rt,_e=!0}}_e&&ra()}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),za=null,Aa=null,Ba=null;function Ca(et){if(et=ma(et)){if(typeof za!="function")throw Error(u(280));var _e=et.stateNode;_e&&(_e=la(_e),za(et.stateNode,et.type,_e))}}function Da(et){Aa?Ba?Ba.push(et):Ba=[et]:Aa=et}function Ea(){if(Aa){var et=Aa,_e=Ba;if(Ba=Aa=null,Ca(et),_e)for(et=0;et<_e.length;et++)Ca(_e[et])}}function Fa(et,_e){return et(_e)}function Ga(et,_e,tt,rt,nt){return et(_e,tt,rt,nt)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){(Aa!==null||Ba!==null)&&(Ha(),Ea())}function Ma(et,_e,tt){if(Ka)return et(_e,tt);Ka=!0;try{return Ia(et,_e,tt)}finally{Ka=!1,La()}}var Na=/^[: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]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};function Ra(et){return Oa.call(Qa,et)?!0:Oa.call(Pa,et)?!1:Na.test(et)?Qa[et]=!0:(Pa[et]=!0,!1)}function Sa(et,_e,tt,rt){if(tt!==null&&tt.type===0)return!1;switch(typeof _e){case"function":case"symbol":return!0;case"boolean":return rt?!1:tt!==null?!tt.acceptsBooleans:(et=et.toLowerCase().slice(0,5),et!=="data-"&&et!=="aria-");default:return!1}}function Ta(et,_e,tt,rt){if(_e===null||typeof _e>"u"||Sa(et,_e,tt,rt))return!0;if(rt)return!1;if(tt!==null)switch(tt.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 v$1(et,_e,tt,rt,nt,st){this.acceptsBooleans=_e===2||_e===3||_e===4,this.attributeName=rt,this.attributeNamespace=nt,this.mustUseProperty=tt,this.propertyName=et,this.type=_e,this.sanitizeURL=st}var C$1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(et){C$1[et]=new v$1(et,0,!1,et,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(et){var _e=et[0];C$1[_e]=new v$1(_e,1,!1,et[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(et){C$1[et]=new v$1(et,2,!1,et.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(et){C$1[et]=new v$1(et,2,!1,et,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(et){C$1[et]=new v$1(et,3,!1,et.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(et){C$1[et]=new v$1(et,3,!0,et,null,!1)});["capture","download"].forEach(function(et){C$1[et]=new v$1(et,4,!1,et,null,!1)});["cols","rows","size","span"].forEach(function(et){C$1[et]=new v$1(et,6,!1,et,null,!1)});["rowSpan","start"].forEach(function(et){C$1[et]=new v$1(et,5,!1,et.toLowerCase(),null,!1)});var Ua=/[\-:]([a-z])/g;function Va(et){return et[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(et){var _e=et.replace(Ua,Va);C$1[_e]=new v$1(_e,1,!1,et,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(et){var _e=et.replace(Ua,Va);C$1[_e]=new v$1(_e,1,!1,et,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(et){var _e=et.replace(Ua,Va);C$1[_e]=new v$1(_e,1,!1,et,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(et){C$1[et]=new v$1(et,1,!1,et.toLowerCase(),null,!1)});C$1.xlinkHref=new v$1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(et){C$1[et]=new v$1(et,1,!1,et.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null});function Xa(et,_e,tt,rt){var nt=C$1.hasOwnProperty(_e)?C$1[_e]:null,st=nt!==null?nt.type===0:rt?!1:!(!(2<_e.length)||_e[0]!=="o"&&_e[0]!=="O"||_e[1]!=="n"&&_e[1]!=="N");st||(Ta(_e,tt,nt,rt)&&(tt=null),rt||nt===null?Ra(_e)&&(tt===null?et.removeAttribute(_e):et.setAttribute(_e,""+tt)):nt.mustUseProperty?et[nt.propertyName]=tt===null?nt.type===3?!1:"":tt:(_e=nt.attributeName,rt=nt.attributeNamespace,tt===null?et.removeAttribute(_e):(nt=nt.type,tt=nt===3||nt===4&&tt===!0?"":""+tt,rt?et.setAttributeNS(rt,_e,tt):et.setAttribute(_e,tt))))}var Ya=/^(.*)[\\\/]/,E$1=typeof Symbol=="function"&&Symbol.for,Za=E$1?Symbol.for("react.element"):60103,$a=E$1?Symbol.for("react.portal"):60106,ab=E$1?Symbol.for("react.fragment"):60107,bb=E$1?Symbol.for("react.strict_mode"):60108,cb=E$1?Symbol.for("react.profiler"):60114,db=E$1?Symbol.for("react.provider"):60109,eb=E$1?Symbol.for("react.context"):60110,fb=E$1?Symbol.for("react.concurrent_mode"):60111,gb=E$1?Symbol.for("react.forward_ref"):60112,hb=E$1?Symbol.for("react.suspense"):60113,ib=E$1?Symbol.for("react.suspense_list"):60120,jb=E$1?Symbol.for("react.memo"):60115,kb=E$1?Symbol.for("react.lazy"):60116,lb=E$1?Symbol.for("react.block"):60121,mb=typeof Symbol=="function"&&Symbol.iterator;function nb(et){return et===null||typeof et!="object"?null:(et=mb&&et[mb]||et["@@iterator"],typeof et=="function"?et:null)}function ob(et){if(et._status===-1){et._status=0;var _e=et._ctor;_e=_e(),et._result=_e,_e.then(function(tt){et._status===0&&(tt=tt.default,et._status=1,et._result=tt)},function(tt){et._status===0&&(et._status=2,et._result=tt)})}}function pb(et){if(et==null)return null;if(typeof et=="function")return et.displayName||et.name||null;if(typeof et=="string")return et;switch(et){case ab:return"Fragment";case $a:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if(typeof et=="object")switch(et.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var _e=et.render;return _e=_e.displayName||_e.name||"",et.displayName||(_e!==""?"ForwardRef("+_e+")":"ForwardRef");case jb:return pb(et.type);case lb:return pb(et.render);case kb:if(et=et._status===1?et._result:null)return pb(et)}return null}function qb(et){var _e="";do{e:switch(et.tag){case 3:case 4:case 6:case 7:case 10:case 9:var tt="";break e;default:var rt=et._debugOwner,nt=et._debugSource,st=pb(et.type);tt=null,rt&&(tt=pb(rt.type)),rt=st,st="",nt?st=" (at "+nt.fileName.replace(Ya,"")+":"+nt.lineNumber+")":tt&&(st=" (created by "+tt+")"),tt=`
in `+(rt||"Unknown")+st}_e+=tt,et=et.return}while(et);return _e}function rb(et){switch(typeof et){case"boolean":case"number":case"object":case"string":case"undefined":return et;default:return""}}function sb(et){var _e=et.type;return(et=et.nodeName)&&et.toLowerCase()==="input"&&(_e==="checkbox"||_e==="radio")}function tb(et){var _e=sb(et)?"checked":"value",tt=Object.getOwnPropertyDescriptor(et.constructor.prototype,_e),rt=""+et[_e];if(!et.hasOwnProperty(_e)&&typeof tt<"u"&&typeof tt.get=="function"&&typeof tt.set=="function"){var nt=tt.get,st=tt.set;return Object.defineProperty(et,_e,{configurable:!0,get:function(){return nt.call(this)},set:function(dt){rt=""+dt,st.call(this,dt)}}),Object.defineProperty(et,_e,{enumerable:tt.enumerable}),{getValue:function(){return rt},setValue:function(dt){rt=""+dt},stopTracking:function(){et._valueTracker=null,delete et[_e]}}}}function xb(et){et._valueTracker||(et._valueTracker=tb(et))}function yb(et){if(!et)return!1;var _e=et._valueTracker;if(!_e)return!0;var tt=_e.getValue(),rt="";return et&&(rt=sb(et)?et.checked?"true":"false":et.value),et=rt,et!==tt?(_e.setValue(et),!0):!1}function zb(et,_e){var tt=_e.checked;return n$1({},_e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:tt??et._wrapperState.initialChecked})}function Ab(et,_e){var tt=_e.defaultValue==null?"":_e.defaultValue,rt=_e.checked!=null?_e.checked:_e.defaultChecked;tt=rb(_e.value!=null?_e.value:tt),et._wrapperState={initialChecked:rt,initialValue:tt,controlled:_e.type==="checkbox"||_e.type==="radio"?_e.checked!=null:_e.value!=null}}function Bb(et,_e){_e=_e.checked,_e!=null&&Xa(et,"checked",_e,!1)}function Cb(et,_e){Bb(et,_e);var tt=rb(_e.value),rt=_e.type;if(tt!=null)rt==="number"?(tt===0&&et.value===""||et.value!=tt)&&(et.value=""+tt):et.value!==""+tt&&(et.value=""+tt);else if(rt==="submit"||rt==="reset"){et.removeAttribute("value");return}_e.hasOwnProperty("value")?Db(et,_e.type,tt):_e.hasOwnProperty("defaultValue")&&Db(et,_e.type,rb(_e.defaultValue)),_e.checked==null&&_e.defaultChecked!=null&&(et.defaultChecked=!!_e.defaultChecked)}function Eb(et,_e,tt){if(_e.hasOwnProperty("value")||_e.hasOwnProperty("defaultValue")){var rt=_e.type;if(!(rt!=="submit"&&rt!=="reset"||_e.value!==void 0&&_e.value!==null))return;_e=""+et._wrapperState.initialValue,tt||_e===et.value||(et.value=_e),et.defaultValue=_e}tt=et.name,tt!==""&&(et.name=""),et.defaultChecked=!!et._wrapperState.initialChecked,tt!==""&&(et.name=tt)}function Db(et,_e,tt){(_e!=="number"||et.ownerDocument.activeElement!==et)&&(tt==null?et.defaultValue=""+et._wrapperState.initialValue:et.defaultValue!==""+tt&&(et.defaultValue=""+tt))}function Fb(et){var _e="";return aa.Children.forEach(et,function(tt){tt!=null&&(_e+=tt)}),_e}function Gb(et,_e){return et=n$1({children:void 0},_e),(_e=Fb(_e.children))&&(et.children=_e),et}function Hb(et,_e,tt,rt){if(et=et.options,_e){_e={};for(var nt=0;nt<tt.length;nt++)_e["$"+tt[nt]]=!0;for(tt=0;tt<et.length;tt++)nt=_e.hasOwnProperty("$"+et[tt].value),et[tt].selected!==nt&&(et[tt].selected=nt),nt&&rt&&(et[tt].defaultSelected=!0)}else{for(tt=""+rb(tt),_e=null,nt=0;nt<et.length;nt++){if(et[nt].value===tt){et[nt].selected=!0,rt&&(et[nt].defaultSelected=!0);return}_e!==null||et[nt].disabled||(_e=et[nt])}_e!==null&&(_e.selected=!0)}}function Ib(et,_e){if(_e.dangerouslySetInnerHTML!=null)throw Error(u(91));return n$1({},_e,{value:void 0,defaultValue:void 0,children:""+et._wrapperState.initialValue})}function Jb(et,_e){var tt=_e.value;if(tt==null){if(tt=_e.children,_e=_e.defaultValue,tt!=null){if(_e!=null)throw Error(u(92));if(Array.isArray(tt)){if(!(1>=tt.length))throw Error(u(93));tt=tt[0]}_e=tt}_e==null&&(_e=""),tt=_e}et._wrapperState={initialValue:rb(tt)}}function Kb(et,_e){var tt=rb(_e.value),rt=rb(_e.defaultValue);tt!=null&&(tt=""+tt,tt!==et.value&&(et.value=tt),_e.defaultValue==null&&et.defaultValue!==tt&&(et.defaultValue=tt)),rt!=null&&(et.defaultValue=""+rt)}function Lb(et){var _e=et.textContent;_e===et._wrapperState.initialValue&&_e!==""&&_e!==null&&(et.value=_e)}var Mb={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Nb(et){switch(et){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 Ob(et,_e){return et==null||et==="http://www.w3.org/1999/xhtml"?Nb(_e):et==="http://www.w3.org/2000/svg"&&_e==="foreignObject"?"http://www.w3.org/1999/xhtml":et}var Pb,Qb=(function(et){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(_e,tt,rt,nt){MSApp.execUnsafeLocalFunction(function(){return et(_e,tt,rt,nt)})}:et})(function(et,_e){if(et.namespaceURI!==Mb.svg||"innerHTML"in et)et.innerHTML=_e;else{for(Pb=Pb||document.createElement("div"),Pb.innerHTML="<svg>"+_e.valueOf().toString()+"</svg>",_e=Pb.firstChild;et.firstChild;)et.removeChild(et.firstChild);for(;_e.firstChild;)et.appendChild(_e.firstChild)}});function Rb(et,_e){if(_e){var tt=et.firstChild;if(tt&&tt===et.lastChild&&tt.nodeType===3){tt.nodeValue=_e;return}}et.textContent=_e}function Sb(et,_e){var tt={};return tt[et.toLowerCase()]=_e.toLowerCase(),tt["Webkit"+et]="webkit"+_e,tt["Moz"+et]="moz"+_e,tt}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={};ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(et){if(Ub[et])return Ub[et];if(!Tb[et])return et;var _e=Tb[et],tt;for(tt in _e)if(_e.hasOwnProperty(tt)&&tt in Vb)return Ub[et]=_e[tt];return et}var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new(typeof WeakMap=="function"?WeakMap:Map);function cc(et){var _e=bc.get(et);return _e===void 0&&(_e=new Map,bc.set(et,_e)),_e}function dc(et){var _e=et,tt=et;if(et.alternate)for(;_e.return;)_e=_e.return;else{et=_e;do _e=et,(_e.effectTag&1026)!==0&&(tt=_e.return),et=_e.return;while(et)}return _e.tag===3?tt:null}function ec(et){if(et.tag===13){var _e=et.memoizedState;if(_e===null&&(et=et.alternate,et!==null&&(_e=et.memoizedState)),_e!==null)return _e.dehydrated}return null}function fc(et){if(dc(et)!==et)throw Error(u(188))}function gc(et){var _e=et.alternate;if(!_e){if(_e=dc(et),_e===null)throw Error(u(188));return _e!==et?null:et}for(var tt=et,rt=_e;;){var nt=tt.return;if(nt===null)break;var st=nt.alternate;if(st===null){if(rt=nt.return,rt!==null){tt=rt;continue}break}if(nt.child===st.child){for(st=nt.child;st;){if(st===tt)return fc(nt),et;if(st===rt)return fc(nt),_e;st=st.sibling}throw Error(u(188))}if(tt.return!==rt.return)tt=nt,rt=st;else{for(var dt=!1,ft=nt.child;ft;){if(ft===tt){dt=!0,tt=nt,rt=st;break}if(ft===rt){dt=!0,rt=nt,tt=st;break}ft=ft.sibling}if(!dt){for(ft=st.child;ft;){if(ft===tt){dt=!0,tt=st,rt=nt;break}if(ft===rt){dt=!0,rt=st,tt=nt;break}ft=ft.sibling}if(!dt)throw Error(u(189))}}if(tt.alternate!==rt)throw Error(u(190))}if(tt.tag!==3)throw Error(u(188));return tt.stateNode.current===tt?et:_e}function hc(et){if(et=gc(et),!et)return null;for(var _e=et;;){if(_e.tag===5||_e.tag===6)return _e;if(_e.child)_e.child.return=_e,_e=_e.child;else{if(_e===et)break;for(;!_e.sibling;){if(!_e.return||_e.return===et)return null;_e=_e.return}_e.sibling.return=_e.return,_e=_e.sibling}}return null}function ic(et,_e){if(_e==null)throw Error(u(30));return et==null?_e:Array.isArray(et)?Array.isArray(_e)?(et.push.apply(et,_e),et):(et.push(_e),et):Array.isArray(_e)?[et].concat(_e):[et,_e]}function jc(et,_e,tt){Array.isArray(et)?et.forEach(_e,tt):et&&_e.call(tt,et)}var kc=null;function lc(et){if(et){var _e=et._dispatchListeners,tt=et._dispatchInstances;if(Array.isArray(_e))for(var rt=0;rt<_e.length&&!et.isPropagationStopped();rt++)oa(et,_e[rt],tt[rt]);else _e&&oa(et,_e,tt);et._dispatchListeners=null,et._dispatchInstances=null,et.isPersistent()||et.constructor.release(et)}}function mc(et){if(et!==null&&(kc=ic(kc,et)),et=kc,kc=null,et){if(jc(et,lc),kc)throw Error(u(95));if(fa)throw et=ha,fa=!1,ha=null,et}}function nc(et){return et=et.target||et.srcElement||window,et.correspondingUseElement&&(et=et.correspondingUseElement),et.nodeType===3?et.parentNode:et}function oc(et){if(!ya)return!1;et="on"+et;var _e=et in document;return _e||(_e=document.createElement("div"),_e.setAttribute(et,"return;"),_e=typeof _e[et]=="function"),_e}var pc=[];function qc(et){et.topLevelType=null,et.nativeEvent=null,et.targetInst=null,et.ancestors.length=0,10>pc.length&&pc.push(et)}function rc(et,_e,tt,rt){if(pc.length){var nt=pc.pop();return nt.topLevelType=et,nt.eventSystemFlags=rt,nt.nativeEvent=_e,nt.targetInst=tt,nt}return{topLevelType:et,eventSystemFlags:rt,nativeEvent:_e,targetInst:tt,ancestors:[]}}function sc(et){var _e=et.targetInst,tt=_e;do{if(!tt){et.ancestors.push(tt);break}var rt=tt;if(rt.tag===3)rt=rt.stateNode.containerInfo;else{for(;rt.return;)rt=rt.return;rt=rt.tag!==3?null:rt.stateNode.containerInfo}if(!rt)break;_e=tt.tag,_e!==5&&_e!==6||et.ancestors.push(tt),tt=tc(rt)}while(tt);for(tt=0;tt<et.ancestors.length;tt++){_e=et.ancestors[tt];var nt=nc(et.nativeEvent);rt=et.topLevelType;var st=et.nativeEvent,dt=et.eventSystemFlags;tt===0&&(dt|=64);for(var ft=null,ht=0;ht<sa.length;ht++){var mt=sa[ht];mt&&(mt=mt.extractEvents(rt,_e,st,nt,dt))&&(ft=ic(ft,mt))}mc(ft)}}function uc(et,_e,tt){if(!tt.has(et)){switch(et){case"scroll":vc(_e,"scroll",!0);break;case"focus":case"blur":vc(_e,"focus",!0),vc(_e,"blur",!0),tt.set("blur",null),tt.set("focus",null);break;case"cancel":case"close":oc(et)&&vc(_e,et,!0);break;case"invalid":case"submit":case"reset":break;default:ac.indexOf(et)===-1&&F$1(et,_e)}tt.set(et,null)}}var wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ic="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Jc(et,_e){var tt=cc(_e);Hc.forEach(function(rt){uc(rt,_e,tt)}),Ic.forEach(function(rt){uc(rt,_e,tt)})}function Kc(et,_e,tt,rt,nt){return{blockedOn:et,topLevelType:_e,eventSystemFlags:tt|32,nativeEvent:nt,container:rt}}function Lc(et,_e){switch(et){case"focus":case"blur":Bc=null;break;case"dragenter":case"dragleave":Cc=null;break;case"mouseover":case"mouseout":Dc=null;break;case"pointerover":case"pointerout":Ec.delete(_e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fc.delete(_e.pointerId)}}function Mc(et,_e,tt,rt,nt,st){return et===null||et.nativeEvent!==st?(et=Kc(_e,tt,rt,nt,st),_e!==null&&(_e=Nc(_e),_e!==null&&xc(_e)),et):(et.eventSystemFlags|=rt,et)}function Oc(et,_e,tt,rt,nt){switch(_e){case"focus":return Bc=Mc(Bc,et,_e,tt,rt,nt),!0;case"dragenter":return Cc=Mc(Cc,et,_e,tt,rt,nt),!0;case"mouseover":return Dc=Mc(Dc,et,_e,tt,rt,nt),!0;case"pointerover":var st=nt.pointerId;return Ec.set(st,Mc(Ec.get(st)||null,et,_e,tt,rt,nt)),!0;case"gotpointercapture":return st=nt.pointerId,Fc.set(st,Mc(Fc.get(st)||null,et,_e,tt,rt,nt)),!0}return!1}function Pc(et){var _e=tc(et.target);if(_e!==null){var tt=dc(_e);if(tt!==null){if(_e=tt.tag,_e===13){if(_e=ec(tt),_e!==null){et.blockedOn=_e,r$1.unstable_runWithPriority(et.priority,function(){yc(tt)});return}}else if(_e===3&&tt.stateNode.hydrate){et.blockedOn=tt.tag===3?tt.stateNode.containerInfo:null;return}}}et.blockedOn=null}function Qc(et){if(et.blockedOn!==null)return!1;var _e=Rc(et.topLevelType,et.eventSystemFlags,et.container,et.nativeEvent);if(_e!==null){var tt=Nc(_e);return tt!==null&&xc(tt),et.blockedOn=_e,!1}return!0}function Sc(et,_e,tt){Qc(et)&&tt.delete(_e)}function Tc(){for(zc=!1;0<Ac.length;){var et=Ac[0];if(et.blockedOn!==null){et=Nc(et.blockedOn),et!==null&&wc(et);break}var _e=Rc(et.topLevelType,et.eventSystemFlags,et.container,et.nativeEvent);_e!==null?et.blockedOn=_e:Ac.shift()}Bc!==null&&Qc(Bc)&&(Bc=null),Cc!==null&&Qc(Cc)&&(Cc=null),Dc!==null&&Qc(Dc)&&(Dc=null),Ec.forEach(Sc),Fc.forEach(Sc)}function Uc(et,_e){et.blockedOn===_e&&(et.blockedOn=null,zc||(zc=!0,r$1.unstable_scheduleCallback(r$1.unstable_NormalPriority,Tc)))}function Vc(et){function _e(nt){return Uc(nt,et)}if(0<Ac.length){Uc(Ac[0],et);for(var tt=1;tt<Ac.length;tt++){var rt=Ac[tt];rt.blockedOn===et&&(rt.blockedOn=null)}}for(Bc!==null&&Uc(Bc,et),Cc!==null&&Uc(Cc,et),Dc!==null&&Uc(Dc,et),Ec.forEach(_e),Fc.forEach(_e),tt=0;tt<Gc.length;tt++)rt=Gc[tt],rt.blockedOn===et&&(rt.blockedOn=null);for(;0<Gc.length&&(tt=Gc[0],tt.blockedOn===null);)Pc(tt),tt.blockedOn===null&&Gc.shift()}var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animationIteration",Zb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(et,_e){for(var tt=0;tt<et.length;tt+=2){var rt=et[tt],nt=et[tt+1],st="on"+(nt[0].toUpperCase()+nt.slice(1));st={phasedRegistrationNames:{bubbled:st,captured:st+"Capture"},dependencies:[rt],eventPriority:_e},Zc.set(rt,_e),Yc.set(rt,st),Wc[nt]=st}}ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);var dd=r$1.unstable_UserBlockingPriority,ed=r$1.unstable_runWithPriority,fd=!0;function F$1(et,_e){vc(_e,et,!1)}function vc(et,_e,tt){var rt=Zc.get(_e);switch(rt===void 0?2:rt){case 0:rt=gd.bind(null,_e,1,et);break;case 1:rt=hd.bind(null,_e,1,et);break;default:rt=id.bind(null,_e,1,et)}tt?et.addEventListener(_e,rt,!0):et.addEventListener(_e,rt,!1)}function gd(et,_e,tt,rt){Ja||Ha();var nt=id,st=Ja;Ja=!0;try{Ga(nt,et,_e,tt,rt)}finally{(Ja=st)||La()}}function hd(et,_e,tt,rt){ed(dd,id.bind(null,et,_e,tt,rt))}function id(et,_e,tt,rt){if(fd)if(0<Ac.length&&-1<Hc.indexOf(et))et=Kc(null,et,_e,tt,rt),Ac.push(et);else{var nt=Rc(et,_e,tt,rt);if(nt===null)Lc(et,rt);else if(-1<Hc.indexOf(et))et=Kc(nt,et,_e,tt,rt),Ac.push(et);else if(!Oc(nt,et,_e,tt,rt)){Lc(et,rt),et=rc(et,rt,null,_e);try{Ma(sc,et)}finally{qc(et)}}}}function Rc(et,_e,tt,rt){if(tt=nc(rt),tt=tc(tt),tt!==null){var nt=dc(tt);if(nt===null)tt=null;else{var st=nt.tag;if(st===13){if(tt=ec(nt),tt!==null)return tt;tt=null}else if(st===3){if(nt.stateNode.hydrate)return nt.tag===3?nt.stateNode.containerInfo:null;tt=null}else nt!==tt&&(tt=null)}}et=rc(et,rt,tt,_e);try{Ma(sc,et)}finally{qc(et)}return null}var jd={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},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(et){kd.forEach(function(_e){_e=_e+et.charAt(0).toUpperCase()+et.substring(1),jd[_e]=jd[et]})});function ld(et,_e,tt){return _e==null||typeof _e=="boolean"||_e===""?"":tt||typeof _e!="number"||_e===0||jd.hasOwnProperty(et)&&jd[et]?(""+_e).trim():_e+"px"}function md(et,_e){et=et.style;for(var tt in _e)if(_e.hasOwnProperty(tt)){var rt=tt.indexOf("--")===0,nt=ld(tt,_e[tt],rt);tt==="float"&&(tt="cssFloat"),rt?et.setProperty(tt,nt):et[tt]=nt}}var nd=n$1({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 od(et,_e){if(_e){if(nd[et]&&(_e.children!=null||_e.dangerouslySetInnerHTML!=null))throw Error(u(137,et,""));if(_e.dangerouslySetInnerHTML!=null){if(_e.children!=null)throw Error(u(60));if(!(typeof _e.dangerouslySetInnerHTML=="object"&&"__html"in _e.dangerouslySetInnerHTML))throw Error(u(61))}if(_e.style!=null&&typeof _e.style!="object")throw Error(u(62,""))}}function pd(et,_e){if(et.indexOf("-")===-1)return typeof _e.is=="string";switch(et){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qd=Mb.html;function rd(et,_e){et=et.nodeType===9||et.nodeType===11?et:et.ownerDocument;var tt=cc(et);_e=wa[_e];for(var rt=0;rt<_e.length;rt++)uc(_e[rt],et,tt)}function sd(){}function td(et){if(et=et||(typeof document<"u"?document:void 0),typeof et>"u")return null;try{return et.activeElement||et.body}catch{return et.body}}function ud(et){for(;et&&et.firstChild;)et=et.firstChild;return et}function vd(et,_e){var tt=ud(et);et=0;for(var rt;tt;){if(tt.nodeType===3){if(rt=et+tt.textContent.length,et<=_e&&rt>=_e)return{node:tt,offset:_e-et};et=rt}e:{for(;tt;){if(tt.nextSibling){tt=tt.nextSibling;break e}tt=tt.parentNode}tt=void 0}tt=ud(tt)}}function wd(et,_e){return et&&_e?et===_e?!0:et&&et.nodeType===3?!1:_e&&_e.nodeType===3?wd(et,_e.parentNode):"contains"in et?et.contains(_e):et.compareDocumentPosition?!!(et.compareDocumentPosition(_e)&16):!1:!1}function xd(){for(var et=window,_e=td();_e instanceof et.HTMLIFrameElement;){try{var tt=typeof _e.contentWindow.location.href=="string"}catch{tt=!1}if(tt)et=_e.contentWindow;else break;_e=td(et.document)}return _e}function yd(et){var _e=et&&et.nodeName&&et.nodeName.toLowerCase();return _e&&(_e==="input"&&(et.type==="text"||et.type==="search"||et.type==="tel"||et.type==="url"||et.type==="password")||_e==="textarea"||et.contentEditable==="true")}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(et,_e){switch(et){case"button":case"input":case"select":case"textarea":return!!_e.autoFocus}return!1}function Gd(et,_e){return et==="textarea"||et==="option"||et==="noscript"||typeof _e.children=="string"||typeof _e.children=="number"||typeof _e.dangerouslySetInnerHTML=="object"&&_e.dangerouslySetInnerHTML!==null&&_e.dangerouslySetInnerHTML.__html!=null}var Hd=typeof setTimeout=="function"?setTimeout:void 0,Id=typeof clearTimeout=="function"?clearTimeout:void 0;function Jd(et){for(;et!=null;et=et.nextSibling){var _e=et.nodeType;if(_e===1||_e===3)break}return et}function Kd(et){et=et.previousSibling;for(var _e=0;et;){if(et.nodeType===8){var tt=et.data;if(tt===zd||tt===Cd||tt===Bd){if(_e===0)return et;_e--}else tt===Ad&&_e++}et=et.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld;function tc(et){var _e=et[Md];if(_e)return _e;for(var tt=et.parentNode;tt;){if(_e=tt[Od]||tt[Md]){if(tt=_e.alternate,_e.child!==null||tt!==null&&tt.child!==null)for(et=Kd(et);et!==null;){if(tt=et[Md])return tt;et=Kd(et)}return _e}et=tt,tt=et.parentNode}return null}function Nc(et){return et=et[Md]||et[Od],!et||et.tag!==5&&et.tag!==6&&et.tag!==13&&et.tag!==3?null:et}function Pd(et){if(et.tag===5||et.tag===6)return et.stateNode;throw Error(u(33))}function Qd(et){return et[Nd]||null}function Rd(et){do et=et.return;while(et&&et.tag!==5);return et||null}function Sd(et,_e){var tt=et.stateNode;if(!tt)return null;var rt=la(tt);if(!rt)return null;tt=rt[_e];e:switch(_e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(rt=!rt.disabled)||(et=et.type,rt=!(et==="button"||et==="input"||et==="select"||et==="textarea")),et=!rt;break e;default:et=!1}if(et)return null;if(tt&&typeof tt!="function")throw Error(u(231,_e,typeof tt));return tt}function Td(et,_e,tt){(_e=Sd(et,tt.dispatchConfig.phasedRegistrationNames[_e]))&&(tt._dispatchListeners=ic(tt._dispatchListeners,_e),tt._dispatchInstances=ic(tt._dispatchInstances,et))}function Ud(et){if(et&&et.dispatchConfig.phasedRegistrationNames){for(var _e=et._targetInst,tt=[];_e;)tt.push(_e),_e=Rd(_e);for(_e=tt.length;0<_e--;)Td(tt[_e],"captured",et);for(_e=0;_e<tt.length;_e++)Td(tt[_e],"bubbled",et)}}function Vd(et,_e,tt){et&&tt&&tt.dispatchConfig.registrationName&&(_e=Sd(et,tt.dispatchConfig.registrationName))&&(tt._dispatchListeners=ic(tt._dispatchListeners,_e),tt._dispatchInstances=ic(tt._dispatchInstances,et))}function Wd(et){et&&et.dispatchConfig.registrationName&&Vd(et._targetInst,null,et)}function Xd(et){jc(et,Ud)}var Yd=null,Zd=null,$d=null;function ae(){if($d)return $d;var et,_e=Zd,tt=_e.length,rt,nt="value"in Yd?Yd.value:Yd.textContent,st=nt.length;for(et=0;et<tt&&_e[et]===nt[et];et++);var dt=tt-et;for(rt=1;rt<=dt&&_e[tt-rt]===nt[st-rt];rt++);return $d=nt.slice(et,1<rt?1-rt:void 0)}function be(){return!0}function ce(){return!1}function G$1(et,_e,tt,rt){this.dispatchConfig=et,this._targetInst=_e,this.nativeEvent=tt,et=this.constructor.Interface;for(var nt in et)et.hasOwnProperty(nt)&&((_e=et[nt])?this[nt]=_e(tt):nt==="target"?this.target=rt:this[nt]=tt[nt]);return this.isDefaultPrevented=(tt.defaultPrevented!=null?tt.defaultPrevented:tt.returnValue===!1)?be:ce,this.isPropagationStopped=ce,this}n$1(G$1.prototype,{preventDefault:function(){this.defaultPrevented=!0;var et=this.nativeEvent;et&&(et.preventDefault?et.preventDefault():typeof et.returnValue!="unknown"&&(et.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var et=this.nativeEvent;et&&(et.stopPropagation?et.stopPropagation():typeof et.cancelBubble!="unknown"&&(et.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var et=this.constructor.Interface,_e;for(_e in et)this[_e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce,this._dispatchInstances=this._dispatchListeners=null}});G$1.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(et){return et.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};G$1.extend=function(et){function _e(){}function tt(){return rt.apply(this,arguments)}var rt=this;_e.prototype=rt.prototype;var nt=new _e;return n$1(nt,tt.prototype),tt.prototype=nt,tt.prototype.constructor=tt,tt.Interface=n$1({},rt.Interface,et),tt.extend=rt.extend,de(tt),tt};de(G$1);function ee$1(et,_e,tt,rt){if(this.eventPool.length){var nt=this.eventPool.pop();return this.call(nt,et,_e,tt,rt),nt}return new this(et,_e,tt,rt)}function fe(et){if(!(et instanceof this))throw Error(u(279));et.destructor(),10>this.eventPool.length&&this.eventPool.push(et)}function de(et){et.eventPool=[],et.getPooled=ee$1,et.release=fe}var ge=G$1.extend({data:null}),he=G$1.extend({data:null}),ie$1=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode);var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8<ke&&11>=ke),ne=" ",oe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe=!1;function qe(et,_e){switch(et){case"keyup":return ie$1.indexOf(_e.keyCode)!==-1;case"keydown":return _e.keyCode!==229;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function re(et){return et=et.detail,typeof et=="object"&&"data"in et?et.data:null}var se$1=!1;function te$1(et,_e){switch(et){case"compositionend":return re(_e);case"keypress":return _e.which!==32?null:(pe=!0,ne);case"textInput":return et=_e.data,et===ne&&pe?null:et;default:return null}}function ue(et,_e){if(se$1)return et==="compositionend"||!je&&qe(et,_e)?(et=ae(),$d=Zd=Yd=null,se$1=!1,et):null;switch(et){case"paste":return null;case"keypress":if(!(_e.ctrlKey||_e.altKey||_e.metaKey)||_e.ctrlKey&&_e.altKey){if(_e.char&&1<_e.char.length)return _e.char;if(_e.which)return String.fromCharCode(_e.which)}return null;case"compositionend":return me&&_e.locale!=="ko"?null:_e.data;default:return null}}var ve={eventTypes:oe,extractEvents:function(et,_e,tt,rt){var nt;if(je)e:{switch(et){case"compositionstart":var st=oe.compositionStart;break e;case"compositionend":st=oe.compositionEnd;break e;case"compositionupdate":st=oe.compositionUpdate;break e}st=void 0}else se$1?qe(et,tt)&&(st=oe.compositionEnd):et==="keydown"&&tt.keyCode===229&&(st=oe.compositionStart);return st?(me&&tt.locale!=="ko"&&(se$1||st!==oe.compositionStart?st===oe.compositionEnd&&se$1&&(nt=ae()):(Yd=rt,Zd="value"in Yd?Yd.value:Yd.textContent,se$1=!0)),st=ge.getPooled(st,_e,tt,rt),nt?st.data=nt:(nt=re(tt),nt!==null&&(st.data=nt)),Xd(st),nt=st):nt=null,(et=le?te$1(et,tt):ue(et,tt))?(_e=he.getPooled(oe.beforeInput,_e,tt,rt),_e.data=et,Xd(_e)):_e=null,nt===null?_e:_e===null?nt:[nt,_e]}},we={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe(et){var _e=et&&et.nodeName&&et.nodeName.toLowerCase();return _e==="input"?!!we[et.type]:_e==="textarea"}var ye={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ze(et,_e,tt){return et=G$1.getPooled(ye.change,et,_e,tt),et.type="change",Da(tt),Xd(et),et}var Ae=null,Be=null;function Ce(et){mc(et)}function De(et){var _e=Pd(et);if(yb(_e))return et}function Ee(et,_e){if(et==="change")return _e}var Fe=!1;ya&&(Fe=oc("input")&&(!document.documentMode||9<document.documentMode));function Ge(){Ae&&(Ae.detachEvent("onpropertychange",He),Be=Ae=null)}function He(et){if(et.propertyName==="value"&&De(Be))if(et=ze(Be,et,nc(et)),Ja)mc(et);else{Ja=!0;try{Fa(Ce,et)}finally{Ja=!1,La()}}}function Ie(et,_e,tt){et==="focus"?(Ge(),Ae=_e,Be=tt,Ae.attachEvent("onpropertychange",He)):et==="blur"&&Ge()}function Je(et){if(et==="selectionchange"||et==="keyup"||et==="keydown")return De(Be)}function Ke(et,_e){if(et==="click")return De(_e)}function Le(et,_e){if(et==="input"||et==="change")return De(_e)}var Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(et,_e,tt,rt){var nt=_e?Pd(_e):window,st=nt.nodeName&&nt.nodeName.toLowerCase();if(st==="select"||st==="input"&&nt.type==="file")var dt=Ee;else if(xe(nt))if(Fe)dt=Le;else{dt=Je;var ft=Ie}else(st=nt.nodeName)&&st.toLowerCase()==="input"&&(nt.type==="checkbox"||nt.type==="radio")&&(dt=Ke);if(dt&&(dt=dt(et,_e)))return ze(dt,tt,rt);ft&&ft(et,nt,_e),et==="blur"&&(et=nt._wrapperState)&&et.controlled&&nt.type==="number"&&Db(nt,"number",nt.value)}},Ne=G$1.extend({view:null,detail:null}),Oe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pe(et){var _e=this.nativeEvent;return _e.getModifierState?_e.getModifierState(et):(et=Oe[et])?!!_e[et]:!1}function Qe(){return Pe}var Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(et){return et.relatedTarget||(et.fromElement===et.srcElement?et.toElement:et.fromElement)},movementX:function(et){if("movementX"in et)return et.movementX;var _e=Re;return Re=et.screenX,Te?et.type==="mousemove"?et.screenX-_e:0:(Te=!0,0)},movementY:function(et){if("movementY"in et)return et.movementY;var _e=Se;return Se=et.screenY,Ue?et.type==="mousemove"?et.screenY-_e:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ye={eventTypes:Xe,extractEvents:function(et,_e,tt,rt,nt){var st=et==="mouseover"||et==="pointerover",dt=et==="mouseout"||et==="pointerout";if(st&&(nt&32)===0&&(tt.relatedTarget||tt.fromElement)||!dt&&!st)return null;if(st=rt.window===rt?rt:(st=rt.ownerDocument)?st.defaultView||st.parentWindow:window,dt){if(dt=_e,_e=(_e=tt.relatedTarget||tt.toElement)?tc(_e):null,_e!==null){var ft=dc(_e);(_e!==ft||_e.tag!==5&&_e.tag!==6)&&(_e=null)}}else dt=null;if(dt===_e)return null;if(et==="mouseout"||et==="mouseover")var ht=Ve,mt=Xe.mouseLeave,bt=Xe.mouseEnter,St="mouse";else(et==="pointerout"||et==="pointerover")&&(ht=We,mt=Xe.pointerLeave,bt=Xe.pointerEnter,St="pointer");if(et=dt==null?st:Pd(dt),st=_e==null?st:Pd(_e),mt=ht.getPooled(mt,dt,tt,rt),mt.type=St+"leave",mt.target=et,mt.relatedTarget=st,tt=ht.getPooled(bt,_e,tt,rt),tt.type=St+"enter",tt.target=st,tt.relatedTarget=et,rt=dt,St=_e,rt&&St)e:{for(ht=rt,bt=St,dt=0,et=ht;et;et=Rd(et))dt++;for(et=0,_e=bt;_e;_e=Rd(_e))et++;for(;0<dt-et;)ht=Rd(ht),dt--;for(;0<et-dt;)bt=Rd(bt),et--;for(;dt--;){if(ht===bt||ht===bt.alternate)break e;ht=Rd(ht),bt=Rd(bt)}ht=null}else ht=null;for(bt=ht,ht=[];rt&&rt!==bt&&(dt=rt.alternate,!(dt!==null&&dt===bt));)ht.push(rt),rt=Rd(rt);for(rt=[];St&&St!==bt&&(dt=St.alternate,!(dt!==null&&dt===bt));)rt.push(St),St=Rd(St);for(St=0;St<ht.length;St++)Vd(ht[St],"bubbled",mt);for(St=rt.length;0<St--;)Vd(rt[St],"captured",tt);return(nt&64)===0?[mt]:[mt,tt]}};function Ze(et,_e){return et===_e&&(et!==0||1/et===1/_e)||et!==et&&_e!==_e}var $e=typeof Object.is=="function"?Object.is:Ze,af=Object.prototype.hasOwnProperty;function bf(et,_e){if($e(et,_e))return!0;if(typeof et!="object"||et===null||typeof _e!="object"||_e===null)return!1;var tt=Object.keys(et),rt=Object.keys(_e);if(tt.length!==rt.length)return!1;for(rt=0;rt<tt.length;rt++)if(!af.call(_e,tt[rt])||!$e(et[tt[rt]],_e[tt[rt]]))return!1;return!0}var cf=ya&&"documentMode"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1;function jf(et,_e){var tt=_e.window===_e?_e.document:_e.nodeType===9?_e:_e.ownerDocument;return hf||ef==null||ef!==td(tt)?null:(tt=ef,"selectionStart"in tt&&yd(tt)?tt={start:tt.selectionStart,end:tt.selectionEnd}:(tt=(tt.ownerDocument&&tt.ownerDocument.defaultView||window).getSelection(),tt={anchorNode:tt.anchorNode,anchorOffset:tt.anchorOffset,focusNode:tt.focusNode,focusOffset:tt.focusOffset}),gf&&bf(gf,tt)?null:(gf=tt,et=G$1.getPooled(df.select,ff,et,_e),et.type="select",et.target=ef,Xd(et),et))}var kf={eventTypes:df,extractEvents:function(et,_e,tt,rt,nt,st){if(nt=st||(rt.window===rt?rt.document:rt.nodeType===9?rt:rt.ownerDocument),!(st=!nt)){e:{nt=cc(nt),st=wa.onSelect;for(var dt=0;dt<st.length;dt++)if(!nt.has(st[dt])){nt=!1;break e}nt=!0}st=!nt}if(st)return null;switch(nt=_e?Pd(_e):window,et){case"focus":(xe(nt)||nt.contentEditable==="true")&&(ef=nt,ff=_e,gf=null);break;case"blur":gf=ff=ef=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":return hf=!1,jf(tt,rt);case"selectionchange":if(cf)break;case"keydown":case"keyup":return jf(tt,rt)}return null}},lf=G$1.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G$1.extend({clipboardData:function(et){return"clipboardData"in et?et.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(et){var _e=et.keyCode;return"charCode"in et?(et=et.charCode,et===0&&_e===13&&(et=13)):et=_e,et===10&&(et=13),32<=et||et===13?et:0}var pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rf=Ne.extend({key:function(et){if(et.key){var _e=pf[et.key]||et.key;if(_e!=="Unidentified")return _e}return et.type==="keypress"?(et=of(et),et===13?"Enter":String.fromCharCode(et)):et.type==="keydown"||et.type==="keyup"?qf[et.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(et){return et.type==="keypress"?of(et):0},keyCode:function(et){return et.type==="keydown"||et.type==="keyup"?et.keyCode:0},which:function(et){return et.type==="keypress"?of(et):et.type==="keydown"||et.type==="keyup"?et.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G$1.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(et){return"deltaX"in et?et.deltaX:"wheelDeltaX"in et?-et.wheelDeltaX:0},deltaY:function(et){return"deltaY"in et?et.deltaY:"wheelDeltaY"in et?-et.wheelDeltaY:"wheelDelta"in et?-et.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(et,_e,tt,rt){var nt=Yc.get(et);if(!nt)return null;switch(et){case"keypress":if(of(tt)===0)return null;case"keydown":case"keyup":et=rf;break;case"blur":case"focus":et=nf;break;case"click":if(tt.button===2)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":et=Ve;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":et=sf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":et=tf;break;case Xb:case Yb:case Zb:et=lf;break;case $b:et=uf;break;case"scroll":et=Ne;break;case"wheel":et=vf;break;case"copy":case"cut":case"paste":et=mf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":et=We;break;default:et=G$1}return _e=et.getPooled(nt,_e,tt,rt),Xd(_e),_e}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra();var xf=Nc;la=Qd;ma=xf;na=Pd;xa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H$1(et){0>zf||(et.current=yf[zf],yf[zf]=null,zf--)}function I$1(et,_e){zf++,yf[zf]=et.current,et.current=_e}var Af={},J$1={current:Af},K$1={current:!1},Bf=Af;function Cf(et,_e){var tt=et.type.contextTypes;if(!tt)return Af;var rt=et.stateNode;if(rt&&rt.__reactInternalMemoizedUnmaskedChildContext===_e)return rt.__reactInternalMemoizedMaskedChildContext;var nt={},st;for(st in tt)nt[st]=_e[st];return rt&&(et=et.stateNode,et.__reactInternalMemoizedUnmaskedChildContext=_e,et.__reactInternalMemoizedMaskedChildContext=nt),nt}function L$1(et){return et=et.childContextTypes,et!=null}function Df(){H$1(K$1),H$1(J$1)}function Ef(et,_e,tt){if(J$1.current!==Af)throw Error(u(168));I$1(J$1,_e),I$1(K$1,tt)}function Ff(et,_e,tt){var rt=et.stateNode;if(et=_e.childContextTypes,typeof rt.getChildContext!="function")return tt;rt=rt.getChildContext();for(var nt in rt)if(!(nt in et))throw Error(u(108,pb(_e)||"Unknown",nt));return n$1({},tt,{},rt)}function Gf(et){return et=(et=et.stateNode)&&et.__reactInternalMemoizedMergedChildContext||Af,Bf=J$1.current,I$1(J$1,et),I$1(K$1,K$1.current),!0}function Hf(et,_e,tt){var rt=et.stateNode;if(!rt)throw Error(u(169));tt?(et=Ff(et,_e,Bf),rt.__reactInternalMemoizedMergedChildContext=et,H$1(K$1),H$1(J$1),I$1(J$1,et)):H$1(K$1),I$1(K$1,tt)}var If=r$1.unstable_runWithPriority,Jf=r$1.unstable_scheduleCallback,Kf=r$1.unstable_cancelCallback,Lf=r$1.unstable_requestPaint,Mf=r$1.unstable_now,Nf=r$1.unstable_getCurrentPriorityLevel,Of=r$1.unstable_ImmediatePriority,Pf=r$1.unstable_UserBlockingPriority,Qf=r$1.unstable_NormalPriority,Rf=r$1.unstable_LowPriority,Sf=r$1.unstable_IdlePriority,Tf={},Uf=r$1.unstable_shouldYield,Vf=Lf!==void 0?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1e4>Zf?Mf:function(){return Mf()-Zf};function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332))}}function bg(et){switch(et){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332))}}function cg(et,_e){return et=bg(et),If(et,_e)}function dg(et,_e,tt){return et=bg(et),Jf(et,_e,tt)}function eg(et){return Wf===null?(Wf=[et],Xf=Jf(Of,fg)):Wf.push(et),Tf}function gg(){if(Xf!==null){var et=Xf;Xf=null,Kf(et)}fg()}function fg(){if(!Yf&&Wf!==null){Yf=!0;var et=0;try{var _e=Wf;cg(99,function(){for(;et<_e.length;et++){var tt=_e[et];do tt=tt(!0);while(tt!==null)}}),Wf=null}catch(tt){throw Wf!==null&&(Wf=Wf.slice(et+1)),Jf(Of,gg),tt}finally{Yf=!1}}}function hg(et,_e,tt){return tt/=10,1073741821-(((1073741821-et+_e/10)/tt|0)+1)*tt}function ig(et,_e){if(et&&et.defaultProps){_e=n$1({},_e),et=et.defaultProps;for(var tt in et)_e[tt]===void 0&&(_e[tt]=et[tt])}return _e}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}function og(et){var _e=jg.current;H$1(jg),et.type._context._currentValue=_e}function pg(et,_e){for(;et!==null;){var tt=et.alternate;if(et.childExpirationTime<_e)et.childExpirationTime=_e,tt!==null&&tt.childExpirationTime<_e&&(tt.childExpirationTime=_e);else if(tt!==null&&tt.childExpirationTime<_e)tt.childExpirationTime=_e;else break;et=et.return}}function qg(et,_e){kg=et,mg=lg=null,et=et.dependencies,et!==null&&et.firstContext!==null&&(et.expirationTime>=_e&&(rg=!0),et.firstContext=null)}function sg(et,_e){if(mg!==et&&_e!==!1&&_e!==0)if((typeof _e!="number"||_e===1073741823)&&(mg=et,_e=1073741823),_e={context:et,observedBits:_e,next:null},lg===null){if(kg===null)throw Error(u(308));lg=_e,kg.dependencies={expirationTime:0,firstContext:_e,responders:null}}else lg=lg.next=_e;return et._currentValue}var tg=!1;function ug(et){et.updateQueue={baseState:et.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function vg(et,_e){et=et.updateQueue,_e.updateQueue===et&&(_e.updateQueue={baseState:et.baseState,baseQueue:et.baseQueue,shared:et.shared,effects:et.effects})}function wg(et,_e){return et={expirationTime:et,suspenseConfig:_e,tag:0,payload:null,callback:null,next:null},et.next=et}function xg(et,_e){if(et=et.updateQueue,et!==null){et=et.shared;var tt=et.pending;tt===null?_e.next=_e:(_e.next=tt.next,tt.next=_e),et.pending=_e}}function yg(et,_e){var tt=et.alternate;tt!==null&&vg(tt,et),et=et.updateQueue,tt=et.baseQueue,tt===null?(et.baseQueue=_e.next=_e,_e.next=_e):(_e.next=tt.next,tt.next=_e)}function zg(et,_e,tt,rt){var nt=et.updateQueue;tg=!1;var st=nt.baseQueue,dt=nt.shared.pending;if(dt!==null){if(st!==null){var ft=st.next;st.next=dt.next,dt.next=ft}st=dt,nt.shared.pending=null,ft=et.alternate,ft!==null&&(ft=ft.updateQueue,ft!==null&&(ft.baseQueue=dt))}if(st!==null){ft=st.next;var ht=nt.baseState,mt=0,bt=null,St=null,Et=null;if(ft!==null){var Ct=ft;do{if(dt=Ct.expirationTime,dt<rt){var Rt={expirationTime:Ct.expirationTime,suspenseConfig:Ct.suspenseConfig,tag:Ct.tag,payload:Ct.payload,callback:Ct.callback,next:null};Et===null?(St=Et=Rt,bt=ht):Et=Et.next=Rt,dt>mt&&(mt=dt)}else{Et!==null&&(Et=Et.next={expirationTime:1073741823,suspenseConfig:Ct.suspenseConfig,tag:Ct.tag,payload:Ct.payload,callback:Ct.callback,next:null}),Ag(dt,Ct.suspenseConfig);e:{var Tt=et,wt=Ct;switch(dt=_e,Rt=tt,wt.tag){case 1:if(Tt=wt.payload,typeof Tt=="function"){ht=Tt.call(Rt,ht,dt);break e}ht=Tt;break e;case 3:Tt.effectTag=Tt.effectTag&-4097|64;case 0:if(Tt=wt.payload,dt=typeof Tt=="function"?Tt.call(Rt,ht,dt):Tt,dt==null)break e;ht=n$1({},ht,dt);break e;case 2:tg=!0}}Ct.callback!==null&&(et.effectTag|=32,dt=nt.effects,dt===null?nt.effects=[Ct]:dt.push(Ct))}if(Ct=Ct.next,Ct===null||Ct===ft){if(dt=nt.shared.pending,dt===null)break;Ct=st.next=dt.next,dt.next=ft,nt.baseQueue=st=dt,nt.shared.pending=null}}while(!0)}Et===null?bt=ht:Et.next=St,nt.baseState=bt,nt.baseQueue=Et,Bg(mt),et.expirationTime=mt,et.memoizedState=ht}}function Cg(et,_e,tt){if(et=_e.effects,_e.effects=null,et!==null)for(_e=0;_e<et.length;_e++){var rt=et[_e],nt=rt.callback;if(nt!==null){if(rt.callback=null,rt=nt,nt=tt,typeof rt!="function")throw Error(u(191,rt));rt.call(nt)}}}var Dg=Wa.ReactCurrentBatchConfig,Eg=new aa.Component().refs;function Fg(et,_e,tt,rt){_e=et.memoizedState,tt=tt(rt,_e),tt=tt==null?_e:n$1({},_e,tt),et.memoizedState=tt,et.expirationTime===0&&(et.updateQueue.baseState=tt)}var Jg={isMounted:function(et){return(et=et._reactInternalFiber)?dc(et)===et:!1},enqueueSetState:function(et,_e,tt){et=et._reactInternalFiber;var rt=Gg(),nt=Dg.suspense;rt=Hg(rt,et,nt),nt=wg(rt,nt),nt.payload=_e,tt!=null&&(nt.callback=tt),xg(et,nt),Ig(et,rt)},enqueueReplaceState:function(et,_e,tt){et=et._reactInternalFiber;var rt=Gg(),nt=Dg.suspense;rt=Hg(rt,et,nt),nt=wg(rt,nt),nt.tag=1,nt.payload=_e,tt!=null&&(nt.callback=tt),xg(et,nt),Ig(et,rt)},enqueueForceUpdate:function(et,_e){et=et._reactInternalFiber;var tt=Gg(),rt=Dg.suspense;tt=Hg(tt,et,rt),rt=wg(tt,rt),rt.tag=2,_e!=null&&(rt.callback=_e),xg(et,rt),Ig(et,tt)}};function Kg(et,_e,tt,rt,nt,st,dt){return et=et.stateNode,typeof et.shouldComponentUpdate=="function"?et.shouldComponentUpdate(rt,st,dt):_e.prototype&&_e.prototype.isPureReactComponent?!bf(tt,rt)||!bf(nt,st):!0}function Lg(et,_e,tt){var rt=!1,nt=Af,st=_e.contextType;return typeof st=="object"&&st!==null?st=sg(st):(nt=L$1(_e)?Bf:J$1.current,rt=_e.contextTypes,st=(rt=rt!=null)?Cf(et,nt):Af),_e=new _e(tt,st),et.memoizedState=_e.state!==null&&_e.state!==void 0?_e.state:null,_e.updater=Jg,et.stateNode=_e,_e._reactInternalFiber=et,rt&&(et=et.stateNode,et.__reactInternalMemoizedUnmaskedChildContext=nt,et.__reactInternalMemoizedMaskedChildContext=st),_e}function Mg(et,_e,tt,rt){et=_e.state,typeof _e.componentWillReceiveProps=="function"&&_e.componentWillReceiveProps(tt,rt),typeof _e.UNSAFE_componentWillReceiveProps=="function"&&_e.UNSAFE_componentWillReceiveProps(tt,rt),_e.state!==et&&Jg.enqueueReplaceState(_e,_e.state,null)}function Ng(et,_e,tt,rt){var nt=et.stateNode;nt.props=tt,nt.state=et.memoizedState,nt.refs=Eg,ug(et);var st=_e.contextType;typeof st=="object"&&st!==null?nt.context=sg(st):(st=L$1(_e)?Bf:J$1.current,nt.context=Cf(et,st)),zg(et,tt,nt,rt),nt.state=et.memoizedState,st=_e.getDerivedStateFromProps,typeof st=="function"&&(Fg(et,_e,st,tt),nt.state=et.memoizedState),typeof _e.getDerivedStateFromProps=="function"||typeof nt.getSnapshotBeforeUpdate=="function"||typeof nt.UNSAFE_componentWillMount!="function"&&typeof nt.componentWillMount!="function"||(_e=nt.state,typeof nt.componentWillMount=="function"&&nt.componentWillMount(),typeof nt.UNSAFE_componentWillMount=="function"&&nt.UNSAFE_componentWillMount(),_e!==nt.state&&Jg.enqueueReplaceState(nt,nt.state,null),zg(et,tt,nt,rt),nt.state=et.memoizedState),typeof nt.componentDidMount=="function"&&(et.effectTag|=4)}var Og=Array.isArray;function Pg(et,_e,tt){if(et=tt.ref,et!==null&&typeof et!="function"&&typeof et!="object"){if(tt._owner){if(tt=tt._owner,tt){if(tt.tag!==1)throw Error(u(309));var rt=tt.stateNode}if(!rt)throw Error(u(147,et));var nt=""+et;return _e!==null&&_e.ref!==null&&typeof _e.ref=="function"&&_e.ref._stringRef===nt?_e.ref:(_e=function(st){var dt=rt.refs;dt===Eg&&(dt=rt.refs={}),st===null?delete dt[nt]:dt[nt]=st},_e._stringRef=nt,_e)}if(typeof et!="string")throw Error(u(284));if(!tt._owner)throw Error(u(290,et))}return et}function Qg(et,_e){if(et.type!=="textarea")throw Error(u(31,Object.prototype.toString.call(_e)==="[object Object]"?"object with keys {"+Object.keys(_e).join(", ")+"}":_e,""))}function Rg(et){function _e(wt,At){if(et){var Nt=wt.lastEffect;Nt!==null?(Nt.nextEffect=At,wt.lastEffect=At):wt.firstEffect=wt.lastEffect=At,At.nextEffect=null,At.effectTag=8}}function tt(wt,At){if(!et)return null;for(;At!==null;)_e(wt,At),At=At.sibling;return null}function rt(wt,At){for(wt=new Map;At!==null;)At.key!==null?wt.set(At.key,At):wt.set(At.index,At),At=At.sibling;return wt}function nt(wt,At){return wt=Sg(wt,At),wt.index=0,wt.sibling=null,wt}function st(wt,At,Nt){return wt.index=Nt,et?(Nt=wt.alternate,Nt!==null?(Nt=Nt.index,Nt<At?(wt.effectTag=2,At):Nt):(wt.effectTag=2,At)):At}function dt(wt){return et&&wt.alternate===null&&(wt.effectTag=2),wt}function ft(wt,At,Nt,Pt){return At===null||At.tag!==6?(At=Tg(Nt,wt.mode,Pt),At.return=wt,At):(At=nt(At,Nt),At.return=wt,At)}function ht(wt,At,Nt,Pt){return At!==null&&At.elementType===Nt.type?(Pt=nt(At,Nt.props),Pt.ref=Pg(wt,At,Nt),Pt.return=wt,Pt):(Pt=Ug(Nt.type,Nt.key,Nt.props,null,wt.mode,Pt),Pt.ref=Pg(wt,At,Nt),Pt.return=wt,Pt)}function mt(wt,At,Nt,Pt){return At===null||At.tag!==4||At.stateNode.containerInfo!==Nt.containerInfo||At.stateNode.implementation!==Nt.implementation?(At=Vg(Nt,wt.mode,Pt),At.return=wt,At):(At=nt(At,Nt.children||[]),At.return=wt,At)}function bt(wt,At,Nt,Pt,It){return At===null||At.tag!==7?(At=Wg(Nt,wt.mode,Pt,It),At.return=wt,At):(At=nt(At,Nt),At.return=wt,At)}function St(wt,At,Nt){if(typeof At=="string"||typeof At=="number")return At=Tg(""+At,wt.mode,Nt),At.return=wt,At;if(typeof At=="object"&&At!==null){switch(At.$$typeof){case Za:return Nt=Ug(At.type,At.key,At.props,null,wt.mode,Nt),Nt.ref=Pg(wt,null,At),Nt.return=wt,Nt;case $a:return At=Vg(At,wt.mode,Nt),At.return=wt,At}if(Og(At)||nb(At))return At=Wg(At,wt.mode,Nt,null),At.return=wt,At;Qg(wt,At)}return null}function Et(wt,At,Nt,Pt){var It=At!==null?At.key:null;if(typeof Nt=="string"||typeof Nt=="number")return It!==null?null:ft(wt,At,""+Nt,Pt);if(typeof Nt=="object"&&Nt!==null){switch(Nt.$$typeof){case Za:return Nt.key===It?Nt.type===ab?bt(wt,At,Nt.props.children,Pt,It):ht(wt,At,Nt,Pt):null;case $a:return Nt.key===It?mt(wt,At,Nt,Pt):null}if(Og(Nt)||nb(Nt))return It!==null?null:bt(wt,At,Nt,Pt,null);Qg(wt,Nt)}return null}function Ct(wt,At,Nt,Pt,It){if(typeof Pt=="string"||typeof Pt=="number")return wt=wt.get(Nt)||null,ft(At,wt,""+Pt,It);if(typeof Pt=="object"&&Pt!==null){switch(Pt.$$typeof){case Za:return wt=wt.get(Pt.key===null?Nt:Pt.key)||null,Pt.type===ab?bt(At,wt,Pt.props.children,It,Pt.key):ht(At,wt,Pt,It);case $a:return wt=wt.get(Pt.key===null?Nt:Pt.key)||null,mt(At,wt,Pt,It)}if(Og(Pt)||nb(Pt))return wt=wt.get(Nt)||null,bt(At,wt,Pt,It,null);Qg(At,Pt)}return null}function Rt(wt,At,Nt,Pt){for(var It=null,Ft=null,qt=At,Vt=At=0,Kt=null;qt!==null&&Vt<Nt.length;Vt++){qt.index>Vt?(Kt=qt,qt=null):Kt=qt.sibling;var jt=Et(wt,qt,Nt[Vt],Pt);if(jt===null){qt===null&&(qt=Kt);break}et&&qt&&jt.alternate===null&&_e(wt,qt),At=st(jt,At,Vt),Ft===null?It=jt:Ft.sibling=jt,Ft=jt,qt=Kt}if(Vt===Nt.length)return tt(wt,qt),It;if(qt===null){for(;Vt<Nt.length;Vt++)qt=St(wt,Nt[Vt],Pt),qt!==null&&(At=st(qt,At,Vt),Ft===null?It=qt:Ft.sibling=qt,Ft=qt);return It}for(qt=rt(wt,qt);Vt<Nt.length;Vt++)Kt=Ct(qt,wt,Vt,Nt[Vt],Pt),Kt!==null&&(et&&Kt.alternate!==null&&qt.delete(Kt.key===null?Vt:Kt.key),At=st(Kt,At,Vt),Ft===null?It=Kt:Ft.sibling=Kt,Ft=Kt);return et&&qt.forEach(function(Ut){return _e(wt,Ut)}),It}function Tt(wt,At,Nt,Pt){var It=nb(Nt);if(typeof It!="function")throw Error(u(150));if(Nt=It.call(Nt),Nt==null)throw Error(u(151));for(var Ft=It=null,qt=At,Vt=At=0,Kt=null,jt=Nt.next();qt!==null&&!jt.done;Vt++,jt=Nt.next()){qt.index>Vt?(Kt=qt,qt=null):Kt=qt.sibling;var Ut=Et(wt,qt,jt.value,Pt);if(Ut===null){qt===null&&(qt=Kt);break}et&&qt&&Ut.alternate===null&&_e(wt,qt),At=st(Ut,At,Vt),Ft===null?It=Ut:Ft.sibling=Ut,Ft=Ut,qt=Kt}if(jt.done)return tt(wt,qt),It;if(qt===null){for(;!jt.done;Vt++,jt=Nt.next())jt=St(wt,jt.value,Pt),jt!==null&&(At=st(jt,At,Vt),Ft===null?It=jt:Ft.sibling=jt,Ft=jt);return It}for(qt=rt(wt,qt);!jt.done;Vt++,jt=Nt.next())jt=Ct(qt,wt,Vt,jt.value,Pt),jt!==null&&(et&&jt.alternate!==null&&qt.delete(jt.key===null?Vt:jt.key),At=st(jt,At,Vt),Ft===null?It=jt:Ft.sibling=jt,Ft=jt);return et&&qt.forEach(function(Ot){return _e(wt,Ot)}),It}return function(wt,At,Nt,Pt){var It=typeof Nt=="object"&&Nt!==null&&Nt.type===ab&&Nt.key===null;It&&(Nt=Nt.props.children);var Ft=typeof Nt=="object"&&Nt!==null;if(Ft)switch(Nt.$$typeof){case Za:e:{for(Ft=Nt.key,It=At;It!==null;){if(It.key===Ft){switch(It.tag){case 7:if(Nt.type===ab){tt(wt,It.sibling),At=nt(It,Nt.props.children),At.return=wt,wt=At;break e}break;default:if(It.elementType===Nt.type){tt(wt,It.sibling),At=nt(It,Nt.props),At.ref=Pg(wt,It,Nt),At.return=wt,wt=At;break e}}tt(wt,It);break}else _e(wt,It);It=It.sibling}Nt.type===ab?(At=Wg(Nt.props.children,wt.mode,Pt,Nt.key),At.return=wt,wt=At):(Pt=Ug(Nt.type,Nt.key,Nt.props,null,wt.mode,Pt),Pt.ref=Pg(wt,At,Nt),Pt.return=wt,wt=Pt)}return dt(wt);case $a:e:{for(It=Nt.key;At!==null;){if(At.key===It)if(At.tag===4&&At.stateNode.containerInfo===Nt.containerInfo&&At.stateNode.implementation===Nt.implementation){tt(wt,At.sibling),At=nt(At,Nt.children||[]),At.return=wt,wt=At;break e}else{tt(wt,At);break}else _e(wt,At);At=At.sibling}At=Vg(Nt,wt.mode,Pt),At.return=wt,wt=At}return dt(wt)}if(typeof Nt=="string"||typeof Nt=="number")return Nt=""+Nt,At!==null&&At.tag===6?(tt(wt,At.sibling),At=nt(At,Nt),At.return=wt,wt=At):(tt(wt,At),At=Tg(Nt,wt.mode,Pt),At.return=wt,wt=At),dt(wt);if(Og(Nt))return Rt(wt,At,Nt,Pt);if(nb(Nt))return Tt(wt,At,Nt,Pt);if(Ft&&Qg(wt,Nt),typeof Nt>"u"&&!It)switch(wt.tag){case 1:case 0:throw wt=wt.type,Error(u(152,wt.displayName||wt.name||"Component"))}return tt(wt,At)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};function ch(et){if(et===Zg)throw Error(u(174));return et}function dh(et,_e){switch(I$1(bh,_e),I$1(ah,et),I$1($g,Zg),et=_e.nodeType,et){case 9:case 11:_e=(_e=_e.documentElement)?_e.namespaceURI:Ob(null,"");break;default:et=et===8?_e.parentNode:_e,_e=et.namespaceURI||null,et=et.tagName,_e=Ob(_e,et)}H$1($g),I$1($g,_e)}function eh(){H$1($g),H$1(ah),H$1(bh)}function fh(et){ch(bh.current);var _e=ch($g.current),tt=Ob(_e,et.type);_e!==tt&&(I$1(ah,et),I$1($g,tt))}function gh(et){ah.current===et&&(H$1($g),H$1(ah))}var M$1={current:0};function hh(et){for(var _e=et;_e!==null;){if(_e.tag===13){var tt=_e.memoizedState;if(tt!==null&&(tt=tt.dehydrated,tt===null||tt.data===Bd||tt.data===Cd))return _e}else if(_e.tag===19&&_e.memoizedProps.revealOrder!==void 0){if((_e.effectTag&64)!==0)return _e}else if(_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===et)break;for(;_e.sibling===null;){if(_e.return===null||_e.return===et)return null;_e=_e.return}_e.sibling.return=_e.return,_e=_e.sibling}return null}function ih(et,_e){return{responder:et,props:_e}}var jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N$1=null,O$1=null,P$1=null,mh=!1;function Q$1(){throw Error(u(321))}function nh(et,_e){if(_e===null)return!1;for(var tt=0;tt<_e.length&&tt<et.length;tt++)if(!$e(et[tt],_e[tt]))return!1;return!0}function oh(et,_e,tt,rt,nt,st){if(lh=st,N$1=_e,_e.memoizedState=null,_e.updateQueue=null,_e.expirationTime=0,jh.current=et===null||et.memoizedState===null?ph:qh,et=tt(rt,nt),_e.expirationTime===lh){st=0;do{if(_e.expirationTime=0,!(25>st))throw Error(u(301));st+=1,P$1=O$1=null,_e.updateQueue=null,jh.current=rh,et=tt(rt,nt)}while(_e.expirationTime===lh)}if(jh.current=sh,_e=O$1!==null&&O$1.next!==null,lh=0,P$1=O$1=N$1=null,mh=!1,_e)throw Error(u(300));return et}function th(){var et={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return P$1===null?N$1.memoizedState=P$1=et:P$1=P$1.next=et,P$1}function uh(){if(O$1===null){var et=N$1.alternate;et=et!==null?et.memoizedState:null}else et=O$1.next;var _e=P$1===null?N$1.memoizedState:P$1.next;if(_e!==null)P$1=_e,O$1=et;else{if(et===null)throw Error(u(310));O$1=et,et={memoizedState:O$1.memoizedState,baseState:O$1.baseState,baseQueue:O$1.baseQueue,queue:O$1.queue,next:null},P$1===null?N$1.memoizedState=P$1=et:P$1=P$1.next=et}return P$1}function vh(et,_e){return typeof _e=="function"?_e(et):_e}function wh(et){var _e=uh(),tt=_e.queue;if(tt===null)throw Error(u(311));tt.lastRenderedReducer=et;var rt=O$1,nt=rt.baseQueue,st=tt.pending;if(st!==null){if(nt!==null){var dt=nt.next;nt.next=st.next,st.next=dt}rt.baseQueue=nt=st,tt.pending=null}if(nt!==null){nt=nt.next,rt=rt.baseState;var ft=dt=st=null,ht=nt;do{var mt=ht.expirationTime;if(mt<lh){var bt={expirationTime:ht.expirationTime,suspenseConfig:ht.suspenseConfig,action:ht.action,eagerReducer:ht.eagerReducer,eagerState:ht.eagerState,next:null};ft===null?(dt=ft=bt,st=rt):ft=ft.next=bt,mt>N$1.expirationTime&&(N$1.expirationTime=mt,Bg(mt))}else ft!==null&&(ft=ft.next={expirationTime:1073741823,suspenseConfig:ht.suspenseConfig,action:ht.action,eagerReducer:ht.eagerReducer,eagerState:ht.eagerState,next:null}),Ag(mt,ht.suspenseConfig),rt=ht.eagerReducer===et?ht.eagerState:et(rt,ht.action);ht=ht.next}while(ht!==null&&ht!==nt);ft===null?st=rt:ft.next=dt,$e(rt,_e.memoizedState)||(rg=!0),_e.memoizedState=rt,_e.baseState=st,_e.baseQueue=ft,tt.lastRenderedState=rt}return[_e.memoizedState,tt.dispatch]}function xh(et){var _e=uh(),tt=_e.queue;if(tt===null)throw Error(u(311));tt.lastRenderedReducer=et;var rt=tt.dispatch,nt=tt.pending,st=_e.memoizedState;if(nt!==null){tt.pending=null;var dt=nt=nt.next;do st=et(st,dt.action),dt=dt.next;while(dt!==nt);$e(st,_e.memoizedState)||(rg=!0),_e.memoizedState=st,_e.baseQueue===null&&(_e.baseState=st),tt.lastRenderedState=st}return[st,rt]}function yh(et){var _e=th();return typeof et=="function"&&(et=et()),_e.memoizedState=_e.baseState=et,et=_e.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:et},et=et.dispatch=zh.bind(null,N$1,et),[_e.memoizedState,et]}function Ah(et,_e,tt,rt){return et={tag:et,create:_e,destroy:tt,deps:rt,next:null},_e=N$1.updateQueue,_e===null?(_e={lastEffect:null},N$1.updateQueue=_e,_e.lastEffect=et.next=et):(tt=_e.lastEffect,tt===null?_e.lastEffect=et.next=et:(rt=tt.next,tt.next=et,et.next=rt,_e.lastEffect=et)),et}function Bh(){return uh().memoizedState}function Ch(et,_e,tt,rt){var nt=th();N$1.effectTag|=et,nt.memoizedState=Ah(1|_e,tt,void 0,rt===void 0?null:rt)}function Dh(et,_e,tt,rt){var nt=uh();rt=rt===void 0?null:rt;var st=void 0;if(O$1!==null){var dt=O$1.memoizedState;if(st=dt.destroy,rt!==null&&nh(rt,dt.deps)){Ah(_e,tt,st,rt);return}}N$1.effectTag|=et,nt.memoizedState=Ah(1|_e,tt,st,rt)}function Eh(et,_e){return Ch(516,4,et,_e)}function Fh(et,_e){return Dh(516,4,et,_e)}function Gh(et,_e){return Dh(4,2,et,_e)}function Hh(et,_e){if(typeof _e=="function")return et=et(),_e(et),function(){_e(null)};if(_e!=null)return et=et(),_e.current=et,function(){_e.current=null}}function Ih(et,_e,tt){return tt=tt!=null?tt.concat([et]):null,Dh(4,2,Hh.bind(null,_e,et),tt)}function Jh(){}function Kh(et,_e){return th().memoizedState=[et,_e===void 0?null:_e],et}function Lh(et,_e){var tt=uh();_e=_e===void 0?null:_e;var rt=tt.memoizedState;return rt!==null&&_e!==null&&nh(_e,rt[1])?rt[0]:(tt.memoizedState=[et,_e],et)}function Mh(et,_e){var tt=uh();_e=_e===void 0?null:_e;var rt=tt.memoizedState;return rt!==null&&_e!==null&&nh(_e,rt[1])?rt[0]:(et=et(),tt.memoizedState=[et,_e],et)}function Nh(et,_e,tt){var rt=ag();cg(98>rt?98:rt,function(){et(!0)}),cg(97<rt?97:rt,function(){var nt=kh.suspense;kh.suspense=_e===void 0?null:_e;try{et(!1),tt()}finally{kh.suspense=nt}})}function zh(et,_e,tt){var rt=Gg(),nt=Dg.suspense;rt=Hg(rt,et,nt),nt={expirationTime:rt,suspenseConfig:nt,action:tt,eagerReducer:null,eagerState:null,next:null};var st=_e.pending;if(st===null?nt.next=nt:(nt.next=st.next,st.next=nt),_e.pending=nt,st=et.alternate,et===N$1||st!==null&&st===N$1)mh=!0,nt.expirationTime=lh,N$1.expirationTime=lh;else{if(et.expirationTime===0&&(st===null||st.expirationTime===0)&&(st=_e.lastRenderedReducer,st!==null))try{var dt=_e.lastRenderedState,ft=st(dt,tt);if(nt.eagerReducer=st,nt.eagerState=ft,$e(ft,dt))return}catch{}finally{}Ig(et,rt)}}var sh={readContext:sg,useCallback:Q$1,useContext:Q$1,useEffect:Q$1,useImperativeHandle:Q$1,useLayoutEffect:Q$1,useMemo:Q$1,useReducer:Q$1,useRef:Q$1,useState:Q$1,useDebugValue:Q$1,useResponder:Q$1,useDeferredValue:Q$1,useTransition:Q$1},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(et,_e,tt){return tt=tt!=null?tt.concat([et]):null,Ch(4,2,Hh.bind(null,_e,et),tt)},useLayoutEffect:function(et,_e){return Ch(4,2,et,_e)},useMemo:function(et,_e){var tt=th();return _e=_e===void 0?null:_e,et=et(),tt.memoizedState=[et,_e],et},useReducer:function(et,_e,tt){var rt=th();return _e=tt!==void 0?tt(_e):_e,rt.memoizedState=rt.baseState=_e,et=rt.queue={pending:null,dispatch:null,lastRenderedReducer:et,lastRenderedState:_e},et=et.dispatch=zh.bind(null,N$1,et),[rt.memoizedState,et]},useRef:function(et){var _e=th();return et={current:et},_e.memoizedState=et},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(et,_e){var tt=yh(et),rt=tt[0],nt=tt[1];return Eh(function(){var st=kh.suspense;kh.suspense=_e===void 0?null:_e;try{nt(et)}finally{kh.suspense=st}},[et,_e]),rt},useTransition:function(et){var _e=yh(!1),tt=_e[0];return _e=_e[1],[Kh(Nh.bind(null,_e,et),[_e,et]),tt]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(et,_e){var tt=wh(vh),rt=tt[0],nt=tt[1];return Fh(function(){var st=kh.suspense;kh.suspense=_e===void 0?null:_e;try{nt(et)}finally{kh.suspense=st}},[et,_e]),rt},useTransition:function(et){var _e=wh(vh),tt=_e[0];return _e=_e[1],[Lh(Nh.bind(null,_e,et),[_e,et]),tt]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(et,_e){var tt=xh(vh),rt=tt[0],nt=tt[1];return Fh(function(){var st=kh.suspense;kh.suspense=_e===void 0?null:_e;try{nt(et)}finally{kh.suspense=st}},[et,_e]),rt},useTransition:function(et){var _e=xh(vh),tt=_e[0];return _e=_e[1],[Lh(Nh.bind(null,_e,et),[_e,et]),tt]}},Oh=null,Ph=null,Qh=!1;function Rh(et,_e){var tt=Sh(5,null,null,0);tt.elementType="DELETED",tt.type="DELETED",tt.stateNode=_e,tt.return=et,tt.effectTag=8,et.lastEffect!==null?(et.lastEffect.nextEffect=tt,et.lastEffect=tt):et.firstEffect=et.lastEffect=tt}function Th(et,_e){switch(et.tag){case 5:var tt=et.type;return _e=_e.nodeType!==1||tt.toLowerCase()!==_e.nodeName.toLowerCase()?null:_e,_e!==null?(et.stateNode=_e,!0):!1;case 6:return _e=et.pendingProps===""||_e.nodeType!==3?null:_e,_e!==null?(et.stateNode=_e,!0):!1;case 13:return!1;default:return!1}}function Uh(et){if(Qh){var _e=Ph;if(_e){var tt=_e;if(!Th(et,_e)){if(_e=Jd(tt.nextSibling),!_e||!Th(et,_e)){et.effectTag=et.effectTag&-1025|2,Qh=!1,Oh=et;return}Rh(Oh,tt)}Oh=et,Ph=Jd(_e.firstChild)}else et.effectTag=et.effectTag&-1025|2,Qh=!1,Oh=et}}function Vh(et){for(et=et.return;et!==null&&et.tag!==5&&et.tag!==3&&et.tag!==13;)et=et.return;Oh=et}function Wh(et){if(et!==Oh)return!1;if(!Qh)return Vh(et),Qh=!0,!1;var _e=et.type;if(et.tag!==5||_e!=="head"&&_e!=="body"&&!Gd(_e,et.memoizedProps))for(_e=Ph;_e;)Rh(et,_e),_e=Jd(_e.nextSibling);if(Vh(et),et.tag===13){if(et=et.memoizedState,et=et!==null?et.dehydrated:null,!et)throw Error(u(317));e:{for(et=et.nextSibling,_e=0;et;){if(et.nodeType===8){var tt=et.data;if(tt===Ad){if(_e===0){Ph=Jd(et.nextSibling);break e}_e--}else tt!==zd&&tt!==Cd&&tt!==Bd||_e++}et=et.nextSibling}Ph=null}}else Ph=Oh?Jd(et.stateNode.nextSibling):null;return!0}function Xh(){Ph=Oh=null,Qh=!1}var Yh=Wa.ReactCurrentOwner,rg=!1;function R$1(et,_e,tt,rt){_e.child=et===null?Yg(_e,null,tt,rt):Xg(_e,et.child,tt,rt)}function Zh(et,_e,tt,rt,nt){tt=tt.render;var st=_e.ref;return qg(_e,nt),rt=oh(et,_e,tt,rt,st,nt),et!==null&&!rg?(_e.updateQueue=et.updateQueue,_e.effectTag&=-517,et.expirationTime<=nt&&(et.expirationTime=0),$h(et,_e,nt)):(_e.effectTag|=1,R$1(et,_e,rt,nt),_e.child)}function ai(et,_e,tt,rt,nt,st){if(et===null){var dt=tt.type;return typeof dt=="function"&&!bi(dt)&&dt.defaultProps===void 0&&tt.compare===null&&tt.defaultProps===void 0?(_e.tag=15,_e.type=dt,ci(et,_e,dt,rt,nt,st)):(et=Ug(tt.type,null,rt,null,_e.mode,st),et.ref=_e.ref,et.return=_e,_e.child=et)}return dt=et.child,nt<st&&(nt=dt.memoizedProps,tt=tt.compare,tt=tt!==null?tt:bf,tt(nt,rt)&&et.ref===_e.ref)?$h(et,_e,st):(_e.effectTag|=1,et=Sg(dt,rt),et.ref=_e.ref,et.return=_e,_e.child=et)}function ci(et,_e,tt,rt,nt,st){return et!==null&&bf(et.memoizedProps,rt)&&et.ref===_e.ref&&(rg=!1,nt<st)?(_e.expirationTime=et.expirationTime,$h(et,_e,st)):di(et,_e,tt,rt,st)}function ei(et,_e){var tt=_e.ref;(et===null&&tt!==null||et!==null&&et.ref!==tt)&&(_e.effectTag|=128)}function di(et,_e,tt,rt,nt){var st=L$1(tt)?Bf:J$1.current;return st=Cf(_e,st),qg(_e,nt),tt=oh(et,_e,tt,rt,st,nt),et!==null&&!rg?(_e.updateQueue=et.updateQueue,_e.effectTag&=-517,et.expirationTime<=nt&&(et.expirationTime=0),$h(et,_e,nt)):(_e.effectTag|=1,R$1(et,_e,tt,nt),_e.child)}function fi(et,_e,tt,rt,nt){if(L$1(tt)){var st=!0;Gf(_e)}else st=!1;if(qg(_e,nt),_e.stateNode===null)et!==null&&(et.alternate=null,_e.alternate=null,_e.effectTag|=2),Lg(_e,tt,rt),Ng(_e,tt,rt,nt),rt=!0;else if(et===null){var dt=_e.stateNode,ft=_e.memoizedProps;dt.props=ft;var ht=dt.context,mt=tt.contextType;typeof mt=="object"&&mt!==null?mt=sg(mt):(mt=L$1(tt)?Bf:J$1.current,mt=Cf(_e,mt));var bt=tt.getDerivedStateFromProps,St=typeof bt=="function"||typeof dt.getSnapshotBeforeUpdate=="function";St||typeof dt.UNSAFE_componentWillReceiveProps!="function"&&typeof dt.componentWillReceiveProps!="function"||(ft!==rt||ht!==mt)&&Mg(_e,dt,rt,mt),tg=!1;var Et=_e.memoizedState;dt.state=Et,zg(_e,rt,dt,nt),ht=_e.memoizedState,ft!==rt||Et!==ht||K$1.current||tg?(typeof bt=="function"&&(Fg(_e,tt,bt,rt),ht=_e.memoizedState),(ft=tg||Kg(_e,tt,ft,rt,Et,ht,mt))?(St||typeof dt.UNSAFE_componentWillMount!="function"&&typeof dt.componentWillMount!="function"||(typeof dt.componentWillMount=="function"&&dt.componentWillMount(),typeof dt.UNSAFE_componentWillMount=="function"&&dt.UNSAFE_componentWillMount()),typeof dt.componentDidMount=="function"&&(_e.effectTag|=4)):(typeof dt.componentDidMount=="function"&&(_e.effectTag|=4),_e.memoizedProps=rt,_e.memoizedState=ht),dt.props=rt,dt.state=ht,dt.context=mt,rt=ft):(typeof dt.componentDidMount=="function"&&(_e.effectTag|=4),rt=!1)}else dt=_e.stateNode,vg(et,_e),ft=_e.memoizedProps,dt.props=_e.type===_e.elementType?ft:ig(_e.type,ft),ht=dt.context,mt=tt.contextType,typeof mt=="object"&&mt!==null?mt=sg(mt):(mt=L$1(tt)?Bf:J$1.current,mt=Cf(_e,mt)),bt=tt.getDerivedStateFromProps,(St=typeof bt=="function"||typeof dt.getSnapshotBeforeUpdate=="function")||typeof dt.UNSAFE_componentWillReceiveProps!="function"&&typeof dt.componentWillReceiveProps!="function"||(ft!==rt||ht!==mt)&&Mg(_e,dt,rt,mt),tg=!1,ht=_e.memoizedState,dt.state=ht,zg(_e,rt,dt,nt),Et=_e.memoizedState,ft!==rt||ht!==Et||K$1.current||tg?(typeof bt=="function"&&(Fg(_e,tt,bt,rt),Et=_e.memoizedState),(bt=tg||Kg(_e,tt,ft,rt,ht,Et,mt))?(St||typeof dt.UNSAFE_componentWillUpdate!="function"&&typeof dt.componentWillUpdate!="function"||(typeof dt.componentWillUpdate=="function"&&dt.componentWillUpdate(rt,Et,mt),typeof dt.UNSAFE_componentWillUpdate=="function"&&dt.UNSAFE_componentWillUpdate(rt,Et,mt)),typeof dt.componentDidUpdate=="function"&&(_e.effectTag|=4),typeof dt.getSnapshotBeforeUpdate=="function"&&(_e.effectTag|=256)):(typeof dt.componentDidUpdate!="function"||ft===et.memoizedProps&&ht===et.memoizedState||(_e.effectTag|=4),typeof dt.getSnapshotBeforeUpdate!="function"||ft===et.memoizedProps&&ht===et.memoizedState||(_e.effectTag|=256),_e.memoizedProps=rt,_e.memoizedState=Et),dt.props=rt,dt.state=Et,dt.context=mt,rt=bt):(typeof dt.componentDidUpdate!="function"||ft===et.memoizedProps&&ht===et.memoizedState||(_e.effectTag|=4),typeof dt.getSnapshotBeforeUpdate!="function"||ft===et.memoizedProps&&ht===et.memoizedState||(_e.effectTag|=256),rt=!1);return gi(et,_e,tt,rt,st,nt)}function gi(et,_e,tt,rt,nt,st){ei(et,_e);var dt=(_e.effectTag&64)!==0;if(!rt&&!dt)return nt&&Hf(_e,tt,!1),$h(et,_e,st);rt=_e.stateNode,Yh.current=_e;var ft=dt&&typeof tt.getDerivedStateFromError!="function"?null:rt.render();return _e.effectTag|=1,et!==null&&dt?(_e.child=Xg(_e,et.child,null,st),_e.child=Xg(_e,null,ft,st)):R$1(et,_e,ft,st),_e.memoizedState=rt.state,nt&&Hf(_e,tt,!0),_e.child}function hi(et){var _e=et.stateNode;_e.pendingContext?Ef(et,_e.pendingContext,_e.pendingContext!==_e.context):_e.context&&Ef(et,_e.context,!1),dh(et,_e.containerInfo)}var ii={dehydrated:null,retryTime:0};function ji(et,_e,tt){var rt=_e.mode,nt=_e.pendingProps,st=M$1.current,dt=!1,ft;if((ft=(_e.effectTag&64)!==0)||(ft=(st&2)!==0&&(et===null||et.memoizedState!==null)),ft?(dt=!0,_e.effectTag&=-65):et!==null&&et.memoizedState===null||nt.fallback===void 0||nt.unstable_avoidThisFallback===!0||(st|=1),I$1(M$1,st&1),et===null){if(nt.fallback!==void 0&&Uh(_e),dt){if(dt=nt.fallback,nt=Wg(null,rt,0,null),nt.return=_e,(_e.mode&2)===0)for(et=_e.memoizedState!==null?_e.child.child:_e.child,nt.child=et;et!==null;)et.return=nt,et=et.sibling;return tt=Wg(dt,rt,tt,null),tt.return=_e,nt.sibling=tt,_e.memoizedState=ii,_e.child=nt,tt}return rt=nt.children,_e.memoizedState=null,_e.child=Yg(_e,null,rt,tt)}if(et.memoizedState!==null){if(et=et.child,rt=et.sibling,dt){if(nt=nt.fallback,tt=Sg(et,et.pendingProps),tt.return=_e,(_e.mode&2)===0&&(dt=_e.memoizedState!==null?_e.child.child:_e.child,dt!==et.child))for(tt.child=dt;dt!==null;)dt.return=tt,dt=dt.sibling;return rt=Sg(rt,nt),rt.return=_e,tt.sibling=rt,tt.childExpirationTime=0,_e.memoizedState=ii,_e.child=tt,rt}return tt=Xg(_e,et.child,nt.children,tt),_e.memoizedState=null,_e.child=tt}if(et=et.child,dt){if(dt=nt.fallback,nt=Wg(null,rt,0,null),nt.return=_e,nt.child=et,et!==null&&(et.return=nt),(_e.mode&2)===0)for(et=_e.memoizedState!==null?_e.child.child:_e.child,nt.child=et;et!==null;)et.return=nt,et=et.sibling;return tt=Wg(dt,rt,tt,null),tt.return=_e,nt.sibling=tt,tt.effectTag|=2,nt.childExpirationTime=0,_e.memoizedState=ii,_e.child=nt,tt}return _e.memoizedState=null,_e.child=Xg(_e,et,nt.children,tt)}function ki(et,_e){et.expirationTime<_e&&(et.expirationTime=_e);var tt=et.alternate;tt!==null&&tt.expirationTime<_e&&(tt.expirationTime=_e),pg(et.return,_e)}function li(et,_e,tt,rt,nt,st){var dt=et.memoizedState;dt===null?et.memoizedState={isBackwards:_e,rendering:null,renderingStartTime:0,last:rt,tail:tt,tailExpiration:0,tailMode:nt,lastEffect:st}:(dt.isBackwards=_e,dt.rendering=null,dt.renderingStartTime=0,dt.last=rt,dt.tail=tt,dt.tailExpiration=0,dt.tailMode=nt,dt.lastEffect=st)}function mi(et,_e,tt){var rt=_e.pendingProps,nt=rt.revealOrder,st=rt.tail;if(R$1(et,_e,rt.children,tt),rt=M$1.current,(rt&2)!==0)rt=rt&1|2,_e.effectTag|=64;else{if(et!==null&&(et.effectTag&64)!==0)e:for(et=_e.child;et!==null;){if(et.tag===13)et.memoizedState!==null&&ki(et,tt);else if(et.tag===19)ki(et,tt);else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===_e)break e;for(;et.sibling===null;){if(et.return===null||et.return===_e)break e;et=et.return}et.sibling.return=et.return,et=et.sibling}rt&=1}if(I$1(M$1,rt),(_e.mode&2)===0)_e.memoizedState=null;else switch(nt){case"forwards":for(tt=_e.child,nt=null;tt!==null;)et=tt.alternate,et!==null&&hh(et)===null&&(nt=tt),tt=tt.sibling;tt=nt,tt===null?(nt=_e.child,_e.child=null):(nt=tt.sibling,tt.sibling=null),li(_e,!1,nt,tt,st,_e.lastEffect);break;case"backwards":for(tt=null,nt=_e.child,_e.child=null;nt!==null;){if(et=nt.alternate,et!==null&&hh(et)===null){_e.child=nt;break}et=nt.sibling,nt.sibling=tt,tt=nt,nt=et}li(_e,!0,tt,null,st,_e.lastEffect);break;case"together":li(_e,!1,null,null,void 0,_e.lastEffect);break;default:_e.memoizedState=null}return _e.child}function $h(et,_e,tt){et!==null&&(_e.dependencies=et.dependencies);var rt=_e.expirationTime;if(rt!==0&&Bg(rt),_e.childExpirationTime<tt)return null;if(et!==null&&_e.child!==et.child)throw Error(u(153));if(_e.child!==null){for(et=_e.child,tt=Sg(et,et.pendingProps),_e.child=tt,tt.return=_e;et.sibling!==null;)et=et.sibling,tt=tt.sibling=Sg(et,et.pendingProps),tt.return=_e;tt.sibling=null}return _e.child}var ni,oi,pi,qi;ni=function(et,_e){for(var tt=_e.child;tt!==null;){if(tt.tag===5||tt.tag===6)et.appendChild(tt.stateNode);else if(tt.tag!==4&&tt.child!==null){tt.child.return=tt,tt=tt.child;continue}if(tt===_e)break;for(;tt.sibling===null;){if(tt.return===null||tt.return===_e)return;tt=tt.return}tt.sibling.return=tt.return,tt=tt.sibling}};oi=function(){};pi=function(et,_e,tt,rt,nt){var st=et.memoizedProps;if(st!==rt){var dt=_e.stateNode;switch(ch($g.current),et=null,tt){case"input":st=zb(dt,st),rt=zb(dt,rt),et=[];break;case"option":st=Gb(dt,st),rt=Gb(dt,rt),et=[];break;case"select":st=n$1({},st,{value:void 0}),rt=n$1({},rt,{value:void 0}),et=[];break;case"textarea":st=Ib(dt,st),rt=Ib(dt,rt),et=[];break;default:typeof st.onClick!="function"&&typeof rt.onClick=="function"&&(dt.onclick=sd)}od(tt,rt);var ft,ht;tt=null;for(ft in st)if(!rt.hasOwnProperty(ft)&&st.hasOwnProperty(ft)&&st[ft]!=null)if(ft==="style")for(ht in dt=st[ft],dt)dt.hasOwnProperty(ht)&&(tt||(tt={}),tt[ht]="");else ft!=="dangerouslySetInnerHTML"&&ft!=="children"&&ft!=="suppressContentEditableWarning"&&ft!=="suppressHydrationWarning"&&ft!=="autoFocus"&&(va.hasOwnProperty(ft)?et||(et=[]):(et=et||[]).push(ft,null));for(ft in rt){var mt=rt[ft];if(dt=st?.[ft],rt.hasOwnProperty(ft)&&mt!==dt&&(mt!=null||dt!=null))if(ft==="style")if(dt){for(ht in dt)!dt.hasOwnProperty(ht)||mt&&mt.hasOwnProperty(ht)||(tt||(tt={}),tt[ht]="");for(ht in mt)mt.hasOwnProperty(ht)&&dt[ht]!==mt[ht]&&(tt||(tt={}),tt[ht]=mt[ht])}else tt||(et||(et=[]),et.push(ft,tt)),tt=mt;else ft==="dangerouslySetInnerHTML"?(mt=mt?mt.__html:void 0,dt=dt?dt.__html:void 0,mt!=null&&dt!==mt&&(et=et||[]).push(ft,mt)):ft==="children"?dt===mt||typeof mt!="string"&&typeof mt!="number"||(et=et||[]).push(ft,""+mt):ft!=="suppressContentEditableWarning"&&ft!=="suppressHydrationWarning"&&(va.hasOwnProperty(ft)?(mt!=null&&rd(nt,ft),et||dt===mt||(et=[])):(et=et||[]).push(ft,mt))}tt&&(et=et||[]).push("style",tt),nt=et,(_e.updateQueue=nt)&&(_e.effectTag|=4)}};qi=function(et,_e,tt,rt){tt!==rt&&(_e.effectTag|=4)};function ri(et,_e){switch(et.tailMode){case"hidden":_e=et.tail;for(var tt=null;_e!==null;)_e.alternate!==null&&(tt=_e),_e=_e.sibling;tt===null?et.tail=null:tt.sibling=null;break;case"collapsed":tt=et.tail;for(var rt=null;tt!==null;)tt.alternate!==null&&(rt=tt),tt=tt.sibling;rt===null?_e||et.tail===null?et.tail=null:et.tail.sibling=null:rt.sibling=null}}function si(et,_e,tt){var rt=_e.pendingProps;switch(_e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L$1(_e.type)&&Df(),null;case 3:return eh(),H$1(K$1),H$1(J$1),tt=_e.stateNode,tt.pendingContext&&(tt.context=tt.pendingContext,tt.pendingContext=null),et!==null&&et.child!==null||!Wh(_e)||(_e.effectTag|=4),oi(_e),null;case 5:gh(_e),tt=ch(bh.current);var nt=_e.type;if(et!==null&&_e.stateNode!=null)pi(et,_e,nt,rt,tt),et.ref!==_e.ref&&(_e.effectTag|=128);else{if(!rt){if(_e.stateNode===null)throw Error(u(166));return null}if(et=ch($g.current),Wh(_e)){rt=_e.stateNode,nt=_e.type;var st=_e.memoizedProps;switch(rt[Md]=_e,rt[Nd]=st,nt){case"iframe":case"object":case"embed":F$1("load",rt);break;case"video":case"audio":for(et=0;et<ac.length;et++)F$1(ac[et],rt);break;case"source":F$1("error",rt);break;case"img":case"image":case"link":F$1("error",rt),F$1("load",rt);break;case"form":F$1("reset",rt),F$1("submit",rt);break;case"details":F$1("toggle",rt);break;case"input":Ab(rt,st),F$1("invalid",rt),rd(tt,"onChange");break;case"select":rt._wrapperState={wasMultiple:!!st.multiple},F$1("invalid",rt),rd(tt,"onChange");break;case"textarea":Jb(rt,st),F$1("invalid",rt),rd(tt,"onChange")}od(nt,st),et=null;for(var dt in st)if(st.hasOwnProperty(dt)){var ft=st[dt];dt==="children"?typeof ft=="string"?rt.textContent!==ft&&(et=["children",ft]):typeof ft=="number"&&rt.textContent!==""+ft&&(et=["children",""+ft]):va.hasOwnProperty(dt)&&ft!=null&&rd(tt,dt)}switch(nt){case"input":xb(rt),Eb(rt,st,!0);break;case"textarea":xb(rt),Lb(rt);break;case"select":case"option":break;default:typeof st.onClick=="function"&&(rt.onclick=sd)}tt=et,_e.updateQueue=tt,tt!==null&&(_e.effectTag|=4)}else{switch(dt=tt.nodeType===9?tt:tt.ownerDocument,et===qd&&(et=Nb(nt)),et===qd?nt==="script"?(et=dt.createElement("div"),et.innerHTML="<script><\/script>",et=et.removeChild(et.firstChild)):typeof rt.is=="string"?et=dt.createElement(nt,{is:rt.is}):(et=dt.createElement(nt),nt==="select"&&(dt=et,rt.multiple?dt.multiple=!0:rt.size&&(dt.size=rt.size))):et=dt.createElementNS(et,nt),et[Md]=_e,et[Nd]=rt,ni(et,_e,!1,!1),_e.stateNode=et,dt=pd(nt,rt),nt){case"iframe":case"object":case"embed":F$1("load",et),ft=rt;break;case"video":case"audio":for(ft=0;ft<ac.length;ft++)F$1(ac[ft],et);ft=rt;break;case"source":F$1("error",et),ft=rt;break;case"img":case"image":case"link":F$1("error",et),F$1("load",et),ft=rt;break;case"form":F$1("reset",et),F$1("submit",et),ft=rt;break;case"details":F$1("toggle",et),ft=rt;break;case"input":Ab(et,rt),ft=zb(et,rt),F$1("invalid",et),rd(tt,"onChange");break;case"option":ft=Gb(et,rt);break;case"select":et._wrapperState={wasMultiple:!!rt.multiple},ft=n$1({},rt,{value:void 0}),F$1("invalid",et),rd(tt,"onChange");break;case"textarea":Jb(et,rt),ft=Ib(et,rt),F$1("invalid",et),rd(tt,"onChange");break;default:ft=rt}od(nt,ft);var ht=ft;for(st in ht)if(ht.hasOwnProperty(st)){var mt=ht[st];st==="style"?md(et,mt):st==="dangerouslySetInnerHTML"?(mt=mt?mt.__html:void 0,mt!=null&&Qb(et,mt)):st==="children"?typeof mt=="string"?(nt!=="textarea"||mt!=="")&&Rb(et,mt):typeof mt=="number"&&Rb(et,""+mt):st!=="suppressContentEditableWarning"&&st!=="suppressHydrationWarning"&&st!=="autoFocus"&&(va.hasOwnProperty(st)?mt!=null&&rd(tt,st):mt!=null&&Xa(et,st,mt,dt))}switch(nt){case"input":xb(et),Eb(et,rt,!1);break;case"textarea":xb(et),Lb(et);break;case"option":rt.value!=null&&et.setAttribute("value",""+rb(rt.value));break;case"select":et.multiple=!!rt.multiple,tt=rt.value,tt!=null?Hb(et,!!rt.multiple,tt,!1):rt.defaultValue!=null&&Hb(et,!!rt.multiple,rt.defaultValue,!0);break;default:typeof ft.onClick=="function"&&(et.onclick=sd)}Fd(nt,rt)&&(_e.effectTag|=4)}_e.ref!==null&&(_e.effectTag|=128)}return null;case 6:if(et&&_e.stateNode!=null)qi(et,_e,et.memoizedProps,rt);else{if(typeof rt!="string"&&_e.stateNode===null)throw Error(u(166));tt=ch(bh.current),ch($g.current),Wh(_e)?(tt=_e.stateNode,rt=_e.memoizedProps,tt[Md]=_e,tt.nodeValue!==rt&&(_e.effectTag|=4)):(tt=(tt.nodeType===9?tt:tt.ownerDocument).createTextNode(rt),tt[Md]=_e,_e.stateNode=tt)}return null;case 13:return H$1(M$1),rt=_e.memoizedState,(_e.effectTag&64)!==0?(_e.expirationTime=tt,_e):(tt=rt!==null,rt=!1,et===null?_e.memoizedProps.fallback!==void 0&&Wh(_e):(nt=et.memoizedState,rt=nt!==null,tt||nt===null||(nt=et.child.sibling,nt!==null&&(st=_e.firstEffect,st!==null?(_e.firstEffect=nt,nt.nextEffect=st):(_e.firstEffect=_e.lastEffect=nt,nt.nextEffect=null),nt.effectTag=8))),tt&&!rt&&(_e.mode&2)!==0&&(et===null&&_e.memoizedProps.unstable_avoidThisFallback!==!0||(M$1.current&1)!==0?S$1===ti&&(S$1=ui):((S$1===ti||S$1===ui)&&(S$1=vi),wi!==0&&T$1!==null&&(xi(T$1,U$1),yi(T$1,wi)))),(tt||rt)&&(_e.effectTag|=4),null);case 4:return eh(),oi(_e),null;case 10:return og(_e),null;case 17:return L$1(_e.type)&&Df(),null;case 19:if(H$1(M$1),rt=_e.memoizedState,rt===null)return null;if(nt=(_e.effectTag&64)!==0,st=rt.rendering,st===null){if(nt)ri(rt,!1);else if(S$1!==ti||et!==null&&(et.effectTag&64)!==0)for(st=_e.child;st!==null;){if(et=hh(st),et!==null){for(_e.effectTag|=64,ri(rt,!1),nt=et.updateQueue,nt!==null&&(_e.updateQueue=nt,_e.effectTag|=4),rt.lastEffect===null&&(_e.firstEffect=null),_e.lastEffect=rt.lastEffect,rt=_e.child;rt!==null;)nt=rt,st=tt,nt.effectTag&=2,nt.nextEffect=null,nt.firstEffect=null,nt.lastEffect=null,et=nt.alternate,et===null?(nt.childExpirationTime=0,nt.expirationTime=st,nt.child=null,nt.memoizedProps=null,nt.memoizedState=null,nt.updateQueue=null,nt.dependencies=null):(nt.childExpirationTime=et.childExpirationTime,nt.expirationTime=et.expirationTime,nt.child=et.child,nt.memoizedProps=et.memoizedProps,nt.memoizedState=et.memoizedState,nt.updateQueue=et.updateQueue,st=et.dependencies,nt.dependencies=st===null?null:{expirationTime:st.expirationTime,firstContext:st.firstContext,responders:st.responders}),rt=rt.sibling;return I$1(M$1,M$1.current&1|2),_e.child}st=st.sibling}}else{if(!nt)if(et=hh(st),et!==null){if(_e.effectTag|=64,nt=!0,tt=et.updateQueue,tt!==null&&(_e.updateQueue=tt,_e.effectTag|=4),ri(rt,!0),rt.tail===null&&rt.tailMode==="hidden"&&!st.alternate)return _e=_e.lastEffect=rt.lastEffect,_e!==null&&(_e.nextEffect=null),null}else 2*$f()-rt.renderingStartTime>rt.tailExpiration&&1<tt&&(_e.effectTag|=64,nt=!0,ri(rt,!1),_e.expirationTime=_e.childExpirationTime=tt-1);rt.isBackwards?(st.sibling=_e.child,_e.child=st):(tt=rt.last,tt!==null?tt.sibling=st:_e.child=st,rt.last=st)}return rt.tail!==null?(rt.tailExpiration===0&&(rt.tailExpiration=$f()+500),tt=rt.tail,rt.rendering=tt,rt.tail=tt.sibling,rt.lastEffect=_e.lastEffect,rt.renderingStartTime=$f(),tt.sibling=null,_e=M$1.current,I$1(M$1,nt?_e&1|2:_e&1),tt):null}throw Error(u(156,_e.tag))}function zi(et){switch(et.tag){case 1:L$1(et.type)&&Df();var _e=et.effectTag;return _e&4096?(et.effectTag=_e&-4097|64,et):null;case 3:if(eh(),H$1(K$1),H$1(J$1),_e=et.effectTag,(_e&64)!==0)throw Error(u(285));return et.effectTag=_e&-4097|64,et;case 5:return gh(et),null;case 13:return H$1(M$1),_e=et.effectTag,_e&4096?(et.effectTag=_e&-4097|64,et):null;case 19:return H$1(M$1),null;case 4:return eh(),null;case 10:return og(et),null;default:return null}}function Ai(et,_e){return{value:et,source:_e,stack:qb(_e)}}var Bi=typeof WeakSet=="function"?WeakSet:Set;function Ci(et,_e){var tt=_e.source,rt=_e.stack;rt===null&&tt!==null&&(rt=qb(tt)),tt!==null&&pb(tt.type),_e=_e.value,et!==null&&et.tag===1&&pb(et.type);try{console.error(_e)}catch(nt){setTimeout(function(){throw nt})}}function Di(et,_e){try{_e.props=et.memoizedProps,_e.state=et.memoizedState,_e.componentWillUnmount()}catch(tt){Ei(et,tt)}}function Fi(et){var _e=et.ref;if(_e!==null)if(typeof _e=="function")try{_e(null)}catch(tt){Ei(et,tt)}else _e.current=null}function Gi(et,_e){switch(_e.tag){case 0:case 11:case 15:case 22:return;case 1:if(_e.effectTag&256&&et!==null){var tt=et.memoizedProps,rt=et.memoizedState;et=_e.stateNode,_e=et.getSnapshotBeforeUpdate(_e.elementType===_e.type?tt:ig(_e.type,tt),rt),et.__reactInternalSnapshotBeforeUpdate=_e}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163))}function Hi(et,_e){if(_e=_e.updateQueue,_e=_e!==null?_e.lastEffect:null,_e!==null){var tt=_e=_e.next;do{if((tt.tag&et)===et){var rt=tt.destroy;tt.destroy=void 0,rt!==void 0&&rt()}tt=tt.next}while(tt!==_e)}}function Ii(et,_e){if(_e=_e.updateQueue,_e=_e!==null?_e.lastEffect:null,_e!==null){var tt=_e=_e.next;do{if((tt.tag&et)===et){var rt=tt.create;tt.destroy=rt()}tt=tt.next}while(tt!==_e)}}function Ji(et,_e,tt){switch(tt.tag){case 0:case 11:case 15:case 22:Ii(3,tt);return;case 1:if(et=tt.stateNode,tt.effectTag&4)if(_e===null)et.componentDidMount();else{var rt=tt.elementType===tt.type?_e.memoizedProps:ig(tt.type,_e.memoizedProps);et.componentDidUpdate(rt,_e.memoizedState,et.__reactInternalSnapshotBeforeUpdate)}_e=tt.updateQueue,_e!==null&&Cg(tt,_e,et);return;case 3:if(_e=tt.updateQueue,_e!==null){if(et=null,tt.child!==null)switch(tt.child.tag){case 5:et=tt.child.stateNode;break;case 1:et=tt.child.stateNode}Cg(tt,_e,et)}return;case 5:et=tt.stateNode,_e===null&&tt.effectTag&4&&Fd(tt.type,tt.memoizedProps)&&et.focus();return;case 6:return;case 4:return;case 12:return;case 13:tt.memoizedState===null&&(tt=tt.alternate,tt!==null&&(tt=tt.memoizedState,tt!==null&&(tt=tt.dehydrated,tt!==null&&Vc(tt))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163))}function Ki(et,_e,tt){switch(typeof Li=="function"&&Li(_e),_e.tag){case 0:case 11:case 14:case 15:case 22:if(et=_e.updateQueue,et!==null&&(et=et.lastEffect,et!==null)){var rt=et.next;cg(97<tt?97:tt,function(){var nt=rt;do{var st=nt.destroy;if(st!==void 0){var dt=_e;try{st()}catch(ft){Ei(dt,ft)}}nt=nt.next}while(nt!==rt)})}break;case 1:Fi(_e),tt=_e.stateNode,typeof tt.componentWillUnmount=="function"&&Di(_e,tt);break;case 5:Fi(_e);break;case 4:Mi(et,_e,tt)}}function Ni(et){var _e=et.alternate;et.return=null,et.child=null,et.memoizedState=null,et.updateQueue=null,et.dependencies=null,et.alternate=null,et.firstEffect=null,et.lastEffect=null,et.pendingProps=null,et.memoizedProps=null,et.stateNode=null,_e!==null&&Ni(_e)}function Oi(et){return et.tag===5||et.tag===3||et.tag===4}function Pi(et){e:{for(var _e=et.return;_e!==null;){if(Oi(_e)){var tt=_e;break e}_e=_e.return}throw Error(u(160))}switch(_e=tt.stateNode,tt.tag){case 5:var rt=!1;break;case 3:_e=_e.containerInfo,rt=!0;break;case 4:_e=_e.containerInfo,rt=!0;break;default:throw Error(u(161))}tt.effectTag&16&&(Rb(_e,""),tt.effectTag&=-17);e:t:for(tt=et;;){for(;tt.sibling===null;){if(tt.return===null||Oi(tt.return)){tt=null;break e}tt=tt.return}for(tt.sibling.return=tt.return,tt=tt.sibling;tt.tag!==5&&tt.tag!==6&&tt.tag!==18;){if(tt.effectTag&2||tt.child===null||tt.tag===4)continue t;tt.child.return=tt,tt=tt.child}if(!(tt.effectTag&2)){tt=tt.stateNode;break e}}rt?Qi(et,tt,_e):Ri(et,tt,_e)}function Qi(et,_e,tt){var rt=et.tag,nt=rt===5||rt===6;if(nt)et=nt?et.stateNode:et.stateNode.instance,_e?tt.nodeType===8?tt.parentNode.insertBefore(et,_e):tt.insertBefore(et,_e):(tt.nodeType===8?(_e=tt.parentNode,_e.insertBefore(et,tt)):(_e=tt,_e.appendChild(et)),tt=tt._reactRootContainer,tt!=null||_e.onclick!==null||(_e.onclick=sd));else if(rt!==4&&(et=et.child,et!==null))for(Qi(et,_e,tt),et=et.sibling;et!==null;)Qi(et,_e,tt),et=et.sibling}function Ri(et,_e,tt){var rt=et.tag,nt=rt===5||rt===6;if(nt)et=nt?et.stateNode:et.stateNode.instance,_e?tt.insertBefore(et,_e):tt.appendChild(et);else if(rt!==4&&(et=et.child,et!==null))for(Ri(et,_e,tt),et=et.sibling;et!==null;)Ri(et,_e,tt),et=et.sibling}function Mi(et,_e,tt){for(var rt=_e,nt=!1,st,dt;;){if(!nt){nt=rt.return;e:for(;;){if(nt===null)throw Error(u(160));switch(st=nt.stateNode,nt.tag){case 5:dt=!1;break e;case 3:st=st.containerInfo,dt=!0;break e;case 4:st=st.containerInfo,dt=!0;break e}nt=nt.return}nt=!0}if(rt.tag===5||rt.tag===6){e:for(var ft=et,ht=rt,mt=tt,bt=ht;;)if(Ki(ft,bt,mt),bt.child!==null&&bt.tag!==4)bt.child.return=bt,bt=bt.child;else{if(bt===ht)break e;for(;bt.sibling===null;){if(bt.return===null||bt.return===ht)break e;bt=bt.return}bt.sibling.return=bt.return,bt=bt.sibling}dt?(ft=st,ht=rt.stateNode,ft.nodeType===8?ft.parentNode.removeChild(ht):ft.removeChild(ht)):st.removeChild(rt.stateNode)}else if(rt.tag===4){if(rt.child!==null){st=rt.stateNode.containerInfo,dt=!0,rt.child.return=rt,rt=rt.child;continue}}else if(Ki(et,rt,tt),rt.child!==null){rt.child.return=rt,rt=rt.child;continue}if(rt===_e)break;for(;rt.sibling===null;){if(rt.return===null||rt.return===_e)return;rt=rt.return,rt.tag===4&&(nt=!1)}rt.sibling.return=rt.return,rt=rt.sibling}}function Si(et,_e){switch(_e.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,_e);return;case 1:return;case 5:var tt=_e.stateNode;if(tt!=null){var rt=_e.memoizedProps,nt=et!==null?et.memoizedProps:rt;et=_e.type;var st=_e.updateQueue;if(_e.updateQueue=null,st!==null){for(tt[Nd]=rt,et==="input"&&rt.type==="radio"&&rt.name!=null&&Bb(tt,rt),pd(et,nt),_e=pd(et,rt),nt=0;nt<st.length;nt+=2){var dt=st[nt],ft=st[nt+1];dt==="style"?md(tt,ft):dt==="dangerouslySetInnerHTML"?Qb(tt,ft):dt==="children"?Rb(tt,ft):Xa(tt,dt,ft,_e)}switch(et){case"input":Cb(tt,rt);break;case"textarea":Kb(tt,rt);break;case"select":_e=tt._wrapperState.wasMultiple,tt._wrapperState.wasMultiple=!!rt.multiple,et=rt.value,et!=null?Hb(tt,!!rt.multiple,et,!1):_e!==!!rt.multiple&&(rt.defaultValue!=null?Hb(tt,!!rt.multiple,rt.defaultValue,!0):Hb(tt,!!rt.multiple,rt.multiple?[]:"",!1))}}}return;case 6:if(_e.stateNode===null)throw Error(u(162));_e.stateNode.nodeValue=_e.memoizedProps;return;case 3:_e=_e.stateNode,_e.hydrate&&(_e.hydrate=!1,Vc(_e.containerInfo));return;case 12:return;case 13:if(tt=_e,_e.memoizedState===null?rt=!1:(rt=!0,tt=_e.child,Ti=$f()),tt!==null)e:for(et=tt;;){if(et.tag===5)st=et.stateNode,rt?(st=st.style,typeof st.setProperty=="function"?st.setProperty("display","none","important"):st.display="none"):(st=et.stateNode,nt=et.memoizedProps.style,nt=nt!=null&&nt.hasOwnProperty("display")?nt.display:null,st.style.display=ld("display",nt));else if(et.tag===6)et.stateNode.nodeValue=rt?"":et.memoizedProps;else if(et.tag===13&&et.memoizedState!==null&&et.memoizedState.dehydrated===null){st=et.child.sibling,st.return=et,et=st;continue}else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===tt)break;for(;et.sibling===null;){if(et.return===null||et.return===tt)break e;et=et.return}et.sibling.return=et.return,et=et.sibling}Ui(_e);return;case 19:Ui(_e);return;case 17:return}throw Error(u(163))}function Ui(et){var _e=et.updateQueue;if(_e!==null){et.updateQueue=null;var tt=et.stateNode;tt===null&&(tt=et.stateNode=new Bi),_e.forEach(function(rt){var nt=Vi.bind(null,et,rt);tt.has(rt)||(tt.add(rt),rt.then(nt,nt))})}}var Wi=typeof WeakMap=="function"?WeakMap:Map;function Xi(et,_e,tt){tt=wg(tt,null),tt.tag=3,tt.payload={element:null};var rt=_e.value;return tt.callback=function(){Yi||(Yi=!0,Zi=rt),Ci(et,_e)},tt}function $i(et,_e,tt){tt=wg(tt,null),tt.tag=3;var rt=et.type.getDerivedStateFromError;if(typeof rt=="function"){var nt=_e.value;tt.payload=function(){return Ci(et,_e),rt(nt)}}var st=et.stateNode;return st!==null&&typeof st.componentDidCatch=="function"&&(tt.callback=function(){typeof rt!="function"&&(aj===null?aj=new Set([this]):aj.add(this),Ci(et,_e));var dt=_e.stack;this.componentDidCatch(_e.value,{componentStack:dt!==null?dt:""})}),tt}var bj=Math.ceil,cj=Wa.ReactCurrentDispatcher,dj=Wa.ReactCurrentOwner,V$1=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W$1=V$1,T$1=null,X$1=null,U$1=0,S$1=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y$1=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W$1&(fj|gj))!==V$1?1073741821-($f()/10|0):wj!==0?wj:wj=1073741821-($f()/10|0)}function Hg(et,_e,tt){if(_e=_e.mode,(_e&2)===0)return 1073741823;var rt=ag();if((_e&4)===0)return rt===99?1073741823:1073741822;if((W$1&fj)!==V$1)return U$1;if(tt!==null)et=hg(et,tt.timeoutMs|0||5e3,250);else switch(rt){case 99:et=1073741823;break;case 98:et=hg(et,150,100);break;case 97:case 96:et=hg(et,5e3,250);break;case 95:et=2;break;default:throw Error(u(326))}return T$1!==null&&et===U$1&&--et,et}function Ig(et,_e){if(50<uj)throw uj=0,vj=null,Error(u(185));if(et=xj(et,_e),et!==null){var tt=ag();_e===1073741823?(W$1&ej)!==V$1&&(W$1&(fj|gj))===V$1?yj(et):(Z$1(et),W$1===V$1&&gg()):Z$1(et),(W$1&4)===V$1||tt!==98&&tt!==99||(tj===null?tj=new Map([[et,_e]]):(tt=tj.get(et),(tt===void 0||tt>_e)&&tj.set(et,_e)))}}function xj(et,_e){et.expirationTime<_e&&(et.expirationTime=_e);var tt=et.alternate;tt!==null&&tt.expirationTime<_e&&(tt.expirationTime=_e);var rt=et.return,nt=null;if(rt===null&&et.tag===3)nt=et.stateNode;else for(;rt!==null;){if(tt=rt.alternate,rt.childExpirationTime<_e&&(rt.childExpirationTime=_e),tt!==null&&tt.childExpirationTime<_e&&(tt.childExpirationTime=_e),rt.return===null&&rt.tag===3){nt=rt.stateNode;break}rt=rt.return}return nt!==null&&(T$1===nt&&(Bg(_e),S$1===vi&&xi(nt,U$1)),yi(nt,_e)),nt}function zj(et){var _e=et.lastExpiredTime;if(_e!==0||(_e=et.firstPendingTime,!Aj(et,_e)))return _e;var tt=et.lastPingedTime;return et=et.nextKnownPendingLevel,et=tt>et?tt:et,2>=et&&_e!==et?0:et}function Z$1(et){if(et.lastExpiredTime!==0)et.callbackExpirationTime=1073741823,et.callbackPriority=99,et.callbackNode=eg(yj.bind(null,et));else{var _e=zj(et),tt=et.callbackNode;if(_e===0)tt!==null&&(et.callbackNode=null,et.callbackExpirationTime=0,et.callbackPriority=90);else{var rt=Gg();if(_e===1073741823?rt=99:_e===1||_e===2?rt=95:(rt=10*(1073741821-_e)-10*(1073741821-rt),rt=0>=rt?99:250>=rt?98:5250>=rt?97:95),tt!==null){var nt=et.callbackPriority;if(et.callbackExpirationTime===_e&&nt>=rt)return;tt!==Tf&&Kf(tt)}et.callbackExpirationTime=_e,et.callbackPriority=rt,_e=_e===1073741823?eg(yj.bind(null,et)):dg(rt,Bj.bind(null,et),{timeout:10*(1073741821-_e)-$f()}),et.callbackNode=_e}}}function Bj(et,_e){if(wj=0,_e)return _e=Gg(),Cj(et,_e),Z$1(et),null;var tt=zj(et);if(tt!==0){if(_e=et.callbackNode,(W$1&(fj|gj))!==V$1)throw Error(u(327));if(Dj(),et===T$1&&tt===U$1||Ej(et,tt),X$1!==null){var rt=W$1;W$1|=fj;var nt=Fj();do try{Gj();break}catch(ft){Hj(et,ft)}while(!0);if(ng(),W$1=rt,cj.current=nt,S$1===hj)throw _e=kj,Ej(et,tt),xi(et,tt),Z$1(et),_e;if(X$1===null)switch(nt=et.finishedWork=et.current.alternate,et.finishedExpirationTime=tt,rt=S$1,T$1=null,rt){case ti:case hj:throw Error(u(345));case ij:Cj(et,2<tt?2:tt);break;case ui:if(xi(et,tt),rt=et.lastSuspendedTime,tt===rt&&(et.nextKnownPendingLevel=Ij(nt)),lj===1073741823&&(nt=Ti+pj-$f(),10<nt)){if(oj){var st=et.lastPingedTime;if(st===0||st>=tt){et.lastPingedTime=tt,Ej(et,tt);break}}if(st=zj(et),st!==0&&st!==tt)break;if(rt!==0&&rt!==tt){et.lastPingedTime=rt;break}et.timeoutHandle=Hd(Jj.bind(null,et),nt);break}Jj(et);break;case vi:if(xi(et,tt),rt=et.lastSuspendedTime,tt===rt&&(et.nextKnownPendingLevel=Ij(nt)),oj&&(nt=et.lastPingedTime,nt===0||nt>=tt)){et.lastPingedTime=tt,Ej(et,tt);break}if(nt=zj(et),nt!==0&&nt!==tt)break;if(rt!==0&&rt!==tt){et.lastPingedTime=rt;break}if(mj!==1073741823?rt=10*(1073741821-mj)-$f():lj===1073741823?rt=0:(rt=10*(1073741821-lj)-5e3,nt=$f(),tt=10*(1073741821-tt)-nt,rt=nt-rt,0>rt&&(rt=0),rt=(120>rt?120:480>rt?480:1080>rt?1080:1920>rt?1920:3e3>rt?3e3:4320>rt?4320:1960*bj(rt/1960))-rt,tt<rt&&(rt=tt)),10<rt){et.timeoutHandle=Hd(Jj.bind(null,et),rt);break}Jj(et);break;case jj:if(lj!==1073741823&&nj!==null){st=lj;var dt=nj;if(rt=dt.busyMinDurationMs|0,0>=rt?rt=0:(nt=dt.busyDelayMs|0,st=$f()-(10*(1073741821-st)-(dt.timeoutMs|0||5e3)),rt=st<=nt?0:nt+rt-st),10<rt){xi(et,tt),et.timeoutHandle=Hd(Jj.bind(null,et),rt);break}}Jj(et);break;default:throw Error(u(329))}if(Z$1(et),et.callbackNode===_e)return Bj.bind(null,et)}}return null}function yj(et){var _e=et.lastExpiredTime;if(_e=_e!==0?_e:1073741823,(W$1&(fj|gj))!==V$1)throw Error(u(327));if(Dj(),et===T$1&&_e===U$1||Ej(et,_e),X$1!==null){var tt=W$1;W$1|=fj;var rt=Fj();do try{Kj();break}catch(nt){Hj(et,nt)}while(!0);if(ng(),W$1=tt,cj.current=rt,S$1===hj)throw tt=kj,Ej(et,_e),xi(et,_e),Z$1(et),tt;if(X$1!==null)throw Error(u(261));et.finishedWork=et.current.alternate,et.finishedExpirationTime=_e,T$1=null,Jj(et),Z$1(et)}return null}function Lj(){if(tj!==null){var et=tj;tj=null,et.forEach(function(_e,tt){Cj(tt,_e),Z$1(tt)}),gg()}}function Mj(et,_e){var tt=W$1;W$1|=1;try{return et(_e)}finally{W$1=tt,W$1===V$1&&gg()}}function Nj(et,_e){var tt=W$1;W$1&=-2,W$1|=ej;try{return et(_e)}finally{W$1=tt,W$1===V$1&&gg()}}function Ej(et,_e){et.finishedWork=null,et.finishedExpirationTime=0;var tt=et.timeoutHandle;if(tt!==-1&&(et.timeoutHandle=-1,Id(tt)),X$1!==null)for(tt=X$1.return;tt!==null;){var rt=tt;switch(rt.tag){case 1:rt=rt.type.childContextTypes,rt!=null&&Df();break;case 3:eh(),H$1(K$1),H$1(J$1);break;case 5:gh(rt);break;case 4:eh();break;case 13:H$1(M$1);break;case 19:H$1(M$1);break;case 10:og(rt)}tt=tt.return}T$1=et,X$1=Sg(et.current,null),U$1=_e,S$1=ti,kj=null,mj=lj=1073741823,nj=null,wi=0,oj=!1}function Hj(et,_e){do{try{if(ng(),jh.current=sh,mh)for(var tt=N$1.memoizedState;tt!==null;){var rt=tt.queue;rt!==null&&(rt.pending=null),tt=tt.next}if(lh=0,P$1=O$1=N$1=null,mh=!1,X$1===null||X$1.return===null)return S$1=hj,kj=_e,X$1=null;e:{var nt=et,st=X$1.return,dt=X$1,ft=_e;if(_e=U$1,dt.effectTag|=2048,dt.firstEffect=dt.lastEffect=null,ft!==null&&typeof ft=="object"&&typeof ft.then=="function"){var ht=ft;if((dt.mode&2)===0){var mt=dt.alternate;mt?(dt.updateQueue=mt.updateQueue,dt.memoizedState=mt.memoizedState,dt.expirationTime=mt.expirationTime):(dt.updateQueue=null,dt.memoizedState=null)}var bt=(M$1.current&1)!==0,St=st;do{var Et;if(Et=St.tag===13){var Ct=St.memoizedState;if(Ct!==null)Et=Ct.dehydrated!==null;else{var Rt=St.memoizedProps;Et=Rt.fallback===void 0?!1:Rt.unstable_avoidThisFallback!==!0?!0:!bt}}if(Et){var Tt=St.updateQueue;if(Tt===null){var wt=new Set;wt.add(ht),St.updateQueue=wt}else Tt.add(ht);if((St.mode&2)===0){if(St.effectTag|=64,dt.effectTag&=-2981,dt.tag===1)if(dt.alternate===null)dt.tag=17;else{var At=wg(1073741823,null);At.tag=2,xg(dt,At)}dt.expirationTime=1073741823;break e}ft=void 0,dt=_e;var Nt=nt.pingCache;if(Nt===null?(Nt=nt.pingCache=new Wi,ft=new Set,Nt.set(ht,ft)):(ft=Nt.get(ht),ft===void 0&&(ft=new Set,Nt.set(ht,ft))),!ft.has(dt)){ft.add(dt);var Pt=Oj.bind(null,nt,ht,dt);ht.then(Pt,Pt)}St.effectTag|=4096,St.expirationTime=_e;break e}St=St.return}while(St!==null);ft=Error((pb(dt.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+qb(dt))}S$1!==jj&&(S$1=ij),ft=Ai(ft,dt),St=st;do{switch(St.tag){case 3:ht=ft,St.effectTag|=4096,St.expirationTime=_e;var It=Xi(St,ht,_e);yg(St,It);break e;case 1:ht=ft;var Ft=St.type,qt=St.stateNode;if((St.effectTag&64)===0&&(typeof Ft.getDerivedStateFromError=="function"||qt!==null&&typeof qt.componentDidCatch=="function"&&(aj===null||!aj.has(qt)))){St.effectTag|=4096,St.expirationTime=_e;var Vt=$i(St,ht,_e);yg(St,Vt);break e}}St=St.return}while(St!==null)}X$1=Pj(X$1)}catch(Kt){_e=Kt;continue}break}while(!0)}function Fj(){var et=cj.current;return cj.current=sh,et===null?sh:et}function Ag(et,_e){et<lj&&2<et&&(lj=et),_e!==null&&et<mj&&2<et&&(mj=et,nj=_e)}function Bg(et){et>wi&&(wi=et)}function Kj(){for(;X$1!==null;)X$1=Qj(X$1)}function Gj(){for(;X$1!==null&&!Uf();)X$1=Qj(X$1)}function Qj(et){var _e=Rj(et.alternate,et,U$1);return et.memoizedProps=et.pendingProps,_e===null&&(_e=Pj(et)),dj.current=null,_e}function Pj(et){X$1=et;do{var _e=X$1.alternate;if(et=X$1.return,(X$1.effectTag&2048)===0){if(_e=si(_e,X$1,U$1),U$1===1||X$1.childExpirationTime!==1){for(var tt=0,rt=X$1.child;rt!==null;){var nt=rt.expirationTime,st=rt.childExpirationTime;nt>tt&&(tt=nt),st>tt&&(tt=st),rt=rt.sibling}X$1.childExpirationTime=tt}if(_e!==null)return _e;et!==null&&(et.effectTag&2048)===0&&(et.firstEffect===null&&(et.firstEffect=X$1.firstEffect),X$1.lastEffect!==null&&(et.lastEffect!==null&&(et.lastEffect.nextEffect=X$1.firstEffect),et.lastEffect=X$1.lastEffect),1<X$1.effectTag&&(et.lastEffect!==null?et.lastEffect.nextEffect=X$1:et.firstEffect=X$1,et.lastEffect=X$1))}else{if(_e=zi(X$1),_e!==null)return _e.effectTag&=2047,_e;et!==null&&(et.firstEffect=et.lastEffect=null,et.effectTag|=2048)}if(_e=X$1.sibling,_e!==null)return _e;X$1=et}while(X$1!==null);return S$1===ti&&(S$1=jj),null}function Ij(et){var _e=et.expirationTime;return et=et.childExpirationTime,_e>et?_e:et}function Jj(et){var _e=ag();return cg(99,Sj.bind(null,et,_e)),null}function Sj(et,_e){do Dj();while(rj!==null);if((W$1&(fj|gj))!==V$1)throw Error(u(327));var tt=et.finishedWork,rt=et.finishedExpirationTime;if(tt===null)return null;if(et.finishedWork=null,et.finishedExpirationTime=0,tt===et.current)throw Error(u(177));et.callbackNode=null,et.callbackExpirationTime=0,et.callbackPriority=90,et.nextKnownPendingLevel=0;var nt=Ij(tt);if(et.firstPendingTime=nt,rt<=et.lastSuspendedTime?et.firstSuspendedTime=et.lastSuspendedTime=et.nextKnownPendingLevel=0:rt<=et.firstSuspendedTime&&(et.firstSuspendedTime=rt-1),rt<=et.lastPingedTime&&(et.lastPingedTime=0),rt<=et.lastExpiredTime&&(et.lastExpiredTime=0),et===T$1&&(X$1=T$1=null,U$1=0),1<tt.effectTag?tt.lastEffect!==null?(tt.lastEffect.nextEffect=tt,nt=tt.firstEffect):nt=tt:nt=tt.firstEffect,nt!==null){var st=W$1;W$1|=gj,dj.current=null,Dd=fd;var dt=xd();if(yd(dt)){if("selectionStart"in dt)var ft={start:dt.selectionStart,end:dt.selectionEnd};else e:{ft=(ft=dt.ownerDocument)&&ft.defaultView||window;var ht=ft.getSelection&&ft.getSelection();if(ht&&ht.rangeCount!==0){ft=ht.anchorNode;var mt=ht.anchorOffset,bt=ht.focusNode;ht=ht.focusOffset;try{ft.nodeType,bt.nodeType}catch{ft=null;break e}var St=0,Et=-1,Ct=-1,Rt=0,Tt=0,wt=dt,At=null;t:for(;;){for(var Nt;wt!==ft||mt!==0&&wt.nodeType!==3||(Et=St+mt),wt!==bt||ht!==0&&wt.nodeType!==3||(Ct=St+ht),wt.nodeType===3&&(St+=wt.nodeValue.length),(Nt=wt.firstChild)!==null;)At=wt,wt=Nt;for(;;){if(wt===dt)break t;if(At===ft&&++Rt===mt&&(Et=St),At===bt&&++Tt===ht&&(Ct=St),(Nt=wt.nextSibling)!==null)break;wt=At,At=wt.parentNode}wt=Nt}ft=Et===-1||Ct===-1?null:{start:Et,end:Ct}}else ft=null}ft=ft||{start:0,end:0}}else ft=null;Ed={activeElementDetached:null,focusedElem:dt,selectionRange:ft},fd=!1,Y$1=nt;do try{Tj()}catch(jt){if(Y$1===null)throw Error(u(330));Ei(Y$1,jt),Y$1=Y$1.nextEffect}while(Y$1!==null);Y$1=nt;do try{for(dt=et,ft=_e;Y$1!==null;){var Pt=Y$1.effectTag;if(Pt&16&&Rb(Y$1.stateNode,""),Pt&128){var It=Y$1.alternate;if(It!==null){var Ft=It.ref;Ft!==null&&(typeof Ft=="function"?Ft(null):Ft.current=null)}}switch(Pt&1038){case 2:Pi(Y$1),Y$1.effectTag&=-3;break;case 6:Pi(Y$1),Y$1.effectTag&=-3,Si(Y$1.alternate,Y$1);break;case 1024:Y$1.effectTag&=-1025;break;case 1028:Y$1.effectTag&=-1025,Si(Y$1.alternate,Y$1);break;case 4:Si(Y$1.alternate,Y$1);break;case 8:mt=Y$1,Mi(dt,mt,ft),Ni(mt)}Y$1=Y$1.nextEffect}}catch(jt){if(Y$1===null)throw Error(u(330));Ei(Y$1,jt),Y$1=Y$1.nextEffect}while(Y$1!==null);if(Ft=Ed,It=xd(),Pt=Ft.focusedElem,ft=Ft.selectionRange,It!==Pt&&Pt&&Pt.ownerDocument&&wd(Pt.ownerDocument.documentElement,Pt)){for(ft!==null&&yd(Pt)&&(It=ft.start,Ft=ft.end,Ft===void 0&&(Ft=It),"selectionStart"in Pt?(Pt.selectionStart=It,Pt.selectionEnd=Math.min(Ft,Pt.value.length)):(Ft=(It=Pt.ownerDocument||document)&&It.defaultView||window,Ft.getSelection&&(Ft=Ft.getSelection(),mt=Pt.textContent.length,dt=Math.min(ft.start,mt),ft=ft.end===void 0?dt:Math.min(ft.end,mt),!Ft.extend&&dt>ft&&(mt=ft,ft=dt,dt=mt),mt=vd(Pt,dt),bt=vd(Pt,ft),mt&&bt&&(Ft.rangeCount!==1||Ft.anchorNode!==mt.node||Ft.anchorOffset!==mt.offset||Ft.focusNode!==bt.node||Ft.focusOffset!==bt.offset)&&(It=It.createRange(),It.setStart(mt.node,mt.offset),Ft.removeAllRanges(),dt>ft?(Ft.addRange(It),Ft.extend(bt.node,bt.offset)):(It.setEnd(bt.node,bt.offset),Ft.addRange(It)))))),It=[],Ft=Pt;Ft=Ft.parentNode;)Ft.nodeType===1&&It.push({element:Ft,left:Ft.scrollLeft,top:Ft.scrollTop});for(typeof Pt.focus=="function"&&Pt.focus(),Pt=0;Pt<It.length;Pt++)Ft=It[Pt],Ft.element.scrollLeft=Ft.left,Ft.element.scrollTop=Ft.top}fd=!!Dd,Ed=Dd=null,et.current=tt,Y$1=nt;do try{for(Pt=et;Y$1!==null;){var qt=Y$1.effectTag;if(qt&36&&Ji(Pt,Y$1.alternate,Y$1),qt&128){It=void 0;var Vt=Y$1.ref;if(Vt!==null){var Kt=Y$1.stateNode;switch(Y$1.tag){case 5:It=Kt;break;default:It=Kt}typeof Vt=="function"?Vt(It):Vt.current=It}}Y$1=Y$1.nextEffect}}catch(jt){if(Y$1===null)throw Error(u(330));Ei(Y$1,jt),Y$1=Y$1.nextEffect}while(Y$1!==null);Y$1=null,Vf(),W$1=st}else et.current=tt;if(qj)qj=!1,rj=et,sj=_e;else for(Y$1=nt;Y$1!==null;)_e=Y$1.nextEffect,Y$1.nextEffect=null,Y$1=_e;if(_e=et.firstPendingTime,_e===0&&(aj=null),_e===1073741823?et===vj?uj++:(uj=0,vj=et):uj=0,typeof Uj=="function"&&Uj(tt.stateNode,rt),Z$1(et),Yi)throw Yi=!1,et=Zi,Zi=null,et;return(W$1&ej)!==V$1||gg(),null}function Tj(){for(;Y$1!==null;){var et=Y$1.effectTag;(et&256)!==0&&Gi(Y$1.alternate,Y$1),(et&512)===0||qj||(qj=!0,dg(97,function(){return Dj(),null})),Y$1=Y$1.nextEffect}}function Dj(){if(sj!==90){var et=97<sj?97:sj;return sj=90,cg(et,Vj)}}function Vj(){if(rj===null)return!1;var et=rj;if(rj=null,(W$1&(fj|gj))!==V$1)throw Error(u(331));var _e=W$1;for(W$1|=gj,et=et.current.firstEffect;et!==null;){try{var tt=et;if((tt.effectTag&512)!==0)switch(tt.tag){case 0:case 11:case 15:case 22:Hi(5,tt),Ii(5,tt)}}catch(rt){if(et===null)throw Error(u(330));Ei(et,rt)}tt=et.nextEffect,et.nextEffect=null,et=tt}return W$1=_e,gg(),!0}function Wj(et,_e,tt){_e=Ai(tt,_e),_e=Xi(et,_e,1073741823),xg(et,_e),et=xj(et,1073741823),et!==null&&Z$1(et)}function Ei(et,_e){if(et.tag===3)Wj(et,et,_e);else for(var tt=et.return;tt!==null;){if(tt.tag===3){Wj(tt,et,_e);break}else if(tt.tag===1){var rt=tt.stateNode;if(typeof tt.type.getDerivedStateFromError=="function"||typeof rt.componentDidCatch=="function"&&(aj===null||!aj.has(rt))){et=Ai(_e,et),et=$i(tt,et,1073741823),xg(tt,et),tt=xj(tt,1073741823),tt!==null&&Z$1(tt);break}}tt=tt.return}}function Oj(et,_e,tt){var rt=et.pingCache;rt!==null&&rt.delete(_e),T$1===et&&U$1===tt?S$1===vi||S$1===ui&&lj===1073741823&&$f()-Ti<pj?Ej(et,U$1):oj=!0:Aj(et,tt)&&(_e=et.lastPingedTime,_e!==0&&_e<tt||(et.lastPingedTime=tt,Z$1(et)))}function Vi(et,_e){var tt=et.stateNode;tt!==null&&tt.delete(_e),_e=0,_e===0&&(_e=Gg(),_e=Hg(_e,et,null)),et=xj(et,_e),et!==null&&Z$1(et)}var Rj;Rj=function(et,_e,tt){var rt=_e.expirationTime;if(et!==null){var nt=_e.pendingProps;if(et.memoizedProps!==nt||K$1.current)rg=!0;else{if(rt<tt){switch(rg=!1,_e.tag){case 3:hi(_e),Xh();break;case 5:if(fh(_e),_e.mode&4&&tt!==1&&nt.hidden)return _e.expirationTime=_e.childExpirationTime=1,null;break;case 1:L$1(_e.type)&&Gf(_e);break;case 4:dh(_e,_e.stateNode.containerInfo);break;case 10:rt=_e.memoizedProps.value,nt=_e.type._context,I$1(jg,nt._currentValue),nt._currentValue=rt;break;case 13:if(_e.memoizedState!==null)return rt=_e.child.childExpirationTime,rt!==0&&rt>=tt?ji(et,_e,tt):(I$1(M$1,M$1.current&1),_e=$h(et,_e,tt),_e!==null?_e.sibling:null);I$1(M$1,M$1.current&1);break;case 19:if(rt=_e.childExpirationTime>=tt,(et.effectTag&64)!==0){if(rt)return mi(et,_e,tt);_e.effectTag|=64}if(nt=_e.memoizedState,nt!==null&&(nt.rendering=null,nt.tail=null),I$1(M$1,M$1.current),!rt)return null}return $h(et,_e,tt)}rg=!1}}else rg=!1;switch(_e.expirationTime=0,_e.tag){case 2:if(rt=_e.type,et!==null&&(et.alternate=null,_e.alternate=null,_e.effectTag|=2),et=_e.pendingProps,nt=Cf(_e,J$1.current),qg(_e,tt),nt=oh(null,_e,rt,et,nt,tt),_e.effectTag|=1,typeof nt=="object"&&nt!==null&&typeof nt.render=="function"&&nt.$$typeof===void 0){if(_e.tag=1,_e.memoizedState=null,_e.updateQueue=null,L$1(rt)){var st=!0;Gf(_e)}else st=!1;_e.memoizedState=nt.state!==null&&nt.state!==void 0?nt.state:null,ug(_e);var dt=rt.getDerivedStateFromProps;typeof dt=="function"&&Fg(_e,rt,dt,et),nt.updater=Jg,_e.stateNode=nt,nt._reactInternalFiber=_e,Ng(_e,rt,et,tt),_e=gi(null,_e,rt,!0,st,tt)}else _e.tag=0,R$1(null,_e,nt,tt),_e=_e.child;return _e;case 16:e:{if(nt=_e.elementType,et!==null&&(et.alternate=null,_e.alternate=null,_e.effectTag|=2),et=_e.pendingProps,ob(nt),nt._status!==1)throw nt._result;switch(nt=nt._result,_e.type=nt,st=_e.tag=Xj(nt),et=ig(nt,et),st){case 0:_e=di(null,_e,nt,et,tt);break e;case 1:_e=fi(null,_e,nt,et,tt);break e;case 11:_e=Zh(null,_e,nt,et,tt);break e;case 14:_e=ai(null,_e,nt,ig(nt.type,et),rt,tt);break e}throw Error(u(306,nt,""))}return _e;case 0:return rt=_e.type,nt=_e.pendingProps,nt=_e.elementType===rt?nt:ig(rt,nt),di(et,_e,rt,nt,tt);case 1:return rt=_e.type,nt=_e.pendingProps,nt=_e.elementType===rt?nt:ig(rt,nt),fi(et,_e,rt,nt,tt);case 3:if(hi(_e),rt=_e.updateQueue,et===null||rt===null)throw Error(u(282));if(rt=_e.pendingProps,nt=_e.memoizedState,nt=nt!==null?nt.element:null,vg(et,_e),zg(_e,rt,null,tt),rt=_e.memoizedState.element,rt===nt)Xh(),_e=$h(et,_e,tt);else{if((nt=_e.stateNode.hydrate)&&(Ph=Jd(_e.stateNode.containerInfo.firstChild),Oh=_e,nt=Qh=!0),nt)for(tt=Yg(_e,null,rt,tt),_e.child=tt;tt;)tt.effectTag=tt.effectTag&-3|1024,tt=tt.sibling;else R$1(et,_e,rt,tt),Xh();_e=_e.child}return _e;case 5:return fh(_e),et===null&&Uh(_e),rt=_e.type,nt=_e.pendingProps,st=et!==null?et.memoizedProps:null,dt=nt.children,Gd(rt,nt)?dt=null:st!==null&&Gd(rt,st)&&(_e.effectTag|=16),ei(et,_e),_e.mode&4&&tt!==1&&nt.hidden?(_e.expirationTime=_e.childExpirationTime=1,_e=null):(R$1(et,_e,dt,tt),_e=_e.child),_e;case 6:return et===null&&Uh(_e),null;case 13:return ji(et,_e,tt);case 4:return dh(_e,_e.stateNode.containerInfo),rt=_e.pendingProps,et===null?_e.child=Xg(_e,null,rt,tt):R$1(et,_e,rt,tt),_e.child;case 11:return rt=_e.type,nt=_e.pendingProps,nt=_e.elementType===rt?nt:ig(rt,nt),Zh(et,_e,rt,nt,tt);case 7:return R$1(et,_e,_e.pendingProps,tt),_e.child;case 8:return R$1(et,_e,_e.pendingProps.children,tt),_e.child;case 12:return R$1(et,_e,_e.pendingProps.children,tt),_e.child;case 10:e:{rt=_e.type._context,nt=_e.pendingProps,dt=_e.memoizedProps,st=nt.value;var ft=_e.type._context;if(I$1(jg,ft._currentValue),ft._currentValue=st,dt!==null)if(ft=dt.value,st=$e(ft,st)?0:(typeof rt._calculateChangedBits=="function"?rt._calculateChangedBits(ft,st):1073741823)|0,st===0){if(dt.children===nt.children&&!K$1.current){_e=$h(et,_e,tt);break e}}else for(ft=_e.child,ft!==null&&(ft.return=_e);ft!==null;){var ht=ft.dependencies;if(ht!==null){dt=ft.child;for(var mt=ht.firstContext;mt!==null;){if(mt.context===rt&&(mt.observedBits&st)!==0){ft.tag===1&&(mt=wg(tt,null),mt.tag=2,xg(ft,mt)),ft.expirationTime<tt&&(ft.expirationTime=tt),mt=ft.alternate,mt!==null&&mt.expirationTime<tt&&(mt.expirationTime=tt),pg(ft.return,tt),ht.expirationTime<tt&&(ht.expirationTime=tt);break}mt=mt.next}}else dt=ft.tag===10&&ft.type===_e.type?null:ft.child;if(dt!==null)dt.return=ft;else for(dt=ft;dt!==null;){if(dt===_e){dt=null;break}if(ft=dt.sibling,ft!==null){ft.return=dt.return,dt=ft;break}dt=dt.return}ft=dt}R$1(et,_e,nt.children,tt),_e=_e.child}return _e;case 9:return nt=_e.type,st=_e.pendingProps,rt=st.children,qg(_e,tt),nt=sg(nt,st.unstable_observedBits),rt=rt(nt),_e.effectTag|=1,R$1(et,_e,rt,tt),_e.child;case 14:return nt=_e.type,st=ig(nt,_e.pendingProps),st=ig(nt.type,st),ai(et,_e,nt,st,rt,tt);case 15:return ci(et,_e,_e.type,_e.pendingProps,rt,tt);case 17:return rt=_e.type,nt=_e.pendingProps,nt=_e.elementType===rt?nt:ig(rt,nt),et!==null&&(et.alternate=null,_e.alternate=null,_e.effectTag|=2),_e.tag=1,L$1(rt)?(et=!0,Gf(_e)):et=!1,qg(_e,tt),Lg(_e,rt,nt),Ng(_e,rt,nt,tt),gi(null,_e,rt,!0,et,tt);case 19:return mi(et,_e,tt)}throw Error(u(156,_e.tag))};var Uj=null,Li=null;function Yj(et){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var _e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(_e.isDisabled||!_e.supportsFiber)return!0;try{var tt=_e.inject(et);Uj=function(rt){try{_e.onCommitFiberRoot(tt,rt,void 0,(rt.current.effectTag&64)===64)}catch{}},Li=function(rt){try{_e.onCommitFiberUnmount(tt,rt)}catch{}}}catch{}return!0}function Zj(et,_e,tt,rt){this.tag=et,this.key=tt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=_e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Sh(et,_e,tt,rt){return new Zj(et,_e,tt,rt)}function bi(et){return et=et.prototype,!(!et||!et.isReactComponent)}function Xj(et){if(typeof et=="function")return bi(et)?1:0;if(et!=null){if(et=et.$$typeof,et===gb)return 11;if(et===jb)return 14}return 2}function Sg(et,_e){var tt=et.alternate;return tt===null?(tt=Sh(et.tag,_e,et.key,et.mode),tt.elementType=et.elementType,tt.type=et.type,tt.stateNode=et.stateNode,tt.alternate=et,et.alternate=tt):(tt.pendingProps=_e,tt.effectTag=0,tt.nextEffect=null,tt.firstEffect=null,tt.lastEffect=null),tt.childExpirationTime=et.childExpirationTime,tt.expirationTime=et.expirationTime,tt.child=et.child,tt.memoizedProps=et.memoizedProps,tt.memoizedState=et.memoizedState,tt.updateQueue=et.updateQueue,_e=et.dependencies,tt.dependencies=_e===null?null:{expirationTime:_e.expirationTime,firstContext:_e.firstContext,responders:_e.responders},tt.sibling=et.sibling,tt.index=et.index,tt.ref=et.ref,tt}function Ug(et,_e,tt,rt,nt,st){var dt=2;if(rt=et,typeof et=="function")bi(et)&&(dt=1);else if(typeof et=="string")dt=5;else e:switch(et){case ab:return Wg(tt.children,nt,st,_e);case fb:dt=8,nt|=7;break;case bb:dt=8,nt|=1;break;case cb:return et=Sh(12,tt,_e,nt|8),et.elementType=cb,et.type=cb,et.expirationTime=st,et;case hb:return et=Sh(13,tt,_e,nt),et.type=hb,et.elementType=hb,et.expirationTime=st,et;case ib:return et=Sh(19,tt,_e,nt),et.elementType=ib,et.expirationTime=st,et;default:if(typeof et=="object"&&et!==null)switch(et.$$typeof){case db:dt=10;break e;case eb:dt=9;break e;case gb:dt=11;break e;case jb:dt=14;break e;case kb:dt=16,rt=null;break e;case lb:dt=22;break e}throw Error(u(130,et==null?et:typeof et,""))}return _e=Sh(dt,tt,_e,nt),_e.elementType=et,_e.type=rt,_e.expirationTime=st,_e}function Wg(et,_e,tt,rt){return et=Sh(7,et,rt,_e),et.expirationTime=tt,et}function Tg(et,_e,tt){return et=Sh(6,et,null,_e),et.expirationTime=tt,et}function Vg(et,_e,tt){return _e=Sh(4,et.children!==null?et.children:[],et.key,_e),_e.expirationTime=tt,_e.stateNode={containerInfo:et.containerInfo,pendingChildren:null,implementation:et.implementation},_e}function ak(et,_e,tt){this.tag=_e,this.current=null,this.containerInfo=et,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=tt,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Aj(et,_e){var tt=et.firstSuspendedTime;return et=et.lastSuspendedTime,tt!==0&&tt>=_e&&et<=_e}function xi(et,_e){var tt=et.firstSuspendedTime,rt=et.lastSuspendedTime;tt<_e&&(et.firstSuspendedTime=_e),(rt>_e||tt===0)&&(et.lastSuspendedTime=_e),_e<=et.lastPingedTime&&(et.lastPingedTime=0),_e<=et.lastExpiredTime&&(et.lastExpiredTime=0)}function yi(et,_e){_e>et.firstPendingTime&&(et.firstPendingTime=_e);var tt=et.firstSuspendedTime;tt!==0&&(_e>=tt?et.firstSuspendedTime=et.lastSuspendedTime=et.nextKnownPendingLevel=0:_e>=et.lastSuspendedTime&&(et.lastSuspendedTime=_e+1),_e>et.nextKnownPendingLevel&&(et.nextKnownPendingLevel=_e))}function Cj(et,_e){var tt=et.lastExpiredTime;(tt===0||tt>_e)&&(et.lastExpiredTime=_e)}function bk(et,_e,tt,rt){var nt=_e.current,st=Gg(),dt=Dg.suspense;st=Hg(st,nt,dt);e:if(tt){tt=tt._reactInternalFiber;t:{if(dc(tt)!==tt||tt.tag!==1)throw Error(u(170));var ft=tt;do{switch(ft.tag){case 3:ft=ft.stateNode.context;break t;case 1:if(L$1(ft.type)){ft=ft.stateNode.__reactInternalMemoizedMergedChildContext;break t}}ft=ft.return}while(ft!==null);throw Error(u(171))}if(tt.tag===1){var ht=tt.type;if(L$1(ht)){tt=Ff(tt,ht,ft);break e}}tt=ft}else tt=Af;return _e.context===null?_e.context=tt:_e.pendingContext=tt,_e=wg(st,dt),_e.payload={element:et},rt=rt===void 0?null:rt,rt!==null&&(_e.callback=rt),xg(nt,_e),Ig(nt,st),st}function ck(et){if(et=et.current,!et.child)return null;switch(et.child.tag){case 5:return et.child.stateNode;default:return et.child.stateNode}}function dk(et,_e){et=et.memoizedState,et!==null&&et.dehydrated!==null&&et.retryTime<_e&&(et.retryTime=_e)}function ek(et,_e){dk(et,_e),(et=et.alternate)&&dk(et,_e)}function fk(et,_e,tt){tt=tt!=null&&tt.hydrate===!0;var rt=new ak(et,_e,tt),nt=Sh(3,null,null,_e===2?7:_e===1?3:0);rt.current=nt,nt.stateNode=rt,ug(nt),et[Od]=rt.current,tt&&_e!==0&&Jc(et,et.nodeType===9?et:et.ownerDocument),this._internalRoot=rt}fk.prototype.render=function(et){bk(et,this._internalRoot,null,null)};fk.prototype.unmount=function(){var et=this._internalRoot,_e=et.containerInfo;bk(null,et,null,function(){_e[Od]=null})};function gk(et){return!(!et||et.nodeType!==1&&et.nodeType!==9&&et.nodeType!==11&&(et.nodeType!==8||et.nodeValue!==" react-mount-point-unstable "))}function hk(et,_e){if(_e||(_e=et?et.nodeType===9?et.documentElement:et.firstChild:null,_e=!(!_e||_e.nodeType!==1||!_e.hasAttribute("data-reactroot"))),!_e)for(var tt;tt=et.lastChild;)et.removeChild(tt);return new fk(et,0,_e?{hydrate:!0}:void 0)}function ik(et,_e,tt,rt,nt){var st=tt._reactRootContainer;if(st){var dt=st._internalRoot;if(typeof nt=="function"){var ft=nt;nt=function(){var mt=ck(dt);ft.call(mt)}}bk(_e,dt,et,nt)}else{if(st=tt._reactRootContainer=hk(tt,rt),dt=st._internalRoot,typeof nt=="function"){var ht=nt;nt=function(){var mt=ck(dt);ht.call(mt)}}Nj(function(){bk(_e,dt,et,nt)})}return ck(dt)}function jk(et,_e,tt){var rt=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$a,key:rt==null?null:""+rt,children:et,containerInfo:_e,implementation:tt}}wc=function(et){if(et.tag===13){var _e=hg(Gg(),150,100);Ig(et,_e),ek(et,_e)}};xc=function(et){et.tag===13&&(Ig(et,3),ek(et,3))};yc=function(et){if(et.tag===13){var _e=Gg();_e=Hg(_e,et,null),Ig(et,_e),ek(et,_e)}};za=function(et,_e,tt){switch(_e){case"input":if(Cb(et,tt),_e=tt.name,tt.type==="radio"&&_e!=null){for(tt=et;tt.parentNode;)tt=tt.parentNode;for(tt=tt.querySelectorAll("input[name="+JSON.stringify(""+_e)+'][type="radio"]'),_e=0;_e<tt.length;_e++){var rt=tt[_e];if(rt!==et&&rt.form===et.form){var nt=Qd(rt);if(!nt)throw Error(u(90));yb(rt),Cb(rt,nt)}}}break;case"textarea":Kb(et,tt);break;case"select":_e=tt.value,_e!=null&&Hb(et,!!tt.multiple,_e,!1)}};Fa=Mj;Ga=function(et,_e,tt,rt,nt){var st=W$1;W$1|=4;try{return cg(98,et.bind(null,_e,tt,rt,nt))}finally{W$1=st,W$1===V$1&&gg()}};Ha=function(){(W$1&(1|fj|gj))===V$1&&(Lj(),Dj())};Ia=function(et,_e){var tt=W$1;W$1|=2;try{return et(_e)}finally{W$1=tt,W$1===V$1&&gg()}};function kk(et,_e){var tt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gk(_e))throw Error(u(200));return jk(et,_e,null,tt)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(et){jc(et,Wd)},Da,Ea,id,mc,Dj,{current:!1}]};(function(et){var _e=et.findFiberByHostInstance;return Yj(n$1({},et,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(tt){return tt=hc(tt),tt===null?null:tt.stateNode},findFiberByHostInstance:function(tt){return _e?_e(tt):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"});reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;reactDom_production_min.createPortal=kk;reactDom_production_min.findDOMNode=function(et){if(et==null)return null;if(et.nodeType===1)return et;var _e=et._reactInternalFiber;if(_e===void 0)throw typeof et.render=="function"?Error(u(188)):Error(u(268,Object.keys(et)));return et=hc(_e),et=et===null?null:et.stateNode,et};reactDom_production_min.flushSync=function(et,_e){if((W$1&(fj|gj))!==V$1)throw Error(u(187));var tt=W$1;W$1|=1;try{return cg(99,et.bind(null,_e))}finally{W$1=tt,gg()}};reactDom_production_min.hydrate=function(et,_e,tt){if(!gk(_e))throw Error(u(200));return ik(null,et,_e,!0,tt)};reactDom_production_min.render=function(et,_e,tt){if(!gk(_e))throw Error(u(200));return ik(null,et,_e,!1,tt)};reactDom_production_min.unmountComponentAtNode=function(et){if(!gk(et))throw Error(u(40));return et._reactRootContainer?(Nj(function(){ik(null,null,et,!1,function(){et._reactRootContainer=null,et[Od]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Mj;reactDom_production_min.unstable_createPortal=function(et,_e){return kk(et,_e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};reactDom_production_min.unstable_renderSubtreeIntoContainer=function(et,_e,tt,rt){if(!gk(tt))throw Error(u(200));if(et==null||et._reactInternalFiber===void 0)throw Error(u(38));return ik(et,_e,tt,!1,rt)};reactDom_production_min.version="16.14.0";function checkDCE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(et){console.error(et)}}checkDCE(),reactDom.exports=reactDom_production_min;var d=reactDom.exports,e=Object.defineProperty,t=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,n=(et,_e,tt)=>_e in et?e(et,_e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):et[_e]=tt,a=(et,_e)=>{for(var tt in _e||(_e={}))r.call(_e,tt)&&n(et,tt,_e[tt]);if(s)for(var tt of s(_e))o.call(_e,tt)&&n(et,tt,_e[tt]);return et};const h={src:"",currentTime:0,hostTime:0,muted:!1,paused:!0,volume:1},m={currentTimeMaxError:1,syncInterval:1e3,retryInterval:15e3,verbose:!1,log:console.log.bind(console)};let g=m;function v(et){g=a(a({},m),et)}function f(et,_e){if(et.paused)return et.currentTime;const tt=(function(rt){if(rt.player)return rt.player.beginTimestamp+rt.player.progressTime;if(rt.room)return rt.room.calibrationTimestamp})(_e);return tt?et.currentTime+(tt-et.hostTime)/1e3:et.currentTime}const y=navigator.userAgent.includes("Safari"),A=navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPad"),b=[".aac",".mid",".midi",".mp3",".ogg",".oga",".wav",".weba"];var I=typeof global=="object"&&global&&global.Object===Object&&global,S=typeof self=="object"&&self&&self.Object===Object&&self,T=I||S||Function("return this")(),C=T.Symbol,E=Object.prototype,k=E.hasOwnProperty,P=E.toString,j=C?C.toStringTag:void 0,B=Object.prototype.toString,w=C?C.toStringTag:void 0;function x(et){return et==null?et===void 0?"[object Undefined]":"[object Null]":w&&w in Object(et)?(function(_e){var tt=k.call(_e,j),rt=_e[j];try{_e[j]=void 0;var nt=!0}catch{}var st=P.call(_e);return nt&&(tt?_e[j]=rt:delete _e[j]),st})(et):(function(_e){return B.call(_e)})(et)}var H=/\s/,Q=/^\s+/;function M(et){return et&&et.slice(0,(function(_e){for(var tt=_e.length;tt--&&H.test(_e.charAt(tt)););return tt})(et)+1).replace(Q,"")}function L(et){var _e=typeof et;return et!=null&&(_e=="object"||_e=="function")}var N=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,V=/^0o[0-7]+$/i,O=parseInt;function z(et){if(typeof et=="number")return et;if((function(rt){return typeof rt=="symbol"||(function(nt){return nt!=null&&typeof nt=="object"})(rt)&&x(rt)=="[object Symbol]"})(et))return NaN;if(L(et)){var _e=typeof et.valueOf=="function"?et.valueOf():et;et=L(_e)?_e+"":_e}if(typeof et!="string")return et===0?et:+et;et=M(et);var tt=W.test(et);return tt||V.test(et)?O(et.slice(2),tt?2:8):N.test(et)?NaN:+et}var D=function(){return T.Date.now()},Z=Math.max,R=Math.min;function U(et,_e,tt){var rt,nt,st,dt,ft,ht,mt=0,bt=!1,St=!1,Et=!0;if(typeof et!="function")throw new TypeError("Expected a function");function Ct(Pt){var It=rt,Ft=nt;return rt=nt=void 0,mt=Pt,dt=et.apply(Ft,It)}function Rt(Pt){return mt=Pt,ft=setTimeout(wt,_e),bt?Ct(Pt):dt}function Tt(Pt){var It=Pt-ht;return ht===void 0||It>=_e||It<0||St&&Pt-mt>=st}function wt(){var Pt=D();if(Tt(Pt))return At(Pt);ft=setTimeout(wt,(function(It){var Ft=_e-(It-ht);return St?R(Ft,st-(It-mt)):Ft})(Pt))}function At(Pt){return ft=void 0,Et&&rt?Ct(Pt):(rt=nt=void 0,dt)}function Nt(){var Pt=D(),It=Tt(Pt);if(rt=arguments,nt=this,ht=Pt,It){if(ft===void 0)return Rt(ht);if(St)return clearTimeout(ft),ft=setTimeout(wt,_e),Ct(ht)}return ft===void 0&&(ft=setTimeout(wt,_e)),dt}return _e=z(_e)||0,L(tt)&&(bt=!!tt.leading,st=(St="maxWait"in tt)?Z(z(tt.maxWait)||0,_e):st,Et="trailing"in tt?!!tt.trailing:Et),Nt.cancel=function(){ft!==void 0&&clearTimeout(ft),mt=0,rt=ht=nt=ft=void 0},Nt.flush=function(){return ft===void 0?dt:At(D())},Nt}class F extends react.exports.Component{constructor(_e){super(_e),this.seeking=!1,this.mobileSeeking=!1,this.track=null,this.hoverTime=null,this.offset=0,this.secondsPrefix="00:00:",this.minutesPrefix="00:",this.seekPause=!1,this.handleTouchSeeking=tt=>{let rt=0;for(let nt=0;nt<tt.changedTouches.length;nt++)rt=tt.changedTouches[nt].pageX;rt=rt<0?0:rt,this.mobileSeeking&&this.changeCurrentTimePosition(rt)},this.handleSeeking=tt=>{this.seeking&&this.changeCurrentTimePosition(tt.pageX)},this.setTrackWidthState=()=>{this.track&&this.setState({trackWidth:this.track.offsetWidth})},this.handleTrackHover=(tt,rt)=>{if(this.track){const nt=this.props.scale||1;let st;st=tt?0:(rt.pageX-this.track.getBoundingClientRect().left)/nt,this.setState({seekHoverPosition:st,trackWidth:this.track.offsetWidth})}},this.mouseSeekingHandler=tt=>{this.setSeeking(!1,tt),this.onMouseUp()},this.setSeeking=(tt,rt)=>{rt.preventDefault(),this.handleSeeking(rt),this.seeking=tt,this.setState({seekHoverPosition:tt?this.state.seekHoverPosition:0})},this.mobileTouchSeekingHandler=()=>{this.setMobileSeeking(!1)},this.setMobileSeeking=tt=>{this.mobileSeeking=tt,this.setState({seekHoverPosition:tt?this.state.seekHoverPosition:0})},this.renderBufferProgress=()=>{if(this.props.buffered){const tt=a(a({},this.getPositionStyle(this.props.buffered)),this.props.bufferColor&&{backgroundColor:this.props.bufferColor});return l.createElement("div",{className:"buffered",style:tt})}return null},this.renderProgress=()=>{const tt=a(a({},this.getPositionStyle(this.props.current)),this.props.sliderColor&&{backgroundColor:this.props.sliderColor});return l.createElement("div",{className:"connect",style:tt})},this.renderHoverProgress=()=>{const tt=a(a({},this.getSeekHoverPosition()),this.props.sliderHoverColor&&{backgroundColor:this.props.sliderHoverColor});return l.createElement("div",{className:"seek-hover",style:tt})},this.renderThumb=()=>l.createElement("div",{className:this.isThumbActive()?"thumb active":"thumb",style:this.getThumbHandlerPosition()},l.createElement("div",{style:{backgroundColor:this.props.thumbColor},className:"handler"})),this.onMouseDown=tt=>{var rt,nt;this.props.pause&&!this.props.paused&&(this.props.pause(),this.seekPause=!0),this.setSeeking(!0,tt),(nt=(rt=this.props).onSeekStart)==null||nt.call(rt)},this.onMouseUp=()=>{var tt,rt;this.props.play&&this.seekPause&&(this.props.play(),this.seekPause=!1),(rt=(tt=this.props).onSeekEnd)==null||rt.call(tt)},this.props.secondsPrefix&&(this.secondsPrefix=this.props.secondsPrefix),this.props.minutesPrefix&&(this.minutesPrefix=this.props.minutesPrefix),this.state={ready:!1,trackWidth:0,seekHoverPosition:0}}componentDidMount(){this.setTrackWidthState(),window.addEventListener("resize",this.setTrackWidthState),window.addEventListener("mousemove",this.handleSeeking),window.addEventListener("mouseup",this.mouseSeekingHandler),window.addEventListener("touchmove",this.handleTouchSeeking),window.addEventListener("touchend",this.mobileTouchSeekingHandler)}componentWillUnmount(){window.removeEventListener("resize",this.setTrackWidthState),window.removeEventListener("mousemove",this.handleSeeking),window.removeEventListener("mouseup",this.mouseSeekingHandler),window.removeEventListener("touchmove",this.handleTouchSeeking),window.removeEventListener("touchend",this.mobileTouchSeekingHandler)}changeCurrentTimePosition(_e){if(this.track){const tt=this.props.scale||1;let rt=(_e-this.track.getBoundingClientRect().left)/tt;rt=Math.min(this.state.trackWidth,Math.max(0,rt)),this.setState({seekHoverPosition:rt});const nt=+(rt/this.state.trackWidth*this.props.total).toFixed(0);this.props.onChange(nt)}}getPositionStyle(_e){return{transform:`scaleX(${100*_e/this.props.total/100})`}}getThumbHandlerPosition(){return{transform:`translateX(${this.state.trackWidth/(this.props.total/this.props.current)}px)`}}getSeekHoverPosition(){return{transform:`scaleX(${100*this.state.seekHoverPosition/this.state.trackWidth/100})`}}getHoverTimePosition(){let _e=0;return this.hoverTime&&(_e=this.state.seekHoverPosition-this.hoverTime.offsetWidth/2,this.props.limitTimeTooltipBySides&&(_e<0?_e=0:_e+this.hoverTime.offsetWidth>this.state.trackWidth&&(_e=this.state.trackWidth-this.hoverTime.offsetWidth))),{transform:`translateX(${_e}px)`}}secondsToTime(_e){_e=Math.round(_e+this.offset);const tt=Math.floor(_e/3600),rt=_e%3600,nt=Math.floor(rt/60),st=Math.ceil(rt%60);return{hh:tt.toString(),mm:nt<10?"0"+nt:nt.toString(),ss:st<10?"0"+st:st.toString()}}getHoverTime(){const _e=100*this.state.seekHoverPosition/this.state.trackWidth,tt=Math.floor(+_e*(this.props.total/100)),rt=this.secondsToTime(tt);return this.props.total+this.offset<60?this.secondsPrefix+rt.ss:this.props.total+this.offset<3600?this.minutesPrefix+rt.mm+":"+rt.ss:rt.hh+":"+rt.mm+":"+rt.ss}isThumbActive(){return this.state.seekHoverPosition>0||this.seeking}drawHoverTime(){return this.props.hideHoverTime?null:l.createElement("div",{className:this.isThumbActive()?"hover-time active":"hover-time",style:this.getHoverTimePosition(),ref:_e=>this.hoverTime=_e},this.getHoverTime())}render(){return l.createElement("div",{className:"seek-slider"},l.createElement("div",{className:"track",ref:_e=>this.track=_e,onMouseMove:_e=>this.handleTrackHover(!1,_e),onMouseLeave:_e=>this.handleTrackHover(!0,_e),onMouseDown:this.onMouseDown,onTouchStart:_e=>{this.setMobileSeeking(!0),this.onMouseDown(_e)},onMouseUp:this.onMouseUp,onTouchEnd:this.onMouseUp},l.createElement("div",{className:"main"},this.renderBufferProgress(),this.renderHoverProgress(),this.renderProgress())),this.drawHoverTime(),this.renderThumb())}}class X extends react.exports.Component{constructor(_e){super(_e),this.stageVolume=0,this.updateVolumeTimer=0,this.onVolumeSeeking=!1,this.onClickOperationButton=()=>{const{paused:tt}=this.props;tt?this.props.play():this.props.pause()},this.operationButton=()=>{const{paused:tt}=this.props;return tt?l.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOCA1LjE0djE0bDExLTdsLTExLTd6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="}):l.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQgMTloNFY1aC00TTYgMTloNFY1SDZ2MTR6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="})},this.operationVolumeButton=()=>this.props.volume>.9?l.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQgMy4yM3YyLjA2YzIuODkuODYgNSAzLjU0IDUgNi43MXMtMi4xMSA1Ljg0LTUgNi43djIuMDdjNC0uOTEgNy00LjQ5IDctOC43N2MwLTQuMjgtMy03Ljg2LTctOC43N00xNi41IDEyYzAtMS43Ny0xLTMuMjktMi41LTQuMDNWMTZjMS41LS43MSAyLjUtMi4yNCAyLjUtNE0zIDl2Nmg0bDUgNVY0TDcgOUgzeiIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPgo="}):this.props.volume===0?l.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNyA5djZoNGw1IDVWNGwtNSA1SDd6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9zdmc+Cg=="}):l.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1tZGkiIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNSA5djZoNGw1IDVWNEw5IDltOS41IDNjMC0xLjc3LTEtMy4yOS0yLjUtNC4wM1YxNmMxLjUtLjcxIDIuNS0yLjI0IDIuNS00eiIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPgo="}),this.handleClickVolume=()=>{this.props.volume===0?this.stageVolume!==0?this.props.setVolume(this.stageVolume):this.props.setVolume(1):(this.stageVolume=this.props.volume,this.props.setVolume(0))},this.onChange=tt=>{this.setState({currentTime:tt}),tt&&this.changeTime(tt)},this.changeTime=U(tt=>{this.props.setCurrentTime(tt)},50),this.onVolumeChange=tt=>{this.changeVolume(tt),this.setState({seekVolume:tt/100})},this.changeVolume=U(tt=>{this.props.setVolume(tt/100)},50),this.onVolumeSeekStart=()=>{this.onVolumeSeeking=!0},this.onVolumeSeekEnd=U(()=>{this.onVolumeSeeking=!1},500),this.onProgressSeekStart=()=>this.setState({isPlayerSeeking:!0}),this.onProgressSeekEnd=U(()=>{this.setState({isPlayerSeeking:!1})},500),this.state={isPlayerSeeking:!1,isVolumeHover:!1,seekVolume:1,visible:!0,currentTime:0},this.stageVolume=_e.volume}componentDidMount(){this.updateVolumeTimer=setInterval(()=>{this.onVolumeSeeking||this.setState({seekVolume:this.props.volume}),this.state.isPlayerSeeking||this.setState({currentTime:this.props.currentTime})},100)}componentWillUnmount(){this.updateVolumeTimer&&clearInterval(this.updateVolumeTimer)}render(){const{duration:_e,currentTime:tt}=this.props;return l.createElement("div",{className:"player-controller",style:{opacity:this.props.visible?"1":"0"}},l.createElement("div",{className:"player-controller-progress"},l.createElement(F,{total:_e,current:this.state.currentTime,onChange:this.onChange,buffered:this.props.buffered,bufferColor:"rgba(255,255,255,0.3)",hideHoverTime:!0,limitTimeTooltipBySides:!0,onSeekStart:this.onProgressSeekStart,onSeekEnd:this.onProgressSeekEnd,play:this.props.play,pause:this.props.pause,paused:this.props.paused,scale:this.props.scale})),l.createElement("div",{className:"player-controller-actions"},l.createElement("div",{className:"player-controller-actions-left"},l.createElement("div",{onClick:this.onClickOperationButton,className:"player-controller-play"},this.operationButton()),l.createElement("div",{className:"player-volume-box",onMouseEnter:()=>this.setState({isVolumeHover:!0}),onMouseLeave:()=>this.setState({isVolumeHover:!1})},l.createElement("div",{onClick:this.handleClickVolume,className:"player-volume"},this.operationVolumeButton()),l.createElement("div",{className:"player-volume-slider"},l.createElement(F,{total:100,current:100*this.state.seekVolume,onChange:this.onVolumeChange,onSeekStart:this.onVolumeSeekStart,onSeekEnd:this.onVolumeSeekEnd,scale:this.props.scale,limitTimeTooltipBySides:!0,hideHoverTime:!0})))),l.createElement("div",{className:"player-mid-box-time"},G(Math.floor(tt/1e3))," /"," ",G(Math.floor(_e/1e3)))))}}function G(et){const _e=et%60,tt=(et-_e)/60;if(tt>=60){const rt=tt%60;return`${Y((tt-rt)/60)}:${Y(rt)}:${Y(_e)}`}return`${Y(tt)}:${Y(_e)}`}function Y(et){return et<=9?`0${et}`:`${et}`}let J=99999;var K,q;(q=K||(K={}))[q.Idle=0]="Idle",q[q.Playing=1]="Playing",q[q.Paused=2]="Paused";let $={};function _(et,..._e){g.verbose&&console.log(`[RTCEffect] ${et}`,..._e)}function ee(et,_e,tt){function rt(st){$[st].playState===0?(et.playEffect(st,tt,0,1,0,100,!1,0).then(()=>{_(">>> Play Success",{playingId:st})}),$[st].playState=1):_(">>> Skip Play",{playingId:st,state:$[st].playState})}function nt(st){$[st].playState=0,$[st].previousVideoJSAdvance=0,$[st].previousSeekTargetTime=0,$[st].previousBeginSeekTime=0}_e.one("ready",()=>{var st;const dt=((st=_e?.tagAttributes)==null?void 0:st.src)||"";b.includes("."+dt.split(".").pop()||"")||(_(">>> Mute js player",{src:dt}),_e.muted(!0),_e.muted=ht=>!1);const ft=(function(){const ht=J--,mt={playState:K.Idle,previousVideoJSAdvance:0,previousSeekTargetTime:0,previousBeginSeekTime:0};return $[ht]=mt,ht})();_(">>> Setup",{playingId:ft,src:dt}),et.addListener("error",ht=>{_(">>> Error",{soundId:ht}),nt(ht)}),et.addListener("effectFinished",ht=>{_(">>> Finished",{soundId:ht}),nt(ht)}),_e.on("play",()=>{switch($[ft].playState){case 0:_(">>> Start play",{playingId:ft}),rt(ft);break;case 2:_(">>> Resume play",{playingId:ft}),et.resumeEffect(ft),$[ft].playState=1}}),_e.on("pause",()=>{const ht=$[ft].playState;switch(ht){case 1:_(">>> Pause play",{playingId:ft}),et.pauseEffect(ft),$[ft].playState=2;break;default:_(">>> Skip Pause",{playingId:ft,currenState:ht})}}),_e.on("timeupdate",()=>{et.getEffectCurrentPosition(ft).then(ht=>{const mt=$[ft],bt=ht/1e3,St=_e.currentTime(),Et=mt.previousSeekTargetTime!==0&&mt.previousBeginSeekTime!==0;if(_(`>>> EffectSecond rtc: ${bt} js: ${St} seeking: ${Et}`,{playingId:ft}),mt.playState==0)return void(_e.paused()||(_(">>> Play effect due to time update.",{playingId:ft}),rt(ft)));if(Et&&bt<mt.previousSeekTargetTime)return;if(mt.playState!==1)return void _(">>> Skip timupdate",{playingId:ft,state:mt.playState,jsTime:_e.currentTime(),rtcEffectTime:bt});function Ct(Tt,wt){et.setEffectPosition(wt,1e3*Tt),mt.previousBeginSeekTime=Date.now()/1e3,mt.previousSeekTargetTime=Tt}const Rt=mt.previousBeginSeekTime;if(ht>0){const Tt=St-bt,wt=Math.abs(Tt),At=.5;if(wt>At)if(Et){const Nt=mt.previousSeekTargetTime-bt,Pt=Date.now()/1e3-Rt,It=Pt+(Tt>0?Tt:0),Ft=St+It;Ct(Ft,ft),_(">>> Start seeking after seeking lag",{jsPlayerTime:St,rtcEffectTime:bt,jsPlayerTimerAdvance:Tt,lastSeekingCost:Pt,estimatedRTCLag:It,targetRTCSeekTime:Ft,previousBeginSeekTime:Rt,timeElapse:Nt})}else if(wt>10)Ct(St,ft),_(">>> DirectSeek",{time:St,rtcEffectTime:bt,jsPlayerTimerAdvance:Tt});else{const Nt=mt.previousVideoJSAdvance,Pt=0,It=St+Pt;mt.previousVideoJSAdvance=Pt,Ct(It,ft),_(">>> Start seeking with lag",{jsPlayerTime:St,rtcEffectTime:bt,jsPlayerTimerAdvance:Tt,previousAdvance:Nt,estimatedRTCLag:Pt,targetRTCSeekTime:It})}else Et&&(_(">>> SeekingFinish no lag",{jsPlayerTime:St,rtcEffectTime:bt,jsPlayerTimerAdvance:Tt,previousBeginSeekTime:Rt,rtcLagTolerance:At}),mt.previousBeginSeekTime=0,mt.previousSeekTargetTime=0)}})}),_e.on("dispose",()=>{$[ft].playState&&(et.stopEffect(ft),delete $[ft],_(">>> Dispose",{playingId:ft}))})})}class te extends react.exports.Component{constructor(){super(...arguments),this.putAttributes=_e=>{const{context:tt}=this.props,rt=tt.getAttributes()||{};for(const nt in _e)rt[nt]!==_e[nt]&&tt.updateAttributes([nt],_e[nt])}}render(){const{context:_e}=this.props,tt=_e.getRoom(),rt=tt?void 0:_e.getDisplayer(),nt=this.putAttributes;return l.createElement(ie,{room:tt,player:rt,context:_e,plugin:{putAttributes:nt}})}}class ie extends react.exports.Component{constructor(_e){super(_e),this.alertMask=null,this.container=l.createRef(),this.controllerHiddenTimer=0,this.syncPlayerTimer=0,this.retryCount=0,this.decreaseRetryTimer=0,this.noSoundSyncCount=0,this.everPlayed=!1,this.showController=()=>{this.setState({controllerVisible:!0}),this.debounceHidingController()},this.play=()=>{var tt;const rt=(tt=this.props.room)==null?void 0:tt.calibrationTimestamp;this.debug(">>> play",{paused:!1,hostTime:rt}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!1,hostTime:rt})},this.pause=()=>{const tt=f(this.getAttributes(),this.props);this.debug(">>> pause",{paused:!0,currentTime:tt}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!0,currentTime:tt})},this.setVolume=tt=>{this.debug(">>> volume",{volume:tt}),this.isEnabled()&&this.props.plugin.putAttributes({volume:tt}),this.isEnabled()&&this.props.plugin.putAttributes({volume:tt,muted:tt===0})},this.setCurrentTime=tt=>{var rt;const nt=(rt=this.props.room)==null?void 0:rt.calibrationTimestamp;this.debug(">>> seek",{currentTime:tt/1e3,hostTime:nt}),this.isEnabled()&&this.props.plugin.putAttributes({currentTime:tt/1e3,hostTime:nt})},this.resetPlayer=()=>{var tt;(tt=this.player)==null||tt.autoplay(!1),this.state.NoSound||(this.debug(">>> ended",{paused:!0,currentTime:0}),this.isEnabled()&&this.props.plugin.putAttributes({paused:!0,currentTime:0}))},this.syncPlayerWithAttributes=()=>{var tt;const rt=this.getAttributes();if(!rt)return;const nt=this.player;if(!nt||this.state.NoSound&&(this.noSoundSyncCount+=1)%8!=0)return;nt.paused()!==rt.paused&&(this.debug("<<< paused -> %o",rt.paused),rt.paused?nt.pause():((tt=nt.play())==null||tt.catch(this.catchPlayFail),this.everPlayed=!0)),nt.muted()!==rt.muted&&(this.debug("<<< muted -> %o",rt.muted),nt.muted(rt.muted)),nt.volume()!==rt.volume&&(this.debug("<<< volume -> %o",rt.volume),nt.volume(rt.volume));const st=f(rt,this.props);let dt=g.currentTimeMaxError;if(this.state.NoSound&&(dt*=3),st>nt.duration())this.resetPlayer();else if(Math.abs(nt.currentTime()-st)>dt){if(this.debug("<<< currentTime -> %o",st),A)return void(this.everPlayed?nt.currentTime(st):this.debug("<<< ignore iOS idle time update. -> %o (ignored)",st));nt.currentTime(st)}},this.debounceHidingController=()=>{this.controllerHiddenTimer&&(clearTimeout(this.controllerHiddenTimer),this.controllerHiddenTimer=0),this.controllerHiddenTimer=setTimeout(()=>{this.setState({controllerVisible:!1}),this.controllerHiddenTimer=0},3e3)},this.decreaseRetryCount=()=>{this.player&&this.retryCount>0&&(this.retryCount=this.retryCount-1)},this.catchPlayFail=tt=>{var rt,nt;const st=String(tt);if(y&&st.includes("NotAllowedError")||st.includes("interact"))(rt=this.player)==null||rt.autoplay("any"),this.setState({NoSound:!0});else{const dt=(nt=this.player)==null?void 0:nt.error();dt&&(this.retryCount<=3?(this.initPlayer(),this.retryCount=this.retryCount+1):(this.debug("catch videojs media error",dt),this.setState({MediaError:!0}))),this.debug("catch error",tt)}},this.fixPlayFail=()=>{this.debug("try to fix play state"),this.setState({NoSound:!1});const{muted:tt,volume:rt}=this.getAttributes();this.player&&(this.player.muted(tt),this.player.volume(rt))},this.initPlayer=async()=>{var tt;(tt=this.player)==null||tt.dispose(),this.player=void 0,this.debug("creating elements ...");const{type:rt,src:nt,poster:st}=this.getAttributes(),dt=document.createElement("div");dt.setAttribute("data-vjs-player","");const ft=document.createElement("video");ft.className="video-js",ft.crossOrigin="anonymous",st&&(ft.poster=st),ft.setAttribute("playsInline",""),ft.setAttribute("webkit-playsinline","");const ht=document.createElement("source");new URL(nt).pathname.endsWith(".m3u8")?ht.type="application/x-mpegURL":ft.src=nt,ht.src=nt,rt&&(ht.type=rt),ft.appendChild(ht),dt.appendChild(ft),this.container.current.appendChild(dt),await new Promise(Et=>(window.requestAnimationFrame||window.setTimeout)(Et)),this.debug("initializing videojs() ...");const mt=videojs(ft);this.player=mt,window.player=mt,mt.one("loadedmetadata",this.gracefullyUpdate);const bt=window.__mediaPlayerAudioEffectClient;bt!==void 0&&ee(bt,mt,nt);const St=window.__pcmProxy;St!==void 0&&(mt.one("play",()=>{const Et=St.connect(ft);this.audioSource=Et,this.debug("Connect to PCMProxy ",nt)}),mt.one("dispose",()=>{this.audioSource&&(this.audioSource.disconnect(),this.audioSource=void 0,this.debug("Disconnect from PCMProxy",nt))})),mt.on("ready",()=>{var Et;(Et=g.onPlayer)==null||Et.call(g,mt),mt.on("timeupdate",this.gracefullyUpdate),mt.on("volumechange",this.gracefullyUpdate),mt.on("seeked",this.gracefullyUpdate),mt.on("play",this.gracefullyUpdate),mt.on("pause",this.gracefullyUpdate),mt.on("ended",this.resetPlayer)}),mt.on("error",this.catchPlayFail),this.setState({MediaError:!1})},this.gracefullyUpdate=()=>this.setState({updater:!this.state.updater}),this.setupAlert=tt=>{tt&&(tt.addEventListener("touchstart",this.fixPlayFail),tt.addEventListener("click",this.fixPlayFail)),this.alertMask=tt},this.setupReload=tt=>{tt&&(tt.addEventListener("touchstart",this.initPlayer),tt.addEventListener("click",this.initPlayer))},this.state={NoSound:!1,MediaError:!1,updater:!1,controllerVisible:!1},_e.room&&(function(tt){if(!tt.calibrationTimestamp)throw new Error("@netless/app-media-player@0.1.0-alpha.5 requires white-web-sdk@^2.13.8 to work properly.")})(_e.room)}getAttributes(){const{context:_e}=this.props;let tt=_e.getAttributes();if(tt){if(tt=a(a({},h),tt),this.player){let nt=f(tt,this.props),st=this.player.duration();!tt.paused&&nt>st&&(rt=a({},tt),tt=t(rt,i({currentTime:0,paused:!0})),this.resetPlayer())}var rt;return tt}}isShowingPoster(){const _e=this.getAttributes();return!_e?.src||b.some(tt=>_e.src.endsWith(tt))}render(){var _e,tt;if(!this.props.room&&!this.props.player)return null;const rt=this.getAttributes();if(!rt)return null;const nt=1e3*(((_e=this.player)==null?void 0:_e.duration())||1e3),st=((tt=this.player)==null?void 0:tt.bufferedPercent())||0;return l.createElement("div",{className:this.isEnabled()?"vjs-p":"vjs-p disabled",onMouseEnter:this.showController,onMouseMove:this.showController},l.createElement("div",{className:"video-js-plugin-player",ref:this.container}),this.isShowingPoster()&&l.createElement("div",{className:"video-js-plugin-poster"},rt.poster&&l.createElement("img",{src:rt.poster,alt:"",draggable:!1})),l.createElement(X,{duration:nt,volume:rt.volume,setVolume:this.setVolume,paused:rt.paused,play:this.play,pause:this.pause,currentTime:1e3*f(rt,this.props),setCurrentTime:this.setCurrentTime,buffered:nt*st,visible:!0}),this.state.NoSound&&l.createElement("div",{ref:this.setupAlert,className:"videojs-plugin-muted-alert"}),this.state.MediaError&&l.createElement("div",{className:"videojs-plugin-recovery-mode"},l.createElement("button",{ref:this.setupReload},"Reload Player")))}debug(_e,...tt){g.verbose&&g.log(`[MediaPlayer] ${_e}`,...tt)}componentDidMount(){this.debug("app version =","0.1.0-alpha.5"),this.debug("video.js version =",videojs.VERSION),this.initPlayer(),this.props.context.emitter.on("attributesUpdate",this.syncPlayerWithAttributes),this.syncPlayerTimer=setInterval(this.syncPlayerWithAttributes,g.syncInterval),this.decreaseRetryTimer=setInterval(this.decreaseRetryCount,g.retryInterval)}componentWillUnmount(){var _e;this.debug("unmount"),this.props.context.emitter.off("attributesUpdate",this.syncPlayerWithAttributes),(_e=this.player)==null||_e.dispose(),clearInterval(this.syncPlayerTimer),clearInterval(this.decreaseRetryTimer)}isEnabled(){return this.props.context.getIsWritable()}}const se={kind:"MediaPlayer",setup(et){let _e=et.getAttributes();if(!_e||!_e.src)return et.emitter.emit("destroy",{error:new Error("[MediaPlayer]: Missing 'attributes'.'src'.")});_e=a(a({},h),_e);const tt=et.getBox();tt.mountStyles(`.vjs-p{display:flex;flex-grow:1}.vjs-p *{pointer-events:auto}.vjs-p.disabled *{pointer-events:none}.vjs-p .video-js-plugin-poster{position:absolute;top:0;left:0;right:0;bottom:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgQAAACACAYAAAB0vHFxAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACBKADAAQAAAABAAAAgAAAAACE3oPTAAAKXUlEQVR4Ae3dYW4ktxEG0LW9FwkC2McycokAOUGAXMLwtQwYvomdP4akHUnNnm6SVUU+/xqpe8ji+yiDWz3a/e7L5v/98se//3pL8K9//O+7t19Hv85eX7RP9vnllz2h4/rkd+wz+ir/0cLfjv/9t1/6igABAgQIENhRwIFgx9StmQABAgQIPAg4EDyA+JIAAQIECOwo8HXHRVvzPIHRzwBHjz9PKudMo31Hj59TdZ2qsueXvb5sO0GHIFsi6iFAgAABAgECOgQB6KbsJ5Dtt0L6rWyPkeRXO+fs+WWvL1v6OgTZElEPAQIECBAIENAhCEA3ZT8Bzwj7WUaMJL8I9X5zZs8ve339kugzkg5BH0ejECBAgACB0gIOBKXjUzwBAgQIEOgj4EDQx9EoBAgQIECgtIADQen4FE+AAAECBPoIOBD0cTQKAQIECBAoLeC3DErHp/iWgE8Zt4RyX5df7nxa1Y3Ob/T4rfWtdl2HYLVErYcAAQIECFwQWL5DsPoJcvX1XdjTpd4iv1JxvStWfu9IfCORwLP7U4cgUXhKIUCAAAECUQIOBFHy5iVAgAABAokEHAgShaEUAgQIECAQJXD7MwTPPqOIWujVeUevb/T4V9ftfecE5HfOKetd8suajLoiBHQIItTNSYAAAQIEkgnc7hAkW0/3ckb/e9qjx+8OYsBvBOT3DUe5L+RXLjIFDxTQIRiIa2gCBAgQIFBFoNkh2P0Z2+j1jx4/+0asvv7q9d/dH9XXX73+3fO7u/7W+3fbHzoErR3hOgECBAgQ2ECg2SHwjG2DXRC4xOj9tdufAHpHLb/eonPHk9+xd7TPcXX9r+oQ9Dc1IgECBAgQKCfgQFAuMgUTIECAAIH+Ag4E/U2NSIAAAQIEygk0P0MQvaLsz3hb9bWu840WOJ5ffsc+2a/KL3tC6jsSmL1/dQiO0nCNAAECBAhsItDsEMw+oTzrHl1f61OorevPrvfZ+6N9WvVmr09+xwnKr7ZP9vyOdcdfze7Tuz4dgvF7ygwECBAgQCC9QLNDkH0F0X+C45NdoHZ99rf8aguofqRA7/8/6BCMTMvYBAgQIECgiED5DkHvZyhFcjtdJp/TVClvlF/KWE4XJb/TVG68INB7f+kQXAjBWwgQIECAwGoCDgSrJWo9BAgQIEDggoADwQU0byFAgAABAqsJfO39DGI1IOuJFbA/Y/3vzi6/u4Kx7189v7vru/v+2HTfz65D8N7EdwgQIECAwHYCw3/LYLUT1HY7pLFg+TaAkl+WX/KAGuXJrwEUfLlaPjoEwRvG9AQIECBAIIPA8A5B779JKQOaGl4F5PtqUfGV/Cqm9lqz/F4tMr6qlo8OQcZdpCYCBAgQIDBZYHiHoNozlMn+5aeTb+0I5Se/2gK5q6/286VDkHs/qY4AAQIECEwRcCCYwmwSAgQIECCQW8CBIHc+qiNAgAABAlMEhn+GYMoqTEKAAAEC7wSqPcN+twDfmCqgQzCV22QECBAgQCCnQHiHoPoJtlV/63rObfFaVfX6X1dy7VX19Vev/1pqr++qvv7q9b8m4dVHAtny1SH4KCXfI0CAAAECmwmEdwiq/U1Om+2PL/Kpnbj85FdbYO3qs/186hCsvd+sjgABAgQInBJwIDjF5CYCBAgQILC2gAPB2vlaHQECBAgQOCUQ/hmCbJ+yPKW20U3yqR22/ORXW2Dt6qN/Ph/n1yFYe79ZHQECBAgQOCXgQHCKyU0ECBAgQGBtAQeCtfO1OgIECBAgcErAgeAUk5sIECBAgMDaAg4Ea+drdQQIECBA4JTA1+///OGnoztd52N/fC7g58PPx+e748sX+8P+qLQ/dAiO0nKNAAECBAhsIuBAsEnQlkmAAAECBI4EHAiOdFwjQIAAAQKbCDgQbBK0ZRIgQIAAgSMBB4IjHdcIECBAgMAmAuH/lsHP//zvb5tYl1ymfErG9lK0/F4oSr6QX8nYThcdne/j/DoEp6NzIwECBAgQWFfAgWDdbK2MAAECBAicFnAgOE3lRgIECBAgsK5A+GcIfv39Pz++5X18pvH2mtfzBeQz37znjPLrqTl/LPnNN585Y7Z8dQhmpm8uAgQIECCQVCC8Q1C9I9Cqv3U96b54Kat6/S8Lufii+vqr138xtpe3VV9/9fpfgvDiQ4Fs+eoQfBiTbxIgQIAAgb0EwjsEe3FbLQECBOYJZPsT6LyVm+mKgA7BFTXvIUCAAAECiwk4ECwWqOUQIECAAIErAg4EV9S8hwABAgQILCYw/DMEnmEttmMeliPfB5BiX8qvWGAP5crvASTZl9Xy0SFItoGUQ4AAAQIEIgSGdwiy/U1MEcgrzynf2unKT361BXJXX+3nS4cg935SHQECBAgQmCIwvENQ7RnKFPWFJpFv7TDlJ7/aArmrr/bzpUOQez+pjgABAgQITBH4Wu0EM0XFJGkE7M80UVwqRH6X2NK8afX87q7v7vvTBP13IToE2RJRDwECBAgQCBBwIAhANyUBAgQIEMgm4ECQLRH1ECBAgACBAIHhv2Uwek2rPcPp7cWnt+jc8eQ317v3bPLrLWq8twK995cOwVtdrwkQIECAwKYC5TsE1f4mqNn7jM9s8b7zya+v5+zR5DdbfK/5eu8vHYK99o/VEiBAgACBDwWaHYLezyg+rOLGN6Pra53QWtdvLP3UW6N9WkVmr09+xwnKr7ZP9vyOdcdfze7Tuz4dgvF7ygwECBAgQCC9QLNDEL2C3ieg3utp1de63rueZ8fLXt+z6+l9f3af7PX1zuPZ8bL7ZK/vWW/39xWYvT90CPrmZzQCBAgQIFBSwIGgZGyKJkCAAAECfQUcCPp6Go0AAQIECJQUaH6GIPpT1iVVFX1aIHp/zX5GdxqmyI3yKxLUJ2XK7xOYv78d7XNcXf+rOgT9TY1IgAABAgTKCTQ7BLv/CWr0+kePn31HVl9/9frv7o/q669e/+753V1/6/277Q8dgtaOcJ0AAQIECGwg0OwQbGBwuMTRz5BGj3+4OBdvC8jvNmHoAPIL5Td5MgEdgmSBKIcAAQIECEQI3O4QrP6MZfT6Ro8fsal2mlN+tdOWX+38VN9XQIegr6fRCBAgQIBASQEHgpKxKZoAAQIECPQVcCDo62k0AgQIECBQUuD2Zwiyr3r1Z4Srry/7/rpbn/zuCsa+X36x/mY/Fnh2f+oQHHu6SoAAAQIEthBYvkOwRYoW+anAsyfkTwdyIURAfiHs3SYdnd/o8btBFBlIh6BIUMokQIAAAQIjBRwIRuoamwABAgQIFBFwICgSlDIJECBAgMBIAQeCkbrGJkCAAAECRQQcCIoEpUwCBAgQIDBSwG8ZjNQ19nABnzIeTjx0AvkN5R0+ePb8stc3PKAnJ9AheBLM7QQIECBAYEUBHYIVU91oTf49+9phy09+IwXsr+d0dQie83I3AQIECBBYUkCHYMlY8yxq9DO80ePnkYypZLTv6PFj1PaZNXt+2evLtlN0CLIloh4CBAgQIBAg4EAQgG5KAgQIECCQTcCBIFsi6iFAgAABAgEC/wdVfx9UuC8B6AAAAABJRU5ErkJggg==);background-repeat:repeat-x;background-position:0 50%;display:flex;align-items:center;justify-content:center}.vjs-p .video-js-plugin-poster img{box-shadow:0 0 5px 10px #0006}.vjs-p .player-controller,.vjs-p .videojs-plugin-muted-alert{pointer-events:auto}.vjs-p.disabled .videojs-plugin-close-icon,.vjs-p.disabled .player-controller{pointer-events:none}.vjs-p .video-js-plugin-player{position:absolute;top:0;left:0;right:0;bottom:0}.video-js,[data-vjs-player]{width:100%;height:100%}.vjs-p .videojs-plugin-muted-alert{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43}.vjs-p .videojs-plugin-muted-alert:before{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:43;content:"\\f104";background:rgba(0,0,0,.3);font-family:VideoJS;font-size:2em;display:flex;align-items:center;justify-content:center;color:#fff}.vjs-p .videojs-plugin-recovery-mode{pointer-events:auto;cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:44}.vjs-p .videojs-plugin-recovery-mode button{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vjs-p .seek-slider{position:relative;width:100%}.vjs-p .seek-slider:focus{outline:none}.vjs-p .seek-slider .track{padding:10px 0;cursor:pointer;outline:none}.vjs-p .seek-slider .track:focus{border:0;outline:none}.vjs-p .seek-slider .track .main{width:100%;height:3px;background-color:#ffffff4d;border-radius:30px;position:absolute;left:0;top:8.5px;transition:transform .4s;outline:none}.vjs-p .seek-slider .track .main:focus{border:0;outline:none}.vjs-p .seek-slider .track .main .buffered{position:absolute;background-color:#ffffff4d;width:100%;height:100%;transform:scaleX(.8);z-index:2;transform-origin:0 0}.vjs-p .seek-slider .track .main .seek-hover{position:absolute;background-color:#ffffff80;width:100%;height:100%;z-index:1;transform:scaleX(.6);transform-origin:0 0;opacity:0;transition:opacity .4s}.vjs-p .seek-slider .track .main .connect{position:absolute;background-color:#fff;width:100%;height:100%;z-index:3;left:0;transform:scaleX(.13);transform-origin:0 0}.vjs-p .seek-slider .track.active .main{transform:scaleY(2)}.vjs-p .seek-slider .thumb{pointer-events:none;position:absolute;width:12px;height:12px;left:-6px;top:4px;z-index:4;transform:translate(100px)}.vjs-p .seek-slider .thumb .handler{border-radius:100%;width:100%;height:100%;background-color:#fff;opacity:0;transform:scale(.4);cursor:pointer;transition:transform .2s;pointer-events:none}.vjs-p .seek-slider .thumb.active .handler{opacity:1;transform:scale(1)}.vjs-p .seek-slider .hover-time{position:absolute;background-color:#0000004d;line-height:18px;font-size:16px;color:#ddd;top:-25px;left:0;padding:5px 10px;border-radius:5px;box-shadow:0 0 5px #0000004d;opacity:0;transform:translate(150px);pointer-events:none}.vjs-p .seek-slider .hover-time.active{opacity:1}.vjs-p .seek-slider:hover .track .main .seek-hover{opacity:1}.vjs-p .player-controller{position:absolute;z-index:100;bottom:0px;left:0;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;height:64px;background-image:linear-gradient(0deg,#000,transparent);transition:opacity .2s;color:#fff}.vjs-p .player-menu-box{display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:40px}.vjs-p .player-menu-cell{width:100%;text-align:center;font-size:12px;color:#7a7b7c}.vjs-p .player-multiple-play{width:64px;height:120px}.vjs-p .player-controller-actions-left{display:flex;justify-content:center;align-items:center;flex-shrink:0}.vjs-p .player-right-box{font-size:14px;color:#7a7b7c;cursor:pointer;margin-right:12px}.vjs-p .player-controller-actions{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-left:8px;padding-right:8px;margin-top:2px}.vjs-p .player-mid-box-time{font-size:9px;display:flex;justify-content:center;align-items:center;color:#fff;flex-shrink:0;margin-right:8px;font-family:monospace}.vjs-p .player-controller-play{display:flex;align-items:center;justify-content:center;cursor:pointer;padding-right:4px}.vjs-p .player-controller-progress{width:calc(100% - 28px);margin-left:14px;display:flex;align-items:center;justify-content:center;margin-top:8px}.vjs-p .player-volume{display:flex;align-items:center;justify-content:center;cursor:pointer;margin-right:16px;margin-left:8px}.vjs-p .player-volume-slider{width:60px;margin-right:12px;display:flex;align-items:center}.vjs-p .player-volume-box{display:flex;flex-direction:row}.netless-app-media-player-container{display:flex;position:relative;height:100%}
`);const rt=document.createElement("div");if(rt.classList.add("netless-app-media-player-container"),d.render(l.createElement(te,{context:et}),rt),tt.mountContent(rt),et.emitter.on("destroy",()=>{console.log("[MediaPlayer]: destroy"),d.unmountComponentAtNode(rt)}),window.__pcmProxy){const nt=()=>{document.visibilityState==="hidden"?(console.log("[MediaPlayer]: visibilitychange -> hidden. unmount for pcmproxy"),d.unmountComponentAtNode(rt)):(console.log("[MediaPlayer]: visibilitychange -> visible. mount for pcmproxy"),d.render(l.createElement(te,{context:et}),rt))};document.addEventListener("visibilitychange",nt),et.emitter.on("destroy",()=>{document.removeEventListener("visibilitychange",nt)})}}},setupBuiltin=()=>{WindowManager.debug&&v({verbose:!0}),WindowManager.register({kind:NetlessAppDocsViewer.kind,src:NetlessAppDocsViewer}),WindowManager.register({kind:se.kind,src:se})},BuiltinApps={DocsViewer:NetlessAppDocsViewer.kind,MediaPlayer:se.kind},RefreshIDs={Ready:"Ready",RootRect:"ReplayRootRect",Message:"message",ComputeStyle:"computeStyle",Load:"load",DisplayerState:"displayerState",Show:"show",Hide:"hide"},times=(et,_e)=>new Array(et).fill(0).map((tt,rt)=>_e(rt)),_IframeBridge=class{constructor(et,_e){this.manager=et,this.appManager=_e,this.magixEventMap=new Map,this.cssList=[],this.allowAppliances=["clicker"],this.bridgeDisposer=lodashExports.noop,this.rootRect=null,this.sideEffectManager=new o$2,this.execListenIframe=lodashExports.debounce(tt=>{this.listenIframe(tt)},50),this.onPhaseChangedListener=tt=>{tt===whiteWebSdkExports.PlayerPhase.Playing&&this.computedStyleAndIframeDisplay()},this.stateChangeListener=tt=>{tt={...tt},tt.cameraState=this.manager.cameraState,this.postMessage({kind:"RoomStateChanged",payload:tt}),tt.cameraState&&(_IframeBridge.emitter.emit("GetRootRect"),this.computedStyle(tt)),tt.memberState&&(this.computedZindex(),this.updateStyle()),tt.sceneState&&this.computedIframeDisplay(tt,this.attributes)},this.displayer=_IframeBridge.displayer=_e.displayer,this.iframe=this._createIframe(),this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("ReplayRootRect",tt=>{this.rootRect=tt}),RefreshIDs.RootRect),this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("HideIframe",()=>{this.iframe.className=_IframeBridge.hiddenClass}),RefreshIDs.Hide),this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("DispayIframe",()=>{this.iframe.className=""}),RefreshIDs.Show),this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("created",()=>{this.bridgeDisposer(),this.bridgeDisposer=whiteWebSdkExports.autorun(()=>{var tt;const rt=this.attributes;if(rt.url){const nt=(tt=this.iframe)==null?void 0:tt.src;nt&&nt!==rt.url&&this.execListenIframe(rt)}rt.displaySceneDir&&this.computedIframeDisplay(this.displayer.state,rt),(rt.width||rt.height)&&this.iframe&&(this.iframe.width=`${rt.width}px`,this.iframe.height=`${rt.height}px`),this.postMessage({kind:"AttributesUpdate",payload:rt})})})),this.sideEffectManager.addDisposer(et.emitter.on("cameraStateChange",()=>{this.computedStyle(this.displayer.state)})),_IframeBridge.onCreate(this)}static onCreate(et){_IframeBridge.emitter.emit("StartCreate"),_IframeBridge.emitter.emit("OnCreate",et),_IframeBridge.emitter.emit("created")}insert(et){const _e={url:et.url,width:et.width,height:et.height,displaySceneDir:et.displaySceneDir,useClicker:et.useClicker||!1,useSelector:et.useSelector};this.setAttributes(_e);const tt=()=>{this.getIframe(),this.listenIframe(this.attributes),this.listenDisplayerState(),_IframeBridge.emitter.emit("GetRootRect")};if(this.getIframe())tt();else{const rt=this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("WrapperDidMount",()=>{tt(),this.sideEffectManager.flush(rt)})),nt=this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("WrapperDidUpdate",()=>{tt(),this.sideEffectManager.flush(nt)}))}return this.attributes.useSelector&&this.allowAppliances.push("selector"),this.computedStyle(this.displayer.state),this.listenDisplayerCallbacks(),this.getComputedIframeStyle(),this.sideEffectManager.addEventListener(window,"message",this.messageListener.bind(this),void 0,RefreshIDs.Message),_IframeBridge.alreadyCreate=!0,this}getComputedIframeStyle(){this.sideEffectManager.setTimeout(()=>{this.iframe&&getComputedStyle(this.iframe)},200,RefreshIDs.ComputeStyle)}destroy(){this.sideEffectManager.flushAll(),_IframeBridge.emitter.emit("Destory"),_IframeBridge.alreadyCreate=!1,_IframeBridge.emitter.clearListeners()}getIframe(){return this.iframe||(this.iframe=this._createIframe()),this.iframe}setIframeSize(et){this.iframe&&(this.iframe.width=`${et.width}px`,this.iframe.height=`${et.height}px`,this.setAttributes({width:et.width,height:et.height}))}get attributes(){return this.appManager.store.getIframeBridge()}setAttributes(et){this.appManager.store.setIframeBridge(et)}_createIframe(){const et=document.createElement("iframe");return et.id="IframeBridge",et.className=_IframeBridge.hiddenClass,this.appManager.mainView.divElement&&this.appManager.mainView.divElement.appendChild(et),et}scaleIframeToFit(et=whiteWebSdkExports.AnimationMode.Immediately){if(!this.inDisplaySceneDir)return;const{width:_e=1280,height:tt=720}=this.attributes,rt=_e?-_e/2:0,nt=tt?-tt/2:0;this.manager.moveCameraToContain({originX:rt,originY:nt,width:_e,height:tt,animationMode:et})}get isReplay(){return this.manager.isReplay}handleSetPage(et){if(this.isReplay||!this.attributes.displaySceneDir)return;const _e=et.payload,tt=this.displayer,rt=tt.entireScenes()[this.attributes.displaySceneDir];if(!rt||rt.length!==_e){const nt=times(_e,st=>({name:String(st+1)}));tt.putScenes(this.attributes.displaySceneDir,nt),this.manager.setMainViewScenePath(this.attributes.displaySceneDir)}}listenIframe(et){const _e=tt=>{var rt;this.postMessage({kind:"Init",payload:{attributes:this.attributes,roomState:(rt=_IframeBridge.displayer)==null?void 0:rt.state,currentPage:this.currentPage,observerId:this.displayer.observerId}}),_IframeBridge.emitter.emit("IframeLoad",tt),this.sideEffectManager.addDisposer(_IframeBridge.emitter.on("Ready",()=>{var nt;this.postMessage((nt=this.attributes.lastEvent)==null?void 0:nt.payload)}),RefreshIDs.Ready),this.computedStyleAndIframeDisplay()};et.url&&this.iframe.src!==et.url&&(this.src_url_equal_anchor||(this.src_url_equal_anchor=document.createElement("a")),this.src_url_equal_anchor.href=et.url,this.src_url_equal_anchor.href!==this.iframe.src&&(this.iframe.src=et.url)),this.iframe.width=`${et.width}px`,this.iframe.height=`${et.height}px`,this.sideEffectManager.addEventListener(this.iframe,"load",_e,void 0,RefreshIDs.Load)}listenDisplayerState(){this.isReplay&&(this.displayer._phase===whiteWebSdkExports.PlayerPhase.Playing&&this.computedStyleAndIframeDisplay(),this.sideEffectManager.add(()=>(this.displayer.callbacks.on("onPhaseChanged",this.onPhaseChangedListener),()=>this.displayer.callbacks.off("onPhaseChanged",this.onPhaseChangedListener)),RefreshIDs.DisplayerState)),this.computedStyleAndIframeDisplay()}computedStyleAndIframeDisplay(){this.computedStyle(this.displayer.state),this.computedIframeDisplay(this.displayer.state,this.attributes)}listenDisplayerCallbacks(){this.displayer.callbacks.on(this.callbackName,this.stateChangeListener)}get callbackName(){return this.isReplay?"onPlayerStateChanged":"onRoomStateChanged"}computedStyle(et){const _e=this.manager.cameraState,tt=this.attributes.width||1280,rt=this.attributes.height||720;if(this.iframe){const{width:nt,height:st,scale:dt,centerX:ft,centerY:ht}=_e,mt=this.rootRect||{x:0,y:0},bt=`${nt/2+mt.x}px`,St=`${st/2+mt.y}px`,Et=`transform-origin: ${bt} ${St};`,Ct=(nt-tt)/2*dt,Rt=(st-rt)/2*dt,Tt=-(ft*dt)+Ct,wt=-(ht*dt)+Rt,At=`transform: translate(${Tt}px,${wt}px) scale(${dt}, ${dt});`,qt=["position: absolute;","border: 0.1px solid rgba(0,0,0,0);","top: 0px;","left: 0px;",Et,At];this.cssList=qt,this.computedZindex(),this.updateStyle()}}computedIframeDisplay(et,_e){this.inDisplaySceneDir?_IframeBridge.emitter.emit("DispayIframe"):_IframeBridge.emitter.emit("HideIframe")}computedZindex(){const et="z-index: -1;",_e=this.cssList.findIndex(tt=>tt===et);_e!==-1&&this.cssList.splice(_e,1),(!this.isClicker()||this.isDisableInput)&&this.cssList.push(et)}updateStyle(){this.iframe.style.cssText=this.cssList.join(" ")}get iframeOrigin(){if(this.iframe)try{return new URL(this.iframe.src).origin}catch(et){console.warn(et)}}messageListener(et){if(log$1("<<<",JSON.stringify(et.data)),et.origin!==this.iframeOrigin)return;const _e=et.data;switch(_e.kind){case"SetAttributes":{this.handleSetAttributes(_e);break}case"RegisterMagixEvent":{this.handleRegisterMagixEvent(_e);break}case"RemoveMagixEvent":{this.handleRemoveMagixEvent(_e);break}case"DispatchMagixEvent":{this.handleDispatchMagixEvent(_e);break}case"RemoveAllMagixEvent":{this.handleRemoveAllMagixEvent();break}case"NextPage":{this.handleNextPage();break}case"PrevPage":{this.handlePrevPage();break}case"SDKCreate":{this.handleSDKCreate();break}case"SetPage":{this.handleSetPage(_e);break}case"GetAttributes":{this.handleGetAttributes();break}case"PageTo":{this.handlePageTo(_e);break}default:{log$1(`${_e.kind} not allow event.`);break}}}handleSDKCreate(){this.postMessage({kind:"Init",payload:{attributes:this.attributes,roomState:this.displayer.state,currentPage:this.currentPage,observerId:this.displayer.observerId}})}handleDispatchMagixEvent(et){const _e=et.payload;this.appManager.safeDispatchMagixEvent(_e.event,_e.payload)}handleSetAttributes(et){this.setAttributes(et.payload)}handleRegisterMagixEvent(et){const _e=et.payload,tt=rt=>{rt.authorId!==this.displayer.observerId&&this.postMessage({kind:"ReciveMagixEvent",payload:rt})};this.magixEventMap.set(_e,tt),this.displayer.addMagixEventListener(_e,tt)}handleRemoveMagixEvent(et){const _e=et.payload,tt=this.magixEventMap.get(_e);this.displayer.removeMagixEventListener(_e,tt)}handleNextPage(){this.manager.canOperate&&(this.manager.nextPage(),this.dispatchMagixEvent("NextPage",{}))}handlePrevPage(){this.manager.canOperate&&(this.manager.prevPage(),this.dispatchMagixEvent("PrevPage",{}))}handlePageTo(et){if(this.manager.canOperate){const _e=et.payload;if(!Number.isSafeInteger(_e)||_e<=0)return;this.manager.setMainViewSceneIndex(_e-1),this.dispatchMagixEvent("PageTo",_e-1)}}handleRemoveAllMagixEvent(){this.magixEventMap.forEach((et,_e)=>{this.displayer.removeMagixEventListener(_e,et)}),this.magixEventMap.clear()}handleGetAttributes(){this.postMessage({kind:"GetAttributes",payload:this.attributes})}postMessage(et){var _e;this.iframe&&((_e=this.iframe.contentWindow)==null||_e.postMessage(JSON.parse(JSON.stringify(et)),"*"))}dispatchMagixEvent(et,_e){this.manager.canOperate&&(this.setAttributes({lastEvent:{name:et,payload:_e}}),this.displayer.dispatchMagixEvent(et,_e))}get currentIndex(){return this.manager.mainViewSceneIndex}get currentPage(){return this.currentIndex+1}get totalPage(){return this.manager.mainViewScenesLength}get readonly(){return!this.displayer.isWritable}get inDisplaySceneDir(){return this.manager.mainViewSceneDir===this.attributes.displaySceneDir}isClicker(){if(this.readonly)return!1;const et=this.displayer.state.memberState.currentApplianceName;return this.allowAppliances.includes(et)}get isDisableInput(){return"disableDeviceInputs"in this.displayer?this.displayer.disableDeviceInputs:!0}};let IframeBridge=_IframeBridge;IframeBridge.kind="IframeBridge";IframeBridge.hiddenClass="netless-iframe-brdige-hidden";IframeBridge.emitter=new Emittery;IframeBridge.displayer=null;IframeBridge.alreadyCreate=!1;class ExtendPluginManager{constructor(_e){this.extends=new Map,this.context={manager:this,windowManager:_e.windowManager,internalEmitter:_e.internalEmitter},_e.container&&this.refreshContainer(_e.container)}refreshContainer(_e){this.context.windowManagerContainer=_e,this.extends.forEach(tt=>{tt._inject(this.context)})}hasRegister(_e){return appRegister.appClasses.has(_e)}use(_e){this.extends.set(_e.kind,_e),_e._inject(this.context),_e.onCreate()}destroy(){this.extends.forEach(_e=>{this.extends.delete(_e.kind),_e.onDestroy()})}}const reconnectRefresher=new ReconnectRefresher({emitter:internalEmitter}),_WindowManager=class extends whiteWebSdkExports.InvisiblePlugin{constructor(et){super(et),this.version="1.0.8",this.dependencies={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"0.3.0-beta.14",emittery:"^0.9.2",lodash:"^4.17.21","p-retry":"^4.6.1",uuid:"^7.0.3","video.js":">=7"},peerDependencies:{jspdf:"2.5.1","white-web-sdk":"^2.16.52"},devDependencies:{"@hyrious/dts":"^0.2.2","@netless/app-docs-viewer":"^0.2.19","@netless/app-media-player":"0.1.4","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"1.0.0-next.30","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",jspdf:"^2.5.1",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1","side-effect-manager":"0.1.5",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.9.9",vitest:"^0.14.1","white-web-sdk":"^2.16.52"}},this.emitter=callbacks$1,this.viewMode=whiteWebSdkExports.ViewMode.Broadcaster,this.isReplay=whiteWebSdkExports.isPlayer(this.displayer),this._cursorUIDs=[],this.containerSizeRatio=_WindowManager.containerSizeRatio,_WindowManager.displayer=et.displayer,window.NETLESS_DEPS={dependencies:{"@juggle/resize-observer":"^3.3.1","@netless/telebox-insider":"0.3.0-beta.14",emittery:"^0.9.2",lodash:"^4.17.21","p-retry":"^4.6.1",uuid:"^7.0.3","video.js":">=7"},peerDependencies:{jspdf:"2.5.1","white-web-sdk":"^2.16.52"},devDependencies:{"@hyrious/dts":"^0.2.2","@netless/app-docs-viewer":"^0.2.19","@netless/app-media-player":"0.1.4","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@rollup/plugin-url":"^6.1.0","@sveltejs/vite-plugin-svelte":"1.0.0-next.30","@tsconfig/svelte":"^2.0.1","@types/debug":"^4.1.7","@types/lodash":"^4.14.182","@types/lodash-es":"^4.17.4","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","@vitest/ui":"^0.14.1",cypress:"^8.7.0",dotenv:"^10.0.0",eslint:"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-svelte3":"^3.2.0",jsdom:"^19.0.0",jspdf:"^2.5.1",less:"^4.1.1",prettier:"^2.3.2","prettier-plugin-svelte":"^2.4.0","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-styles":"^3.14.1","side-effect-manager":"0.1.5",svelte:"^3.42.4",typescript:"^4.5.5",vite:"^2.9.9",vitest:"^0.14.1","white-web-sdk":"^2.16.52"}}}static onCreate(et){_WindowManager._resolve(et)}static async mount(et,_e){const tt=et.room;_WindowManager.container=et.container,_WindowManager.supportAppliancePlugin=et.supportAppliancePlugin;const rt=et.containerSizeRatio,nt=et.debug,st=et.cursor;_WindowManager.params=et,_WindowManager.extendClass=_e,_WindowManager.displayer=et.room,checkVersion();let dt;if(whiteWebSdkExports.isRoom(tt)){if(tt.phase!==whiteWebSdkExports.RoomPhase.Connected)throw new Error("[WindowManager]: Room only Connected can be mount");tt.phase===whiteWebSdkExports.RoomPhase.Connected&&tt.isWritable&&(tt.disableSerialization=!1),dt=await this.initManager(tt)}if(_WindowManager.isCreated)throw new Error("[WindowManager]: Already created cannot be created again");if(this.debug=!!nt,this.debug&&v({verbose:!0}),log$1("Already insert room",dt),whiteWebSdkExports.isRoom(this.displayer)){if(!dt)throw new Error("[WindowManager]: init InvisiblePlugin failed")}else await pRetry(async mt=>{if(dt=tt.getInvisiblePlugin(_WindowManager.kind),!dt)throw log$1(`manager is empty. retrying ${mt}`),new Error},{retries:10,maxTimeout:5e3});if(!dt)throw new Error("[WindowManager]: create manager failed");rt&&(_WindowManager.containerSizeRatio=rt),await dt.ensureAttributes();const ft=getExtendClass$1(AppManager,_WindowManager.extendClass),ht=getExtendClass$1(CursorManager,_WindowManager.extendClass);dt._fullscreen=et.fullscreen,dt.appManager=new ft(dt),dt.appManager.polling=et.polling||!1,dt._pageState=new PageStateImpl(dt.appManager),dt.cursorManager=new ht(dt.appManager,!!st,et.cursorOptions,et.applianceIcons),dt.extendPluginManager=new ExtendPluginManager({internalEmitter,windowManager:dt}),rt&&(dt.containerSizeRatio=rt),et.container&&dt.bindContainer(et.container),replaceRoomFunction(tt,dt),internalEmitter.emit("onCreated"),_WindowManager.isCreated=!0;try{await initDb()}catch(mt){console.warn("[WindowManager]: indexedDB open failed"),console.log(mt)}return dt}static initManager(et){return createInvisiblePlugin(et)}static initContainer(et,_e,tt){const{chessboard:rt,overwriteStyles:nt,fullscreen:st}=tt;_WindowManager.container||(_WindowManager.container=_e);const{playground:dt,wrapper:ft,sizer:ht,mainViewElement:mt}=setupWrapper(_e);if(_WindowManager.playground=dt,rt&&ht.classList.add("netless-window-manager-chess-sizer"),st&&ht.classList.add("netless-window-manager-fullscreen"),nt){const bt=document.createElement("style");bt.textContent=nt,dt.appendChild(bt)}return et.containerResizeObserver=ContainerResizeObserver.create(dt,ht,ft,internalEmitter),_WindowManager.wrapper=ft,_WindowManager.sizer=ht,mt}static get registered(){return appRegister.registered}bindContainer(et){var _e,tt,rt,nt,st,dt;if(whiteWebSdkExports.isRoom(this.displayer)&&this.room.phase!==whiteWebSdkExports.RoomPhase.Connected)throw new BindContainerRoomPhaseInvalidError;if(_WindowManager.isCreated&&_WindowManager.container)_WindowManager.container.firstChild&&et.appendChild(_WindowManager.container.firstChild);else if(_WindowManager.params){const ft=_WindowManager.params,ht=_WindowManager.initContainer(this,et,ft);this.boxManager&&this.boxManager.destroy();const mt=createBoxManager(this,callbacks$1,internalEmitter,boxEmitter,{collectorContainer:ft.collectorContainer,collectorStyles:ft.collectorStyles,prefersColorScheme:ft.prefersColorScheme,useBoxesStatus:ft.useBoxesStatus});this.boxManager=mt,this.appManager&&(this.appManager.useBoxesStatus=ft.useBoxesStatus||!1,this.appManager.setBoxManager(mt)),this.bindMainView(ht,ft.disableCameraTransform),_WindowManager.wrapper&&((_e=this.cursorManager)==null||_e.setupWrapper(_WindowManager.wrapper))}internalEmitter.emit("updateManagerRect"),(tt=this.appManager)==null||tt.refresh(),(rt=this.appManager)==null||rt.resetMaximized(),(nt=this.appManager)==null||nt.resetMinimized(),(st=this.appManager)==null||st.displayerWritableListener(!this.room.isWritable),_WindowManager.container=et,(dt=this.extendPluginManager)==null||dt.refreshContainer(et)}bindCollectorContainer(et){_WindowManager.isCreated&&this.boxManager?this.boxManager.setCollectorContainer(et):_WindowManager.params&&(_WindowManager.params.collectorContainer=et)}static register(et){return appRegister.register(et)}static unregister(et){return appRegister.unregister(et)}async addApp(et){if(this.appManager)return this.appManager.rootDirRemoving?new Promise((_e,tt)=>{internalEmitter.once("rootDirRemoved").then(async()=>{try{const rt=await this._addApp(et);_e(rt)}catch(rt){tt(rt.message)}})}):this._addApp(et);throw new AppManagerNotInitError}async _addApp(et){var _e,tt,rt;if(this.appManager){if(!et.kind||typeof et.kind!="string")throw new ParamsInvalidError;et.src&&typeof et.src=="string"&&appRegister.register({kind:et.kind,src:et.src});const nt=await((_e=appRegister.appClasses.get(et.kind))==null?void 0:_e());if(nt&&((tt=nt.config)!=null&&tt.singleton)&&this.appManager.appProxies.has(et.kind))throw new AppCreateError;const st=this.setupScenePath(et,this.appManager);return st===void 0?void 0:((rt=et?.options)!=null&&rt.scenePath&&(et.options.scenePath=ensureValidScenePath(et.options.scenePath)),await this.appManager.addApp(et,!!st))}else throw new AppManagerNotInitError}setupScenePath(et,_e){let tt=!1;if(et.options){const{scenePath:rt,scenes:nt}=et.options;if(rt){if(!isValidScenePath(rt))throw new InvalidScenePath;const st=Object.keys(this.apps||{});for(const dt of st){const ft=_e.store.getAppScenePath(dt);if(ft&&ft===rt){if(console.warn(`[WindowManager]: ScenePath "${rt}" already opened`),this.boxManager){const ht=this.boxManager.getTopBox();ht&&(this.boxManager.setZIndex(dt,ht.zIndex+1,!1),this.boxManager.focusBox({appId:dt},!1))}return}}}rt&&nt&&nt.length>0&&(this.isDynamicPPT(nt)?(tt=!0,entireScenes(this.displayer)[rt]||putScenes(this.room,rt,nt)):entireScenes(this.displayer)[rt]||putScenes(this.room,rt,[{name:nt[0].name}])),rt&&nt===void 0&&putScenes(this.room,rt,[{}])}return tt}async setMainViewScenePath(et){this.appManager&&await this.appManager.setMainViewScenePath(et)}async setMainViewSceneIndex(et){this.appManager&&await this.appManager.setMainViewSceneIndex(et)}async nextPage(){if(this.appManager){const et=this.mainViewSceneIndex+1;return et>=this.mainViewScenesLength?(console.warn("[WindowManager]: current page is the last page"),!1):(await this.appManager.setMainViewSceneIndex(et),!0)}else return!1}async prevPage(){if(this.appManager){const et=this.mainViewSceneIndex-1;return et<0?(console.warn("[WindowManager]: current page is the first page"),!1):(await this.appManager.setMainViewSceneIndex(et),!0)}else return!1}async jumpPage(et){return this.appManager?et<0||et>=this.pageState.length?(console.warn(`[WindowManager]: index ${et} out of range`),!1):(await this.appManager.setMainViewSceneIndex(et),!0):!1}async addPage(et){if(this.appManager){const _e=et?.after,tt=et?.scene;if(_e){const rt=this.mainViewSceneIndex+1;this.room.putScenes(ROOT_DIR,[tt||{}],rt)}else this.room.putScenes(ROOT_DIR,[tt||{}])}}async removePage(et){if(this.appManager){const _e=et===void 0?this.pageState.index:et;return this.pageState.length===1?(console.warn("[WindowManager]: can not remove the last page"),!1):_e<0||_e>=this.pageState.length?(console.warn(`[WindowManager]: index ${et} out of range`),!1):this.appManager.removeSceneByIndex(_e)}else return!1}getMainViewScenePath(){var et;return(et=this.appManager)==null?void 0:et.store.getMainViewScenePath()}getMainViewSceneIndex(){var et;return(et=this.appManager)==null?void 0:et.store.getMainViewSceneIndex()}setReadonly(et){var _e;this.readonly=et,(_e=this.boxManager)==null||_e.setReadonly(et),internalEmitter.emit("setReadonly",et)}switchMainViewToWriter(){var et;return(et=this.appManager)==null?void 0:et.mainViewProxy.mainViewClickHandler()}onAppDestroy(et,_e){addEmitterOnceListener(`destroy-${et}`,_e)}onAppEvent(et,_e){return internalEmitter.on(`custom-${et}`,_e)}setViewMode(et){var _e,tt,rt,nt;(et===whiteWebSdkExports.ViewMode.Broadcaster||et===whiteWebSdkExports.ViewMode.Follower)&&(this.canOperate&&et===whiteWebSdkExports.ViewMode.Broadcaster&&((_e=this.appManager)==null||_e.mainViewProxy.setCameraAndSize()),(tt=this.appManager)==null||tt.mainViewProxy.start()),et===whiteWebSdkExports.ViewMode.Freedom&&((rt=this.appManager)==null||rt.mainViewProxy.stop()),this.viewMode=et,(nt=this.appManager)==null||nt.mainViewProxy.setViewMode(et)}setBoxState(et){if(this.canOperate)switch(et){case"normal":this.setMaximized(!1),this.setMinimized(!1);break;case"maximized":this.setMaximized(!0),this.setMinimized(!1);break;case"minimized":this.setMinimized(!0);break}}setMaximized(et){var _e;this.canOperate&&((_e=this.boxManager)==null||_e.setMaximized(et,!1))}setMinimized(et){var _e;this.canOperate&&((_e=this.boxManager)==null||_e.setMinimized(et,!1))}setBoxStatus(et,_e){var tt;this.canOperate&&((tt=this.appManager)==null||tt.store.setBoxStatus(et,_e))}setLastNotMinimizedBoxStatus(et,_e){var tt;this.canOperate&&((tt=this.appManager)==null||tt.store.setLastNotMinimizedBoxStatus(et,_e))}setFullscreen(et){var _e;this._fullscreen!==et&&(this._fullscreen=et,(_e=_WindowManager.sizer)==null||_e.classList.toggle("netless-window-manager-fullscreen",et),callbacks$1.emit("fullscreenChange",et))}get cursorUIDs(){return this._cursorUIDs}setCursorUIDs(et){var _e,tt;if(this._cursorUIDs=et||[],this._cursorUIDs.length===0)(_e=this._cursorUIDsStyleDOM)==null||_e.remove();else{this._cursorUIDsStyleDOM||(this._cursorUIDsStyleDOM=document.createElement("style")),(tt=_WindowManager.playground)==null||tt.appendChild(this._cursorUIDsStyleDOM);let rt="[data-cursor-uid] { display: none }";for(const nt of this._cursorUIDs)rt+=`
[data-cursor-uid="${nt}"] { display: flex }`;this._cursorUIDsStyleDOM.textContent=rt}}get mainView(){if(this.appManager)return this.appManager.mainViewProxy.view;throw new AppManagerNotInitError}get camera(){if(this.appManager)return this.appManager.mainViewProxy.view.camera;throw new AppManagerNotInitError}get cameraState(){if(this.appManager)return this.appManager.mainViewProxy.cameraState;throw new AppManagerNotInitError}get apps(){var et;return(et=this.appManager)==null?void 0:et.store.apps()}get boxState(){var et;if(this.appManager)return(et=this.appManager.boxManager)==null?void 0:et.boxState;throw new AppManagerNotInitError}get boxStatus(){if(this.appManager)return this.appManager.store.getBoxesStatus();throw new AppManagerNotInitError}get lastNotMinimizedBoxStatus(){if(this.appManager)return this.appManager.store.getLastNotMinimizedBoxesStatus();throw new AppManagerNotInitError}get darkMode(){var et,_e;return!!((_e=(et=this.appManager)==null?void 0:et.boxManager)!=null&&_e.darkMode)}get prefersColorScheme(){var et;if(this.appManager)return(et=this.appManager.boxManager)==null?void 0:et.prefersColorScheme;throw new AppManagerNotInitError}get focused(){return this.attributes.focus}get focusedView(){var et,_e;return((_e=(et=this.appManager)==null?void 0:et.focusApp)==null?void 0:_e.view)||this.mainView}get polling(){var et;return((et=this.appManager)==null?void 0:et.polling)||!1}set polling(et){this.appManager&&(this.appManager.polling=et)}get cursorStyle(){var et;return((et=this.cursorManager)==null?void 0:et.style)||"default"}set cursorStyle(et){if(!this.cursorManager)throw new Error("[WindowManager]: cursor is not enabled, please set { cursor: true }.");this.cursorManager.style=et}get mainViewSceneIndex(){var et;return((et=this._pageState)==null?void 0:et.index)||0}get mainViewSceneDir(){var et;if(this.appManager)return(et=this.appManager)==null?void 0:et.getMainViewSceneDir();throw new AppManagerNotInitError}get topApp(){var et,_e;return(_e=(et=this.boxManager)==null?void 0:et.getTopBox())==null?void 0:_e.id}get mainViewScenesLength(){var et;return((et=this._pageState)==null?void 0:et.length)||0}get canRedoSteps(){var et;return((et=this.focusedView)==null?void 0:et.canRedoSteps)||0}get canUndoSteps(){var et;return((et=this.focusedView)==null?void 0:et.canUndoSteps)||0}get sceneState(){if(this.appManager)return this.appManager.sceneState;throw new AppManagerNotInitError}get pageState(){if(this._pageState)return this._pageState.toObject();throw new AppManagerNotInitError}get fullscreen(){return!!this._fullscreen}queryAll(){var et;return Array.from(((et=this.appManager)==null?void 0:et.appProxies.values())||[])}queryOne(et){var _e;return(_e=this.appManager)==null?void 0:_e.appProxies.get(et)}async closeApp(et){var _e;return(_e=this.appManager)==null?void 0:_e.closeApp(et)}focusApp(et){var _e,tt,rt;const nt=(_e=this.boxManager)==null?void 0:_e.getBox(et);nt&&((tt=this.boxManager)==null||tt.focusBox({appId:et},!1),((rt=this.boxManager)==null?void 0:rt.teleBoxManager).makeBoxTop(nt,!1))}moveCamera(et){const _e=lodashExports.omit(et,["animationMode"]),tt={...this.mainView.camera};lodashExports.isEqual({...tt,..._e},tt)||(this.mainView.moveCamera(et),setTimeout(()=>{var rt;(rt=this.appManager)==null||rt.mainViewProxy.setCameraAndSize()},500))}moveCameraToContain(et){this.mainView.moveCameraToContain(et),setTimeout(()=>{var _e;(_e=this.appManager)==null||_e.mainViewProxy.setCameraAndSize()},500)}convertToPointInWorld(et){return this.mainView.convertToPointInWorld(et)}setCameraBound(et){this.mainView.setCameraBound(et)}onDestroy(){this._destroy()}destroy(){this._destroy()}_destroy(){var et,_e,tt,rt,nt,st;(et=this.containerResizeObserver)==null||et.disconnect(),(_e=this.appManager)==null||_e.destroy(),(tt=this.cursorManager)==null||tt.destroy(),(rt=this.extendPluginManager)==null||rt.destroy(),_WindowManager.container=void 0,_WindowManager.wrapper=void 0,_WindowManager.sizer=void 0,_WindowManager.isCreated=!1,_WindowManager.playground&&((nt=_WindowManager.playground.parentNode)==null||nt.removeChild(_WindowManager.playground)),_WindowManager.params=void 0,(st=this._iframeBridge)==null||st.destroy(),this._iframeBridge=void 0,log$1("Destroyed")}bindMainView(et,_e){var tt;this.appManager&&(this.appManager.bindMainView(et,!!_e),(tt=this.cursorManager)==null||tt.setMainViewDivElement(et))}get canOperate(){return whiteWebSdkExports.isRoom(this.displayer)?this.displayer.isWritable&&this.displayer.phase===whiteWebSdkExports.RoomPhase.Connected:!1}get room(){return this.displayer}safeSetAttributes(et){this.canOperate&&this.setAttributes(et)}safeUpdateAttributes(et,_e){this.canOperate&&this.updateAttributes(et,_e)}setPrefersColorScheme(et){var _e,tt;(tt=(_e=this.appManager)==null?void 0:_e.boxManager)==null||tt.setPrefersColorScheme(et)}cleanCurrentScene(){var et;log$1("clean current scene"),(et=this.focusedView)==null||et.cleanCurrentScene()}redo(){var et;return((et=this.focusedView)==null?void 0:et.redo())||0}undo(){var et;return((et=this.focusedView)==null?void 0:et.undo())||0}delete(){var et;(et=this.focusedView)==null||et.delete()}copy(){var et;(et=this.focusedView)==null||et.copy()}paste(){var et;(et=this.focusedView)==null||et.paste()}duplicate(){var et;(et=this.focusedView)==null||et.duplicate()}insertText(et,_e,tt){var rt;return((rt=this.focusedView)==null?void 0:rt.insertText(et,_e,tt))||""}insertImage(et){var _e;return(_e=this.focusedView)==null?void 0:_e.insertImage(et)}completeImageUpload(et,_e){var tt;return(tt=this.focusedView)==null?void 0:tt.completeImageUpload(et,_e)}lockImage(et,_e){var tt;return(tt=this.focusedView)==null?void 0:tt.lockImage(et,_e)}lockImages(et){var _e;return(_e=this.focusedView)==null?void 0:_e.lockImages(et)}refresh(){var et;this._refresh(),(et=this.appManager)==null||et.dispatchInternalEvent(Events.Refresh)}_refresh(){var et,_e;(et=this.appManager)==null||et.mainViewProxy.rebind(),_WindowManager.container&&this.bindContainer(_WindowManager.container),(_e=this.appManager)==null||_e.refresher.refresh()}setContainerSizeRatio(et){if(!lodashExports.isNumber(et)||!(et>0))throw new Error(`[WindowManager]: updateContainerSizeRatio error, ratio must be a positive number. but got ${et}`);_WindowManager.containerSizeRatio=et,this.containerSizeRatio=et,internalEmitter.emit("containerSizeRatioUpdate",et)}isDynamicPPT(et){var _e,tt;const rt=(tt=(_e=et[0])==null?void 0:_e.ppt)==null?void 0:tt.src;return rt?.startsWith("pptx://")}async ensureAttributes(){lodashExports.isNull(this.attributes)&&await wait(50),lodashExports.isObject(this.attributes)&&(this.attributes[Fields.Apps]||this.safeSetAttributes({[Fields.Apps]:{}}),this.attributes[Fields.Cursors]||this.safeSetAttributes({[Fields.Cursors]:{}}),this.attributes._mainScenePath||this.safeSetAttributes({_mainScenePath:INIT_DIR}),this.attributes._mainSceneIndex||this.safeSetAttributes({_mainSceneIndex:0}),this.attributes[Fields.Registered]||this.safeSetAttributes({[Fields.Registered]:{}}),this.attributes[Fields.IframeBridge]||this.safeSetAttributes({[Fields.IframeBridge]:{}}))}getIframeBridge(){if(!this.appManager)throw new Error("[WindowManager]: should call getIframeBridge() after await mount()");return this._iframeBridge||(this._iframeBridge=new IframeBridge(this,this.appManager)),this._iframeBridge}useExtendPlugin(et){var _e;(_e=this.extendPluginManager)==null||_e.use(et)}};let WindowManager=_WindowManager;WindowManager.kind="WindowManager";WindowManager.debug=!1;WindowManager.containerSizeRatio=DEFAULT_CONTAINER_RATIO;WindowManager.isCreated=!1;WindowManager._resolve=et=>{};setupBuiltin();var ANY_EVENT=Symbol.for("$ANY_EVENT$"),tryCall=(et,_e)=>{try{return et(_e)}catch(tt){console.error(tt)}},noop$3=()=>{},startRelay=(et,_e)=>{et.a=tryCall(et.c,_e)||noop$3},tryStartAllRelay=(et,_e)=>{for(const tt of et)tt.a||(tt.b===ANY_EVENT||_e.has(tt.b)||_e.has(ANY_EVENT))&&startRelay(tt,_e)},stopRelay=et=>{et.a&&(tryCall(et.a),et.a=null)},tryStopAllRelay=(et,_e)=>{for(const tt of et)tt.a&&(tt.b===ANY_EVENT?!_e.has():!_e.has(ANY_EVENT)&&!_e.has(tt.b))&&stopRelay(tt)},invoke$3=et=>{try{et()}catch(_e){console.error(_e)}},abortable=et=>{const _e=()=>{et&&(invoke$3(et),et=null),_e.abortable()};return _e.dispose=_e,_e.abortable=abortable$abortable,_e};function abortable$abortable(et){this._o&&invoke$3(this._o),this._o=et}var Remitter=class{ANY_EVENT=ANY_EVENT;#e=new Map;#t;#r;emit(et,_e){const tt=this.#e.get(et);if(tt)for(const rt of tt)tryCall(rt,_e);et!==ANY_EVENT&&this.has(ANY_EVENT)&&this.emit(ANY_EVENT,{event:et,data:_e})}on(et,_e){let tt=this.#e.get(et);return tt||(tt=new Set,this.#e.set(et,tt)),tt.add(_e),this.#t&&tt.size===1&&tryStartAllRelay(this.#t,this),()=>{this.off(et,_e)}}onAny(et){return this.on(ANY_EVENT,et)}once(et,_e){const tt=abortable(()=>this.off(et,rt)),rt=nt=>(tt(),_e(nt));return(this.#r||(this.#r=new WeakMap)).set(_e,rt),this.on(et,rt),tt}onceAny(et){return this.once(ANY_EVENT,et)}off(et,_e){const tt=this.#e.get(et);if(tt){let rt=tt.delete(_e);const nt=this.#r?.get(_e);return nt&&(rt=tt.delete(nt)||rt),tt.size<=0&&(this.#e.delete(et),this.#t&&tryStopAllRelay(this.#t,this)),rt}return!1}offAny(et){return this.off(ANY_EVENT,et)}clear(et){et?this.#e.get(et)?.clear():this.#e.clear(),this.#t&&tryStopAllRelay(this.#t,this)}has(et){if(et)return this.#e.get(et)?.size>0;for(const _e of this.#e.values())if(_e.size>0)return!0;return!1}count(et){if(et)return this.#e.get(et)?.size||0;{let _e=0;for(const tt of this.#e.values())_e+=tt.size;return _e}}remit(et,_e){const tt={c:_e,b:et};return(this.#t||(this.#t=new Set)).add(tt),(et===ANY_EVENT?this.has():this.has(et)||this.has(ANY_EVENT))&&startRelay(tt,this),()=>{this.#t?.delete(tt),stopRelay(tt)}}remitAny(et){return this.remit(ANY_EVENT,et)}dispose(){this.clear(),this.#t?.clear()}},SOUP$2="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",SOUP_LEN$2=87,ID_LEN$2=20,reusedIdCarrier$2=[],genUID$2=()=>{for(let et=0;et<ID_LEN$2;et++)reusedIdCarrier$2[et]=SOUP$2.charAt(Math.random()*SOUP_LEN$2);return reusedIdCarrier$2.join("")};function invoke$2(et){try{return et()}catch(_e){console.error(_e)}}var SideEffectManager$1=class{constructor(){this.push=this.addDisposer,this.disposers=new Map}addDisposer(_e,tt=this.genUID()){return this.flush(tt),this.disposers.set(tt,Array.isArray(_e)?joinDisposers$1(_e):_e),tt}add(_e,tt=this.genUID()){const rt=_e();return rt?this.addDisposer(rt,tt):tt}addEventListener(_e,tt,rt,nt,st=this.genUID()){return _e.addEventListener(tt,rt,nt),this.addDisposer(()=>_e.removeEventListener(tt,rt,nt),st),st}setTimeout(_e,tt,rt=this.genUID()){const nt=window.setTimeout(()=>{this.remove(rt),_e()},tt);return this.addDisposer(()=>window.clearTimeout(nt),rt)}setInterval(_e,tt,rt=this.genUID()){const nt=window.setInterval(_e,tt);return this.addDisposer(()=>window.clearInterval(nt),rt)}remove(_e){const tt=this.disposers.get(_e);return this.disposers.delete(_e),tt}flush(_e){const tt=this.remove(_e);tt&&tt()}flushAll(){this.disposers.forEach(invoke$2),this.disposers.clear()}genUID(){let _e;do _e=genUID$2();while(this.disposers.has(_e));return _e}};function joinDisposers$1(et){return()=>et.forEach(invoke$2)}var identity=et=>et,defaultEqual=Object.is,valInputsEqual=(et,_e)=>{if(et.length!==_e.length)return!1;for(let tt=et.length-1;tt>=0;tt--)if(!et[tt].equal(et[tt].value,_e[tt]))return!1;return!0},getValue=et=>et.value,getValues=et=>et.map(getValue),invoke$1=(et,_e)=>{try{et(_e)}catch(tt){console.error(tt)}},INIT_VALUE={},nextTick=Promise.resolve(),pendingSubs1=new Set,pendingSubs2=new Set,pendingSubs=pendingSubs1,pending,flush=()=>{const et=pendingSubs;pendingSubs=pendingSubs===pendingSubs1?pendingSubs2:pendingSubs1,pending=!1;for(const _e of et)_e.exec(1);et.clear()},schedule=et=>{pendingSubs.add(et),pending=pending||nextTick.then(flush)},cancelTask=et=>pendingSubs.delete(et),Subscribers=class{constructor(et,_e){this.#t=et,this.#i=_e}dirty=!1;notify(){this.#r.clear(),this.subs.size>0?(this.exec(3),this.exec(2),this[1]>0&&schedule(this)):this.dirty=!1}add(et,_e){this.#i&&this.subs.size<=0&&(this.#n=this.#i(this));const tt=this.subs.get(et);return tt&&this[tt]--,this.#r.add(et),this.subs.set(et,_e),this[_e]++,()=>this.remove(et)}remove(et){this.#r.delete(et);const _e=this.subs.get(et);_e&&(this.subs.delete(et),this[_e]--,this.subs.size<=0&&this.#e())}clear(){this.subs.clear(),this.#r.clear(),this[1]=this[2]=this[3]=0,cancelTask(this),this.#e()}exec(et){if(this[et]>0){let _e;if(et===3)this[1]+this[2]<=0&&(this.dirty=!1);else{if(_e=this.#t(),!this.dirty)return;(et===1||this[1]<=0)&&(this.dirty=!1)}for(const[tt,rt]of this.subs)rt===et&&!this.#r.has(tt)&&invoke$1(tt,_e)}}subs=new Map;#e(){this.#n&&(this.#n=this.#n())}#t;1=0;2=0;3=0;#r=new Set;#i;#n},ReadonlyValImpl=class{_subs;#e;constructor(et,{equal:_e,compare:tt,eager:rt}={},nt){this.get=et,this.compare=this.equal=_e||tt||defaultEqual,this.#e=rt,this._subs=new Subscribers(et,nt)}get value(){return this.get()}get;equal;compare;reaction(et,_e=this.#e){return this._subs.add(et,_e?2:1)}subscribe(et,_e=this.#e){const tt=this.reaction(et,_e);return invoke$1(et,this.value),this._subs.dirty=!1,tt}$valCompute(et){return this._subs.add(et,3)}unsubscribe(et){et?this._subs.remove(et):this._subs.clear()}dispose(){this._subs.clear()}toString(){return String(this.value)}toJSON(et){const _e=this.value;return _e&&_e.toJSON?_e.toJSON(et):_e}},FromImpl=class extends ReadonlyValImpl{constructor(et,_e,tt){let rt=INIT_VALUE,nt=!1,st=!1;const dt=()=>{if(rt===INIT_VALUE||this._subs.subs.size<=0)rt=et();else if(nt){const ht=et();this.equal(ht,rt)||(this._subs.dirty=!0,rt=ht)}return nt=st=!1,rt},ft=()=>{nt=!0,st||(st=!0,this._subs.notify())};super(dt,tt,()=>{const ht=_e(ft);return rt=et(),nt=st=!1,ht})}},from=(et,_e,tt)=>new FromImpl(et,_e,tt);function combine(et,_e=identity,tt){let rt,nt=INIT_VALUE;return from(()=>nt!==INIT_VALUE&&valInputsEqual(et,nt)?rt:rt=_e(nt=getValues(et)),st=>{const dt=et.map(ft=>ft.$valCompute(st));return()=>dt.forEach(invoke$1)},tt)}var ValImpl=class extends ReadonlyValImpl{constructor(et,_e){const tt=()=>et;super(tt,_e),this.set=rt=>{this.equal(rt,et)||(this._subs.dirty=!0,et=rt,this._subs.notify())}}set;get value(){return this.get()}set value(et){this.set(et)}};function val(et,_e){return new ValImpl(et,_e)}var setValue=(et,_e)=>et.set?.(_e),subscribe=(et,_e,tt)=>et.subscribe(_e,tt),reaction=(et,_e,tt)=>et.reaction(_e,tt),unsubscribe=(et,_e)=>et.unsubscribe(_e),__defProp$1=Object.defineProperty,__defNormalProp$1=(et,_e,tt)=>_e in et?__defProp$1(et,_e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):et[_e]=tt,__publicField$1=(et,_e,tt)=>(__defNormalProp$1(et,typeof _e!="symbol"?_e+"":_e,tt),tt);const isObject=et=>typeof et=="object"&&et!==null,objHas=Object.prototype.hasOwnProperty,has=(et,_e)=>objHas.call(et,_e),plainObjectKeys=Object.keys,REFINE_KEY="__IsReFiNe";function isRefineValue(et){return isObject(et)&&et[REFINE_KEY]===1}function makeRefineValue(et,_e=genUID$2()){return{[REFINE_KEY]:1,k:_e,v:et}}class Refine{constructor(_e,tt){__publicField$1(this,"state"),__publicField$1(this,"refMap",new Map),__publicField$1(this,"refKeys",new Set),__publicField$1(this,"genKey",()=>{let rt;do rt=genUID$2();while(this.refKeys.has(rt));return this.refKeys.add(rt),rt}),this.state={},this.replaceState(_e||tt||{})}replaceState(_e){if(!isObject(_e))throw new Error("[SyncedStore] replaceState: state must be an object");const tt={};let rt=!1;return new Set([...plainObjectKeys(this.state),...plainObjectKeys(_e)]).forEach(st=>{const dt=this.setValue(st,_e[st]);dt&&(rt=!0,tt[st]=dt)}),rt?tt:null}toRefState(){return plainObjectKeys(this.state).reduce((_e,tt)=>(_e[tt]=this.toRefValue(this.state[tt]),_e),{})}setValue(_e,tt){if(isObject(tt)){const rt=this.ensureRefValue(tt);if(this.state[_e]!==rt.v){const nt=this.deleteRefKey(_e);return this.state[_e]=rt.v,{oldValue:nt,newValue:rt.v}}}else if(typeof tt>"u"){if(has(this.state,_e)){const rt=this.deleteRefKey(_e);return delete this.state[_e],{oldValue:rt,newValue:void 0}}}else{const rt=tt;if(this.state[_e]!==rt){const nt=this.deleteRefKey(_e);return this.state[_e]=rt,{oldValue:nt,newValue:rt}}}return null}toRefValue(_e){return isObject(_e)?this.ensureRefValue(_e):_e}ensureRefValue(_e){if(isRefineValue(_e))return this.refMap.set(_e.v,_e),_e;let tt=this.refMap.get(_e);return tt||(tt=makeRefineValue(_e,this.genKey()),this.refMap.set(_e,tt)),this.refKeys.add(tt.k),tt}deleteRefKey(_e){const tt=this.state[_e],rt=this.refMap.get(tt);return rt&&this.refKeys.delete(rt.k),tt}}const STORAGE_NS="_WM-StOrAgE_",MAIN_STORAGE="_WM-MaIn-StOrAgE_";class Storage{constructor({plugin$:_e,isWritable$:tt,namespace:rt=MAIN_STORAGE,defaultState:nt={}}){if(__publicField$1(this,"namespace"),__publicField$1(this,"defaultState"),__publicField$1(this,"_plugin$"),__publicField$1(this,"_isWritable$"),__publicField$1(this,"_refine"),__publicField$1(this,"_sideEffect",new SideEffectManager$1),__publicField$1(this,"_events",new Remitter),__publicField$1(this,"on"),__publicField$1(this,"off"),__publicField$1(this,"_disconnected",!1),nt&&!isObject(nt))throw new Error(`Default state for Storage ${rt} is not an object.`);this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events);const st=()=>{var St,Et;return(Et=(St=_e.value)==null?void 0:St.attributes[STORAGE_NS])==null?void 0:Et[rt]};this.namespace=rt,this.defaultState=nt,this._plugin$=_e,this._isWritable$=tt,this._refine=new Refine(whiteWebSdkExports.toJS(st()),nt);const dt=St=>{St&&this._events.emit("stateChanged",St)},ft=St=>subscribe(tt,Et=>{Et&&(isObject(St.attributes[STORAGE_NS])||St.updateAttributes([STORAGE_NS],{}),isObject(whiteWebSdkExports.toJS(st()))||St.updateAttributes([STORAGE_NS,rt],this._refine.toRefState()))}),ht=St=>{const Et=Ct=>{if(Ct.length<=0)return;const Rt={};let Tt=!1;for(let wt=0;wt<Ct.length;wt++){const At=Ct[wt],Nt=At.key;if(Nt===STORAGE_NS)continue;const Pt=whiteWebSdkExports.toJS(At.value),It=this._refine.setValue(Nt,Pt);It&&(Tt=!0,Rt[Nt]=It)}Tt&&dt(Rt)};return whiteWebSdkExports.listenUpdated(St,Et),()=>whiteWebSdkExports.unlistenUpdated(St,Et)},mt=()=>{let St;const Et=whiteWebSdkExports.reaction(st,()=>{const Ct=st();Ct&&(dt(this._refine.replaceState(whiteWebSdkExports.toJS(Ct))),St?.(),St=ht(Ct))},{fireImmediately:!0});return()=>{Et(),St?.()}},bt=St=>{let Et=mt();const Ct=async Rt=>{Rt===whiteWebSdkExports.RoomPhase.Connected&&(Et(),Et=mt())};return St.displayer.callbacks.on("onPhaseChanged",Ct),()=>{St.displayer.callbacks.off("onPhaseChanged",Ct),Et()}};this._sideEffect.addDisposer(subscribe(this._plugin$,St=>{const Et=[];if(this._sideEffect.flush("plugin-init"),St){const Ct=whiteWebSdkExports.toJS(st());isObject(Ct)?dt(this._refine.replaceState(Ct)):Et.push(ft(St)),Et.push(bt(St))}else dt(this._refine.replaceState(nt));Et.length>0&&this._sideEffect.addDisposer(Et,"plugin-init")}))}get isWritable(){return this._isWritable$.value}get state(){return this._refine.state}setState(_e){const tt=this._requireAccess("setState");if(!this.isWritable)throw new Error(`Cannot setState on Storage "${this.namespace}" without writable access`);const rt=plainObjectKeys(_e);for(let nt=0;nt<rt.length;nt++){const st=rt[nt],dt=_e[st];tt.updateAttributes([STORAGE_NS,this.namespace,st],isObject(dt)?this._refine.ensureRefValue(dt):dt)}}resetState(){this._requireAccess("resetState").updateAttributes([STORAGE_NS,this.namespace],this.defaultState)}deleteStorage(){const _e=this._requireAccess("deleteStorage");this.disconnect(),_e.updateAttributes([STORAGE_NS,this.namespace],void 0)}disconnect(){this._disconnected=!0,this._sideEffect.flushAll(),this._events.emit("disconnected"),this._events.dispose()}get disconnected(){return this._disconnected}_requireAccess(_e){if(this._disconnected)throw new Error(`Cannot call ${_e} on destroyed Storage '${this.namespace}'.`);const tt=this._plugin$.value;if(!tt)throw new Error(`[SyncedStore]: cannot call '${_e}' on Storage '${this.namespace}' because plugin is not initialized.`);if(!this.isWritable)throw new Error(`[SyncedStore]: cannot call '${_e}' on Storage '${this.namespace}' without writable permission`);return tt}}class SyncedStore{constructor(_e,tt,rt){__publicField$1(this,"displayer"),__publicField$1(this,"_plugin$"),__publicField$1(this,"_isPluginWritable$"),__publicField$1(this,"_isRoomWritable$"),__publicField$1(this,"_sideEffect",new SideEffectManager$1),__publicField$1(this,"_room"),this.displayer=_e,this._plugin$=tt,this._isRoomWritable$=rt;const nt=whiteWebSdkExports.isRoom(_e)?_e:null;this._room=nt,this._isPluginWritable$=combine([this._plugin$,this._isRoomWritable$],([st,dt])=>st!==null&&dt)}connectStorage(_e,tt){const rt=new Storage({plugin$:this._plugin$,isWritable$:this._isPluginWritable$,namespace:_e,defaultState:tt}),nt=this._sideEffect.addDisposer(()=>rt.disconnect()),st=this._sideEffect.addDisposer(rt.on("disconnected",()=>{this._sideEffect.remove(nt),this._sideEffect.flush(st)}));return rt}get isPluginWritable(){return this._isPluginWritable$.value}addPluginWritableChangeListener(_e){return reaction(this._isPluginWritable$,_e)}get isRoomWritable(){return this._isRoomWritable$.value}async setRoomWritable(_e){if(!this._room)throw new Error("[SyncedStore]: cannot set room writable in replay mode");await this._room.setWritable(_e)}addRoomWritableChangeListener(_e){return reaction(this._isRoomWritable$,_e)}dispatchEvent(_e,tt){if(!this._room)throw new Error("[SyncedStore] cannot dispatch event in replay mode");this._room.dispatchMagixEvent(_e,tt)}addEventListener(_e,tt,rt){return this.displayer.addMagixEventListener(_e,tt,rt),()=>this.displayer.removeMagixEventListener(_e,tt)}removeEventListener(_e,tt){return this.displayer.removeMagixEventListener(_e,tt)}nextFrame(){return new Promise(_e=>{if(whiteWebSdkExports.isRoom(this.displayer)){const tt=genUID$2(),rt="SyncedStoreNextFrame",nt=st=>{st.payload===tt&&(this.displayer.removeMagixEventListener(rt,nt),_e())};this.displayer.addMagixEventListener(rt,nt,{fireSelfEventAfterCommit:!0});try{this.displayer.dispatchMagixEvent(rt,tt)}catch(st){console.warn(st),this.displayer.removeMagixEventListener(rt,nt),_e()}}else _e()})}destroy(){this.dispose()}dispose(){this._sideEffect.flushAll(),this._isPluginWritable$.dispose()}}const _SyncedStorePlugin=class NA extends whiteWebSdkExports.InvisiblePlugin{static async init(_e){const tt=val(!1),rt=()=>setValue(tt,whiteWebSdkExports.isRoom(_e)&&_e.isWritable);rt(),_e.callbacks.on("onEnableWriteNowChanged",rt);const nt=val(_e.getInvisiblePlugin(NA.kind));NA.invisiblePlugins.set(_e,nt);const st=async mt=>{if(mt&&whiteWebSdkExports.isRoom(_e))try{const bt=await _e.createInvisiblePlugin(NA,{[STORAGE_NS]:{}});setValue(nt,bt),unsubscribe(tt,st)}catch(bt){await new Promise(St=>setTimeout(St,200)),_e.getInvisiblePlugin(NA.kind)||console.error(bt)}},dt=mt=>{mt&&(unsubscribe(tt,st),unsubscribe(nt,dt))};!nt.value&&whiteWebSdkExports.isRoom(_e)&&(subscribe(tt,st),subscribe(nt,dt));const ft=new SyncedStore(_e,nt,tt),ht=mt=>{mt===whiteWebSdkExports.RoomPhase.Disconnected&&(_e.callbacks.off("onPhaseChanged",ht),_e.callbacks.off("onEnableWriteNowChanged",rt),tt.dispose(),nt.dispose(),NA.invisiblePlugins.delete(_e))};return _e.callbacks.on("onPhaseChanged",ht),ft}static onCreate(_e){const tt=NA.invisiblePlugins.get(_e.displayer);tt&&setValue(tt,_e)}constructor(_e){super(_e);const tt=NA.invisiblePlugins.get(this.displayer);tt&&setValue(tt,this)}};__publicField$1(_SyncedStorePlugin,"kind","SyncedStore");__publicField$1(_SyncedStorePlugin,"invisiblePlugins",new Map);let SyncedStorePlugin=_SyncedStorePlugin;var Slide=(function(et){var _e={};function tt(rt){if(_e[rt])return _e[rt].exports;var nt=_e[rt]={i:rt,l:!1,exports:{}};return et[rt].call(nt.exports,nt,nt.exports,tt),nt.l=!0,nt.exports}return tt.m=et,tt.c=_e,tt.d=function(rt,nt,st){tt.o(rt,nt)||Object.defineProperty(rt,nt,{enumerable:!0,get:st})},tt.r=function(rt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(rt,"__esModule",{value:!0})},tt.t=function(rt,nt){if(1&nt&&(rt=tt(rt)),8&nt||4&nt&&typeof rt=="object"&&rt&&rt.__esModule)return rt;var st=Object.create(null);if(tt.r(st),Object.defineProperty(st,"default",{enumerable:!0,value:rt}),2&nt&&typeof rt!="string")for(var dt in rt)tt.d(st,dt,(function(ft){return rt[ft]}).bind(null,dt));return st},tt.n=function(rt){var nt=rt&&rt.__esModule?function(){return rt.default}:function(){return rt};return tt.d(nt,"a",nt),nt},tt.o=function(rt,nt){return Object.prototype.hasOwnProperty.call(rt,nt)},tt.p="",tt(tt.s=229)})([function(et,_e,tt){/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var rt,nt,st,dt,ft,ht,mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt,Pt,It,Ft;tt.d(_e,"a",function(){return Tt}),tt.d(_e,"b",function(){return dt}),tt.d(_e,"c",function(){return st}),tt.d(_e,"d",function(){return Ft}),tt.d(_e,"e",function(){return wt}),tt.d(_e,"f",function(){return ft}),tt.d(_e,"g",function(){return rt}),tt.d(_e,"h",function(){return ht}),tt.d(_e,"i",function(){return At}),tt.d(_e,"j",function(){return Pt}),tt.d(_e,"k",function(){return Rt}),tt.d(_e,"l",function(){return It}),tt.d(_e,"m",function(){return Nt}),tt.d(_e,"n",function(){return nt}),tt.d(_e,"o",function(){return St}),tt.d(_e,"p",function(){return Et}),tt.d(_e,"q",function(){return mt}),tt.d(_e,"r",function(){return bt}),tt.d(_e,"s",function(){return Ct}),(function(qt){qt[qt.WEBGL_LEGACY=0]="WEBGL_LEGACY",qt[qt.WEBGL=1]="WEBGL",qt[qt.WEBGL2=2]="WEBGL2"})(rt||(rt={})),(function(qt){qt[qt.UNKNOWN=0]="UNKNOWN",qt[qt.WEBGL=1]="WEBGL",qt[qt.CANVAS=2]="CANVAS"})(nt||(nt={})),(function(qt){qt[qt.COLOR=16384]="COLOR",qt[qt.DEPTH=256]="DEPTH",qt[qt.STENCIL=1024]="STENCIL"})(st||(st={})),(function(qt){qt[qt.NORMAL=0]="NORMAL",qt[qt.ADD=1]="ADD",qt[qt.MULTIPLY=2]="MULTIPLY",qt[qt.SCREEN=3]="SCREEN",qt[qt.OVERLAY=4]="OVERLAY",qt[qt.DARKEN=5]="DARKEN",qt[qt.LIGHTEN=6]="LIGHTEN",qt[qt.COLOR_DODGE=7]="COLOR_DODGE",qt[qt.COLOR_BURN=8]="COLOR_BURN",qt[qt.HARD_LIGHT=9]="HARD_LIGHT",qt[qt.SOFT_LIGHT=10]="SOFT_LIGHT",qt[qt.DIFFERENCE=11]="DIFFERENCE",qt[qt.EXCLUSION=12]="EXCLUSION",qt[qt.HUE=13]="HUE",qt[qt.SATURATION=14]="SATURATION",qt[qt.COLOR=15]="COLOR",qt[qt.LUMINOSITY=16]="LUMINOSITY",qt[qt.NORMAL_NPM=17]="NORMAL_NPM",qt[qt.ADD_NPM=18]="ADD_NPM",qt[qt.SCREEN_NPM=19]="SCREEN_NPM",qt[qt.NONE=20]="NONE",qt[qt.SRC_OVER=0]="SRC_OVER",qt[qt.SRC_IN=21]="SRC_IN",qt[qt.SRC_OUT=22]="SRC_OUT",qt[qt.SRC_ATOP=23]="SRC_ATOP",qt[qt.DST_OVER=24]="DST_OVER",qt[qt.DST_IN=25]="DST_IN",qt[qt.DST_OUT=26]="DST_OUT",qt[qt.DST_ATOP=27]="DST_ATOP",qt[qt.ERASE=26]="ERASE",qt[qt.SUBTRACT=28]="SUBTRACT",qt[qt.XOR=29]="XOR"})(dt||(dt={})),(function(qt){qt[qt.POINTS=0]="POINTS",qt[qt.LINES=1]="LINES",qt[qt.LINE_LOOP=2]="LINE_LOOP",qt[qt.LINE_STRIP=3]="LINE_STRIP",qt[qt.TRIANGLES=4]="TRIANGLES",qt[qt.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",qt[qt.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(ft||(ft={})),(function(qt){qt[qt.RGBA=6408]="RGBA",qt[qt.RGB=6407]="RGB",qt[qt.RG=33319]="RG",qt[qt.RED=6403]="RED",qt[qt.RGBA_INTEGER=36249]="RGBA_INTEGER",qt[qt.RGB_INTEGER=36248]="RGB_INTEGER",qt[qt.RG_INTEGER=33320]="RG_INTEGER",qt[qt.RED_INTEGER=36244]="RED_INTEGER",qt[qt.ALPHA=6406]="ALPHA",qt[qt.LUMINANCE=6409]="LUMINANCE",qt[qt.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",qt[qt.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",qt[qt.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(ht||(ht={})),(function(qt){qt[qt.TEXTURE_2D=3553]="TEXTURE_2D",qt[qt.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",qt[qt.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",qt[qt.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",qt[qt.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",qt[qt.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",qt[qt.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",qt[qt.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",qt[qt.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(mt||(mt={})),(function(qt){qt[qt.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",qt[qt.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",qt[qt.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",qt[qt.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",qt[qt.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",qt[qt.UNSIGNED_INT=5125]="UNSIGNED_INT",qt[qt.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",qt[qt.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",qt[qt.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",qt[qt.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",qt[qt.BYTE=5120]="BYTE",qt[qt.SHORT=5122]="SHORT",qt[qt.INT=5124]="INT",qt[qt.FLOAT=5126]="FLOAT",qt[qt.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",qt[qt.HALF_FLOAT=36193]="HALF_FLOAT"})(bt||(bt={})),(function(qt){qt[qt.FLOAT=0]="FLOAT",qt[qt.INT=1]="INT",qt[qt.UINT=2]="UINT"})(St||(St={})),(function(qt){qt[qt.NEAREST=0]="NEAREST",qt[qt.LINEAR=1]="LINEAR"})(Et||(Et={})),(function(qt){qt[qt.CLAMP=33071]="CLAMP",qt[qt.REPEAT=10497]="REPEAT",qt[qt.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Ct||(Ct={})),(function(qt){qt[qt.OFF=0]="OFF",qt[qt.POW2=1]="POW2",qt[qt.ON=2]="ON",qt[qt.ON_MANUAL=3]="ON_MANUAL"})(Rt||(Rt={})),(function(qt){qt[qt.NPM=0]="NPM",qt[qt.UNPACK=1]="UNPACK",qt[qt.PMA=2]="PMA",qt[qt.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",qt[qt.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",qt[qt.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",qt[qt.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Tt||(Tt={})),(function(qt){qt[qt.NO=0]="NO",qt[qt.YES=1]="YES",qt[qt.AUTO=2]="AUTO",qt[qt.BLEND=0]="BLEND",qt[qt.CLEAR=1]="CLEAR",qt[qt.BLIT=2]="BLIT"})(wt||(wt={})),(function(qt){qt[qt.AUTO=0]="AUTO",qt[qt.MANUAL=1]="MANUAL"})(At||(At={})),(function(qt){qt.LOW="lowp",qt.MEDIUM="mediump",qt.HIGH="highp"})(Nt||(Nt={})),(function(qt){qt[qt.NONE=0]="NONE",qt[qt.SCISSOR=1]="SCISSOR",qt[qt.STENCIL=2]="STENCIL",qt[qt.SPRITE=3]="SPRITE"})(Pt||(Pt={})),(function(qt){qt[qt.NONE=0]="NONE",qt[qt.LOW=2]="LOW",qt[qt.MEDIUM=4]="MEDIUM",qt[qt.HIGH=8]="HIGH"})(It||(It={})),(function(qt){qt[qt.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",qt[qt.ARRAY_BUFFER=34962]="ARRAY_BUFFER",qt[qt.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Ft||(Ft={}))},function(et,_e,tt){tt.d(_e,"a",function(){return bt}),tt.d(_e,"b",function(){return dt}),tt.d(_e,"c",function(){return St}),tt.d(_e,"d",function(){return Tt}),tt.d(_e,"e",function(){return Rt}),tt.d(_e,"f",function(){return nt}),tt.d(_e,"g",function(){return ft}),tt.d(_e,"h",function(){return Et}),tt.d(_e,"i",function(){return st}),tt.d(_e,"j",function(){return mt}),tt.d(_e,"k",function(){return Ct}),tt.d(_e,"l",function(){return rt}),tt.d(_e,"m",function(){return Kt}),tt.d(_e,"n",function(){return Vt});/*!
* @pixi/math - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/math is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var rt,nt=2*Math.PI,st=180/Math.PI,dt=Math.PI/180;(function(jt){jt[jt.POLY=0]="POLY",jt[jt.RECT=1]="RECT",jt[jt.CIRC=2]="CIRC",jt[jt.ELIP=3]="ELIP",jt[jt.RREC=4]="RREC"})(rt||(rt={}));var ft=(function(){function jt(Ut,Ot){Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=0),this.x=0,this.y=0,this.x=Ut,this.y=Ot}return jt.prototype.clone=function(){return new jt(this.x,this.y)},jt.prototype.copyFrom=function(Ut){return this.set(Ut.x,Ut.y),this},jt.prototype.copyTo=function(Ut){return Ut.set(this.x,this.y),Ut},jt.prototype.equals=function(Ut){return Ut.x===this.x&&Ut.y===this.y},jt.prototype.set=function(Ut,Ot){return Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=Ut),this.x=Ut,this.y=Ot,this},jt.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},jt})(),ht=[new ft,new ft,new ft,new ft],mt=(function(){function jt(Ut,Ot,Wt,Bt){Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0),Bt===void 0&&(Bt=0),this.x=Number(Ut),this.y=Number(Ot),this.width=Number(Wt),this.height=Number(Bt),this.type=rt.RECT}return Object.defineProperty(jt.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"EMPTY",{get:function(){return new jt(0,0,0,0)},enumerable:!1,configurable:!0}),jt.prototype.clone=function(){return new jt(this.x,this.y,this.width,this.height)},jt.prototype.copyFrom=function(Ut){return this.x=Ut.x,this.y=Ut.y,this.width=Ut.width,this.height=Ut.height,this},jt.prototype.copyTo=function(Ut){return Ut.x=this.x,Ut.y=this.y,Ut.width=this.width,Ut.height=this.height,Ut},jt.prototype.contains=function(Ut,Ot){return!(this.width<=0||this.height<=0)&&Ut>=this.x&&Ut<this.x+this.width&&Ot>=this.y&&Ot<this.y+this.height},jt.prototype.intersects=function(Ut,Ot){if(!Ot){var Wt=this.x<Ut.x?Ut.x:this.x;if((this.right>Ut.right?Ut.right:this.right)<=Wt)return!1;var Bt=this.y<Ut.y?Ut.y:this.y;return(this.bottom>Ut.bottom?Ut.bottom:this.bottom)>Bt}var tr=this.left,Jt=this.right,ar=this.top,pr=this.bottom;if(Jt<=tr||pr<=ar)return!1;var cr=ht[0].set(Ut.left,Ut.top),gr=ht[1].set(Ut.left,Ut.bottom),Sr=ht[2].set(Ut.right,Ut.top),Er=ht[3].set(Ut.right,Ut.bottom);if(Sr.x<=cr.x||gr.y<=cr.y)return!1;var Vr=Math.sign(Ot.a*Ot.d-Ot.b*Ot.c);if(Vr===0||(Ot.apply(cr,cr),Ot.apply(gr,gr),Ot.apply(Sr,Sr),Ot.apply(Er,Er),Math.max(cr.x,gr.x,Sr.x,Er.x)<=tr||Math.min(cr.x,gr.x,Sr.x,Er.x)>=Jt||Math.max(cr.y,gr.y,Sr.y,Er.y)<=ar||Math.min(cr.y,gr.y,Sr.y,Er.y)>=pr))return!1;var Wr=Vr*(gr.y-cr.y),Mr=Vr*(cr.x-gr.x),Nr=Wr*tr+Mr*ar,Yr=Wr*Jt+Mr*ar,Or=Wr*tr+Mr*pr,Ar=Wr*Jt+Mr*pr;if(Math.max(Nr,Yr,Or,Ar)<=Wr*cr.x+Mr*cr.y||Math.min(Nr,Yr,Or,Ar)>=Wr*Er.x+Mr*Er.y)return!1;var Qr=Vr*(cr.y-Sr.y),hn=Vr*(Sr.x-cr.x),Sn=Qr*tr+hn*ar,Kr=Qr*Jt+hn*ar,Hn=Qr*tr+hn*pr,ln=Qr*Jt+hn*pr;return!(Math.max(Sn,Kr,Hn,ln)<=Qr*cr.x+hn*cr.y||Math.min(Sn,Kr,Hn,ln)>=Qr*Er.x+hn*Er.y)},jt.prototype.pad=function(Ut,Ot){return Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=Ut),this.x-=Ut,this.y-=Ot,this.width+=2*Ut,this.height+=2*Ot,this},jt.prototype.fit=function(Ut){var Ot=Math.max(this.x,Ut.x),Wt=Math.min(this.x+this.width,Ut.x+Ut.width),Bt=Math.max(this.y,Ut.y),tr=Math.min(this.y+this.height,Ut.y+Ut.height);return this.x=Ot,this.width=Math.max(Wt-Ot,0),this.y=Bt,this.height=Math.max(tr-Bt,0),this},jt.prototype.ceil=function(Ut,Ot){Ut===void 0&&(Ut=1),Ot===void 0&&(Ot=.001);var Wt=Math.ceil((this.x+this.width-Ot)*Ut)/Ut,Bt=Math.ceil((this.y+this.height-Ot)*Ut)/Ut;return this.x=Math.floor((this.x+Ot)*Ut)/Ut,this.y=Math.floor((this.y+Ot)*Ut)/Ut,this.width=Wt-this.x,this.height=Bt-this.y,this},jt.prototype.enlarge=function(Ut){var Ot=Math.min(this.x,Ut.x),Wt=Math.max(this.x+this.width,Ut.x+Ut.width),Bt=Math.min(this.y,Ut.y),tr=Math.max(this.y+this.height,Ut.y+Ut.height);return this.x=Ot,this.width=Wt-Ot,this.y=Bt,this.height=tr-Bt,this},jt.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},jt})(),bt=(function(){function jt(Ut,Ot,Wt){Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0),this.x=Ut,this.y=Ot,this.radius=Wt,this.type=rt.CIRC}return jt.prototype.clone=function(){return new jt(this.x,this.y,this.radius)},jt.prototype.contains=function(Ut,Ot){if(this.radius<=0)return!1;var Wt=this.radius*this.radius,Bt=this.x-Ut,tr=this.y-Ot;return(Bt*=Bt)+(tr*=tr)<=Wt},jt.prototype.getBounds=function(){return new mt(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},jt.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},jt})(),St=(function(){function jt(Ut,Ot,Wt,Bt){Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0),Bt===void 0&&(Bt=0),this.x=Ut,this.y=Ot,this.width=Wt,this.height=Bt,this.type=rt.ELIP}return jt.prototype.clone=function(){return new jt(this.x,this.y,this.width,this.height)},jt.prototype.contains=function(Ut,Ot){if(this.width<=0||this.height<=0)return!1;var Wt=(Ut-this.x)/this.width,Bt=(Ot-this.y)/this.height;return(Wt*=Wt)+(Bt*=Bt)<=1},jt.prototype.getBounds=function(){return new mt(this.x-this.width,this.y-this.height,this.width,this.height)},jt.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},jt})(),Et=(function(){function jt(){for(var Ut=arguments,Ot=[],Wt=0;Wt<arguments.length;Wt++)Ot[Wt]=Ut[Wt];var Bt=Array.isArray(Ot[0])?Ot[0]:Ot;if(typeof Bt[0]!="number"){for(var tr=[],Jt=0,ar=Bt.length;Jt<ar;Jt++)tr.push(Bt[Jt].x,Bt[Jt].y);Bt=tr}this.points=Bt,this.type=rt.POLY,this.closeStroke=!0}return jt.prototype.clone=function(){var Ut=new jt(this.points.slice());return Ut.closeStroke=this.closeStroke,Ut},jt.prototype.contains=function(Ut,Ot){for(var Wt=!1,Bt=this.points.length/2,tr=0,Jt=Bt-1;tr<Bt;Jt=tr++){var ar=this.points[2*tr],pr=this.points[2*tr+1],cr=this.points[2*Jt],gr=this.points[2*Jt+1];pr>Ot!=gr>Ot&&Ut<(Ot-pr)/(gr-pr)*(cr-ar)+ar&&(Wt=!Wt)}return Wt},jt.prototype.toString=function(){return"[@pixi/math:PolygoncloseStroke="+this.closeStroke+"points="+this.points.reduce(function(Ut,Ot){return Ut+", "+Ot},"")+"]"},jt})(),Ct=(function(){function jt(Ut,Ot,Wt,Bt,tr){Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0),Bt===void 0&&(Bt=0),tr===void 0&&(tr=20),this.x=Ut,this.y=Ot,this.width=Wt,this.height=Bt,this.radius=tr,this.type=rt.RREC}return jt.prototype.clone=function(){return new jt(this.x,this.y,this.width,this.height,this.radius)},jt.prototype.contains=function(Ut,Ot){if(this.width<=0||this.height<=0)return!1;if(Ut>=this.x&&Ut<=this.x+this.width&&Ot>=this.y&&Ot<=this.y+this.height){var Wt=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(Ot>=this.y+Wt&&Ot<=this.y+this.height-Wt||Ut>=this.x+Wt&&Ut<=this.x+this.width-Wt)return!0;var Bt=Ut-(this.x+Wt),tr=Ot-(this.y+Wt),Jt=Wt*Wt;if(Bt*Bt+tr*tr<=Jt||(Bt=Ut-(this.x+this.width-Wt))*Bt+tr*tr<=Jt||Bt*Bt+(tr=Ot-(this.y+this.height-Wt))*tr<=Jt||(Bt=Ut-(this.x+Wt))*Bt+tr*tr<=Jt)return!0}return!1},jt.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+"width="+this.width+" height="+this.height+" radius="+this.radius+"]"},jt})(),Rt=(function(){function jt(Ut,Ot,Wt,Bt){Wt===void 0&&(Wt=0),Bt===void 0&&(Bt=0),this._x=Wt,this._y=Bt,this.cb=Ut,this.scope=Ot}return jt.prototype.clone=function(Ut,Ot){return Ut===void 0&&(Ut=this.cb),Ot===void 0&&(Ot=this.scope),new jt(Ut,Ot,this._x,this._y)},jt.prototype.set=function(Ut,Ot){return Ut===void 0&&(Ut=0),Ot===void 0&&(Ot=Ut),this._x===Ut&&this._y===Ot||(this._x=Ut,this._y=Ot,this.cb.call(this.scope)),this},jt.prototype.copyFrom=function(Ut){return this._x===Ut.x&&this._y===Ut.y||(this._x=Ut.x,this._y=Ut.y,this.cb.call(this.scope)),this},jt.prototype.copyTo=function(Ut){return Ut.set(this._x,this._y),Ut},jt.prototype.equals=function(Ut){return Ut.x===this._x&&Ut.y===this._y},jt.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(jt.prototype,"x",{get:function(){return this._x},set:function(Ut){this._x!==Ut&&(this._x=Ut,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"y",{get:function(){return this._y},set:function(Ut){this._y!==Ut&&(this._y=Ut,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),jt})(),Tt=(function(){function jt(Ut,Ot,Wt,Bt,tr,Jt){Ut===void 0&&(Ut=1),Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0),Bt===void 0&&(Bt=1),tr===void 0&&(tr=0),Jt===void 0&&(Jt=0),this.array=null,this.a=Ut,this.b=Ot,this.c=Wt,this.d=Bt,this.tx=tr,this.ty=Jt}return jt.prototype.fromArray=function(Ut){this.a=Ut[0],this.b=Ut[1],this.c=Ut[3],this.d=Ut[4],this.tx=Ut[2],this.ty=Ut[5]},jt.prototype.set=function(Ut,Ot,Wt,Bt,tr,Jt){return this.a=Ut,this.b=Ot,this.c=Wt,this.d=Bt,this.tx=tr,this.ty=Jt,this},jt.prototype.toArray=function(Ut,Ot){this.array||(this.array=new Float32Array(9));var Wt=Ot||this.array;return Ut?(Wt[0]=this.a,Wt[1]=this.b,Wt[2]=0,Wt[3]=this.c,Wt[4]=this.d,Wt[5]=0,Wt[6]=this.tx,Wt[7]=this.ty,Wt[8]=1):(Wt[0]=this.a,Wt[1]=this.c,Wt[2]=this.tx,Wt[3]=this.b,Wt[4]=this.d,Wt[5]=this.ty,Wt[6]=0,Wt[7]=0,Wt[8]=1),Wt},jt.prototype.apply=function(Ut,Ot){Ot=Ot||new ft;var Wt=Ut.x,Bt=Ut.y;return Ot.x=this.a*Wt+this.c*Bt+this.tx,Ot.y=this.b*Wt+this.d*Bt+this.ty,Ot},jt.prototype.applyInverse=function(Ut,Ot){Ot=Ot||new ft;var Wt=1/(this.a*this.d+this.c*-this.b),Bt=Ut.x,tr=Ut.y;return Ot.x=this.d*Wt*Bt+-this.c*Wt*tr+(this.ty*this.c-this.tx*this.d)*Wt,Ot.y=this.a*Wt*tr+-this.b*Wt*Bt+(-this.ty*this.a+this.tx*this.b)*Wt,Ot},jt.prototype.translate=function(Ut,Ot){return this.tx+=Ut,this.ty+=Ot,this},jt.prototype.scale=function(Ut,Ot){return this.a*=Ut,this.d*=Ot,this.c*=Ut,this.b*=Ot,this.tx*=Ut,this.ty*=Ot,this},jt.prototype.rotate=function(Ut){var Ot=Math.cos(Ut),Wt=Math.sin(Ut),Bt=this.a,tr=this.c,Jt=this.tx;return this.a=Bt*Ot-this.b*Wt,this.b=Bt*Wt+this.b*Ot,this.c=tr*Ot-this.d*Wt,this.d=tr*Wt+this.d*Ot,this.tx=Jt*Ot-this.ty*Wt,this.ty=Jt*Wt+this.ty*Ot,this},jt.prototype.append=function(Ut){var Ot=this.a,Wt=this.b,Bt=this.c,tr=this.d;return this.a=Ut.a*Ot+Ut.b*Bt,this.b=Ut.a*Wt+Ut.b*tr,this.c=Ut.c*Ot+Ut.d*Bt,this.d=Ut.c*Wt+Ut.d*tr,this.tx=Ut.tx*Ot+Ut.ty*Bt+this.tx,this.ty=Ut.tx*Wt+Ut.ty*tr+this.ty,this},jt.prototype.setTransform=function(Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr){return this.a=Math.cos(ar+cr)*tr,this.b=Math.sin(ar+cr)*tr,this.c=-Math.sin(ar-pr)*Jt,this.d=Math.cos(ar-pr)*Jt,this.tx=Ut-(Wt*this.a+Bt*this.c),this.ty=Ot-(Wt*this.b+Bt*this.d),this},jt.prototype.prepend=function(Ut){var Ot=this.tx;if(Ut.a!==1||Ut.b!==0||Ut.c!==0||Ut.d!==1){var Wt=this.a,Bt=this.c;this.a=Wt*Ut.a+this.b*Ut.c,this.b=Wt*Ut.b+this.b*Ut.d,this.c=Bt*Ut.a+this.d*Ut.c,this.d=Bt*Ut.b+this.d*Ut.d}return this.tx=Ot*Ut.a+this.ty*Ut.c+Ut.tx,this.ty=Ot*Ut.b+this.ty*Ut.d+Ut.ty,this},jt.prototype.decompose=function(Ut){var Ot=this.a,Wt=this.b,Bt=this.c,tr=this.d,Jt=Ut.pivot,ar=-Math.atan2(-Bt,tr),pr=Math.atan2(Wt,Ot),cr=Math.abs(ar+pr);return cr<1e-5||Math.abs(nt-cr)<1e-5?(Ut.rotation=pr,Ut.skew.x=Ut.skew.y=0):(Ut.rotation=0,Ut.skew.x=ar,Ut.skew.y=pr),Ut.scale.x=Math.sqrt(Ot*Ot+Wt*Wt),Ut.scale.y=Math.sqrt(Bt*Bt+tr*tr),Ut.position.x=this.tx+(Jt.x*Ot+Jt.y*Bt),Ut.position.y=this.ty+(Jt.x*Wt+Jt.y*tr),Ut},jt.prototype.invert=function(){var Ut=this.a,Ot=this.b,Wt=this.c,Bt=this.d,tr=this.tx,Jt=Ut*Bt-Ot*Wt;return this.a=Bt/Jt,this.b=-Ot/Jt,this.c=-Wt/Jt,this.d=Ut/Jt,this.tx=(Wt*this.ty-Bt*tr)/Jt,this.ty=-(Ut*this.ty-Ot*tr)/Jt,this},jt.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},jt.prototype.clone=function(){var Ut=new jt;return Ut.a=this.a,Ut.b=this.b,Ut.c=this.c,Ut.d=this.d,Ut.tx=this.tx,Ut.ty=this.ty,Ut},jt.prototype.copyTo=function(Ut){return Ut.a=this.a,Ut.b=this.b,Ut.c=this.c,Ut.d=this.d,Ut.tx=this.tx,Ut.ty=this.ty,Ut},jt.prototype.copyFrom=function(Ut){return this.a=Ut.a,this.b=Ut.b,this.c=Ut.c,this.d=Ut.d,this.tx=Ut.tx,this.ty=Ut.ty,this},jt.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(jt,"IDENTITY",{get:function(){return new jt},enumerable:!1,configurable:!0}),Object.defineProperty(jt,"TEMP_MATRIX",{get:function(){return new jt},enumerable:!1,configurable:!0}),jt})(),wt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],At=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Nt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Pt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],It=[],Ft=[],qt=Math.sign;(function(){for(var jt=0;jt<16;jt++){var Ut=[];It.push(Ut);for(var Ot=0;Ot<16;Ot++)for(var Wt=qt(wt[jt]*wt[Ot]+Nt[jt]*At[Ot]),Bt=qt(At[jt]*wt[Ot]+Pt[jt]*At[Ot]),tr=qt(wt[jt]*Nt[Ot]+Nt[jt]*Pt[Ot]),Jt=qt(At[jt]*Nt[Ot]+Pt[jt]*Pt[Ot]),ar=0;ar<16;ar++)if(wt[ar]===Wt&&At[ar]===Bt&&Nt[ar]===tr&&Pt[ar]===Jt){Ut.push(ar);break}}for(jt=0;jt<16;jt++){var pr=new Tt;pr.set(wt[jt],At[jt],Nt[jt],Pt[jt],0,0),Ft.push(pr)}})();var Vt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(jt){return wt[jt]},uY:function(jt){return At[jt]},vX:function(jt){return Nt[jt]},vY:function(jt){return Pt[jt]},inv:function(jt){return 8&jt?15&jt:7&-jt},add:function(jt,Ut){return It[jt][Ut]},sub:function(jt,Ut){return It[jt][Vt.inv(Ut)]},rotate180:function(jt){return 4^jt},isVertical:function(jt){return(3&jt)==2},byDirection:function(jt,Ut){return 2*Math.abs(jt)<=Math.abs(Ut)?Ut>=0?Vt.S:Vt.N:2*Math.abs(Ut)<=Math.abs(jt)?jt>0?Vt.E:Vt.W:Ut>0?jt>0?Vt.SE:Vt.SW:jt>0?Vt.NE:Vt.NW},matrixAppendRotationInv:function(jt,Ut,Ot,Wt){Ot===void 0&&(Ot=0),Wt===void 0&&(Wt=0);var Bt=Ft[Vt.inv(Ut)];Bt.tx=Ot,Bt.ty=Wt,jt.append(Bt)}},Kt=(function(){function jt(){this.worldTransform=new Tt,this.localTransform=new Tt,this.position=new Rt(this.onChange,this,0,0),this.scale=new Rt(this.onChange,this,1,1),this.pivot=new Rt(this.onChange,this,0,0),this.skew=new Rt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return jt.prototype.onChange=function(){this._localID++},jt.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},jt.prototype.toString=function(){return"[@pixi/math:Transform position=("+this.position.x+", "+this.position.y+") rotation="+this.rotation+" scale=("+this.scale.x+", "+this.scale.y+") skew=("+this.skew.x+", "+this.skew.y+") ]"},jt.prototype.updateLocalTransform=function(){var Ut=this.localTransform;this._localID!==this._currentLocalID&&(Ut.a=this._cx*this.scale.x,Ut.b=this._sx*this.scale.x,Ut.c=this._cy*this.scale.y,Ut.d=this._sy*this.scale.y,Ut.tx=this.position.x-(this.pivot.x*Ut.a+this.pivot.y*Ut.c),Ut.ty=this.position.y-(this.pivot.x*Ut.b+this.pivot.y*Ut.d),this._currentLocalID=this._localID,this._parentID=-1)},jt.prototype.updateTransform=function(Ut){var Ot=this.localTransform;if(this._localID!==this._currentLocalID&&(Ot.a=this._cx*this.scale.x,Ot.b=this._sx*this.scale.x,Ot.c=this._cy*this.scale.y,Ot.d=this._sy*this.scale.y,Ot.tx=this.position.x-(this.pivot.x*Ot.a+this.pivot.y*Ot.c),Ot.ty=this.position.y-(this.pivot.x*Ot.b+this.pivot.y*Ot.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==Ut._worldID){var Wt=Ut.worldTransform,Bt=this.worldTransform;Bt.a=Ot.a*Wt.a+Ot.b*Wt.c,Bt.b=Ot.a*Wt.b+Ot.b*Wt.d,Bt.c=Ot.c*Wt.a+Ot.d*Wt.c,Bt.d=Ot.c*Wt.b+Ot.d*Wt.d,Bt.tx=Ot.tx*Wt.a+Ot.ty*Wt.c+Wt.tx,Bt.ty=Ot.tx*Wt.b+Ot.ty*Wt.d+Wt.ty,this._parentID=Ut._worldID,this._worldID++}},jt.prototype.setFromMatrix=function(Ut){Ut.decompose(this),this._localID++},Object.defineProperty(jt.prototype,"rotation",{get:function(){return this._rotation},set:function(Ut){this._rotation!==Ut&&(this._rotation=Ut,this.updateSkew())},enumerable:!1,configurable:!0}),jt.IDENTITY=new jt,jt})()},function(et,_e,tt){tt.d(_e,"a",function(){return $u}),tt.d(_e,"b",function(){return Bt}),tt.d(_e,"c",function(){return At}),tt.d(_e,"d",function(){return tp}),tt.d(_e,"e",function(){return wl}),tt.d(_e,"f",function(){return Il}),tt.d(_e,"g",function(){return Al}),tt.d(_e,"h",function(){return Vr}),tt.d(_e,"i",function(){return Tt}),tt.d(_e,"j",function(){return Ft}),tt.d(_e,"k",function(){return ru}),tt.d(_e,"l",function(){return Or}),tt.d(_e,"m",function(){return xn}),tt.d(_e,"n",function(){return es}),tt.d(_e,"o",function(){return Qr}),tt.d(_e,"p",function(){return cr}),tt.d(_e,"q",function(){return Uu}),tt.d(_e,"r",function(){return Gs}),tt.d(_e,"s",function(){return Ro}),tt.d(_e,"t",function(){return pr}),tt.d(_e,"u",function(){return Iu}),tt.d(_e,"v",function(){return Sn}),tt.d(_e,"w",function(){return jt}),tt.d(_e,"x",function(){return om}),tt.d(_e,"y",function(){return tl}),tt.d(_e,"z",function(){return Wu}),tt.d(_e,"A",function(){return rl});var rt=tt(4),nt=tt(0),st=tt(3),dt=tt(12),ft=tt(7),ht=tt(1);/*!
* @pixi/core - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/core is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/rt.b.PREFER_ENV=st.isMobile.any?nt.g.WEBGL:nt.g.WEBGL2,rt.b.STRICT_TEXTURE_CACHE=!1;var mt=[];function bt(sn,mr){if(!sn)return null;var fr="";if(typeof sn=="string"){var yr=/\.(\w{3,4})(?:$|\?|#)/i.exec(sn);yr&&(fr=yr[1].toLowerCase())}for(var jr=mt.length-1;jr>=0;--jr){var un=mt[jr];if(un.test&&un.test(sn,fr))return new un(sn,mr)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var St=function(sn,mr){return(St=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fr,yr){fr.__proto__=yr}||function(fr,yr){for(var jr in yr)yr.hasOwnProperty(jr)&&(fr[jr]=yr[jr])})(sn,mr)};function Et(sn,mr){function fr(){this.constructor=sn}St(sn,mr),sn.prototype=mr===null?Object.create(mr):(fr.prototype=mr.prototype,new fr)}var Ct=function(){return(Ct=Object.assign||function(sn){for(var mr,fr=arguments,yr=1,jr=arguments.length;yr<jr;yr++)for(var un in mr=fr[yr])Object.prototype.hasOwnProperty.call(mr,un)&&(sn[un]=mr[un]);return sn}).apply(this,arguments)},Rt=(function(){function sn(mr,fr){mr===void 0&&(mr=0),fr===void 0&&(fr=0),this._width=mr,this._height=fr,this.destroyed=!1,this.internal=!1,this.onResize=new dt.a("setRealSize"),this.onUpdate=new dt.a("update"),this.onError=new dt.a("onError")}return sn.prototype.bind=function(mr){this.onResize.add(mr),this.onUpdate.add(mr),this.onError.add(mr),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},sn.prototype.unbind=function(mr){this.onResize.remove(mr),this.onUpdate.remove(mr),this.onError.remove(mr)},sn.prototype.resize=function(mr,fr){mr===this._width&&fr===this._height||(this._width=mr,this._height=fr,this.onResize.emit(mr,fr))},Object.defineProperty(sn.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),sn.prototype.update=function(){this.destroyed||this.onUpdate.emit()},sn.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(sn.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),sn.prototype.style=function(mr,fr,yr){return!1},sn.prototype.dispose=function(){},sn.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},sn.test=function(mr,fr){return!1},sn})(),Tt=(function(sn){function mr(fr,yr){var jr=this,un=yr||{},$n=un.width,Yn=un.height;if(!$n||!Yn)throw new Error("BufferResource width or height invalid");return(jr=sn.call(this,$n,Yn)||this).data=fr,jr}return Et(mr,sn),mr.prototype.upload=function(fr,yr,jr){var un=fr.gl;un.pixelStorei(un.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yr.alphaMode===nt.a.UNPACK);var $n=yr.realWidth,Yn=yr.realHeight;return jr.width===$n&&jr.height===Yn?un.texSubImage2D(yr.target,0,0,0,$n,Yn,yr.format,jr.type,this.data):(jr.width=$n,jr.height=Yn,un.texImage2D(yr.target,0,jr.internalFormat,$n,Yn,0,yr.format,jr.type,this.data)),!0},mr.prototype.dispose=function(){this.data=null},mr.test=function(fr){return fr instanceof Float32Array||fr instanceof Uint8Array||fr instanceof Uint32Array},mr})(Rt),wt={scaleMode:nt.p.NEAREST,format:nt.h.RGBA,alphaMode:nt.a.NPM},At=(function(sn){function mr(fr,yr){fr===void 0&&(fr=null),yr===void 0&&(yr=null);var jr=sn.call(this)||this,un=(yr=yr||{}).alphaMode,$n=yr.mipmap,Yn=yr.anisotropicLevel,os=yr.scaleMode,Vs=yr.width,eo=yr.height,qo=yr.wrapMode,Po=yr.format,su=yr.type,mu=yr.target,zu=yr.resolution,lu=yr.resourceOptions;return!fr||fr instanceof Rt||((fr=bt(fr,lu)).internal=!0),jr.resolution=zu||rt.b.RESOLUTION,jr.width=Math.round((Vs||0)*jr.resolution)/jr.resolution,jr.height=Math.round((eo||0)*jr.resolution)/jr.resolution,jr._mipmap=$n!==void 0?$n:rt.b.MIPMAP_TEXTURES,jr.anisotropicLevel=Yn!==void 0?Yn:rt.b.ANISOTROPIC_LEVEL,jr._wrapMode=qo||rt.b.WRAP_MODE,jr._scaleMode=os!==void 0?os:rt.b.SCALE_MODE,jr.format=Po||nt.h.RGBA,jr.type=su||nt.r.UNSIGNED_BYTE,jr.target=mu||nt.q.TEXTURE_2D,jr.alphaMode=un!==void 0?un:nt.a.UNPACK,jr.uid=Object(st.uid)(),jr.touched=0,jr.isPowerOfTwo=!1,jr._refreshPOT(),jr._glTextures={},jr.dirtyId=0,jr.dirtyStyleId=0,jr.cacheId=null,jr.valid=Vs>0&&eo>0,jr.textureCacheIds=[],jr.destroyed=!1,jr.resource=null,jr._batchEnabled=0,jr._batchLocation=0,jr.parentTextureArray=null,jr.setResource(fr),jr}return Et(mr,sn),Object.defineProperty(mr.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"mipmap",{get:function(){return this._mipmap},set:function(fr){this._mipmap!==fr&&(this._mipmap=fr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(fr){this._scaleMode!==fr&&(this._scaleMode=fr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(fr){this._wrapMode!==fr&&(this._wrapMode=fr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),mr.prototype.setStyle=function(fr,yr){var jr;return fr!==void 0&&fr!==this.scaleMode&&(this.scaleMode=fr,jr=!0),yr!==void 0&&yr!==this.mipmap&&(this.mipmap=yr,jr=!0),jr&&this.dirtyStyleId++,this},mr.prototype.setSize=function(fr,yr,jr){return jr=jr||this.resolution,this.setRealSize(fr*jr,yr*jr,jr)},mr.prototype.setRealSize=function(fr,yr,jr){return this.resolution=jr||this.resolution,this.width=Math.round(fr)/this.resolution,this.height=Math.round(yr)/this.resolution,this._refreshPOT(),this.update(),this},mr.prototype._refreshPOT=function(){this.isPowerOfTwo=Object(st.isPow2)(this.realWidth)&&Object(st.isPow2)(this.realHeight)},mr.prototype.setResolution=function(fr){var yr=this.resolution;return yr===fr||(this.resolution=fr,this.valid&&(this.width=Math.round(this.width*yr)/fr,this.height=Math.round(this.height*yr)/fr,this.emit("update",this)),this._refreshPOT()),this},mr.prototype.setResource=function(fr){if(this.resource===fr)return this;if(this.resource)throw new Error("Resource can be set only once");return fr.bind(this),this.resource=fr,this},mr.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))},mr.prototype.onError=function(fr){this.emit("error",this,fr)},mr.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete st.BaseTextureCache[this.cacheId],delete st.TextureCache[this.cacheId],this.cacheId=null),this.dispose(),mr.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},mr.prototype.dispose=function(){this.emit("dispose",this)},mr.prototype.castToBaseTexture=function(){return this},mr.from=function(fr,yr,jr){jr===void 0&&(jr=rt.b.STRICT_TEXTURE_CACHE);var un=typeof fr=="string",$n=null;if(un)$n=fr;else{if(!fr._pixiId){var Yn=yr&&yr.pixiIdPrefix||"pixiid";fr._pixiId=Yn+"_"+Object(st.uid)()}$n=fr._pixiId}var os=st.BaseTextureCache[$n];if(un&&jr&&!os)throw new Error('The cacheId "'+$n+'" does not exist in BaseTextureCache.');return os||((os=new mr(fr,yr)).cacheId=$n,mr.addToCache(os,$n)),os},mr.fromBuffer=function(fr,yr,jr,un){fr=fr||new Float32Array(yr*jr*4);var $n=new Tt(fr,{width:yr,height:jr}),Yn=fr instanceof Float32Array?nt.r.FLOAT:nt.r.UNSIGNED_BYTE;return new mr($n,Object.assign(wt,un||{width:yr,height:jr,type:Yn}))},mr.addToCache=function(fr,yr){yr&&(fr.textureCacheIds.indexOf(yr)===-1&&fr.textureCacheIds.push(yr),st.BaseTextureCache[yr]&&console.warn("BaseTexture added to the cache with an id ["+yr+"] that already had an entry"),st.BaseTextureCache[yr]=fr)},mr.removeFromCache=function(fr){if(typeof fr=="string"){var yr=st.BaseTextureCache[fr];if(yr){var jr=yr.textureCacheIds.indexOf(fr);return jr>-1&&yr.textureCacheIds.splice(jr,1),delete st.BaseTextureCache[fr],yr}}else if(fr&&fr.textureCacheIds){for(var un=0;un<fr.textureCacheIds.length;++un)delete st.BaseTextureCache[fr.textureCacheIds[un]];return fr.textureCacheIds.length=0,fr}return null},mr._globalBatch=0,mr})(st.EventEmitter),Nt=(function(sn){function mr(fr,yr){var jr=this,un=yr||{},$n=un.width,Yn=un.height;(jr=sn.call(this,$n,Yn)||this).items=[],jr.itemDirtyIds=[];for(var os=0;os<fr;os++){var Vs=new At;jr.items.push(Vs),jr.itemDirtyIds.push(-2)}return jr.length=fr,jr._load=null,jr.baseTexture=null,jr}return Et(mr,sn),mr.prototype.initFromArray=function(fr,yr){for(var jr=0;jr<this.length;jr++)fr[jr]&&(fr[jr].castToBaseTexture?this.addBaseTextureAt(fr[jr].castToBaseTexture(),jr):fr[jr]instanceof Rt?this.addResourceAt(fr[jr],jr):this.addResourceAt(bt(fr[jr],yr),jr))},mr.prototype.dispose=function(){for(var fr=0,yr=this.length;fr<yr;fr++)this.items[fr].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},mr.prototype.addResourceAt=function(fr,yr){if(!this.items[yr])throw new Error("Index "+yr+" is out of bounds");return fr.valid&&!this.valid&&this.resize(fr.width,fr.height),this.items[yr].setResource(fr),this},mr.prototype.bind=function(fr){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");sn.prototype.bind.call(this,fr);for(var yr=0;yr<this.length;yr++)this.items[yr].parentTextureArray=fr,this.items[yr].on("update",fr.update,fr)},mr.prototype.unbind=function(fr){sn.prototype.unbind.call(this,fr);for(var yr=0;yr<this.length;yr++)this.items[yr].parentTextureArray=null,this.items[yr].off("update",fr.update,fr)},mr.prototype.load=function(){var fr=this;if(this._load)return this._load;var yr=this.items.map(function(jr){return jr.resource}).filter(function(jr){return jr}).map(function(jr){return jr.load()});return this._load=Promise.all(yr).then(function(){var jr=fr.items[0],un=jr.realWidth,$n=jr.realHeight;return fr.resize(un,$n),Promise.resolve(fr)}),this._load},mr})(Rt),Pt=(function(sn){function mr(fr,yr){var jr,un,$n=this,Yn=yr||{},os=Yn.width,Vs=Yn.height;return Array.isArray(fr)?(jr=fr,un=fr.length):un=fr,$n=sn.call(this,un,{width:os,height:Vs})||this,jr&&$n.initFromArray(jr,yr),$n}return Et(mr,sn),mr.prototype.addBaseTextureAt=function(fr,yr){if(!fr.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(fr.resource,yr),this},mr.prototype.bind=function(fr){sn.prototype.bind.call(this,fr),fr.target=nt.q.TEXTURE_2D_ARRAY},mr.prototype.upload=function(fr,yr,jr){var un=this.length,$n=this.itemDirtyIds,Yn=this.items,os=fr.gl;jr.dirtyId<0&&os.texImage3D(os.TEXTURE_2D_ARRAY,0,jr.internalFormat,this._width,this._height,un,0,yr.format,jr.type,null);for(var Vs=0;Vs<un;Vs++){var eo=Yn[Vs];$n[Vs]<eo.dirtyId&&($n[Vs]=eo.dirtyId,eo.valid&&os.texSubImage3D(os.TEXTURE_2D_ARRAY,0,0,0,Vs,eo.resource.width,eo.resource.height,1,yr.format,jr.type,eo.resource.source))}return!0},mr})(Nt),It=(function(sn){function mr(fr){var yr=this,jr=fr,un=jr.naturalWidth||jr.videoWidth||jr.width,$n=jr.naturalHeight||jr.videoHeight||jr.height;return(yr=sn.call(this,un,$n)||this).source=fr,yr.noSubImage=!1,yr}return Et(mr,sn),mr.crossOrigin=function(fr,yr,jr){jr===void 0&&yr.indexOf("data:")!==0?fr.crossOrigin=Object(st.determineCrossOrigin)(yr):jr!==!1&&(fr.crossOrigin=typeof jr=="string"?jr:"anonymous")},mr.prototype.upload=function(fr,yr,jr,un){var $n=fr.gl,Yn=yr.realWidth,os=yr.realHeight;if((un=un||this.source)instanceof HTMLImageElement){if(!un.complete||un.naturalWidth===0)return!1}else if(un instanceof HTMLVideoElement&&un.readyState<=1)return!1;return $n.pixelStorei($n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yr.alphaMode===nt.a.UNPACK),this.noSubImage||yr.target!==$n.TEXTURE_2D||jr.width!==Yn||jr.height!==os?(jr.width=Yn,jr.height=os,$n.texImage2D(yr.target,0,jr.internalFormat,yr.format,jr.type,un)):$n.texSubImage2D($n.TEXTURE_2D,0,0,0,yr.format,jr.type,un),!0},mr.prototype.update=function(){if(!this.destroyed){var fr=this.source,yr=fr.naturalWidth||fr.videoWidth||fr.width,jr=fr.naturalHeight||fr.videoHeight||fr.height;this.resize(yr,jr),sn.prototype.update.call(this)}},mr.prototype.dispose=function(){this.source=null},mr})(Rt),Ft=(function(sn){function mr(fr){return sn.call(this,fr)||this}return Et(mr,sn),mr.test=function(fr){var yr=globalThis.OffscreenCanvas;return!!(yr&&fr instanceof yr)||globalThis.HTMLCanvasElement&&fr instanceof HTMLCanvasElement},mr})(It),qt=(function(sn){function mr(fr,yr){var jr=this,un=yr||{},$n=un.width,Yn=un.height,os=un.autoLoad,Vs=un.linkBaseTexture;if(fr&&fr.length!==mr.SIDES)throw new Error("Invalid length. Got "+fr.length+", expected 6");jr=sn.call(this,6,{width:$n,height:Yn})||this;for(var eo=0;eo<mr.SIDES;eo++)jr.items[eo].target=nt.q.TEXTURE_CUBE_MAP_POSITIVE_X+eo;return jr.linkBaseTexture=Vs!==!1,fr&&jr.initFromArray(fr,yr),os!==!1&&jr.load(),jr}return Et(mr,sn),mr.prototype.bind=function(fr){sn.prototype.bind.call(this,fr),fr.target=nt.q.TEXTURE_CUBE_MAP},mr.prototype.addBaseTextureAt=function(fr,yr,jr){if(!this.items[yr])throw new Error("Index "+yr+" is out of bounds");if(!this.linkBaseTexture||fr.parentTextureArray||Object.keys(fr._glTextures).length>0){if(!fr.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(fr.resource,yr)}else fr.target=nt.q.TEXTURE_CUBE_MAP_POSITIVE_X+yr,fr.parentTextureArray=this.baseTexture,this.items[yr]=fr;return fr.valid&&!this.valid&&this.resize(fr.realWidth,fr.realHeight),this.items[yr]=fr,this},mr.prototype.upload=function(fr,yr,jr){for(var un=this.itemDirtyIds,$n=0;$n<mr.SIDES;$n++){var Yn=this.items[$n];un[$n]<Yn.dirtyId&&(Yn.valid&&Yn.resource?(Yn.resource.upload(fr,Yn,jr),un[$n]=Yn.dirtyId):un[$n]<-1&&(fr.gl.texImage2D(Yn.target,0,jr.internalFormat,yr.realWidth,yr.realHeight,0,yr.format,jr.type,null),un[$n]=-1))}return!0},mr.test=function(fr){return Array.isArray(fr)&&fr.length===mr.SIDES},mr.SIDES=6,mr})(Nt),Vt=(function(sn){function mr(fr,yr){var jr=this;if(yr=yr||{},!(fr instanceof HTMLImageElement)){var un=new Image;It.crossOrigin(un,fr,yr.crossorigin),un.src=fr,fr=un}return jr=sn.call(this,fr)||this,!fr.complete&&jr._width&&jr._height&&(jr._width=0,jr._height=0),jr.url=fr.src,jr._process=null,jr.preserveBitmap=!1,jr.createBitmap=(yr.createBitmap!==void 0?yr.createBitmap:rt.b.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,jr.alphaMode=typeof yr.alphaMode=="number"?yr.alphaMode:null,jr.bitmap=null,jr._load=null,yr.autoLoad!==!1&&jr.load(),jr}return Et(mr,sn),mr.prototype.load=function(fr){var yr=this;return this._load||(fr!==void 0&&(this.createBitmap=fr),this._load=new Promise(function(jr,un){var $n=yr.source;yr.url=$n.src;var Yn=function(){yr.destroyed||($n.onload=null,$n.onerror=null,yr.resize($n.width,$n.height),yr._load=null,yr.createBitmap?jr(yr.process()):jr(yr))};$n.complete&&$n.src?Yn():($n.onload=Yn,$n.onerror=function(os){un(os),yr.onError.emit(os)})})),this._load},mr.prototype.process=function(){var fr=this,yr=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);var jr=globalThis.createImageBitmap,un=!yr.crossOrigin||yr.crossOrigin==="anonymous";return this._process=fetch(yr.src,{mode:un?"cors":"no-cors"}).then(function($n){return $n.blob()}).then(function($n){return jr($n,0,0,yr.width,yr.height,{premultiplyAlpha:fr.alphaMode===nt.a.UNPACK?"premultiply":"none"})}).then(function($n){return fr.destroyed?Promise.reject():(fr.bitmap=$n,fr.update(),fr._process=null,Promise.resolve(fr))}),this._process},mr.prototype.upload=function(fr,yr,jr){if(typeof this.alphaMode=="number"&&(yr.alphaMode=this.alphaMode),!this.createBitmap)return sn.prototype.upload.call(this,fr,yr,jr);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(sn.prototype.upload.call(this,fr,yr,jr,this.bitmap),!this.preserveBitmap){var un=!0,$n=yr._glTextures;for(var Yn in $n){var os=$n[Yn];if(os!==jr&&os.dirtyId!==yr.dirtyId){un=!1;break}}un&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},mr.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,sn.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},mr.test=function(fr){return typeof fr=="string"||fr instanceof HTMLImageElement},mr})(It),Kt=(function(sn){function mr(fr,yr){var jr=this;return yr=yr||{},(jr=sn.call(this,document.createElement("canvas"))||this)._width=0,jr._height=0,jr.svg=fr,jr.scale=yr.scale||1,jr._overrideWidth=yr.width,jr._overrideHeight=yr.height,jr._resolve=null,jr._crossorigin=yr.crossorigin,jr._load=null,yr.autoLoad!==!1&&jr.load(),jr}return Et(mr,sn),mr.prototype.load=function(){var fr=this;return this._load||(this._load=new Promise(function(yr){if(fr._resolve=function(){fr.resize(fr.source.width,fr.source.height),yr(fr)},mr.SVG_XML.test(fr.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");fr.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(fr.svg)))}fr._loadSvg()})),this._load},mr.prototype._loadSvg=function(){var fr=this,yr=new Image;It.crossOrigin(yr,this.svg,this._crossorigin),yr.src=this.svg,yr.onerror=function(jr){fr._resolve&&(yr.onerror=null,fr.onError.emit(jr))},yr.onload=function(){if(fr._resolve){var jr=yr.width,un=yr.height;if(!jr||!un)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var $n=jr*fr.scale,Yn=un*fr.scale;(fr._overrideWidth||fr._overrideHeight)&&($n=fr._overrideWidth||fr._overrideHeight/un*jr,Yn=fr._overrideHeight||fr._overrideWidth/jr*un),$n=Math.round($n),Yn=Math.round(Yn);var os=fr.source;os.width=$n,os.height=Yn,os._pixiId="canvas_"+Object(st.uid)(),os.getContext("2d").drawImage(yr,0,0,jr,un,0,0,$n,Yn),fr._resolve(),fr._resolve=null}}},mr.getSize=function(fr){var yr=mr.SVG_SIZE.exec(fr),jr={};return yr&&(jr[yr[1]]=Math.round(parseFloat(yr[3])),jr[yr[5]]=Math.round(parseFloat(yr[7]))),jr},mr.prototype.dispose=function(){sn.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},mr.test=function(fr,yr){return yr==="svg"||typeof fr=="string"&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(fr)||typeof fr=="string"&&mr.SVG_XML.test(fr)},mr.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,mr.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,mr})(It),jt=(function(sn){function mr(fr,yr){var jr=this;if(yr=yr||{},!(fr instanceof HTMLVideoElement)){var un=document.createElement("video");un.setAttribute("preload","auto"),un.setAttribute("webkit-playsinline",""),un.setAttribute("playsinline",""),typeof fr=="string"&&(fr=[fr]);var $n=fr[0].src||fr[0];It.crossOrigin(un,$n,yr.crossorigin);for(var Yn=0;Yn<fr.length;++Yn){var os=document.createElement("source"),Vs=fr[Yn],eo=Vs.src,qo=Vs.mime,Po=(eo=eo||fr[Yn]).split("?").shift().toLowerCase(),su=Po.slice(Po.lastIndexOf(".")+1);qo=qo||mr.MIME_TYPES[su]||"video/"+su,os.src=eo,os.type=qo,un.appendChild(os)}fr=un}return(jr=sn.call(this,fr)||this).noSubImage=!0,jr._autoUpdate=!0,jr._isConnectedToTicker=!1,jr._updateFPS=yr.updateFPS||0,jr._msToNextUpdate=0,jr.autoPlay=yr.autoPlay!==!1,jr._load=null,jr._resolve=null,jr._onCanPlay=jr._onCanPlay.bind(jr),jr._onError=jr._onError.bind(jr),yr.autoLoad!==!1&&jr.load(),jr}return Et(mr,sn),mr.prototype.update=function(fr){if(!this.destroyed){var yr=ft.a.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-yr),(!this._updateFPS||this._msToNextUpdate<=0)&&(sn.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},mr.prototype.load=function(){var fr=this;if(this._load)return this._load;var yr=this.source;return(yr.readyState===yr.HAVE_ENOUGH_DATA||yr.readyState===yr.HAVE_FUTURE_DATA)&&yr.width&&yr.height&&(yr.complete=!0),yr.addEventListener("play",this._onPlayStart.bind(this)),yr.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(yr.addEventListener("canplay",this._onCanPlay),yr.addEventListener("canplaythrough",this._onCanPlay),yr.addEventListener("error",this._onError,!0)),this._load=new Promise(function(jr){fr.valid?jr(fr):(fr._resolve=jr,yr.load())}),this._load},mr.prototype._onError=function(fr){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(fr)},mr.prototype._isSourcePlaying=function(){var fr=this.source;return fr.currentTime>0&&fr.paused===!1&&fr.ended===!1&&fr.readyState>2},mr.prototype._isSourceReady=function(){var fr=this.source;return fr.readyState===3||fr.readyState===4},mr.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(ft.a.shared.add(this.update,this),this._isConnectedToTicker=!0)},mr.prototype._onPlayStop=function(){this._isConnectedToTicker&&(ft.a.shared.remove(this.update,this),this._isConnectedToTicker=!1)},mr.prototype._onCanPlay=function(){var fr=this.source;fr.removeEventListener("canplay",this._onCanPlay),fr.removeEventListener("canplaythrough",this._onCanPlay);var yr=this.valid;this.resize(fr.videoWidth,fr.videoHeight),!yr&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&fr.play()},mr.prototype.dispose=function(){this._isConnectedToTicker&&(ft.a.shared.remove(this.update,this),this._isConnectedToTicker=!1);var fr=this.source;fr&&(fr.removeEventListener("error",this._onError,!0),fr.pause(),fr.src="",fr.load()),sn.prototype.dispose.call(this)},Object.defineProperty(mr.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(fr){fr!==this._autoUpdate&&(this._autoUpdate=fr,!this._autoUpdate&&this._isConnectedToTicker?(ft.a.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(ft.a.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(fr){fr!==this._updateFPS&&(this._updateFPS=fr)},enumerable:!1,configurable:!0}),mr.test=function(fr,yr){return globalThis.HTMLVideoElement&&fr instanceof HTMLVideoElement||mr.TYPES.indexOf(yr)>-1},mr.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],mr.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},mr})(It),Ut=(function(sn){function mr(fr){return sn.call(this,fr)||this}return Et(mr,sn),mr.test=function(fr){return!!globalThis.createImageBitmap&&fr instanceof ImageBitmap},mr})(It);mt.push(Vt,Ut,Ft,jt,Kt,Tt,qt,Pt);var Ot=(function(sn){function mr(){return sn!==null&&sn.apply(this,arguments)||this}return Et(mr,sn),mr.prototype.upload=function(fr,yr,jr){var un=fr.gl;un.pixelStorei(un.UNPACK_PREMULTIPLY_ALPHA_WEBGL,yr.alphaMode===nt.a.UNPACK);var $n=yr.realWidth,Yn=yr.realHeight;return jr.width===$n&&jr.height===Yn?un.texSubImage2D(yr.target,0,0,0,$n,Yn,yr.format,jr.type,this.data):(jr.width=$n,jr.height=Yn,un.texImage2D(yr.target,0,jr.internalFormat,$n,Yn,0,yr.format,jr.type,this.data)),!0},mr})(Tt),Wt=(function(){function sn(mr,fr){this.width=Math.round(mr||100),this.height=Math.round(fr||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 dt.a("disposeFramebuffer"),this.multisample=nt.l.NONE}return Object.defineProperty(sn.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),sn.prototype.addColorTexture=function(mr,fr){return mr===void 0&&(mr=0),this.colorTextures[mr]=fr||new At(null,{scaleMode:nt.p.NEAREST,resolution:1,mipmap:nt.k.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},sn.prototype.addDepthTexture=function(mr){return this.depthTexture=mr||new At(new Ot(null,{width:this.width,height:this.height}),{scaleMode:nt.p.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:nt.k.OFF,format:nt.h.DEPTH_COMPONENT,type:nt.r.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},sn.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},sn.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},sn.prototype.resize=function(mr,fr){if(mr=Math.round(mr),fr=Math.round(fr),mr!==this.width||fr!==this.height){this.width=mr,this.height=fr,this.dirtyId++,this.dirtySize++;for(var yr=0;yr<this.colorTextures.length;yr++){var jr=this.colorTextures[yr],un=jr.resolution;jr.setSize(mr/un,fr/un)}this.depthTexture&&(un=this.depthTexture.resolution,this.depthTexture.setSize(mr/un,fr/un))}},sn.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},sn.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},sn})(),Bt=(function(sn){function mr(fr){fr===void 0&&(fr={});var yr=this;if(typeof fr=="number"){var jr=arguments[0],un=arguments[1],$n=arguments[2],Yn=arguments[3];fr={width:jr,height:un,scaleMode:$n,resolution:Yn}}return fr.width=fr.width||100,fr.height=fr.height||100,fr.multisample=fr.multisample!==void 0?fr.multisample:nt.l.NONE,(yr=sn.call(this,null,fr)||this).mipmap=nt.k.OFF,yr.valid=!0,yr.clearColor=[0,0,0,0],yr.framebuffer=new Wt(yr.realWidth,yr.realHeight).addColorTexture(0,yr),yr.framebuffer.multisample=fr.multisample,yr.maskStack=[],yr.filterStack=[{}],yr}return Et(mr,sn),mr.prototype.resize=function(fr,yr){this.framebuffer.resize(fr*this.resolution,yr*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},mr.prototype.dispose=function(){this.framebuffer.dispose(),sn.prototype.dispose.call(this)},mr.prototype.destroy=function(){sn.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},mr})(At),tr=(function(){function sn(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return sn.prototype.set=function(mr,fr,yr){var jr=fr.width,un=fr.height;if(yr){var $n=mr.width/2/jr,Yn=mr.height/2/un,os=mr.x/jr+$n,Vs=mr.y/un+Yn;yr=ht.n.add(yr,ht.n.NW),this.x0=os+$n*ht.n.uX(yr),this.y0=Vs+Yn*ht.n.uY(yr),yr=ht.n.add(yr,2),this.x1=os+$n*ht.n.uX(yr),this.y1=Vs+Yn*ht.n.uY(yr),yr=ht.n.add(yr,2),this.x2=os+$n*ht.n.uX(yr),this.y2=Vs+Yn*ht.n.uY(yr),yr=ht.n.add(yr,2),this.x3=os+$n*ht.n.uX(yr),this.y3=Vs+Yn*ht.n.uY(yr)}else this.x0=mr.x/jr,this.y0=mr.y/un,this.x1=(mr.x+mr.width)/jr,this.y1=mr.y/un,this.x2=(mr.x+mr.width)/jr,this.y2=(mr.y+mr.height)/un,this.x3=mr.x/jr,this.y3=(mr.y+mr.height)/un;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},sn.prototype.toString=function(){return"[@pixi/core:TextureUvs x0="+this.x0+" y0="+this.y0+" x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" y2="+this.y2+" x3="+this.x3+" y3="+this.y3+"]"},sn})(),Jt=new tr;function ar(sn){sn.destroy=function(){},sn.on=function(){},sn.once=function(){},sn.emit=function(){}}var pr=(function(sn){function mr(fr,yr,jr,un,$n,Yn){var os=sn.call(this)||this;if(os.noFrame=!1,yr||(os.noFrame=!0,yr=new ht.j(0,0,1,1)),fr instanceof mr&&(fr=fr.baseTexture),os.baseTexture=fr,os._frame=yr,os.trim=un,os.valid=!1,os._uvs=Jt,os.uvMatrix=null,os.orig=jr||yr,os._rotate=Number($n||0),$n===!0)os._rotate=2;else if(os._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return os.defaultAnchor=Yn?new ht.g(Yn.x,Yn.y):new ht.g(0,0),os._updateID=0,os.textureCacheIds=[],fr.valid?os.noFrame?fr.valid&&os.onBaseTextureUpdated(fr):os.frame=yr:fr.once("loaded",os.onBaseTextureUpdated,os),os.noFrame&&fr.on("update",os.onBaseTextureUpdated,os),os}return Et(mr,sn),mr.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},mr.prototype.onBaseTextureUpdated=function(fr){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=fr.width,this._frame.height=fr.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},mr.prototype.destroy=function(fr){if(this.baseTexture){if(fr){var yr=this.baseTexture.resource;yr&&yr.url&&st.TextureCache[yr.url]&&mr.removeFromCache(yr.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,mr.removeFromCache(this),this.textureCacheIds=null},mr.prototype.clone=function(){var fr=this._frame.clone(),yr=this._frame===this.orig?fr:this.orig.clone(),jr=new mr(this.baseTexture,!this.noFrame&&fr,yr,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(jr._frame=fr),jr},mr.prototype.updateUvs=function(){this._uvs===Jt&&(this._uvs=new tr),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},mr.from=function(fr,yr,jr){yr===void 0&&(yr={}),jr===void 0&&(jr=rt.b.STRICT_TEXTURE_CACHE);var un=typeof fr=="string",$n=null;if(un)$n=fr;else if(fr instanceof At){if(!fr.cacheId){var Yn=yr&&yr.pixiIdPrefix||"pixiid";fr.cacheId=Yn+"-"+Object(st.uid)(),At.addToCache(fr,fr.cacheId)}$n=fr.cacheId}else fr._pixiId||(Yn=yr&&yr.pixiIdPrefix||"pixiid",fr._pixiId=Yn+"_"+Object(st.uid)()),$n=fr._pixiId;var os=st.TextureCache[$n];if(un&&jr&&!os)throw new Error('The cacheId "'+$n+'" does not exist in TextureCache.');return os||fr instanceof At?!os&&fr instanceof At&&(os=new mr(fr),mr.addToCache(os,$n)):(yr.resolution||(yr.resolution=Object(st.getResolutionOfUrl)(fr)),(os=new mr(new At(fr,yr))).baseTexture.cacheId=$n,At.addToCache(os.baseTexture,$n),mr.addToCache(os,$n)),os},mr.fromURL=function(fr,yr){var jr=Object.assign({autoLoad:!1},yr?.resourceOptions),un=mr.from(fr,Object.assign({resourceOptions:jr},yr),!1),$n=un.baseTexture.resource;return un.baseTexture.valid?Promise.resolve(un):$n.load().then(function(){return Promise.resolve(un)})},mr.fromBuffer=function(fr,yr,jr,un){return new mr(At.fromBuffer(fr,yr,jr,un))},mr.fromLoader=function(fr,yr,jr,un){var $n=new At(fr,Object.assign({scaleMode:rt.b.SCALE_MODE,resolution:Object(st.getResolutionOfUrl)(yr)},un)),Yn=$n.resource;Yn instanceof Vt&&(Yn.url=yr);var os=new mr($n);return jr||(jr=yr),At.addToCache(os.baseTexture,jr),mr.addToCache(os,jr),jr!==yr&&(At.addToCache(os.baseTexture,yr),mr.addToCache(os,yr)),os.baseTexture.valid?Promise.resolve(os):new Promise(function(Vs){os.baseTexture.once("loaded",function(){return Vs(os)})})},mr.addToCache=function(fr,yr){yr&&(fr.textureCacheIds.indexOf(yr)===-1&&fr.textureCacheIds.push(yr),st.TextureCache[yr]&&console.warn("Texture added to the cache with an id ["+yr+"] that already had an entry"),st.TextureCache[yr]=fr)},mr.removeFromCache=function(fr){if(typeof fr=="string"){var yr=st.TextureCache[fr];if(yr){var jr=yr.textureCacheIds.indexOf(fr);return jr>-1&&yr.textureCacheIds.splice(jr,1),delete st.TextureCache[fr],yr}}else if(fr&&fr.textureCacheIds){for(var un=0;un<fr.textureCacheIds.length;++un)st.TextureCache[fr.textureCacheIds[un]]===fr&&delete st.TextureCache[fr.textureCacheIds[un]];return fr.textureCacheIds.length=0,fr}return null},Object.defineProperty(mr.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"frame",{get:function(){return this._frame},set:function(fr){this._frame=fr,this.noFrame=!1;var yr=fr.x,jr=fr.y,un=fr.width,$n=fr.height,Yn=yr+un>this.baseTexture.width,os=jr+$n>this.baseTexture.height;if(Yn||os){var Vs=Yn&&os?"and":"or",eo="X: "+yr+" + "+un+" = "+(yr+un)+" > "+this.baseTexture.width,qo="Y: "+jr+" + "+$n+" = "+(jr+$n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+eo+" "+Vs+" "+qo)}this.valid=un&&$n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=fr),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"rotate",{get:function(){return this._rotate},set:function(fr){this._rotate=fr,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),mr.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(mr,"EMPTY",{get:function(){return mr._EMPTY||(mr._EMPTY=new mr(new At),ar(mr._EMPTY),ar(mr._EMPTY.baseTexture)),mr._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(mr,"WHITE",{get:function(){if(!mr._WHITE){var fr=document.createElement("canvas"),yr=fr.getContext("2d");fr.width=16,fr.height=16,yr.fillStyle="white",yr.fillRect(0,0,16,16),mr._WHITE=new mr(new At(new Ft(fr))),ar(mr._WHITE),ar(mr._WHITE.baseTexture)}return mr._WHITE},enumerable:!1,configurable:!0}),mr})(st.EventEmitter),cr=(function(sn){function mr(fr,yr){var jr=sn.call(this,fr,yr)||this;return jr.valid=!0,jr.filterFrame=null,jr.filterPoolKey=null,jr.updateUvs(),jr}return Et(mr,sn),Object.defineProperty(mr.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(fr){this.framebuffer.multisample=fr},enumerable:!1,configurable:!0}),mr.prototype.resize=function(fr,yr,jr){jr===void 0&&(jr=!0);var un=this.baseTexture.resolution,$n=Math.round(fr*un)/un,Yn=Math.round(yr*un)/un;this.valid=$n>0&&Yn>0,this._frame.width=this.orig.width=$n,this._frame.height=this.orig.height=Yn,jr&&this.baseTexture.resize($n,Yn),this.updateUvs()},mr.prototype.setResolution=function(fr){var yr=this.baseTexture;yr.resolution!==fr&&(yr.setResolution(fr),this.resize(yr.width,yr.height,!1))},mr.create=function(fr){for(var yr=arguments,jr=[],un=1;un<arguments.length;un++)jr[un-1]=yr[un];return typeof fr=="number"&&(Object(st.deprecation)("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),fr={width:fr,height:jr[0],scaleMode:jr[1],resolution:jr[2]}),new mr(new Bt(fr))},mr})(pr),gr=(function(){function sn(mr){this.texturePool={},this.textureOptions=mr||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return sn.prototype.createTexture=function(mr,fr,yr){yr===void 0&&(yr=nt.l.NONE);var jr=new Bt(Object.assign({width:mr,height:fr,resolution:1,multisample:yr},this.textureOptions));return new cr(jr)},sn.prototype.getOptimalTexture=function(mr,fr,yr,jr){var un;yr===void 0&&(yr=1),jr===void 0&&(jr=nt.l.NONE),mr=Math.ceil(mr*yr-1e-6),fr=Math.ceil(fr*yr-1e-6),this.enableFullScreen&&mr===this._pixelsWidth&&fr===this._pixelsHeight?un=jr>1?-jr:-1:(un=((65535&(mr=Object(st.nextPow2)(mr)))<<16|65535&(fr=Object(st.nextPow2)(fr)))>>>0,jr>1&&(un+=4294967296*jr)),this.texturePool[un]||(this.texturePool[un]=[]);var $n=this.texturePool[un].pop();return $n||($n=this.createTexture(mr,fr,jr)),$n.filterPoolKey=un,$n.setResolution(yr),$n},sn.prototype.getFilterTexture=function(mr,fr,yr){var jr=this.getOptimalTexture(mr.width,mr.height,fr||mr.resolution,yr||nt.l.NONE);return jr.filterFrame=mr.filterFrame,jr},sn.prototype.returnTexture=function(mr){var fr=mr.filterPoolKey;mr.filterFrame=null,this.texturePool[fr].push(mr)},sn.prototype.returnFilterTexture=function(mr){this.returnTexture(mr)},sn.prototype.clear=function(mr){if(mr=mr!==!1)for(var fr in this.texturePool){var yr=this.texturePool[fr];if(yr)for(var jr=0;jr<yr.length;jr++)yr[jr].destroy(!0)}this.texturePool={}},sn.prototype.setScreenSize=function(mr){if(mr.width!==this._pixelsWidth||mr.height!==this._pixelsHeight){for(var fr in this.enableFullScreen=mr.width>0&&mr.height>0,this.texturePool)if(Number(fr)<0){var yr=this.texturePool[fr];if(yr)for(var jr=0;jr<yr.length;jr++)yr[jr].destroy(!0);this.texturePool[fr]=[]}this._pixelsWidth=mr.width,this._pixelsHeight=mr.height}},sn.SCREEN_KEY=-1,sn})(),Sr=(function(){function sn(mr,fr,yr,jr,un,$n,Yn){fr===void 0&&(fr=0),yr===void 0&&(yr=!1),jr===void 0&&(jr=nt.r.FLOAT),this.buffer=mr,this.size=fr,this.normalized=yr,this.type=jr,this.stride=un,this.start=$n,this.instance=Yn}return sn.prototype.destroy=function(){this.buffer=null},sn.from=function(mr,fr,yr,jr,un){return new sn(mr,fr,yr,jr,un)},sn})(),Er=0,Vr=(function(){function sn(mr,fr,yr){fr===void 0&&(fr=!0),yr===void 0&&(yr=!1),this.data=mr||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=yr,this.static=fr,this.id=Er++,this.disposeRunner=new dt.a("disposeBuffer")}return sn.prototype.update=function(mr){mr instanceof Array&&(mr=new Float32Array(mr)),this.data=mr||this.data,this._updateID++},sn.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},sn.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(sn.prototype,"index",{get:function(){return this.type===nt.d.ELEMENT_ARRAY_BUFFER},set:function(mr){this.type=mr?nt.d.ELEMENT_ARRAY_BUFFER:nt.d.ARRAY_BUFFER},enumerable:!1,configurable:!0}),sn.from=function(mr){return mr instanceof Array&&(mr=new Float32Array(mr)),new sn(mr)},sn})(),Wr={Float32Array,Uint32Array,Int32Array,Uint8Array},Mr={5126:4,5123:2,5121:1},Nr=0,Yr={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},Or=(function(){function sn(mr,fr){mr===void 0&&(mr=[]),fr===void 0&&(fr={}),this.buffers=mr,this.indexBuffer=null,this.attributes=fr,this.glVertexArrayObjects={},this.id=Nr++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new dt.a("disposeGeometry"),this.refCount=0}return sn.prototype.addAttribute=function(mr,fr,yr,jr,un,$n,Yn,os){if(yr===void 0&&(yr=0),jr===void 0&&(jr=!1),os===void 0&&(os=!1),!fr)throw new Error("You must pass a buffer when creating an attribute");fr instanceof Vr||(fr instanceof Array&&(fr=new Float32Array(fr)),fr=new Vr(fr));var Vs=mr.split("|");if(Vs.length>1){for(var eo=0;eo<Vs.length;eo++)this.addAttribute(Vs[eo],fr,yr,jr,un);return this}var qo=this.buffers.indexOf(fr);return qo===-1&&(this.buffers.push(fr),qo=this.buffers.length-1),this.attributes[mr]=new Sr(qo,yr,jr,un,$n,Yn,os),this.instanced=this.instanced||os,this},sn.prototype.getAttribute=function(mr){return this.attributes[mr]},sn.prototype.getBuffer=function(mr){return this.buffers[this.getAttribute(mr).buffer]},sn.prototype.addIndex=function(mr){return mr instanceof Vr||(mr instanceof Array&&(mr=new Uint16Array(mr)),mr=new Vr(mr)),mr.type=nt.d.ELEMENT_ARRAY_BUFFER,this.indexBuffer=mr,this.buffers.indexOf(mr)===-1&&this.buffers.push(mr),this},sn.prototype.getIndex=function(){return this.indexBuffer},sn.prototype.interleave=function(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;var mr,fr=[],yr=[],jr=new Vr;for(mr in this.attributes){var un=this.attributes[mr],$n=this.buffers[un.buffer];fr.push($n.data),yr.push(un.size*Mr[un.type]/4),un.buffer=0}for(jr.data=(function(Yn,os){for(var Vs=0,eo=0,qo={},Po=0;Po<Yn.length;Po++)eo+=os[Po],Vs+=Yn[Po].length;var su=new ArrayBuffer(4*Vs),mu=null,zu=0;for(Po=0;Po<Yn.length;Po++){var lu=os[Po],vl=Yn[Po],up=Object(st.getBufferType)(vl);qo[up]||(qo[up]=new Wr[up](su)),mu=qo[up];for(var _c=0;_c<vl.length;_c++)mu[(_c/lu|0)*eo+zu+_c%lu]=vl[_c];zu+=lu}return new Float32Array(su)})(fr,yr),mr=0;mr<this.buffers.length;mr++)this.buffers[mr]!==this.indexBuffer&&this.buffers[mr].destroy();return this.buffers=[jr],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},sn.prototype.getSize=function(){for(var mr in this.attributes){var fr=this.attributes[mr];return this.buffers[fr.buffer].data.length/(fr.stride/4||fr.size)}return 0},sn.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},sn.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},sn.prototype.clone=function(){for(var mr=new sn,fr=0;fr<this.buffers.length;fr++)mr.buffers[fr]=new Vr(this.buffers[fr].data.slice(0));for(var fr in this.attributes){var yr=this.attributes[fr];mr.attributes[fr]=new Sr(yr.buffer,yr.size,yr.normalized,yr.type,yr.stride,yr.start,yr.instance)}return this.indexBuffer&&(mr.indexBuffer=mr.buffers[this.buffers.indexOf(this.indexBuffer)],mr.indexBuffer.type=nt.d.ELEMENT_ARRAY_BUFFER),mr},sn.merge=function(mr){for(var fr,yr=new sn,jr=[],un=[],$n=[],Yn=0;Yn<mr.length;Yn++){fr=mr[Yn];for(var os=0;os<fr.buffers.length;os++)un[os]=un[os]||0,un[os]+=fr.buffers[os].data.length,$n[os]=0}for(Yn=0;Yn<fr.buffers.length;Yn++)jr[Yn]=new Yr[Object(st.getBufferType)(fr.buffers[Yn].data)](un[Yn]),yr.buffers[Yn]=new Vr(jr[Yn]);for(Yn=0;Yn<mr.length;Yn++)for(fr=mr[Yn],os=0;os<fr.buffers.length;os++)jr[os].set(fr.buffers[os].data,$n[os]),$n[os]+=fr.buffers[os].data.length;if(yr.attributes=fr.attributes,fr.indexBuffer){yr.indexBuffer=yr.buffers[fr.buffers.indexOf(fr.indexBuffer)],yr.indexBuffer.type=nt.d.ELEMENT_ARRAY_BUFFER;var Vs=0,eo=0,qo=0,Po=0;for(Yn=0;Yn<fr.buffers.length;Yn++)if(fr.buffers[Yn]!==fr.indexBuffer){Po=Yn;break}for(var Yn in fr.attributes){var su=fr.attributes[Yn];(0|su.buffer)===Po&&(eo+=su.size*Mr[su.type]/4)}for(Yn=0;Yn<mr.length;Yn++){var mu=mr[Yn].indexBuffer.data;for(os=0;os<mu.length;os++)yr.indexBuffer.data[os+qo]+=Vs;Vs+=mr[Yn].buffers[Po].data.length/eo,qo+=mu.length}}return yr},sn})(),Ar=(function(sn){function mr(){var fr=sn.call(this)||this;return fr.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),fr}return Et(mr,sn),mr})(Or),Qr=(function(sn){function mr(){var fr=sn.call(this)||this;return fr.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),fr.uvs=new Float32Array([0,0,1,0,1,1,0,1]),fr.vertexBuffer=new Vr(fr.vertices),fr.uvBuffer=new Vr(fr.uvs),fr.addAttribute("aVertexPosition",fr.vertexBuffer).addAttribute("aTextureCoord",fr.uvBuffer).addIndex([0,1,2,0,2,3]),fr}return Et(mr,sn),mr.prototype.map=function(fr,yr){var jr=0,un=0;return this.uvs[0]=jr,this.uvs[1]=un,this.uvs[2]=jr+yr.width/fr.width,this.uvs[3]=un,this.uvs[4]=jr+yr.width/fr.width,this.uvs[5]=un+yr.height/fr.height,this.uvs[6]=jr,this.uvs[7]=un+yr.height/fr.height,jr=yr.x,un=yr.y,this.vertices[0]=jr,this.vertices[1]=un,this.vertices[2]=jr+yr.width,this.vertices[3]=un,this.vertices[4]=jr+yr.width,this.vertices[5]=un+yr.height,this.vertices[6]=jr,this.vertices[7]=un+yr.height,this.invalidate(),this},mr.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},mr})(Or),hn=0,Sn=(function(){function sn(mr,fr,yr){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=hn++,this.static=!!fr,this.ubo=!!yr,mr instanceof Vr?(this.buffer=mr,this.buffer.type=nt.d.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=mr,this.ubo&&(this.buffer=new Vr(new Float32Array(1)),this.buffer.type=nt.d.UNIFORM_BUFFER,this.autoManage=!0))}return sn.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},sn.prototype.add=function(mr,fr,yr){if(this.ubo)throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them");this.uniforms[mr]=new sn(fr,yr)},sn.from=function(mr,fr,yr){return new sn(mr,fr,yr)},sn.uboFrom=function(mr,fr){return new sn(mr,fr==null||fr,!0)},sn})(),Kr=(function(){function sn(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=nt.l.NONE,this.sourceFrame=new ht.j,this.destinationFrame=new ht.j,this.bindingSourceFrame=new ht.j,this.bindingDestinationFrame=new ht.j,this.filters=[],this.transform=null}return sn.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},sn})(),Hn=[new ht.g,new ht.g,new ht.g,new ht.g],ln=new ht.d,kn=(function(){function sn(mr){this.renderer=mr,this.defaultFilterStack=[{}],this.texturePool=new gr,this.texturePool.setScreenSize(mr.view),this.statePool=[],this.quad=new Ar,this.quadUv=new Qr,this.tempRect=new ht.j,this.activeState={},this.globalUniforms=new Sn({outputFrame:new ht.j,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return sn.prototype.push=function(mr,fr){for(var yr,jr,un=this.renderer,$n=this.defaultFilterStack,Yn=this.statePool.pop()||new Kr,os=this.renderer.renderTexture,Vs=fr[0].resolution,eo=fr[0].multisample,qo=fr[0].padding,Po=fr[0].autoFit,su=(yr=fr[0].legacy)===null||yr===void 0||yr,mu=1;mu<fr.length;mu++){var zu=fr[mu];Vs=Math.min(Vs,zu.resolution),eo=Math.min(eo,zu.multisample),qo=this.useMaxPadding?Math.max(qo,zu.padding):qo+zu.padding,Po=Po&&zu.autoFit,su=su||(jr=zu.legacy)===null||jr===void 0||jr}$n.length===1&&(this.defaultFilterStack[0].renderTexture=os.current),$n.push(Yn),Yn.resolution=Vs,Yn.multisample=eo,Yn.legacy=su,Yn.target=mr,Yn.sourceFrame.copyFrom(mr.filterArea||mr.getBounds(!0)),Yn.sourceFrame.pad(qo);var lu=this.tempRect.copyFrom(os.sourceFrame);un.projection.transform&&this.transformAABB(ln.copyFrom(un.projection.transform).invert(),lu),Po?(Yn.sourceFrame.fit(lu),(Yn.sourceFrame.width<=0||Yn.sourceFrame.height<=0)&&(Yn.sourceFrame.width=0,Yn.sourceFrame.height=0)):Yn.sourceFrame.intersects(lu)||(Yn.sourceFrame.width=0,Yn.sourceFrame.height=0),this.roundFrame(Yn.sourceFrame,os.current?os.current.resolution:un.resolution,os.sourceFrame,os.destinationFrame,un.projection.transform),Yn.renderTexture=this.getOptimalFilterTexture(Yn.sourceFrame.width,Yn.sourceFrame.height,Vs,eo),Yn.filters=fr,Yn.destinationFrame.width=Yn.renderTexture.width,Yn.destinationFrame.height=Yn.renderTexture.height;var vl=this.tempRect;vl.x=0,vl.y=0,vl.width=Yn.sourceFrame.width,vl.height=Yn.sourceFrame.height,Yn.renderTexture.filterFrame=Yn.sourceFrame,Yn.bindingSourceFrame.copyFrom(os.sourceFrame),Yn.bindingDestinationFrame.copyFrom(os.destinationFrame),Yn.transform=un.projection.transform,un.projection.transform=null,os.bind(Yn.renderTexture,Yn.sourceFrame,vl),un.framebuffer.clear(0,0,0,0)},sn.prototype.pop=function(){var mr=this.defaultFilterStack,fr=mr.pop(),yr=fr.filters;this.activeState=fr;var jr=this.globalUniforms.uniforms;jr.outputFrame=fr.sourceFrame,jr.resolution=fr.resolution;var un=jr.inputSize,$n=jr.inputPixel,Yn=jr.inputClamp;if(un[0]=fr.destinationFrame.width,un[1]=fr.destinationFrame.height,un[2]=1/un[0],un[3]=1/un[1],$n[0]=Math.round(un[0]*fr.resolution),$n[1]=Math.round(un[1]*fr.resolution),$n[2]=1/$n[0],$n[3]=1/$n[1],Yn[0]=.5*$n[2],Yn[1]=.5*$n[3],Yn[2]=fr.sourceFrame.width*un[2]-.5*$n[2],Yn[3]=fr.sourceFrame.height*un[3]-.5*$n[3],fr.legacy){var os=jr.filterArea;os[0]=fr.destinationFrame.width,os[1]=fr.destinationFrame.height,os[2]=fr.sourceFrame.x,os[3]=fr.sourceFrame.y,jr.filterClamp=jr.inputClamp}this.globalUniforms.update();var Vs=mr[mr.length-1];if(this.renderer.framebuffer.blit(),yr.length===1)yr[0].apply(this,fr.renderTexture,Vs.renderTexture,nt.e.BLEND,fr),this.returnFilterTexture(fr.renderTexture);else{var eo=fr.renderTexture,qo=this.getOptimalFilterTexture(eo.width,eo.height,fr.resolution);qo.filterFrame=eo.filterFrame;var Po=0;for(Po=0;Po<yr.length-1;++Po){Po===1&&fr.multisample>1&&((qo=this.getOptimalFilterTexture(eo.width,eo.height,fr.resolution)).filterFrame=eo.filterFrame),yr[Po].apply(this,eo,qo,nt.e.CLEAR,fr);var su=eo;eo=qo,qo=su}yr[Po].apply(this,eo,Vs.renderTexture,nt.e.BLEND,fr),Po>1&&fr.multisample>1&&this.returnFilterTexture(fr.renderTexture),this.returnFilterTexture(eo),this.returnFilterTexture(qo)}fr.clear(),this.statePool.push(fr)},sn.prototype.bindAndClear=function(mr,fr){fr===void 0&&(fr=nt.e.CLEAR);var yr=this.renderer,jr=yr.renderTexture,un=yr.state;if(mr===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,mr&&mr.filterFrame){var $n=this.tempRect;$n.x=0,$n.y=0,$n.width=mr.filterFrame.width,$n.height=mr.filterFrame.height,jr.bind(mr,mr.filterFrame,$n)}else mr!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?jr.bind(mr):this.renderer.renderTexture.bind(mr,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var Yn=1&un.stateId||this.forceClear;(fr===nt.e.CLEAR||fr===nt.e.BLIT&&Yn)&&this.renderer.framebuffer.clear(0,0,0,0)},sn.prototype.applyFilter=function(mr,fr,yr,jr){var un=this.renderer;un.state.set(mr.state),this.bindAndClear(yr,jr),mr.uniforms.uSampler=fr,mr.uniforms.filterGlobals=this.globalUniforms,un.shader.bind(mr),mr.legacy=!!mr.program.attributeData.aTextureCoord,mr.legacy?(this.quadUv.map(fr._frame,fr.filterFrame),un.geometry.bind(this.quadUv),un.geometry.draw(nt.f.TRIANGLES)):(un.geometry.bind(this.quad),un.geometry.draw(nt.f.TRIANGLE_STRIP))},sn.prototype.calculateSpriteMatrix=function(mr,fr){var yr=this.activeState,jr=yr.sourceFrame,un=yr.destinationFrame,$n=fr._texture.orig,Yn=mr.set(un.width,0,0,un.height,jr.x,jr.y),os=fr.worldTransform.copyTo(ht.d.TEMP_MATRIX);return os.invert(),Yn.prepend(os),Yn.scale(1/$n.width,1/$n.height),Yn.translate(fr.anchor.x,fr.anchor.y),Yn},sn.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},sn.prototype.getOptimalFilterTexture=function(mr,fr,yr,jr){return yr===void 0&&(yr=1),jr===void 0&&(jr=nt.l.NONE),this.texturePool.getOptimalTexture(mr,fr,yr,jr)},sn.prototype.getFilterTexture=function(mr,fr,yr){if(typeof mr=="number"){var jr=mr;mr=fr,fr=jr}mr=mr||this.activeState.renderTexture;var un=this.texturePool.getOptimalTexture(mr.width,mr.height,fr||mr.resolution,yr||nt.l.NONE);return un.filterFrame=mr.filterFrame,un},sn.prototype.returnFilterTexture=function(mr){this.texturePool.returnTexture(mr)},sn.prototype.emptyPool=function(){this.texturePool.clear(!0)},sn.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},sn.prototype.transformAABB=function(mr,fr){var yr=Hn[0],jr=Hn[1],un=Hn[2],$n=Hn[3];yr.set(fr.left,fr.top),jr.set(fr.left,fr.bottom),un.set(fr.right,fr.top),$n.set(fr.right,fr.bottom),mr.apply(yr,yr),mr.apply(jr,jr),mr.apply(un,un),mr.apply($n,$n);var Yn=Math.min(yr.x,jr.x,un.x,$n.x),os=Math.min(yr.y,jr.y,un.y,$n.y),Vs=Math.max(yr.x,jr.x,un.x,$n.x),eo=Math.max(yr.y,jr.y,un.y,$n.y);fr.x=Yn,fr.y=os,fr.width=Vs-Yn,fr.height=eo-os},sn.prototype.roundFrame=function(mr,fr,yr,jr,un){if(!(mr.width<=0||mr.height<=0||yr.width<=0||yr.height<=0)){if(un){var $n=un.a,Yn=un.b,os=un.c,Vs=un.d;if((Math.abs(Yn)>1e-4||Math.abs(os)>1e-4)&&(Math.abs($n)>1e-4||Math.abs(Vs)>1e-4))return}(un=un?ln.copyFrom(un):ln.identity()).translate(-yr.x,-yr.y).scale(jr.width/yr.width,jr.height/yr.height).translate(jr.x,jr.y),this.transformAABB(un,mr),mr.ceil(fr),this.transformAABB(un.invert(),mr)}},sn})(),xn=(function(){function sn(mr){this.renderer=mr}return sn.prototype.flush=function(){},sn.prototype.destroy=function(){this.renderer=null},sn.prototype.start=function(){},sn.prototype.stop=function(){this.flush()},sn.prototype.render=function(mr){},sn})(),An=(function(){function sn(mr){this.renderer=mr,this.emptyRenderer=new xn(mr),this.currentRenderer=this.emptyRenderer}return sn.prototype.setObjectRenderer=function(mr){this.currentRenderer!==mr&&(this.currentRenderer.stop(),this.currentRenderer=mr,this.currentRenderer.start())},sn.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},sn.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},sn.prototype.copyBoundTextures=function(mr,fr){for(var yr=this.renderer.texture.boundTextures,jr=fr-1;jr>=0;--jr)mr[jr]=yr[jr]||null,mr[jr]&&(mr[jr]._batchLocation=jr)},sn.prototype.boundArray=function(mr,fr,yr,jr){for(var un=mr.elements,$n=mr.ids,Yn=mr.count,os=0,Vs=0;Vs<Yn;Vs++){var eo=un[Vs],qo=eo._batchLocation;if(qo>=0&&qo<jr&&fr[qo]===eo)$n[Vs]=qo;else for(;os<jr;){var Po=fr[os];if(!Po||Po._batchEnabled!==yr||Po._batchLocation!==os){$n[Vs]=os,eo._batchLocation=os,fr[os]=eo;break}os++}}},sn.prototype.destroy=function(){this.renderer=null},sn})(),rs=0,qs=(function(){function sn(mr){this.renderer=mr,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),mr.view.addEventListener("webglcontextlost",this.handleContextLost,!1),mr.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(sn.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),sn.prototype.contextChange=function(mr){this.gl=mr,this.renderer.gl=mr,this.renderer.CONTEXT_UID=rs++,mr.isContextLost()&&mr.getExtension("WEBGL_lose_context")&&mr.getExtension("WEBGL_lose_context").restoreContext()},sn.prototype.initFromContext=function(mr){this.gl=mr,this.validateContext(mr),this.renderer.gl=mr,this.renderer.CONTEXT_UID=rs++,this.renderer.runners.contextChange.emit(mr)},sn.prototype.initFromOptions=function(mr){var fr=this.createContext(this.renderer.view,mr);this.initFromContext(fr)},sn.prototype.createContext=function(mr,fr){var yr;if(rt.b.PREFER_ENV>=nt.g.WEBGL2&&(yr=mr.getContext("webgl2",fr)),yr)this.webGLVersion=2;else if(this.webGLVersion=1,!(yr=mr.getContext("webgl",fr)||mr.getContext("experimental-webgl",fr)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=yr,this.getExtensions(),this.gl},sn.prototype.getExtensions=function(){var mr=this.gl,fr={anisotropicFiltering:mr.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:mr.getExtension("OES_texture_float_linear"),s3tc:mr.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:mr.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:mr.getExtension("WEBGL_compressed_texture_etc"),etc1:mr.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:mr.getExtension("WEBGL_compressed_texture_pvrtc")||mr.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:mr.getExtension("WEBGL_compressed_texture_atc"),astc:mr.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,fr,{drawBuffers:mr.getExtension("WEBGL_draw_buffers"),depthTexture:mr.getExtension("WEBGL_depth_texture"),loseContext:mr.getExtension("WEBGL_lose_context"),vertexArrayObject:mr.getExtension("OES_vertex_array_object")||mr.getExtension("MOZ_OES_vertex_array_object")||mr.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:mr.getExtension("OES_element_index_uint"),floatTexture:mr.getExtension("OES_texture_float"),floatTextureLinear:mr.getExtension("OES_texture_float_linear"),textureHalfFloat:mr.getExtension("OES_texture_half_float"),textureHalfFloatLinear:mr.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,fr,{colorBufferFloat:mr.getExtension("EXT_color_buffer_float")})},sn.prototype.handleContextLost=function(mr){mr.preventDefault()},sn.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},sn.prototype.destroy=function(){var mr=this.renderer.view;this.renderer=null,mr.removeEventListener("webglcontextlost",this.handleContextLost),mr.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},sn.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},sn.prototype.validateContext=function(mr){var fr=mr.getContextAttributes(),yr="WebGL2RenderingContext"in globalThis&&mr instanceof globalThis.WebGL2RenderingContext;yr&&(this.webGLVersion=2),fr&&!fr.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var jr=yr||!!mr.getExtension("OES_element_index_uint");this.supports.uint32Indices=jr,jr||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},sn})(),Ln=function(sn){this.framebuffer=sn,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=nt.l.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},Cn=new ht.j,Nn=(function(){function sn(mr){this.renderer=mr,this.managedFramebuffers=[],this.unknownFramebuffer=new Wt(10,10),this.msaaSamples=null}return sn.prototype.contextChange=function(){var mr=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ht.j,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),this.renderer.context.webGLVersion===1){var fr=this.renderer.context.extensions.drawBuffers,yr=this.renderer.context.extensions.depthTexture;rt.b.PREFER_ENV===nt.g.WEBGL_LEGACY&&(fr=null,yr=null),fr?mr.drawBuffers=function(jr){return fr.drawBuffersWEBGL(jr)}:(this.hasMRT=!1,mr.drawBuffers=function(){}),yr||(this.writeDepthTexture=!1)}else this.msaaSamples=mr.getInternalformatParameter(mr.RENDERBUFFER,mr.RGBA8,mr.SAMPLES)},sn.prototype.bind=function(mr,fr,yr){yr===void 0&&(yr=0);var jr=this.gl;if(mr){var un=mr.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(mr);this.current!==mr&&(this.current=mr,jr.bindFramebuffer(jr.FRAMEBUFFER,un.framebuffer)),un.mipLevel!==yr&&(mr.dirtyId++,mr.dirtyFormat++,un.mipLevel=yr),un.dirtyId!==mr.dirtyId&&(un.dirtyId=mr.dirtyId,un.dirtyFormat!==mr.dirtyFormat?(un.dirtyFormat=mr.dirtyFormat,un.dirtySize=mr.dirtySize,this.updateFramebuffer(mr,yr)):un.dirtySize!==mr.dirtySize&&(un.dirtySize=mr.dirtySize,this.resizeFramebuffer(mr)));for(var $n=0;$n<mr.colorTextures.length;$n++){var Yn=mr.colorTextures[$n];this.renderer.texture.unbind(Yn.parentTextureArray||Yn)}if(mr.depthTexture&&this.renderer.texture.unbind(mr.depthTexture),fr){var os=fr.width>>yr,Vs=fr.height>>yr,eo=os/fr.width;this.setViewport(fr.x*eo,fr.y*eo,os,Vs)}else os=mr.width>>yr,Vs=mr.height>>yr,this.setViewport(0,0,os,Vs)}else this.current&&(this.current=null,jr.bindFramebuffer(jr.FRAMEBUFFER,null)),fr?this.setViewport(fr.x,fr.y,fr.width,fr.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},sn.prototype.setViewport=function(mr,fr,yr,jr){var un=this.viewport;mr=Math.round(mr),fr=Math.round(fr),yr=Math.round(yr),jr=Math.round(jr),un.width===yr&&un.height===jr&&un.x===mr&&un.y===fr||(un.x=mr,un.y=fr,un.width=yr,un.height=jr,this.gl.viewport(mr,fr,yr,jr))},Object.defineProperty(sn.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}),sn.prototype.clear=function(mr,fr,yr,jr,un){un===void 0&&(un=nt.c.COLOR|nt.c.DEPTH);var $n=this.gl;$n.clearColor(mr,fr,yr,jr),$n.clear(un)},sn.prototype.initFramebuffer=function(mr){var fr=this.gl,yr=new Ln(fr.createFramebuffer());return yr.multisample=this.detectSamples(mr.multisample),mr.glFramebuffers[this.CONTEXT_UID]=yr,this.managedFramebuffers.push(mr),mr.disposeRunner.add(this),yr},sn.prototype.resizeFramebuffer=function(mr){var fr=this.gl,yr=mr.glFramebuffers[this.CONTEXT_UID];yr.msaaBuffer&&(fr.bindRenderbuffer(fr.RENDERBUFFER,yr.msaaBuffer),fr.renderbufferStorageMultisample(fr.RENDERBUFFER,yr.multisample,fr.RGBA8,mr.width,mr.height)),yr.stencil&&(fr.bindRenderbuffer(fr.RENDERBUFFER,yr.stencil),yr.msaaBuffer?fr.renderbufferStorageMultisample(fr.RENDERBUFFER,yr.multisample,fr.DEPTH24_STENCIL8,mr.width,mr.height):fr.renderbufferStorage(fr.RENDERBUFFER,fr.DEPTH_STENCIL,mr.width,mr.height));var jr=mr.colorTextures,un=jr.length;fr.drawBuffers||(un=Math.min(un,1));for(var $n=0;$n<un;$n++){var Yn=jr[$n],os=Yn.parentTextureArray||Yn;this.renderer.texture.bind(os,0)}mr.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(mr.depthTexture,0)},sn.prototype.updateFramebuffer=function(mr,fr){var yr=this.gl,jr=mr.glFramebuffers[this.CONTEXT_UID],un=mr.colorTextures,$n=un.length;yr.drawBuffers||($n=Math.min($n,1)),jr.multisample>1&&this.canMultisampleFramebuffer(mr)?(jr.msaaBuffer=jr.msaaBuffer||yr.createRenderbuffer(),yr.bindRenderbuffer(yr.RENDERBUFFER,jr.msaaBuffer),yr.renderbufferStorageMultisample(yr.RENDERBUFFER,jr.multisample,yr.RGBA8,mr.width,mr.height),yr.framebufferRenderbuffer(yr.FRAMEBUFFER,yr.COLOR_ATTACHMENT0,yr.RENDERBUFFER,jr.msaaBuffer)):jr.msaaBuffer&&(yr.deleteRenderbuffer(jr.msaaBuffer),jr.msaaBuffer=null,jr.blitFramebuffer&&(jr.blitFramebuffer.dispose(),jr.blitFramebuffer=null));for(var Yn=[],os=0;os<$n;os++){var Vs=un[os],eo=Vs.parentTextureArray||Vs;this.renderer.texture.bind(eo,0),os===0&&jr.msaaBuffer||(yr.framebufferTexture2D(yr.FRAMEBUFFER,yr.COLOR_ATTACHMENT0+os,Vs.target,eo._glTextures[this.CONTEXT_UID].texture,fr),Yn.push(yr.COLOR_ATTACHMENT0+os))}if(Yn.length>1&&yr.drawBuffers(Yn),mr.depthTexture&&this.writeDepthTexture){var qo=mr.depthTexture;this.renderer.texture.bind(qo,0),yr.framebufferTexture2D(yr.FRAMEBUFFER,yr.DEPTH_ATTACHMENT,yr.TEXTURE_2D,qo._glTextures[this.CONTEXT_UID].texture,fr)}!mr.stencil&&!mr.depth||mr.depthTexture&&this.writeDepthTexture?jr.stencil&&(yr.deleteRenderbuffer(jr.stencil),jr.stencil=null):(jr.stencil=jr.stencil||yr.createRenderbuffer(),yr.bindRenderbuffer(yr.RENDERBUFFER,jr.stencil),jr.msaaBuffer?yr.renderbufferStorageMultisample(yr.RENDERBUFFER,jr.multisample,yr.DEPTH24_STENCIL8,mr.width,mr.height):yr.renderbufferStorage(yr.RENDERBUFFER,yr.DEPTH_STENCIL,mr.width,mr.height),yr.framebufferRenderbuffer(yr.FRAMEBUFFER,yr.DEPTH_STENCIL_ATTACHMENT,yr.RENDERBUFFER,jr.stencil))},sn.prototype.canMultisampleFramebuffer=function(mr){return this.renderer.context.webGLVersion!==1&&mr.colorTextures.length<=1&&!mr.depthTexture},sn.prototype.detectSamples=function(mr){var fr=this.msaaSamples,yr=nt.l.NONE;if(mr<=1||fr===null)return yr;for(var jr=0;jr<fr.length;jr++)if(fr[jr]<=mr){yr=fr[jr];break}return yr===1&&(yr=nt.l.NONE),yr},sn.prototype.blit=function(mr,fr,yr){var jr=this.current,un=this.renderer,$n=this.gl,Yn=this.CONTEXT_UID;if(un.context.webGLVersion===2&&jr){var os=jr.glFramebuffers[Yn];if(os){if(!mr){if(!os.msaaBuffer)return;var Vs=jr.colorTextures[0];if(!Vs)return;os.blitFramebuffer||(os.blitFramebuffer=new Wt(jr.width,jr.height),os.blitFramebuffer.addColorTexture(0,Vs)),(mr=os.blitFramebuffer).colorTextures[0]!==Vs&&(mr.colorTextures[0]=Vs,mr.dirtyId++,mr.dirtyFormat++),mr.width===jr.width&&mr.height===jr.height||(mr.width=jr.width,mr.height=jr.height,mr.dirtyId++,mr.dirtySize++)}fr||((fr=Cn).width=jr.width,fr.height=jr.height),yr||(yr=fr);var eo=fr.width===yr.width&&fr.height===yr.height;this.bind(mr),$n.bindFramebuffer($n.READ_FRAMEBUFFER,os.framebuffer),$n.blitFramebuffer(fr.left,fr.top,fr.right,fr.bottom,yr.left,yr.top,yr.right,yr.bottom,$n.COLOR_BUFFER_BIT,eo?$n.NEAREST:$n.LINEAR)}}},sn.prototype.disposeFramebuffer=function(mr,fr){var yr=mr.glFramebuffers[this.CONTEXT_UID],jr=this.gl;if(yr){delete mr.glFramebuffers[this.CONTEXT_UID];var un=this.managedFramebuffers.indexOf(mr);un>=0&&this.managedFramebuffers.splice(un,1),mr.disposeRunner.remove(this),fr||(jr.deleteFramebuffer(yr.framebuffer),yr.msaaBuffer&&jr.deleteRenderbuffer(yr.msaaBuffer),yr.stencil&&jr.deleteRenderbuffer(yr.stencil)),yr.blitFramebuffer&&yr.blitFramebuffer.dispose()}},sn.prototype.disposeAll=function(mr){var fr=this.managedFramebuffers;this.managedFramebuffers=[];for(var yr=0;yr<fr.length;yr++)this.disposeFramebuffer(fr[yr],mr)},sn.prototype.forceStencil=function(){var mr=this.current;if(mr){var fr=mr.glFramebuffers[this.CONTEXT_UID];if(fr&&!fr.stencil){mr.stencil=!0;var yr=mr.width,jr=mr.height,un=this.gl,$n=un.createRenderbuffer();un.bindRenderbuffer(un.RENDERBUFFER,$n),fr.msaaBuffer?un.renderbufferStorageMultisample(un.RENDERBUFFER,fr.multisample,un.DEPTH24_STENCIL8,yr,jr):un.renderbufferStorage(un.RENDERBUFFER,un.DEPTH_STENCIL,yr,jr),fr.stencil=$n,un.framebufferRenderbuffer(un.FRAMEBUFFER,un.DEPTH_STENCIL_ATTACHMENT,un.RENDERBUFFER,$n)}}},sn.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new ht.j},sn.prototype.destroy=function(){this.renderer=null},sn})(),Gr={5126:4,5123:2,5121:1},tn=(function(){function sn(mr){this.renderer=mr,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return sn.prototype.contextChange=function(){this.disposeAll(!0);var mr=this.gl=this.renderer.gl,fr=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,fr.webGLVersion!==2){var yr=this.renderer.context.extensions.vertexArrayObject;rt.b.PREFER_ENV===nt.g.WEBGL_LEGACY&&(yr=null),yr?(mr.createVertexArray=function(){return yr.createVertexArrayOES()},mr.bindVertexArray=function(un){return yr.bindVertexArrayOES(un)},mr.deleteVertexArray=function(un){return yr.deleteVertexArrayOES(un)}):(this.hasVao=!1,mr.createVertexArray=function(){return null},mr.bindVertexArray=function(){return null},mr.deleteVertexArray=function(){return null})}if(fr.webGLVersion!==2){var jr=mr.getExtension("ANGLE_instanced_arrays");jr?(mr.vertexAttribDivisor=function(un,$n){return jr.vertexAttribDivisorANGLE(un,$n)},mr.drawElementsInstanced=function(un,$n,Yn,os,Vs){return jr.drawElementsInstancedANGLE(un,$n,Yn,os,Vs)},mr.drawArraysInstanced=function(un,$n,Yn,os){return jr.drawArraysInstancedANGLE(un,$n,Yn,os)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=fr.webGLVersion===2||!!fr.extensions.uint32ElementIndex},sn.prototype.bind=function(mr,fr){fr=fr||this.renderer.shader.shader;var yr=this.gl,jr=mr.glVertexArrayObjects[this.CONTEXT_UID],un=!1;jr||(this.managedGeometries[mr.id]=mr,mr.disposeRunner.add(this),mr.glVertexArrayObjects[this.CONTEXT_UID]=jr={},un=!0);var $n=jr[fr.program.id]||this.initGeometryVao(mr,fr,un);this._activeGeometry=mr,this._activeVao!==$n&&(this._activeVao=$n,this.hasVao?yr.bindVertexArray($n):this.activateVao(mr,fr.program)),this.updateBuffers()},sn.prototype.reset=function(){this.unbind()},sn.prototype.updateBuffers=function(){for(var mr=this._activeGeometry,fr=this.renderer.buffer,yr=0;yr<mr.buffers.length;yr++){var jr=mr.buffers[yr];fr.update(jr)}},sn.prototype.checkCompatibility=function(mr,fr){var yr=mr.attributes,jr=fr.attributeData;for(var un in jr)if(!yr[un])throw new Error('shader and geometry incompatible, geometry missing the "'+un+'" attribute')},sn.prototype.getSignature=function(mr,fr){var yr=mr.attributes,jr=fr.attributeData,un=["g",mr.id];for(var $n in yr)jr[$n]&&un.push($n,jr[$n].location);return un.join("-")},sn.prototype.initGeometryVao=function(mr,fr,yr){yr===void 0&&(yr=!0);var jr=this.gl,un=this.CONTEXT_UID,$n=this.renderer.buffer,Yn=fr.program;Yn.glPrograms[un]||this.renderer.shader.generateProgram(fr),this.checkCompatibility(mr,Yn);var os=this.getSignature(mr,Yn),Vs=mr.glVertexArrayObjects[this.CONTEXT_UID],eo=Vs[os];if(eo)return Vs[Yn.id]=eo,eo;var qo=mr.buffers,Po=mr.attributes,su={},mu={};for(var zu in qo)su[zu]=0,mu[zu]=0;for(var zu in Po)!Po[zu].size&&Yn.attributeData[zu]?Po[zu].size=Yn.attributeData[zu].size:Po[zu].size||console.warn("PIXI Geometry attribute '"+zu+"' size cannot be determined (likely the bound shader does not have the attribute)"),su[Po[zu].buffer]+=Po[zu].size*Gr[Po[zu].type];for(var zu in Po){var lu=Po[zu],vl=lu.size;lu.stride===void 0&&(su[lu.buffer]===vl*Gr[lu.type]?lu.stride=0:lu.stride=su[lu.buffer]),lu.start===void 0&&(lu.start=mu[lu.buffer],mu[lu.buffer]+=vl*Gr[lu.type])}eo=jr.createVertexArray(),jr.bindVertexArray(eo);for(var up=0;up<qo.length;up++){var _c=qo[up];$n.bind(_c),yr&&_c._glBuffers[un].refCount++}return this.activateVao(mr,Yn),this._activeVao=eo,Vs[Yn.id]=eo,Vs[os]=eo,eo},sn.prototype.disposeGeometry=function(mr,fr){var yr;if(this.managedGeometries[mr.id]){delete this.managedGeometries[mr.id];var jr=mr.glVertexArrayObjects[this.CONTEXT_UID],un=this.gl,$n=mr.buffers,Yn=(yr=this.renderer)===null||yr===void 0?void 0:yr.buffer;if(mr.disposeRunner.remove(this),jr){if(Yn)for(var os=0;os<$n.length;os++){var Vs=$n[os]._glBuffers[this.CONTEXT_UID];Vs&&(Vs.refCount--,Vs.refCount!==0||fr||Yn.dispose($n[os],fr))}if(!fr){for(var eo in jr)if(eo[0]==="g"){var qo=jr[eo];this._activeVao===qo&&this.unbind(),un.deleteVertexArray(qo)}}delete mr.glVertexArrayObjects[this.CONTEXT_UID]}}},sn.prototype.disposeAll=function(mr){for(var fr=Object.keys(this.managedGeometries),yr=0;yr<fr.length;yr++)this.disposeGeometry(this.managedGeometries[fr[yr]],mr)},sn.prototype.activateVao=function(mr,fr){var yr=this.gl,jr=this.CONTEXT_UID,un=this.renderer.buffer,$n=mr.buffers,Yn=mr.attributes;mr.indexBuffer&&un.bind(mr.indexBuffer);var os=null;for(var Vs in Yn){var eo=Yn[Vs],qo=$n[eo.buffer],Po=qo._glBuffers[jr];if(fr.attributeData[Vs]){os!==Po&&(un.bind(qo),os=Po);var su=fr.attributeData[Vs].location;if(yr.enableVertexAttribArray(su),yr.vertexAttribPointer(su,eo.size,eo.type||yr.FLOAT,eo.normalized,eo.stride,eo.start),eo.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");yr.vertexAttribDivisor(su,1)}}}},sn.prototype.draw=function(mr,fr,yr,jr){var un=this.gl,$n=this._activeGeometry;if($n.indexBuffer){var Yn=$n.indexBuffer.data.BYTES_PER_ELEMENT,os=Yn===2?un.UNSIGNED_SHORT:un.UNSIGNED_INT;Yn===2||Yn===4&&this.canUseUInt32ElementIndex?$n.instanced?un.drawElementsInstanced(mr,fr||$n.indexBuffer.data.length,os,(yr||0)*Yn,jr||1):un.drawElements(mr,fr||$n.indexBuffer.data.length,os,(yr||0)*Yn):console.warn("unsupported index buffer type: uint32")}else $n.instanced?un.drawArraysInstanced(mr,yr,fr||$n.getSize(),jr||1):un.drawArrays(mr,yr,fr||$n.getSize());return this},sn.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},sn.prototype.destroy=function(){this.renderer=null},sn})(),dn=(function(){function sn(mr){mr===void 0&&(mr=null),this.type=nt.j.NONE,this.autoDetect=!0,this.maskObject=mr||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=rt.b.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(sn.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(mr){mr?this._filters?this._filters[0]=mr:this._filters=[mr]:this._filters=null},enumerable:!1,configurable:!0}),sn.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=nt.j.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},sn.prototype.copyCountersOrReset=function(mr){mr?(this._stencilCounter=mr._stencilCounter,this._scissorCounter=mr._scissorCounter,this._scissorRect=mr._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},sn})();function Rn(sn,mr,fr){var yr=sn.createShader(mr);return sn.shaderSource(yr,fr),sn.compileShader(yr),yr}function wn(sn,mr){var fr=sn.getShaderSource(mr).split(`
`).map(function(Vs,eo){return eo+": "+Vs}),yr=sn.getShaderInfoLog(mr),jr=yr.split(`
`),un={},$n=jr.map(function(Vs){return parseFloat(Vs.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(Vs){return!(!Vs||un[Vs])&&(un[Vs]=!0,!0)}),Yn=[""];$n.forEach(function(Vs){fr[Vs-1]="%c"+fr[Vs-1]+"%c",Yn.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var os=fr.join(`
`);Yn[0]=os,console.error(yr),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,Yn),console.groupEnd()}function Un(sn){for(var mr=new Array(sn),fr=0;fr<mr.length;fr++)mr[fr]=!1;return mr}function Zn(sn,mr){switch(sn){case"float":return 0;case"vec2":return new Float32Array(2*mr);case"vec3":return new Float32Array(3*mr);case"vec4":return new Float32Array(4*mr);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*mr);case"ivec3":return new Int32Array(3*mr);case"ivec4":return new Int32Array(4*mr);case"uvec2":return new Uint32Array(2*mr);case"uvec3":return new Uint32Array(3*mr);case"uvec4":return new Uint32Array(4*mr);case"bool":return!1;case"bvec2":return Un(2*mr);case"bvec3":return Un(3*mr);case"bvec4":return Un(4*mr);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var pn,Dn={},qn=Dn;function _a(){if(!pn){pn=nt.m.MEDIUM;var sn=(function(){if(qn===Dn||qn&&qn.isContextLost()){var fr=document.createElement("canvas"),yr=void 0;rt.b.PREFER_ENV>=nt.g.WEBGL2&&(yr=fr.getContext("webgl2",{})),yr||((yr=fr.getContext("webgl",{})||fr.getContext("experimental-webgl",{}))?yr.getExtension("WEBGL_draw_buffers"):yr=null),qn=yr}return qn})();if(sn&&sn.getShaderPrecisionFormat){var mr=sn.getShaderPrecisionFormat(sn.FRAGMENT_SHADER,sn.HIGH_FLOAT);pn=mr.precision?nt.m.HIGH:nt.m.MEDIUM}}return pn}function Vn(sn,mr,fr){if(sn.substring(0,9)!=="precision"){var yr=mr;return mr===nt.m.HIGH&&fr!==nt.m.HIGH&&(yr=nt.m.MEDIUM),"precision "+yr+` float;
`+sn}return fr!==nt.m.HIGH&&sn.substring(0,15)==="precision highp"?sn.replace("precision highp","precision mediump"):sn}var bs={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 Is(sn){return bs[sn]}var uo=null,Rs={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 io(sn,mr){if(!uo){var fr=Object.keys(Rs);uo={};for(var yr=0;yr<fr.length;++yr){var jr=fr[yr];uo[sn[jr]]=Rs[jr]}}return uo[mr]}var vo=[{test:function(sn){return sn.type==="float"&&sn.size===1},code:function(sn){return`
if(uv["`+sn+'"] !== ud["'+sn+`"].value)
{
ud["`+sn+'"].value = uv["'+sn+`"]
gl.uniform1f(ud["`+sn+'"].location, uv["'+sn+`"])
}
`}},{test:function(sn){return(sn.type==="sampler2D"||sn.type==="samplerCube"||sn.type==="sampler2DArray")&&sn.size===1&&!sn.isArray},code:function(sn){return`t = syncData.textureCount++;
renderer.texture.bind(uv["`+sn+`"], t);
if(ud["`+sn+`"].value !== t)
{
ud["`+sn+`"].value = t;
gl.uniform1i(ud["`+sn+`"].location, t);
; // eslint-disable-line max-len
}`}},{test:function(sn,mr){return sn.type==="mat3"&&sn.size===1&&mr.a!==void 0},code:function(sn){return`
gl.uniformMatrix3fv(ud["`+sn+'"].location, false, uv["'+sn+`"].toArray(true));
`},codeUbo:function(sn){return`
var `+sn+"_matrix = uv."+sn+`.toArray(true);
data[offset] = `+sn+`_matrix[0];
data[offset+1] = `+sn+`_matrix[1];
data[offset+2] = `+sn+`_matrix[2];
data[offset + 4] = `+sn+`_matrix[3];
data[offset + 5] = `+sn+`_matrix[4];
data[offset + 6] = `+sn+`_matrix[5];
data[offset + 8] = `+sn+`_matrix[6];
data[offset + 9] = `+sn+`_matrix[7];
data[offset + 10] = `+sn+`_matrix[8];
`}},{test:function(sn,mr){return sn.type==="vec2"&&sn.size===1&&mr.x!==void 0},code:function(sn){return`
cv = ud["`+sn+`"].value;
v = uv["`+sn+`"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["`+sn+`"].location, v.x, v.y);
}`},codeUbo:function(sn){return`
v = uv.`+sn+`;
data[offset] = v.x;
data[offset+1] = v.y;
`}},{test:function(sn){return sn.type==="vec2"&&sn.size===1},code:function(sn){return`
cv = ud["`+sn+`"].value;
v = uv["`+sn+`"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["`+sn+`"].location, v[0], v[1]);
}
`}},{test:function(sn,mr){return sn.type==="vec4"&&sn.size===1&&mr.width!==void 0},code:function(sn){return`
cv = ud["`+sn+`"].value;
v = uv["`+sn+`"];
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
{
cv[0] = v.x;
cv[1] = v.y;
cv[2] = v.width;
cv[3] = v.height;
gl.uniform4f(ud["`+sn+`"].location, v.x, v.y, v.width, v.height)
}`},codeUbo:function(sn){return`
v = uv.`+sn+`;
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`}},{test:function(sn){return sn.type==="vec4"&&sn.size===1},code:function(sn){return`
cv = ud["`+sn+`"].value;
v = uv["`+sn+`"];
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(ud["`+sn+`"].location, v[0], v[1], v[2], v[3])
}`}}],Bo={float:`
if (cv !== v)
{
cu.value = v;
gl.uniform1f(location, v);
}`,vec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(location, v[0], v[1])
}`,vec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3f(location, v[0], v[1], v[2])
}`,vec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
}`,int:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,ivec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,ivec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,ivec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,uint:`
if (cv !== v)
{
cu.value = v;
gl.uniform1ui(location, v);
}`,uvec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2ui(location, v[0], v[1]);
}`,uvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3ui(location, v[0], v[1], v[2]);
}`,uvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
}`,bool:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,bvec2:`
if (cv[0] != v[0] || cv[1] != v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,bvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,bvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},En={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"},In,ds=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function Ps(sn){for(var mr="",fr=0;fr<sn;++fr)fr>0&&(mr+=`
else `),fr<sn-1&&(mr+="if(test == "+fr+".0){}");return mr}var yo=0,rn={},es=(function(){function sn(mr,fr,yr){yr===void 0&&(yr="pixi-shader"),this.id=yo++,this.vertexSrc=mr||sn.defaultVertexSrc,this.fragmentSrc=fr||sn.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(yr=yr.replace(/\s+/g,"-"),rn[yr]?(rn[yr]++,yr+="-"+rn[yr]):rn[yr]=1,this.vertexSrc="#define SHADER_NAME "+yr+`
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+yr+`
`+this.fragmentSrc,this.vertexSrc=Vn(this.vertexSrc,rt.b.PRECISION_VERTEX,nt.m.HIGH),this.fragmentSrc=Vn(this.fragmentSrc,rt.b.PRECISION_FRAGMENT,_a())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(sn,"defaultVertexSrc",{get:function(){return`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`},enumerable:!1,configurable:!0}),Object.defineProperty(sn,"defaultFragmentSrc",{get:function(){return`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`},enumerable:!1,configurable:!0}),sn.from=function(mr,fr,yr){var jr=mr+fr,un=st.ProgramCache[jr];return un||(st.ProgramCache[jr]=un=new sn(mr,fr,yr)),un},sn})(),Gs=(function(){function sn(mr,fr){this.uniformBindCount=0,this.program=mr,this.uniformGroup=fr?fr instanceof Sn?fr:new Sn(fr):new Sn({})}return sn.prototype.checkUniformExists=function(mr,fr){if(fr.uniforms[mr])return!0;for(var yr in fr.uniforms){var jr=fr.uniforms[yr];if(jr.group&&this.checkUniformExists(mr,jr))return!0}return!1},sn.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(sn.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),sn.from=function(mr,fr,yr){return new sn(es.from(mr,fr),yr)},sn})(),Ro=(function(){function sn(){this.data=0,this.blendMode=nt.b.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(sn.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(mr){!!(1&this.data)!==mr&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(mr){!!(2&this.data)!==mr&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(mr){!!(4&this.data)!==mr&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(mr){!!(8&this.data)!==mr&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"depthMask",{get:function(){return!!(32&this.data)},set:function(mr){!!(32&this.data)!==mr&&(this.data^=32)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(mr){!!(16&this.data)!==mr&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"blendMode",{get:function(){return this._blendMode},set:function(mr){this.blend=mr!==nt.b.NONE,this._blendMode=mr},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(mr){this.offsets=!!mr,this._polygonOffset=mr},enumerable:!1,configurable:!0}),sn.prototype.toString=function(){return"[@pixi/core:State blendMode="+this.blendMode+" clockwiseFrontFace="+this.clockwiseFrontFace+" culling="+this.culling+" depthMask="+this.depthMask+" polygonOffset="+this.polygonOffset+"]"},sn.for2d=function(){var mr=new sn;return mr.depthTest=!1,mr.blend=!0,mr},sn})(),ru=(function(sn){function mr(fr,yr,jr){var un=this,$n=es.from(fr||mr.defaultVertexSrc,yr||mr.defaultFragmentSrc);return(un=sn.call(this,$n,jr)||this).padding=0,un.resolution=rt.b.FILTER_RESOLUTION,un.multisample=rt.b.FILTER_MULTISAMPLE,un.enabled=!0,un.autoFit=!0,un.state=new Ro,un}return Et(mr,sn),mr.prototype.apply=function(fr,yr,jr,un,$n){fr.applyFilter(this,yr,jr,un)},Object.defineProperty(mr.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(fr){this.state.blendMode=fr},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"resolution",{get:function(){return this._resolution},set:function(fr){this._resolution=fr},enumerable:!1,configurable:!0}),Object.defineProperty(mr,"defaultVertexSrc",{get:function(){return`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`},enumerable:!1,configurable:!0}),Object.defineProperty(mr,"defaultFragmentSrc",{get:function(){return`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`},enumerable:!1,configurable:!0}),mr})(Gs),du=new ht.d,Iu=(function(){function sn(mr,fr){this._texture=mr,this.mapCoord=new ht.d,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=fr===void 0?.5:fr,this.isSimple=!1}return Object.defineProperty(sn.prototype,"texture",{get:function(){return this._texture},set:function(mr){this._texture=mr,this._textureID=-1},enumerable:!1,configurable:!0}),sn.prototype.multiplyUvs=function(mr,fr){fr===void 0&&(fr=mr);for(var yr=this.mapCoord,jr=0;jr<mr.length;jr+=2){var un=mr[jr],$n=mr[jr+1];fr[jr]=un*yr.a+$n*yr.c+yr.tx,fr[jr+1]=un*yr.b+$n*yr.d+yr.ty}return fr},sn.prototype.update=function(mr){var fr=this._texture;if(!fr||!fr.valid||!mr&&this._textureID===fr._updateID)return!1;this._textureID=fr._updateID,this._updateID++;var yr=fr._uvs;this.mapCoord.set(yr.x1-yr.x0,yr.y1-yr.y0,yr.x3-yr.x0,yr.y3-yr.y0,yr.x0,yr.y0);var jr=fr.orig,un=fr.trim;un&&(du.set(jr.width/un.width,0,0,jr.height/un.height,-un.x/un.width,-un.y/un.height),this.mapCoord.append(du));var $n=fr.baseTexture,Yn=this.uClampFrame,os=this.clampMargin/$n.resolution,Vs=this.clampOffset;return Yn[0]=(fr._frame.x+os+Vs)/$n.width,Yn[1]=(fr._frame.y+os+Vs)/$n.height,Yn[2]=(fr._frame.x+fr._frame.width-os+Vs)/$n.width,Yn[3]=(fr._frame.y+fr._frame.height-os+Vs)/$n.height,this.uClampOffset[0]=Vs/$n.realWidth,this.uClampOffset[1]=Vs/$n.realHeight,this.isSimple=fr._frame.width===$n.width&&fr._frame.height===$n.height&&fr.rotate===0,!0},sn})(),Sl=(function(sn){function mr(fr,yr,jr){var un=this,$n=null;return typeof fr!="string"&&yr===void 0&&jr===void 0&&($n=fr,fr=void 0,yr=void 0,jr=void 0),(un=sn.call(this,fr||`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;
varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`,yr||`varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform sampler2D mask;
uniform float alpha;
uniform float npmAlpha;
uniform vec4 maskClamp;
void main(void)
{
float clip = step(3.5,
step(maskClamp.x, vMaskCoord.x) +
step(maskClamp.y, vMaskCoord.y) +
step(vMaskCoord.x, maskClamp.z) +
step(vMaskCoord.y, maskClamp.w));
vec4 original = texture2D(uSampler, vTextureCoord);
vec4 masky = texture2D(mask, vMaskCoord);
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
original *= (alphaMul * masky.r * alpha * clip);
gl_FragColor = original;
}
`,jr)||this).maskSprite=$n,un.maskMatrix=new ht.d,un}return Et(mr,sn),Object.defineProperty(mr.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(fr){this._maskSprite=fr,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),mr.prototype.apply=function(fr,yr,jr,un){var $n=this._maskSprite,Yn=$n._texture;Yn.valid&&(Yn.uvMatrix||(Yn.uvMatrix=new Iu(Yn,0)),Yn.uvMatrix.update(),this.uniforms.npmAlpha=Yn.baseTexture.alphaMode?0:1,this.uniforms.mask=Yn,this.uniforms.otherMatrix=fr.calculateSpriteMatrix(this.maskMatrix,$n).prepend(Yn.uvMatrix.mapCoord),this.uniforms.alpha=$n.worldAlpha,this.uniforms.maskClamp=Yn.uvMatrix.uClampFrame,fr.applyFilter(this,yr,jr,un))},mr})(ru),Ko=(function(){function sn(mr){this.renderer=mr,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return sn.prototype.setMaskStack=function(mr){this.maskStack=mr,this.renderer.scissor.setMaskStack(mr),this.renderer.stencil.setMaskStack(mr)},sn.prototype.push=function(mr,fr){var yr=fr;if(!yr.isMaskData){var jr=this.maskDataPool.pop()||new dn;jr.pooled=!0,jr.maskObject=fr,yr=jr}var un=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(yr.copyCountersOrReset(un),yr.autoDetect&&this.detect(yr),yr._target=mr,yr.type!==nt.j.SPRITE&&this.maskStack.push(yr),yr.enabled)switch(yr.type){case nt.j.SCISSOR:this.renderer.scissor.push(yr);break;case nt.j.STENCIL:this.renderer.stencil.push(yr);break;case nt.j.SPRITE:yr.copyCountersOrReset(null),this.pushSpriteMask(yr)}yr.type===nt.j.SPRITE&&this.maskStack.push(yr)},sn.prototype.pop=function(mr){var fr=this.maskStack.pop();if(fr&&fr._target===mr){if(fr.enabled)switch(fr.type){case nt.j.SCISSOR:this.renderer.scissor.pop();break;case nt.j.STENCIL:this.renderer.stencil.pop(fr.maskObject);break;case nt.j.SPRITE:this.popSpriteMask(fr)}if(fr.reset(),fr.pooled&&this.maskDataPool.push(fr),this.maskStack.length!==0){var yr=this.maskStack[this.maskStack.length-1];yr.type===nt.j.SPRITE&&yr._filters&&(yr._filters[0].maskSprite=yr.maskObject)}}},sn.prototype.detect=function(mr){mr.maskObject.isSprite?mr.type=nt.j.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(mr)?mr.type=nt.j.SCISSOR:mr.type=nt.j.STENCIL},sn.prototype.pushSpriteMask=function(mr){var fr,yr,jr=mr.maskObject,un=mr._target,$n=mr._filters;$n||($n=this.alphaMaskPool[this.alphaMaskIndex])||($n=this.alphaMaskPool[this.alphaMaskIndex]=[new Sl]);var Yn,os,Vs=this.renderer,eo=Vs.renderTexture;if(eo.current){var qo=eo.current;Yn=mr.resolution||qo.resolution,os=(fr=mr.multisample)!==null&&fr!==void 0?fr:qo.multisample}else Yn=mr.resolution||Vs.resolution,os=(yr=mr.multisample)!==null&&yr!==void 0?yr:Vs.multisample;$n[0].resolution=Yn,$n[0].multisample=os,$n[0].maskSprite=jr;var Po=un.filterArea;un.filterArea=jr.getBounds(!0),Vs.filter.push(un,$n),un.filterArea=Po,mr._filters||this.alphaMaskIndex++},sn.prototype.popSpriteMask=function(mr){this.renderer.filter.pop(),mr._filters?mr._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},sn.prototype.destroy=function(){this.renderer=null},sn})(),Fl=(function(){function sn(mr){this.renderer=mr,this.maskStack=[],this.glConst=0}return sn.prototype.getStackLength=function(){return this.maskStack.length},sn.prototype.setMaskStack=function(mr){var fr=this.renderer.gl,yr=this.getStackLength();this.maskStack=mr;var jr=this.getStackLength();jr!==yr&&(jr===0?fr.disable(this.glConst):(fr.enable(this.glConst),this._useCurrent()))},sn.prototype._useCurrent=function(){},sn.prototype.destroy=function(){this.renderer=null,this.maskStack=null},sn})(),gl=new ht.d,Gu=(function(sn){function mr(fr){var yr=sn.call(this,fr)||this;return yr.glConst=WebGLRenderingContext.SCISSOR_TEST,yr}return Et(mr,sn),mr.prototype.getStackLength=function(){var fr=this.maskStack[this.maskStack.length-1];return fr?fr._scissorCounter:0},mr.prototype.calcScissorRect=function(fr){if(!fr._scissorRectLocal){var yr=fr._scissorRect,jr=fr.maskObject,un=this.renderer,$n=un.renderTexture;jr.renderable=!0;var Yn=jr.getBounds();this.roundFrameToPixels(Yn,$n.current?$n.current.resolution:un.resolution,$n.sourceFrame,$n.destinationFrame,un.projection.transform),jr.renderable=!1,yr&&Yn.fit(yr),fr._scissorRectLocal=Yn}},mr.isMatrixRotated=function(fr){if(!fr)return!1;var yr=fr.a,jr=fr.b,un=fr.c,$n=fr.d;return(Math.abs(jr)>1e-4||Math.abs(un)>1e-4)&&(Math.abs(yr)>1e-4||Math.abs($n)>1e-4)},mr.prototype.testScissor=function(fr){var yr=fr.maskObject;if(!yr.isFastRect||!yr.isFastRect()||mr.isMatrixRotated(yr.worldTransform)||mr.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(fr);var jr=fr._scissorRectLocal;return jr.width>0&&jr.height>0},mr.prototype.roundFrameToPixels=function(fr,yr,jr,un,$n){mr.isMatrixRotated($n)||(($n=$n?gl.copyFrom($n):gl.identity()).translate(-jr.x,-jr.y).scale(un.width/jr.width,un.height/jr.height).translate(un.x,un.y),this.renderer.filter.transformAABB($n,fr),fr.fit(un),fr.x=Math.round(fr.x*yr),fr.y=Math.round(fr.y*yr),fr.width=Math.round(fr.width*yr),fr.height=Math.round(fr.height*yr))},mr.prototype.push=function(fr){fr._scissorRectLocal||this.calcScissorRect(fr);var yr=this.renderer.gl;fr._scissorRect||yr.enable(yr.SCISSOR_TEST),fr._scissorCounter++,fr._scissorRect=fr._scissorRectLocal,this._useCurrent()},mr.prototype.pop=function(){var fr=this.renderer.gl;this.getStackLength()>0?this._useCurrent():fr.disable(fr.SCISSOR_TEST)},mr.prototype._useCurrent=function(){var fr,yr=this.maskStack[this.maskStack.length-1]._scissorRect;fr=this.renderer.renderTexture.current?yr.y:this.renderer.height-yr.height-yr.y,this.renderer.gl.scissor(yr.x,fr,yr.width,yr.height)},mr})(Fl),Lu=(function(sn){function mr(fr){var yr=sn.call(this,fr)||this;return yr.glConst=WebGLRenderingContext.STENCIL_TEST,yr}return Et(mr,sn),mr.prototype.getStackLength=function(){var fr=this.maskStack[this.maskStack.length-1];return fr?fr._stencilCounter:0},mr.prototype.push=function(fr){var yr=fr.maskObject,jr=this.renderer.gl,un=fr._stencilCounter;un===0&&(this.renderer.framebuffer.forceStencil(),jr.clearStencil(0),jr.clear(jr.STENCIL_BUFFER_BIT),jr.enable(jr.STENCIL_TEST)),fr._stencilCounter++,jr.colorMask(!1,!1,!1,!1),jr.stencilFunc(jr.EQUAL,un,4294967295),jr.stencilOp(jr.KEEP,jr.KEEP,jr.INCR),yr.renderable=!0,yr.render(this.renderer),this.renderer.batch.flush(),yr.renderable=!1,this._useCurrent()},mr.prototype.pop=function(fr){var yr=this.renderer.gl;this.getStackLength()===0?yr.disable(yr.STENCIL_TEST):(yr.colorMask(!1,!1,!1,!1),yr.stencilOp(yr.KEEP,yr.KEEP,yr.DECR),fr.renderable=!0,fr.render(this.renderer),this.renderer.batch.flush(),fr.renderable=!1,this._useCurrent())},mr.prototype._useCurrent=function(){var fr=this.renderer.gl;fr.colorMask(!0,!0,!0,!0),fr.stencilFunc(fr.EQUAL,this.getStackLength(),4294967295),fr.stencilOp(fr.KEEP,fr.KEEP,fr.KEEP)},mr})(Fl),Ku=(function(){function sn(mr){this.renderer=mr,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new ht.d,this.transform=null}return sn.prototype.update=function(mr,fr,yr,jr){this.destinationFrame=mr||this.destinationFrame||this.defaultFrame,this.sourceFrame=fr||this.sourceFrame||mr,this.calculateProjection(this.destinationFrame,this.sourceFrame,yr,jr),this.transform&&this.projectionMatrix.append(this.transform);var un=this.renderer;un.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,un.globalUniforms.update(),un.shader.shader&&un.shader.syncUniformGroup(un.shader.shader.uniforms.globals)},sn.prototype.calculateProjection=function(mr,fr,yr,jr){var un=this.projectionMatrix,$n=jr?-1:1;un.identity(),un.a=1/fr.width*2,un.d=$n*(1/fr.height*2),un.tx=-1-fr.x*un.a,un.ty=-$n-fr.y*un.d},sn.prototype.setTransform=function(mr){},sn.prototype.destroy=function(){this.renderer=null},sn})(),uu=new ht.j,en=new ht.j,Jr=(function(){function sn(mr){this.renderer=mr,this.clearColor=mr._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ht.j,this.destinationFrame=new ht.j,this.viewportFrame=new ht.j}return sn.prototype.bind=function(mr,fr,yr){mr===void 0&&(mr=null);var jr,un,$n,Yn=this.renderer;this.current=mr,mr?($n=(jr=mr.baseTexture).resolution,fr||(uu.width=mr.frame.width,uu.height=mr.frame.height,fr=uu),yr||(en.x=mr.frame.x,en.y=mr.frame.y,en.width=fr.width,en.height=fr.height,yr=en),un=jr.framebuffer):($n=Yn.resolution,fr||(uu.width=Yn.screen.width,uu.height=Yn.screen.height,fr=uu),yr||((yr=uu).width=fr.width,yr.height=fr.height));var os=this.viewportFrame;os.x=yr.x*$n,os.y=yr.y*$n,os.width=yr.width*$n,os.height=yr.height*$n,mr||(os.y=Yn.view.height-(os.y+os.height)),os.ceil(),this.renderer.framebuffer.bind(un,os),this.renderer.projection.update(yr,fr,$n,!un),mr?this.renderer.mask.setMaskStack(jr.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(fr),this.destinationFrame.copyFrom(yr)},sn.prototype.clear=function(mr,fr){mr=this.current?mr||this.current.baseTexture.clearColor:mr||this.clearColor;var yr=this.destinationFrame,jr=this.current?this.current.baseTexture:this.renderer.screen,un=yr.width!==jr.width||yr.height!==jr.height;if(un){var $n=this.viewportFrame,Yn=$n.x,os=$n.y,Vs=$n.width,eo=$n.height;Yn=Math.round(Yn),os=Math.round(os),Vs=Math.round(Vs),eo=Math.round(eo),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(Yn,os,Vs,eo)}this.renderer.framebuffer.clear(mr[0],mr[1],mr[2],mr[3],fr),un&&this.renderer.scissor.pop()},sn.prototype.resize=function(){this.bind(null)},sn.prototype.reset=function(){this.bind(null)},sn.prototype.destroy=function(){this.renderer=null},sn})();function vn(sn,mr,fr,yr,jr){fr.buffer.update(jr)}var fn={float:`
data[offset] = v;
`,vec2:`
data[offset] = v[0];
data[offset+1] = v[1];
`,vec3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
`,vec4:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset+3] = v[3];
`,mat2:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+4] = v[2];
data[offset+5] = v[3];
`,mat3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset + 4] = v[3];
data[offset + 5] = v[4];
data[offset + 6] = v[5];
data[offset + 8] = v[6];
data[offset + 9] = v[7];
data[offset + 10] = v[8];
`,mat4:`
for(var i = 0; i < 16; i++)
{
data[offset + i] = v[i];
}
`},gn={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:32,mat3:48,mat4:64};function mn(sn,mr){if(!sn.autoManage)return{size:0,syncFunc:vn};for(var fr=(function(up){for(var _c=up.map(function(dl){return{data:dl,offset:0,dataLen:0,dirty:0}}),Bl=0,rp=0,Kp=0,lp=0;lp<_c.length;lp++){var qp=_c[lp];if(Bl=gn[qp.data.type],qp.data.size>1&&(Bl=Math.max(Bl,16)*qp.data.size),qp.dataLen=Bl,rp%Bl!=0&&rp<16){var lm=rp%Bl%16;rp+=lm,Kp+=lm}rp+Bl>16?(Kp=16*Math.ceil(Kp/16),qp.offset=Kp,Kp+=Bl,rp=Bl):(qp.offset=Kp,rp+=Bl,Kp+=Bl)}return{uboElements:_c,size:Kp=16*Math.ceil(Kp/16)}})((function(up,_c){var Bl=[];for(var rp in up)_c[rp]&&Bl.push(_c[rp]);return Bl.sort(function(Kp,lp){return Kp.index-lp.index}),Bl})(sn.uniforms,mr)),yr=fr.uboElements,jr=fr.size,un=[`
var v = null;
var v2 = null;
var cv = null;
var t = 0;
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`],$n=0;$n<yr.length;$n++){for(var Yn=yr[$n],os=sn.uniforms[Yn.data.name],Vs=Yn.data.name,eo=!1,qo=0;qo<vo.length;qo++){var Po=vo[qo];if(Po.codeUbo&&Po.test(Yn.data,os)){un.push("offset = "+Yn.offset/4+";",vo[qo].codeUbo(Yn.data.name,os)),eo=!0;break}}if(!eo)if(Yn.data.size>1){var su=Is(Yn.data.type),mu=Math.max(gn[Yn.data.type]/16,1),zu=su/mu,lu=(4-zu%4)%4;un.push(`
cv = ud.`+Vs+`.value;
v = uv.`+Vs+`;
offset = `+Yn.offset/4+`;
t = 0;
for(var i=0; i < `+Yn.data.size*mu+`; i++)
{
for(var j = 0; j < `+zu+`; j++)
{
data[offset++] = v[t++];
}
offset += `+lu+`;
}
`)}else{var vl=fn[Yn.data.type];un.push(`
cv = ud.`+Vs+`.value;
v = uv.`+Vs+`;
offset = `+Yn.offset/4+`;
`+vl+`;
`)}}return un.push(`
renderer.buffer.update(buffer);
`),{size:jr,syncFunc:new Function("ud","uv","renderer","syncData","buffer",un.join(`
`))}}var ss=(function(){function sn(mr,fr){this.program=mr,this.uniformData=fr,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return sn.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},sn})();function ga(sn,mr){var fr=Rn(sn,sn.VERTEX_SHADER,mr.vertexSrc),yr=Rn(sn,sn.FRAGMENT_SHADER,mr.fragmentSrc),jr=sn.createProgram();if(sn.attachShader(jr,fr),sn.attachShader(jr,yr),sn.linkProgram(jr),sn.getProgramParameter(jr,sn.LINK_STATUS)||(function(Vs,eo,qo,Po){Vs.getProgramParameter(eo,Vs.LINK_STATUS)||(Vs.getShaderParameter(qo,Vs.COMPILE_STATUS)||wn(Vs,qo),Vs.getShaderParameter(Po,Vs.COMPILE_STATUS)||wn(Vs,Po),console.error("PixiJS Error: Could not initialize shader."),Vs.getProgramInfoLog(eo)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",Vs.getProgramInfoLog(eo)))})(sn,jr,fr,yr),mr.attributeData=(function(Vs,eo){for(var qo={},Po=eo.getProgramParameter(Vs,eo.ACTIVE_ATTRIBUTES),su=0;su<Po;su++){var mu=eo.getActiveAttrib(Vs,su);if(mu.name.indexOf("gl_")!==0){var zu=io(eo,mu.type),lu={type:zu,name:mu.name,size:Is(zu),location:eo.getAttribLocation(Vs,mu.name)};qo[mu.name]=lu}}return qo})(jr,sn),mr.uniformData=(function(Vs,eo){for(var qo={},Po=eo.getProgramParameter(Vs,eo.ACTIVE_UNIFORMS),su=0;su<Po;su++){var mu=eo.getActiveUniform(Vs,su),zu=mu.name.replace(/\[.*?\]$/,""),lu=!!mu.name.match(/\[.*?\]$/),vl=io(eo,mu.type);qo[zu]={name:zu,index:su,type:vl,size:mu.size,isArray:lu,value:Zn(vl,mu.size)}}return qo})(jr,sn),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(mr.vertexSrc)){var un=Object.keys(mr.attributeData);un.sort(function(Vs,eo){return Vs>eo?1:-1});for(var $n=0;$n<un.length;$n++)mr.attributeData[un[$n]].location=$n,sn.bindAttribLocation(jr,$n,un[$n]);sn.linkProgram(jr)}sn.deleteShader(fr),sn.deleteShader(yr);var Yn={};for(var $n in mr.uniformData){var os=mr.uniformData[$n];Yn[$n]={location:sn.getUniformLocation(jr,$n),value:Zn(os.type,os.size)}}return new ss(jr,Yn)}var Ns=0,vs={textureCount:0,uboCount:0},Xs=(function(){function sn(mr){this.destroyed=!1,this.renderer=mr,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Ns++}return sn.prototype.systemCheck=function(){if(!(function(){if(typeof In=="boolean")return In;try{var mr=new Function("param1","param2","param3","return param1[param2] === param3;");In=mr({a:"b"},"a","b")===!0}catch{In=!1}return In})())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},sn.prototype.contextChange=function(mr){this.gl=mr,this.reset()},sn.prototype.bind=function(mr,fr){mr.uniforms.globals=this.renderer.globalUniforms;var yr=mr.program,jr=yr.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(mr);return this.shader=mr,this.program!==yr&&(this.program=yr,this.gl.useProgram(jr.program)),fr||(vs.textureCount=0,vs.uboCount=0,this.syncUniformGroup(mr.uniformGroup,vs)),jr},sn.prototype.setUniforms=function(mr){var fr=this.shader.program,yr=fr.glPrograms[this.renderer.CONTEXT_UID];fr.syncUniforms(yr.uniformData,mr,this.renderer)},sn.prototype.syncUniformGroup=function(mr,fr){var yr=this.getGlProgram();mr.static&&mr.dirtyId===yr.uniformDirtyGroups[mr.id]||(yr.uniformDirtyGroups[mr.id]=mr.dirtyId,this.syncUniforms(mr,yr,fr))},sn.prototype.syncUniforms=function(mr,fr,yr){(mr.syncUniforms[this.shader.program.id]||this.createSyncGroups(mr))(fr.uniformData,mr.uniforms,this.renderer,yr)},sn.prototype.createSyncGroups=function(mr){var fr=this.getSignature(mr,this.shader.program.uniformData,"u");return this.cache[fr]||(this.cache[fr]=(function(yr,jr){var un,$n=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(var Yn in yr.uniforms){var os=jr[Yn];if(os){for(var Vs=yr.uniforms[Yn],eo=!1,qo=0;qo<vo.length;qo++)if(vo[qo].test(os,Vs)){$n.push(vo[qo].code(Yn,Vs)),eo=!0;break}if(!eo){var Po=(os.size===1?Bo:En)[os.type].replace("location",'ud["'+Yn+'"].location');$n.push(`
cu = ud["`+Yn+`"];
cv = cu.value;
v = uv["`+Yn+`"];
`+Po+";")}}else!((un=yr.uniforms[Yn])===null||un===void 0)&&un.group&&(yr.uniforms[Yn].ubo?$n.push(`
renderer.shader.syncUniformBufferGroup(uv.`+Yn+", '"+Yn+`');
`):$n.push(`
renderer.shader.syncUniformGroup(uv.`+Yn+`, syncData);
`))}return new Function("ud","uv","renderer","syncData",$n.join(`
`))})(mr,this.shader.program.uniformData)),mr.syncUniforms[this.shader.program.id]=this.cache[fr],mr.syncUniforms[this.shader.program.id]},sn.prototype.syncUniformBufferGroup=function(mr,fr){var yr=this.getGlProgram();if(!mr.static||mr.dirtyId!==0||!yr.uniformGroups[mr.id]){mr.dirtyId=0;var jr=yr.uniformGroups[mr.id]||this.createSyncBufferGroup(mr,yr,fr);mr.buffer.update(),jr(yr.uniformData,mr.uniforms,this.renderer,vs,mr.buffer)}this.renderer.buffer.bindBufferBase(mr.buffer,yr.uniformBufferBindings[fr])},sn.prototype.createSyncBufferGroup=function(mr,fr,yr){var jr=this.renderer.gl;this.renderer.buffer.bind(mr.buffer);var un=this.gl.getUniformBlockIndex(fr.program,yr);fr.uniformBufferBindings[yr]=this.shader.uniformBindCount,jr.uniformBlockBinding(fr.program,un,this.shader.uniformBindCount),this.shader.uniformBindCount++;var $n=this.getSignature(mr,this.shader.program.uniformData,"ubo"),Yn=this._uboCache[$n];if(Yn||(Yn=this._uboCache[$n]=mn(mr,this.shader.program.uniformData)),mr.autoManage){var os=new Float32Array(Yn.size/4);mr.buffer.update(os)}return fr.uniformGroups[mr.id]=Yn.syncFunc,fr.uniformGroups[mr.id]},sn.prototype.getSignature=function(mr,fr,yr){var jr=mr.uniforms,un=[yr+"-"];for(var $n in jr)un.push($n),fr[$n]&&un.push(fr[$n].type);return un.join("-")},sn.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},sn.prototype.generateProgram=function(mr){var fr=this.gl,yr=mr.program,jr=ga(fr,yr);return yr.glPrograms[this.renderer.CONTEXT_UID]=jr,jr},sn.prototype.reset=function(){this.program=null,this.shader=null},sn.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},sn})(),co=(function(){function sn(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=nt.b.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.map[5]=this.setDepthMask,this.checks=[],this.defaultState=new Ro,this.defaultState.blend=!0}return sn.prototype.contextChange=function(mr){this.gl=mr,this.blendModes=(function(fr,yr){return yr===void 0&&(yr=[]),yr[nt.b.NORMAL]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.ADD]=[fr.ONE,fr.ONE],yr[nt.b.MULTIPLY]=[fr.DST_COLOR,fr.ONE_MINUS_SRC_ALPHA,fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.SCREEN]=[fr.ONE,fr.ONE_MINUS_SRC_COLOR,fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.OVERLAY]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.DARKEN]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.LIGHTEN]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.COLOR_DODGE]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.COLOR_BURN]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.HARD_LIGHT]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.SOFT_LIGHT]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.DIFFERENCE]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.EXCLUSION]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.HUE]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.SATURATION]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.COLOR]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.LUMINOSITY]=[fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.NONE]=[0,0],yr[nt.b.NORMAL_NPM]=[fr.SRC_ALPHA,fr.ONE_MINUS_SRC_ALPHA,fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.ADD_NPM]=[fr.SRC_ALPHA,fr.ONE,fr.ONE,fr.ONE],yr[nt.b.SCREEN_NPM]=[fr.SRC_ALPHA,fr.ONE_MINUS_SRC_COLOR,fr.ONE,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.SRC_IN]=[fr.DST_ALPHA,fr.ZERO],yr[nt.b.SRC_OUT]=[fr.ONE_MINUS_DST_ALPHA,fr.ZERO],yr[nt.b.SRC_ATOP]=[fr.DST_ALPHA,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.DST_OVER]=[fr.ONE_MINUS_DST_ALPHA,fr.ONE],yr[nt.b.DST_IN]=[fr.ZERO,fr.SRC_ALPHA],yr[nt.b.DST_OUT]=[fr.ZERO,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.DST_ATOP]=[fr.ONE_MINUS_DST_ALPHA,fr.SRC_ALPHA],yr[nt.b.XOR]=[fr.ONE_MINUS_DST_ALPHA,fr.ONE_MINUS_SRC_ALPHA],yr[nt.b.SUBTRACT]=[fr.ONE,fr.ONE,fr.ONE,fr.ONE,fr.FUNC_REVERSE_SUBTRACT,fr.FUNC_ADD],yr})(mr),this.set(this.defaultState),this.reset()},sn.prototype.set=function(mr){if(mr=mr||this.defaultState,this.stateId!==mr.data){for(var fr=this.stateId^mr.data,yr=0;fr;)1&fr&&this.map[yr].call(this,!!(mr.data&1<<yr)),fr>>=1,yr++;this.stateId=mr.data}for(yr=0;yr<this.checks.length;yr++)this.checks[yr](this,mr)},sn.prototype.forceState=function(mr){mr=mr||this.defaultState;for(var fr=0;fr<this.map.length;fr++)this.map[fr].call(this,!!(mr.data&1<<fr));for(fr=0;fr<this.checks.length;fr++)this.checks[fr](this,mr);this.stateId=mr.data},sn.prototype.setBlend=function(mr){this.updateCheck(sn.checkBlendMode,mr),this.gl[mr?"enable":"disable"](this.gl.BLEND)},sn.prototype.setOffset=function(mr){this.updateCheck(sn.checkPolygonOffset,mr),this.gl[mr?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},sn.prototype.setDepthTest=function(mr){this.gl[mr?"enable":"disable"](this.gl.DEPTH_TEST)},sn.prototype.setDepthMask=function(mr){this.gl.depthMask(mr)},sn.prototype.setCullFace=function(mr){this.gl[mr?"enable":"disable"](this.gl.CULL_FACE)},sn.prototype.setFrontFace=function(mr){this.gl.frontFace(this.gl[mr?"CW":"CCW"])},sn.prototype.setBlendMode=function(mr){if(mr!==this.blendMode){this.blendMode=mr;var fr=this.blendModes[mr],yr=this.gl;fr.length===2?yr.blendFunc(fr[0],fr[1]):yr.blendFuncSeparate(fr[0],fr[1],fr[2],fr[3]),fr.length===6?(this._blendEq=!0,yr.blendEquationSeparate(fr[4],fr[5])):this._blendEq&&(this._blendEq=!1,yr.blendEquationSeparate(yr.FUNC_ADD,yr.FUNC_ADD))}},sn.prototype.setPolygonOffset=function(mr,fr){this.gl.polygonOffset(mr,fr)},sn.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},sn.prototype.updateCheck=function(mr,fr){var yr=this.checks.indexOf(mr);fr&&yr===-1?this.checks.push(mr):fr||yr===-1||this.checks.splice(yr,1)},sn.checkBlendMode=function(mr,fr){mr.setBlendMode(fr.blendMode)},sn.checkPolygonOffset=function(mr,fr){mr.setPolygonOffset(1,fr.polygonOffset)},sn.prototype.destroy=function(){this.gl=null},sn})(),ls=(function(){function sn(mr){this.renderer=mr,this.count=0,this.checkCount=0,this.maxIdle=rt.b.GC_MAX_IDLE,this.checkCountMax=rt.b.GC_MAX_CHECK_COUNT,this.mode=rt.b.GC_MODE}return sn.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==nt.i.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},sn.prototype.run=function(){for(var mr=this.renderer.texture,fr=mr.managedTextures,yr=!1,jr=0;jr<fr.length;jr++){var un=fr[jr];!un.framebuffer&&this.count-un.touched>this.maxIdle&&(mr.destroyTexture(un,!0),fr[jr]=null,yr=!0)}if(yr){var $n=0;for(jr=0;jr<fr.length;jr++)fr[jr]!==null&&(fr[$n++]=fr[jr]);fr.length=$n}},sn.prototype.unload=function(mr){var fr=this.renderer.texture,yr=mr._texture;yr&&!yr.framebuffer&&fr.destroyTexture(yr);for(var jr=mr.children.length-1;jr>=0;jr--)this.unload(mr.children[jr])},sn.prototype.destroy=function(){this.renderer=null},sn})(),Mo=function(sn){this.texture=sn,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=nt.r.UNSIGNED_BYTE,this.internalFormat=nt.h.RGBA,this.samplerType=0},Nu=(function(){function sn(mr){this.renderer=mr,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new At,this.hasIntegerTextures=!1}return sn.prototype.contextChange=function(){var mr=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=(function(un){var $n,Yn,os,Vs,eo,qo,Po,su,mu,zu,lu,vl,up,_c,Bl,rp,Kp,lp,qp,lm,dl,el,gv;return"WebGL2RenderingContext"in globalThis&&un instanceof globalThis.WebGL2RenderingContext?(($n={})[nt.r.UNSIGNED_BYTE]=((Yn={})[nt.h.RGBA]=un.RGBA8,Yn[nt.h.RGB]=un.RGB8,Yn[nt.h.RG]=un.RG8,Yn[nt.h.RED]=un.R8,Yn[nt.h.RGBA_INTEGER]=un.RGBA8UI,Yn[nt.h.RGB_INTEGER]=un.RGB8UI,Yn[nt.h.RG_INTEGER]=un.RG8UI,Yn[nt.h.RED_INTEGER]=un.R8UI,Yn[nt.h.ALPHA]=un.ALPHA,Yn[nt.h.LUMINANCE]=un.LUMINANCE,Yn[nt.h.LUMINANCE_ALPHA]=un.LUMINANCE_ALPHA,Yn),$n[nt.r.BYTE]=((os={})[nt.h.RGBA]=un.RGBA8_SNORM,os[nt.h.RGB]=un.RGB8_SNORM,os[nt.h.RG]=un.RG8_SNORM,os[nt.h.RED]=un.R8_SNORM,os[nt.h.RGBA_INTEGER]=un.RGBA8I,os[nt.h.RGB_INTEGER]=un.RGB8I,os[nt.h.RG_INTEGER]=un.RG8I,os[nt.h.RED_INTEGER]=un.R8I,os),$n[nt.r.UNSIGNED_SHORT]=((Vs={})[nt.h.RGBA_INTEGER]=un.RGBA16UI,Vs[nt.h.RGB_INTEGER]=un.RGB16UI,Vs[nt.h.RG_INTEGER]=un.RG16UI,Vs[nt.h.RED_INTEGER]=un.R16UI,Vs[nt.h.DEPTH_COMPONENT]=un.DEPTH_COMPONENT16,Vs),$n[nt.r.SHORT]=((eo={})[nt.h.RGBA_INTEGER]=un.RGBA16I,eo[nt.h.RGB_INTEGER]=un.RGB16I,eo[nt.h.RG_INTEGER]=un.RG16I,eo[nt.h.RED_INTEGER]=un.R16I,eo),$n[nt.r.UNSIGNED_INT]=((qo={})[nt.h.RGBA_INTEGER]=un.RGBA32UI,qo[nt.h.RGB_INTEGER]=un.RGB32UI,qo[nt.h.RG_INTEGER]=un.RG32UI,qo[nt.h.RED_INTEGER]=un.R32UI,qo[nt.h.DEPTH_COMPONENT]=un.DEPTH_COMPONENT24,qo),$n[nt.r.INT]=((Po={})[nt.h.RGBA_INTEGER]=un.RGBA32I,Po[nt.h.RGB_INTEGER]=un.RGB32I,Po[nt.h.RG_INTEGER]=un.RG32I,Po[nt.h.RED_INTEGER]=un.R32I,Po),$n[nt.r.FLOAT]=((su={})[nt.h.RGBA]=un.RGBA32F,su[nt.h.RGB]=un.RGB32F,su[nt.h.RG]=un.RG32F,su[nt.h.RED]=un.R32F,su[nt.h.DEPTH_COMPONENT]=un.DEPTH_COMPONENT32F,su),$n[nt.r.HALF_FLOAT]=((mu={})[nt.h.RGBA]=un.RGBA16F,mu[nt.h.RGB]=un.RGB16F,mu[nt.h.RG]=un.RG16F,mu[nt.h.RED]=un.R16F,mu),$n[nt.r.UNSIGNED_SHORT_5_6_5]=((zu={})[nt.h.RGB]=un.RGB565,zu),$n[nt.r.UNSIGNED_SHORT_4_4_4_4]=((lu={})[nt.h.RGBA]=un.RGBA4,lu),$n[nt.r.UNSIGNED_SHORT_5_5_5_1]=((vl={})[nt.h.RGBA]=un.RGB5_A1,vl),$n[nt.r.UNSIGNED_INT_2_10_10_10_REV]=((up={})[nt.h.RGBA]=un.RGB10_A2,up[nt.h.RGBA_INTEGER]=un.RGB10_A2UI,up),$n[nt.r.UNSIGNED_INT_10F_11F_11F_REV]=((_c={})[nt.h.RGB]=un.R11F_G11F_B10F,_c),$n[nt.r.UNSIGNED_INT_5_9_9_9_REV]=((Bl={})[nt.h.RGB]=un.RGB9_E5,Bl),$n[nt.r.UNSIGNED_INT_24_8]=((rp={})[nt.h.DEPTH_STENCIL]=un.DEPTH24_STENCIL8,rp),$n[nt.r.FLOAT_32_UNSIGNED_INT_24_8_REV]=((Kp={})[nt.h.DEPTH_STENCIL]=un.DEPTH32F_STENCIL8,Kp),gv=$n):((lp={})[nt.r.UNSIGNED_BYTE]=((qp={})[nt.h.RGBA]=un.RGBA,qp[nt.h.RGB]=un.RGB,qp[nt.h.ALPHA]=un.ALPHA,qp[nt.h.LUMINANCE]=un.LUMINANCE,qp[nt.h.LUMINANCE_ALPHA]=un.LUMINANCE_ALPHA,qp),lp[nt.r.UNSIGNED_SHORT_5_6_5]=((lm={})[nt.h.RGB]=un.RGB,lm),lp[nt.r.UNSIGNED_SHORT_4_4_4_4]=((dl={})[nt.h.RGBA]=un.RGBA,dl),lp[nt.r.UNSIGNED_SHORT_5_5_5_1]=((el={})[nt.h.RGBA]=un.RGBA,el),gv=lp),gv})(mr);var fr=mr.getParameter(mr.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=fr;for(var yr=0;yr<fr;yr++)this.boundTextures[yr]=null;this.emptyTextures={};var jr=new Mo(mr.createTexture());for(mr.bindTexture(mr.TEXTURE_2D,jr.texture),mr.texImage2D(mr.TEXTURE_2D,0,mr.RGBA,1,1,0,mr.RGBA,mr.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[mr.TEXTURE_2D]=jr,this.emptyTextures[mr.TEXTURE_CUBE_MAP]=new Mo(mr.createTexture()),mr.bindTexture(mr.TEXTURE_CUBE_MAP,this.emptyTextures[mr.TEXTURE_CUBE_MAP].texture),yr=0;yr<6;yr++)mr.texImage2D(mr.TEXTURE_CUBE_MAP_POSITIVE_X+yr,0,mr.RGBA,1,1,0,mr.RGBA,mr.UNSIGNED_BYTE,null);for(mr.texParameteri(mr.TEXTURE_CUBE_MAP,mr.TEXTURE_MAG_FILTER,mr.LINEAR),mr.texParameteri(mr.TEXTURE_CUBE_MAP,mr.TEXTURE_MIN_FILTER,mr.LINEAR),yr=0;yr<this.boundTextures.length;yr++)this.bind(null,yr)},sn.prototype.bind=function(mr,fr){fr===void 0&&(fr=0);var yr=this.gl;if((mr=mr?.castToBaseTexture())&&mr.valid&&!mr.parentTextureArray){mr.touched=this.renderer.textureGC.count;var jr=mr._glTextures[this.CONTEXT_UID]||this.initTexture(mr);this.boundTextures[fr]!==mr&&(this.currentLocation!==fr&&(this.currentLocation=fr,yr.activeTexture(yr.TEXTURE0+fr)),yr.bindTexture(mr.target,jr.texture)),jr.dirtyId!==mr.dirtyId&&(this.currentLocation!==fr&&(this.currentLocation=fr,yr.activeTexture(yr.TEXTURE0+fr)),this.updateTexture(mr)),this.boundTextures[fr]=mr}else this.currentLocation!==fr&&(this.currentLocation=fr,yr.activeTexture(yr.TEXTURE0+fr)),yr.bindTexture(yr.TEXTURE_2D,this.emptyTextures[yr.TEXTURE_2D].texture),this.boundTextures[fr]=null},sn.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var mr=0;mr<this.boundTextures.length;mr++)this.boundTextures[mr]=this.unknownTexture},sn.prototype.unbind=function(mr){var fr=this.gl,yr=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var jr=0;jr<yr.length;jr++)yr[jr]===this.unknownTexture&&this.bind(null,jr)}for(jr=0;jr<yr.length;jr++)yr[jr]===mr&&(this.currentLocation!==jr&&(fr.activeTexture(fr.TEXTURE0+jr),this.currentLocation=jr),fr.bindTexture(mr.target,this.emptyTextures[mr.target].texture),yr[jr]=null)},sn.prototype.ensureSamplerType=function(mr){var fr=this.boundTextures,yr=this.hasIntegerTextures,jr=this.CONTEXT_UID;if(yr)for(var un=mr-1;un>=0;--un){var $n=fr[un];$n&&$n._glTextures[jr].samplerType!==nt.o.FLOAT&&this.renderer.texture.unbind($n)}},sn.prototype.initTexture=function(mr){var fr=new Mo(this.gl.createTexture());return fr.dirtyId=-1,mr._glTextures[this.CONTEXT_UID]=fr,this.managedTextures.push(mr),mr.on("dispose",this.destroyTexture,this),fr},sn.prototype.initTextureType=function(mr,fr){var yr,jr;fr.internalFormat=(jr=(yr=this.internalFormats[mr.type])===null||yr===void 0?void 0:yr[mr.format])!==null&&jr!==void 0?jr:mr.format,this.webGLVersion===2&&mr.type===nt.r.HALF_FLOAT?fr.type=this.gl.HALF_FLOAT:fr.type=mr.type},sn.prototype.updateTexture=function(mr){var fr=mr._glTextures[this.CONTEXT_UID];if(fr){var yr=this.renderer;if(this.initTextureType(mr,fr),mr.resource&&mr.resource.upload(yr,mr,fr))fr.samplerType!==nt.o.FLOAT&&(this.hasIntegerTextures=!0);else{var jr=mr.realWidth,un=mr.realHeight,$n=yr.gl;(fr.width!==jr||fr.height!==un||fr.dirtyId<0)&&(fr.width=jr,fr.height=un,$n.texImage2D(mr.target,0,fr.internalFormat,jr,un,0,mr.format,fr.type,null))}mr.dirtyStyleId!==fr.dirtyStyleId&&this.updateTextureStyle(mr),fr.dirtyId=mr.dirtyId}},sn.prototype.destroyTexture=function(mr,fr){var yr=this.gl;if((mr=mr.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(mr),yr.deleteTexture(mr._glTextures[this.CONTEXT_UID].texture),mr.off("dispose",this.destroyTexture,this),delete mr._glTextures[this.CONTEXT_UID],!fr)){var jr=this.managedTextures.indexOf(mr);jr!==-1&&Object(st.removeItems)(this.managedTextures,jr,1)}},sn.prototype.updateTextureStyle=function(mr){var fr=mr._glTextures[this.CONTEXT_UID];fr&&(mr.mipmap!==nt.k.POW2&&this.webGLVersion===2||mr.isPowerOfTwo?fr.mipmap=mr.mipmap>=1:fr.mipmap=!1,this.webGLVersion===2||mr.isPowerOfTwo?fr.wrapMode=mr.wrapMode:fr.wrapMode=nt.s.CLAMP,mr.resource&&mr.resource.style(this.renderer,mr,fr)||this.setStyle(mr,fr),fr.dirtyStyleId=mr.dirtyStyleId)},sn.prototype.setStyle=function(mr,fr){var yr=this.gl;if(fr.mipmap&&mr.mipmap!==nt.k.ON_MANUAL&&yr.generateMipmap(mr.target),yr.texParameteri(mr.target,yr.TEXTURE_WRAP_S,fr.wrapMode),yr.texParameteri(mr.target,yr.TEXTURE_WRAP_T,fr.wrapMode),fr.mipmap){yr.texParameteri(mr.target,yr.TEXTURE_MIN_FILTER,mr.scaleMode===nt.p.LINEAR?yr.LINEAR_MIPMAP_LINEAR:yr.NEAREST_MIPMAP_NEAREST);var jr=this.renderer.context.extensions.anisotropicFiltering;if(jr&&mr.anisotropicLevel>0&&mr.scaleMode===nt.p.LINEAR){var un=Math.min(mr.anisotropicLevel,yr.getParameter(jr.MAX_TEXTURE_MAX_ANISOTROPY_EXT));yr.texParameterf(mr.target,jr.TEXTURE_MAX_ANISOTROPY_EXT,un)}}else yr.texParameteri(mr.target,yr.TEXTURE_MIN_FILTER,mr.scaleMode===nt.p.LINEAR?yr.LINEAR:yr.NEAREST);yr.texParameteri(mr.target,yr.TEXTURE_MAG_FILTER,mr.scaleMode===nt.p.LINEAR?yr.LINEAR:yr.NEAREST)},sn.prototype.destroy=function(){this.renderer=null},sn})(),Ou=new ht.d,$u=(function(sn){function mr(fr,yr){fr===void 0&&(fr=nt.n.UNKNOWN);var jr=sn.call(this)||this;return yr=Object.assign({},rt.b.RENDER_OPTIONS,yr),jr.options=yr,jr.type=fr,jr.screen=new ht.j(0,0,yr.width,yr.height),jr.view=yr.view||document.createElement("canvas"),jr.resolution=yr.resolution||rt.b.RESOLUTION,jr.useContextAlpha=yr.useContextAlpha,jr.autoDensity=!!yr.autoDensity,jr.preserveDrawingBuffer=yr.preserveDrawingBuffer,jr.clearBeforeRender=yr.clearBeforeRender,jr._backgroundColor=0,jr._backgroundColorRgba=[0,0,0,1],jr._backgroundColorString="#000000",jr.backgroundColor=yr.backgroundColor||jr._backgroundColor,jr.backgroundAlpha=yr.backgroundAlpha,yr.transparent!==void 0&&(Object(st.deprecation)("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),jr.useContextAlpha=yr.transparent,jr.backgroundAlpha=yr.transparent?0:1),jr._lastObjectRendered=null,jr.plugins={},jr}return Et(mr,sn),mr.prototype.initPlugins=function(fr){for(var yr in fr)this.plugins[yr]=new fr[yr](this)},Object.defineProperty(mr.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),mr.prototype.resize=function(fr,yr){this.view.width=Math.round(fr*this.resolution),this.view.height=Math.round(yr*this.resolution);var jr=this.view.width/this.resolution,un=this.view.height/this.resolution;this.screen.width=jr,this.screen.height=un,this.autoDensity&&(this.view.style.width=jr+"px",this.view.style.height=un+"px"),this.emit("resize",jr,un)},mr.prototype.generateTexture=function(fr,yr,jr,un){yr===void 0&&(yr={}),typeof yr=="number"&&(Object(st.deprecation)("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),yr={scaleMode:yr,resolution:jr,region:un});var $n=yr.region,Yn=(function(Vs,eo){var qo={};for(var Po in Vs)Object.prototype.hasOwnProperty.call(Vs,Po)&&eo.indexOf(Po)<0&&(qo[Po]=Vs[Po]);if(Vs!=null&&typeof Object.getOwnPropertySymbols=="function"){var su=0;for(Po=Object.getOwnPropertySymbols(Vs);su<Po.length;su++)eo.indexOf(Po[su])<0&&(qo[Po[su]]=Vs[Po[su]])}return qo})(yr,["region"]);(un=$n||fr.getLocalBounds(null,!0)).width===0&&(un.width=1),un.height===0&&(un.height=1);var os=cr.create(Ct({width:un.width,height:un.height},Yn));return Ou.tx=-un.x,Ou.ty=-un.y,this.render(fr,{renderTexture:os,clear:!1,transform:Ou,skipUpdateTransform:!!fr.parent}),os},mr.prototype.destroy=function(fr){for(var yr in this.plugins)this.plugins[yr].destroy(),this.plugins[yr]=null;fr&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=nt.n.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(mr.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(fr){this._backgroundColor=fr,this._backgroundColorString=Object(st.hex2string)(fr),Object(st.hex2rgb)(fr,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(mr.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(fr){this._backgroundColorRgba[3]=fr},enumerable:!1,configurable:!0}),mr})(st.EventEmitter),Hu=function(sn){this.buffer=sn||null,this.updateID=-1,this.byteLength=-1,this.refCount=0},kl=(function(){function sn(mr){this.renderer=mr,this.managedBuffers={},this.boundBufferBases={}}return sn.prototype.destroy=function(){this.renderer=null},sn.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},sn.prototype.bind=function(mr){var fr=this.gl,yr=this.CONTEXT_UID,jr=mr._glBuffers[yr]||this.createGLBuffer(mr);fr.bindBuffer(mr.type,jr.buffer)},sn.prototype.bindBufferBase=function(mr,fr){var yr=this.gl,jr=this.CONTEXT_UID;if(this.boundBufferBases[fr]!==mr){var un=mr._glBuffers[jr]||this.createGLBuffer(mr);this.boundBufferBases[fr]=mr,yr.bindBufferBase(yr.UNIFORM_BUFFER,fr,un.buffer)}},sn.prototype.bindBufferRange=function(mr,fr,yr){var jr=this.gl,un=this.CONTEXT_UID;yr=yr||0;var $n=mr._glBuffers[un]||this.createGLBuffer(mr);jr.bindBufferRange(jr.UNIFORM_BUFFER,fr||0,$n.buffer,256*yr,256)},sn.prototype.update=function(mr){var fr=this.gl,yr=this.CONTEXT_UID,jr=mr._glBuffers[yr];if(mr._updateID!==jr.updateID)if(jr.updateID=mr._updateID,fr.bindBuffer(mr.type,jr.buffer),jr.byteLength>=mr.data.byteLength)fr.bufferSubData(mr.type,0,mr.data);else{var un=mr.static?fr.STATIC_DRAW:fr.DYNAMIC_DRAW;jr.byteLength=mr.data.byteLength,fr.bufferData(mr.type,mr.data,un)}},sn.prototype.dispose=function(mr,fr){if(this.managedBuffers[mr.id]){delete this.managedBuffers[mr.id];var yr=mr._glBuffers[this.CONTEXT_UID],jr=this.gl;mr.disposeRunner.remove(this),yr&&(fr||jr.deleteBuffer(yr.buffer),delete mr._glBuffers[this.CONTEXT_UID])}},sn.prototype.disposeAll=function(mr){for(var fr=Object.keys(this.managedBuffers),yr=0;yr<fr.length;yr++)this.dispose(this.managedBuffers[fr[yr]],mr)},sn.prototype.createGLBuffer=function(mr){var fr=this.CONTEXT_UID,yr=this.gl;return mr._glBuffers[fr]=new Hu(yr.createBuffer()),this.managedBuffers[mr.id]=mr,mr.disposeRunner.add(this),mr._glBuffers[fr]},sn})(),Uu=(function(sn){function mr(fr){var yr=sn.call(this,nt.n.WEBGL,fr)||this;return fr=yr.options,yr.gl=null,yr.CONTEXT_UID=0,yr.runners={destroy:new dt.a("destroy"),contextChange:new dt.a("contextChange"),reset:new dt.a("reset"),update:new dt.a("update"),postrender:new dt.a("postrender"),prerender:new dt.a("prerender"),resize:new dt.a("resize")},yr.runners.contextChange.add(yr),yr.globalUniforms=new Sn({projectionMatrix:new ht.d},!0),yr.addSystem(Ko,"mask").addSystem(qs,"context").addSystem(co,"state").addSystem(Xs,"shader").addSystem(Nu,"texture").addSystem(kl,"buffer").addSystem(tn,"geometry").addSystem(Nn,"framebuffer").addSystem(Gu,"scissor").addSystem(Lu,"stencil").addSystem(Ku,"projection").addSystem(ls,"textureGC").addSystem(kn,"filter").addSystem(Jr,"renderTexture").addSystem(An,"batch"),yr.initPlugins(mr.__plugins),yr.multisample=void 0,fr.context?yr.context.initFromContext(fr.context):yr.context.initFromOptions({alpha:!!yr.useContextAlpha,antialias:fr.antialias,premultipliedAlpha:yr.useContextAlpha&&yr.useContextAlpha!=="notMultiplied",stencil:!0,preserveDrawingBuffer:fr.preserveDrawingBuffer,powerPreference:yr.options.powerPreference}),yr.renderingToScreen=!0,Object(st.sayHello)(yr.context.webGLVersion===2?"WebGL 2":"WebGL 1"),yr.resize(yr.options.width,yr.options.height),yr}return Et(mr,sn),mr.create=function(fr){if(Object(st.isWebGLSupported)())return new mr(fr);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},mr.prototype.contextChange=function(){var fr,yr=this.gl;if(this.context.webGLVersion===1){var jr=yr.getParameter(yr.FRAMEBUFFER_BINDING);yr.bindFramebuffer(yr.FRAMEBUFFER,null),fr=yr.getParameter(yr.SAMPLES),yr.bindFramebuffer(yr.FRAMEBUFFER,jr)}else jr=yr.getParameter(yr.DRAW_FRAMEBUFFER_BINDING),yr.bindFramebuffer(yr.DRAW_FRAMEBUFFER,null),fr=yr.getParameter(yr.SAMPLES),yr.bindFramebuffer(yr.DRAW_FRAMEBUFFER,jr);fr>=nt.l.HIGH?this.multisample=nt.l.HIGH:fr>=nt.l.MEDIUM?this.multisample=nt.l.MEDIUM:fr>=nt.l.LOW?this.multisample=nt.l.LOW:this.multisample=nt.l.NONE},mr.prototype.addSystem=function(fr,yr){var jr=new fr(this);if(this[yr])throw new Error('Whoops! The name "'+yr+'" is already in use');for(var un in this[yr]=jr,this.runners)this.runners[un].add(jr);return this},mr.prototype.render=function(fr,yr){var jr,un,$n,Yn;if(yr&&(yr instanceof cr?(Object(st.deprecation)("6.0.0","Renderer#render arguments changed, use options instead."),jr=yr,un=arguments[2],$n=arguments[3],Yn=arguments[4]):(jr=yr.renderTexture,un=yr.clear,$n=yr.transform,Yn=yr.skipUpdateTransform)),this.renderingToScreen=!jr,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=$n,!this.context.isLost){if(jr||(this._lastObjectRendered=fr),!Yn){var os=fr.enableTempParent();fr.updateTransform(),fr.disableTempParent(os)}this.renderTexture.bind(jr),this.batch.currentRenderer.start(),(un!==void 0?un:this.clearBeforeRender)&&this.renderTexture.clear(),fr.render(this),this.batch.currentRenderer.flush(),jr&&jr.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},mr.prototype.generateTexture=function(fr,yr,jr,un){yr===void 0&&(yr={});var $n=sn.prototype.generateTexture.call(this,fr,yr,jr,un);return this.framebuffer.blit(),$n},mr.prototype.resize=function(fr,yr){sn.prototype.resize.call(this,fr,yr),this.runners.resize.emit(this.screen.height,this.screen.width)},mr.prototype.reset=function(){return this.runners.reset.emit(),this},mr.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},mr.prototype.destroy=function(fr){for(var yr in this.runners.destroy.emit(),this.runners)this.runners[yr].destroy();sn.prototype.destroy.call(this,fr),this.gl=null},Object.defineProperty(mr.prototype,"extract",{get:function(){return Object(st.deprecation)("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),mr.registerPlugin=function(fr,yr){mr.__plugins=mr.__plugins||{},mr.__plugins[fr]=yr},mr})($u);function tl(sn){return Uu.create(sn)}var rl=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}`,Wu=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`,tp=function(){this.texArray=null,this.blend=0,this.type=nt.f.TRIANGLES,this.start=0,this.size=0,this.data=null},Al=(function(){function sn(){this.elements=[],this.ids=[],this.count=0}return sn.prototype.clear=function(){for(var mr=0;mr<this.count;mr++)this.elements[mr]=null;this.count=0},sn})(),om=(function(){function sn(mr){typeof mr=="number"?this.rawBinaryData=new ArrayBuffer(mr):mr instanceof Uint8Array?this.rawBinaryData=mr.buffer:this.rawBinaryData=mr,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(sn.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(sn.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),sn.prototype.view=function(mr){return this[mr+"View"]},sn.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},sn.sizeOf=function(mr){switch(mr){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(mr+" isn't a valid view type")}},sn})(),Op=(function(sn){function mr(fr){var yr=sn.call(this,fr)||this;return yr.shaderGenerator=null,yr.geometryClass=null,yr.vertexSize=null,yr.state=Ro.for2d(),yr.size=4*rt.b.SPRITE_BATCH_SIZE,yr._vertexCount=0,yr._indexCount=0,yr._bufferedElements=[],yr._bufferedTextures=[],yr._bufferSize=0,yr._shader=null,yr._packedGeometries=[],yr._packedGeometryPoolSize=2,yr._flushId=0,yr._aBuffers={},yr._iBuffers={},yr.MAX_TEXTURES=1,yr.renderer.on("prerender",yr.onPrerender,yr),fr.runners.contextChange.add(yr),yr._dcIndex=0,yr._aIndex=0,yr._iIndex=0,yr._attributeBuffer=null,yr._indexBuffer=null,yr._tempBoundTextures=[],yr}return Et(mr,sn),mr.prototype.contextChange=function(){var fr=this.renderer.gl;rt.b.PREFER_ENV===nt.g.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(fr.getParameter(fr.MAX_TEXTURE_IMAGE_UNITS),rt.b.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(function(jr,un){if(jr===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var $n=un.createShader(un.FRAGMENT_SHADER);;){var Yn=ds.replace(/%forloop%/gi,Ps(jr));if(un.shaderSource($n,Yn),un.compileShader($n),un.getShaderParameter($n,un.COMPILE_STATUS))break;jr=jr/2|0}return jr})(this.MAX_TEXTURES,fr)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var yr=0;yr<this._packedGeometryPoolSize;yr++)this._packedGeometries[yr]=new this.geometryClass;this.initFlushBuffers()},mr.prototype.initFlushBuffers=function(){for(var fr=mr._drawCallPool,yr=mr._textureArrayPool,jr=this.size/4,un=Math.floor(jr/this.MAX_TEXTURES)+1;fr.length<jr;)fr.push(new tp);for(;yr.length<un;)yr.push(new Al);for(var $n=0;$n<this.MAX_TEXTURES;$n++)this._tempBoundTextures[$n]=null},mr.prototype.onPrerender=function(){this._flushId=0},mr.prototype.render=function(fr){fr._texture.valid&&(this._vertexCount+fr.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=fr.vertexData.length/2,this._indexCount+=fr.indices.length,this._bufferedTextures[this._bufferSize]=fr._texture.baseTexture,this._bufferedElements[this._bufferSize++]=fr)},mr.prototype.buildTexturesAndDrawCalls=function(){var fr=this._bufferedTextures,yr=this.MAX_TEXTURES,jr=mr._textureArrayPool,un=this.renderer.batch,$n=this._tempBoundTextures,Yn=this.renderer.textureGC.count,os=++At._globalBatch,Vs=0,eo=jr[0],qo=0;un.copyBoundTextures($n,yr);for(var Po=0;Po<this._bufferSize;++Po){var su=fr[Po];fr[Po]=null,su._batchEnabled!==os&&(eo.count>=yr&&(un.boundArray(eo,$n,os,yr),this.buildDrawCalls(eo,qo,Po),qo=Po,eo=jr[++Vs],++os),su._batchEnabled=os,su.touched=Yn,eo.elements[eo.count++]=su)}for(eo.count>0&&(un.boundArray(eo,$n,os,yr),this.buildDrawCalls(eo,qo,this._bufferSize),++Vs,++os),Po=0;Po<$n.length;Po++)$n[Po]=null;At._globalBatch=os},mr.prototype.buildDrawCalls=function(fr,yr,jr){var un=this._bufferedElements,$n=this._attributeBuffer,Yn=this._indexBuffer,os=this.vertexSize,Vs=mr._drawCallPool,eo=this._dcIndex,qo=this._aIndex,Po=this._iIndex,su=Vs[eo];su.start=this._iIndex,su.texArray=fr;for(var mu=yr;mu<jr;++mu){var zu=un[mu],lu=zu._texture.baseTexture,vl=st.premultiplyBlendMode[lu.alphaMode?1:0][zu.blendMode];un[mu]=null,yr<mu&&su.blend!==vl&&(su.size=Po-su.start,yr=mu,(su=Vs[++eo]).texArray=fr,su.start=Po),this.packInterleavedGeometry(zu,$n,Yn,qo,Po),qo+=zu.vertexData.length/2*os,Po+=zu.indices.length,su.blend=vl}yr<jr&&(su.size=Po-su.start,++eo),this._dcIndex=eo,this._aIndex=qo,this._iIndex=Po},mr.prototype.bindAndClearTexArray=function(fr){for(var yr=this.renderer.texture,jr=0;jr<fr.count;jr++)yr.bind(fr.elements[jr],fr.ids[jr]),fr.elements[jr]=null;fr.count=0},mr.prototype.updateGeometry=function(){var fr=this._packedGeometries,yr=this._attributeBuffer,jr=this._indexBuffer;rt.b.CAN_UPLOAD_SAME_BUFFER?(fr[this._flushId]._buffer.update(yr.rawBinaryData),fr[this._flushId]._indexBuffer.update(jr),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,fr[this._flushId]=new this.geometryClass),fr[this._flushId]._buffer.update(yr.rawBinaryData),fr[this._flushId]._indexBuffer.update(jr),this.renderer.geometry.bind(fr[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},mr.prototype.drawBatches=function(){for(var fr=this._dcIndex,yr=this.renderer,jr=yr.gl,un=yr.state,$n=mr._drawCallPool,Yn=null,os=0;os<fr;os++){var Vs=$n[os],eo=Vs.texArray,qo=Vs.type,Po=Vs.size,su=Vs.start,mu=Vs.blend;Yn!==eo&&(Yn=eo,this.bindAndClearTexArray(eo)),this.state.blendMode=mu,un.set(this.state),jr.drawElements(qo,Po,jr.UNSIGNED_SHORT,2*su)}},mr.prototype.flush=function(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},mr.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),rt.b.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},mr.prototype.stop=function(){this.flush()},mr.prototype.destroy=function(){for(var fr=0;fr<this._packedGeometryPoolSize;fr++)this._packedGeometries[fr]&&this._packedGeometries[fr].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),sn.prototype.destroy.call(this)},mr.prototype.getAttributeBuffer=function(fr){var yr=Object(st.nextPow2)(Math.ceil(fr/8)),jr=Object(st.log2)(yr),un=8*yr;this._aBuffers.length<=jr&&(this._iBuffers.length=jr+1);var $n=this._aBuffers[un];return $n||(this._aBuffers[un]=$n=new om(un*this.vertexSize*4)),$n},mr.prototype.getIndexBuffer=function(fr){var yr=Object(st.nextPow2)(Math.ceil(fr/12)),jr=Object(st.log2)(yr),un=12*yr;this._iBuffers.length<=jr&&(this._iBuffers.length=jr+1);var $n=this._iBuffers[jr];return $n||(this._iBuffers[jr]=$n=new Uint16Array(un)),$n},mr.prototype.packInterleavedGeometry=function(fr,yr,jr,un,$n){for(var Yn=yr.uint32View,os=yr.float32View,Vs=un/this.vertexSize,eo=fr.uvs,qo=fr.indices,Po=fr.vertexData,su=fr._texture.baseTexture._batchLocation,mu=Math.min(fr.worldAlpha,1),zu=mu<1&&fr._texture.baseTexture.alphaMode?Object(st.premultiplyTint)(fr._tintRGB,mu):fr._tintRGB+(255*mu<<24),lu=0;lu<Po.length;lu+=2)os[un++]=Po[lu],os[un++]=Po[lu+1],os[un++]=eo[lu],os[un++]=eo[lu+1],Yn[un++]=zu,os[un++]=su;for(lu=0;lu<qo.length;lu++)jr[$n++]=Vs+qo[lu]},mr._drawCallPool=[],mr._textureArrayPool=[],mr})(xn),op=(function(){function sn(mr,fr){if(this.vertexSrc=mr,this.fragTemplate=fr,this.programCache={},this.defaultGroupCache={},fr.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(fr.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return sn.prototype.generateShader=function(mr){if(!this.programCache[mr]){for(var fr=new Int32Array(mr),yr=0;yr<mr;yr++)fr[yr]=yr;this.defaultGroupCache[mr]=Sn.from({uSamplers:fr},!0);var jr=this.fragTemplate;jr=(jr=jr.replace(/%count%/gi,""+mr)).replace(/%forloop%/gi,this.generateSampleSrc(mr)),this.programCache[mr]=new es(this.vertexSrc,jr)}var un={tint:new Float32Array([1,1,1,1]),translationMatrix:new ht.d,default:this.defaultGroupCache[mr]};return new Gs(this.programCache[mr],un)},sn.prototype.generateSampleSrc=function(mr){var fr="";fr+=`
`,fr+=`
`;for(var yr=0;yr<mr;yr++)yr>0&&(fr+=`
else `),yr<mr-1&&(fr+="if(vTextureId < "+yr+".5)"),fr+=`
{`,fr+=`
color = texture2D(uSamplers[`+yr+"], vTextureCoord);",fr+=`
}`;return fr+=`
`,fr+=`
`},sn})(),wl=(function(sn){function mr(fr){fr===void 0&&(fr=!1);var yr=sn.call(this)||this;return yr._buffer=new Vr(null,fr,!1),yr._indexBuffer=new Vr(null,fr,!0),yr.addAttribute("aVertexPosition",yr._buffer,2,!1,nt.r.FLOAT).addAttribute("aTextureCoord",yr._buffer,2,!1,nt.r.FLOAT).addAttribute("aColor",yr._buffer,4,!0,nt.r.UNSIGNED_BYTE).addAttribute("aTextureId",yr._buffer,1,!0,nt.r.FLOAT).addIndex(yr._indexBuffer),yr}return Et(mr,sn),mr})(Or),um=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute float aTextureId;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform vec4 tint;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
void main(void){
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vTextureId = aTextureId;
vColor = aColor * tint;
}
`,Im=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`,Il=(function(){function sn(){}return sn.create=function(mr){var fr=Object.assign({vertex:um,fragment:Im,geometryClass:wl,vertexSize:6},mr),yr=fr.vertex,jr=fr.fragment,un=fr.vertexSize,$n=fr.geometryClass;return(function(Yn){function os(Vs){var eo=Yn.call(this,Vs)||this;return eo.shaderGenerator=new op(yr,jr),eo.geometryClass=$n,eo.vertexSize=un,eo}return Et(os,Yn),os})(Op)},Object.defineProperty(sn,"defaultVertexSrc",{get:function(){return um},enumerable:!1,configurable:!0}),Object.defineProperty(sn,"defaultFragmentTemplate",{get:function(){return Im},enumerable:!1,configurable:!0}),sn})().create()},function(et,_e,tt){tt.r(_e),tt.d(_e,"BaseTextureCache",function(){return Nr}),tt.d(_e,"CanvasRenderTarget",function(){return Ar}),tt.d(_e,"DATA_URI",function(){return Sn}),tt.d(_e,"ProgramCache",function(){return Wr}),tt.d(_e,"TextureCache",function(){return Mr}),tt.d(_e,"clearTextureCache",function(){return Or}),tt.d(_e,"correctBlendMode",function(){return qt}),tt.d(_e,"createIndicesForQuads",function(){return Ut}),tt.d(_e,"decomposeDataUri",function(){return Kr}),tt.d(_e,"deprecation",function(){return Vr}),tt.d(_e,"destroyTextureCache",function(){return Yr}),tt.d(_e,"determineCrossOrigin",function(){return Hn}),tt.d(_e,"getBufferType",function(){return Ot}),tt.d(_e,"getResolutionOfUrl",function(){return ln}),tt.d(_e,"hex2rgb",function(){return At}),tt.d(_e,"hex2string",function(){return Nt}),tt.d(_e,"interleaveTypedArrays",function(){return Bt}),tt.d(_e,"isPow2",function(){return Jt}),tt.d(_e,"isWebGLSupported",function(){return Tt}),tt.d(_e,"log2",function(){return ar}),tt.d(_e,"nextPow2",function(){return tr}),tt.d(_e,"premultiplyBlendMode",function(){return Ft}),tt.d(_e,"premultiplyRgba",function(){return Vt}),tt.d(_e,"premultiplyTint",function(){return Kt}),tt.d(_e,"premultiplyTintToRgba",function(){return jt}),tt.d(_e,"removeItems",function(){return pr}),tt.d(_e,"rgb2hex",function(){return It}),tt.d(_e,"sayHello",function(){return Rt}),tt.d(_e,"sign",function(){return cr}),tt.d(_e,"skipHello",function(){return Ct}),tt.d(_e,"string2hex",function(){return Pt}),tt.d(_e,"trimCanvas",function(){return Qr}),tt.d(_e,"uid",function(){return Sr}),tt.d(_e,"url",function(){return bt});var rt=tt(4);tt.d(_e,"isMobile",function(){return rt.a});var nt=tt(52),st=tt.n(nt);tt.d(_e,"EventEmitter",function(){return st.a});var dt=tt(53),ft=tt.n(dt);tt.d(_e,"earcut",function(){return ft.a});var ht=tt(36),mt=tt(0),bt={parse:ht.parse,format:ht.format,resolve:ht.resolve};rt.b.RETINA_PREFIX=/@([0-9\.]+)x/,rt.b.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var St,Et=!1;function Ct(){Et=!0}function Rt(kn){var xn;if(!Et){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var An=[`
%c %c %c PixiJS 6.4.2 - ✰ `+kn+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥
`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(xn=globalThis.console).log.apply(xn,An)}else globalThis.console&&globalThis.console.log("PixiJS 6.4.2 - "+kn+" - http://www.pixijs.com/");Et=!0}}function Tt(){return St===void 0&&(St=(function(){var kn={stencil:!0,failIfMajorPerformanceCaveat:rt.b.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!globalThis.WebGLRenderingContext)return!1;var xn=document.createElement("canvas"),An=xn.getContext("webgl",kn)||xn.getContext("experimental-webgl",kn),rs=!(!An||!An.getContextAttributes().stencil);if(An){var qs=An.getExtension("WEBGL_lose_context");qs&&qs.loseContext()}return An=null,rs}catch{return!1}})()),St}var wt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function At(kn,xn){return xn===void 0&&(xn=[]),xn[0]=(kn>>16&255)/255,xn[1]=(kn>>8&255)/255,xn[2]=(255&kn)/255,xn}function Nt(kn){var xn=kn.toString(16);return"#"+(xn="000000".substring(0,6-xn.length)+xn)}function Pt(kn){return typeof kn=="string"&&(kn=wt[kn.toLowerCase()]||kn)[0]==="#"&&(kn=kn.slice(1)),parseInt(kn,16)}function It(kn){return(255*kn[0]<<16)+(255*kn[1]<<8)+(255*kn[2]|0)}var Ft=(function(){for(var kn=[],xn=[],An=0;An<32;An++)kn[An]=An,xn[An]=An;kn[mt.b.NORMAL_NPM]=mt.b.NORMAL,kn[mt.b.ADD_NPM]=mt.b.ADD,kn[mt.b.SCREEN_NPM]=mt.b.SCREEN,xn[mt.b.NORMAL]=mt.b.NORMAL_NPM,xn[mt.b.ADD]=mt.b.ADD_NPM,xn[mt.b.SCREEN]=mt.b.SCREEN_NPM;var rs=[];return rs.push(xn),rs.push(kn),rs})();function qt(kn,xn){return Ft[xn?1:0][kn]}function Vt(kn,xn,An,rs){return An=An||new Float32Array(4),rs||rs===void 0?(An[0]=kn[0]*xn,An[1]=kn[1]*xn,An[2]=kn[2]*xn):(An[0]=kn[0],An[1]=kn[1],An[2]=kn[2]),An[3]=xn,An}function Kt(kn,xn){if(xn===1)return(255*xn<<24)+kn;if(xn===0)return 0;var An=kn>>16&255,rs=kn>>8&255,qs=255&kn;return(255*xn<<24)+((An=An*xn+.5|0)<<16)+((rs=rs*xn+.5|0)<<8)+(qs=qs*xn+.5|0)}function jt(kn,xn,An,rs){return(An=An||new Float32Array(4))[0]=(kn>>16&255)/255,An[1]=(kn>>8&255)/255,An[2]=(255&kn)/255,(rs||rs===void 0)&&(An[0]*=xn,An[1]*=xn,An[2]*=xn),An[3]=xn,An}function Ut(kn,xn){xn===void 0&&(xn=null);var An=6*kn;if((xn=xn||new Uint16Array(An)).length!==An)throw new Error("Out buffer length is incorrect, got "+xn.length+" and expected "+An);for(var rs=0,qs=0;rs<An;rs+=6,qs+=4)xn[rs+0]=qs+0,xn[rs+1]=qs+1,xn[rs+2]=qs+2,xn[rs+3]=qs+0,xn[rs+4]=qs+2,xn[rs+5]=qs+3;return xn}function Ot(kn){if(kn.BYTES_PER_ELEMENT===4)return kn instanceof Float32Array?"Float32Array":kn instanceof Uint32Array?"Uint32Array":"Int32Array";if(kn.BYTES_PER_ELEMENT===2){if(kn instanceof Uint16Array)return"Uint16Array"}else if(kn.BYTES_PER_ELEMENT===1&&kn instanceof Uint8Array)return"Uint8Array";return null}var Wt={Float32Array,Uint32Array,Int32Array,Uint8Array};function Bt(kn,xn){for(var An=0,rs=0,qs={},Ln=0;Ln<kn.length;Ln++)rs+=xn[Ln],An+=kn[Ln].length;var Cn=new ArrayBuffer(4*An),Nn=null,Gr=0;for(Ln=0;Ln<kn.length;Ln++){var tn=xn[Ln],dn=kn[Ln],Rn=Ot(dn);qs[Rn]||(qs[Rn]=new Wt[Rn](Cn)),Nn=qs[Rn];for(var wn=0;wn<dn.length;wn++)Nn[(wn/tn|0)*rs+Gr+wn%tn]=dn[wn];Gr+=tn}return new Float32Array(Cn)}function tr(kn){return kn+=kn===0?1:0,--kn,kn|=kn>>>1,kn|=kn>>>2,kn|=kn>>>4,kn|=kn>>>8,(kn|=kn>>>16)+1}function Jt(kn){return!(kn&kn-1||!kn)}function ar(kn){var xn=(kn>65535?1:0)<<4,An=((kn>>>=xn)>255?1:0)<<3;return xn|=An,xn|=An=((kn>>>=An)>15?1:0)<<2,(xn|=An=((kn>>>=An)>3?1:0)<<1)|(kn>>>=An)>>1}function pr(kn,xn,An){var rs,qs=kn.length;if(!(xn>=qs||An===0)){var Ln=qs-(An=xn+An>qs?qs-xn:An);for(rs=xn;rs<Ln;++rs)kn[rs]=kn[rs+An];kn.length=Ln}}function cr(kn){return kn===0?0:kn<0?-1:1}var gr=0;function Sr(){return++gr}var Er={};function Vr(kn,xn,An){if(An===void 0&&(An=3),!Er[xn]){var rs=new Error().stack;rs===void 0?console.warn("PixiJS Deprecation Warning: ",xn+`
Deprecated since v`+kn):(rs=rs.split(`
`).splice(An).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",xn+`
Deprecated since v`+kn),console.warn(rs),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",xn+`
Deprecated since v`+kn),console.warn(rs))),Er[xn]=!0}}var Wr={},Mr=Object.create(null),Nr=Object.create(null);function Yr(){var kn;for(kn in Mr)Mr[kn].destroy();for(kn in Nr)Nr[kn].destroy()}function Or(){var kn;for(kn in Mr)delete Mr[kn];for(kn in Nr)delete Nr[kn]}var Ar=(function(){function kn(xn,An,rs){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=rs||rt.b.RESOLUTION,this.resize(xn,An)}return kn.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},kn.prototype.resize=function(xn,An){this.canvas.width=Math.round(xn*this.resolution),this.canvas.height=Math.round(An*this.resolution)},kn.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(kn.prototype,"width",{get:function(){return this.canvas.width},set:function(xn){this.canvas.width=Math.round(xn)},enumerable:!1,configurable:!0}),Object.defineProperty(kn.prototype,"height",{get:function(){return this.canvas.height},set:function(xn){this.canvas.height=Math.round(xn)},enumerable:!1,configurable:!0}),kn})();function Qr(kn){var xn,An,rs,qs=kn.width,Ln=kn.height,Cn=kn.getContext("2d"),Nn=Cn.getImageData(0,0,qs,Ln).data,Gr=Nn.length,tn={top:null,left:null,right:null,bottom:null},dn=null;for(xn=0;xn<Gr;xn+=4)Nn[xn+3]!==0&&(An=xn/4%qs,rs=~~(xn/4/qs),tn.top===null&&(tn.top=rs),(tn.left===null||An<tn.left)&&(tn.left=An),(tn.right===null||tn.right<An)&&(tn.right=An+1),(tn.bottom===null||tn.bottom<rs)&&(tn.bottom=rs));return tn.top!==null&&(qs=tn.right-tn.left,Ln=tn.bottom-tn.top+1,dn=Cn.getImageData(tn.left,tn.top,qs,Ln)),{height:Ln,width:qs,data:dn}}var hn,Sn=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Kr(kn){var xn=Sn.exec(kn);if(xn)return{mediaType:xn[1]?xn[1].toLowerCase():void 0,subType:xn[2]?xn[2].toLowerCase():void 0,charset:xn[3]?xn[3].toLowerCase():void 0,encoding:xn[4]?xn[4].toLowerCase():void 0,data:xn[5]}}function Hn(kn,xn){if(xn===void 0&&(xn=globalThis.location),kn.indexOf("data:")===0)return"";xn=xn||globalThis.location,hn||(hn=document.createElement("a")),hn.href=kn;var An=bt.parse(hn.href),rs=!An.port&&xn.port===""||An.port===xn.port;return An.hostname===xn.hostname&&rs&&An.protocol===xn.protocol?"":"anonymous"}function ln(kn,xn){var An=rt.b.RETINA_PREFIX.exec(kn);return An?parseFloat(An[1]):xn!==void 0?xn:1}},function(et,_e,tt){tt.d(_e,"a",function(){return Vr}),tt.d(_e,"b",function(){return Wr});var rt=/iPhone/i,nt=/iPod/i,st=/iPad/i,dt=/\biOS-universal(?:.+)Mac\b/i,ft=/\bAndroid(?:.+)Mobile\b/i,ht=/Android/i,mt=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,bt=/Silk/i,St=/Windows Phone/i,Et=/\bWindows(?:.+)ARM\b/i,Ct=/BlackBerry/i,Rt=/BB10/i,Tt=/Opera Mini/i,wt=/\b(CriOS|Chrome)(?:.+)Mobile/i,At=/Mobile(?:.+)Firefox\b/i,Nt=function(Mr){return Mr!==void 0&&Mr.platform==="MacIntel"&&typeof Mr.maxTouchPoints=="number"&&Mr.maxTouchPoints>1&&typeof MSStream>"u"};/*!
* @pixi/settings - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Pt,It,Ft,qt,Vt,Kt,jt,Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr,gr,Sr,Er,Vr=(function(Mr){var Nr={userAgent:"",platform:"",maxTouchPoints:0};Mr||typeof navigator>"u"?typeof Mr=="string"?Nr.userAgent=Mr:Mr&&Mr.userAgent&&(Nr={userAgent:Mr.userAgent,platform:Mr.platform,maxTouchPoints:Mr.maxTouchPoints||0}):Nr={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var Yr=Nr.userAgent,Or=Yr.split("[FBAN");Or[1]!==void 0&&(Yr=Or[0]),(Or=Yr.split("Twitter"))[1]!==void 0&&(Yr=Or[0]);var Ar=(function(hn){return function(Sn){return Sn.test(hn)}})(Yr),Qr={apple:{phone:Ar(rt)&&!Ar(St),ipod:Ar(nt),tablet:!Ar(rt)&&(Ar(st)||Nt(Nr))&&!Ar(St),universal:Ar(dt),device:(Ar(rt)||Ar(nt)||Ar(st)||Ar(dt)||Nt(Nr))&&!Ar(St)},amazon:{phone:Ar(mt),tablet:!Ar(mt)&&Ar(bt),device:Ar(mt)||Ar(bt)},android:{phone:!Ar(St)&&Ar(mt)||!Ar(St)&&Ar(ft),tablet:!Ar(St)&&!Ar(mt)&&!Ar(ft)&&(Ar(bt)||Ar(ht)),device:!Ar(St)&&(Ar(mt)||Ar(bt)||Ar(ft)||Ar(ht))||Ar(/\bokhttp\b/i)},windows:{phone:Ar(St),tablet:Ar(Et),device:Ar(St)||Ar(Et)},other:{blackberry:Ar(Ct),blackberry10:Ar(Rt),opera:Ar(Tt),firefox:Ar(At),chrome:Ar(wt),device:Ar(Ct)||Ar(Rt)||Ar(Tt)||Ar(At)||Ar(wt)},any:!1,phone:!1,tablet:!1};return Qr.any=Qr.apple.device||Qr.android.device||Qr.windows.device||Qr.other.device,Qr.phone=Qr.apple.phone||Qr.android.phone||Qr.windows.phone,Qr.tablet=Qr.apple.tablet||Qr.android.tablet||Qr.windows.tablet,Qr})(globalThis.navigator);(function(Mr){Mr[Mr.WEBGL_LEGACY=0]="WEBGL_LEGACY",Mr[Mr.WEBGL=1]="WEBGL",Mr[Mr.WEBGL2=2]="WEBGL2"})(Pt||(Pt={})),(function(Mr){Mr[Mr.UNKNOWN=0]="UNKNOWN",Mr[Mr.WEBGL=1]="WEBGL",Mr[Mr.CANVAS=2]="CANVAS"})(It||(It={})),(function(Mr){Mr[Mr.COLOR=16384]="COLOR",Mr[Mr.DEPTH=256]="DEPTH",Mr[Mr.STENCIL=1024]="STENCIL"})(Ft||(Ft={})),(function(Mr){Mr[Mr.NORMAL=0]="NORMAL",Mr[Mr.ADD=1]="ADD",Mr[Mr.MULTIPLY=2]="MULTIPLY",Mr[Mr.SCREEN=3]="SCREEN",Mr[Mr.OVERLAY=4]="OVERLAY",Mr[Mr.DARKEN=5]="DARKEN",Mr[Mr.LIGHTEN=6]="LIGHTEN",Mr[Mr.COLOR_DODGE=7]="COLOR_DODGE",Mr[Mr.COLOR_BURN=8]="COLOR_BURN",Mr[Mr.HARD_LIGHT=9]="HARD_LIGHT",Mr[Mr.SOFT_LIGHT=10]="SOFT_LIGHT",Mr[Mr.DIFFERENCE=11]="DIFFERENCE",Mr[Mr.EXCLUSION=12]="EXCLUSION",Mr[Mr.HUE=13]="HUE",Mr[Mr.SATURATION=14]="SATURATION",Mr[Mr.COLOR=15]="COLOR",Mr[Mr.LUMINOSITY=16]="LUMINOSITY",Mr[Mr.NORMAL_NPM=17]="NORMAL_NPM",Mr[Mr.ADD_NPM=18]="ADD_NPM",Mr[Mr.SCREEN_NPM=19]="SCREEN_NPM",Mr[Mr.NONE=20]="NONE",Mr[Mr.SRC_OVER=0]="SRC_OVER",Mr[Mr.SRC_IN=21]="SRC_IN",Mr[Mr.SRC_OUT=22]="SRC_OUT",Mr[Mr.SRC_ATOP=23]="SRC_ATOP",Mr[Mr.DST_OVER=24]="DST_OVER",Mr[Mr.DST_IN=25]="DST_IN",Mr[Mr.DST_OUT=26]="DST_OUT",Mr[Mr.DST_ATOP=27]="DST_ATOP",Mr[Mr.ERASE=26]="ERASE",Mr[Mr.SUBTRACT=28]="SUBTRACT",Mr[Mr.XOR=29]="XOR"})(qt||(qt={})),(function(Mr){Mr[Mr.POINTS=0]="POINTS",Mr[Mr.LINES=1]="LINES",Mr[Mr.LINE_LOOP=2]="LINE_LOOP",Mr[Mr.LINE_STRIP=3]="LINE_STRIP",Mr[Mr.TRIANGLES=4]="TRIANGLES",Mr[Mr.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",Mr[Mr.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Vt||(Vt={})),(function(Mr){Mr[Mr.RGBA=6408]="RGBA",Mr[Mr.RGB=6407]="RGB",Mr[Mr.RG=33319]="RG",Mr[Mr.RED=6403]="RED",Mr[Mr.RGBA_INTEGER=36249]="RGBA_INTEGER",Mr[Mr.RGB_INTEGER=36248]="RGB_INTEGER",Mr[Mr.RG_INTEGER=33320]="RG_INTEGER",Mr[Mr.RED_INTEGER=36244]="RED_INTEGER",Mr[Mr.ALPHA=6406]="ALPHA",Mr[Mr.LUMINANCE=6409]="LUMINANCE",Mr[Mr.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",Mr[Mr.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",Mr[Mr.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Kt||(Kt={})),(function(Mr){Mr[Mr.TEXTURE_2D=3553]="TEXTURE_2D",Mr[Mr.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",Mr[Mr.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",Mr[Mr.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",Mr[Mr.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",Mr[Mr.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",Mr[Mr.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",Mr[Mr.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",Mr[Mr.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(jt||(jt={})),(function(Mr){Mr[Mr.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",Mr[Mr.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",Mr[Mr.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",Mr[Mr.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",Mr[Mr.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",Mr[Mr.UNSIGNED_INT=5125]="UNSIGNED_INT",Mr[Mr.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",Mr[Mr.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",Mr[Mr.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",Mr[Mr.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",Mr[Mr.BYTE=5120]="BYTE",Mr[Mr.SHORT=5122]="SHORT",Mr[Mr.INT=5124]="INT",Mr[Mr.FLOAT=5126]="FLOAT",Mr[Mr.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",Mr[Mr.HALF_FLOAT=36193]="HALF_FLOAT"})(Ut||(Ut={})),(function(Mr){Mr[Mr.FLOAT=0]="FLOAT",Mr[Mr.INT=1]="INT",Mr[Mr.UINT=2]="UINT"})(Ot||(Ot={})),(function(Mr){Mr[Mr.NEAREST=0]="NEAREST",Mr[Mr.LINEAR=1]="LINEAR"})(Wt||(Wt={})),(function(Mr){Mr[Mr.CLAMP=33071]="CLAMP",Mr[Mr.REPEAT=10497]="REPEAT",Mr[Mr.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Bt||(Bt={})),(function(Mr){Mr[Mr.OFF=0]="OFF",Mr[Mr.POW2=1]="POW2",Mr[Mr.ON=2]="ON",Mr[Mr.ON_MANUAL=3]="ON_MANUAL"})(tr||(tr={})),(function(Mr){Mr[Mr.NPM=0]="NPM",Mr[Mr.UNPACK=1]="UNPACK",Mr[Mr.PMA=2]="PMA",Mr[Mr.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",Mr[Mr.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",Mr[Mr.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",Mr[Mr.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Jt||(Jt={})),(function(Mr){Mr[Mr.NO=0]="NO",Mr[Mr.YES=1]="YES",Mr[Mr.AUTO=2]="AUTO",Mr[Mr.BLEND=0]="BLEND",Mr[Mr.CLEAR=1]="CLEAR",Mr[Mr.BLIT=2]="BLIT"})(ar||(ar={})),(function(Mr){Mr[Mr.AUTO=0]="AUTO",Mr[Mr.MANUAL=1]="MANUAL"})(pr||(pr={})),(function(Mr){Mr.LOW="lowp",Mr.MEDIUM="mediump",Mr.HIGH="highp"})(cr||(cr={})),(function(Mr){Mr[Mr.NONE=0]="NONE",Mr[Mr.SCISSOR=1]="SCISSOR",Mr[Mr.STENCIL=2]="STENCIL",Mr[Mr.SPRITE=3]="SPRITE"})(gr||(gr={})),(function(Mr){Mr[Mr.NONE=0]="NONE",Mr[Mr.LOW=2]="LOW",Mr[Mr.MEDIUM=4]="MEDIUM",Mr[Mr.HIGH=8]="HIGH"})(Sr||(Sr={})),(function(Mr){Mr[Mr.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",Mr[Mr.ARRAY_BUFFER=34962]="ARRAY_BUFFER",Mr[Mr.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Er||(Er={}));var Wr={MIPMAP_TEXTURES:tr.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Sr.NONE,SPRITE_MAX_TEXTURES:(function(Mr){var Nr=!0;if(Vr.tablet||Vr.phone){var Yr;Vr.apple.device&&(Yr=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(Yr[1],10)<11&&(Nr=!1),Vr.android.device&&(Yr=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(Yr[1],10)<7&&(Nr=!1)}return Nr?Mr:4})(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:pr.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:Bt.CLAMP,SCALE_MODE:Wt.LINEAR,PRECISION_VERTEX:cr.HIGH,PRECISION_FRAGMENT:Vr.apple.device?cr.HIGH:cr.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!Vr.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1}},function(et,_e,tt){tt.d(_e,"a",function(){return dt}),tt.d(_e,"b",function(){return Jt}),tt.d(_e,"c",function(){return Wt}),tt.d(_e,"d",function(){return Bt});var rt=tt(4),nt=tt(1),st=tt(3);/*!
* @pixi/display - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/display is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/rt.b.SORTABLE_CHILDREN=!1;var dt=(function(){function ar(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return ar.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},ar.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},ar.prototype.getRectangle=function(pr){return this.minX>this.maxX||this.minY>this.maxY?nt.j.EMPTY:((pr=pr||new nt.j(0,0,1,1)).x=this.minX,pr.y=this.minY,pr.width=this.maxX-this.minX,pr.height=this.maxY-this.minY,pr)},ar.prototype.addPoint=function(pr){this.minX=Math.min(this.minX,pr.x),this.maxX=Math.max(this.maxX,pr.x),this.minY=Math.min(this.minY,pr.y),this.maxY=Math.max(this.maxY,pr.y)},ar.prototype.addPointMatrix=function(pr,cr){var gr=pr.a,Sr=pr.b,Er=pr.c,Vr=pr.d,Wr=pr.tx,Mr=pr.ty,Nr=gr*cr.x+Er*cr.y+Wr,Yr=Sr*cr.x+Vr*cr.y+Mr;this.minX=Math.min(this.minX,Nr),this.maxX=Math.max(this.maxX,Nr),this.minY=Math.min(this.minY,Yr),this.maxY=Math.max(this.maxY,Yr)},ar.prototype.addQuad=function(pr){var cr=this.minX,gr=this.minY,Sr=this.maxX,Er=this.maxY,Vr=pr[0],Wr=pr[1];cr=Vr<cr?Vr:cr,gr=Wr<gr?Wr:gr,Sr=Vr>Sr?Vr:Sr,Er=Wr>Er?Wr:Er,cr=(Vr=pr[2])<cr?Vr:cr,gr=(Wr=pr[3])<gr?Wr:gr,Sr=Vr>Sr?Vr:Sr,Er=Wr>Er?Wr:Er,cr=(Vr=pr[4])<cr?Vr:cr,gr=(Wr=pr[5])<gr?Wr:gr,Sr=Vr>Sr?Vr:Sr,Er=Wr>Er?Wr:Er,cr=(Vr=pr[6])<cr?Vr:cr,gr=(Wr=pr[7])<gr?Wr:gr,Sr=Vr>Sr?Vr:Sr,Er=Wr>Er?Wr:Er,this.minX=cr,this.minY=gr,this.maxX=Sr,this.maxY=Er},ar.prototype.addFrame=function(pr,cr,gr,Sr,Er){this.addFrameMatrix(pr.worldTransform,cr,gr,Sr,Er)},ar.prototype.addFrameMatrix=function(pr,cr,gr,Sr,Er){var Vr=pr.a,Wr=pr.b,Mr=pr.c,Nr=pr.d,Yr=pr.tx,Or=pr.ty,Ar=this.minX,Qr=this.minY,hn=this.maxX,Sn=this.maxY,Kr=Vr*cr+Mr*gr+Yr,Hn=Wr*cr+Nr*gr+Or;Ar=Kr<Ar?Kr:Ar,Qr=Hn<Qr?Hn:Qr,hn=Kr>hn?Kr:hn,Sn=Hn>Sn?Hn:Sn,Ar=(Kr=Vr*Sr+Mr*gr+Yr)<Ar?Kr:Ar,Qr=(Hn=Wr*Sr+Nr*gr+Or)<Qr?Hn:Qr,hn=Kr>hn?Kr:hn,Sn=Hn>Sn?Hn:Sn,Ar=(Kr=Vr*cr+Mr*Er+Yr)<Ar?Kr:Ar,Qr=(Hn=Wr*cr+Nr*Er+Or)<Qr?Hn:Qr,hn=Kr>hn?Kr:hn,Sn=Hn>Sn?Hn:Sn,Ar=(Kr=Vr*Sr+Mr*Er+Yr)<Ar?Kr:Ar,Qr=(Hn=Wr*Sr+Nr*Er+Or)<Qr?Hn:Qr,hn=Kr>hn?Kr:hn,Sn=Hn>Sn?Hn:Sn,this.minX=Ar,this.minY=Qr,this.maxX=hn,this.maxY=Sn},ar.prototype.addVertexData=function(pr,cr,gr){for(var Sr=this.minX,Er=this.minY,Vr=this.maxX,Wr=this.maxY,Mr=cr;Mr<gr;Mr+=2){var Nr=pr[Mr],Yr=pr[Mr+1];Sr=Nr<Sr?Nr:Sr,Er=Yr<Er?Yr:Er,Vr=Nr>Vr?Nr:Vr,Wr=Yr>Wr?Yr:Wr}this.minX=Sr,this.minY=Er,this.maxX=Vr,this.maxY=Wr},ar.prototype.addVertices=function(pr,cr,gr,Sr){this.addVerticesMatrix(pr.worldTransform,cr,gr,Sr)},ar.prototype.addVerticesMatrix=function(pr,cr,gr,Sr,Er,Vr){Er===void 0&&(Er=0),Vr===void 0&&(Vr=Er);for(var Wr=pr.a,Mr=pr.b,Nr=pr.c,Yr=pr.d,Or=pr.tx,Ar=pr.ty,Qr=this.minX,hn=this.minY,Sn=this.maxX,Kr=this.maxY,Hn=gr;Hn<Sr;Hn+=2){var ln=cr[Hn],kn=cr[Hn+1],xn=Wr*ln+Nr*kn+Or,An=Yr*kn+Mr*ln+Ar;Qr=Math.min(Qr,xn-Er),Sn=Math.max(Sn,xn+Er),hn=Math.min(hn,An-Vr),Kr=Math.max(Kr,An+Vr)}this.minX=Qr,this.minY=hn,this.maxX=Sn,this.maxY=Kr},ar.prototype.addBounds=function(pr){var cr=this.minX,gr=this.minY,Sr=this.maxX,Er=this.maxY;this.minX=pr.minX<cr?pr.minX:cr,this.minY=pr.minY<gr?pr.minY:gr,this.maxX=pr.maxX>Sr?pr.maxX:Sr,this.maxY=pr.maxY>Er?pr.maxY:Er},ar.prototype.addBoundsMask=function(pr,cr){var gr=pr.minX>cr.minX?pr.minX:cr.minX,Sr=pr.minY>cr.minY?pr.minY:cr.minY,Er=pr.maxX<cr.maxX?pr.maxX:cr.maxX,Vr=pr.maxY<cr.maxY?pr.maxY:cr.maxY;if(gr<=Er&&Sr<=Vr){var Wr=this.minX,Mr=this.minY,Nr=this.maxX,Yr=this.maxY;this.minX=gr<Wr?gr:Wr,this.minY=Sr<Mr?Sr:Mr,this.maxX=Er>Nr?Er:Nr,this.maxY=Vr>Yr?Vr:Yr}},ar.prototype.addBoundsMatrix=function(pr,cr){this.addFrameMatrix(cr,pr.minX,pr.minY,pr.maxX,pr.maxY)},ar.prototype.addBoundsArea=function(pr,cr){var gr=pr.minX>cr.x?pr.minX:cr.x,Sr=pr.minY>cr.y?pr.minY:cr.y,Er=pr.maxX<cr.x+cr.width?pr.maxX:cr.x+cr.width,Vr=pr.maxY<cr.y+cr.height?pr.maxY:cr.y+cr.height;if(gr<=Er&&Sr<=Vr){var Wr=this.minX,Mr=this.minY,Nr=this.maxX,Yr=this.maxY;this.minX=gr<Wr?gr:Wr,this.minY=Sr<Mr?Sr:Mr,this.maxX=Er>Nr?Er:Nr,this.maxY=Vr>Yr?Vr:Yr}},ar.prototype.pad=function(pr,cr){pr===void 0&&(pr=0),cr===void 0&&(cr=pr),this.isEmpty()||(this.minX-=pr,this.maxX+=pr,this.minY-=cr,this.maxY+=cr)},ar.prototype.addFramePad=function(pr,cr,gr,Sr,Er,Vr){pr-=Er,cr-=Vr,gr+=Er,Sr+=Vr,this.minX=this.minX<pr?this.minX:pr,this.maxX=this.maxX>gr?this.maxX:gr,this.minY=this.minY<cr?this.minY:cr,this.maxY=this.maxY>Sr?this.maxY:Sr},ar})(),ft=function(ar,pr){return(ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(cr,gr){cr.__proto__=gr}||function(cr,gr){for(var Sr in gr)gr.hasOwnProperty(Sr)&&(cr[Sr]=gr[Sr])})(ar,pr)};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function ht(ar,pr){function cr(){this.constructor=ar}ft(ar,pr),ar.prototype=pr===null?Object.create(pr):(cr.prototype=pr.prototype,new cr)}var mt,bt,St,Et,Ct,Rt,Tt,wt,At,Nt,Pt,It,Ft,qt,Vt,Kt,jt,Ut,Ot,Wt=(function(ar){function pr(){var cr=ar.call(this)||this;return cr.tempDisplayObjectParent=null,cr.transform=new nt.m,cr.alpha=1,cr.visible=!0,cr.renderable=!0,cr.cullable=!1,cr.cullArea=null,cr.parent=null,cr.worldAlpha=1,cr._lastSortedIndex=0,cr._zIndex=0,cr.filterArea=null,cr.filters=null,cr._enabledFilters=null,cr._bounds=new dt,cr._localBounds=null,cr._boundsID=0,cr._boundsRect=null,cr._localBoundsRect=null,cr._mask=null,cr._maskRefCount=0,cr._destroyed=!1,cr.isSprite=!1,cr.isMask=!1,cr}return ht(pr,ar),pr.mixin=function(cr){for(var gr=Object.keys(cr),Sr=0;Sr<gr.length;++Sr){var Er=gr[Sr];Object.defineProperty(pr.prototype,Er,Object.getOwnPropertyDescriptor(cr,Er))}},Object.defineProperty(pr.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),pr.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},pr.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},pr.prototype.getBounds=function(cr,gr){return cr||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),gr||(this._boundsRect||(this._boundsRect=new nt.j),gr=this._boundsRect),this._bounds.getRectangle(gr)},pr.prototype.getLocalBounds=function(cr){cr||(this._localBoundsRect||(this._localBoundsRect=new nt.j),cr=this._localBoundsRect),this._localBounds||(this._localBounds=new dt);var gr=this.transform,Sr=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var Er=this._bounds,Vr=this._boundsID;this._bounds=this._localBounds;var Wr=this.getBounds(!1,cr);return this.parent=Sr,this.transform=gr,this._bounds=Er,this._bounds.updateID+=this._boundsID-Vr,Wr},pr.prototype.toGlobal=function(cr,gr,Sr){return Sr===void 0&&(Sr=!1),Sr||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(cr,gr)},pr.prototype.toLocal=function(cr,gr,Sr,Er){return gr&&(cr=gr.toGlobal(cr,Sr,Er)),Er||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(cr,Sr)},pr.prototype.setParent=function(cr){if(!cr||!cr.addChild)throw new Error("setParent: Argument must be a Container");return cr.addChild(this),cr},pr.prototype.setTransform=function(cr,gr,Sr,Er,Vr,Wr,Mr,Nr,Yr){return cr===void 0&&(cr=0),gr===void 0&&(gr=0),Sr===void 0&&(Sr=1),Er===void 0&&(Er=1),Vr===void 0&&(Vr=0),Wr===void 0&&(Wr=0),Mr===void 0&&(Mr=0),Nr===void 0&&(Nr=0),Yr===void 0&&(Yr=0),this.position.x=cr,this.position.y=gr,this.scale.x=Sr||1,this.scale.y=Er||1,this.rotation=Vr,this.skew.x=Wr,this.skew.y=Mr,this.pivot.x=Nr,this.pivot.y=Yr,this},pr.prototype.destroy=function(cr){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(pr.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new Bt),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),pr.prototype.enableTempParent=function(){var cr=this.parent;return this.parent=this._tempDisplayObjectParent,cr},pr.prototype.disableTempParent=function(cr){this.parent=cr},Object.defineProperty(pr.prototype,"x",{get:function(){return this.position.x},set:function(cr){this.transform.position.x=cr},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"y",{get:function(){return this.position.y},set:function(cr){this.transform.position.y=cr},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"position",{get:function(){return this.transform.position},set:function(cr){this.transform.position.copyFrom(cr)},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"scale",{get:function(){return this.transform.scale},set:function(cr){this.transform.scale.copyFrom(cr)},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(cr){this.transform.pivot.copyFrom(cr)},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"skew",{get:function(){return this.transform.skew},set:function(cr){this.transform.skew.copyFrom(cr)},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(cr){this.transform.rotation=cr},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"angle",{get:function(){return this.transform.rotation*nt.i},set:function(cr){this.transform.rotation=cr*nt.b},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"zIndex",{get:function(){return this._zIndex},set:function(cr){this._zIndex=cr,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"worldVisible",{get:function(){var cr=this;do{if(!cr.visible)return!1;cr=cr.parent}while(cr);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"mask",{get:function(){return this._mask},set:function(cr){if(this._mask!==cr){var gr;this._mask&&((gr=this._mask.maskObject||this._mask)._maskRefCount--,gr._maskRefCount===0&&(gr.renderable=!0,gr.isMask=!1)),this._mask=cr,this._mask&&((gr=this._mask.maskObject||this._mask)._maskRefCount===0&&(gr.renderable=!1,gr.isMask=!0),gr._maskRefCount++)}},enumerable:!1,configurable:!0}),pr})(st.EventEmitter),Bt=(function(ar){function pr(){var cr=ar!==null&&ar.apply(this,arguments)||this;return cr.sortDirty=null,cr}return ht(pr,ar),pr})(Wt);function tr(ar,pr){return ar.zIndex===pr.zIndex?ar._lastSortedIndex-pr._lastSortedIndex:ar.zIndex-pr.zIndex}Wt.prototype.displayObjectUpdateTransform=Wt.prototype.updateTransform,(function(ar){ar[ar.WEBGL_LEGACY=0]="WEBGL_LEGACY",ar[ar.WEBGL=1]="WEBGL",ar[ar.WEBGL2=2]="WEBGL2"})(mt||(mt={})),(function(ar){ar[ar.UNKNOWN=0]="UNKNOWN",ar[ar.WEBGL=1]="WEBGL",ar[ar.CANVAS=2]="CANVAS"})(bt||(bt={})),(function(ar){ar[ar.COLOR=16384]="COLOR",ar[ar.DEPTH=256]="DEPTH",ar[ar.STENCIL=1024]="STENCIL"})(St||(St={})),(function(ar){ar[ar.NORMAL=0]="NORMAL",ar[ar.ADD=1]="ADD",ar[ar.MULTIPLY=2]="MULTIPLY",ar[ar.SCREEN=3]="SCREEN",ar[ar.OVERLAY=4]="OVERLAY",ar[ar.DARKEN=5]="DARKEN",ar[ar.LIGHTEN=6]="LIGHTEN",ar[ar.COLOR_DODGE=7]="COLOR_DODGE",ar[ar.COLOR_BURN=8]="COLOR_BURN",ar[ar.HARD_LIGHT=9]="HARD_LIGHT",ar[ar.SOFT_LIGHT=10]="SOFT_LIGHT",ar[ar.DIFFERENCE=11]="DIFFERENCE",ar[ar.EXCLUSION=12]="EXCLUSION",ar[ar.HUE=13]="HUE",ar[ar.SATURATION=14]="SATURATION",ar[ar.COLOR=15]="COLOR",ar[ar.LUMINOSITY=16]="LUMINOSITY",ar[ar.NORMAL_NPM=17]="NORMAL_NPM",ar[ar.ADD_NPM=18]="ADD_NPM",ar[ar.SCREEN_NPM=19]="SCREEN_NPM",ar[ar.NONE=20]="NONE",ar[ar.SRC_OVER=0]="SRC_OVER",ar[ar.SRC_IN=21]="SRC_IN",ar[ar.SRC_OUT=22]="SRC_OUT",ar[ar.SRC_ATOP=23]="SRC_ATOP",ar[ar.DST_OVER=24]="DST_OVER",ar[ar.DST_IN=25]="DST_IN",ar[ar.DST_OUT=26]="DST_OUT",ar[ar.DST_ATOP=27]="DST_ATOP",ar[ar.ERASE=26]="ERASE",ar[ar.SUBTRACT=28]="SUBTRACT",ar[ar.XOR=29]="XOR"})(Et||(Et={})),(function(ar){ar[ar.POINTS=0]="POINTS",ar[ar.LINES=1]="LINES",ar[ar.LINE_LOOP=2]="LINE_LOOP",ar[ar.LINE_STRIP=3]="LINE_STRIP",ar[ar.TRIANGLES=4]="TRIANGLES",ar[ar.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",ar[ar.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Ct||(Ct={})),(function(ar){ar[ar.RGBA=6408]="RGBA",ar[ar.RGB=6407]="RGB",ar[ar.RG=33319]="RG",ar[ar.RED=6403]="RED",ar[ar.RGBA_INTEGER=36249]="RGBA_INTEGER",ar[ar.RGB_INTEGER=36248]="RGB_INTEGER",ar[ar.RG_INTEGER=33320]="RG_INTEGER",ar[ar.RED_INTEGER=36244]="RED_INTEGER",ar[ar.ALPHA=6406]="ALPHA",ar[ar.LUMINANCE=6409]="LUMINANCE",ar[ar.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",ar[ar.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",ar[ar.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Rt||(Rt={})),(function(ar){ar[ar.TEXTURE_2D=3553]="TEXTURE_2D",ar[ar.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",ar[ar.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",ar[ar.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",ar[ar.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",ar[ar.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",ar[ar.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",ar[ar.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",ar[ar.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Tt||(Tt={})),(function(ar){ar[ar.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",ar[ar.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",ar[ar.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",ar[ar.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",ar[ar.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",ar[ar.UNSIGNED_INT=5125]="UNSIGNED_INT",ar[ar.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",ar[ar.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",ar[ar.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",ar[ar.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",ar[ar.BYTE=5120]="BYTE",ar[ar.SHORT=5122]="SHORT",ar[ar.INT=5124]="INT",ar[ar.FLOAT=5126]="FLOAT",ar[ar.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",ar[ar.HALF_FLOAT=36193]="HALF_FLOAT"})(wt||(wt={})),(function(ar){ar[ar.FLOAT=0]="FLOAT",ar[ar.INT=1]="INT",ar[ar.UINT=2]="UINT"})(At||(At={})),(function(ar){ar[ar.NEAREST=0]="NEAREST",ar[ar.LINEAR=1]="LINEAR"})(Nt||(Nt={})),(function(ar){ar[ar.CLAMP=33071]="CLAMP",ar[ar.REPEAT=10497]="REPEAT",ar[ar.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Pt||(Pt={})),(function(ar){ar[ar.OFF=0]="OFF",ar[ar.POW2=1]="POW2",ar[ar.ON=2]="ON",ar[ar.ON_MANUAL=3]="ON_MANUAL"})(It||(It={})),(function(ar){ar[ar.NPM=0]="NPM",ar[ar.UNPACK=1]="UNPACK",ar[ar.PMA=2]="PMA",ar[ar.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",ar[ar.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",ar[ar.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",ar[ar.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Ft||(Ft={})),(function(ar){ar[ar.NO=0]="NO",ar[ar.YES=1]="YES",ar[ar.AUTO=2]="AUTO",ar[ar.BLEND=0]="BLEND",ar[ar.CLEAR=1]="CLEAR",ar[ar.BLIT=2]="BLIT"})(qt||(qt={})),(function(ar){ar[ar.AUTO=0]="AUTO",ar[ar.MANUAL=1]="MANUAL"})(Vt||(Vt={})),(function(ar){ar.LOW="lowp",ar.MEDIUM="mediump",ar.HIGH="highp"})(Kt||(Kt={})),(function(ar){ar[ar.NONE=0]="NONE",ar[ar.SCISSOR=1]="SCISSOR",ar[ar.STENCIL=2]="STENCIL",ar[ar.SPRITE=3]="SPRITE"})(jt||(jt={})),(function(ar){ar[ar.NONE=0]="NONE",ar[ar.LOW=2]="LOW",ar[ar.MEDIUM=4]="MEDIUM",ar[ar.HIGH=8]="HIGH"})(Ut||(Ut={})),(function(ar){ar[ar.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",ar[ar.ARRAY_BUFFER=34962]="ARRAY_BUFFER",ar[ar.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Ot||(Ot={}));var Jt=(function(ar){function pr(){var cr=ar.call(this)||this;return cr.children=[],cr.sortableChildren=rt.b.SORTABLE_CHILDREN,cr.sortDirty=!1,cr}return ht(pr,ar),pr.prototype.onChildrenChange=function(cr){},pr.prototype.addChild=function(){for(var cr=arguments,gr=[],Sr=0;Sr<arguments.length;Sr++)gr[Sr]=cr[Sr];if(gr.length>1)for(var Er=0;Er<gr.length;Er++)this.addChild(gr[Er]);else{var Vr=gr[0];Vr.parent&&Vr.parent.removeChild(Vr),Vr.parent=this,this.sortDirty=!0,Vr.transform._parentID=-1,this.children.push(Vr),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",Vr,this,this.children.length-1),Vr.emit("added",this)}return gr[0]},pr.prototype.addChildAt=function(cr,gr){if(gr<0||gr>this.children.length)throw new Error(cr+"addChildAt: The index "+gr+" supplied is out of bounds "+this.children.length);return cr.parent&&cr.parent.removeChild(cr),cr.parent=this,this.sortDirty=!0,cr.transform._parentID=-1,this.children.splice(gr,0,cr),this._boundsID++,this.onChildrenChange(gr),cr.emit("added",this),this.emit("childAdded",cr,this,gr),cr},pr.prototype.swapChildren=function(cr,gr){if(cr!==gr){var Sr=this.getChildIndex(cr),Er=this.getChildIndex(gr);this.children[Sr]=gr,this.children[Er]=cr,this.onChildrenChange(Sr<Er?Sr:Er)}},pr.prototype.getChildIndex=function(cr){var gr=this.children.indexOf(cr);if(gr===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return gr},pr.prototype.setChildIndex=function(cr,gr){if(gr<0||gr>=this.children.length)throw new Error("The index "+gr+" supplied is out of bounds "+this.children.length);var Sr=this.getChildIndex(cr);Object(st.removeItems)(this.children,Sr,1),this.children.splice(gr,0,cr),this.onChildrenChange(gr)},pr.prototype.getChildAt=function(cr){if(cr<0||cr>=this.children.length)throw new Error("getChildAt: Index ("+cr+") does not exist.");return this.children[cr]},pr.prototype.removeChild=function(){for(var cr=arguments,gr=[],Sr=0;Sr<arguments.length;Sr++)gr[Sr]=cr[Sr];if(gr.length>1)for(var Er=0;Er<gr.length;Er++)this.removeChild(gr[Er]);else{var Vr=gr[0],Wr=this.children.indexOf(Vr);if(Wr===-1)return null;Vr.parent=null,Vr.transform._parentID=-1,Object(st.removeItems)(this.children,Wr,1),this._boundsID++,this.onChildrenChange(Wr),Vr.emit("removed",this),this.emit("childRemoved",Vr,this,Wr)}return gr[0]},pr.prototype.removeChildAt=function(cr){var gr=this.getChildAt(cr);return gr.parent=null,gr.transform._parentID=-1,Object(st.removeItems)(this.children,cr,1),this._boundsID++,this.onChildrenChange(cr),gr.emit("removed",this),this.emit("childRemoved",gr,this,cr),gr},pr.prototype.removeChildren=function(cr,gr){cr===void 0&&(cr=0),gr===void 0&&(gr=this.children.length);var Sr,Er=cr,Vr=gr-Er;if(Vr>0&&Vr<=gr){Sr=this.children.splice(Er,Vr);for(var Wr=0;Wr<Sr.length;++Wr)Sr[Wr].parent=null,Sr[Wr].transform&&(Sr[Wr].transform._parentID=-1);for(this._boundsID++,this.onChildrenChange(cr),Wr=0;Wr<Sr.length;++Wr)Sr[Wr].emit("removed",this),this.emit("childRemoved",Sr[Wr],this,Wr);return Sr}if(Vr===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},pr.prototype.sortChildren=function(){for(var cr=!1,gr=0,Sr=this.children.length;gr<Sr;++gr){var Er=this.children[gr];Er._lastSortedIndex=gr,cr||Er.zIndex===0||(cr=!0)}cr&&this.children.length>1&&this.children.sort(tr),this.sortDirty=!1},pr.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var cr=0,gr=this.children.length;cr<gr;++cr){var Sr=this.children[cr];Sr.visible&&Sr.updateTransform()}},pr.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var cr=0;cr<this.children.length;cr++){var gr=this.children[cr];if(gr.visible&&gr.renderable)if(gr.calculateBounds(),gr._mask){var Sr=gr._mask.maskObject||gr._mask;Sr.calculateBounds(),this._bounds.addBoundsMask(gr._bounds,Sr._bounds)}else gr.filterArea?this._bounds.addBoundsArea(gr._bounds,gr.filterArea):this._bounds.addBounds(gr._bounds)}this._bounds.updateID=this._boundsID},pr.prototype.getLocalBounds=function(cr,gr){gr===void 0&&(gr=!1);var Sr=ar.prototype.getLocalBounds.call(this,cr);if(!gr)for(var Er=0,Vr=this.children.length;Er<Vr;++Er){var Wr=this.children[Er];Wr.visible&&Wr.updateTransform()}return Sr},pr.prototype._calculateBounds=function(){},pr.prototype._renderWithCulling=function(cr){var gr=cr.renderTexture.sourceFrame;if(gr.width>0&&gr.height>0){var Sr,Er;if(this.cullArea?(Sr=this.cullArea,Er=this.worldTransform):this._render!==pr.prototype._render&&(Sr=this.getBounds(!0)),Sr&&gr.intersects(Sr,Er))this._render(cr);else if(this.cullArea)return;for(var Vr=0,Wr=this.children.length;Vr<Wr;++Vr){var Mr=this.children[Vr],Nr=Mr.cullable;Mr.cullable=Nr||!this.cullArea,Mr.render(cr),Mr.cullable=Nr}}},pr.prototype.render=function(cr){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(cr);else if(this.cullable)this._renderWithCulling(cr);else{this._render(cr);for(var gr=0,Sr=this.children.length;gr<Sr;++gr)this.children[gr].render(cr)}},pr.prototype.renderAdvanced=function(cr){var gr=this.filters,Sr=this._mask;if(gr){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var Er=0;Er<gr.length;Er++)gr[Er].enabled&&this._enabledFilters.push(gr[Er])}var Vr=gr&&this._enabledFilters&&this._enabledFilters.length||Sr&&(!Sr.isMaskData||Sr.enabled&&(Sr.autoDetect||Sr.type!==jt.NONE));if(Vr&&cr.batch.flush(),gr&&this._enabledFilters&&this._enabledFilters.length&&cr.filter.push(this,this._enabledFilters),Sr&&cr.mask.push(this,this._mask),this.cullable)this._renderWithCulling(cr);else{this._render(cr),Er=0;for(var Wr=this.children.length;Er<Wr;++Er)this.children[Er].render(cr)}Vr&&cr.batch.flush(),Sr&&cr.mask.pop(this),gr&&this._enabledFilters&&this._enabledFilters.length&&cr.filter.pop()},pr.prototype._render=function(cr){},pr.prototype.destroy=function(cr){ar.prototype.destroy.call(this),this.sortDirty=!1;var gr=typeof cr=="boolean"?cr:cr&&cr.children,Sr=this.removeChildren(0,this.children.length);if(gr)for(var Er=0;Er<Sr.length;++Er)Sr[Er].destroy(cr)},Object.defineProperty(pr.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(cr){var gr=this.getLocalBounds().width;this.scale.x=gr!==0?cr/gr:1,this._width=cr},enumerable:!1,configurable:!0}),Object.defineProperty(pr.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(cr){var gr=this.getLocalBounds().height;this.scale.y=gr!==0?cr/gr:1,this._height=cr},enumerable:!1,configurable:!0}),pr})(Wt);Jt.prototype.containerUpdateTransform=Jt.prototype.updateTransform},function(et,_e,tt){var rt=Object.prototype.hasOwnProperty,nt="~";function st(){}function dt(bt,St,Et){this.fn=bt,this.context=St,this.once=Et||!1}function ft(bt,St,Et,Ct,Rt){if(typeof Et!="function")throw new TypeError("The listener must be a function");var Tt=new dt(Et,Ct||bt,Rt),wt=nt?nt+St:St;return bt._events[wt]?bt._events[wt].fn?bt._events[wt]=[bt._events[wt],Tt]:bt._events[wt].push(Tt):(bt._events[wt]=Tt,bt._eventsCount++),bt}function ht(bt,St){--bt._eventsCount==0?bt._events=new st:delete bt._events[St]}function mt(){this._events=new st,this._eventsCount=0}Object.create&&(st.prototype=Object.create(null),new st().__proto__||(nt=!1)),mt.prototype.eventNames=function(){var bt,St,Et=[];if(this._eventsCount===0)return Et;for(St in bt=this._events)rt.call(bt,St)&&Et.push(nt?St.slice(1):St);return Object.getOwnPropertySymbols?Et.concat(Object.getOwnPropertySymbols(bt)):Et},mt.prototype.listeners=function(bt){var St=nt?nt+bt:bt,Et=this._events[St];if(!Et)return[];if(Et.fn)return[Et.fn];for(var Ct=0,Rt=Et.length,Tt=new Array(Rt);Ct<Rt;Ct++)Tt[Ct]=Et[Ct].fn;return Tt},mt.prototype.listenerCount=function(bt){var St=nt?nt+bt:bt,Et=this._events[St];return Et?Et.fn?1:Et.length:0},mt.prototype.emit=function(bt,St,Et,Ct,Rt,Tt){var wt=nt?nt+bt:bt;if(!this._events[wt])return!1;var At,Nt,Pt=this._events[wt],It=arguments.length;if(Pt.fn){switch(Pt.once&&this.removeListener(bt,Pt.fn,void 0,!0),It){case 1:return Pt.fn.call(Pt.context),!0;case 2:return Pt.fn.call(Pt.context,St),!0;case 3:return Pt.fn.call(Pt.context,St,Et),!0;case 4:return Pt.fn.call(Pt.context,St,Et,Ct),!0;case 5:return Pt.fn.call(Pt.context,St,Et,Ct,Rt),!0;case 6:return Pt.fn.call(Pt.context,St,Et,Ct,Rt,Tt),!0}for(Nt=1,At=new Array(It-1);Nt<It;Nt++)At[Nt-1]=arguments[Nt];Pt.fn.apply(Pt.context,At)}else{var Ft,qt=Pt.length;for(Nt=0;Nt<qt;Nt++)switch(Pt[Nt].once&&this.removeListener(bt,Pt[Nt].fn,void 0,!0),It){case 1:Pt[Nt].fn.call(Pt[Nt].context);break;case 2:Pt[Nt].fn.call(Pt[Nt].context,St);break;case 3:Pt[Nt].fn.call(Pt[Nt].context,St,Et);break;case 4:Pt[Nt].fn.call(Pt[Nt].context,St,Et,Ct);break;default:if(!At)for(Ft=1,At=new Array(It-1);Ft<It;Ft++)At[Ft-1]=arguments[Ft];Pt[Nt].fn.apply(Pt[Nt].context,At)}}return!0},mt.prototype.on=function(bt,St,Et){return ft(this,bt,St,Et,!1)},mt.prototype.once=function(bt,St,Et){return ft(this,bt,St,Et,!0)},mt.prototype.removeListener=function(bt,St,Et,Ct){var Rt=nt?nt+bt:bt;if(!this._events[Rt])return this;if(!St)return ht(this,Rt),this;var Tt=this._events[Rt];if(Tt.fn)Tt.fn!==St||Ct&&!Tt.once||Et&&Tt.context!==Et||ht(this,Rt);else{for(var wt=0,At=[],Nt=Tt.length;wt<Nt;wt++)(Tt[wt].fn!==St||Ct&&!Tt[wt].once||Et&&Tt[wt].context!==Et)&&At.push(Tt[wt]);At.length?this._events[Rt]=At.length===1?At[0]:At:ht(this,Rt)}return this},mt.prototype.removeAllListeners=function(bt){var St;return bt?(St=nt?nt+bt:bt,this._events[St]&&ht(this,St)):(this._events=new st,this._eventsCount=0),this},mt.prototype.off=mt.prototype.removeListener,mt.prototype.addListener=mt.prototype.on,mt.prefixed=nt,mt.EventEmitter=mt,et.exports=mt},function(et,_e,tt){tt.d(_e,"a",function(){return dt}),tt.d(_e,"b",function(){return ft}),tt.d(_e,"c",function(){return rt});var rt,nt=tt(4);/*!
* @pixi/ticker - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/ticker is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/nt.b.TARGET_FPMS=.06,(function(ht){ht[ht.INTERACTION=50]="INTERACTION",ht[ht.HIGH=25]="HIGH",ht[ht.NORMAL=0]="NORMAL",ht[ht.LOW=-25]="LOW",ht[ht.UTILITY=-50]="UTILITY"})(rt||(rt={}));var st=(function(){function ht(mt,bt,St,Et){bt===void 0&&(bt=null),St===void 0&&(St=0),Et===void 0&&(Et=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=mt,this.context=bt,this.priority=St,this.once=Et}return ht.prototype.match=function(mt,bt){return bt===void 0&&(bt=null),this.fn===mt&&this.context===bt},ht.prototype.emit=function(mt){this.fn&&(this.context?this.fn.call(this.context,mt):this.fn(mt));var bt=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),bt},ht.prototype.connect=function(mt){this.previous=mt,mt.next&&(mt.next.previous=this),this.next=mt.next,mt.next=this},ht.prototype.destroy=function(mt){mt===void 0&&(mt=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var bt=this.next;return this.next=mt?null:bt,this.previous=null,bt},ht})(),dt=(function(){function ht(){var mt=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new st(null,null,1/0),this.deltaMS=1/nt.b.TARGET_FPMS,this.elapsedMS=1/nt.b.TARGET_FPMS,this._tick=function(bt){mt._requestId=null,mt.started&&(mt.update(bt),mt.started&&mt._requestId===null&&mt._head.next&&(mt._requestId=requestAnimationFrame(mt._tick)))}}return ht.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},ht.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},ht.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},ht.prototype.add=function(mt,bt,St){return St===void 0&&(St=rt.NORMAL),this._addListener(new st(mt,bt,St))},ht.prototype.addOnce=function(mt,bt,St){return St===void 0&&(St=rt.NORMAL),this._addListener(new st(mt,bt,St,!0))},ht.prototype._addListener=function(mt){var bt=this._head.next,St=this._head;if(bt){for(;bt;){if(mt.priority>bt.priority){mt.connect(St);break}St=bt,bt=bt.next}mt.previous||mt.connect(St)}else mt.connect(St);return this._startIfPossible(),this},ht.prototype.remove=function(mt,bt){for(var St=this._head.next;St;)St=St.match(mt,bt)?St.destroy():St.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(ht.prototype,"count",{get:function(){if(!this._head)return 0;for(var mt=0,bt=this._head;bt=bt.next;)mt++;return mt},enumerable:!1,configurable:!0}),ht.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},ht.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},ht.prototype.destroy=function(){if(!this._protected){this.stop();for(var mt=this._head.next;mt;)mt=mt.destroy(!0);this._head.destroy(),this._head=null}},ht.prototype.update=function(mt){var bt;if(mt===void 0&&(mt=performance.now()),mt>this.lastTime){if((bt=this.elapsedMS=mt-this.lastTime)>this._maxElapsedMS&&(bt=this._maxElapsedMS),bt*=this.speed,this._minElapsedMS){var St=mt-this._lastFrame|0;if(St<this._minElapsedMS)return;this._lastFrame=mt-St%this._minElapsedMS}this.deltaMS=bt,this.deltaTime=this.deltaMS*nt.b.TARGET_FPMS;for(var Et=this._head,Ct=Et.next;Ct;)Ct=Ct.emit(this.deltaTime);Et.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=mt},Object.defineProperty(ht.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(ht.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(mt){var bt=Math.min(this.maxFPS,mt),St=Math.min(Math.max(0,bt)/1e3,nt.b.TARGET_FPMS);this._maxElapsedMS=1/St},enumerable:!1,configurable:!0}),Object.defineProperty(ht.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(mt){if(mt===0)this._minElapsedMS=0;else{var bt=Math.max(this.minFPS,mt);this._minElapsedMS=1/(bt/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(ht,"shared",{get:function(){if(!ht._shared){var mt=ht._shared=new ht;mt.autoStart=!0,mt._protected=!0}return ht._shared},enumerable:!1,configurable:!0}),Object.defineProperty(ht,"system",{get:function(){if(!ht._system){var mt=ht._system=new ht;mt.autoStart=!0,mt._protected=!0}return ht._system},enumerable:!1,configurable:!0}),ht})(),ft=(function(){function ht(){}return ht.init=function(mt){var bt=this;mt=Object.assign({autoStart:!0,sharedTicker:!1},mt),Object.defineProperty(this,"ticker",{set:function(St){this._ticker&&this._ticker.remove(this.render,this),this._ticker=St,St&&St.add(this.render,this,rt.LOW)},get:function(){return this._ticker}}),this.stop=function(){bt._ticker.stop()},this.start=function(){bt._ticker.start()},this._ticker=null,this.ticker=mt.sharedTicker?dt.shared:new dt,mt.autoStart&&this.start()},ht.destroy=function(){if(this._ticker){var mt=this._ticker;this.ticker=null,mt.destroy()}},ht})()},function(et,_e,tt){tt.d(_e,"a",function(){return Rt}),tt.d(_e,"b",function(){return wt}),tt.d(_e,"c",function(){return Tt});var rt=tt(2),nt=tt(1),st=tt(0),dt=tt(5),ft=tt(4),ht=tt(3),mt=function(At,Nt){return(mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pt,It){Pt.__proto__=It}||function(Pt,It){for(var Ft in It)It.hasOwnProperty(Ft)&&(Pt[Ft]=It[Ft])})(At,Nt)};function bt(At,Nt){function Pt(){this.constructor=At}mt(At,Nt),At.prototype=Nt===null?Object.create(Nt):(Pt.prototype=Nt.prototype,new Pt)}var St=(function(){function At(Nt,Pt){this.uvBuffer=Nt,this.uvMatrix=Pt,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return At.prototype.update=function(Nt){if(Nt||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var Pt=this.uvBuffer.data;this.data&&this.data.length===Pt.length||(this.data=new Float32Array(Pt.length)),this.uvMatrix.multiplyUvs(Pt,this.data),this._updateID++}},At})(),Et=new nt.g,Ct=new nt.h,Rt=(function(At){function Nt(Pt,It,Ft,qt){qt===void 0&&(qt=st.f.TRIANGLES);var Vt=At.call(this)||this;return Vt.geometry=Pt,Vt.shader=It,Vt.state=Ft||rt.s.for2d(),Vt.drawMode=qt,Vt.start=0,Vt.size=0,Vt.uvs=null,Vt.indices=null,Vt.vertexData=new Float32Array(1),Vt.vertexDirty=-1,Vt._transformID=-1,Vt._roundPixels=ft.b.ROUND_PIXELS,Vt.batchUvs=null,Vt}return bt(Nt,At),Object.defineProperty(Nt.prototype,"geometry",{get:function(){return this._geometry},set:function(Pt){this._geometry!==Pt&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=Pt,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"material",{get:function(){return this.shader},set:function(Pt){this.shader=Pt},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(Pt){this.state.blendMode=Pt},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(Pt){this._roundPixels!==Pt&&(this._transformID=-1),this._roundPixels=Pt},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(Pt){this.shader.tint=Pt},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(Pt){this.shader.texture=Pt},enumerable:!1,configurable:!0}),Nt.prototype._render=function(Pt){var It=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===st.f.TRIANGLES&&It.length<2*Nt.BATCHABLE_SIZE?this._renderToBatch(Pt):this._renderDefault(Pt)},Nt.prototype._renderDefault=function(Pt){var It=this.shader;It.alpha=this.worldAlpha,It.update&&It.update(),Pt.batch.flush(),It.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),Pt.shader.bind(It),Pt.state.set(this.state),Pt.geometry.bind(this.geometry,It),Pt.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},Nt.prototype._renderToBatch=function(Pt){var It=this.geometry,Ft=this.shader;Ft.uvMatrix&&(Ft.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=It.indexBuffer.data,this._tintRGB=Ft._tintRGB,this._texture=Ft.texture;var qt=this.material.pluginName;Pt.batch.setObjectRenderer(Pt.plugins[qt]),Pt.plugins[qt].render(this)},Nt.prototype.calculateVertices=function(){var Pt=this.geometry.buffers[0],It=Pt.data,Ft=Pt._updateID;if(Ft!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==It.length&&(this.vertexData=new Float32Array(It.length));for(var qt=this.transform.worldTransform,Vt=qt.a,Kt=qt.b,jt=qt.c,Ut=qt.d,Ot=qt.tx,Wt=qt.ty,Bt=this.vertexData,tr=0;tr<Bt.length/2;tr++){var Jt=It[2*tr],ar=It[2*tr+1];Bt[2*tr]=Vt*Jt+jt*ar+Ot,Bt[2*tr+1]=Kt*Jt+Ut*ar+Wt}if(this._roundPixels){var pr=ft.b.RESOLUTION;for(tr=0;tr<Bt.length;++tr)Bt[tr]=Math.round((Bt[tr]*pr|0)/pr)}this.vertexDirty=Ft}},Nt.prototype.calculateUvs=function(){var Pt=this.geometry.buffers[1],It=this.shader;It.uvMatrix.isSimple?this.uvs=Pt.data:(this.batchUvs||(this.batchUvs=new St(Pt,It.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},Nt.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},Nt.prototype.containsPoint=function(Pt){if(!this.getBounds().contains(Pt.x,Pt.y))return!1;this.worldTransform.applyInverse(Pt,Et);for(var It=this.geometry.getBuffer("aVertexPosition").data,Ft=Ct.points,qt=this.geometry.getIndex().data,Vt=qt.length,Kt=this.drawMode===4?3:1,jt=0;jt+2<Vt;jt+=Kt){var Ut=2*qt[jt],Ot=2*qt[jt+1],Wt=2*qt[jt+2];if(Ft[0]=It[Ut],Ft[1]=It[Ut+1],Ft[2]=It[Ot],Ft[3]=It[Ot+1],Ft[4]=It[Wt],Ft[5]=It[Wt+1],Ct.contains(Et.x,Et.y))return!0}return!1},Nt.prototype.destroy=function(Pt){At.prototype.destroy.call(this,Pt),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},Nt.BATCHABLE_SIZE=100,Nt})(dt.b),Tt=(function(At){function Nt(Pt,It){var Ft=this,qt={uSampler:Pt,alpha:1,uTextureMatrix:nt.d.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(It=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},It)).uniforms&&Object.assign(qt,It.uniforms),(Ft=At.call(this,It.program||rt.n.from(`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTextureMatrix;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
}
`,`varying vec2 vTextureCoord;
uniform vec4 uColor;
uniform sampler2D uSampler;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
}
`),qt)||this)._colorDirty=!1,Ft.uvMatrix=new rt.u(Pt),Ft.batchable=It.program===void 0,Ft.pluginName=It.pluginName,Ft.tint=It.tint,Ft.alpha=It.alpha,Ft}return bt(Nt,At),Object.defineProperty(Nt.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(Pt){this.uniforms.uSampler!==Pt&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!Pt.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=Pt,this.uvMatrix.texture=Pt)},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"alpha",{get:function(){return this._alpha},set:function(Pt){Pt!==this._alpha&&(this._alpha=Pt,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(Nt.prototype,"tint",{get:function(){return this._tint},set:function(Pt){Pt!==this._tint&&(this._tint=Pt,this._tintRGB=(Pt>>16)+(65280&Pt)+((255&Pt)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),Nt.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var Pt=this.texture.baseTexture;Object(ht.premultiplyTintToRgba)(this._tint,this._alpha,this.uniforms.uColor,Pt.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},Nt})(rt.r),wt=(function(At){function Nt(Pt,It,Ft){var qt=At.call(this)||this,Vt=new rt.h(Pt),Kt=new rt.h(It,!0),jt=new rt.h(Ft,!0,!0);return qt.addAttribute("aVertexPosition",Vt,2,!1,st.r.FLOAT).addAttribute("aTextureCoord",Kt,2,!1,st.r.FLOAT).addIndex(jt),qt._updateId=-1,qt}return bt(Nt,At),Object.defineProperty(Nt.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),Nt})(rt.l)},function(et,_e){et.exports=function(tt){return tt===void 0}},function(et,_e){et.exports=`precision mediump float;
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
varying vec2 filterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition() {
vec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord() {
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main() {
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
filterCoord = aVertexPosition * outputFrame.zw;
}
`},function(et,_e,tt){tt.d(_e,"a",function(){return Ct}),tt.d(_e,"b",function(){return Rt});var rt=tt(2),nt=tt(3),st=tt(1),dt=tt(0),ft=tt(4),ht=function(wt,At){return(ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Nt,Pt){Nt.__proto__=Pt}||function(Nt,Pt){for(var It in Pt)Pt.hasOwnProperty(It)&&(Nt[It]=Pt[It])})(wt,At)},mt=(function(){function wt(At){this._foundShapes=[],this.renderer=At}return wt.prototype.pushMask=function(At){var Nt=this.renderer,Pt=At.maskObject||At;Nt.context.save();var It=this._foundShapes;if(this.recursiveFindShapes(Pt,It),It.length>0){var Ft=Nt.context;Ft.beginPath();for(var qt=0;qt<It.length;qt++){var Vt=It[qt],Kt=Vt.transform.worldTransform;this.renderer.setContextTransform(Kt),this.renderGraphicsShape(Vt)}It.length=0,Ft.clip()}},wt.prototype.recursiveFindShapes=function(At,Nt){At.geometry&&At.geometry.graphicsData&&Nt.push(At);var Pt=At.children;if(Pt)for(var It=0;It<Pt.length;It++)this.recursiveFindShapes(Pt[It],Nt)},wt.prototype.renderGraphicsShape=function(At){At.finishPoly();var Nt=this.renderer.context,Pt=At.geometry.graphicsData,It=Pt.length;if(It!==0)for(var Ft=0;Ft<It;Ft++){var qt=Pt[Ft],Vt=qt.shape;if(Vt.type===st.l.POLY){var Kt=Vt.points,jt=qt.holes,Ut=void 0,Ot=void 0,Wt=void 0,Bt=void 0;Nt.moveTo(Kt[0],Kt[1]);for(var tr=1;tr<Kt.length/2;tr++)Nt.lineTo(Kt[2*tr],Kt[2*tr+1]);if(jt.length>0){for(Ut=0,Wt=Kt[0],Bt=Kt[1],tr=2;tr+2<Kt.length;tr+=2)Ut+=(Kt[tr]-Wt)*(Kt[tr+3]-Bt)-(Kt[tr+2]-Wt)*(Kt[tr+1]-Bt);for(var Jt=0;Jt<jt.length;Jt++)if(Kt=jt[Jt].shape.points){for(Ot=0,Wt=Kt[0],Bt=Kt[1],tr=2;tr+2<Kt.length;tr+=2)Ot+=(Kt[tr]-Wt)*(Kt[tr+3]-Bt)-(Kt[tr+2]-Wt)*(Kt[tr+1]-Bt);if(Ot*Ut<0)for(Nt.moveTo(Kt[0],Kt[1]),tr=2;tr<Kt.length;tr+=2)Nt.lineTo(Kt[tr],Kt[tr+1]);else for(Nt.moveTo(Kt[Kt.length-2],Kt[Kt.length-1]),tr=Kt.length-4;tr>=0;tr-=2)Nt.lineTo(Kt[tr],Kt[tr+1]);jt[Jt].shape.closeStroke&&Nt.closePath()}}Kt[0]===Kt[Kt.length-2]&&Kt[1]===Kt[Kt.length-1]&&Nt.closePath()}else if(Vt.type===st.l.RECT)Nt.rect(Vt.x,Vt.y,Vt.width,Vt.height),Nt.closePath();else if(Vt.type===st.l.CIRC)Nt.arc(Vt.x,Vt.y,Vt.radius,0,2*Math.PI),Nt.closePath();else if(Vt.type===st.l.ELIP){var ar=2*Vt.width,pr=2*Vt.height,cr=Vt.x-ar/2,gr=Vt.y-pr/2,Sr=ar/2*.5522848,Er=pr/2*.5522848,Vr=cr+ar,Wr=gr+pr,Mr=cr+ar/2,Nr=gr+pr/2;Nt.moveTo(cr,Nr),Nt.bezierCurveTo(cr,Nr-Er,Mr-Sr,gr,Mr,gr),Nt.bezierCurveTo(Mr+Sr,gr,Vr,Nr-Er,Vr,Nr),Nt.bezierCurveTo(Vr,Nr+Er,Mr+Sr,Wr,Mr,Wr),Nt.bezierCurveTo(Mr-Sr,Wr,cr,Nr+Er,cr,Nr),Nt.closePath()}else if(Vt.type===st.l.RREC){var Yr=Vt.x,Or=Vt.y,Ar=Vt.width,Qr=Vt.height,hn=Vt.radius,Sn=Math.min(Ar,Qr)/2;hn=hn>Sn?Sn:hn,Nt.moveTo(Yr,Or+hn),Nt.lineTo(Yr,Or+Qr-hn),Nt.quadraticCurveTo(Yr,Or+Qr,Yr+hn,Or+Qr),Nt.lineTo(Yr+Ar-hn,Or+Qr),Nt.quadraticCurveTo(Yr+Ar,Or+Qr,Yr+Ar,Or+Qr-hn),Nt.lineTo(Yr+Ar,Or+hn),Nt.quadraticCurveTo(Yr+Ar,Or,Yr+Ar-hn,Or),Nt.lineTo(Yr+hn,Or),Nt.quadraticCurveTo(Yr,Or,Yr,Or+hn),Nt.closePath()}}},wt.prototype.popMask=function(At){At.context.restore(),At.invalidateBlendMode()},wt.prototype.destroy=function(){},wt})();function bt(wt){var At=document.createElement("canvas");At.width=6,At.height=1;var Nt=At.getContext("2d");return Nt.fillStyle=wt,Nt.fillRect(0,0,6,1),At}function St(){if(typeof document>"u")return!1;var wt=bt("#ff00ff"),At=bt("#ffff00"),Nt=document.createElement("canvas");Nt.width=6,Nt.height=1;var Pt=Nt.getContext("2d");Pt.globalCompositeOperation="multiply",Pt.drawImage(wt,0,0),Pt.drawImage(At,2,0);var It=Pt.getImageData(2,0,1,1);if(!It)return!1;var Ft=It.data;return Ft[0]===255&&Ft[1]===0&&Ft[2]===0}var Et=new st.d,Ct=(function(wt){function At(Nt){var Pt,It=wt.call(this,dt.n.CANVAS,Nt)||this;if(It.refresh=!0,It.maskManager=new mt(It),It.smoothProperty="imageSmoothingEnabled",It.blendModes=(Pt===void 0&&(Pt=[]),St()?(Pt[dt.b.NORMAL]="source-over",Pt[dt.b.ADD]="lighter",Pt[dt.b.MULTIPLY]="multiply",Pt[dt.b.SCREEN]="screen",Pt[dt.b.OVERLAY]="overlay",Pt[dt.b.DARKEN]="darken",Pt[dt.b.LIGHTEN]="lighten",Pt[dt.b.COLOR_DODGE]="color-dodge",Pt[dt.b.COLOR_BURN]="color-burn",Pt[dt.b.HARD_LIGHT]="hard-light",Pt[dt.b.SOFT_LIGHT]="soft-light",Pt[dt.b.DIFFERENCE]="difference",Pt[dt.b.EXCLUSION]="exclusion",Pt[dt.b.HUE]="hue",Pt[dt.b.SATURATION]="saturate",Pt[dt.b.COLOR]="color",Pt[dt.b.LUMINOSITY]="luminosity"):(Pt[dt.b.NORMAL]="source-over",Pt[dt.b.ADD]="lighter",Pt[dt.b.MULTIPLY]="source-over",Pt[dt.b.SCREEN]="source-over",Pt[dt.b.OVERLAY]="source-over",Pt[dt.b.DARKEN]="source-over",Pt[dt.b.LIGHTEN]="source-over",Pt[dt.b.COLOR_DODGE]="source-over",Pt[dt.b.COLOR_BURN]="source-over",Pt[dt.b.HARD_LIGHT]="source-over",Pt[dt.b.SOFT_LIGHT]="source-over",Pt[dt.b.DIFFERENCE]="source-over",Pt[dt.b.EXCLUSION]="source-over",Pt[dt.b.HUE]="source-over",Pt[dt.b.SATURATION]="source-over",Pt[dt.b.COLOR]="source-over",Pt[dt.b.LUMINOSITY]="source-over"),Pt[dt.b.NORMAL_NPM]=Pt[dt.b.NORMAL],Pt[dt.b.ADD_NPM]=Pt[dt.b.ADD],Pt[dt.b.SCREEN_NPM]=Pt[dt.b.SCREEN],Pt[dt.b.SRC_IN]="source-in",Pt[dt.b.SRC_OUT]="source-out",Pt[dt.b.SRC_ATOP]="source-atop",Pt[dt.b.DST_OVER]="destination-over",Pt[dt.b.DST_IN]="destination-in",Pt[dt.b.DST_OUT]="destination-out",Pt[dt.b.DST_ATOP]="destination-atop",Pt[dt.b.XOR]="xor",Pt[dt.b.SUBTRACT]="source-over",Pt),It.renderingToScreen=!1,It._activeBlendMode=null,It._projTransform=null,It._outerBlend=!1,It.rootContext=It.view.getContext("2d",{alpha:It.useContextAlpha}),It.context=It.rootContext,!It.rootContext.imageSmoothingEnabled){var Ft=It.rootContext;Ft.webkitImageSmoothingEnabled?It.smoothProperty="webkitImageSmoothingEnabled":Ft.mozImageSmoothingEnabled?It.smoothProperty="mozImageSmoothingEnabled":Ft.oImageSmoothingEnabled?It.smoothProperty="oImageSmoothingEnabled":Ft.msImageSmoothingEnabled&&(It.smoothProperty="msImageSmoothingEnabled")}return It.initPlugins(At.__plugins),Object(nt.sayHello)("Canvas"),It.resize(It.options.width,It.options.height),It}return(function(Nt,Pt){function It(){this.constructor=Nt}ht(Nt,Pt),Nt.prototype=Pt===null?Object.create(Pt):(It.prototype=Pt.prototype,new It)})(At,wt),At.prototype.addSystem=function(){return this},At.prototype.render=function(Nt,Pt){if(this.view){var It,Ft,qt,Vt;Pt&&(Pt instanceof rt.p||Pt instanceof rt.b?(Object(nt.deprecation)("6.0.0","CanvasRenderer#render arguments changed, use options instead."),It=Pt,Ft=arguments[2],qt=arguments[3],Vt=arguments[4]):(It=Pt.renderTexture,Ft=Pt.clear,qt=Pt.transform,Vt=Pt.skipUpdateTransform)),this.renderingToScreen=!It,this.emit("prerender");var Kt=this.resolution;It?((It=It.castToBaseTexture())._canvasRenderTarget||(It._canvasRenderTarget=new nt.CanvasRenderTarget(It.width,It.height,It.resolution),It.resource=new rt.j(It._canvasRenderTarget.canvas),It.valid=!0),this.context=It._canvasRenderTarget.context,this.resolution=It._canvasRenderTarget.resolution):this.context=this.rootContext;var jt=this.context;if(this._projTransform=qt||null,It||(this._lastObjectRendered=Nt),!Vt){var Ut=Nt.enableTempParent();Nt.updateTransform(),Nt.disableTempParent(Ut)}if(jt.save(),jt.setTransform(1,0,0,1,0,0),jt.globalAlpha=1,this._activeBlendMode=dt.b.NORMAL,this._outerBlend=!1,jt.globalCompositeOperation=this.blendModes[dt.b.NORMAL],Ft!==void 0?Ft:this.clearBeforeRender)if(this.renderingToScreen)jt.clearRect(0,0,this.width,this.height),this.backgroundAlpha>0&&(jt.globalAlpha=this.useContextAlpha?this.backgroundAlpha:1,jt.fillStyle=this._backgroundColorString,jt.fillRect(0,0,this.width,this.height),jt.globalAlpha=1);else{(It=It)._canvasRenderTarget.clear();var Ot=It.clearColor;Ot[3]>0&&(jt.globalAlpha=this.useContextAlpha?Ot[3]:1,jt.fillStyle=Object(nt.hex2string)(Object(nt.rgb2hex)(Ot)),jt.fillRect(0,0,It.realWidth,It.realHeight),jt.globalAlpha=1)}var Wt=this.context;this.context=jt,Nt.renderCanvas(this),this.context=Wt,jt.restore(),this.resolution=Kt,this._projTransform=null,this.emit("postrender")}},At.prototype.setContextTransform=function(Nt,Pt,It){var Ft=Nt,qt=this._projTransform,Vt=this.resolution;It=It||Vt,qt&&((Ft=Et).copyFrom(Nt),Ft.prepend(qt)),Pt?this.context.setTransform(Ft.a*It,Ft.b*It,Ft.c*It,Ft.d*It,Ft.tx*Vt|0,Ft.ty*Vt|0):this.context.setTransform(Ft.a*It,Ft.b*It,Ft.c*It,Ft.d*It,Ft.tx*Vt,Ft.ty*Vt)},At.prototype.clear=function(Nt,Pt){Nt===void 0&&(Nt=this._backgroundColorString),Pt===void 0&&(Pt=this.backgroundAlpha);var It=this.context;It.clearRect(0,0,this.width,this.height),Nt&&(It.globalAlpha=this.useContextAlpha?Pt:1,It.fillStyle=Nt,It.fillRect(0,0,this.width,this.height),It.globalAlpha=1)},At.prototype.setBlendMode=function(Nt,Pt){var It=Nt===dt.b.SRC_IN||Nt===dt.b.SRC_OUT||Nt===dt.b.DST_IN||Nt===dt.b.DST_ATOP;!Pt&&It&&(Nt=dt.b.NORMAL),this._activeBlendMode!==Nt&&(this._activeBlendMode=Nt,this._outerBlend=It,this.context.globalCompositeOperation=this.blendModes[Nt])},At.prototype.destroy=function(Nt){wt.prototype.destroy.call(this,Nt),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},At.prototype.resize=function(Nt,Pt){wt.prototype.resize.call(this,Nt,Pt),this.smoothProperty&&(this.rootContext[this.smoothProperty]=ft.b.SCALE_MODE===dt.p.LINEAR)},At.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},At.registerPlugin=function(Nt,Pt){At.__plugins=At.__plugins||{},At.__plugins[Nt]=Pt},At})(rt.a),Rt={canvas:null,getTintedCanvas:function(wt,At){var Nt=wt.texture,Pt="#"+("00000"+(0|(At=Rt.roundColor(At))).toString(16)).slice(-6);Nt.tintCache=Nt.tintCache||{};var It,Ft=Nt.tintCache[Pt];if(Ft){if(Ft.tintId===Nt._updateID)return Nt.tintCache[Pt];It=Nt.tintCache[Pt]}else It=document.createElement("canvas");if(Rt.tintMethod(Nt,At,It),It.tintId=Nt._updateID,Rt.convertTintToImage){var qt=new Image;qt.src=It.toDataURL(),Nt.tintCache[Pt]=qt}else Nt.tintCache[Pt]=It;return It},getTintedPattern:function(wt,At){var Nt="#"+("00000"+(0|(At=Rt.roundColor(At))).toString(16)).slice(-6);wt.patternCache=wt.patternCache||{};var Pt=wt.patternCache[Nt];return Pt&&Pt.tintId===wt._updateID||(Rt.canvas||(Rt.canvas=document.createElement("canvas")),Rt.tintMethod(wt,At,Rt.canvas),(Pt=Rt.canvas.getContext("2d").createPattern(Rt.canvas,"repeat")).tintId=wt._updateID,wt.patternCache[Nt]=Pt),Pt},tintWithMultiply:function(wt,At,Nt){var Pt=Nt.getContext("2d"),It=wt._frame.clone(),Ft=wt.baseTexture.resolution;It.x*=Ft,It.y*=Ft,It.width*=Ft,It.height*=Ft,Nt.width=Math.ceil(It.width),Nt.height=Math.ceil(It.height),Pt.save(),Pt.fillStyle="#"+("00000"+(0|At).toString(16)).slice(-6),Pt.fillRect(0,0,It.width,It.height),Pt.globalCompositeOperation="multiply";var qt=wt.baseTexture.getDrawableSource();Pt.drawImage(qt,It.x,It.y,It.width,It.height,0,0,It.width,It.height),Pt.globalCompositeOperation="destination-atop",Pt.drawImage(qt,It.x,It.y,It.width,It.height,0,0,It.width,It.height),Pt.restore()},tintWithOverlay:function(wt,At,Nt){var Pt=Nt.getContext("2d"),It=wt._frame.clone(),Ft=wt.baseTexture.resolution;It.x*=Ft,It.y*=Ft,It.width*=Ft,It.height*=Ft,Nt.width=Math.ceil(It.width),Nt.height=Math.ceil(It.height),Pt.save(),Pt.globalCompositeOperation="copy",Pt.fillStyle="#"+("00000"+(0|At).toString(16)).slice(-6),Pt.fillRect(0,0,It.width,It.height),Pt.globalCompositeOperation="destination-atop",Pt.drawImage(wt.baseTexture.getDrawableSource(),It.x,It.y,It.width,It.height,0,0,It.width,It.height),Pt.restore()},tintWithPerPixel:function(wt,At,Nt){var Pt=Nt.getContext("2d"),It=wt._frame.clone(),Ft=wt.baseTexture.resolution;It.x*=Ft,It.y*=Ft,It.width*=Ft,It.height*=Ft,Nt.width=Math.ceil(It.width),Nt.height=Math.ceil(It.height),Pt.save(),Pt.globalCompositeOperation="copy",Pt.drawImage(wt.baseTexture.getDrawableSource(),It.x,It.y,It.width,It.height,0,0,It.width,It.height),Pt.restore();for(var qt=Object(nt.hex2rgb)(At),Vt=qt[0],Kt=qt[1],jt=qt[2],Ut=Pt.getImageData(0,0,It.width,It.height),Ot=Ut.data,Wt=0;Wt<Ot.length;Wt+=4)Ot[Wt+0]*=Vt,Ot[Wt+1]*=Kt,Ot[Wt+2]*=jt;Pt.putImageData(Ut,0,0)},roundColor:function(wt){var At=Rt.cacheStepsPerColorChannel,Nt=Object(nt.hex2rgb)(wt);return Nt[0]=Math.min(255,Nt[0]/At*At),Nt[1]=Math.min(255,Nt[1]/At*At),Nt[2]=Math.min(255,Nt[2]/At*At),Object(nt.rgb2hex)(Nt)},cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:St(),tintMethod:null};Rt.tintMethod=Rt.canUseMultiply?Rt.tintWithMultiply:Rt.tintWithPerPixel;var Tt=rt.q.create;rt.q.create=function(wt){if(!(wt&&wt.forceCanvas))try{return Tt(wt)}catch{}return new Ct(wt)},rt.c.prototype.getDrawableSource=function(){var wt=this.resource;return wt?wt.bitmap||wt.source:null},rt.b.prototype._canvasRenderTarget=null,rt.t.prototype.patternCache=null,rt.t.prototype.tintCache=null},function(et,_e,tt){tt.d(_e,"a",function(){return rt});/*!
* @pixi/runner - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/runner is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var rt=(function(){function nt(st){this.items=[],this._name=st,this._aliasCount=0}return nt.prototype.emit=function(st,dt,ft,ht,mt,bt,St,Et){if(arguments.length>8)throw new Error("max arguments reached");var Ct=this,Rt=Ct.name,Tt=Ct.items;this._aliasCount++;for(var wt=0,At=Tt.length;wt<At;wt++)Tt[wt][Rt](st,dt,ft,ht,mt,bt,St,Et);return Tt===this.items&&this._aliasCount--,this},nt.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},nt.prototype.add=function(st){return st[this._name]&&(this.ensureNonAliasedItems(),this.remove(st),this.items.push(st)),this},nt.prototype.remove=function(st){var dt=this.items.indexOf(st);return dt!==-1&&(this.ensureNonAliasedItems(),this.items.splice(dt,1)),this},nt.prototype.contains=function(st){return this.items.indexOf(st)!==-1},nt.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},nt.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(nt.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),nt})();Object.defineProperties(rt.prototype,{dispatch:{value:rt.prototype.emit},run:{value:rt.prototype.emit}})},function(et,_e,tt){var rt=tt(20),nt=tt(15);et.exports=function(st){return typeof st=="number"||nt(st)&&rt(st)=="[object Number]"}},function(et,_e,tt){var rt=tt(51),nt=typeof self=="object"&&self&&self.Object===Object&&self,st=rt||nt||Function("return this")();et.exports=st},function(et,_e){et.exports=function(tt){return tt!=null&&typeof tt=="object"}},function(et,_e,tt){tt.d(_e,"a",function(){return Ct}),tt.d(_e,"b",function(){return Et}),tt.d(_e,"c",function(){return bt});var rt=tt(8),nt=tt(0),st=tt(2),dt=function(Rt,Tt){return(dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(wt,At){wt.__proto__=At}||function(wt,At){for(var Nt in At)At.hasOwnProperty(Nt)&&(wt[Nt]=At[Nt])})(Rt,Tt)};function ft(Rt,Tt){function wt(){this.constructor=Rt}dt(Rt,Tt),Rt.prototype=Tt===null?Object.create(Tt):(wt.prototype=Tt.prototype,new wt)}var ht=(function(Rt){function Tt(wt,At,Nt,Pt){wt===void 0&&(wt=100),At===void 0&&(At=100),Nt===void 0&&(Nt=10),Pt===void 0&&(Pt=10);var It=Rt.call(this)||this;return It.segWidth=Nt,It.segHeight=Pt,It.width=wt,It.height=At,It.build(),It}return ft(Tt,Rt),Tt.prototype.build=function(){for(var wt=this.segWidth*this.segHeight,At=[],Nt=[],Pt=[],It=this.segWidth-1,Ft=this.segHeight-1,qt=this.width/It,Vt=this.height/Ft,Kt=0;Kt<wt;Kt++){var jt=Kt%this.segWidth,Ut=Kt/this.segWidth|0;At.push(jt*qt,Ut*Vt),Nt.push(jt/It,Ut/Ft)}var Ot=It*Ft;for(Kt=0;Kt<Ot;Kt++){var Wt=Kt%It,Bt=Kt/It|0,tr=Bt*this.segWidth+Wt,Jt=Bt*this.segWidth+Wt+1,ar=(Bt+1)*this.segWidth+Wt,pr=(Bt+1)*this.segWidth+Wt+1;Pt.push(tr,Jt,ar,Jt,pr,ar)}this.buffers[0].data=new Float32Array(At),this.buffers[1].data=new Float32Array(Nt),this.indexBuffer.data=new Uint16Array(Pt),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},Tt})(rt.b),mt=(function(Rt){function Tt(wt,At,Nt){wt===void 0&&(wt=200),Nt===void 0&&(Nt=0);var Pt=Rt.call(this,new Float32Array(4*At.length),new Float32Array(4*At.length),new Uint16Array(6*(At.length-1)))||this;return Pt.points=At,Pt._width=wt,Pt.textureScale=Nt,Pt.build(),Pt}return ft(Tt,Rt),Object.defineProperty(Tt.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Tt.prototype.build=function(){var wt=this.points;if(wt){var At=this.getBuffer("aVertexPosition"),Nt=this.getBuffer("aTextureCoord"),Pt=this.getIndex();if(!(wt.length<1)){At.data.length/4!==wt.length&&(At.data=new Float32Array(4*wt.length),Nt.data=new Float32Array(4*wt.length),Pt.data=new Uint16Array(6*(wt.length-1)));var It=Nt.data,Ft=Pt.data;It[0]=0,It[1]=0,It[2]=0,It[3]=1;for(var qt=0,Vt=wt[0],Kt=this._width*this.textureScale,jt=wt.length,Ut=0;Ut<jt;Ut++){var Ot=4*Ut;if(this.textureScale>0){var Wt=Vt.x-wt[Ut].x,Bt=Vt.y-wt[Ut].y,tr=Math.sqrt(Wt*Wt+Bt*Bt);Vt=wt[Ut],qt+=tr/Kt}else qt=Ut/(jt-1);It[Ot]=qt,It[Ot+1]=0,It[Ot+2]=qt,It[Ot+3]=1}var Jt=0;for(Ut=0;Ut<jt-1;Ut++)Ot=2*Ut,Ft[Jt++]=Ot,Ft[Jt++]=Ot+1,Ft[Jt++]=Ot+2,Ft[Jt++]=Ot+2,Ft[Jt++]=Ot+1,Ft[Jt++]=Ot+3;Nt.update(),Pt.update(),this.updateVertices()}}},Tt.prototype.updateVertices=function(){var wt=this.points;if(!(wt.length<1)){for(var At,Nt=wt[0],Pt=0,It=0,Ft=this.buffers[0].data,qt=wt.length,Vt=0;Vt<qt;Vt++){var Kt=wt[Vt],jt=4*Vt;It=-((At=Vt<wt.length-1?wt[Vt+1]:Kt).x-Nt.x),Pt=At.y-Nt.y;var Ut=Math.sqrt(Pt*Pt+It*It),Ot=this.textureScale>0?this.textureScale*this._width/2:this._width/2;Pt/=Ut,It/=Ut,Pt*=Ot,It*=Ot,Ft[jt]=Kt.x+Pt,Ft[jt+1]=Kt.y+It,Ft[jt+2]=Kt.x-Pt,Ft[jt+3]=Kt.y-It,Nt=Kt}this.buffers[0].update()}},Tt.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},Tt})(rt.b),bt=(function(Rt){function Tt(wt,At,Nt){Nt===void 0&&(Nt=0);var Pt=this,It=new mt(wt.height,At,Nt),Ft=new rt.c(wt);return Nt>0&&(wt.baseTexture.wrapMode=nt.s.REPEAT),(Pt=Rt.call(this,It,Ft)||this).autoUpdate=!0,Pt}return ft(Tt,Rt),Tt.prototype._render=function(wt){var At=this.geometry;(this.autoUpdate||At._width!==this.shader.texture.height)&&(At._width=this.shader.texture.height,At.update()),Rt.prototype._render.call(this,wt)},Tt})(rt.a),St=(function(Rt){function Tt(wt,At,Nt){var Pt=this,It=new ht(wt.width,wt.height,At,Nt),Ft=new rt.c(st.t.WHITE);return(Pt=Rt.call(this,It,Ft)||this).texture=wt,Pt.autoResize=!0,Pt}return ft(Tt,Rt),Tt.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var wt=this.geometry,At=this.shader.texture,Nt=At.width,Pt=At.height;!this.autoResize||wt.width===Nt&&wt.height===Pt||(wt.width=this.shader.texture.width,wt.height=this.shader.texture.height,wt.build())},Object.defineProperty(Tt.prototype,"texture",{get:function(){return this.shader.texture},set:function(wt){this.shader.texture!==wt&&(this.shader.texture=wt,this._textureID=-1,wt.baseTexture.valid?this.textureUpdated():wt.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),Tt.prototype._render=function(wt){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),Rt.prototype._render.call(this,wt)},Tt.prototype.destroy=function(wt){this.shader.texture.off("update",this.textureUpdated,this),Rt.prototype.destroy.call(this,wt)},Tt})(rt.a),Et=(function(Rt){function Tt(wt,At,Nt,Pt,It){wt===void 0&&(wt=st.t.EMPTY);var Ft=this,qt=new rt.b(At,Nt,Pt);qt.getBuffer("aVertexPosition").static=!1;var Vt=new rt.c(wt);return(Ft=Rt.call(this,qt,Vt,null,It)||this).autoUpdate=!0,Ft}return ft(Tt,Rt),Object.defineProperty(Tt.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(wt){this.geometry.getBuffer("aVertexPosition").data=wt},enumerable:!1,configurable:!0}),Tt.prototype._render=function(wt){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),Rt.prototype._render.call(this,wt)},Tt})(rt.a),Ct=(function(Rt){function Tt(wt,At,Nt,Pt,It){At===void 0&&(At=10),Nt===void 0&&(Nt=10),Pt===void 0&&(Pt=10),It===void 0&&(It=10);var Ft=Rt.call(this,st.t.WHITE,4,4)||this;return Ft._origWidth=wt.orig.width,Ft._origHeight=wt.orig.height,Ft._width=Ft._origWidth,Ft._height=Ft._origHeight,Ft._leftWidth=At,Ft._rightWidth=Pt,Ft._topHeight=Nt,Ft._bottomHeight=It,Ft.texture=wt,Ft}return ft(Tt,Rt),Tt.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(Tt.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(wt){this.geometry.getBuffer("aVertexPosition").data=wt},enumerable:!1,configurable:!0}),Tt.prototype.updateHorizontalVertices=function(){var wt=this.vertices,At=this._getMinScale();wt[9]=wt[11]=wt[13]=wt[15]=this._topHeight*At,wt[17]=wt[19]=wt[21]=wt[23]=this._height-this._bottomHeight*At,wt[25]=wt[27]=wt[29]=wt[31]=this._height},Tt.prototype.updateVerticalVertices=function(){var wt=this.vertices,At=this._getMinScale();wt[2]=wt[10]=wt[18]=wt[26]=this._leftWidth*At,wt[4]=wt[12]=wt[20]=wt[28]=this._width-this._rightWidth*At,wt[6]=wt[14]=wt[22]=wt[30]=this._width},Tt.prototype._getMinScale=function(){var wt=this._leftWidth+this._rightWidth,At=this._width>wt?1:this._width/wt,Nt=this._topHeight+this._bottomHeight,Pt=this._height>Nt?1:this._height/Nt;return Math.min(At,Pt)},Object.defineProperty(Tt.prototype,"width",{get:function(){return this._width},set:function(wt){this._width=wt,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"height",{get:function(){return this._height},set:function(wt){this._height=wt,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(wt){this._leftWidth=wt,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(wt){this._rightWidth=wt,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"topHeight",{get:function(){return this._topHeight},set:function(wt){this._topHeight=wt,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(Tt.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(wt){this._bottomHeight=wt,this._refresh()},enumerable:!1,configurable:!0}),Tt.prototype._refresh=function(){var wt=this.texture,At=this.geometry.buffers[1].data;this._origWidth=wt.orig.width,this._origHeight=wt.orig.height;var Nt=1/this._origWidth,Pt=1/this._origHeight;At[0]=At[8]=At[16]=At[24]=0,At[1]=At[3]=At[5]=At[7]=0,At[6]=At[14]=At[22]=At[30]=1,At[25]=At[27]=At[29]=At[31]=1,At[2]=At[10]=At[18]=At[26]=Nt*this._leftWidth,At[4]=At[12]=At[20]=At[28]=1-Nt*this._rightWidth,At[9]=At[11]=At[13]=At[15]=Pt*this._topHeight,At[17]=At[19]=At[21]=At[23]=1-Pt*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},Tt})(St)},function(et,_e){var tt;tt=(function(){return this})();try{tt=tt||new Function("return this")()}catch{typeof window=="object"&&(tt=window)}et.exports=tt},function(et,_e,tt){var rt;(function(nt){function st(Pt,It){var Ft=(65535&Pt)+(65535&It);return(Pt>>16)+(It>>16)+(Ft>>16)<<16|65535&Ft}function dt(Pt,It,Ft,qt,Vt,Kt){return st((jt=st(st(It,Pt),st(qt,Kt)))<<(Ut=Vt)|jt>>>32-Ut,Ft);var jt,Ut}function ft(Pt,It,Ft,qt,Vt,Kt,jt){return dt(It&Ft|~It&qt,Pt,It,Vt,Kt,jt)}function ht(Pt,It,Ft,qt,Vt,Kt,jt){return dt(It&qt|Ft&~qt,Pt,It,Vt,Kt,jt)}function mt(Pt,It,Ft,qt,Vt,Kt,jt){return dt(It^Ft^qt,Pt,It,Vt,Kt,jt)}function bt(Pt,It,Ft,qt,Vt,Kt,jt){return dt(Ft^(It|~qt),Pt,It,Vt,Kt,jt)}function St(Pt,It){var Ft,qt,Vt,Kt,jt;Pt[It>>5]|=128<<It%32,Pt[14+(It+64>>>9<<4)]=It;var Ut=1732584193,Ot=-271733879,Wt=-1732584194,Bt=271733878;for(Ft=0;Ft<Pt.length;Ft+=16)qt=Ut,Vt=Ot,Kt=Wt,jt=Bt,Ut=ft(Ut,Ot,Wt,Bt,Pt[Ft],7,-680876936),Bt=ft(Bt,Ut,Ot,Wt,Pt[Ft+1],12,-389564586),Wt=ft(Wt,Bt,Ut,Ot,Pt[Ft+2],17,606105819),Ot=ft(Ot,Wt,Bt,Ut,Pt[Ft+3],22,-1044525330),Ut=ft(Ut,Ot,Wt,Bt,Pt[Ft+4],7,-176418897),Bt=ft(Bt,Ut,Ot,Wt,Pt[Ft+5],12,1200080426),Wt=ft(Wt,Bt,Ut,Ot,Pt[Ft+6],17,-1473231341),Ot=ft(Ot,Wt,Bt,Ut,Pt[Ft+7],22,-45705983),Ut=ft(Ut,Ot,Wt,Bt,Pt[Ft+8],7,1770035416),Bt=ft(Bt,Ut,Ot,Wt,Pt[Ft+9],12,-1958414417),Wt=ft(Wt,Bt,Ut,Ot,Pt[Ft+10],17,-42063),Ot=ft(Ot,Wt,Bt,Ut,Pt[Ft+11],22,-1990404162),Ut=ft(Ut,Ot,Wt,Bt,Pt[Ft+12],7,1804603682),Bt=ft(Bt,Ut,Ot,Wt,Pt[Ft+13],12,-40341101),Wt=ft(Wt,Bt,Ut,Ot,Pt[Ft+14],17,-1502002290),Ut=ht(Ut,Ot=ft(Ot,Wt,Bt,Ut,Pt[Ft+15],22,1236535329),Wt,Bt,Pt[Ft+1],5,-165796510),Bt=ht(Bt,Ut,Ot,Wt,Pt[Ft+6],9,-1069501632),Wt=ht(Wt,Bt,Ut,Ot,Pt[Ft+11],14,643717713),Ot=ht(Ot,Wt,Bt,Ut,Pt[Ft],20,-373897302),Ut=ht(Ut,Ot,Wt,Bt,Pt[Ft+5],5,-701558691),Bt=ht(Bt,Ut,Ot,Wt,Pt[Ft+10],9,38016083),Wt=ht(Wt,Bt,Ut,Ot,Pt[Ft+15],14,-660478335),Ot=ht(Ot,Wt,Bt,Ut,Pt[Ft+4],20,-405537848),Ut=ht(Ut,Ot,Wt,Bt,Pt[Ft+9],5,568446438),Bt=ht(Bt,Ut,Ot,Wt,Pt[Ft+14],9,-1019803690),Wt=ht(Wt,Bt,Ut,Ot,Pt[Ft+3],14,-187363961),Ot=ht(Ot,Wt,Bt,Ut,Pt[Ft+8],20,1163531501),Ut=ht(Ut,Ot,Wt,Bt,Pt[Ft+13],5,-1444681467),Bt=ht(Bt,Ut,Ot,Wt,Pt[Ft+2],9,-51403784),Wt=ht(Wt,Bt,Ut,Ot,Pt[Ft+7],14,1735328473),Ut=mt(Ut,Ot=ht(Ot,Wt,Bt,Ut,Pt[Ft+12],20,-1926607734),Wt,Bt,Pt[Ft+5],4,-378558),Bt=mt(Bt,Ut,Ot,Wt,Pt[Ft+8],11,-2022574463),Wt=mt(Wt,Bt,Ut,Ot,Pt[Ft+11],16,1839030562),Ot=mt(Ot,Wt,Bt,Ut,Pt[Ft+14],23,-35309556),Ut=mt(Ut,Ot,Wt,Bt,Pt[Ft+1],4,-1530992060),Bt=mt(Bt,Ut,Ot,Wt,Pt[Ft+4],11,1272893353),Wt=mt(Wt,Bt,Ut,Ot,Pt[Ft+7],16,-155497632),Ot=mt(Ot,Wt,Bt,Ut,Pt[Ft+10],23,-1094730640),Ut=mt(Ut,Ot,Wt,Bt,Pt[Ft+13],4,681279174),Bt=mt(Bt,Ut,Ot,Wt,Pt[Ft],11,-358537222),Wt=mt(Wt,Bt,Ut,Ot,Pt[Ft+3],16,-722521979),Ot=mt(Ot,Wt,Bt,Ut,Pt[Ft+6],23,76029189),Ut=mt(Ut,Ot,Wt,Bt,Pt[Ft+9],4,-640364487),Bt=mt(Bt,Ut,Ot,Wt,Pt[Ft+12],11,-421815835),Wt=mt(Wt,Bt,Ut,Ot,Pt[Ft+15],16,530742520),Ut=bt(Ut,Ot=mt(Ot,Wt,Bt,Ut,Pt[Ft+2],23,-995338651),Wt,Bt,Pt[Ft],6,-198630844),Bt=bt(Bt,Ut,Ot,Wt,Pt[Ft+7],10,1126891415),Wt=bt(Wt,Bt,Ut,Ot,Pt[Ft+14],15,-1416354905),Ot=bt(Ot,Wt,Bt,Ut,Pt[Ft+5],21,-57434055),Ut=bt(Ut,Ot,Wt,Bt,Pt[Ft+12],6,1700485571),Bt=bt(Bt,Ut,Ot,Wt,Pt[Ft+3],10,-1894986606),Wt=bt(Wt,Bt,Ut,Ot,Pt[Ft+10],15,-1051523),Ot=bt(Ot,Wt,Bt,Ut,Pt[Ft+1],21,-2054922799),Ut=bt(Ut,Ot,Wt,Bt,Pt[Ft+8],6,1873313359),Bt=bt(Bt,Ut,Ot,Wt,Pt[Ft+15],10,-30611744),Wt=bt(Wt,Bt,Ut,Ot,Pt[Ft+6],15,-1560198380),Ot=bt(Ot,Wt,Bt,Ut,Pt[Ft+13],21,1309151649),Ut=bt(Ut,Ot,Wt,Bt,Pt[Ft+4],6,-145523070),Bt=bt(Bt,Ut,Ot,Wt,Pt[Ft+11],10,-1120210379),Wt=bt(Wt,Bt,Ut,Ot,Pt[Ft+2],15,718787259),Ot=bt(Ot,Wt,Bt,Ut,Pt[Ft+9],21,-343485551),Ut=st(Ut,qt),Ot=st(Ot,Vt),Wt=st(Wt,Kt),Bt=st(Bt,jt);return[Ut,Ot,Wt,Bt]}function Et(Pt){var It,Ft="",qt=32*Pt.length;for(It=0;It<qt;It+=8)Ft+=String.fromCharCode(Pt[It>>5]>>>It%32&255);return Ft}function Ct(Pt){var It,Ft=[];for(Ft[(Pt.length>>2)-1]=void 0,It=0;It<Ft.length;It+=1)Ft[It]=0;var qt=8*Pt.length;for(It=0;It<qt;It+=8)Ft[It>>5]|=(255&Pt.charCodeAt(It/8))<<It%32;return Ft}function Rt(Pt){var It,Ft,qt="";for(Ft=0;Ft<Pt.length;Ft+=1)It=Pt.charCodeAt(Ft),qt+="0123456789abcdef".charAt(It>>>4&15)+"0123456789abcdef".charAt(15&It);return qt}function Tt(Pt){return unescape(encodeURIComponent(Pt))}function wt(Pt){return(function(It){return Et(St(Ct(It),8*It.length))})(Tt(Pt))}function At(Pt,It){return(function(Ft,qt){var Vt,Kt,jt=Ct(Ft),Ut=[],Ot=[];for(Ut[15]=Ot[15]=void 0,jt.length>16&&(jt=St(jt,8*Ft.length)),Vt=0;Vt<16;Vt+=1)Ut[Vt]=909522486^jt[Vt],Ot[Vt]=1549556828^jt[Vt];return Kt=St(Ut.concat(Ct(qt)),512+8*qt.length),Et(St(Ot.concat(Kt),640))})(Tt(Pt),Tt(It))}function Nt(Pt,It,Ft){return It?Ft?At(It,Pt):Rt(At(It,Pt)):Ft?wt(Pt):Rt(wt(Pt))}(rt=(function(){return Nt}).call(_e,tt,_e,et))===void 0||(et.exports=rt)})()},function(et,_e){et.exports=`precision mediump float;
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
varying vec2 filterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition() {
vec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord() {
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main() {
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
filterCoord = aVertexPosition * outputFrame.zw;
}
`},function(et,_e,tt){var rt=tt(25),nt=tt(137),st=tt(138),dt=rt?rt.toStringTag:void 0;et.exports=function(ft){return ft==null?ft===void 0?"[object Undefined]":"[object Null]":dt&&dt in Object(ft)?nt(ft):st(ft)}},function(et,_e){et.exports=function(tt){var rt=typeof tt;return tt!=null&&(rt=="object"||rt=="function")}},function(et,_e,tt){var rt=tt(162),nt=tt(165);et.exports=function(st,dt){var ft=nt(st,dt);return rt(ft)?ft:void 0}},function(et,_e,tt){(function(rt){et.exports=(function nt(st,dt,ft){function ht(St,Et){if(!dt[St]){if(!st[St]){if(mt)return mt(St,!0);var Ct=new Error("Cannot find module '"+St+"'");throw Ct.code="MODULE_NOT_FOUND",Ct}var Rt=dt[St]={exports:{}};st[St][0].call(Rt.exports,function(Tt){var wt=st[St][1][Tt];return ht(wt||Tt)},Rt,Rt.exports,nt,st,dt,ft)}return dt[St].exports}for(var mt=!1,bt=0;bt<ft.length;bt++)ht(ft[bt]);return ht})({1:[function(nt,st,dt){(function(ft){var ht,mt,bt=ft.MutationObserver||ft.WebKitMutationObserver;if(bt){var St=0,Et=new bt(wt),Ct=ft.document.createTextNode("");Et.observe(Ct,{characterData:!0}),ht=function(){Ct.data=St=++St%2}}else if(ft.setImmediate||ft.MessageChannel===void 0)ht="document"in ft&&"onreadystatechange"in ft.document.createElement("script")?function(){var At=ft.document.createElement("script");At.onreadystatechange=function(){wt(),At.onreadystatechange=null,At.parentNode.removeChild(At),At=null},ft.document.documentElement.appendChild(At)}:function(){setTimeout(wt,0)};else{var Rt=new ft.MessageChannel;Rt.port1.onmessage=wt,ht=function(){Rt.port2.postMessage(0)}}var Tt=[];function wt(){var At,Nt;mt=!0;for(var Pt=Tt.length;Pt;){for(Nt=Tt,Tt=[],At=-1;++At<Pt;)Nt[At]();Pt=Tt.length}mt=!1}st.exports=function(At){Tt.push(At)!==1||mt||ht()}}).call(this,rt!==void 0?rt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(nt,st,dt){var ft=nt(1);function ht(){}var mt={},bt=["REJECTED"],St=["FULFILLED"],Et=["PENDING"];function Ct(Pt){if(typeof Pt!="function")throw new TypeError("resolver must be a function");this.state=Et,this.queue=[],this.outcome=void 0,Pt!==ht&&At(this,Pt)}function Rt(Pt,It,Ft){this.promise=Pt,typeof It=="function"&&(this.onFulfilled=It,this.callFulfilled=this.otherCallFulfilled),typeof Ft=="function"&&(this.onRejected=Ft,this.callRejected=this.otherCallRejected)}function Tt(Pt,It,Ft){ft(function(){var qt;try{qt=It(Ft)}catch(Vt){return mt.reject(Pt,Vt)}qt===Pt?mt.reject(Pt,new TypeError("Cannot resolve promise with itself")):mt.resolve(Pt,qt)})}function wt(Pt){var It=Pt&&Pt.then;if(Pt&&(typeof Pt=="object"||typeof Pt=="function")&&typeof It=="function")return function(){It.apply(Pt,arguments)}}function At(Pt,It){var Ft=!1;function qt(jt){Ft||(Ft=!0,mt.reject(Pt,jt))}function Vt(jt){Ft||(Ft=!0,mt.resolve(Pt,jt))}var Kt=Nt(function(){It(Vt,qt)});Kt.status==="error"&&qt(Kt.value)}function Nt(Pt,It){var Ft={};try{Ft.value=Pt(It),Ft.status="success"}catch(qt){Ft.status="error",Ft.value=qt}return Ft}st.exports=Ct,Ct.prototype.catch=function(Pt){return this.then(null,Pt)},Ct.prototype.then=function(Pt,It){if(typeof Pt!="function"&&this.state===St||typeof It!="function"&&this.state===bt)return this;var Ft=new this.constructor(ht);return this.state!==Et?Tt(Ft,this.state===St?Pt:It,this.outcome):this.queue.push(new Rt(Ft,Pt,It)),Ft},Rt.prototype.callFulfilled=function(Pt){mt.resolve(this.promise,Pt)},Rt.prototype.otherCallFulfilled=function(Pt){Tt(this.promise,this.onFulfilled,Pt)},Rt.prototype.callRejected=function(Pt){mt.reject(this.promise,Pt)},Rt.prototype.otherCallRejected=function(Pt){Tt(this.promise,this.onRejected,Pt)},mt.resolve=function(Pt,It){var Ft=Nt(wt,It);if(Ft.status==="error")return mt.reject(Pt,Ft.value);var qt=Ft.value;if(qt)At(Pt,qt);else{Pt.state=St,Pt.outcome=It;for(var Vt=-1,Kt=Pt.queue.length;++Vt<Kt;)Pt.queue[Vt].callFulfilled(It)}return Pt},mt.reject=function(Pt,It){Pt.state=bt,Pt.outcome=It;for(var Ft=-1,qt=Pt.queue.length;++Ft<qt;)Pt.queue[Ft].callRejected(It);return Pt},Ct.resolve=function(Pt){return Pt instanceof this?Pt:mt.resolve(new this(ht),Pt)},Ct.reject=function(Pt){var It=new this(ht);return mt.reject(It,Pt)},Ct.all=function(Pt){var It=this;if(Object.prototype.toString.call(Pt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Ft=Pt.length,qt=!1;if(!Ft)return this.resolve([]);for(var Vt=new Array(Ft),Kt=0,jt=-1,Ut=new this(ht);++jt<Ft;)Ot(Pt[jt],jt);return Ut;function Ot(Wt,Bt){It.resolve(Wt).then(function(tr){Vt[Bt]=tr,++Kt!==Ft||qt||(qt=!0,mt.resolve(Ut,Vt))},function(tr){qt||(qt=!0,mt.reject(Ut,tr))})}},Ct.race=function(Pt){var It=this;if(Object.prototype.toString.call(Pt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Ft=Pt.length,qt=!1;if(!Ft)return this.resolve([]);for(var Vt,Kt=-1,jt=new this(ht);++Kt<Ft;)Vt=Pt[Kt],It.resolve(Vt).then(function(Ut){qt||(qt=!0,mt.resolve(jt,Ut))},function(Ut){qt||(qt=!0,mt.reject(jt,Ut))});return jt}},{1:1}],3:[function(nt,st,dt){(function(ft){typeof ft.Promise!="function"&&(ft.Promise=nt(2))}).call(this,rt!==void 0?rt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(nt,st,dt){var ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Gr){return typeof Gr}:function(Gr){return Gr&&typeof Symbol=="function"&&Gr.constructor===Symbol&&Gr!==Symbol.prototype?"symbol":typeof Gr},ht=(function(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}})();function mt(Gr,tn){Gr=Gr||[],tn=tn||{};try{return new Blob(Gr,tn)}catch(wn){if(wn.name!=="TypeError")throw wn;for(var dn=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),Rn=0;Rn<Gr.length;Rn+=1)dn.append(Gr[Rn]);return dn.getBlob(tn.type)}}typeof Promise>"u"&&nt(3);var bt=Promise;function St(Gr,tn){tn&&Gr.then(function(dn){tn(null,dn)},function(dn){tn(dn)})}function Et(Gr,tn,dn){typeof tn=="function"&&Gr.then(tn),typeof dn=="function"&&Gr.catch(dn)}function Ct(Gr){return typeof Gr!="string"&&(console.warn(Gr+" used as a key, but it is not a string."),Gr=String(Gr)),Gr}function Rt(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var Tt=void 0,wt={},At=Object.prototype.toString;function Nt(Gr){return typeof Tt=="boolean"?bt.resolve(Tt):(function(tn){return new bt(function(dn){var Rn=tn.transaction("local-forage-detect-blob-support","readwrite"),wn=mt([""]);Rn.objectStore("local-forage-detect-blob-support").put(wn,"key"),Rn.onabort=function(Un){Un.preventDefault(),Un.stopPropagation(),dn(!1)},Rn.oncomplete=function(){var Un=navigator.userAgent.match(/Chrome\/(\d+)/),Zn=navigator.userAgent.match(/Edge\//);dn(Zn||!Un||parseInt(Un[1],10)>=43)}}).catch(function(){return!1})})(Gr).then(function(tn){return Tt=tn})}function Pt(Gr){var tn=wt[Gr.name],dn={};dn.promise=new bt(function(Rn,wn){dn.resolve=Rn,dn.reject=wn}),tn.deferredOperations.push(dn),tn.dbReady?tn.dbReady=tn.dbReady.then(function(){return dn.promise}):tn.dbReady=dn.promise}function It(Gr){var tn=wt[Gr.name].deferredOperations.pop();if(tn)return tn.resolve(),tn.promise}function Ft(Gr,tn){var dn=wt[Gr.name].deferredOperations.pop();if(dn)return dn.reject(tn),dn.promise}function qt(Gr,tn){return new bt(function(dn,Rn){if(wt[Gr.name]=wt[Gr.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},Gr.db){if(!tn)return dn(Gr.db);Pt(Gr),Gr.db.close()}var wn=[Gr.name];tn&&wn.push(Gr.version);var Un=ht.open.apply(ht,wn);tn&&(Un.onupgradeneeded=function(Zn){var pn=Un.result;try{pn.createObjectStore(Gr.storeName),Zn.oldVersion<=1&&pn.createObjectStore("local-forage-detect-blob-support")}catch(Dn){if(Dn.name!=="ConstraintError")throw Dn;console.warn('The database "'+Gr.name+'" has been upgraded from version '+Zn.oldVersion+" to version "+Zn.newVersion+', but the storage "'+Gr.storeName+'" already exists.')}}),Un.onerror=function(Zn){Zn.preventDefault(),Rn(Un.error)},Un.onsuccess=function(){var Zn=Un.result;Zn.onversionchange=function(pn){pn.target.close()},dn(Zn),It(Gr)}})}function Vt(Gr){return qt(Gr,!1)}function Kt(Gr){return qt(Gr,!0)}function jt(Gr,tn){if(!Gr.db)return!0;var dn=!Gr.db.objectStoreNames.contains(Gr.storeName),Rn=Gr.version<Gr.db.version,wn=Gr.version>Gr.db.version;if(Rn&&(Gr.version!==tn&&console.warn('The database "'+Gr.name+`" can't be downgraded from version `+Gr.db.version+" to version "+Gr.version+"."),Gr.version=Gr.db.version),wn||dn){if(dn){var Un=Gr.db.version+1;Un>Gr.version&&(Gr.version=Un)}return!0}return!1}function Ut(Gr){return mt([(function(tn){for(var dn=tn.length,Rn=new ArrayBuffer(dn),wn=new Uint8Array(Rn),Un=0;Un<dn;Un++)wn[Un]=tn.charCodeAt(Un);return Rn})(atob(Gr.data))],{type:Gr.type})}function Ot(Gr){return Gr&&Gr.__local_forage_encoded_blob}function Wt(Gr){var tn=this,dn=tn._initReady().then(function(){var Rn=wt[tn._dbInfo.name];if(Rn&&Rn.dbReady)return Rn.dbReady});return Et(dn,Gr,Gr),dn}function Bt(Gr,tn,dn,Rn){Rn===void 0&&(Rn=1);try{var wn=Gr.db.transaction(Gr.storeName,tn);dn(null,wn)}catch(Un){if(Rn>0&&(!Gr.db||Un.name==="InvalidStateError"||Un.name==="NotFoundError"))return bt.resolve().then(function(){if(!Gr.db||Un.name==="NotFoundError"&&!Gr.db.objectStoreNames.contains(Gr.storeName)&&Gr.version<=Gr.db.version)return Gr.db&&(Gr.version=Gr.db.version+1),Kt(Gr)}).then(function(){return(function(Zn){Pt(Zn);for(var pn=wt[Zn.name],Dn=pn.forages,qn=0;qn<Dn.length;qn++){var _a=Dn[qn];_a._dbInfo.db&&(_a._dbInfo.db.close(),_a._dbInfo.db=null)}return Zn.db=null,Vt(Zn).then(function(Vn){return Zn.db=Vn,jt(Zn)?Kt(Zn):Vn}).then(function(Vn){Zn.db=pn.db=Vn;for(var bs=0;bs<Dn.length;bs++)Dn[bs]._dbInfo.db=Vn}).catch(function(Vn){throw Ft(Zn,Vn),Vn})})(Gr).then(function(){Bt(Gr,tn,dn,Rn-1)})}).catch(dn);dn(Un)}}var tr={_driver:"asyncStorage",_initStorage:function(Gr){var tn=this,dn={db:null};if(Gr)for(var Rn in Gr)dn[Rn]=Gr[Rn];var wn=wt[dn.name];wn||(wn={forages:[],db:null,dbReady:null,deferredOperations:[]},wt[dn.name]=wn),wn.forages.push(tn),tn._initReady||(tn._initReady=tn.ready,tn.ready=Wt);var Un=[];function Zn(){return bt.resolve()}for(var pn=0;pn<wn.forages.length;pn++){var Dn=wn.forages[pn];Dn!==tn&&Un.push(Dn._initReady().catch(Zn))}var qn=wn.forages.slice(0);return bt.all(Un).then(function(){return dn.db=wn.db,Vt(dn)}).then(function(_a){return dn.db=_a,jt(dn,tn._defaultConfig.version)?Kt(dn):_a}).then(function(_a){dn.db=wn.db=_a,tn._dbInfo=dn;for(var Vn=0;Vn<qn.length;Vn++){var bs=qn[Vn];bs!==tn&&(bs._dbInfo.db=dn.db,bs._dbInfo.version=dn.version)}})},_support:(function(){try{if(!ht||!ht.open)return!1;var Gr=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),tn=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!Gr||tn)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}})(),iterate:function(Gr,tn){var dn=this,Rn=new bt(function(wn,Un){dn.ready().then(function(){Bt(dn._dbInfo,"readonly",function(Zn,pn){if(Zn)return Un(Zn);try{var Dn=pn.objectStore(dn._dbInfo.storeName).openCursor(),qn=1;Dn.onsuccess=function(){var _a=Dn.result;if(_a){var Vn=_a.value;Ot(Vn)&&(Vn=Ut(Vn));var bs=Gr(Vn,_a.key,qn++);bs!==void 0?wn(bs):_a.continue()}else wn()},Dn.onerror=function(){Un(Dn.error)}}catch(_a){Un(_a)}})}).catch(Un)});return St(Rn,tn),Rn},getItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=new bt(function(wn,Un){dn.ready().then(function(){Bt(dn._dbInfo,"readonly",function(Zn,pn){if(Zn)return Un(Zn);try{var Dn=pn.objectStore(dn._dbInfo.storeName).get(Gr);Dn.onsuccess=function(){var qn=Dn.result;qn===void 0&&(qn=null),Ot(qn)&&(qn=Ut(qn)),wn(qn)},Dn.onerror=function(){Un(Dn.error)}}catch(qn){Un(qn)}})}).catch(Un)});return St(Rn,tn),Rn},setItem:function(Gr,tn,dn){var Rn=this;Gr=Ct(Gr);var wn=new bt(function(Un,Zn){var pn;Rn.ready().then(function(){return pn=Rn._dbInfo,At.call(tn)==="[object Blob]"?Nt(pn.db).then(function(Dn){return Dn?tn:(qn=tn,new bt(function(_a,Vn){var bs=new FileReader;bs.onerror=Vn,bs.onloadend=function(Is){var uo=btoa(Is.target.result||"");_a({__local_forage_encoded_blob:!0,data:uo,type:qn.type})},bs.readAsBinaryString(qn)}));var qn}):tn}).then(function(Dn){Bt(Rn._dbInfo,"readwrite",function(qn,_a){if(qn)return Zn(qn);try{var Vn=_a.objectStore(Rn._dbInfo.storeName);Dn===null&&(Dn=void 0);var bs=Vn.put(Dn,Gr);_a.oncomplete=function(){Dn===void 0&&(Dn=null),Un(Dn)},_a.onabort=_a.onerror=function(){var Is=bs.error?bs.error:bs.transaction.error;Zn(Is)}}catch(Is){Zn(Is)}})}).catch(Zn)});return St(wn,dn),wn},removeItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=new bt(function(wn,Un){dn.ready().then(function(){Bt(dn._dbInfo,"readwrite",function(Zn,pn){if(Zn)return Un(Zn);try{var Dn=pn.objectStore(dn._dbInfo.storeName).delete(Gr);pn.oncomplete=function(){wn()},pn.onerror=function(){Un(Dn.error)},pn.onabort=function(){var qn=Dn.error?Dn.error:Dn.transaction.error;Un(qn)}}catch(qn){Un(qn)}})}).catch(Un)});return St(Rn,tn),Rn},clear:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){Bt(tn._dbInfo,"readwrite",function(Un,Zn){if(Un)return wn(Un);try{var pn=Zn.objectStore(tn._dbInfo.storeName).clear();Zn.oncomplete=function(){Rn()},Zn.onabort=Zn.onerror=function(){var Dn=pn.error?pn.error:pn.transaction.error;wn(Dn)}}catch(Dn){wn(Dn)}})}).catch(wn)});return St(dn,Gr),dn},length:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){Bt(tn._dbInfo,"readonly",function(Un,Zn){if(Un)return wn(Un);try{var pn=Zn.objectStore(tn._dbInfo.storeName).count();pn.onsuccess=function(){Rn(pn.result)},pn.onerror=function(){wn(pn.error)}}catch(Dn){wn(Dn)}})}).catch(wn)});return St(dn,Gr),dn},key:function(Gr,tn){var dn=this,Rn=new bt(function(wn,Un){Gr<0?wn(null):dn.ready().then(function(){Bt(dn._dbInfo,"readonly",function(Zn,pn){if(Zn)return Un(Zn);try{var Dn=pn.objectStore(dn._dbInfo.storeName),qn=!1,_a=Dn.openKeyCursor();_a.onsuccess=function(){var Vn=_a.result;Vn?Gr===0||qn?wn(Vn.key):(qn=!0,Vn.advance(Gr)):wn(null)},_a.onerror=function(){Un(_a.error)}}catch(Vn){Un(Vn)}})}).catch(Un)});return St(Rn,tn),Rn},keys:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){Bt(tn._dbInfo,"readonly",function(Un,Zn){if(Un)return wn(Un);try{var pn=Zn.objectStore(tn._dbInfo.storeName).openKeyCursor(),Dn=[];pn.onsuccess=function(){var qn=pn.result;qn?(Dn.push(qn.key),qn.continue()):Rn(Dn)},pn.onerror=function(){wn(pn.error)}}catch(qn){wn(qn)}})}).catch(wn)});return St(dn,Gr),dn},dropInstance:function(Gr,tn){tn=Rt.apply(this,arguments);var dn=this.config();(Gr=typeof Gr!="function"&&Gr||{}).name||(Gr.name=Gr.name||dn.name,Gr.storeName=Gr.storeName||dn.storeName);var Rn,wn=this;if(Gr.name){var Un=Gr.name===dn.name&&wn._dbInfo.db,Zn=Un?bt.resolve(wn._dbInfo.db):Vt(Gr).then(function(pn){var Dn=wt[Gr.name],qn=Dn.forages;Dn.db=pn;for(var _a=0;_a<qn.length;_a++)qn[_a]._dbInfo.db=pn;return pn});Rn=Gr.storeName?Zn.then(function(pn){if(pn.objectStoreNames.contains(Gr.storeName)){var Dn=pn.version+1;Pt(Gr);var qn=wt[Gr.name],_a=qn.forages;pn.close();for(var Vn=0;Vn<_a.length;Vn++){var bs=_a[Vn];bs._dbInfo.db=null,bs._dbInfo.version=Dn}return new bt(function(Is,uo){var Rs=ht.open(Gr.name,Dn);Rs.onerror=function(io){Rs.result.close(),uo(io)},Rs.onupgradeneeded=function(){Rs.result.deleteObjectStore(Gr.storeName)},Rs.onsuccess=function(){var io=Rs.result;io.close(),Is(io)}}).then(function(Is){qn.db=Is;for(var uo=0;uo<_a.length;uo++){var Rs=_a[uo];Rs._dbInfo.db=Is,It(Rs._dbInfo)}}).catch(function(Is){throw(Ft(Gr,Is)||bt.resolve()).catch(function(){}),Is})}}):Zn.then(function(pn){Pt(Gr);var Dn=wt[Gr.name],qn=Dn.forages;pn.close();for(var _a=0;_a<qn.length;_a++)qn[_a]._dbInfo.db=null;return new bt(function(Vn,bs){var Is=ht.deleteDatabase(Gr.name);Is.onerror=function(){var uo=Is.result;uo&&uo.close(),bs(Is.error)},Is.onblocked=function(){console.warn('dropInstance blocked for database "'+Gr.name+'" until all open connections are closed')},Is.onsuccess=function(){var uo=Is.result;uo&&uo.close(),Vn(uo)}}).then(function(Vn){Dn.db=Vn;for(var bs=0;bs<qn.length;bs++)It(qn[bs]._dbInfo)}).catch(function(Vn){throw(Ft(Gr,Vn)||bt.resolve()).catch(function(){}),Vn})})}else Rn=bt.reject("Invalid arguments");return St(Rn,tn),Rn}},Jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ar=/^~~local_forage_type~([^~]+)~/,pr=9,cr=pr+4,gr=Object.prototype.toString;function Sr(Gr){var tn,dn,Rn,wn,Un,Zn=.75*Gr.length,pn=Gr.length,Dn=0;Gr[Gr.length-1]==="="&&(Zn--,Gr[Gr.length-2]==="="&&Zn--);var qn=new ArrayBuffer(Zn),_a=new Uint8Array(qn);for(tn=0;tn<pn;tn+=4)dn=Jt.indexOf(Gr[tn]),Rn=Jt.indexOf(Gr[tn+1]),wn=Jt.indexOf(Gr[tn+2]),Un=Jt.indexOf(Gr[tn+3]),_a[Dn++]=dn<<2|Rn>>4,_a[Dn++]=(15&Rn)<<4|wn>>2,_a[Dn++]=(3&wn)<<6|63&Un;return qn}function Er(Gr){var tn,dn=new Uint8Array(Gr),Rn="";for(tn=0;tn<dn.length;tn+=3)Rn+=Jt[dn[tn]>>2],Rn+=Jt[(3&dn[tn])<<4|dn[tn+1]>>4],Rn+=Jt[(15&dn[tn+1])<<2|dn[tn+2]>>6],Rn+=Jt[63&dn[tn+2]];return dn.length%3==2?Rn=Rn.substring(0,Rn.length-1)+"=":dn.length%3==1&&(Rn=Rn.substring(0,Rn.length-2)+"=="),Rn}var Vr={serialize:function(Gr,tn){var dn="";if(Gr&&(dn=gr.call(Gr)),Gr&&(dn==="[object ArrayBuffer]"||Gr.buffer&&gr.call(Gr.buffer)==="[object ArrayBuffer]")){var Rn,wn="__lfsc__:";Gr instanceof ArrayBuffer?(Rn=Gr,wn+="arbf"):(Rn=Gr.buffer,dn==="[object Int8Array]"?wn+="si08":dn==="[object Uint8Array]"?wn+="ui08":dn==="[object Uint8ClampedArray]"?wn+="uic8":dn==="[object Int16Array]"?wn+="si16":dn==="[object Uint16Array]"?wn+="ur16":dn==="[object Int32Array]"?wn+="si32":dn==="[object Uint32Array]"?wn+="ui32":dn==="[object Float32Array]"?wn+="fl32":dn==="[object Float64Array]"?wn+="fl64":tn(new Error("Failed to get type for BinaryArray"))),tn(wn+Er(Rn))}else if(dn==="[object Blob]"){var Un=new FileReader;Un.onload=function(){var Zn="~~local_forage_type~"+Gr.type+"~"+Er(this.result);tn("__lfsc__:blob"+Zn)},Un.readAsArrayBuffer(Gr)}else try{tn(JSON.stringify(Gr))}catch(Zn){console.error("Couldn't convert value into a JSON string: ",Gr),tn(null,Zn)}},deserialize:function(Gr){if(Gr.substring(0,pr)!=="__lfsc__:")return JSON.parse(Gr);var tn,dn=Gr.substring(cr),Rn=Gr.substring(pr,cr);if(Rn==="blob"&&ar.test(dn)){var wn=dn.match(ar);tn=wn[1],dn=dn.substring(wn[0].length)}var Un=Sr(dn);switch(Rn){case"arbf":return Un;case"blob":return mt([Un],{type:tn});case"si08":return new Int8Array(Un);case"ui08":return new Uint8Array(Un);case"uic8":return new Uint8ClampedArray(Un);case"si16":return new Int16Array(Un);case"ur16":return new Uint16Array(Un);case"si32":return new Int32Array(Un);case"ui32":return new Uint32Array(Un);case"fl32":return new Float32Array(Un);case"fl64":return new Float64Array(Un);default:throw new Error("Unkown type: "+Rn)}},stringToBuffer:Sr,bufferToString:Er};function Wr(Gr,tn,dn,Rn){Gr.executeSql("CREATE TABLE IF NOT EXISTS "+tn.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],dn,Rn)}function Mr(Gr,tn,dn,Rn,wn,Un){Gr.executeSql(dn,Rn,wn,function(Zn,pn){pn.code===pn.SYNTAX_ERR?Zn.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[tn.storeName],function(Dn,qn){qn.rows.length?Un(Dn,pn):Wr(Dn,tn,function(){Dn.executeSql(dn,Rn,wn,Un)},Un)},Un):Un(Zn,pn)},Un)}function Nr(Gr,tn,dn,Rn){var wn=this;Gr=Ct(Gr);var Un=new bt(function(Zn,pn){wn.ready().then(function(){tn===void 0&&(tn=null);var Dn=tn,qn=wn._dbInfo;qn.serializer.serialize(tn,function(_a,Vn){Vn?pn(Vn):qn.db.transaction(function(bs){Mr(bs,qn,"INSERT OR REPLACE INTO "+qn.storeName+" (key, value) VALUES (?, ?)",[Gr,_a],function(){Zn(Dn)},function(Is,uo){pn(uo)})},function(bs){if(bs.code===bs.QUOTA_ERR){if(Rn>0)return void Zn(Nr.apply(wn,[Gr,Dn,dn,Rn-1]));pn(bs)}})})}).catch(pn)});return St(Un,dn),Un}function Yr(Gr){return new bt(function(tn,dn){Gr.transaction(function(Rn){Rn.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(wn,Un){for(var Zn=[],pn=0;pn<Un.rows.length;pn++)Zn.push(Un.rows.item(pn).name);tn({db:Gr,storeNames:Zn})},function(wn,Un){dn(Un)})},function(Rn){dn(Rn)})})}var Or={_driver:"webSQLStorage",_initStorage:function(Gr){var tn=this,dn={db:null};if(Gr)for(var Rn in Gr)dn[Rn]=typeof Gr[Rn]!="string"?Gr[Rn].toString():Gr[Rn];var wn=new bt(function(Un,Zn){try{dn.db=openDatabase(dn.name,String(dn.version),dn.description,dn.size)}catch(pn){return Zn(pn)}dn.db.transaction(function(pn){Wr(pn,dn,function(){tn._dbInfo=dn,Un()},function(Dn,qn){Zn(qn)})},Zn)});return dn.serializer=Vr,wn},_support:typeof openDatabase=="function",iterate:function(Gr,tn){var dn=this,Rn=new bt(function(wn,Un){dn.ready().then(function(){var Zn=dn._dbInfo;Zn.db.transaction(function(pn){Mr(pn,Zn,"SELECT * FROM "+Zn.storeName,[],function(Dn,qn){for(var _a=qn.rows,Vn=_a.length,bs=0;bs<Vn;bs++){var Is=_a.item(bs),uo=Is.value;if(uo&&(uo=Zn.serializer.deserialize(uo)),(uo=Gr(uo,Is.key,bs+1))!==void 0)return void wn(uo)}wn()},function(Dn,qn){Un(qn)})})}).catch(Un)});return St(Rn,tn),Rn},getItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=new bt(function(wn,Un){dn.ready().then(function(){var Zn=dn._dbInfo;Zn.db.transaction(function(pn){Mr(pn,Zn,"SELECT * FROM "+Zn.storeName+" WHERE key = ? LIMIT 1",[Gr],function(Dn,qn){var _a=qn.rows.length?qn.rows.item(0).value:null;_a&&(_a=Zn.serializer.deserialize(_a)),wn(_a)},function(Dn,qn){Un(qn)})})}).catch(Un)});return St(Rn,tn),Rn},setItem:function(Gr,tn,dn){return Nr.apply(this,[Gr,tn,dn,1])},removeItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=new bt(function(wn,Un){dn.ready().then(function(){var Zn=dn._dbInfo;Zn.db.transaction(function(pn){Mr(pn,Zn,"DELETE FROM "+Zn.storeName+" WHERE key = ?",[Gr],function(){wn()},function(Dn,qn){Un(qn)})})}).catch(Un)});return St(Rn,tn),Rn},clear:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){var Un=tn._dbInfo;Un.db.transaction(function(Zn){Mr(Zn,Un,"DELETE FROM "+Un.storeName,[],function(){Rn()},function(pn,Dn){wn(Dn)})})}).catch(wn)});return St(dn,Gr),dn},length:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){var Un=tn._dbInfo;Un.db.transaction(function(Zn){Mr(Zn,Un,"SELECT COUNT(key) as c FROM "+Un.storeName,[],function(pn,Dn){var qn=Dn.rows.item(0).c;Rn(qn)},function(pn,Dn){wn(Dn)})})}).catch(wn)});return St(dn,Gr),dn},key:function(Gr,tn){var dn=this,Rn=new bt(function(wn,Un){dn.ready().then(function(){var Zn=dn._dbInfo;Zn.db.transaction(function(pn){Mr(pn,Zn,"SELECT key FROM "+Zn.storeName+" WHERE id = ? LIMIT 1",[Gr+1],function(Dn,qn){var _a=qn.rows.length?qn.rows.item(0).key:null;wn(_a)},function(Dn,qn){Un(qn)})})}).catch(Un)});return St(Rn,tn),Rn},keys:function(Gr){var tn=this,dn=new bt(function(Rn,wn){tn.ready().then(function(){var Un=tn._dbInfo;Un.db.transaction(function(Zn){Mr(Zn,Un,"SELECT key FROM "+Un.storeName,[],function(pn,Dn){for(var qn=[],_a=0;_a<Dn.rows.length;_a++)qn.push(Dn.rows.item(_a).key);Rn(qn)},function(pn,Dn){wn(Dn)})})}).catch(wn)});return St(dn,Gr),dn},dropInstance:function(Gr,tn){tn=Rt.apply(this,arguments);var dn=this.config();(Gr=typeof Gr!="function"&&Gr||{}).name||(Gr.name=Gr.name||dn.name,Gr.storeName=Gr.storeName||dn.storeName);var Rn,wn=this;return St(Rn=Gr.name?new bt(function(Un){var Zn;Zn=Gr.name===dn.name?wn._dbInfo.db:openDatabase(Gr.name,"","",0),Gr.storeName?Un({db:Zn,storeNames:[Gr.storeName]}):Un(Yr(Zn))}).then(function(Un){return new bt(function(Zn,pn){Un.db.transaction(function(Dn){function qn(Is){return new bt(function(uo,Rs){Dn.executeSql("DROP TABLE IF EXISTS "+Is,[],function(){uo()},function(io,vo){Rs(vo)})})}for(var _a=[],Vn=0,bs=Un.storeNames.length;Vn<bs;Vn++)_a.push(qn(Un.storeNames[Vn]));bt.all(_a).then(function(){Zn()}).catch(function(Is){pn(Is)})},function(Dn){pn(Dn)})})}):bt.reject("Invalid arguments"),tn),Rn}};function Ar(Gr,tn){var dn=Gr.name+"/";return Gr.storeName!==tn.storeName&&(dn+=Gr.storeName+"/"),dn}function Qr(){return!(function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch{return!0}})()||localStorage.length>0}var hn={_driver:"localStorageWrapper",_initStorage:function(Gr){var tn={};if(Gr)for(var dn in Gr)tn[dn]=Gr[dn];return tn.keyPrefix=Ar(Gr,this._defaultConfig),Qr()?(this._dbInfo=tn,tn.serializer=Vr,bt.resolve()):bt.reject()},_support:(function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}})(),iterate:function(Gr,tn){var dn=this,Rn=dn.ready().then(function(){for(var wn=dn._dbInfo,Un=wn.keyPrefix,Zn=Un.length,pn=localStorage.length,Dn=1,qn=0;qn<pn;qn++){var _a=localStorage.key(qn);if(_a.indexOf(Un)===0){var Vn=localStorage.getItem(_a);if(Vn&&(Vn=wn.serializer.deserialize(Vn)),(Vn=Gr(Vn,_a.substring(Zn),Dn++))!==void 0)return Vn}}});return St(Rn,tn),Rn},getItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=dn.ready().then(function(){var wn=dn._dbInfo,Un=localStorage.getItem(wn.keyPrefix+Gr);return Un&&(Un=wn.serializer.deserialize(Un)),Un});return St(Rn,tn),Rn},setItem:function(Gr,tn,dn){var Rn=this;Gr=Ct(Gr);var wn=Rn.ready().then(function(){tn===void 0&&(tn=null);var Un=tn;return new bt(function(Zn,pn){var Dn=Rn._dbInfo;Dn.serializer.serialize(tn,function(qn,_a){if(_a)pn(_a);else try{localStorage.setItem(Dn.keyPrefix+Gr,qn),Zn(Un)}catch(Vn){Vn.name!=="QuotaExceededError"&&Vn.name!=="NS_ERROR_DOM_QUOTA_REACHED"||pn(Vn),pn(Vn)}})})});return St(wn,dn),wn},removeItem:function(Gr,tn){var dn=this;Gr=Ct(Gr);var Rn=dn.ready().then(function(){var wn=dn._dbInfo;localStorage.removeItem(wn.keyPrefix+Gr)});return St(Rn,tn),Rn},clear:function(Gr){var tn=this,dn=tn.ready().then(function(){for(var Rn=tn._dbInfo.keyPrefix,wn=localStorage.length-1;wn>=0;wn--){var Un=localStorage.key(wn);Un.indexOf(Rn)===0&&localStorage.removeItem(Un)}});return St(dn,Gr),dn},length:function(Gr){var tn=this.keys().then(function(dn){return dn.length});return St(tn,Gr),tn},key:function(Gr,tn){var dn=this,Rn=dn.ready().then(function(){var wn,Un=dn._dbInfo;try{wn=localStorage.key(Gr)}catch{wn=null}return wn&&(wn=wn.substring(Un.keyPrefix.length)),wn});return St(Rn,tn),Rn},keys:function(Gr){var tn=this,dn=tn.ready().then(function(){for(var Rn=tn._dbInfo,wn=localStorage.length,Un=[],Zn=0;Zn<wn;Zn++){var pn=localStorage.key(Zn);pn.indexOf(Rn.keyPrefix)===0&&Un.push(pn.substring(Rn.keyPrefix.length))}return Un});return St(dn,Gr),dn},dropInstance:function(Gr,tn){if(tn=Rt.apply(this,arguments),!(Gr=typeof Gr!="function"&&Gr||{}).name){var dn=this.config();Gr.name=Gr.name||dn.name,Gr.storeName=Gr.storeName||dn.storeName}var Rn,wn=this;return St(Rn=Gr.name?new bt(function(Un){Gr.storeName?Un(Ar(Gr,wn._defaultConfig)):Un(Gr.name+"/")}).then(function(Un){for(var Zn=localStorage.length-1;Zn>=0;Zn--){var pn=localStorage.key(Zn);pn.indexOf(Un)===0&&localStorage.removeItem(pn)}}):bt.reject("Invalid arguments"),tn),Rn}},Sn=function(Gr,tn){for(var dn,Rn,wn=Gr.length,Un=0;Un<wn;){if((dn=Gr[Un])===(Rn=tn)||typeof dn=="number"&&typeof Rn=="number"&&isNaN(dn)&&isNaN(Rn))return!0;Un++}return!1},Kr=Array.isArray||function(Gr){return Object.prototype.toString.call(Gr)==="[object Array]"},Hn={},ln={},kn={INDEXEDDB:tr,WEBSQL:Or,LOCALSTORAGE:hn},xn=[kn.INDEXEDDB._driver,kn.WEBSQL._driver,kn.LOCALSTORAGE._driver],An=["dropInstance"],rs=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(An),qs={description:"",driver:xn.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ln(Gr,tn){Gr[tn]=function(){var dn=arguments;return Gr.ready().then(function(){return Gr[tn].apply(Gr,dn)})}}function Cn(){for(var Gr=1;Gr<arguments.length;Gr++){var tn=arguments[Gr];if(tn)for(var dn in tn)tn.hasOwnProperty(dn)&&(Kr(tn[dn])?arguments[0][dn]=tn[dn].slice():arguments[0][dn]=tn[dn])}return arguments[0]}var Nn=new((function(){function Gr(tn){for(var dn in(function(Un,Zn){if(!(Un instanceof Zn))throw new TypeError("Cannot call a class as a function")})(this,Gr),kn)if(kn.hasOwnProperty(dn)){var Rn=kn[dn],wn=Rn._driver;this[dn]=wn,Hn[wn]||this.defineDriver(Rn)}this._defaultConfig=Cn({},qs),this._config=Cn({},this._defaultConfig,tn),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return Gr.prototype.config=function(tn){if((tn===void 0?"undefined":ft(tn))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var dn in tn){if(dn==="storeName"&&(tn[dn]=tn[dn].replace(/\W/g,"_")),dn==="version"&&typeof tn[dn]!="number")return new Error("Database version must be a number.");this._config[dn]=tn[dn]}return!("driver"in tn)||!tn.driver||this.setDriver(this._config.driver)}return typeof tn=="string"?this._config[tn]:this._config},Gr.prototype.defineDriver=function(tn,dn,Rn){var wn=new bt(function(Un,Zn){try{var pn=tn._driver,Dn=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!tn._driver)return void Zn(Dn);for(var qn=rs.concat("_initStorage"),_a=0,Vn=qn.length;_a<Vn;_a++){var bs=qn[_a];if((!Sn(An,bs)||tn[bs])&&typeof tn[bs]!="function")return void Zn(Dn)}(function(){for(var uo=function(Bo){return function(){var En=new Error("Method "+Bo+" is not implemented by the current driver"),In=bt.reject(En);return St(In,arguments[arguments.length-1]),In}},Rs=0,io=An.length;Rs<io;Rs++){var vo=An[Rs];tn[vo]||(tn[vo]=uo(vo))}})();var Is=function(uo){Hn[pn]&&console.info("Redefining LocalForage driver: "+pn),Hn[pn]=tn,ln[pn]=uo,Un()};"_support"in tn?tn._support&&typeof tn._support=="function"?tn._support().then(Is,Zn):Is(!!tn._support):Is(!0)}catch(uo){Zn(uo)}});return Et(wn,dn,Rn),wn},Gr.prototype.driver=function(){return this._driver||null},Gr.prototype.getDriver=function(tn,dn,Rn){var wn=Hn[tn]?bt.resolve(Hn[tn]):bt.reject(new Error("Driver not found."));return Et(wn,dn,Rn),wn},Gr.prototype.getSerializer=function(tn){var dn=bt.resolve(Vr);return Et(dn,tn),dn},Gr.prototype.ready=function(tn){var dn=this,Rn=dn._driverSet.then(function(){return dn._ready===null&&(dn._ready=dn._initDriver()),dn._ready});return Et(Rn,tn,tn),Rn},Gr.prototype.setDriver=function(tn,dn,Rn){var wn=this;Kr(tn)||(tn=[tn]);var Un=this._getSupportedDrivers(tn);function Zn(){wn._config.driver=wn.driver()}function pn(qn){return wn._extend(qn),Zn(),wn._ready=wn._initStorage(wn._config),wn._ready}var Dn=this._driverSet!==null?this._driverSet.catch(function(){return bt.resolve()}):bt.resolve();return this._driverSet=Dn.then(function(){var qn=Un[0];return wn._dbInfo=null,wn._ready=null,wn.getDriver(qn).then(function(_a){wn._driver=_a._driver,Zn(),wn._wrapLibraryMethodsWithReady(),wn._initDriver=(function(Vn){return function(){var bs=0;return(function Is(){for(;bs<Vn.length;){var uo=Vn[bs];return bs++,wn._dbInfo=null,wn._ready=null,wn.getDriver(uo).then(pn).catch(Is)}Zn();var Rs=new Error("No available storage method found.");return wn._driverSet=bt.reject(Rs),wn._driverSet})()}})(Un)})}).catch(function(){Zn();var qn=new Error("No available storage method found.");return wn._driverSet=bt.reject(qn),wn._driverSet}),Et(this._driverSet,dn,Rn),this._driverSet},Gr.prototype.supports=function(tn){return!!ln[tn]},Gr.prototype._extend=function(tn){Cn(this,tn)},Gr.prototype._getSupportedDrivers=function(tn){for(var dn=[],Rn=0,wn=tn.length;Rn<wn;Rn++){var Un=tn[Rn];this.supports(Un)&&dn.push(Un)}return dn},Gr.prototype._wrapLibraryMethodsWithReady=function(){for(var tn=0,dn=rs.length;tn<dn;tn++)Ln(this,rs[tn])},Gr.prototype.createInstance=function(tn){return new Gr(tn)},Gr})());st.exports=Nn},{3:3}]},{},[4])(4)}).call(this,tt(17))},function(et,_e,tt){var rt=tt(21),nt=tt(200),st=tt(201),dt=Math.max,ft=Math.min;et.exports=function(ht,mt,bt){var St,Et,Ct,Rt,Tt,wt,At=0,Nt=!1,Pt=!1,It=!0;if(typeof ht!="function")throw new TypeError("Expected a function");function Ft(Ot){var Wt=St,Bt=Et;return St=Et=void 0,At=Ot,Rt=ht.apply(Bt,Wt)}function qt(Ot){return At=Ot,Tt=setTimeout(Kt,mt),Nt?Ft(Ot):Rt}function Vt(Ot){var Wt=Ot-wt;return wt===void 0||Wt>=mt||Wt<0||Pt&&Ot-At>=Ct}function Kt(){var Ot=nt();if(Vt(Ot))return jt(Ot);Tt=setTimeout(Kt,(function(Wt){var Bt=mt-(Wt-wt);return Pt?ft(Bt,Ct-(Wt-At)):Bt})(Ot))}function jt(Ot){return Tt=void 0,It&&St?Ft(Ot):(St=Et=void 0,Rt)}function Ut(){var Ot=nt(),Wt=Vt(Ot);if(St=arguments,Et=this,wt=Ot,Wt){if(Tt===void 0)return qt(wt);if(Pt)return clearTimeout(Tt),Tt=setTimeout(Kt,mt),Ft(wt)}return Tt===void 0&&(Tt=setTimeout(Kt,mt)),Rt}return mt=st(mt)||0,rt(bt)&&(Nt=!!bt.leading,Ct=(Pt="maxWait"in bt)?dt(st(bt.maxWait)||0,mt):Ct,It="trailing"in bt?!!bt.trailing:It),Ut.cancel=function(){Tt!==void 0&&clearTimeout(Tt),At=0,St=wt=Et=Tt=void 0},Ut.flush=function(){return Tt===void 0?Rt:jt(nt())},Ut}},function(et,_e,tt){var rt=tt(14).Symbol;et.exports=rt},function(et,_e){et.exports=function(tt){return tt.webpackPolyfill||(tt.deprecate=function(){},tt.paths=[],tt.children||(tt.children=[]),Object.defineProperty(tt,"loaded",{enumerable:!0,get:function(){return tt.l}}),Object.defineProperty(tt,"id",{enumerable:!0,get:function(){return tt.i}}),tt.webpackPolyfill=1),tt}},function(et,_e,tt){var rt=tt(152),nt=tt(153),st=tt(154),dt=tt(155),ft=tt(156);function ht(mt){var bt=-1,St=mt==null?0:mt.length;for(this.clear();++bt<St;){var Et=mt[bt];this.set(Et[0],Et[1])}}ht.prototype.clear=rt,ht.prototype.delete=nt,ht.prototype.get=st,ht.prototype.has=dt,ht.prototype.set=ft,et.exports=ht},function(et,_e,tt){var rt=tt(37);et.exports=function(nt,st){for(var dt=nt.length;dt--;)if(rt(nt[dt][0],st))return dt;return-1}},function(et,_e,tt){var rt=tt(22)(Object,"create");et.exports=rt},function(et,_e,tt){var rt=tt(174);et.exports=function(nt,st){var dt=nt.__data__;return rt(st)?dt[typeof st=="string"?"string":"hash"]:dt.map}},function(et,_e){var tt=Array.isArray;et.exports=tt},function(et,_e,tt){var rt=tt(196),nt=tt(38),st=tt(197),dt=tt(198),ft=tt(199),ht=tt(20),mt=tt(55),bt=mt(rt),St=mt(nt),Et=mt(st),Ct=mt(dt),Rt=mt(ft),Tt=ht;(rt&&Tt(new rt(new ArrayBuffer(1)))!="[object DataView]"||nt&&Tt(new nt)!="[object Map]"||st&&Tt(st.resolve())!="[object Promise]"||dt&&Tt(new dt)!="[object Set]"||ft&&Tt(new ft)!="[object WeakMap]")&&(Tt=function(wt){var At=ht(wt),Nt=At=="[object Object]"?wt.constructor:void 0,Pt=Nt?mt(Nt):"";if(Pt)switch(Pt){case bt:return"[object DataView]";case St:return"[object Map]";case Et:return"[object Promise]";case Ct:return"[object Set]";case Rt:return"[object WeakMap]"}return At}),et.exports=Tt},function(et,_e,tt){var rt=tt(68),nt=tt(69);et.exports=function(st,dt,ft,ht){var mt=!ft;ft||(ft={});for(var bt=-1,St=dt.length;++bt<St;){var Et=dt[bt],Ct=ht?ht(ft[Et],st[Et],Et,ft,st):void 0;Ct===void 0&&(Ct=st[Et]),mt?nt(ft,Et,Ct):rt(ft,Et,Ct)}return ft}},function(et,_e,tt){var rt=tt(20),nt=tt(21);et.exports=function(st){if(!nt(st))return!1;var dt=rt(st);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}},function(et,_e,tt){(function(rt){tt.d(_e,"a",function(){return _0});var nt=tt(4),st=tt(0),dt=tt(11),ft=tt(8),ht=tt(16),mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:rt!==void 0?rt:typeof self<"u"?self:{};function bt(Cr,ir,nr){return Cr(nr={path:ir,exports:{},require:function(dr,Pr){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(Pr==null&&nr.path)}},nr.exports),nr.exports}var St=bt(function(Cr){var ir=Object.prototype.hasOwnProperty,nr="~";function dr(){}function Pr(Wn,ms,Es){this.fn=Wn,this.context=ms,this.once=Es||!1}function Hr(Wn,ms,Es,ao,Js){if(typeof Es!="function")throw new TypeError("The listener must be a function");var po=new Pr(Es,ao||Wn,Js),So=nr?nr+ms:ms;return Wn._events[So]?Wn._events[So].fn?Wn._events[So]=[Wn._events[So],po]:Wn._events[So].push(po):(Wn._events[So]=po,Wn._eventsCount++),Wn}function bn(Wn,ms){--Wn._eventsCount==0?Wn._events=new dr:delete Wn._events[ms]}function Pn(){this._events=new dr,this._eventsCount=0}Object.create&&(dr.prototype=Object.create(null),new dr().__proto__||(nr=!1)),Pn.prototype.eventNames=function(){var Wn,ms,Es=[];if(this._eventsCount===0)return Es;for(ms in Wn=this._events)ir.call(Wn,ms)&&Es.push(nr?ms.slice(1):ms);return Object.getOwnPropertySymbols?Es.concat(Object.getOwnPropertySymbols(Wn)):Es},Pn.prototype.listeners=function(Wn){var ms=nr?nr+Wn:Wn,Es=this._events[ms];if(!Es)return[];if(Es.fn)return[Es.fn];for(var ao=0,Js=Es.length,po=new Array(Js);ao<Js;ao++)po[ao]=Es[ao].fn;return po},Pn.prototype.listenerCount=function(Wn){var ms=nr?nr+Wn:Wn,Es=this._events[ms];return Es?Es.fn?1:Es.length:0},Pn.prototype.emit=function(Wn,ms,Es,ao,Js,po){var So=arguments,$o=nr?nr+Wn:Wn;if(!this._events[$o])return!1;var Zo,au,ou=this._events[$o],Yo=arguments.length;if(ou.fn){switch(ou.once&&this.removeListener(Wn,ou.fn,void 0,!0),Yo){case 1:return ou.fn.call(ou.context),!0;case 2:return ou.fn.call(ou.context,ms),!0;case 3:return ou.fn.call(ou.context,ms,Es),!0;case 4:return ou.fn.call(ou.context,ms,Es,ao),!0;case 5:return ou.fn.call(ou.context,ms,Es,ao,Js),!0;case 6:return ou.fn.call(ou.context,ms,Es,ao,Js,po),!0}for(au=1,Zo=new Array(Yo-1);au<Yo;au++)Zo[au-1]=So[au];ou.fn.apply(ou.context,Zo)}else{var Ru,ku=ou.length;for(au=0;au<ku;au++)switch(ou[au].once&&this.removeListener(Wn,ou[au].fn,void 0,!0),Yo){case 1:ou[au].fn.call(ou[au].context);break;case 2:ou[au].fn.call(ou[au].context,ms);break;case 3:ou[au].fn.call(ou[au].context,ms,Es);break;case 4:ou[au].fn.call(ou[au].context,ms,Es,ao);break;default:if(!Zo)for(Ru=1,Zo=new Array(Yo-1);Ru<Yo;Ru++)Zo[Ru-1]=So[Ru];ou[au].fn.apply(ou[au].context,Zo)}}return!0},Pn.prototype.on=function(Wn,ms,Es){return Hr(this,Wn,ms,Es,!1)},Pn.prototype.once=function(Wn,ms,Es){return Hr(this,Wn,ms,Es,!0)},Pn.prototype.removeListener=function(Wn,ms,Es,ao){var Js=nr?nr+Wn:Wn;if(!this._events[Js])return this;if(!ms)return bn(this,Js),this;var po=this._events[Js];if(po.fn)po.fn!==ms||ao&&!po.once||Es&&po.context!==Es||bn(this,Js);else{for(var So=0,$o=[],Zo=po.length;So<Zo;So++)(po[So].fn!==ms||ao&&!po[So].once||Es&&po[So].context!==Es)&&$o.push(po[So]);$o.length?this._events[Js]=$o.length===1?$o[0]:$o:bn(this,Js)}return this},Pn.prototype.removeAllListeners=function(Wn){var ms;return Wn?(ms=nr?nr+Wn:Wn,this._events[ms]&&bn(this,ms)):(this._events=new dr,this._eventsCount=0),this},Pn.prototype.off=Pn.prototype.removeListener,Pn.prototype.addListener=Pn.prototype.on,Pn.prefixed=nr,Pn.EventEmitter=Pn,Cr.exports=Pn}),Et=bt(function(Cr,ir){(function(nr){var dr=ir&&!ir.nodeType&&ir,Pr=Cr&&!Cr.nodeType&&Cr,Hr=typeof mt=="object"&&mt;Hr.global!==Hr&&Hr.window!==Hr&&Hr.self!==Hr||(nr=Hr);var bn,Pn,Wn=2147483647,ms=/^xn--/,Es=/[^\x20-\x7E]/,ao=/[\x2E\u3002\uFF0E\uFF61]/g,Js={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},po=Math.floor,So=String.fromCharCode;function $o(nu){throw RangeError(Js[nu])}function Zo(nu,fu){for(var Vo=nu.length,ll=[];Vo--;)ll[Vo]=fu(nu[Vo]);return ll}function au(nu,fu){var Vo=nu.split("@"),ll="";return Vo.length>1&&(ll=Vo[0]+"@",nu=Vo[1]),ll+Zo((nu=nu.replace(ao,".")).split("."),fu).join(".")}function ou(nu){for(var fu,Vo,ll=[],zl=0,Gl=nu.length;zl<Gl;)(fu=nu.charCodeAt(zl++))>=55296&&fu<=56319&&zl<Gl?(64512&(Vo=nu.charCodeAt(zl++)))==56320?ll.push(((1023&fu)<<10)+(1023&Vo)+65536):(ll.push(fu),zl--):ll.push(fu);return ll}function Yo(nu){return Zo(nu,function(fu){var Vo="";return fu>65535&&(Vo+=So((fu-=65536)>>>10&1023|55296),fu=56320|1023&fu),Vo+=So(fu)}).join("")}function Ru(nu,fu){return nu+22+75*(nu<26)-((fu!=0)<<5)}function ku(nu,fu,Vo){var ll=0;for(nu=Vo?po(nu/700):nu>>1,nu+=po(nu/fu);nu>455;ll+=36)nu=po(nu/35);return po(ll+36*nu/(nu+38))}function Vu(nu){var fu,Vo,ll,zl,Gl,Dl,dp,Bp,cm,Rl,hl,hp=[],Cp=nu.length,il=0,Jp=128,fp=72;for((Vo=nu.lastIndexOf("-"))<0&&(Vo=0),ll=0;ll<Vo;++ll)nu.charCodeAt(ll)>=128&&$o("not-basic"),hp.push(nu.charCodeAt(ll));for(zl=Vo>0?Vo+1:0;zl<Cp;){for(Gl=il,Dl=1,dp=36;zl>=Cp&&$o("invalid-input"),((Bp=(hl=nu.charCodeAt(zl++))-48<10?hl-22:hl-65<26?hl-65:hl-97<26?hl-97:36)>=36||Bp>po((Wn-il)/Dl))&&$o("overflow"),il+=Bp*Dl,!(Bp<(cm=dp<=fp?1:dp>=fp+26?26:dp-fp));dp+=36)Dl>po(Wn/(Rl=36-cm))&&$o("overflow"),Dl*=Rl;fp=ku(il-Gl,fu=hp.length+1,Gl==0),po(il/fu)>Wn-Jp&&$o("overflow"),Jp+=po(il/fu),il%=fu,hp.splice(il++,0,Jp)}return Yo(hp)}function sl(nu){var fu,Vo,ll,zl,Gl,Dl,dp,Bp,cm,Rl,hl,hp,Cp,il,Jp,fp=[];for(hp=(nu=ou(nu)).length,fu=128,Vo=0,Gl=72,Dl=0;Dl<hp;++Dl)(hl=nu[Dl])<128&&fp.push(So(hl));for(ll=zl=fp.length,zl&&fp.push("-");ll<hp;){for(dp=Wn,Dl=0;Dl<hp;++Dl)(hl=nu[Dl])>=fu&&hl<dp&&(dp=hl);for(dp-fu>po((Wn-Vo)/(Cp=ll+1))&&$o("overflow"),Vo+=(dp-fu)*Cp,fu=dp,Dl=0;Dl<hp;++Dl)if((hl=nu[Dl])<fu&&++Vo>Wn&&$o("overflow"),hl==fu){for(Bp=Vo,cm=36;!(Bp<(Rl=cm<=Gl?1:cm>=Gl+26?26:cm-Gl));cm+=36)Jp=Bp-Rl,il=36-Rl,fp.push(So(Ru(Rl+Jp%il,0))),Bp=po(Jp/il);fp.push(So(Ru(Bp,0))),Gl=ku(Vo,Cp,ll==zl),Vo=0,++ll}++Vo,++fu}return fp.join("")}if(bn={version:"1.3.2",ucs2:{decode:ou,encode:Yo},decode:Vu,encode:sl,toASCII:function(nu){return au(nu,function(fu){return Es.test(fu)?"xn--"+sl(fu):fu})},toUnicode:function(nu){return au(nu,function(fu){return ms.test(fu)?Vu(fu.slice(4).toLowerCase()):fu})}},dr&&Pr)if(Cr.exports==dr)Pr.exports=bn;else for(Pn in bn)bn.hasOwnProperty(Pn)&&(dr[Pn]=bn[Pn]);else nr.punycode=bn})(mt)}),Ct=function(Cr){return typeof Cr=="string"},Rt=function(Cr){return typeof Cr=="object"&&Cr!==null},Tt=function(Cr){return Cr===null},wt=function(Cr){return Cr==null};function At(Cr,ir){return Object.prototype.hasOwnProperty.call(Cr,ir)}var Nt=function(Cr,ir,nr,dr){ir=ir||"&",nr=nr||"=";var Pr={};if(typeof Cr!="string"||Cr.length===0)return Pr;var Hr=/\+/g;Cr=Cr.split(ir);var bn=1e3;dr&&typeof dr.maxKeys=="number"&&(bn=dr.maxKeys);var Pn=Cr.length;bn>0&&Pn>bn&&(Pn=bn);for(var Wn=0;Wn<Pn;++Wn){var ms,Es,ao,Js,po=Cr[Wn].replace(Hr,"%20"),So=po.indexOf(nr);So>=0?(ms=po.substr(0,So),Es=po.substr(So+1)):(ms=po,Es=""),ao=decodeURIComponent(ms),Js=decodeURIComponent(Es),At(Pr,ao)?Array.isArray(Pr[ao])?Pr[ao].push(Js):Pr[ao]=[Pr[ao],Js]:Pr[ao]=Js}return Pr},Pt=function(Cr){switch(typeof Cr){case"string":return Cr;case"boolean":return Cr?"true":"false";case"number":return isFinite(Cr)?Cr:"";default:return""}},It=function(Cr,ir,nr,dr){return ir=ir||"&",nr=nr||"=",Cr===null&&(Cr=void 0),typeof Cr=="object"?Object.keys(Cr).map(function(Pr){var Hr=encodeURIComponent(Pt(Pr))+nr;return Array.isArray(Cr[Pr])?Cr[Pr].map(function(bn){return Hr+encodeURIComponent(Pt(bn))}).join(ir):Hr+encodeURIComponent(Pt(Cr[Pr]))}).join(ir):dr?encodeURIComponent(Pt(dr))+nr+encodeURIComponent(Pt(Cr)):""},Ft=bt(function(Cr,ir){ir.decode=ir.parse=Nt,ir.encode=ir.stringify=It}),qt=Vr,Vt=function(Cr,ir){return Vr(Cr,!1,!0).resolve(ir)},Kt=function(Cr){return Ct(Cr)&&(Cr=Vr(Cr)),Cr instanceof jt?Cr.format():jt.prototype.format.call(Cr)};function jt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ut=/^([a-z0-9.+-]+:)/i,Ot=/:[0-9]*$/,Wt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Bt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
`," "]),tr=["'"].concat(Bt),Jt=["%","/","?",";","#"].concat(tr),ar=["/","?","#"],pr=/^[+a-z0-9A-Z_-]{0,63}$/,cr=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,gr={javascript:!0,"javascript:":!0},Sr={javascript:!0,"javascript:":!0},Er={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Vr(Cr,ir,nr){if(Cr&&Rt(Cr)&&Cr instanceof jt)return Cr;var dr=new jt;return dr.parse(Cr,ir,nr),dr}jt.prototype.parse=function(Cr,ir,nr){if(!Ct(Cr))throw new TypeError("Parameter 'url' must be a string, not "+typeof Cr);var dr=Cr.indexOf("?"),Pr=dr!==-1&&dr<Cr.indexOf("#")?"?":"#",Hr=Cr.split(Pr);Hr[0]=Hr[0].replace(/\\/g,"/");var bn=Cr=Hr.join(Pr);if(bn=bn.trim(),!nr&&Cr.split("#").length===1){var Pn=Wt.exec(bn);if(Pn)return this.path=bn,this.href=bn,this.pathname=Pn[1],Pn[2]?(this.search=Pn[2],this.query=ir?Ft.parse(this.search.substr(1)):this.search.substr(1)):ir&&(this.search="",this.query={}),this}var Wn=Ut.exec(bn);if(Wn){var ms=(Wn=Wn[0]).toLowerCase();this.protocol=ms,bn=bn.substr(Wn.length)}if(nr||Wn||bn.match(/^\/\/[^@\/]+@[^@\/]+/)){var Es=bn.substr(0,2)==="//";!Es||Wn&&Sr[Wn]||(bn=bn.substr(2),this.slashes=!0)}if(!Sr[Wn]&&(Es||Wn&&!Er[Wn])){for(var ao,Js,po=-1,So=0;So<ar.length;So++)($o=bn.indexOf(ar[So]))!==-1&&(po===-1||$o<po)&&(po=$o);for((Js=po===-1?bn.lastIndexOf("@"):bn.lastIndexOf("@",po))!==-1&&(ao=bn.slice(0,Js),bn=bn.slice(Js+1),this.auth=decodeURIComponent(ao)),po=-1,So=0;So<Jt.length;So++){var $o;($o=bn.indexOf(Jt[So]))!==-1&&(po===-1||$o<po)&&(po=$o)}po===-1&&(po=bn.length),this.host=bn.slice(0,po),bn=bn.slice(po),this.parseHost(),this.hostname=this.hostname||"";var Zo=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Zo)for(var au=this.hostname.split(/\./),ou=(So=0,au.length);So<ou;So++){var Yo=au[So];if(Yo&&!Yo.match(pr)){for(var Ru="",ku=0,Vu=Yo.length;ku<Vu;ku++)Yo.charCodeAt(ku)>127?Ru+="x":Ru+=Yo[ku];if(!Ru.match(pr)){var sl=au.slice(0,So),nu=au.slice(So+1),fu=Yo.match(cr);fu&&(sl.push(fu[1]),nu.unshift(fu[2])),nu.length&&(bn="/"+nu.join(".")+bn),this.hostname=sl.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Zo||(this.hostname=Et.toASCII(this.hostname));var Vo=this.port?":"+this.port:"",ll=this.hostname||"";this.host=ll+Vo,this.href+=this.host,Zo&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),bn[0]!=="/"&&(bn="/"+bn))}if(!gr[ms])for(So=0,ou=tr.length;So<ou;So++){var zl=tr[So];if(bn.indexOf(zl)!==-1){var Gl=encodeURIComponent(zl);Gl===zl&&(Gl=escape(zl)),bn=bn.split(zl).join(Gl)}}var Dl=bn.indexOf("#");Dl!==-1&&(this.hash=bn.substr(Dl),bn=bn.slice(0,Dl));var dp=bn.indexOf("?");if(dp!==-1?(this.search=bn.substr(dp),this.query=bn.substr(dp+1),ir&&(this.query=Ft.parse(this.query)),bn=bn.slice(0,dp)):ir&&(this.search="",this.query={}),bn&&(this.pathname=bn),Er[ms]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Vo=this.pathname||"";var Bp=this.search||"";this.path=Vo+Bp}return this.href=this.format(),this},jt.prototype.format=function(){var Cr=this.auth||"";Cr&&(Cr=(Cr=encodeURIComponent(Cr)).replace(/%3A/i,":"),Cr+="@");var ir=this.protocol||"",nr=this.pathname||"",dr=this.hash||"",Pr=!1,Hr="";this.host?Pr=Cr+this.host:this.hostname&&(Pr=Cr+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Pr+=":"+this.port)),this.query&&Rt(this.query)&&Object.keys(this.query).length&&(Hr=Ft.stringify(this.query));var bn=this.search||Hr&&"?"+Hr||"";return ir&&ir.substr(-1)!==":"&&(ir+=":"),this.slashes||(!ir||Er[ir])&&Pr!==!1?(Pr="//"+(Pr||""),nr&&nr.charAt(0)!=="/"&&(nr="/"+nr)):Pr||(Pr=""),dr&&dr.charAt(0)!=="#"&&(dr="#"+dr),bn&&bn.charAt(0)!=="?"&&(bn="?"+bn),ir+Pr+(nr=nr.replace(/[?#]/g,function(Pn){return encodeURIComponent(Pn)}))+(bn=bn.replace("#","%23"))+dr},jt.prototype.resolve=function(Cr){return this.resolveObject(Vr(Cr,!1,!0)).format()},jt.prototype.resolveObject=function(Cr){if(Ct(Cr)){var ir=new jt;ir.parse(Cr,!1,!0),Cr=ir}for(var nr=new jt,dr=Object.keys(this),Pr=0;Pr<dr.length;Pr++){var Hr=dr[Pr];nr[Hr]=this[Hr]}if(nr.hash=Cr.hash,Cr.href==="")return nr.href=nr.format(),nr;if(Cr.slashes&&!Cr.protocol){for(var bn=Object.keys(Cr),Pn=0;Pn<bn.length;Pn++){var Wn=bn[Pn];Wn!=="protocol"&&(nr[Wn]=Cr[Wn])}return Er[nr.protocol]&&nr.hostname&&!nr.pathname&&(nr.path=nr.pathname="/"),nr.href=nr.format(),nr}if(Cr.protocol&&Cr.protocol!==nr.protocol){if(!Er[Cr.protocol]){for(var ms=Object.keys(Cr),Es=0;Es<ms.length;Es++){var ao=ms[Es];nr[ao]=Cr[ao]}return nr.href=nr.format(),nr}if(nr.protocol=Cr.protocol,Cr.host||Sr[Cr.protocol])nr.pathname=Cr.pathname;else{for(var Js=(Cr.pathname||"").split("/");Js.length&&!(Cr.host=Js.shift()););Cr.host||(Cr.host=""),Cr.hostname||(Cr.hostname=""),Js[0]!==""&&Js.unshift(""),Js.length<2&&Js.unshift(""),nr.pathname=Js.join("/")}if(nr.search=Cr.search,nr.query=Cr.query,nr.host=Cr.host||"",nr.auth=Cr.auth,nr.hostname=Cr.hostname||Cr.host,nr.port=Cr.port,nr.pathname||nr.search){var po=nr.pathname||"",So=nr.search||"";nr.path=po+So}return nr.slashes=nr.slashes||Cr.slashes,nr.href=nr.format(),nr}var $o=nr.pathname&&nr.pathname.charAt(0)==="/",Zo=Cr.host||Cr.pathname&&Cr.pathname.charAt(0)==="/",au=Zo||$o||nr.host&&Cr.pathname,ou=au,Yo=nr.pathname&&nr.pathname.split("/")||[],Ru=(Js=Cr.pathname&&Cr.pathname.split("/")||[],nr.protocol&&!Er[nr.protocol]);if(Ru&&(nr.hostname="",nr.port=null,nr.host&&(Yo[0]===""?Yo[0]=nr.host:Yo.unshift(nr.host)),nr.host="",Cr.protocol&&(Cr.hostname=null,Cr.port=null,Cr.host&&(Js[0]===""?Js[0]=Cr.host:Js.unshift(Cr.host)),Cr.host=null),au=au&&(Js[0]===""||Yo[0]==="")),Zo)nr.host=Cr.host||Cr.host===""?Cr.host:nr.host,nr.hostname=Cr.hostname||Cr.hostname===""?Cr.hostname:nr.hostname,nr.search=Cr.search,nr.query=Cr.query,Yo=Js;else if(Js.length)Yo||(Yo=[]),Yo.pop(),Yo=Yo.concat(Js),nr.search=Cr.search,nr.query=Cr.query;else if(!wt(Cr.search))return Ru&&(nr.hostname=nr.host=Yo.shift(),(fu=!!(nr.host&&nr.host.indexOf("@")>0)&&nr.host.split("@"))&&(nr.auth=fu.shift(),nr.host=nr.hostname=fu.shift())),nr.search=Cr.search,nr.query=Cr.query,Tt(nr.pathname)&&Tt(nr.search)||(nr.path=(nr.pathname?nr.pathname:"")+(nr.search?nr.search:"")),nr.href=nr.format(),nr;if(!Yo.length)return nr.pathname=null,nr.search?nr.path="/"+nr.search:nr.path=null,nr.href=nr.format(),nr;for(var ku=Yo.slice(-1)[0],Vu=(nr.host||Cr.host||Yo.length>1)&&(ku==="."||ku==="..")||ku==="",sl=0,nu=Yo.length;nu>=0;nu--)(ku=Yo[nu])==="."?Yo.splice(nu,1):ku===".."?(Yo.splice(nu,1),sl++):sl&&(Yo.splice(nu,1),sl--);if(!au&&!ou)for(;sl--;sl)Yo.unshift("..");!au||Yo[0]===""||Yo[0]&&Yo[0].charAt(0)==="/"||Yo.unshift(""),Vu&&Yo.join("/").substr(-1)!=="/"&&Yo.push("");var fu,Vo=Yo[0]===""||Yo[0]&&Yo[0].charAt(0)==="/";return Ru&&(nr.hostname=nr.host=Vo?"":Yo.length?Yo.shift():"",(fu=!!(nr.host&&nr.host.indexOf("@")>0)&&nr.host.split("@"))&&(nr.auth=fu.shift(),nr.host=nr.hostname=fu.shift())),(au=au||nr.host&&Yo.length)&&!Vo&&Yo.unshift(""),Yo.length?nr.pathname=Yo.join("/"):(nr.pathname=null,nr.path=null),Tt(nr.pathname)&&Tt(nr.search)||(nr.path=(nr.pathname?nr.pathname:"")+(nr.search?nr.search:"")),nr.auth=Cr.auth||nr.auth,nr.slashes=nr.slashes||Cr.slashes,nr.href=nr.format(),nr},jt.prototype.parseHost=function(){var Cr=this.host,ir=Ot.exec(Cr);ir&&((ir=ir[0])!==":"&&(this.port=ir.substr(1)),Cr=Cr.substr(0,Cr.length-ir.length)),Cr&&(this.hostname=Cr)};/*!
* @pixi/utils - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/utils is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Wr={parse:qt,format:Kt,resolve:Vt};nt.b.RETINA_PREFIX=/@([0-9\.]+)x/,nt.b.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Mr,Nr=!1,Yr=(function(){for(var Cr=[],ir=[],nr=0;nr<32;nr++)Cr[nr]=nr,ir[nr]=nr;Cr[st.b.NORMAL_NPM]=st.b.NORMAL,Cr[st.b.ADD_NPM]=st.b.ADD,Cr[st.b.SCREEN_NPM]=st.b.SCREEN,ir[st.b.NORMAL]=st.b.NORMAL_NPM,ir[st.b.ADD]=st.b.ADD_NPM,ir[st.b.SCREEN]=st.b.SCREEN_NPM;var dr=[];return dr.push(ir),dr.push(Cr),dr})();function Or(Cr){if(Cr.BYTES_PER_ELEMENT===4)return Cr instanceof Float32Array?"Float32Array":Cr instanceof Uint32Array?"Uint32Array":"Int32Array";if(Cr.BYTES_PER_ELEMENT===2){if(Cr instanceof Uint16Array)return"Uint16Array"}else if(Cr.BYTES_PER_ELEMENT===1&&Cr instanceof Uint8Array)return"Uint8Array";return null}function Ar(Cr){return Cr+=Cr===0?1:0,--Cr,Cr|=Cr>>>1,Cr|=Cr>>>2,Cr|=Cr>>>4,Cr|=Cr>>>8,(Cr|=Cr>>>16)+1}function Qr(Cr){return!(Cr&Cr-1||!Cr)}function hn(Cr){var ir=(Cr>65535?1:0)<<4,nr=((Cr>>>=ir)>255?1:0)<<3;return ir|=nr,ir|=nr=((Cr>>>=nr)>15?1:0)<<2,(ir|=nr=((Cr>>>=nr)>3?1:0)<<1)|(Cr>>>=nr)>>1}var Sn=0;function Kr(){return++Sn}var Hn={};function ln(Cr,ir,nr){if(nr===void 0&&(nr=3),!Hn[ir]){var dr=new Error().stack;dr===void 0?console.warn("PixiJS Deprecation Warning: ",ir+`
Deprecated since v`+Cr):(dr=dr.split(`
`).splice(nr).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",ir+`
Deprecated since v`+Cr),console.warn(dr),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",ir+`
Deprecated since v`+Cr),console.warn(dr))),Hn[ir]=!0}}var kn,xn={},An=Object.create(null),rs=Object.create(null);function qs(Cr,ir){if(ir===void 0&&(ir=globalThis.location),Cr.indexOf("data:")===0)return"";ir=ir||globalThis.location,kn||(kn=document.createElement("a")),kn.href=Cr;var nr=Wr.parse(kn.href),dr=!nr.port&&ir.port===""||nr.port===ir.port;return nr.hostname===ir.hostname&&dr&&nr.protocol===ir.protocol?"":"anonymous"}function Ln(Cr,ir){var nr=nt.b.RETINA_PREFIX.exec(Cr);return nr?parseFloat(nr[1]):ir!==void 0?ir:1}/*!
* @pixi/runner - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/runner is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/(function(){function Cr(ir,nr,dr){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=dr||nt.b.RESOLUTION,this.resize(ir,nr)}Cr.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},Cr.prototype.resize=function(ir,nr){this.canvas.width=Math.round(ir*this.resolution),this.canvas.height=Math.round(nr*this.resolution)},Cr.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(Cr.prototype,"width",{get:function(){return this.canvas.width},set:function(ir){this.canvas.width=Math.round(ir)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"height",{get:function(){return this.canvas.height},set:function(ir){this.canvas.height=Math.round(ir)},enumerable:!1,configurable:!0})})();var Cn,Nn=(function(){function Cr(ir){this.items=[],this._name=ir,this._aliasCount=0}return Cr.prototype.emit=function(ir,nr,dr,Pr,Hr,bn,Pn,Wn){if(arguments.length>8)throw new Error("max arguments reached");var ms=this,Es=ms.name,ao=ms.items;this._aliasCount++;for(var Js=0,po=ao.length;Js<po;Js++)ao[Js][Es](ir,nr,dr,Pr,Hr,bn,Pn,Wn);return ao===this.items&&this._aliasCount--,this},Cr.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},Cr.prototype.add=function(ir){return ir[this._name]&&(this.ensureNonAliasedItems(),this.remove(ir),this.items.push(ir)),this},Cr.prototype.remove=function(ir){var nr=this.items.indexOf(ir);return nr!==-1&&(this.ensureNonAliasedItems(),this.items.splice(nr,1)),this},Cr.prototype.contains=function(ir){return this.items.indexOf(ir)!==-1},Cr.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},Cr.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(Cr.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Cr})();Object.defineProperties(Nn.prototype,{dispatch:{value:Nn.prototype.emit},run:{value:Nn.prototype.emit}}),nt.b.TARGET_FPMS=.06,(function(Cr){Cr[Cr.INTERACTION=50]="INTERACTION",Cr[Cr.HIGH=25]="HIGH",Cr[Cr.NORMAL=0]="NORMAL",Cr[Cr.LOW=-25]="LOW",Cr[Cr.UTILITY=-50]="UTILITY"})(Cn||(Cn={}));var Gr,tn=(function(){function Cr(ir,nr,dr,Pr){nr===void 0&&(nr=null),dr===void 0&&(dr=0),Pr===void 0&&(Pr=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=ir,this.context=nr,this.priority=dr,this.once=Pr}return Cr.prototype.match=function(ir,nr){return nr===void 0&&(nr=null),this.fn===ir&&this.context===nr},Cr.prototype.emit=function(ir){this.fn&&(this.context?this.fn.call(this.context,ir):this.fn(ir));var nr=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),nr},Cr.prototype.connect=function(ir){this.previous=ir,ir.next&&(ir.next.previous=this),this.next=ir.next,ir.next=this},Cr.prototype.destroy=function(ir){ir===void 0&&(ir=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var nr=this.next;return this.next=ir?null:nr,this.previous=null,nr},Cr})(),dn=(function(){function Cr(){var ir=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new tn(null,null,1/0),this.deltaMS=1/nt.b.TARGET_FPMS,this.elapsedMS=1/nt.b.TARGET_FPMS,this._tick=function(nr){ir._requestId=null,ir.started&&(ir.update(nr),ir.started&&ir._requestId===null&&ir._head.next&&(ir._requestId=requestAnimationFrame(ir._tick)))}}return Cr.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},Cr.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},Cr.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},Cr.prototype.add=function(ir,nr,dr){return dr===void 0&&(dr=Cn.NORMAL),this._addListener(new tn(ir,nr,dr))},Cr.prototype.addOnce=function(ir,nr,dr){return dr===void 0&&(dr=Cn.NORMAL),this._addListener(new tn(ir,nr,dr,!0))},Cr.prototype._addListener=function(ir){var nr=this._head.next,dr=this._head;if(nr){for(;nr;){if(ir.priority>nr.priority){ir.connect(dr);break}dr=nr,nr=nr.next}ir.previous||ir.connect(dr)}else ir.connect(dr);return this._startIfPossible(),this},Cr.prototype.remove=function(ir,nr){for(var dr=this._head.next;dr;)dr=dr.match(ir,nr)?dr.destroy():dr.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(Cr.prototype,"count",{get:function(){if(!this._head)return 0;for(var ir=0,nr=this._head;nr=nr.next;)ir++;return ir},enumerable:!1,configurable:!0}),Cr.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},Cr.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},Cr.prototype.destroy=function(){if(!this._protected){this.stop();for(var ir=this._head.next;ir;)ir=ir.destroy(!0);this._head.destroy(),this._head=null}},Cr.prototype.update=function(ir){var nr;if(ir===void 0&&(ir=performance.now()),ir>this.lastTime){if((nr=this.elapsedMS=ir-this.lastTime)>this._maxElapsedMS&&(nr=this._maxElapsedMS),nr*=this.speed,this._minElapsedMS){var dr=ir-this._lastFrame|0;if(dr<this._minElapsedMS)return;this._lastFrame=ir-dr%this._minElapsedMS}this.deltaMS=nr,this.deltaTime=this.deltaMS*nt.b.TARGET_FPMS;for(var Pr=this._head,Hr=Pr.next;Hr;)Hr=Hr.emit(this.deltaTime);Pr.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=ir},Object.defineProperty(Cr.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(ir){var nr=Math.min(this.maxFPS,ir),dr=Math.min(Math.max(0,nr)/1e3,nt.b.TARGET_FPMS);this._maxElapsedMS=1/dr},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(ir){if(ir===0)this._minElapsedMS=0;else{var nr=Math.max(this.minFPS,ir);this._minElapsedMS=1/(nr/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"shared",{get:function(){if(!Cr._shared){var ir=Cr._shared=new Cr;ir.autoStart=!0,ir._protected=!0}return Cr._shared},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"system",{get:function(){if(!Cr._system){var ir=Cr._system=new Cr;ir.autoStart=!0,ir._protected=!0}return Cr._system},enumerable:!1,configurable:!0}),Cr})(),Rn=2*Math.PI;(function(Cr){Cr[Cr.POLY=0]="POLY",Cr[Cr.RECT=1]="RECT",Cr[Cr.CIRC=2]="CIRC",Cr[Cr.ELIP=3]="ELIP",Cr[Cr.RREC=4]="RREC"})(Gr||(Gr={}));var wn=(function(){function Cr(ir,nr){ir===void 0&&(ir=0),nr===void 0&&(nr=0),this.x=0,this.y=0,this.x=ir,this.y=nr}return Cr.prototype.clone=function(){return new Cr(this.x,this.y)},Cr.prototype.copyFrom=function(ir){return this.set(ir.x,ir.y),this},Cr.prototype.copyTo=function(ir){return ir.set(this.x,this.y),ir},Cr.prototype.equals=function(ir){return ir.x===this.x&&ir.y===this.y},Cr.prototype.set=function(ir,nr){return ir===void 0&&(ir=0),nr===void 0&&(nr=ir),this.x=ir,this.y=nr,this},Cr.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},Cr})(),Un=[new wn,new wn,new wn,new wn],Zn=(function(){function Cr(ir,nr,dr,Pr){ir===void 0&&(ir=0),nr===void 0&&(nr=0),dr===void 0&&(dr=0),Pr===void 0&&(Pr=0),this.x=Number(ir),this.y=Number(nr),this.width=Number(dr),this.height=Number(Pr),this.type=Gr.RECT}return Object.defineProperty(Cr.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"EMPTY",{get:function(){return new Cr(0,0,0,0)},enumerable:!1,configurable:!0}),Cr.prototype.clone=function(){return new Cr(this.x,this.y,this.width,this.height)},Cr.prototype.copyFrom=function(ir){return this.x=ir.x,this.y=ir.y,this.width=ir.width,this.height=ir.height,this},Cr.prototype.copyTo=function(ir){return ir.x=this.x,ir.y=this.y,ir.width=this.width,ir.height=this.height,ir},Cr.prototype.contains=function(ir,nr){return!(this.width<=0||this.height<=0)&&ir>=this.x&&ir<this.x+this.width&&nr>=this.y&&nr<this.y+this.height},Cr.prototype.intersects=function(ir,nr){if(!nr){var dr=this.x<ir.x?ir.x:this.x;if((this.right>ir.right?ir.right:this.right)<=dr)return!1;var Pr=this.y<ir.y?ir.y:this.y;return(this.bottom>ir.bottom?ir.bottom:this.bottom)>Pr}var Hr=this.left,bn=this.right,Pn=this.top,Wn=this.bottom;if(bn<=Hr||Wn<=Pn)return!1;var ms=Un[0].set(ir.left,ir.top),Es=Un[1].set(ir.left,ir.bottom),ao=Un[2].set(ir.right,ir.top),Js=Un[3].set(ir.right,ir.bottom);if(ao.x<=ms.x||Es.y<=ms.y)return!1;var po=Math.sign(nr.a*nr.d-nr.b*nr.c);if(po===0||(nr.apply(ms,ms),nr.apply(Es,Es),nr.apply(ao,ao),nr.apply(Js,Js),Math.max(ms.x,Es.x,ao.x,Js.x)<=Hr||Math.min(ms.x,Es.x,ao.x,Js.x)>=bn||Math.max(ms.y,Es.y,ao.y,Js.y)<=Pn||Math.min(ms.y,Es.y,ao.y,Js.y)>=Wn))return!1;var So=po*(Es.y-ms.y),$o=po*(ms.x-Es.x),Zo=So*Hr+$o*Pn,au=So*bn+$o*Pn,ou=So*Hr+$o*Wn,Yo=So*bn+$o*Wn;if(Math.max(Zo,au,ou,Yo)<=So*ms.x+$o*ms.y||Math.min(Zo,au,ou,Yo)>=So*Js.x+$o*Js.y)return!1;var Ru=po*(ms.y-ao.y),ku=po*(ao.x-ms.x),Vu=Ru*Hr+ku*Pn,sl=Ru*bn+ku*Pn,nu=Ru*Hr+ku*Wn,fu=Ru*bn+ku*Wn;return!(Math.max(Vu,sl,nu,fu)<=Ru*ms.x+ku*ms.y||Math.min(Vu,sl,nu,fu)>=Ru*Js.x+ku*Js.y)},Cr.prototype.pad=function(ir,nr){return ir===void 0&&(ir=0),nr===void 0&&(nr=ir),this.x-=ir,this.y-=nr,this.width+=2*ir,this.height+=2*nr,this},Cr.prototype.fit=function(ir){var nr=Math.max(this.x,ir.x),dr=Math.min(this.x+this.width,ir.x+ir.width),Pr=Math.max(this.y,ir.y),Hr=Math.min(this.y+this.height,ir.y+ir.height);return this.x=nr,this.width=Math.max(dr-nr,0),this.y=Pr,this.height=Math.max(Hr-Pr,0),this},Cr.prototype.ceil=function(ir,nr){ir===void 0&&(ir=1),nr===void 0&&(nr=.001);var dr=Math.ceil((this.x+this.width-nr)*ir)/ir,Pr=Math.ceil((this.y+this.height-nr)*ir)/ir;return this.x=Math.floor((this.x+nr)*ir)/ir,this.y=Math.floor((this.y+nr)*ir)/ir,this.width=dr-this.x,this.height=Pr-this.y,this},Cr.prototype.enlarge=function(ir){var nr=Math.min(this.x,ir.x),dr=Math.max(this.x+this.width,ir.x+ir.width),Pr=Math.min(this.y,ir.y),Hr=Math.max(this.y+this.height,ir.y+ir.height);return this.x=nr,this.width=dr-nr,this.y=Pr,this.height=Hr-Pr,this},Cr.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},Cr})(),pn=(function(){function Cr(ir,nr,dr,Pr){dr===void 0&&(dr=0),Pr===void 0&&(Pr=0),this._x=dr,this._y=Pr,this.cb=ir,this.scope=nr}return Cr.prototype.clone=function(ir,nr){return ir===void 0&&(ir=this.cb),nr===void 0&&(nr=this.scope),new Cr(ir,nr,this._x,this._y)},Cr.prototype.set=function(ir,nr){return ir===void 0&&(ir=0),nr===void 0&&(nr=ir),this._x===ir&&this._y===nr||(this._x=ir,this._y=nr,this.cb.call(this.scope)),this},Cr.prototype.copyFrom=function(ir){return this._x===ir.x&&this._y===ir.y||(this._x=ir.x,this._y=ir.y,this.cb.call(this.scope)),this},Cr.prototype.copyTo=function(ir){return ir.set(this._x,this._y),ir},Cr.prototype.equals=function(ir){return ir.x===this._x&&ir.y===this._y},Cr.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(Cr.prototype,"x",{get:function(){return this._x},set:function(ir){this._x!==ir&&(this._x=ir,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"y",{get:function(){return this._y},set:function(ir){this._y!==ir&&(this._y=ir,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Cr})(),Dn=(function(){function Cr(ir,nr,dr,Pr,Hr,bn){ir===void 0&&(ir=1),nr===void 0&&(nr=0),dr===void 0&&(dr=0),Pr===void 0&&(Pr=1),Hr===void 0&&(Hr=0),bn===void 0&&(bn=0),this.array=null,this.a=ir,this.b=nr,this.c=dr,this.d=Pr,this.tx=Hr,this.ty=bn}return Cr.prototype.fromArray=function(ir){this.a=ir[0],this.b=ir[1],this.c=ir[3],this.d=ir[4],this.tx=ir[2],this.ty=ir[5]},Cr.prototype.set=function(ir,nr,dr,Pr,Hr,bn){return this.a=ir,this.b=nr,this.c=dr,this.d=Pr,this.tx=Hr,this.ty=bn,this},Cr.prototype.toArray=function(ir,nr){this.array||(this.array=new Float32Array(9));var dr=nr||this.array;return ir?(dr[0]=this.a,dr[1]=this.b,dr[2]=0,dr[3]=this.c,dr[4]=this.d,dr[5]=0,dr[6]=this.tx,dr[7]=this.ty,dr[8]=1):(dr[0]=this.a,dr[1]=this.c,dr[2]=this.tx,dr[3]=this.b,dr[4]=this.d,dr[5]=this.ty,dr[6]=0,dr[7]=0,dr[8]=1),dr},Cr.prototype.apply=function(ir,nr){nr=nr||new wn;var dr=ir.x,Pr=ir.y;return nr.x=this.a*dr+this.c*Pr+this.tx,nr.y=this.b*dr+this.d*Pr+this.ty,nr},Cr.prototype.applyInverse=function(ir,nr){nr=nr||new wn;var dr=1/(this.a*this.d+this.c*-this.b),Pr=ir.x,Hr=ir.y;return nr.x=this.d*dr*Pr+-this.c*dr*Hr+(this.ty*this.c-this.tx*this.d)*dr,nr.y=this.a*dr*Hr+-this.b*dr*Pr+(-this.ty*this.a+this.tx*this.b)*dr,nr},Cr.prototype.translate=function(ir,nr){return this.tx+=ir,this.ty+=nr,this},Cr.prototype.scale=function(ir,nr){return this.a*=ir,this.d*=nr,this.c*=ir,this.b*=nr,this.tx*=ir,this.ty*=nr,this},Cr.prototype.rotate=function(ir){var nr=Math.cos(ir),dr=Math.sin(ir),Pr=this.a,Hr=this.c,bn=this.tx;return this.a=Pr*nr-this.b*dr,this.b=Pr*dr+this.b*nr,this.c=Hr*nr-this.d*dr,this.d=Hr*dr+this.d*nr,this.tx=bn*nr-this.ty*dr,this.ty=bn*dr+this.ty*nr,this},Cr.prototype.append=function(ir){var nr=this.a,dr=this.b,Pr=this.c,Hr=this.d;return this.a=ir.a*nr+ir.b*Pr,this.b=ir.a*dr+ir.b*Hr,this.c=ir.c*nr+ir.d*Pr,this.d=ir.c*dr+ir.d*Hr,this.tx=ir.tx*nr+ir.ty*Pr+this.tx,this.ty=ir.tx*dr+ir.ty*Hr+this.ty,this},Cr.prototype.setTransform=function(ir,nr,dr,Pr,Hr,bn,Pn,Wn,ms){return this.a=Math.cos(Pn+ms)*Hr,this.b=Math.sin(Pn+ms)*Hr,this.c=-Math.sin(Pn-Wn)*bn,this.d=Math.cos(Pn-Wn)*bn,this.tx=ir-(dr*this.a+Pr*this.c),this.ty=nr-(dr*this.b+Pr*this.d),this},Cr.prototype.prepend=function(ir){var nr=this.tx;if(ir.a!==1||ir.b!==0||ir.c!==0||ir.d!==1){var dr=this.a,Pr=this.c;this.a=dr*ir.a+this.b*ir.c,this.b=dr*ir.b+this.b*ir.d,this.c=Pr*ir.a+this.d*ir.c,this.d=Pr*ir.b+this.d*ir.d}return this.tx=nr*ir.a+this.ty*ir.c+ir.tx,this.ty=nr*ir.b+this.ty*ir.d+ir.ty,this},Cr.prototype.decompose=function(ir){var nr=this.a,dr=this.b,Pr=this.c,Hr=this.d,bn=ir.pivot,Pn=-Math.atan2(-Pr,Hr),Wn=Math.atan2(dr,nr),ms=Math.abs(Pn+Wn);return ms<1e-5||Math.abs(Rn-ms)<1e-5?(ir.rotation=Wn,ir.skew.x=ir.skew.y=0):(ir.rotation=0,ir.skew.x=Pn,ir.skew.y=Wn),ir.scale.x=Math.sqrt(nr*nr+dr*dr),ir.scale.y=Math.sqrt(Pr*Pr+Hr*Hr),ir.position.x=this.tx+(bn.x*nr+bn.y*Pr),ir.position.y=this.ty+(bn.x*dr+bn.y*Hr),ir},Cr.prototype.invert=function(){var ir=this.a,nr=this.b,dr=this.c,Pr=this.d,Hr=this.tx,bn=ir*Pr-nr*dr;return this.a=Pr/bn,this.b=-nr/bn,this.c=-dr/bn,this.d=ir/bn,this.tx=(dr*this.ty-Pr*Hr)/bn,this.ty=-(ir*this.ty-nr*Hr)/bn,this},Cr.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},Cr.prototype.clone=function(){var ir=new Cr;return ir.a=this.a,ir.b=this.b,ir.c=this.c,ir.d=this.d,ir.tx=this.tx,ir.ty=this.ty,ir},Cr.prototype.copyTo=function(ir){return ir.a=this.a,ir.b=this.b,ir.c=this.c,ir.d=this.d,ir.tx=this.tx,ir.ty=this.ty,ir},Cr.prototype.copyFrom=function(ir){return this.a=ir.a,this.b=ir.b,this.c=ir.c,this.d=ir.d,this.tx=ir.tx,this.ty=ir.ty,this},Cr.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(Cr,"IDENTITY",{get:function(){return new Cr},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"TEMP_MATRIX",{get:function(){return new Cr},enumerable:!1,configurable:!0}),Cr})(),qn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],_a=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Vn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],bs=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Is=[],uo=[],Rs=Math.sign;(function(){for(var Cr=0;Cr<16;Cr++){var ir=[];Is.push(ir);for(var nr=0;nr<16;nr++)for(var dr=Rs(qn[Cr]*qn[nr]+Vn[Cr]*_a[nr]),Pr=Rs(_a[Cr]*qn[nr]+bs[Cr]*_a[nr]),Hr=Rs(qn[Cr]*Vn[nr]+Vn[Cr]*bs[nr]),bn=Rs(_a[Cr]*Vn[nr]+bs[Cr]*bs[nr]),Pn=0;Pn<16;Pn++)if(qn[Pn]===dr&&_a[Pn]===Pr&&Vn[Pn]===Hr&&bs[Pn]===bn){ir.push(Pn);break}}for(Cr=0;Cr<16;Cr++){var Wn=new Dn;Wn.set(qn[Cr],_a[Cr],Vn[Cr],bs[Cr],0,0),uo.push(Wn)}})();var io={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(Cr){return qn[Cr]},uY:function(Cr){return _a[Cr]},vX:function(Cr){return Vn[Cr]},vY:function(Cr){return bs[Cr]},inv:function(Cr){return 8&Cr?15&Cr:7&-Cr},add:function(Cr,ir){return Is[Cr][ir]},sub:function(Cr,ir){return Is[Cr][io.inv(ir)]},rotate180:function(Cr){return 4^Cr},isVertical:function(Cr){return(3&Cr)==2},byDirection:function(Cr,ir){return 2*Math.abs(Cr)<=Math.abs(ir)?ir>=0?io.S:io.N:2*Math.abs(ir)<=Math.abs(Cr)?Cr>0?io.E:io.W:ir>0?Cr>0?io.SE:io.SW:Cr>0?io.NE:io.NW},matrixAppendRotationInv:function(Cr,ir,nr,dr){nr===void 0&&(nr=0),dr===void 0&&(dr=0);var Pr=uo[io.inv(ir)];Pr.tx=nr,Pr.ty=dr,Cr.append(Pr)}};(function(){function Cr(){this.worldTransform=new Dn,this.localTransform=new Dn,this.position=new pn(this.onChange,this,0,0),this.scale=new pn(this.onChange,this,1,1),this.pivot=new pn(this.onChange,this,0,0),this.skew=new pn(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}Cr.prototype.onChange=function(){this._localID++},Cr.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},Cr.prototype.toString=function(){return"[@pixi/math:Transform position=("+this.position.x+", "+this.position.y+") rotation="+this.rotation+" scale=("+this.scale.x+", "+this.scale.y+") skew=("+this.skew.x+", "+this.skew.y+") ]"},Cr.prototype.updateLocalTransform=function(){var ir=this.localTransform;this._localID!==this._currentLocalID&&(ir.a=this._cx*this.scale.x,ir.b=this._sx*this.scale.x,ir.c=this._cy*this.scale.y,ir.d=this._sy*this.scale.y,ir.tx=this.position.x-(this.pivot.x*ir.a+this.pivot.y*ir.c),ir.ty=this.position.y-(this.pivot.x*ir.b+this.pivot.y*ir.d),this._currentLocalID=this._localID,this._parentID=-1)},Cr.prototype.updateTransform=function(ir){var nr=this.localTransform;if(this._localID!==this._currentLocalID&&(nr.a=this._cx*this.scale.x,nr.b=this._sx*this.scale.x,nr.c=this._cy*this.scale.y,nr.d=this._sy*this.scale.y,nr.tx=this.position.x-(this.pivot.x*nr.a+this.pivot.y*nr.c),nr.ty=this.position.y-(this.pivot.x*nr.b+this.pivot.y*nr.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==ir._worldID){var dr=ir.worldTransform,Pr=this.worldTransform;Pr.a=nr.a*dr.a+nr.b*dr.c,Pr.b=nr.a*dr.b+nr.b*dr.d,Pr.c=nr.c*dr.a+nr.d*dr.c,Pr.d=nr.c*dr.b+nr.d*dr.d,Pr.tx=nr.tx*dr.a+nr.ty*dr.c+dr.tx,Pr.ty=nr.tx*dr.b+nr.ty*dr.d+dr.ty,this._parentID=ir._worldID,this._worldID++}},Cr.prototype.setFromMatrix=function(ir){ir.decompose(this),this._localID++},Object.defineProperty(Cr.prototype,"rotation",{get:function(){return this._rotation},set:function(ir){this._rotation!==ir&&(this._rotation=ir,this.updateSkew())},enumerable:!1,configurable:!0}),Cr.IDENTITY=new Cr})(),nt.b.PREFER_ENV=nt.a.any?st.g.WEBGL:st.g.WEBGL2,nt.b.STRICT_TEXTURE_CACHE=!1;var vo=[];function Bo(Cr,ir){if(!Cr)return null;var nr="";if(typeof Cr=="string"){var dr=/\.(\w{3,4})(?:$|\?|#)/i.exec(Cr);dr&&(nr=dr[1].toLowerCase())}for(var Pr=vo.length-1;Pr>=0;--Pr){var Hr=vo[Pr];if(Hr.test&&Hr.test(Cr,nr))return new Hr(Cr,ir)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var En=function(Cr,ir){return(En=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(nr,dr){nr.__proto__=dr}||function(nr,dr){for(var Pr in dr)dr.hasOwnProperty(Pr)&&(nr[Pr]=dr[Pr])})(Cr,ir)};function In(Cr,ir){function nr(){this.constructor=Cr}En(Cr,ir),Cr.prototype=ir===null?Object.create(ir):(nr.prototype=ir.prototype,new nr)}var ds=function(){return(ds=Object.assign||function(Cr){for(var ir,nr=arguments,dr=1,Pr=arguments.length;dr<Pr;dr++)for(var Hr in ir=nr[dr])Object.prototype.hasOwnProperty.call(ir,Hr)&&(Cr[Hr]=ir[Hr]);return Cr}).apply(this,arguments)},Ps=(function(){function Cr(ir,nr){ir===void 0&&(ir=0),nr===void 0&&(nr=0),this._width=ir,this._height=nr,this.destroyed=!1,this.internal=!1,this.onResize=new Nn("setRealSize"),this.onUpdate=new Nn("update"),this.onError=new Nn("onError")}return Cr.prototype.bind=function(ir){this.onResize.add(ir),this.onUpdate.add(ir),this.onError.add(ir),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},Cr.prototype.unbind=function(ir){this.onResize.remove(ir),this.onUpdate.remove(ir),this.onError.remove(ir)},Cr.prototype.resize=function(ir,nr){ir===this._width&&nr===this._height||(this._width=ir,this._height=nr,this.onResize.emit(ir,nr))},Object.defineProperty(Cr.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),Cr.prototype.update=function(){this.destroyed||this.onUpdate.emit()},Cr.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(Cr.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Cr.prototype.style=function(ir,nr,dr){return!1},Cr.prototype.dispose=function(){},Cr.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},Cr.test=function(ir,nr){return!1},Cr})(),yo=(function(Cr){function ir(nr,dr){var Pr=this,Hr=dr||{},bn=Hr.width,Pn=Hr.height;if(!bn||!Pn)throw new Error("BufferResource width or height invalid");return(Pr=Cr.call(this,bn,Pn)||this).data=nr,Pr}return In(ir,Cr),ir.prototype.upload=function(nr,dr,Pr){var Hr=nr.gl;Hr.pixelStorei(Hr.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dr.alphaMode===st.a.UNPACK);var bn=dr.realWidth,Pn=dr.realHeight;return Pr.width===bn&&Pr.height===Pn?Hr.texSubImage2D(dr.target,0,0,0,bn,Pn,dr.format,Pr.type,this.data):(Pr.width=bn,Pr.height=Pn,Hr.texImage2D(dr.target,0,Pr.internalFormat,bn,Pn,0,dr.format,Pr.type,this.data)),!0},ir.prototype.dispose=function(){this.data=null},ir.test=function(nr){return nr instanceof Float32Array||nr instanceof Uint8Array||nr instanceof Uint32Array},ir})(Ps),rn={scaleMode:st.p.NEAREST,format:st.h.RGBA,alphaMode:st.a.NPM},es=(function(Cr){function ir(nr,dr){nr===void 0&&(nr=null),dr===void 0&&(dr=null);var Pr=Cr.call(this)||this,Hr=(dr=dr||{}).alphaMode,bn=dr.mipmap,Pn=dr.anisotropicLevel,Wn=dr.scaleMode,ms=dr.width,Es=dr.height,ao=dr.wrapMode,Js=dr.format,po=dr.type,So=dr.target,$o=dr.resolution,Zo=dr.resourceOptions;return!nr||nr instanceof Ps||((nr=Bo(nr,Zo)).internal=!0),Pr.resolution=$o||nt.b.RESOLUTION,Pr.width=Math.round((ms||0)*Pr.resolution)/Pr.resolution,Pr.height=Math.round((Es||0)*Pr.resolution)/Pr.resolution,Pr._mipmap=bn!==void 0?bn:nt.b.MIPMAP_TEXTURES,Pr.anisotropicLevel=Pn!==void 0?Pn:nt.b.ANISOTROPIC_LEVEL,Pr._wrapMode=ao||nt.b.WRAP_MODE,Pr._scaleMode=Wn!==void 0?Wn:nt.b.SCALE_MODE,Pr.format=Js||st.h.RGBA,Pr.type=po||st.r.UNSIGNED_BYTE,Pr.target=So||st.q.TEXTURE_2D,Pr.alphaMode=Hr!==void 0?Hr:st.a.UNPACK,Pr.uid=Kr(),Pr.touched=0,Pr.isPowerOfTwo=!1,Pr._refreshPOT(),Pr._glTextures={},Pr.dirtyId=0,Pr.dirtyStyleId=0,Pr.cacheId=null,Pr.valid=ms>0&&Es>0,Pr.textureCacheIds=[],Pr.destroyed=!1,Pr.resource=null,Pr._batchEnabled=0,Pr._batchLocation=0,Pr.parentTextureArray=null,Pr.setResource(nr),Pr}return In(ir,Cr),Object.defineProperty(ir.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"mipmap",{get:function(){return this._mipmap},set:function(nr){this._mipmap!==nr&&(this._mipmap=nr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(nr){this._scaleMode!==nr&&(this._scaleMode=nr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(nr){this._wrapMode!==nr&&(this._wrapMode=nr,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),ir.prototype.setStyle=function(nr,dr){var Pr;return nr!==void 0&&nr!==this.scaleMode&&(this.scaleMode=nr,Pr=!0),dr!==void 0&&dr!==this.mipmap&&(this.mipmap=dr,Pr=!0),Pr&&this.dirtyStyleId++,this},ir.prototype.setSize=function(nr,dr,Pr){return Pr=Pr||this.resolution,this.setRealSize(nr*Pr,dr*Pr,Pr)},ir.prototype.setRealSize=function(nr,dr,Pr){return this.resolution=Pr||this.resolution,this.width=Math.round(nr)/this.resolution,this.height=Math.round(dr)/this.resolution,this._refreshPOT(),this.update(),this},ir.prototype._refreshPOT=function(){this.isPowerOfTwo=Qr(this.realWidth)&&Qr(this.realHeight)},ir.prototype.setResolution=function(nr){var dr=this.resolution;return dr===nr||(this.resolution=nr,this.valid&&(this.width=Math.round(this.width*dr)/nr,this.height=Math.round(this.height*dr)/nr,this.emit("update",this)),this._refreshPOT()),this},ir.prototype.setResource=function(nr){if(this.resource===nr)return this;if(this.resource)throw new Error("Resource can be set only once");return nr.bind(this),this.resource=nr,this},ir.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))},ir.prototype.onError=function(nr){this.emit("error",this,nr)},ir.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete rs[this.cacheId],delete An[this.cacheId],this.cacheId=null),this.dispose(),ir.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},ir.prototype.dispose=function(){this.emit("dispose",this)},ir.prototype.castToBaseTexture=function(){return this},ir.from=function(nr,dr,Pr){Pr===void 0&&(Pr=nt.b.STRICT_TEXTURE_CACHE);var Hr=typeof nr=="string",bn=null;if(Hr)bn=nr;else{if(!nr._pixiId){var Pn=dr&&dr.pixiIdPrefix||"pixiid";nr._pixiId=Pn+"_"+Kr()}bn=nr._pixiId}var Wn=rs[bn];if(Hr&&Pr&&!Wn)throw new Error('The cacheId "'+bn+'" does not exist in BaseTextureCache.');return Wn||((Wn=new ir(nr,dr)).cacheId=bn,ir.addToCache(Wn,bn)),Wn},ir.fromBuffer=function(nr,dr,Pr,Hr){nr=nr||new Float32Array(dr*Pr*4);var bn=new yo(nr,{width:dr,height:Pr}),Pn=nr instanceof Float32Array?st.r.FLOAT:st.r.UNSIGNED_BYTE;return new ir(bn,Object.assign(rn,Hr||{width:dr,height:Pr,type:Pn}))},ir.addToCache=function(nr,dr){dr&&(nr.textureCacheIds.indexOf(dr)===-1&&nr.textureCacheIds.push(dr),rs[dr]&&console.warn("BaseTexture added to the cache with an id ["+dr+"] that already had an entry"),rs[dr]=nr)},ir.removeFromCache=function(nr){if(typeof nr=="string"){var dr=rs[nr];if(dr){var Pr=dr.textureCacheIds.indexOf(nr);return Pr>-1&&dr.textureCacheIds.splice(Pr,1),delete rs[nr],dr}}else if(nr&&nr.textureCacheIds){for(var Hr=0;Hr<nr.textureCacheIds.length;++Hr)delete rs[nr.textureCacheIds[Hr]];return nr.textureCacheIds.length=0,nr}return null},ir._globalBatch=0,ir})(St),Gs=(function(Cr){function ir(nr,dr){var Pr=this,Hr=dr||{},bn=Hr.width,Pn=Hr.height;(Pr=Cr.call(this,bn,Pn)||this).items=[],Pr.itemDirtyIds=[];for(var Wn=0;Wn<nr;Wn++){var ms=new es;Pr.items.push(ms),Pr.itemDirtyIds.push(-2)}return Pr.length=nr,Pr._load=null,Pr.baseTexture=null,Pr}return In(ir,Cr),ir.prototype.initFromArray=function(nr,dr){for(var Pr=0;Pr<this.length;Pr++)nr[Pr]&&(nr[Pr].castToBaseTexture?this.addBaseTextureAt(nr[Pr].castToBaseTexture(),Pr):nr[Pr]instanceof Ps?this.addResourceAt(nr[Pr],Pr):this.addResourceAt(Bo(nr[Pr],dr),Pr))},ir.prototype.dispose=function(){for(var nr=0,dr=this.length;nr<dr;nr++)this.items[nr].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},ir.prototype.addResourceAt=function(nr,dr){if(!this.items[dr])throw new Error("Index "+dr+" is out of bounds");return nr.valid&&!this.valid&&this.resize(nr.width,nr.height),this.items[dr].setResource(nr),this},ir.prototype.bind=function(nr){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");Cr.prototype.bind.call(this,nr);for(var dr=0;dr<this.length;dr++)this.items[dr].parentTextureArray=nr,this.items[dr].on("update",nr.update,nr)},ir.prototype.unbind=function(nr){Cr.prototype.unbind.call(this,nr);for(var dr=0;dr<this.length;dr++)this.items[dr].parentTextureArray=null,this.items[dr].off("update",nr.update,nr)},ir.prototype.load=function(){var nr=this;if(this._load)return this._load;var dr=this.items.map(function(Pr){return Pr.resource}).filter(function(Pr){return Pr}).map(function(Pr){return Pr.load()});return this._load=Promise.all(dr).then(function(){var Pr=nr.items[0],Hr=Pr.realWidth,bn=Pr.realHeight;return nr.resize(Hr,bn),Promise.resolve(nr)}),this._load},ir})(Ps),Ro=(function(Cr){function ir(nr,dr){var Pr,Hr,bn=this,Pn=dr||{},Wn=Pn.width,ms=Pn.height;return Array.isArray(nr)?(Pr=nr,Hr=nr.length):Hr=nr,bn=Cr.call(this,Hr,{width:Wn,height:ms})||this,Pr&&bn.initFromArray(Pr,dr),bn}return In(ir,Cr),ir.prototype.addBaseTextureAt=function(nr,dr){if(!nr.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(nr.resource,dr),this},ir.prototype.bind=function(nr){Cr.prototype.bind.call(this,nr),nr.target=st.q.TEXTURE_2D_ARRAY},ir.prototype.upload=function(nr,dr,Pr){var Hr=this.length,bn=this.itemDirtyIds,Pn=this.items,Wn=nr.gl;Pr.dirtyId<0&&Wn.texImage3D(Wn.TEXTURE_2D_ARRAY,0,Pr.internalFormat,this._width,this._height,Hr,0,dr.format,Pr.type,null);for(var ms=0;ms<Hr;ms++){var Es=Pn[ms];bn[ms]<Es.dirtyId&&(bn[ms]=Es.dirtyId,Es.valid&&Wn.texSubImage3D(Wn.TEXTURE_2D_ARRAY,0,0,0,ms,Es.resource.width,Es.resource.height,1,dr.format,Pr.type,Es.resource.source))}return!0},ir})(Gs),ru=(function(Cr){function ir(nr){var dr=this,Pr=nr,Hr=Pr.naturalWidth||Pr.videoWidth||Pr.width,bn=Pr.naturalHeight||Pr.videoHeight||Pr.height;return(dr=Cr.call(this,Hr,bn)||this).source=nr,dr.noSubImage=!1,dr}return In(ir,Cr),ir.crossOrigin=function(nr,dr,Pr){Pr===void 0&&dr.indexOf("data:")!==0?nr.crossOrigin=qs(dr):Pr!==!1&&(nr.crossOrigin=typeof Pr=="string"?Pr:"anonymous")},ir.prototype.upload=function(nr,dr,Pr,Hr){var bn=nr.gl,Pn=dr.realWidth,Wn=dr.realHeight;if((Hr=Hr||this.source)instanceof HTMLImageElement){if(!Hr.complete||Hr.naturalWidth===0)return!1}else if(Hr instanceof HTMLVideoElement&&Hr.readyState<=1)return!1;return bn.pixelStorei(bn.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dr.alphaMode===st.a.UNPACK),this.noSubImage||dr.target!==bn.TEXTURE_2D||Pr.width!==Pn||Pr.height!==Wn?(Pr.width=Pn,Pr.height=Wn,bn.texImage2D(dr.target,0,Pr.internalFormat,dr.format,Pr.type,Hr)):bn.texSubImage2D(bn.TEXTURE_2D,0,0,0,dr.format,Pr.type,Hr),!0},ir.prototype.update=function(){if(!this.destroyed){var nr=this.source,dr=nr.naturalWidth||nr.videoWidth||nr.width,Pr=nr.naturalHeight||nr.videoHeight||nr.height;this.resize(dr,Pr),Cr.prototype.update.call(this)}},ir.prototype.dispose=function(){this.source=null},ir})(Ps),du=(function(Cr){function ir(nr){return Cr.call(this,nr)||this}return In(ir,Cr),ir.test=function(nr){var dr=globalThis.OffscreenCanvas;return!!(dr&&nr instanceof dr)||globalThis.HTMLCanvasElement&&nr instanceof HTMLCanvasElement},ir})(ru),Iu=(function(Cr){function ir(nr,dr){var Pr=this,Hr=dr||{},bn=Hr.width,Pn=Hr.height,Wn=Hr.autoLoad,ms=Hr.linkBaseTexture;if(nr&&nr.length!==ir.SIDES)throw new Error("Invalid length. Got "+nr.length+", expected 6");Pr=Cr.call(this,6,{width:bn,height:Pn})||this;for(var Es=0;Es<ir.SIDES;Es++)Pr.items[Es].target=st.q.TEXTURE_CUBE_MAP_POSITIVE_X+Es;return Pr.linkBaseTexture=ms!==!1,nr&&Pr.initFromArray(nr,dr),Wn!==!1&&Pr.load(),Pr}return In(ir,Cr),ir.prototype.bind=function(nr){Cr.prototype.bind.call(this,nr),nr.target=st.q.TEXTURE_CUBE_MAP},ir.prototype.addBaseTextureAt=function(nr,dr,Pr){if(!this.items[dr])throw new Error("Index "+dr+" is out of bounds");if(!this.linkBaseTexture||nr.parentTextureArray||Object.keys(nr._glTextures).length>0){if(!nr.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(nr.resource,dr)}else nr.target=st.q.TEXTURE_CUBE_MAP_POSITIVE_X+dr,nr.parentTextureArray=this.baseTexture,this.items[dr]=nr;return nr.valid&&!this.valid&&this.resize(nr.realWidth,nr.realHeight),this.items[dr]=nr,this},ir.prototype.upload=function(nr,dr,Pr){for(var Hr=this.itemDirtyIds,bn=0;bn<ir.SIDES;bn++){var Pn=this.items[bn];Hr[bn]<Pn.dirtyId&&(Pn.valid&&Pn.resource?(Pn.resource.upload(nr,Pn,Pr),Hr[bn]=Pn.dirtyId):Hr[bn]<-1&&(nr.gl.texImage2D(Pn.target,0,Pr.internalFormat,dr.realWidth,dr.realHeight,0,dr.format,Pr.type,null),Hr[bn]=-1))}return!0},ir.test=function(nr){return Array.isArray(nr)&&nr.length===ir.SIDES},ir.SIDES=6,ir})(Gs),Sl=(function(Cr){function ir(nr,dr){var Pr=this;if(dr=dr||{},!(nr instanceof HTMLImageElement)){var Hr=new Image;ru.crossOrigin(Hr,nr,dr.crossorigin),Hr.src=nr,nr=Hr}return Pr=Cr.call(this,nr)||this,!nr.complete&&Pr._width&&Pr._height&&(Pr._width=0,Pr._height=0),Pr.url=nr.src,Pr._process=null,Pr.preserveBitmap=!1,Pr.createBitmap=(dr.createBitmap!==void 0?dr.createBitmap:nt.b.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,Pr.alphaMode=typeof dr.alphaMode=="number"?dr.alphaMode:null,Pr.bitmap=null,Pr._load=null,dr.autoLoad!==!1&&Pr.load(),Pr}return In(ir,Cr),ir.prototype.load=function(nr){var dr=this;return this._load||(nr!==void 0&&(this.createBitmap=nr),this._load=new Promise(function(Pr,Hr){var bn=dr.source;dr.url=bn.src;var Pn=function(){dr.destroyed||(bn.onload=null,bn.onerror=null,dr.resize(bn.width,bn.height),dr._load=null,dr.createBitmap?Pr(dr.process()):Pr(dr))};bn.complete&&bn.src?Pn():(bn.onload=Pn,bn.onerror=function(Wn){Hr(Wn),dr.onError.emit(Wn)})})),this._load},ir.prototype.process=function(){var nr=this,dr=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);var Pr=globalThis.createImageBitmap,Hr=!dr.crossOrigin||dr.crossOrigin==="anonymous";return this._process=fetch(dr.src,{mode:Hr?"cors":"no-cors"}).then(function(bn){return bn.blob()}).then(function(bn){return Pr(bn,0,0,dr.width,dr.height,{premultiplyAlpha:nr.alphaMode===st.a.UNPACK?"premultiply":"none"})}).then(function(bn){return nr.destroyed?Promise.reject():(nr.bitmap=bn,nr.update(),nr._process=null,Promise.resolve(nr))}),this._process},ir.prototype.upload=function(nr,dr,Pr){if(typeof this.alphaMode=="number"&&(dr.alphaMode=this.alphaMode),!this.createBitmap)return Cr.prototype.upload.call(this,nr,dr,Pr);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(Cr.prototype.upload.call(this,nr,dr,Pr,this.bitmap),!this.preserveBitmap){var Hr=!0,bn=dr._glTextures;for(var Pn in bn){var Wn=bn[Pn];if(Wn!==Pr&&Wn.dirtyId!==dr.dirtyId){Hr=!1;break}}Hr&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},ir.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,Cr.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},ir.test=function(nr){return typeof nr=="string"||nr instanceof HTMLImageElement},ir})(ru),Ko=(function(Cr){function ir(nr,dr){var Pr=this;return dr=dr||{},(Pr=Cr.call(this,document.createElement("canvas"))||this)._width=0,Pr._height=0,Pr.svg=nr,Pr.scale=dr.scale||1,Pr._overrideWidth=dr.width,Pr._overrideHeight=dr.height,Pr._resolve=null,Pr._crossorigin=dr.crossorigin,Pr._load=null,dr.autoLoad!==!1&&Pr.load(),Pr}return In(ir,Cr),ir.prototype.load=function(){var nr=this;return this._load||(this._load=new Promise(function(dr){if(nr._resolve=function(){nr.resize(nr.source.width,nr.source.height),dr(nr)},ir.SVG_XML.test(nr.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");nr.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(nr.svg)))}nr._loadSvg()})),this._load},ir.prototype._loadSvg=function(){var nr=this,dr=new Image;ru.crossOrigin(dr,this.svg,this._crossorigin),dr.src=this.svg,dr.onerror=function(Pr){nr._resolve&&(dr.onerror=null,nr.onError.emit(Pr))},dr.onload=function(){if(nr._resolve){var Pr=dr.width,Hr=dr.height;if(!Pr||!Hr)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var bn=Pr*nr.scale,Pn=Hr*nr.scale;(nr._overrideWidth||nr._overrideHeight)&&(bn=nr._overrideWidth||nr._overrideHeight/Hr*Pr,Pn=nr._overrideHeight||nr._overrideWidth/Pr*Hr),bn=Math.round(bn),Pn=Math.round(Pn);var Wn=nr.source;Wn.width=bn,Wn.height=Pn,Wn._pixiId="canvas_"+Kr(),Wn.getContext("2d").drawImage(dr,0,0,Pr,Hr,0,0,bn,Pn),nr._resolve(),nr._resolve=null}}},ir.getSize=function(nr){var dr=ir.SVG_SIZE.exec(nr),Pr={};return dr&&(Pr[dr[1]]=Math.round(parseFloat(dr[3])),Pr[dr[5]]=Math.round(parseFloat(dr[7]))),Pr},ir.prototype.dispose=function(){Cr.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},ir.test=function(nr,dr){return dr==="svg"||typeof nr=="string"&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(nr)||typeof nr=="string"&&ir.SVG_XML.test(nr)},ir.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,ir.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,ir})(ru),Fl=(function(Cr){function ir(nr,dr){var Pr=this;if(dr=dr||{},!(nr instanceof HTMLVideoElement)){var Hr=document.createElement("video");Hr.setAttribute("preload","auto"),Hr.setAttribute("webkit-playsinline",""),Hr.setAttribute("playsinline",""),typeof nr=="string"&&(nr=[nr]);var bn=nr[0].src||nr[0];ru.crossOrigin(Hr,bn,dr.crossorigin);for(var Pn=0;Pn<nr.length;++Pn){var Wn=document.createElement("source"),ms=nr[Pn],Es=ms.src,ao=ms.mime,Js=(Es=Es||nr[Pn]).split("?").shift().toLowerCase(),po=Js.slice(Js.lastIndexOf(".")+1);ao=ao||ir.MIME_TYPES[po]||"video/"+po,Wn.src=Es,Wn.type=ao,Hr.appendChild(Wn)}nr=Hr}return(Pr=Cr.call(this,nr)||this).noSubImage=!0,Pr._autoUpdate=!0,Pr._isConnectedToTicker=!1,Pr._updateFPS=dr.updateFPS||0,Pr._msToNextUpdate=0,Pr.autoPlay=dr.autoPlay!==!1,Pr._load=null,Pr._resolve=null,Pr._onCanPlay=Pr._onCanPlay.bind(Pr),Pr._onError=Pr._onError.bind(Pr),dr.autoLoad!==!1&&Pr.load(),Pr}return In(ir,Cr),ir.prototype.update=function(nr){if(!this.destroyed){var dr=dn.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-dr),(!this._updateFPS||this._msToNextUpdate<=0)&&(Cr.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},ir.prototype.load=function(){var nr=this;if(this._load)return this._load;var dr=this.source;return(dr.readyState===dr.HAVE_ENOUGH_DATA||dr.readyState===dr.HAVE_FUTURE_DATA)&&dr.width&&dr.height&&(dr.complete=!0),dr.addEventListener("play",this._onPlayStart.bind(this)),dr.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(dr.addEventListener("canplay",this._onCanPlay),dr.addEventListener("canplaythrough",this._onCanPlay),dr.addEventListener("error",this._onError,!0)),this._load=new Promise(function(Pr){nr.valid?Pr(nr):(nr._resolve=Pr,dr.load())}),this._load},ir.prototype._onError=function(nr){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(nr)},ir.prototype._isSourcePlaying=function(){var nr=this.source;return nr.currentTime>0&&nr.paused===!1&&nr.ended===!1&&nr.readyState>2},ir.prototype._isSourceReady=function(){var nr=this.source;return nr.readyState===3||nr.readyState===4},ir.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(dn.shared.add(this.update,this),this._isConnectedToTicker=!0)},ir.prototype._onPlayStop=function(){this._isConnectedToTicker&&(dn.shared.remove(this.update,this),this._isConnectedToTicker=!1)},ir.prototype._onCanPlay=function(){var nr=this.source;nr.removeEventListener("canplay",this._onCanPlay),nr.removeEventListener("canplaythrough",this._onCanPlay);var dr=this.valid;this.resize(nr.videoWidth,nr.videoHeight),!dr&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&nr.play()},ir.prototype.dispose=function(){this._isConnectedToTicker&&(dn.shared.remove(this.update,this),this._isConnectedToTicker=!1);var nr=this.source;nr&&(nr.removeEventListener("error",this._onError,!0),nr.pause(),nr.src="",nr.load()),Cr.prototype.dispose.call(this)},Object.defineProperty(ir.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(nr){nr!==this._autoUpdate&&(this._autoUpdate=nr,!this._autoUpdate&&this._isConnectedToTicker?(dn.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(dn.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(nr){nr!==this._updateFPS&&(this._updateFPS=nr)},enumerable:!1,configurable:!0}),ir.test=function(nr,dr){return globalThis.HTMLVideoElement&&nr instanceof HTMLVideoElement||ir.TYPES.indexOf(dr)>-1},ir.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],ir.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},ir})(ru),gl=(function(Cr){function ir(nr){return Cr.call(this,nr)||this}return In(ir,Cr),ir.test=function(nr){return!!globalThis.createImageBitmap&&nr instanceof ImageBitmap},ir})(ru);vo.push(Sl,gl,du,Fl,Ko,yo,Iu,Ro);var Gu=(function(Cr){function ir(){return Cr!==null&&Cr.apply(this,arguments)||this}return In(ir,Cr),ir.prototype.upload=function(nr,dr,Pr){var Hr=nr.gl;Hr.pixelStorei(Hr.UNPACK_PREMULTIPLY_ALPHA_WEBGL,dr.alphaMode===st.a.UNPACK);var bn=dr.realWidth,Pn=dr.realHeight;return Pr.width===bn&&Pr.height===Pn?Hr.texSubImage2D(dr.target,0,0,0,bn,Pn,dr.format,Pr.type,this.data):(Pr.width=bn,Pr.height=Pn,Hr.texImage2D(dr.target,0,Pr.internalFormat,bn,Pn,0,dr.format,Pr.type,this.data)),!0},ir})(yo),Lu=(function(){function Cr(ir,nr){this.width=Math.round(ir||100),this.height=Math.round(nr||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 Nn("disposeFramebuffer"),this.multisample=st.l.NONE}return Object.defineProperty(Cr.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),Cr.prototype.addColorTexture=function(ir,nr){return ir===void 0&&(ir=0),this.colorTextures[ir]=nr||new es(null,{scaleMode:st.p.NEAREST,resolution:1,mipmap:st.k.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},Cr.prototype.addDepthTexture=function(ir){return this.depthTexture=ir||new es(new Gu(null,{width:this.width,height:this.height}),{scaleMode:st.p.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:st.k.OFF,format:st.h.DEPTH_COMPONENT,type:st.r.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},Cr.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},Cr.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},Cr.prototype.resize=function(ir,nr){if(ir=Math.round(ir),nr=Math.round(nr),ir!==this.width||nr!==this.height){this.width=ir,this.height=nr,this.dirtyId++,this.dirtySize++;for(var dr=0;dr<this.colorTextures.length;dr++){var Pr=this.colorTextures[dr],Hr=Pr.resolution;Pr.setSize(ir/Hr,nr/Hr)}this.depthTexture&&(Hr=this.depthTexture.resolution,this.depthTexture.setSize(ir/Hr,nr/Hr))}},Cr.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},Cr.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},Cr})(),Ku=(function(Cr){function ir(nr){nr===void 0&&(nr={});var dr=this;if(typeof nr=="number"){var Pr=arguments[0],Hr=arguments[1],bn=arguments[2],Pn=arguments[3];nr={width:Pr,height:Hr,scaleMode:bn,resolution:Pn}}return nr.width=nr.width||100,nr.height=nr.height||100,nr.multisample=nr.multisample!==void 0?nr.multisample:st.l.NONE,(dr=Cr.call(this,null,nr)||this).mipmap=st.k.OFF,dr.valid=!0,dr.clearColor=[0,0,0,0],dr.framebuffer=new Lu(dr.realWidth,dr.realHeight).addColorTexture(0,dr),dr.framebuffer.multisample=nr.multisample,dr.maskStack=[],dr.filterStack=[{}],dr}return In(ir,Cr),ir.prototype.resize=function(nr,dr){this.framebuffer.resize(nr*this.resolution,dr*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},ir.prototype.dispose=function(){this.framebuffer.dispose(),Cr.prototype.dispose.call(this)},ir.prototype.destroy=function(){Cr.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},ir})(es),uu=(function(){function Cr(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return Cr.prototype.set=function(ir,nr,dr){var Pr=nr.width,Hr=nr.height;if(dr){var bn=ir.width/2/Pr,Pn=ir.height/2/Hr,Wn=ir.x/Pr+bn,ms=ir.y/Hr+Pn;dr=io.add(dr,io.NW),this.x0=Wn+bn*io.uX(dr),this.y0=ms+Pn*io.uY(dr),dr=io.add(dr,2),this.x1=Wn+bn*io.uX(dr),this.y1=ms+Pn*io.uY(dr),dr=io.add(dr,2),this.x2=Wn+bn*io.uX(dr),this.y2=ms+Pn*io.uY(dr),dr=io.add(dr,2),this.x3=Wn+bn*io.uX(dr),this.y3=ms+Pn*io.uY(dr)}else this.x0=ir.x/Pr,this.y0=ir.y/Hr,this.x1=(ir.x+ir.width)/Pr,this.y1=ir.y/Hr,this.x2=(ir.x+ir.width)/Pr,this.y2=(ir.y+ir.height)/Hr,this.x3=ir.x/Pr,this.y3=(ir.y+ir.height)/Hr;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},Cr.prototype.toString=function(){return"[@pixi/core:TextureUvs x0="+this.x0+" y0="+this.y0+" x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" y2="+this.y2+" x3="+this.x3+" y3="+this.y3+"]"},Cr})(),en=new uu;function Jr(Cr){Cr.destroy=function(){},Cr.on=function(){},Cr.once=function(){},Cr.emit=function(){}}var vn=(function(Cr){function ir(nr,dr,Pr,Hr,bn,Pn){var Wn=Cr.call(this)||this;if(Wn.noFrame=!1,dr||(Wn.noFrame=!0,dr=new Zn(0,0,1,1)),nr instanceof ir&&(nr=nr.baseTexture),Wn.baseTexture=nr,Wn._frame=dr,Wn.trim=Hr,Wn.valid=!1,Wn._uvs=en,Wn.uvMatrix=null,Wn.orig=Pr||dr,Wn._rotate=Number(bn||0),bn===!0)Wn._rotate=2;else if(Wn._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return Wn.defaultAnchor=Pn?new wn(Pn.x,Pn.y):new wn(0,0),Wn._updateID=0,Wn.textureCacheIds=[],nr.valid?Wn.noFrame?nr.valid&&Wn.onBaseTextureUpdated(nr):Wn.frame=dr:nr.once("loaded",Wn.onBaseTextureUpdated,Wn),Wn.noFrame&&nr.on("update",Wn.onBaseTextureUpdated,Wn),Wn}return In(ir,Cr),ir.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},ir.prototype.onBaseTextureUpdated=function(nr){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=nr.width,this._frame.height=nr.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},ir.prototype.destroy=function(nr){if(this.baseTexture){if(nr){var dr=this.baseTexture.resource;dr&&dr.url&&An[dr.url]&&ir.removeFromCache(dr.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,ir.removeFromCache(this),this.textureCacheIds=null},ir.prototype.clone=function(){var nr=this._frame.clone(),dr=this._frame===this.orig?nr:this.orig.clone(),Pr=new ir(this.baseTexture,!this.noFrame&&nr,dr,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(Pr._frame=nr),Pr},ir.prototype.updateUvs=function(){this._uvs===en&&(this._uvs=new uu),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},ir.from=function(nr,dr,Pr){dr===void 0&&(dr={}),Pr===void 0&&(Pr=nt.b.STRICT_TEXTURE_CACHE);var Hr=typeof nr=="string",bn=null;if(Hr)bn=nr;else if(nr instanceof es){if(!nr.cacheId){var Pn=dr&&dr.pixiIdPrefix||"pixiid";nr.cacheId=Pn+"-"+Kr(),es.addToCache(nr,nr.cacheId)}bn=nr.cacheId}else nr._pixiId||(Pn=dr&&dr.pixiIdPrefix||"pixiid",nr._pixiId=Pn+"_"+Kr()),bn=nr._pixiId;var Wn=An[bn];if(Hr&&Pr&&!Wn)throw new Error('The cacheId "'+bn+'" does not exist in TextureCache.');return Wn||nr instanceof es?!Wn&&nr instanceof es&&(Wn=new ir(nr),ir.addToCache(Wn,bn)):(dr.resolution||(dr.resolution=Ln(nr)),(Wn=new ir(new es(nr,dr))).baseTexture.cacheId=bn,es.addToCache(Wn.baseTexture,bn),ir.addToCache(Wn,bn)),Wn},ir.fromURL=function(nr,dr){var Pr=Object.assign({autoLoad:!1},dr?.resourceOptions),Hr=ir.from(nr,Object.assign({resourceOptions:Pr},dr),!1),bn=Hr.baseTexture.resource;return Hr.baseTexture.valid?Promise.resolve(Hr):bn.load().then(function(){return Promise.resolve(Hr)})},ir.fromBuffer=function(nr,dr,Pr,Hr){return new ir(es.fromBuffer(nr,dr,Pr,Hr))},ir.fromLoader=function(nr,dr,Pr,Hr){var bn=new es(nr,Object.assign({scaleMode:nt.b.SCALE_MODE,resolution:Ln(dr)},Hr)),Pn=bn.resource;Pn instanceof Sl&&(Pn.url=dr);var Wn=new ir(bn);return Pr||(Pr=dr),es.addToCache(Wn.baseTexture,Pr),ir.addToCache(Wn,Pr),Pr!==dr&&(es.addToCache(Wn.baseTexture,dr),ir.addToCache(Wn,dr)),Wn.baseTexture.valid?Promise.resolve(Wn):new Promise(function(ms){Wn.baseTexture.once("loaded",function(){return ms(Wn)})})},ir.addToCache=function(nr,dr){dr&&(nr.textureCacheIds.indexOf(dr)===-1&&nr.textureCacheIds.push(dr),An[dr]&&console.warn("Texture added to the cache with an id ["+dr+"] that already had an entry"),An[dr]=nr)},ir.removeFromCache=function(nr){if(typeof nr=="string"){var dr=An[nr];if(dr){var Pr=dr.textureCacheIds.indexOf(nr);return Pr>-1&&dr.textureCacheIds.splice(Pr,1),delete An[nr],dr}}else if(nr&&nr.textureCacheIds){for(var Hr=0;Hr<nr.textureCacheIds.length;++Hr)An[nr.textureCacheIds[Hr]]===nr&&delete An[nr.textureCacheIds[Hr]];return nr.textureCacheIds.length=0,nr}return null},Object.defineProperty(ir.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"frame",{get:function(){return this._frame},set:function(nr){this._frame=nr,this.noFrame=!1;var dr=nr.x,Pr=nr.y,Hr=nr.width,bn=nr.height,Pn=dr+Hr>this.baseTexture.width,Wn=Pr+bn>this.baseTexture.height;if(Pn||Wn){var ms=Pn&&Wn?"and":"or",Es="X: "+dr+" + "+Hr+" = "+(dr+Hr)+" > "+this.baseTexture.width,ao="Y: "+Pr+" + "+bn+" = "+(Pr+bn)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+Es+" "+ms+" "+ao)}this.valid=Hr&&bn&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=nr),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"rotate",{get:function(){return this._rotate},set:function(nr){this._rotate=nr,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),ir.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(ir,"EMPTY",{get:function(){return ir._EMPTY||(ir._EMPTY=new ir(new es),Jr(ir._EMPTY),Jr(ir._EMPTY.baseTexture)),ir._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(ir,"WHITE",{get:function(){if(!ir._WHITE){var nr=document.createElement("canvas"),dr=nr.getContext("2d");nr.width=16,nr.height=16,dr.fillStyle="white",dr.fillRect(0,0,16,16),ir._WHITE=new ir(new es(new du(nr))),Jr(ir._WHITE),Jr(ir._WHITE.baseTexture)}return ir._WHITE},enumerable:!1,configurable:!0}),ir})(St),fn=(function(Cr){function ir(nr,dr){var Pr=Cr.call(this,nr,dr)||this;return Pr.valid=!0,Pr.filterFrame=null,Pr.filterPoolKey=null,Pr.updateUvs(),Pr}return In(ir,Cr),Object.defineProperty(ir.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(nr){this.framebuffer.multisample=nr},enumerable:!1,configurable:!0}),ir.prototype.resize=function(nr,dr,Pr){Pr===void 0&&(Pr=!0);var Hr=this.baseTexture.resolution,bn=Math.round(nr*Hr)/Hr,Pn=Math.round(dr*Hr)/Hr;this.valid=bn>0&&Pn>0,this._frame.width=this.orig.width=bn,this._frame.height=this.orig.height=Pn,Pr&&this.baseTexture.resize(bn,Pn),this.updateUvs()},ir.prototype.setResolution=function(nr){var dr=this.baseTexture;dr.resolution!==nr&&(dr.setResolution(nr),this.resize(dr.width,dr.height,!1))},ir.create=function(nr){for(var dr=arguments,Pr=[],Hr=1;Hr<arguments.length;Hr++)Pr[Hr-1]=dr[Hr];return typeof nr=="number"&&(ln("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),nr={width:nr,height:Pr[0],scaleMode:Pr[1],resolution:Pr[2]}),new ir(new Ku(nr))},ir})(vn),gn=(function(){function Cr(ir){this.texturePool={},this.textureOptions=ir||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return Cr.prototype.createTexture=function(ir,nr,dr){dr===void 0&&(dr=st.l.NONE);var Pr=new Ku(Object.assign({width:ir,height:nr,resolution:1,multisample:dr},this.textureOptions));return new fn(Pr)},Cr.prototype.getOptimalTexture=function(ir,nr,dr,Pr){var Hr;dr===void 0&&(dr=1),Pr===void 0&&(Pr=st.l.NONE),ir=Math.ceil(ir*dr-1e-6),nr=Math.ceil(nr*dr-1e-6),this.enableFullScreen&&ir===this._pixelsWidth&&nr===this._pixelsHeight?Hr=Pr>1?-Pr:-1:(Hr=((65535&(ir=Ar(ir)))<<16|65535&(nr=Ar(nr)))>>>0,Pr>1&&(Hr+=4294967296*Pr)),this.texturePool[Hr]||(this.texturePool[Hr]=[]);var bn=this.texturePool[Hr].pop();return bn||(bn=this.createTexture(ir,nr,Pr)),bn.filterPoolKey=Hr,bn.setResolution(dr),bn},Cr.prototype.getFilterTexture=function(ir,nr,dr){var Pr=this.getOptimalTexture(ir.width,ir.height,nr||ir.resolution,dr||st.l.NONE);return Pr.filterFrame=ir.filterFrame,Pr},Cr.prototype.returnTexture=function(ir){var nr=ir.filterPoolKey;ir.filterFrame=null,this.texturePool[nr].push(ir)},Cr.prototype.returnFilterTexture=function(ir){this.returnTexture(ir)},Cr.prototype.clear=function(ir){if(ir=ir!==!1)for(var nr in this.texturePool){var dr=this.texturePool[nr];if(dr)for(var Pr=0;Pr<dr.length;Pr++)dr[Pr].destroy(!0)}this.texturePool={}},Cr.prototype.setScreenSize=function(ir){if(ir.width!==this._pixelsWidth||ir.height!==this._pixelsHeight){for(var nr in this.enableFullScreen=ir.width>0&&ir.height>0,this.texturePool)if(Number(nr)<0){var dr=this.texturePool[nr];if(dr)for(var Pr=0;Pr<dr.length;Pr++)dr[Pr].destroy(!0);this.texturePool[nr]=[]}this._pixelsWidth=ir.width,this._pixelsHeight=ir.height}},Cr.SCREEN_KEY=-1,Cr})(),mn=(function(){function Cr(ir,nr,dr,Pr,Hr,bn,Pn){nr===void 0&&(nr=0),dr===void 0&&(dr=!1),Pr===void 0&&(Pr=st.r.FLOAT),this.buffer=ir,this.size=nr,this.normalized=dr,this.type=Pr,this.stride=Hr,this.start=bn,this.instance=Pn}return Cr.prototype.destroy=function(){this.buffer=null},Cr.from=function(ir,nr,dr,Pr,Hr){return new Cr(ir,nr,dr,Pr,Hr)},Cr})(),ss=0,ga=(function(){function Cr(ir,nr,dr){nr===void 0&&(nr=!0),dr===void 0&&(dr=!1),this.data=ir||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=dr,this.static=nr,this.id=ss++,this.disposeRunner=new Nn("disposeBuffer")}return Cr.prototype.update=function(ir){ir instanceof Array&&(ir=new Float32Array(ir)),this.data=ir||this.data,this._updateID++},Cr.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},Cr.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(Cr.prototype,"index",{get:function(){return this.type===st.d.ELEMENT_ARRAY_BUFFER},set:function(ir){this.type=ir?st.d.ELEMENT_ARRAY_BUFFER:st.d.ARRAY_BUFFER},enumerable:!1,configurable:!0}),Cr.from=function(ir){return ir instanceof Array&&(ir=new Float32Array(ir)),new Cr(ir)},Cr})(),Ns={Float32Array,Uint32Array,Int32Array,Uint8Array},vs={5126:4,5123:2,5121:1},Xs=0,co={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},ls=(function(){function Cr(ir,nr){ir===void 0&&(ir=[]),nr===void 0&&(nr={}),this.buffers=ir,this.indexBuffer=null,this.attributes=nr,this.glVertexArrayObjects={},this.id=Xs++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Nn("disposeGeometry"),this.refCount=0}return Cr.prototype.addAttribute=function(ir,nr,dr,Pr,Hr,bn,Pn,Wn){if(dr===void 0&&(dr=0),Pr===void 0&&(Pr=!1),Wn===void 0&&(Wn=!1),!nr)throw new Error("You must pass a buffer when creating an attribute");nr instanceof ga||(nr instanceof Array&&(nr=new Float32Array(nr)),nr=new ga(nr));var ms=ir.split("|");if(ms.length>1){for(var Es=0;Es<ms.length;Es++)this.addAttribute(ms[Es],nr,dr,Pr,Hr);return this}var ao=this.buffers.indexOf(nr);return ao===-1&&(this.buffers.push(nr),ao=this.buffers.length-1),this.attributes[ir]=new mn(ao,dr,Pr,Hr,bn,Pn,Wn),this.instanced=this.instanced||Wn,this},Cr.prototype.getAttribute=function(ir){return this.attributes[ir]},Cr.prototype.getBuffer=function(ir){return this.buffers[this.getAttribute(ir).buffer]},Cr.prototype.addIndex=function(ir){return ir instanceof ga||(ir instanceof Array&&(ir=new Uint16Array(ir)),ir=new ga(ir)),ir.type=st.d.ELEMENT_ARRAY_BUFFER,this.indexBuffer=ir,this.buffers.indexOf(ir)===-1&&this.buffers.push(ir),this},Cr.prototype.getIndex=function(){return this.indexBuffer},Cr.prototype.interleave=function(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;var ir,nr=[],dr=[],Pr=new ga;for(ir in this.attributes){var Hr=this.attributes[ir],bn=this.buffers[Hr.buffer];nr.push(bn.data),dr.push(Hr.size*vs[Hr.type]/4),Hr.buffer=0}for(Pr.data=(function(Pn,Wn){for(var ms=0,Es=0,ao={},Js=0;Js<Pn.length;Js++)Es+=Wn[Js],ms+=Pn[Js].length;var po=new ArrayBuffer(4*ms),So=null,$o=0;for(Js=0;Js<Pn.length;Js++){var Zo=Wn[Js],au=Pn[Js],ou=Or(au);ao[ou]||(ao[ou]=new Ns[ou](po)),So=ao[ou];for(var Yo=0;Yo<au.length;Yo++)So[(Yo/Zo|0)*Es+$o+Yo%Zo]=au[Yo];$o+=Zo}return new Float32Array(po)})(nr,dr),ir=0;ir<this.buffers.length;ir++)this.buffers[ir]!==this.indexBuffer&&this.buffers[ir].destroy();return this.buffers=[Pr],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},Cr.prototype.getSize=function(){for(var ir in this.attributes){var nr=this.attributes[ir];return this.buffers[nr.buffer].data.length/(nr.stride/4||nr.size)}return 0},Cr.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},Cr.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},Cr.prototype.clone=function(){for(var ir=new Cr,nr=0;nr<this.buffers.length;nr++)ir.buffers[nr]=new ga(this.buffers[nr].data.slice(0));for(var nr in this.attributes){var dr=this.attributes[nr];ir.attributes[nr]=new mn(dr.buffer,dr.size,dr.normalized,dr.type,dr.stride,dr.start,dr.instance)}return this.indexBuffer&&(ir.indexBuffer=ir.buffers[this.buffers.indexOf(this.indexBuffer)],ir.indexBuffer.type=st.d.ELEMENT_ARRAY_BUFFER),ir},Cr.merge=function(ir){for(var nr,dr=new Cr,Pr=[],Hr=[],bn=[],Pn=0;Pn<ir.length;Pn++){nr=ir[Pn];for(var Wn=0;Wn<nr.buffers.length;Wn++)Hr[Wn]=Hr[Wn]||0,Hr[Wn]+=nr.buffers[Wn].data.length,bn[Wn]=0}for(Pn=0;Pn<nr.buffers.length;Pn++)Pr[Pn]=new co[Or(nr.buffers[Pn].data)](Hr[Pn]),dr.buffers[Pn]=new ga(Pr[Pn]);for(Pn=0;Pn<ir.length;Pn++)for(nr=ir[Pn],Wn=0;Wn<nr.buffers.length;Wn++)Pr[Wn].set(nr.buffers[Wn].data,bn[Wn]),bn[Wn]+=nr.buffers[Wn].data.length;if(dr.attributes=nr.attributes,nr.indexBuffer){dr.indexBuffer=dr.buffers[nr.buffers.indexOf(nr.indexBuffer)],dr.indexBuffer.type=st.d.ELEMENT_ARRAY_BUFFER;var ms=0,Es=0,ao=0,Js=0;for(Pn=0;Pn<nr.buffers.length;Pn++)if(nr.buffers[Pn]!==nr.indexBuffer){Js=Pn;break}for(var Pn in nr.attributes){var po=nr.attributes[Pn];(0|po.buffer)===Js&&(Es+=po.size*vs[po.type]/4)}for(Pn=0;Pn<ir.length;Pn++){var So=ir[Pn].indexBuffer.data;for(Wn=0;Wn<So.length;Wn++)dr.indexBuffer.data[Wn+ao]+=ms;ms+=ir[Pn].buffers[Js].data.length/Es,ao+=So.length}}return dr},Cr})(),Mo=(function(Cr){function ir(){var nr=Cr.call(this)||this;return nr.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),nr}return In(ir,Cr),ir})(ls),Nu=(function(Cr){function ir(){var nr=Cr.call(this)||this;return nr.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),nr.uvs=new Float32Array([0,0,1,0,1,1,0,1]),nr.vertexBuffer=new ga(nr.vertices),nr.uvBuffer=new ga(nr.uvs),nr.addAttribute("aVertexPosition",nr.vertexBuffer).addAttribute("aTextureCoord",nr.uvBuffer).addIndex([0,1,2,0,2,3]),nr}return In(ir,Cr),ir.prototype.map=function(nr,dr){var Pr=0,Hr=0;return this.uvs[0]=Pr,this.uvs[1]=Hr,this.uvs[2]=Pr+dr.width/nr.width,this.uvs[3]=Hr,this.uvs[4]=Pr+dr.width/nr.width,this.uvs[5]=Hr+dr.height/nr.height,this.uvs[6]=Pr,this.uvs[7]=Hr+dr.height/nr.height,Pr=dr.x,Hr=dr.y,this.vertices[0]=Pr,this.vertices[1]=Hr,this.vertices[2]=Pr+dr.width,this.vertices[3]=Hr,this.vertices[4]=Pr+dr.width,this.vertices[5]=Hr+dr.height,this.vertices[6]=Pr,this.vertices[7]=Hr+dr.height,this.invalidate(),this},ir.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},ir})(ls),Ou=0,$u=(function(){function Cr(ir,nr,dr){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Ou++,this.static=!!nr,this.ubo=!!dr,ir instanceof ga?(this.buffer=ir,this.buffer.type=st.d.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=ir,this.ubo&&(this.buffer=new ga(new Float32Array(1)),this.buffer.type=st.d.UNIFORM_BUFFER,this.autoManage=!0))}return Cr.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},Cr.prototype.add=function(ir,nr,dr){if(this.ubo)throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them");this.uniforms[ir]=new Cr(nr,dr)},Cr.from=function(ir,nr,dr){return new Cr(ir,nr,dr)},Cr.uboFrom=function(ir,nr){return new Cr(ir,nr==null||nr,!0)},Cr})(),Hu=(function(){function Cr(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=st.l.NONE,this.sourceFrame=new Zn,this.destinationFrame=new Zn,this.bindingSourceFrame=new Zn,this.bindingDestinationFrame=new Zn,this.filters=[],this.transform=null}return Cr.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},Cr})(),kl=[new wn,new wn,new wn,new wn],Uu=new Dn,tl=(function(){function Cr(ir){this.renderer=ir,this.defaultFilterStack=[{}],this.texturePool=new gn,this.texturePool.setScreenSize(ir.view),this.statePool=[],this.quad=new Mo,this.quadUv=new Nu,this.tempRect=new Zn,this.activeState={},this.globalUniforms=new $u({outputFrame:new Zn,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return Cr.prototype.push=function(ir,nr){for(var dr,Pr,Hr=this.renderer,bn=this.defaultFilterStack,Pn=this.statePool.pop()||new Hu,Wn=this.renderer.renderTexture,ms=nr[0].resolution,Es=nr[0].multisample,ao=nr[0].padding,Js=nr[0].autoFit,po=(dr=nr[0].legacy)===null||dr===void 0||dr,So=1;So<nr.length;So++){var $o=nr[So];ms=Math.min(ms,$o.resolution),Es=Math.min(Es,$o.multisample),ao=this.useMaxPadding?Math.max(ao,$o.padding):ao+$o.padding,Js=Js&&$o.autoFit,po=po||(Pr=$o.legacy)===null||Pr===void 0||Pr}bn.length===1&&(this.defaultFilterStack[0].renderTexture=Wn.current),bn.push(Pn),Pn.resolution=ms,Pn.multisample=Es,Pn.legacy=po,Pn.target=ir,Pn.sourceFrame.copyFrom(ir.filterArea||ir.getBounds(!0)),Pn.sourceFrame.pad(ao);var Zo=this.tempRect.copyFrom(Wn.sourceFrame);Hr.projection.transform&&this.transformAABB(Uu.copyFrom(Hr.projection.transform).invert(),Zo),Js?(Pn.sourceFrame.fit(Zo),(Pn.sourceFrame.width<=0||Pn.sourceFrame.height<=0)&&(Pn.sourceFrame.width=0,Pn.sourceFrame.height=0)):Pn.sourceFrame.intersects(Zo)||(Pn.sourceFrame.width=0,Pn.sourceFrame.height=0),this.roundFrame(Pn.sourceFrame,Wn.current?Wn.current.resolution:Hr.resolution,Wn.sourceFrame,Wn.destinationFrame,Hr.projection.transform),Pn.renderTexture=this.getOptimalFilterTexture(Pn.sourceFrame.width,Pn.sourceFrame.height,ms,Es),Pn.filters=nr,Pn.destinationFrame.width=Pn.renderTexture.width,Pn.destinationFrame.height=Pn.renderTexture.height;var au=this.tempRect;au.x=0,au.y=0,au.width=Pn.sourceFrame.width,au.height=Pn.sourceFrame.height,Pn.renderTexture.filterFrame=Pn.sourceFrame,Pn.bindingSourceFrame.copyFrom(Wn.sourceFrame),Pn.bindingDestinationFrame.copyFrom(Wn.destinationFrame),Pn.transform=Hr.projection.transform,Hr.projection.transform=null,Wn.bind(Pn.renderTexture,Pn.sourceFrame,au),Hr.framebuffer.clear(0,0,0,0)},Cr.prototype.pop=function(){var ir=this.defaultFilterStack,nr=ir.pop(),dr=nr.filters;this.activeState=nr;var Pr=this.globalUniforms.uniforms;Pr.outputFrame=nr.sourceFrame,Pr.resolution=nr.resolution;var Hr=Pr.inputSize,bn=Pr.inputPixel,Pn=Pr.inputClamp;if(Hr[0]=nr.destinationFrame.width,Hr[1]=nr.destinationFrame.height,Hr[2]=1/Hr[0],Hr[3]=1/Hr[1],bn[0]=Math.round(Hr[0]*nr.resolution),bn[1]=Math.round(Hr[1]*nr.resolution),bn[2]=1/bn[0],bn[3]=1/bn[1],Pn[0]=.5*bn[2],Pn[1]=.5*bn[3],Pn[2]=nr.sourceFrame.width*Hr[2]-.5*bn[2],Pn[3]=nr.sourceFrame.height*Hr[3]-.5*bn[3],nr.legacy){var Wn=Pr.filterArea;Wn[0]=nr.destinationFrame.width,Wn[1]=nr.destinationFrame.height,Wn[2]=nr.sourceFrame.x,Wn[3]=nr.sourceFrame.y,Pr.filterClamp=Pr.inputClamp}this.globalUniforms.update();var ms=ir[ir.length-1];if(this.renderer.framebuffer.blit(),dr.length===1)dr[0].apply(this,nr.renderTexture,ms.renderTexture,st.e.BLEND,nr),this.returnFilterTexture(nr.renderTexture);else{var Es=nr.renderTexture,ao=this.getOptimalFilterTexture(Es.width,Es.height,nr.resolution);ao.filterFrame=Es.filterFrame;var Js=0;for(Js=0;Js<dr.length-1;++Js){Js===1&&nr.multisample>1&&((ao=this.getOptimalFilterTexture(Es.width,Es.height,nr.resolution)).filterFrame=Es.filterFrame),dr[Js].apply(this,Es,ao,st.e.CLEAR,nr);var po=Es;Es=ao,ao=po}dr[Js].apply(this,Es,ms.renderTexture,st.e.BLEND,nr),Js>1&&nr.multisample>1&&this.returnFilterTexture(nr.renderTexture),this.returnFilterTexture(Es),this.returnFilterTexture(ao)}nr.clear(),this.statePool.push(nr)},Cr.prototype.bindAndClear=function(ir,nr){nr===void 0&&(nr=st.e.CLEAR);var dr=this.renderer,Pr=dr.renderTexture,Hr=dr.state;if(ir===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,ir&&ir.filterFrame){var bn=this.tempRect;bn.x=0,bn.y=0,bn.width=ir.filterFrame.width,bn.height=ir.filterFrame.height,Pr.bind(ir,ir.filterFrame,bn)}else ir!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?Pr.bind(ir):this.renderer.renderTexture.bind(ir,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var Pn=1&Hr.stateId||this.forceClear;(nr===st.e.CLEAR||nr===st.e.BLIT&&Pn)&&this.renderer.framebuffer.clear(0,0,0,0)},Cr.prototype.applyFilter=function(ir,nr,dr,Pr){var Hr=this.renderer;Hr.state.set(ir.state),this.bindAndClear(dr,Pr),ir.uniforms.uSampler=nr,ir.uniforms.filterGlobals=this.globalUniforms,Hr.shader.bind(ir),ir.legacy=!!ir.program.attributeData.aTextureCoord,ir.legacy?(this.quadUv.map(nr._frame,nr.filterFrame),Hr.geometry.bind(this.quadUv),Hr.geometry.draw(st.f.TRIANGLES)):(Hr.geometry.bind(this.quad),Hr.geometry.draw(st.f.TRIANGLE_STRIP))},Cr.prototype.calculateSpriteMatrix=function(ir,nr){var dr=this.activeState,Pr=dr.sourceFrame,Hr=dr.destinationFrame,bn=nr._texture.orig,Pn=ir.set(Hr.width,0,0,Hr.height,Pr.x,Pr.y),Wn=nr.worldTransform.copyTo(Dn.TEMP_MATRIX);return Wn.invert(),Pn.prepend(Wn),Pn.scale(1/bn.width,1/bn.height),Pn.translate(nr.anchor.x,nr.anchor.y),Pn},Cr.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},Cr.prototype.getOptimalFilterTexture=function(ir,nr,dr,Pr){return dr===void 0&&(dr=1),Pr===void 0&&(Pr=st.l.NONE),this.texturePool.getOptimalTexture(ir,nr,dr,Pr)},Cr.prototype.getFilterTexture=function(ir,nr,dr){if(typeof ir=="number"){var Pr=ir;ir=nr,nr=Pr}ir=ir||this.activeState.renderTexture;var Hr=this.texturePool.getOptimalTexture(ir.width,ir.height,nr||ir.resolution,dr||st.l.NONE);return Hr.filterFrame=ir.filterFrame,Hr},Cr.prototype.returnFilterTexture=function(ir){this.texturePool.returnTexture(ir)},Cr.prototype.emptyPool=function(){this.texturePool.clear(!0)},Cr.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},Cr.prototype.transformAABB=function(ir,nr){var dr=kl[0],Pr=kl[1],Hr=kl[2],bn=kl[3];dr.set(nr.left,nr.top),Pr.set(nr.left,nr.bottom),Hr.set(nr.right,nr.top),bn.set(nr.right,nr.bottom),ir.apply(dr,dr),ir.apply(Pr,Pr),ir.apply(Hr,Hr),ir.apply(bn,bn);var Pn=Math.min(dr.x,Pr.x,Hr.x,bn.x),Wn=Math.min(dr.y,Pr.y,Hr.y,bn.y),ms=Math.max(dr.x,Pr.x,Hr.x,bn.x),Es=Math.max(dr.y,Pr.y,Hr.y,bn.y);nr.x=Pn,nr.y=Wn,nr.width=ms-Pn,nr.height=Es-Wn},Cr.prototype.roundFrame=function(ir,nr,dr,Pr,Hr){if(!(ir.width<=0||ir.height<=0||dr.width<=0||dr.height<=0)){if(Hr){var bn=Hr.a,Pn=Hr.b,Wn=Hr.c,ms=Hr.d;if((Math.abs(Pn)>1e-4||Math.abs(Wn)>1e-4)&&(Math.abs(bn)>1e-4||Math.abs(ms)>1e-4))return}(Hr=Hr?Uu.copyFrom(Hr):Uu.identity()).translate(-dr.x,-dr.y).scale(Pr.width/dr.width,Pr.height/dr.height).translate(Pr.x,Pr.y),this.transformAABB(Hr,ir),ir.ceil(nr),this.transformAABB(Hr.invert(),ir)}},Cr})(),rl=(function(){function Cr(ir){this.renderer=ir}return Cr.prototype.flush=function(){},Cr.prototype.destroy=function(){this.renderer=null},Cr.prototype.start=function(){},Cr.prototype.stop=function(){this.flush()},Cr.prototype.render=function(ir){},Cr})(),Wu=(function(){function Cr(ir){this.renderer=ir,this.emptyRenderer=new rl(ir),this.currentRenderer=this.emptyRenderer}return Cr.prototype.setObjectRenderer=function(ir){this.currentRenderer!==ir&&(this.currentRenderer.stop(),this.currentRenderer=ir,this.currentRenderer.start())},Cr.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},Cr.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},Cr.prototype.copyBoundTextures=function(ir,nr){for(var dr=this.renderer.texture.boundTextures,Pr=nr-1;Pr>=0;--Pr)ir[Pr]=dr[Pr]||null,ir[Pr]&&(ir[Pr]._batchLocation=Pr)},Cr.prototype.boundArray=function(ir,nr,dr,Pr){for(var Hr=ir.elements,bn=ir.ids,Pn=ir.count,Wn=0,ms=0;ms<Pn;ms++){var Es=Hr[ms],ao=Es._batchLocation;if(ao>=0&&ao<Pr&&nr[ao]===Es)bn[ms]=ao;else for(;Wn<Pr;){var Js=nr[Wn];if(!Js||Js._batchEnabled!==dr||Js._batchLocation!==Wn){bn[ms]=Wn,Es._batchLocation=Wn,nr[Wn]=Es;break}Wn++}}},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),tp=0,Al=(function(){function Cr(ir){this.renderer=ir,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),ir.view.addEventListener("webglcontextlost",this.handleContextLost,!1),ir.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(Cr.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),Cr.prototype.contextChange=function(ir){this.gl=ir,this.renderer.gl=ir,this.renderer.CONTEXT_UID=tp++,ir.isContextLost()&&ir.getExtension("WEBGL_lose_context")&&ir.getExtension("WEBGL_lose_context").restoreContext()},Cr.prototype.initFromContext=function(ir){this.gl=ir,this.validateContext(ir),this.renderer.gl=ir,this.renderer.CONTEXT_UID=tp++,this.renderer.runners.contextChange.emit(ir)},Cr.prototype.initFromOptions=function(ir){var nr=this.createContext(this.renderer.view,ir);this.initFromContext(nr)},Cr.prototype.createContext=function(ir,nr){var dr;if(nt.b.PREFER_ENV>=st.g.WEBGL2&&(dr=ir.getContext("webgl2",nr)),dr)this.webGLVersion=2;else if(this.webGLVersion=1,!(dr=ir.getContext("webgl",nr)||ir.getContext("experimental-webgl",nr)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=dr,this.getExtensions(),this.gl},Cr.prototype.getExtensions=function(){var ir=this.gl,nr={anisotropicFiltering:ir.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:ir.getExtension("OES_texture_float_linear"),s3tc:ir.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:ir.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:ir.getExtension("WEBGL_compressed_texture_etc"),etc1:ir.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:ir.getExtension("WEBGL_compressed_texture_pvrtc")||ir.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:ir.getExtension("WEBGL_compressed_texture_atc"),astc:ir.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,nr,{drawBuffers:ir.getExtension("WEBGL_draw_buffers"),depthTexture:ir.getExtension("WEBGL_depth_texture"),loseContext:ir.getExtension("WEBGL_lose_context"),vertexArrayObject:ir.getExtension("OES_vertex_array_object")||ir.getExtension("MOZ_OES_vertex_array_object")||ir.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:ir.getExtension("OES_element_index_uint"),floatTexture:ir.getExtension("OES_texture_float"),floatTextureLinear:ir.getExtension("OES_texture_float_linear"),textureHalfFloat:ir.getExtension("OES_texture_half_float"),textureHalfFloatLinear:ir.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,nr,{colorBufferFloat:ir.getExtension("EXT_color_buffer_float")})},Cr.prototype.handleContextLost=function(ir){ir.preventDefault()},Cr.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},Cr.prototype.destroy=function(){var ir=this.renderer.view;this.renderer=null,ir.removeEventListener("webglcontextlost",this.handleContextLost),ir.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},Cr.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},Cr.prototype.validateContext=function(ir){var nr=ir.getContextAttributes(),dr="WebGL2RenderingContext"in globalThis&&ir instanceof globalThis.WebGL2RenderingContext;dr&&(this.webGLVersion=2),nr&&!nr.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var Pr=dr||!!ir.getExtension("OES_element_index_uint");this.supports.uint32Indices=Pr,Pr||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},Cr})(),om=function(Cr){this.framebuffer=Cr,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=st.l.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},Op=new Zn,op=(function(){function Cr(ir){this.renderer=ir,this.managedFramebuffers=[],this.unknownFramebuffer=new Lu(10,10),this.msaaSamples=null}return Cr.prototype.contextChange=function(){var ir=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Zn,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),this.renderer.context.webGLVersion===1){var nr=this.renderer.context.extensions.drawBuffers,dr=this.renderer.context.extensions.depthTexture;nt.b.PREFER_ENV===st.g.WEBGL_LEGACY&&(nr=null,dr=null),nr?ir.drawBuffers=function(Pr){return nr.drawBuffersWEBGL(Pr)}:(this.hasMRT=!1,ir.drawBuffers=function(){}),dr||(this.writeDepthTexture=!1)}else this.msaaSamples=ir.getInternalformatParameter(ir.RENDERBUFFER,ir.RGBA8,ir.SAMPLES)},Cr.prototype.bind=function(ir,nr,dr){dr===void 0&&(dr=0);var Pr=this.gl;if(ir){var Hr=ir.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(ir);this.current!==ir&&(this.current=ir,Pr.bindFramebuffer(Pr.FRAMEBUFFER,Hr.framebuffer)),Hr.mipLevel!==dr&&(ir.dirtyId++,ir.dirtyFormat++,Hr.mipLevel=dr),Hr.dirtyId!==ir.dirtyId&&(Hr.dirtyId=ir.dirtyId,Hr.dirtyFormat!==ir.dirtyFormat?(Hr.dirtyFormat=ir.dirtyFormat,Hr.dirtySize=ir.dirtySize,this.updateFramebuffer(ir,dr)):Hr.dirtySize!==ir.dirtySize&&(Hr.dirtySize=ir.dirtySize,this.resizeFramebuffer(ir)));for(var bn=0;bn<ir.colorTextures.length;bn++){var Pn=ir.colorTextures[bn];this.renderer.texture.unbind(Pn.parentTextureArray||Pn)}if(ir.depthTexture&&this.renderer.texture.unbind(ir.depthTexture),nr){var Wn=nr.width>>dr,ms=nr.height>>dr,Es=Wn/nr.width;this.setViewport(nr.x*Es,nr.y*Es,Wn,ms)}else Wn=ir.width>>dr,ms=ir.height>>dr,this.setViewport(0,0,Wn,ms)}else this.current&&(this.current=null,Pr.bindFramebuffer(Pr.FRAMEBUFFER,null)),nr?this.setViewport(nr.x,nr.y,nr.width,nr.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},Cr.prototype.setViewport=function(ir,nr,dr,Pr){var Hr=this.viewport;ir=Math.round(ir),nr=Math.round(nr),dr=Math.round(dr),Pr=Math.round(Pr),Hr.width===dr&&Hr.height===Pr&&Hr.x===ir&&Hr.y===nr||(Hr.x=ir,Hr.y=nr,Hr.width=dr,Hr.height=Pr,this.gl.viewport(ir,nr,dr,Pr))},Object.defineProperty(Cr.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}),Cr.prototype.clear=function(ir,nr,dr,Pr,Hr){Hr===void 0&&(Hr=st.c.COLOR|st.c.DEPTH);var bn=this.gl;bn.clearColor(ir,nr,dr,Pr),bn.clear(Hr)},Cr.prototype.initFramebuffer=function(ir){var nr=this.gl,dr=new om(nr.createFramebuffer());return dr.multisample=this.detectSamples(ir.multisample),ir.glFramebuffers[this.CONTEXT_UID]=dr,this.managedFramebuffers.push(ir),ir.disposeRunner.add(this),dr},Cr.prototype.resizeFramebuffer=function(ir){var nr=this.gl,dr=ir.glFramebuffers[this.CONTEXT_UID];dr.msaaBuffer&&(nr.bindRenderbuffer(nr.RENDERBUFFER,dr.msaaBuffer),nr.renderbufferStorageMultisample(nr.RENDERBUFFER,dr.multisample,nr.RGBA8,ir.width,ir.height)),dr.stencil&&(nr.bindRenderbuffer(nr.RENDERBUFFER,dr.stencil),dr.msaaBuffer?nr.renderbufferStorageMultisample(nr.RENDERBUFFER,dr.multisample,nr.DEPTH24_STENCIL8,ir.width,ir.height):nr.renderbufferStorage(nr.RENDERBUFFER,nr.DEPTH_STENCIL,ir.width,ir.height));var Pr=ir.colorTextures,Hr=Pr.length;nr.drawBuffers||(Hr=Math.min(Hr,1));for(var bn=0;bn<Hr;bn++){var Pn=Pr[bn],Wn=Pn.parentTextureArray||Pn;this.renderer.texture.bind(Wn,0)}ir.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(ir.depthTexture,0)},Cr.prototype.updateFramebuffer=function(ir,nr){var dr=this.gl,Pr=ir.glFramebuffers[this.CONTEXT_UID],Hr=ir.colorTextures,bn=Hr.length;dr.drawBuffers||(bn=Math.min(bn,1)),Pr.multisample>1&&this.canMultisampleFramebuffer(ir)?(Pr.msaaBuffer=Pr.msaaBuffer||dr.createRenderbuffer(),dr.bindRenderbuffer(dr.RENDERBUFFER,Pr.msaaBuffer),dr.renderbufferStorageMultisample(dr.RENDERBUFFER,Pr.multisample,dr.RGBA8,ir.width,ir.height),dr.framebufferRenderbuffer(dr.FRAMEBUFFER,dr.COLOR_ATTACHMENT0,dr.RENDERBUFFER,Pr.msaaBuffer)):Pr.msaaBuffer&&(dr.deleteRenderbuffer(Pr.msaaBuffer),Pr.msaaBuffer=null,Pr.blitFramebuffer&&(Pr.blitFramebuffer.dispose(),Pr.blitFramebuffer=null));for(var Pn=[],Wn=0;Wn<bn;Wn++){var ms=Hr[Wn],Es=ms.parentTextureArray||ms;this.renderer.texture.bind(Es,0),Wn===0&&Pr.msaaBuffer||(dr.framebufferTexture2D(dr.FRAMEBUFFER,dr.COLOR_ATTACHMENT0+Wn,ms.target,Es._glTextures[this.CONTEXT_UID].texture,nr),Pn.push(dr.COLOR_ATTACHMENT0+Wn))}if(Pn.length>1&&dr.drawBuffers(Pn),ir.depthTexture&&this.writeDepthTexture){var ao=ir.depthTexture;this.renderer.texture.bind(ao,0),dr.framebufferTexture2D(dr.FRAMEBUFFER,dr.DEPTH_ATTACHMENT,dr.TEXTURE_2D,ao._glTextures[this.CONTEXT_UID].texture,nr)}!ir.stencil&&!ir.depth||ir.depthTexture&&this.writeDepthTexture?Pr.stencil&&(dr.deleteRenderbuffer(Pr.stencil),Pr.stencil=null):(Pr.stencil=Pr.stencil||dr.createRenderbuffer(),dr.bindRenderbuffer(dr.RENDERBUFFER,Pr.stencil),Pr.msaaBuffer?dr.renderbufferStorageMultisample(dr.RENDERBUFFER,Pr.multisample,dr.DEPTH24_STENCIL8,ir.width,ir.height):dr.renderbufferStorage(dr.RENDERBUFFER,dr.DEPTH_STENCIL,ir.width,ir.height),dr.framebufferRenderbuffer(dr.FRAMEBUFFER,dr.DEPTH_STENCIL_ATTACHMENT,dr.RENDERBUFFER,Pr.stencil))},Cr.prototype.canMultisampleFramebuffer=function(ir){return this.renderer.context.webGLVersion!==1&&ir.colorTextures.length<=1&&!ir.depthTexture},Cr.prototype.detectSamples=function(ir){var nr=this.msaaSamples,dr=st.l.NONE;if(ir<=1||nr===null)return dr;for(var Pr=0;Pr<nr.length;Pr++)if(nr[Pr]<=ir){dr=nr[Pr];break}return dr===1&&(dr=st.l.NONE),dr},Cr.prototype.blit=function(ir,nr,dr){var Pr=this.current,Hr=this.renderer,bn=this.gl,Pn=this.CONTEXT_UID;if(Hr.context.webGLVersion===2&&Pr){var Wn=Pr.glFramebuffers[Pn];if(Wn){if(!ir){if(!Wn.msaaBuffer)return;var ms=Pr.colorTextures[0];if(!ms)return;Wn.blitFramebuffer||(Wn.blitFramebuffer=new Lu(Pr.width,Pr.height),Wn.blitFramebuffer.addColorTexture(0,ms)),(ir=Wn.blitFramebuffer).colorTextures[0]!==ms&&(ir.colorTextures[0]=ms,ir.dirtyId++,ir.dirtyFormat++),ir.width===Pr.width&&ir.height===Pr.height||(ir.width=Pr.width,ir.height=Pr.height,ir.dirtyId++,ir.dirtySize++)}nr||((nr=Op).width=Pr.width,nr.height=Pr.height),dr||(dr=nr);var Es=nr.width===dr.width&&nr.height===dr.height;this.bind(ir),bn.bindFramebuffer(bn.READ_FRAMEBUFFER,Wn.framebuffer),bn.blitFramebuffer(nr.left,nr.top,nr.right,nr.bottom,dr.left,dr.top,dr.right,dr.bottom,bn.COLOR_BUFFER_BIT,Es?bn.NEAREST:bn.LINEAR)}}},Cr.prototype.disposeFramebuffer=function(ir,nr){var dr=ir.glFramebuffers[this.CONTEXT_UID],Pr=this.gl;if(dr){delete ir.glFramebuffers[this.CONTEXT_UID];var Hr=this.managedFramebuffers.indexOf(ir);Hr>=0&&this.managedFramebuffers.splice(Hr,1),ir.disposeRunner.remove(this),nr||(Pr.deleteFramebuffer(dr.framebuffer),dr.msaaBuffer&&Pr.deleteRenderbuffer(dr.msaaBuffer),dr.stencil&&Pr.deleteRenderbuffer(dr.stencil)),dr.blitFramebuffer&&dr.blitFramebuffer.dispose()}},Cr.prototype.disposeAll=function(ir){var nr=this.managedFramebuffers;this.managedFramebuffers=[];for(var dr=0;dr<nr.length;dr++)this.disposeFramebuffer(nr[dr],ir)},Cr.prototype.forceStencil=function(){var ir=this.current;if(ir){var nr=ir.glFramebuffers[this.CONTEXT_UID];if(nr&&!nr.stencil){ir.stencil=!0;var dr=ir.width,Pr=ir.height,Hr=this.gl,bn=Hr.createRenderbuffer();Hr.bindRenderbuffer(Hr.RENDERBUFFER,bn),nr.msaaBuffer?Hr.renderbufferStorageMultisample(Hr.RENDERBUFFER,nr.multisample,Hr.DEPTH24_STENCIL8,dr,Pr):Hr.renderbufferStorage(Hr.RENDERBUFFER,Hr.DEPTH_STENCIL,dr,Pr),nr.stencil=bn,Hr.framebufferRenderbuffer(Hr.FRAMEBUFFER,Hr.DEPTH_STENCIL_ATTACHMENT,Hr.RENDERBUFFER,bn)}}},Cr.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new Zn},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),wl={5126:4,5123:2,5121:1},um=(function(){function Cr(ir){this.renderer=ir,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return Cr.prototype.contextChange=function(){this.disposeAll(!0);var ir=this.gl=this.renderer.gl,nr=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,nr.webGLVersion!==2){var dr=this.renderer.context.extensions.vertexArrayObject;nt.b.PREFER_ENV===st.g.WEBGL_LEGACY&&(dr=null),dr?(ir.createVertexArray=function(){return dr.createVertexArrayOES()},ir.bindVertexArray=function(Hr){return dr.bindVertexArrayOES(Hr)},ir.deleteVertexArray=function(Hr){return dr.deleteVertexArrayOES(Hr)}):(this.hasVao=!1,ir.createVertexArray=function(){return null},ir.bindVertexArray=function(){return null},ir.deleteVertexArray=function(){return null})}if(nr.webGLVersion!==2){var Pr=ir.getExtension("ANGLE_instanced_arrays");Pr?(ir.vertexAttribDivisor=function(Hr,bn){return Pr.vertexAttribDivisorANGLE(Hr,bn)},ir.drawElementsInstanced=function(Hr,bn,Pn,Wn,ms){return Pr.drawElementsInstancedANGLE(Hr,bn,Pn,Wn,ms)},ir.drawArraysInstanced=function(Hr,bn,Pn,Wn){return Pr.drawArraysInstancedANGLE(Hr,bn,Pn,Wn)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=nr.webGLVersion===2||!!nr.extensions.uint32ElementIndex},Cr.prototype.bind=function(ir,nr){nr=nr||this.renderer.shader.shader;var dr=this.gl,Pr=ir.glVertexArrayObjects[this.CONTEXT_UID],Hr=!1;Pr||(this.managedGeometries[ir.id]=ir,ir.disposeRunner.add(this),ir.glVertexArrayObjects[this.CONTEXT_UID]=Pr={},Hr=!0);var bn=Pr[nr.program.id]||this.initGeometryVao(ir,nr,Hr);this._activeGeometry=ir,this._activeVao!==bn&&(this._activeVao=bn,this.hasVao?dr.bindVertexArray(bn):this.activateVao(ir,nr.program)),this.updateBuffers()},Cr.prototype.reset=function(){this.unbind()},Cr.prototype.updateBuffers=function(){for(var ir=this._activeGeometry,nr=this.renderer.buffer,dr=0;dr<ir.buffers.length;dr++){var Pr=ir.buffers[dr];nr.update(Pr)}},Cr.prototype.checkCompatibility=function(ir,nr){var dr=ir.attributes,Pr=nr.attributeData;for(var Hr in Pr)if(!dr[Hr])throw new Error('shader and geometry incompatible, geometry missing the "'+Hr+'" attribute')},Cr.prototype.getSignature=function(ir,nr){var dr=ir.attributes,Pr=nr.attributeData,Hr=["g",ir.id];for(var bn in dr)Pr[bn]&&Hr.push(bn,Pr[bn].location);return Hr.join("-")},Cr.prototype.initGeometryVao=function(ir,nr,dr){dr===void 0&&(dr=!0);var Pr=this.gl,Hr=this.CONTEXT_UID,bn=this.renderer.buffer,Pn=nr.program;Pn.glPrograms[Hr]||this.renderer.shader.generateProgram(nr),this.checkCompatibility(ir,Pn);var Wn=this.getSignature(ir,Pn),ms=ir.glVertexArrayObjects[this.CONTEXT_UID],Es=ms[Wn];if(Es)return ms[Pn.id]=Es,Es;var ao=ir.buffers,Js=ir.attributes,po={},So={};for(var $o in ao)po[$o]=0,So[$o]=0;for(var $o in Js)!Js[$o].size&&Pn.attributeData[$o]?Js[$o].size=Pn.attributeData[$o].size:Js[$o].size||console.warn("PIXI Geometry attribute '"+$o+"' size cannot be determined (likely the bound shader does not have the attribute)"),po[Js[$o].buffer]+=Js[$o].size*wl[Js[$o].type];for(var $o in Js){var Zo=Js[$o],au=Zo.size;Zo.stride===void 0&&(po[Zo.buffer]===au*wl[Zo.type]?Zo.stride=0:Zo.stride=po[Zo.buffer]),Zo.start===void 0&&(Zo.start=So[Zo.buffer],So[Zo.buffer]+=au*wl[Zo.type])}Es=Pr.createVertexArray(),Pr.bindVertexArray(Es);for(var ou=0;ou<ao.length;ou++){var Yo=ao[ou];bn.bind(Yo),dr&&Yo._glBuffers[Hr].refCount++}return this.activateVao(ir,Pn),this._activeVao=Es,ms[Pn.id]=Es,ms[Wn]=Es,Es},Cr.prototype.disposeGeometry=function(ir,nr){var dr;if(this.managedGeometries[ir.id]){delete this.managedGeometries[ir.id];var Pr=ir.glVertexArrayObjects[this.CONTEXT_UID],Hr=this.gl,bn=ir.buffers,Pn=(dr=this.renderer)===null||dr===void 0?void 0:dr.buffer;if(ir.disposeRunner.remove(this),Pr){if(Pn)for(var Wn=0;Wn<bn.length;Wn++){var ms=bn[Wn]._glBuffers[this.CONTEXT_UID];ms&&(ms.refCount--,ms.refCount!==0||nr||Pn.dispose(bn[Wn],nr))}if(!nr){for(var Es in Pr)if(Es[0]==="g"){var ao=Pr[Es];this._activeVao===ao&&this.unbind(),Hr.deleteVertexArray(ao)}}delete ir.glVertexArrayObjects[this.CONTEXT_UID]}}},Cr.prototype.disposeAll=function(ir){for(var nr=Object.keys(this.managedGeometries),dr=0;dr<nr.length;dr++)this.disposeGeometry(this.managedGeometries[nr[dr]],ir)},Cr.prototype.activateVao=function(ir,nr){var dr=this.gl,Pr=this.CONTEXT_UID,Hr=this.renderer.buffer,bn=ir.buffers,Pn=ir.attributes;ir.indexBuffer&&Hr.bind(ir.indexBuffer);var Wn=null;for(var ms in Pn){var Es=Pn[ms],ao=bn[Es.buffer],Js=ao._glBuffers[Pr];if(nr.attributeData[ms]){Wn!==Js&&(Hr.bind(ao),Wn=Js);var po=nr.attributeData[ms].location;if(dr.enableVertexAttribArray(po),dr.vertexAttribPointer(po,Es.size,Es.type||dr.FLOAT,Es.normalized,Es.stride,Es.start),Es.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");dr.vertexAttribDivisor(po,1)}}}},Cr.prototype.draw=function(ir,nr,dr,Pr){var Hr=this.gl,bn=this._activeGeometry;if(bn.indexBuffer){var Pn=bn.indexBuffer.data.BYTES_PER_ELEMENT,Wn=Pn===2?Hr.UNSIGNED_SHORT:Hr.UNSIGNED_INT;Pn===2||Pn===4&&this.canUseUInt32ElementIndex?bn.instanced?Hr.drawElementsInstanced(ir,nr||bn.indexBuffer.data.length,Wn,(dr||0)*Pn,Pr||1):Hr.drawElements(ir,nr||bn.indexBuffer.data.length,Wn,(dr||0)*Pn):console.warn("unsupported index buffer type: uint32")}else bn.instanced?Hr.drawArraysInstanced(ir,dr,nr||bn.getSize(),Pr||1):Hr.drawArrays(ir,dr,nr||bn.getSize());return this},Cr.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),Im=(function(){function Cr(ir){ir===void 0&&(ir=null),this.type=st.j.NONE,this.autoDetect=!0,this.maskObject=ir||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=nt.b.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(Cr.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(ir){ir?this._filters?this._filters[0]=ir:this._filters=[ir]:this._filters=null},enumerable:!1,configurable:!0}),Cr.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=st.j.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},Cr.prototype.copyCountersOrReset=function(ir){ir?(this._stencilCounter=ir._stencilCounter,this._scissorCounter=ir._scissorCounter,this._scissorRect=ir._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},Cr})();function Il(Cr,ir,nr){var dr=Cr.createShader(ir);return Cr.shaderSource(dr,nr),Cr.compileShader(dr),dr}function sn(Cr,ir){var nr=Cr.getShaderSource(ir).split(`
`).map(function(ms,Es){return Es+": "+ms}),dr=Cr.getShaderInfoLog(ir),Pr=dr.split(`
`),Hr={},bn=Pr.map(function(ms){return parseFloat(ms.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(ms){return!(!ms||Hr[ms])&&(Hr[ms]=!0,!0)}),Pn=[""];bn.forEach(function(ms){nr[ms-1]="%c"+nr[ms-1]+"%c",Pn.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var Wn=nr.join(`
`);Pn[0]=Wn,console.error(dr),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,Pn),console.groupEnd()}function mr(Cr){for(var ir=new Array(Cr),nr=0;nr<ir.length;nr++)ir[nr]=!1;return ir}function fr(Cr,ir){switch(Cr){case"float":return 0;case"vec2":return new Float32Array(2*ir);case"vec3":return new Float32Array(3*ir);case"vec4":return new Float32Array(4*ir);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*ir);case"ivec3":return new Int32Array(3*ir);case"ivec4":return new Int32Array(4*ir);case"uvec2":return new Uint32Array(2*ir);case"uvec3":return new Uint32Array(3*ir);case"uvec4":return new Uint32Array(4*ir);case"bool":return!1;case"bvec2":return mr(2*ir);case"bvec3":return mr(3*ir);case"bvec4":return mr(4*ir);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var yr,jr={},un=jr;function $n(){if(!yr){yr=st.m.MEDIUM;var Cr=(function(){if(un===jr||un&&un.isContextLost()){var nr=document.createElement("canvas"),dr=void 0;nt.b.PREFER_ENV>=st.g.WEBGL2&&(dr=nr.getContext("webgl2",{})),dr||((dr=nr.getContext("webgl",{})||nr.getContext("experimental-webgl",{}))?dr.getExtension("WEBGL_draw_buffers"):dr=null),un=dr}return un})();if(Cr&&Cr.getShaderPrecisionFormat){var ir=Cr.getShaderPrecisionFormat(Cr.FRAGMENT_SHADER,Cr.HIGH_FLOAT);yr=ir.precision?st.m.HIGH:st.m.MEDIUM}}return yr}function Yn(Cr,ir,nr){if(Cr.substring(0,9)!=="precision"){var dr=ir;return ir===st.m.HIGH&&nr!==st.m.HIGH&&(dr=st.m.MEDIUM),"precision "+dr+` float;
`+Cr}return nr!==st.m.HIGH&&Cr.substring(0,15)==="precision highp"?Cr.replace("precision highp","precision mediump"):Cr}var os={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 Vs(Cr){return os[Cr]}var eo=null,qo={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 Po(Cr,ir){if(!eo){var nr=Object.keys(qo);eo={};for(var dr=0;dr<nr.length;++dr){var Pr=nr[dr];eo[Cr[Pr]]=qo[Pr]}}return eo[ir]}var su=[{test:function(Cr){return Cr.type==="float"&&Cr.size===1},code:function(Cr){return`
if(uv["`+Cr+'"] !== ud["'+Cr+`"].value)
{
ud["`+Cr+'"].value = uv["'+Cr+`"]
gl.uniform1f(ud["`+Cr+'"].location, uv["'+Cr+`"])
}
`}},{test:function(Cr){return(Cr.type==="sampler2D"||Cr.type==="samplerCube"||Cr.type==="sampler2DArray")&&Cr.size===1&&!Cr.isArray},code:function(Cr){return`t = syncData.textureCount++;
renderer.texture.bind(uv["`+Cr+`"], t);
if(ud["`+Cr+`"].value !== t)
{
ud["`+Cr+`"].value = t;
gl.uniform1i(ud["`+Cr+`"].location, t);
; // eslint-disable-line max-len
}`}},{test:function(Cr,ir){return Cr.type==="mat3"&&Cr.size===1&&ir.a!==void 0},code:function(Cr){return`
gl.uniformMatrix3fv(ud["`+Cr+'"].location, false, uv["'+Cr+`"].toArray(true));
`},codeUbo:function(Cr){return`
var `+Cr+"_matrix = uv."+Cr+`.toArray(true);
data[offset] = `+Cr+`_matrix[0];
data[offset+1] = `+Cr+`_matrix[1];
data[offset+2] = `+Cr+`_matrix[2];
data[offset + 4] = `+Cr+`_matrix[3];
data[offset + 5] = `+Cr+`_matrix[4];
data[offset + 6] = `+Cr+`_matrix[5];
data[offset + 8] = `+Cr+`_matrix[6];
data[offset + 9] = `+Cr+`_matrix[7];
data[offset + 10] = `+Cr+`_matrix[8];
`}},{test:function(Cr,ir){return Cr.type==="vec2"&&Cr.size===1&&ir.x!==void 0},code:function(Cr){return`
cv = ud["`+Cr+`"].value;
v = uv["`+Cr+`"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["`+Cr+`"].location, v.x, v.y);
}`},codeUbo:function(Cr){return`
v = uv.`+Cr+`;
data[offset] = v.x;
data[offset+1] = v.y;
`}},{test:function(Cr){return Cr.type==="vec2"&&Cr.size===1},code:function(Cr){return`
cv = ud["`+Cr+`"].value;
v = uv["`+Cr+`"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["`+Cr+`"].location, v[0], v[1]);
}
`}},{test:function(Cr,ir){return Cr.type==="vec4"&&Cr.size===1&&ir.width!==void 0},code:function(Cr){return`
cv = ud["`+Cr+`"].value;
v = uv["`+Cr+`"];
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
{
cv[0] = v.x;
cv[1] = v.y;
cv[2] = v.width;
cv[3] = v.height;
gl.uniform4f(ud["`+Cr+`"].location, v.x, v.y, v.width, v.height)
}`},codeUbo:function(Cr){return`
v = uv.`+Cr+`;
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`}},{test:function(Cr){return Cr.type==="vec4"&&Cr.size===1},code:function(Cr){return`
cv = ud["`+Cr+`"].value;
v = uv["`+Cr+`"];
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(ud["`+Cr+`"].location, v[0], v[1], v[2], v[3])
}`}}],mu={float:`
if (cv !== v)
{
cu.value = v;
gl.uniform1f(location, v);
}`,vec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(location, v[0], v[1])
}`,vec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3f(location, v[0], v[1], v[2])
}`,vec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
}`,int:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,ivec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,ivec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,ivec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,uint:`
if (cv !== v)
{
cu.value = v;
gl.uniform1ui(location, v);
}`,uvec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2ui(location, v[0], v[1]);
}`,uvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3ui(location, v[0], v[1], v[2]);
}`,uvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
}`,bool:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,bvec2:`
if (cv[0] != v[0] || cv[1] != v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,bvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,bvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},zu={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"},lu,vl=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function up(Cr){for(var ir="",nr=0;nr<Cr;++nr)nr>0&&(ir+=`
else `),nr<Cr-1&&(ir+="if(test == "+nr+".0){}");return ir}var _c=0,Bl={},rp=(function(){function Cr(ir,nr,dr){dr===void 0&&(dr="pixi-shader"),this.id=_c++,this.vertexSrc=ir||Cr.defaultVertexSrc,this.fragmentSrc=nr||Cr.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(dr=dr.replace(/\s+/g,"-"),Bl[dr]?(Bl[dr]++,dr+="-"+Bl[dr]):Bl[dr]=1,this.vertexSrc="#define SHADER_NAME "+dr+`
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+dr+`
`+this.fragmentSrc,this.vertexSrc=Yn(this.vertexSrc,nt.b.PRECISION_VERTEX,st.m.HIGH),this.fragmentSrc=Yn(this.fragmentSrc,nt.b.PRECISION_FRAGMENT,$n())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(Cr,"defaultVertexSrc",{get:function(){return`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"defaultFragmentSrc",{get:function(){return`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`},enumerable:!1,configurable:!0}),Cr.from=function(ir,nr,dr){var Pr=ir+nr,Hr=xn[Pr];return Hr||(xn[Pr]=Hr=new Cr(ir,nr,dr)),Hr},Cr})(),Kp=(function(){function Cr(ir,nr){this.uniformBindCount=0,this.program=ir,this.uniformGroup=nr?nr instanceof $u?nr:new $u(nr):new $u({})}return Cr.prototype.checkUniformExists=function(ir,nr){if(nr.uniforms[ir])return!0;for(var dr in nr.uniforms){var Pr=nr.uniforms[dr];if(Pr.group&&this.checkUniformExists(ir,Pr))return!0}return!1},Cr.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(Cr.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),Cr.from=function(ir,nr,dr){return new Cr(rp.from(ir,nr),dr)},Cr})(),lp=(function(){function Cr(){this.data=0,this.blendMode=st.b.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(Cr.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(ir){!!(1&this.data)!==ir&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(ir){!!(2&this.data)!==ir&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(ir){!!(4&this.data)!==ir&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(ir){!!(8&this.data)!==ir&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"depthMask",{get:function(){return!!(32&this.data)},set:function(ir){!!(32&this.data)!==ir&&(this.data^=32)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(ir){!!(16&this.data)!==ir&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"blendMode",{get:function(){return this._blendMode},set:function(ir){this.blend=ir!==st.b.NONE,this._blendMode=ir},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(ir){this.offsets=!!ir,this._polygonOffset=ir},enumerable:!1,configurable:!0}),Cr.prototype.toString=function(){return"[@pixi/core:State blendMode="+this.blendMode+" clockwiseFrontFace="+this.clockwiseFrontFace+" culling="+this.culling+" depthMask="+this.depthMask+" polygonOffset="+this.polygonOffset+"]"},Cr.for2d=function(){var ir=new Cr;return ir.depthTest=!1,ir.blend=!0,ir},Cr})(),qp=(function(Cr){function ir(nr,dr,Pr){var Hr=this,bn=rp.from(nr||ir.defaultVertexSrc,dr||ir.defaultFragmentSrc);return(Hr=Cr.call(this,bn,Pr)||this).padding=0,Hr.resolution=nt.b.FILTER_RESOLUTION,Hr.multisample=nt.b.FILTER_MULTISAMPLE,Hr.enabled=!0,Hr.autoFit=!0,Hr.state=new lp,Hr}return In(ir,Cr),ir.prototype.apply=function(nr,dr,Pr,Hr,bn){nr.applyFilter(this,dr,Pr,Hr)},Object.defineProperty(ir.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(nr){this.state.blendMode=nr},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"resolution",{get:function(){return this._resolution},set:function(nr){this._resolution=nr},enumerable:!1,configurable:!0}),Object.defineProperty(ir,"defaultVertexSrc",{get:function(){return`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`},enumerable:!1,configurable:!0}),Object.defineProperty(ir,"defaultFragmentSrc",{get:function(){return`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`},enumerable:!1,configurable:!0}),ir})(Kp),lm=new Dn,dl=(function(){function Cr(ir,nr){this._texture=ir,this.mapCoord=new Dn,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=nr===void 0?.5:nr,this.isSimple=!1}return Object.defineProperty(Cr.prototype,"texture",{get:function(){return this._texture},set:function(ir){this._texture=ir,this._textureID=-1},enumerable:!1,configurable:!0}),Cr.prototype.multiplyUvs=function(ir,nr){nr===void 0&&(nr=ir);for(var dr=this.mapCoord,Pr=0;Pr<ir.length;Pr+=2){var Hr=ir[Pr],bn=ir[Pr+1];nr[Pr]=Hr*dr.a+bn*dr.c+dr.tx,nr[Pr+1]=Hr*dr.b+bn*dr.d+dr.ty}return nr},Cr.prototype.update=function(ir){var nr=this._texture;if(!nr||!nr.valid||!ir&&this._textureID===nr._updateID)return!1;this._textureID=nr._updateID,this._updateID++;var dr=nr._uvs;this.mapCoord.set(dr.x1-dr.x0,dr.y1-dr.y0,dr.x3-dr.x0,dr.y3-dr.y0,dr.x0,dr.y0);var Pr=nr.orig,Hr=nr.trim;Hr&&(lm.set(Pr.width/Hr.width,0,0,Pr.height/Hr.height,-Hr.x/Hr.width,-Hr.y/Hr.height),this.mapCoord.append(lm));var bn=nr.baseTexture,Pn=this.uClampFrame,Wn=this.clampMargin/bn.resolution,ms=this.clampOffset;return Pn[0]=(nr._frame.x+Wn+ms)/bn.width,Pn[1]=(nr._frame.y+Wn+ms)/bn.height,Pn[2]=(nr._frame.x+nr._frame.width-Wn+ms)/bn.width,Pn[3]=(nr._frame.y+nr._frame.height-Wn+ms)/bn.height,this.uClampOffset[0]=ms/bn.realWidth,this.uClampOffset[1]=ms/bn.realHeight,this.isSimple=nr._frame.width===bn.width&&nr._frame.height===bn.height&&nr.rotate===0,!0},Cr})(),el=(function(Cr){function ir(nr,dr,Pr){var Hr=this,bn=null;return typeof nr!="string"&&dr===void 0&&Pr===void 0&&(bn=nr,nr=void 0,dr=void 0,Pr=void 0),(Hr=Cr.call(this,nr||`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;
varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`,dr||`varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform sampler2D mask;
uniform float alpha;
uniform float npmAlpha;
uniform vec4 maskClamp;
void main(void)
{
float clip = step(3.5,
step(maskClamp.x, vMaskCoord.x) +
step(maskClamp.y, vMaskCoord.y) +
step(vMaskCoord.x, maskClamp.z) +
step(vMaskCoord.y, maskClamp.w));
vec4 original = texture2D(uSampler, vTextureCoord);
vec4 masky = texture2D(mask, vMaskCoord);
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
original *= (alphaMul * masky.r * alpha * clip);
gl_FragColor = original;
}
`,Pr)||this).maskSprite=bn,Hr.maskMatrix=new Dn,Hr}return In(ir,Cr),Object.defineProperty(ir.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(nr){this._maskSprite=nr,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),ir.prototype.apply=function(nr,dr,Pr,Hr){var bn=this._maskSprite,Pn=bn._texture;Pn.valid&&(Pn.uvMatrix||(Pn.uvMatrix=new dl(Pn,0)),Pn.uvMatrix.update(),this.uniforms.npmAlpha=Pn.baseTexture.alphaMode?0:1,this.uniforms.mask=Pn,this.uniforms.otherMatrix=nr.calculateSpriteMatrix(this.maskMatrix,bn).prepend(Pn.uvMatrix.mapCoord),this.uniforms.alpha=bn.worldAlpha,this.uniforms.maskClamp=Pn.uvMatrix.uClampFrame,nr.applyFilter(this,dr,Pr,Hr))},ir})(qp),gv=(function(){function Cr(ir){this.renderer=ir,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return Cr.prototype.setMaskStack=function(ir){this.maskStack=ir,this.renderer.scissor.setMaskStack(ir),this.renderer.stencil.setMaskStack(ir)},Cr.prototype.push=function(ir,nr){var dr=nr;if(!dr.isMaskData){var Pr=this.maskDataPool.pop()||new Im;Pr.pooled=!0,Pr.maskObject=nr,dr=Pr}var Hr=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(dr.copyCountersOrReset(Hr),dr.autoDetect&&this.detect(dr),dr._target=ir,dr.type!==st.j.SPRITE&&this.maskStack.push(dr),dr.enabled)switch(dr.type){case st.j.SCISSOR:this.renderer.scissor.push(dr);break;case st.j.STENCIL:this.renderer.stencil.push(dr);break;case st.j.SPRITE:dr.copyCountersOrReset(null),this.pushSpriteMask(dr)}dr.type===st.j.SPRITE&&this.maskStack.push(dr)},Cr.prototype.pop=function(ir){var nr=this.maskStack.pop();if(nr&&nr._target===ir){if(nr.enabled)switch(nr.type){case st.j.SCISSOR:this.renderer.scissor.pop();break;case st.j.STENCIL:this.renderer.stencil.pop(nr.maskObject);break;case st.j.SPRITE:this.popSpriteMask(nr)}if(nr.reset(),nr.pooled&&this.maskDataPool.push(nr),this.maskStack.length!==0){var dr=this.maskStack[this.maskStack.length-1];dr.type===st.j.SPRITE&&dr._filters&&(dr._filters[0].maskSprite=dr.maskObject)}}},Cr.prototype.detect=function(ir){ir.maskObject.isSprite?ir.type=st.j.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(ir)?ir.type=st.j.SCISSOR:ir.type=st.j.STENCIL},Cr.prototype.pushSpriteMask=function(ir){var nr,dr,Pr=ir.maskObject,Hr=ir._target,bn=ir._filters;bn||(bn=this.alphaMaskPool[this.alphaMaskIndex])||(bn=this.alphaMaskPool[this.alphaMaskIndex]=[new el]);var Pn,Wn,ms=this.renderer,Es=ms.renderTexture;if(Es.current){var ao=Es.current;Pn=ir.resolution||ao.resolution,Wn=(nr=ir.multisample)!==null&&nr!==void 0?nr:ao.multisample}else Pn=ir.resolution||ms.resolution,Wn=(dr=ir.multisample)!==null&&dr!==void 0?dr:ms.multisample;bn[0].resolution=Pn,bn[0].multisample=Wn,bn[0].maskSprite=Pr;var Js=Hr.filterArea;Hr.filterArea=Pr.getBounds(!0),ms.filter.push(Hr,bn),Hr.filterArea=Js,ir._filters||this.alphaMaskIndex++},Cr.prototype.popSpriteMask=function(ir){this.renderer.filter.pop(),ir._filters?ir._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),Vm=(function(){function Cr(ir){this.renderer=ir,this.maskStack=[],this.glConst=0}return Cr.prototype.getStackLength=function(){return this.maskStack.length},Cr.prototype.setMaskStack=function(ir){var nr=this.renderer.gl,dr=this.getStackLength();this.maskStack=ir;var Pr=this.getStackLength();Pr!==dr&&(Pr===0?nr.disable(this.glConst):(nr.enable(this.glConst),this._useCurrent()))},Cr.prototype._useCurrent=function(){},Cr.prototype.destroy=function(){this.renderer=null,this.maskStack=null},Cr})(),nl=new Dn,Xo=(function(Cr){function ir(nr){var dr=Cr.call(this,nr)||this;return dr.glConst=WebGLRenderingContext.SCISSOR_TEST,dr}return In(ir,Cr),ir.prototype.getStackLength=function(){var nr=this.maskStack[this.maskStack.length-1];return nr?nr._scissorCounter:0},ir.prototype.calcScissorRect=function(nr){if(!nr._scissorRectLocal){var dr=nr._scissorRect,Pr=nr.maskObject,Hr=this.renderer,bn=Hr.renderTexture;Pr.renderable=!0;var Pn=Pr.getBounds();this.roundFrameToPixels(Pn,bn.current?bn.current.resolution:Hr.resolution,bn.sourceFrame,bn.destinationFrame,Hr.projection.transform),Pr.renderable=!1,dr&&Pn.fit(dr),nr._scissorRectLocal=Pn}},ir.isMatrixRotated=function(nr){if(!nr)return!1;var dr=nr.a,Pr=nr.b,Hr=nr.c,bn=nr.d;return(Math.abs(Pr)>1e-4||Math.abs(Hr)>1e-4)&&(Math.abs(dr)>1e-4||Math.abs(bn)>1e-4)},ir.prototype.testScissor=function(nr){var dr=nr.maskObject;if(!dr.isFastRect||!dr.isFastRect()||ir.isMatrixRotated(dr.worldTransform)||ir.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(nr);var Pr=nr._scissorRectLocal;return Pr.width>0&&Pr.height>0},ir.prototype.roundFrameToPixels=function(nr,dr,Pr,Hr,bn){ir.isMatrixRotated(bn)||((bn=bn?nl.copyFrom(bn):nl.identity()).translate(-Pr.x,-Pr.y).scale(Hr.width/Pr.width,Hr.height/Pr.height).translate(Hr.x,Hr.y),this.renderer.filter.transformAABB(bn,nr),nr.fit(Hr),nr.x=Math.round(nr.x*dr),nr.y=Math.round(nr.y*dr),nr.width=Math.round(nr.width*dr),nr.height=Math.round(nr.height*dr))},ir.prototype.push=function(nr){nr._scissorRectLocal||this.calcScissorRect(nr);var dr=this.renderer.gl;nr._scissorRect||dr.enable(dr.SCISSOR_TEST),nr._scissorCounter++,nr._scissorRect=nr._scissorRectLocal,this._useCurrent()},ir.prototype.pop=function(){var nr=this.renderer.gl;this.getStackLength()>0?this._useCurrent():nr.disable(nr.SCISSOR_TEST)},ir.prototype._useCurrent=function(){var nr,dr=this.maskStack[this.maskStack.length-1]._scissorRect;nr=this.renderer.renderTexture.current?dr.y:this.renderer.height-dr.height-dr.y,this.renderer.gl.scissor(dr.x,nr,dr.width,dr.height)},ir})(Vm),xm=(function(Cr){function ir(nr){var dr=Cr.call(this,nr)||this;return dr.glConst=WebGLRenderingContext.STENCIL_TEST,dr}return In(ir,Cr),ir.prototype.getStackLength=function(){var nr=this.maskStack[this.maskStack.length-1];return nr?nr._stencilCounter:0},ir.prototype.push=function(nr){var dr=nr.maskObject,Pr=this.renderer.gl,Hr=nr._stencilCounter;Hr===0&&(this.renderer.framebuffer.forceStencil(),Pr.clearStencil(0),Pr.clear(Pr.STENCIL_BUFFER_BIT),Pr.enable(Pr.STENCIL_TEST)),nr._stencilCounter++,Pr.colorMask(!1,!1,!1,!1),Pr.stencilFunc(Pr.EQUAL,Hr,4294967295),Pr.stencilOp(Pr.KEEP,Pr.KEEP,Pr.INCR),dr.renderable=!0,dr.render(this.renderer),this.renderer.batch.flush(),dr.renderable=!1,this._useCurrent()},ir.prototype.pop=function(nr){var dr=this.renderer.gl;this.getStackLength()===0?dr.disable(dr.STENCIL_TEST):(dr.colorMask(!1,!1,!1,!1),dr.stencilOp(dr.KEEP,dr.KEEP,dr.DECR),nr.renderable=!0,nr.render(this.renderer),this.renderer.batch.flush(),nr.renderable=!1,this._useCurrent())},ir.prototype._useCurrent=function(){var nr=this.renderer.gl;nr.colorMask(!0,!0,!0,!0),nr.stencilFunc(nr.EQUAL,this.getStackLength(),4294967295),nr.stencilOp(nr.KEEP,nr.KEEP,nr.KEEP)},ir})(Vm),nm=(function(){function Cr(ir){this.renderer=ir,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Dn,this.transform=null}return Cr.prototype.update=function(ir,nr,dr,Pr){this.destinationFrame=ir||this.destinationFrame||this.defaultFrame,this.sourceFrame=nr||this.sourceFrame||ir,this.calculateProjection(this.destinationFrame,this.sourceFrame,dr,Pr),this.transform&&this.projectionMatrix.append(this.transform);var Hr=this.renderer;Hr.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,Hr.globalUniforms.update(),Hr.shader.shader&&Hr.shader.syncUniformGroup(Hr.shader.shader.uniforms.globals)},Cr.prototype.calculateProjection=function(ir,nr,dr,Pr){var Hr=this.projectionMatrix,bn=Pr?-1:1;Hr.identity(),Hr.a=1/nr.width*2,Hr.d=bn*(1/nr.height*2),Hr.tx=-1-nr.x*Hr.a,Hr.ty=-bn-nr.y*Hr.d},Cr.prototype.setTransform=function(ir){},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),vv=new Zn,rv=new Zn,Lp=(function(){function Cr(ir){this.renderer=ir,this.clearColor=ir._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Zn,this.destinationFrame=new Zn,this.viewportFrame=new Zn}return Cr.prototype.bind=function(ir,nr,dr){ir===void 0&&(ir=null);var Pr,Hr,bn,Pn=this.renderer;this.current=ir,ir?(bn=(Pr=ir.baseTexture).resolution,nr||(vv.width=ir.frame.width,vv.height=ir.frame.height,nr=vv),dr||(rv.x=ir.frame.x,rv.y=ir.frame.y,rv.width=nr.width,rv.height=nr.height,dr=rv),Hr=Pr.framebuffer):(bn=Pn.resolution,nr||(vv.width=Pn.screen.width,vv.height=Pn.screen.height,nr=vv),dr||((dr=vv).width=nr.width,dr.height=nr.height));var Wn=this.viewportFrame;Wn.x=dr.x*bn,Wn.y=dr.y*bn,Wn.width=dr.width*bn,Wn.height=dr.height*bn,ir||(Wn.y=Pn.view.height-(Wn.y+Wn.height)),Wn.ceil(),this.renderer.framebuffer.bind(Hr,Wn),this.renderer.projection.update(dr,nr,bn,!Hr),ir?this.renderer.mask.setMaskStack(Pr.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(nr),this.destinationFrame.copyFrom(dr)},Cr.prototype.clear=function(ir,nr){ir=this.current?ir||this.current.baseTexture.clearColor:ir||this.clearColor;var dr=this.destinationFrame,Pr=this.current?this.current.baseTexture:this.renderer.screen,Hr=dr.width!==Pr.width||dr.height!==Pr.height;if(Hr){var bn=this.viewportFrame,Pn=bn.x,Wn=bn.y,ms=bn.width,Es=bn.height;Pn=Math.round(Pn),Wn=Math.round(Wn),ms=Math.round(ms),Es=Math.round(Es),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(Pn,Wn,ms,Es)}this.renderer.framebuffer.clear(ir[0],ir[1],ir[2],ir[3],nr),Hr&&this.renderer.scissor.pop()},Cr.prototype.resize=function(){this.bind(null)},Cr.prototype.reset=function(){this.bind(null)},Cr.prototype.destroy=function(){this.renderer=null},Cr})();function cp(Cr,ir,nr,dr,Pr){nr.buffer.update(Pr)}var nv={float:`
data[offset] = v;
`,vec2:`
data[offset] = v[0];
data[offset+1] = v[1];
`,vec3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
`,vec4:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset+3] = v[3];
`,mat2:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+4] = v[2];
data[offset+5] = v[3];
`,mat3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset + 4] = v[3];
data[offset + 5] = v[4];
data[offset + 6] = v[5];
data[offset + 8] = v[6];
data[offset + 9] = v[7];
data[offset + 10] = v[8];
`,mat4:`
for(var i = 0; i < 16; i++)
{
data[offset + i] = v[i];
}
`},Hm={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:32,mat3:48,mat4:64};function Rv(Cr,ir){if(!Cr.autoManage)return{size:0,syncFunc:cp};for(var nr=(function(ou){for(var Yo=ou.map(function(Vo){return{data:Vo,offset:0,dataLen:0,dirty:0}}),Ru=0,ku=0,Vu=0,sl=0;sl<Yo.length;sl++){var nu=Yo[sl];if(Ru=Hm[nu.data.type],nu.data.size>1&&(Ru=Math.max(Ru,16)*nu.data.size),nu.dataLen=Ru,ku%Ru!=0&&ku<16){var fu=ku%Ru%16;ku+=fu,Vu+=fu}ku+Ru>16?(Vu=16*Math.ceil(Vu/16),nu.offset=Vu,Vu+=Ru,ku=Ru):(nu.offset=Vu,ku+=Ru,Vu+=Ru)}return{uboElements:Yo,size:Vu=16*Math.ceil(Vu/16)}})((function(ou,Yo){var Ru=[];for(var ku in ou)Yo[ku]&&Ru.push(Yo[ku]);return Ru.sort(function(Vu,sl){return Vu.index-sl.index}),Ru})(Cr.uniforms,ir)),dr=nr.uboElements,Pr=nr.size,Hr=[`
var v = null;
var v2 = null;
var cv = null;
var t = 0;
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`],bn=0;bn<dr.length;bn++){for(var Pn=dr[bn],Wn=Cr.uniforms[Pn.data.name],ms=Pn.data.name,Es=!1,ao=0;ao<su.length;ao++){var Js=su[ao];if(Js.codeUbo&&Js.test(Pn.data,Wn)){Hr.push("offset = "+Pn.offset/4+";",su[ao].codeUbo(Pn.data.name,Wn)),Es=!0;break}}if(!Es)if(Pn.data.size>1){var po=Vs(Pn.data.type),So=Math.max(Hm[Pn.data.type]/16,1),$o=po/So,Zo=(4-$o%4)%4;Hr.push(`
cv = ud.`+ms+`.value;
v = uv.`+ms+`;
offset = `+Pn.offset/4+`;
t = 0;
for(var i=0; i < `+Pn.data.size*So+`; i++)
{
for(var j = 0; j < `+$o+`; j++)
{
data[offset++] = v[t++];
}
offset += `+Zo+`;
}
`)}else{var au=nv[Pn.data.type];Hr.push(`
cv = ud.`+ms+`.value;
v = uv.`+ms+`;
offset = `+Pn.offset/4+`;
`+au+`;
`)}}return Hr.push(`
renderer.buffer.update(buffer);
`),{size:Pr,syncFunc:new Function("ud","uv","renderer","syncData","buffer",Hr.join(`
`))}}var mm=(function(){function Cr(ir,nr){this.program=ir,this.uniformData=nr,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return Cr.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},Cr})();function Wm(Cr,ir){var nr=Il(Cr,Cr.VERTEX_SHADER,ir.vertexSrc),dr=Il(Cr,Cr.FRAGMENT_SHADER,ir.fragmentSrc),Pr=Cr.createProgram();if(Cr.attachShader(Pr,nr),Cr.attachShader(Pr,dr),Cr.linkProgram(Pr),Cr.getProgramParameter(Pr,Cr.LINK_STATUS)||(function(ms,Es,ao,Js){ms.getProgramParameter(Es,ms.LINK_STATUS)||(ms.getShaderParameter(ao,ms.COMPILE_STATUS)||sn(ms,ao),ms.getShaderParameter(Js,ms.COMPILE_STATUS)||sn(ms,Js),console.error("PixiJS Error: Could not initialize shader."),ms.getProgramInfoLog(Es)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",ms.getProgramInfoLog(Es)))})(Cr,Pr,nr,dr),ir.attributeData=(function(ms,Es){for(var ao={},Js=Es.getProgramParameter(ms,Es.ACTIVE_ATTRIBUTES),po=0;po<Js;po++){var So=Es.getActiveAttrib(ms,po);if(So.name.indexOf("gl_")!==0){var $o=Po(Es,So.type),Zo={type:$o,name:So.name,size:Vs($o),location:Es.getAttribLocation(ms,So.name)};ao[So.name]=Zo}}return ao})(Pr,Cr),ir.uniformData=(function(ms,Es){for(var ao={},Js=Es.getProgramParameter(ms,Es.ACTIVE_UNIFORMS),po=0;po<Js;po++){var So=Es.getActiveUniform(ms,po),$o=So.name.replace(/\[.*?\]$/,""),Zo=!!So.name.match(/\[.*?\]$/),au=Po(Es,So.type);ao[$o]={name:$o,index:po,type:au,size:So.size,isArray:Zo,value:fr(au,So.size)}}return ao})(Pr,Cr),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(ir.vertexSrc)){var Hr=Object.keys(ir.attributeData);Hr.sort(function(ms,Es){return ms>Es?1:-1});for(var bn=0;bn<Hr.length;bn++)ir.attributeData[Hr[bn]].location=bn,Cr.bindAttribLocation(Pr,bn,Hr[bn]);Cr.linkProgram(Pr)}Cr.deleteShader(nr),Cr.deleteShader(dr);var Pn={};for(var bn in ir.uniformData){var Wn=ir.uniformData[bn];Pn[bn]={location:Cr.getUniformLocation(Pr,bn),value:fr(Wn.type,Wn.size)}}return new mm(Pr,Pn)}var uy=0,Sm={textureCount:0,uboCount:0},wm=(function(){function Cr(ir){this.destroyed=!1,this.renderer=ir,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=uy++}return Cr.prototype.systemCheck=function(){if(!(function(){if(typeof lu=="boolean")return lu;try{var ir=new Function("param1","param2","param3","return param1[param2] === param3;");lu=ir({a:"b"},"a","b")===!0}catch{lu=!1}return lu})())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},Cr.prototype.contextChange=function(ir){this.gl=ir,this.reset()},Cr.prototype.bind=function(ir,nr){ir.uniforms.globals=this.renderer.globalUniforms;var dr=ir.program,Pr=dr.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(ir);return this.shader=ir,this.program!==dr&&(this.program=dr,this.gl.useProgram(Pr.program)),nr||(Sm.textureCount=0,Sm.uboCount=0,this.syncUniformGroup(ir.uniformGroup,Sm)),Pr},Cr.prototype.setUniforms=function(ir){var nr=this.shader.program,dr=nr.glPrograms[this.renderer.CONTEXT_UID];nr.syncUniforms(dr.uniformData,ir,this.renderer)},Cr.prototype.syncUniformGroup=function(ir,nr){var dr=this.getGlProgram();ir.static&&ir.dirtyId===dr.uniformDirtyGroups[ir.id]||(dr.uniformDirtyGroups[ir.id]=ir.dirtyId,this.syncUniforms(ir,dr,nr))},Cr.prototype.syncUniforms=function(ir,nr,dr){(ir.syncUniforms[this.shader.program.id]||this.createSyncGroups(ir))(nr.uniformData,ir.uniforms,this.renderer,dr)},Cr.prototype.createSyncGroups=function(ir){var nr=this.getSignature(ir,this.shader.program.uniformData,"u");return this.cache[nr]||(this.cache[nr]=(function(dr,Pr){var Hr,bn=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(var Pn in dr.uniforms){var Wn=Pr[Pn];if(Wn){for(var ms=dr.uniforms[Pn],Es=!1,ao=0;ao<su.length;ao++)if(su[ao].test(Wn,ms)){bn.push(su[ao].code(Pn,ms)),Es=!0;break}if(!Es){var Js=(Wn.size===1?mu:zu)[Wn.type].replace("location",'ud["'+Pn+'"].location');bn.push(`
cu = ud["`+Pn+`"];
cv = cu.value;
v = uv["`+Pn+`"];
`+Js+";")}}else!((Hr=dr.uniforms[Pn])===null||Hr===void 0)&&Hr.group&&(dr.uniforms[Pn].ubo?bn.push(`
renderer.shader.syncUniformBufferGroup(uv.`+Pn+", '"+Pn+`');
`):bn.push(`
renderer.shader.syncUniformGroup(uv.`+Pn+`, syncData);
`))}return new Function("ud","uv","renderer","syncData",bn.join(`
`))})(ir,this.shader.program.uniformData)),ir.syncUniforms[this.shader.program.id]=this.cache[nr],ir.syncUniforms[this.shader.program.id]},Cr.prototype.syncUniformBufferGroup=function(ir,nr){var dr=this.getGlProgram();if(!ir.static||ir.dirtyId!==0||!dr.uniformGroups[ir.id]){ir.dirtyId=0;var Pr=dr.uniformGroups[ir.id]||this.createSyncBufferGroup(ir,dr,nr);ir.buffer.update(),Pr(dr.uniformData,ir.uniforms,this.renderer,Sm,ir.buffer)}this.renderer.buffer.bindBufferBase(ir.buffer,dr.uniformBufferBindings[nr])},Cr.prototype.createSyncBufferGroup=function(ir,nr,dr){var Pr=this.renderer.gl;this.renderer.buffer.bind(ir.buffer);var Hr=this.gl.getUniformBlockIndex(nr.program,dr);nr.uniformBufferBindings[dr]=this.shader.uniformBindCount,Pr.uniformBlockBinding(nr.program,Hr,this.shader.uniformBindCount),this.shader.uniformBindCount++;var bn=this.getSignature(ir,this.shader.program.uniformData,"ubo"),Pn=this._uboCache[bn];if(Pn||(Pn=this._uboCache[bn]=Rv(ir,this.shader.program.uniformData)),ir.autoManage){var Wn=new Float32Array(Pn.size/4);ir.buffer.update(Wn)}return nr.uniformGroups[ir.id]=Pn.syncFunc,nr.uniformGroups[ir.id]},Cr.prototype.getSignature=function(ir,nr,dr){var Pr=ir.uniforms,Hr=[dr+"-"];for(var bn in Pr)Hr.push(bn),nr[bn]&&Hr.push(nr[bn].type);return Hr.join("-")},Cr.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},Cr.prototype.generateProgram=function(ir){var nr=this.gl,dr=ir.program,Pr=Wm(nr,dr);return dr.glPrograms[this.renderer.CONTEXT_UID]=Pr,Pr},Cr.prototype.reset=function(){this.program=null,this.shader=null},Cr.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},Cr})(),tm=(function(){function Cr(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=st.b.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.map[5]=this.setDepthMask,this.checks=[],this.defaultState=new lp,this.defaultState.blend=!0}return Cr.prototype.contextChange=function(ir){this.gl=ir,this.blendModes=(function(nr,dr){return dr===void 0&&(dr=[]),dr[st.b.NORMAL]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.ADD]=[nr.ONE,nr.ONE],dr[st.b.MULTIPLY]=[nr.DST_COLOR,nr.ONE_MINUS_SRC_ALPHA,nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.SCREEN]=[nr.ONE,nr.ONE_MINUS_SRC_COLOR,nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.OVERLAY]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.DARKEN]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.LIGHTEN]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.COLOR_DODGE]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.COLOR_BURN]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.HARD_LIGHT]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.SOFT_LIGHT]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.DIFFERENCE]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.EXCLUSION]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.HUE]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.SATURATION]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.COLOR]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.LUMINOSITY]=[nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.NONE]=[0,0],dr[st.b.NORMAL_NPM]=[nr.SRC_ALPHA,nr.ONE_MINUS_SRC_ALPHA,nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.ADD_NPM]=[nr.SRC_ALPHA,nr.ONE,nr.ONE,nr.ONE],dr[st.b.SCREEN_NPM]=[nr.SRC_ALPHA,nr.ONE_MINUS_SRC_COLOR,nr.ONE,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.SRC_IN]=[nr.DST_ALPHA,nr.ZERO],dr[st.b.SRC_OUT]=[nr.ONE_MINUS_DST_ALPHA,nr.ZERO],dr[st.b.SRC_ATOP]=[nr.DST_ALPHA,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.DST_OVER]=[nr.ONE_MINUS_DST_ALPHA,nr.ONE],dr[st.b.DST_IN]=[nr.ZERO,nr.SRC_ALPHA],dr[st.b.DST_OUT]=[nr.ZERO,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.DST_ATOP]=[nr.ONE_MINUS_DST_ALPHA,nr.SRC_ALPHA],dr[st.b.XOR]=[nr.ONE_MINUS_DST_ALPHA,nr.ONE_MINUS_SRC_ALPHA],dr[st.b.SUBTRACT]=[nr.ONE,nr.ONE,nr.ONE,nr.ONE,nr.FUNC_REVERSE_SUBTRACT,nr.FUNC_ADD],dr})(ir),this.set(this.defaultState),this.reset()},Cr.prototype.set=function(ir){if(ir=ir||this.defaultState,this.stateId!==ir.data){for(var nr=this.stateId^ir.data,dr=0;nr;)1&nr&&this.map[dr].call(this,!!(ir.data&1<<dr)),nr>>=1,dr++;this.stateId=ir.data}for(dr=0;dr<this.checks.length;dr++)this.checks[dr](this,ir)},Cr.prototype.forceState=function(ir){ir=ir||this.defaultState;for(var nr=0;nr<this.map.length;nr++)this.map[nr].call(this,!!(ir.data&1<<nr));for(nr=0;nr<this.checks.length;nr++)this.checks[nr](this,ir);this.stateId=ir.data},Cr.prototype.setBlend=function(ir){this.updateCheck(Cr.checkBlendMode,ir),this.gl[ir?"enable":"disable"](this.gl.BLEND)},Cr.prototype.setOffset=function(ir){this.updateCheck(Cr.checkPolygonOffset,ir),this.gl[ir?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},Cr.prototype.setDepthTest=function(ir){this.gl[ir?"enable":"disable"](this.gl.DEPTH_TEST)},Cr.prototype.setDepthMask=function(ir){this.gl.depthMask(ir)},Cr.prototype.setCullFace=function(ir){this.gl[ir?"enable":"disable"](this.gl.CULL_FACE)},Cr.prototype.setFrontFace=function(ir){this.gl.frontFace(this.gl[ir?"CW":"CCW"])},Cr.prototype.setBlendMode=function(ir){if(ir!==this.blendMode){this.blendMode=ir;var nr=this.blendModes[ir],dr=this.gl;nr.length===2?dr.blendFunc(nr[0],nr[1]):dr.blendFuncSeparate(nr[0],nr[1],nr[2],nr[3]),nr.length===6?(this._blendEq=!0,dr.blendEquationSeparate(nr[4],nr[5])):this._blendEq&&(this._blendEq=!1,dr.blendEquationSeparate(dr.FUNC_ADD,dr.FUNC_ADD))}},Cr.prototype.setPolygonOffset=function(ir,nr){this.gl.polygonOffset(ir,nr)},Cr.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},Cr.prototype.updateCheck=function(ir,nr){var dr=this.checks.indexOf(ir);nr&&dr===-1?this.checks.push(ir):nr||dr===-1||this.checks.splice(dr,1)},Cr.checkBlendMode=function(ir,nr){ir.setBlendMode(nr.blendMode)},Cr.checkPolygonOffset=function(ir,nr){ir.setPolygonOffset(1,nr.polygonOffset)},Cr.prototype.destroy=function(){this.gl=null},Cr})(),iv=(function(){function Cr(ir){this.renderer=ir,this.count=0,this.checkCount=0,this.maxIdle=nt.b.GC_MAX_IDLE,this.checkCountMax=nt.b.GC_MAX_CHECK_COUNT,this.mode=nt.b.GC_MODE}return Cr.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==st.i.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},Cr.prototype.run=function(){for(var ir=this.renderer.texture,nr=ir.managedTextures,dr=!1,Pr=0;Pr<nr.length;Pr++){var Hr=nr[Pr];!Hr.framebuffer&&this.count-Hr.touched>this.maxIdle&&(ir.destroyTexture(Hr,!0),nr[Pr]=null,dr=!0)}if(dr){var bn=0;for(Pr=0;Pr<nr.length;Pr++)nr[Pr]!==null&&(nr[bn++]=nr[Pr]);nr.length=bn}},Cr.prototype.unload=function(ir){var nr=this.renderer.texture,dr=ir._texture;dr&&!dr.framebuffer&&nr.destroyTexture(dr);for(var Pr=ir.children.length-1;Pr>=0;Pr--)this.unload(ir.children[Pr])},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),_d=function(Cr){this.texture=Cr,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=st.r.UNSIGNED_BYTE,this.internalFormat=st.h.RGBA,this.samplerType=0},Xm=(function(){function Cr(ir){this.renderer=ir,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new es,this.hasIntegerTextures=!1}return Cr.prototype.contextChange=function(){var ir=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=(function(Hr){var bn,Pn,Wn,ms,Es,ao,Js,po,So,$o,Zo,au,ou,Yo,Ru,ku,Vu,sl,nu,fu,Vo,ll,zl;return"WebGL2RenderingContext"in globalThis&&Hr instanceof globalThis.WebGL2RenderingContext?((bn={})[st.r.UNSIGNED_BYTE]=((Pn={})[st.h.RGBA]=Hr.RGBA8,Pn[st.h.RGB]=Hr.RGB8,Pn[st.h.RG]=Hr.RG8,Pn[st.h.RED]=Hr.R8,Pn[st.h.RGBA_INTEGER]=Hr.RGBA8UI,Pn[st.h.RGB_INTEGER]=Hr.RGB8UI,Pn[st.h.RG_INTEGER]=Hr.RG8UI,Pn[st.h.RED_INTEGER]=Hr.R8UI,Pn[st.h.ALPHA]=Hr.ALPHA,Pn[st.h.LUMINANCE]=Hr.LUMINANCE,Pn[st.h.LUMINANCE_ALPHA]=Hr.LUMINANCE_ALPHA,Pn),bn[st.r.BYTE]=((Wn={})[st.h.RGBA]=Hr.RGBA8_SNORM,Wn[st.h.RGB]=Hr.RGB8_SNORM,Wn[st.h.RG]=Hr.RG8_SNORM,Wn[st.h.RED]=Hr.R8_SNORM,Wn[st.h.RGBA_INTEGER]=Hr.RGBA8I,Wn[st.h.RGB_INTEGER]=Hr.RGB8I,Wn[st.h.RG_INTEGER]=Hr.RG8I,Wn[st.h.RED_INTEGER]=Hr.R8I,Wn),bn[st.r.UNSIGNED_SHORT]=((ms={})[st.h.RGBA_INTEGER]=Hr.RGBA16UI,ms[st.h.RGB_INTEGER]=Hr.RGB16UI,ms[st.h.RG_INTEGER]=Hr.RG16UI,ms[st.h.RED_INTEGER]=Hr.R16UI,ms[st.h.DEPTH_COMPONENT]=Hr.DEPTH_COMPONENT16,ms),bn[st.r.SHORT]=((Es={})[st.h.RGBA_INTEGER]=Hr.RGBA16I,Es[st.h.RGB_INTEGER]=Hr.RGB16I,Es[st.h.RG_INTEGER]=Hr.RG16I,Es[st.h.RED_INTEGER]=Hr.R16I,Es),bn[st.r.UNSIGNED_INT]=((ao={})[st.h.RGBA_INTEGER]=Hr.RGBA32UI,ao[st.h.RGB_INTEGER]=Hr.RGB32UI,ao[st.h.RG_INTEGER]=Hr.RG32UI,ao[st.h.RED_INTEGER]=Hr.R32UI,ao[st.h.DEPTH_COMPONENT]=Hr.DEPTH_COMPONENT24,ao),bn[st.r.INT]=((Js={})[st.h.RGBA_INTEGER]=Hr.RGBA32I,Js[st.h.RGB_INTEGER]=Hr.RGB32I,Js[st.h.RG_INTEGER]=Hr.RG32I,Js[st.h.RED_INTEGER]=Hr.R32I,Js),bn[st.r.FLOAT]=((po={})[st.h.RGBA]=Hr.RGBA32F,po[st.h.RGB]=Hr.RGB32F,po[st.h.RG]=Hr.RG32F,po[st.h.RED]=Hr.R32F,po[st.h.DEPTH_COMPONENT]=Hr.DEPTH_COMPONENT32F,po),bn[st.r.HALF_FLOAT]=((So={})[st.h.RGBA]=Hr.RGBA16F,So[st.h.RGB]=Hr.RGB16F,So[st.h.RG]=Hr.RG16F,So[st.h.RED]=Hr.R16F,So),bn[st.r.UNSIGNED_SHORT_5_6_5]=(($o={})[st.h.RGB]=Hr.RGB565,$o),bn[st.r.UNSIGNED_SHORT_4_4_4_4]=((Zo={})[st.h.RGBA]=Hr.RGBA4,Zo),bn[st.r.UNSIGNED_SHORT_5_5_5_1]=((au={})[st.h.RGBA]=Hr.RGB5_A1,au),bn[st.r.UNSIGNED_INT_2_10_10_10_REV]=((ou={})[st.h.RGBA]=Hr.RGB10_A2,ou[st.h.RGBA_INTEGER]=Hr.RGB10_A2UI,ou),bn[st.r.UNSIGNED_INT_10F_11F_11F_REV]=((Yo={})[st.h.RGB]=Hr.R11F_G11F_B10F,Yo),bn[st.r.UNSIGNED_INT_5_9_9_9_REV]=((Ru={})[st.h.RGB]=Hr.RGB9_E5,Ru),bn[st.r.UNSIGNED_INT_24_8]=((ku={})[st.h.DEPTH_STENCIL]=Hr.DEPTH24_STENCIL8,ku),bn[st.r.FLOAT_32_UNSIGNED_INT_24_8_REV]=((Vu={})[st.h.DEPTH_STENCIL]=Hr.DEPTH32F_STENCIL8,Vu),zl=bn):((sl={})[st.r.UNSIGNED_BYTE]=((nu={})[st.h.RGBA]=Hr.RGBA,nu[st.h.RGB]=Hr.RGB,nu[st.h.ALPHA]=Hr.ALPHA,nu[st.h.LUMINANCE]=Hr.LUMINANCE,nu[st.h.LUMINANCE_ALPHA]=Hr.LUMINANCE_ALPHA,nu),sl[st.r.UNSIGNED_SHORT_5_6_5]=((fu={})[st.h.RGB]=Hr.RGB,fu),sl[st.r.UNSIGNED_SHORT_4_4_4_4]=((Vo={})[st.h.RGBA]=Hr.RGBA,Vo),sl[st.r.UNSIGNED_SHORT_5_5_5_1]=((ll={})[st.h.RGBA]=Hr.RGBA,ll),zl=sl),zl})(ir);var nr=ir.getParameter(ir.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=nr;for(var dr=0;dr<nr;dr++)this.boundTextures[dr]=null;this.emptyTextures={};var Pr=new _d(ir.createTexture());for(ir.bindTexture(ir.TEXTURE_2D,Pr.texture),ir.texImage2D(ir.TEXTURE_2D,0,ir.RGBA,1,1,0,ir.RGBA,ir.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[ir.TEXTURE_2D]=Pr,this.emptyTextures[ir.TEXTURE_CUBE_MAP]=new _d(ir.createTexture()),ir.bindTexture(ir.TEXTURE_CUBE_MAP,this.emptyTextures[ir.TEXTURE_CUBE_MAP].texture),dr=0;dr<6;dr++)ir.texImage2D(ir.TEXTURE_CUBE_MAP_POSITIVE_X+dr,0,ir.RGBA,1,1,0,ir.RGBA,ir.UNSIGNED_BYTE,null);for(ir.texParameteri(ir.TEXTURE_CUBE_MAP,ir.TEXTURE_MAG_FILTER,ir.LINEAR),ir.texParameteri(ir.TEXTURE_CUBE_MAP,ir.TEXTURE_MIN_FILTER,ir.LINEAR),dr=0;dr<this.boundTextures.length;dr++)this.bind(null,dr)},Cr.prototype.bind=function(ir,nr){nr===void 0&&(nr=0);var dr=this.gl;if((ir=ir?.castToBaseTexture())&&ir.valid&&!ir.parentTextureArray){ir.touched=this.renderer.textureGC.count;var Pr=ir._glTextures[this.CONTEXT_UID]||this.initTexture(ir);this.boundTextures[nr]!==ir&&(this.currentLocation!==nr&&(this.currentLocation=nr,dr.activeTexture(dr.TEXTURE0+nr)),dr.bindTexture(ir.target,Pr.texture)),Pr.dirtyId!==ir.dirtyId&&(this.currentLocation!==nr&&(this.currentLocation=nr,dr.activeTexture(dr.TEXTURE0+nr)),this.updateTexture(ir)),this.boundTextures[nr]=ir}else this.currentLocation!==nr&&(this.currentLocation=nr,dr.activeTexture(dr.TEXTURE0+nr)),dr.bindTexture(dr.TEXTURE_2D,this.emptyTextures[dr.TEXTURE_2D].texture),this.boundTextures[nr]=null},Cr.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var ir=0;ir<this.boundTextures.length;ir++)this.boundTextures[ir]=this.unknownTexture},Cr.prototype.unbind=function(ir){var nr=this.gl,dr=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var Pr=0;Pr<dr.length;Pr++)dr[Pr]===this.unknownTexture&&this.bind(null,Pr)}for(Pr=0;Pr<dr.length;Pr++)dr[Pr]===ir&&(this.currentLocation!==Pr&&(nr.activeTexture(nr.TEXTURE0+Pr),this.currentLocation=Pr),nr.bindTexture(ir.target,this.emptyTextures[ir.target].texture),dr[Pr]=null)},Cr.prototype.ensureSamplerType=function(ir){var nr=this.boundTextures,dr=this.hasIntegerTextures,Pr=this.CONTEXT_UID;if(dr)for(var Hr=ir-1;Hr>=0;--Hr){var bn=nr[Hr];bn&&bn._glTextures[Pr].samplerType!==st.o.FLOAT&&this.renderer.texture.unbind(bn)}},Cr.prototype.initTexture=function(ir){var nr=new _d(this.gl.createTexture());return nr.dirtyId=-1,ir._glTextures[this.CONTEXT_UID]=nr,this.managedTextures.push(ir),ir.on("dispose",this.destroyTexture,this),nr},Cr.prototype.initTextureType=function(ir,nr){var dr,Pr;nr.internalFormat=(Pr=(dr=this.internalFormats[ir.type])===null||dr===void 0?void 0:dr[ir.format])!==null&&Pr!==void 0?Pr:ir.format,this.webGLVersion===2&&ir.type===st.r.HALF_FLOAT?nr.type=this.gl.HALF_FLOAT:nr.type=ir.type},Cr.prototype.updateTexture=function(ir){var nr=ir._glTextures[this.CONTEXT_UID];if(nr){var dr=this.renderer;if(this.initTextureType(ir,nr),ir.resource&&ir.resource.upload(dr,ir,nr))nr.samplerType!==st.o.FLOAT&&(this.hasIntegerTextures=!0);else{var Pr=ir.realWidth,Hr=ir.realHeight,bn=dr.gl;(nr.width!==Pr||nr.height!==Hr||nr.dirtyId<0)&&(nr.width=Pr,nr.height=Hr,bn.texImage2D(ir.target,0,nr.internalFormat,Pr,Hr,0,ir.format,nr.type,null))}ir.dirtyStyleId!==nr.dirtyStyleId&&this.updateTextureStyle(ir),nr.dirtyId=ir.dirtyId}},Cr.prototype.destroyTexture=function(ir,nr){var dr=this.gl;if((ir=ir.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(ir),dr.deleteTexture(ir._glTextures[this.CONTEXT_UID].texture),ir.off("dispose",this.destroyTexture,this),delete ir._glTextures[this.CONTEXT_UID],!nr)){var Pr=this.managedTextures.indexOf(ir);Pr!==-1&&(function(Hr,bn,Pn){var Wn,ms=Hr.length;if(!(bn>=ms||Pn===0)){var Es=ms-(Pn=bn+Pn>ms?ms-bn:Pn);for(Wn=bn;Wn<Es;++Wn)Hr[Wn]=Hr[Wn+Pn];Hr.length=Es}})(this.managedTextures,Pr,1)}},Cr.prototype.updateTextureStyle=function(ir){var nr=ir._glTextures[this.CONTEXT_UID];nr&&(ir.mipmap!==st.k.POW2&&this.webGLVersion===2||ir.isPowerOfTwo?nr.mipmap=ir.mipmap>=1:nr.mipmap=!1,this.webGLVersion===2||ir.isPowerOfTwo?nr.wrapMode=ir.wrapMode:nr.wrapMode=st.s.CLAMP,ir.resource&&ir.resource.style(this.renderer,ir,nr)||this.setStyle(ir,nr),nr.dirtyStyleId=ir.dirtyStyleId)},Cr.prototype.setStyle=function(ir,nr){var dr=this.gl;if(nr.mipmap&&ir.mipmap!==st.k.ON_MANUAL&&dr.generateMipmap(ir.target),dr.texParameteri(ir.target,dr.TEXTURE_WRAP_S,nr.wrapMode),dr.texParameteri(ir.target,dr.TEXTURE_WRAP_T,nr.wrapMode),nr.mipmap){dr.texParameteri(ir.target,dr.TEXTURE_MIN_FILTER,ir.scaleMode===st.p.LINEAR?dr.LINEAR_MIPMAP_LINEAR:dr.NEAREST_MIPMAP_NEAREST);var Pr=this.renderer.context.extensions.anisotropicFiltering;if(Pr&&ir.anisotropicLevel>0&&ir.scaleMode===st.p.LINEAR){var Hr=Math.min(ir.anisotropicLevel,dr.getParameter(Pr.MAX_TEXTURE_MAX_ANISOTROPY_EXT));dr.texParameterf(ir.target,Pr.TEXTURE_MAX_ANISOTROPY_EXT,Hr)}}else dr.texParameteri(ir.target,dr.TEXTURE_MIN_FILTER,ir.scaleMode===st.p.LINEAR?dr.LINEAR:dr.NEAREST);dr.texParameteri(ir.target,dr.TEXTURE_MAG_FILTER,ir.scaleMode===st.p.LINEAR?dr.LINEAR:dr.NEAREST)},Cr.prototype.destroy=function(){this.renderer=null},Cr})(),Cl=new Dn,Cy=(function(Cr){function ir(nr,dr){nr===void 0&&(nr=st.n.UNKNOWN);var Pr=Cr.call(this)||this;return dr=Object.assign({},nt.b.RENDER_OPTIONS,dr),Pr.options=dr,Pr.type=nr,Pr.screen=new Zn(0,0,dr.width,dr.height),Pr.view=dr.view||document.createElement("canvas"),Pr.resolution=dr.resolution||nt.b.RESOLUTION,Pr.useContextAlpha=dr.useContextAlpha,Pr.autoDensity=!!dr.autoDensity,Pr.preserveDrawingBuffer=dr.preserveDrawingBuffer,Pr.clearBeforeRender=dr.clearBeforeRender,Pr._backgroundColor=0,Pr._backgroundColorRgba=[0,0,0,1],Pr._backgroundColorString="#000000",Pr.backgroundColor=dr.backgroundColor||Pr._backgroundColor,Pr.backgroundAlpha=dr.backgroundAlpha,dr.transparent!==void 0&&(ln("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),Pr.useContextAlpha=dr.transparent,Pr.backgroundAlpha=dr.transparent?0:1),Pr._lastObjectRendered=null,Pr.plugins={},Pr}return In(ir,Cr),ir.prototype.initPlugins=function(nr){for(var dr in nr)this.plugins[dr]=new nr[dr](this)},Object.defineProperty(ir.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),ir.prototype.resize=function(nr,dr){this.view.width=Math.round(nr*this.resolution),this.view.height=Math.round(dr*this.resolution);var Pr=this.view.width/this.resolution,Hr=this.view.height/this.resolution;this.screen.width=Pr,this.screen.height=Hr,this.autoDensity&&(this.view.style.width=Pr+"px",this.view.style.height=Hr+"px"),this.emit("resize",Pr,Hr)},ir.prototype.generateTexture=function(nr,dr,Pr,Hr){dr===void 0&&(dr={}),typeof dr=="number"&&(ln("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),dr={scaleMode:dr,resolution:Pr,region:Hr});var bn=dr.region,Pn=(function(ms,Es){var ao={};for(var Js in ms)Object.prototype.hasOwnProperty.call(ms,Js)&&Es.indexOf(Js)<0&&(ao[Js]=ms[Js]);if(ms!=null&&typeof Object.getOwnPropertySymbols=="function"){var po=0;for(Js=Object.getOwnPropertySymbols(ms);po<Js.length;po++)Es.indexOf(Js[po])<0&&(ao[Js[po]]=ms[Js[po]])}return ao})(dr,["region"]);(Hr=bn||nr.getLocalBounds(null,!0)).width===0&&(Hr.width=1),Hr.height===0&&(Hr.height=1);var Wn=fn.create(ds({width:Hr.width,height:Hr.height},Pn));return Cl.tx=-Hr.x,Cl.ty=-Hr.y,this.render(nr,{renderTexture:Wn,clear:!1,transform:Cl,skipUpdateTransform:!!nr.parent}),Wn},ir.prototype.destroy=function(nr){for(var dr in this.plugins)this.plugins[dr].destroy(),this.plugins[dr]=null;nr&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=st.n.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(ir.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(nr){var dr;this._backgroundColor=nr,this._backgroundColorString=(dr=nr.toString(16),"#"+(dr="000000".substring(0,6-dr.length)+dr)),(function(Pr,Hr){Hr===void 0&&(Hr=[]),Hr[0]=(Pr>>16&255)/255,Hr[1]=(Pr>>8&255)/255,Hr[2]=(255&Pr)/255})(nr,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(ir.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(nr){this._backgroundColorRgba[3]=nr},enumerable:!1,configurable:!0}),ir})(St),zv=function(Cr){this.buffer=Cr||null,this.updateID=-1,this.byteLength=-1,this.refCount=0},Fp=(function(){function Cr(ir){this.renderer=ir,this.managedBuffers={},this.boundBufferBases={}}return Cr.prototype.destroy=function(){this.renderer=null},Cr.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},Cr.prototype.bind=function(ir){var nr=this.gl,dr=this.CONTEXT_UID,Pr=ir._glBuffers[dr]||this.createGLBuffer(ir);nr.bindBuffer(ir.type,Pr.buffer)},Cr.prototype.bindBufferBase=function(ir,nr){var dr=this.gl,Pr=this.CONTEXT_UID;if(this.boundBufferBases[nr]!==ir){var Hr=ir._glBuffers[Pr]||this.createGLBuffer(ir);this.boundBufferBases[nr]=ir,dr.bindBufferBase(dr.UNIFORM_BUFFER,nr,Hr.buffer)}},Cr.prototype.bindBufferRange=function(ir,nr,dr){var Pr=this.gl,Hr=this.CONTEXT_UID;dr=dr||0;var bn=ir._glBuffers[Hr]||this.createGLBuffer(ir);Pr.bindBufferRange(Pr.UNIFORM_BUFFER,nr||0,bn.buffer,256*dr,256)},Cr.prototype.update=function(ir){var nr=this.gl,dr=this.CONTEXT_UID,Pr=ir._glBuffers[dr];if(ir._updateID!==Pr.updateID)if(Pr.updateID=ir._updateID,nr.bindBuffer(ir.type,Pr.buffer),Pr.byteLength>=ir.data.byteLength)nr.bufferSubData(ir.type,0,ir.data);else{var Hr=ir.static?nr.STATIC_DRAW:nr.DYNAMIC_DRAW;Pr.byteLength=ir.data.byteLength,nr.bufferData(ir.type,ir.data,Hr)}},Cr.prototype.dispose=function(ir,nr){if(this.managedBuffers[ir.id]){delete this.managedBuffers[ir.id];var dr=ir._glBuffers[this.CONTEXT_UID],Pr=this.gl;ir.disposeRunner.remove(this),dr&&(nr||Pr.deleteBuffer(dr.buffer),delete ir._glBuffers[this.CONTEXT_UID])}},Cr.prototype.disposeAll=function(ir){for(var nr=Object.keys(this.managedBuffers),dr=0;dr<nr.length;dr++)this.dispose(this.managedBuffers[nr[dr]],ir)},Cr.prototype.createGLBuffer=function(ir){var nr=this.CONTEXT_UID,dr=this.gl;return ir._glBuffers[nr]=new zv(dr.createBuffer()),this.managedBuffers[ir.id]=ir,ir.disposeRunner.add(this),ir._glBuffers[nr]},Cr})();(function(Cr){function ir(nr){var dr=Cr.call(this,st.n.WEBGL,nr)||this;return nr=dr.options,dr.gl=null,dr.CONTEXT_UID=0,dr.runners={destroy:new Nn("destroy"),contextChange:new Nn("contextChange"),reset:new Nn("reset"),update:new Nn("update"),postrender:new Nn("postrender"),prerender:new Nn("prerender"),resize:new Nn("resize")},dr.runners.contextChange.add(dr),dr.globalUniforms=new $u({projectionMatrix:new Dn},!0),dr.addSystem(gv,"mask").addSystem(Al,"context").addSystem(tm,"state").addSystem(wm,"shader").addSystem(Xm,"texture").addSystem(Fp,"buffer").addSystem(um,"geometry").addSystem(op,"framebuffer").addSystem(Xo,"scissor").addSystem(xm,"stencil").addSystem(nm,"projection").addSystem(iv,"textureGC").addSystem(tl,"filter").addSystem(Lp,"renderTexture").addSystem(Wu,"batch"),dr.initPlugins(ir.__plugins),dr.multisample=void 0,nr.context?dr.context.initFromContext(nr.context):dr.context.initFromOptions({alpha:!!dr.useContextAlpha,antialias:nr.antialias,premultipliedAlpha:dr.useContextAlpha&&dr.useContextAlpha!=="notMultiplied",stencil:!0,preserveDrawingBuffer:nr.preserveDrawingBuffer,powerPreference:dr.options.powerPreference}),dr.renderingToScreen=!0,(function(Pr){var Hr;if(!Nr){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var bn=[`
%c %c %c PixiJS 6.4.2 - ✰ `+Pr+` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥
`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(Hr=globalThis.console).log.apply(Hr,bn)}else globalThis.console&&globalThis.console.log("PixiJS 6.4.2 - "+Pr+" - http://www.pixijs.com/");Nr=!0}})(dr.context.webGLVersion===2?"WebGL 2":"WebGL 1"),dr.resize(dr.options.width,dr.options.height),dr}In(ir,Cr),ir.create=function(nr){if(Mr===void 0&&(Mr=(function(){var dr={stencil:!0,failIfMajorPerformanceCaveat:nt.b.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!globalThis.WebGLRenderingContext)return!1;var Pr=document.createElement("canvas"),Hr=Pr.getContext("webgl",dr)||Pr.getContext("experimental-webgl",dr),bn=!(!Hr||!Hr.getContextAttributes().stencil);if(Hr){var Pn=Hr.getExtension("WEBGL_lose_context");Pn&&Pn.loseContext()}return Hr=null,bn}catch{return!1}})()),Mr)return new ir(nr);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},ir.prototype.contextChange=function(){var nr,dr=this.gl;if(this.context.webGLVersion===1){var Pr=dr.getParameter(dr.FRAMEBUFFER_BINDING);dr.bindFramebuffer(dr.FRAMEBUFFER,null),nr=dr.getParameter(dr.SAMPLES),dr.bindFramebuffer(dr.FRAMEBUFFER,Pr)}else Pr=dr.getParameter(dr.DRAW_FRAMEBUFFER_BINDING),dr.bindFramebuffer(dr.DRAW_FRAMEBUFFER,null),nr=dr.getParameter(dr.SAMPLES),dr.bindFramebuffer(dr.DRAW_FRAMEBUFFER,Pr);nr>=st.l.HIGH?this.multisample=st.l.HIGH:nr>=st.l.MEDIUM?this.multisample=st.l.MEDIUM:nr>=st.l.LOW?this.multisample=st.l.LOW:this.multisample=st.l.NONE},ir.prototype.addSystem=function(nr,dr){var Pr=new nr(this);if(this[dr])throw new Error('Whoops! The name "'+dr+'" is already in use');for(var Hr in this[dr]=Pr,this.runners)this.runners[Hr].add(Pr);return this},ir.prototype.render=function(nr,dr){var Pr,Hr,bn,Pn;if(dr&&(dr instanceof fn?(ln("6.0.0","Renderer#render arguments changed, use options instead."),Pr=dr,Hr=arguments[2],bn=arguments[3],Pn=arguments[4]):(Pr=dr.renderTexture,Hr=dr.clear,bn=dr.transform,Pn=dr.skipUpdateTransform)),this.renderingToScreen=!Pr,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=bn,!this.context.isLost){if(Pr||(this._lastObjectRendered=nr),!Pn){var Wn=nr.enableTempParent();nr.updateTransform(),nr.disableTempParent(Wn)}this.renderTexture.bind(Pr),this.batch.currentRenderer.start(),(Hr!==void 0?Hr:this.clearBeforeRender)&&this.renderTexture.clear(),nr.render(this),this.batch.currentRenderer.flush(),Pr&&Pr.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},ir.prototype.generateTexture=function(nr,dr,Pr,Hr){dr===void 0&&(dr={});var bn=Cr.prototype.generateTexture.call(this,nr,dr,Pr,Hr);return this.framebuffer.blit(),bn},ir.prototype.resize=function(nr,dr){Cr.prototype.resize.call(this,nr,dr),this.runners.resize.emit(this.screen.height,this.screen.width)},ir.prototype.reset=function(){return this.runners.reset.emit(),this},ir.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},ir.prototype.destroy=function(nr){for(var dr in this.runners.destroy.emit(),this.runners)this.runners[dr].destroy();Cr.prototype.destroy.call(this,nr),this.gl=null},Object.defineProperty(ir.prototype,"extract",{get:function(){return ln("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),ir.registerPlugin=function(nr,dr){ir.__plugins=ir.__plugins||{},ir.__plugins[nr]=dr}})(Cy);var Tm=function(){this.texArray=null,this.blend=0,this.type=st.f.TRIANGLES,this.start=0,this.size=0,this.data=null},yv=(function(){function Cr(){this.elements=[],this.ids=[],this.count=0}return Cr.prototype.clear=function(){for(var ir=0;ir<this.count;ir++)this.elements[ir]=null;this.count=0},Cr})(),_l=(function(){function Cr(ir){typeof ir=="number"?this.rawBinaryData=new ArrayBuffer(ir):ir instanceof Uint8Array?this.rawBinaryData=ir.buffer:this.rawBinaryData=ir,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(Cr.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(Cr.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),Cr.prototype.view=function(ir){return this[ir+"View"]},Cr.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},Cr.sizeOf=function(ir){switch(ir){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(ir+" isn't a valid view type")}},Cr})(),Wp=(function(Cr){function ir(nr){var dr=Cr.call(this,nr)||this;return dr.shaderGenerator=null,dr.geometryClass=null,dr.vertexSize=null,dr.state=lp.for2d(),dr.size=4*nt.b.SPRITE_BATCH_SIZE,dr._vertexCount=0,dr._indexCount=0,dr._bufferedElements=[],dr._bufferedTextures=[],dr._bufferSize=0,dr._shader=null,dr._packedGeometries=[],dr._packedGeometryPoolSize=2,dr._flushId=0,dr._aBuffers={},dr._iBuffers={},dr.MAX_TEXTURES=1,dr.renderer.on("prerender",dr.onPrerender,dr),nr.runners.contextChange.add(dr),dr._dcIndex=0,dr._aIndex=0,dr._iIndex=0,dr._attributeBuffer=null,dr._indexBuffer=null,dr._tempBoundTextures=[],dr}return In(ir,Cr),ir.prototype.contextChange=function(){var nr=this.renderer.gl;nt.b.PREFER_ENV===st.g.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(nr.getParameter(nr.MAX_TEXTURE_IMAGE_UNITS),nt.b.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(function(Pr,Hr){if(Pr===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var bn=Hr.createShader(Hr.FRAGMENT_SHADER);;){var Pn=vl.replace(/%forloop%/gi,up(Pr));if(Hr.shaderSource(bn,Pn),Hr.compileShader(bn),Hr.getShaderParameter(bn,Hr.COMPILE_STATUS))break;Pr=Pr/2|0}return Pr})(this.MAX_TEXTURES,nr)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var dr=0;dr<this._packedGeometryPoolSize;dr++)this._packedGeometries[dr]=new this.geometryClass;this.initFlushBuffers()},ir.prototype.initFlushBuffers=function(){for(var nr=ir._drawCallPool,dr=ir._textureArrayPool,Pr=this.size/4,Hr=Math.floor(Pr/this.MAX_TEXTURES)+1;nr.length<Pr;)nr.push(new Tm);for(;dr.length<Hr;)dr.push(new yv);for(var bn=0;bn<this.MAX_TEXTURES;bn++)this._tempBoundTextures[bn]=null},ir.prototype.onPrerender=function(){this._flushId=0},ir.prototype.render=function(nr){nr._texture.valid&&(this._vertexCount+nr.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=nr.vertexData.length/2,this._indexCount+=nr.indices.length,this._bufferedTextures[this._bufferSize]=nr._texture.baseTexture,this._bufferedElements[this._bufferSize++]=nr)},ir.prototype.buildTexturesAndDrawCalls=function(){var nr=this._bufferedTextures,dr=this.MAX_TEXTURES,Pr=ir._textureArrayPool,Hr=this.renderer.batch,bn=this._tempBoundTextures,Pn=this.renderer.textureGC.count,Wn=++es._globalBatch,ms=0,Es=Pr[0],ao=0;Hr.copyBoundTextures(bn,dr);for(var Js=0;Js<this._bufferSize;++Js){var po=nr[Js];nr[Js]=null,po._batchEnabled!==Wn&&(Es.count>=dr&&(Hr.boundArray(Es,bn,Wn,dr),this.buildDrawCalls(Es,ao,Js),ao=Js,Es=Pr[++ms],++Wn),po._batchEnabled=Wn,po.touched=Pn,Es.elements[Es.count++]=po)}for(Es.count>0&&(Hr.boundArray(Es,bn,Wn,dr),this.buildDrawCalls(Es,ao,this._bufferSize),++ms,++Wn),Js=0;Js<bn.length;Js++)bn[Js]=null;es._globalBatch=Wn},ir.prototype.buildDrawCalls=function(nr,dr,Pr){var Hr=this._bufferedElements,bn=this._attributeBuffer,Pn=this._indexBuffer,Wn=this.vertexSize,ms=ir._drawCallPool,Es=this._dcIndex,ao=this._aIndex,Js=this._iIndex,po=ms[Es];po.start=this._iIndex,po.texArray=nr;for(var So=dr;So<Pr;++So){var $o=Hr[So],Zo=$o._texture.baseTexture,au=Yr[Zo.alphaMode?1:0][$o.blendMode];Hr[So]=null,dr<So&&po.blend!==au&&(po.size=Js-po.start,dr=So,(po=ms[++Es]).texArray=nr,po.start=Js),this.packInterleavedGeometry($o,bn,Pn,ao,Js),ao+=$o.vertexData.length/2*Wn,Js+=$o.indices.length,po.blend=au}dr<Pr&&(po.size=Js-po.start,++Es),this._dcIndex=Es,this._aIndex=ao,this._iIndex=Js},ir.prototype.bindAndClearTexArray=function(nr){for(var dr=this.renderer.texture,Pr=0;Pr<nr.count;Pr++)dr.bind(nr.elements[Pr],nr.ids[Pr]),nr.elements[Pr]=null;nr.count=0},ir.prototype.updateGeometry=function(){var nr=this._packedGeometries,dr=this._attributeBuffer,Pr=this._indexBuffer;nt.b.CAN_UPLOAD_SAME_BUFFER?(nr[this._flushId]._buffer.update(dr.rawBinaryData),nr[this._flushId]._indexBuffer.update(Pr),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,nr[this._flushId]=new this.geometryClass),nr[this._flushId]._buffer.update(dr.rawBinaryData),nr[this._flushId]._indexBuffer.update(Pr),this.renderer.geometry.bind(nr[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},ir.prototype.drawBatches=function(){for(var nr=this._dcIndex,dr=this.renderer,Pr=dr.gl,Hr=dr.state,bn=ir._drawCallPool,Pn=null,Wn=0;Wn<nr;Wn++){var ms=bn[Wn],Es=ms.texArray,ao=ms.type,Js=ms.size,po=ms.start,So=ms.blend;Pn!==Es&&(Pn=Es,this.bindAndClearTexArray(Es)),this.state.blendMode=So,Hr.set(this.state),Pr.drawElements(ao,Js,Pr.UNSIGNED_SHORT,2*po)}},ir.prototype.flush=function(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},ir.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),nt.b.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},ir.prototype.stop=function(){this.flush()},ir.prototype.destroy=function(){for(var nr=0;nr<this._packedGeometryPoolSize;nr++)this._packedGeometries[nr]&&this._packedGeometries[nr].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),Cr.prototype.destroy.call(this)},ir.prototype.getAttributeBuffer=function(nr){var dr=Ar(Math.ceil(nr/8)),Pr=hn(dr),Hr=8*dr;this._aBuffers.length<=Pr&&(this._iBuffers.length=Pr+1);var bn=this._aBuffers[Hr];return bn||(this._aBuffers[Hr]=bn=new _l(Hr*this.vertexSize*4)),bn},ir.prototype.getIndexBuffer=function(nr){var dr=Ar(Math.ceil(nr/12)),Pr=hn(dr),Hr=12*dr;this._iBuffers.length<=Pr&&(this._iBuffers.length=Pr+1);var bn=this._iBuffers[Pr];return bn||(this._iBuffers[Pr]=bn=new Uint16Array(Hr)),bn},ir.prototype.packInterleavedGeometry=function(nr,dr,Pr,Hr,bn){for(var Pn=dr.uint32View,Wn=dr.float32View,ms=Hr/this.vertexSize,Es=nr.uvs,ao=nr.indices,Js=nr.vertexData,po=nr._texture.baseTexture._batchLocation,So=Math.min(nr.worldAlpha,1),$o=So<1&&nr._texture.baseTexture.alphaMode?(function(au,ou){if(ou===1)return(255*ou<<24)+au;if(ou===0)return 0;var Yo=au>>16&255,Ru=au>>8&255,ku=255&au;return(255*ou<<24)+((Yo=Yo*ou+.5|0)<<16)+((Ru=Ru*ou+.5|0)<<8)+(ku=ku*ou+.5|0)})(nr._tintRGB,So):nr._tintRGB+(255*So<<24),Zo=0;Zo<Js.length;Zo+=2)Wn[Hr++]=Js[Zo],Wn[Hr++]=Js[Zo+1],Wn[Hr++]=Es[Zo],Wn[Hr++]=Es[Zo+1],Pn[Hr++]=$o,Wn[Hr++]=po;for(Zo=0;Zo<ao.length;Zo++)Pr[bn++]=ms+ao[Zo]},ir._drawCallPool=[],ir._textureArrayPool=[],ir})(rl),Zp=(function(){function Cr(ir,nr){if(this.vertexSrc=ir,this.fragTemplate=nr,this.programCache={},this.defaultGroupCache={},nr.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(nr.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return Cr.prototype.generateShader=function(ir){if(!this.programCache[ir]){for(var nr=new Int32Array(ir),dr=0;dr<ir;dr++)nr[dr]=dr;this.defaultGroupCache[ir]=$u.from({uSamplers:nr},!0);var Pr=this.fragTemplate;Pr=(Pr=Pr.replace(/%count%/gi,""+ir)).replace(/%forloop%/gi,this.generateSampleSrc(ir)),this.programCache[ir]=new rp(this.vertexSrc,Pr)}var Hr={tint:new Float32Array([1,1,1,1]),translationMatrix:new Dn,default:this.defaultGroupCache[ir]};return new Kp(this.programCache[ir],Hr)},Cr.prototype.generateSampleSrc=function(ir){var nr="";nr+=`
`,nr+=`
`;for(var dr=0;dr<ir;dr++)dr>0&&(nr+=`
else `),dr<ir-1&&(nr+="if(vTextureId < "+dr+".5)"),nr+=`
{`,nr+=`
color = texture2D(uSamplers[`+dr+"], vTextureCoord);",nr+=`
}`;return nr+=`
`,nr+=`
`},Cr})(),Xp=(function(Cr){function ir(nr){nr===void 0&&(nr=!1);var dr=Cr.call(this)||this;return dr._buffer=new ga(null,nr,!1),dr._indexBuffer=new ga(null,nr,!0),dr.addAttribute("aVertexPosition",dr._buffer,2,!1,st.r.FLOAT).addAttribute("aTextureCoord",dr._buffer,2,!1,st.r.FLOAT).addAttribute("aColor",dr._buffer,4,!0,st.r.UNSIGNED_BYTE).addAttribute("aTextureId",dr._buffer,1,!0,st.r.FLOAT).addIndex(dr._indexBuffer),dr}return In(ir,Cr),ir})(ls),np=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute float aTextureId;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform vec4 tint;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
void main(void){
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vTextureId = aTextureId;
vColor = aColor * tint;
}
`,Rm=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`;(function(){function Cr(){}return Cr.create=function(ir){var nr=Object.assign({vertex:np,fragment:Rm,geometryClass:Xp,vertexSize:6},ir),dr=nr.vertex,Pr=nr.fragment,Hr=nr.vertexSize,bn=nr.geometryClass;return(function(Pn){function Wn(ms){var Es=Pn.call(this,ms)||this;return Es.shaderGenerator=new Zp(dr,Pr),Es.geometryClass=bn,Es.vertexSize=Hr,Es}return In(Wn,Pn),Wn})(Wp)},Object.defineProperty(Cr,"defaultVertexSrc",{get:function(){return np},enumerable:!1,configurable:!0}),Object.defineProperty(Cr,"defaultFragmentTemplate",{get:function(){return Rm},enumerable:!1,configurable:!0}),Cr})().create();var _0=(function(){function Cr(ir){this.renderer=ir}return Cr.prototype.render=function(ir){var nr=this.renderer,dr=ir.worldTransform;nr.context.globalAlpha=ir.worldAlpha,nr.setBlendMode(ir.blendMode),nr.setContextTransform(dr,ir.roundPixels),ir.drawMode!==st.f.TRIANGLES?this._renderTriangleMesh(ir):this._renderTriangles(ir)},Cr.prototype._renderTriangleMesh=function(ir){for(var nr=ir.geometry.buffers[0].data.length,dr=0;dr<nr-2;dr++){var Pr=2*dr;this._renderDrawTriangle(ir,Pr,Pr+2,Pr+4)}},Cr.prototype._renderTriangles=function(ir){for(var nr=ir.geometry.getIndex().data,dr=nr.length,Pr=0;Pr<dr;Pr+=3){var Hr=2*nr[Pr],bn=2*nr[Pr+1],Pn=2*nr[Pr+2];this._renderDrawTriangle(ir,Hr,bn,Pn)}},Cr.prototype._renderDrawTriangle=function(ir,nr,dr,Pr){var Hr=this.renderer.context,bn=ir.geometry.buffers[0].data,Pn=ir.uvs,Wn=ir.texture;if(Wn.valid){var ms=ir.tint!==16777215,Es=Wn.baseTexture,ao=Es.width,Js=Es.height;ms&&ir._cachedTint!==ir.tint&&(ir._cachedTint=ir.tint,ir._cachedTexture=ir._cachedTexture||new vn(Es),ir._tintedCanvas=dt.b.getTintedCanvas({texture:ir._cachedTexture},ir.tint));var po=ms?ir._tintedCanvas:Es.getDrawableSource(),So=Pn[nr]*Es.width,$o=Pn[dr]*Es.width,Zo=Pn[Pr]*Es.width,au=Pn[nr+1]*Es.height,ou=Pn[dr+1]*Es.height,Yo=Pn[Pr+1]*Es.height,Ru=bn[nr],ku=bn[dr],Vu=bn[Pr],sl=bn[nr+1],nu=bn[dr+1],fu=bn[Pr+1],Vo=ir.canvasPadding/this.renderer.resolution;if(Vo>0){var ll=ir.worldTransform,zl=ll.a,Gl=ll.b,Dl=ll.c,dp=ll.d,Bp=(Ru+ku+Vu)/3,cm=(sl+nu+fu)/3,Rl=Ru-Bp,hl=sl-cm,hp=zl*Rl+Dl*hl,Cp=Gl*Rl+dp*hl,il=Math.sqrt(hp*hp+Cp*Cp),Jp=1+Vo/il;Ru=Bp+Rl*Jp,sl=cm+hl*Jp,hp=zl*(Rl=ku-Bp)+Dl*(hl=nu-cm),Cp=Gl*Rl+dp*hl,ku=Bp+Rl*(Jp=1+Vo/(il=Math.sqrt(hp*hp+Cp*Cp))),nu=cm+hl*Jp,hp=zl*(Rl=Vu-Bp)+Dl*(hl=fu-cm),Cp=Gl*Rl+dp*hl,Vu=Bp+Rl*(Jp=1+Vo/(il=Math.sqrt(hp*hp+Cp*Cp))),fu=cm+hl*Jp}Hr.save(),Hr.beginPath(),Hr.moveTo(Ru,sl),Hr.lineTo(ku,nu),Hr.lineTo(Vu,fu),Hr.closePath(),Hr.clip();var fp=So*ou+au*Zo+$o*Yo-ou*Zo-au*$o-So*Yo,Jy=Ru*ou+au*Vu+ku*Yo-ou*Vu-au*ku-Ru*Yo,ip=So*ku+Ru*Zo+$o*Vu-ku*Zo-Ru*$o-So*Vu,Bs=So*ou*Vu+au*ku*Zo+Ru*$o*Yo-Ru*ou*Zo-au*$o*Vu-So*ku*Yo,Do=sl*ou+au*fu+nu*Yo-ou*fu-au*nu-sl*Yo,fo=So*nu+sl*Zo+$o*fu-nu*Zo-sl*$o-So*fu,bu=So*ou*fu+au*nu*Zo+sl*$o*Yo-sl*ou*Zo-au*$o*fu-So*nu*Yo;Hr.transform(Jy/fp,Do/fp,ip/fp,fo/fp,Bs/fp,bu/fp),Hr.drawImage(po,0,0,ao*Es.resolution,Js*Es.resolution,0,0,ao,Js),Hr.restore(),this.renderer.invalidateBlendMode()}},Cr.prototype.renderMeshFlat=function(ir){var nr=this.renderer.context,dr=ir.geometry.getBuffer("aVertexPosition").data,Pr=dr.length/2;nr.beginPath();for(var Hr=1;Hr<Pr-2;++Hr){var bn=2*Hr,Pn=dr[bn],Wn=dr[bn+1],ms=dr[bn+2],Es=dr[bn+3],ao=dr[bn+4],Js=dr[bn+5];nr.moveTo(Pn,Wn),nr.lineTo(ms,Es),nr.lineTo(ao,Js)}nr.fillStyle="#FF0000",nr.fill(),nr.closePath()},Cr.prototype.destroy=function(){this.renderer=null},Cr})();nt.b.MESH_CANVAS_PADDING=0,ft.c.prototype._renderCanvas=function(Cr,ir){Cr.plugins.mesh.render(ir)},ht.a.prototype._cachedTint=16777215,ht.a.prototype._tintedCanvas=null,ht.a.prototype._canvasUvs=null,ht.a.prototype._renderCanvas=function(Cr){var ir=Cr.context,nr=this.worldTransform,dr=this.tint!==16777215,Pr=this.texture;if(Pr.valid){dr&&this._cachedTint!==this.tint&&(this._cachedTint=this.tint,this._tintedCanvas=dt.b.getTintedCanvas(this,this.tint));var Hr=dr?this._tintedCanvas:Pr.baseTexture.getDrawableSource();this._canvasUvs||(this._canvasUvs=[0,0,0,0,0,0,0,0]);var bn=this.vertices,Pn=this._canvasUvs,Wn=dr?0:Pr.frame.x,ms=dr?0:Pr.frame.y,Es=Wn+Pr.frame.width,ao=ms+Pr.frame.height;Pn[0]=Wn,Pn[1]=Wn+this._leftWidth,Pn[2]=Es-this._rightWidth,Pn[3]=Es,Pn[4]=ms,Pn[5]=ms+this._topHeight,Pn[6]=ao-this._bottomHeight,Pn[7]=ao;for(var Js=0;Js<8;Js++)Pn[Js]*=Pr.baseTexture.resolution;ir.globalAlpha=this.worldAlpha,Cr.setBlendMode(this.blendMode),Cr.setContextTransform(nr,this.roundPixels);for(var po=0;po<3;po++)for(var So=0;So<3;So++){var $o=2*So+8*po,Zo=Math.max(1,Pn[So+1]-Pn[So]),au=Math.max(1,Pn[po+5]-Pn[po+4]),ou=Math.max(1,bn[$o+10]-bn[$o]),Yo=Math.max(1,bn[$o+11]-bn[$o+1]);ir.drawImage(Hr,Pn[So],Pn[po+4],Zo,au,bn[$o],bn[$o+1],ou,Yo)}}};var bv=!1;ft.a.prototype._cachedTint=16777215,ft.a.prototype._tintedCanvas=null,ft.a.prototype._cachedTexture=null,ft.a.prototype._renderCanvas=function(Cr){this.shader.uvMatrix&&(this.shader.uvMatrix.update(),this.calculateUvs()),this.material._renderCanvas?this.material._renderCanvas(Cr,this):bv||(bv=!0,globalThis.console&&console.warn("Mesh with custom shaders are not supported in CanvasRenderer."))},ft.a.prototype._canvasPadding=null,Object.defineProperty(ft.a.prototype,"canvasPadding",{get:function(){return this._canvasPadding!==null?this._canvasPadding:nt.b.MESH_CANVAS_PADDING},set:function(Cr){this._canvasPadding=Cr}}),ht.b.prototype._renderCanvas=function(Cr){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),this.shader.update&&this.shader.update(),this.calculateUvs(),this.material._renderCanvas(Cr,this)},ht.c.prototype._renderCanvas=function(Cr){(this.autoUpdate||this.geometry._width!==this.shader.texture.height)&&(this.geometry._width=this.shader.texture.height,this.geometry.update()),this.shader.update&&this.shader.update(),this.calculateUvs(),this.material._renderCanvas(Cr,this)}}).call(this,tt(17))},function(et,_e,tt){var rt=tt(143),nt=tt(144);function st(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}_e.parse=Pt,_e.resolve=function(It,Ft){return Pt(It,!1,!0).resolve(Ft)},_e.resolveObject=function(It,Ft){return It?Pt(It,!1,!0).resolveObject(Ft):Ft},_e.format=function(It){return nt.isString(It)&&(It=Pt(It)),It instanceof st?It.format():st.prototype.format.call(It)},_e.Url=st;var dt=/^([a-z0-9.+-]+:)/i,ft=/:[0-9]*$/,ht=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,mt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
`," "]),bt=["'"].concat(mt),St=["%","/","?",";","#"].concat(bt),Et=["/","?","#"],Ct=/^[+a-z0-9A-Z_-]{0,63}$/,Rt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Tt={javascript:!0,"javascript:":!0},wt={javascript:!0,"javascript:":!0},At={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nt=tt(145);function Pt(It,Ft,qt){if(It&&nt.isObject(It)&&It instanceof st)return It;var Vt=new st;return Vt.parse(It,Ft,qt),Vt}st.prototype.parse=function(It,Ft,qt){if(!nt.isString(It))throw new TypeError("Parameter 'url' must be a string, not "+typeof It);var Vt=It.indexOf("?"),Kt=Vt!==-1&&Vt<It.indexOf("#")?"?":"#",jt=It.split(Kt);jt[0]=jt[0].replace(/\\/g,"/");var Ut=It=jt.join(Kt);if(Ut=Ut.trim(),!qt&&It.split("#").length===1){var Ot=ht.exec(Ut);if(Ot)return this.path=Ut,this.href=Ut,this.pathname=Ot[1],Ot[2]?(this.search=Ot[2],this.query=Ft?Nt.parse(this.search.substr(1)):this.search.substr(1)):Ft&&(this.search="",this.query={}),this}var Wt=dt.exec(Ut);if(Wt){var Bt=(Wt=Wt[0]).toLowerCase();this.protocol=Bt,Ut=Ut.substr(Wt.length)}if(qt||Wt||Ut.match(/^\/\/[^@\/]+@[^@\/]+/)){var tr=Ut.substr(0,2)==="//";!tr||Wt&&wt[Wt]||(Ut=Ut.substr(2),this.slashes=!0)}if(!wt[Wt]&&(tr||Wt&&!At[Wt])){for(var Jt,ar,pr=-1,cr=0;cr<Et.length;cr++)(gr=Ut.indexOf(Et[cr]))!==-1&&(pr===-1||gr<pr)&&(pr=gr);for((ar=pr===-1?Ut.lastIndexOf("@"):Ut.lastIndexOf("@",pr))!==-1&&(Jt=Ut.slice(0,ar),Ut=Ut.slice(ar+1),this.auth=decodeURIComponent(Jt)),pr=-1,cr=0;cr<St.length;cr++){var gr;(gr=Ut.indexOf(St[cr]))!==-1&&(pr===-1||gr<pr)&&(pr=gr)}pr===-1&&(pr=Ut.length),this.host=Ut.slice(0,pr),Ut=Ut.slice(pr),this.parseHost(),this.hostname=this.hostname||"";var Sr=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Sr)for(var Er=this.hostname.split(/\./),Vr=(cr=0,Er.length);cr<Vr;cr++){var Wr=Er[cr];if(Wr&&!Wr.match(Ct)){for(var Mr="",Nr=0,Yr=Wr.length;Nr<Yr;Nr++)Wr.charCodeAt(Nr)>127?Mr+="x":Mr+=Wr[Nr];if(!Mr.match(Ct)){var Or=Er.slice(0,cr),Ar=Er.slice(cr+1),Qr=Wr.match(Rt);Qr&&(Or.push(Qr[1]),Ar.unshift(Qr[2])),Ar.length&&(Ut="/"+Ar.join(".")+Ut),this.hostname=Or.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Sr||(this.hostname=rt.toASCII(this.hostname));var hn=this.port?":"+this.port:"",Sn=this.hostname||"";this.host=Sn+hn,this.href+=this.host,Sr&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Ut[0]!=="/"&&(Ut="/"+Ut))}if(!Tt[Bt])for(cr=0,Vr=bt.length;cr<Vr;cr++){var Kr=bt[cr];if(Ut.indexOf(Kr)!==-1){var Hn=encodeURIComponent(Kr);Hn===Kr&&(Hn=escape(Kr)),Ut=Ut.split(Kr).join(Hn)}}var ln=Ut.indexOf("#");ln!==-1&&(this.hash=Ut.substr(ln),Ut=Ut.slice(0,ln));var kn=Ut.indexOf("?");if(kn!==-1?(this.search=Ut.substr(kn),this.query=Ut.substr(kn+1),Ft&&(this.query=Nt.parse(this.query)),Ut=Ut.slice(0,kn)):Ft&&(this.search="",this.query={}),Ut&&(this.pathname=Ut),At[Bt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){hn=this.pathname||"";var xn=this.search||"";this.path=hn+xn}return this.href=this.format(),this},st.prototype.format=function(){var It=this.auth||"";It&&(It=(It=encodeURIComponent(It)).replace(/%3A/i,":"),It+="@");var Ft=this.protocol||"",qt=this.pathname||"",Vt=this.hash||"",Kt=!1,jt="";this.host?Kt=It+this.host:this.hostname&&(Kt=It+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Kt+=":"+this.port)),this.query&&nt.isObject(this.query)&&Object.keys(this.query).length&&(jt=Nt.stringify(this.query));var Ut=this.search||jt&&"?"+jt||"";return Ft&&Ft.substr(-1)!==":"&&(Ft+=":"),this.slashes||(!Ft||At[Ft])&&Kt!==!1?(Kt="//"+(Kt||""),qt&&qt.charAt(0)!=="/"&&(qt="/"+qt)):Kt||(Kt=""),Vt&&Vt.charAt(0)!=="#"&&(Vt="#"+Vt),Ut&&Ut.charAt(0)!=="?"&&(Ut="?"+Ut),Ft+Kt+(qt=qt.replace(/[?#]/g,function(Ot){return encodeURIComponent(Ot)}))+(Ut=Ut.replace("#","%23"))+Vt},st.prototype.resolve=function(It){return this.resolveObject(Pt(It,!1,!0)).format()},st.prototype.resolveObject=function(It){if(nt.isString(It)){var Ft=new st;Ft.parse(It,!1,!0),It=Ft}for(var qt=new st,Vt=Object.keys(this),Kt=0;Kt<Vt.length;Kt++){var jt=Vt[Kt];qt[jt]=this[jt]}if(qt.hash=It.hash,It.href==="")return qt.href=qt.format(),qt;if(It.slashes&&!It.protocol){for(var Ut=Object.keys(It),Ot=0;Ot<Ut.length;Ot++){var Wt=Ut[Ot];Wt!=="protocol"&&(qt[Wt]=It[Wt])}return At[qt.protocol]&&qt.hostname&&!qt.pathname&&(qt.path=qt.pathname="/"),qt.href=qt.format(),qt}if(It.protocol&&It.protocol!==qt.protocol){if(!At[It.protocol]){for(var Bt=Object.keys(It),tr=0;tr<Bt.length;tr++){var Jt=Bt[tr];qt[Jt]=It[Jt]}return qt.href=qt.format(),qt}if(qt.protocol=It.protocol,It.host||wt[It.protocol])qt.pathname=It.pathname;else{for(var ar=(It.pathname||"").split("/");ar.length&&!(It.host=ar.shift()););It.host||(It.host=""),It.hostname||(It.hostname=""),ar[0]!==""&&ar.unshift(""),ar.length<2&&ar.unshift(""),qt.pathname=ar.join("/")}if(qt.search=It.search,qt.query=It.query,qt.host=It.host||"",qt.auth=It.auth,qt.hostname=It.hostname||It.host,qt.port=It.port,qt.pathname||qt.search){var pr=qt.pathname||"",cr=qt.search||"";qt.path=pr+cr}return qt.slashes=qt.slashes||It.slashes,qt.href=qt.format(),qt}var gr=qt.pathname&&qt.pathname.charAt(0)==="/",Sr=It.host||It.pathname&&It.pathname.charAt(0)==="/",Er=Sr||gr||qt.host&&It.pathname,Vr=Er,Wr=qt.pathname&&qt.pathname.split("/")||[],Mr=(ar=It.pathname&&It.pathname.split("/")||[],qt.protocol&&!At[qt.protocol]);if(Mr&&(qt.hostname="",qt.port=null,qt.host&&(Wr[0]===""?Wr[0]=qt.host:Wr.unshift(qt.host)),qt.host="",It.protocol&&(It.hostname=null,It.port=null,It.host&&(ar[0]===""?ar[0]=It.host:ar.unshift(It.host)),It.host=null),Er=Er&&(ar[0]===""||Wr[0]==="")),Sr)qt.host=It.host||It.host===""?It.host:qt.host,qt.hostname=It.hostname||It.hostname===""?It.hostname:qt.hostname,qt.search=It.search,qt.query=It.query,Wr=ar;else if(ar.length)Wr||(Wr=[]),Wr.pop(),Wr=Wr.concat(ar),qt.search=It.search,qt.query=It.query;else if(!nt.isNullOrUndefined(It.search))return Mr&&(qt.hostname=qt.host=Wr.shift(),(Qr=!!(qt.host&&qt.host.indexOf("@")>0)&&qt.host.split("@"))&&(qt.auth=Qr.shift(),qt.host=qt.hostname=Qr.shift())),qt.search=It.search,qt.query=It.query,nt.isNull(qt.pathname)&&nt.isNull(qt.search)||(qt.path=(qt.pathname?qt.pathname:"")+(qt.search?qt.search:"")),qt.href=qt.format(),qt;if(!Wr.length)return qt.pathname=null,qt.search?qt.path="/"+qt.search:qt.path=null,qt.href=qt.format(),qt;for(var Nr=Wr.slice(-1)[0],Yr=(qt.host||It.host||Wr.length>1)&&(Nr==="."||Nr==="..")||Nr==="",Or=0,Ar=Wr.length;Ar>=0;Ar--)(Nr=Wr[Ar])==="."?Wr.splice(Ar,1):Nr===".."?(Wr.splice(Ar,1),Or++):Or&&(Wr.splice(Ar,1),Or--);if(!Er&&!Vr)for(;Or--;Or)Wr.unshift("..");!Er||Wr[0]===""||Wr[0]&&Wr[0].charAt(0)==="/"||Wr.unshift(""),Yr&&Wr.join("/").substr(-1)!=="/"&&Wr.push("");var Qr,hn=Wr[0]===""||Wr[0]&&Wr[0].charAt(0)==="/";return Mr&&(qt.hostname=qt.host=hn?"":Wr.length?Wr.shift():"",(Qr=!!(qt.host&&qt.host.indexOf("@")>0)&&qt.host.split("@"))&&(qt.auth=Qr.shift(),qt.host=qt.hostname=Qr.shift())),(Er=Er||qt.host&&Wr.length)&&!hn&&Wr.unshift(""),Wr.length?qt.pathname=Wr.join("/"):(qt.pathname=null,qt.path=null),nt.isNull(qt.pathname)&&nt.isNull(qt.search)||(qt.path=(qt.pathname?qt.pathname:"")+(qt.search?qt.search:"")),qt.auth=It.auth||qt.auth,qt.slashes=qt.slashes||It.slashes,qt.href=qt.format(),qt},st.prototype.parseHost=function(){var It=this.host,Ft=ft.exec(It);Ft&&((Ft=Ft[0])!==":"&&(this.port=Ft.substr(1)),It=It.substr(0,It.length-Ft.length)),It&&(this.hostname=It)}},function(et,_e){et.exports=function(tt,rt){return tt===rt||tt!=tt&&rt!=rt}},function(et,_e,tt){var rt=tt(22)(tt(14),"Map");et.exports=rt},function(et,_e,tt){var rt=tt(187),nt=tt(62),st=Object.prototype.propertyIsEnumerable,dt=Object.getOwnPropertySymbols,ft=dt?function(ht){return ht==null?[]:(ht=Object(ht),rt(dt(ht),function(mt){return st.call(ht,mt)}))}:nt;et.exports=ft},function(et,_e,tt){var rt=tt(63),nt=tt(194),st=tt(67);et.exports=function(dt){return st(dt)?rt(dt):nt(dt)}},function(et,_e,tt){(function(rt){var nt=tt(14),st=tt(191),dt=_e&&!_e.nodeType&&_e,ft=dt&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,ht=ft&&ft.exports===dt?nt.Buffer:void 0,mt=(ht?ht.isBuffer:void 0)||st;rt.exports=mt}).call(this,tt(26)(et))},function(et,_e){et.exports=function(tt){return function(rt){return tt(rt)}}},function(et,_e,tt){(function(rt){var nt=tt(51),st=_e&&!_e.nodeType&&_e,dt=st&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,ft=dt&&dt.exports===st&&nt.process,ht=(function(){try{var mt=dt&&dt.require&&dt.require("util").types;return mt||ft&&ft.binding&&ft.binding("util")}catch{}})();rt.exports=ht}).call(this,tt(26)(et))},function(et,_e){var tt=Object.prototype;et.exports=function(rt){var nt=rt&&rt.constructor;return rt===(typeof nt=="function"&&nt.prototype||tt)}},function(et,_e,tt){var rt=tt(63),nt=tt(210),st=tt(67);et.exports=function(dt){return st(dt)?rt(dt,!0):nt(dt)}},function(et,_e,tt){var rt=tt(58);et.exports=function(nt){var st=new nt.constructor(nt.byteLength);return new rt(st).set(new rt(nt)),st}},function(et,_e){et.exports=`#define PI 3.14159265
uniform float galleryHeight;
varying vec2 vUv;
varying float vPixelY;
void main() {
vUv = uv;
float pixelHeight = (galleryHeight * 1.2) + 8.0;
float pixelY = (pixelHeight * 0.5) - position.y;
vPixelY = pixelY;
vec4 newPosition = vec4(position, 1.0);
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D galleryTexture;
uniform float galleryHeight;
varying vec2 vUv;
varying float vPixelY;
void main() {
vec4 color;
if ((vPixelY >= 0.0) && (vPixelY <= galleryHeight)) {
color = texture2D(galleryTexture, vec2(vUv.x, 1.0 - (vPixelY / galleryHeight)));
}
else if ((vPixelY > galleryHeight) && (vPixelY < (galleryHeight + 8.0))) {
color = vec4(0.0, 0.0, 0.0, 1.0);
}
else {
float alpha = 1.0 - ((vPixelY - (galleryHeight + 8.0)) / (galleryHeight * 0.2));
color = texture2D(galleryTexture, vec2(vUv.x, ((vPixelY - galleryHeight) + 8.0) / galleryHeight));
color.a = alpha;
vec4 shadow = vec4(0.0, 0.0, 0.0, 1.0);
color = blendSrcOver(color, shadow);
}
gl_FragColor = color;
}
`},function(et,_e,tt){var rt=tt(148);et.exports=function(nt,st){st=st||{};var dt=new rt,ft=st.inPlace||!1,ht=nt.map(function(bt){return ft?bt:{width:bt.width,height:bt.height,item:bt}});ht=ht.sort(function(bt,St){return St.width*St.height-bt.width*bt.height}),dt.fit(ht);var mt={width:ht.reduce(function(bt,St){return Math.max(bt,St.x+St.width)},0),height:ht.reduce(function(bt,St){return Math.max(bt,St.y+St.height)},0)};return ft||(mt.items=ht),mt}},function(et,_e,tt){var rt=tt(205);et.exports=function(nt){return rt(nt,5)}},function(et,_e,tt){(function(rt){var nt=typeof rt=="object"&&rt&&rt.Object===Object&&rt;et.exports=nt}).call(this,tt(17))},function(et,_e,tt){var rt=Object.prototype.hasOwnProperty,nt="~";function st(){}function dt(bt,St,Et){this.fn=bt,this.context=St,this.once=Et||!1}function ft(bt,St,Et,Ct,Rt){if(typeof Et!="function")throw new TypeError("The listener must be a function");var Tt=new dt(Et,Ct||bt,Rt),wt=nt?nt+St:St;return bt._events[wt]?bt._events[wt].fn?bt._events[wt]=[bt._events[wt],Tt]:bt._events[wt].push(Tt):(bt._events[wt]=Tt,bt._eventsCount++),bt}function ht(bt,St){--bt._eventsCount==0?bt._events=new st:delete bt._events[St]}function mt(){this._events=new st,this._eventsCount=0}Object.create&&(st.prototype=Object.create(null),new st().__proto__||(nt=!1)),mt.prototype.eventNames=function(){var bt,St,Et=[];if(this._eventsCount===0)return Et;for(St in bt=this._events)rt.call(bt,St)&&Et.push(nt?St.slice(1):St);return Object.getOwnPropertySymbols?Et.concat(Object.getOwnPropertySymbols(bt)):Et},mt.prototype.listeners=function(bt){var St=nt?nt+bt:bt,Et=this._events[St];if(!Et)return[];if(Et.fn)return[Et.fn];for(var Ct=0,Rt=Et.length,Tt=new Array(Rt);Ct<Rt;Ct++)Tt[Ct]=Et[Ct].fn;return Tt},mt.prototype.listenerCount=function(bt){var St=nt?nt+bt:bt,Et=this._events[St];return Et?Et.fn?1:Et.length:0},mt.prototype.emit=function(bt,St,Et,Ct,Rt,Tt){var wt=nt?nt+bt:bt;if(!this._events[wt])return!1;var At,Nt,Pt=this._events[wt],It=arguments.length;if(Pt.fn){switch(Pt.once&&this.removeListener(bt,Pt.fn,void 0,!0),It){case 1:return Pt.fn.call(Pt.context),!0;case 2:return Pt.fn.call(Pt.context,St),!0;case 3:return Pt.fn.call(Pt.context,St,Et),!0;case 4:return Pt.fn.call(Pt.context,St,Et,Ct),!0;case 5:return Pt.fn.call(Pt.context,St,Et,Ct,Rt),!0;case 6:return Pt.fn.call(Pt.context,St,Et,Ct,Rt,Tt),!0}for(Nt=1,At=new Array(It-1);Nt<It;Nt++)At[Nt-1]=arguments[Nt];Pt.fn.apply(Pt.context,At)}else{var Ft,qt=Pt.length;for(Nt=0;Nt<qt;Nt++)switch(Pt[Nt].once&&this.removeListener(bt,Pt[Nt].fn,void 0,!0),It){case 1:Pt[Nt].fn.call(Pt[Nt].context);break;case 2:Pt[Nt].fn.call(Pt[Nt].context,St);break;case 3:Pt[Nt].fn.call(Pt[Nt].context,St,Et);break;case 4:Pt[Nt].fn.call(Pt[Nt].context,St,Et,Ct);break;default:if(!At)for(Ft=1,At=new Array(It-1);Ft<It;Ft++)At[Ft-1]=arguments[Ft];Pt[Nt].fn.apply(Pt[Nt].context,At)}}return!0},mt.prototype.on=function(bt,St,Et){return ft(this,bt,St,Et,!1)},mt.prototype.once=function(bt,St,Et){return ft(this,bt,St,Et,!0)},mt.prototype.removeListener=function(bt,St,Et,Ct){var Rt=nt?nt+bt:bt;if(!this._events[Rt])return this;if(!St)return ht(this,Rt),this;var Tt=this._events[Rt];if(Tt.fn)Tt.fn!==St||Ct&&!Tt.once||Et&&Tt.context!==Et||ht(this,Rt);else{for(var wt=0,At=[],Nt=Tt.length;wt<Nt;wt++)(Tt[wt].fn!==St||Ct&&!Tt[wt].once||Et&&Tt[wt].context!==Et)&&At.push(Tt[wt]);At.length?this._events[Rt]=At.length===1?At[0]:At:ht(this,Rt)}return this},mt.prototype.removeAllListeners=function(bt){var St;return bt?(St=nt?nt+bt:bt,this._events[St]&&ht(this,St)):(this._events=new st,this._eventsCount=0),this},mt.prototype.off=mt.prototype.removeListener,mt.prototype.addListener=mt.prototype.on,mt.prefixed=nt,mt.EventEmitter=mt,et.exports=mt},function(et,_e,tt){function rt(Bt,tr,Jt){Jt=Jt||2;var ar,pr,cr,gr,Sr,Er,Vr,Wr=tr&&tr.length,Mr=Wr?tr[0]*Jt:Bt.length,Nr=nt(Bt,0,Mr,Jt,!0),Yr=[];if(!Nr||Nr.next===Nr.prev)return Yr;if(Wr&&(Nr=(function(Ar,Qr,hn,Sn){var Kr,Hn,ln,kn,xn,An=[];for(Kr=0,Hn=Qr.length;Kr<Hn;Kr++)ln=Qr[Kr]*Sn,kn=Kr<Hn-1?Qr[Kr+1]*Sn:Ar.length,(xn=nt(Ar,ln,kn,Sn,!1))===xn.next&&(xn.steiner=!0),An.push(Tt(xn));for(An.sort(St),Kr=0;Kr<An.length;Kr++)hn=Et(An[Kr],hn);return hn})(Bt,tr,Nr,Jt)),Bt.length>80*Jt){ar=cr=Bt[0],pr=gr=Bt[1];for(var Or=Jt;Or<Mr;Or+=Jt)(Sr=Bt[Or])<ar&&(ar=Sr),(Er=Bt[Or+1])<pr&&(pr=Er),Sr>cr&&(cr=Sr),Er>gr&&(gr=Er);Vr=(Vr=Math.max(cr-ar,gr-pr))!==0?32767/Vr:0}return dt(Nr,Yr,Jt,ar,pr,Vr,0),Yr}function nt(Bt,tr,Jt,ar,pr){var cr,gr;if(pr===Wt(Bt,tr,Jt,ar)>0)for(cr=tr;cr<Jt;cr+=ar)gr=jt(cr,Bt[cr],Bt[cr+1],gr);else for(cr=Jt-ar;cr>=tr;cr-=ar)gr=jt(cr,Bt[cr],Bt[cr+1],gr);return gr&&Pt(gr,gr.next)&&(Ut(gr),gr=gr.next),gr}function st(Bt,tr){if(!Bt)return Bt;tr||(tr=Bt);var Jt,ar=Bt;do if(Jt=!1,ar.steiner||!Pt(ar,ar.next)&&Nt(ar.prev,ar,ar.next)!==0)ar=ar.next;else{if(Ut(ar),(ar=tr=ar.prev)===ar.next)break;Jt=!0}while(Jt||ar!==tr);return tr}function dt(Bt,tr,Jt,ar,pr,cr,gr){if(Bt){!gr&&cr&&(function(Wr,Mr,Nr,Yr){var Or=Wr;do Or.z===0&&(Or.z=Rt(Or.x,Or.y,Mr,Nr,Yr)),Or.prevZ=Or.prev,Or.nextZ=Or.next,Or=Or.next;while(Or!==Wr);Or.prevZ.nextZ=null,Or.prevZ=null,(function(Ar){var Qr,hn,Sn,Kr,Hn,ln,kn,xn,An=1;do{for(hn=Ar,Ar=null,Hn=null,ln=0;hn;){for(ln++,Sn=hn,kn=0,Qr=0;Qr<An&&(kn++,Sn=Sn.nextZ);Qr++);for(xn=An;kn>0||xn>0&&Sn;)kn!==0&&(xn===0||!Sn||hn.z<=Sn.z)?(Kr=hn,hn=hn.nextZ,kn--):(Kr=Sn,Sn=Sn.nextZ,xn--),Hn?Hn.nextZ=Kr:Ar=Kr,Kr.prevZ=Hn,Hn=Kr;hn=Sn}Hn.nextZ=null,An*=2}while(ln>1)})(Or)})(Bt,ar,pr,cr);for(var Sr,Er,Vr=Bt;Bt.prev!==Bt.next;)if(Sr=Bt.prev,Er=Bt.next,cr?ht(Bt,ar,pr,cr):ft(Bt))tr.push(Sr.i/Jt|0),tr.push(Bt.i/Jt|0),tr.push(Er.i/Jt|0),Ut(Bt),Bt=Er.next,Vr=Er.next;else if((Bt=Er)===Vr){gr?gr===1?dt(Bt=mt(st(Bt),tr,Jt),tr,Jt,ar,pr,cr,2):gr===2&&bt(Bt,tr,Jt,ar,pr,cr):dt(st(Bt),tr,Jt,ar,pr,cr,1);break}}}function ft(Bt){var tr=Bt.prev,Jt=Bt,ar=Bt.next;if(Nt(tr,Jt,ar)>=0)return!1;for(var pr=tr.x,cr=Jt.x,gr=ar.x,Sr=tr.y,Er=Jt.y,Vr=ar.y,Wr=pr<cr?pr<gr?pr:gr:cr<gr?cr:gr,Mr=Sr<Er?Sr<Vr?Sr:Vr:Er<Vr?Er:Vr,Nr=pr>cr?pr>gr?pr:gr:cr>gr?cr:gr,Yr=Sr>Er?Sr>Vr?Sr:Vr:Er>Vr?Er:Vr,Or=ar.next;Or!==tr;){if(Or.x>=Wr&&Or.x<=Nr&&Or.y>=Mr&&Or.y<=Yr&&wt(pr,Sr,cr,Er,gr,Vr,Or.x,Or.y)&&Nt(Or.prev,Or,Or.next)>=0)return!1;Or=Or.next}return!0}function ht(Bt,tr,Jt,ar){var pr=Bt.prev,cr=Bt,gr=Bt.next;if(Nt(pr,cr,gr)>=0)return!1;for(var Sr=pr.x,Er=cr.x,Vr=gr.x,Wr=pr.y,Mr=cr.y,Nr=gr.y,Yr=Sr<Er?Sr<Vr?Sr:Vr:Er<Vr?Er:Vr,Or=Wr<Mr?Wr<Nr?Wr:Nr:Mr<Nr?Mr:Nr,Ar=Sr>Er?Sr>Vr?Sr:Vr:Er>Vr?Er:Vr,Qr=Wr>Mr?Wr>Nr?Wr:Nr:Mr>Nr?Mr:Nr,hn=Rt(Yr,Or,tr,Jt,ar),Sn=Rt(Ar,Qr,tr,Jt,ar),Kr=Bt.prevZ,Hn=Bt.nextZ;Kr&&Kr.z>=hn&&Hn&&Hn.z<=Sn;){if(Kr.x>=Yr&&Kr.x<=Ar&&Kr.y>=Or&&Kr.y<=Qr&&Kr!==pr&&Kr!==gr&&wt(Sr,Wr,Er,Mr,Vr,Nr,Kr.x,Kr.y)&&Nt(Kr.prev,Kr,Kr.next)>=0||(Kr=Kr.prevZ,Hn.x>=Yr&&Hn.x<=Ar&&Hn.y>=Or&&Hn.y<=Qr&&Hn!==pr&&Hn!==gr&&wt(Sr,Wr,Er,Mr,Vr,Nr,Hn.x,Hn.y)&&Nt(Hn.prev,Hn,Hn.next)>=0))return!1;Hn=Hn.nextZ}for(;Kr&&Kr.z>=hn;){if(Kr.x>=Yr&&Kr.x<=Ar&&Kr.y>=Or&&Kr.y<=Qr&&Kr!==pr&&Kr!==gr&&wt(Sr,Wr,Er,Mr,Vr,Nr,Kr.x,Kr.y)&&Nt(Kr.prev,Kr,Kr.next)>=0)return!1;Kr=Kr.prevZ}for(;Hn&&Hn.z<=Sn;){if(Hn.x>=Yr&&Hn.x<=Ar&&Hn.y>=Or&&Hn.y<=Qr&&Hn!==pr&&Hn!==gr&&wt(Sr,Wr,Er,Mr,Vr,Nr,Hn.x,Hn.y)&&Nt(Hn.prev,Hn,Hn.next)>=0)return!1;Hn=Hn.nextZ}return!0}function mt(Bt,tr,Jt){var ar=Bt;do{var pr=ar.prev,cr=ar.next.next;!Pt(pr,cr)&&It(pr,ar,ar.next,cr)&&Vt(pr,cr)&&Vt(cr,pr)&&(tr.push(pr.i/Jt|0),tr.push(ar.i/Jt|0),tr.push(cr.i/Jt|0),Ut(ar),Ut(ar.next),ar=Bt=cr),ar=ar.next}while(ar!==Bt);return st(ar)}function bt(Bt,tr,Jt,ar,pr,cr){var gr=Bt;do{for(var Sr=gr.next.next;Sr!==gr.prev;){if(gr.i!==Sr.i&&At(gr,Sr)){var Er=Kt(gr,Sr);return gr=st(gr,gr.next),Er=st(Er,Er.next),dt(gr,tr,Jt,ar,pr,cr,0),void dt(Er,tr,Jt,ar,pr,cr,0)}Sr=Sr.next}gr=gr.next}while(gr!==Bt)}function St(Bt,tr){return Bt.x-tr.x}function Et(Bt,tr){var Jt=(function(pr,cr){var gr,Sr=cr,Er=pr.x,Vr=pr.y,Wr=-1/0;do{if(Vr<=Sr.y&&Vr>=Sr.next.y&&Sr.next.y!==Sr.y){var Mr=Sr.x+(Vr-Sr.y)*(Sr.next.x-Sr.x)/(Sr.next.y-Sr.y);if(Mr<=Er&&Mr>Wr&&(Wr=Mr,gr=Sr.x<Sr.next.x?Sr:Sr.next,Mr===Er))return gr}Sr=Sr.next}while(Sr!==cr);if(!gr)return null;var Nr,Yr=gr,Or=gr.x,Ar=gr.y,Qr=1/0;Sr=gr;do Er>=Sr.x&&Sr.x>=Or&&Er!==Sr.x&&wt(Vr<Ar?Er:Wr,Vr,Or,Ar,Vr<Ar?Wr:Er,Vr,Sr.x,Sr.y)&&(Nr=Math.abs(Vr-Sr.y)/(Er-Sr.x),Vt(Sr,pr)&&(Nr<Qr||Nr===Qr&&(Sr.x>gr.x||Sr.x===gr.x&&Ct(gr,Sr)))&&(gr=Sr,Qr=Nr)),Sr=Sr.next;while(Sr!==Yr);return gr})(Bt,tr);if(!Jt)return tr;var ar=Kt(Jt,Bt);return st(ar,ar.next),st(Jt,Jt.next)}function Ct(Bt,tr){return Nt(Bt.prev,Bt,tr.prev)<0&&Nt(tr.next,Bt,Bt.next)<0}function Rt(Bt,tr,Jt,ar,pr){return(Bt=1431655765&((Bt=858993459&((Bt=252645135&((Bt=16711935&((Bt=(Bt-Jt)*pr|0)|Bt<<8))|Bt<<4))|Bt<<2))|Bt<<1))|(tr=1431655765&((tr=858993459&((tr=252645135&((tr=16711935&((tr=(tr-ar)*pr|0)|tr<<8))|tr<<4))|tr<<2))|tr<<1))<<1}function Tt(Bt){var tr=Bt,Jt=Bt;do(tr.x<Jt.x||tr.x===Jt.x&&tr.y<Jt.y)&&(Jt=tr),tr=tr.next;while(tr!==Bt);return Jt}function wt(Bt,tr,Jt,ar,pr,cr,gr,Sr){return(pr-gr)*(tr-Sr)>=(Bt-gr)*(cr-Sr)&&(Bt-gr)*(ar-Sr)>=(Jt-gr)*(tr-Sr)&&(Jt-gr)*(cr-Sr)>=(pr-gr)*(ar-Sr)}function At(Bt,tr){return Bt.next.i!==tr.i&&Bt.prev.i!==tr.i&&!(function(Jt,ar){var pr=Jt;do{if(pr.i!==Jt.i&&pr.next.i!==Jt.i&&pr.i!==ar.i&&pr.next.i!==ar.i&&It(pr,pr.next,Jt,ar))return!0;pr=pr.next}while(pr!==Jt);return!1})(Bt,tr)&&(Vt(Bt,tr)&&Vt(tr,Bt)&&(function(Jt,ar){var pr=Jt,cr=!1,gr=(Jt.x+ar.x)/2,Sr=(Jt.y+ar.y)/2;do pr.y>Sr!=pr.next.y>Sr&&pr.next.y!==pr.y&&gr<(pr.next.x-pr.x)*(Sr-pr.y)/(pr.next.y-pr.y)+pr.x&&(cr=!cr),pr=pr.next;while(pr!==Jt);return cr})(Bt,tr)&&(Nt(Bt.prev,Bt,tr.prev)||Nt(Bt,tr.prev,tr))||Pt(Bt,tr)&&Nt(Bt.prev,Bt,Bt.next)>0&&Nt(tr.prev,tr,tr.next)>0)}function Nt(Bt,tr,Jt){return(tr.y-Bt.y)*(Jt.x-tr.x)-(tr.x-Bt.x)*(Jt.y-tr.y)}function Pt(Bt,tr){return Bt.x===tr.x&&Bt.y===tr.y}function It(Bt,tr,Jt,ar){var pr=qt(Nt(Bt,tr,Jt)),cr=qt(Nt(Bt,tr,ar)),gr=qt(Nt(Jt,ar,Bt)),Sr=qt(Nt(Jt,ar,tr));return pr!==cr&&gr!==Sr||!(pr!==0||!Ft(Bt,Jt,tr))||!(cr!==0||!Ft(Bt,ar,tr))||!(gr!==0||!Ft(Jt,Bt,ar))||!(Sr!==0||!Ft(Jt,tr,ar))}function Ft(Bt,tr,Jt){return tr.x<=Math.max(Bt.x,Jt.x)&&tr.x>=Math.min(Bt.x,Jt.x)&&tr.y<=Math.max(Bt.y,Jt.y)&&tr.y>=Math.min(Bt.y,Jt.y)}function qt(Bt){return Bt>0?1:Bt<0?-1:0}function Vt(Bt,tr){return Nt(Bt.prev,Bt,Bt.next)<0?Nt(Bt,tr,Bt.next)>=0&&Nt(Bt,Bt.prev,tr)>=0:Nt(Bt,tr,Bt.prev)<0||Nt(Bt,Bt.next,tr)<0}function Kt(Bt,tr){var Jt=new Ot(Bt.i,Bt.x,Bt.y),ar=new Ot(tr.i,tr.x,tr.y),pr=Bt.next,cr=tr.prev;return Bt.next=tr,tr.prev=Bt,Jt.next=pr,pr.prev=Jt,ar.next=Jt,Jt.prev=ar,cr.next=ar,ar.prev=cr,ar}function jt(Bt,tr,Jt,ar){var pr=new Ot(Bt,tr,Jt);return ar?(pr.next=ar.next,pr.prev=ar,ar.next.prev=pr,ar.next=pr):(pr.prev=pr,pr.next=pr),pr}function Ut(Bt){Bt.next.prev=Bt.prev,Bt.prev.next=Bt.next,Bt.prevZ&&(Bt.prevZ.nextZ=Bt.nextZ),Bt.nextZ&&(Bt.nextZ.prevZ=Bt.prevZ)}function Ot(Bt,tr,Jt){this.i=Bt,this.x=tr,this.y=Jt,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Wt(Bt,tr,Jt,ar){for(var pr=0,cr=tr,gr=Jt-ar;cr<Jt;cr+=ar)pr+=(Bt[gr]-Bt[cr])*(Bt[cr+1]+Bt[gr+1]),gr=cr;return pr}et.exports=rt,et.exports.default=rt,rt.deviation=function(Bt,tr,Jt,ar){var pr=tr&&tr.length,cr=pr?tr[0]*Jt:Bt.length,gr=Math.abs(Wt(Bt,0,cr,Jt));if(pr)for(var Sr=0,Er=tr.length;Sr<Er;Sr++){var Vr=tr[Sr]*Jt,Wr=Sr<Er-1?tr[Sr+1]*Jt:Bt.length;gr-=Math.abs(Wt(Bt,Vr,Wr,Jt))}var Mr=0;for(Sr=0;Sr<ar.length;Sr+=3){var Nr=ar[Sr]*Jt,Yr=ar[Sr+1]*Jt,Or=ar[Sr+2]*Jt;Mr+=Math.abs((Bt[Nr]-Bt[Or])*(Bt[Yr+1]-Bt[Nr+1])-(Bt[Nr]-Bt[Yr])*(Bt[Or+1]-Bt[Nr+1]))}return gr===0&&Mr===0?0:Math.abs((Mr-gr)/gr)},rt.flatten=function(Bt){for(var tr=Bt[0][0].length,Jt={vertices:[],holes:[],dimensions:tr},ar=0,pr=0;pr<Bt.length;pr++){for(var cr=0;cr<Bt[pr].length;cr++)for(var gr=0;gr<tr;gr++)Jt.vertices.push(Bt[pr][cr][gr]);pr>0&&(ar+=Bt[pr-1].length,Jt.holes.push(ar))}return Jt}},function(et,_e,tt){var rt=tt(27),nt=tt(157),st=tt(158),dt=tt(159),ft=tt(160),ht=tt(161);function mt(bt){var St=this.__data__=new rt(bt);this.size=St.size}mt.prototype.clear=nt,mt.prototype.delete=st,mt.prototype.get=dt,mt.prototype.has=ft,mt.prototype.set=ht,et.exports=mt},function(et,_e){var tt=Function.prototype.toString;et.exports=function(rt){if(rt!=null){try{return tt.call(rt)}catch{}try{return rt+""}catch{}}return""}},function(et,_e,tt){var rt=tt(166),nt=tt(173),st=tt(175),dt=tt(176),ft=tt(177);function ht(mt){var bt=-1,St=mt==null?0:mt.length;for(this.clear();++bt<St;){var Et=mt[bt];this.set(Et[0],Et[1])}}ht.prototype.clear=rt,ht.prototype.delete=nt,ht.prototype.get=st,ht.prototype.has=dt,ht.prototype.set=ft,et.exports=ht},function(et,_e,tt){var rt=tt(178),nt=tt(181),st=tt(182);et.exports=function(dt,ft,ht,mt,bt,St){var Et=1&ht,Ct=dt.length,Rt=ft.length;if(Ct!=Rt&&!(Et&&Rt>Ct))return!1;var Tt=St.get(dt),wt=St.get(ft);if(Tt&&wt)return Tt==ft&&wt==dt;var At=-1,Nt=!0,Pt=2&ht?new rt:void 0;for(St.set(dt,ft),St.set(ft,dt);++At<Ct;){var It=dt[At],Ft=ft[At];if(mt)var qt=Et?mt(Ft,It,At,ft,dt,St):mt(It,Ft,At,dt,ft,St);if(qt!==void 0){if(qt)continue;Nt=!1;break}if(Pt){if(!nt(ft,function(Vt,Kt){if(!st(Pt,Kt)&&(It===Vt||bt(It,Vt,ht,mt,St)))return Pt.push(Kt)})){Nt=!1;break}}else if(It!==Ft&&!bt(It,Ft,ht,mt,St)){Nt=!1;break}}return St.delete(dt),St.delete(ft),Nt}},function(et,_e,tt){var rt=tt(14).Uint8Array;et.exports=rt},function(et,_e,tt){var rt=tt(60),nt=tt(39),st=tt(40);et.exports=function(dt){return rt(dt,st,nt)}},function(et,_e,tt){var rt=tt(61),nt=tt(31);et.exports=function(st,dt,ft){var ht=dt(st);return nt(st)?ht:rt(ht,ft(st))}},function(et,_e){et.exports=function(tt,rt){for(var nt=-1,st=rt.length,dt=tt.length;++nt<st;)tt[dt+nt]=rt[nt];return tt}},function(et,_e){et.exports=function(){return[]}},function(et,_e,tt){var rt=tt(188),nt=tt(189),st=tt(31),dt=tt(41),ft=tt(192),ht=tt(64),mt=Object.prototype.hasOwnProperty;et.exports=function(bt,St){var Et=st(bt),Ct=!Et&&nt(bt),Rt=!Et&&!Ct&&dt(bt),Tt=!Et&&!Ct&&!Rt&&ht(bt),wt=Et||Ct||Rt||Tt,At=wt?rt(bt.length,String):[],Nt=At.length;for(var Pt in bt)!St&&!mt.call(bt,Pt)||wt&&(Pt=="length"||Rt&&(Pt=="offset"||Pt=="parent")||Tt&&(Pt=="buffer"||Pt=="byteLength"||Pt=="byteOffset")||ft(Pt,Nt))||At.push(Pt);return At}},function(et,_e,tt){var rt=tt(193),nt=tt(42),st=tt(43),dt=st&&st.isTypedArray,ft=dt?nt(dt):rt;et.exports=ft},function(et,_e){et.exports=function(tt){return typeof tt=="number"&&tt>-1&&tt%1==0&&tt<=9007199254740991}},function(et,_e){et.exports=function(tt,rt){return function(nt){return tt(rt(nt))}}},function(et,_e,tt){var rt=tt(34),nt=tt(65);et.exports=function(st){return st!=null&&nt(st.length)&&!rt(st)}},function(et,_e,tt){var rt=tt(69),nt=tt(37),st=Object.prototype.hasOwnProperty;et.exports=function(dt,ft,ht){var mt=dt[ft];st.call(dt,ft)&&nt(mt,ht)&&(ht!==void 0||ft in dt)||rt(dt,ft,ht)}},function(et,_e,tt){var rt=tt(207);et.exports=function(nt,st,dt){st=="__proto__"&&rt?rt(nt,st,{configurable:!0,enumerable:!0,value:dt,writable:!0}):nt[st]=dt}},function(et,_e,tt){var rt=tt(61),nt=tt(71),st=tt(39),dt=tt(62),ft=Object.getOwnPropertySymbols?function(ht){for(var mt=[];ht;)rt(mt,st(ht)),ht=nt(ht);return mt}:dt;et.exports=ft},function(et,_e,tt){var rt=tt(66)(Object.getPrototypeOf,Object);et.exports=rt},function(et,_e){et.exports=`varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform float lines[26];
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float direction;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
float middleAlpha = 0.0;
float endAlpha = 0.0;
float headLength = 0.0;
if (timePercent < 0.5) {
middleAlpha = 1.0;
endAlpha = 1.0 - (timePercent / 0.5);
}
else {
middleAlpha = 1.0 - ((timePercent - 0.5) / 0.5);
endAlpha = 0.0;
}
for (int i = 0; i < 26; i++) {
float halfDis = lines[i] / 2.0;
float middle = headLength + halfDis;
headLength += lines[i];
if ((direction > 0.9) && (direction < 1.1)) {
if (abs(vUv.y - middle) <= halfDis) {
srcColor.a = endAlpha + (((halfDis - abs(vUv.y - middle)) / halfDis) * (middleAlpha - endAlpha));
gl_FragColor = blendSrcOver(srcColor, distColor);
return ;
}
}
else {
if (abs(vUv.x - middle) <= halfDis) {
srcColor.a = endAlpha + (((halfDis - abs(vUv.x - middle)) / halfDis) * (middleAlpha - endAlpha));
gl_FragColor = blendSrcOver(srcColor, distColor);
return ;
}
}
}
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float width;
uniform float height;
varying vec2 vUv;
vec2 transform(vec2 uv) {
uv.y = (uv.y * height) / width;
return uv - vec2(0.5, (0.5 * height) / width);
}
void main() {
float maxR;
float ringR;
float radiusMin;
float radiusMax;
float dist;
vec2 uv = vec2(vUv.x, vUv.y);
maxR = length(transform(vec2(1.0, 1.0)));
ringR = 1.0 / 6.0;
radiusMin = timePercent * maxR;
radiusMax = radiusMin + ringR;
dist = length(transform(uv));
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
if (dist < radiusMin) {
srcColor.a = 0.0;
}
else if ((dist >= radiusMin) && (dist <= radiusMax)) {
srcColor.a = (dist - radiusMin) / ringR;
}
else {
srcColor.a = 1.0;
}
if (timePercent >= 1.0) {
srcColor.a = 0.0;
}
else if (timePercent == 0.0) {
srcColor.a = 1.0;
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float width;
uniform float height;
uniform int option;
varying vec2 vUv;
vec2 transformTo(vec2 uv, vec2 origin) {
uv.y = (uv.y * height) / width;
return uv - vec2(origin.x, (origin.y * height) / width);
}
vec2 offset(float progress[4], float band, float amp, float radius, vec2 centerPosition) {
vec2 tc = vUv.xy;
vec2 uv = vec2(0.0, 0.0);
vec2 p;
float len;
vec2 uv_offset;
float wave_width = band * radius;
for (int i = 0; i < 4; i += 1) {
if (progress[i] == -1.0) {
continue;
}
p = tc - centerPosition;
p.x = (p.x * width) / height;
len = length(p);
float current_progress = progress[i];
float current_radius = radius * current_progress;
float damp_factor = 1.0;
if (current_progress > .5) {
damp_factor = (1.0 - current_progress) * 2.0;
}
float cut_factor = clamp((wave_width * damp_factor) - abs(current_radius - len), 0.0, 1.0);
float waves_factor = (4.0 * len) / radius;
uv_offset = (((p / len) * cos((waves_factor - (current_progress * 10.0)) * 3.14)) * amp) * cut_factor;
uv += uv_offset;
}
return uv;
}
void main() {
float maxR;
float ringR;
float radiusMin;
float radiusMax;
float dist;
float progress[4];
vec2 uv = vUv.xy;
vec2 uvOffset = vec2(0.0, 0.0);
vec2 startPosition = vec2(0.5, 0.5);
float redius = 2.0;
if (option == 1) {
startPosition = vec2(0.0, 0.0);
}
else if (option == 2) {
startPosition = vec2(1.0, 0.0);
}
else if (option == 3) {
startPosition = vec2(1.0, 1.0);
}
else if (option == 4) {
startPosition = vec2(0.0, 1.0);
}
maxR = length(transformTo(vec2(1.0, 1.0), vec2(0.0, 0.0)));
if (option == 0) {
maxR = maxR / 2.0;
redius = redius / 2.0;
}
dist = length(transformTo(uv, startPosition));
ringR = 1.0 / 6.0;
radiusMin = timePercent * maxR;
radiusMax = radiusMin + ringR;
for (int i = 0; i < 4; i++) {
progress[i] = timePercent + (0.1 * float(i));
if (progress[i] < 0.0) {
progress[i] = 0.0;
}
}
uvOffset = offset(progress, 0.2, 0.3, redius, startPosition);
vec4 srcColor = texture2D(texturePrev, fract(vUv + uvOffset));
vec4 distColor = texture2D(textureNext, fract(vUv + uvOffset));
if (dist < radiusMin) {
srcColor.a = 0.0;
}
else if ((dist >= radiusMin) && (dist <= radiusMax)) {
srcColor.a = (dist - radiusMin) / ringR;
}
else {
srcColor.a = 1.0;
}
if (timePercent >= 1.0) {
srcColor.a = 0.0;
}
else if (timePercent == 0.0) {
srcColor.a = 1.0;
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int option;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
float alphaStart;
float alphaEnd;
float rectStart;
float rectEnd;
bool isRevert = option > 1 ? true : false;
if (timePercent <= 0.33) {
alphaStart = isRevert ? 1.0 - (timePercent / 0.33) : 1.0;
alphaEnd = isRevert ? 1.0 : 1.0 - (timePercent / 0.33);
rectStart = isRevert ? 0.0 : 0.5;
rectEnd = isRevert ? 0.5 : 1.0;
}
else if ((timePercent > 0.33) && (timePercent <= 0.66)) {
alphaStart = isRevert ? 0.0 : 1.0;
alphaEnd = isRevert ? 1.0 : 0.0;
rectEnd = isRevert ? (((timePercent - 0.33) / 0.33) * 0.5) + 0.5 : 1.0 - (((timePercent - 0.33) / 0.33) * 0.5);
rectStart = rectEnd - 0.5;
}
else {
alphaStart = isRevert ? 0.0 : (1.0 - timePercent) / (1.0 - 0.66);
alphaEnd = isRevert ? (1.0 - timePercent) / (1.0 - 0.66) : 0.0;
rectStart = isRevert ? 0.5 : 0.0;
rectEnd = isRevert ? 1.0 : 0.5;
}
float changAxis = (option % 2) == 0 ? vUv.x : vUv.y;
if (changAxis >= rectEnd) {
srcColor.a = isRevert ? 1.0 : 0.0;
}
else if (changAxis <= rectStart) {
srcColor.a = isRevert ? 0.0 : 1.0;
}
else {
srcColor.a = alphaStart + (((changAxis - rectStart) / 0.5) * (alphaEnd - alphaStart));
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform sampler2D dissolveTexture;
varying vec2 vUv;
void main() {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 dissolveColor = texture2D(dissolveTexture, vUv);
if (dissolveColor.r == 0.0) {
result = srcColor;
}
else {
result = distColor;
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
if (timePercent < 0.5) {
float stagePercent = timePercent / 0.5;
result = srcColor + (stagePercent * (1.0 - srcColor));
}
else {
float stagePercent = (timePercent - 0.5) / 0.5;
result = 1.0 - (stagePercent * (1.0 - distColor));
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int option;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
if (option == 1) {
if (timePercent < 0.5) {
srcColor.rgb *= (1.0 - (timePercent * 2.0));
gl_FragColor = srcColor;
}
else {
distColor.rgb *= ((timePercent - 0.5) * 2.0);
gl_FragColor = distColor;
}
}
else {
srcColor.a = 1.0 - timePercent;
gl_FragColor = blendSrcOver(srcColor, distColor);
}
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int option;
varying vec2 vUv;
void main() {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
float changeAxis = (option % 2) == 1 ? vUv.x : vUv.y;
bool changeAxisX = (option % 2) == 1;
bool isRevert = option > 1;
float line;
if (isRevert) {
line = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 3);
}
else {
line = interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 3);
}
vec2 uv = vUv.xy;
if (changeAxis > line) {
if (changeAxisX) {
uv.x -= line;
}
else {
uv.y -= line;
}
}
else {
if (changeAxisX) {
uv.x += (1.0 - line);
}
else {
uv.y += (1.0 - line);
}
}
if (isRevert) {
result = changeAxis > line ? texture2D(textureNext, uv) : texture2D(texturePrev, uv);
}
else {
result = changeAxis > line ? texture2D(texturePrev, uv) : texture2D(textureNext, uv);
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform bool direction;
uniform bool orient;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec2 rectLeft = direction ? vec2(0.25, 0.0) : vec2(0.25, 0.5);
vec2 rectRight = direction ? vec2(1, 0.75) : vec2(0.5, 0.75);
vec2 alphaLeft = vec2(1.0, 1.0);
vec2 alphaRight = vec2(1.0, 1.0);
if (timePercent <= 0.333) {
alphaLeft.y = 1.0 - (timePercent / 0.333);
alphaRight.x = 1.0 - (timePercent / 0.333);
}
else if ((timePercent <= 0.666) && (timePercent > 0.333)) {
rectLeft.x = direction ? (((timePercent - 0.333) / 0.333) * 0.25) + rectLeft.x : rectLeft.x - (((timePercent - 0.333) / 0.333) * 0.25);
rectLeft.y = direction ? rectLeft.x - 0.25 : rectLeft.x + 0.25;
rectRight.y = direction ? rectRight.y - (((timePercent - 0.333) / 0.333) * 0.25) : rectRight.y + (((timePercent - 0.333) / 0.333) * 0.25);
rectRight.x = direction ? rectRight.y + 0.25 : rectRight.y - 0.25;
alphaLeft.y = 0.0;
alphaRight.x = 0.0;
}
else {
rectLeft = direction ? vec2(0.5, 0.25) : vec2(0.0, 0.25);
rectRight = direction ? vec2(0.75, 0.5) : vec2(0.75, 1.0);
alphaLeft.y = 0.0;
alphaRight.x = 0.0;
alphaLeft.x = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));
alphaRight.y = 1.0 - ((timePercent - 0.666) / (1.0 - 0.666));
}
float axis = orient ? vUv.x : vUv.y;
if (direction) {
if ((axis < rectLeft.y) || (axis > rectRight.x)) {
srcColor.a = 0.0;
}
else if ((axis > rectLeft.x) && (axis < rectRight.y)) {
srcColor.a = 1.0;
}
else {
if ((axis < rectLeft.x) && (axis > rectLeft.y)) {
srcColor.a = alphaLeft.y - (((axis - rectLeft.y) / (rectLeft.x - rectLeft.y)) * (alphaLeft.y - alphaLeft.x));
}
else {
srcColor.a = alphaRight.x - (((rectRight.x - axis) / (rectLeft.x - rectLeft.y)) * (alphaRight.x - alphaRight.y));
}
}
}
else {
if ((axis < rectLeft.x) || (axis > rectRight.y)) {
srcColor.a = 1.0;
}
else if ((axis > rectLeft.y) && (axis < rectRight.x)) {
srcColor.a = 0.0;
}
else {
if ((axis >= rectLeft.x) && (axis <= rectLeft.y)) {
srcColor.a = alphaLeft.x - (((axis - rectLeft.x) / (rectLeft.y - rectLeft.x)) * (alphaLeft.x - alphaLeft.y));
}
else {
srcColor.a = alphaRight.y - (((rectRight.y - axis) / (rectLeft.y - rectLeft.x)) * (alphaRight.y - alphaRight.x));
}
}
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform bool direction;
uniform bool thruBlk;
varying vec2 vUv;
void main() {
vec4 uv4 = vec4(vUv.xy, 1.0, 1.0);
float scale;
float transform;
if (timePercent < 0.5) {
scale = 1.0 - ((timePercent / 0.5) * 0.05);
transform = (1.0 - scale) * 0.5;
}
else {
scale = 0.95 + (((timePercent - 0.5) / 0.5) * 0.05);
transform = (1.0 - scale) * 0.5;
}
mat4 matrix = mat4(scale, 0.0, 0.0, 0.0, 0.0, scale, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, transform, transform, 0.0, 1.0);
vec4 uv = matrix * uv4;
vec4 srcColor = texture2D(texturePrev, uv.xy);
vec4 distColor = texture2D(textureNext, uv.xy);
vec4 result = timePercent < 0.5 ? srcColor : distColor;
vec3 start;
vec3 end;
vec3 middleColor = thruBlk ? vec3(0.0, 0.0, 0.0) : vec3(1.0, 1.0, 1.0);
if ((timePercent < 0.25) || (timePercent > 0.75)) {
result *= 1.0;
}
else if ((timePercent >= 0.25) && (timePercent <= 0.5)) {
if (timePercent <= 0.375) {
start = result.rgb;
end = start + (((timePercent - 0.25) / 0.125) * (middleColor - result.rgb));
}
else {
start = result.rgb + (((timePercent - 0.375) / 0.125) * (middleColor - result.rgb));
end = middleColor;
}
result = direction ? vec4(end - (vUv.x * (end - start)), result.a) : vec4(start - (vUv.x * (start - end)), result.a);
}
else if ((timePercent > 0.5) && (timePercent <= 0.75)) {
if (timePercent < 0.625) {
start = middleColor - (((timePercent - 0.5) / 0.125) * (middleColor - result.rgb));
end = middleColor;
}
else {
start = result.rgb;
end = middleColor - (((timePercent - 0.625) / 0.125) * (middleColor - result.rgb));
}
result = direction ? vec4(end - (vUv.x * (end - start)), result.a) : vec4(start - (vUv.x * (start - end)), result.a);
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int optionX;
uniform int optionY;
varying vec2 vUv;
void main() {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
float lineX = optionX > 0 ? interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 1) : interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);
float lineY = optionY > 0 ? interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 1) : interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);
vec2 uv = vUv.xy;
if ((optionX < 0) && (vUv.x <= lineX)) {
uv.x += (1.0 - lineX);
}
if ((optionX > 0) && (vUv.x >= lineX)) {
uv.x -= lineX;
}
if ((optionY < 0) && (vUv.y <= lineY)) {
uv.y += (1.0 - lineY);
}
if ((optionY > 0) && (vUv.y >= lineY)) {
uv.y -= lineY;
}
if ((optionX != 0) && (optionY == 0)) {
if (optionX > 0) {
result = vUv.x > lineX ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
else {
result = vUv.x > lineX ? texture2D(textureNext, vUv) : texture2D(texturePrev, uv);
}
}
if ((optionX == 0) && (optionY != 0)) {
if (optionY > 0) {
result = vUv.y > lineY ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
else {
result = vUv.y > lineY ? texture2D(textureNext, vUv) : texture2D(texturePrev, uv);
}
}
if ((optionX != 0) && (optionY != 0)) {
if ((optionX > 0) && (optionY > 0)) {
result = (vUv.x > lineX) && (vUv.y > lineY) ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
else if ((optionX > 0) && (optionY < 0)) {
result = (vUv.x > lineX) && (vUv.y < lineY) ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
else if ((optionX < 0) && (optionY > 0)) {
result = (vUv.x < lineX) && (vUv.y > lineY) ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
else {
result = (vUv.x < lineX) && (vUv.y < lineY) ? texture2D(texturePrev, uv) : texture2D(textureNext, vUv);
}
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int optionX;
uniform int optionY;
varying vec2 vUv;
void main() {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
float lineX = optionX > 0 ? interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 1) : interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);
float lineY = optionY > 0 ? interpolationFloat(0.0, 1.0, 0.0, 1.0, timePercent, 1) : interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 1);
vec2 uv = vUv.xy;
if ((optionX < 0) && (vUv.x > lineX)) {
uv.x -= lineX;
}
if ((optionX > 0) && (vUv.x < lineX)) {
uv.x += (1.0 - lineX);
}
if ((optionY < 0) && (vUv.y > lineY)) {
uv.y -= lineY;
}
if ((optionY > 0) && (vUv.y < lineY)) {
uv.y += (1.0 - lineY);
}
if ((optionX != 0) && (optionY == 0)) {
if (optionX > 0) {
result = vUv.x > lineX ? texture2D(texturePrev, vUv) : texture2D(textureNext, uv);
}
else {
result = vUv.x > lineX ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
}
if ((optionX == 0) && (optionY != 0)) {
if (optionY > 0) {
result = vUv.y > lineY ? texture2D(texturePrev, vUv) : texture2D(textureNext, uv);
}
else {
result = vUv.y > lineY ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
}
if ((optionX != 0) && (optionY != 0)) {
if ((optionX > 0) && (optionY > 0)) {
result = (vUv.x < lineX) && (vUv.y < lineY) ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
else if ((optionX > 0) && (optionY < 0)) {
result = (vUv.x < lineX) && (vUv.y > lineY) ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
else if ((optionX < 0) && (optionY > 0)) {
result = (vUv.x > lineX) && (vUv.y < lineY) ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
else {
result = (vUv.x > lineX) && (vUv.y > lineY) ? texture2D(textureNext, uv) : texture2D(texturePrev, vUv);
}
}
gl_FragColor = result;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
mat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);
mat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec3 result;
float resultAlpha;
if (timePercent < 0.5) {
result = srcColor.rgb * rgb2yuv;
result.r += interpolationFloat(0.0, 1.0, 0.0, 0.5, timePercent, 0);
resultAlpha = srcColor.a;
}
else {
result = distColor.rgb * rgb2yuv;
result.r += interpolationFloat(1.0, 0.0, 0.5, 1.0, timePercent, 0);
resultAlpha = distColor.a;
}
result *= yuv2rgb;
gl_FragColor = vec4(result.rgb, resultAlpha);
}
`},function(et,_e){et.exports=`uniform float horizontalSegments;
uniform float verticalSegments;
uniform float timePercent;
uniform float segmentWidth;
uniform float segmentHeight;
attribute vec2 segment;
attribute float times;
attribute int option;
varying vec2 vUv;
varying float fakePercent;
void main() {
vUv = uv;
float width = segmentWidth * horizontalSegments;
float height = segmentHeight * verticalSegments;
vec4 newPosition = vec4(position, 1.0);
vec2 segmentOrigin = vec2(((segment.x + 0.5) * segmentWidth) - (width * 0.5), (height * 0.5) - ((1.0 * (segment.y + 0.5)) * segmentHeight));
if (timePercent > times) {
float percent = (timePercent - times) / 0.7;
if (percent > 1.0) {
percent = 1.0;
}
if (percent > 0.5) {
percent += 1.0;
}
mat4 matrix = mat4(cos((-1.0 * percent) * 3.14), 0.0, sin((-1.0 * percent) * 3.14), 0.0, 0.0, 1.0, 0.0, 0.0, -sin((-1.0 * percent) * 3.14), 0.0, cos((-1.0 * percent) * 3.14), 0.0, 0.0, 0.0, 0.0, 1.0);
if (option == 1) {
matrix = mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(percent * 3.14), -sin(percent * 3.14), 0.0, 0.0, sin(percent * 3.13), cos(percent * 3.14), 0.0, 0.0, 0.0, 0.0, 1.0);
}
newPosition.x -= segmentOrigin.x;
newPosition.y -= segmentOrigin.y;
newPosition = matrix * newPosition;
newPosition.x += segmentOrigin.x;
newPosition.y += segmentOrigin.y;
if (segment.x < (horizontalSegments / 2.0)) {
fakePercent = percent - (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));
}
else {
fakePercent = percent + (abs((horizontalSegments / 2.0) - segment.x) * (0.25 / horizontalSegments));
}
}
if ((timePercent < 0.0001) || (timePercent > 0.9999)) {
gl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);
return ;
}
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
varying float fakePercent;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 color = srcColor;
if (fakePercent > 0.5) {
color = distColor;
}
if ((fakePercent < 0.5) && (fakePercent > 0.35)) {
color.a = 0.5;
}
gl_FragColor = color;
}
`},function(et,_e){et.exports=`#define PI 3.14159265
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float timePercent;
uniform float segmentWidth;
uniform float segmentHeight;
uniform float duration;
attribute vec2 segment;
attribute float times;
varying vec2 vUv;
mat4 rotateY(float angle) {
return mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
}
void main() {
vUv = uv;
float width = segmentWidth * horizontalSegments;
float height = segmentHeight * verticalSegments;
mat4 matrix;
float stagePercent;
vec4 newPosition = vec4(position, 1.0);
float selfTimePercent = (timePercent - times) / (4.0 / 5.0);
if (selfTimePercent < 0.0) {
selfTimePercent = 0.0;
}
else if (selfTimePercent > 1.0) {
selfTimePercent = 1.0;
}
if (selfTimePercent < (2.0 / 5.0)) {
stagePercent = selfTimePercent / (2.0 / 5.0);
newPosition.x -= (0.5 * width);
matrix = rotateY(((-1.0 * stagePercent) * PI) * 0.5);
newPosition = matrix * newPosition;
newPosition.x += (0.5 * width);
}
else if ((selfTimePercent >= (2.0 / 5.0)) && (selfTimePercent < (3.0 / 5.0))) {
stagePercent = (selfTimePercent - (2.0 / 5.0)) / (1.0 / 5.0);
newPosition.x -= (0.5 * width);
newPosition = rotateY((-1.0 * PI) * 0.5) * newPosition;
matrix = rotateY(((-1.0 * stagePercent) * PI) * 2.0);
newPosition = matrix * newPosition;
newPosition.x += (0.5 * width);
newPosition.x -= (width * stagePercent);
}
else {
float offset = (((newPosition.x + (0.5 * width)) / width) * 2.0) / 5.0;
stagePercent = (selfTimePercent - (1.0 / 5.0)) / ((2.0 / 5.0) + offset);
if (stagePercent > 1.0) {
stagePercent = 1.0;
}
vec4 vvUvv = vec4(vUv.x - 0.5, vUv.y - 0.5, 0.0, 1.0);
vvUvv = rotateY(-1.0 * PI) * vvUvv;
vUv = vvUvv.xy + 0.5;
newPosition.x -= (0.5 * width);
matrix = rotateY((((-1.0 * stagePercent) * PI) * 0.5) - (PI * 2.5));
newPosition = matrix * newPosition;
newPosition.x += (0.5 * width);
newPosition.x -= width;
}
if ((timePercent < 0.0001) || (timePercent > 0.9999)) {
vUv = uv;
gl_Position = (projectionMatrix * modelViewMatrix) * vec4(position, 1.0);
return ;
}
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 color = srcColor;
if (timePercent > 0.5) {
color = distColor;
}
if (timePercent < 0.0001) {
color = srcColor;
}
else if (timePercent > 0.9999) {
color = distColor;
}
gl_FragColor = color;
}
`},function(et,_e){et.exports=`#define PI 3.14159265
attribute float index;
attribute float type;
attribute float delay;
uniform float timePercent;
uniform float segmentWidth;
uniform float segments;
varying vec2 vUv;
varying float vType;
varying float rotatePercent;
mat4 rotateY(float angle) {
return mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
}
void main() {
vUv = uv;
vType = type;
vec4 newPosition = vec4(position, 1.0);
float selfPercent = (timePercent - delay) / 0.7;
rotatePercent = selfPercent;
if (selfPercent < 0.0) {
selfPercent = 0.0;
}
else if (selfPercent > 1.0) {
selfPercent = 1.0;
}
float offsetX = ((segments * segmentWidth) * 0.5) - ((index + 0.5) * segmentWidth);
float offsetZ = segmentWidth * 0.5;
newPosition.x += offsetX;
newPosition.z += offsetZ;
newPosition.x *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));
newPosition.z *= (0.9 + ((abs(timePercent - 0.5) / 0.5) * 0.1));
newPosition = rotateY((PI * 0.5) * selfPercent) * newPosition;
newPosition.x -= offsetX;
newPosition.z -= offsetZ;
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
varying float vType;
varying float rotatePercent;
mat3 yuv2rgb = mat3(1.0, 0.0, 1.13983, 1.0, -0.39465, -0.58060, 1.0, 2.03211, 0.0);
mat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec3 srcYuv;
vec3 distYuv;
if (rotatePercent < 0.5) {
distYuv = distColor.rgb * rgb2yuv;
distYuv.r *= (1.0 - (abs(rotatePercent - 0.5) / 0.5));
distColor = vec4(distYuv * yuv2rgb, distColor.a);
}
else {
srcYuv = distColor.rgb * rgb2yuv;
srcYuv.r *= (abs(rotatePercent - 0.5) / 0.5);
srcColor = vec4(srcYuv * yuv2rgb, srcColor.a);
}
vec4 color = vType < 0.5 ? srcColor : distColor;
gl_FragColor = color;
}
`},function(et,_e){et.exports=`float easeInFloat(float t, float b, float c, float d) {
t = t / d;
return ((c * t) * t) + b;
}
float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.141592653
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float timePercent;
uniform float segmentWidth;
uniform float segmentHeight;
attribute float isLeft;
varying vec2 vUv;
varying vec4 shadow;
void main() {
vUv = uv;
float scaleX;
float transform;
float displacement;
vec4 newPosition = vec4(position, 1.0);
vec4 glPosition = (projectionMatrix * modelViewMatrix) * newPosition;
float crestCount = 24.0;
float width = horizontalSegments * segmentWidth;
float height = verticalSegments * segmentHeight;
float heightFactor = (newPosition.y + (height * 0.5)) / height;
float scaleY = interpolationFloat(1.0, 1.05, 0.0, 0.11, timePercent, 0);
newPosition.y += (height * 0.5);
newPosition.y *= scaleY;
newPosition.y -= (height * 0.5);
newPosition.y += 10.0;
if ((timePercent > 0.0) && (timePercent < 0.333)) {
float delay = (1.0 - heightFactor) * 0.1;
scaleX = interpolationFloat(1.0, 0.5, 0.0 + delay, 0.333, timePercent, 1);
}
else if ((timePercent >= 0.333) && (timePercent < 0.5)) {
float scaleTop = 0.5;
float scaleBottom = interpolationFloat(0.5, 0.25, 0.333, 0.5, timePercent, 2);
float incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);
scaleX = scaleTop - incr;
}
else if ((timePercent >= 0.5) && (timePercent < 0.583)) {
float scaleTop = 0.5;
float scaleBottom = interpolationFloat(0.25, 0.5, 0.5, 0.583, timePercent, 1);
float incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);
scaleX = scaleTop - incr;
}
else if (timePercent >= 0.583) {
float scaleTop = 0.5;
float scaleBottom = interpolationFloat(0.5, 0.75, 0.583, 0.666, timePercent, 2);
float incr = easeInFloat(1.0 - heightFactor, 0.0, abs(scaleBottom - scaleTop), 1.0);
scaleX = scaleTop + incr;
}
if (timePercent > 0.583) {
displacement = (isLeft < 0.5 ? 1.0 : -1.0) * interpolationFloat(0.0, width / 2.0, 0.583, 1.0, timePercent, 0);
}
float ampTop = interpolationFloat(0.0, 1.0, 0.0, 0.11, timePercent, 0);
float ampBottom = interpolationFloat(0.0, 1.0, 0.11, 0.22, timePercent, 0);
float amp = ampBottom + (heightFactor * abs(ampBottom - ampTop));
float foo = newPosition.x * ((crestCount * PI) / width);
newPosition.z = (amp * cos(foo + (PI / 2.0))) * 20.0;
transform = (isLeft < 0.5 ? -1.0 : 1.0) * (width * 0.5);
newPosition.x += transform;
newPosition.x *= scaleX;
newPosition.x -= transform;
newPosition.x += displacement;
shadow = vec4(0.0, 0.0, 0.0, 0.0);
if (newPosition.z < 15.0) {
float alpha = 0.3 * (1.0 - ((newPosition.z + 20.0) / 35.0));
shadow.a = alpha * amp;
}
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
varying vec4 shadow;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 color = blendSrcOver(shadow, srcColor);
gl_FragColor = color;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265
uniform float timePercent;
uniform float aCoefficient;
uniform float zCurveLimit;
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float segmentWidth;
uniform float segmentHeight;
uniform int option;
varying vec2 vUv;
void main() {
float halfWidth = (segmentWidth * horizontalSegments) * 0.5;
float halfHeight = (segmentHeight * verticalSegments) * 0.5;
vUv = uv;
vec4 newPosition = vec4(position, 1.0);
float curve;
float progress = option == 1 ? halfWidth - newPosition.x : newPosition.x + halfWidth;
float aStart = interpolationFloat(0.00000009, aCoefficient, 0.0, 0.5, timePercent, 0);
float aEnd = 0.0000009;
float zStart = interpolationFloat(0.0, zCurveLimit, 0.0, 0.5, timePercent, 0);
float zEnd = 0.0;
float a = interpolationFloat(aStart, aEnd, 0.0, halfWidth * 2.0, progress, 0);
float z = interpolationFloat(zStart, zEnd, 0.0, halfWidth * 2.0, progress, 0);
newPosition.z -= (((-a * newPosition.y) * newPosition.y) + z);
float scaleYStart = interpolationFloat(1.0, 0.8, 0.0, 0.5, timePercent, 0);
float scaleYEnd = 1.0;
float scaleY = interpolationFloat(scaleYStart, scaleYEnd, 0.0, halfWidth * 2.0, progress, 0);
newPosition.y += halfHeight;
newPosition.y *= scaleY;
float angle = interpolationFloat(0.0, -((2.0 * PI) / 3.0), 0.111, 1.0, timePercent, 1);
mat4 rotateX = mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
newPosition = rotateX * newPosition;
newPosition.y -= halfHeight;
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
float alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);
vec4 shadow = vec4(0.0, 0.0, 0.0, alpha);
gl_FragColor = blendSrcOver(shadow, srcColor);
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform float timePercent;
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float segmentWidth;
uniform float segmentHeight;
uniform int option;
varying vec2 vUv;
varying float shadowAlpha;
mat2 rotateOrigin(float angle) {
return mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
}
void main() {
float halfWidth = (segmentWidth * horizontalSegments) * 0.5;
float halfHeight = (segmentHeight * verticalSegments) * 0.5;
vUv = uv;
vec2 shadowPosition = vec2(position.xy);
float presetAngle = option == 1 ? 0.77 : 0.27;
float rotateAngle = PI * presetAngle;
float min_r = halfWidth * 0.05;
shadowPosition = rotateOrigin(rotateAngle) * shadowPosition;
vec4 newPosition = vec4(shadowPosition.xy, position.z, 1.0);
float line = interpolationFloat(0.0, halfWidth * 2.8, 0.0, 1.0, timePercent, 1);
float dis2BaseLine = halfWidth - newPosition.x;
float dis2Line = line - dis2BaseLine;
float L = line <= (halfWidth * 2.0) ? line : halfWidth * 2.0;
float r = L / PI;
r = r < min_r ? min_r : r;
float angle = dis2Line / r;
if (((dis2Line > 0.0) && (dis2Line < (line * 0.5))) && (r > min_r)) {
shadowAlpha = interpolationFloat(0.0, 0.3, 0.0, line * 0.5, dis2Line, 0);
}
else {
shadowAlpha = 0.0;
}
if (dis2BaseLine < line) {
newPosition.x = ((sin(angle) * r) + halfWidth) - line;
newPosition.z = (r - (cos(angle) * r)) * 0.5;
}
vec2 finalPosition = vec2(newPosition.xy);
finalPosition = rotateOrigin(-rotateAngle) * finalPosition;
gl_Position = (projectionMatrix * modelViewMatrix) * vec4(finalPosition.xy, newPosition.z, 1.0);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
varying float shadowAlpha;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec4 shadow = vec4(0.0, 0.0, 0.0, shadowAlpha);
gl_FragColor = blendSrcOver(shadow, srcColor);
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform float timePercent;
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float segmentWidth;
uniform float segmentHeight;
uniform int option;
varying vec2 vUv;
mat4 rotateX(float angle) {
return mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), sin(angle), 0.0, 0.0, -sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
}
void main() {
float halfWidth = (segmentWidth * horizontalSegments) * 0.5;
float halfHeight = (segmentHeight * verticalSegments) * 0.5;
vUv = uv;
vec4 newPosition = vec4(position, 1.0);
float progress = option == 0 ? halfWidth - newPosition.x : halfWidth + newPosition.x;
float delay = interpolationFloat(0.0, 0.08, 0.0, halfWidth * 2.0, progress, 0);
float arc = halfHeight - newPosition.y;
float L;
if (timePercent < 0.8) {
L = interpolationFloat(halfHeight * 4.0, halfHeight * 22.0, 0.3 + delay, 0.8, timePercent, 0);
}
else {
L = interpolationFloat(halfHeight * 22.0, halfHeight * 300.0, 0.8, 1.0, timePercent, 0);
}
float r = L / (2.0 * PI);
float angle = PI - (arc / r);
float y = sin(angle) * r;
float z = cos(angle) * r;
newPosition.y = halfHeight - y;
newPosition.z = (z + r) * 0.45;
float rotateAngle = interpolationFloat(-PI * 0.5, 0.0, 0.0 + delay, 0.4, timePercent, 0);
newPosition.y -= halfHeight;
newPosition = rotateX(rotateAngle) * newPosition;
newPosition.y += halfHeight;
float backRotate1 = interpolationFloat(0.0, PI * 0.03, 0.75, 0.9, timePercent, 0);
newPosition.y -= halfHeight;
newPosition = rotateX(backRotate1) * newPosition;
newPosition.y += halfHeight;
float backRotate2 = interpolationFloat(0.0, -PI * 0.03, 0.8, 1.0, timePercent, 0);
newPosition.y -= halfHeight;
newPosition = rotateX(backRotate2) * newPosition;
newPosition.y += halfHeight;
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
float alpha = interpolationFloat(0.0, 0.6, 0.5, 1.0, timePercent, 0);
vec4 shadow = vec4(0.0, 0.0, 0.0, 0.0);
gl_FragColor = blendSrcOver(shadow, distColor);
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float width;
uniform float height;
varying vec2 vUv;
vec2 transform(vec2 uv) {
uv.y = (uv.y * height) / width;
return uv - vec2(0.5, (0.5 * height) / width);
}
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
float shadowAngle = PI / 6.0;
float clockAngle;
vec2 a;
vec2 b = transform(vUv);
float angle;
if (timePercent < 0.5) {
a = vec2(0.0, 0.5);
clockAngle = interpolationFloat(0.0, PI, 0.0, 0.5, timePercent, 0);
if (b.x > 0.0) {
angle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));
if (angle < clockAngle) {
if (angle > (clockAngle - shadowAngle)) {
float shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);
srcColor.a = shadowAlpha;
}
else {
srcColor.a = 0.0;
}
}
}
else {
srcColor.a = 1.0;
}
}
else {
a = vec2(0.0, -0.5);
clockAngle = interpolationFloat(0.0, PI + shadowAngle, 0.5, 1.0, timePercent, 0);
if (b.x <= 0.0) {
angle = acos(((a.x * b.x) + (a.y * b.y)) / (sqrt((a.x * a.x) + (a.y * a.y)) * sqrt((b.x * b.x) + (b.y * b.y))));
if (angle < clockAngle) {
if (angle > (clockAngle - shadowAngle)) {
float shadowAlpha = interpolationFloat(1.0, 0.0, 0.0, 1.0, abs(clockAngle - angle) / shadowAngle, 0);
srcColor.a = shadowAlpha;
}
else {
srcColor.a = 0.0;
}
}
}
else {
srcColor.a = 0.0;
}
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float width;
uniform float height;
uniform int option;
varying vec2 vUv;
void main() {
vec2 uv = vUv;
bool useSrc = false;
vec2 row;
float delay = 0.02;
bool isVert = bool(option);
int segmentCount = isVert ? 10 : 7;
float axis = isVert ? uv.y : uv.x;
float compareAxis = isVert ? uv.x : uv.y;
for (int i = 0; i < segmentCount; i++) {
float fi = float(i);
row.r = (fi * 1.0) / float(segmentCount);
row.g = (float(i + 1) * 1.0) / float(segmentCount);
if ((compareAxis <= row.g) && (compareAxis > row.r)) {
if ((i % 2) == 0) {
float line = interpolationFloat(0.0, 1.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);
if (axis < line) {
useSrc = false;
}
else {
axis -= line;
useSrc = true;
}
}
else {
float line = interpolationFloat(1.0, 0.0, delay * fi, (delay * fi) + 0.86, timePercent, 1);
if (axis < line) {
axis = (1.0 - line) + axis;
useSrc = true;
}
else {
useSrc = false;
}
}
break;
}
}
if (isVert) {
uv.y = axis;
}
else {
uv.x = axis;
}
vec4 srcColor = texture2D(texturePrev, uv);
vec4 distColor = texture2D(textureNext, uv);
gl_FragColor = useSrc ? srcColor : distColor;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform float width;
uniform float height;
uniform int option;
varying vec2 vUv;
void main() {
vec2 uvSrc = vUv;
vec2 uvDist = vUv;
float scaleSrc = option == 1 ? interpolationFloat(1.0, 2.0, 0.0, 1.0, timePercent, 0) : interpolationFloat(1.0, 0.1, 0.0, 1.0, timePercent, 0);
float scaleDist = option == 1 ? interpolationFloat(0.1, 1.0, 0.0, 1.0, timePercent, 0) : interpolationFloat(2.0, 1.0, 0.0, 1.0, timePercent, 0);
uvSrc -= 0.5;
uvSrc *= scaleSrc;
uvSrc += 0.5;
uvDist -= 0.5;
uvDist *= scaleDist;
uvDist += 0.5;
vec4 srcColor = texture2D(texturePrev, uvSrc);
srcColor.a = interpolationFloat(1.0, 0.0, 0.0, 1.0, timePercent, 0);
vec4 distColor;
if ((((uvDist.x > 1.0) || (uvDist.x < 0.0)) || (uvDist.y > 1.0)) || (uvDist.y < 0.0)) {
distColor = vec4(0.0, 0.0, 0.0, 1.0);
}
else {
distColor = texture2D(textureNext, uvDist);
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
#define PI 3.14159265358
uniform float timePercent;
uniform float horizontalSegments;
uniform float verticalSegments;
uniform float segmentWidth;
uniform float segmentHeight;
uniform int option;
varying vec2 vUv;
mat4 rotateY(float angle) {
if (option == 1) {
angle *= -1.0;
}
return mat4(cos(angle), 0.0, sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, -sin(angle), 0.0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
}
void main() {
float halfWidth = (segmentWidth * horizontalSegments) * 0.5;
float halfHeight = (segmentHeight * verticalSegments) * 0.5;
vUv = uv;
vec4 newPosition = vec4(position, 1.0);
float stageOneAngle = PI / 14.0;
float stageTwoAngle = (PI * 12.0) / 14.0;
float stage_1 = 0.1;
float stage_2 = 0.8;
if (timePercent < 0.5) {
newPosition.z = interpolationFloat(0.0, -100.0, 0.0, 0.5, timePercent, 0);
}
else {
newPosition.z = interpolationFloat(-100.0, 0.0, 0.5, 1.0, timePercent, 0);
}
if (timePercent < stage_1) {
float angle = interpolationFloat(0.0, stageOneAngle, 0.0, stage_1, timePercent, 0);
newPosition.x += halfWidth;
newPosition *= rotateY(angle);
newPosition.x -= halfWidth;
}
else if ((timePercent >= stage_1) && (timePercent < stage_2)) {
if (timePercent > 0.5) {
newPosition *= rotateY(PI);
}
float offset = halfWidth - (sin((PI * 0.5) - stageOneAngle) * halfWidth);
float angle = interpolationFloat(0.0, stageTwoAngle, stage_1, stage_2, timePercent, 0);
newPosition *= rotateY(angle);
newPosition.x += halfWidth;
newPosition *= rotateY(stageOneAngle);
newPosition.x -= halfWidth;
newPosition.x += interpolationFloat(0.0, 2.0 * offset, stage_1, stage_2, timePercent, 0);
}
else {
float angle = interpolationFloat(-stageOneAngle, 0.0, stage_2, 1.0, timePercent, 0);
newPosition.x -= halfWidth;
newPosition *= rotateY(angle);
newPosition.x += halfWidth;
}
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
gl_FragColor = timePercent < 0.5 ? srcColor : distColor;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
#define PI 3.14159265358
uniform sampler2D texturePrev;
uniform sampler2D textureNext;
uniform float timePercent;
uniform int option;
varying vec2 vUv;
mat2 rotateOrigin(float angle) {
return mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
}
void main() {
float alphaStart;
float alphaEnd;
float rectStart;
float rectEnd;
bool isRevert = (option == 3) || (option == 2);
bool rotateParam = (option == 3) || (option == 1);
if (timePercent <= 0.33) {
alphaStart = isRevert ? 1.0 - (timePercent / 0.33) : 1.0;
alphaEnd = isRevert ? 1.0 : 1.0 - (timePercent / 0.33);
rectStart = isRevert ? 0.0 : 1.5;
rectEnd = isRevert ? 0.5 : 2.0;
}
else if ((timePercent > 0.33) && (timePercent <= 0.66)) {
alphaStart = isRevert ? 0.0 : 1.0;
alphaEnd = isRevert ? 1.0 : 0.0;
rectEnd = isRevert ? (((timePercent - 0.33) / 0.33) * 1.5) + 0.5 : 2.0 - (((timePercent - 0.33) / 0.33) * 1.5);
rectStart = rectEnd - 0.5;
}
else {
alphaStart = isRevert ? 0.0 : (1.0 - timePercent) / (1.0 - 0.66);
alphaEnd = isRevert ? (1.0 - timePercent) / (1.0 - 0.66) : 0.0;
rectStart = isRevert ? 1.5 : 0.0;
rectEnd = isRevert ? 2.0 : 0.5;
}
if (!rotateParam) {
rectStart -= 1.0;
rectEnd -= 1.0;
}
float rotate = rotateParam ? PI * 0.25 : PI * 0.75;
vec2 rotateUv = vUv * rotateOrigin(rotate);
vec4 srcColor = texture2D(texturePrev, vUv);
vec4 distColor = texture2D(textureNext, vUv);
vec2 startPoint = vec2(rectStart, 0.0) * rotateOrigin(rotate);
vec2 endPoint = vec2(rectEnd, 0.0) * rotateOrigin(rotate);
if (rotateParam) {
if (rotateUv.x >= endPoint.x) {
srcColor.a = isRevert ? 1.0 : 0.0;
}
else if (rotateUv.x <= startPoint.x) {
srcColor.a = isRevert ? 0.0 : 1.0;
}
else {
srcColor.a = alphaStart + (((rotateUv.x - startPoint.x) / (0.5 / sqrt(2.0))) * (alphaEnd - alphaStart));
}
}
else {
if (rotateUv.x <= endPoint.x) {
srcColor.a = isRevert ? 1.0 : 0.0;
}
else if (rotateUv.x >= startPoint.x) {
srcColor.a = isRevert ? 0.0 : 1.0;
}
else {
srcColor.a = alphaStart + (((startPoint.x - rotateUv.x) / (0.5 / sqrt(2.0))) * (alphaEnd - alphaStart));
}
}
gl_FragColor = blendSrcOver(srcColor, distColor);
}
`},function(et,_e){et.exports=`#define PI 3.14159265
attribute float left;
uniform float timePercent;
uniform float offset;
varying vec2 vUv;
uniform float option;
void main() {
vUv = uv;
float angle;
if (left > 0.0) {
angle = (PI / 6.0) * timePercent;
}
else {
angle = (-PI / 6.0) * timePercent;
}
if (option > 0.5) {
if (left > 0.0) {
angle = (-PI / 6.0) * timePercent;
}
else {
angle = (PI / 6.0) * timePercent;
}
}
vec4 newPosition = vec4(position, 1.0);
mat4 transform;
mat4 rotateY = mat4(cos(angle), 0.0, -sin(angle), 0.0, 0.0, 1.0, 0.0, 0.0, sin(angle), 0, cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
if (option > 0.5) {
rotateY = mat4(1.0, 0.0, 0.0, 0.0, 0.0, cos(angle), -sin(angle), 0.0, 0.0, sin(angle), cos(angle), 0.0, 0.0, 0.0, 0.0, 1.0);
}
if (option > 0.5) {
if (left > 0.0) {
transform = rotateY * mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, offset * timePercent, 0.0, 1.0);
}
else {
transform = rotateY * mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -offset * timePercent, 0.0, 1.0);
}
}
else {
if (left > 0.0) {
transform = rotateY * mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -offset * timePercent, 0.0, 0.0, 1.0);
}
else {
transform = rotateY * mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, offset * timePercent, 0.0, 0.0, 1.0);
}
}
newPosition = transform * newPosition;
gl_Position = (projectionMatrix * modelViewMatrix) * newPosition;
}
`},function(et,_e){et.exports=`uniform sampler2D prevTexture;
uniform float timePercent;
varying vec2 vUv;
void main() {
vec4 color = texture2D(prevTexture, vUv);
color.a = 1.0 - timePercent;
gl_FragColor = color;
}
`},function(et,_e,tt){(function(rt){var nt=tt(109),st=tt(110),dt=setTimeout;function ft(wt){return!!(wt&&wt.length!==void 0)}function ht(){}function mt(wt){if(!(this instanceof mt))throw new TypeError("Promises must be constructed via new");if(typeof wt!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Tt(wt,this)}function bt(wt,At){for(;wt._state===3;)wt=wt._value;wt._state!==0?(wt._handled=!0,mt._immediateFn(function(){var Nt=wt._state===1?At.onFulfilled:At.onRejected;if(Nt!==null){var Pt;try{Pt=Nt(wt._value)}catch(It){return void Et(At.promise,It)}St(At.promise,Pt)}else(wt._state===1?St:Et)(At.promise,wt._value)})):wt._deferreds.push(At)}function St(wt,At){try{if(At===wt)throw new TypeError("A promise cannot be resolved with itself.");if(At&&(typeof At=="object"||typeof At=="function")){var Nt=At.then;if(At instanceof mt)return wt._state=3,wt._value=At,void Ct(wt);if(typeof Nt=="function")return void Tt((Pt=Nt,It=At,function(){Pt.apply(It,arguments)}),wt)}wt._state=1,wt._value=At,Ct(wt)}catch(Ft){Et(wt,Ft)}var Pt,It}function Et(wt,At){wt._state=2,wt._value=At,Ct(wt)}function Ct(wt){wt._state===2&&wt._deferreds.length===0&&mt._immediateFn(function(){wt._handled||mt._unhandledRejectionFn(wt._value)});for(var At=0,Nt=wt._deferreds.length;At<Nt;At++)bt(wt,wt._deferreds[At]);wt._deferreds=null}function Rt(wt,At,Nt){this.onFulfilled=typeof wt=="function"?wt:null,this.onRejected=typeof At=="function"?At:null,this.promise=Nt}function Tt(wt,At){var Nt=!1;try{wt(function(Pt){Nt||(Nt=!0,St(At,Pt))},function(Pt){Nt||(Nt=!0,Et(At,Pt))})}catch(Pt){if(Nt)return;Nt=!0,Et(At,Pt)}}mt.prototype.catch=function(wt){return this.then(null,wt)},mt.prototype.then=function(wt,At){var Nt=new this.constructor(ht);return bt(this,new Rt(wt,At,Nt)),Nt},mt.prototype.finally=nt.a,mt.all=function(wt){return new mt(function(At,Nt){if(!ft(wt))return Nt(new TypeError("Promise.all accepts an array"));var Pt=Array.prototype.slice.call(wt);if(Pt.length===0)return At([]);var It=Pt.length;function Ft(Vt,Kt){try{if(Kt&&(typeof Kt=="object"||typeof Kt=="function")){var jt=Kt.then;if(typeof jt=="function")return void jt.call(Kt,function(Ut){Ft(Vt,Ut)},Nt)}Pt[Vt]=Kt,--It==0&&At(Pt)}catch(Ut){Nt(Ut)}}for(var qt=0;qt<Pt.length;qt++)Ft(qt,Pt[qt])})},mt.allSettled=st.a,mt.resolve=function(wt){return wt&&typeof wt=="object"&&wt.constructor===mt?wt:new mt(function(At){At(wt)})},mt.reject=function(wt){return new mt(function(At,Nt){Nt(wt)})},mt.race=function(wt){return new mt(function(At,Nt){if(!ft(wt))return Nt(new TypeError("Promise.race accepts an array"));for(var Pt=0,It=wt.length;Pt<It;Pt++)mt.resolve(wt[Pt]).then(At,Nt)})},mt._immediateFn=typeof rt=="function"&&function(wt){rt(wt)}||function(wt){dt(wt,0)},mt._unhandledRejectionFn=function(wt){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",wt)},_e.a=mt}).call(this,tt(140).setImmediate)},function(et,_e,tt){_e.a=function(rt){var nt=this.constructor;return this.then(function(st){return nt.resolve(rt()).then(function(){return st})},function(st){return nt.resolve(rt()).then(function(){return nt.reject(st)})})}},function(et,_e,tt){_e.a=function(rt){return new this(function(nt,st){if(!rt||rt.length===void 0)return st(new TypeError(typeof rt+" "+rt+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var dt=Array.prototype.slice.call(rt);if(dt.length===0)return nt([]);var ft=dt.length;function ht(bt,St){if(St&&(typeof St=="object"||typeof St=="function")){var Et=St.then;if(typeof Et=="function")return void Et.call(St,function(Ct){ht(bt,Ct)},function(Ct){dt[bt]={status:"rejected",reason:Ct},--ft==0&&nt(dt)})}dt[bt]={status:"fulfilled",value:St},--ft==0&&nt(dt)}for(var mt=0;mt<dt.length;mt++)ht(mt,dt[mt])})}},function(et,_e,tt){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var rt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;function dt(ft){if(ft==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(ft)}et.exports=(function(){try{if(!Object.assign)return!1;var ft=new String("abc");if(ft[5]="de",Object.getOwnPropertyNames(ft)[0]==="5")return!1;for(var ht={},mt=0;mt<10;mt++)ht["_"+String.fromCharCode(mt)]=mt;if(Object.getOwnPropertyNames(ht).map(function(St){return ht[St]}).join("")!=="0123456789")return!1;var bt={};return"abcdefghijklmnopqrst".split("").forEach(function(St){bt[St]=St}),Object.keys(Object.assign({},bt)).join("")==="abcdefghijklmnopqrst"}catch{return!1}})()?Object.assign:function(ft,ht){for(var mt,bt,St=dt(ft),Et=1;Et<arguments.length;Et++){for(var Ct in mt=Object(arguments[Et]))nt.call(mt,Ct)&&(St[Ct]=mt[Ct]);if(rt){bt=rt(mt);for(var Rt=0;Rt<bt.length;Rt++)st.call(mt,bt[Rt])&&(St[bt[Rt]]=mt[bt[Rt]])}}return St}},function(et,_e,tt){var rt=tt(20),nt=tt(15);et.exports=function(st){return st===!0||st===!1||nt(st)&&rt(st)=="[object Boolean]"}},function(et,_e){et.exports=`precision mediump float;
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
varying vec2 filterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition() {
vec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord() {
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main() {
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
filterCoord = aVertexPosition * outputFrame.zw;
}
`},function(et,_e){et.exports=`vec4 blendSrcOver(vec4 src, vec4 dist) {
vec4 result = vec4(0.0, 0.0, 0.0, 0.0);
src.r *= src.a;
src.g *= src.a;
src.b *= src.a;
result.a = src.a + (dist.a * (1.0 - src.a));
result.r = (src.r + (dist.r * (1.0 - src.a))) / result.a;
result.g = (src.g + (dist.g * (1.0 - src.a))) / result.a;
result.b = (src.b + (dist.b * (1.0 - src.a))) / result.a;
return result;
}
precision mediump float;
varying vec2 vTextureCoord;
varying vec2 filterCoord;
uniform vec4 uShapeFilterArea;
uniform sampler2D uSampler;
uniform sampler2D uSdfSampler;
uniform float uSdfIsReady;
uniform float uSdfMaxDis;
uniform float uRad;
uniform vec4 uGlowColor;
uniform vec2 uSdfPosition;
uniform vec4 inputSize;
uniform vec4 outputFrame;
void main() {
vec4 texColor = texture2D(uSampler, vTextureCoord);
vec4 glowColor = vec4(uGlowColor.rgb * uGlowColor.a, uGlowColor.a);
float a = 1.0;
if (uSdfIsReady > 0.0) {
vec2 cod = vec2(filterCoord.x / uShapeFilterArea.z, filterCoord.y / uShapeFilterArea.w);
vec4 sdfColor = texture2D(uSdfSampler, cod + uSdfPosition);
float dis = sdfColor.a * uSdfMaxDis;
if ((sdfColor.r <= 0.0) && (dis >= (uRad * 0.5))) {
a = 1.0 - smoothstep(uRad * 0.5, uRad, dis);
}
}
vec4 resultColor = blendSrcOver(texColor, glowColor);
resultColor.rgb *= resultColor.a;
resultColor.rgb *= a;
resultColor.a *= a;
gl_FragColor = uSdfIsReady > 0.0 ? resultColor : texColor;
}
`},function(et,_e){et.exports=`precision mediump float;
varying vec2 vTextureCoord;
varying vec2 filterCoord;
uniform vec4 uShapeFilterArea;
uniform sampler2D uSampler;
uniform sampler2D uSdfSampler;
uniform float uSdfIsReady;
uniform float uSdfMaxDis;
uniform float uRad;
uniform vec4 inputSize;
uniform vec4 outputFrame;
void main() {
vec4 texColor = texture2D(uSampler, vTextureCoord);
float alpha = texColor.a;
texColor /= texColor.a;
if (uSdfIsReady > 0.0) {
float dx = uShapeFilterArea.x < 0.0 ? -uShapeFilterArea.x : 0.0;
float dy = uShapeFilterArea.y < 0.0 ? -uShapeFilterArea.y : 0.0;
vec2 cod = vec2((filterCoord.x + dx) / uShapeFilterArea.z, (filterCoord.y + dy) / uShapeFilterArea.w);
vec4 sdfColor = texture2D(uSdfSampler, cod);
float dis = sdfColor.a * uSdfMaxDis;
if (texColor.a > 0.0392156862745098) {
if (dis <= (uRad / 2.0)) {
float a = smoothstep(0.0, uRad / 2.0, dis) * 0.1;
texColor.rgb *= a;
texColor.a = a;
}
else if ((dis > (uRad / 2.0)) && (dis < (uRad * 1.2))) {
float a = (smoothstep(uRad / 2.0, uRad * 1.2, dis) * 0.9) + 0.1;
texColor.rgb *= a;
texColor.a = a;
}
}
else {
texColor.rgba *= 0.0;
}
}
texColor *= alpha;
gl_FragColor = texColor;
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
void main() {
vec4 sourceColor = texture2D(uSampler, vTextureCoord);
if (sourceColor.a == 0.0) {
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
else {
gl_FragColor = uColor * sourceColor.a;
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform sampler2D uSampler;
uniform vec4 filterArea;
uniform float uStartAlpha;
uniform float uEndAlpha;
uniform float uStartPos;
uniform float uEndPos;
uniform float uHeight;
void main() {
vec4 sourceColor = texture2D(uSampler, vTextureCoord);
vec2 cod = vTextureCoord * inputSize.xy;
float startY = uStartPos * uHeight;
float endY = uEndPos * uHeight;
if ((cod.y >= startY) && (cod.y <= endY)) {
float alpha = uStartAlpha - (((cod.y - startY) / (endY - startY)) * (uStartAlpha - uEndAlpha));
gl_FragColor = sourceColor * alpha;
}
else {
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
}
`},function(et,_e){et.exports=`precision mediump float;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
varying vec2 filterCoord;
uniform vec4 uShapeFilterArea;
uniform sampler2D uSampler;
void main() {
vec4 texColor = texture2D(uSampler, vTextureCoord);
if (texColor.r > 0.0) {
vec2 translateCoord = vec2(filterCoord.x + 10.0, filterCoord.y);
vec4 translateColor = texture2D(uSampler, translateCoord * inputSize.zw);
if (translateColor.a > 0.0) {
gl_FragColor = texColor;
}
else {
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
}
}
else {
gl_FragColor = texColor;
}
}
`},function(et,_e,tt){var rt;(function(nt,st){var dt="model",ft="name",ht="type",mt="vendor",bt="version",St="mobile",Et="tablet",Ct="smarttv",Rt=function(jt){for(var Ut={},Ot=0;Ot<jt.length;Ot++)Ut[jt[Ot].toUpperCase()]=jt[Ot];return Ut},Tt=function(jt,Ut){return typeof jt=="string"&&wt(Ut).indexOf(wt(jt))!==-1},wt=function(jt){return jt.toLowerCase()},At=function(jt,Ut){if(typeof jt=="string")return jt=jt.replace(/^\s\s*/,"").replace(/\s\s*$/,""),Ut===void 0?jt:jt.substring(0,255)},Nt=function(jt,Ut){for(var Ot,Wt,Bt,tr,Jt,ar,pr=0;pr<Ut.length&&!Jt;){var cr=Ut[pr],gr=Ut[pr+1];for(Ot=Wt=0;Ot<cr.length&&!Jt;)if(Jt=cr[Ot++].exec(jt))for(Bt=0;Bt<gr.length;Bt++)ar=Jt[++Wt],typeof(tr=gr[Bt])=="object"&&tr.length>0?tr.length===2?typeof tr[1]=="function"?this[tr[0]]=tr[1].call(this,ar):this[tr[0]]=tr[1]:tr.length===3?typeof tr[1]!="function"||tr[1].exec&&tr[1].test?this[tr[0]]=ar?ar.replace(tr[1],tr[2]):void 0:this[tr[0]]=ar?tr[1].call(this,ar,tr[2]):void 0:tr.length===4&&(this[tr[0]]=ar?tr[3].call(this,ar.replace(tr[1],tr[2])):void 0):this[tr]=ar||void 0;pr+=2}},Pt=function(jt,Ut){for(var Ot in Ut)if(typeof Ut[Ot]=="object"&&Ut[Ot].length>0){for(var Wt=0;Wt<Ut[Ot].length;Wt++)if(Tt(Ut[Ot][Wt],jt))return Ot==="?"?void 0:Ot}else if(Tt(Ut[Ot],jt))return Ot==="?"?void 0:Ot;return jt},It={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ft={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[bt,[ft,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[bt,[ft,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ft,bt],[/opios[\/ ]+([\w\.]+)/i],[bt,[ft,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[bt,[ft,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[ft,bt],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[bt,[ft,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[bt,[ft,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[bt,[ft,"WeChat"]],[/konqueror\/([\w\.]+)/i],[bt,[ft,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[bt,[ft,"IE"]],[/yabrowser\/([\w\.]+)/i],[bt,[ft,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[ft,/(.+)/,"$1 Secure Browser"],bt],[/\bfocus\/([\w\.]+)/i],[bt,[ft,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[bt,[ft,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[bt,[ft,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[bt,[ft,"Dolphin"]],[/coast\/([\w\.]+)/i],[bt,[ft,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[bt,[ft,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[bt,[ft,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[ft,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[ft,/(.+)/,"$1 Browser"],bt],[/(comodo_dragon)\/([\w\.]+)/i],[[ft,/_/g," "],bt],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[ft,bt],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[ft],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ft,"Facebook"],bt],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[ft,bt],[/\bgsa\/([\w\.]+) .*safari\//i],[bt,[ft,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[bt,[ft,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ft,"Chrome WebView"],bt],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[bt,[ft,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ft,bt],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[bt,[ft,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[bt,ft],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ft,[bt,Pt,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[ft,bt],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ft,"Netscape"],bt],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[bt,[ft,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[ft,bt]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",wt]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",wt]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",wt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[dt,[mt,"Samsung"],[ht,Et]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[dt,[mt,"Samsung"],[ht,St]],[/\((ip(?:hone|od)[\w ]*);/i],[dt,[mt,"Apple"],[ht,St]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[dt,[mt,"Apple"],[ht,Et]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[dt,[mt,"Huawei"],[ht,Et]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[dt,[mt,"Huawei"],[ht,St]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[dt,/_/g," "],[mt,"Xiaomi"],[ht,St]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[dt,/_/g," "],[mt,"Xiaomi"],[ht,Et]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[dt,[mt,"OPPO"],[ht,St]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[dt,[mt,"Vivo"],[ht,St]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[dt,[mt,"Realme"],[ht,St]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[dt,[mt,"Motorola"],[ht,St]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[dt,[mt,"Motorola"],[ht,Et]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[dt,[mt,"LG"],[ht,Et]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[dt,[mt,"LG"],[ht,St]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[dt,[mt,"Lenovo"],[ht,Et]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[dt,/_/g," "],[mt,"Nokia"],[ht,St]],[/(pixel c)\b/i],[dt,[mt,"Google"],[ht,Et]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[dt,[mt,"Google"],[ht,St]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[dt,[mt,"Sony"],[ht,St]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[dt,"Xperia Tablet"],[mt,"Sony"],[ht,Et]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[dt,[mt,"OnePlus"],[ht,St]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[dt,[mt,"Amazon"],[ht,Et]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[dt,/(.+)/g,"Fire Phone $1"],[mt,"Amazon"],[ht,St]],[/(playbook);[-\w\),; ]+(rim)/i],[dt,mt,[ht,Et]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[dt,[mt,"BlackBerry"],[ht,St]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[dt,[mt,"ASUS"],[ht,Et]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[dt,[mt,"ASUS"],[ht,St]],[/(nexus 9)/i],[dt,[mt,"HTC"],[ht,Et]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[mt,[dt,/_/g," "],[ht,St]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[dt,[mt,"Acer"],[ht,Et]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[dt,[mt,"Meizu"],[ht,St]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[dt,[mt,"Sharp"],[ht,St]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[mt,dt,[ht,St]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[mt,dt,[ht,Et]],[/(surface duo)/i],[dt,[mt,"Microsoft"],[ht,Et]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[dt,[mt,"Fairphone"],[ht,St]],[/(u304aa)/i],[dt,[mt,"AT&T"],[ht,St]],[/\bsie-(\w*)/i],[dt,[mt,"Siemens"],[ht,St]],[/\b(rct\w+) b/i],[dt,[mt,"RCA"],[ht,Et]],[/\b(venue[\d ]{2,7}) b/i],[dt,[mt,"Dell"],[ht,Et]],[/\b(q(?:mv|ta)\w+) b/i],[dt,[mt,"Verizon"],[ht,Et]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[dt,[mt,"Barnes & Noble"],[ht,Et]],[/\b(tm\d{3}\w+) b/i],[dt,[mt,"NuVision"],[ht,Et]],[/\b(k88) b/i],[dt,[mt,"ZTE"],[ht,Et]],[/\b(nx\d{3}j) b/i],[dt,[mt,"ZTE"],[ht,St]],[/\b(gen\d{3}) b.+49h/i],[dt,[mt,"Swiss"],[ht,St]],[/\b(zur\d{3}) b/i],[dt,[mt,"Swiss"],[ht,Et]],[/\b((zeki)?tb.*\b) b/i],[dt,[mt,"Zeki"],[ht,Et]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[mt,"Dragon Touch"],dt,[ht,Et]],[/\b(ns-?\w{0,9}) b/i],[dt,[mt,"Insignia"],[ht,Et]],[/\b((nxa|next)-?\w{0,9}) b/i],[dt,[mt,"NextBook"],[ht,Et]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[mt,"Voice"],dt,[ht,St]],[/\b(lvtel\-)?(v1[12]) b/i],[[mt,"LvTel"],dt,[ht,St]],[/\b(ph-1) /i],[dt,[mt,"Essential"],[ht,St]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[dt,[mt,"Envizen"],[ht,Et]],[/\b(trio[-\w\. ]+) b/i],[dt,[mt,"MachSpeed"],[ht,Et]],[/\btu_(1491) b/i],[dt,[mt,"Rotor"],[ht,Et]],[/(shield[\w ]+) b/i],[dt,[mt,"Nvidia"],[ht,Et]],[/(sprint) (\w+)/i],[mt,dt,[ht,St]],[/(kin\.[onetw]{3})/i],[[dt,/\./g," "],[mt,"Microsoft"],[ht,St]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[dt,[mt,"Zebra"],[ht,Et]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[dt,[mt,"Zebra"],[ht,St]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[mt,dt,[ht,"console"]],[/droid.+; (shield) bui/i],[dt,[mt,"Nvidia"],[ht,"console"]],[/(playstation [345portablevi]+)/i],[dt,[mt,"Sony"],[ht,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[dt,[mt,"Microsoft"],[ht,"console"]],[/smart-tv.+(samsung)/i],[mt,[ht,Ct]],[/hbbtv.+maple;(\d+)/i],[[dt,/^/,"SmartTV"],[mt,"Samsung"],[ht,Ct]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[mt,"LG"],[ht,Ct]],[/(apple) ?tv/i],[mt,[dt,"Apple TV"],[ht,Ct]],[/crkey/i],[[dt,"Chromecast"],[mt,"Google"],[ht,Ct]],[/droid.+aft(\w)( bui|\))/i],[dt,[mt,"Amazon"],[ht,Ct]],[/\(dtv[\);].+(aquos)/i],[dt,[mt,"Sharp"],[ht,Ct]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[mt,At],[dt,At],[ht,Ct]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[ht,Ct]],[/((pebble))app/i],[mt,dt,[ht,"wearable"]],[/droid.+; (glass) \d/i],[dt,[mt,"Google"],[ht,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[dt,[mt,"Zebra"],[ht,"wearable"]],[/(quest( 2)?)/i],[dt,[mt,"Facebook"],[ht,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[mt,[ht,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[dt,[ht,St]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[dt,[ht,Et]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[ht,Et]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[ht,St]],[/(android[-\w\. ]{0,9});.+buil/i],[dt,[mt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[bt,[ft,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[bt,[ft,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[ft,bt],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[bt,ft]],os:[[/microsoft (windows) (vista|xp)/i],[ft,bt],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[ft,[bt,Pt,It]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[ft,"Windows"],[bt,Pt,It]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[bt,/_/g,"."],[ft,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ft,"Mac OS"],[bt,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[bt,ft],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[ft,bt],[/\(bb(10);/i],[bt,[ft,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[bt,[ft,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[bt,[ft,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[bt,[ft,"webOS"]],[/crkey\/([\d\.]+)/i],[bt,[ft,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[ft,"Chromium OS"],bt],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ft,bt],[/(sunos) ?([\w\.\d]*)/i],[[ft,"Solaris"],bt],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[ft,bt]]},qt=function(jt,Ut){if(typeof jt=="object"&&(Ut=jt,jt=void 0),!(this instanceof qt))return new qt(jt,Ut).getResult();var Ot=jt||(nt!==void 0&&nt.navigator&&nt.navigator.userAgent?nt.navigator.userAgent:""),Wt=Ut?(function(Bt,tr){var Jt={};for(var ar in Bt)tr[ar]&&tr[ar].length%2==0?Jt[ar]=tr[ar].concat(Bt[ar]):Jt[ar]=Bt[ar];return Jt})(Ft,Ut):Ft;return this.getBrowser=function(){var Bt,tr={};return tr[ft]=void 0,tr[bt]=void 0,Nt.call(tr,Ot,Wt.browser),tr.major=typeof(Bt=tr.version)=="string"?Bt.replace(/[^\d\.]/g,"").split(".")[0]:void 0,tr},this.getCPU=function(){var Bt={architecture:void 0};return Nt.call(Bt,Ot,Wt.cpu),Bt},this.getDevice=function(){var Bt={vendor:void 0,model:void 0,type:void 0};return Nt.call(Bt,Ot,Wt.device),Bt},this.getEngine=function(){var Bt={name:void 0,version:void 0};return Nt.call(Bt,Ot,Wt.engine),Bt},this.getOS=function(){var Bt={name:void 0,version:void 0};return Nt.call(Bt,Ot,Wt.os),Bt},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ot},this.setUA=function(Bt){return Ot=typeof Bt=="string"&&Bt.length>255?At(Bt,255):Bt,this},this.setUA(Ot),this};qt.VERSION="1.0.2",qt.BROWSER=Rt([ft,bt,"major"]),qt.CPU=Rt(["architecture"]),qt.DEVICE=Rt([dt,mt,ht,"console",St,Ct,Et,"wearable","embedded"]),qt.ENGINE=qt.OS=Rt([ft,bt]),_e!==void 0?(et!==void 0&&et.exports&&(_e=et.exports=qt),_e.UAParser=qt):tt(149)?(rt=(function(){return qt}).call(_e,tt,_e,et))===void 0||(et.exports=rt):nt!==void 0&&(nt.UAParser=qt);var Vt=nt!==void 0&&(nt.jQuery||nt.Zepto);if(Vt&&!Vt.ua){var Kt=new qt;Vt.ua=Kt.getResult(),Vt.ua.get=function(){return Kt.getUA()},Vt.ua.set=function(jt){Kt.setUA(jt);var Ut=Kt.getResult();for(var Ot in Ut)Vt.ua[Ot]=Ut[Ot]}}})(typeof window=="object"?window:this)},function(et,_e,tt){(function(rt){var nt;/*!
* howler.js v2.2.3
* howlerjs.com
*
* (c) 2013-2020, James Simpson of GoldFire Studios
* goldfirestudios.com
*
* MIT License
*/(function(){var st=function(){this.init()};st.prototype={init:function(){var Tt=this||dt;return Tt._counter=1e3,Tt._html5AudioPool=[],Tt.html5PoolSize=10,Tt._codecs={},Tt._howls=[],Tt._muted=!1,Tt._volume=1,Tt._canPlayEvent="canplaythrough",Tt._navigator=typeof window<"u"&&window.navigator?window.navigator:null,Tt.masterGain=null,Tt.noAudio=!1,Tt.usingWebAudio=!0,Tt.autoSuspend=!0,Tt.ctx=null,Tt.autoUnlock=!0,Tt._setup(),Tt},volume:function(Tt){var wt=this||dt;if(Tt=parseFloat(Tt),wt.ctx||Rt(),Tt!==void 0&&Tt>=0&&Tt<=1){if(wt._volume=Tt,wt._muted)return wt;wt.usingWebAudio&&wt.masterGain.gain.setValueAtTime(Tt,dt.ctx.currentTime);for(var At=0;At<wt._howls.length;At++)if(!wt._howls[At]._webAudio)for(var Nt=wt._howls[At]._getSoundIds(),Pt=0;Pt<Nt.length;Pt++){var It=wt._howls[At]._soundById(Nt[Pt]);It&&It._node&&(It._node.volume=It._volume*Tt)}return wt}return wt._volume},mute:function(Tt){var wt=this||dt;wt.ctx||Rt(),wt._muted=Tt,wt.usingWebAudio&&wt.masterGain.gain.setValueAtTime(Tt?0:wt._volume,dt.ctx.currentTime);for(var At=0;At<wt._howls.length;At++)if(!wt._howls[At]._webAudio)for(var Nt=wt._howls[At]._getSoundIds(),Pt=0;Pt<Nt.length;Pt++){var It=wt._howls[At]._soundById(Nt[Pt]);It&&It._node&&(It._node.muted=!!Tt||It._muted)}return wt},stop:function(){for(var Tt=this||dt,wt=0;wt<Tt._howls.length;wt++)Tt._howls[wt].stop();return Tt},unload:function(){for(var Tt=this||dt,wt=Tt._howls.length-1;wt>=0;wt--)Tt._howls[wt].unload();return Tt.usingWebAudio&&Tt.ctx&&Tt.ctx.close!==void 0&&(Tt.ctx.close(),Tt.ctx=null,Rt()),Tt},codecs:function(Tt){return(this||dt)._codecs[Tt.replace(/^x-/,"")]},_setup:function(){var Tt=this||dt;if(Tt.state=Tt.ctx&&Tt.ctx.state||"suspended",Tt._autoSuspend(),!Tt.usingWebAudio)if(typeof Audio<"u")try{new Audio().oncanplaythrough===void 0&&(Tt._canPlayEvent="canplay")}catch{Tt.noAudio=!0}else Tt.noAudio=!0;try{new Audio().muted&&(Tt.noAudio=!0)}catch{}return Tt.noAudio||Tt._setupCodecs(),Tt},_setupCodecs:function(){var Tt=this||dt,wt=null;try{wt=typeof Audio<"u"?new Audio:null}catch{return Tt}if(!wt||typeof wt.canPlayType!="function")return Tt;var At=wt.canPlayType("audio/mpeg;").replace(/^no$/,""),Nt=Tt._navigator?Tt._navigator.userAgent:"",Pt=Nt.match(/OPR\/([0-6].)/g),It=Pt&&parseInt(Pt[0].split("/")[1],10)<33,Ft=Nt.indexOf("Safari")!==-1&&Nt.indexOf("Chrome")===-1,qt=Nt.match(/Version\/(.*?) /),Vt=Ft&&qt&&parseInt(qt[1],10)<15;return Tt._codecs={mp3:!(It||!At&&!wt.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!At,opus:!!wt.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!wt.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!wt.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(wt.canPlayType('audio/wav; codecs="1"')||wt.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!wt.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!wt.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(wt.canPlayType("audio/x-m4a;")||wt.canPlayType("audio/m4a;")||wt.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(wt.canPlayType("audio/x-m4b;")||wt.canPlayType("audio/m4b;")||wt.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(wt.canPlayType("audio/x-mp4;")||wt.canPlayType("audio/mp4;")||wt.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(Vt||!wt.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(Vt||!wt.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!wt.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(wt.canPlayType("audio/x-flac;")||wt.canPlayType("audio/flac;")).replace(/^no$/,"")},Tt},_unlockAudio:function(){var Tt=this||dt;if(!Tt._audioUnlocked&&Tt.ctx){Tt._audioUnlocked=!1,Tt.autoUnlock=!1,Tt._mobileUnloaded||Tt.ctx.sampleRate===44100||(Tt._mobileUnloaded=!0,Tt.unload()),Tt._scratchBuffer=Tt.ctx.createBuffer(1,1,22050);var wt=function(At){for(;Tt._html5AudioPool.length<Tt.html5PoolSize;)try{var Nt=new Audio;Nt._unlocked=!0,Tt._releaseHtml5Audio(Nt)}catch{Tt.noAudio=!0;break}for(var Pt=0;Pt<Tt._howls.length;Pt++)if(!Tt._howls[Pt]._webAudio)for(var It=Tt._howls[Pt]._getSoundIds(),Ft=0;Ft<It.length;Ft++){var qt=Tt._howls[Pt]._soundById(It[Ft]);qt&&qt._node&&!qt._node._unlocked&&(qt._node._unlocked=!0,qt._node.load())}Tt._autoResume();var Vt=Tt.ctx.createBufferSource();Vt.buffer=Tt._scratchBuffer,Vt.connect(Tt.ctx.destination),Vt.start===void 0?Vt.noteOn(0):Vt.start(0),typeof Tt.ctx.resume=="function"&&Tt.ctx.resume(),Vt.onended=function(){Vt.disconnect(0),Tt._audioUnlocked=!0,document.removeEventListener("touchstart",wt,!0),document.removeEventListener("touchend",wt,!0),document.removeEventListener("click",wt,!0),document.removeEventListener("keydown",wt,!0);for(var Kt=0;Kt<Tt._howls.length;Kt++)Tt._howls[Kt]._emit("unlock")}};return document.addEventListener("touchstart",wt,!0),document.addEventListener("touchend",wt,!0),document.addEventListener("click",wt,!0),document.addEventListener("keydown",wt,!0),Tt}},_obtainHtml5Audio:function(){var Tt=this||dt;if(Tt._html5AudioPool.length)return Tt._html5AudioPool.pop();var wt=new Audio().play();return wt&&typeof Promise<"u"&&(wt instanceof Promise||typeof wt.then=="function")&&wt.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(Tt){var wt=this||dt;return Tt._unlocked&&wt._html5AudioPool.push(Tt),wt},_autoSuspend:function(){var Tt=this;if(Tt.autoSuspend&&Tt.ctx&&Tt.ctx.suspend!==void 0&&dt.usingWebAudio){for(var wt=0;wt<Tt._howls.length;wt++)if(Tt._howls[wt]._webAudio){for(var At=0;At<Tt._howls[wt]._sounds.length;At++)if(!Tt._howls[wt]._sounds[At]._paused)return Tt}return Tt._suspendTimer&&clearTimeout(Tt._suspendTimer),Tt._suspendTimer=setTimeout(function(){if(Tt.autoSuspend){Tt._suspendTimer=null,Tt.state="suspending";var Nt=function(){Tt.state="suspended",Tt._resumeAfterSuspend&&(delete Tt._resumeAfterSuspend,Tt._autoResume())};Tt.ctx.suspend().then(Nt,Nt)}},3e4),Tt}},_autoResume:function(){var Tt=this;if(Tt.ctx&&Tt.ctx.resume!==void 0&&dt.usingWebAudio)return Tt.state==="running"&&Tt.ctx.state!=="interrupted"&&Tt._suspendTimer?(clearTimeout(Tt._suspendTimer),Tt._suspendTimer=null):Tt.state==="suspended"||Tt.state==="running"&&Tt.ctx.state==="interrupted"?(Tt.ctx.resume().then(function(){Tt.state="running";for(var wt=0;wt<Tt._howls.length;wt++)Tt._howls[wt]._emit("resume")}),Tt._suspendTimer&&(clearTimeout(Tt._suspendTimer),Tt._suspendTimer=null)):Tt.state==="suspending"&&(Tt._resumeAfterSuspend=!0),Tt}};var dt=new st,ft=function(Tt){Tt.src&&Tt.src.length!==0?this.init(Tt):console.error("An array of source files must be passed with any new Howl.")};ft.prototype={init:function(Tt){var wt=this;return dt.ctx||Rt(),wt._autoplay=Tt.autoplay||!1,wt._format=typeof Tt.format!="string"?Tt.format:[Tt.format],wt._html5=Tt.html5||!1,wt._muted=Tt.mute||!1,wt._loop=Tt.loop||!1,wt._pool=Tt.pool||5,wt._preload=typeof Tt.preload!="boolean"&&Tt.preload!=="metadata"||Tt.preload,wt._rate=Tt.rate||1,wt._sprite=Tt.sprite||{},wt._src=typeof Tt.src!="string"?Tt.src:[Tt.src],wt._volume=Tt.volume!==void 0?Tt.volume:1,wt._xhr={method:Tt.xhr&&Tt.xhr.method?Tt.xhr.method:"GET",headers:Tt.xhr&&Tt.xhr.headers?Tt.xhr.headers:null,withCredentials:!(!Tt.xhr||!Tt.xhr.withCredentials)&&Tt.xhr.withCredentials},wt._duration=0,wt._state="unloaded",wt._sounds=[],wt._endTimers={},wt._queue=[],wt._playLock=!1,wt._onend=Tt.onend?[{fn:Tt.onend}]:[],wt._onfade=Tt.onfade?[{fn:Tt.onfade}]:[],wt._onload=Tt.onload?[{fn:Tt.onload}]:[],wt._onloaderror=Tt.onloaderror?[{fn:Tt.onloaderror}]:[],wt._onplayerror=Tt.onplayerror?[{fn:Tt.onplayerror}]:[],wt._onpause=Tt.onpause?[{fn:Tt.onpause}]:[],wt._onplay=Tt.onplay?[{fn:Tt.onplay}]:[],wt._onstop=Tt.onstop?[{fn:Tt.onstop}]:[],wt._onmute=Tt.onmute?[{fn:Tt.onmute}]:[],wt._onvolume=Tt.onvolume?[{fn:Tt.onvolume}]:[],wt._onrate=Tt.onrate?[{fn:Tt.onrate}]:[],wt._onseek=Tt.onseek?[{fn:Tt.onseek}]:[],wt._onunlock=Tt.onunlock?[{fn:Tt.onunlock}]:[],wt._onresume=[],wt._webAudio=dt.usingWebAudio&&!wt._html5,dt.ctx!==void 0&&dt.ctx&&dt.autoUnlock&&dt._unlockAudio(),dt._howls.push(wt),wt._autoplay&&wt._queue.push({event:"play",action:function(){wt.play()}}),wt._preload&&wt._preload!=="none"&&wt.load(),wt},load:function(){var Tt=null;if(dt.noAudio)this._emit("loaderror",null,"No audio support.");else{typeof this._src=="string"&&(this._src=[this._src]);for(var wt=0;wt<this._src.length;wt++){var At,Nt;if(this._format&&this._format[wt])At=this._format[wt];else{if(typeof(Nt=this._src[wt])!="string"){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(At=/^data:audio\/([^;,]+);/i.exec(Nt))||(At=/\.([^.]+)$/.exec(Nt.split("?",1)[0])),At&&(At=At[1].toLowerCase())}if(At||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),At&&dt.codecs(At)){Tt=this._src[wt];break}}if(Tt)return this._src=Tt,this._state="loading",window.location.protocol==="https:"&&Tt.slice(0,5)==="http:"&&(this._html5=!0,this._webAudio=!1),new ht(this),this._webAudio&&bt(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(Tt,wt){var At=this,Nt=null;if(typeof Tt=="number")Nt=Tt,Tt=null;else{if(typeof Tt=="string"&&At._state==="loaded"&&!At._sprite[Tt])return null;if(Tt===void 0&&(Tt="__default",!At._playLock)){for(var Pt=0,It=0;It<At._sounds.length;It++)At._sounds[It]._paused&&!At._sounds[It]._ended&&(Pt++,Nt=At._sounds[It]._id);Pt===1?Tt=null:Nt=null}}var Ft=Nt?At._soundById(Nt):At._inactiveSound();if(!Ft)return null;if(Nt&&!Tt&&(Tt=Ft._sprite||"__default"),At._state!=="loaded"){Ft._sprite=Tt,Ft._ended=!1;var qt=Ft._id;return At._queue.push({event:"play",action:function(){At.play(qt)}}),qt}if(Nt&&!Ft._paused)return wt||At._loadQueue("play"),Ft._id;At._webAudio&&dt._autoResume();var Vt=Math.max(0,Ft._seek>0?Ft._seek:At._sprite[Tt][0]/1e3),Kt=Math.max(0,(At._sprite[Tt][0]+At._sprite[Tt][1])/1e3-Vt),jt=1e3*Kt/Math.abs(Ft._rate),Ut=At._sprite[Tt][0]/1e3,Ot=(At._sprite[Tt][0]+At._sprite[Tt][1])/1e3;Ft._sprite=Tt,Ft._ended=!1;var Wt=function(){Ft._paused=!1,Ft._seek=Vt,Ft._start=Ut,Ft._stop=Ot,Ft._loop=!(!Ft._loop&&!At._sprite[Tt][2])};if(!(Vt>=Ot)){var Bt=Ft._node;if(At._webAudio){var tr=function(){At._playLock=!1,Wt(),At._refreshBuffer(Ft);var cr=Ft._muted||At._muted?0:Ft._volume;Bt.gain.setValueAtTime(cr,dt.ctx.currentTime),Ft._playStart=dt.ctx.currentTime,Bt.bufferSource.start===void 0?Ft._loop?Bt.bufferSource.noteGrainOn(0,Vt,86400):Bt.bufferSource.noteGrainOn(0,Vt,Kt):Ft._loop?Bt.bufferSource.start(0,Vt,86400):Bt.bufferSource.start(0,Vt,Kt),jt!==1/0&&(At._endTimers[Ft._id]=setTimeout(At._ended.bind(At,Ft),jt)),wt||setTimeout(function(){At._emit("play",Ft._id),At._loadQueue()},0)};dt.state==="running"&&dt.ctx.state!=="interrupted"?tr():(At._playLock=!0,At.once("resume",tr),At._clearTimer(Ft._id))}else{var Jt=function(){Bt.currentTime=Vt,Bt.muted=Ft._muted||At._muted||dt._muted||Bt.muted,Bt.volume=Ft._volume*dt.volume(),Bt.playbackRate=Ft._rate;try{var cr=Bt.play();if(cr&&typeof Promise<"u"&&(cr instanceof Promise||typeof cr.then=="function")?(At._playLock=!0,Wt(),cr.then(function(){At._playLock=!1,Bt._unlocked=!0,wt?At._loadQueue():At._emit("play",Ft._id)}).catch(function(){At._playLock=!1,At._emit("playerror",Ft._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),Ft._ended=!0,Ft._paused=!0})):wt||(At._playLock=!1,Wt(),At._emit("play",Ft._id)),Bt.playbackRate=Ft._rate,Bt.paused)return void At._emit("playerror",Ft._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");Tt!=="__default"||Ft._loop?At._endTimers[Ft._id]=setTimeout(At._ended.bind(At,Ft),jt):(At._endTimers[Ft._id]=function(){At._ended(Ft),Bt.removeEventListener("ended",At._endTimers[Ft._id],!1)},Bt.addEventListener("ended",At._endTimers[Ft._id],!1))}catch(gr){At._emit("playerror",Ft._id,gr)}};Bt.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(Bt.src=At._src,Bt.load());var ar=window&&window.ejecta||!Bt.readyState&&dt._navigator.isCocoonJS;if(Bt.readyState>=3||ar)Jt();else{At._playLock=!0,At._state="loading";var pr=function(){At._state="loaded",Jt(),Bt.removeEventListener(dt._canPlayEvent,pr,!1)};Bt.addEventListener(dt._canPlayEvent,pr,!1),At._clearTimer(Ft._id)}}return Ft._id}At._ended(Ft)},pause:function(Tt){var wt=this;if(wt._state!=="loaded"||wt._playLock)return wt._queue.push({event:"pause",action:function(){wt.pause(Tt)}}),wt;for(var At=wt._getSoundIds(Tt),Nt=0;Nt<At.length;Nt++){wt._clearTimer(At[Nt]);var Pt=wt._soundById(At[Nt]);if(Pt&&!Pt._paused&&(Pt._seek=wt.seek(At[Nt]),Pt._rateSeek=0,Pt._paused=!0,wt._stopFade(At[Nt]),Pt._node))if(wt._webAudio){if(!Pt._node.bufferSource)continue;Pt._node.bufferSource.stop===void 0?Pt._node.bufferSource.noteOff(0):Pt._node.bufferSource.stop(0),wt._cleanBuffer(Pt._node)}else isNaN(Pt._node.duration)&&Pt._node.duration!==1/0||Pt._node.pause();arguments[1]||wt._emit("pause",Pt?Pt._id:null)}return wt},stop:function(Tt,wt){var At=this;if(At._state!=="loaded"||At._playLock)return At._queue.push({event:"stop",action:function(){At.stop(Tt)}}),At;for(var Nt=At._getSoundIds(Tt),Pt=0;Pt<Nt.length;Pt++){At._clearTimer(Nt[Pt]);var It=At._soundById(Nt[Pt]);It&&(It._seek=It._start||0,It._rateSeek=0,It._paused=!0,It._ended=!0,At._stopFade(Nt[Pt]),It._node&&(At._webAudio?It._node.bufferSource&&(It._node.bufferSource.stop===void 0?It._node.bufferSource.noteOff(0):It._node.bufferSource.stop(0),At._cleanBuffer(It._node)):isNaN(It._node.duration)&&It._node.duration!==1/0||(It._node.currentTime=It._start||0,It._node.pause(),It._node.duration===1/0&&At._clearSound(It._node))),wt||At._emit("stop",It._id))}return At},mute:function(Tt,wt){var At=this;if(At._state!=="loaded"||At._playLock)return At._queue.push({event:"mute",action:function(){At.mute(Tt,wt)}}),At;if(wt===void 0){if(typeof Tt!="boolean")return At._muted;At._muted=Tt}for(var Nt=At._getSoundIds(wt),Pt=0;Pt<Nt.length;Pt++){var It=At._soundById(Nt[Pt]);It&&(It._muted=Tt,It._interval&&At._stopFade(It._id),At._webAudio&&It._node?It._node.gain.setValueAtTime(Tt?0:It._volume,dt.ctx.currentTime):It._node&&(It._node.muted=!!dt._muted||Tt),At._emit("mute",It._id))}return At},volume:function(){var Tt,wt,At,Nt=this,Pt=arguments;if(Pt.length===0)return Nt._volume;if(Pt.length===1||Pt.length===2&&Pt[1]===void 0){var It=Nt._getSoundIds(),Ft=It.indexOf(Pt[0]);Ft>=0?wt=parseInt(Pt[0],10):Tt=parseFloat(Pt[0])}else Pt.length>=2&&(Tt=parseFloat(Pt[0]),wt=parseInt(Pt[1],10));if(!(Tt!==void 0&&Tt>=0&&Tt<=1))return(At=wt?Nt._soundById(wt):Nt._sounds[0])?At._volume:0;if(Nt._state!=="loaded"||Nt._playLock)return Nt._queue.push({event:"volume",action:function(){Nt.volume.apply(Nt,Pt)}}),Nt;wt===void 0&&(Nt._volume=Tt),wt=Nt._getSoundIds(wt);for(var qt=0;qt<wt.length;qt++)(At=Nt._soundById(wt[qt]))&&(At._volume=Tt,Pt[2]||Nt._stopFade(wt[qt]),Nt._webAudio&&At._node&&!At._muted?At._node.gain.setValueAtTime(Tt,dt.ctx.currentTime):At._node&&!At._muted&&(At._node.volume=Tt*dt.volume()),Nt._emit("volume",At._id));return Nt},fade:function(Tt,wt,At,Nt){var Pt=this;if(Pt._state!=="loaded"||Pt._playLock)return Pt._queue.push({event:"fade",action:function(){Pt.fade(Tt,wt,At,Nt)}}),Pt;Tt=Math.min(Math.max(0,parseFloat(Tt)),1),wt=Math.min(Math.max(0,parseFloat(wt)),1),At=parseFloat(At),Pt.volume(Tt,Nt);for(var It=Pt._getSoundIds(Nt),Ft=0;Ft<It.length;Ft++){var qt=Pt._soundById(It[Ft]);if(qt){if(Nt||Pt._stopFade(It[Ft]),Pt._webAudio&&!qt._muted){var Vt=dt.ctx.currentTime,Kt=Vt+At/1e3;qt._volume=Tt,qt._node.gain.setValueAtTime(Tt,Vt),qt._node.gain.linearRampToValueAtTime(wt,Kt)}Pt._startFadeInterval(qt,Tt,wt,At,It[Ft],Nt===void 0)}}return Pt},_startFadeInterval:function(Tt,wt,At,Nt,Pt,It){var Ft=this,qt=wt,Vt=At-wt,Kt=Math.abs(Vt/.01),jt=Math.max(4,Kt>0?Nt/Kt:Nt),Ut=Date.now();Tt._fadeTo=At,Tt._interval=setInterval(function(){var Ot=(Date.now()-Ut)/Nt;Ut=Date.now(),qt+=Vt*Ot,qt=Math.round(100*qt)/100,qt=Vt<0?Math.max(At,qt):Math.min(At,qt),Ft._webAudio?Tt._volume=qt:Ft.volume(qt,Tt._id,!0),It&&(Ft._volume=qt),(At<wt&&qt<=At||At>wt&&qt>=At)&&(clearInterval(Tt._interval),Tt._interval=null,Tt._fadeTo=null,Ft.volume(At,Tt._id),Ft._emit("fade",Tt._id))},jt)},_stopFade:function(Tt){var wt=this._soundById(Tt);return wt&&wt._interval&&(this._webAudio&&wt._node.gain.cancelScheduledValues(dt.ctx.currentTime),clearInterval(wt._interval),wt._interval=null,this.volume(wt._fadeTo,Tt),wt._fadeTo=null,this._emit("fade",Tt)),this},loop:function(){var Tt,wt,At,Nt=this,Pt=arguments;if(Pt.length===0)return Nt._loop;if(Pt.length===1){if(typeof Pt[0]!="boolean")return!!(At=Nt._soundById(parseInt(Pt[0],10)))&&At._loop;Tt=Pt[0],Nt._loop=Tt}else Pt.length===2&&(Tt=Pt[0],wt=parseInt(Pt[1],10));for(var It=Nt._getSoundIds(wt),Ft=0;Ft<It.length;Ft++)(At=Nt._soundById(It[Ft]))&&(At._loop=Tt,Nt._webAudio&&At._node&&At._node.bufferSource&&(At._node.bufferSource.loop=Tt,Tt&&(At._node.bufferSource.loopStart=At._start||0,At._node.bufferSource.loopEnd=At._stop,Nt.playing(It[Ft])&&(Nt.pause(It[Ft],!0),Nt.play(It[Ft],!0)))));return Nt},rate:function(){var Tt,wt,At,Nt=this,Pt=arguments;if(Pt.length===0)wt=Nt._sounds[0]._id;else if(Pt.length===1){var It=Nt._getSoundIds(),Ft=It.indexOf(Pt[0]);Ft>=0?wt=parseInt(Pt[0],10):Tt=parseFloat(Pt[0])}else Pt.length===2&&(Tt=parseFloat(Pt[0]),wt=parseInt(Pt[1],10));if(typeof Tt!="number")return(At=Nt._soundById(wt))?At._rate:Nt._rate;if(Nt._state!=="loaded"||Nt._playLock)return Nt._queue.push({event:"rate",action:function(){Nt.rate.apply(Nt,Pt)}}),Nt;wt===void 0&&(Nt._rate=Tt),wt=Nt._getSoundIds(wt);for(var qt=0;qt<wt.length;qt++)if(At=Nt._soundById(wt[qt])){Nt.playing(wt[qt])&&(At._rateSeek=Nt.seek(wt[qt]),At._playStart=Nt._webAudio?dt.ctx.currentTime:At._playStart),At._rate=Tt,Nt._webAudio&&At._node&&At._node.bufferSource?At._node.bufferSource.playbackRate.setValueAtTime(Tt,dt.ctx.currentTime):At._node&&(At._node.playbackRate=Tt);var Vt=Nt.seek(wt[qt]),Kt=(Nt._sprite[At._sprite][0]+Nt._sprite[At._sprite][1])/1e3-Vt,jt=1e3*Kt/Math.abs(At._rate);!Nt._endTimers[wt[qt]]&&At._paused||(Nt._clearTimer(wt[qt]),Nt._endTimers[wt[qt]]=setTimeout(Nt._ended.bind(Nt,At),jt)),Nt._emit("rate",At._id)}return Nt},seek:function(){var Tt,wt,At=this,Nt=arguments;if(Nt.length===0)At._sounds.length&&(wt=At._sounds[0]._id);else if(Nt.length===1){var Pt=At._getSoundIds(),It=Pt.indexOf(Nt[0]);It>=0?wt=parseInt(Nt[0],10):At._sounds.length&&(wt=At._sounds[0]._id,Tt=parseFloat(Nt[0]))}else Nt.length===2&&(Tt=parseFloat(Nt[0]),wt=parseInt(Nt[1],10));if(wt===void 0)return 0;if(typeof Tt=="number"&&(At._state!=="loaded"||At._playLock))return At._queue.push({event:"seek",action:function(){At.seek.apply(At,Nt)}}),At;var Ft=At._soundById(wt);if(Ft){if(!(typeof Tt=="number"&&Tt>=0)){if(At._webAudio){var qt=At.playing(wt)?dt.ctx.currentTime-Ft._playStart:0,Vt=Ft._rateSeek?Ft._rateSeek-Ft._seek:0;return Ft._seek+(Vt+qt*Math.abs(Ft._rate))}return Ft._node.currentTime}var Kt=At.playing(wt);Kt&&At.pause(wt,!0),Ft._seek=Tt,Ft._ended=!1,At._clearTimer(wt),At._webAudio||!Ft._node||isNaN(Ft._node.duration)||(Ft._node.currentTime=Tt);var jt=function(){Kt&&At.play(wt,!0),At._emit("seek",wt)};if(Kt&&!At._webAudio){var Ut=function(){At._playLock?setTimeout(Ut,0):jt()};setTimeout(Ut,0)}else jt()}return At},playing:function(Tt){if(typeof Tt=="number"){var wt=this._soundById(Tt);return!!wt&&!wt._paused}for(var At=0;At<this._sounds.length;At++)if(!this._sounds[At]._paused)return!0;return!1},duration:function(Tt){var wt=this._duration,At=this._soundById(Tt);return At&&(wt=this._sprite[At._sprite][1]/1e3),wt},state:function(){return this._state},unload:function(){for(var Tt=this,wt=Tt._sounds,At=0;At<wt.length;At++)wt[At]._paused||Tt.stop(wt[At]._id),Tt._webAudio||(Tt._clearSound(wt[At]._node),wt[At]._node.removeEventListener("error",wt[At]._errorFn,!1),wt[At]._node.removeEventListener(dt._canPlayEvent,wt[At]._loadFn,!1),wt[At]._node.removeEventListener("ended",wt[At]._endFn,!1),dt._releaseHtml5Audio(wt[At]._node)),delete wt[At]._node,Tt._clearTimer(wt[At]._id);var Nt=dt._howls.indexOf(Tt);Nt>=0&&dt._howls.splice(Nt,1);var Pt=!0;for(At=0;At<dt._howls.length;At++)if(dt._howls[At]._src===Tt._src||Tt._src.indexOf(dt._howls[At]._src)>=0){Pt=!1;break}return mt&&Pt&&delete mt[Tt._src],dt.noAudio=!1,Tt._state="unloaded",Tt._sounds=[],Tt=null,null},on:function(Tt,wt,At,Nt){var Pt=this["_on"+Tt];return typeof wt=="function"&&Pt.push(Nt?{id:At,fn:wt,once:Nt}:{id:At,fn:wt}),this},off:function(Tt,wt,At){var Nt=this["_on"+Tt],Pt=0;if(typeof wt=="number"&&(At=wt,wt=null),wt||At)for(Pt=0;Pt<Nt.length;Pt++){var It=At===Nt[Pt].id;if(wt===Nt[Pt].fn&&It||!wt&&It){Nt.splice(Pt,1);break}}else if(Tt)this["_on"+Tt]=[];else{var Ft=Object.keys(this);for(Pt=0;Pt<Ft.length;Pt++)Ft[Pt].indexOf("_on")===0&&Array.isArray(this[Ft[Pt]])&&(this[Ft[Pt]]=[])}return this},once:function(Tt,wt,At){return this.on(Tt,wt,At,1),this},_emit:function(Tt,wt,At){for(var Nt=this["_on"+Tt],Pt=Nt.length-1;Pt>=0;Pt--)Nt[Pt].id&&Nt[Pt].id!==wt&&Tt!=="load"||(setTimeout((function(It){It.call(this,wt,At)}).bind(this,Nt[Pt].fn),0),Nt[Pt].once&&this.off(Tt,Nt[Pt].fn,Nt[Pt].id));return this._loadQueue(Tt),this},_loadQueue:function(Tt){if(this._queue.length>0){var wt=this._queue[0];wt.event===Tt&&(this._queue.shift(),this._loadQueue()),Tt||wt.action()}return this},_ended:function(Tt){var wt=Tt._sprite;if(!this._webAudio&&Tt._node&&!Tt._node.paused&&!Tt._node.ended&&Tt._node.currentTime<Tt._stop)return setTimeout(this._ended.bind(this,Tt),100),this;var At=!(!Tt._loop&&!this._sprite[wt][2]);if(this._emit("end",Tt._id),!this._webAudio&&At&&this.stop(Tt._id,!0).play(Tt._id),this._webAudio&&At){this._emit("play",Tt._id),Tt._seek=Tt._start||0,Tt._rateSeek=0,Tt._playStart=dt.ctx.currentTime;var Nt=1e3*(Tt._stop-Tt._start)/Math.abs(Tt._rate);this._endTimers[Tt._id]=setTimeout(this._ended.bind(this,Tt),Nt)}return this._webAudio&&!At&&(Tt._paused=!0,Tt._ended=!0,Tt._seek=Tt._start||0,Tt._rateSeek=0,this._clearTimer(Tt._id),this._cleanBuffer(Tt._node),dt._autoSuspend()),this._webAudio||At||this.stop(Tt._id,!0),this},_clearTimer:function(Tt){if(this._endTimers[Tt]){if(typeof this._endTimers[Tt]!="function")clearTimeout(this._endTimers[Tt]);else{var wt=this._soundById(Tt);wt&&wt._node&&wt._node.removeEventListener("ended",this._endTimers[Tt],!1)}delete this._endTimers[Tt]}return this},_soundById:function(Tt){for(var wt=0;wt<this._sounds.length;wt++)if(Tt===this._sounds[wt]._id)return this._sounds[wt];return null},_inactiveSound:function(){this._drain();for(var Tt=0;Tt<this._sounds.length;Tt++)if(this._sounds[Tt]._ended)return this._sounds[Tt].reset();return new ht(this)},_drain:function(){var Tt=this._pool,wt=0,At=0;if(!(this._sounds.length<Tt)){for(At=0;At<this._sounds.length;At++)this._sounds[At]._ended&&wt++;for(At=this._sounds.length-1;At>=0;At--){if(wt<=Tt)return;this._sounds[At]._ended&&(this._webAudio&&this._sounds[At]._node&&this._sounds[At]._node.disconnect(0),this._sounds.splice(At,1),wt--)}}},_getSoundIds:function(Tt){if(Tt===void 0){for(var wt=[],At=0;At<this._sounds.length;At++)wt.push(this._sounds[At]._id);return wt}return[Tt]},_refreshBuffer:function(Tt){return Tt._node.bufferSource=dt.ctx.createBufferSource(),Tt._node.bufferSource.buffer=mt[this._src],Tt._panner?Tt._node.bufferSource.connect(Tt._panner):Tt._node.bufferSource.connect(Tt._node),Tt._node.bufferSource.loop=Tt._loop,Tt._loop&&(Tt._node.bufferSource.loopStart=Tt._start||0,Tt._node.bufferSource.loopEnd=Tt._stop||0),Tt._node.bufferSource.playbackRate.setValueAtTime(Tt._rate,dt.ctx.currentTime),this},_cleanBuffer:function(Tt){var wt=dt._navigator&&dt._navigator.vendor.indexOf("Apple")>=0;if(dt._scratchBuffer&&Tt.bufferSource&&(Tt.bufferSource.onended=null,Tt.bufferSource.disconnect(0),wt))try{Tt.bufferSource.buffer=dt._scratchBuffer}catch{}return Tt.bufferSource=null,this},_clearSound:function(Tt){/MSIE |Trident\//.test(dt._navigator&&dt._navigator.userAgent)||(Tt.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var ht=function(Tt){this._parent=Tt,this.init()};ht.prototype={init:function(){var Tt=this._parent;return this._muted=Tt._muted,this._loop=Tt._loop,this._volume=Tt._volume,this._rate=Tt._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++dt._counter,Tt._sounds.push(this),this.create(),this},create:function(){var Tt=this._parent,wt=dt._muted||this._muted||this._parent._muted?0:this._volume;return Tt._webAudio?(this._node=dt.ctx.createGain===void 0?dt.ctx.createGainNode():dt.ctx.createGain(),this._node.gain.setValueAtTime(wt,dt.ctx.currentTime),this._node.paused=!0,this._node.connect(dt.masterGain)):dt.noAudio||(this._node=dt._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(dt._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=Tt._src,this._node.preload=Tt._preload===!0?"auto":Tt._preload,this._node.volume=wt*dt.volume(),this._node.load()),this},reset:function(){var Tt=this._parent;return this._muted=Tt._muted,this._loop=Tt._loop,this._volume=Tt._volume,this._rate=Tt._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++dt._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var Tt=this._parent;Tt._duration=Math.ceil(10*this._node.duration)/10,Object.keys(Tt._sprite).length===0&&(Tt._sprite={__default:[0,1e3*Tt._duration]}),Tt._state!=="loaded"&&(Tt._state="loaded",Tt._emit("load"),Tt._loadQueue()),this._node.removeEventListener(dt._canPlayEvent,this._loadFn,!1)},_endListener:function(){var Tt=this._parent;Tt._duration===1/0&&(Tt._duration=Math.ceil(10*this._node.duration)/10,Tt._sprite.__default[1]===1/0&&(Tt._sprite.__default[1]=1e3*Tt._duration),Tt._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var mt={},bt=function(Tt){var wt=Tt._src;if(mt[wt])return Tt._duration=mt[wt].duration,void Ct(Tt);if(/^data:[^;]+;base64,/.test(wt)){for(var At=atob(wt.split(",")[1]),Nt=new Uint8Array(At.length),Pt=0;Pt<At.length;++Pt)Nt[Pt]=At.charCodeAt(Pt);Et(Nt.buffer,Tt)}else{var It=new XMLHttpRequest;It.open(Tt._xhr.method,wt,!0),It.withCredentials=Tt._xhr.withCredentials,It.responseType="arraybuffer",Tt._xhr.headers&&Object.keys(Tt._xhr.headers).forEach(function(Ft){It.setRequestHeader(Ft,Tt._xhr.headers[Ft])}),It.onload=function(){var Ft=(It.status+"")[0];Ft==="0"||Ft==="2"||Ft==="3"?Et(It.response,Tt):Tt._emit("loaderror",null,"Failed loading audio file with status: "+It.status+".")},It.onerror=function(){Tt._webAudio&&(Tt._html5=!0,Tt._webAudio=!1,Tt._sounds=[],delete mt[wt],Tt.load())},St(It)}},St=function(Tt){try{Tt.send()}catch{Tt.onerror()}},Et=function(Tt,wt){var At=function(){wt._emit("loaderror",null,"Decoding audio data failed.")},Nt=function(Pt){Pt&&wt._sounds.length>0?(mt[wt._src]=Pt,Ct(wt,Pt)):At()};typeof Promise<"u"&&dt.ctx.decodeAudioData.length===1?dt.ctx.decodeAudioData(Tt).then(Nt).catch(At):dt.ctx.decodeAudioData(Tt,Nt,At)},Ct=function(Tt,wt){wt&&!Tt._duration&&(Tt._duration=wt.duration),Object.keys(Tt._sprite).length===0&&(Tt._sprite={__default:[0,1e3*Tt._duration]}),Tt._state!=="loaded"&&(Tt._state="loaded",Tt._emit("load"),Tt._loadQueue())},Rt=function(){if(dt.usingWebAudio){try{typeof AudioContext<"u"?dt.ctx=new AudioContext:typeof webkitAudioContext<"u"?dt.ctx=new webkitAudioContext:dt.usingWebAudio=!1}catch{dt.usingWebAudio=!1}dt.ctx||(dt.usingWebAudio=!1);var Tt=/iP(hone|od|ad)/.test(dt._navigator&&dt._navigator.platform),wt=dt._navigator&&dt._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),At=wt?parseInt(wt[1],10):null;if(Tt&&At&&At<9){var Nt=/safari/.test(dt._navigator&&dt._navigator.userAgent.toLowerCase());dt._navigator&&!Nt&&(dt.usingWebAudio=!1)}dt.usingWebAudio&&(dt.masterGain=dt.ctx.createGain===void 0?dt.ctx.createGainNode():dt.ctx.createGain(),dt.masterGain.gain.setValueAtTime(dt._muted?0:dt._volume,dt.ctx.currentTime),dt.masterGain.connect(dt.ctx.destination)),dt._setup()}};(nt=(function(){return{Howler:dt,Howl:ft}}).apply(_e,[]))===void 0||(et.exports=nt),_e.Howler=dt,_e.Howl=ft,rt!==void 0?(rt.HowlerGlobal=st,rt.Howler=dt,rt.Howl=ft,rt.Sound=ht):typeof window<"u"&&(window.HowlerGlobal=st,window.Howler=dt,window.Howl=ft,window.Sound=ht)})(),(function(){var st;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(ft){if(!this.ctx||!this.ctx.listener)return this;for(var ht=this._howls.length-1;ht>=0;ht--)this._howls[ht].stereo(ft);return this},HowlerGlobal.prototype.pos=function(ft,ht,mt){return this.ctx&&this.ctx.listener?(ht=typeof ht!="number"?this._pos[1]:ht,mt=typeof mt!="number"?this._pos[2]:mt,typeof ft!="number"?this._pos:(this._pos=[ft,ht,mt],this.ctx.listener.positionX!==void 0?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(ft,ht,mt,bt,St,Et){if(!this.ctx||!this.ctx.listener)return this;var Ct=this._orientation;return ht=typeof ht!="number"?Ct[1]:ht,mt=typeof mt!="number"?Ct[2]:mt,bt=typeof bt!="number"?Ct[3]:bt,St=typeof St!="number"?Ct[4]:St,Et=typeof Et!="number"?Ct[5]:Et,typeof ft!="number"?Ct:(this._orientation=[ft,ht,mt,bt,St,Et],this.ctx.listener.forwardX!==void 0?(this.ctx.listener.forwardX.setTargetAtTime(ft,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(ht,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(mt,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(bt,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(St,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(Et,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(ft,ht,mt,bt,St,Et),this)},Howl.prototype.init=(st=Howl.prototype.init,function(ft){return this._orientation=ft.orientation||[1,0,0],this._stereo=ft.stereo||null,this._pos=ft.pos||null,this._pannerAttr={coneInnerAngle:ft.coneInnerAngle!==void 0?ft.coneInnerAngle:360,coneOuterAngle:ft.coneOuterAngle!==void 0?ft.coneOuterAngle:360,coneOuterGain:ft.coneOuterGain!==void 0?ft.coneOuterGain:0,distanceModel:ft.distanceModel!==void 0?ft.distanceModel:"inverse",maxDistance:ft.maxDistance!==void 0?ft.maxDistance:1e4,panningModel:ft.panningModel!==void 0?ft.panningModel:"HRTF",refDistance:ft.refDistance!==void 0?ft.refDistance:1,rolloffFactor:ft.rolloffFactor!==void 0?ft.rolloffFactor:1},this._onstereo=ft.onstereo?[{fn:ft.onstereo}]:[],this._onpos=ft.onpos?[{fn:ft.onpos}]:[],this._onorientation=ft.onorientation?[{fn:ft.onorientation}]:[],st.call(this,ft)}),Howl.prototype.stereo=function(ft,ht){var mt=this;if(!mt._webAudio)return mt;if(mt._state!=="loaded")return mt._queue.push({event:"stereo",action:function(){mt.stereo(ft,ht)}}),mt;var bt=Howler.ctx.createStereoPanner===void 0?"spatial":"stereo";if(ht===void 0){if(typeof ft!="number")return mt._stereo;mt._stereo=ft,mt._pos=[ft,0,0]}for(var St=mt._getSoundIds(ht),Et=0;Et<St.length;Et++){var Ct=mt._soundById(St[Et]);if(Ct){if(typeof ft!="number")return Ct._stereo;Ct._stereo=ft,Ct._pos=[ft,0,0],Ct._node&&(Ct._pannerAttr.panningModel="equalpower",Ct._panner&&Ct._panner.pan||dt(Ct,bt),bt==="spatial"?Ct._panner.positionX!==void 0?(Ct._panner.positionX.setValueAtTime(ft,Howler.ctx.currentTime),Ct._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Ct._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Ct._panner.setPosition(ft,0,0):Ct._panner.pan.setValueAtTime(ft,Howler.ctx.currentTime)),mt._emit("stereo",Ct._id)}}return mt},Howl.prototype.pos=function(ft,ht,mt,bt){var St=this;if(!St._webAudio)return St;if(St._state!=="loaded")return St._queue.push({event:"pos",action:function(){St.pos(ft,ht,mt,bt)}}),St;if(ht=typeof ht!="number"?0:ht,mt=typeof mt!="number"?-.5:mt,bt===void 0){if(typeof ft!="number")return St._pos;St._pos=[ft,ht,mt]}for(var Et=St._getSoundIds(bt),Ct=0;Ct<Et.length;Ct++){var Rt=St._soundById(Et[Ct]);if(Rt){if(typeof ft!="number")return Rt._pos;Rt._pos=[ft,ht,mt],Rt._node&&(Rt._panner&&!Rt._panner.pan||dt(Rt,"spatial"),Rt._panner.positionX!==void 0?(Rt._panner.positionX.setValueAtTime(ft,Howler.ctx.currentTime),Rt._panner.positionY.setValueAtTime(ht,Howler.ctx.currentTime),Rt._panner.positionZ.setValueAtTime(mt,Howler.ctx.currentTime)):Rt._panner.setPosition(ft,ht,mt)),St._emit("pos",Rt._id)}}return St},Howl.prototype.orientation=function(ft,ht,mt,bt){var St=this;if(!St._webAudio)return St;if(St._state!=="loaded")return St._queue.push({event:"orientation",action:function(){St.orientation(ft,ht,mt,bt)}}),St;if(ht=typeof ht!="number"?St._orientation[1]:ht,mt=typeof mt!="number"?St._orientation[2]:mt,bt===void 0){if(typeof ft!="number")return St._orientation;St._orientation=[ft,ht,mt]}for(var Et=St._getSoundIds(bt),Ct=0;Ct<Et.length;Ct++){var Rt=St._soundById(Et[Ct]);if(Rt){if(typeof ft!="number")return Rt._orientation;Rt._orientation=[ft,ht,mt],Rt._node&&(Rt._panner||(Rt._pos||(Rt._pos=St._pos||[0,0,-.5]),dt(Rt,"spatial")),Rt._panner.orientationX!==void 0?(Rt._panner.orientationX.setValueAtTime(ft,Howler.ctx.currentTime),Rt._panner.orientationY.setValueAtTime(ht,Howler.ctx.currentTime),Rt._panner.orientationZ.setValueAtTime(mt,Howler.ctx.currentTime)):Rt._panner.setOrientation(ft,ht,mt)),St._emit("orientation",Rt._id)}}return St},Howl.prototype.pannerAttr=function(){var ft,ht,mt,bt=this,St=arguments;if(!bt._webAudio)return bt;if(St.length===0)return bt._pannerAttr;if(St.length===1){if(typeof St[0]!="object")return(mt=bt._soundById(parseInt(St[0],10)))?mt._pannerAttr:bt._pannerAttr;ft=St[0],ht===void 0&&(ft.pannerAttr||(ft.pannerAttr={coneInnerAngle:ft.coneInnerAngle,coneOuterAngle:ft.coneOuterAngle,coneOuterGain:ft.coneOuterGain,distanceModel:ft.distanceModel,maxDistance:ft.maxDistance,refDistance:ft.refDistance,rolloffFactor:ft.rolloffFactor,panningModel:ft.panningModel}),bt._pannerAttr={coneInnerAngle:ft.pannerAttr.coneInnerAngle!==void 0?ft.pannerAttr.coneInnerAngle:bt._coneInnerAngle,coneOuterAngle:ft.pannerAttr.coneOuterAngle!==void 0?ft.pannerAttr.coneOuterAngle:bt._coneOuterAngle,coneOuterGain:ft.pannerAttr.coneOuterGain!==void 0?ft.pannerAttr.coneOuterGain:bt._coneOuterGain,distanceModel:ft.pannerAttr.distanceModel!==void 0?ft.pannerAttr.distanceModel:bt._distanceModel,maxDistance:ft.pannerAttr.maxDistance!==void 0?ft.pannerAttr.maxDistance:bt._maxDistance,refDistance:ft.pannerAttr.refDistance!==void 0?ft.pannerAttr.refDistance:bt._refDistance,rolloffFactor:ft.pannerAttr.rolloffFactor!==void 0?ft.pannerAttr.rolloffFactor:bt._rolloffFactor,panningModel:ft.pannerAttr.panningModel!==void 0?ft.pannerAttr.panningModel:bt._panningModel})}else St.length===2&&(ft=St[0],ht=parseInt(St[1],10));for(var Et=bt._getSoundIds(ht),Ct=0;Ct<Et.length;Ct++)if(mt=bt._soundById(Et[Ct])){var Rt=mt._pannerAttr;Rt={coneInnerAngle:ft.coneInnerAngle!==void 0?ft.coneInnerAngle:Rt.coneInnerAngle,coneOuterAngle:ft.coneOuterAngle!==void 0?ft.coneOuterAngle:Rt.coneOuterAngle,coneOuterGain:ft.coneOuterGain!==void 0?ft.coneOuterGain:Rt.coneOuterGain,distanceModel:ft.distanceModel!==void 0?ft.distanceModel:Rt.distanceModel,maxDistance:ft.maxDistance!==void 0?ft.maxDistance:Rt.maxDistance,refDistance:ft.refDistance!==void 0?ft.refDistance:Rt.refDistance,rolloffFactor:ft.rolloffFactor!==void 0?ft.rolloffFactor:Rt.rolloffFactor,panningModel:ft.panningModel!==void 0?ft.panningModel:Rt.panningModel};var Tt=mt._panner;Tt?(Tt.coneInnerAngle=Rt.coneInnerAngle,Tt.coneOuterAngle=Rt.coneOuterAngle,Tt.coneOuterGain=Rt.coneOuterGain,Tt.distanceModel=Rt.distanceModel,Tt.maxDistance=Rt.maxDistance,Tt.refDistance=Rt.refDistance,Tt.rolloffFactor=Rt.rolloffFactor,Tt.panningModel=Rt.panningModel):(mt._pos||(mt._pos=bt._pos||[0,0,-.5]),dt(mt,"spatial"))}return bt},Sound.prototype.init=(function(ft){return function(){var ht=this._parent;this._orientation=ht._orientation,this._stereo=ht._stereo,this._pos=ht._pos,this._pannerAttr=ht._pannerAttr,ft.call(this),this._stereo?ht.stereo(this._stereo):this._pos&&ht.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}})(Sound.prototype.init),Sound.prototype.reset=(function(ft){return function(){var ht=this._parent;return this._orientation=ht._orientation,this._stereo=ht._stereo,this._pos=ht._pos,this._pannerAttr=ht._pannerAttr,this._stereo?ht.stereo(this._stereo):this._pos?ht.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,ht._refreshBuffer(this)),ft.call(this)}})(Sound.prototype.reset);var dt=function(ft,ht){(ht=ht||"spatial")==="spatial"?(ft._panner=Howler.ctx.createPanner(),ft._panner.coneInnerAngle=ft._pannerAttr.coneInnerAngle,ft._panner.coneOuterAngle=ft._pannerAttr.coneOuterAngle,ft._panner.coneOuterGain=ft._pannerAttr.coneOuterGain,ft._panner.distanceModel=ft._pannerAttr.distanceModel,ft._panner.maxDistance=ft._pannerAttr.maxDistance,ft._panner.refDistance=ft._pannerAttr.refDistance,ft._panner.rolloffFactor=ft._pannerAttr.rolloffFactor,ft._panner.panningModel=ft._pannerAttr.panningModel,ft._panner.positionX!==void 0?(ft._panner.positionX.setValueAtTime(ft._pos[0],Howler.ctx.currentTime),ft._panner.positionY.setValueAtTime(ft._pos[1],Howler.ctx.currentTime),ft._panner.positionZ.setValueAtTime(ft._pos[2],Howler.ctx.currentTime)):ft._panner.setPosition(ft._pos[0],ft._pos[1],ft._pos[2]),ft._panner.orientationX!==void 0?(ft._panner.orientationX.setValueAtTime(ft._orientation[0],Howler.ctx.currentTime),ft._panner.orientationY.setValueAtTime(ft._orientation[1],Howler.ctx.currentTime),ft._panner.orientationZ.setValueAtTime(ft._orientation[2],Howler.ctx.currentTime)):ft._panner.setOrientation(ft._orientation[0],ft._orientation[1],ft._orientation[2])):(ft._panner=Howler.ctx.createStereoPanner(),ft._panner.pan.setValueAtTime(ft._stereo,Howler.ctx.currentTime)),ft._panner.connect(ft._node),ft._paused||ft._parent.pause(ft._id,!0).play(ft._id,!0)}})()}).call(this,tt(17))},function(et,_e){et.exports=`varying vec2 vTextureCoord;
varying vec2 vVertexPosition;
varying float vPercent;
varying float vDirection;
varying float vTransition;
uniform sampler2D uSampler;
void main() {
vec4 outputColor;
float percent = vPercent;
float direction = vDirection;
if (vTransition < 0.0) {
percent = 1.0 - percent;
if ((vDirection > 1.5) && (vDirection < 2.5)) {
direction = 1.0;
}
else if ((vDirection > 0.5) && (vDirection < 1.5)) {
direction = 2.0;
}
else if ((vDirection > 2.5) && (vDirection < 3.5)) {
direction = 4.0;
}
else {
direction = 3.0;
}
}
if ((direction > 1.5) && (direction < 2.5)) {
if (vVertexPosition.y >= (1.0 - percent)) {
outputColor = texture2D(uSampler, vTextureCoord);
}
else {
outputColor = vec4(0.0, 0.0, 0.0, 0.0);
}
if ((vVertexPosition.y >= (1.0 - percent)) && (vVertexPosition.y <= ((1.0 - percent) + 0.2))) {
outputColor = outputColor * ((vVertexPosition.y - (1.0 - percent)) / 0.2);
}
}
else if ((direction > 0.5) && (direction < 1.5)) {
if (vVertexPosition.y <= percent) {
outputColor = texture2D(uSampler, vTextureCoord);
}
else {
outputColor = vec4(0.0, 0.0, 0.0, 0.0);
}
if ((vVertexPosition.y <= percent) && (vVertexPosition.y >= (percent - 0.2))) {
outputColor = outputColor * (1.0 - ((vVertexPosition.y - (percent - 0.2)) / 0.2));
}
}
else if ((direction > 2.5) && (direction < 3.5)) {
if (vVertexPosition.x <= percent) {
outputColor = texture2D(uSampler, vTextureCoord);
}
else {
outputColor = vec4(0.0, 0.0, 0.0, 0.0);
}
if ((vVertexPosition.x <= percent) && (vVertexPosition.x >= (percent - 0.2))) {
outputColor = outputColor * (1.0 - ((vVertexPosition.x - (percent - 0.2)) / 0.2));
}
}
else {
if (vVertexPosition.x >= (1.0 - percent)) {
outputColor = texture2D(uSampler, vTextureCoord);
}
else {
outputColor = vec4(0.0, 0.0, 0.0, 0.0);
}
if ((vVertexPosition.x >= (1.0 - percent)) && (vVertexPosition.x <= ((1.0 - percent) + 0.2))) {
outputColor = outputColor * ((vVertexPosition.x - (1.0 - percent)) / 0.2);
}
}
gl_FragColor = outputColor;
}
`},function(et,_e){et.exports=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
varying vec2 vVertexPosition;
varying float vPercent;
varying float vDirection;
varying float vTransition;
uniform vec4 inputSize;
uniform vec4 outputFrame;
uniform float percent;
uniform float direction;
uniform float transition;
vec4 filterVertexPosition() {
vec2 position = (aVertexPosition * max(outputFrame.zw, vec2(0.))) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord(vec2 aVertexPosition) {
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main() {
vTransition = transition;
vDirection = direction;
vPercent = percent;
vVertexPosition = aVertexPosition;
vec2 localVertexPosition = aVertexPosition;
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord(localVertexPosition);
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
uniform float transition;
void main() {
float alpha = (transition * (percent - 0.5)) + 0.5;
vec4 color1 = texture2D(uSampler, vTextureCoord);
gl_FragColor = color1 * alpha;
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 position = vec2(uBoundRect.z - filterCoord.x, uBoundRect.w - filterCoord.y);
float timePercent = transition > 0.0 ? percent : 1.0 - percent;
float barCount = 6.0;
float barWidth = (option < 0.5 ? uBoundRect.w : uBoundRect.z) / barCount;
float alphaWidthPercent = 0.03;
float alphaWidth = alphaWidthPercent * (option < 0.5 ? uBoundRect.w : uBoundRect.z);
float selectAxis = option < 0.5 ? -position.y : -position.x;
float countAxis = floor(selectAxis / barWidth);
float modAxis = mod(selectAxis, barWidth);
float timePosition = barWidth * timePercent;
if (modAxis < timePosition) {
outputColor = outputColor;
}
else if (modAxis < (timePosition + alphaWidth)) {
outputColor = (outputColor * ((alphaWidth - modAxis) + timePosition)) / alphaWidth;
}
else {
outputColor = outputColor * 0.0;
}
gl_FragColor = outputColor;
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 position = vec2(uBoundRect.z - filterCoord.x, uBoundRect.w - filterCoord.y);
float timePercent = transition > 0.0 ? percent : 1.0 - percent;
float barCount = 6.0;
float horizontalBarWidth = uBoundRect.z / barCount;
float verticalBarWidth = uBoundRect.w / barCount;
float alphaWidthPercent = 0.01;
float alphaWidth = alphaWidthPercent * (option < 0.5 ? uBoundRect.z : uBoundRect.w);
float timePosition = horizontalBarWidth * timePercent;
float countAxisY = floor(-position.y / verticalBarWidth);
float modAxisY = mod(-position.y, verticalBarWidth);
float countAxisX = floor(-position.x / horizontalBarWidth);
float modAxisX = mod(-position.x, horizontalBarWidth);
float modAxis = modAxisX;
if (option < 0.5) {
if (mod(countAxisY, 2.0) > 0.5) {
countAxisX = floor(((horizontalBarWidth * 0.5) - position.x) / horizontalBarWidth);
modAxisX = mod((horizontalBarWidth * 0.5) - position.x, horizontalBarWidth);
}
modAxis = modAxisX;
}
else {
if (mod(countAxisX, 2.0) > 0.5) {
countAxisY = floor(((verticalBarWidth * 0.5) - position.y) / verticalBarWidth);
modAxisY = mod((verticalBarWidth * 0.5) - position.y, verticalBarWidth);
}
modAxis = modAxisY;
}
if (modAxis < timePosition) {
outputColor = outputColor;
}
else if (modAxis < (timePosition + alphaWidth)) {
outputColor = (outputColor * ((alphaWidth - modAxis) + timePosition)) / alphaWidth;
}
else {
outputColor = outputColor * 0.0;
}
gl_FragColor = outputColor;
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 inputSize;
uniform vec4 uBoundRect;
uniform float transition;
uniform sampler2D dissolveSampler;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
float splitWidth = max(uBoundRect.z, uBoundRect.w) / 3.0;
vec2 position = mod(filterCoord.xy, splitWidth);
vec2 loopTime = floor(filterCoord.xy / splitWidth);
if (loopTime.x > 0.5) {
position.x = splitWidth - position.x;
}
if (loopTime.y > 0.5) {
position.y = splitWidth - position.y;
}
vec4 dissolveColor = texture2D(dissolveSampler, position.xy / splitWidth);
float timePercent = transition > 0.0 ? percent : 1.0 - percent;
if (dissolveColor.r < percent) {
gl_FragColor = outputColor;
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform sampler2D dissolveSampler;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 position = vec2(uBoundRect.z - filterCoord.x, uBoundRect.w - filterCoord.y);
vec4 dissolveColor;
if (option > 0.5) {
dissolveColor = texture2D(dissolveSampler, vec2(vTextureCoord.x, 0.0));
}
else {
dissolveColor = texture2D(dissolveSampler, vec2(0.0, vTextureCoord.y));
}
if (transition > .0) {
if (dissolveColor.r < percent) {
gl_FragColor = outputColor;
}
else {
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
}
else {
if (dissolveColor.r < percent) {
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
else {
gl_FragColor = outputColor;
}
}
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
float timePercent = interpolationFloat(0.0, 1.0, 0.0, 1.0, percent, 2);
float radius = sqrt(pow(uBoundRect.z, 2.0) + pow(uBoundRect.w, 2.0)) / 2.0;
float alphaWidth = 0.1;
float pointDistance = sqrt(pow(point.x, 2.0) + pow(point.y, 2.0));
float alphaRadiusFormula;
if (option > 0.5) {
if (transition > 0.0) {
alphaRadiusFormula = 1.0 - ((pointDistance - (radius * timePercent)) / (alphaWidth * radius));
}
else {
alphaRadiusFormula = (pointDistance - (radius * timePercent)) / (alphaWidth * radius);
}
}
else {
if (transition > 0.0) {
alphaRadiusFormula = (pointDistance - (radius * (1.0 - timePercent))) / (alphaWidth * radius);
}
else {
alphaRadiusFormula = 1.0 - ((pointDistance - (radius * (1.0 - timePercent))) / (alphaWidth * radius));
}
}
if (option > 0.5) {
if (pointDistance < (radius * timePercent)) {
gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);
}
else if (pointDistance < (radius * (timePercent + alphaWidth))) {
gl_FragColor = outputColor * alphaRadiusFormula;
}
else {
gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;
}
}
else {
if (pointDistance < (radius * (1.0 - timePercent))) {
gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;
}
else if (pointDistance < (radius * ((1.0 - timePercent) + alphaWidth))) {
gl_FragColor = outputColor * alphaRadiusFormula;
}
else {
gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);
}
}
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
float timePercent = interpolationFloat(0.0, 1.0, 0.0, 1.0, percent, 2);
if (option < 0.5) {
timePercent = 1.0 - timePercent;
}
float alphaWidth = 0.2;
vec2 halfRect = uBoundRect.zw / 2.0;
vec2 absPoint = abs(point.xy);
vec2 alphaFormula = vec2(((halfRect.x * (timePercent + alphaWidth)) - absPoint.x) / (halfRect.x * alphaWidth), ((halfRect.y * (timePercent + alphaWidth)) - absPoint.y) / (halfRect.y * alphaWidth));
if (option < 0.5) {
if ((absPoint.x < (halfRect.x * timePercent)) && (absPoint.y < (halfRect.y * timePercent))) {
gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;
}
else if ((absPoint.x < (halfRect.x * (timePercent + alphaWidth))) && (absPoint.y < (halfRect.y * (timePercent + alphaWidth)))) {
if (absPoint.x > absPoint.y) {
gl_FragColor = outputColor * (transition > 0.0 ? 1.0 - alphaFormula.x : alphaFormula.x);
}
else {
gl_FragColor = outputColor * (transition > 0.0 ? 1.0 - alphaFormula.y : alphaFormula.y);
}
}
else {
gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);
}
}
else {
if ((absPoint.x < (halfRect.x * timePercent)) && (absPoint.y < (halfRect.y * timePercent))) {
gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);
}
else if ((absPoint.x < (halfRect.x * (timePercent + alphaWidth))) && (absPoint.y < (halfRect.y * (timePercent + alphaWidth)))) {
if (absPoint.x > absPoint.y) {
gl_FragColor = outputColor * (transition > 0.0 ? alphaFormula.x : 1.0 - alphaFormula.x);
}
else {
gl_FragColor = outputColor * (transition > 0.0 ? alphaFormula.y : 1.0 - alphaFormula.y);
}
}
else {
gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;
}
}
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), (uBoundRect.w / 2.0) - filterCoord.y);
float timePercent = interpolationFloat(0.0, 1.0, 0.0, 1.0, percent, 2);
if (option < 0.5) {
timePercent = 1.0 - timePercent;
}
float alphaWidth = 0.1;
float rightTop = (((2.0 * uBoundRect.w) * timePercent) - ((uBoundRect.w * point.x) / uBoundRect.z)) - point.y;
float rightBottom = (((uBoundRect.w * point.x) / uBoundRect.z) - ((2.0 * uBoundRect.w) * timePercent)) - point.y;
float leftTop = (((2.0 * uBoundRect.w) * timePercent) + ((uBoundRect.w * point.x) / uBoundRect.z)) - point.y;
float leftBottom = (((-uBoundRect.w * point.x) / uBoundRect.z) - ((2.0 * uBoundRect.w) * timePercent)) - point.y;
if (((option < 0.5) && (transition > 0.0)) || ((option > 0.5) && (transition < 0.0))) {
if ((point.x >= 0.0) && (point.y >= 0.0)) {
if (rightTop < (-alphaWidth * uBoundRect.w)) {
gl_FragColor = outputColor;
}
else if (rightTop < 0.0) {
gl_FragColor = outputColor * (-rightTop / (alphaWidth * uBoundRect.w));
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
if ((point.x >= 0.0) && (point.y <= 0.0)) {
if (rightBottom < 0.0) {
gl_FragColor = vec4(0, 0, 0, 0);
}
else if (rightBottom < (alphaWidth * uBoundRect.w)) {
gl_FragColor = (outputColor * rightBottom) / (alphaWidth * uBoundRect.w);
}
else {
gl_FragColor = outputColor;
}
}
if ((point.x <= 0.0) && (point.y >= 0.0)) {
if (leftTop < (-alphaWidth * uBoundRect.w)) {
gl_FragColor = outputColor;
}
else if (leftTop < 0.0) {
gl_FragColor = outputColor * (-leftTop / (alphaWidth * uBoundRect.w));
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
if ((point.x <= 0.0) && (point.y <= 0.0)) {
if (leftBottom < 0.0) {
gl_FragColor = vec4(0, 0, 0, 0);
}
else if (leftBottom < (alphaWidth * uBoundRect.w)) {
gl_FragColor = (outputColor * leftBottom) / (alphaWidth * uBoundRect.w);
}
else {
gl_FragColor = outputColor;
}
}
}
else {
if ((point.x >= 0.0) && (point.y >= 0.0)) {
if (rightTop < (-alphaWidth * uBoundRect.w)) {
gl_FragColor = vec4(0, 0, 0, 0);
}
else if (rightTop < 0.0) {
gl_FragColor = outputColor * (1.0 + (rightTop / (alphaWidth * uBoundRect.w)));
}
else {
gl_FragColor = outputColor;
}
}
if ((point.x >= 0.0) && (point.y <= 0.0)) {
if (rightBottom < 0.0) {
gl_FragColor = outputColor;
}
else if (rightBottom < (alphaWidth * uBoundRect.w)) {
gl_FragColor = outputColor * (1.0 - (rightBottom / (alphaWidth * uBoundRect.w)));
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
if ((point.x <= 0.0) && (point.y >= 0.0)) {
if (leftTop < (-alphaWidth * uBoundRect.w)) {
gl_FragColor = vec4(0, 0, 0, 0);
}
else if (leftTop < 0.0) {
gl_FragColor = outputColor * (1.0 + (leftTop / (alphaWidth * uBoundRect.w)));
}
else {
gl_FragColor = outputColor;
}
}
if ((point.x <= 0.0) && (point.y <= 0.0)) {
if (leftBottom < 0.0) {
gl_FragColor = outputColor;
}
else if (leftBottom < (alphaWidth * uBoundRect.w)) {
gl_FragColor = outputColor * (1.0 - (leftBottom / (alphaWidth * uBoundRect.w)));
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
}
}
`},function(et,_e){et.exports=`float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {
float pi = 3.14159265358;
float current;
float duration = 1.0;
if (timePercent < start) {
current = 0.0;
}
else if (timePercent > end) {
current = 1.0;
}
else {
current = (timePercent - start) / (end - start);
}
if (timing == 0) {
return ((current / duration) * (to - from)) + from;
}
else if (timing == 1) {
current = current / duration;
return (((to - from) * current) * current) + from;
}
else if (timing == 2) {
current = current / duration;
return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;
}
else {
current /= (duration / 2.0);
if (current < 1.0) {
return ((((to - from) / 2.0) * current) * current) + from;
}
current--;
return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;
}
}
varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
float timePercent = interpolationFloat(0.0, 1.0, 0.0, 1.0, percent, 2);
if (option < 0.5) {
timePercent = 1.0 - timePercent;
}
float alphaWidth = 0.1;
vec2 absPoint = abs(point);
vec2 halfRect = uBoundRect.zw / 2.0;
vec2 alphaFormula = vec2(((halfRect.x * (timePercent + alphaWidth)) - absPoint.x) / (halfRect.x * alphaWidth), ((halfRect.y * (timePercent + alphaWidth)) - absPoint.y) / (halfRect.y * alphaWidth));
if (((option < 0.5) && (transition > 0.0)) || ((option > 0.5) && (transition < 0.0))) {
if ((absPoint.x < ((uBoundRect.z * 0.5) * timePercent)) || (absPoint.y < ((uBoundRect.w * 0.5) * timePercent))) {
gl_FragColor = vec4(0, 0, 0, 0);
}
else if ((absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) || (absPoint.y < ((uBoundRect.w * 0.5) * (timePercent + alphaWidth)))) {
if ((absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) && (absPoint.y < ((uBoundRect.w * 0.5) * (timePercent + alphaWidth)))) {
gl_FragColor = (outputColor * (1.0 - alphaFormula.x)) * (1.0 - alphaFormula.y);
}
else if (absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) {
gl_FragColor = outputColor * (1.0 - alphaFormula.x);
}
else {
gl_FragColor = outputColor * (1.0 - alphaFormula.y);
}
}
else {
gl_FragColor = outputColor;
}
}
else {
if ((absPoint.x < ((uBoundRect.z * 0.5) * timePercent)) || (absPoint.y < ((uBoundRect.w * 0.5) * timePercent))) {
gl_FragColor = outputColor;
}
else if ((absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) || (absPoint.y < ((uBoundRect.w * 0.5) * (timePercent + alphaWidth)))) {
if ((absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) && (absPoint.y < ((uBoundRect.w * 0.5) * (timePercent + alphaWidth)))) {
gl_FragColor = outputColor * (1.0 - ((1.0 - alphaFormula.x) * (1.0 - alphaFormula.y)));
}
else if (absPoint.x < ((uBoundRect.z * 0.5) * (timePercent + alphaWidth))) {
gl_FragColor = outputColor * alphaFormula.x;
}
else {
gl_FragColor = outputColor * alphaFormula.y;
}
}
else {
gl_FragColor = vec4(0, 0, 0, 0);
}
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
vec2 absPoint = abs(point);
vec2 halfRect = uBoundRect.zw / 2.0;
float alphaWidth = 0.1;
float timePercent = percent;
if (option < 1.5) {
timePercent = 1.0 - timePercent;
}
float axis = (option > 0.5) && (option < 2.5) ? absPoint.y : absPoint.x;
float compareAxis = (option > 0.5) && (option < 2.5) ? halfRect.y : halfRect.x;
float alphaColor = abs(((timePercent * compareAxis) - axis) / (alphaWidth * compareAxis));
vec4 beginColor;
vec4 endColor;
if ((option > 1.5) && (option < 3.5)) {
if (transition < 0.0) {
beginColor = vec4(0, 0, 0, 0);
endColor = outputColor;
}
else {
beginColor = outputColor;
endColor = vec4(0, 0, 0, 0);
alphaColor = 1.0 - alphaColor;
}
}
else {
if (transition < 0.0) {
beginColor = outputColor;
endColor = vec4(0, 0, 0, 0);
alphaColor = 1.0 - alphaColor;
}
else {
beginColor = vec4(0, 0, 0, 0);
endColor = outputColor;
}
}
if (axis < (timePercent * compareAxis)) {
gl_FragColor = beginColor;
}
else if (axis < ((timePercent + alphaWidth) * compareAxis)) {
gl_FragColor = outputColor * alphaColor;
}
else {
gl_FragColor = endColor;
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x, filterCoord.y);
if ((option > 0.5) && (option < 1.5)) {
point = filterCoord.xy;
}
else if ((option > 1.5) && (option < 2.5)) {
point = uBoundRect.zw - point.xy;
}
else if ((option > 2.5) && (option < 3.5)) {
point = vec2(uBoundRect.z - filterCoord.x, filterCoord.y);
}
else {
point = vec2(filterCoord.x, uBoundRect.w - filterCoord.y);
}
float squareCount = 16.0;
float horzBarWidth = uBoundRect.z / squareCount;
float verticalBarWidth = uBoundRect.w / squareCount;
float horzCount = floor(point.x / horzBarWidth);
float verticalCount = floor(point.y / verticalBarWidth);
float timePercent = (percent * squareCount) * 2.5;
vec4 alphaStage;
if (transition > 0.0) {
alphaStage = vec4(0.2, 0.4, 0.6, 0.8);
}
else {
alphaStage = vec4(0.8, 0.6, 0.4, 0.2);
}
if ((horzCount + verticalCount) < (timePercent - 4.0)) {
gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);
}
else if ((horzCount + verticalCount) < (timePercent - 3.0)) {
gl_FragColor = outputColor * alphaStage.w;
}
else if ((horzCount + verticalCount) < (timePercent - 2.0)) {
gl_FragColor = outputColor * alphaStage.z;
}
else if ((horzCount + verticalCount) < (timePercent - 1.0)) {
gl_FragColor = outputColor * alphaStage.y;
}
else if ((horzCount + verticalCount) < timePercent) {
gl_FragColor = outputColor * alphaStage.x;
}
else {
gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
#define PI 3.1415926538
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
vec2 start = vec2(0.0, -1.0);
float arc = acos((dot(point.xy, start) / length(point)) / length(start));
if ((point.x == 0.0) && (point.y < 0.0)) {
arc = 0.0;
}
if ((point.x == 0.0) && (point.y > 0.0)) {
arc = PI;
}
float alphaBarArcWidth = 0.3;
float timePercent = (percent * PI) * (1.0 + alphaBarArcWidth);
vec3 colorAlpha = transition > 0.0 ? vec3(1.0, (timePercent - arc) / alphaBarArcWidth, 0.0) : vec3(0.0, 1.0 - ((timePercent - arc) / alphaBarArcWidth), 1.0);
if ((arc + alphaBarArcWidth) <= timePercent) {
gl_FragColor = outputColor * colorAlpha.x;
}
else if (arc <= timePercent) {
gl_FragColor = outputColor * colorAlpha.y;
}
else {
gl_FragColor = outputColor * colorAlpha.z;
}
}
`},function(et,_e){et.exports=`varying vec2 vTextureCoord;
uniform float percent;
uniform sampler2D uSampler;
varying vec2 filterCoord;
uniform vec4 uBoundRect;
uniform float transition;
uniform float option;
#define PI 3.1415926538
void main() {
vec4 outputColor = texture2D(uSampler, vTextureCoord);
vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));
vec2 start = vec2(0.0, -1.0);
float arc = acos((dot(point.xy, start) / length(point)) / length(start));
if ((point.x == 0.0) && (point.y < 0.0)) {
arc = 0.0;
}
if ((point.x == 0.0) && (point.y > 0.0)) {
arc = PI;
}
if (point.x < 0.0) {
arc = (2.0 * PI) - arc;
}
arc = arc == 0.0 ? arc : mod(arc, (2.0 * PI) / option);
float totalAlphaBarArcWidth = 0.75;
float alphaBarArcWidth = totalAlphaBarArcWidth / option;
float timePercent = ((percent * PI) * (2.0 + totalAlphaBarArcWidth)) / option;
vec3 colorAlpha = transition > 0.0 ? vec3(1.0, (timePercent - arc) / alphaBarArcWidth, 0.0) : vec3(0.0, 1.0 - ((timePercent - arc) / alphaBarArcWidth), 1.0);
if ((arc + alphaBarArcWidth) <= timePercent) {
gl_FragColor = outputColor * colorAlpha.x;
}
else if (arc <= timePercent) {
gl_FragColor = outputColor * colorAlpha.y;
}
else {
gl_FragColor = outputColor * colorAlpha.z;
}
}
`},function(et,_e,tt){var rt=tt(150);et.exports=function(nt,st){return rt(nt,st)}},function(et,_e,tt){var rt=tt(25),nt=Object.prototype,st=nt.hasOwnProperty,dt=nt.toString,ft=rt?rt.toStringTag:void 0;et.exports=function(ht){var mt=st.call(ht,ft),bt=ht[ft];try{ht[ft]=void 0;var St=!0}catch{}var Et=dt.call(ht);return St&&(mt?ht[ft]=bt:delete ht[ft]),Et}},function(et,_e){var tt=Object.prototype.toString;et.exports=function(rt){return tt.call(rt)}},function(et,_e,tt){(function(rt){var nt=tt(108),st=tt(111),dt=tt.n(st);/*!
* @pixi/polyfill - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/polyfill is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/if(typeof globalThis>"u"&&(typeof self<"u"?self.globalThis=self:rt!==void 0&&(rt.globalThis=rt)),globalThis.Promise||(globalThis.Promise=nt.a),Object.assign||(Object.assign=dt.a),Date.now&&Date.prototype.getTime||(Date.now=function(){return new Date().getTime()}),!globalThis.performance||!globalThis.performance.now){var ft=Date.now();globalThis.performance||(globalThis.performance={}),globalThis.performance.now=function(){return Date.now()-ft}}for(var ht=Date.now(),mt=["ms","moz","webkit","o"],bt=0;bt<mt.length&&!globalThis.requestAnimationFrame;++bt){var St=mt[bt];globalThis.requestAnimationFrame=globalThis[St+"RequestAnimationFrame"],globalThis.cancelAnimationFrame=globalThis[St+"CancelAnimationFrame"]||globalThis[St+"CancelRequestAnimationFrame"]}globalThis.requestAnimationFrame||(globalThis.requestAnimationFrame=function(Et){if(typeof Et!="function")throw new TypeError(Et+"is not a function");var Ct=Date.now(),Rt=16+ht-Ct;return Rt<0&&(Rt=0),ht=Ct,globalThis.self.setTimeout(function(){ht=Date.now(),Et(performance.now())},Rt)}),globalThis.cancelAnimationFrame||(globalThis.cancelAnimationFrame=function(Et){return clearTimeout(Et)}),Math.sign||(Math.sign=function(Et){return(Et=Number(Et))===0||isNaN(Et)?Et:Et>0?1:-1}),Number.isInteger||(Number.isInteger=function(Et){return typeof Et=="number"&&isFinite(Et)&&Math.floor(Et)===Et}),globalThis.ArrayBuffer||(globalThis.ArrayBuffer=Array),globalThis.Float32Array||(globalThis.Float32Array=Array),globalThis.Uint32Array||(globalThis.Uint32Array=Array),globalThis.Uint16Array||(globalThis.Uint16Array=Array),globalThis.Uint8Array||(globalThis.Uint8Array=Array),globalThis.Int32Array||(globalThis.Int32Array=Array)}).call(this,tt(17))},function(et,_e,tt){(function(rt){var nt=rt!==void 0&&rt||typeof self<"u"&&self||window,st=Function.prototype.apply;function dt(ft,ht){this._id=ft,this._clearFn=ht}_e.setTimeout=function(){return new dt(st.call(setTimeout,nt,arguments),clearTimeout)},_e.setInterval=function(){return new dt(st.call(setInterval,nt,arguments),clearInterval)},_e.clearTimeout=_e.clearInterval=function(ft){ft&&ft.close()},dt.prototype.unref=dt.prototype.ref=function(){},dt.prototype.close=function(){this._clearFn.call(nt,this._id)},_e.enroll=function(ft,ht){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=ht},_e.unenroll=function(ft){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=-1},_e._unrefActive=_e.active=function(ft){clearTimeout(ft._idleTimeoutId);var ht=ft._idleTimeout;ht>=0&&(ft._idleTimeoutId=setTimeout(function(){ft._onTimeout&&ft._onTimeout()},ht))},tt(141),_e.setImmediate=typeof self<"u"&&self.setImmediate||rt!==void 0&&rt.setImmediate||this&&this.setImmediate,_e.clearImmediate=typeof self<"u"&&self.clearImmediate||rt!==void 0&&rt.clearImmediate||this&&this.clearImmediate}).call(this,tt(17))},function(et,_e,tt){(function(rt,nt){(function(st,dt){if(!st.setImmediate){var ft,ht,mt,bt,St,Et=1,Ct={},Rt=!1,Tt=st.document,wt=Object.getPrototypeOf&&Object.getPrototypeOf(st);wt=wt&&wt.setTimeout?wt:st,{}.toString.call(st.process)==="[object process]"?ft=function(Pt){nt.nextTick(function(){Nt(Pt)})}:(function(){if(st.postMessage&&!st.importScripts){var Pt=!0,It=st.onmessage;return st.onmessage=function(){Pt=!1},st.postMessage("","*"),st.onmessage=It,Pt}})()?(bt="setImmediate$"+Math.random()+"$",St=function(Pt){Pt.source===st&&typeof Pt.data=="string"&&Pt.data.indexOf(bt)===0&&Nt(+Pt.data.slice(bt.length))},st.addEventListener?st.addEventListener("message",St,!1):st.attachEvent("onmessage",St),ft=function(Pt){st.postMessage(bt+Pt,"*")}):st.MessageChannel?((mt=new MessageChannel).port1.onmessage=function(Pt){Nt(Pt.data)},ft=function(Pt){mt.port2.postMessage(Pt)}):Tt&&"onreadystatechange"in Tt.createElement("script")?(ht=Tt.documentElement,ft=function(Pt){var It=Tt.createElement("script");It.onreadystatechange=function(){Nt(Pt),It.onreadystatechange=null,ht.removeChild(It),It=null},ht.appendChild(It)}):ft=function(Pt){setTimeout(Nt,0,Pt)},wt.setImmediate=function(Pt){typeof Pt!="function"&&(Pt=new Function(""+Pt));for(var It=new Array(arguments.length-1),Ft=0;Ft<It.length;Ft++)It[Ft]=arguments[Ft+1];var qt={callback:Pt,args:It};return Ct[Et]=qt,ft(Et),Et++},wt.clearImmediate=At}function At(Pt){delete Ct[Pt]}function Nt(Pt){if(Rt)setTimeout(Nt,0,Pt);else{var It=Ct[Pt];if(It){Rt=!0;try{(function(Ft){var qt=Ft.callback,Vt=Ft.args;switch(Vt.length){case 0:qt();break;case 1:qt(Vt[0]);break;case 2:qt(Vt[0],Vt[1]);break;case 3:qt(Vt[0],Vt[1],Vt[2]);break;default:qt.apply(void 0,Vt)}})(It)}finally{At(Pt),Rt=!1}}}}})(typeof self>"u"?rt===void 0?this:rt:self)}).call(this,tt(17),tt(142))},function(et,_e){var tt,rt,nt=et.exports={};function st(){throw new Error("setTimeout has not been defined")}function dt(){throw new Error("clearTimeout has not been defined")}function ft(wt){if(tt===setTimeout)return setTimeout(wt,0);if((tt===st||!tt)&&setTimeout)return tt=setTimeout,setTimeout(wt,0);try{return tt(wt,0)}catch{try{return tt.call(null,wt,0)}catch{return tt.call(this,wt,0)}}}(function(){try{tt=typeof setTimeout=="function"?setTimeout:st}catch{tt=st}try{rt=typeof clearTimeout=="function"?clearTimeout:dt}catch{rt=dt}})();var ht,mt=[],bt=!1,St=-1;function Et(){bt&&ht&&(bt=!1,ht.length?mt=ht.concat(mt):St=-1,mt.length&&Ct())}function Ct(){if(!bt){var wt=ft(Et);bt=!0;for(var At=mt.length;At;){for(ht=mt,mt=[];++St<At;)ht&&ht[St].run();St=-1,At=mt.length}ht=null,bt=!1,(function(Nt){if(rt===clearTimeout)return clearTimeout(Nt);if((rt===dt||!rt)&&clearTimeout)return rt=clearTimeout,clearTimeout(Nt);try{rt(Nt)}catch{try{return rt.call(null,Nt)}catch{return rt.call(this,Nt)}}})(wt)}}function Rt(wt,At){this.fun=wt,this.array=At}function Tt(){}nt.nextTick=function(wt){var At=new Array(arguments.length-1);if(arguments.length>1)for(var Nt=1;Nt<arguments.length;Nt++)At[Nt-1]=arguments[Nt];mt.push(new Rt(wt,At)),mt.length!==1||bt||ft(Ct)},Rt.prototype.run=function(){this.fun.apply(null,this.array)},nt.title="browser",nt.browser=!0,nt.env={},nt.argv=[],nt.version="",nt.versions={},nt.on=Tt,nt.addListener=Tt,nt.once=Tt,nt.off=Tt,nt.removeListener=Tt,nt.removeAllListeners=Tt,nt.emit=Tt,nt.prependListener=Tt,nt.prependOnceListener=Tt,nt.listeners=function(wt){return[]},nt.binding=function(wt){throw new Error("process.binding is not supported")},nt.cwd=function(){return"/"},nt.chdir=function(wt){throw new Error("process.chdir is not supported")},nt.umask=function(){return 0}},function(et,_e,tt){(function(rt,nt){var st;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(dt){_e&&_e.nodeType,rt&&rt.nodeType;var ft=typeof nt=="object"&&nt;ft.global!==ft&&ft.window!==ft&&ft.self;var ht,mt=2147483647,bt=/^xn--/,St=/[^\x20-\x7E]/,Et=/[\x2E\u3002\uFF0E\uFF61]/g,Ct={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Rt=Math.floor,Tt=String.fromCharCode;function wt(jt){throw new RangeError(Ct[jt])}function At(jt,Ut){for(var Ot=jt.length,Wt=[];Ot--;)Wt[Ot]=Ut(jt[Ot]);return Wt}function Nt(jt,Ut){var Ot=jt.split("@"),Wt="";return Ot.length>1&&(Wt=Ot[0]+"@",jt=Ot[1]),Wt+At((jt=jt.replace(Et,".")).split("."),Ut).join(".")}function Pt(jt){for(var Ut,Ot,Wt=[],Bt=0,tr=jt.length;Bt<tr;)(Ut=jt.charCodeAt(Bt++))>=55296&&Ut<=56319&&Bt<tr?(64512&(Ot=jt.charCodeAt(Bt++)))==56320?Wt.push(((1023&Ut)<<10)+(1023&Ot)+65536):(Wt.push(Ut),Bt--):Wt.push(Ut);return Wt}function It(jt){return At(jt,function(Ut){var Ot="";return Ut>65535&&(Ot+=Tt((Ut-=65536)>>>10&1023|55296),Ut=56320|1023&Ut),Ot+=Tt(Ut)}).join("")}function Ft(jt,Ut){return jt+22+75*(jt<26)-((Ut!=0)<<5)}function qt(jt,Ut,Ot){var Wt=0;for(jt=Ot?Rt(jt/700):jt>>1,jt+=Rt(jt/Ut);jt>455;Wt+=36)jt=Rt(jt/35);return Rt(Wt+36*jt/(jt+38))}function Vt(jt){var Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr,gr,Sr,Er=[],Vr=jt.length,Wr=0,Mr=128,Nr=72;for((Ot=jt.lastIndexOf("-"))<0&&(Ot=0),Wt=0;Wt<Ot;++Wt)jt.charCodeAt(Wt)>=128&&wt("not-basic"),Er.push(jt.charCodeAt(Wt));for(Bt=Ot>0?Ot+1:0;Bt<Vr;){for(tr=Wr,Jt=1,ar=36;Bt>=Vr&&wt("invalid-input"),((pr=(Sr=jt.charCodeAt(Bt++))-48<10?Sr-22:Sr-65<26?Sr-65:Sr-97<26?Sr-97:36)>=36||pr>Rt((mt-Wr)/Jt))&&wt("overflow"),Wr+=pr*Jt,!(pr<(cr=ar<=Nr?1:ar>=Nr+26?26:ar-Nr));ar+=36)Jt>Rt(mt/(gr=36-cr))&&wt("overflow"),Jt*=gr;Nr=qt(Wr-tr,Ut=Er.length+1,tr==0),Rt(Wr/Ut)>mt-Mr&&wt("overflow"),Mr+=Rt(Wr/Ut),Wr%=Ut,Er.splice(Wr++,0,Mr)}return It(Er)}function Kt(jt){var Ut,Ot,Wt,Bt,tr,Jt,ar,pr,cr,gr,Sr,Er,Vr,Wr,Mr,Nr=[];for(Er=(jt=Pt(jt)).length,Ut=128,Ot=0,tr=72,Jt=0;Jt<Er;++Jt)(Sr=jt[Jt])<128&&Nr.push(Tt(Sr));for(Wt=Bt=Nr.length,Bt&&Nr.push("-");Wt<Er;){for(ar=mt,Jt=0;Jt<Er;++Jt)(Sr=jt[Jt])>=Ut&&Sr<ar&&(ar=Sr);for(ar-Ut>Rt((mt-Ot)/(Vr=Wt+1))&&wt("overflow"),Ot+=(ar-Ut)*Vr,Ut=ar,Jt=0;Jt<Er;++Jt)if((Sr=jt[Jt])<Ut&&++Ot>mt&&wt("overflow"),Sr==Ut){for(pr=Ot,cr=36;!(pr<(gr=cr<=tr?1:cr>=tr+26?26:cr-tr));cr+=36)Mr=pr-gr,Wr=36-gr,Nr.push(Tt(Ft(gr+Mr%Wr,0))),pr=Rt(Mr/Wr);Nr.push(Tt(Ft(pr,0))),tr=qt(Ot,Vr,Wt==Bt),Ot=0,++Wt}++Ot,++Ut}return Nr.join("")}ht={version:"1.4.1",ucs2:{decode:Pt,encode:It},decode:Vt,encode:Kt,toASCII:function(jt){return Nt(jt,function(Ut){return St.test(Ut)?"xn--"+Kt(Ut):Ut})},toUnicode:function(jt){return Nt(jt,function(Ut){return bt.test(Ut)?Vt(Ut.slice(4).toLowerCase()):Ut})}},(st=(function(){return ht}).call(_e,tt,_e,rt))===void 0||(rt.exports=st)})()}).call(this,tt(26)(et),tt(17))},function(et,_e,tt){et.exports={isString:function(rt){return typeof rt=="string"},isObject:function(rt){return typeof rt=="object"&&rt!==null},isNull:function(rt){return rt===null},isNullOrUndefined:function(rt){return rt==null}}},function(et,_e,tt){_e.decode=_e.parse=tt(146),_e.encode=_e.stringify=tt(147)},function(et,_e,tt){function rt(st,dt){return Object.prototype.hasOwnProperty.call(st,dt)}et.exports=function(st,dt,ft,ht){dt=dt||"&",ft=ft||"=";var mt={};if(typeof st!="string"||st.length===0)return mt;var bt=/\+/g;st=st.split(dt);var St=1e3;ht&&typeof ht.maxKeys=="number"&&(St=ht.maxKeys);var Et=st.length;St>0&&Et>St&&(Et=St);for(var Ct=0;Ct<Et;++Ct){var Rt,Tt,wt,At,Nt=st[Ct].replace(bt,"%20"),Pt=Nt.indexOf(ft);Pt>=0?(Rt=Nt.substr(0,Pt),Tt=Nt.substr(Pt+1)):(Rt=Nt,Tt=""),wt=decodeURIComponent(Rt),At=decodeURIComponent(Tt),rt(mt,wt)?nt(mt[wt])?mt[wt].push(At):mt[wt]=[mt[wt],At]:mt[wt]=At}return mt};var nt=Array.isArray||function(st){return Object.prototype.toString.call(st)==="[object Array]"}},function(et,_e,tt){var rt=function(ft){switch(typeof ft){case"string":return ft;case"boolean":return ft?"true":"false";case"number":return isFinite(ft)?ft:"";default:return""}};et.exports=function(ft,ht,mt,bt){return ht=ht||"&",mt=mt||"=",ft===null&&(ft=void 0),typeof ft=="object"?st(dt(ft),function(St){var Et=encodeURIComponent(rt(St))+mt;return nt(ft[St])?st(ft[St],function(Ct){return Et+encodeURIComponent(rt(Ct))}).join(ht):Et+encodeURIComponent(rt(ft[St]))}).join(ht):bt?encodeURIComponent(rt(bt))+mt+encodeURIComponent(rt(ft)):""};var nt=Array.isArray||function(ft){return Object.prototype.toString.call(ft)==="[object Array]"};function st(ft,ht){if(ft.map)return ft.map(ht);for(var mt=[],bt=0;bt<ft.length;bt++)mt.push(ht(ft[bt],bt));return mt}var dt=Object.keys||function(ft){var ht=[];for(var mt in ft)Object.prototype.hasOwnProperty.call(ft,mt)&&ht.push(mt);return ht}},function(et,_e){var tt=function(){};tt.prototype={fit:function(rt){var nt,st,dt,ft,ht=rt.length,mt=ht>0?rt[0].width:0,bt=ht>0?rt[0].height:0;for(this.root={x:0,y:0,width:mt,height:bt},nt=0;nt<ht;nt++)dt=rt[nt],(st=this.findNode(this.root,dt.width,dt.height))?(ft=this.splitNode(st,dt.width,dt.height),dt.x=ft.x,dt.y=ft.y):(ft=this.growNode(dt.width,dt.height),dt.x=ft.x,dt.y=ft.y)},findNode:function(rt,nt,st){return rt.used?this.findNode(rt.right,nt,st)||this.findNode(rt.down,nt,st):nt<=rt.width&&st<=rt.height?rt:null},splitNode:function(rt,nt,st){return rt.used=!0,rt.down={x:rt.x,y:rt.y+st,width:rt.width,height:rt.height-st},rt.right={x:rt.x+nt,y:rt.y,width:rt.width-nt,height:st},rt},growNode:function(rt,nt){var st=rt<=this.root.width,dt=nt<=this.root.height,ft=dt&&this.root.height>=this.root.width+rt,ht=st&&this.root.width>=this.root.height+nt;return ft?this.growRight(rt,nt):ht?this.growDown(rt,nt):dt?this.growRight(rt,nt):st?this.growDown(rt,nt):null},growRight:function(rt,nt){var st;return this.root={used:!0,x:0,y:0,width:this.root.width+rt,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:rt,height:this.root.height}},(st=this.findNode(this.root,rt,nt))?this.splitNode(st,rt,nt):null},growDown:function(rt,nt){var st;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+nt,down:{x:0,y:this.root.height,width:this.root.width,height:nt},right:this.root},(st=this.findNode(this.root,rt,nt))?this.splitNode(st,rt,nt):null}},et.exports=tt},function(et,_e){(function(tt){et.exports=tt}).call(this,{})},function(et,_e,tt){var rt=tt(151),nt=tt(15);et.exports=function st(dt,ft,ht,mt,bt){return dt===ft||(dt==null||ft==null||!nt(dt)&&!nt(ft)?dt!=dt&&ft!=ft:rt(dt,ft,ht,mt,st,bt))}},function(et,_e,tt){var rt=tt(54),nt=tt(57),st=tt(183),dt=tt(186),ft=tt(32),ht=tt(31),mt=tt(41),bt=tt(64),St="[object Object]",Et=Object.prototype.hasOwnProperty;et.exports=function(Ct,Rt,Tt,wt,At,Nt){var Pt=ht(Ct),It=ht(Rt),Ft=Pt?"[object Array]":ft(Ct),qt=It?"[object Array]":ft(Rt),Vt=(Ft=Ft=="[object Arguments]"?St:Ft)==St,Kt=(qt=qt=="[object Arguments]"?St:qt)==St,jt=Ft==qt;if(jt&&mt(Ct)){if(!mt(Rt))return!1;Pt=!0,Vt=!1}if(jt&&!Vt)return Nt||(Nt=new rt),Pt||bt(Ct)?nt(Ct,Rt,Tt,wt,At,Nt):st(Ct,Rt,Ft,Tt,wt,At,Nt);if(!(1&Tt)){var Ut=Vt&&Et.call(Ct,"__wrapped__"),Ot=Kt&&Et.call(Rt,"__wrapped__");if(Ut||Ot){var Wt=Ut?Ct.value():Ct,Bt=Ot?Rt.value():Rt;return Nt||(Nt=new rt),At(Wt,Bt,Tt,wt,Nt)}}return!!jt&&(Nt||(Nt=new rt),dt(Ct,Rt,Tt,wt,At,Nt))}},function(et,_e){et.exports=function(){this.__data__=[],this.size=0}},function(et,_e,tt){var rt=tt(28),nt=Array.prototype.splice;et.exports=function(st){var dt=this.__data__,ft=rt(dt,st);return!(ft<0)&&(ft==dt.length-1?dt.pop():nt.call(dt,ft,1),--this.size,!0)}},function(et,_e,tt){var rt=tt(28);et.exports=function(nt){var st=this.__data__,dt=rt(st,nt);return dt<0?void 0:st[dt][1]}},function(et,_e,tt){var rt=tt(28);et.exports=function(nt){return rt(this.__data__,nt)>-1}},function(et,_e,tt){var rt=tt(28);et.exports=function(nt,st){var dt=this.__data__,ft=rt(dt,nt);return ft<0?(++this.size,dt.push([nt,st])):dt[ft][1]=st,this}},function(et,_e,tt){var rt=tt(27);et.exports=function(){this.__data__=new rt,this.size=0}},function(et,_e){et.exports=function(tt){var rt=this.__data__,nt=rt.delete(tt);return this.size=rt.size,nt}},function(et,_e){et.exports=function(tt){return this.__data__.get(tt)}},function(et,_e){et.exports=function(tt){return this.__data__.has(tt)}},function(et,_e,tt){var rt=tt(27),nt=tt(38),st=tt(56);et.exports=function(dt,ft){var ht=this.__data__;if(ht instanceof rt){var mt=ht.__data__;if(!nt||mt.length<199)return mt.push([dt,ft]),this.size=++ht.size,this;ht=this.__data__=new st(mt)}return ht.set(dt,ft),this.size=ht.size,this}},function(et,_e,tt){var rt=tt(34),nt=tt(163),st=tt(21),dt=tt(55),ft=/^\[object .+?Constructor\]$/,ht=Function.prototype,mt=Object.prototype,bt=ht.toString,St=mt.hasOwnProperty,Et=RegExp("^"+bt.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");et.exports=function(Ct){return!(!st(Ct)||nt(Ct))&&(rt(Ct)?Et:ft).test(dt(Ct))}},function(et,_e,tt){var rt,nt=tt(164),st=(rt=/[^.]+$/.exec(nt&&nt.keys&&nt.keys.IE_PROTO||""))?"Symbol(src)_1."+rt:"";et.exports=function(dt){return!!st&&st in dt}},function(et,_e,tt){var rt=tt(14)["__core-js_shared__"];et.exports=rt},function(et,_e){et.exports=function(tt,rt){return tt?.[rt]}},function(et,_e,tt){var rt=tt(167),nt=tt(27),st=tt(38);et.exports=function(){this.size=0,this.__data__={hash:new rt,map:new(st||nt),string:new rt}}},function(et,_e,tt){var rt=tt(168),nt=tt(169),st=tt(170),dt=tt(171),ft=tt(172);function ht(mt){var bt=-1,St=mt==null?0:mt.length;for(this.clear();++bt<St;){var Et=mt[bt];this.set(Et[0],Et[1])}}ht.prototype.clear=rt,ht.prototype.delete=nt,ht.prototype.get=st,ht.prototype.has=dt,ht.prototype.set=ft,et.exports=ht},function(et,_e,tt){var rt=tt(29);et.exports=function(){this.__data__=rt?rt(null):{},this.size=0}},function(et,_e){et.exports=function(tt){var rt=this.has(tt)&&delete this.__data__[tt];return this.size-=rt?1:0,rt}},function(et,_e,tt){var rt=tt(29),nt=Object.prototype.hasOwnProperty;et.exports=function(st){var dt=this.__data__;if(rt){var ft=dt[st];return ft==="__lodash_hash_undefined__"?void 0:ft}return nt.call(dt,st)?dt[st]:void 0}},function(et,_e,tt){var rt=tt(29),nt=Object.prototype.hasOwnProperty;et.exports=function(st){var dt=this.__data__;return rt?dt[st]!==void 0:nt.call(dt,st)}},function(et,_e,tt){var rt=tt(29);et.exports=function(nt,st){var dt=this.__data__;return this.size+=this.has(nt)?0:1,dt[nt]=rt&&st===void 0?"__lodash_hash_undefined__":st,this}},function(et,_e,tt){var rt=tt(30);et.exports=function(nt){var st=rt(this,nt).delete(nt);return this.size-=st?1:0,st}},function(et,_e){et.exports=function(tt){var rt=typeof tt;return rt=="string"||rt=="number"||rt=="symbol"||rt=="boolean"?tt!=="__proto__":tt===null}},function(et,_e,tt){var rt=tt(30);et.exports=function(nt){return rt(this,nt).get(nt)}},function(et,_e,tt){var rt=tt(30);et.exports=function(nt){return rt(this,nt).has(nt)}},function(et,_e,tt){var rt=tt(30);et.exports=function(nt,st){var dt=rt(this,nt),ft=dt.size;return dt.set(nt,st),this.size+=dt.size==ft?0:1,this}},function(et,_e,tt){var rt=tt(56),nt=tt(179),st=tt(180);function dt(ft){var ht=-1,mt=ft==null?0:ft.length;for(this.__data__=new rt;++ht<mt;)this.add(ft[ht])}dt.prototype.add=dt.prototype.push=nt,dt.prototype.has=st,et.exports=dt},function(et,_e){et.exports=function(tt){return this.__data__.set(tt,"__lodash_hash_undefined__"),this}},function(et,_e){et.exports=function(tt){return this.__data__.has(tt)}},function(et,_e){et.exports=function(tt,rt){for(var nt=-1,st=tt==null?0:tt.length;++nt<st;)if(rt(tt[nt],nt,tt))return!0;return!1}},function(et,_e){et.exports=function(tt,rt){return tt.has(rt)}},function(et,_e,tt){var rt=tt(25),nt=tt(58),st=tt(37),dt=tt(57),ft=tt(184),ht=tt(185),mt=rt?rt.prototype:void 0,bt=mt?mt.valueOf:void 0;et.exports=function(St,Et,Ct,Rt,Tt,wt,At){switch(Ct){case"[object DataView]":if(St.byteLength!=Et.byteLength||St.byteOffset!=Et.byteOffset)return!1;St=St.buffer,Et=Et.buffer;case"[object ArrayBuffer]":return!(St.byteLength!=Et.byteLength||!wt(new nt(St),new nt(Et)));case"[object Boolean]":case"[object Date]":case"[object Number]":return st(+St,+Et);case"[object Error]":return St.name==Et.name&&St.message==Et.message;case"[object RegExp]":case"[object String]":return St==Et+"";case"[object Map]":var Nt=ft;case"[object Set]":var Pt=1&Rt;if(Nt||(Nt=ht),St.size!=Et.size&&!Pt)return!1;var It=At.get(St);if(It)return It==Et;Rt|=2,At.set(St,Et);var Ft=dt(Nt(St),Nt(Et),Rt,Tt,wt,At);return At.delete(St),Ft;case"[object Symbol]":if(bt)return bt.call(St)==bt.call(Et)}return!1}},function(et,_e){et.exports=function(tt){var rt=-1,nt=Array(tt.size);return tt.forEach(function(st,dt){nt[++rt]=[dt,st]}),nt}},function(et,_e){et.exports=function(tt){var rt=-1,nt=Array(tt.size);return tt.forEach(function(st){nt[++rt]=st}),nt}},function(et,_e,tt){var rt=tt(59),nt=Object.prototype.hasOwnProperty;et.exports=function(st,dt,ft,ht,mt,bt){var St=1&ft,Et=rt(st),Ct=Et.length;if(Ct!=rt(dt).length&&!St)return!1;for(var Rt=Ct;Rt--;){var Tt=Et[Rt];if(!(St?Tt in dt:nt.call(dt,Tt)))return!1}var wt=bt.get(st),At=bt.get(dt);if(wt&&At)return wt==dt&&At==st;var Nt=!0;bt.set(st,dt),bt.set(dt,st);for(var Pt=St;++Rt<Ct;){var It=st[Tt=Et[Rt]],Ft=dt[Tt];if(ht)var qt=St?ht(Ft,It,Tt,dt,st,bt):ht(It,Ft,Tt,st,dt,bt);if(!(qt===void 0?It===Ft||mt(It,Ft,ft,ht,bt):qt)){Nt=!1;break}Pt||(Pt=Tt=="constructor")}if(Nt&&!Pt){var Vt=st.constructor,Kt=dt.constructor;Vt==Kt||!("constructor"in st)||!("constructor"in dt)||typeof Vt=="function"&&Vt instanceof Vt&&typeof Kt=="function"&&Kt instanceof Kt||(Nt=!1)}return bt.delete(st),bt.delete(dt),Nt}},function(et,_e){et.exports=function(tt,rt){for(var nt=-1,st=tt==null?0:tt.length,dt=0,ft=[];++nt<st;){var ht=tt[nt];rt(ht,nt,tt)&&(ft[dt++]=ht)}return ft}},function(et,_e){et.exports=function(tt,rt){for(var nt=-1,st=Array(tt);++nt<tt;)st[nt]=rt(nt);return st}},function(et,_e,tt){var rt=tt(190),nt=tt(15),st=Object.prototype,dt=st.hasOwnProperty,ft=st.propertyIsEnumerable,ht=rt((function(){return arguments})())?rt:function(mt){return nt(mt)&&dt.call(mt,"callee")&&!ft.call(mt,"callee")};et.exports=ht},function(et,_e,tt){var rt=tt(20),nt=tt(15);et.exports=function(st){return nt(st)&&rt(st)=="[object Arguments]"}},function(et,_e){et.exports=function(){return!1}},function(et,_e){var tt=/^(?:0|[1-9]\d*)$/;et.exports=function(rt,nt){var st=typeof rt;return!!(nt=nt??9007199254740991)&&(st=="number"||st!="symbol"&&tt.test(rt))&&rt>-1&&rt%1==0&&rt<nt}},function(et,_e,tt){var rt=tt(20),nt=tt(65),st=tt(15),dt={};dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Arguments]"]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object Boolean]"]=dt["[object DataView]"]=dt["[object Date]"]=dt["[object Error]"]=dt["[object Function]"]=dt["[object Map]"]=dt["[object Number]"]=dt["[object Object]"]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object WeakMap]"]=!1,et.exports=function(ft){return st(ft)&&nt(ft.length)&&!!dt[rt(ft)]}},function(et,_e,tt){var rt=tt(44),nt=tt(195),st=Object.prototype.hasOwnProperty;et.exports=function(dt){if(!rt(dt))return nt(dt);var ft=[];for(var ht in Object(dt))st.call(dt,ht)&&ht!="constructor"&&ft.push(ht);return ft}},function(et,_e,tt){var rt=tt(66)(Object.keys,Object);et.exports=rt},function(et,_e,tt){var rt=tt(22)(tt(14),"DataView");et.exports=rt},function(et,_e,tt){var rt=tt(22)(tt(14),"Promise");et.exports=rt},function(et,_e,tt){var rt=tt(22)(tt(14),"Set");et.exports=rt},function(et,_e,tt){var rt=tt(22)(tt(14),"WeakMap");et.exports=rt},function(et,_e,tt){var rt=tt(14);et.exports=function(){return rt.Date.now()}},function(et,_e,tt){var rt=tt(202),nt=tt(21),st=tt(204),dt=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,ht=/^0o[0-7]+$/i,mt=parseInt;et.exports=function(bt){if(typeof bt=="number")return bt;if(st(bt))return NaN;if(nt(bt)){var St=typeof bt.valueOf=="function"?bt.valueOf():bt;bt=nt(St)?St+"":St}if(typeof bt!="string")return bt===0?bt:+bt;bt=rt(bt);var Et=ft.test(bt);return Et||ht.test(bt)?mt(bt.slice(2),Et?2:8):dt.test(bt)?NaN:+bt}},function(et,_e,tt){var rt=tt(203),nt=/^\s+/;et.exports=function(st){return st&&st.slice(0,rt(st)+1).replace(nt,"")}},function(et,_e){var tt=/\s/;et.exports=function(rt){for(var nt=rt.length;nt--&&tt.test(rt.charAt(nt)););return nt}},function(et,_e,tt){var rt=tt(20),nt=tt(15);et.exports=function(st){return typeof st=="symbol"||nt(st)&&rt(st)=="[object Symbol]"}},function(et,_e,tt){var rt=tt(54),nt=tt(206),st=tt(68),dt=tt(208),ft=tt(209),ht=tt(212),mt=tt(213),bt=tt(214),St=tt(215),Et=tt(59),Ct=tt(216),Rt=tt(32),Tt=tt(217),wt=tt(218),At=tt(223),Nt=tt(31),Pt=tt(41),It=tt(225),Ft=tt(21),qt=tt(227),Vt=tt(40),Kt=tt(45),jt={};jt["[object Arguments]"]=jt["[object Array]"]=jt["[object ArrayBuffer]"]=jt["[object DataView]"]=jt["[object Boolean]"]=jt["[object Date]"]=jt["[object Float32Array]"]=jt["[object Float64Array]"]=jt["[object Int8Array]"]=jt["[object Int16Array]"]=jt["[object Int32Array]"]=jt["[object Map]"]=jt["[object Number]"]=jt["[object Object]"]=jt["[object RegExp]"]=jt["[object Set]"]=jt["[object String]"]=jt["[object Symbol]"]=jt["[object Uint8Array]"]=jt["[object Uint8ClampedArray]"]=jt["[object Uint16Array]"]=jt["[object Uint32Array]"]=!0,jt["[object Error]"]=jt["[object Function]"]=jt["[object WeakMap]"]=!1,et.exports=function Ut(Ot,Wt,Bt,tr,Jt,ar){var pr,cr=1&Wt,gr=2&Wt,Sr=4&Wt;if(Bt&&(pr=Jt?Bt(Ot,tr,Jt,ar):Bt(Ot)),pr!==void 0)return pr;if(!Ft(Ot))return Ot;var Er=Nt(Ot);if(Er){if(pr=Tt(Ot),!cr)return mt(Ot,pr)}else{var Vr=Rt(Ot),Wr=Vr=="[object Function]"||Vr=="[object GeneratorFunction]";if(Pt(Ot))return ht(Ot,cr);if(Vr=="[object Object]"||Vr=="[object Arguments]"||Wr&&!Jt){if(pr=gr||Wr?{}:At(Ot),!cr)return gr?St(Ot,ft(pr,Ot)):bt(Ot,dt(pr,Ot))}else{if(!jt[Vr])return Jt?Ot:{};pr=wt(Ot,Vr,cr)}}ar||(ar=new rt);var Mr=ar.get(Ot);if(Mr)return Mr;ar.set(Ot,pr),qt(Ot)?Ot.forEach(function(Yr){pr.add(Ut(Yr,Wt,Bt,Yr,Ot,ar))}):It(Ot)&&Ot.forEach(function(Yr,Or){pr.set(Or,Ut(Yr,Wt,Bt,Or,Ot,ar))});var Nr=Er?void 0:(Sr?gr?Ct:Et:gr?Kt:Vt)(Ot);return nt(Nr||Ot,function(Yr,Or){Nr&&(Yr=Ot[Or=Yr]),st(pr,Or,Ut(Yr,Wt,Bt,Or,Ot,ar))}),pr}},function(et,_e){et.exports=function(tt,rt){for(var nt=-1,st=tt==null?0:tt.length;++nt<st&&rt(tt[nt],nt,tt)!==!1;);return tt}},function(et,_e,tt){var rt=tt(22),nt=(function(){try{var st=rt(Object,"defineProperty");return st({},"",{}),st}catch{}})();et.exports=nt},function(et,_e,tt){var rt=tt(33),nt=tt(40);et.exports=function(st,dt){return st&&rt(dt,nt(dt),st)}},function(et,_e,tt){var rt=tt(33),nt=tt(45);et.exports=function(st,dt){return st&&rt(dt,nt(dt),st)}},function(et,_e,tt){var rt=tt(21),nt=tt(44),st=tt(211),dt=Object.prototype.hasOwnProperty;et.exports=function(ft){if(!rt(ft))return st(ft);var ht=nt(ft),mt=[];for(var bt in ft)(bt!="constructor"||!ht&&dt.call(ft,bt))&&mt.push(bt);return mt}},function(et,_e){et.exports=function(tt){var rt=[];if(tt!=null)for(var nt in Object(tt))rt.push(nt);return rt}},function(et,_e,tt){(function(rt){var nt=tt(14),st=_e&&!_e.nodeType&&_e,dt=st&&typeof rt=="object"&&rt&&!rt.nodeType&&rt,ft=dt&&dt.exports===st?nt.Buffer:void 0,ht=ft?ft.allocUnsafe:void 0;rt.exports=function(mt,bt){if(bt)return mt.slice();var St=mt.length,Et=ht?ht(St):new mt.constructor(St);return mt.copy(Et),Et}}).call(this,tt(26)(et))},function(et,_e){et.exports=function(tt,rt){var nt=-1,st=tt.length;for(rt||(rt=Array(st));++nt<st;)rt[nt]=tt[nt];return rt}},function(et,_e,tt){var rt=tt(33),nt=tt(39);et.exports=function(st,dt){return rt(st,nt(st),dt)}},function(et,_e,tt){var rt=tt(33),nt=tt(70);et.exports=function(st,dt){return rt(st,nt(st),dt)}},function(et,_e,tt){var rt=tt(60),nt=tt(70),st=tt(45);et.exports=function(dt){return rt(dt,st,nt)}},function(et,_e){var tt=Object.prototype.hasOwnProperty;et.exports=function(rt){var nt=rt.length,st=new rt.constructor(nt);return nt&&typeof rt[0]=="string"&&tt.call(rt,"index")&&(st.index=rt.index,st.input=rt.input),st}},function(et,_e,tt){var rt=tt(46),nt=tt(219),st=tt(220),dt=tt(221),ft=tt(222);et.exports=function(ht,mt,bt){var St=ht.constructor;switch(mt){case"[object ArrayBuffer]":return rt(ht);case"[object Boolean]":case"[object Date]":return new St(+ht);case"[object DataView]":return nt(ht,bt);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ft(ht,bt);case"[object Map]":return new St;case"[object Number]":case"[object String]":return new St(ht);case"[object RegExp]":return st(ht);case"[object Set]":return new St;case"[object Symbol]":return dt(ht)}}},function(et,_e,tt){var rt=tt(46);et.exports=function(nt,st){var dt=st?rt(nt.buffer):nt.buffer;return new nt.constructor(dt,nt.byteOffset,nt.byteLength)}},function(et,_e){var tt=/\w*$/;et.exports=function(rt){var nt=new rt.constructor(rt.source,tt.exec(rt));return nt.lastIndex=rt.lastIndex,nt}},function(et,_e,tt){var rt=tt(25),nt=rt?rt.prototype:void 0,st=nt?nt.valueOf:void 0;et.exports=function(dt){return st?Object(st.call(dt)):{}}},function(et,_e,tt){var rt=tt(46);et.exports=function(nt,st){var dt=st?rt(nt.buffer):nt.buffer;return new nt.constructor(dt,nt.byteOffset,nt.length)}},function(et,_e,tt){var rt=tt(224),nt=tt(71),st=tt(44);et.exports=function(dt){return typeof dt.constructor!="function"||st(dt)?{}:rt(nt(dt))}},function(et,_e,tt){var rt=tt(21),nt=Object.create,st=(function(){function dt(){}return function(ft){if(!rt(ft))return{};if(nt)return nt(ft);dt.prototype=ft;var ht=new dt;return dt.prototype=void 0,ht}})();et.exports=st},function(et,_e,tt){var rt=tt(226),nt=tt(42),st=tt(43),dt=st&&st.isMap,ft=dt?nt(dt):rt;et.exports=ft},function(et,_e,tt){var rt=tt(32),nt=tt(15);et.exports=function(st){return nt(st)&&rt(st)=="[object Map]"}},function(et,_e,tt){var rt=tt(228),nt=tt(42),st=tt(43),dt=st&&st.isSet,ft=dt?nt(dt):rt;et.exports=ft},function(et,_e,tt){var rt=tt(32),nt=tt(15);et.exports=function(st){return nt(st)&&rt(st)=="[object Set]"}},function(et,_e,tt){tt.r(_e),tt.d(_e,"ErrorType",function(){return Om}),tt.d(_e,"delay",function(){return nT}),tt.d(_e,"waitUntil",function(){return JT}),tt.d(_e,"SLIDE_EVENTS",function(){return m0}),tt.d(_e,"Slide",function(){return Zl});const rt=[];for(let vt=0;vt<256;vt++)rt[vt]=(vt<16?"0":"")+vt.toString(16);function nt(){const vt=4294967295*Math.random()|0,it=4294967295*Math.random()|0,lt=4294967295*Math.random()|0,pt=4294967295*Math.random()|0;return(rt[255&vt]+rt[vt>>8&255]+rt[vt>>16&255]+rt[vt>>24&255]+"-"+rt[255&it]+rt[it>>8&255]+"-"+rt[it>>16&15|64]+rt[it>>24&255]+"-"+rt[63&lt|128]+rt[lt>>8&255]+"-"+rt[lt>>16&255]+rt[lt>>24&255]+rt[255&pt]+rt[pt>>8&255]+rt[pt>>16&255]+rt[pt>>24&255]).toUpperCase()}var st=tt(23);/**
* @license
* Copyright 2010-2021 Three.js Authors
* SPDX-License-Identifier: MIT
*/class dt{addEventListener(it,lt){this._listeners===void 0&&(this._listeners={});const pt=this._listeners;pt[it]===void 0&&(pt[it]=[]),pt[it].indexOf(lt)===-1&&pt[it].push(lt)}hasEventListener(it,lt){if(this._listeners===void 0)return!1;const pt=this._listeners;return pt[it]!==void 0&&pt[it].indexOf(lt)!==-1}removeEventListener(it,lt){if(this._listeners===void 0)return;const pt=this._listeners[it];if(pt!==void 0){const _t=pt.indexOf(lt);_t!==-1&&pt.splice(_t,1)}}dispatchEvent(it){if(this._listeners===void 0)return;const lt=this._listeners[it.type];if(lt!==void 0){it.target=this;const pt=lt.slice(0);for(let _t=0,Dt=pt.length;_t<Dt;_t++)pt[_t].call(this,it);it.target=null}}}const ft=[];for(let vt=0;vt<256;vt++)ft[vt]=(vt<16?"0":"")+vt.toString(16);const ht=Math.PI/180,mt=180/Math.PI;function bt(){const vt=4294967295*Math.random()|0,it=4294967295*Math.random()|0,lt=4294967295*Math.random()|0,pt=4294967295*Math.random()|0;return(ft[255&vt]+ft[vt>>8&255]+ft[vt>>16&255]+ft[vt>>24&255]+"-"+ft[255&it]+ft[it>>8&255]+"-"+ft[it>>16&15|64]+ft[it>>24&255]+"-"+ft[63&lt|128]+ft[lt>>8&255]+"-"+ft[lt>>16&255]+ft[lt>>24&255]+ft[255&pt]+ft[pt>>8&255]+ft[pt>>16&255]+ft[pt>>24&255]).toUpperCase()}function St(vt,it,lt){return Math.max(it,Math.min(lt,vt))}function Et(vt,it){return(vt%it+it)%it}function Ct(vt,it,lt){return(1-lt)*vt+lt*it}function Rt(vt){return(vt&vt-1)==0&&vt!==0}function Tt(vt){return Math.pow(2,Math.floor(Math.log(vt)/Math.LN2))}class wt{constructor(it=0,lt=0){this.x=it,this.y=lt}get width(){return this.x}set width(it){this.x=it}get height(){return this.y}set height(it){this.y=it}set(it,lt){return this.x=it,this.y=lt,this}setScalar(it){return this.x=it,this.y=it,this}setX(it){return this.x=it,this}setY(it){return this.y=it,this}setComponent(it,lt){switch(it){case 0:this.x=lt;break;case 1:this.y=lt;break;default:throw new Error("index is out of range: "+it)}return this}getComponent(it){switch(it){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+it)}}clone(){return new this.constructor(this.x,this.y)}copy(it){return this.x=it.x,this.y=it.y,this}add(it,lt){return lt!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(it,lt)):(this.x+=it.x,this.y+=it.y,this)}addScalar(it){return this.x+=it,this.y+=it,this}addVectors(it,lt){return this.x=it.x+lt.x,this.y=it.y+lt.y,this}addScaledVector(it,lt){return this.x+=it.x*lt,this.y+=it.y*lt,this}sub(it,lt){return lt!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(it,lt)):(this.x-=it.x,this.y-=it.y,this)}subScalar(it){return this.x-=it,this.y-=it,this}subVectors(it,lt){return this.x=it.x-lt.x,this.y=it.y-lt.y,this}multiply(it){return this.x*=it.x,this.y*=it.y,this}multiplyScalar(it){return this.x*=it,this.y*=it,this}divide(it){return this.x/=it.x,this.y/=it.y,this}divideScalar(it){return this.multiplyScalar(1/it)}applyMatrix3(it){const lt=this.x,pt=this.y,_t=it.elements;return this.x=_t[0]*lt+_t[3]*pt+_t[6],this.y=_t[1]*lt+_t[4]*pt+_t[7],this}min(it){return this.x=Math.min(this.x,it.x),this.y=Math.min(this.y,it.y),this}max(it){return this.x=Math.max(this.x,it.x),this.y=Math.max(this.y,it.y),this}clamp(it,lt){return this.x=Math.max(it.x,Math.min(lt.x,this.x)),this.y=Math.max(it.y,Math.min(lt.y,this.y)),this}clampScalar(it,lt){return this.x=Math.max(it,Math.min(lt,this.x)),this.y=Math.max(it,Math.min(lt,this.y)),this}clampLength(it,lt){const pt=this.length();return this.divideScalar(pt||1).multiplyScalar(Math.max(it,Math.min(lt,pt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(it){return this.x*it.x+this.y*it.y}cross(it){return this.x*it.y-this.y*it.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(it){return Math.sqrt(this.distanceToSquared(it))}distanceToSquared(it){const lt=this.x-it.x,pt=this.y-it.y;return lt*lt+pt*pt}manhattanDistanceTo(it){return Math.abs(this.x-it.x)+Math.abs(this.y-it.y)}setLength(it){return this.normalize().multiplyScalar(it)}lerp(it,lt){return this.x+=(it.x-this.x)*lt,this.y+=(it.y-this.y)*lt,this}lerpVectors(it,lt,pt){return this.x=it.x+(lt.x-it.x)*pt,this.y=it.y+(lt.y-it.y)*pt,this}equals(it){return it.x===this.x&&it.y===this.y}fromArray(it,lt=0){return this.x=it[lt],this.y=it[lt+1],this}toArray(it=[],lt=0){return it[lt]=this.x,it[lt+1]=this.y,it}fromBufferAttribute(it,lt,pt){return pt!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=it.getX(lt),this.y=it.getY(lt),this}rotateAround(it,lt){const pt=Math.cos(lt),_t=Math.sin(lt),Dt=this.x-it.x,Lt=this.y-it.y;return this.x=Dt*pt-Lt*_t+it.x,this.y=Dt*_t+Lt*pt+it.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}wt.prototype.isVector2=!0;class At{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt){const Zt=this.elements;return Zt[0]=it,Zt[1]=_t,Zt[2]=$t,Zt[3]=lt,Zt[4]=Dt,Zt[5]=Xt,Zt[6]=pt,Zt[7]=Lt,Zt[8]=Yt,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(it){const lt=this.elements,pt=it.elements;return lt[0]=pt[0],lt[1]=pt[1],lt[2]=pt[2],lt[3]=pt[3],lt[4]=pt[4],lt[5]=pt[5],lt[6]=pt[6],lt[7]=pt[7],lt[8]=pt[8],this}extractBasis(it,lt,pt){return it.setFromMatrix3Column(this,0),lt.setFromMatrix3Column(this,1),pt.setFromMatrix3Column(this,2),this}setFromMatrix4(it){const lt=it.elements;return this.set(lt[0],lt[4],lt[8],lt[1],lt[5],lt[9],lt[2],lt[6],lt[10]),this}multiply(it){return this.multiplyMatrices(this,it)}premultiply(it){return this.multiplyMatrices(it,this)}multiplyMatrices(it,lt){const pt=it.elements,_t=lt.elements,Dt=this.elements,Lt=pt[0],$t=pt[3],Xt=pt[6],Yt=pt[1],Zt=pt[4],lr=pt[7],xr=pt[2],wr=pt[5],Ir=pt[8],kr=_t[0],Lr=_t[3],Xr=_t[6],_n=_t[1],On=_t[4],Kn=_t[7],Mn=_t[2],ca=_t[5],Gn=_t[8];return Dt[0]=Lt*kr+$t*_n+Xt*Mn,Dt[3]=Lt*Lr+$t*On+Xt*ca,Dt[6]=Lt*Xr+$t*Kn+Xt*Gn,Dt[1]=Yt*kr+Zt*_n+lr*Mn,Dt[4]=Yt*Lr+Zt*On+lr*ca,Dt[7]=Yt*Xr+Zt*Kn+lr*Gn,Dt[2]=xr*kr+wr*_n+Ir*Mn,Dt[5]=xr*Lr+wr*On+Ir*ca,Dt[8]=xr*Xr+wr*Kn+Ir*Gn,this}multiplyScalar(it){const lt=this.elements;return lt[0]*=it,lt[3]*=it,lt[6]*=it,lt[1]*=it,lt[4]*=it,lt[7]*=it,lt[2]*=it,lt[5]*=it,lt[8]*=it,this}determinant(){const it=this.elements,lt=it[0],pt=it[1],_t=it[2],Dt=it[3],Lt=it[4],$t=it[5],Xt=it[6],Yt=it[7],Zt=it[8];return lt*Lt*Zt-lt*$t*Yt-pt*Dt*Zt+pt*$t*Xt+_t*Dt*Yt-_t*Lt*Xt}invert(){const it=this.elements,lt=it[0],pt=it[1],_t=it[2],Dt=it[3],Lt=it[4],$t=it[5],Xt=it[6],Yt=it[7],Zt=it[8],lr=Zt*Lt-$t*Yt,xr=$t*Xt-Zt*Dt,wr=Yt*Dt-Lt*Xt,Ir=lt*lr+pt*xr+_t*wr;if(Ir===0)return this.set(0,0,0,0,0,0,0,0,0);const kr=1/Ir;return it[0]=lr*kr,it[1]=(_t*Yt-Zt*pt)*kr,it[2]=($t*pt-_t*Lt)*kr,it[3]=xr*kr,it[4]=(Zt*lt-_t*Xt)*kr,it[5]=(_t*Dt-$t*lt)*kr,it[6]=wr*kr,it[7]=(pt*Xt-Yt*lt)*kr,it[8]=(Lt*lt-pt*Dt)*kr,this}transpose(){let it;const lt=this.elements;return it=lt[1],lt[1]=lt[3],lt[3]=it,it=lt[2],lt[2]=lt[6],lt[6]=it,it=lt[5],lt[5]=lt[7],lt[7]=it,this}getNormalMatrix(it){return this.setFromMatrix4(it).invert().transpose()}transposeIntoArray(it){const lt=this.elements;return it[0]=lt[0],it[1]=lt[3],it[2]=lt[6],it[3]=lt[1],it[4]=lt[4],it[5]=lt[7],it[6]=lt[2],it[7]=lt[5],it[8]=lt[8],this}setUvTransform(it,lt,pt,_t,Dt,Lt,$t){const Xt=Math.cos(Dt),Yt=Math.sin(Dt);return this.set(pt*Xt,pt*Yt,-pt*(Xt*Lt+Yt*$t)+Lt+it,-_t*Yt,_t*Xt,-_t*(-Yt*Lt+Xt*$t)+$t+lt,0,0,1),this}scale(it,lt){const pt=this.elements;return pt[0]*=it,pt[3]*=it,pt[6]*=it,pt[1]*=lt,pt[4]*=lt,pt[7]*=lt,this}rotate(it){const lt=Math.cos(it),pt=Math.sin(it),_t=this.elements,Dt=_t[0],Lt=_t[3],$t=_t[6],Xt=_t[1],Yt=_t[4],Zt=_t[7];return _t[0]=lt*Dt+pt*Xt,_t[3]=lt*Lt+pt*Yt,_t[6]=lt*$t+pt*Zt,_t[1]=-pt*Dt+lt*Xt,_t[4]=-pt*Lt+lt*Yt,_t[7]=-pt*$t+lt*Zt,this}translate(it,lt){const pt=this.elements;return pt[0]+=it*pt[2],pt[3]+=it*pt[5],pt[6]+=it*pt[8],pt[1]+=lt*pt[2],pt[4]+=lt*pt[5],pt[7]+=lt*pt[8],this}equals(it){const lt=this.elements,pt=it.elements;for(let _t=0;_t<9;_t++)if(lt[_t]!==pt[_t])return!1;return!0}fromArray(it,lt=0){for(let pt=0;pt<9;pt++)this.elements[pt]=it[pt+lt];return this}toArray(it=[],lt=0){const pt=this.elements;return it[lt]=pt[0],it[lt+1]=pt[1],it[lt+2]=pt[2],it[lt+3]=pt[3],it[lt+4]=pt[4],it[lt+5]=pt[5],it[lt+6]=pt[6],it[lt+7]=pt[7],it[lt+8]=pt[8],it}clone(){return new this.constructor().fromArray(this.elements)}}let Nt;At.prototype.isMatrix3=!0;class Pt{static getDataURL(it){if(/^data:/i.test(it.src)||typeof HTMLCanvasElement>"u")return it.src;let lt;if(it instanceof HTMLCanvasElement)lt=it;else{Nt===void 0&&(Nt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Nt.width=it.width,Nt.height=it.height;const pt=Nt.getContext("2d");it instanceof ImageData?pt.putImageData(it,0,0):pt.drawImage(it,0,0,it.width,it.height),lt=Nt}return lt.width>2048||lt.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",it),lt.toDataURL("image/jpeg",.6)):lt.toDataURL("image/png")}}let It=0;class Ft extends dt{constructor(it=Ft.DEFAULT_IMAGE,lt=Ft.DEFAULT_MAPPING,pt=1001,_t=1001,Dt=1006,Lt=1008,$t=1023,Xt=1009,Yt=1,Zt=3e3){super(),Object.defineProperty(this,"id",{value:It++}),this.uuid=bt(),this.name="",this.image=it,this.mipmaps=[],this.mapping=lt,this.wrapS=pt,this.wrapT=_t,this.magFilter=Dt,this.minFilter=Lt,this.anisotropy=Yt,this.format=$t,this.internalFormat=null,this.type=Xt,this.offset=new wt(0,0),this.repeat=new wt(1,1),this.center=new wt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=Zt,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(it){return this.name=it.name,this.image=it.image,this.mipmaps=it.mipmaps.slice(0),this.mapping=it.mapping,this.wrapS=it.wrapS,this.wrapT=it.wrapT,this.magFilter=it.magFilter,this.minFilter=it.minFilter,this.anisotropy=it.anisotropy,this.format=it.format,this.internalFormat=it.internalFormat,this.type=it.type,this.offset.copy(it.offset),this.repeat.copy(it.repeat),this.center.copy(it.center),this.rotation=it.rotation,this.matrixAutoUpdate=it.matrixAutoUpdate,this.matrix.copy(it.matrix),this.generateMipmaps=it.generateMipmaps,this.premultiplyAlpha=it.premultiplyAlpha,this.flipY=it.flipY,this.unpackAlignment=it.unpackAlignment,this.encoding=it.encoding,this}toJSON(it){const lt=it===void 0||typeof it=="string";if(!lt&&it.textures[this.uuid]!==void 0)return it.textures[this.uuid];const pt={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){const _t=this.image;if(_t.uuid===void 0&&(_t.uuid=bt()),!lt&&it.images[_t.uuid]===void 0){let Dt;if(Array.isArray(_t)){Dt=[];for(let Lt=0,$t=_t.length;Lt<$t;Lt++)_t[Lt].isDataTexture?Dt.push(qt(_t[Lt].image)):Dt.push(qt(_t[Lt]))}else Dt=qt(_t);it.images[_t.uuid]={uuid:_t.uuid,url:Dt}}pt.image=_t.uuid}return lt||(it.textures[this.uuid]=pt),pt}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(it){if(this.mapping!==300)return it;if(it.applyMatrix3(this.matrix),it.x<0||it.x>1)switch(this.wrapS){case 1e3:it.x=it.x-Math.floor(it.x);break;case 1001:it.x=it.x<0?0:1;break;case 1002:Math.abs(Math.floor(it.x)%2)===1?it.x=Math.ceil(it.x)-it.x:it.x=it.x-Math.floor(it.x)}if(it.y<0||it.y>1)switch(this.wrapT){case 1e3:it.y=it.y-Math.floor(it.y);break;case 1001:it.y=it.y<0?0:1;break;case 1002:Math.abs(Math.floor(it.y)%2)===1?it.y=Math.ceil(it.y)-it.y:it.y=it.y-Math.floor(it.y)}return this.flipY&&(it.y=1-it.y),it}set needsUpdate(it){it===!0&&this.version++}}function qt(vt){return typeof HTMLImageElement<"u"&&vt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&vt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&vt instanceof ImageBitmap?Pt.getDataURL(vt):vt.data?{data:Array.prototype.slice.call(vt.data),width:vt.width,height:vt.height,type:vt.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Ft.DEFAULT_IMAGE=void 0,Ft.DEFAULT_MAPPING=300,Ft.prototype.isTexture=!0;class Vt{constructor(it=0,lt=0,pt=0,_t=1){this.x=it,this.y=lt,this.z=pt,this.w=_t}get width(){return this.z}set width(it){this.z=it}get height(){return this.w}set height(it){this.w=it}set(it,lt,pt,_t){return this.x=it,this.y=lt,this.z=pt,this.w=_t,this}setScalar(it){return this.x=it,this.y=it,this.z=it,this.w=it,this}setX(it){return this.x=it,this}setY(it){return this.y=it,this}setZ(it){return this.z=it,this}setW(it){return this.w=it,this}setComponent(it,lt){switch(it){case 0:this.x=lt;break;case 1:this.y=lt;break;case 2:this.z=lt;break;case 3:this.w=lt;break;default:throw new Error("index is out of range: "+it)}return this}getComponent(it){switch(it){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+it)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(it){return this.x=it.x,this.y=it.y,this.z=it.z,this.w=it.w!==void 0?it.w:1,this}add(it,lt){return lt!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(it,lt)):(this.x+=it.x,this.y+=it.y,this.z+=it.z,this.w+=it.w,this)}addScalar(it){return this.x+=it,this.y+=it,this.z+=it,this.w+=it,this}addVectors(it,lt){return this.x=it.x+lt.x,this.y=it.y+lt.y,this.z=it.z+lt.z,this.w=it.w+lt.w,this}addScaledVector(it,lt){return this.x+=it.x*lt,this.y+=it.y*lt,this.z+=it.z*lt,this.w+=it.w*lt,this}sub(it,lt){return lt!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(it,lt)):(this.x-=it.x,this.y-=it.y,this.z-=it.z,this.w-=it.w,this)}subScalar(it){return this.x-=it,this.y-=it,this.z-=it,this.w-=it,this}subVectors(it,lt){return this.x=it.x-lt.x,this.y=it.y-lt.y,this.z=it.z-lt.z,this.w=it.w-lt.w,this}multiply(it){return this.x*=it.x,this.y*=it.y,this.z*=it.z,this.w*=it.w,this}multiplyScalar(it){return this.x*=it,this.y*=it,this.z*=it,this.w*=it,this}applyMatrix4(it){const lt=this.x,pt=this.y,_t=this.z,Dt=this.w,Lt=it.elements;return this.x=Lt[0]*lt+Lt[4]*pt+Lt[8]*_t+Lt[12]*Dt,this.y=Lt[1]*lt+Lt[5]*pt+Lt[9]*_t+Lt[13]*Dt,this.z=Lt[2]*lt+Lt[6]*pt+Lt[10]*_t+Lt[14]*Dt,this.w=Lt[3]*lt+Lt[7]*pt+Lt[11]*_t+Lt[15]*Dt,this}divideScalar(it){return this.multiplyScalar(1/it)}setAxisAngleFromQuaternion(it){this.w=2*Math.acos(it.w);const lt=Math.sqrt(1-it.w*it.w);return lt<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=it.x/lt,this.y=it.y/lt,this.z=it.z/lt),this}setAxisAngleFromRotationMatrix(it){let lt,pt,_t,Dt;const Lt=it.elements,$t=Lt[0],Xt=Lt[4],Yt=Lt[8],Zt=Lt[1],lr=Lt[5],xr=Lt[9],wr=Lt[2],Ir=Lt[6],kr=Lt[10];if(Math.abs(Xt-Zt)<.01&&Math.abs(Yt-wr)<.01&&Math.abs(xr-Ir)<.01){if(Math.abs(Xt+Zt)<.1&&Math.abs(Yt+wr)<.1&&Math.abs(xr+Ir)<.1&&Math.abs($t+lr+kr-3)<.1)return this.set(1,0,0,0),this;lt=Math.PI;const Xr=($t+1)/2,_n=(lr+1)/2,On=(kr+1)/2,Kn=(Xt+Zt)/4,Mn=(Yt+wr)/4,ca=(xr+Ir)/4;return Xr>_n&&Xr>On?Xr<.01?(pt=0,_t=.707106781,Dt=.707106781):(pt=Math.sqrt(Xr),_t=Kn/pt,Dt=Mn/pt):_n>On?_n<.01?(pt=.707106781,_t=0,Dt=.707106781):(_t=Math.sqrt(_n),pt=Kn/_t,Dt=ca/_t):On<.01?(pt=.707106781,_t=.707106781,Dt=0):(Dt=Math.sqrt(On),pt=Mn/Dt,_t=ca/Dt),this.set(pt,_t,Dt,lt),this}let Lr=Math.sqrt((Ir-xr)*(Ir-xr)+(Yt-wr)*(Yt-wr)+(Zt-Xt)*(Zt-Xt));return Math.abs(Lr)<.001&&(Lr=1),this.x=(Ir-xr)/Lr,this.y=(Yt-wr)/Lr,this.z=(Zt-Xt)/Lr,this.w=Math.acos(($t+lr+kr-1)/2),this}min(it){return this.x=Math.min(this.x,it.x),this.y=Math.min(this.y,it.y),this.z=Math.min(this.z,it.z),this.w=Math.min(this.w,it.w),this}max(it){return this.x=Math.max(this.x,it.x),this.y=Math.max(this.y,it.y),this.z=Math.max(this.z,it.z),this.w=Math.max(this.w,it.w),this}clamp(it,lt){return this.x=Math.max(it.x,Math.min(lt.x,this.x)),this.y=Math.max(it.y,Math.min(lt.y,this.y)),this.z=Math.max(it.z,Math.min(lt.z,this.z)),this.w=Math.max(it.w,Math.min(lt.w,this.w)),this}clampScalar(it,lt){return this.x=Math.max(it,Math.min(lt,this.x)),this.y=Math.max(it,Math.min(lt,this.y)),this.z=Math.max(it,Math.min(lt,this.z)),this.w=Math.max(it,Math.min(lt,this.w)),this}clampLength(it,lt){const pt=this.length();return this.divideScalar(pt||1).multiplyScalar(Math.max(it,Math.min(lt,pt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(it){return this.x*it.x+this.y*it.y+this.z*it.z+this.w*it.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(it){return this.normalize().multiplyScalar(it)}lerp(it,lt){return this.x+=(it.x-this.x)*lt,this.y+=(it.y-this.y)*lt,this.z+=(it.z-this.z)*lt,this.w+=(it.w-this.w)*lt,this}lerpVectors(it,lt,pt){return this.x=it.x+(lt.x-it.x)*pt,this.y=it.y+(lt.y-it.y)*pt,this.z=it.z+(lt.z-it.z)*pt,this.w=it.w+(lt.w-it.w)*pt,this}equals(it){return it.x===this.x&&it.y===this.y&&it.z===this.z&&it.w===this.w}fromArray(it,lt=0){return this.x=it[lt],this.y=it[lt+1],this.z=it[lt+2],this.w=it[lt+3],this}toArray(it=[],lt=0){return it[lt]=this.x,it[lt+1]=this.y,it[lt+2]=this.z,it[lt+3]=this.w,it}fromBufferAttribute(it,lt,pt){return pt!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=it.getX(lt),this.y=it.getY(lt),this.z=it.getZ(lt),this.w=it.getW(lt),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}Vt.prototype.isVector4=!0;class Kt extends dt{constructor(it,lt,pt={}){super(),this.width=it,this.height=lt,this.depth=1,this.scissor=new Vt(0,0,it,lt),this.scissorTest=!1,this.viewport=new Vt(0,0,it,lt),this.texture=new Ft(void 0,pt.mapping,pt.wrapS,pt.wrapT,pt.magFilter,pt.minFilter,pt.format,pt.type,pt.anisotropy,pt.encoding),this.texture.image={width:it,height:lt,depth:1},this.texture.generateMipmaps=pt.generateMipmaps!==void 0&&pt.generateMipmaps,this.texture.minFilter=pt.minFilter!==void 0?pt.minFilter:1006,this.depthBuffer=pt.depthBuffer===void 0||pt.depthBuffer,this.stencilBuffer=pt.stencilBuffer!==void 0&&pt.stencilBuffer,this.depthTexture=pt.depthTexture!==void 0?pt.depthTexture:null}setTexture(it){it.image={width:this.width,height:this.height,depth:this.depth},this.texture=it}setSize(it,lt,pt=1){this.width===it&&this.height===lt&&this.depth===pt||(this.width=it,this.height=lt,this.depth=pt,this.texture.image.width=it,this.texture.image.height=lt,this.texture.image.depth=pt,this.dispose()),this.viewport.set(0,0,it,lt),this.scissor.set(0,0,it,lt)}clone(){return new this.constructor().copy(this)}copy(it){return this.width=it.width,this.height=it.height,this.depth=it.depth,this.viewport.copy(it.viewport),this.texture=it.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=it.depthBuffer,this.stencilBuffer=it.stencilBuffer,this.depthTexture=it.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}Kt.prototype.isWebGLRenderTarget=!0,(class extends Kt{constructor(vt,it,lt){super(vt,it);const pt=this.texture;this.texture=[];for(let _t=0;_t<lt;_t++)this.texture[_t]=pt.clone()}setSize(vt,it,lt=1){if(this.width!==vt||this.height!==it||this.depth!==lt){this.width=vt,this.height=it,this.depth=lt;for(let pt=0,_t=this.texture.length;pt<_t;pt++)this.texture[pt].image.width=vt,this.texture[pt].image.height=it,this.texture[pt].image.depth=lt;this.dispose()}return this.viewport.set(0,0,vt,it),this.scissor.set(0,0,vt,it),this}copy(vt){this.dispose(),this.width=vt.width,this.height=vt.height,this.depth=vt.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=vt.depthBuffer,this.stencilBuffer=vt.stencilBuffer,this.depthTexture=vt.depthTexture,this.texture.length=0;for(let it=0,lt=vt.texture.length;it<lt;it++)this.texture[it]=vt.texture[it].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class jt extends Kt{constructor(it,lt,pt){super(it,lt,pt),this.samples=4}copy(it){return super.copy.call(this,it),this.samples=it.samples,this}}jt.prototype.isWebGLMultisampleRenderTarget=!0;class Ut{constructor(it=0,lt=0,pt=0,_t=1){this._x=it,this._y=lt,this._z=pt,this._w=_t}static slerp(it,lt,pt,_t){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),pt.slerpQuaternions(it,lt,_t)}static slerpFlat(it,lt,pt,_t,Dt,Lt,$t){let Xt=pt[_t+0],Yt=pt[_t+1],Zt=pt[_t+2],lr=pt[_t+3];const xr=Dt[Lt+0],wr=Dt[Lt+1],Ir=Dt[Lt+2],kr=Dt[Lt+3];if($t===0)return it[lt+0]=Xt,it[lt+1]=Yt,it[lt+2]=Zt,void(it[lt+3]=lr);if($t===1)return it[lt+0]=xr,it[lt+1]=wr,it[lt+2]=Ir,void(it[lt+3]=kr);if(lr!==kr||Xt!==xr||Yt!==wr||Zt!==Ir){let Lr=1-$t;const Xr=Xt*xr+Yt*wr+Zt*Ir+lr*kr,_n=Xr>=0?1:-1,On=1-Xr*Xr;if(On>Number.EPSILON){const Mn=Math.sqrt(On),ca=Math.atan2(Mn,Xr*_n);Lr=Math.sin(Lr*ca)/Mn,$t=Math.sin($t*ca)/Mn}const Kn=$t*_n;if(Xt=Xt*Lr+xr*Kn,Yt=Yt*Lr+wr*Kn,Zt=Zt*Lr+Ir*Kn,lr=lr*Lr+kr*Kn,Lr===1-$t){const Mn=1/Math.sqrt(Xt*Xt+Yt*Yt+Zt*Zt+lr*lr);Xt*=Mn,Yt*=Mn,Zt*=Mn,lr*=Mn}}it[lt]=Xt,it[lt+1]=Yt,it[lt+2]=Zt,it[lt+3]=lr}static multiplyQuaternionsFlat(it,lt,pt,_t,Dt,Lt){const $t=pt[_t],Xt=pt[_t+1],Yt=pt[_t+2],Zt=pt[_t+3],lr=Dt[Lt],xr=Dt[Lt+1],wr=Dt[Lt+2],Ir=Dt[Lt+3];return it[lt]=$t*Ir+Zt*lr+Xt*wr-Yt*xr,it[lt+1]=Xt*Ir+Zt*xr+Yt*lr-$t*wr,it[lt+2]=Yt*Ir+Zt*wr+$t*xr-Xt*lr,it[lt+3]=Zt*Ir-$t*lr-Xt*xr-Yt*wr,it}get x(){return this._x}set x(it){this._x=it,this._onChangeCallback()}get y(){return this._y}set y(it){this._y=it,this._onChangeCallback()}get z(){return this._z}set z(it){this._z=it,this._onChangeCallback()}get w(){return this._w}set w(it){this._w=it,this._onChangeCallback()}set(it,lt,pt,_t){return this._x=it,this._y=lt,this._z=pt,this._w=_t,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(it){return this._x=it.x,this._y=it.y,this._z=it.z,this._w=it.w,this._onChangeCallback(),this}setFromEuler(it,lt){if(!it||!it.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const pt=it._x,_t=it._y,Dt=it._z,Lt=it._order,$t=Math.cos,Xt=Math.sin,Yt=$t(pt/2),Zt=$t(_t/2),lr=$t(Dt/2),xr=Xt(pt/2),wr=Xt(_t/2),Ir=Xt(Dt/2);switch(Lt){case"XYZ":this._x=xr*Zt*lr+Yt*wr*Ir,this._y=Yt*wr*lr-xr*Zt*Ir,this._z=Yt*Zt*Ir+xr*wr*lr,this._w=Yt*Zt*lr-xr*wr*Ir;break;case"YXZ":this._x=xr*Zt*lr+Yt*wr*Ir,this._y=Yt*wr*lr-xr*Zt*Ir,this._z=Yt*Zt*Ir-xr*wr*lr,this._w=Yt*Zt*lr+xr*wr*Ir;break;case"ZXY":this._x=xr*Zt*lr-Yt*wr*Ir,this._y=Yt*wr*lr+xr*Zt*Ir,this._z=Yt*Zt*Ir+xr*wr*lr,this._w=Yt*Zt*lr-xr*wr*Ir;break;case"ZYX":this._x=xr*Zt*lr-Yt*wr*Ir,this._y=Yt*wr*lr+xr*Zt*Ir,this._z=Yt*Zt*Ir-xr*wr*lr,this._w=Yt*Zt*lr+xr*wr*Ir;break;case"YZX":this._x=xr*Zt*lr+Yt*wr*Ir,this._y=Yt*wr*lr+xr*Zt*Ir,this._z=Yt*Zt*Ir-xr*wr*lr,this._w=Yt*Zt*lr-xr*wr*Ir;break;case"XZY":this._x=xr*Zt*lr-Yt*wr*Ir,this._y=Yt*wr*lr-xr*Zt*Ir,this._z=Yt*Zt*Ir+xr*wr*lr,this._w=Yt*Zt*lr+xr*wr*Ir;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+Lt)}return lt!==!1&&this._onChangeCallback(),this}setFromAxisAngle(it,lt){const pt=lt/2,_t=Math.sin(pt);return this._x=it.x*_t,this._y=it.y*_t,this._z=it.z*_t,this._w=Math.cos(pt),this._onChangeCallback(),this}setFromRotationMatrix(it){const lt=it.elements,pt=lt[0],_t=lt[4],Dt=lt[8],Lt=lt[1],$t=lt[5],Xt=lt[9],Yt=lt[2],Zt=lt[6],lr=lt[10],xr=pt+$t+lr;if(xr>0){const wr=.5/Math.sqrt(xr+1);this._w=.25/wr,this._x=(Zt-Xt)*wr,this._y=(Dt-Yt)*wr,this._z=(Lt-_t)*wr}else if(pt>$t&&pt>lr){const wr=2*Math.sqrt(1+pt-$t-lr);this._w=(Zt-Xt)/wr,this._x=.25*wr,this._y=(_t+Lt)/wr,this._z=(Dt+Yt)/wr}else if($t>lr){const wr=2*Math.sqrt(1+$t-pt-lr);this._w=(Dt-Yt)/wr,this._x=(_t+Lt)/wr,this._y=.25*wr,this._z=(Xt+Zt)/wr}else{const wr=2*Math.sqrt(1+lr-pt-$t);this._w=(Lt-_t)/wr,this._x=(Dt+Yt)/wr,this._y=(Xt+Zt)/wr,this._z=.25*wr}return this._onChangeCallback(),this}setFromUnitVectors(it,lt){let pt=it.dot(lt)+1;return pt<Number.EPSILON?(pt=0,Math.abs(it.x)>Math.abs(it.z)?(this._x=-it.y,this._y=it.x,this._z=0,this._w=pt):(this._x=0,this._y=-it.z,this._z=it.y,this._w=pt)):(this._x=it.y*lt.z-it.z*lt.y,this._y=it.z*lt.x-it.x*lt.z,this._z=it.x*lt.y-it.y*lt.x,this._w=pt),this.normalize()}angleTo(it){return 2*Math.acos(Math.abs(St(this.dot(it),-1,1)))}rotateTowards(it,lt){const pt=this.angleTo(it);if(pt===0)return this;const _t=Math.min(1,lt/pt);return this.slerp(it,_t),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(it){return this._x*it._x+this._y*it._y+this._z*it._z+this._w*it._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let it=this.length();return it===0?(this._x=0,this._y=0,this._z=0,this._w=1):(it=1/it,this._x=this._x*it,this._y=this._y*it,this._z=this._z*it,this._w=this._w*it),this._onChangeCallback(),this}multiply(it,lt){return lt!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(it,lt)):this.multiplyQuaternions(this,it)}premultiply(it){return this.multiplyQuaternions(it,this)}multiplyQuaternions(it,lt){const pt=it._x,_t=it._y,Dt=it._z,Lt=it._w,$t=lt._x,Xt=lt._y,Yt=lt._z,Zt=lt._w;return this._x=pt*Zt+Lt*$t+_t*Yt-Dt*Xt,this._y=_t*Zt+Lt*Xt+Dt*$t-pt*Yt,this._z=Dt*Zt+Lt*Yt+pt*Xt-_t*$t,this._w=Lt*Zt-pt*$t-_t*Xt-Dt*Yt,this._onChangeCallback(),this}slerp(it,lt){if(lt===0)return this;if(lt===1)return this.copy(it);const pt=this._x,_t=this._y,Dt=this._z,Lt=this._w;let $t=Lt*it._w+pt*it._x+_t*it._y+Dt*it._z;if($t<0?(this._w=-it._w,this._x=-it._x,this._y=-it._y,this._z=-it._z,$t=-$t):this.copy(it),$t>=1)return this._w=Lt,this._x=pt,this._y=_t,this._z=Dt,this;const Xt=1-$t*$t;if(Xt<=Number.EPSILON){const wr=1-lt;return this._w=wr*Lt+lt*this._w,this._x=wr*pt+lt*this._x,this._y=wr*_t+lt*this._y,this._z=wr*Dt+lt*this._z,this.normalize(),this._onChangeCallback(),this}const Yt=Math.sqrt(Xt),Zt=Math.atan2(Yt,$t),lr=Math.sin((1-lt)*Zt)/Yt,xr=Math.sin(lt*Zt)/Yt;return this._w=Lt*lr+this._w*xr,this._x=pt*lr+this._x*xr,this._y=_t*lr+this._y*xr,this._z=Dt*lr+this._z*xr,this._onChangeCallback(),this}slerpQuaternions(it,lt,pt){this.copy(it).slerp(lt,pt)}equals(it){return it._x===this._x&&it._y===this._y&&it._z===this._z&&it._w===this._w}fromArray(it,lt=0){return this._x=it[lt],this._y=it[lt+1],this._z=it[lt+2],this._w=it[lt+3],this._onChangeCallback(),this}toArray(it=[],lt=0){return it[lt]=this._x,it[lt+1]=this._y,it[lt+2]=this._z,it[lt+3]=this._w,it}fromBufferAttribute(it,lt){return this._x=it.getX(lt),this._y=it.getY(lt),this._z=it.getZ(lt),this._w=it.getW(lt),this}_onChange(it){return this._onChangeCallback=it,this}_onChangeCallback(){}}Ut.prototype.isQuaternion=!0;class Ot{constructor(it=0,lt=0,pt=0){this.x=it,this.y=lt,this.z=pt}set(it,lt,pt){return pt===void 0&&(pt=this.z),this.x=it,this.y=lt,this.z=pt,this}setScalar(it){return this.x=it,this.y=it,this.z=it,this}setX(it){return this.x=it,this}setY(it){return this.y=it,this}setZ(it){return this.z=it,this}setComponent(it,lt){switch(it){case 0:this.x=lt;break;case 1:this.y=lt;break;case 2:this.z=lt;break;default:throw new Error("index is out of range: "+it)}return this}getComponent(it){switch(it){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+it)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(it){return this.x=it.x,this.y=it.y,this.z=it.z,this}add(it,lt){return lt!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(it,lt)):(this.x+=it.x,this.y+=it.y,this.z+=it.z,this)}addScalar(it){return this.x+=it,this.y+=it,this.z+=it,this}addVectors(it,lt){return this.x=it.x+lt.x,this.y=it.y+lt.y,this.z=it.z+lt.z,this}addScaledVector(it,lt){return this.x+=it.x*lt,this.y+=it.y*lt,this.z+=it.z*lt,this}sub(it,lt){return lt!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(it,lt)):(this.x-=it.x,this.y-=it.y,this.z-=it.z,this)}subScalar(it){return this.x-=it,this.y-=it,this.z-=it,this}subVectors(it,lt){return this.x=it.x-lt.x,this.y=it.y-lt.y,this.z=it.z-lt.z,this}multiply(it,lt){return lt!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(it,lt)):(this.x*=it.x,this.y*=it.y,this.z*=it.z,this)}multiplyScalar(it){return this.x*=it,this.y*=it,this.z*=it,this}multiplyVectors(it,lt){return this.x=it.x*lt.x,this.y=it.y*lt.y,this.z=it.z*lt.z,this}applyEuler(it){return it&&it.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Bt.setFromEuler(it))}applyAxisAngle(it,lt){return this.applyQuaternion(Bt.setFromAxisAngle(it,lt))}applyMatrix3(it){const lt=this.x,pt=this.y,_t=this.z,Dt=it.elements;return this.x=Dt[0]*lt+Dt[3]*pt+Dt[6]*_t,this.y=Dt[1]*lt+Dt[4]*pt+Dt[7]*_t,this.z=Dt[2]*lt+Dt[5]*pt+Dt[8]*_t,this}applyNormalMatrix(it){return this.applyMatrix3(it).normalize()}applyMatrix4(it){const lt=this.x,pt=this.y,_t=this.z,Dt=it.elements,Lt=1/(Dt[3]*lt+Dt[7]*pt+Dt[11]*_t+Dt[15]);return this.x=(Dt[0]*lt+Dt[4]*pt+Dt[8]*_t+Dt[12])*Lt,this.y=(Dt[1]*lt+Dt[5]*pt+Dt[9]*_t+Dt[13])*Lt,this.z=(Dt[2]*lt+Dt[6]*pt+Dt[10]*_t+Dt[14])*Lt,this}applyQuaternion(it){const lt=this.x,pt=this.y,_t=this.z,Dt=it.x,Lt=it.y,$t=it.z,Xt=it.w,Yt=Xt*lt+Lt*_t-$t*pt,Zt=Xt*pt+$t*lt-Dt*_t,lr=Xt*_t+Dt*pt-Lt*lt,xr=-Dt*lt-Lt*pt-$t*_t;return this.x=Yt*Xt+xr*-Dt+Zt*-$t-lr*-Lt,this.y=Zt*Xt+xr*-Lt+lr*-Dt-Yt*-$t,this.z=lr*Xt+xr*-$t+Yt*-Lt-Zt*-Dt,this}project(it){return this.applyMatrix4(it.matrixWorldInverse).applyMatrix4(it.projectionMatrix)}unproject(it){return this.applyMatrix4(it.projectionMatrixInverse).applyMatrix4(it.matrixWorld)}transformDirection(it){const lt=this.x,pt=this.y,_t=this.z,Dt=it.elements;return this.x=Dt[0]*lt+Dt[4]*pt+Dt[8]*_t,this.y=Dt[1]*lt+Dt[5]*pt+Dt[9]*_t,this.z=Dt[2]*lt+Dt[6]*pt+Dt[10]*_t,this.normalize()}divide(it){return this.x/=it.x,this.y/=it.y,this.z/=it.z,this}divideScalar(it){return this.multiplyScalar(1/it)}min(it){return this.x=Math.min(this.x,it.x),this.y=Math.min(this.y,it.y),this.z=Math.min(this.z,it.z),this}max(it){return this.x=Math.max(this.x,it.x),this.y=Math.max(this.y,it.y),this.z=Math.max(this.z,it.z),this}clamp(it,lt){return this.x=Math.max(it.x,Math.min(lt.x,this.x)),this.y=Math.max(it.y,Math.min(lt.y,this.y)),this.z=Math.max(it.z,Math.min(lt.z,this.z)),this}clampScalar(it,lt){return this.x=Math.max(it,Math.min(lt,this.x)),this.y=Math.max(it,Math.min(lt,this.y)),this.z=Math.max(it,Math.min(lt,this.z)),this}clampLength(it,lt){const pt=this.length();return this.divideScalar(pt||1).multiplyScalar(Math.max(it,Math.min(lt,pt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(it){return this.x*it.x+this.y*it.y+this.z*it.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(it){return this.normalize().multiplyScalar(it)}lerp(it,lt){return this.x+=(it.x-this.x)*lt,this.y+=(it.y-this.y)*lt,this.z+=(it.z-this.z)*lt,this}lerpVectors(it,lt,pt){return this.x=it.x+(lt.x-it.x)*pt,this.y=it.y+(lt.y-it.y)*pt,this.z=it.z+(lt.z-it.z)*pt,this}cross(it,lt){return lt!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(it,lt)):this.crossVectors(this,it)}crossVectors(it,lt){const pt=it.x,_t=it.y,Dt=it.z,Lt=lt.x,$t=lt.y,Xt=lt.z;return this.x=_t*Xt-Dt*$t,this.y=Dt*Lt-pt*Xt,this.z=pt*$t-_t*Lt,this}projectOnVector(it){const lt=it.lengthSq();if(lt===0)return this.set(0,0,0);const pt=it.dot(this)/lt;return this.copy(it).multiplyScalar(pt)}projectOnPlane(it){return Wt.copy(this).projectOnVector(it),this.sub(Wt)}reflect(it){return this.sub(Wt.copy(it).multiplyScalar(2*this.dot(it)))}angleTo(it){const lt=Math.sqrt(this.lengthSq()*it.lengthSq());if(lt===0)return Math.PI/2;const pt=this.dot(it)/lt;return Math.acos(St(pt,-1,1))}distanceTo(it){return Math.sqrt(this.distanceToSquared(it))}distanceToSquared(it){const lt=this.x-it.x,pt=this.y-it.y,_t=this.z-it.z;return lt*lt+pt*pt+_t*_t}manhattanDistanceTo(it){return Math.abs(this.x-it.x)+Math.abs(this.y-it.y)+Math.abs(this.z-it.z)}setFromSpherical(it){return this.setFromSphericalCoords(it.radius,it.phi,it.theta)}setFromSphericalCoords(it,lt,pt){const _t=Math.sin(lt)*it;return this.x=_t*Math.sin(pt),this.y=Math.cos(lt)*it,this.z=_t*Math.cos(pt),this}setFromCylindrical(it){return this.setFromCylindricalCoords(it.radius,it.theta,it.y)}setFromCylindricalCoords(it,lt,pt){return this.x=it*Math.sin(lt),this.y=pt,this.z=it*Math.cos(lt),this}setFromMatrixPosition(it){const lt=it.elements;return this.x=lt[12],this.y=lt[13],this.z=lt[14],this}setFromMatrixScale(it){const lt=this.setFromMatrixColumn(it,0).length(),pt=this.setFromMatrixColumn(it,1).length(),_t=this.setFromMatrixColumn(it,2).length();return this.x=lt,this.y=pt,this.z=_t,this}setFromMatrixColumn(it,lt){return this.fromArray(it.elements,4*lt)}setFromMatrix3Column(it,lt){return this.fromArray(it.elements,3*lt)}equals(it){return it.x===this.x&&it.y===this.y&&it.z===this.z}fromArray(it,lt=0){return this.x=it[lt],this.y=it[lt+1],this.z=it[lt+2],this}toArray(it=[],lt=0){return it[lt]=this.x,it[lt+1]=this.y,it[lt+2]=this.z,it}fromBufferAttribute(it,lt,pt){return pt!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=it.getX(lt),this.y=it.getY(lt),this.z=it.getZ(lt),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}Ot.prototype.isVector3=!0;const Wt=new Ot,Bt=new Ut;class tr{constructor(it=new Ot(1/0,1/0,1/0),lt=new Ot(-1/0,-1/0,-1/0)){this.min=it,this.max=lt}set(it,lt){return this.min.copy(it),this.max.copy(lt),this}setFromArray(it){let lt=1/0,pt=1/0,_t=1/0,Dt=-1/0,Lt=-1/0,$t=-1/0;for(let Xt=0,Yt=it.length;Xt<Yt;Xt+=3){const Zt=it[Xt],lr=it[Xt+1],xr=it[Xt+2];Zt<lt&&(lt=Zt),lr<pt&&(pt=lr),xr<_t&&(_t=xr),Zt>Dt&&(Dt=Zt),lr>Lt&&(Lt=lr),xr>$t&&($t=xr)}return this.min.set(lt,pt,_t),this.max.set(Dt,Lt,$t),this}setFromBufferAttribute(it){let lt=1/0,pt=1/0,_t=1/0,Dt=-1/0,Lt=-1/0,$t=-1/0;for(let Xt=0,Yt=it.count;Xt<Yt;Xt++){const Zt=it.getX(Xt),lr=it.getY(Xt),xr=it.getZ(Xt);Zt<lt&&(lt=Zt),lr<pt&&(pt=lr),xr<_t&&(_t=xr),Zt>Dt&&(Dt=Zt),lr>Lt&&(Lt=lr),xr>$t&&($t=xr)}return this.min.set(lt,pt,_t),this.max.set(Dt,Lt,$t),this}setFromPoints(it){this.makeEmpty();for(let lt=0,pt=it.length;lt<pt;lt++)this.expandByPoint(it[lt]);return this}setFromCenterAndSize(it,lt){const pt=ar.copy(lt).multiplyScalar(.5);return this.min.copy(it).sub(pt),this.max.copy(it).add(pt),this}setFromObject(it){return this.makeEmpty(),this.expandByObject(it)}clone(){return new this.constructor().copy(this)}copy(it){return this.min.copy(it.min),this.max.copy(it.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(it){return this.isEmpty()?it.set(0,0,0):it.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(it){return this.isEmpty()?it.set(0,0,0):it.subVectors(this.max,this.min)}expandByPoint(it){return this.min.min(it),this.max.max(it),this}expandByVector(it){return this.min.sub(it),this.max.add(it),this}expandByScalar(it){return this.min.addScalar(-it),this.max.addScalar(it),this}expandByObject(it){it.updateWorldMatrix(!1,!1);const lt=it.geometry;lt!==void 0&&(lt.boundingBox===null&&lt.computeBoundingBox(),pr.copy(lt.boundingBox),pr.applyMatrix4(it.matrixWorld),this.union(pr));const pt=it.children;for(let _t=0,Dt=pt.length;_t<Dt;_t++)this.expandByObject(pt[_t]);return this}containsPoint(it){return!(it.x<this.min.x||it.x>this.max.x||it.y<this.min.y||it.y>this.max.y||it.z<this.min.z||it.z>this.max.z)}containsBox(it){return this.min.x<=it.min.x&&it.max.x<=this.max.x&&this.min.y<=it.min.y&&it.max.y<=this.max.y&&this.min.z<=it.min.z&&it.max.z<=this.max.z}getParameter(it,lt){return lt.set((it.x-this.min.x)/(this.max.x-this.min.x),(it.y-this.min.y)/(this.max.y-this.min.y),(it.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(it){return!(it.max.x<this.min.x||it.min.x>this.max.x||it.max.y<this.min.y||it.min.y>this.max.y||it.max.z<this.min.z||it.min.z>this.max.z)}intersectsSphere(it){return this.clampPoint(it.center,ar),ar.distanceToSquared(it.center)<=it.radius*it.radius}intersectsPlane(it){let lt,pt;return it.normal.x>0?(lt=it.normal.x*this.min.x,pt=it.normal.x*this.max.x):(lt=it.normal.x*this.max.x,pt=it.normal.x*this.min.x),it.normal.y>0?(lt+=it.normal.y*this.min.y,pt+=it.normal.y*this.max.y):(lt+=it.normal.y*this.max.y,pt+=it.normal.y*this.min.y),it.normal.z>0?(lt+=it.normal.z*this.min.z,pt+=it.normal.z*this.max.z):(lt+=it.normal.z*this.max.z,pt+=it.normal.z*this.min.z),lt<=-it.constant&&pt>=-it.constant}intersectsTriangle(it){if(this.isEmpty())return!1;this.getCenter(Mr),Nr.subVectors(this.max,Mr),cr.subVectors(it.a,Mr),gr.subVectors(it.b,Mr),Sr.subVectors(it.c,Mr),Er.subVectors(gr,cr),Vr.subVectors(Sr,gr),Wr.subVectors(cr,Sr);let lt=[0,-Er.z,Er.y,0,-Vr.z,Vr.y,0,-Wr.z,Wr.y,Er.z,0,-Er.x,Vr.z,0,-Vr.x,Wr.z,0,-Wr.x,-Er.y,Er.x,0,-Vr.y,Vr.x,0,-Wr.y,Wr.x,0];return!!Ar(lt,cr,gr,Sr,Nr)&&(lt=[1,0,0,0,1,0,0,0,1],!!Ar(lt,cr,gr,Sr,Nr)&&(Yr.crossVectors(Er,Vr),lt=[Yr.x,Yr.y,Yr.z],Ar(lt,cr,gr,Sr,Nr)))}clampPoint(it,lt){return lt.copy(it).clamp(this.min,this.max)}distanceToPoint(it){return ar.copy(it).clamp(this.min,this.max).sub(it).length()}getBoundingSphere(it){return this.getCenter(it.center),it.radius=.5*this.getSize(ar).length(),it}intersect(it){return this.min.max(it.min),this.max.min(it.max),this.isEmpty()&&this.makeEmpty(),this}union(it){return this.min.min(it.min),this.max.max(it.max),this}applyMatrix4(it){return this.isEmpty()||(Jt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(it),Jt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(it),Jt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(it),Jt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(it),Jt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(it),Jt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(it),Jt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(it),Jt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(it),this.setFromPoints(Jt)),this}translate(it){return this.min.add(it),this.max.add(it),this}equals(it){return it.min.equals(this.min)&&it.max.equals(this.max)}}tr.prototype.isBox3=!0;const Jt=[new Ot,new Ot,new Ot,new Ot,new Ot,new Ot,new Ot,new Ot],ar=new Ot,pr=new tr,cr=new Ot,gr=new Ot,Sr=new Ot,Er=new Ot,Vr=new Ot,Wr=new Ot,Mr=new Ot,Nr=new Ot,Yr=new Ot,Or=new Ot;function Ar(vt,it,lt,pt,_t){for(let Dt=0,Lt=vt.length-3;Dt<=Lt;Dt+=3){Or.fromArray(vt,Dt);const $t=_t.x*Math.abs(Or.x)+_t.y*Math.abs(Or.y)+_t.z*Math.abs(Or.z),Xt=it.dot(Or),Yt=lt.dot(Or),Zt=pt.dot(Or);if(Math.max(-Math.max(Xt,Yt,Zt),Math.min(Xt,Yt,Zt))>$t)return!1}return!0}const Qr=new tr,hn=new Ot,Sn=new Ot,Kr=new Ot;class Hn{constructor(it=new Ot,lt=-1){this.center=it,this.radius=lt}set(it,lt){return this.center.copy(it),this.radius=lt,this}setFromPoints(it,lt){const pt=this.center;lt!==void 0?pt.copy(lt):Qr.setFromPoints(it).getCenter(pt);let _t=0;for(let Dt=0,Lt=it.length;Dt<Lt;Dt++)_t=Math.max(_t,pt.distanceToSquared(it[Dt]));return this.radius=Math.sqrt(_t),this}copy(it){return this.center.copy(it.center),this.radius=it.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(it){return it.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(it){return it.distanceTo(this.center)-this.radius}intersectsSphere(it){const lt=this.radius+it.radius;return it.center.distanceToSquared(this.center)<=lt*lt}intersectsBox(it){return it.intersectsSphere(this)}intersectsPlane(it){return Math.abs(it.distanceToPoint(this.center))<=this.radius}clampPoint(it,lt){const pt=this.center.distanceToSquared(it);return lt.copy(it),pt>this.radius*this.radius&&(lt.sub(this.center).normalize(),lt.multiplyScalar(this.radius).add(this.center)),lt}getBoundingBox(it){return this.isEmpty()?(it.makeEmpty(),it):(it.set(this.center,this.center),it.expandByScalar(this.radius),it)}applyMatrix4(it){return this.center.applyMatrix4(it),this.radius=this.radius*it.getMaxScaleOnAxis(),this}translate(it){return this.center.add(it),this}expandByPoint(it){Kr.subVectors(it,this.center);const lt=Kr.lengthSq();if(lt>this.radius*this.radius){const pt=Math.sqrt(lt),_t=.5*(pt-this.radius);this.center.add(Kr.multiplyScalar(_t/pt)),this.radius+=_t}return this}union(it){return Sn.subVectors(it.center,this.center).normalize().multiplyScalar(it.radius),this.expandByPoint(hn.copy(it.center).add(Sn)),this.expandByPoint(hn.copy(it.center).sub(Sn)),this}equals(it){return it.center.equals(this.center)&&it.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ln=new Ot,kn=new Ot,xn=new Ot,An=new Ot,rs=new Ot,qs=new Ot,Ln=new Ot;class Cn{constructor(it=new Ot,lt=new Ot(0,0,-1)){this.origin=it,this.direction=lt}set(it,lt){return this.origin.copy(it),this.direction.copy(lt),this}copy(it){return this.origin.copy(it.origin),this.direction.copy(it.direction),this}at(it,lt){return lt.copy(this.direction).multiplyScalar(it).add(this.origin)}lookAt(it){return this.direction.copy(it).sub(this.origin).normalize(),this}recast(it){return this.origin.copy(this.at(it,ln)),this}closestPointToPoint(it,lt){lt.subVectors(it,this.origin);const pt=lt.dot(this.direction);return pt<0?lt.copy(this.origin):lt.copy(this.direction).multiplyScalar(pt).add(this.origin)}distanceToPoint(it){return Math.sqrt(this.distanceSqToPoint(it))}distanceSqToPoint(it){const lt=ln.subVectors(it,this.origin).dot(this.direction);return lt<0?this.origin.distanceToSquared(it):(ln.copy(this.direction).multiplyScalar(lt).add(this.origin),ln.distanceToSquared(it))}distanceSqToSegment(it,lt,pt,_t){kn.copy(it).add(lt).multiplyScalar(.5),xn.copy(lt).sub(it).normalize(),An.copy(this.origin).sub(kn);const Dt=.5*it.distanceTo(lt),Lt=-this.direction.dot(xn),$t=An.dot(this.direction),Xt=-An.dot(xn),Yt=An.lengthSq(),Zt=Math.abs(1-Lt*Lt);let lr,xr,wr,Ir;if(Zt>0)if(lr=Lt*Xt-$t,xr=Lt*$t-Xt,Ir=Dt*Zt,lr>=0)if(xr>=-Ir)if(xr<=Ir){const kr=1/Zt;lr*=kr,xr*=kr,wr=lr*(lr+Lt*xr+2*$t)+xr*(Lt*lr+xr+2*Xt)+Yt}else xr=Dt,lr=Math.max(0,-(Lt*xr+$t)),wr=-lr*lr+xr*(xr+2*Xt)+Yt;else xr=-Dt,lr=Math.max(0,-(Lt*xr+$t)),wr=-lr*lr+xr*(xr+2*Xt)+Yt;else xr<=-Ir?(lr=Math.max(0,-(-Lt*Dt+$t)),xr=lr>0?-Dt:Math.min(Math.max(-Dt,-Xt),Dt),wr=-lr*lr+xr*(xr+2*Xt)+Yt):xr<=Ir?(lr=0,xr=Math.min(Math.max(-Dt,-Xt),Dt),wr=xr*(xr+2*Xt)+Yt):(lr=Math.max(0,-(Lt*Dt+$t)),xr=lr>0?Dt:Math.min(Math.max(-Dt,-Xt),Dt),wr=-lr*lr+xr*(xr+2*Xt)+Yt);else xr=Lt>0?-Dt:Dt,lr=Math.max(0,-(Lt*xr+$t)),wr=-lr*lr+xr*(xr+2*Xt)+Yt;return pt&&pt.copy(this.direction).multiplyScalar(lr).add(this.origin),_t&&_t.copy(xn).multiplyScalar(xr).add(kn),wr}intersectSphere(it,lt){ln.subVectors(it.center,this.origin);const pt=ln.dot(this.direction),_t=ln.dot(ln)-pt*pt,Dt=it.radius*it.radius;if(_t>Dt)return null;const Lt=Math.sqrt(Dt-_t),$t=pt-Lt,Xt=pt+Lt;return $t<0&&Xt<0?null:$t<0?this.at(Xt,lt):this.at($t,lt)}intersectsSphere(it){return this.distanceSqToPoint(it.center)<=it.radius*it.radius}distanceToPlane(it){const lt=it.normal.dot(this.direction);if(lt===0)return it.distanceToPoint(this.origin)===0?0:null;const pt=-(this.origin.dot(it.normal)+it.constant)/lt;return pt>=0?pt:null}intersectPlane(it,lt){const pt=this.distanceToPlane(it);return pt===null?null:this.at(pt,lt)}intersectsPlane(it){const lt=it.distanceToPoint(this.origin);return lt===0?!0:it.normal.dot(this.direction)*lt<0}intersectBox(it,lt){let pt,_t,Dt,Lt,$t,Xt;const Yt=1/this.direction.x,Zt=1/this.direction.y,lr=1/this.direction.z,xr=this.origin;return Yt>=0?(pt=(it.min.x-xr.x)*Yt,_t=(it.max.x-xr.x)*Yt):(pt=(it.max.x-xr.x)*Yt,_t=(it.min.x-xr.x)*Yt),Zt>=0?(Dt=(it.min.y-xr.y)*Zt,Lt=(it.max.y-xr.y)*Zt):(Dt=(it.max.y-xr.y)*Zt,Lt=(it.min.y-xr.y)*Zt),pt>Lt||Dt>_t?null:((Dt>pt||pt!=pt)&&(pt=Dt),(Lt<_t||_t!=_t)&&(_t=Lt),lr>=0?($t=(it.min.z-xr.z)*lr,Xt=(it.max.z-xr.z)*lr):($t=(it.max.z-xr.z)*lr,Xt=(it.min.z-xr.z)*lr),pt>Xt||$t>_t?null:(($t>pt||pt!=pt)&&(pt=$t),(Xt<_t||_t!=_t)&&(_t=Xt),_t<0?null:this.at(pt>=0?pt:_t,lt)))}intersectsBox(it){return this.intersectBox(it,ln)!==null}intersectTriangle(it,lt,pt,_t,Dt){rs.subVectors(lt,it),qs.subVectors(pt,it),Ln.crossVectors(rs,qs);let Lt,$t=this.direction.dot(Ln);if($t>0){if(_t)return null;Lt=1}else{if(!($t<0))return null;Lt=-1,$t=-$t}An.subVectors(this.origin,it);const Xt=Lt*this.direction.dot(qs.crossVectors(An,qs));if(Xt<0)return null;const Yt=Lt*this.direction.dot(rs.cross(An));if(Yt<0||Xt+Yt>$t)return null;const Zt=-Lt*An.dot(Ln);return Zt<0?null:this.at(Zt/$t,Dt)}applyMatrix4(it){return this.origin.applyMatrix4(it),this.direction.transformDirection(it),this}equals(it){return it.origin.equals(this.origin)&&it.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Nn{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr,wr,Ir,kr,Lr){const Xr=this.elements;return Xr[0]=it,Xr[4]=lt,Xr[8]=pt,Xr[12]=_t,Xr[1]=Dt,Xr[5]=Lt,Xr[9]=$t,Xr[13]=Xt,Xr[2]=Yt,Xr[6]=Zt,Xr[10]=lr,Xr[14]=xr,Xr[3]=wr,Xr[7]=Ir,Xr[11]=kr,Xr[15]=Lr,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Nn().fromArray(this.elements)}copy(it){const lt=this.elements,pt=it.elements;return lt[0]=pt[0],lt[1]=pt[1],lt[2]=pt[2],lt[3]=pt[3],lt[4]=pt[4],lt[5]=pt[5],lt[6]=pt[6],lt[7]=pt[7],lt[8]=pt[8],lt[9]=pt[9],lt[10]=pt[10],lt[11]=pt[11],lt[12]=pt[12],lt[13]=pt[13],lt[14]=pt[14],lt[15]=pt[15],this}copyPosition(it){const lt=this.elements,pt=it.elements;return lt[12]=pt[12],lt[13]=pt[13],lt[14]=pt[14],this}setFromMatrix3(it){const lt=it.elements;return this.set(lt[0],lt[3],lt[6],0,lt[1],lt[4],lt[7],0,lt[2],lt[5],lt[8],0,0,0,0,1),this}extractBasis(it,lt,pt){return it.setFromMatrixColumn(this,0),lt.setFromMatrixColumn(this,1),pt.setFromMatrixColumn(this,2),this}makeBasis(it,lt,pt){return this.set(it.x,lt.x,pt.x,0,it.y,lt.y,pt.y,0,it.z,lt.z,pt.z,0,0,0,0,1),this}extractRotation(it){const lt=this.elements,pt=it.elements,_t=1/Gr.setFromMatrixColumn(it,0).length(),Dt=1/Gr.setFromMatrixColumn(it,1).length(),Lt=1/Gr.setFromMatrixColumn(it,2).length();return lt[0]=pt[0]*_t,lt[1]=pt[1]*_t,lt[2]=pt[2]*_t,lt[3]=0,lt[4]=pt[4]*Dt,lt[5]=pt[5]*Dt,lt[6]=pt[6]*Dt,lt[7]=0,lt[8]=pt[8]*Lt,lt[9]=pt[9]*Lt,lt[10]=pt[10]*Lt,lt[11]=0,lt[12]=0,lt[13]=0,lt[14]=0,lt[15]=1,this}makeRotationFromEuler(it){it&&it.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const lt=this.elements,pt=it.x,_t=it.y,Dt=it.z,Lt=Math.cos(pt),$t=Math.sin(pt),Xt=Math.cos(_t),Yt=Math.sin(_t),Zt=Math.cos(Dt),lr=Math.sin(Dt);if(it.order==="XYZ"){const xr=Lt*Zt,wr=Lt*lr,Ir=$t*Zt,kr=$t*lr;lt[0]=Xt*Zt,lt[4]=-Xt*lr,lt[8]=Yt,lt[1]=wr+Ir*Yt,lt[5]=xr-kr*Yt,lt[9]=-$t*Xt,lt[2]=kr-xr*Yt,lt[6]=Ir+wr*Yt,lt[10]=Lt*Xt}else if(it.order==="YXZ"){const xr=Xt*Zt,wr=Xt*lr,Ir=Yt*Zt,kr=Yt*lr;lt[0]=xr+kr*$t,lt[4]=Ir*$t-wr,lt[8]=Lt*Yt,lt[1]=Lt*lr,lt[5]=Lt*Zt,lt[9]=-$t,lt[2]=wr*$t-Ir,lt[6]=kr+xr*$t,lt[10]=Lt*Xt}else if(it.order==="ZXY"){const xr=Xt*Zt,wr=Xt*lr,Ir=Yt*Zt,kr=Yt*lr;lt[0]=xr-kr*$t,lt[4]=-Lt*lr,lt[8]=Ir+wr*$t,lt[1]=wr+Ir*$t,lt[5]=Lt*Zt,lt[9]=kr-xr*$t,lt[2]=-Lt*Yt,lt[6]=$t,lt[10]=Lt*Xt}else if(it.order==="ZYX"){const xr=Lt*Zt,wr=Lt*lr,Ir=$t*Zt,kr=$t*lr;lt[0]=Xt*Zt,lt[4]=Ir*Yt-wr,lt[8]=xr*Yt+kr,lt[1]=Xt*lr,lt[5]=kr*Yt+xr,lt[9]=wr*Yt-Ir,lt[2]=-Yt,lt[6]=$t*Xt,lt[10]=Lt*Xt}else if(it.order==="YZX"){const xr=Lt*Xt,wr=Lt*Yt,Ir=$t*Xt,kr=$t*Yt;lt[0]=Xt*Zt,lt[4]=kr-xr*lr,lt[8]=Ir*lr+wr,lt[1]=lr,lt[5]=Lt*Zt,lt[9]=-$t*Zt,lt[2]=-Yt*Zt,lt[6]=wr*lr+Ir,lt[10]=xr-kr*lr}else if(it.order==="XZY"){const xr=Lt*Xt,wr=Lt*Yt,Ir=$t*Xt,kr=$t*Yt;lt[0]=Xt*Zt,lt[4]=-lr,lt[8]=Yt*Zt,lt[1]=xr*lr+kr,lt[5]=Lt*Zt,lt[9]=wr*lr-Ir,lt[2]=Ir*lr-wr,lt[6]=$t*Zt,lt[10]=kr*lr+xr}return lt[3]=0,lt[7]=0,lt[11]=0,lt[12]=0,lt[13]=0,lt[14]=0,lt[15]=1,this}makeRotationFromQuaternion(it){return this.compose(dn,it,Rn)}lookAt(it,lt,pt){const _t=this.elements;return Zn.subVectors(it,lt),Zn.lengthSq()===0&&(Zn.z=1),Zn.normalize(),wn.crossVectors(pt,Zn),wn.lengthSq()===0&&(Math.abs(pt.z)===1?Zn.x+=1e-4:Zn.z+=1e-4,Zn.normalize(),wn.crossVectors(pt,Zn)),wn.normalize(),Un.crossVectors(Zn,wn),_t[0]=wn.x,_t[4]=Un.x,_t[8]=Zn.x,_t[1]=wn.y,_t[5]=Un.y,_t[9]=Zn.y,_t[2]=wn.z,_t[6]=Un.z,_t[10]=Zn.z,this}multiply(it,lt){return lt!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(it,lt)):this.multiplyMatrices(this,it)}premultiply(it){return this.multiplyMatrices(it,this)}multiplyMatrices(it,lt){const pt=it.elements,_t=lt.elements,Dt=this.elements,Lt=pt[0],$t=pt[4],Xt=pt[8],Yt=pt[12],Zt=pt[1],lr=pt[5],xr=pt[9],wr=pt[13],Ir=pt[2],kr=pt[6],Lr=pt[10],Xr=pt[14],_n=pt[3],On=pt[7],Kn=pt[11],Mn=pt[15],ca=_t[0],Gn=_t[4],Qn=_t[8],ks=_t[12],Cs=_t[1],gs=_t[5],_s=_t[9],Ts=_t[13],ws=_t[2],oo=_t[6],no=_t[10],js=_t[14],Ws=_t[3],Co=_t[7],jo=_t[11],Qo=_t[15];return Dt[0]=Lt*ca+$t*Cs+Xt*ws+Yt*Ws,Dt[4]=Lt*Gn+$t*gs+Xt*oo+Yt*Co,Dt[8]=Lt*Qn+$t*_s+Xt*no+Yt*jo,Dt[12]=Lt*ks+$t*Ts+Xt*js+Yt*Qo,Dt[1]=Zt*ca+lr*Cs+xr*ws+wr*Ws,Dt[5]=Zt*Gn+lr*gs+xr*oo+wr*Co,Dt[9]=Zt*Qn+lr*_s+xr*no+wr*jo,Dt[13]=Zt*ks+lr*Ts+xr*js+wr*Qo,Dt[2]=Ir*ca+kr*Cs+Lr*ws+Xr*Ws,Dt[6]=Ir*Gn+kr*gs+Lr*oo+Xr*Co,Dt[10]=Ir*Qn+kr*_s+Lr*no+Xr*jo,Dt[14]=Ir*ks+kr*Ts+Lr*js+Xr*Qo,Dt[3]=_n*ca+On*Cs+Kn*ws+Mn*Ws,Dt[7]=_n*Gn+On*gs+Kn*oo+Mn*Co,Dt[11]=_n*Qn+On*_s+Kn*no+Mn*jo,Dt[15]=_n*ks+On*Ts+Kn*js+Mn*Qo,this}multiplyScalar(it){const lt=this.elements;return lt[0]*=it,lt[4]*=it,lt[8]*=it,lt[12]*=it,lt[1]*=it,lt[5]*=it,lt[9]*=it,lt[13]*=it,lt[2]*=it,lt[6]*=it,lt[10]*=it,lt[14]*=it,lt[3]*=it,lt[7]*=it,lt[11]*=it,lt[15]*=it,this}determinant(){const it=this.elements,lt=it[0],pt=it[4],_t=it[8],Dt=it[12],Lt=it[1],$t=it[5],Xt=it[9],Yt=it[13],Zt=it[2],lr=it[6],xr=it[10],wr=it[14];return it[3]*(+Dt*Xt*lr-_t*Yt*lr-Dt*$t*xr+pt*Yt*xr+_t*$t*wr-pt*Xt*wr)+it[7]*(+lt*Xt*wr-lt*Yt*xr+Dt*Lt*xr-_t*Lt*wr+_t*Yt*Zt-Dt*Xt*Zt)+it[11]*(+lt*Yt*lr-lt*$t*wr-Dt*Lt*lr+pt*Lt*wr+Dt*$t*Zt-pt*Yt*Zt)+it[15]*(-_t*$t*Zt-lt*Xt*lr+lt*$t*xr+_t*Lt*lr-pt*Lt*xr+pt*Xt*Zt)}transpose(){const it=this.elements;let lt;return lt=it[1],it[1]=it[4],it[4]=lt,lt=it[2],it[2]=it[8],it[8]=lt,lt=it[6],it[6]=it[9],it[9]=lt,lt=it[3],it[3]=it[12],it[12]=lt,lt=it[7],it[7]=it[13],it[13]=lt,lt=it[11],it[11]=it[14],it[14]=lt,this}setPosition(it,lt,pt){const _t=this.elements;return it.isVector3?(_t[12]=it.x,_t[13]=it.y,_t[14]=it.z):(_t[12]=it,_t[13]=lt,_t[14]=pt),this}invert(){const it=this.elements,lt=it[0],pt=it[1],_t=it[2],Dt=it[3],Lt=it[4],$t=it[5],Xt=it[6],Yt=it[7],Zt=it[8],lr=it[9],xr=it[10],wr=it[11],Ir=it[12],kr=it[13],Lr=it[14],Xr=it[15],_n=lr*Lr*Yt-kr*xr*Yt+kr*Xt*wr-$t*Lr*wr-lr*Xt*Xr+$t*xr*Xr,On=Ir*xr*Yt-Zt*Lr*Yt-Ir*Xt*wr+Lt*Lr*wr+Zt*Xt*Xr-Lt*xr*Xr,Kn=Zt*kr*Yt-Ir*lr*Yt+Ir*$t*wr-Lt*kr*wr-Zt*$t*Xr+Lt*lr*Xr,Mn=Ir*lr*Xt-Zt*kr*Xt-Ir*$t*xr+Lt*kr*xr+Zt*$t*Lr-Lt*lr*Lr,ca=lt*_n+pt*On+_t*Kn+Dt*Mn;if(ca===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Gn=1/ca;return it[0]=_n*Gn,it[1]=(kr*xr*Dt-lr*Lr*Dt-kr*_t*wr+pt*Lr*wr+lr*_t*Xr-pt*xr*Xr)*Gn,it[2]=($t*Lr*Dt-kr*Xt*Dt+kr*_t*Yt-pt*Lr*Yt-$t*_t*Xr+pt*Xt*Xr)*Gn,it[3]=(lr*Xt*Dt-$t*xr*Dt-lr*_t*Yt+pt*xr*Yt+$t*_t*wr-pt*Xt*wr)*Gn,it[4]=On*Gn,it[5]=(Zt*Lr*Dt-Ir*xr*Dt+Ir*_t*wr-lt*Lr*wr-Zt*_t*Xr+lt*xr*Xr)*Gn,it[6]=(Ir*Xt*Dt-Lt*Lr*Dt-Ir*_t*Yt+lt*Lr*Yt+Lt*_t*Xr-lt*Xt*Xr)*Gn,it[7]=(Lt*xr*Dt-Zt*Xt*Dt+Zt*_t*Yt-lt*xr*Yt-Lt*_t*wr+lt*Xt*wr)*Gn,it[8]=Kn*Gn,it[9]=(Ir*lr*Dt-Zt*kr*Dt-Ir*pt*wr+lt*kr*wr+Zt*pt*Xr-lt*lr*Xr)*Gn,it[10]=(Lt*kr*Dt-Ir*$t*Dt+Ir*pt*Yt-lt*kr*Yt-Lt*pt*Xr+lt*$t*Xr)*Gn,it[11]=(Zt*$t*Dt-Lt*lr*Dt-Zt*pt*Yt+lt*lr*Yt+Lt*pt*wr-lt*$t*wr)*Gn,it[12]=Mn*Gn,it[13]=(Zt*kr*_t-Ir*lr*_t+Ir*pt*xr-lt*kr*xr-Zt*pt*Lr+lt*lr*Lr)*Gn,it[14]=(Ir*$t*_t-Lt*kr*_t-Ir*pt*Xt+lt*kr*Xt+Lt*pt*Lr-lt*$t*Lr)*Gn,it[15]=(Lt*lr*_t-Zt*$t*_t+Zt*pt*Xt-lt*lr*Xt-Lt*pt*xr+lt*$t*xr)*Gn,this}scale(it){const lt=this.elements,pt=it.x,_t=it.y,Dt=it.z;return lt[0]*=pt,lt[4]*=_t,lt[8]*=Dt,lt[1]*=pt,lt[5]*=_t,lt[9]*=Dt,lt[2]*=pt,lt[6]*=_t,lt[10]*=Dt,lt[3]*=pt,lt[7]*=_t,lt[11]*=Dt,this}getMaxScaleOnAxis(){const it=this.elements,lt=it[0]*it[0]+it[1]*it[1]+it[2]*it[2],pt=it[4]*it[4]+it[5]*it[5]+it[6]*it[6],_t=it[8]*it[8]+it[9]*it[9]+it[10]*it[10];return Math.sqrt(Math.max(lt,pt,_t))}makeTranslation(it,lt,pt){return this.set(1,0,0,it,0,1,0,lt,0,0,1,pt,0,0,0,1),this}makeRotationX(it){const lt=Math.cos(it),pt=Math.sin(it);return this.set(1,0,0,0,0,lt,-pt,0,0,pt,lt,0,0,0,0,1),this}makeRotationY(it){const lt=Math.cos(it),pt=Math.sin(it);return this.set(lt,0,pt,0,0,1,0,0,-pt,0,lt,0,0,0,0,1),this}makeRotationZ(it){const lt=Math.cos(it),pt=Math.sin(it);return this.set(lt,-pt,0,0,pt,lt,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(it,lt){const pt=Math.cos(lt),_t=Math.sin(lt),Dt=1-pt,Lt=it.x,$t=it.y,Xt=it.z,Yt=Dt*Lt,Zt=Dt*$t;return this.set(Yt*Lt+pt,Yt*$t-_t*Xt,Yt*Xt+_t*$t,0,Yt*$t+_t*Xt,Zt*$t+pt,Zt*Xt-_t*Lt,0,Yt*Xt-_t*$t,Zt*Xt+_t*Lt,Dt*Xt*Xt+pt,0,0,0,0,1),this}makeScale(it,lt,pt){return this.set(it,0,0,0,0,lt,0,0,0,0,pt,0,0,0,0,1),this}makeShear(it,lt,pt,_t,Dt,Lt){return this.set(1,pt,Dt,0,it,1,Lt,0,lt,_t,1,0,0,0,0,1),this}compose(it,lt,pt){const _t=this.elements,Dt=lt._x,Lt=lt._y,$t=lt._z,Xt=lt._w,Yt=Dt+Dt,Zt=Lt+Lt,lr=$t+$t,xr=Dt*Yt,wr=Dt*Zt,Ir=Dt*lr,kr=Lt*Zt,Lr=Lt*lr,Xr=$t*lr,_n=Xt*Yt,On=Xt*Zt,Kn=Xt*lr,Mn=pt.x,ca=pt.y,Gn=pt.z;return _t[0]=(1-(kr+Xr))*Mn,_t[1]=(wr+Kn)*Mn,_t[2]=(Ir-On)*Mn,_t[3]=0,_t[4]=(wr-Kn)*ca,_t[5]=(1-(xr+Xr))*ca,_t[6]=(Lr+_n)*ca,_t[7]=0,_t[8]=(Ir+On)*Gn,_t[9]=(Lr-_n)*Gn,_t[10]=(1-(xr+kr))*Gn,_t[11]=0,_t[12]=it.x,_t[13]=it.y,_t[14]=it.z,_t[15]=1,this}decompose(it,lt,pt){const _t=this.elements;let Dt=Gr.set(_t[0],_t[1],_t[2]).length();const Lt=Gr.set(_t[4],_t[5],_t[6]).length(),$t=Gr.set(_t[8],_t[9],_t[10]).length();this.determinant()<0&&(Dt=-Dt),it.x=_t[12],it.y=_t[13],it.z=_t[14],tn.copy(this);const Xt=1/Dt,Yt=1/Lt,Zt=1/$t;return tn.elements[0]*=Xt,tn.elements[1]*=Xt,tn.elements[2]*=Xt,tn.elements[4]*=Yt,tn.elements[5]*=Yt,tn.elements[6]*=Yt,tn.elements[8]*=Zt,tn.elements[9]*=Zt,tn.elements[10]*=Zt,lt.setFromRotationMatrix(tn),pt.x=Dt,pt.y=Lt,pt.z=$t,this}makePerspective(it,lt,pt,_t,Dt,Lt){Lt===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const $t=this.elements,Xt=2*Dt/(lt-it),Yt=2*Dt/(pt-_t),Zt=(lt+it)/(lt-it),lr=(pt+_t)/(pt-_t),xr=-(Lt+Dt)/(Lt-Dt),wr=-2*Lt*Dt/(Lt-Dt);return $t[0]=Xt,$t[4]=0,$t[8]=Zt,$t[12]=0,$t[1]=0,$t[5]=Yt,$t[9]=lr,$t[13]=0,$t[2]=0,$t[6]=0,$t[10]=xr,$t[14]=wr,$t[3]=0,$t[7]=0,$t[11]=-1,$t[15]=0,this}makeOrthographic(it,lt,pt,_t,Dt,Lt){const $t=this.elements,Xt=1/(lt-it),Yt=1/(pt-_t),Zt=1/(Lt-Dt),lr=(lt+it)*Xt,xr=(pt+_t)*Yt,wr=(Lt+Dt)*Zt;return $t[0]=2*Xt,$t[4]=0,$t[8]=0,$t[12]=-lr,$t[1]=0,$t[5]=2*Yt,$t[9]=0,$t[13]=-xr,$t[2]=0,$t[6]=0,$t[10]=-2*Zt,$t[14]=-wr,$t[3]=0,$t[7]=0,$t[11]=0,$t[15]=1,this}equals(it){const lt=this.elements,pt=it.elements;for(let _t=0;_t<16;_t++)if(lt[_t]!==pt[_t])return!1;return!0}fromArray(it,lt=0){for(let pt=0;pt<16;pt++)this.elements[pt]=it[pt+lt];return this}toArray(it=[],lt=0){const pt=this.elements;return it[lt]=pt[0],it[lt+1]=pt[1],it[lt+2]=pt[2],it[lt+3]=pt[3],it[lt+4]=pt[4],it[lt+5]=pt[5],it[lt+6]=pt[6],it[lt+7]=pt[7],it[lt+8]=pt[8],it[lt+9]=pt[9],it[lt+10]=pt[10],it[lt+11]=pt[11],it[lt+12]=pt[12],it[lt+13]=pt[13],it[lt+14]=pt[14],it[lt+15]=pt[15],it}}Nn.prototype.isMatrix4=!0;const Gr=new Ot,tn=new Nn,dn=new Ot(0,0,0),Rn=new Ot(1,1,1),wn=new Ot,Un=new Ot,Zn=new Ot,pn=new Nn,Dn=new Ut;class qn{constructor(it=0,lt=0,pt=0,_t=qn.DefaultOrder){this._x=it,this._y=lt,this._z=pt,this._order=_t}get x(){return this._x}set x(it){this._x=it,this._onChangeCallback()}get y(){return this._y}set y(it){this._y=it,this._onChangeCallback()}get z(){return this._z}set z(it){this._z=it,this._onChangeCallback()}get order(){return this._order}set order(it){this._order=it,this._onChangeCallback()}set(it,lt,pt,_t=this._order){return this._x=it,this._y=lt,this._z=pt,this._order=_t,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(it){return this._x=it._x,this._y=it._y,this._z=it._z,this._order=it._order,this._onChangeCallback(),this}setFromRotationMatrix(it,lt=this._order,pt=!0){const _t=it.elements,Dt=_t[0],Lt=_t[4],$t=_t[8],Xt=_t[1],Yt=_t[5],Zt=_t[9],lr=_t[2],xr=_t[6],wr=_t[10];switch(lt){case"XYZ":this._y=Math.asin(St($t,-1,1)),Math.abs($t)<.9999999?(this._x=Math.atan2(-Zt,wr),this._z=Math.atan2(-Lt,Dt)):(this._x=Math.atan2(xr,Yt),this._z=0);break;case"YXZ":this._x=Math.asin(-St(Zt,-1,1)),Math.abs(Zt)<.9999999?(this._y=Math.atan2($t,wr),this._z=Math.atan2(Xt,Yt)):(this._y=Math.atan2(-lr,Dt),this._z=0);break;case"ZXY":this._x=Math.asin(St(xr,-1,1)),Math.abs(xr)<.9999999?(this._y=Math.atan2(-lr,wr),this._z=Math.atan2(-Lt,Yt)):(this._y=0,this._z=Math.atan2(Xt,Dt));break;case"ZYX":this._y=Math.asin(-St(lr,-1,1)),Math.abs(lr)<.9999999?(this._x=Math.atan2(xr,wr),this._z=Math.atan2(Xt,Dt)):(this._x=0,this._z=Math.atan2(-Lt,Yt));break;case"YZX":this._z=Math.asin(St(Xt,-1,1)),Math.abs(Xt)<.9999999?(this._x=Math.atan2(-Zt,Yt),this._y=Math.atan2(-lr,Dt)):(this._x=0,this._y=Math.atan2($t,wr));break;case"XZY":this._z=Math.asin(-St(Lt,-1,1)),Math.abs(Lt)<.9999999?(this._x=Math.atan2(xr,Yt),this._y=Math.atan2($t,Dt)):(this._x=Math.atan2(-Zt,wr),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+lt)}return this._order=lt,pt===!0&&this._onChangeCallback(),this}setFromQuaternion(it,lt,pt){return pn.makeRotationFromQuaternion(it),this.setFromRotationMatrix(pn,lt,pt)}setFromVector3(it,lt=this._order){return this.set(it.x,it.y,it.z,lt)}reorder(it){return Dn.setFromEuler(this),this.setFromQuaternion(Dn,it)}equals(it){return it._x===this._x&&it._y===this._y&&it._z===this._z&&it._order===this._order}fromArray(it){return this._x=it[0],this._y=it[1],this._z=it[2],it[3]!==void 0&&(this._order=it[3]),this._onChangeCallback(),this}toArray(it=[],lt=0){return it[lt]=this._x,it[lt+1]=this._y,it[lt+2]=this._z,it[lt+3]=this._order,it}toVector3(it){return it?it.set(this._x,this._y,this._z):new Ot(this._x,this._y,this._z)}_onChange(it){return this._onChangeCallback=it,this}_onChangeCallback(){}}qn.prototype.isEuler=!0,qn.DefaultOrder="XYZ",qn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class _a{constructor(){this.mask=1}set(it){this.mask=1<<it|0}enable(it){this.mask|=1<<it|0}enableAll(){this.mask=-1}toggle(it){this.mask^=1<<it|0}disable(it){this.mask&=~(1<<it|0)}disableAll(){this.mask=0}test(it){return(this.mask&it.mask)!=0}}let Vn=0;const bs=new Ot,Is=new Ut,uo=new Nn,Rs=new Ot,io=new Ot,vo=new Ot,Bo=new Ut,En=new Ot(1,0,0),In=new Ot(0,1,0),ds=new Ot(0,0,1),Ps={type:"added"},yo={type:"removed"};class rn extends dt{constructor(){super(),Object.defineProperty(this,"id",{value:Vn++}),this.uuid=bt(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=rn.DefaultUp.clone();const it=new Ot,lt=new qn,pt=new Ut,_t=new Ot(1,1,1);lt._onChange(function(){pt.setFromEuler(lt,!1)}),pt._onChange(function(){lt.setFromQuaternion(pt,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:it},rotation:{configurable:!0,enumerable:!0,value:lt},quaternion:{configurable:!0,enumerable:!0,value:pt},scale:{configurable:!0,enumerable:!0,value:_t},modelViewMatrix:{value:new Nn},normalMatrix:{value:new At}}),this.matrix=new Nn,this.matrixWorld=new Nn,this.matrixAutoUpdate=rn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new _a,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(it){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(it),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(it){return this.quaternion.premultiply(it),this}setRotationFromAxisAngle(it,lt){this.quaternion.setFromAxisAngle(it,lt)}setRotationFromEuler(it){this.quaternion.setFromEuler(it,!0)}setRotationFromMatrix(it){this.quaternion.setFromRotationMatrix(it)}setRotationFromQuaternion(it){this.quaternion.copy(it)}rotateOnAxis(it,lt){return Is.setFromAxisAngle(it,lt),this.quaternion.multiply(Is),this}rotateOnWorldAxis(it,lt){return Is.setFromAxisAngle(it,lt),this.quaternion.premultiply(Is),this}rotateX(it){return this.rotateOnAxis(En,it)}rotateY(it){return this.rotateOnAxis(In,it)}rotateZ(it){return this.rotateOnAxis(ds,it)}translateOnAxis(it,lt){return bs.copy(it).applyQuaternion(this.quaternion),this.position.add(bs.multiplyScalar(lt)),this}translateX(it){return this.translateOnAxis(En,it)}translateY(it){return this.translateOnAxis(In,it)}translateZ(it){return this.translateOnAxis(ds,it)}localToWorld(it){return it.applyMatrix4(this.matrixWorld)}worldToLocal(it){return it.applyMatrix4(uo.copy(this.matrixWorld).invert())}lookAt(it,lt,pt){it.isVector3?Rs.copy(it):Rs.set(it,lt,pt);const _t=this.parent;this.updateWorldMatrix(!0,!1),io.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?uo.lookAt(io,Rs,this.up):uo.lookAt(Rs,io,this.up),this.quaternion.setFromRotationMatrix(uo),_t&&(uo.extractRotation(_t.matrixWorld),Is.setFromRotationMatrix(uo),this.quaternion.premultiply(Is.invert()))}add(it){if(arguments.length>1){for(let lt=0;lt<arguments.length;lt++)this.add(arguments[lt]);return this}return it===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",it),this):(it&&it.isObject3D?(it.parent!==null&&it.parent.remove(it),it.parent=this,this.children.push(it),it.dispatchEvent(Ps)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",it),this)}remove(it){if(arguments.length>1){for(let pt=0;pt<arguments.length;pt++)this.remove(arguments[pt]);return this}const lt=this.children.indexOf(it);return lt!==-1&&(it.parent=null,this.children.splice(lt,1),it.dispatchEvent(yo)),this}removeFromParent(){const it=this.parent;return it!==null&&it.remove(this),this}clear(){for(let it=0;it<this.children.length;it++){const lt=this.children[it];lt.parent=null,lt.dispatchEvent(yo)}return this.children.length=0,this}attach(it){return this.updateWorldMatrix(!0,!1),uo.copy(this.matrixWorld).invert(),it.parent!==null&&(it.parent.updateWorldMatrix(!0,!1),uo.multiply(it.parent.matrixWorld)),it.applyMatrix4(uo),this.add(it),it.updateWorldMatrix(!1,!0),this}getObjectById(it){return this.getObjectByProperty("id",it)}getObjectByName(it){return this.getObjectByProperty("name",it)}getObjectByProperty(it,lt){if(this[it]===lt)return this;for(let pt=0,_t=this.children.length;pt<_t;pt++){const Dt=this.children[pt].getObjectByProperty(it,lt);if(Dt!==void 0)return Dt}}getWorldPosition(it){return this.updateWorldMatrix(!0,!1),it.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(it){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(io,it,vo),it}getWorldScale(it){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(io,Bo,it),it}getWorldDirection(it){this.updateWorldMatrix(!0,!1);const lt=this.matrixWorld.elements;return it.set(lt[8],lt[9],lt[10]).normalize()}raycast(){}traverse(it){it(this);const lt=this.children;for(let pt=0,_t=lt.length;pt<_t;pt++)lt[pt].traverse(it)}traverseVisible(it){if(this.visible===!1)return;it(this);const lt=this.children;for(let pt=0,_t=lt.length;pt<_t;pt++)lt[pt].traverseVisible(it)}traverseAncestors(it){const lt=this.parent;lt!==null&&(it(lt),lt.traverseAncestors(it))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(it){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||it)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,it=!0);const lt=this.children;for(let pt=0,_t=lt.length;pt<_t;pt++)lt[pt].updateMatrixWorld(it)}updateWorldMatrix(it,lt){const pt=this.parent;if(it===!0&&pt!==null&&pt.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),lt===!0){const _t=this.children;for(let Dt=0,Lt=_t.length;Dt<Lt;Dt++)_t[Dt].updateWorldMatrix(!1,!0)}}toJSON(it){const lt=it===void 0||typeof it=="string",pt={};lt&&(it={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},pt.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const _t={};function Dt($t,Xt){return $t[Xt.uuid]===void 0&&($t[Xt.uuid]=Xt.toJSON(it)),Xt.uuid}if(_t.uuid=this.uuid,_t.type=this.type,this.name!==""&&(_t.name=this.name),this.castShadow===!0&&(_t.castShadow=!0),this.receiveShadow===!0&&(_t.receiveShadow=!0),this.visible===!1&&(_t.visible=!1),this.frustumCulled===!1&&(_t.frustumCulled=!1),this.renderOrder!==0&&(_t.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(_t.userData=this.userData),_t.layers=this.layers.mask,_t.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(_t.matrixAutoUpdate=!1),this.isInstancedMesh&&(_t.type="InstancedMesh",_t.count=this.count,_t.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(_t.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?_t.background=this.background.toJSON():this.background.isTexture&&(_t.background=this.background.toJSON(it).uuid)),this.environment&&this.environment.isTexture&&(_t.environment=this.environment.toJSON(it).uuid);else if(this.isMesh||this.isLine||this.isPoints){_t.geometry=Dt(it.geometries,this.geometry);const $t=this.geometry.parameters;if($t!==void 0&&$t.shapes!==void 0){const Xt=$t.shapes;if(Array.isArray(Xt))for(let Yt=0,Zt=Xt.length;Yt<Zt;Yt++){const lr=Xt[Yt];Dt(it.shapes,lr)}else Dt(it.shapes,Xt)}}if(this.isSkinnedMesh&&(_t.bindMode=this.bindMode,_t.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(Dt(it.skeletons,this.skeleton),_t.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const $t=[];for(let Xt=0,Yt=this.material.length;Xt<Yt;Xt++)$t.push(Dt(it.materials,this.material[Xt]));_t.material=$t}else _t.material=Dt(it.materials,this.material);if(this.children.length>0){_t.children=[];for(let $t=0;$t<this.children.length;$t++)_t.children.push(this.children[$t].toJSON(it).object)}if(this.animations.length>0){_t.animations=[];for(let $t=0;$t<this.animations.length;$t++){const Xt=this.animations[$t];_t.animations.push(Dt(it.animations,Xt))}}if(lt){const $t=Lt(it.geometries),Xt=Lt(it.materials),Yt=Lt(it.textures),Zt=Lt(it.images),lr=Lt(it.shapes),xr=Lt(it.skeletons),wr=Lt(it.animations);$t.length>0&&(pt.geometries=$t),Xt.length>0&&(pt.materials=Xt),Yt.length>0&&(pt.textures=Yt),Zt.length>0&&(pt.images=Zt),lr.length>0&&(pt.shapes=lr),xr.length>0&&(pt.skeletons=xr),wr.length>0&&(pt.animations=wr)}return pt.object=_t,pt;function Lt($t){const Xt=[];for(const Yt in $t){const Zt=$t[Yt];delete Zt.metadata,Xt.push(Zt)}return Xt}}clone(it){return new this.constructor().copy(this,it)}copy(it,lt=!0){if(this.name=it.name,this.up.copy(it.up),this.position.copy(it.position),this.rotation.order=it.rotation.order,this.quaternion.copy(it.quaternion),this.scale.copy(it.scale),this.matrix.copy(it.matrix),this.matrixWorld.copy(it.matrixWorld),this.matrixAutoUpdate=it.matrixAutoUpdate,this.matrixWorldNeedsUpdate=it.matrixWorldNeedsUpdate,this.layers.mask=it.layers.mask,this.visible=it.visible,this.castShadow=it.castShadow,this.receiveShadow=it.receiveShadow,this.frustumCulled=it.frustumCulled,this.renderOrder=it.renderOrder,this.userData=JSON.parse(JSON.stringify(it.userData)),lt===!0)for(let pt=0;pt<it.children.length;pt++){const _t=it.children[pt];this.add(_t.clone())}return this}}rn.DefaultUp=new Ot(0,1,0),rn.DefaultMatrixAutoUpdate=!0,rn.prototype.isObject3D=!0;const es=new Ot,Gs=new Ot,Ro=new Ot,ru=new Ot,du=new Ot,Iu=new Ot,Sl=new Ot,Ko=new Ot,Fl=new Ot,gl=new Ot;class Gu{constructor(it=new Ot,lt=new Ot,pt=new Ot){this.a=it,this.b=lt,this.c=pt}static getNormal(it,lt,pt,_t){_t.subVectors(pt,lt),es.subVectors(it,lt),_t.cross(es);const Dt=_t.lengthSq();return Dt>0?_t.multiplyScalar(1/Math.sqrt(Dt)):_t.set(0,0,0)}static getBarycoord(it,lt,pt,_t,Dt){es.subVectors(_t,lt),Gs.subVectors(pt,lt),Ro.subVectors(it,lt);const Lt=es.dot(es),$t=es.dot(Gs),Xt=es.dot(Ro),Yt=Gs.dot(Gs),Zt=Gs.dot(Ro),lr=Lt*Yt-$t*$t;if(lr===0)return Dt.set(-2,-1,-1);const xr=1/lr,wr=(Yt*Xt-$t*Zt)*xr,Ir=(Lt*Zt-$t*Xt)*xr;return Dt.set(1-wr-Ir,Ir,wr)}static containsPoint(it,lt,pt,_t){return this.getBarycoord(it,lt,pt,_t,ru),ru.x>=0&&ru.y>=0&&ru.x+ru.y<=1}static getUV(it,lt,pt,_t,Dt,Lt,$t,Xt){return this.getBarycoord(it,lt,pt,_t,ru),Xt.set(0,0),Xt.addScaledVector(Dt,ru.x),Xt.addScaledVector(Lt,ru.y),Xt.addScaledVector($t,ru.z),Xt}static isFrontFacing(it,lt,pt,_t){return es.subVectors(pt,lt),Gs.subVectors(it,lt),es.cross(Gs).dot(_t)<0}set(it,lt,pt){return this.a.copy(it),this.b.copy(lt),this.c.copy(pt),this}setFromPointsAndIndices(it,lt,pt,_t){return this.a.copy(it[lt]),this.b.copy(it[pt]),this.c.copy(it[_t]),this}clone(){return new this.constructor().copy(this)}copy(it){return this.a.copy(it.a),this.b.copy(it.b),this.c.copy(it.c),this}getArea(){return es.subVectors(this.c,this.b),Gs.subVectors(this.a,this.b),.5*es.cross(Gs).length()}getMidpoint(it){return it.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(it){return Gu.getNormal(this.a,this.b,this.c,it)}getPlane(it){return it.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(it,lt){return Gu.getBarycoord(it,this.a,this.b,this.c,lt)}getUV(it,lt,pt,_t,Dt){return Gu.getUV(it,this.a,this.b,this.c,lt,pt,_t,Dt)}containsPoint(it){return Gu.containsPoint(it,this.a,this.b,this.c)}isFrontFacing(it){return Gu.isFrontFacing(this.a,this.b,this.c,it)}intersectsBox(it){return it.intersectsTriangle(this)}closestPointToPoint(it,lt){const pt=this.a,_t=this.b,Dt=this.c;let Lt,$t;du.subVectors(_t,pt),Iu.subVectors(Dt,pt),Ko.subVectors(it,pt);const Xt=du.dot(Ko),Yt=Iu.dot(Ko);if(Xt<=0&&Yt<=0)return lt.copy(pt);Fl.subVectors(it,_t);const Zt=du.dot(Fl),lr=Iu.dot(Fl);if(Zt>=0&&lr<=Zt)return lt.copy(_t);const xr=Xt*lr-Zt*Yt;if(xr<=0&&Xt>=0&&Zt<=0)return Lt=Xt/(Xt-Zt),lt.copy(pt).addScaledVector(du,Lt);gl.subVectors(it,Dt);const wr=du.dot(gl),Ir=Iu.dot(gl);if(Ir>=0&&wr<=Ir)return lt.copy(Dt);const kr=wr*Yt-Xt*Ir;if(kr<=0&&Yt>=0&&Ir<=0)return $t=Yt/(Yt-Ir),lt.copy(pt).addScaledVector(Iu,$t);const Lr=Zt*Ir-wr*lr;if(Lr<=0&&lr-Zt>=0&&wr-Ir>=0)return Sl.subVectors(Dt,_t),$t=(lr-Zt)/(lr-Zt+(wr-Ir)),lt.copy(_t).addScaledVector(Sl,$t);const Xr=1/(Lr+kr+xr);return Lt=kr*Xr,$t=xr*Xr,lt.copy(pt).addScaledVector(du,Lt).addScaledVector(Iu,$t)}equals(it){return it.a.equals(this.a)&&it.b.equals(this.b)&&it.c.equals(this.c)}}let Lu=0;class Ku extends dt{constructor(){super(),Object.defineProperty(this,"id",{value:Lu++}),this.uuid=bt(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(it){if(it!==void 0)for(const lt in it){const pt=it[lt];if(pt===void 0){console.warn("THREE.Material: '"+lt+"' parameter is undefined.");continue}if(lt==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=pt===1;continue}const _t=this[lt];_t!==void 0?_t&&_t.isColor?_t.set(pt):_t&&_t.isVector3&&pt&&pt.isVector3?_t.copy(pt):this[lt]=pt:console.warn("THREE."+this.type+": '"+lt+"' is not a property of this material.")}}toJSON(it){const lt=it===void 0||typeof it=="string";lt&&(it={textures:{},images:{}});const pt={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function _t(Dt){const Lt=[];for(const $t in Dt){const Xt=Dt[$t];delete Xt.metadata,Lt.push(Xt)}return Lt}if(pt.uuid=this.uuid,pt.type=this.type,this.name!==""&&(pt.name=this.name),this.color&&this.color.isColor&&(pt.color=this.color.getHex()),this.roughness!==void 0&&(pt.roughness=this.roughness),this.metalness!==void 0&&(pt.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(pt.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(pt.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(pt.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(pt.specular=this.specular.getHex()),this.shininess!==void 0&&(pt.shininess=this.shininess),this.clearcoat!==void 0&&(pt.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(pt.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(pt.clearcoatMap=this.clearcoatMap.toJSON(it).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(pt.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(it).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(pt.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(it).uuid,pt.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(pt.map=this.map.toJSON(it).uuid),this.matcap&&this.matcap.isTexture&&(pt.matcap=this.matcap.toJSON(it).uuid),this.alphaMap&&this.alphaMap.isTexture&&(pt.alphaMap=this.alphaMap.toJSON(it).uuid),this.lightMap&&this.lightMap.isTexture&&(pt.lightMap=this.lightMap.toJSON(it).uuid,pt.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(pt.aoMap=this.aoMap.toJSON(it).uuid,pt.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(pt.bumpMap=this.bumpMap.toJSON(it).uuid,pt.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(pt.normalMap=this.normalMap.toJSON(it).uuid,pt.normalMapType=this.normalMapType,pt.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(pt.displacementMap=this.displacementMap.toJSON(it).uuid,pt.displacementScale=this.displacementScale,pt.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(pt.roughnessMap=this.roughnessMap.toJSON(it).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(pt.metalnessMap=this.metalnessMap.toJSON(it).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(pt.emissiveMap=this.emissiveMap.toJSON(it).uuid),this.specularMap&&this.specularMap.isTexture&&(pt.specularMap=this.specularMap.toJSON(it).uuid),this.envMap&&this.envMap.isTexture&&(pt.envMap=this.envMap.toJSON(it).uuid,this.combine!==void 0&&(pt.combine=this.combine)),this.envMapIntensity!==void 0&&(pt.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(pt.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(pt.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(pt.gradientMap=this.gradientMap.toJSON(it).uuid),this.transmission!==void 0&&(pt.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(pt.transmissionMap=this.transmissionMap.toJSON(it).uuid),this.thickness!==void 0&&(pt.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(pt.thicknessMap=this.thicknessMap.toJSON(it).uuid),this.attenuationDistance!==void 0&&(pt.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(pt.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(pt.size=this.size),this.shadowSide!==null&&(pt.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(pt.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(pt.blending=this.blending),this.side!==0&&(pt.side=this.side),this.vertexColors&&(pt.vertexColors=!0),this.opacity<1&&(pt.opacity=this.opacity),this.transparent===!0&&(pt.transparent=this.transparent),pt.depthFunc=this.depthFunc,pt.depthTest=this.depthTest,pt.depthWrite=this.depthWrite,pt.colorWrite=this.colorWrite,pt.stencilWrite=this.stencilWrite,pt.stencilWriteMask=this.stencilWriteMask,pt.stencilFunc=this.stencilFunc,pt.stencilRef=this.stencilRef,pt.stencilFuncMask=this.stencilFuncMask,pt.stencilFail=this.stencilFail,pt.stencilZFail=this.stencilZFail,pt.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(pt.rotation=this.rotation),this.polygonOffset===!0&&(pt.polygonOffset=!0),this.polygonOffsetFactor!==0&&(pt.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(pt.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(pt.linewidth=this.linewidth),this.dashSize!==void 0&&(pt.dashSize=this.dashSize),this.gapSize!==void 0&&(pt.gapSize=this.gapSize),this.scale!==void 0&&(pt.scale=this.scale),this.dithering===!0&&(pt.dithering=!0),this.alphaTest>0&&(pt.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(pt.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(pt.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(pt.wireframe=this.wireframe),this.wireframeLinewidth>1&&(pt.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(pt.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(pt.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(pt.morphTargets=!0),this.morphNormals===!0&&(pt.morphNormals=!0),this.flatShading===!0&&(pt.flatShading=this.flatShading),this.visible===!1&&(pt.visible=!1),this.toneMapped===!1&&(pt.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(pt.userData=this.userData),lt){const Dt=_t(it.textures),Lt=_t(it.images);Dt.length>0&&(pt.textures=Dt),Lt.length>0&&(pt.images=Lt)}return pt}clone(){return new this.constructor().copy(this)}copy(it){this.name=it.name,this.fog=it.fog,this.blending=it.blending,this.side=it.side,this.vertexColors=it.vertexColors,this.opacity=it.opacity,this.transparent=it.transparent,this.blendSrc=it.blendSrc,this.blendDst=it.blendDst,this.blendEquation=it.blendEquation,this.blendSrcAlpha=it.blendSrcAlpha,this.blendDstAlpha=it.blendDstAlpha,this.blendEquationAlpha=it.blendEquationAlpha,this.depthFunc=it.depthFunc,this.depthTest=it.depthTest,this.depthWrite=it.depthWrite,this.stencilWriteMask=it.stencilWriteMask,this.stencilFunc=it.stencilFunc,this.stencilRef=it.stencilRef,this.stencilFuncMask=it.stencilFuncMask,this.stencilFail=it.stencilFail,this.stencilZFail=it.stencilZFail,this.stencilZPass=it.stencilZPass,this.stencilWrite=it.stencilWrite;const lt=it.clippingPlanes;let pt=null;if(lt!==null){const _t=lt.length;pt=new Array(_t);for(let Dt=0;Dt!==_t;++Dt)pt[Dt]=lt[Dt].clone()}return this.clippingPlanes=pt,this.clipIntersection=it.clipIntersection,this.clipShadows=it.clipShadows,this.shadowSide=it.shadowSide,this.colorWrite=it.colorWrite,this.precision=it.precision,this.polygonOffset=it.polygonOffset,this.polygonOffsetFactor=it.polygonOffsetFactor,this.polygonOffsetUnits=it.polygonOffsetUnits,this.dithering=it.dithering,this.alphaTest=it.alphaTest,this.alphaToCoverage=it.alphaToCoverage,this.premultipliedAlpha=it.premultipliedAlpha,this.visible=it.visible,this.toneMapped=it.toneMapped,this.userData=JSON.parse(JSON.stringify(it.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(it){it===!0&&this.version++}}Ku.prototype.isMaterial=!0;const uu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},en={h:0,s:0,l:0},Jr={h:0,s:0,l:0};function vn(vt,it,lt){return lt<0&&(lt+=1),lt>1&&(lt-=1),lt<1/6?vt+6*(it-vt)*lt:lt<.5?it:lt<2/3?vt+6*(it-vt)*(2/3-lt):vt}function fn(vt){return vt<.04045?.0773993808*vt:Math.pow(.9478672986*vt+.0521327014,2.4)}function gn(vt){return vt<.0031308?12.92*vt:1.055*Math.pow(vt,.41666)-.055}class mn{constructor(it,lt,pt){return lt===void 0&&pt===void 0?this.set(it):this.setRGB(it,lt,pt)}set(it){return it&&it.isColor?this.copy(it):typeof it=="number"?this.setHex(it):typeof it=="string"&&this.setStyle(it),this}setScalar(it){return this.r=it,this.g=it,this.b=it,this}setHex(it){return it=Math.floor(it),this.r=(it>>16&255)/255,this.g=(it>>8&255)/255,this.b=(255&it)/255,this}setRGB(it,lt,pt){return this.r=it,this.g=lt,this.b=pt,this}setHSL(it,lt,pt){if(it=Et(it,1),lt=St(lt,0,1),pt=St(pt,0,1),lt===0)this.r=this.g=this.b=pt;else{const _t=pt<=.5?pt*(1+lt):pt+lt-pt*lt,Dt=2*pt-_t;this.r=vn(Dt,_t,it+1/3),this.g=vn(Dt,_t,it),this.b=vn(Dt,_t,it-1/3)}return this}setStyle(it){function lt(_t){_t!==void 0&&parseFloat(_t)<1&&console.warn("THREE.Color: Alpha component of "+it+" will be ignored.")}let pt;if(pt=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(it)){let _t;const Dt=pt[1],Lt=pt[2];switch(Dt){case"rgb":case"rgba":if(_t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Lt))return this.r=Math.min(255,parseInt(_t[1],10))/255,this.g=Math.min(255,parseInt(_t[2],10))/255,this.b=Math.min(255,parseInt(_t[3],10))/255,lt(_t[4]),this;if(_t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Lt))return this.r=Math.min(100,parseInt(_t[1],10))/100,this.g=Math.min(100,parseInt(_t[2],10))/100,this.b=Math.min(100,parseInt(_t[3],10))/100,lt(_t[4]),this;break;case"hsl":case"hsla":if(_t=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(Lt)){const $t=parseFloat(_t[1])/360,Xt=parseInt(_t[2],10)/100,Yt=parseInt(_t[3],10)/100;return lt(_t[4]),this.setHSL($t,Xt,Yt)}}}else if(pt=/^\#([A-Fa-f\d]+)$/.exec(it)){const _t=pt[1],Dt=_t.length;if(Dt===3)return this.r=parseInt(_t.charAt(0)+_t.charAt(0),16)/255,this.g=parseInt(_t.charAt(1)+_t.charAt(1),16)/255,this.b=parseInt(_t.charAt(2)+_t.charAt(2),16)/255,this;if(Dt===6)return this.r=parseInt(_t.charAt(0)+_t.charAt(1),16)/255,this.g=parseInt(_t.charAt(2)+_t.charAt(3),16)/255,this.b=parseInt(_t.charAt(4)+_t.charAt(5),16)/255,this}return it&&it.length>0?this.setColorName(it):this}setColorName(it){const lt=uu[it.toLowerCase()];return lt!==void 0?this.setHex(lt):console.warn("THREE.Color: Unknown color "+it),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(it){return this.r=it.r,this.g=it.g,this.b=it.b,this}copyGammaToLinear(it,lt=2){return this.r=Math.pow(it.r,lt),this.g=Math.pow(it.g,lt),this.b=Math.pow(it.b,lt),this}copyLinearToGamma(it,lt=2){const pt=lt>0?1/lt:1;return this.r=Math.pow(it.r,pt),this.g=Math.pow(it.g,pt),this.b=Math.pow(it.b,pt),this}convertGammaToLinear(it){return this.copyGammaToLinear(this,it),this}convertLinearToGamma(it){return this.copyLinearToGamma(this,it),this}copySRGBToLinear(it){return this.r=fn(it.r),this.g=fn(it.g),this.b=fn(it.b),this}copyLinearToSRGB(it){return this.r=gn(it.r),this.g=gn(it.g),this.b=gn(it.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(it){const lt=this.r,pt=this.g,_t=this.b,Dt=Math.max(lt,pt,_t),Lt=Math.min(lt,pt,_t);let $t,Xt;const Yt=(Lt+Dt)/2;if(Lt===Dt)$t=0,Xt=0;else{const Zt=Dt-Lt;switch(Xt=Yt<=.5?Zt/(Dt+Lt):Zt/(2-Dt-Lt),Dt){case lt:$t=(pt-_t)/Zt+(pt<_t?6:0);break;case pt:$t=(_t-lt)/Zt+2;break;case _t:$t=(lt-pt)/Zt+4}$t/=6}return it.h=$t,it.s=Xt,it.l=Yt,it}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(it,lt,pt){return this.getHSL(en),en.h+=it,en.s+=lt,en.l+=pt,this.setHSL(en.h,en.s,en.l),this}add(it){return this.r+=it.r,this.g+=it.g,this.b+=it.b,this}addColors(it,lt){return this.r=it.r+lt.r,this.g=it.g+lt.g,this.b=it.b+lt.b,this}addScalar(it){return this.r+=it,this.g+=it,this.b+=it,this}sub(it){return this.r=Math.max(0,this.r-it.r),this.g=Math.max(0,this.g-it.g),this.b=Math.max(0,this.b-it.b),this}multiply(it){return this.r*=it.r,this.g*=it.g,this.b*=it.b,this}multiplyScalar(it){return this.r*=it,this.g*=it,this.b*=it,this}lerp(it,lt){return this.r+=(it.r-this.r)*lt,this.g+=(it.g-this.g)*lt,this.b+=(it.b-this.b)*lt,this}lerpColors(it,lt,pt){return this.r=it.r+(lt.r-it.r)*pt,this.g=it.g+(lt.g-it.g)*pt,this.b=it.b+(lt.b-it.b)*pt,this}lerpHSL(it,lt){this.getHSL(en),it.getHSL(Jr);const pt=Ct(en.h,Jr.h,lt),_t=Ct(en.s,Jr.s,lt),Dt=Ct(en.l,Jr.l,lt);return this.setHSL(pt,_t,Dt),this}equals(it){return it.r===this.r&&it.g===this.g&&it.b===this.b}fromArray(it,lt=0){return this.r=it[lt],this.g=it[lt+1],this.b=it[lt+2],this}toArray(it=[],lt=0){return it[lt]=this.r,it[lt+1]=this.g,it[lt+2]=this.b,it}fromBufferAttribute(it,lt){return this.r=it.getX(lt),this.g=it.getY(lt),this.b=it.getZ(lt),it.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}mn.NAMES=uu,mn.prototype.isColor=!0,mn.prototype.r=1,mn.prototype.g=1,mn.prototype.b=1;class ss extends Ku{constructor(it){super(),this.type="MeshBasicMaterial",this.color=new mn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.map=it.map,this.lightMap=it.lightMap,this.lightMapIntensity=it.lightMapIntensity,this.aoMap=it.aoMap,this.aoMapIntensity=it.aoMapIntensity,this.specularMap=it.specularMap,this.alphaMap=it.alphaMap,this.envMap=it.envMap,this.combine=it.combine,this.reflectivity=it.reflectivity,this.refractionRatio=it.refractionRatio,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.wireframeLinecap=it.wireframeLinecap,this.wireframeLinejoin=it.wireframeLinejoin,this.morphTargets=it.morphTargets,this}}ss.prototype.isMeshBasicMaterial=!0;const ga=new Ot,Ns=new wt;class vs{constructor(it,lt,pt){if(Array.isArray(it))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=it,this.itemSize=lt,this.count=it!==void 0?it.length/lt:0,this.normalized=pt===!0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(it){it===!0&&this.version++}setUsage(it){return this.usage=it,this}copy(it){return this.name=it.name,this.array=new it.array.constructor(it.array),this.itemSize=it.itemSize,this.count=it.count,this.normalized=it.normalized,this.usage=it.usage,this}copyAt(it,lt,pt){it*=this.itemSize,pt*=lt.itemSize;for(let _t=0,Dt=this.itemSize;_t<Dt;_t++)this.array[it+_t]=lt.array[pt+_t];return this}copyArray(it){return this.array.set(it),this}copyColorsArray(it){const lt=this.array;let pt=0;for(let _t=0,Dt=it.length;_t<Dt;_t++){let Lt=it[_t];Lt===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",_t),Lt=new mn),lt[pt++]=Lt.r,lt[pt++]=Lt.g,lt[pt++]=Lt.b}return this}copyVector2sArray(it){const lt=this.array;let pt=0;for(let _t=0,Dt=it.length;_t<Dt;_t++){let Lt=it[_t];Lt===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",_t),Lt=new wt),lt[pt++]=Lt.x,lt[pt++]=Lt.y}return this}copyVector3sArray(it){const lt=this.array;let pt=0;for(let _t=0,Dt=it.length;_t<Dt;_t++){let Lt=it[_t];Lt===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",_t),Lt=new Ot),lt[pt++]=Lt.x,lt[pt++]=Lt.y,lt[pt++]=Lt.z}return this}copyVector4sArray(it){const lt=this.array;let pt=0;for(let _t=0,Dt=it.length;_t<Dt;_t++){let Lt=it[_t];Lt===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",_t),Lt=new Vt),lt[pt++]=Lt.x,lt[pt++]=Lt.y,lt[pt++]=Lt.z,lt[pt++]=Lt.w}return this}applyMatrix3(it){if(this.itemSize===2)for(let lt=0,pt=this.count;lt<pt;lt++)Ns.fromBufferAttribute(this,lt),Ns.applyMatrix3(it),this.setXY(lt,Ns.x,Ns.y);else if(this.itemSize===3)for(let lt=0,pt=this.count;lt<pt;lt++)ga.fromBufferAttribute(this,lt),ga.applyMatrix3(it),this.setXYZ(lt,ga.x,ga.y,ga.z);return this}applyMatrix4(it){for(let lt=0,pt=this.count;lt<pt;lt++)ga.x=this.getX(lt),ga.y=this.getY(lt),ga.z=this.getZ(lt),ga.applyMatrix4(it),this.setXYZ(lt,ga.x,ga.y,ga.z);return this}applyNormalMatrix(it){for(let lt=0,pt=this.count;lt<pt;lt++)ga.x=this.getX(lt),ga.y=this.getY(lt),ga.z=this.getZ(lt),ga.applyNormalMatrix(it),this.setXYZ(lt,ga.x,ga.y,ga.z);return this}transformDirection(it){for(let lt=0,pt=this.count;lt<pt;lt++)ga.x=this.getX(lt),ga.y=this.getY(lt),ga.z=this.getZ(lt),ga.transformDirection(it),this.setXYZ(lt,ga.x,ga.y,ga.z);return this}set(it,lt=0){return this.array.set(it,lt),this}getX(it){return this.array[it*this.itemSize]}setX(it,lt){return this.array[it*this.itemSize]=lt,this}getY(it){return this.array[it*this.itemSize+1]}setY(it,lt){return this.array[it*this.itemSize+1]=lt,this}getZ(it){return this.array[it*this.itemSize+2]}setZ(it,lt){return this.array[it*this.itemSize+2]=lt,this}getW(it){return this.array[it*this.itemSize+3]}setW(it,lt){return this.array[it*this.itemSize+3]=lt,this}setXY(it,lt,pt){return it*=this.itemSize,this.array[it+0]=lt,this.array[it+1]=pt,this}setXYZ(it,lt,pt,_t){return it*=this.itemSize,this.array[it+0]=lt,this.array[it+1]=pt,this.array[it+2]=_t,this}setXYZW(it,lt,pt,_t,Dt){return it*=this.itemSize,this.array[it+0]=lt,this.array[it+1]=pt,this.array[it+2]=_t,this.array[it+3]=Dt,this}onUpload(it){return this.onUploadCallback=it,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const it={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return this.name!==""&&(it.name=this.name),this.usage!==35044&&(it.usage=this.usage),this.updateRange.offset===0&&this.updateRange.count===-1||(it.updateRange=this.updateRange),it}}vs.prototype.isBufferAttribute=!0;class Xs extends vs{constructor(it,lt,pt){super(new Uint16Array(it),lt,pt)}}class co extends vs{constructor(it,lt,pt){super(new Int32Array(it),lt,pt)}}class ls extends vs{constructor(it,lt,pt){super(new Uint32Array(it),lt,pt)}}(class extends vs{constructor(vt,it,lt){super(new Uint16Array(vt),it,lt)}}).prototype.isFloat16BufferAttribute=!0;class Mo extends vs{constructor(it,lt,pt){super(new Float32Array(it),lt,pt)}}function Nu(vt){if(vt.length===0)return-1/0;let it=vt[0];for(let lt=1,pt=vt.length;lt<pt;++lt)vt[lt]>it&&(it=vt[lt]);return it}let Ou=0;const $u=new Nn,Hu=new rn,kl=new Ot,Uu=new tr,tl=new tr,rl=new Ot;class Wu extends dt{constructor(){super(),Object.defineProperty(this,"id",{value:Ou++}),this.uuid=bt(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(it){return Array.isArray(it)?this.index=new(Nu(it)>65535?ls:Xs)(it,1):this.index=it,this}getAttribute(it){return this.attributes[it]}setAttribute(it,lt){return this.attributes[it]=lt,this}deleteAttribute(it){return delete this.attributes[it],this}hasAttribute(it){return this.attributes[it]!==void 0}addGroup(it,lt,pt=0){this.groups.push({start:it,count:lt,materialIndex:pt})}clearGroups(){this.groups=[]}setDrawRange(it,lt){this.drawRange.start=it,this.drawRange.count=lt}applyMatrix4(it){const lt=this.attributes.position;lt!==void 0&&(lt.applyMatrix4(it),lt.needsUpdate=!0);const pt=this.attributes.normal;if(pt!==void 0){const Dt=new At().getNormalMatrix(it);pt.applyNormalMatrix(Dt),pt.needsUpdate=!0}const _t=this.attributes.tangent;return _t!==void 0&&(_t.transformDirection(it),_t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(it){return $u.makeRotationFromQuaternion(it),this.applyMatrix4($u),this}rotateX(it){return $u.makeRotationX(it),this.applyMatrix4($u),this}rotateY(it){return $u.makeRotationY(it),this.applyMatrix4($u),this}rotateZ(it){return $u.makeRotationZ(it),this.applyMatrix4($u),this}translate(it,lt,pt){return $u.makeTranslation(it,lt,pt),this.applyMatrix4($u),this}scale(it,lt,pt){return $u.makeScale(it,lt,pt),this.applyMatrix4($u),this}lookAt(it){return Hu.lookAt(it),Hu.updateMatrix(),this.applyMatrix4(Hu.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(kl).negate(),this.translate(kl.x,kl.y,kl.z),this}setFromPoints(it){const lt=[];for(let pt=0,_t=it.length;pt<_t;pt++){const Dt=it[pt];lt.push(Dt.x,Dt.y,Dt.z||0)}return this.setAttribute("position",new Mo(lt,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new tr);const it=this.attributes.position,lt=this.morphAttributes.position;if(it&&it.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new Ot(-1/0,-1/0,-1/0),new Ot(1/0,1/0,1/0));if(it!==void 0){if(this.boundingBox.setFromBufferAttribute(it),lt)for(let pt=0,_t=lt.length;pt<_t;pt++){const Dt=lt[pt];Uu.setFromBufferAttribute(Dt),this.morphTargetsRelative?(rl.addVectors(this.boundingBox.min,Uu.min),this.boundingBox.expandByPoint(rl),rl.addVectors(this.boundingBox.max,Uu.max),this.boundingBox.expandByPoint(rl)):(this.boundingBox.expandByPoint(Uu.min),this.boundingBox.expandByPoint(Uu.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Hn);const it=this.attributes.position,lt=this.morphAttributes.position;if(it&&it.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new Ot,1/0);if(it){const pt=this.boundingSphere.center;if(Uu.setFromBufferAttribute(it),lt)for(let Dt=0,Lt=lt.length;Dt<Lt;Dt++){const $t=lt[Dt];tl.setFromBufferAttribute($t),this.morphTargetsRelative?(rl.addVectors(Uu.min,tl.min),Uu.expandByPoint(rl),rl.addVectors(Uu.max,tl.max),Uu.expandByPoint(rl)):(Uu.expandByPoint(tl.min),Uu.expandByPoint(tl.max))}Uu.getCenter(pt);let _t=0;for(let Dt=0,Lt=it.count;Dt<Lt;Dt++)rl.fromBufferAttribute(it,Dt),_t=Math.max(_t,pt.distanceToSquared(rl));if(lt)for(let Dt=0,Lt=lt.length;Dt<Lt;Dt++){const $t=lt[Dt],Xt=this.morphTargetsRelative;for(let Yt=0,Zt=$t.count;Yt<Zt;Yt++)rl.fromBufferAttribute($t,Yt),Xt&&(kl.fromBufferAttribute(it,Yt),rl.add(kl)),_t=Math.max(_t,pt.distanceToSquared(rl))}this.boundingSphere.radius=Math.sqrt(_t),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const it=this.index,lt=this.attributes;if(it===null||lt.position===void 0||lt.normal===void 0||lt.uv===void 0)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const pt=it.array,_t=lt.position.array,Dt=lt.normal.array,Lt=lt.uv.array,$t=_t.length/3;lt.tangent===void 0&&this.setAttribute("tangent",new vs(new Float32Array(4*$t),4));const Xt=lt.tangent.array,Yt=[],Zt=[];for(let Cs=0;Cs<$t;Cs++)Yt[Cs]=new Ot,Zt[Cs]=new Ot;const lr=new Ot,xr=new Ot,wr=new Ot,Ir=new wt,kr=new wt,Lr=new wt,Xr=new Ot,_n=new Ot;function On(Cs,gs,_s){lr.fromArray(_t,3*Cs),xr.fromArray(_t,3*gs),wr.fromArray(_t,3*_s),Ir.fromArray(Lt,2*Cs),kr.fromArray(Lt,2*gs),Lr.fromArray(Lt,2*_s),xr.sub(lr),wr.sub(lr),kr.sub(Ir),Lr.sub(Ir);const Ts=1/(kr.x*Lr.y-Lr.x*kr.y);isFinite(Ts)&&(Xr.copy(xr).multiplyScalar(Lr.y).addScaledVector(wr,-kr.y).multiplyScalar(Ts),_n.copy(wr).multiplyScalar(kr.x).addScaledVector(xr,-Lr.x).multiplyScalar(Ts),Yt[Cs].add(Xr),Yt[gs].add(Xr),Yt[_s].add(Xr),Zt[Cs].add(_n),Zt[gs].add(_n),Zt[_s].add(_n))}let Kn=this.groups;Kn.length===0&&(Kn=[{start:0,count:pt.length}]);for(let Cs=0,gs=Kn.length;Cs<gs;++Cs){const _s=Kn[Cs],Ts=_s.start;for(let ws=Ts,oo=Ts+_s.count;ws<oo;ws+=3)On(pt[ws+0],pt[ws+1],pt[ws+2])}const Mn=new Ot,ca=new Ot,Gn=new Ot,Qn=new Ot;function ks(Cs){Gn.fromArray(Dt,3*Cs),Qn.copy(Gn);const gs=Yt[Cs];Mn.copy(gs),Mn.sub(Gn.multiplyScalar(Gn.dot(gs))).normalize(),ca.crossVectors(Qn,gs);const _s=ca.dot(Zt[Cs])<0?-1:1;Xt[4*Cs]=Mn.x,Xt[4*Cs+1]=Mn.y,Xt[4*Cs+2]=Mn.z,Xt[4*Cs+3]=_s}for(let Cs=0,gs=Kn.length;Cs<gs;++Cs){const _s=Kn[Cs],Ts=_s.start;for(let ws=Ts,oo=Ts+_s.count;ws<oo;ws+=3)ks(pt[ws+0]),ks(pt[ws+1]),ks(pt[ws+2])}}computeVertexNormals(){const it=this.index,lt=this.getAttribute("position");if(lt!==void 0){let pt=this.getAttribute("normal");if(pt===void 0)pt=new vs(new Float32Array(3*lt.count),3),this.setAttribute("normal",pt);else for(let xr=0,wr=pt.count;xr<wr;xr++)pt.setXYZ(xr,0,0,0);const _t=new Ot,Dt=new Ot,Lt=new Ot,$t=new Ot,Xt=new Ot,Yt=new Ot,Zt=new Ot,lr=new Ot;if(it)for(let xr=0,wr=it.count;xr<wr;xr+=3){const Ir=it.getX(xr+0),kr=it.getX(xr+1),Lr=it.getX(xr+2);_t.fromBufferAttribute(lt,Ir),Dt.fromBufferAttribute(lt,kr),Lt.fromBufferAttribute(lt,Lr),Zt.subVectors(Lt,Dt),lr.subVectors(_t,Dt),Zt.cross(lr),$t.fromBufferAttribute(pt,Ir),Xt.fromBufferAttribute(pt,kr),Yt.fromBufferAttribute(pt,Lr),$t.add(Zt),Xt.add(Zt),Yt.add(Zt),pt.setXYZ(Ir,$t.x,$t.y,$t.z),pt.setXYZ(kr,Xt.x,Xt.y,Xt.z),pt.setXYZ(Lr,Yt.x,Yt.y,Yt.z)}else for(let xr=0,wr=lt.count;xr<wr;xr+=3)_t.fromBufferAttribute(lt,xr+0),Dt.fromBufferAttribute(lt,xr+1),Lt.fromBufferAttribute(lt,xr+2),Zt.subVectors(Lt,Dt),lr.subVectors(_t,Dt),Zt.cross(lr),pt.setXYZ(xr+0,Zt.x,Zt.y,Zt.z),pt.setXYZ(xr+1,Zt.x,Zt.y,Zt.z),pt.setXYZ(xr+2,Zt.x,Zt.y,Zt.z);this.normalizeNormals(),pt.needsUpdate=!0}}merge(it,lt){if(!it||!it.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",it);lt===void 0&&(lt=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const pt=this.attributes;for(const _t in pt){if(it.attributes[_t]===void 0)continue;const Dt=pt[_t].array,Lt=it.attributes[_t],$t=Lt.array,Xt=Lt.itemSize*lt,Yt=Math.min($t.length,Dt.length-Xt);for(let Zt=0,lr=Xt;Zt<Yt;Zt++,lr++)Dt[lr]=$t[Zt]}return this}normalizeNormals(){const it=this.attributes.normal;for(let lt=0,pt=it.count;lt<pt;lt++)rl.fromBufferAttribute(it,lt),rl.normalize(),it.setXYZ(lt,rl.x,rl.y,rl.z)}toNonIndexed(){function it($t,Xt){const Yt=$t.array,Zt=$t.itemSize,lr=$t.normalized,xr=new Yt.constructor(Xt.length*Zt);let wr=0,Ir=0;for(let kr=0,Lr=Xt.length;kr<Lr;kr++){wr=$t.isInterleavedBufferAttribute?Xt[kr]*$t.data.stride+$t.offset:Xt[kr]*Zt;for(let Xr=0;Xr<Zt;Xr++)xr[Ir++]=Yt[wr++]}return new vs(xr,Zt,lr)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const lt=new Wu,pt=this.index.array,_t=this.attributes;for(const $t in _t){const Xt=it(_t[$t],pt);lt.setAttribute($t,Xt)}const Dt=this.morphAttributes;for(const $t in Dt){const Xt=[],Yt=Dt[$t];for(let Zt=0,lr=Yt.length;Zt<lr;Zt++){const xr=it(Yt[Zt],pt);Xt.push(xr)}lt.morphAttributes[$t]=Xt}lt.morphTargetsRelative=this.morphTargetsRelative;const Lt=this.groups;for(let $t=0,Xt=Lt.length;$t<Xt;$t++){const Yt=Lt[$t];lt.addGroup(Yt.start,Yt.count,Yt.materialIndex)}return lt}toJSON(){const it={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(it.uuid=this.uuid,it.type=this.type,this.name!==""&&(it.name=this.name),Object.keys(this.userData).length>0&&(it.userData=this.userData),this.parameters!==void 0){const Xt=this.parameters;for(const Yt in Xt)Xt[Yt]!==void 0&&(it[Yt]=Xt[Yt]);return it}it.data={attributes:{}};const lt=this.index;lt!==null&&(it.data.index={type:lt.array.constructor.name,array:Array.prototype.slice.call(lt.array)});const pt=this.attributes;for(const Xt in pt){const Yt=pt[Xt];it.data.attributes[Xt]=Yt.toJSON(it.data)}const _t={};let Dt=!1;for(const Xt in this.morphAttributes){const Yt=this.morphAttributes[Xt],Zt=[];for(let lr=0,xr=Yt.length;lr<xr;lr++){const wr=Yt[lr];Zt.push(wr.toJSON(it.data))}Zt.length>0&&(_t[Xt]=Zt,Dt=!0)}Dt&&(it.data.morphAttributes=_t,it.data.morphTargetsRelative=this.morphTargetsRelative);const Lt=this.groups;Lt.length>0&&(it.data.groups=JSON.parse(JSON.stringify(Lt)));const $t=this.boundingSphere;return $t!==null&&(it.data.boundingSphere={center:$t.center.toArray(),radius:$t.radius}),it}clone(){return new Wu().copy(this)}copy(it){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const lt={};this.name=it.name;const pt=it.index;pt!==null&&this.setIndex(pt.clone(lt));const _t=it.attributes;for(const Yt in _t){const Zt=_t[Yt];this.setAttribute(Yt,Zt.clone(lt))}const Dt=it.morphAttributes;for(const Yt in Dt){const Zt=[],lr=Dt[Yt];for(let xr=0,wr=lr.length;xr<wr;xr++)Zt.push(lr[xr].clone(lt));this.morphAttributes[Yt]=Zt}this.morphTargetsRelative=it.morphTargetsRelative;const Lt=it.groups;for(let Yt=0,Zt=Lt.length;Yt<Zt;Yt++){const lr=Lt[Yt];this.addGroup(lr.start,lr.count,lr.materialIndex)}const $t=it.boundingBox;$t!==null&&(this.boundingBox=$t.clone());const Xt=it.boundingSphere;return Xt!==null&&(this.boundingSphere=Xt.clone()),this.drawRange.start=it.drawRange.start,this.drawRange.count=it.drawRange.count,this.userData=it.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}Wu.prototype.isBufferGeometry=!0;const tp=new Nn,Al=new Cn,om=new Hn,Op=new Ot,op=new Ot,wl=new Ot,um=new Ot,Im=new Ot,Il=new Ot,sn=new Ot,mr=new Ot,fr=new Ot,yr=new wt,jr=new wt,un=new wt,$n=new Ot,Yn=new Ot;class os extends rn{constructor(it=new Wu,lt=new ss){super(),this.type="Mesh",this.geometry=it,this.material=lt,this.updateMorphTargets()}copy(it){return super.copy(it),it.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=it.morphTargetInfluences.slice()),it.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},it.morphTargetDictionary)),this.material=it.material,this.geometry=it.geometry,this}updateMorphTargets(){const it=this.geometry;if(it.isBufferGeometry){const lt=it.morphAttributes,pt=Object.keys(lt);if(pt.length>0){const _t=lt[pt[0]];if(_t!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Dt=0,Lt=_t.length;Dt<Lt;Dt++){const $t=_t[Dt].name||String(Dt);this.morphTargetInfluences.push(0),this.morphTargetDictionary[$t]=Dt}}}}else{const lt=it.morphTargets;lt!==void 0&&lt.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(it,lt){const pt=this.geometry,_t=this.material,Dt=this.matrixWorld;if(_t===void 0||(pt.boundingSphere===null&&pt.computeBoundingSphere(),om.copy(pt.boundingSphere),om.applyMatrix4(Dt),it.ray.intersectsSphere(om)===!1)||(tp.copy(Dt).invert(),Al.copy(it.ray).applyMatrix4(tp),pt.boundingBox!==null&&Al.intersectsBox(pt.boundingBox)===!1))return;let Lt;if(pt.isBufferGeometry){const $t=pt.index,Xt=pt.attributes.position,Yt=pt.morphAttributes.position,Zt=pt.morphTargetsRelative,lr=pt.attributes.uv,xr=pt.attributes.uv2,wr=pt.groups,Ir=pt.drawRange;if($t!==null)if(Array.isArray(_t))for(let kr=0,Lr=wr.length;kr<Lr;kr++){const Xr=wr[kr],_n=_t[Xr.materialIndex];for(let On=Math.max(Xr.start,Ir.start),Kn=Math.min(Xr.start+Xr.count,Ir.start+Ir.count);On<Kn;On+=3){const Mn=$t.getX(On),ca=$t.getX(On+1),Gn=$t.getX(On+2);Lt=Vs(this,_n,it,Al,Xt,Yt,Zt,lr,xr,Mn,ca,Gn),Lt&&(Lt.faceIndex=Math.floor(On/3),Lt.face.materialIndex=Xr.materialIndex,lt.push(Lt))}}else for(let kr=Math.max(0,Ir.start),Lr=Math.min($t.count,Ir.start+Ir.count);kr<Lr;kr+=3){const Xr=$t.getX(kr),_n=$t.getX(kr+1),On=$t.getX(kr+2);Lt=Vs(this,_t,it,Al,Xt,Yt,Zt,lr,xr,Xr,_n,On),Lt&&(Lt.faceIndex=Math.floor(kr/3),lt.push(Lt))}else if(Xt!==void 0)if(Array.isArray(_t))for(let kr=0,Lr=wr.length;kr<Lr;kr++){const Xr=wr[kr],_n=_t[Xr.materialIndex];for(let On=Math.max(Xr.start,Ir.start),Kn=Math.min(Xr.start+Xr.count,Ir.start+Ir.count);On<Kn;On+=3)Lt=Vs(this,_n,it,Al,Xt,Yt,Zt,lr,xr,On,On+1,On+2),Lt&&(Lt.faceIndex=Math.floor(On/3),Lt.face.materialIndex=Xr.materialIndex,lt.push(Lt))}else for(let kr=Math.max(0,Ir.start),Lr=Math.min(Xt.count,Ir.start+Ir.count);kr<Lr;kr+=3)Lt=Vs(this,_t,it,Al,Xt,Yt,Zt,lr,xr,kr,kr+1,kr+2),Lt&&(Lt.faceIndex=Math.floor(kr/3),lt.push(Lt))}else pt.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Vs(vt,it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr){Op.fromBufferAttribute(_t,Yt),op.fromBufferAttribute(_t,Zt),wl.fromBufferAttribute(_t,lr);const xr=vt.morphTargetInfluences;if(it.morphTargets&&Dt&&xr){sn.set(0,0,0),mr.set(0,0,0),fr.set(0,0,0);for(let Ir=0,kr=Dt.length;Ir<kr;Ir++){const Lr=xr[Ir],Xr=Dt[Ir];Lr!==0&&(um.fromBufferAttribute(Xr,Yt),Im.fromBufferAttribute(Xr,Zt),Il.fromBufferAttribute(Xr,lr),Lt?(sn.addScaledVector(um,Lr),mr.addScaledVector(Im,Lr),fr.addScaledVector(Il,Lr)):(sn.addScaledVector(um.sub(Op),Lr),mr.addScaledVector(Im.sub(op),Lr),fr.addScaledVector(Il.sub(wl),Lr)))}Op.add(sn),op.add(mr),wl.add(fr)}vt.isSkinnedMesh&&(vt.boneTransform(Yt,Op),vt.boneTransform(Zt,op),vt.boneTransform(lr,wl));const wr=(function(Ir,kr,Lr,Xr,_n,On,Kn,Mn){let ca;if(ca=kr.side===1?Xr.intersectTriangle(Kn,On,_n,!0,Mn):Xr.intersectTriangle(_n,On,Kn,kr.side!==2,Mn),ca===null)return null;Yn.copy(Mn),Yn.applyMatrix4(Ir.matrixWorld);const Gn=Lr.ray.origin.distanceTo(Yn);return Gn<Lr.near||Gn>Lr.far?null:{distance:Gn,point:Yn.clone(),object:Ir}})(vt,it,lt,pt,Op,op,wl,$n);if(wr){$t&&(yr.fromBufferAttribute($t,Yt),jr.fromBufferAttribute($t,Zt),un.fromBufferAttribute($t,lr),wr.uv=Gu.getUV($n,Op,op,wl,yr,jr,un,new wt)),Xt&&(yr.fromBufferAttribute(Xt,Yt),jr.fromBufferAttribute(Xt,Zt),un.fromBufferAttribute(Xt,lr),wr.uv2=Gu.getUV($n,Op,op,wl,yr,jr,un,new wt));const Ir={a:Yt,b:Zt,c:lr,normal:new Ot,materialIndex:0};Gu.getNormal(Op,op,wl,Ir.normal),wr.face=Ir}return wr}os.prototype.isMesh=!0;class eo extends Wu{constructor(it=1,lt=1,pt=1,_t=1,Dt=1,Lt=1){super(),this.type="BoxGeometry",this.parameters={width:it,height:lt,depth:pt,widthSegments:_t,heightSegments:Dt,depthSegments:Lt};const $t=this;_t=Math.floor(_t),Dt=Math.floor(Dt),Lt=Math.floor(Lt);const Xt=[],Yt=[],Zt=[],lr=[];let xr=0,wr=0;function Ir(kr,Lr,Xr,_n,On,Kn,Mn,ca,Gn,Qn,ks){const Cs=Kn/Gn,gs=Mn/Qn,_s=Kn/2,Ts=Mn/2,ws=ca/2,oo=Gn+1,no=Qn+1;let js=0,Ws=0;const Co=new Ot;for(let jo=0;jo<no;jo++){const Qo=jo*gs-Ts;for(let xs=0;xs<oo;xs++){const Ms=xs*Cs-_s;Co[kr]=Ms*_n,Co[Lr]=Qo*On,Co[Xr]=ws,Yt.push(Co.x,Co.y,Co.z),Co[kr]=0,Co[Lr]=0,Co[Xr]=ca>0?1:-1,Zt.push(Co.x,Co.y,Co.z),lr.push(xs/Gn),lr.push(1-jo/Qn),js+=1}}for(let jo=0;jo<Qn;jo++)for(let Qo=0;Qo<Gn;Qo++){const xs=xr+Qo+oo*jo,Ms=xr+Qo+oo*(jo+1),Io=xr+(Qo+1)+oo*(jo+1),_o=xr+(Qo+1)+oo*jo;Xt.push(xs,Ms,_o),Xt.push(Ms,Io,_o),Ws+=6}$t.addGroup(wr,Ws,ks),wr+=Ws,xr+=js}Ir("z","y","x",-1,-1,pt,lt,it,Lt,Dt,0),Ir("z","y","x",1,-1,pt,lt,-it,Lt,Dt,1),Ir("x","z","y",1,1,it,pt,lt,_t,Lt,2),Ir("x","z","y",1,-1,it,pt,-lt,_t,Lt,3),Ir("x","y","z",1,-1,it,lt,pt,_t,Dt,4),Ir("x","y","z",-1,-1,it,lt,-pt,_t,Dt,5),this.setIndex(Xt),this.setAttribute("position",new Mo(Yt,3)),this.setAttribute("normal",new Mo(Zt,3)),this.setAttribute("uv",new Mo(lr,2))}static fromJSON(it){return new eo(it.width,it.height,it.depth,it.widthSegments,it.heightSegments,it.depthSegments)}}function qo(vt){const it={};for(const lt in vt){it[lt]={};for(const pt in vt[lt]){const _t=vt[lt][pt];_t&&(_t.isColor||_t.isMatrix3||_t.isMatrix4||_t.isVector2||_t.isVector3||_t.isVector4||_t.isTexture||_t.isQuaternion)?it[lt][pt]=_t.clone():Array.isArray(_t)?it[lt][pt]=_t.slice():it[lt][pt]=_t}}return it}function Po(vt){const it={};for(let lt=0;lt<vt.length;lt++){const pt=qo(vt[lt]);for(const _t in pt)it[_t]=pt[_t]}return it}const su={clone:qo,merge:Po};class mu extends Ku{constructor(it){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,this.fragmentShader=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,it!==void 0&&(it.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(it))}copy(it){return super.copy(it),this.fragmentShader=it.fragmentShader,this.vertexShader=it.vertexShader,this.uniforms=qo(it.uniforms),this.defines=Object.assign({},it.defines),this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.lights=it.lights,this.clipping=it.clipping,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this.extensions=Object.assign({},it.extensions),this.glslVersion=it.glslVersion,this}toJSON(it){const lt=super.toJSON(it);lt.glslVersion=this.glslVersion,lt.uniforms={};for(const _t in this.uniforms){const Dt=this.uniforms[_t].value;Dt&&Dt.isTexture?lt.uniforms[_t]={type:"t",value:Dt.toJSON(it).uuid}:Dt&&Dt.isColor?lt.uniforms[_t]={type:"c",value:Dt.getHex()}:Dt&&Dt.isVector2?lt.uniforms[_t]={type:"v2",value:Dt.toArray()}:Dt&&Dt.isVector3?lt.uniforms[_t]={type:"v3",value:Dt.toArray()}:Dt&&Dt.isVector4?lt.uniforms[_t]={type:"v4",value:Dt.toArray()}:Dt&&Dt.isMatrix3?lt.uniforms[_t]={type:"m3",value:Dt.toArray()}:Dt&&Dt.isMatrix4?lt.uniforms[_t]={type:"m4",value:Dt.toArray()}:lt.uniforms[_t]={value:Dt}}Object.keys(this.defines).length>0&&(lt.defines=this.defines),lt.vertexShader=this.vertexShader,lt.fragmentShader=this.fragmentShader;const pt={};for(const _t in this.extensions)this.extensions[_t]===!0&&(pt[_t]=!0);return Object.keys(pt).length>0&&(lt.extensions=pt),lt}}mu.prototype.isShaderMaterial=!0;class zu extends rn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Nn,this.projectionMatrix=new Nn,this.projectionMatrixInverse=new Nn}copy(it,lt){return super.copy(it,lt),this.matrixWorldInverse.copy(it.matrixWorldInverse),this.projectionMatrix.copy(it.projectionMatrix),this.projectionMatrixInverse.copy(it.projectionMatrixInverse),this}getWorldDirection(it){this.updateWorldMatrix(!0,!1);const lt=this.matrixWorld.elements;return it.set(-lt[8],-lt[9],-lt[10]).normalize()}updateMatrixWorld(it){super.updateMatrixWorld(it),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(it,lt){super.updateWorldMatrix(it,lt),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}zu.prototype.isCamera=!0;class lu extends zu{constructor(it=50,lt=1,pt=.1,_t=2e3){super(),this.type="PerspectiveCamera",this.fov=it,this.zoom=1,this.near=pt,this.far=_t,this.focus=10,this.aspect=lt,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(it,lt){return super.copy(it,lt),this.fov=it.fov,this.zoom=it.zoom,this.near=it.near,this.far=it.far,this.focus=it.focus,this.aspect=it.aspect,this.view=it.view===null?null:Object.assign({},it.view),this.filmGauge=it.filmGauge,this.filmOffset=it.filmOffset,this}setFocalLength(it){const lt=.5*this.getFilmHeight()/it;this.fov=2*mt*Math.atan(lt),this.updateProjectionMatrix()}getFocalLength(){const it=Math.tan(.5*ht*this.fov);return .5*this.getFilmHeight()/it}getEffectiveFOV(){return 2*mt*Math.atan(Math.tan(.5*ht*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(it,lt,pt,_t,Dt,Lt){this.aspect=it/lt,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=it,this.view.fullHeight=lt,this.view.offsetX=pt,this.view.offsetY=_t,this.view.width=Dt,this.view.height=Lt,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const it=this.near;let lt=it*Math.tan(.5*ht*this.fov)/this.zoom,pt=2*lt,_t=this.aspect*pt,Dt=-.5*_t;const Lt=this.view;if(this.view!==null&&this.view.enabled){const Xt=Lt.fullWidth,Yt=Lt.fullHeight;Dt+=Lt.offsetX*_t/Xt,lt-=Lt.offsetY*pt/Yt,_t*=Lt.width/Xt,pt*=Lt.height/Yt}const $t=this.filmOffset;$t!==0&&(Dt+=it*$t/this.getFilmWidth()),this.projectionMatrix.makePerspective(Dt,Dt+_t,lt,lt-pt,it,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(it){const lt=super.toJSON(it);return lt.object.fov=this.fov,lt.object.zoom=this.zoom,lt.object.near=this.near,lt.object.far=this.far,lt.object.focus=this.focus,lt.object.aspect=this.aspect,this.view!==null&&(lt.object.view=Object.assign({},this.view)),lt.object.filmGauge=this.filmGauge,lt.object.filmOffset=this.filmOffset,lt}}lu.prototype.isPerspectiveCamera=!0;class vl extends rn{constructor(it,lt,pt){if(super(),this.type="CubeCamera",pt.isWebGLCubeRenderTarget!==!0)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=pt;const _t=new lu(90,1,it,lt);_t.layers=this.layers,_t.up.set(0,-1,0),_t.lookAt(new Ot(1,0,0)),this.add(_t);const Dt=new lu(90,1,it,lt);Dt.layers=this.layers,Dt.up.set(0,-1,0),Dt.lookAt(new Ot(-1,0,0)),this.add(Dt);const Lt=new lu(90,1,it,lt);Lt.layers=this.layers,Lt.up.set(0,0,1),Lt.lookAt(new Ot(0,1,0)),this.add(Lt);const $t=new lu(90,1,it,lt);$t.layers=this.layers,$t.up.set(0,0,-1),$t.lookAt(new Ot(0,-1,0)),this.add($t);const Xt=new lu(90,1,it,lt);Xt.layers=this.layers,Xt.up.set(0,-1,0),Xt.lookAt(new Ot(0,0,1)),this.add(Xt);const Yt=new lu(90,1,it,lt);Yt.layers=this.layers,Yt.up.set(0,-1,0),Yt.lookAt(new Ot(0,0,-1)),this.add(Yt)}update(it,lt){this.parent===null&&this.updateMatrixWorld();const pt=this.renderTarget,[_t,Dt,Lt,$t,Xt,Yt]=this.children,Zt=it.xr.enabled,lr=it.getRenderTarget();it.xr.enabled=!1;const xr=pt.texture.generateMipmaps;pt.texture.generateMipmaps=!1,it.setRenderTarget(pt,0),it.render(lt,_t),it.setRenderTarget(pt,1),it.render(lt,Dt),it.setRenderTarget(pt,2),it.render(lt,Lt),it.setRenderTarget(pt,3),it.render(lt,$t),it.setRenderTarget(pt,4),it.render(lt,Xt),pt.texture.generateMipmaps=xr,it.setRenderTarget(pt,5),it.render(lt,Yt),it.setRenderTarget(lr),it.xr.enabled=Zt}}class up extends Ft{constructor(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt){super(it=it!==void 0?it:[],lt=lt!==void 0?lt:301,pt,_t,Dt,Lt,$t=$t!==void 0?$t:1022,Xt,Yt,Zt),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(it){this.image=it}}up.prototype.isCubeTexture=!0;class _c extends Kt{constructor(it,lt,pt){Number.isInteger(lt)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),lt=pt),super(it,it,lt),lt=lt||{},this.texture=new up(void 0,lt.mapping,lt.wrapS,lt.wrapT,lt.magFilter,lt.minFilter,lt.format,lt.type,lt.anisotropy,lt.encoding),this.texture.generateMipmaps=lt.generateMipmaps!==void 0&&lt.generateMipmaps,this.texture.minFilter=lt.minFilter!==void 0?lt.minFilter:1006,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(it,lt){this.texture.type=lt.type,this.texture.format=1023,this.texture.encoding=lt.encoding,this.texture.generateMipmaps=lt.generateMipmaps,this.texture.minFilter=lt.minFilter,this.texture.magFilter=lt.magFilter;const pt={uniforms:{tEquirect:{value:null}},vertexShader:`
varying vec3 vWorldDirection;
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}
`,fragmentShader:`
uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
}
`},_t=new eo(5,5,5),Dt=new mu({name:"CubemapFromEquirect",uniforms:qo(pt.uniforms),vertexShader:pt.vertexShader,fragmentShader:pt.fragmentShader,side:1,blending:0});Dt.uniforms.tEquirect.value=lt;const Lt=new os(_t,Dt),$t=lt.minFilter;return lt.minFilter===1008&&(lt.minFilter=1006),new vl(1,10,this).update(it,Lt),lt.minFilter=$t,Lt.geometry.dispose(),Lt.material.dispose(),this}clear(it,lt,pt,_t){const Dt=it.getRenderTarget();for(let Lt=0;Lt<6;Lt++)it.setRenderTarget(this,Lt),it.clear(lt,pt,_t);it.setRenderTarget(Dt)}}_c.prototype.isWebGLCubeRenderTarget=!0;const Bl=new Ot,rp=new Ot,Kp=new At;class lp{constructor(it=new Ot(1,0,0),lt=0){this.normal=it,this.constant=lt}set(it,lt){return this.normal.copy(it),this.constant=lt,this}setComponents(it,lt,pt,_t){return this.normal.set(it,lt,pt),this.constant=_t,this}setFromNormalAndCoplanarPoint(it,lt){return this.normal.copy(it),this.constant=-lt.dot(this.normal),this}setFromCoplanarPoints(it,lt,pt){const _t=Bl.subVectors(pt,lt).cross(rp.subVectors(it,lt)).normalize();return this.setFromNormalAndCoplanarPoint(_t,it),this}copy(it){return this.normal.copy(it.normal),this.constant=it.constant,this}normalize(){const it=1/this.normal.length();return this.normal.multiplyScalar(it),this.constant*=it,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(it){return this.normal.dot(it)+this.constant}distanceToSphere(it){return this.distanceToPoint(it.center)-it.radius}projectPoint(it,lt){return lt.copy(this.normal).multiplyScalar(-this.distanceToPoint(it)).add(it)}intersectLine(it,lt){const pt=it.delta(Bl),_t=this.normal.dot(pt);if(_t===0)return this.distanceToPoint(it.start)===0?lt.copy(it.start):null;const Dt=-(it.start.dot(this.normal)+this.constant)/_t;return Dt<0||Dt>1?null:lt.copy(pt).multiplyScalar(Dt).add(it.start)}intersectsLine(it){const lt=this.distanceToPoint(it.start),pt=this.distanceToPoint(it.end);return lt<0&&pt>0||pt<0&&lt>0}intersectsBox(it){return it.intersectsPlane(this)}intersectsSphere(it){return it.intersectsPlane(this)}coplanarPoint(it){return it.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(it,lt){const pt=lt||Kp.getNormalMatrix(it),_t=this.coplanarPoint(Bl).applyMatrix4(it),Dt=this.normal.applyMatrix3(pt).normalize();return this.constant=-_t.dot(Dt),this}translate(it){return this.constant-=it.dot(this.normal),this}equals(it){return it.normal.equals(this.normal)&&it.constant===this.constant}clone(){return new this.constructor().copy(this)}}lp.prototype.isPlane=!0;const qp=new Hn,lm=new Ot;class dl{constructor(it=new lp,lt=new lp,pt=new lp,_t=new lp,Dt=new lp,Lt=new lp){this.planes=[it,lt,pt,_t,Dt,Lt]}set(it,lt,pt,_t,Dt,Lt){const $t=this.planes;return $t[0].copy(it),$t[1].copy(lt),$t[2].copy(pt),$t[3].copy(_t),$t[4].copy(Dt),$t[5].copy(Lt),this}copy(it){const lt=this.planes;for(let pt=0;pt<6;pt++)lt[pt].copy(it.planes[pt]);return this}setFromProjectionMatrix(it){const lt=this.planes,pt=it.elements,_t=pt[0],Dt=pt[1],Lt=pt[2],$t=pt[3],Xt=pt[4],Yt=pt[5],Zt=pt[6],lr=pt[7],xr=pt[8],wr=pt[9],Ir=pt[10],kr=pt[11],Lr=pt[12],Xr=pt[13],_n=pt[14],On=pt[15];return lt[0].setComponents($t-_t,lr-Xt,kr-xr,On-Lr).normalize(),lt[1].setComponents($t+_t,lr+Xt,kr+xr,On+Lr).normalize(),lt[2].setComponents($t+Dt,lr+Yt,kr+wr,On+Xr).normalize(),lt[3].setComponents($t-Dt,lr-Yt,kr-wr,On-Xr).normalize(),lt[4].setComponents($t-Lt,lr-Zt,kr-Ir,On-_n).normalize(),lt[5].setComponents($t+Lt,lr+Zt,kr+Ir,On+_n).normalize(),this}intersectsObject(it){const lt=it.geometry;return lt.boundingSphere===null&&lt.computeBoundingSphere(),qp.copy(lt.boundingSphere).applyMatrix4(it.matrixWorld),this.intersectsSphere(qp)}intersectsSprite(it){return qp.center.set(0,0,0),qp.radius=.7071067811865476,qp.applyMatrix4(it.matrixWorld),this.intersectsSphere(qp)}intersectsSphere(it){const lt=this.planes,pt=it.center,_t=-it.radius;for(let Dt=0;Dt<6;Dt++)if(lt[Dt].distanceToPoint(pt)<_t)return!1;return!0}intersectsBox(it){const lt=this.planes;for(let pt=0;pt<6;pt++){const _t=lt[pt];if(lm.x=_t.normal.x>0?it.max.x:it.min.x,lm.y=_t.normal.y>0?it.max.y:it.min.y,lm.z=_t.normal.z>0?it.max.z:it.min.z,_t.distanceToPoint(lm)<0)return!1}return!0}containsPoint(it){const lt=this.planes;for(let pt=0;pt<6;pt++)if(lt[pt].distanceToPoint(it)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function el(){let vt=null,it=!1,lt=null,pt=null;function _t(Dt,Lt){lt(Dt,Lt),pt=vt.requestAnimationFrame(_t)}return{start:function(){it!==!0&&lt!==null&&(pt=vt.requestAnimationFrame(_t),it=!0)},stop:function(){vt.cancelAnimationFrame(pt),it=!1},setAnimationLoop:function(Dt){lt=Dt},setContext:function(Dt){vt=Dt}}}function gv(vt,it){const lt=it.isWebGL2,pt=new WeakMap;return{get:function(_t){return _t.isInterleavedBufferAttribute&&(_t=_t.data),pt.get(_t)},remove:function(_t){_t.isInterleavedBufferAttribute&&(_t=_t.data);const Dt=pt.get(_t);Dt&&(vt.deleteBuffer(Dt.buffer),pt.delete(_t))},update:function(_t,Dt){if(_t.isGLBufferAttribute){const $t=pt.get(_t);return void((!$t||$t.version<_t.version)&&pt.set(_t,{buffer:_t.buffer,type:_t.type,bytesPerElement:_t.elementSize,version:_t.version}))}_t.isInterleavedBufferAttribute&&(_t=_t.data);const Lt=pt.get(_t);Lt===void 0?pt.set(_t,(function($t,Xt){const Yt=$t.array,Zt=$t.usage,lr=vt.createBuffer();vt.bindBuffer(Xt,lr),vt.bufferData(Xt,Yt,Zt),$t.onUploadCallback();let xr=5126;return Yt instanceof Float32Array?xr=5126:Yt instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):Yt instanceof Uint16Array?$t.isFloat16BufferAttribute?lt?xr=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):xr=5123:Yt instanceof Int16Array?xr=5122:Yt instanceof Uint32Array?xr=5125:Yt instanceof Int32Array?xr=5124:Yt instanceof Int8Array?xr=5120:(Yt instanceof Uint8Array||Yt instanceof Uint8ClampedArray)&&(xr=5121),{buffer:lr,type:xr,bytesPerElement:Yt.BYTES_PER_ELEMENT,version:$t.version}})(_t,Dt)):Lt.version<_t.version&&((function($t,Xt,Yt){const Zt=Xt.array,lr=Xt.updateRange;vt.bindBuffer(Yt,$t),lr.count===-1?vt.bufferSubData(Yt,0,Zt):(lt?vt.bufferSubData(Yt,lr.offset*Zt.BYTES_PER_ELEMENT,Zt,lr.offset,lr.count):vt.bufferSubData(Yt,lr.offset*Zt.BYTES_PER_ELEMENT,Zt.subarray(lr.offset,lr.offset+lr.count)),lr.count=-1)})(Lt.buffer,_t,Dt),Lt.version=_t.version)}}}class Vm extends Wu{constructor(it=1,lt=1,pt=1,_t=1){super(),this.type="PlaneGeometry",this.parameters={width:it,height:lt,widthSegments:pt,heightSegments:_t};const Dt=it/2,Lt=lt/2,$t=Math.floor(pt),Xt=Math.floor(_t),Yt=$t+1,Zt=Xt+1,lr=it/$t,xr=lt/Xt,wr=[],Ir=[],kr=[],Lr=[];for(let Xr=0;Xr<Zt;Xr++){const _n=Xr*xr-Lt;for(let On=0;On<Yt;On++){const Kn=On*lr-Dt;Ir.push(Kn,-_n,0),kr.push(0,0,1),Lr.push(On/$t),Lr.push(1-Xr/Xt)}}for(let Xr=0;Xr<Xt;Xr++)for(let _n=0;_n<$t;_n++){const On=_n+Yt*Xr,Kn=_n+Yt*(Xr+1),Mn=_n+1+Yt*(Xr+1),ca=_n+1+Yt*Xr;wr.push(On,Kn,ca),wr.push(Kn,Mn,ca)}this.setIndex(wr),this.setAttribute("position",new Mo(Ir,3)),this.setAttribute("normal",new Mo(kr,3)),this.setAttribute("uv",new Mo(Lr,2))}static fromJSON(it){return new Vm(it.width,it.height,it.widthSegments,it.heightSegments)}}const nl={alphamap_fragment:`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vUv ).g;
#endif`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,alphatest_fragment:`#ifdef ALPHATEST
if ( diffuseColor.a < ALPHATEST ) discard;
#endif`,aomap_fragment:`#ifdef USE_AOMAP
float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
#if defined( USE_ENVMAP ) && defined( STANDARD )
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );
#endif
#endif`,aomap_pars_fragment:`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`,begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`,bsdfs:`vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {
const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
vec4 r = roughness * c0 + c1;
float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
return vec2( -1.04, 1.04 ) * a004 + r.zw;
}
float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
#if defined ( PHYSICALLY_CORRECT_LIGHTS )
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
if( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
}
return distanceFalloff;
#else
if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );
}
return 1.0;
#endif
}
vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {
return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {
float fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );
return ( 1.0 - specularColor ) * fresnel + specularColor;
}
vec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {
float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );
vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;
return Fr * fresnel + F0;
}
float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
return 1.0 / ( gl * gv );
}
float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
float a2 = pow2( alpha );
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
return RECIPROCAL_PI * a2 / pow2( denom );
}
vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {
float alpha = pow2( roughness );
vec3 halfDir = normalize( incidentLight.direction + viewDir );
float dotNL = saturate( dot( normal, incidentLight.direction ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
vec3 F = F_Schlick( specularColor, dotLH );
float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
return F * ( G * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
const float LUT_SIZE = 64.0;
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
const float LUT_BIAS = 0.5 / LUT_SIZE;
float dotNV = saturate( dot( N, V ) );
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
uv = uv * LUT_SCALE + LUT_BIAS;
return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
float l = length( f );
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
float x = dot( v1, v2 );
float y = abs( x );
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
float b = 3.4175940 + ( 4.1616724 + y ) * y;
float v = a / b;
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
vec3 lightNormal = cross( v1, v2 );
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
vec3 T1, T2;
T1 = normalize( V - N * dot( V, N ) );
T2 = - cross( N, T1 );
mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
vec3 coords[ 4 ];
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
coords[ 0 ] = normalize( coords[ 0 ] );
coords[ 1 ] = normalize( coords[ 1 ] );
coords[ 2 ] = normalize( coords[ 2 ] );
coords[ 3 ] = normalize( coords[ 3 ] );
vec3 vectorFormFactor = vec3( 0.0 );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
return vec3( result );
}
vec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
vec2 brdf = integrateSpecularBRDF( dotNV, roughness );
return specularColor * brdf.x + brdf.y;
}
void BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );
vec2 brdf = integrateSpecularBRDF( dotNV, roughness );
vec3 FssEss = F * brdf.x + brdf.y;
float Ess = brdf.x + brdf.y;
float Ems = 1.0 - Ess;
vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
singleScatter += FssEss;
multiScatter += Fms * Ems;
}
float G_BlinnPhong_Implicit( ) {
return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {
vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );
float dotNH = saturate( dot( geometry.normal, halfDir ) );
float dotLH = saturate( dot( incidentLight.direction, halfDir ) );
vec3 F = F_Schlick( specularColor, dotLH );
float G = G_BlinnPhong_Implicit( );
float D = D_BlinnPhong( shininess, dotNH );
return F * ( G * D );
}
float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {
return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );
}
float BlinnExponentToGGXRoughness( const in float blinnExponent ) {
return sqrt( 2.0 / ( blinnExponent + 2.0 ) );
}
#if defined( USE_SHEEN )
float D_Charlie(float roughness, float NoH) {
float invAlpha = 1.0 / roughness;
float cos2h = NoH * NoH;
float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);
}
float V_Neubelt(float NoV, float NoL) {
return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));
}
vec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {
vec3 N = geometry.normal;
vec3 V = geometry.viewDir;
vec3 H = normalize( V + L );
float dotNH = saturate( dot( N, H ) );
return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );
}
#endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP
uniform sampler2D bumpMap;
uniform float bumpScale;
vec2 dHdxy_fwd() {
vec2 dSTdx = dFdx( vUv );
vec2 dSTdy = dFdy( vUv );
float Hll = bumpScale * texture2D( bumpMap, vUv ).x;
float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;
float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;
return vec2( dBx, dBy );
}
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );
vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );
vec3 vN = surf_norm;
vec3 R1 = cross( vSigmaY, vN );
vec3 R2 = cross( vN, vSigmaX );
float fDet = dot( vSigmaX, R1 ) * faceDirection;
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
return normalize( abs( fDet ) * surf_norm - vGrad );
}
#endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
bool clipped = true;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
}
#pragma unroll_loop_end
if ( clipped ) discard;
#endif
#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`,color_fragment:`#if defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#elif defined( USE_COLOR )
diffuseColor.rgb *= vColor;
#endif`,color_pars_fragment:`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR )
varying vec3 vColor;
#endif`,color_pars_vertex:`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
varying vec3 vColor;
#endif`,color_vertex:`#if defined( USE_COLOR_ALPHA )
vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
vColor.xyz *= instanceColor.xyz;
#endif`,common:`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate(a) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement(a) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
highp float rand( const in vec2 uv ) {
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
return fract(sin(sn) * c);
}
#ifdef HIGH_PRECISION
float precisionSafeLength( vec3 v ) { return length( v ); }
#else
float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float precisionSafeLength( vec3 v ) {
float maxComponent = max3( abs( v ) );
return length( v / maxComponent ) * maxComponent;
}
#endif
struct IncidentLight {
vec3 color;
vec3 direction;
bool visible;
};
struct ReflectedLight {
vec3 directDiffuse;
vec3 directSpecular;
vec3 indirectDiffuse;
vec3 indirectSpecular;
};
struct GeometricContext {
vec3 position;
vec3 normal;
vec3 viewDir;
#ifdef CLEARCOAT
vec3 clearcoatNormal;
#endif
};
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
float distance = dot( planeNormal, point - pointOnPlane );
return - distance * planeNormal + point;
}
float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {
return sign( dot( point - pointOnPlane, planeNormal ) );
}
vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {
return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;
}
mat3 transposeMat3( const in mat3 m ) {
mat3 tmp;
tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
return tmp;
}
float linearToRelativeLuminance( const in vec3 color ) {
vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
return dot( weights, color.rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
return vec2( u, v );
}`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV
#define cubeUV_maxMipLevel 8.0
#define cubeUV_minMipLevel 4.0
#define cubeUV_maxTileSize 256.0
#define cubeUV_minTileSize 16.0
float getFace( vec3 direction ) {
vec3 absDirection = abs( direction );
float face = - 1.0;
if ( absDirection.x > absDirection.z ) {
if ( absDirection.x > absDirection.y )
face = direction.x > 0.0 ? 0.0 : 3.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
} else {
if ( absDirection.z > absDirection.y )
face = direction.z > 0.0 ? 2.0 : 5.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
}
return face;
}
vec2 getUV( vec3 direction, float face ) {
vec2 uv;
if ( face == 0.0 ) {
uv = vec2( direction.z, direction.y ) / abs( direction.x );
} else if ( face == 1.0 ) {
uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
} else if ( face == 2.0 ) {
uv = vec2( - direction.x, direction.y ) / abs( direction.z );
} else if ( face == 3.0 ) {
uv = vec2( - direction.z, direction.y ) / abs( direction.x );
} else if ( face == 4.0 ) {
uv = vec2( - direction.x, direction.z ) / abs( direction.y );
} else {
uv = vec2( direction.x, direction.y ) / abs( direction.z );
}
return 0.5 * ( uv + 1.0 );
}
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
float face = getFace( direction );
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
mipInt = max( mipInt, cubeUV_minMipLevel );
float faceSize = exp2( mipInt );
float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );
vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );
vec2 f = fract( uv );
uv += 0.5 - f;
if ( face > 2.0 ) {
uv.y += faceSize;
face -= 3.0;
}
uv.x += face * faceSize;
if ( mipInt < cubeUV_maxMipLevel ) {
uv.y += 2.0 * cubeUV_maxTileSize;
}
uv.y += filterInt * 2.0 * cubeUV_minTileSize;
uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );
uv *= texelSize;
vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.x += texelSize;
vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.y += texelSize;
vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
uv.x -= texelSize;
vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;
vec3 tm = mix( tl, tr, f.x );
vec3 bm = mix( bl, br, f.x );
return mix( tm, bm, f.y );
}
#define r0 1.0
#define v0 0.339
#define m0 - 2.0
#define r1 0.8
#define v1 0.276
#define m1 - 1.0
#define r4 0.4
#define v4 0.046
#define m4 2.0
#define r5 0.305
#define v5 0.016
#define m5 3.0
#define r6 0.21
#define v6 0.0038
#define m6 4.0
float roughnessToMip( float roughness ) {
float mip = 0.0;
if ( roughness >= r1 ) {
mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;
} else if ( roughness >= r4 ) {
mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;
} else if ( roughness >= r5 ) {
mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;
} else if ( roughness >= r6 ) {
mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;
} else {
mip = - 2.0 * log2( 1.16 * roughness ); }
return mip;
}
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );
float mipF = fract( mip );
float mipInt = floor( mip );
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
if ( mipF == 0.0 ) {
return vec4( color0, 1.0 );
} else {
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
return vec4( mix( color0, color1, mipF ), 1.0 );
}
}
#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal;
#ifdef USE_INSTANCING
mat3 m = mat3( instanceMatrix );
transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
transformedNormal = m * transformedNormal;
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vUv );
emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`,encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:`
vec4 LinearToLinear( in vec4 value ) {
return value;
}
vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
}
vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
}
vec4 sRGBToLinear( in vec4 value ) {
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
}
vec4 LinearTosRGB( in vec4 value ) {
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}
vec4 RGBEToLinear( in vec4 value ) {
return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
}
vec4 LinearToRGBE( in vec4 value ) {
float maxComponent = max( max( value.r, value.g ), value.b );
float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
}
vec4 RGBMToLinear( in vec4 value, in float maxRange ) {
return vec4( value.rgb * value.a * maxRange, 1.0 );
}
vec4 LinearToRGBM( in vec4 value, in float maxRange ) {
float maxRGB = max( value.r, max( value.g, value.b ) );
float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
M = ceil( M * 255.0 ) / 255.0;
return vec4( value.rgb / ( M * maxRange ), M );
}
vec4 RGBDToLinear( in vec4 value, in float maxRange ) {
return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
}
vec4 LinearToRGBD( in vec4 value, in float maxRange ) {
float maxRGB = max( value.r, max( value.g, value.b ) );
float D = max( maxRange / maxRGB, 1.0 );
D = clamp( floor( D ) / 255.0, 0.0, 1.0 );
return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
}
const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );
vec4 LinearToLogLuv( in vec4 value ) {
vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;
Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
vec4 vResult;
vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
vResult.w = fract( Le );
vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
return vResult;
}
const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );
vec4 LogLuvToLinear( in vec4 value ) {
float Le = value.z * 255.0 + value.w;
vec3 Xp_Y_XYZp;
Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;
return vec4( max( vRGB, 0.0 ), 1.0 );
}`,envmap_fragment:`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vec3 cameraToFrag;
if ( isOrthographic ) {
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToFrag = normalize( vWorldPosition - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( cameraToFrag, worldNormal );
#else
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
#endif
#else
vec3 reflectVec = vReflect;
#endif
#ifdef ENVMAP_TYPE_CUBE
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );
#else
vec4 envColor = vec4( 0.0 );
#endif
#ifndef ENVMAP_TYPE_CUBE_UV
envColor = envMapTexelToLinear( envColor );
#endif
#ifdef ENVMAP_BLENDING_MULTIPLY
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_MIX )
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_ADD )
outgoingLight += envColor.xyz * specularStrength * reflectivity;
#endif
#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
uniform int maxMipLevel;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP
uniform float reflectivity;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
uniform float refractionRatio;
#else
varying vec3 vReflect;
#endif
#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
#else
varying vec3 vReflect;
uniform float refractionRatio;
#endif
#endif`,envmap_physical_pars_fragment:`#if defined( USE_ENVMAP )
#ifdef ENVMAP_MODE_REFRACTION
uniform float refractionRatio;
#endif
vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {
vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );
#ifdef ENVMAP_TYPE_CUBE
vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );
#else
vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
#else
vec4 envMapColor = vec4( 0.0 );
#endif
return PI * envMapColor.rgb * envMapIntensity;
}
float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {
float maxMIPLevelScalar = float( maxMIPLevel );
float sigma = PI * roughness * roughness / ( 1.0 + roughness );
float desiredMIPLevel = maxMIPLevelScalar + log2( sigma );
return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );
}
vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( -viewDir, normal );
reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
#else
vec3 reflectVec = refract( -viewDir, normal, refractionRatio );
#endif
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );
#ifdef ENVMAP_TYPE_CUBE
vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );
#else
vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
#endif
return envMapColor.rgb * envMapIntensity;
}
#endif`,envmap_vertex:`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vWorldPosition = worldPosition.xyz;
#else
vec3 cameraToVertex;
if ( isOrthographic ) {
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vReflect = reflect( cameraToVertex, worldNormal );
#else
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
#endif
#endif
#endif`,fog_vertex:`#ifdef USE_FOG
fogDepth = - mvPosition.z;
#endif`,fog_pars_vertex:`#ifdef USE_FOG
varying float fogDepth;
#endif`,fog_fragment:`#ifdef USE_FOG
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );
#else
float fogFactor = smoothstep( fogNear, fogFar, fogDepth );
#endif
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,fog_pars_fragment:`#ifdef USE_FOG
uniform vec3 fogColor;
varying float fogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP
uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
float dotNL = dot( normal, lightDirection );
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
#ifdef USE_GRADIENTMAP
return texture2D( gradientMap, coord ).rgb;
#else
return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
#endif
}`,lightmap_fragment:`#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#endif`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`,lights_lambert_vertex:`vec3 diffuse = vec3( 1.0 );
GeometricContext geometry;
geometry.position = mvPosition.xyz;
geometry.normal = normalize( transformedNormal );
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );
GeometricContext backGeometry;
backGeometry.position = geometry.position;
backGeometry.normal = -geometry.normal;
backGeometry.viewDir = geometry.viewDir;
vLightFront = vec3( 0.0 );
vIndirectFront = vec3( 0.0 );
#ifdef DOUBLE_SIDED
vLightBack = vec3( 0.0 );
vIndirectBack = vec3( 0.0 );
#endif
IncidentLight directLight;
float dotNL;
vec3 directLightColor_Diffuse;
vIndirectFront += getAmbientLightIrradiance( ambientLightColor );
vIndirectFront += getLightProbeIrradiance( lightProbe, geometry );
#ifdef DOUBLE_SIDED
vIndirectBack += getAmbientLightIrradiance( ambientLightColor );
vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );
#endif
#if NUM_POINT_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_DIR_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );
dotNL = dot( geometry.normal, directLight.direction );
directLightColor_Diffuse = PI * directLight.color;
vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
#ifdef DOUBLE_SIDED
vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;
#endif
}
#pragma unroll_loop_end
#endif
#if NUM_HEMI_LIGHTS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
#ifdef DOUBLE_SIDED
vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );
#endif
}
#pragma unroll_loop_end
#endif`,lights_pars_begin:`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
uniform vec3 lightProbe[ 9 ];
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
float x = normal.x, y = normal.y, z = normal.z;
vec3 result = shCoefficients[ 0 ] * 0.886227;
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {
vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
vec3 irradiance = ambientLightColor;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
return irradiance;
}
#if NUM_DIR_LIGHTS > 0
struct DirectionalLight {
vec3 direction;
vec3 color;
};
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {
directLight.color = directionalLight.color;
directLight.direction = directionalLight.direction;
directLight.visible = true;
}
#endif
#if NUM_POINT_LIGHTS > 0
struct PointLight {
vec3 position;
vec3 color;
float distance;
float decay;
};
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {
vec3 lVector = pointLight.position - geometry.position;
directLight.direction = normalize( lVector );
float lightDistance = length( lVector );
directLight.color = pointLight.color;
directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );
directLight.visible = ( directLight.color != vec3( 0.0 ) );
}
#endif
#if NUM_SPOT_LIGHTS > 0
struct SpotLight {
vec3 position;
vec3 direction;
vec3 color;
float distance;
float decay;
float coneCos;
float penumbraCos;
};
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {
vec3 lVector = spotLight.position - geometry.position;
directLight.direction = normalize( lVector );
float lightDistance = length( lVector );
float angleCos = dot( directLight.direction, spotLight.direction );
if ( angleCos > spotLight.coneCos ) {
float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );
directLight.color = spotLight.color;
directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );
directLight.visible = true;
} else {
directLight.color = vec3( 0.0 );
directLight.visible = false;
}
}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
struct RectAreaLight {
vec3 color;
vec3 position;
vec3 halfWidth;
vec3 halfHeight;
};
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
struct HemisphereLight {
vec3 direction;
vec3 skyColor;
vec3 groundColor;
};
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {
float dotNL = dot( geometry.normal, hemiLight.direction );
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
return irradiance;
}
#endif`,lights_toon_fragment:`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
struct ToonMaterial {
vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Toon
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon
#define Material_LightProbeLOD( material ) (0)`,lights_phong_fragment:`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_BlinnPhong
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong
#define Material_LightProbeLOD( material ) (0)`,lights_physical_fragment:`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;
material.specularRoughness = min( material.specularRoughness, 1.0 );
#ifdef REFLECTIVITY
material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );
#else
material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );
#endif
#ifdef CLEARCOAT
material.clearcoat = clearcoat;
material.clearcoatRoughness = clearcoatRoughness;
#ifdef USE_CLEARCOATMAP
material.clearcoat *= texture2D( clearcoatMap, vUv ).x;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;
#endif
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
material.clearcoatRoughness += geometryRoughness;
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_SHEEN
material.sheenColor = sheen;
#endif`,lights_physical_pars_fragment:`struct PhysicalMaterial {
vec3 diffuseColor;
float specularRoughness;
vec3 specularColor;
#ifdef CLEARCOAT
float clearcoat;
float clearcoatRoughness;
#endif
#ifdef USE_SHEEN
vec3 sheenColor;
#endif
};
#define MAXIMUM_SPECULAR_COEFFICIENT 0.16
#define DEFAULT_SPECULAR_COEFFICIENT 0.04
float clearcoatDHRApprox( const in float roughness, const in float dotNL ) {
return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );
}
#if NUM_RECT_AREA_LIGHTS > 0
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
vec3 normal = geometry.normal;
vec3 viewDir = geometry.viewDir;
vec3 position = geometry.position;
vec3 lightPos = rectAreaLight.position;
vec3 halfWidth = rectAreaLight.halfWidth;
vec3 halfHeight = rectAreaLight.halfHeight;
vec3 lightColor = rectAreaLight.color;
float roughness = material.specularRoughness;
vec3 rectCoords[ 4 ];
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
vec2 uv = LTC_Uv( normal, viewDir, roughness );
vec4 t1 = texture2D( ltc_1, uv );
vec4 t2 = texture2D( ltc_2, uv );
mat3 mInv = mat3(
vec3( t1.x, 0, t1.y ),
vec3( 0, 1, 0 ),
vec3( t1.z, 0, t1.w )
);
vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
irradiance *= PI;
#endif
#ifdef CLEARCOAT
float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );
vec3 ccIrradiance = ccDotNL * directLight.color;
#ifndef PHYSICALLY_CORRECT_LIGHTS
ccIrradiance *= PI;
#endif
float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
#else
float clearcoatDHR = 0.0;
#endif
#ifdef USE_SHEEN
reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(
material.specularRoughness,
directLight.direction,
geometry,
material.sheenColor
);
#else
reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);
#endif
reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
#ifdef CLEARCOAT
float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );
reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );
float ccDotNL = ccDotNV;
float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );
#else
float clearcoatDHR = 0.0;
#endif
float clearcoatInv = 1.0 - clearcoatDHR;
vec3 singleScattering = vec3( 0.0 );
vec3 multiScattering = vec3( 0.0 );
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );
vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;
reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct RE_Direct_Physical
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,lights_fragment_begin:`
GeometricContext geometry;
geometry.position = - vViewPosition;
geometry.normal = normal;
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
#ifdef CLEARCOAT
geometry.clearcoatNormal = clearcoatNormal;
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
PointLight pointLight;
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
pointLight = pointLights[ i ];
getPointDirectLightIrradiance( pointLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
pointLightShadow = pointLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
SpotLight spotLight;
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
spotLight = spotLights[ i ];
getSpotDirectLightIrradiance( spotLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
spotLightShadow = spotLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
DirectionalLight directionalLight;
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
directionalLight = directionalLights[ i ];
getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
directionalLightShadow = directionalLightShadows[ i ];
directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
RectAreaLight rectAreaLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
rectAreaLight = rectAreaLights[ i ];
RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
vec3 iblIrradiance = vec3( 0.0 );
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
irradiance += getLightProbeIrradiance( lightProbe, geometry );
#if ( NUM_HEMI_LIGHTS > 0 )
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );
}
#pragma unroll_loop_end
#endif
#endif
#if defined( RE_IndirectSpecular )
vec3 radiance = vec3( 0.0 );
vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#ifndef PHYSICALLY_CORRECT_LIGHTS
lightMapIrradiance *= PI;
#endif
irradiance += lightMapIrradiance;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );
#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );
#ifdef CLEARCOAT
clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );
#endif
#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse )
RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif`,logdepthbuf_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
varying float vFragDepth;
varying float vIsPerspective;
#else
uniform float logDepthBufFC;
#endif
#endif`,logdepthbuf_vertex:`#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#else
if ( isPerspectiveMatrix( projectionMatrix ) ) {
gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
gl_Position.z *= gl_Position.w;
}
#endif
#endif`,map_fragment:`#ifdef USE_MAP
vec4 texelColor = texture2D( map, vUv );
texelColor = mapTexelToLinear( texelColor );
diffuseColor *= texelColor;
#endif`,map_pars_fragment:`#ifdef USE_MAP
uniform sampler2D map;
#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#ifdef USE_MAP
vec4 mapTexel = texture2D( map, uv );
diffuseColor *= mapTexelToLinear( mapTexel );
#endif
#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,map_particle_pars_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
uniform mat3 uvTransform;
#endif
#ifdef USE_MAP
uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,metalnessmap_fragment:`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vUv );
metalnessFactor *= texelMetalness.b;
#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS
uniform float morphTargetBaseInfluence;
#ifndef USE_MORPHNORMALS
uniform float morphTargetInfluences[ 8 ];
#else
uniform float morphTargetInfluences[ 4 ];
#endif
#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
transformed += morphTarget0 * morphTargetInfluences[ 0 ];
transformed += morphTarget1 * morphTargetInfluences[ 1 ];
transformed += morphTarget2 * morphTargetInfluences[ 2 ];
transformed += morphTarget3 * morphTargetInfluences[ 3 ];
#ifndef USE_MORPHNORMALS
transformed += morphTarget4 * morphTargetInfluences[ 4 ];
transformed += morphTarget5 * morphTargetInfluences[ 5 ];
transformed += morphTarget6 * morphTargetInfluences[ 6 ];
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
#endif
#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );
vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );
vec3 normal = normalize( cross( fdx, fdy ) );
#else
vec3 normal = normalize( vNormal );
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
#ifdef USE_TANGENT
vec3 tangent = normalize( vTangent );
vec3 bitangent = normalize( vBitangent );
#ifdef DOUBLE_SIDED
tangent = tangent * faceDirection;
bitangent = bitangent * faceDirection;
#endif
#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )
mat3 vTBN = mat3( tangent, bitangent, normal );
#endif
#endif
#endif
vec3 geometryNormal = normal;`,normal_fragment_maps:`#ifdef OBJECTSPACE_NORMALMAP
normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
#ifdef FLIP_SIDED
normal = - normal;
#endif
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
normal = normalize( normalMatrix * normal );
#elif defined( TANGENTSPACE_NORMALMAP )
vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
mapN.xy *= normalScale;
#ifdef USE_TANGENT
normal = normalize( vTBN * mapN );
#else
normal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );
#endif
#elif defined( USE_BUMPMAP )
normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP
uniform sampler2D normalMap;
uniform vec2 normalScale;
#endif
#ifdef OBJECTSPACE_NORMALMAP
uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )
vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {
vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );
vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );
vec2 st0 = dFdx( vUv.st );
vec2 st1 = dFdy( vUv.st );
vec3 N = surf_norm;
vec3 q1perp = cross( q1, N );
vec3 q0perp = cross( N, q0 );
vec3 T = q1perp * st0.x + q0perp * st1.x;
vec3 B = q1perp * st0.y + q0perp * st1.y;
float det = max( dot( T, T ), dot( B, B ) );
float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );
return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );
}
#endif`,clearcoat_normal_fragment_begin:`#ifdef CLEARCOAT
vec3 clearcoatNormal = geometryNormal;
#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
#ifdef USE_TANGENT
clearcoatNormal = normalize( vTBN * clearcoatMapN );
#else
clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );
#endif
#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP
uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform sampler2D clearcoatNormalMap;
uniform vec2 clearcoatNormalScale;
#endif`,packing:`vec3 packNormalToRGB( const in vec3 normal ) {
return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
vec4 r = vec4( fract( v * PackFactors ), v );
r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
return dot( v, UnpackFactors );
}
vec4 pack2HalfToRGBA( vec2 v ) {
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);
}
vec2 unpackRGBATo2Half( vec4 v ) {
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
return linearClipZ * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
return (( near + viewZ ) * far ) / (( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
return ( near * far ) / ( ( far - near ) * invClipZ - far );
}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,dithering_pars_fragment:`#ifdef DITHERING
vec3 dithering( vec3 color ) {
float grid_position = rand( gl_FragCoord.xy );
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
return color + dither_shift_RGB;
}
#endif`,roughnessmap_fragment:`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vUv );
roughnessFactor *= texelRoughness.g;
#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`,shadowmap_pars_fragment:`#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
}
vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
return unpackRGBATo2Half( texture2D( shadow, uv ) );
}
float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
float occlusion = 1.0;
vec2 distribution = texture2DDistribution( shadow, uv );
float hard_shadow = step( compare , distribution.x );
if (hard_shadow != 1.0 ) {
float distance = compare - distribution.x ;
float variance = max( 0.00000, distribution.y * distribution.y );
float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
}
return occlusion;
}
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
shadowCoord.z += shadowBias;
bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
bool inFrustum = all( inFrustumVec );
bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
bool frustumTest = all( frustumTestVec );
if ( frustumTest ) {
#if defined( SHADOWMAP_TYPE_PCF )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx0 = - texelSize.x * shadowRadius;
float dy0 = - texelSize.y * shadowRadius;
float dx1 = + texelSize.x * shadowRadius;
float dy1 = + texelSize.y * shadowRadius;
float dx2 = dx0 / 2.0;
float dy2 = dy0 / 2.0;
float dx3 = dx1 / 2.0;
float dy3 = dy1 / 2.0;
shadow = (
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
) * ( 1.0 / 17.0 );
#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx = texelSize.x;
float dy = texelSize.y;
vec2 uv = shadowCoord.xy;
vec2 f = fract( uv * shadowMapSize + 0.5 );
uv -= f * texelSize;
shadow = (
texture2DCompare( shadowMap, uv, shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
f.x ),
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
f.x ),
f.y )
) * ( 1.0 / 9.0 );
#elif defined( SHADOWMAP_TYPE_VSM )
shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
#else
shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
#endif
}
return shadow;
}
vec2 cubeToUV( vec3 v, float texelSizeY ) {
vec3 absV = abs( v );
float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
absV *= scaleToCube;
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
vec2 planar = v.xy;
float almostATexel = 1.5 * texelSizeY;
float almostOne = 1.0 - almostATexel;
if ( absV.z >= almostOne ) {
if ( v.z > 0.0 )
planar.x = 4.0 - v.x;
} else if ( absV.x >= almostOne ) {
float signX = sign( v.x );
planar.x = v.z * signX + 2.0 * signX;
} else if ( absV.y >= almostOne ) {
float signY = sign( v.y );
planar.x = v.x + 2.0 * signY + 2.0;
planar.y = v.z * signY - 2.0;
}
return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
}
float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
vec3 lightToPosition = shadowCoord.xyz;
float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
vec3 bd3D = normalize( lightToPosition );
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
return (
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
) * ( 1.0 / 9.0 );
#else
return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
#endif
}
#endif`,shadowmap_pars_vertex:`#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];
varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#endif`,shadowmap_vertex:`#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
vec4 shadowWorldPosition;
#endif
#if NUM_DIR_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );
vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#endif`,shadowmask_pars_fragment:`float getShadowMask() {
float shadow = 1.0;
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
directionalLight = directionalLightShadows[ i ];
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
spotLight = spotLightShadows[ i ];
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
pointLight = pointLightShadows[ i ];
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
}
#pragma unroll_loop_end
#endif
#endif
return shadow;
}`,skinbase_vertex:`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING
uniform mat4 bindMatrix;
uniform mat4 bindMatrixInverse;
#ifdef BONE_TEXTURE
uniform highp sampler2D boneTexture;
uniform int boneTextureSize;
mat4 getBoneMatrix( const in float i ) {
float j = i * 4.0;
float x = mod( j, float( boneTextureSize ) );
float y = floor( j / float( boneTextureSize ) );
float dx = 1.0 / float( boneTextureSize );
float dy = 1.0 / float( boneTextureSize );
y = dy * ( y + 0.5 );
vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
mat4 bone = mat4( v1, v2, v3, v4 );
return bone;
}
#else
uniform mat4 boneMatrices[ MAX_BONES ];
mat4 getBoneMatrix( const in float i ) {
mat4 bone = boneMatrices[ int(i) ];
return bone;
}
#endif
#endif`,skinning_vertex:`#ifdef USE_SKINNING
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
vec4 skinned = vec4( 0.0 );
skinned += boneMatX * skinVertex * skinWeight.x;
skinned += boneMatY * skinVertex * skinWeight.y;
skinned += boneMatZ * skinVertex * skinWeight.z;
skinned += boneMatW * skinVertex * skinWeight.w;
transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,skinnormal_vertex:`#ifdef USE_SKINNING
mat4 skinMatrix = mat4( 0.0 );
skinMatrix += skinWeight.x * boneMatX;
skinMatrix += skinWeight.y * boneMatY;
skinMatrix += skinWeight.z * boneMatZ;
skinMatrix += skinWeight.w * boneMatW;
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
#ifdef USE_TANGENT
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#endif
#endif`,specularmap_fragment:`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,tonemapping_pars_fragment:`#ifndef saturate
#define saturate(a) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
return toneMappingExposure * color;
}
vec3 ReinhardToneMapping( vec3 color ) {
color *= toneMappingExposure;
return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
color *= toneMappingExposure;
color = max( vec3( 0.0 ), color - 0.004 );
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
const mat3 ACESInputMat = mat3(
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
vec3( 0.04823, 0.01566, 0.83777 )
);
const mat3 ACESOutputMat = mat3(
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
vec3( -0.07367, -0.00605, 1.07602 )
);
color *= toneMappingExposure / 0.6;
color = ACESInputMat * color;
color = RRTAndODTFit( color );
color = ACESOutputMat * color;
return saturate( color );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION
float transmissionFactor = transmission;
float thicknessFactor = thickness;
#ifdef USE_TRANSMISSIONMAP
transmissionFactor *= texture2D( transmissionMap, vUv ).r;
#endif
#ifdef USE_THICKNESSNMAP
thicknessFactor *= texture2D( thicknessMap, vUv ).g;
#endif
vec3 pos = vWorldPosition.xyz / vWorldPosition.w;
vec3 v = normalize( cameraPosition - pos );
float ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );
vec3 transmission = transmissionFactor * getIBLVolumeRefraction(
normal, v, roughnessFactor, material.diffuseColor, totalSpecular,
pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
attenuationColor, attenuationDistance );
totalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );
#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION
#ifdef USE_TRANSMISSIONMAP
uniform sampler2D transmissionMap;
#endif
#ifdef USE_THICKNESSMAP
uniform sampler2D thicknessMap;
#endif
uniform vec2 transmissionSamplerSize;
uniform sampler2D transmissionSamplerMap;
uniform mat4 modelMatrix;
uniform mat4 projectionMatrix;
varying vec4 vWorldPosition;
vec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {
vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);
vec3 modelScale;
modelScale.x = length(vec3(modelMatrix[0].xyz));
modelScale.y = length(vec3(modelMatrix[1].xyz));
modelScale.z = length(vec3(modelMatrix[2].xyz));
return normalize(refractionVector) * thickness * modelScale;
}
float applyIorToRoughness(float roughness, float ior) {
return roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);
}
vec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {
float framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);
return texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;
}
vec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {
if (attenuationDistance == 0.0) {
return radiance;
} else {
vec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;
vec3 transmittance = exp(-attenuationCoefficient * transmissionDistance); return transmittance * radiance;
}
}
vec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,
vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,
vec3 attenuationColor, float attenuationDistance) {
vec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);
vec3 refractedRayExit = position + transmissionRay;
vec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
refractionCoords += 1.0;
refractionCoords /= 2.0;
vec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);
vec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);
return (1.0 - specularColor) * attenuatedColor * baseColor;
}
#endif`,uv_pars_fragment:`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
varying vec2 vUv;
#endif`,uv_pars_vertex:`#ifdef USE_UV
#ifdef UVS_VERTEX_ONLY
vec2 vUv;
#else
varying vec2 vUv;
#endif
uniform mat3 uvTransform;
#endif`,uv_vertex:`#ifdef USE_UV
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif`,uv2_pars_fragment:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
varying vec2 vUv2;
#endif`,uv2_pars_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
attribute vec2 uv2;
varying vec2 vUv2;
uniform mat3 uv2Transform;
#endif`,uv2_vertex:`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )
vec4 worldPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
#endif`,background_frag:`uniform sampler2D t2D;
varying vec2 vUv;
void main() {
vec4 texColor = texture2D( t2D, vUv );
gl_FragColor = mapTexelToLinear( texColor );
#include <tonemapping_fragment>
#include <encodings_fragment>
}`,background_vert:`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,cube_frag:`#include <envmap_common_pars_fragment>
uniform float opacity;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
vec3 vReflect = vWorldDirection;
#include <envmap_fragment>
gl_FragColor = envColor;
gl_FragColor.a *= opacity;
#include <tonemapping_fragment>
#include <encodings_fragment>
}`,cube_vert:`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,depth_frag:`#if DEPTH_PACKING == 3200
uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( 1.0 );
#if DEPTH_PACKING == 3200
diffuseColor.a = opacity;
#endif
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <logdepthbuf_fragment>
float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
#if DEPTH_PACKING == 3200
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
#elif DEPTH_PACKING == 3201
gl_FragColor = packDepthToRGBA( fragCoordZ );
#endif
}`,depth_vert:`#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
#include <uv_vertex>
#include <skinbase_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vHighPrecisionZW = gl_Position.zw;
}`,distanceRGBA_frag:`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( 1.0 );
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
float dist = length( vWorldPosition - referencePosition );
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
dist = saturate( dist );
gl_FragColor = packDepthToRGBA( dist );
}`,distanceRGBA_vert:`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <skinbase_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <worldpos_vertex>
#include <clipping_planes_vertex>
vWorldPosition = worldPosition.xyz;
}`,equirect_frag:`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
vec4 texColor = texture2D( tEquirect, sampleUV );
gl_FragColor = mapTexelToLinear( texColor );
#include <tonemapping_fragment>
#include <encodings_fragment>
}`,equirect_vert:`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}`,linedashed_frag:`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <color_fragment>
outgoingLight = diffuseColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,linedashed_vert:`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
vLineDistance = scale * lineDistance;
#include <color_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,meshbasic_frag:`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <specularmap_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
#ifdef USE_LIGHTMAP
vec4 lightMapTexel= texture2D( lightMap, vUv2 );
reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;
#else
reflectedLight.indirectDiffuse += vec3( 1.0 );
#endif
#include <aomap_fragment>
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include <envmap_fragment>
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshbasic_vert:`#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
#include <skinbase_vertex>
#ifdef USE_ENVMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <worldpos_vertex>
#include <clipping_planes_vertex>
#include <envmap_vertex>
#include <fog_vertex>
}`,meshlambert_frag:`uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
varying vec3 vLightBack;
varying vec3 vIndirectBack;
#endif
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <fog_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <specularmap_fragment>
#include <emissivemap_fragment>
#ifdef DOUBLE_SIDED
reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;
#else
reflectedLight.indirectDiffuse += vIndirectFront;
#endif
#include <lightmap_fragment>
reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );
#ifdef DOUBLE_SIDED
reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;
#else
reflectedLight.directDiffuse = vLightFront;
#endif
reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <envmap_fragment>
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshlambert_vert:`#define LAMBERT
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
varying vec3 vLightBack;
varying vec3 vIndirectBack;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <bsdfs>
#include <lights_pars_begin>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <envmap_vertex>
#include <lights_lambert_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,meshmatcap_frag:`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <fog_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
vec3 viewDir = normalize( vViewPosition );
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
vec3 y = cross( viewDir, x );
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
#ifdef USE_MATCAP
vec4 matcapColor = texture2D( matcap, uv );
matcapColor = matcapTexelToLinear( matcapColor );
#else
vec4 matcapColor = vec4( 1.0 );
#endif
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshmatcap_vert:`#define MATCAP
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
vViewPosition = - mvPosition.xyz;
}`,meshtoon_frag:`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_toon_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshtoon_vert:`#define TOON
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,meshphong_frag:`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <specularmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_phong_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
#include <envmap_fragment>
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshphong_vert:`#define PHONG
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,meshphysical_frag:`#define STANDARD
#ifdef PHYSICAL
#define REFLECTIVITY
#define CLEARCOAT
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef USE_TRANSMISSION
uniform float transmission;
uniform float thickness;
uniform vec3 attenuationColor;
uniform float attenuationDistance;
#endif
#ifdef REFLECTIVITY
uniform float reflectivity;
#endif
#ifdef CLEARCOAT
uniform float clearcoat;
uniform float clearcoatRoughness;
#endif
#ifdef USE_SHEEN
uniform vec3 sheen;
#endif
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <bsdfs>
#include <transmission_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <lights_physical_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <roughnessmap_fragment>
#include <metalnessmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <clearcoat_normal_fragment_begin>
#include <clearcoat_normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_physical_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
#include <transmission_fragment>
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,meshphysical_vert:`#define STANDARD
varying vec3 vViewPosition;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif
#ifdef USE_TRANSMISSION
varying vec4 vWorldPosition;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <uv2_vertex>
#include <color_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
#ifdef USE_TRANSMISSION
vWorldPosition = worldPosition;
#endif
}`,normal_frag:`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
varying vec3 vViewPosition;
#endif
#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif
#include <packing>
#include <uv_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
}`,normal_vert:`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
varying vec3 vViewPosition;
#endif
#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
vViewPosition = - mvPosition.xyz;
#endif
}`,points_frag:`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_particle_fragment>
#include <color_fragment>
#include <alphatest_fragment>
outgoingLight = diffuseColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,points_vert:`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <color_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
gl_PointSize = size;
#ifdef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
#endif
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <fog_vertex>
}`,shadow_frag:`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
}`,shadow_vert:`#include <common>
#include <fog_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
#include <begin_vertex>
#include <project_vertex>
#include <worldpos_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,sprite_frag:`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
outgoingLight = diffuseColor.rgb;
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <tonemapping_fragment>
#include <encodings_fragment>
#include <fog_fragment>
}`,sprite_vert:`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
vec2 scale;
scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
#ifndef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) scale *= - mvPosition.z;
#endif
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
vec2 rotatedPosition;
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
mvPosition.xy += rotatedPosition;
gl_Position = projectionMatrix * mvPosition;
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`},Xo={common:{diffuse:{value:new mn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new At},uv2Transform:{value:new At},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new wt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new mn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new mn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new At}},sprite:{diffuse:{value:new mn(16777215)},opacity:{value:1},center:{value:new wt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new At}}},xm={basic:{uniforms:Po([Xo.common,Xo.specularmap,Xo.envmap,Xo.aomap,Xo.lightmap,Xo.fog]),vertexShader:nl.meshbasic_vert,fragmentShader:nl.meshbasic_frag},lambert:{uniforms:Po([Xo.common,Xo.specularmap,Xo.envmap,Xo.aomap,Xo.lightmap,Xo.emissivemap,Xo.fog,Xo.lights,{emissive:{value:new mn(0)}}]),vertexShader:nl.meshlambert_vert,fragmentShader:nl.meshlambert_frag},phong:{uniforms:Po([Xo.common,Xo.specularmap,Xo.envmap,Xo.aomap,Xo.lightmap,Xo.emissivemap,Xo.bumpmap,Xo.normalmap,Xo.displacementmap,Xo.fog,Xo.lights,{emissive:{value:new mn(0)},specular:{value:new mn(1118481)},shininess:{value:30}}]),vertexShader:nl.meshphong_vert,fragmentShader:nl.meshphong_frag},standard:{uniforms:Po([Xo.common,Xo.envmap,Xo.aomap,Xo.lightmap,Xo.emissivemap,Xo.bumpmap,Xo.normalmap,Xo.displacementmap,Xo.roughnessmap,Xo.metalnessmap,Xo.fog,Xo.lights,{emissive:{value:new mn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:nl.meshphysical_vert,fragmentShader:nl.meshphysical_frag},toon:{uniforms:Po([Xo.common,Xo.aomap,Xo.lightmap,Xo.emissivemap,Xo.bumpmap,Xo.normalmap,Xo.displacementmap,Xo.gradientmap,Xo.fog,Xo.lights,{emissive:{value:new mn(0)}}]),vertexShader:nl.meshtoon_vert,fragmentShader:nl.meshtoon_frag},matcap:{uniforms:Po([Xo.common,Xo.bumpmap,Xo.normalmap,Xo.displacementmap,Xo.fog,{matcap:{value:null}}]),vertexShader:nl.meshmatcap_vert,fragmentShader:nl.meshmatcap_frag},points:{uniforms:Po([Xo.points,Xo.fog]),vertexShader:nl.points_vert,fragmentShader:nl.points_frag},dashed:{uniforms:Po([Xo.common,Xo.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:nl.linedashed_vert,fragmentShader:nl.linedashed_frag},depth:{uniforms:Po([Xo.common,Xo.displacementmap]),vertexShader:nl.depth_vert,fragmentShader:nl.depth_frag},normal:{uniforms:Po([Xo.common,Xo.bumpmap,Xo.normalmap,Xo.displacementmap,{opacity:{value:1}}]),vertexShader:nl.normal_vert,fragmentShader:nl.normal_frag},sprite:{uniforms:Po([Xo.sprite,Xo.fog]),vertexShader:nl.sprite_vert,fragmentShader:nl.sprite_frag},background:{uniforms:{uvTransform:{value:new At},t2D:{value:null}},vertexShader:nl.background_vert,fragmentShader:nl.background_frag},cube:{uniforms:Po([Xo.envmap,{opacity:{value:1}}]),vertexShader:nl.cube_vert,fragmentShader:nl.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:nl.equirect_vert,fragmentShader:nl.equirect_frag},distanceRGBA:{uniforms:Po([Xo.common,Xo.displacementmap,{referencePosition:{value:new Ot},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:nl.distanceRGBA_vert,fragmentShader:nl.distanceRGBA_frag},shadow:{uniforms:Po([Xo.lights,Xo.fog,{color:{value:new mn(0)},opacity:{value:1}}]),vertexShader:nl.shadow_vert,fragmentShader:nl.shadow_frag}};function nm(vt,it,lt,pt,_t){const Dt=new mn(0);let Lt,$t,Xt=0,Yt=null,Zt=0,lr=null;function xr(wr,Ir){lt.buffers.color.setClear(wr.r,wr.g,wr.b,Ir,_t)}return{getClearColor:function(){return Dt},setClearColor:function(wr,Ir=1){Dt.set(wr),Xt=Ir,xr(Dt,Xt)},getClearAlpha:function(){return Xt},setClearAlpha:function(wr){Xt=wr,xr(Dt,Xt)},render:function(wr,Ir){let kr=!1,Lr=Ir.isScene===!0?Ir.background:null;Lr&&Lr.isTexture&&(Lr=it.get(Lr));const Xr=vt.xr,_n=Xr.getSession&&Xr.getSession();_n&&_n.environmentBlendMode==="additive"&&(Lr=null),Lr===null?xr(Dt,Xt):Lr&&Lr.isColor&&(xr(Lr,1),kr=!0),(vt.autoClear||kr)&&vt.clear(vt.autoClearColor,vt.autoClearDepth,vt.autoClearStencil),Lr&&(Lr.isCubeTexture||Lr.mapping===306)?($t===void 0&&($t=new os(new eo(1,1,1),new mu({name:"BackgroundCubeMaterial",uniforms:qo(xm.cube.uniforms),vertexShader:xm.cube.vertexShader,fragmentShader:xm.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),$t.geometry.deleteAttribute("normal"),$t.geometry.deleteAttribute("uv"),$t.onBeforeRender=function(On,Kn,Mn){this.matrixWorld.copyPosition(Mn.matrixWorld)},Object.defineProperty($t.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),pt.update($t)),$t.material.uniforms.envMap.value=Lr,$t.material.uniforms.flipEnvMap.value=Lr.isCubeTexture&&Lr._needsFlipEnvMap?-1:1,Yt===Lr&&Zt===Lr.version&&lr===vt.toneMapping||($t.material.needsUpdate=!0,Yt=Lr,Zt=Lr.version,lr=vt.toneMapping),wr.unshift($t,$t.geometry,$t.material,0,0,null)):Lr&&Lr.isTexture&&(Lt===void 0&&(Lt=new os(new Vm(2,2),new mu({name:"BackgroundMaterial",uniforms:qo(xm.background.uniforms),vertexShader:xm.background.vertexShader,fragmentShader:xm.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),Lt.geometry.deleteAttribute("normal"),Object.defineProperty(Lt.material,"map",{get:function(){return this.uniforms.t2D.value}}),pt.update(Lt)),Lt.material.uniforms.t2D.value=Lr,Lr.matrixAutoUpdate===!0&&Lr.updateMatrix(),Lt.material.uniforms.uvTransform.value.copy(Lr.matrix),Yt===Lr&&Zt===Lr.version&&lr===vt.toneMapping||(Lt.material.needsUpdate=!0,Yt=Lr,Zt=Lr.version,lr=vt.toneMapping),wr.unshift(Lt,Lt.geometry,Lt.material,0,0,null))}}}function vv(vt,it,lt,pt){const _t=vt.getParameter(34921),Dt=pt.isWebGL2?null:it.get("OES_vertex_array_object"),Lt=pt.isWebGL2||Dt!==null,$t={},Xt=xr(null);let Yt=Xt;function Zt(Kn){return pt.isWebGL2?vt.bindVertexArray(Kn):Dt.bindVertexArrayOES(Kn)}function lr(Kn){return pt.isWebGL2?vt.deleteVertexArray(Kn):Dt.deleteVertexArrayOES(Kn)}function xr(Kn){const Mn=[],ca=[],Gn=[];for(let Qn=0;Qn<_t;Qn++)Mn[Qn]=0,ca[Qn]=0,Gn[Qn]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:Mn,enabledAttributes:ca,attributeDivisors:Gn,object:Kn,attributes:{},index:null}}function wr(){const Kn=Yt.newAttributes;for(let Mn=0,ca=Kn.length;Mn<ca;Mn++)Kn[Mn]=0}function Ir(Kn){kr(Kn,0)}function kr(Kn,Mn){const ca=Yt.newAttributes,Gn=Yt.enabledAttributes,Qn=Yt.attributeDivisors;ca[Kn]=1,Gn[Kn]===0&&(vt.enableVertexAttribArray(Kn),Gn[Kn]=1),Qn[Kn]!==Mn&&((pt.isWebGL2?vt:it.get("ANGLE_instanced_arrays"))[pt.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](Kn,Mn),Qn[Kn]=Mn)}function Lr(){const Kn=Yt.newAttributes,Mn=Yt.enabledAttributes;for(let ca=0,Gn=Mn.length;ca<Gn;ca++)Mn[ca]!==Kn[ca]&&(vt.disableVertexAttribArray(ca),Mn[ca]=0)}function Xr(Kn,Mn,ca,Gn,Qn,ks){pt.isWebGL2!==!0||ca!==5124&&ca!==5125?vt.vertexAttribPointer(Kn,Mn,ca,Gn,Qn,ks):vt.vertexAttribIPointer(Kn,Mn,ca,Qn,ks)}function _n(){On(),Yt!==Xt&&(Yt=Xt,Zt(Yt.object))}function On(){Xt.geometry=null,Xt.program=null,Xt.wireframe=!1}return{setup:function(Kn,Mn,ca,Gn,Qn){let ks=!1;if(Lt){const Cs=(function(gs,_s,Ts){const ws=Ts.wireframe===!0;let oo=$t[gs.id];oo===void 0&&(oo={},$t[gs.id]=oo);let no=oo[_s.id];no===void 0&&(no={},oo[_s.id]=no);let js=no[ws];return js===void 0&&(js=xr(pt.isWebGL2?vt.createVertexArray():Dt.createVertexArrayOES()),no[ws]=js),js})(Gn,ca,Mn);Yt!==Cs&&(Yt=Cs,Zt(Yt.object)),ks=(function(gs,_s){const Ts=Yt.attributes,ws=gs.attributes;let oo=0;for(const no in ws){const js=Ts[no],Ws=ws[no];if(js===void 0||js.attribute!==Ws||js.data!==Ws.data)return!0;oo++}return Yt.attributesNum!==oo||Yt.index!==_s})(Gn,Qn),ks&&(function(gs,_s){const Ts={},ws=gs.attributes;let oo=0;for(const no in ws){const js=ws[no],Ws={};Ws.attribute=js,js.data&&(Ws.data=js.data),Ts[no]=Ws,oo++}Yt.attributes=Ts,Yt.attributesNum=oo,Yt.index=_s})(Gn,Qn)}else{const Cs=Mn.wireframe===!0;Yt.geometry===Gn.id&&Yt.program===ca.id&&Yt.wireframe===Cs||(Yt.geometry=Gn.id,Yt.program=ca.id,Yt.wireframe=Cs,ks=!0)}Kn.isInstancedMesh===!0&&(ks=!0),Qn!==null&&lt.update(Qn,34963),ks&&((function(Cs,gs,_s,Ts){if(pt.isWebGL2===!1&&(Cs.isInstancedMesh||Ts.isInstancedBufferGeometry)&&it.get("ANGLE_instanced_arrays")===null)return;wr();const ws=Ts.attributes,oo=_s.getAttributes(),no=gs.defaultAttributeValues;for(const js in oo){const Ws=oo[js];if(Ws>=0){const Co=ws[js];if(Co!==void 0){const jo=Co.normalized,Qo=Co.itemSize,xs=lt.get(Co);if(xs===void 0)continue;const Ms=xs.buffer,Io=xs.type,_o=xs.bytesPerElement;if(Co.isInterleavedBufferAttribute){const Ys=Co.data,zo=Ys.stride,Jo=Co.offset;Ys&&Ys.isInstancedInterleavedBuffer?(kr(Ws,Ys.meshPerAttribute),Ts._maxInstanceCount===void 0&&(Ts._maxInstanceCount=Ys.meshPerAttribute*Ys.count)):Ir(Ws),vt.bindBuffer(34962,Ms),Xr(Ws,Qo,Io,jo,zo*_o,Jo*_o)}else Co.isInstancedBufferAttribute?(kr(Ws,Co.meshPerAttribute),Ts._maxInstanceCount===void 0&&(Ts._maxInstanceCount=Co.meshPerAttribute*Co.count)):Ir(Ws),vt.bindBuffer(34962,Ms),Xr(Ws,Qo,Io,jo,0,0)}else if(js==="instanceMatrix"){const jo=lt.get(Cs.instanceMatrix);if(jo===void 0)continue;const Qo=jo.buffer,xs=jo.type;kr(Ws+0,1),kr(Ws+1,1),kr(Ws+2,1),kr(Ws+3,1),vt.bindBuffer(34962,Qo),vt.vertexAttribPointer(Ws+0,4,xs,!1,64,0),vt.vertexAttribPointer(Ws+1,4,xs,!1,64,16),vt.vertexAttribPointer(Ws+2,4,xs,!1,64,32),vt.vertexAttribPointer(Ws+3,4,xs,!1,64,48)}else if(js==="instanceColor"){const jo=lt.get(Cs.instanceColor);if(jo===void 0)continue;const Qo=jo.buffer,xs=jo.type;kr(Ws,1),vt.bindBuffer(34962,Qo),vt.vertexAttribPointer(Ws,3,xs,!1,12,0)}else if(no!==void 0){const jo=no[js];if(jo!==void 0)switch(jo.length){case 2:vt.vertexAttrib2fv(Ws,jo);break;case 3:vt.vertexAttrib3fv(Ws,jo);break;case 4:vt.vertexAttrib4fv(Ws,jo);break;default:vt.vertexAttrib1fv(Ws,jo)}}}}Lr()})(Kn,Mn,ca,Gn),Qn!==null&&vt.bindBuffer(34963,lt.get(Qn).buffer))},reset:_n,resetDefaultState:On,dispose:function(){_n();for(const Kn in $t){const Mn=$t[Kn];for(const ca in Mn){const Gn=Mn[ca];for(const Qn in Gn)lr(Gn[Qn].object),delete Gn[Qn];delete Mn[ca]}delete $t[Kn]}},releaseStatesOfGeometry:function(Kn){if($t[Kn.id]===void 0)return;const Mn=$t[Kn.id];for(const ca in Mn){const Gn=Mn[ca];for(const Qn in Gn)lr(Gn[Qn].object),delete Gn[Qn];delete Mn[ca]}delete $t[Kn.id]},releaseStatesOfProgram:function(Kn){for(const Mn in $t){const ca=$t[Mn];if(ca[Kn.id]===void 0)continue;const Gn=ca[Kn.id];for(const Qn in Gn)lr(Gn[Qn].object),delete Gn[Qn];delete ca[Kn.id]}},initAttributes:wr,enableAttribute:Ir,disableUnusedAttributes:Lr}}function rv(vt,it,lt,pt){const _t=pt.isWebGL2;let Dt;this.setMode=function(Lt){Dt=Lt},this.render=function(Lt,$t){vt.drawArrays(Dt,Lt,$t),lt.update($t,Dt,1)},this.renderInstances=function(Lt,$t,Xt){if(Xt===0)return;let Yt,Zt;if(_t)Yt=vt,Zt="drawArraysInstanced";else if(Yt=it.get("ANGLE_instanced_arrays"),Zt="drawArraysInstancedANGLE",Yt===null)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");Yt[Zt](Dt,Lt,$t,Xt),lt.update($t,Dt,Xt)}}function Lp(vt,it,lt){let pt;function _t(Kn){if(Kn==="highp"){if(vt.getShaderPrecisionFormat(35633,36338).precision>0&&vt.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";Kn="mediump"}return Kn==="mediump"&&vt.getShaderPrecisionFormat(35633,36337).precision>0&&vt.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const Dt=typeof WebGL2RenderingContext<"u"&&vt instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&vt instanceof WebGL2ComputeRenderingContext;let Lt=lt.precision!==void 0?lt.precision:"highp";const $t=_t(Lt);$t!==Lt&&(console.warn("THREE.WebGLRenderer:",Lt,"not supported, using",$t,"instead."),Lt=$t);const Xt=Dt||it.has("WEBGL_draw_buffers"),Yt=lt.logarithmicDepthBuffer===!0,Zt=vt.getParameter(34930),lr=vt.getParameter(35660),xr=vt.getParameter(3379),wr=vt.getParameter(34076),Ir=vt.getParameter(34921),kr=vt.getParameter(36347),Lr=vt.getParameter(36348),Xr=vt.getParameter(36349),_n=lr>0,On=Dt||it.has("OES_texture_float");return{isWebGL2:Dt,drawBuffers:Xt,getMaxAnisotropy:function(){if(pt!==void 0)return pt;if(it.has("EXT_texture_filter_anisotropic")===!0){const Kn=it.get("EXT_texture_filter_anisotropic");pt=vt.getParameter(Kn.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else pt=0;return pt},getMaxPrecision:_t,precision:Lt,logarithmicDepthBuffer:Yt,maxTextures:Zt,maxVertexTextures:lr,maxTextureSize:xr,maxCubemapSize:wr,maxAttributes:Ir,maxVertexUniforms:kr,maxVaryings:Lr,maxFragmentUniforms:Xr,vertexTextures:_n,floatFragmentTextures:On,floatVertexTextures:_n&&On,maxSamples:Dt?vt.getParameter(36183):0}}function cp(vt){const it=this;let lt=null,pt=0,_t=!1,Dt=!1;const Lt=new lp,$t=new At,Xt={value:null,needsUpdate:!1};function Yt(){Xt.value!==lt&&(Xt.value=lt,Xt.needsUpdate=pt>0),it.numPlanes=pt,it.numIntersection=0}function Zt(lr,xr,wr,Ir){const kr=lr!==null?lr.length:0;let Lr=null;if(kr!==0){if(Lr=Xt.value,Ir!==!0||Lr===null){const Xr=wr+4*kr,_n=xr.matrixWorldInverse;$t.getNormalMatrix(_n),(Lr===null||Lr.length<Xr)&&(Lr=new Float32Array(Xr));for(let On=0,Kn=wr;On!==kr;++On,Kn+=4)Lt.copy(lr[On]).applyMatrix4(_n,$t),Lt.normal.toArray(Lr,Kn),Lr[Kn+3]=Lt.constant}Xt.value=Lr,Xt.needsUpdate=!0}return it.numPlanes=kr,it.numIntersection=0,Lr}this.uniform=Xt,this.numPlanes=0,this.numIntersection=0,this.init=function(lr,xr,wr){const Ir=lr.length!==0||xr||pt!==0||_t;return _t=xr,lt=Zt(lr,wr,0),pt=lr.length,Ir},this.beginShadows=function(){Dt=!0,Zt(null)},this.endShadows=function(){Dt=!1,Yt()},this.setState=function(lr,xr,wr){const Ir=lr.clippingPlanes,kr=lr.clipIntersection,Lr=lr.clipShadows,Xr=vt.get(lr);if(!_t||Ir===null||Ir.length===0||Dt&&!Lr)Dt?Zt(null):Yt();else{const _n=Dt?0:pt,On=4*_n;let Kn=Xr.clippingState||null;Xt.value=Kn,Kn=Zt(Ir,xr,On,wr);for(let Mn=0;Mn!==On;++Mn)Kn[Mn]=lt[Mn];Xr.clippingState=Kn,this.numIntersection=kr?this.numPlanes:0,this.numPlanes+=_n}}}function nv(vt){let it=new WeakMap;function lt(_t,Dt){return Dt===303?_t.mapping=301:Dt===304&&(_t.mapping=302),_t}function pt(_t){const Dt=_t.target;Dt.removeEventListener("dispose",pt);const Lt=it.get(Dt);Lt!==void 0&&(it.delete(Dt),Lt.dispose())}return{get:function(_t){if(_t&&_t.isTexture){const Dt=_t.mapping;if(Dt===303||Dt===304){if(it.has(_t))return lt(it.get(_t).texture,_t.mapping);{const Lt=_t.image;if(Lt&&Lt.height>0){const $t=vt.getRenderTarget(),Xt=new _c(Lt.height/2);return Xt.fromEquirectangularTexture(vt,_t),it.set(_t,Xt),vt.setRenderTarget($t),_t.addEventListener("dispose",pt),lt(Xt.texture,_t.mapping)}return null}}}return _t},dispose:function(){it=new WeakMap}}}function Hm(vt){const it={};function lt(pt){if(it[pt]!==void 0)return it[pt];let _t;switch(pt){case"WEBGL_depth_texture":_t=vt.getExtension("WEBGL_depth_texture")||vt.getExtension("MOZ_WEBGL_depth_texture")||vt.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":_t=vt.getExtension("EXT_texture_filter_anisotropic")||vt.getExtension("MOZ_EXT_texture_filter_anisotropic")||vt.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":_t=vt.getExtension("WEBGL_compressed_texture_s3tc")||vt.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||vt.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":_t=vt.getExtension("WEBGL_compressed_texture_pvrtc")||vt.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:_t=vt.getExtension(pt)}return it[pt]=_t,_t}return{has:function(pt){return lt(pt)!==null},init:function(pt){pt.isWebGL2?lt("EXT_color_buffer_float"):(lt("WEBGL_depth_texture"),lt("OES_texture_float"),lt("OES_texture_half_float"),lt("OES_texture_half_float_linear"),lt("OES_standard_derivatives"),lt("OES_element_index_uint"),lt("OES_vertex_array_object"),lt("ANGLE_instanced_arrays")),lt("OES_texture_float_linear"),lt("EXT_color_buffer_half_float")},get:function(pt){const _t=lt(pt);return _t===null&&console.warn("THREE.WebGLRenderer: "+pt+" extension not supported."),_t}}}function Rv(vt,it,lt,pt){const _t={},Dt=new WeakMap;function Lt(Xt){const Yt=Xt.target;Yt.index!==null&&it.remove(Yt.index);for(const lr in Yt.attributes)it.remove(Yt.attributes[lr]);Yt.removeEventListener("dispose",Lt),delete _t[Yt.id];const Zt=Dt.get(Yt);Zt&&(it.remove(Zt),Dt.delete(Yt)),pt.releaseStatesOfGeometry(Yt),Yt.isInstancedBufferGeometry===!0&&delete Yt._maxInstanceCount,lt.memory.geometries--}function $t(Xt){const Yt=[],Zt=Xt.index,lr=Xt.attributes.position;let xr=0;if(Zt!==null){const kr=Zt.array;xr=Zt.version;for(let Lr=0,Xr=kr.length;Lr<Xr;Lr+=3){const _n=kr[Lr+0],On=kr[Lr+1],Kn=kr[Lr+2];Yt.push(_n,On,On,Kn,Kn,_n)}}else{const kr=lr.array;xr=lr.version;for(let Lr=0,Xr=kr.length/3-1;Lr<Xr;Lr+=3){const _n=Lr+0,On=Lr+1,Kn=Lr+2;Yt.push(_n,On,On,Kn,Kn,_n)}}const wr=new(Nu(Yt)>65535?ls:Xs)(Yt,1);wr.version=xr;const Ir=Dt.get(Xt);Ir&&it.remove(Ir),Dt.set(Xt,wr)}return{get:function(Xt,Yt){return _t[Yt.id]===!0||(Yt.addEventListener("dispose",Lt),_t[Yt.id]=!0,lt.memory.geometries++),Yt},update:function(Xt){const Yt=Xt.attributes;for(const lr in Yt)it.update(Yt[lr],34962);const Zt=Xt.morphAttributes;for(const lr in Zt){const xr=Zt[lr];for(let wr=0,Ir=xr.length;wr<Ir;wr++)it.update(xr[wr],34962)}},getWireframeAttribute:function(Xt){const Yt=Dt.get(Xt);if(Yt){const Zt=Xt.index;Zt!==null&&Yt.version<Zt.version&&$t(Xt)}else $t(Xt);return Dt.get(Xt)}}}function mm(vt,it,lt,pt){const _t=pt.isWebGL2;let Dt,Lt,$t;this.setMode=function(Xt){Dt=Xt},this.setIndex=function(Xt){Lt=Xt.type,$t=Xt.bytesPerElement},this.render=function(Xt,Yt){vt.drawElements(Dt,Yt,Lt,Xt*$t),lt.update(Yt,Dt,1)},this.renderInstances=function(Xt,Yt,Zt){if(Zt===0)return;let lr,xr;if(_t)lr=vt,xr="drawElementsInstanced";else if(lr=it.get("ANGLE_instanced_arrays"),xr="drawElementsInstancedANGLE",lr===null)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");lr[xr](Dt,Yt,Lt,Xt*$t,Zt),lt.update(Yt,Dt,Zt)}}function Wm(vt){const it={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:it,programs:null,autoReset:!0,reset:function(){it.frame++,it.calls=0,it.triangles=0,it.points=0,it.lines=0},update:function(lt,pt,_t){switch(it.calls++,pt){case 4:it.triangles+=_t*(lt/3);break;case 1:it.lines+=_t*(lt/2);break;case 3:it.lines+=_t*(lt-1);break;case 2:it.lines+=_t*lt;break;case 0:it.points+=_t*lt;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",pt)}}}}function uy(vt,it){return vt[0]-it[0]}function Sm(vt,it){return Math.abs(it[1])-Math.abs(vt[1])}function wm(vt){const it={},lt=new Float32Array(8),pt=[];for(let _t=0;_t<8;_t++)pt[_t]=[_t,0];return{update:function(_t,Dt,Lt,$t){const Xt=_t.morphTargetInfluences,Yt=Xt===void 0?0:Xt.length;let Zt=it[Dt.id];if(Zt===void 0||Zt.length!==Yt){Zt=[];for(let kr=0;kr<Yt;kr++)Zt[kr]=[kr,0];it[Dt.id]=Zt}for(let kr=0;kr<Yt;kr++){const Lr=Zt[kr];Lr[0]=kr,Lr[1]=Xt[kr]}Zt.sort(Sm);for(let kr=0;kr<8;kr++)kr<Yt&&Zt[kr][1]?(pt[kr][0]=Zt[kr][0],pt[kr][1]=Zt[kr][1]):(pt[kr][0]=Number.MAX_SAFE_INTEGER,pt[kr][1]=0);pt.sort(uy);const lr=Lt.morphTargets&&Dt.morphAttributes.position,xr=Lt.morphNormals&&Dt.morphAttributes.normal;let wr=0;for(let kr=0;kr<8;kr++){const Lr=pt[kr],Xr=Lr[0],_n=Lr[1];Xr!==Number.MAX_SAFE_INTEGER&&_n?(lr&&Dt.getAttribute("morphTarget"+kr)!==lr[Xr]&&Dt.setAttribute("morphTarget"+kr,lr[Xr]),xr&&Dt.getAttribute("morphNormal"+kr)!==xr[Xr]&&Dt.setAttribute("morphNormal"+kr,xr[Xr]),lt[kr]=_n,wr+=_n):(lr&&Dt.hasAttribute("morphTarget"+kr)===!0&&Dt.deleteAttribute("morphTarget"+kr),xr&&Dt.hasAttribute("morphNormal"+kr)===!0&&Dt.deleteAttribute("morphNormal"+kr),lt[kr]=0)}const Ir=Dt.morphTargetsRelative?1:1-wr;$t.getUniforms().setValue(vt,"morphTargetBaseInfluence",Ir),$t.getUniforms().setValue(vt,"morphTargetInfluences",lt)}}}function tm(vt,it,lt,pt){let _t=new WeakMap;function Dt(Lt){const $t=Lt.target;$t.removeEventListener("dispose",Dt),lt.remove($t.instanceMatrix),$t.instanceColor!==null&&lt.remove($t.instanceColor)}return{update:function(Lt){const $t=pt.render.frame,Xt=Lt.geometry,Yt=it.get(Lt,Xt);return _t.get(Yt)!==$t&&(it.update(Yt),_t.set(Yt,$t)),Lt.isInstancedMesh&&(Lt.hasEventListener("dispose",Dt)===!1&&Lt.addEventListener("dispose",Dt),lt.update(Lt.instanceMatrix,34962),Lt.instanceColor!==null&&lt.update(Lt.instanceColor,34962)),Yt},dispose:function(){_t=new WeakMap}}}xm.physical={uniforms:Po([xm.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new wt(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new mn(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new wt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new mn(0)}}]),vertexShader:nl.meshphysical_vert,fragmentShader:nl.meshphysical_frag};class iv extends Ft{constructor(it=null,lt=1,pt=1,_t=1){super(null),this.image={data:it,width:lt,height:pt,depth:_t},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}iv.prototype.isDataTexture2DArray=!0;class _d extends Ft{constructor(it=null,lt=1,pt=1,_t=1){super(null),this.image={data:it,width:lt,height:pt,depth:_t},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}_d.prototype.isDataTexture3D=!0;const Xm=new Ft,Cl=new iv,Cy=new _d,zv=new up,Fp=[],Tm=[],yv=new Float32Array(16),_l=new Float32Array(9),Wp=new Float32Array(4);function Zp(vt,it,lt){const pt=vt[0];if(pt<=0||pt>0)return vt;const _t=it*lt;let Dt=Fp[_t];if(Dt===void 0&&(Dt=new Float32Array(_t),Fp[_t]=Dt),it!==0){pt.toArray(Dt,0);for(let Lt=1,$t=0;Lt!==it;++Lt)$t+=lt,vt[Lt].toArray(Dt,$t)}return Dt}function Xp(vt,it){if(vt.length!==it.length)return!1;for(let lt=0,pt=vt.length;lt<pt;lt++)if(vt[lt]!==it[lt])return!1;return!0}function np(vt,it){for(let lt=0,pt=it.length;lt<pt;lt++)vt[lt]=it[lt]}function Rm(vt,it){let lt=Tm[it];lt===void 0&&(lt=new Int32Array(it),Tm[it]=lt);for(let pt=0;pt!==it;++pt)lt[pt]=vt.allocateTextureUnit();return lt}function _0(vt,it){const lt=this.cache;lt[0]!==it&&(vt.uniform1f(this.addr,it),lt[0]=it)}function bv(vt,it){const lt=this.cache;if(it.x!==void 0)lt[0]===it.x&&lt[1]===it.y||(vt.uniform2f(this.addr,it.x,it.y),lt[0]=it.x,lt[1]=it.y);else{if(Xp(lt,it))return;vt.uniform2fv(this.addr,it),np(lt,it)}}function Cr(vt,it){const lt=this.cache;if(it.x!==void 0)lt[0]===it.x&&lt[1]===it.y&&lt[2]===it.z||(vt.uniform3f(this.addr,it.x,it.y,it.z),lt[0]=it.x,lt[1]=it.y,lt[2]=it.z);else if(it.r!==void 0)lt[0]===it.r&&lt[1]===it.g&&lt[2]===it.b||(vt.uniform3f(this.addr,it.r,it.g,it.b),lt[0]=it.r,lt[1]=it.g,lt[2]=it.b);else{if(Xp(lt,it))return;vt.uniform3fv(this.addr,it),np(lt,it)}}function ir(vt,it){const lt=this.cache;if(it.x!==void 0)lt[0]===it.x&&lt[1]===it.y&&lt[2]===it.z&&lt[3]===it.w||(vt.uniform4f(this.addr,it.x,it.y,it.z,it.w),lt[0]=it.x,lt[1]=it.y,lt[2]=it.z,lt[3]=it.w);else{if(Xp(lt,it))return;vt.uniform4fv(this.addr,it),np(lt,it)}}function nr(vt,it){const lt=this.cache,pt=it.elements;if(pt===void 0){if(Xp(lt,it))return;vt.uniformMatrix2fv(this.addr,!1,it),np(lt,it)}else{if(Xp(lt,pt))return;Wp.set(pt),vt.uniformMatrix2fv(this.addr,!1,Wp),np(lt,pt)}}function dr(vt,it){const lt=this.cache,pt=it.elements;if(pt===void 0){if(Xp(lt,it))return;vt.uniformMatrix3fv(this.addr,!1,it),np(lt,it)}else{if(Xp(lt,pt))return;_l.set(pt),vt.uniformMatrix3fv(this.addr,!1,_l),np(lt,pt)}}function Pr(vt,it){const lt=this.cache,pt=it.elements;if(pt===void 0){if(Xp(lt,it))return;vt.uniformMatrix4fv(this.addr,!1,it),np(lt,it)}else{if(Xp(lt,pt))return;yv.set(pt),vt.uniformMatrix4fv(this.addr,!1,yv),np(lt,pt)}}function Hr(vt,it){const lt=this.cache;lt[0]!==it&&(vt.uniform1i(this.addr,it),lt[0]=it)}function bn(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform2iv(this.addr,it),np(lt,it))}function Pn(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform3iv(this.addr,it),np(lt,it))}function Wn(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform4iv(this.addr,it),np(lt,it))}function ms(vt,it){const lt=this.cache;lt[0]!==it&&(vt.uniform1ui(this.addr,it),lt[0]=it)}function Es(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform2uiv(this.addr,it),np(lt,it))}function ao(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform3uiv(this.addr,it),np(lt,it))}function Js(vt,it){const lt=this.cache;Xp(lt,it)||(vt.uniform4uiv(this.addr,it),np(lt,it))}function po(vt,it,lt){const pt=this.cache,_t=lt.allocateTextureUnit();pt[0]!==_t&&(vt.uniform1i(this.addr,_t),pt[0]=_t),lt.safeSetTexture2D(it||Xm,_t)}function So(vt,it,lt){const pt=this.cache,_t=lt.allocateTextureUnit();pt[0]!==_t&&(vt.uniform1i(this.addr,_t),pt[0]=_t),lt.setTexture3D(it||Cy,_t)}function $o(vt,it,lt){const pt=this.cache,_t=lt.allocateTextureUnit();pt[0]!==_t&&(vt.uniform1i(this.addr,_t),pt[0]=_t),lt.safeSetTextureCube(it||zv,_t)}function Zo(vt,it,lt){const pt=this.cache,_t=lt.allocateTextureUnit();pt[0]!==_t&&(vt.uniform1i(this.addr,_t),pt[0]=_t),lt.setTexture2DArray(it||Cl,_t)}function au(vt,it){vt.uniform1fv(this.addr,it)}function ou(vt,it){const lt=Zp(it,this.size,2);vt.uniform2fv(this.addr,lt)}function Yo(vt,it){const lt=Zp(it,this.size,3);vt.uniform3fv(this.addr,lt)}function Ru(vt,it){const lt=Zp(it,this.size,4);vt.uniform4fv(this.addr,lt)}function ku(vt,it){const lt=Zp(it,this.size,4);vt.uniformMatrix2fv(this.addr,!1,lt)}function Vu(vt,it){const lt=Zp(it,this.size,9);vt.uniformMatrix3fv(this.addr,!1,lt)}function sl(vt,it){const lt=Zp(it,this.size,16);vt.uniformMatrix4fv(this.addr,!1,lt)}function nu(vt,it){vt.uniform1iv(this.addr,it)}function fu(vt,it){vt.uniform2iv(this.addr,it)}function Vo(vt,it){vt.uniform3iv(this.addr,it)}function ll(vt,it){vt.uniform4iv(this.addr,it)}function zl(vt,it){vt.uniform1uiv(this.addr,it)}function Gl(vt,it){vt.uniform2uiv(this.addr,it)}function Dl(vt,it){vt.uniform3uiv(this.addr,it)}function dp(vt,it){vt.uniform4uiv(this.addr,it)}function Bp(vt,it,lt){const pt=it.length,_t=Rm(lt,pt);vt.uniform1iv(this.addr,_t);for(let Dt=0;Dt!==pt;++Dt)lt.safeSetTexture2D(it[Dt]||Xm,_t[Dt])}function cm(vt,it,lt){const pt=it.length,_t=Rm(lt,pt);vt.uniform1iv(this.addr,_t);for(let Dt=0;Dt!==pt;++Dt)lt.safeSetTextureCube(it[Dt]||zv,_t[Dt])}function Rl(vt,it,lt){this.id=vt,this.addr=lt,this.cache=[],this.setValue=(function(pt){switch(pt){case 5126:return _0;case 35664:return bv;case 35665:return Cr;case 35666:return ir;case 35674:return nr;case 35675:return dr;case 35676:return Pr;case 5124:case 35670:return Hr;case 35667:case 35671:return bn;case 35668:case 35672:return Pn;case 35669:case 35673:return Wn;case 5125:return ms;case 36294:return Es;case 36295:return ao;case 36296:return Js;case 35678:case 36198:case 36298:case 36306:case 35682:return po;case 35679:case 36299:case 36307:return So;case 35680:case 36300:case 36308:case 36293:return $o;case 36289:case 36303:case 36311:case 36292:return Zo}})(it.type)}function hl(vt,it,lt){this.id=vt,this.addr=lt,this.cache=[],this.size=it.size,this.setValue=(function(pt){switch(pt){case 5126:return au;case 35664:return ou;case 35665:return Yo;case 35666:return Ru;case 35674:return ku;case 35675:return Vu;case 35676:return sl;case 5124:case 35670:return nu;case 35667:case 35671:return fu;case 35668:case 35672:return Vo;case 35669:case 35673:return ll;case 5125:return zl;case 36294:return Gl;case 36295:return Dl;case 36296:return dp;case 35678:case 36198:case 36298:case 36306:case 35682:return Bp;case 35680:case 36300:case 36308:case 36293:return cm}})(it.type)}function hp(vt){this.id=vt,this.seq=[],this.map={}}hl.prototype.updateCache=function(vt){const it=this.cache;vt instanceof Float32Array&&it.length!==vt.length&&(this.cache=new Float32Array(vt.length)),np(it,vt)},hp.prototype.setValue=function(vt,it,lt){const pt=this.seq;for(let _t=0,Dt=pt.length;_t!==Dt;++_t){const Lt=pt[_t];Lt.setValue(vt,it[Lt.id],lt)}};const Cp=/(\w+)(\])?(\[|\.)?/g;function il(vt,it){vt.seq.push(it),vt.map[it.id]=it}function Jp(vt,it,lt){const pt=vt.name,_t=pt.length;for(Cp.lastIndex=0;;){const Dt=Cp.exec(pt),Lt=Cp.lastIndex;let $t=Dt[1];const Xt=Dt[2]==="]",Yt=Dt[3];if(Xt&&($t|=0),Yt===void 0||Yt==="["&&Lt+2===_t){il(lt,Yt===void 0?new Rl($t,vt,it):new hl($t,vt,it));break}{let Zt=lt.map[$t];Zt===void 0&&(Zt=new hp($t),il(lt,Zt)),lt=Zt}}}function fp(vt,it){this.seq=[],this.map={};const lt=vt.getProgramParameter(it,35718);for(let pt=0;pt<lt;++pt){const _t=vt.getActiveUniform(it,pt);Jp(_t,vt.getUniformLocation(it,_t.name),this)}}function Jy(vt,it,lt){const pt=vt.createShader(it);return vt.shaderSource(pt,lt),vt.compileShader(pt),pt}fp.prototype.setValue=function(vt,it,lt,pt){const _t=this.map[it];_t!==void 0&&_t.setValue(vt,lt,pt)},fp.prototype.setOptional=function(vt,it,lt){const pt=it[lt];pt!==void 0&&this.setValue(vt,lt,pt)},fp.upload=function(vt,it,lt,pt){for(let _t=0,Dt=it.length;_t!==Dt;++_t){const Lt=it[_t],$t=lt[Lt.id];$t.needsUpdate!==!1&&Lt.setValue(vt,$t.value,pt)}},fp.seqWithValue=function(vt,it){const lt=[];for(let pt=0,_t=vt.length;pt!==_t;++pt){const Dt=vt[pt];Dt.id in it&&lt.push(Dt)}return lt};let ip=0;function Bs(vt){switch(vt){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",vt),["Linear","( value )"]}}function Do(vt,it,lt){const pt=vt.getShaderParameter(it,35713),_t=vt.getShaderInfoLog(it).trim();return pt&&_t===""?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+lt+`
`+_t+(function(Dt){const Lt=Dt.split(`
`);for(let $t=0;$t<Lt.length;$t++)Lt[$t]=$t+1+": "+Lt[$t];return Lt.join(`
`)})(vt.getShaderSource(it))}function fo(vt,it){const lt=Bs(it);return"vec4 "+vt+"( vec4 value ) { return "+lt[0]+"ToLinear"+lt[1]+"; }"}function bu(vt,it){const lt=Bs(it);return"vec4 "+vt+"( vec4 value ) { return LinearTo"+lt[0]+lt[1]+"; }"}function Qu(vt,it){let lt;switch(it){case 1:lt="Linear";break;case 2:lt="Reinhard";break;case 3:lt="OptimizedCineon";break;case 4:lt="ACESFilmic";break;case 5:lt="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",it),lt="Linear"}return"vec3 "+vt+"( vec3 color ) { return "+lt+"ToneMapping( color ); }"}function jl(vt){return vt!==""}function Yp(vt,it){return vt.replace(/NUM_DIR_LIGHTS/g,it.numDirLights).replace(/NUM_SPOT_LIGHTS/g,it.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,it.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,it.numPointLights).replace(/NUM_HEMI_LIGHTS/g,it.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,it.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,it.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,it.numPointLightShadows)}function _h(vt,it){return vt.replace(/NUM_CLIPPING_PLANES/g,it.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,it.numClippingPlanes-it.numClipIntersection)}const Pm=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lm(vt){return vt.replace(Pm,_v)}function _v(vt,it){const lt=nl[it];if(lt===void 0)throw new Error("Can not resolve #include <"+it+">");return Lm(lt)}const gp=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,o_=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Gv(vt){return vt.replace(o_,Dy).replace(gp,ly)}function ly(vt,it,lt,pt){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Dy(vt,it,lt,pt)}function Dy(vt,it,lt,pt){let _t="";for(let Dt=parseInt(it);Dt<parseInt(lt);Dt++)_t+=pt.replace(/\[\s*i\s*\]/g,"[ "+Dt+" ]").replace(/UNROLLED_LOOP_INDEX/g,Dt);return _t}function Zu(vt){let it="precision "+vt.precision+` float;
precision `+vt.precision+" int;";return vt.precision==="highp"?it+=`
#define HIGH_PRECISION`:vt.precision==="mediump"?it+=`
#define MEDIUM_PRECISION`:vt.precision==="lowp"&&(it+=`
#define LOW_PRECISION`),it}function N_(vt,it,lt,pt){const _t=vt.getContext(),Dt=lt.defines;let Lt=lt.vertexShader,$t=lt.fragmentShader;const Xt=(function(Qn){let ks="SHADOWMAP_TYPE_BASIC";return Qn.shadowMapType===1?ks="SHADOWMAP_TYPE_PCF":Qn.shadowMapType===2?ks="SHADOWMAP_TYPE_PCF_SOFT":Qn.shadowMapType===3&&(ks="SHADOWMAP_TYPE_VSM"),ks})(lt),Yt=(function(Qn){let ks="ENVMAP_TYPE_CUBE";if(Qn.envMap)switch(Qn.envMapMode){case 301:case 302:ks="ENVMAP_TYPE_CUBE";break;case 306:case 307:ks="ENVMAP_TYPE_CUBE_UV"}return ks})(lt),Zt=(function(Qn){let ks="ENVMAP_MODE_REFLECTION";if(Qn.envMap)switch(Qn.envMapMode){case 302:case 307:ks="ENVMAP_MODE_REFRACTION"}return ks})(lt),lr=(function(Qn){let ks="ENVMAP_BLENDING_NONE";if(Qn.envMap)switch(Qn.combine){case 0:ks="ENVMAP_BLENDING_MULTIPLY";break;case 1:ks="ENVMAP_BLENDING_MIX";break;case 2:ks="ENVMAP_BLENDING_ADD"}return ks})(lt),xr=vt.gammaFactor>0?vt.gammaFactor:1,wr=lt.isWebGL2?"":(function(Qn){return[Qn.extensionDerivatives||Qn.envMapCubeUV||Qn.bumpMap||Qn.tangentSpaceNormalMap||Qn.clearcoatNormalMap||Qn.flatShading||Qn.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(Qn.extensionFragDepth||Qn.logarithmicDepthBuffer)&&Qn.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",Qn.extensionDrawBuffers&&Qn.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(Qn.extensionShaderTextureLOD||Qn.envMap||Qn.transmission>0)&&Qn.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(jl).join(`
`)})(lt),Ir=(function(Qn){const ks=[];for(const Cs in Qn){const gs=Qn[Cs];gs!==!1&&ks.push("#define "+Cs+" "+gs)}return ks.join(`
`)})(Dt),kr=_t.createProgram();let Lr,Xr,_n=lt.glslVersion?"#version "+lt.glslVersion+`
`:"";lt.isRawShaderMaterial?(Lr=[Ir].filter(jl).join(`
`),Lr.length>0&&(Lr+=`
`),Xr=[wr,Ir].filter(jl).join(`
`),Xr.length>0&&(Xr+=`
`)):(Lr=[Zu(lt),"#define SHADER_NAME "+lt.shaderName,Ir,lt.instancing?"#define USE_INSTANCING":"",lt.instancingColor?"#define USE_INSTANCING_COLOR":"",lt.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+xr,"#define MAX_BONES "+lt.maxBones,lt.useFog&&lt.fog?"#define USE_FOG":"",lt.useFog&&lt.fogExp2?"#define FOG_EXP2":"",lt.map?"#define USE_MAP":"",lt.envMap?"#define USE_ENVMAP":"",lt.envMap?"#define "+Zt:"",lt.lightMap?"#define USE_LIGHTMAP":"",lt.aoMap?"#define USE_AOMAP":"",lt.emissiveMap?"#define USE_EMISSIVEMAP":"",lt.bumpMap?"#define USE_BUMPMAP":"",lt.normalMap?"#define USE_NORMALMAP":"",lt.normalMap&&lt.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",lt.normalMap&&lt.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",lt.clearcoatMap?"#define USE_CLEARCOATMAP":"",lt.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",lt.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",lt.displacementMap&&lt.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",lt.specularMap?"#define USE_SPECULARMAP":"",lt.roughnessMap?"#define USE_ROUGHNESSMAP":"",lt.metalnessMap?"#define USE_METALNESSMAP":"",lt.alphaMap?"#define USE_ALPHAMAP":"",lt.transmission?"#define USE_TRANSMISSION":"",lt.transmissionMap?"#define USE_TRANSMISSIONMAP":"",lt.thicknessMap?"#define USE_THICKNESSMAP":"",lt.vertexTangents?"#define USE_TANGENT":"",lt.vertexColors?"#define USE_COLOR":"",lt.vertexAlphas?"#define USE_COLOR_ALPHA":"",lt.vertexUvs?"#define USE_UV":"",lt.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",lt.flatShading?"#define FLAT_SHADED":"",lt.skinning?"#define USE_SKINNING":"",lt.useVertexTexture?"#define BONE_TEXTURE":"",lt.morphTargets?"#define USE_MORPHTARGETS":"",lt.morphNormals&&lt.flatShading===!1?"#define USE_MORPHNORMALS":"",lt.doubleSided?"#define DOUBLE_SIDED":"",lt.flipSided?"#define FLIP_SIDED":"",lt.shadowMapEnabled?"#define USE_SHADOWMAP":"",lt.shadowMapEnabled?"#define "+Xt:"",lt.sizeAttenuation?"#define USE_SIZEATTENUATION":"",lt.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",lt.logarithmicDepthBuffer&&lt.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
`].filter(jl).join(`
`),Xr=[wr,Zu(lt),"#define SHADER_NAME "+lt.shaderName,Ir,lt.alphaTest?"#define ALPHATEST "+lt.alphaTest+(lt.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+xr,lt.useFog&&lt.fog?"#define USE_FOG":"",lt.useFog&&lt.fogExp2?"#define FOG_EXP2":"",lt.map?"#define USE_MAP":"",lt.matcap?"#define USE_MATCAP":"",lt.envMap?"#define USE_ENVMAP":"",lt.envMap?"#define "+Yt:"",lt.envMap?"#define "+Zt:"",lt.envMap?"#define "+lr:"",lt.lightMap?"#define USE_LIGHTMAP":"",lt.aoMap?"#define USE_AOMAP":"",lt.emissiveMap?"#define USE_EMISSIVEMAP":"",lt.bumpMap?"#define USE_BUMPMAP":"",lt.normalMap?"#define USE_NORMALMAP":"",lt.normalMap&&lt.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",lt.normalMap&&lt.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",lt.clearcoatMap?"#define USE_CLEARCOATMAP":"",lt.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",lt.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",lt.specularMap?"#define USE_SPECULARMAP":"",lt.roughnessMap?"#define USE_ROUGHNESSMAP":"",lt.metalnessMap?"#define USE_METALNESSMAP":"",lt.alphaMap?"#define USE_ALPHAMAP":"",lt.sheen?"#define USE_SHEEN":"",lt.transmission?"#define USE_TRANSMISSION":"",lt.transmissionMap?"#define USE_TRANSMISSIONMAP":"",lt.thicknessMap?"#define USE_THICKNESSMAP":"",lt.vertexTangents?"#define USE_TANGENT":"",lt.vertexColors||lt.instancingColor?"#define USE_COLOR":"",lt.vertexAlphas?"#define USE_COLOR_ALPHA":"",lt.vertexUvs?"#define USE_UV":"",lt.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",lt.gradientMap?"#define USE_GRADIENTMAP":"",lt.flatShading?"#define FLAT_SHADED":"",lt.doubleSided?"#define DOUBLE_SIDED":"",lt.flipSided?"#define FLIP_SIDED":"",lt.shadowMapEnabled?"#define USE_SHADOWMAP":"",lt.shadowMapEnabled?"#define "+Xt:"",lt.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",lt.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",lt.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",lt.logarithmicDepthBuffer&&lt.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(lt.extensionShaderTextureLOD||lt.envMap)&&lt.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",lt.toneMapping!==0?"#define TONE_MAPPING":"",lt.toneMapping!==0?nl.tonemapping_pars_fragment:"",lt.toneMapping!==0?Qu("toneMapping",lt.toneMapping):"",lt.dithering?"#define DITHERING":"",nl.encodings_pars_fragment,lt.map?fo("mapTexelToLinear",lt.mapEncoding):"",lt.matcap?fo("matcapTexelToLinear",lt.matcapEncoding):"",lt.envMap?fo("envMapTexelToLinear",lt.envMapEncoding):"",lt.emissiveMap?fo("emissiveMapTexelToLinear",lt.emissiveMapEncoding):"",lt.lightMap?fo("lightMapTexelToLinear",lt.lightMapEncoding):"",bu("linearToOutputTexel",lt.outputEncoding),lt.depthPacking?"#define DEPTH_PACKING "+lt.depthPacking:"",`
`].filter(jl).join(`
`)),Lt=Lm(Lt),Lt=Yp(Lt,lt),Lt=_h(Lt,lt),$t=Lm($t),$t=Yp($t,lt),$t=_h($t,lt),Lt=Gv(Lt),$t=Gv($t),lt.isWebGL2&&lt.isRawShaderMaterial!==!0&&(_n=`#version 300 es
`,Lr=["#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+Lr,Xr=["#define varying in",lt.glslVersion==="300 es"?"":"out highp vec4 pc_fragColor;",lt.glslVersion==="300 es"?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
`)+`
`+Xr);const On=_n+Xr+$t,Kn=Jy(_t,35633,_n+Lr+Lt),Mn=Jy(_t,35632,On);if(_t.attachShader(kr,Kn),_t.attachShader(kr,Mn),lt.index0AttributeName!==void 0?_t.bindAttribLocation(kr,0,lt.index0AttributeName):lt.morphTargets===!0&&_t.bindAttribLocation(kr,0,"position"),_t.linkProgram(kr),vt.debug.checkShaderErrors){const Qn=_t.getProgramInfoLog(kr).trim(),ks=_t.getShaderInfoLog(Kn).trim(),Cs=_t.getShaderInfoLog(Mn).trim();let gs=!0,_s=!0;if(_t.getProgramParameter(kr,35714)===!1){gs=!1;const Ts=Do(_t,Kn,"vertex"),ws=Do(_t,Mn,"fragment");console.error("THREE.WebGLProgram: shader error: ",_t.getError(),"35715",_t.getProgramParameter(kr,35715),"gl.getProgramInfoLog",Qn,Ts,ws)}else Qn!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",Qn):ks!==""&&Cs!==""||(_s=!1);_s&&(this.diagnostics={runnable:gs,programLog:Qn,vertexShader:{log:ks,prefix:Lr},fragmentShader:{log:Cs,prefix:Xr}})}let ca,Gn;return _t.deleteShader(Kn),_t.deleteShader(Mn),this.getUniforms=function(){return ca===void 0&&(ca=new fp(_t,kr)),ca},this.getAttributes=function(){return Gn===void 0&&(Gn=(function(Qn,ks){const Cs={},gs=Qn.getProgramParameter(ks,35721);for(let _s=0;_s<gs;_s++){const Ts=Qn.getActiveAttrib(ks,_s).name;Cs[Ts]=Qn.getAttribLocation(ks,Ts)}return Cs})(_t,kr)),Gn},this.destroy=function(){pt.releaseStatesOfProgram(this),_t.deleteProgram(kr),this.program=void 0},this.name=lt.shaderName,this.id=ip++,this.cacheKey=it,this.usedTimes=1,this.program=kr,this.vertexShader=Kn,this.fragmentShader=Mn,this}function u_(vt,it,lt,pt,_t,Dt){const Lt=[],$t=pt.isWebGL2,Xt=pt.logarithmicDepthBuffer,Yt=pt.floatVertexTextures,Zt=pt.maxVertexUniforms,lr=pt.vertexTextures;let xr=pt.precision;const wr={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},Ir=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmission","transmissionMap","thicknessMap"];function kr(Lr){let Xr;return Lr&&Lr.isTexture?Xr=Lr.encoding:Lr&&Lr.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),Xr=Lr.texture.encoding):Xr=3e3,Xr}return{getParameters:function(Lr,Xr,_n,On,Kn){const Mn=On.fog,ca=Lr.isMeshStandardMaterial?On.environment:null,Gn=it.get(Lr.envMap||ca),Qn=wr[Lr.type],ks=Kn.isSkinnedMesh?(function(Ts){const ws=Ts.skeleton.bones;if(Yt)return 1024;{const oo=Zt,no=Math.floor((oo-20)/4),js=Math.min(no,ws.length);return js<ws.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+ws.length+" bones. This GPU supports "+js+"."),0):js}})(Kn):0;let Cs,gs;if(Lr.precision!==null&&(xr=pt.getMaxPrecision(Lr.precision),xr!==Lr.precision&&console.warn("THREE.WebGLProgram.getParameters:",Lr.precision,"not supported, using",xr,"instead.")),Qn){const Ts=xm[Qn];Cs=Ts.vertexShader,gs=Ts.fragmentShader}else Cs=Lr.vertexShader,gs=Lr.fragmentShader;const _s=vt.getRenderTarget();return{isWebGL2:$t,shaderID:Qn,shaderName:Lr.type,vertexShader:Cs,fragmentShader:gs,defines:Lr.defines,isRawShaderMaterial:Lr.isRawShaderMaterial===!0,glslVersion:Lr.glslVersion,precision:xr,instancing:Kn.isInstancedMesh===!0,instancingColor:Kn.isInstancedMesh===!0&&Kn.instanceColor!==null,supportsVertexTextures:lr,outputEncoding:_s!==null?kr(_s.texture):vt.outputEncoding,map:!!Lr.map,mapEncoding:kr(Lr.map),matcap:!!Lr.matcap,matcapEncoding:kr(Lr.matcap),envMap:!!Gn,envMapMode:Gn&&Gn.mapping,envMapEncoding:kr(Gn),envMapCubeUV:!!Gn&&(Gn.mapping===306||Gn.mapping===307),lightMap:!!Lr.lightMap,lightMapEncoding:kr(Lr.lightMap),aoMap:!!Lr.aoMap,emissiveMap:!!Lr.emissiveMap,emissiveMapEncoding:kr(Lr.emissiveMap),bumpMap:!!Lr.bumpMap,normalMap:!!Lr.normalMap,objectSpaceNormalMap:Lr.normalMapType===1,tangentSpaceNormalMap:Lr.normalMapType===0,clearcoatMap:!!Lr.clearcoatMap,clearcoatRoughnessMap:!!Lr.clearcoatRoughnessMap,clearcoatNormalMap:!!Lr.clearcoatNormalMap,displacementMap:!!Lr.displacementMap,roughnessMap:!!Lr.roughnessMap,metalnessMap:!!Lr.metalnessMap,specularMap:!!Lr.specularMap,alphaMap:!!Lr.alphaMap,gradientMap:!!Lr.gradientMap,sheen:!!Lr.sheen,transmission:!!Lr.transmission,transmissionMap:!!Lr.transmissionMap,thicknessMap:!!Lr.thicknessMap,combine:Lr.combine,vertexTangents:Lr.normalMap&&Lr.vertexTangents,vertexColors:Lr.vertexColors,vertexAlphas:Lr.vertexColors===!0&&Kn.geometry&&Kn.geometry.attributes.color&&Kn.geometry.attributes.color.itemSize===4,vertexUvs:!!(Lr.map||Lr.bumpMap||Lr.normalMap||Lr.specularMap||Lr.alphaMap||Lr.emissiveMap||Lr.roughnessMap||Lr.metalnessMap||Lr.clearcoatMap||Lr.clearcoatRoughnessMap||Lr.clearcoatNormalMap||Lr.displacementMap||Lr.transmissionMap||Lr.thicknessMap),uvsVertexOnly:!(Lr.map||Lr.bumpMap||Lr.normalMap||Lr.specularMap||Lr.alphaMap||Lr.emissiveMap||Lr.roughnessMap||Lr.metalnessMap||Lr.clearcoatNormalMap||Lr.transmission||Lr.transmissionMap||Lr.thicknessMap||!Lr.displacementMap),fog:!!Mn,useFog:Lr.fog,fogExp2:Mn&&Mn.isFogExp2,flatShading:!!Lr.flatShading,sizeAttenuation:Lr.sizeAttenuation,logarithmicDepthBuffer:Xt,skinning:Kn.isSkinnedMesh===!0&&ks>0,maxBones:ks,useVertexTexture:Yt,morphTargets:Lr.morphTargets,morphNormals:Lr.morphNormals,numDirLights:Xr.directional.length,numPointLights:Xr.point.length,numSpotLights:Xr.spot.length,numRectAreaLights:Xr.rectArea.length,numHemiLights:Xr.hemi.length,numDirLightShadows:Xr.directionalShadowMap.length,numPointLightShadows:Xr.pointShadowMap.length,numSpotLightShadows:Xr.spotShadowMap.length,numClippingPlanes:Dt.numPlanes,numClipIntersection:Dt.numIntersection,dithering:Lr.dithering,shadowMapEnabled:vt.shadowMap.enabled&&_n.length>0,shadowMapType:vt.shadowMap.type,toneMapping:Lr.toneMapped?vt.toneMapping:0,physicallyCorrectLights:vt.physicallyCorrectLights,premultipliedAlpha:Lr.premultipliedAlpha,alphaTest:Lr.alphaTest,doubleSided:Lr.side===2,flipSided:Lr.side===1,depthPacking:Lr.depthPacking!==void 0&&Lr.depthPacking,index0AttributeName:Lr.index0AttributeName,extensionDerivatives:Lr.extensions&&Lr.extensions.derivatives,extensionFragDepth:Lr.extensions&&Lr.extensions.fragDepth,extensionDrawBuffers:Lr.extensions&&Lr.extensions.drawBuffers,extensionShaderTextureLOD:Lr.extensions&&Lr.extensions.shaderTextureLOD,rendererExtensionFragDepth:$t||lt.has("EXT_frag_depth"),rendererExtensionDrawBuffers:$t||lt.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:$t||lt.has("EXT_shader_texture_lod"),customProgramCacheKey:Lr.customProgramCacheKey()}},getProgramCacheKey:function(Lr){const Xr=[];if(Lr.shaderID?Xr.push(Lr.shaderID):(Xr.push(Lr.fragmentShader),Xr.push(Lr.vertexShader)),Lr.defines!==void 0)for(const _n in Lr.defines)Xr.push(_n),Xr.push(Lr.defines[_n]);if(Lr.isRawShaderMaterial===!1){for(let _n=0;_n<Ir.length;_n++)Xr.push(Lr[Ir[_n]]);Xr.push(vt.outputEncoding),Xr.push(vt.gammaFactor)}return Xr.push(Lr.customProgramCacheKey),Xr.join()},getUniforms:function(Lr){const Xr=wr[Lr.type];let _n;if(Xr){const On=xm[Xr];_n=su.clone(On.uniforms)}else _n=Lr.uniforms;return _n},acquireProgram:function(Lr,Xr){let _n;for(let On=0,Kn=Lt.length;On<Kn;On++){const Mn=Lt[On];if(Mn.cacheKey===Xr){_n=Mn,++_n.usedTimes;break}}return _n===void 0&&(_n=new N_(vt,Xr,Lr,_t),Lt.push(_n)),_n},releaseProgram:function(Lr){if(--Lr.usedTimes==0){const Xr=Lt.indexOf(Lr);Lt[Xr]=Lt[Lt.length-1],Lt.pop(),Lr.destroy()}},programs:Lt}}function cy(){let vt=new WeakMap;return{get:function(it){let lt=vt.get(it);return lt===void 0&&(lt={},vt.set(it,lt)),lt},remove:function(it){vt.delete(it)},update:function(it,lt,pt){vt.get(it)[lt]=pt},dispose:function(){vt=new WeakMap}}}function Pv(vt,it){return vt.groupOrder!==it.groupOrder?vt.groupOrder-it.groupOrder:vt.renderOrder!==it.renderOrder?vt.renderOrder-it.renderOrder:vt.program!==it.program?vt.program.id-it.program.id:vt.material.id!==it.material.id?vt.material.id-it.material.id:vt.z!==it.z?vt.z-it.z:vt.id-it.id}function vp(vt,it){return vt.groupOrder!==it.groupOrder?vt.groupOrder-it.groupOrder:vt.renderOrder!==it.renderOrder?vt.renderOrder-it.renderOrder:vt.z!==it.z?it.z-vt.z:vt.id-it.id}function Fu(vt){const it=[];let lt=0;const pt=[],_t=[],Dt=[],Lt={id:-1};function $t(Xt,Yt,Zt,lr,xr,wr){let Ir=it[lt];const kr=vt.get(Zt);return Ir===void 0?(Ir={id:Xt.id,object:Xt,geometry:Yt,material:Zt,program:kr.program||Lt,groupOrder:lr,renderOrder:Xt.renderOrder,z:xr,group:wr},it[lt]=Ir):(Ir.id=Xt.id,Ir.object=Xt,Ir.geometry=Yt,Ir.material=Zt,Ir.program=kr.program||Lt,Ir.groupOrder=lr,Ir.renderOrder=Xt.renderOrder,Ir.z=xr,Ir.group=wr),lt++,Ir}return{opaque:pt,transmissive:_t,transparent:Dt,init:function(){lt=0,pt.length=0,_t.length=0,Dt.length=0},push:function(Xt,Yt,Zt,lr,xr,wr){const Ir=$t(Xt,Yt,Zt,lr,xr,wr);Zt.transmission>0?_t.push(Ir):Zt.transparent===!0?Dt.push(Ir):pt.push(Ir)},unshift:function(Xt,Yt,Zt,lr,xr,wr){const Ir=$t(Xt,Yt,Zt,lr,xr,wr);Zt.transmission>0?_t.unshift(Ir):Zt.transparent===!0?Dt.unshift(Ir):pt.unshift(Ir)},finish:function(){for(let Xt=lt,Yt=it.length;Xt<Yt;Xt++){const Zt=it[Xt];if(Zt.id===null)break;Zt.id=null,Zt.object=null,Zt.geometry=null,Zt.material=null,Zt.program=null,Zt.group=null}},sort:function(Xt,Yt){pt.length>1&&pt.sort(Xt||Pv),_t.length>1&&_t.sort(Yt||vp),Dt.length>1&&Dt.sort(Yt||vp)}}}function Zv(vt){let it=new WeakMap;return{get:function(lt,pt){let _t;return it.has(lt)===!1?(_t=new Fu(vt),it.set(lt,[_t])):pt>=it.get(lt).length?(_t=new Fu(vt),it.get(lt).push(_t)):_t=it.get(lt)[pt],_t},dispose:function(){it=new WeakMap}}}function Nv(){const vt={};return{get:function(it){if(vt[it.id]!==void 0)return vt[it.id];let lt;switch(it.type){case"DirectionalLight":lt={direction:new Ot,color:new mn};break;case"SpotLight":lt={position:new Ot,direction:new Ot,color:new mn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":lt={position:new Ot,color:new mn,distance:0,decay:0};break;case"HemisphereLight":lt={direction:new Ot,skyColor:new mn,groundColor:new mn};break;case"RectAreaLight":lt={color:new mn,position:new Ot,halfWidth:new Ot,halfHeight:new Ot}}return vt[it.id]=lt,lt}}}let av=0;function Gy(vt,it){return(it.castShadow?1:0)-(vt.castShadow?1:0)}function My(vt,it){const lt=new Nv,pt=(function(){const Xt={};return{get:function(Yt){if(Xt[Yt.id]!==void 0)return Xt[Yt.id];let Zt;switch(Yt.type){case"DirectionalLight":case"SpotLight":Zt={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wt};break;case"PointLight":Zt={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new wt,shadowCameraNear:1,shadowCameraFar:1e3}}return Xt[Yt.id]=Zt,Zt}}})(),_t={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let Xt=0;Xt<9;Xt++)_t.probe.push(new Ot);const Dt=new Ot,Lt=new Nn,$t=new Nn;return{setup:function(Xt){let Yt=0,Zt=0,lr=0;for(let Mn=0;Mn<9;Mn++)_t.probe[Mn].set(0,0,0);let xr=0,wr=0,Ir=0,kr=0,Lr=0,Xr=0,_n=0,On=0;Xt.sort(Gy);for(let Mn=0,ca=Xt.length;Mn<ca;Mn++){const Gn=Xt[Mn],Qn=Gn.color,ks=Gn.intensity,Cs=Gn.distance,gs=Gn.shadow&&Gn.shadow.map?Gn.shadow.map.texture:null;if(Gn.isAmbientLight)Yt+=Qn.r*ks,Zt+=Qn.g*ks,lr+=Qn.b*ks;else if(Gn.isLightProbe)for(let _s=0;_s<9;_s++)_t.probe[_s].addScaledVector(Gn.sh.coefficients[_s],ks);else if(Gn.isDirectionalLight){const _s=lt.get(Gn);if(_s.color.copy(Gn.color).multiplyScalar(Gn.intensity),Gn.castShadow){const Ts=Gn.shadow,ws=pt.get(Gn);ws.shadowBias=Ts.bias,ws.shadowNormalBias=Ts.normalBias,ws.shadowRadius=Ts.radius,ws.shadowMapSize=Ts.mapSize,_t.directionalShadow[xr]=ws,_t.directionalShadowMap[xr]=gs,_t.directionalShadowMatrix[xr]=Gn.shadow.matrix,Xr++}_t.directional[xr]=_s,xr++}else if(Gn.isSpotLight){const _s=lt.get(Gn);if(_s.position.setFromMatrixPosition(Gn.matrixWorld),_s.color.copy(Qn).multiplyScalar(ks),_s.distance=Cs,_s.coneCos=Math.cos(Gn.angle),_s.penumbraCos=Math.cos(Gn.angle*(1-Gn.penumbra)),_s.decay=Gn.decay,Gn.castShadow){const Ts=Gn.shadow,ws=pt.get(Gn);ws.shadowBias=Ts.bias,ws.shadowNormalBias=Ts.normalBias,ws.shadowRadius=Ts.radius,ws.shadowMapSize=Ts.mapSize,_t.spotShadow[Ir]=ws,_t.spotShadowMap[Ir]=gs,_t.spotShadowMatrix[Ir]=Gn.shadow.matrix,On++}_t.spot[Ir]=_s,Ir++}else if(Gn.isRectAreaLight){const _s=lt.get(Gn);_s.color.copy(Qn).multiplyScalar(ks),_s.halfWidth.set(.5*Gn.width,0,0),_s.halfHeight.set(0,.5*Gn.height,0),_t.rectArea[kr]=_s,kr++}else if(Gn.isPointLight){const _s=lt.get(Gn);if(_s.color.copy(Gn.color).multiplyScalar(Gn.intensity),_s.distance=Gn.distance,_s.decay=Gn.decay,Gn.castShadow){const Ts=Gn.shadow,ws=pt.get(Gn);ws.shadowBias=Ts.bias,ws.shadowNormalBias=Ts.normalBias,ws.shadowRadius=Ts.radius,ws.shadowMapSize=Ts.mapSize,ws.shadowCameraNear=Ts.camera.near,ws.shadowCameraFar=Ts.camera.far,_t.pointShadow[wr]=ws,_t.pointShadowMap[wr]=gs,_t.pointShadowMatrix[wr]=Gn.shadow.matrix,_n++}_t.point[wr]=_s,wr++}else if(Gn.isHemisphereLight){const _s=lt.get(Gn);_s.skyColor.copy(Gn.color).multiplyScalar(ks),_s.groundColor.copy(Gn.groundColor).multiplyScalar(ks),_t.hemi[Lr]=_s,Lr++}}kr>0&&(it.isWebGL2||vt.has("OES_texture_float_linear")===!0?(_t.rectAreaLTC1=Xo.LTC_FLOAT_1,_t.rectAreaLTC2=Xo.LTC_FLOAT_2):vt.has("OES_texture_half_float_linear")===!0?(_t.rectAreaLTC1=Xo.LTC_HALF_1,_t.rectAreaLTC2=Xo.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),_t.ambient[0]=Yt,_t.ambient[1]=Zt,_t.ambient[2]=lr;const Kn=_t.hash;Kn.directionalLength===xr&&Kn.pointLength===wr&&Kn.spotLength===Ir&&Kn.rectAreaLength===kr&&Kn.hemiLength===Lr&&Kn.numDirectionalShadows===Xr&&Kn.numPointShadows===_n&&Kn.numSpotShadows===On||(_t.directional.length=xr,_t.spot.length=Ir,_t.rectArea.length=kr,_t.point.length=wr,_t.hemi.length=Lr,_t.directionalShadow.length=Xr,_t.directionalShadowMap.length=Xr,_t.pointShadow.length=_n,_t.pointShadowMap.length=_n,_t.spotShadow.length=On,_t.spotShadowMap.length=On,_t.directionalShadowMatrix.length=Xr,_t.pointShadowMatrix.length=_n,_t.spotShadowMatrix.length=On,Kn.directionalLength=xr,Kn.pointLength=wr,Kn.spotLength=Ir,Kn.rectAreaLength=kr,Kn.hemiLength=Lr,Kn.numDirectionalShadows=Xr,Kn.numPointShadows=_n,Kn.numSpotShadows=On,_t.version=av++)},setupView:function(Xt,Yt){let Zt=0,lr=0,xr=0,wr=0,Ir=0;const kr=Yt.matrixWorldInverse;for(let Lr=0,Xr=Xt.length;Lr<Xr;Lr++){const _n=Xt[Lr];if(_n.isDirectionalLight){const On=_t.directional[Zt];On.direction.setFromMatrixPosition(_n.matrixWorld),Dt.setFromMatrixPosition(_n.target.matrixWorld),On.direction.sub(Dt),On.direction.transformDirection(kr),Zt++}else if(_n.isSpotLight){const On=_t.spot[xr];On.position.setFromMatrixPosition(_n.matrixWorld),On.position.applyMatrix4(kr),On.direction.setFromMatrixPosition(_n.matrixWorld),Dt.setFromMatrixPosition(_n.target.matrixWorld),On.direction.sub(Dt),On.direction.transformDirection(kr),xr++}else if(_n.isRectAreaLight){const On=_t.rectArea[wr];On.position.setFromMatrixPosition(_n.matrixWorld),On.position.applyMatrix4(kr),$t.identity(),Lt.copy(_n.matrixWorld),Lt.premultiply(kr),$t.extractRotation(Lt),On.halfWidth.set(.5*_n.width,0,0),On.halfHeight.set(0,.5*_n.height,0),On.halfWidth.applyMatrix4($t),On.halfHeight.applyMatrix4($t),wr++}else if(_n.isPointLight){const On=_t.point[lr];On.position.setFromMatrixPosition(_n.matrixWorld),On.position.applyMatrix4(kr),lr++}else if(_n.isHemisphereLight){const On=_t.hemi[Ir];On.direction.setFromMatrixPosition(_n.matrixWorld),On.direction.transformDirection(kr),On.direction.normalize(),Ir++}}},state:_t}}function $0(vt,it){const lt=new My(vt,it),pt=[],_t=[];return{init:function(){pt.length=0,_t.length=0},state:{lightsArray:pt,shadowsArray:_t,lights:lt},setupLights:function(){lt.setup(pt)},setupLightsView:function(Dt){lt.setupView(pt,Dt)},pushLight:function(Dt){pt.push(Dt)},pushShadow:function(Dt){_t.push(Dt)}}}function Iy(vt,it){let lt=new WeakMap;return{get:function(pt,_t=0){let Dt;return lt.has(pt)===!1?(Dt=new $0(vt,it),lt.set(pt,[Dt])):_t>=lt.get(pt).length?(Dt=new $0(vt,it),lt.get(pt).push(Dt)):Dt=lt.get(pt)[_t],Dt},dispose:function(){lt=new WeakMap}}}class Ym extends Ku{constructor(it){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(it)}copy(it){return super.copy(it),this.depthPacking=it.depthPacking,this.morphTargets=it.morphTargets,this.map=it.map,this.alphaMap=it.alphaMap,this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this}}Ym.prototype.isMeshDepthMaterial=!0;class yp extends Ku{constructor(it){super(),this.type="MeshDistanceMaterial",this.referencePosition=new Ot,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(it)}copy(it){return super.copy(it),this.referencePosition.copy(it.referencePosition),this.nearDistance=it.nearDistance,this.farDistance=it.farDistance,this.morphTargets=it.morphTargets,this.map=it.map,this.alphaMap=it.alphaMap,this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this}}yp.prototype.isMeshDistanceMaterial=!0;function pp(vt,it,lt){let pt=new dl;const _t=new wt,Dt=new wt,Lt=new Vt,$t=[],Xt=[],Yt={},Zt=lt.maxTextureSize,lr={0:1,1:0,2:2},xr=new mu({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new wt},radius:{value:4}},vertexShader:`void main() {
gl_Position = vec4( position, 1.0 );
}`,fragmentShader:`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
float mean = 0.0;
float squared_mean = 0.0;
float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );
for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {
#ifdef HORIZONTAL_PASS
vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );
mean += distribution.x;
squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
#else
float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );
mean += depth;
squared_mean += depth * depth;
#endif
}
mean = mean * HALF_SAMPLE_RATE;
squared_mean = squared_mean * HALF_SAMPLE_RATE;
float std_dev = sqrt( squared_mean - mean * mean );
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`}),wr=xr.clone();wr.defines.HORIZONTAL_PASS=1;const Ir=new Wu;Ir.setAttribute("position",new vs(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const kr=new os(Ir,xr),Lr=this;function Xr(ca,Gn){const Qn=it.update(kr);xr.uniforms.shadow_pass.value=ca.map.texture,xr.uniforms.resolution.value=ca.mapSize,xr.uniforms.radius.value=ca.radius,vt.setRenderTarget(ca.mapPass),vt.clear(),vt.renderBufferDirect(Gn,null,Qn,xr,kr,null),wr.uniforms.shadow_pass.value=ca.mapPass.texture,wr.uniforms.resolution.value=ca.mapSize,wr.uniforms.radius.value=ca.radius,vt.setRenderTarget(ca.map),vt.clear(),vt.renderBufferDirect(Gn,null,Qn,wr,kr,null)}function _n(ca){const Gn=ca<<0;let Qn=$t[Gn];return Qn===void 0&&(Qn=new Ym({depthPacking:3201,morphTargets:ca}),$t[Gn]=Qn),Qn}function On(ca){const Gn=ca<<0;let Qn=Xt[Gn];return Qn===void 0&&(Qn=new yp({morphTargets:ca}),Xt[Gn]=Qn),Qn}function Kn(ca,Gn,Qn,ks,Cs,gs,_s){let Ts=null,ws=_n,oo=ca.customDepthMaterial;if(ks.isPointLight===!0&&(ws=On,oo=ca.customDistanceMaterial),oo===void 0){let no=!1;Qn.morphTargets===!0&&(no=Gn.morphAttributes&&Gn.morphAttributes.position&&Gn.morphAttributes.position.length>0),Ts=ws(no)}else Ts=oo;if(vt.localClippingEnabled&&Qn.clipShadows===!0&&Qn.clippingPlanes.length!==0){const no=Ts.uuid,js=Qn.uuid;let Ws=Yt[no];Ws===void 0&&(Ws={},Yt[no]=Ws);let Co=Ws[js];Co===void 0&&(Co=Ts.clone(),Ws[js]=Co),Ts=Co}return Ts.visible=Qn.visible,Ts.wireframe=Qn.wireframe,Ts.side=_s===3?Qn.shadowSide!==null?Qn.shadowSide:Qn.side:Qn.shadowSide!==null?Qn.shadowSide:lr[Qn.side],Ts.clipShadows=Qn.clipShadows,Ts.clippingPlanes=Qn.clippingPlanes,Ts.clipIntersection=Qn.clipIntersection,Ts.wireframeLinewidth=Qn.wireframeLinewidth,Ts.linewidth=Qn.linewidth,ks.isPointLight===!0&&Ts.isMeshDistanceMaterial===!0&&(Ts.referencePosition.setFromMatrixPosition(ks.matrixWorld),Ts.nearDistance=Cs,Ts.farDistance=gs),Ts}function Mn(ca,Gn,Qn,ks,Cs){if(ca.visible===!1)return;if(ca.layers.test(Gn.layers)&&(ca.isMesh||ca.isLine||ca.isPoints)&&(ca.castShadow||ca.receiveShadow&&Cs===3)&&(!ca.frustumCulled||pt.intersectsObject(ca))){ca.modelViewMatrix.multiplyMatrices(Qn.matrixWorldInverse,ca.matrixWorld);const _s=it.update(ca),Ts=ca.material;if(Array.isArray(Ts)){const ws=_s.groups;for(let oo=0,no=ws.length;oo<no;oo++){const js=ws[oo],Ws=Ts[js.materialIndex];if(Ws&&Ws.visible){const Co=Kn(ca,_s,Ws,ks,Qn.near,Qn.far,Cs);vt.renderBufferDirect(Qn,null,_s,Co,ca,js)}}}else if(Ts.visible){const ws=Kn(ca,_s,Ts,ks,Qn.near,Qn.far,Cs);vt.renderBufferDirect(Qn,null,_s,ws,ca,null)}}const gs=ca.children;for(let _s=0,Ts=gs.length;_s<Ts;_s++)Mn(gs[_s],Gn,Qn,ks,Cs)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(ca,Gn,Qn){if(Lr.enabled===!1||Lr.autoUpdate===!1&&Lr.needsUpdate===!1||ca.length===0)return;const ks=vt.getRenderTarget(),Cs=vt.getActiveCubeFace(),gs=vt.getActiveMipmapLevel(),_s=vt.state;_s.setBlending(0),_s.buffers.color.setClear(1,1,1,1),_s.buffers.depth.setTest(!0),_s.setScissorTest(!1);for(let Ts=0,ws=ca.length;Ts<ws;Ts++){const oo=ca[Ts],no=oo.shadow;if(no===void 0){console.warn("THREE.WebGLShadowMap:",oo,"has no shadow.");continue}if(no.autoUpdate===!1&&no.needsUpdate===!1)continue;_t.copy(no.mapSize);const js=no.getFrameExtents();if(_t.multiply(js),Dt.copy(no.mapSize),(_t.x>Zt||_t.y>Zt)&&(_t.x>Zt&&(Dt.x=Math.floor(Zt/js.x),_t.x=Dt.x*js.x,no.mapSize.x=Dt.x),_t.y>Zt&&(Dt.y=Math.floor(Zt/js.y),_t.y=Dt.y*js.y,no.mapSize.y=Dt.y)),no.map===null&&!no.isPointLightShadow&&this.type===3){const Co={minFilter:1006,magFilter:1006,format:1023};no.map=new Kt(_t.x,_t.y,Co),no.map.texture.name=oo.name+".shadowMap",no.mapPass=new Kt(_t.x,_t.y,Co),no.camera.updateProjectionMatrix()}if(no.map===null){const Co={minFilter:1003,magFilter:1003,format:1023};no.map=new Kt(_t.x,_t.y,Co),no.map.texture.name=oo.name+".shadowMap",no.camera.updateProjectionMatrix()}vt.setRenderTarget(no.map),vt.clear();const Ws=no.getViewportCount();for(let Co=0;Co<Ws;Co++){const jo=no.getViewport(Co);Lt.set(Dt.x*jo.x,Dt.y*jo.y,Dt.x*jo.z,Dt.y*jo.w),_s.viewport(Lt),no.updateMatrices(oo,Co),pt=no.getFrustum(),Mn(Gn,Qn,no.camera,oo,this.type)}no.isPointLightShadow||this.type!==3||Xr(no,Qn),no.needsUpdate=!1}Lr.needsUpdate=!1,vt.setRenderTarget(ks,Cs,gs)}}function xv(vt,it,lt){const pt=lt.isWebGL2,_t=new function(){let fs=!1;const $s=new Vt;let lo=null;const go=new Vt(0,0,0,0);return{setMask:function(Qs){lo===Qs||fs||(vt.colorMask(Qs,Qs,Qs,Qs),lo=Qs)},setLocked:function(Qs){fs=Qs},setClear:function(Qs,Lo,Cu,Du,Mu){Mu===!0&&(Qs*=Du,Lo*=Du,Cu*=Du),$s.set(Qs,Lo,Cu,Du),go.equals($s)===!1&&(vt.clearColor(Qs,Lo,Cu,Du),go.copy($s))},reset:function(){fs=!1,lo=null,go.set(-1,0,0,0)}}},Dt=new function(){let fs=!1,$s=null,lo=null,go=null;return{setTest:function(Qs){Qs?Qo(2929):xs(2929)},setMask:function(Qs){$s===Qs||fs||(vt.depthMask(Qs),$s=Qs)},setFunc:function(Qs){if(lo!==Qs){if(Qs)switch(Qs){case 0:vt.depthFunc(512);break;case 1:vt.depthFunc(519);break;case 2:vt.depthFunc(513);break;case 3:vt.depthFunc(515);break;case 4:vt.depthFunc(514);break;case 5:vt.depthFunc(518);break;case 6:vt.depthFunc(516);break;case 7:vt.depthFunc(517);break;default:vt.depthFunc(515)}else vt.depthFunc(515);lo=Qs}},setLocked:function(Qs){fs=Qs},setClear:function(Qs){go!==Qs&&(vt.clearDepth(Qs),go=Qs)},reset:function(){fs=!1,$s=null,lo=null,go=null}}},Lt=new function(){let fs=!1,$s=null,lo=null,go=null,Qs=null,Lo=null,Cu=null,Du=null,Mu=null;return{setTest:function(Xl){fs||(Xl?Qo(2960):xs(2960))},setMask:function(Xl){$s===Xl||fs||(vt.stencilMask(Xl),$s=Xl)},setFunc:function(Xl,oy,_m){lo===Xl&&go===oy&&Qs===_m||(vt.stencilFunc(Xl,oy,_m),lo=Xl,go=oy,Qs=_m)},setOp:function(Xl,oy,_m){Lo===Xl&&Cu===oy&&Du===_m||(vt.stencilOp(Xl,oy,_m),Lo=Xl,Cu=oy,Du=_m)},setLocked:function(Xl){fs=Xl},setClear:function(Xl){Mu!==Xl&&(vt.clearStencil(Xl),Mu=Xl)},reset:function(){fs=!1,$s=null,lo=null,go=null,Qs=null,Lo=null,Cu=null,Du=null,Mu=null}}};let $t={},Xt=null,Yt={},Zt=null,lr=!1,xr=null,wr=null,Ir=null,kr=null,Lr=null,Xr=null,_n=null,On=!1,Kn=null,Mn=null,ca=null,Gn=null,Qn=null;const ks=vt.getParameter(35661);let Cs=!1,gs=0;const _s=vt.getParameter(7938);_s.indexOf("WebGL")!==-1?(gs=parseFloat(/^WebGL (\d)/.exec(_s)[1]),Cs=gs>=1):_s.indexOf("OpenGL ES")!==-1&&(gs=parseFloat(/^OpenGL ES (\d)/.exec(_s)[1]),Cs=gs>=2);let Ts=null,ws={};const oo=vt.getParameter(3088),no=vt.getParameter(2978),js=new Vt().fromArray(oo),Ws=new Vt().fromArray(no);function Co(fs,$s,lo){const go=new Uint8Array(4),Qs=vt.createTexture();vt.bindTexture(fs,Qs),vt.texParameteri(fs,10241,9728),vt.texParameteri(fs,10240,9728);for(let Lo=0;Lo<lo;Lo++)vt.texImage2D($s+Lo,0,6408,1,1,0,6408,5121,go);return Qs}const jo={};function Qo(fs){$t[fs]!==!0&&(vt.enable(fs),$t[fs]=!0)}function xs(fs){$t[fs]!==!1&&(vt.disable(fs),$t[fs]=!1)}jo[3553]=Co(3553,3553,1),jo[34067]=Co(34067,34069,6),_t.setClear(0,0,0,1),Dt.setClear(1),Lt.setClear(0),Qo(2929),Dt.setFunc(3),Ys(!1),zo(1),Qo(2884),_o(0);const Ms={100:32774,101:32778,102:32779};if(pt)Ms[103]=32775,Ms[104]=32776;else{const fs=it.get("EXT_blend_minmax");fs!==null&&(Ms[103]=fs.MIN_EXT,Ms[104]=fs.MAX_EXT)}const Io={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function _o(fs,$s,lo,go,Qs,Lo,Cu,Du){if(fs!==0){if(lr===!1&&(Qo(3042),lr=!0),fs===5)Qs=Qs||$s,Lo=Lo||lo,Cu=Cu||go,$s===wr&&Qs===Lr||(vt.blendEquationSeparate(Ms[$s],Ms[Qs]),wr=$s,Lr=Qs),lo===Ir&&go===kr&&Lo===Xr&&Cu===_n||(vt.blendFuncSeparate(Io[lo],Io[go],Io[Lo],Io[Cu]),Ir=lo,kr=go,Xr=Lo,_n=Cu),xr=fs,On=null;else if(fs!==xr||Du!==On){if(wr===100&&Lr===100||(vt.blendEquation(32774),wr=100,Lr=100),Du)switch(fs){case 1:vt.blendFuncSeparate(1,771,1,771);break;case 2:vt.blendFunc(1,1);break;case 3:vt.blendFuncSeparate(0,0,769,771);break;case 4:vt.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",fs)}else switch(fs){case 1:vt.blendFuncSeparate(770,771,1,771);break;case 2:vt.blendFunc(770,1);break;case 3:vt.blendFunc(0,769);break;case 4:vt.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",fs)}Ir=null,kr=null,Xr=null,_n=null,xr=fs,On=Du}}else lr===!0&&(xs(3042),lr=!1)}function Ys(fs){Kn!==fs&&(fs?vt.frontFace(2304):vt.frontFace(2305),Kn=fs)}function zo(fs){fs!==0?(Qo(2884),fs!==Mn&&(fs===1?vt.cullFace(1029):fs===2?vt.cullFace(1028):vt.cullFace(1032))):xs(2884),Mn=fs}function Jo(fs,$s,lo){fs?(Qo(32823),Gn===$s&&Qn===lo||(vt.polygonOffset($s,lo),Gn=$s,Qn=lo)):xs(32823)}function mo(fs){fs===void 0&&(fs=33984+ks-1),Ts!==fs&&(vt.activeTexture(fs),Ts=fs)}return{buffers:{color:_t,depth:Dt,stencil:Lt},enable:Qo,disable:xs,bindFramebuffer:function(fs,$s){return $s===null&&Xt!==null&&($s=Xt),Yt[fs]!==$s&&(vt.bindFramebuffer(fs,$s),Yt[fs]=$s,pt&&(fs===36009&&(Yt[36160]=$s),fs===36160&&(Yt[36009]=$s)),!0)},bindXRFramebuffer:function(fs){fs!==Xt&&(vt.bindFramebuffer(36160,fs),Xt=fs)},useProgram:function(fs){return Zt!==fs&&(vt.useProgram(fs),Zt=fs,!0)},setBlending:_o,setMaterial:function(fs,$s){fs.side===2?xs(2884):Qo(2884);let lo=fs.side===1;$s&&(lo=!lo),Ys(lo),fs.blending===1&&fs.transparent===!1?_o(0):_o(fs.blending,fs.blendEquation,fs.blendSrc,fs.blendDst,fs.blendEquationAlpha,fs.blendSrcAlpha,fs.blendDstAlpha,fs.premultipliedAlpha),Dt.setFunc(fs.depthFunc),Dt.setTest(fs.depthTest),Dt.setMask(fs.depthWrite),_t.setMask(fs.colorWrite);const go=fs.stencilWrite;Lt.setTest(go),go&&(Lt.setMask(fs.stencilWriteMask),Lt.setFunc(fs.stencilFunc,fs.stencilRef,fs.stencilFuncMask),Lt.setOp(fs.stencilFail,fs.stencilZFail,fs.stencilZPass)),Jo(fs.polygonOffset,fs.polygonOffsetFactor,fs.polygonOffsetUnits),fs.alphaToCoverage===!0?Qo(32926):xs(32926)},setFlipSided:Ys,setCullFace:zo,setLineWidth:function(fs){fs!==ca&&(Cs&&vt.lineWidth(fs),ca=fs)},setPolygonOffset:Jo,setScissorTest:function(fs){fs?Qo(3089):xs(3089)},activeTexture:mo,bindTexture:function(fs,$s){Ts===null&&mo();let lo=ws[Ts];lo===void 0&&(lo={type:void 0,texture:void 0},ws[Ts]=lo),lo.type===fs&&lo.texture===$s||(vt.bindTexture(fs,$s||jo[fs]),lo.type=fs,lo.texture=$s)},unbindTexture:function(){const fs=ws[Ts];fs!==void 0&&fs.type!==void 0&&(vt.bindTexture(fs.type,null),fs.type=void 0,fs.texture=void 0)},compressedTexImage2D:function(){try{vt.compressedTexImage2D.apply(vt,arguments)}catch(fs){console.error("THREE.WebGLState:",fs)}},texImage2D:function(){try{vt.texImage2D.apply(vt,arguments)}catch(fs){console.error("THREE.WebGLState:",fs)}},texImage3D:function(){try{vt.texImage3D.apply(vt,arguments)}catch(fs){console.error("THREE.WebGLState:",fs)}},scissor:function(fs){js.equals(fs)===!1&&(vt.scissor(fs.x,fs.y,fs.z,fs.w),js.copy(fs))},viewport:function(fs){Ws.equals(fs)===!1&&(vt.viewport(fs.x,fs.y,fs.z,fs.w),Ws.copy(fs))},reset:function(){vt.disable(3042),vt.disable(2884),vt.disable(2929),vt.disable(32823),vt.disable(3089),vt.disable(2960),vt.disable(32926),vt.blendEquation(32774),vt.blendFunc(1,0),vt.blendFuncSeparate(1,0,1,0),vt.colorMask(!0,!0,!0,!0),vt.clearColor(0,0,0,0),vt.depthMask(!0),vt.depthFunc(513),vt.clearDepth(1),vt.stencilMask(4294967295),vt.stencilFunc(519,0,4294967295),vt.stencilOp(7680,7680,7680),vt.clearStencil(0),vt.cullFace(1029),vt.frontFace(2305),vt.polygonOffset(0,0),vt.activeTexture(33984),vt.bindFramebuffer(36160,null),pt===!0&&(vt.bindFramebuffer(36009,null),vt.bindFramebuffer(36008,null)),vt.useProgram(null),vt.lineWidth(1),vt.scissor(0,0,vt.canvas.width,vt.canvas.height),vt.viewport(0,0,vt.canvas.width,vt.canvas.height),$t={},Ts=null,ws={},Xt=null,Yt={},Zt=null,lr=!1,xr=null,wr=null,Ir=null,kr=null,Lr=null,Xr=null,_n=null,On=!1,Kn=null,Mn=null,ca=null,Gn=null,Qn=null,js.set(0,0,vt.canvas.width,vt.canvas.height),Ws.set(0,0,vt.canvas.width,vt.canvas.height),_t.reset(),Dt.reset(),Lt.reset()}}}function Yl(vt,it,lt,pt,_t,Dt,Lt){const $t=_t.isWebGL2,Xt=_t.maxTextures,Yt=_t.maxCubemapSize,Zt=_t.maxTextureSize,lr=_t.maxSamples,xr=new WeakMap;let wr,Ir=!1;try{Ir=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function kr(xs,Ms){return Ir?new OffscreenCanvas(xs,Ms):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function Lr(xs,Ms,Io,_o){let Ys=1;if((xs.width>_o||xs.height>_o)&&(Ys=_o/Math.max(xs.width,xs.height)),Ys<1||Ms===!0){if(typeof HTMLImageElement<"u"&&xs instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&xs instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&xs instanceof ImageBitmap){const zo=Ms?Tt:Math.floor,Jo=zo(Ys*xs.width),mo=zo(Ys*xs.height);wr===void 0&&(wr=kr(Jo,mo));const fs=Io?kr(Jo,mo):wr;return fs.width=Jo,fs.height=mo,fs.getContext("2d").drawImage(xs,0,0,Jo,mo),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+xs.width+"x"+xs.height+") to ("+Jo+"x"+mo+")."),fs}return"data"in xs&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+xs.width+"x"+xs.height+")."),xs}return xs}function Xr(xs){return Rt(xs.width)&&Rt(xs.height)}function _n(xs,Ms){return xs.generateMipmaps&&Ms&&xs.minFilter!==1003&&xs.minFilter!==1006}function On(xs,Ms,Io,_o,Ys=1){vt.generateMipmap(xs),pt.get(Ms).__maxMipLevel=Math.log2(Math.max(Io,_o,Ys))}function Kn(xs,Ms,Io){if($t===!1)return Ms;if(xs!==null){if(vt[xs]!==void 0)return vt[xs];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+xs+"'")}let _o=Ms;return Ms===6403&&(Io===5126&&(_o=33326),Io===5131&&(_o=33325),Io===5121&&(_o=33321)),Ms===6407&&(Io===5126&&(_o=34837),Io===5131&&(_o=34843),Io===5121&&(_o=32849)),Ms===6408&&(Io===5126&&(_o=34836),Io===5131&&(_o=34842),Io===5121&&(_o=32856)),_o!==33325&&_o!==33326&&_o!==34842&&_o!==34836||it.get("EXT_color_buffer_float"),_o}function Mn(xs){return xs===1003||xs===1004||xs===1005?9728:9729}function ca(xs){const Ms=xs.target;Ms.removeEventListener("dispose",ca),(function(Io){const _o=pt.get(Io);_o.__webglInit!==void 0&&(vt.deleteTexture(_o.__webglTexture),pt.remove(Io))})(Ms),Ms.isVideoTexture&&xr.delete(Ms),Lt.memory.textures--}function Gn(xs){const Ms=xs.target;Ms.removeEventListener("dispose",Gn),(function(Io){const _o=Io.texture,Ys=pt.get(Io),zo=pt.get(_o);if(Io){if(zo.__webglTexture!==void 0&&(vt.deleteTexture(zo.__webglTexture),Lt.memory.textures--),Io.depthTexture&&Io.depthTexture.dispose(),Io.isWebGLCubeRenderTarget)for(let Jo=0;Jo<6;Jo++)vt.deleteFramebuffer(Ys.__webglFramebuffer[Jo]),Ys.__webglDepthbuffer&&vt.deleteRenderbuffer(Ys.__webglDepthbuffer[Jo]);else vt.deleteFramebuffer(Ys.__webglFramebuffer),Ys.__webglDepthbuffer&&vt.deleteRenderbuffer(Ys.__webglDepthbuffer),Ys.__webglMultisampledFramebuffer&&vt.deleteFramebuffer(Ys.__webglMultisampledFramebuffer),Ys.__webglColorRenderbuffer&&vt.deleteRenderbuffer(Ys.__webglColorRenderbuffer),Ys.__webglDepthRenderbuffer&&vt.deleteRenderbuffer(Ys.__webglDepthRenderbuffer);if(Io.isWebGLMultipleRenderTargets)for(let Jo=0,mo=_o.length;Jo<mo;Jo++){const fs=pt.get(_o[Jo]);fs.__webglTexture&&(vt.deleteTexture(fs.__webglTexture),Lt.memory.textures--),pt.remove(_o[Jo])}pt.remove(_o),pt.remove(Io)}})(Ms)}let Qn=0;function ks(xs,Ms){const Io=pt.get(xs);if(xs.isVideoTexture&&(function(_o){const Ys=Lt.render.frame;xr.get(_o)!==Ys&&(xr.set(_o,Ys),_o.update())})(xs),xs.version>0&&Io.__version!==xs.version){const _o=xs.image;if(_o===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(_o.complete!==!1)return void oo(Io,xs,Ms);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}lt.activeTexture(33984+Ms),lt.bindTexture(3553,Io.__webglTexture)}function Cs(xs,Ms){const Io=pt.get(xs);xs.version>0&&Io.__version!==xs.version?(function(_o,Ys,zo){if(Ys.image.length!==6)return;ws(_o,Ys),lt.activeTexture(33984+zo),lt.bindTexture(34067,_o.__webglTexture),vt.pixelStorei(37440,Ys.flipY),vt.pixelStorei(37441,Ys.premultiplyAlpha),vt.pixelStorei(3317,Ys.unpackAlignment),vt.pixelStorei(37443,0);const Jo=Ys&&(Ys.isCompressedTexture||Ys.image[0].isCompressedTexture),mo=Ys.image[0]&&Ys.image[0].isDataTexture,fs=[];for(let Du=0;Du<6;Du++)fs[Du]=Jo||mo?mo?Ys.image[Du].image:Ys.image[Du]:Lr(Ys.image[Du],!1,!0,Yt);const $s=fs[0],lo=Xr($s)||$t,go=Dt.convert(Ys.format),Qs=Dt.convert(Ys.type),Lo=Kn(Ys.internalFormat,go,Qs);let Cu;if(Ts(34067,Ys,lo),Jo){for(let Du=0;Du<6;Du++){Cu=fs[Du].mipmaps;for(let Mu=0;Mu<Cu.length;Mu++){const Xl=Cu[Mu];Ys.format!==1023&&Ys.format!==1022?go!==null?lt.compressedTexImage2D(34069+Du,Mu,Lo,Xl.width,Xl.height,0,Xl.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):lt.texImage2D(34069+Du,Mu,Lo,Xl.width,Xl.height,0,go,Qs,Xl.data)}}_o.__maxMipLevel=Cu.length-1}else{Cu=Ys.mipmaps;for(let Du=0;Du<6;Du++)if(mo){lt.texImage2D(34069+Du,0,Lo,fs[Du].width,fs[Du].height,0,go,Qs,fs[Du].data);for(let Mu=0;Mu<Cu.length;Mu++){const Xl=Cu[Mu].image[Du].image;lt.texImage2D(34069+Du,Mu+1,Lo,Xl.width,Xl.height,0,go,Qs,Xl.data)}}else{lt.texImage2D(34069+Du,0,Lo,go,Qs,fs[Du]);for(let Mu=0;Mu<Cu.length;Mu++){const Xl=Cu[Mu];lt.texImage2D(34069+Du,Mu+1,Lo,go,Qs,Xl.image[Du])}}_o.__maxMipLevel=Cu.length}_n(Ys,lo)&&On(34067,Ys,$s.width,$s.height),_o.__version=Ys.version,Ys.onUpdate&&Ys.onUpdate(Ys)})(Io,xs,Ms):(lt.activeTexture(33984+Ms),lt.bindTexture(34067,Io.__webglTexture))}const gs={1e3:10497,1001:33071,1002:33648},_s={1003:9728,1004:9984,1005:9986,1006:9729,1007:9985,1008:9987};function Ts(xs,Ms,Io){if(Io?(vt.texParameteri(xs,10242,gs[Ms.wrapS]),vt.texParameteri(xs,10243,gs[Ms.wrapT]),xs!==32879&&xs!==35866||vt.texParameteri(xs,32882,gs[Ms.wrapR]),vt.texParameteri(xs,10240,_s[Ms.magFilter]),vt.texParameteri(xs,10241,_s[Ms.minFilter])):(vt.texParameteri(xs,10242,33071),vt.texParameteri(xs,10243,33071),xs!==32879&&xs!==35866||vt.texParameteri(xs,32882,33071),Ms.wrapS===1001&&Ms.wrapT===1001||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),vt.texParameteri(xs,10240,Mn(Ms.magFilter)),vt.texParameteri(xs,10241,Mn(Ms.minFilter)),Ms.minFilter!==1003&&Ms.minFilter!==1006&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),it.has("EXT_texture_filter_anisotropic")===!0){const _o=it.get("EXT_texture_filter_anisotropic");if(Ms.type===1015&&it.has("OES_texture_float_linear")===!1||$t===!1&&Ms.type===1016&&it.has("OES_texture_half_float_linear")===!1)return;(Ms.anisotropy>1||pt.get(Ms).__currentAnisotropy)&&(vt.texParameterf(xs,_o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ms.anisotropy,_t.getMaxAnisotropy())),pt.get(Ms).__currentAnisotropy=Ms.anisotropy)}}function ws(xs,Ms){xs.__webglInit===void 0&&(xs.__webglInit=!0,Ms.addEventListener("dispose",ca),xs.__webglTexture=vt.createTexture(),Lt.memory.textures++)}function oo(xs,Ms,Io){let _o=3553;Ms.isDataTexture2DArray&&(_o=35866),Ms.isDataTexture3D&&(_o=32879),ws(xs,Ms),lt.activeTexture(33984+Io),lt.bindTexture(_o,xs.__webglTexture),vt.pixelStorei(37440,Ms.flipY),vt.pixelStorei(37441,Ms.premultiplyAlpha),vt.pixelStorei(3317,Ms.unpackAlignment),vt.pixelStorei(37443,0);const Ys=(function(Qs){return!$t&&(Qs.wrapS!==1001||Qs.wrapT!==1001||Qs.minFilter!==1003&&Qs.minFilter!==1006)})(Ms)&&Xr(Ms.image)===!1,zo=Lr(Ms.image,Ys,!1,Zt),Jo=Xr(zo)||$t,mo=Dt.convert(Ms.format);let fs,$s=Dt.convert(Ms.type),lo=Kn(Ms.internalFormat,mo,$s);Ts(_o,Ms,Jo);const go=Ms.mipmaps;if(Ms.isDepthTexture)lo=6402,$t?lo=Ms.type===1015?36012:Ms.type===1014?33190:Ms.type===1020?35056:33189:Ms.type===1015&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Ms.format===1026&&lo===6402&&Ms.type!==1012&&Ms.type!==1014&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Ms.type=1012,$s=Dt.convert(Ms.type)),Ms.format===1027&&lo===6402&&(lo=34041,Ms.type!==1020&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Ms.type=1020,$s=Dt.convert(Ms.type))),lt.texImage2D(3553,0,lo,zo.width,zo.height,0,mo,$s,null);else if(Ms.isDataTexture)if(go.length>0&&Jo){for(let Qs=0,Lo=go.length;Qs<Lo;Qs++)fs=go[Qs],lt.texImage2D(3553,Qs,lo,fs.width,fs.height,0,mo,$s,fs.data);Ms.generateMipmaps=!1,xs.__maxMipLevel=go.length-1}else lt.texImage2D(3553,0,lo,zo.width,zo.height,0,mo,$s,zo.data),xs.__maxMipLevel=0;else if(Ms.isCompressedTexture){for(let Qs=0,Lo=go.length;Qs<Lo;Qs++)fs=go[Qs],Ms.format!==1023&&Ms.format!==1022?mo!==null?lt.compressedTexImage2D(3553,Qs,lo,fs.width,fs.height,0,fs.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):lt.texImage2D(3553,Qs,lo,fs.width,fs.height,0,mo,$s,fs.data);xs.__maxMipLevel=go.length-1}else if(Ms.isDataTexture2DArray)lt.texImage3D(35866,0,lo,zo.width,zo.height,zo.depth,0,mo,$s,zo.data),xs.__maxMipLevel=0;else if(Ms.isDataTexture3D)lt.texImage3D(32879,0,lo,zo.width,zo.height,zo.depth,0,mo,$s,zo.data),xs.__maxMipLevel=0;else if(go.length>0&&Jo){for(let Qs=0,Lo=go.length;Qs<Lo;Qs++)fs=go[Qs],lt.texImage2D(3553,Qs,lo,mo,$s,fs);Ms.generateMipmaps=!1,xs.__maxMipLevel=go.length-1}else lt.texImage2D(3553,0,lo,mo,$s,zo),xs.__maxMipLevel=0;_n(Ms,Jo)&&On(_o,Ms,zo.width,zo.height),xs.__version=Ms.version,Ms.onUpdate&&Ms.onUpdate(Ms)}function no(xs,Ms,Io,_o,Ys){const zo=Dt.convert(Io.format),Jo=Dt.convert(Io.type),mo=Kn(Io.internalFormat,zo,Jo);Ys===32879||Ys===35866?lt.texImage3D(Ys,0,mo,Ms.width,Ms.height,Ms.depth,0,zo,Jo,null):lt.texImage2D(Ys,0,mo,Ms.width,Ms.height,0,zo,Jo,null),lt.bindFramebuffer(36160,xs),vt.framebufferTexture2D(36160,_o,Ys,pt.get(Io).__webglTexture,0),lt.bindFramebuffer(36160,null)}function js(xs,Ms,Io){if(vt.bindRenderbuffer(36161,xs),Ms.depthBuffer&&!Ms.stencilBuffer){let _o=33189;if(Io){const Ys=Ms.depthTexture;Ys&&Ys.isDepthTexture&&(Ys.type===1015?_o=36012:Ys.type===1014&&(_o=33190));const zo=Co(Ms);vt.renderbufferStorageMultisample(36161,zo,_o,Ms.width,Ms.height)}else vt.renderbufferStorage(36161,_o,Ms.width,Ms.height);vt.framebufferRenderbuffer(36160,36096,36161,xs)}else if(Ms.depthBuffer&&Ms.stencilBuffer){if(Io){const _o=Co(Ms);vt.renderbufferStorageMultisample(36161,_o,35056,Ms.width,Ms.height)}else vt.renderbufferStorage(36161,34041,Ms.width,Ms.height);vt.framebufferRenderbuffer(36160,33306,36161,xs)}else{const _o=Ms.isWebGLMultipleRenderTargets===!0?Ms.texture[0]:Ms.texture,Ys=Dt.convert(_o.format),zo=Dt.convert(_o.type),Jo=Kn(_o.internalFormat,Ys,zo);if(Io){const mo=Co(Ms);vt.renderbufferStorageMultisample(36161,mo,Jo,Ms.width,Ms.height)}else vt.renderbufferStorage(36161,Jo,Ms.width,Ms.height)}vt.bindRenderbuffer(36161,null)}function Ws(xs){const Ms=pt.get(xs),Io=xs.isWebGLCubeRenderTarget===!0;if(xs.depthTexture){if(Io)throw new Error("target.depthTexture not supported in Cube render targets");(function(_o,Ys){if(Ys&&Ys.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(lt.bindFramebuffer(36160,_o),!Ys.depthTexture||!Ys.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");pt.get(Ys.depthTexture).__webglTexture&&Ys.depthTexture.image.width===Ys.width&&Ys.depthTexture.image.height===Ys.height||(Ys.depthTexture.image.width=Ys.width,Ys.depthTexture.image.height=Ys.height,Ys.depthTexture.needsUpdate=!0),ks(Ys.depthTexture,0);const zo=pt.get(Ys.depthTexture).__webglTexture;if(Ys.depthTexture.format===1026)vt.framebufferTexture2D(36160,36096,3553,zo,0);else{if(Ys.depthTexture.format!==1027)throw new Error("Unknown depthTexture format");vt.framebufferTexture2D(36160,33306,3553,zo,0)}})(Ms.__webglFramebuffer,xs)}else if(Io){Ms.__webglDepthbuffer=[];for(let _o=0;_o<6;_o++)lt.bindFramebuffer(36160,Ms.__webglFramebuffer[_o]),Ms.__webglDepthbuffer[_o]=vt.createRenderbuffer(),js(Ms.__webglDepthbuffer[_o],xs,!1)}else lt.bindFramebuffer(36160,Ms.__webglFramebuffer),Ms.__webglDepthbuffer=vt.createRenderbuffer(),js(Ms.__webglDepthbuffer,xs,!1);lt.bindFramebuffer(36160,null)}function Co(xs){return $t&&xs.isWebGLMultisampleRenderTarget?Math.min(lr,xs.samples):0}let jo=!1,Qo=!1;this.allocateTextureUnit=function(){const xs=Qn;return xs>=Xt&&console.warn("THREE.WebGLTextures: Trying to use "+xs+" texture units while this GPU supports only "+Xt),Qn+=1,xs},this.resetTextureUnits=function(){Qn=0},this.setTexture2D=ks,this.setTexture2DArray=function(xs,Ms){const Io=pt.get(xs);xs.version>0&&Io.__version!==xs.version?oo(Io,xs,Ms):(lt.activeTexture(33984+Ms),lt.bindTexture(35866,Io.__webglTexture))},this.setTexture3D=function(xs,Ms){const Io=pt.get(xs);xs.version>0&&Io.__version!==xs.version?oo(Io,xs,Ms):(lt.activeTexture(33984+Ms),lt.bindTexture(32879,Io.__webglTexture))},this.setTextureCube=Cs,this.setupRenderTarget=function(xs){const Ms=xs.texture,Io=pt.get(xs),_o=pt.get(Ms);xs.addEventListener("dispose",Gn),xs.isWebGLMultipleRenderTargets!==!0&&(_o.__webglTexture=vt.createTexture(),_o.__version=Ms.version,Lt.memory.textures++);const Ys=xs.isWebGLCubeRenderTarget===!0,zo=xs.isWebGLMultipleRenderTargets===!0,Jo=xs.isWebGLMultisampleRenderTarget===!0,mo=Ms.isDataTexture3D||Ms.isDataTexture2DArray,fs=Xr(xs)||$t;if(!$t||Ms.format!==1022||Ms.type!==1015&&Ms.type!==1016||(Ms.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),Ys){Io.__webglFramebuffer=[];for(let $s=0;$s<6;$s++)Io.__webglFramebuffer[$s]=vt.createFramebuffer()}else if(Io.__webglFramebuffer=vt.createFramebuffer(),zo)if(_t.drawBuffers){const $s=xs.texture;for(let lo=0,go=$s.length;lo<go;lo++){const Qs=pt.get($s[lo]);Qs.__webglTexture===void 0&&(Qs.__webglTexture=vt.createTexture(),Lt.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(Jo)if($t){Io.__webglMultisampledFramebuffer=vt.createFramebuffer(),Io.__webglColorRenderbuffer=vt.createRenderbuffer(),vt.bindRenderbuffer(36161,Io.__webglColorRenderbuffer);const $s=Dt.convert(Ms.format),lo=Dt.convert(Ms.type),go=Kn(Ms.internalFormat,$s,lo),Qs=Co(xs);vt.renderbufferStorageMultisample(36161,Qs,go,xs.width,xs.height),lt.bindFramebuffer(36160,Io.__webglMultisampledFramebuffer),vt.framebufferRenderbuffer(36160,36064,36161,Io.__webglColorRenderbuffer),vt.bindRenderbuffer(36161,null),xs.depthBuffer&&(Io.__webglDepthRenderbuffer=vt.createRenderbuffer(),js(Io.__webglDepthRenderbuffer,xs,!0)),lt.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(Ys){lt.bindTexture(34067,_o.__webglTexture),Ts(34067,Ms,fs);for(let $s=0;$s<6;$s++)no(Io.__webglFramebuffer[$s],xs,Ms,36064,34069+$s);_n(Ms,fs)&&On(34067,Ms,xs.width,xs.height),lt.bindTexture(34067,null)}else if(zo){const $s=xs.texture;for(let lo=0,go=$s.length;lo<go;lo++){const Qs=$s[lo],Lo=pt.get(Qs);lt.bindTexture(3553,Lo.__webglTexture),Ts(3553,Qs,fs),no(Io.__webglFramebuffer,xs,Qs,36064+lo,3553),_n(Qs,fs)&&On(3553,Qs,xs.width,xs.height)}lt.bindTexture(3553,null)}else{let $s=3553;mo&&($t?$s=Ms.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),lt.bindTexture($s,_o.__webglTexture),Ts($s,Ms,fs),no(Io.__webglFramebuffer,xs,Ms,36064,$s),_n(Ms,fs)&&On($s,Ms,xs.width,xs.height,xs.depth),lt.bindTexture($s,null)}xs.depthBuffer&&Ws(xs)},this.updateRenderTargetMipmap=function(xs){const Ms=Xr(xs)||$t,Io=xs.isWebGLMultipleRenderTargets===!0?xs.texture:[xs.texture];for(let _o=0,Ys=Io.length;_o<Ys;_o++){const zo=Io[_o];if(_n(zo,Ms)){const Jo=xs.isWebGLCubeRenderTarget?34067:3553,mo=pt.get(zo).__webglTexture;lt.bindTexture(Jo,mo),On(Jo,zo,xs.width,xs.height),lt.bindTexture(Jo,null)}}},this.updateMultisampleRenderTarget=function(xs){if(xs.isWebGLMultisampleRenderTarget)if($t){const Ms=xs.width,Io=xs.height;let _o=16384;xs.depthBuffer&&(_o|=256),xs.stencilBuffer&&(_o|=1024);const Ys=pt.get(xs);lt.bindFramebuffer(36008,Ys.__webglMultisampledFramebuffer),lt.bindFramebuffer(36009,Ys.__webglFramebuffer),vt.blitFramebuffer(0,0,Ms,Io,0,0,Ms,Io,_o,9728),lt.bindFramebuffer(36008,null),lt.bindFramebuffer(36009,Ys.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(xs,Ms){xs&&xs.isWebGLRenderTarget&&(jo===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),jo=!0),xs=xs.texture),ks(xs,Ms)},this.safeSetTextureCube=function(xs,Ms){xs&&xs.isWebGLCubeRenderTarget&&(Qo===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Qo=!0),xs=xs.texture),Cs(xs,Ms)}}function l_(vt,it,lt){const pt=lt.isWebGL2;return{convert:function(_t){let Dt;if(_t===1009)return 5121;if(_t===1017)return 32819;if(_t===1018)return 32820;if(_t===1019)return 33635;if(_t===1010)return 5120;if(_t===1011)return 5122;if(_t===1012)return 5123;if(_t===1013)return 5124;if(_t===1014)return 5125;if(_t===1015)return 5126;if(_t===1016)return pt?5131:(Dt=it.get("OES_texture_half_float"),Dt!==null?Dt.HALF_FLOAT_OES:null);if(_t===1021)return 6406;if(_t===1022)return 6407;if(_t===1023)return 6408;if(_t===1024)return 6409;if(_t===1025)return 6410;if(_t===1026)return 6402;if(_t===1027)return 34041;if(_t===1028)return 6403;if(_t===1029)return 36244;if(_t===1030)return 33319;if(_t===1031)return 33320;if(_t===1032)return 36248;if(_t===1033)return 36249;if(_t===33776||_t===33777||_t===33778||_t===33779){if(Dt=it.get("WEBGL_compressed_texture_s3tc"),Dt===null)return null;if(_t===33776)return Dt.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_t===33777)return Dt.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_t===33778)return Dt.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_t===33779)return Dt.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(_t===35840||_t===35841||_t===35842||_t===35843){if(Dt=it.get("WEBGL_compressed_texture_pvrtc"),Dt===null)return null;if(_t===35840)return Dt.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_t===35841)return Dt.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_t===35842)return Dt.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_t===35843)return Dt.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(_t===36196)return Dt=it.get("WEBGL_compressed_texture_etc1"),Dt!==null?Dt.COMPRESSED_RGB_ETC1_WEBGL:null;if((_t===37492||_t===37496)&&(Dt=it.get("WEBGL_compressed_texture_etc"),Dt!==null)){if(_t===37492)return Dt.COMPRESSED_RGB8_ETC2;if(_t===37496)return Dt.COMPRESSED_RGBA8_ETC2_EAC}return _t===37808||_t===37809||_t===37810||_t===37811||_t===37812||_t===37813||_t===37814||_t===37815||_t===37816||_t===37817||_t===37818||_t===37819||_t===37820||_t===37821||_t===37840||_t===37841||_t===37842||_t===37843||_t===37844||_t===37845||_t===37846||_t===37847||_t===37848||_t===37849||_t===37850||_t===37851||_t===37852||_t===37853?(Dt=it.get("WEBGL_compressed_texture_astc"),Dt!==null?_t:null):_t===36492?(Dt=it.get("EXT_texture_compression_bptc"),Dt!==null?_t:null):_t===1020?pt?34042:(Dt=it.get("WEBGL_depth_texture"),Dt!==null?Dt.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class e0 extends lu{constructor(it=[]){super(),this.cameras=it}}e0.prototype.isArrayCamera=!0;class Vv extends rn{constructor(){super(),this.type="Group"}}Vv.prototype.isGroup=!0;const dy={type:"move"};class hy{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vv,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Vv,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ot,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ot),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vv,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ot,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ot),this._grip}dispatchEvent(it){return this._targetRay!==null&&this._targetRay.dispatchEvent(it),this._grip!==null&&this._grip.dispatchEvent(it),this._hand!==null&&this._hand.dispatchEvent(it),this}disconnect(it){return this.dispatchEvent({type:"disconnected",data:it}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(it,lt,pt){let _t=null,Dt=null,Lt=null;const $t=this._targetRay,Xt=this._grip,Yt=this._hand;if(it&&lt.session.visibilityState!=="visible-blurred")if($t!==null&&(_t=lt.getPose(it.targetRaySpace,pt),_t!==null&&($t.matrix.fromArray(_t.transform.matrix),$t.matrix.decompose($t.position,$t.rotation,$t.scale),_t.linearVelocity?($t.hasLinearVelocity=!0,$t.linearVelocity.copy(_t.linearVelocity)):$t.hasLinearVelocity=!1,_t.angularVelocity?($t.hasAngularVelocity=!0,$t.angularVelocity.copy(_t.angularVelocity)):$t.hasAngularVelocity=!1,this.dispatchEvent(dy))),Yt&&it.hand){Lt=!0;for(const kr of it.hand.values()){const Lr=lt.getJointPose(kr,pt);if(Yt.joints[kr.jointName]===void 0){const _n=new Vv;_n.matrixAutoUpdate=!1,_n.visible=!1,Yt.joints[kr.jointName]=_n,Yt.add(_n)}const Xr=Yt.joints[kr.jointName];Lr!==null&&(Xr.matrix.fromArray(Lr.transform.matrix),Xr.matrix.decompose(Xr.position,Xr.rotation,Xr.scale),Xr.jointRadius=Lr.radius),Xr.visible=Lr!==null}const Zt=Yt.joints["index-finger-tip"],lr=Yt.joints["thumb-tip"],xr=Zt.position.distanceTo(lr.position),wr=.02,Ir=.005;Yt.inputState.pinching&&xr>wr+Ir?(Yt.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:it.handedness,target:this})):!Yt.inputState.pinching&&xr<=wr-Ir&&(Yt.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:it.handedness,target:this}))}else Xt!==null&&it.gripSpace&&(Dt=lt.getPose(it.gripSpace,pt),Dt!==null&&(Xt.matrix.fromArray(Dt.transform.matrix),Xt.matrix.decompose(Xt.position,Xt.rotation,Xt.scale),Dt.linearVelocity?(Xt.hasLinearVelocity=!0,Xt.linearVelocity.copy(Dt.linearVelocity)):Xt.hasLinearVelocity=!1,Dt.angularVelocity?(Xt.hasAngularVelocity=!0,Xt.angularVelocity.copy(Dt.angularVelocity)):Xt.hasAngularVelocity=!1));return $t!==null&&($t.visible=_t!==null),Xt!==null&&(Xt.visible=Dt!==null),Yt!==null&&(Yt.visible=Lt!==null),this}}class Jv extends dt{constructor(it,lt){super();const pt=this,_t=it.state;let Dt=null,Lt=1,$t=null,Xt="local-floor",Yt=null,Zt=null,lr=null,xr=null;const wr=[],Ir=new Map,kr=new lu;kr.layers.enable(1),kr.viewport=new Vt;const Lr=new lu;Lr.layers.enable(2),Lr.viewport=new Vt;const Xr=[kr,Lr],_n=new e0;_n.layers.enable(1),_n.layers.enable(2);let On=null,Kn=null;function Mn(Ts){const ws=Ir.get(Ts.inputSource);ws&&ws.dispatchEvent({type:Ts.type,data:Ts.inputSource})}function ca(){Ir.forEach(function(Ts,ws){Ts.disconnect(ws)}),Ir.clear(),On=null,Kn=null,_t.bindXRFramebuffer(null),it.setRenderTarget(it.getRenderTarget()),_s.stop(),pt.isPresenting=!1,pt.dispatchEvent({type:"sessionend"})}function Gn(Ts){const ws=Dt.inputSources;for(let oo=0;oo<wr.length;oo++)Ir.set(ws[oo],wr[oo]);for(let oo=0;oo<Ts.removed.length;oo++){const no=Ts.removed[oo],js=Ir.get(no);js&&(js.dispatchEvent({type:"disconnected",data:no}),Ir.delete(no))}for(let oo=0;oo<Ts.added.length;oo++){const no=Ts.added[oo],js=Ir.get(no);js&&js.dispatchEvent({type:"connected",data:no})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Ts){let ws=wr[Ts];return ws===void 0&&(ws=new hy,wr[Ts]=ws),ws.getTargetRaySpace()},this.getControllerGrip=function(Ts){let ws=wr[Ts];return ws===void 0&&(ws=new hy,wr[Ts]=ws),ws.getGripSpace()},this.getHand=function(Ts){let ws=wr[Ts];return ws===void 0&&(ws=new hy,wr[Ts]=ws),ws.getHandSpace()},this.setFramebufferScaleFactor=function(Ts){Lt=Ts,pt.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Ts){Xt=Ts,pt.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return $t},this.getSession=function(){return Dt},this.setSession=async function(Ts){if(Dt=Ts,Dt!==null){Dt.addEventListener("select",Mn),Dt.addEventListener("selectstart",Mn),Dt.addEventListener("selectend",Mn),Dt.addEventListener("squeeze",Mn),Dt.addEventListener("squeezestart",Mn),Dt.addEventListener("squeezeend",Mn),Dt.addEventListener("end",ca),Dt.addEventListener("inputsourceschange",Gn);const ws=lt.getContextAttributes();if(ws.xrCompatible!==!0&&await lt.makeXRCompatible(),Dt.renderState.layers===void 0){const oo={antialias:ws.antialias,alpha:ws.alpha,depth:ws.depth,stencil:ws.stencil,framebufferScaleFactor:Lt},no=new XRWebGLLayer(Dt,lt,oo);Dt.updateRenderState({baseLayer:no})}else{let oo=0;ws.depth&&(oo=ws.stencil?34041:6402);const no={colorFormat:ws.alpha?6408:6407,depthFormat:oo,scaleFactor:Lt};Zt=new XRWebGLBinding(Dt,lt),xr=Zt.createProjectionLayer(no),lr=lt.createFramebuffer(),Dt.updateRenderState({layers:[xr]})}$t=await Dt.requestReferenceSpace(Xt),_s.setContext(Dt),_s.start(),pt.isPresenting=!0,pt.dispatchEvent({type:"sessionstart"})}};const Qn=new Ot,ks=new Ot;function Cs(Ts,ws){ws===null?Ts.matrixWorld.copy(Ts.matrix):Ts.matrixWorld.multiplyMatrices(ws.matrixWorld,Ts.matrix),Ts.matrixWorldInverse.copy(Ts.matrixWorld).invert()}this.updateCamera=function(Ts){if(Dt===null)return;_n.near=Lr.near=kr.near=Ts.near,_n.far=Lr.far=kr.far=Ts.far,On===_n.near&&Kn===_n.far||(Dt.updateRenderState({depthNear:_n.near,depthFar:_n.far}),On=_n.near,Kn=_n.far);const ws=Ts.parent,oo=_n.cameras;Cs(_n,ws);for(let js=0;js<oo.length;js++)Cs(oo[js],ws);_n.matrixWorld.decompose(_n.position,_n.quaternion,_n.scale),Ts.position.copy(_n.position),Ts.quaternion.copy(_n.quaternion),Ts.scale.copy(_n.scale),Ts.matrix.copy(_n.matrix),Ts.matrixWorld.copy(_n.matrixWorld);const no=Ts.children;for(let js=0,Ws=no.length;js<Ws;js++)no[js].updateMatrixWorld(!0);oo.length===2?(function(js,Ws,Co){Qn.setFromMatrixPosition(Ws.matrixWorld),ks.setFromMatrixPosition(Co.matrixWorld);const jo=Qn.distanceTo(ks),Qo=Ws.projectionMatrix.elements,xs=Co.projectionMatrix.elements,Ms=Qo[14]/(Qo[10]-1),Io=Qo[14]/(Qo[10]+1),_o=(Qo[9]+1)/Qo[5],Ys=(Qo[9]-1)/Qo[5],zo=(Qo[8]-1)/Qo[0],Jo=(xs[8]+1)/xs[0],mo=Ms*zo,fs=Ms*Jo,$s=jo/(-zo+Jo),lo=$s*-zo;Ws.matrixWorld.decompose(js.position,js.quaternion,js.scale),js.translateX(lo),js.translateZ($s),js.matrixWorld.compose(js.position,js.quaternion,js.scale),js.matrixWorldInverse.copy(js.matrixWorld).invert();const go=Ms+$s,Qs=Io+$s,Lo=mo-lo,Cu=fs+(jo-lo),Du=_o*Io/Qs*go,Mu=Ys*Io/Qs*go;js.projectionMatrix.makePerspective(Lo,Cu,Du,Mu,go,Qs)})(_n,kr,Lr):_n.projectionMatrix.copy(kr.projectionMatrix)},this.getCamera=function(){return _n};let gs=null;const _s=new el;_s.setAnimationLoop(function(Ts,ws){if(Yt=ws.getViewerPose($t),Yt!==null){const no=Yt.views,js=Dt.renderState.baseLayer;Dt.renderState.layers===void 0&&_t.bindXRFramebuffer(js.framebuffer);let Ws=!1;no.length!==_n.cameras.length&&(_n.cameras.length=0,Ws=!0);for(let Co=0;Co<no.length;Co++){const jo=no[Co];let Qo=null;if(Dt.renderState.layers===void 0)Qo=js.getViewport(jo);else{const Ms=Zt.getViewSubImage(xr,jo);_t.bindXRFramebuffer(lr),lt.framebufferTexture2D(36160,36064,3553,Ms.colorTexture,0),Ms.depthStencilTexture!==void 0&&lt.framebufferTexture2D(36160,36096,3553,Ms.depthStencilTexture,0),Qo=Ms.viewport}const xs=Xr[Co];xs.matrix.fromArray(jo.transform.matrix),xs.projectionMatrix.fromArray(jo.projectionMatrix),xs.viewport.set(Qo.x,Qo.y,Qo.width,Qo.height),Co===0&&_n.matrix.copy(xs.matrix),Ws===!0&&_n.cameras.push(xs)}}const oo=Dt.inputSources;for(let no=0;no<wr.length;no++){const js=wr[no],Ws=oo[no];js.update(Ws,ws,$t)}gs&&gs(Ts,ws)}),this.setAnimationLoop=function(Ts){gs=Ts},this.dispose=function(){}}}function Jn(vt){function it(pt,_t){pt.opacity.value=_t.opacity,_t.color&&pt.diffuse.value.copy(_t.color),_t.emissive&&pt.emissive.value.copy(_t.emissive).multiplyScalar(_t.emissiveIntensity),_t.map&&(pt.map.value=_t.map),_t.alphaMap&&(pt.alphaMap.value=_t.alphaMap),_t.specularMap&&(pt.specularMap.value=_t.specularMap);const Dt=vt.get(_t).envMap;if(Dt){pt.envMap.value=Dt,pt.flipEnvMap.value=Dt.isCubeTexture&&Dt._needsFlipEnvMap?-1:1,pt.reflectivity.value=_t.reflectivity,pt.refractionRatio.value=_t.refractionRatio;const Xt=vt.get(Dt).__maxMipLevel;Xt!==void 0&&(pt.maxMipLevel.value=Xt)}let Lt,$t;_t.lightMap&&(pt.lightMap.value=_t.lightMap,pt.lightMapIntensity.value=_t.lightMapIntensity),_t.aoMap&&(pt.aoMap.value=_t.aoMap,pt.aoMapIntensity.value=_t.aoMapIntensity),_t.map?Lt=_t.map:_t.specularMap?Lt=_t.specularMap:_t.displacementMap?Lt=_t.displacementMap:_t.normalMap?Lt=_t.normalMap:_t.bumpMap?Lt=_t.bumpMap:_t.roughnessMap?Lt=_t.roughnessMap:_t.metalnessMap?Lt=_t.metalnessMap:_t.alphaMap?Lt=_t.alphaMap:_t.emissiveMap?Lt=_t.emissiveMap:_t.clearcoatMap?Lt=_t.clearcoatMap:_t.clearcoatNormalMap?Lt=_t.clearcoatNormalMap:_t.clearcoatRoughnessMap&&(Lt=_t.clearcoatRoughnessMap),Lt!==void 0&&(Lt.isWebGLRenderTarget&&(Lt=Lt.texture),Lt.matrixAutoUpdate===!0&&Lt.updateMatrix(),pt.uvTransform.value.copy(Lt.matrix)),_t.aoMap?$t=_t.aoMap:_t.lightMap&&($t=_t.lightMap),$t!==void 0&&($t.isWebGLRenderTarget&&($t=$t.texture),$t.matrixAutoUpdate===!0&&$t.updateMatrix(),pt.uv2Transform.value.copy($t.matrix))}function lt(pt,_t){pt.roughness.value=_t.roughness,pt.metalness.value=_t.metalness,_t.roughnessMap&&(pt.roughnessMap.value=_t.roughnessMap),_t.metalnessMap&&(pt.metalnessMap.value=_t.metalnessMap),_t.emissiveMap&&(pt.emissiveMap.value=_t.emissiveMap),_t.bumpMap&&(pt.bumpMap.value=_t.bumpMap,pt.bumpScale.value=_t.bumpScale,_t.side===1&&(pt.bumpScale.value*=-1)),_t.normalMap&&(pt.normalMap.value=_t.normalMap,pt.normalScale.value.copy(_t.normalScale),_t.side===1&&pt.normalScale.value.negate()),_t.displacementMap&&(pt.displacementMap.value=_t.displacementMap,pt.displacementScale.value=_t.displacementScale,pt.displacementBias.value=_t.displacementBias),vt.get(_t).envMap&&(pt.envMapIntensity.value=_t.envMapIntensity)}return{refreshFogUniforms:function(pt,_t){pt.fogColor.value.copy(_t.color),_t.isFog?(pt.fogNear.value=_t.near,pt.fogFar.value=_t.far):_t.isFogExp2&&(pt.fogDensity.value=_t.density)},refreshMaterialUniforms:function(pt,_t,Dt,Lt,$t){_t.isMeshBasicMaterial?it(pt,_t):_t.isMeshLambertMaterial?(it(pt,_t),(function(Xt,Yt){Yt.emissiveMap&&(Xt.emissiveMap.value=Yt.emissiveMap)})(pt,_t)):_t.isMeshToonMaterial?(it(pt,_t),(function(Xt,Yt){Yt.gradientMap&&(Xt.gradientMap.value=Yt.gradientMap),Yt.emissiveMap&&(Xt.emissiveMap.value=Yt.emissiveMap),Yt.bumpMap&&(Xt.bumpMap.value=Yt.bumpMap,Xt.bumpScale.value=Yt.bumpScale,Yt.side===1&&(Xt.bumpScale.value*=-1)),Yt.normalMap&&(Xt.normalMap.value=Yt.normalMap,Xt.normalScale.value.copy(Yt.normalScale),Yt.side===1&&Xt.normalScale.value.negate()),Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias)})(pt,_t)):_t.isMeshPhongMaterial?(it(pt,_t),(function(Xt,Yt){Xt.specular.value.copy(Yt.specular),Xt.shininess.value=Math.max(Yt.shininess,1e-4),Yt.emissiveMap&&(Xt.emissiveMap.value=Yt.emissiveMap),Yt.bumpMap&&(Xt.bumpMap.value=Yt.bumpMap,Xt.bumpScale.value=Yt.bumpScale,Yt.side===1&&(Xt.bumpScale.value*=-1)),Yt.normalMap&&(Xt.normalMap.value=Yt.normalMap,Xt.normalScale.value.copy(Yt.normalScale),Yt.side===1&&Xt.normalScale.value.negate()),Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias)})(pt,_t)):_t.isMeshStandardMaterial?(it(pt,_t),_t.isMeshPhysicalMaterial?(function(Xt,Yt,Zt){lt(Xt,Yt),Xt.reflectivity.value=Yt.reflectivity,Xt.clearcoat.value=Yt.clearcoat,Xt.clearcoatRoughness.value=Yt.clearcoatRoughness,Yt.sheen&&Xt.sheen.value.copy(Yt.sheen),Yt.clearcoatMap&&(Xt.clearcoatMap.value=Yt.clearcoatMap),Yt.clearcoatRoughnessMap&&(Xt.clearcoatRoughnessMap.value=Yt.clearcoatRoughnessMap),Yt.clearcoatNormalMap&&(Xt.clearcoatNormalScale.value.copy(Yt.clearcoatNormalScale),Xt.clearcoatNormalMap.value=Yt.clearcoatNormalMap,Yt.side===1&&Xt.clearcoatNormalScale.value.negate()),Xt.transmission.value=Yt.transmission,Yt.transmissionMap&&(Xt.transmissionMap.value=Yt.transmissionMap),Yt.transmission>0&&(Xt.transmissionSamplerMap.value=Zt.texture,Xt.transmissionSamplerSize.value.set(Zt.width,Zt.height)),Xt.thickness.value=Yt.thickness,Yt.thicknessMap&&(Xt.thicknessMap.value=Yt.thicknessMap),Xt.attenuationDistance.value=Yt.attenuationDistance,Xt.attenuationColor.value.copy(Yt.attenuationColor)})(pt,_t,$t):lt(pt,_t)):_t.isMeshMatcapMaterial?(it(pt,_t),(function(Xt,Yt){Yt.matcap&&(Xt.matcap.value=Yt.matcap),Yt.bumpMap&&(Xt.bumpMap.value=Yt.bumpMap,Xt.bumpScale.value=Yt.bumpScale,Yt.side===1&&(Xt.bumpScale.value*=-1)),Yt.normalMap&&(Xt.normalMap.value=Yt.normalMap,Xt.normalScale.value.copy(Yt.normalScale),Yt.side===1&&Xt.normalScale.value.negate()),Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias)})(pt,_t)):_t.isMeshDepthMaterial?(it(pt,_t),(function(Xt,Yt){Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias)})(pt,_t)):_t.isMeshDistanceMaterial?(it(pt,_t),(function(Xt,Yt){Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias),Xt.referencePosition.value.copy(Yt.referencePosition),Xt.nearDistance.value=Yt.nearDistance,Xt.farDistance.value=Yt.farDistance})(pt,_t)):_t.isMeshNormalMaterial?(it(pt,_t),(function(Xt,Yt){Yt.bumpMap&&(Xt.bumpMap.value=Yt.bumpMap,Xt.bumpScale.value=Yt.bumpScale,Yt.side===1&&(Xt.bumpScale.value*=-1)),Yt.normalMap&&(Xt.normalMap.value=Yt.normalMap,Xt.normalScale.value.copy(Yt.normalScale),Yt.side===1&&Xt.normalScale.value.negate()),Yt.displacementMap&&(Xt.displacementMap.value=Yt.displacementMap,Xt.displacementScale.value=Yt.displacementScale,Xt.displacementBias.value=Yt.displacementBias)})(pt,_t)):_t.isLineBasicMaterial?((function(Xt,Yt){Xt.diffuse.value.copy(Yt.color),Xt.opacity.value=Yt.opacity})(pt,_t),_t.isLineDashedMaterial&&(function(Xt,Yt){Xt.dashSize.value=Yt.dashSize,Xt.totalSize.value=Yt.dashSize+Yt.gapSize,Xt.scale.value=Yt.scale})(pt,_t)):_t.isPointsMaterial?(function(Xt,Yt,Zt,lr){Xt.diffuse.value.copy(Yt.color),Xt.opacity.value=Yt.opacity,Xt.size.value=Yt.size*Zt,Xt.scale.value=.5*lr,Yt.map&&(Xt.map.value=Yt.map),Yt.alphaMap&&(Xt.alphaMap.value=Yt.alphaMap);let xr;Yt.map?xr=Yt.map:Yt.alphaMap&&(xr=Yt.alphaMap),xr!==void 0&&(xr.matrixAutoUpdate===!0&&xr.updateMatrix(),Xt.uvTransform.value.copy(xr.matrix))})(pt,_t,Dt,Lt):_t.isSpriteMaterial?(function(Xt,Yt){Xt.diffuse.value.copy(Yt.color),Xt.opacity.value=Yt.opacity,Xt.rotation.value=Yt.rotation,Yt.map&&(Xt.map.value=Yt.map),Yt.alphaMap&&(Xt.alphaMap.value=Yt.alphaMap);let Zt;Yt.map?Zt=Yt.map:Yt.alphaMap&&(Zt=Yt.alphaMap),Zt!==void 0&&(Zt.matrixAutoUpdate===!0&&Zt.updateMatrix(),Xt.uvTransform.value.copy(Zt.matrix))})(pt,_t):_t.isShadowMaterial?(pt.color.value.copy(_t.color),pt.opacity.value=_t.opacity):_t.isShaderMaterial&&(_t.uniformsNeedUpdate=!1)}}}function Ql(vt={}){const it=vt.canvas!==void 0?vt.canvas:(function(){const Us=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return Us.style.display="block",Us})(),lt=vt.context!==void 0?vt.context:null,pt=vt.alpha!==void 0&&vt.alpha,_t=vt.depth===void 0||vt.depth,Dt=vt.stencil===void 0||vt.stencil,Lt=vt.antialias!==void 0&&vt.antialias,$t=vt.premultipliedAlpha===void 0||vt.premultipliedAlpha,Xt=vt.preserveDrawingBuffer!==void 0&&vt.preserveDrawingBuffer,Yt=vt.powerPreference!==void 0?vt.powerPreference:"default",Zt=vt.failIfMajorPerformanceCaveat!==void 0&&vt.failIfMajorPerformanceCaveat;let lr=null,xr=null;const wr=[],Ir=[];this.domElement=it,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const kr=this;let Lr=!1,Xr=0,_n=0,On=null,Kn=-1,Mn=null;const ca=new Vt,Gn=new Vt;let Qn=null,ks=it.width,Cs=it.height,gs=1,_s=null,Ts=null;const ws=new Vt(0,0,ks,Cs),oo=new Vt(0,0,ks,Cs);let no=!1;const js=[],Ws=new dl;let Co=!1,jo=!1,Qo=null;const xs=new Nn,Ms=new Ot,Io={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function _o(){return On===null?gs:1}let Ys,zo,Jo,mo,fs,$s,lo,go,Qs,Lo,Cu,Du,Mu,Xl,oy,_m,t1,iT,SA,wA,R_,B0,cu=lt;function xR(Us,Fo){for(let Ao=0;Ao<Us.length;Ao++){const Wo=Us[Ao],vu=it.getContext(Wo,Fo);if(vu!==null)return vu}return null}try{const Us={alpha:pt,depth:_t,stencil:Dt,antialias:Lt,premultipliedAlpha:$t,preserveDrawingBuffer:Xt,powerPreference:Yt,failIfMajorPerformanceCaveat:Zt};if(it.addEventListener("webglcontextlost",lN,!1),it.addEventListener("webglcontextrestored",cN,!1),cu===null){const Fo=["webgl2","webgl","experimental-webgl"];if(kr.isWebGL1Renderer===!0&&Fo.shift(),cu=xR(Fo,Us),cu===null)throw xR(Fo)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}cu.getShaderPrecisionFormat===void 0&&(cu.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Us){throw console.error("THREE.WebGLRenderer: "+Us.message),Us}function SR(){Ys=new Hm(cu),zo=new Lp(cu,Ys,vt),Ys.init(zo),R_=new l_(cu,Ys,zo),Jo=new xv(cu,Ys,zo),js[0]=1029,mo=new Wm,fs=new cy,$s=new Yl(cu,Ys,Jo,fs,zo,R_,mo),lo=new nv(kr),go=new gv(cu,zo),B0=new vv(cu,Ys,go,zo),Qs=new Rv(cu,go,mo,B0),Lo=new tm(cu,Qs,go,mo),iT=new wm(cu),oy=new cp(fs),Cu=new u_(kr,lo,Ys,zo,B0,oy),Du=new Jn(fs),Mu=new Zv(fs),Xl=new Iy(Ys,zo),t1=new nm(kr,lo,Jo,Lo,$t),_m=new pp(kr,Lo,zo),SA=new rv(cu,Ys,mo,zo),wA=new mm(cu,Ys,mo,zo),mo.programs=Cu.programs,kr.capabilities=zo,kr.extensions=Ys,kr.properties=fs,kr.renderLists=Mu,kr.shadowMap=_m,kr.state=Jo,kr.info=mo}SR();const Qy=new Jv(kr,cu);function lN(Us){Us.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),Lr=!0}function cN(){console.log("THREE.WebGLRenderer: Context Restored."),Lr=!1;const Us=mo.autoReset,Fo=_m.enabled,Ao=_m.autoUpdate,Wo=_m.needsUpdate,vu=_m.type;SR(),mo.autoReset=Us,_m.enabled=Fo,_m.autoUpdate=Ao,_m.needsUpdate=Wo,_m.type=vu}function TA(Us){const Fo=Us.target;Fo.removeEventListener("dispose",TA),(function(Ao){(function(Wo){const vu=fs.get(Wo).programs;vu!==void 0&&vu.forEach(function(rm){Cu.releaseProgram(rm)})})(Ao),fs.remove(Ao)})(Fo)}this.xr=Qy,this.getContext=function(){return cu},this.getContextAttributes=function(){return cu.getContextAttributes()},this.forceContextLoss=function(){const Us=Ys.get("WEBGL_lose_context");Us&&Us.loseContext()},this.forceContextRestore=function(){const Us=Ys.get("WEBGL_lose_context");Us&&Us.restoreContext()},this.getPixelRatio=function(){return gs},this.setPixelRatio=function(Us){Us!==void 0&&(gs=Us,this.setSize(ks,Cs,!1))},this.getSize=function(Us){return Us.set(ks,Cs)},this.setSize=function(Us,Fo,Ao){Qy.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(ks=Us,Cs=Fo,it.width=Math.floor(Us*gs),it.height=Math.floor(Fo*gs),Ao!==!1&&(it.style.width=Us+"px",it.style.height=Fo+"px"),this.setViewport(0,0,Us,Fo))},this.getDrawingBufferSize=function(Us){return Us.set(ks*gs,Cs*gs).floor()},this.setDrawingBufferSize=function(Us,Fo,Ao){ks=Us,Cs=Fo,gs=Ao,it.width=Math.floor(Us*Ao),it.height=Math.floor(Fo*Ao),this.setViewport(0,0,Us,Fo)},this.getCurrentViewport=function(Us){return Us.copy(ca)},this.getViewport=function(Us){return Us.copy(ws)},this.setViewport=function(Us,Fo,Ao,Wo){Us.isVector4?ws.set(Us.x,Us.y,Us.z,Us.w):ws.set(Us,Fo,Ao,Wo),Jo.viewport(ca.copy(ws).multiplyScalar(gs).floor())},this.getScissor=function(Us){return Us.copy(oo)},this.setScissor=function(Us,Fo,Ao,Wo){Us.isVector4?oo.set(Us.x,Us.y,Us.z,Us.w):oo.set(Us,Fo,Ao,Wo),Jo.scissor(Gn.copy(oo).multiplyScalar(gs).floor())},this.getScissorTest=function(){return no},this.setScissorTest=function(Us){Jo.setScissorTest(no=Us)},this.setOpaqueSort=function(Us){_s=Us},this.setTransparentSort=function(Us){Ts=Us},this.getClearColor=function(Us){return Us.copy(t1.getClearColor())},this.setClearColor=function(){t1.setClearColor.apply(t1,arguments)},this.getClearAlpha=function(){return t1.getClearAlpha()},this.setClearAlpha=function(){t1.setClearAlpha.apply(t1,arguments)},this.clear=function(Us,Fo,Ao){let Wo=0;(Us===void 0||Us)&&(Wo|=16384),(Fo===void 0||Fo)&&(Wo|=256),(Ao===void 0||Ao)&&(Wo|=1024),cu.clear(Wo)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){it.removeEventListener("webglcontextlost",lN,!1),it.removeEventListener("webglcontextrestored",cN,!1),Mu.dispose(),Xl.dispose(),fs.dispose(),lo.dispose(),Lo.dispose(),B0.dispose(),Qy.dispose(),Qy.removeEventListener("sessionstart",aw),Qy.removeEventListener("sessionend",dN),Qo&&(Qo.dispose(),Qo=null),tE.stop()},this.renderBufferImmediate=function(Us,Fo){B0.initAttributes();const Ao=fs.get(Us);Us.hasPositions&&!Ao.position&&(Ao.position=cu.createBuffer()),Us.hasNormals&&!Ao.normal&&(Ao.normal=cu.createBuffer()),Us.hasUvs&&!Ao.uv&&(Ao.uv=cu.createBuffer()),Us.hasColors&&!Ao.color&&(Ao.color=cu.createBuffer());const Wo=Fo.getAttributes();Us.hasPositions&&(cu.bindBuffer(34962,Ao.position),cu.bufferData(34962,Us.positionArray,35048),B0.enableAttribute(Wo.position),cu.vertexAttribPointer(Wo.position,3,5126,!1,0,0)),Us.hasNormals&&(cu.bindBuffer(34962,Ao.normal),cu.bufferData(34962,Us.normalArray,35048),B0.enableAttribute(Wo.normal),cu.vertexAttribPointer(Wo.normal,3,5126,!1,0,0)),Us.hasUvs&&(cu.bindBuffer(34962,Ao.uv),cu.bufferData(34962,Us.uvArray,35048),B0.enableAttribute(Wo.uv),cu.vertexAttribPointer(Wo.uv,2,5126,!1,0,0)),Us.hasColors&&(cu.bindBuffer(34962,Ao.color),cu.bufferData(34962,Us.colorArray,35048),B0.enableAttribute(Wo.color),cu.vertexAttribPointer(Wo.color,3,5126,!1,0,0)),B0.disableUnusedAttributes(),cu.drawArrays(4,0,Us.count),Us.count=0},this.renderBufferDirect=function(Us,Fo,Ao,Wo,vu,rm){Fo===null&&(Fo=Io);const Hl=vu.isMesh&&vu.matrixWorld.determinant()<0,Eu=nE(Us,Fo,Wo,vu);Jo.setMaterial(Wo,Hl);let Sp=Ao.index;const ul=Ao.attributes.position;if(Sp===null){if(ul===void 0||ul.count===0)return}else if(Sp.count===0)return;let Vp,Ul=1;Wo.wireframe===!0&&(Sp=Qs.getWireframeAttribute(Ao),Ul=2),(Wo.morphTargets||Wo.morphNormals)&&iT.update(vu,Ao,Wo,Eu),B0.setup(vu,Wo,Eu,Ao,Sp);let kp=SA;Sp!==null&&(Vp=go.get(Sp),kp=wA,kp.setIndex(Vp));const Uy=Sp!==null?Sp.count:ul.count,fv=Ao.drawRange.start*Ul,R1=Ao.drawRange.count*Ul,ev=rm!==null?rm.start*Ul:0,gS=rm!==null?rm.count*Ul:1/0,Ky=Math.max(fv,ev),r1=Math.min(Uy,fv+R1,ev+gS)-1,i_=Math.max(0,r1-Ky+1);if(i_!==0){if(vu.isMesh)Wo.wireframe===!0?(Jo.setLineWidth(Wo.wireframeLinewidth*_o()),kp.setMode(1)):kp.setMode(4);else if(vu.isLine){let XC=Wo.linewidth;XC===void 0&&(XC=1),Jo.setLineWidth(XC*_o()),vu.isLineSegments?kp.setMode(1):vu.isLineLoop?kp.setMode(2):kp.setMode(3)}else vu.isPoints?kp.setMode(0):vu.isSprite&&kp.setMode(4);if(vu.isInstancedMesh)kp.renderInstances(Ky,i_,vu.count);else if(Ao.isInstancedBufferGeometry){const XC=Math.min(Ao.instanceCount,Ao._maxInstanceCount);kp.renderInstances(Ky,i_,XC)}else kp.render(Ky,i_)}},this.compile=function(Us,Fo){xr=Xl.get(Us),xr.init(),Us.traverseVisible(function(Ao){Ao.isLight&&Ao.layers.test(Fo.layers)&&(xr.pushLight(Ao),Ao.castShadow&&xr.pushShadow(Ao))}),xr.setupLights(),Us.traverse(function(Ao){const Wo=Ao.material;if(Wo)if(Array.isArray(Wo))for(let vu=0;vu<Wo.length;vu++)WC(Wo[vu],Us,Ao);else WC(Wo,Us,Ao)})};let wR=null;function aw(){tE.stop()}function dN(){tE.start()}const tE=new el;function rE(Us,Fo,Ao){const Wo=Fo.isScene===!0?Fo.overrideMaterial:null;for(let vu=0,rm=Us.length;vu<rm;vu++){const Hl=Us[vu],Eu=Hl.object,Sp=Hl.geometry,ul=Wo===null?Hl.material:Wo,Vp=Hl.group;if(Ao.isArrayCamera){const Ul=Ao.cameras;for(let kp=0,Uy=Ul.length;kp<Uy;kp++){const fv=Ul[kp];Eu.layers.test(fv.layers)&&(Jo.viewport(ca.copy(fv.viewport)),xr.setupLightsView(fv),HC(Eu,Fo,fv,Sp,ul,Vp))}}else HC(Eu,Fo,Ao,Sp,ul,Vp)}}function HC(Us,Fo,Ao,Wo,vu,rm){if(Us.onBeforeRender(kr,Fo,Ao,Wo,vu,rm),Us.modelViewMatrix.multiplyMatrices(Ao.matrixWorldInverse,Us.matrixWorld),Us.normalMatrix.getNormalMatrix(Us.modelViewMatrix),Us.isImmediateRenderObject){const Hl=nE(Ao,Fo,vu,Us);Jo.setMaterial(vu),B0.reset(),(function(Eu,Sp){Eu.render(function(ul){kr.renderBufferImmediate(ul,Sp)})})(Us,Hl)}else vu.transparent===!0&&vu.side===2?(vu.side=1,vu.needsUpdate=!0,kr.renderBufferDirect(Ao,Fo,Wo,vu,Us,rm),vu.side=0,vu.needsUpdate=!0,kr.renderBufferDirect(Ao,Fo,Wo,vu,Us,rm),vu.side=2):kr.renderBufferDirect(Ao,Fo,Wo,vu,Us,rm);Us.onAfterRender(kr,Fo,Ao,Wo,vu,rm)}function WC(Us,Fo,Ao){Fo.isScene!==!0&&(Fo=Io);const Wo=fs.get(Us),vu=xr.state.lights,rm=xr.state.shadowsArray,Hl=vu.state.version,Eu=Cu.getParameters(Us,vu.state,rm,Fo,Ao),Sp=Cu.getProgramCacheKey(Eu);let ul=Wo.programs;Wo.environment=Us.isMeshStandardMaterial?Fo.environment:null,Wo.fog=Fo.fog,Wo.envMap=lo.get(Us.envMap||Wo.environment),ul===void 0&&(Us.addEventListener("dispose",TA),ul=new Map,Wo.programs=ul);let Vp=ul.get(Sp);if(Vp!==void 0){if(Wo.currentProgram===Vp&&Wo.lightsStateVersion===Hl)return zM(Us,Eu),Vp}else Eu.uniforms=Cu.getUniforms(Us),Us.onBuild(Eu,kr),Us.onBeforeCompile(Eu,kr),Vp=Cu.acquireProgram(Eu,Sp),ul.set(Sp,Vp),Wo.uniforms=Eu.uniforms;const Ul=Wo.uniforms;(Us.isShaderMaterial||Us.isRawShaderMaterial)&&Us.clipping!==!0||(Ul.clippingPlanes=oy.uniform),zM(Us,Eu),Wo.needsLights=(function(fv){return fv.isMeshLambertMaterial||fv.isMeshToonMaterial||fv.isMeshPhongMaterial||fv.isMeshStandardMaterial||fv.isShadowMaterial||fv.isShaderMaterial&&fv.lights===!0})(Us),Wo.lightsStateVersion=Hl,Wo.needsLights&&(Ul.ambientLightColor.value=vu.state.ambient,Ul.lightProbe.value=vu.state.probe,Ul.directionalLights.value=vu.state.directional,Ul.directionalLightShadows.value=vu.state.directionalShadow,Ul.spotLights.value=vu.state.spot,Ul.spotLightShadows.value=vu.state.spotShadow,Ul.rectAreaLights.value=vu.state.rectArea,Ul.ltc_1.value=vu.state.rectAreaLTC1,Ul.ltc_2.value=vu.state.rectAreaLTC2,Ul.pointLights.value=vu.state.point,Ul.pointLightShadows.value=vu.state.pointShadow,Ul.hemisphereLights.value=vu.state.hemi,Ul.directionalShadowMap.value=vu.state.directionalShadowMap,Ul.directionalShadowMatrix.value=vu.state.directionalShadowMatrix,Ul.spotShadowMap.value=vu.state.spotShadowMap,Ul.spotShadowMatrix.value=vu.state.spotShadowMatrix,Ul.pointShadowMap.value=vu.state.pointShadowMap,Ul.pointShadowMatrix.value=vu.state.pointShadowMatrix);const kp=Vp.getUniforms(),Uy=fp.seqWithValue(kp.seq,Ul);return Wo.currentProgram=Vp,Wo.uniformsList=Uy,Vp}function zM(Us,Fo){const Ao=fs.get(Us);Ao.outputEncoding=Fo.outputEncoding,Ao.instancing=Fo.instancing,Ao.skinning=Fo.skinning,Ao.numClippingPlanes=Fo.numClippingPlanes,Ao.numIntersection=Fo.numClipIntersection,Ao.vertexAlphas=Fo.vertexAlphas}function nE(Us,Fo,Ao,Wo){Fo.isScene!==!0&&(Fo=Io),$s.resetTextureUnits();const vu=Fo.fog,rm=Ao.isMeshStandardMaterial?Fo.environment:null,Hl=On===null?kr.outputEncoding:On.texture.encoding,Eu=lo.get(Ao.envMap||rm),Sp=Ao.vertexColors===!0&&Wo.geometry&&Wo.geometry.attributes.color&&Wo.geometry.attributes.color.itemSize===4,ul=fs.get(Ao),Vp=xr.state.lights;if(Co===!0&&(jo===!0||Us!==Mn)){const i_=Us===Mn&&Ao.id===Kn;oy.setState(Ao,Us,i_)}let Ul=!1;Ao.version===ul.__version?ul.needsLights&&ul.lightsStateVersion!==Vp.state.version||ul.outputEncoding!==Hl||Wo.isInstancedMesh&&ul.instancing===!1?Ul=!0:Wo.isInstancedMesh||ul.instancing!==!0?Wo.isSkinnedMesh&&ul.skinning===!1?Ul=!0:Wo.isSkinnedMesh||ul.skinning!==!0?ul.envMap!==Eu||Ao.fog&&ul.fog!==vu?Ul=!0:ul.numClippingPlanes===void 0||ul.numClippingPlanes===oy.numPlanes&&ul.numIntersection===oy.numIntersection?ul.vertexAlphas!==Sp&&(Ul=!0):Ul=!0:Ul=!0:Ul=!0:(Ul=!0,ul.__version=Ao.version);let kp=ul.currentProgram;Ul===!0&&(kp=WC(Ao,Fo,Wo));let Uy=!1,fv=!1,R1=!1;const ev=kp.getUniforms(),gS=ul.uniforms;if(Jo.useProgram(kp.program)&&(Uy=!0,fv=!0,R1=!0),Ao.id!==Kn&&(Kn=Ao.id,fv=!0),Uy||Mn!==Us){if(ev.setValue(cu,"projectionMatrix",Us.projectionMatrix),zo.logarithmicDepthBuffer&&ev.setValue(cu,"logDepthBufFC",2/(Math.log(Us.far+1)/Math.LN2)),Mn!==Us&&(Mn=Us,fv=!0,R1=!0),Ao.isShaderMaterial||Ao.isMeshPhongMaterial||Ao.isMeshToonMaterial||Ao.isMeshStandardMaterial||Ao.envMap){const i_=ev.map.cameraPosition;i_!==void 0&&i_.setValue(cu,Ms.setFromMatrixPosition(Us.matrixWorld))}(Ao.isMeshPhongMaterial||Ao.isMeshToonMaterial||Ao.isMeshLambertMaterial||Ao.isMeshBasicMaterial||Ao.isMeshStandardMaterial||Ao.isShaderMaterial)&&ev.setValue(cu,"isOrthographic",Us.isOrthographicCamera===!0),(Ao.isMeshPhongMaterial||Ao.isMeshToonMaterial||Ao.isMeshLambertMaterial||Ao.isMeshBasicMaterial||Ao.isMeshStandardMaterial||Ao.isShaderMaterial||Ao.isShadowMaterial||Wo.isSkinnedMesh)&&ev.setValue(cu,"viewMatrix",Us.matrixWorldInverse)}if(Wo.isSkinnedMesh){ev.setOptional(cu,Wo,"bindMatrix"),ev.setOptional(cu,Wo,"bindMatrixInverse");const i_=Wo.skeleton;i_&&(zo.floatVertexTextures?(i_.boneTexture===null&&i_.computeBoneTexture(),ev.setValue(cu,"boneTexture",i_.boneTexture,$s),ev.setValue(cu,"boneTextureSize",i_.boneTextureSize)):ev.setOptional(cu,i_,"boneMatrices"))}var Ky,r1;return(fv||ul.receiveShadow!==Wo.receiveShadow)&&(ul.receiveShadow=Wo.receiveShadow,ev.setValue(cu,"receiveShadow",Wo.receiveShadow)),fv&&(ev.setValue(cu,"toneMappingExposure",kr.toneMappingExposure),ul.needsLights&&(r1=R1,(Ky=gS).ambientLightColor.needsUpdate=r1,Ky.lightProbe.needsUpdate=r1,Ky.directionalLights.needsUpdate=r1,Ky.directionalLightShadows.needsUpdate=r1,Ky.pointLights.needsUpdate=r1,Ky.pointLightShadows.needsUpdate=r1,Ky.spotLights.needsUpdate=r1,Ky.spotLightShadows.needsUpdate=r1,Ky.rectAreaLights.needsUpdate=r1,Ky.hemisphereLights.needsUpdate=r1),vu&&Ao.fog&&Du.refreshFogUniforms(gS,vu),Du.refreshMaterialUniforms(gS,Ao,gs,Cs,Qo),fp.upload(cu,ul.uniformsList,gS,$s)),Ao.isShaderMaterial&&Ao.uniformsNeedUpdate===!0&&(fp.upload(cu,ul.uniformsList,gS,$s),Ao.uniformsNeedUpdate=!1),Ao.isSpriteMaterial&&ev.setValue(cu,"center",Wo.center),ev.setValue(cu,"modelViewMatrix",Wo.modelViewMatrix),ev.setValue(cu,"normalMatrix",Wo.normalMatrix),ev.setValue(cu,"modelMatrix",Wo.matrixWorld),kp}tE.setAnimationLoop(function(Us){wR&&wR(Us)}),typeof window<"u"&&tE.setContext(window),this.setAnimationLoop=function(Us){wR=Us,Qy.setAnimationLoop(Us),Us===null?tE.stop():tE.start()},Qy.addEventListener("sessionstart",aw),Qy.addEventListener("sessionend",dN),this.render=function(Us,Fo){if(Fo!==void 0&&Fo.isCamera!==!0)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(Lr===!0)return;Us.autoUpdate===!0&&Us.updateMatrixWorld(),Fo.parent===null&&Fo.updateMatrixWorld(),Qy.enabled===!0&&Qy.isPresenting===!0&&(Qy.cameraAutoUpdate===!0&&Qy.updateCamera(Fo),Fo=Qy.getCamera()),Us.isScene===!0&&Us.onBeforeRender(kr,Us,Fo,On),xr=Xl.get(Us,Ir.length),xr.init(),Ir.push(xr),xs.multiplyMatrices(Fo.projectionMatrix,Fo.matrixWorldInverse),Ws.setFromProjectionMatrix(xs),jo=this.localClippingEnabled,Co=oy.init(this.clippingPlanes,jo,Fo),lr=Mu.get(Us,wr.length),lr.init(),wr.push(lr),(function Hl(Eu,Sp,ul,Vp){if(Eu.visible===!1)return;if(Eu.layers.test(Sp.layers)){if(Eu.isGroup)ul=Eu.renderOrder;else if(Eu.isLOD)Eu.autoUpdate===!0&&Eu.update(Sp);else if(Eu.isLight)xr.pushLight(Eu),Eu.castShadow&&xr.pushShadow(Eu);else if(Eu.isSprite){if(!Eu.frustumCulled||Ws.intersectsSprite(Eu)){Vp&&Ms.setFromMatrixPosition(Eu.matrixWorld).applyMatrix4(xs);const kp=Lo.update(Eu),Uy=Eu.material;Uy.visible&&lr.push(Eu,kp,Uy,ul,Ms.z,null)}}else if(Eu.isImmediateRenderObject)Vp&&Ms.setFromMatrixPosition(Eu.matrixWorld).applyMatrix4(xs),lr.push(Eu,null,Eu.material,ul,Ms.z,null);else if((Eu.isMesh||Eu.isLine||Eu.isPoints)&&(Eu.isSkinnedMesh&&Eu.skeleton.frame!==mo.render.frame&&(Eu.skeleton.update(),Eu.skeleton.frame=mo.render.frame),!Eu.frustumCulled||Ws.intersectsObject(Eu))){Vp&&Ms.setFromMatrixPosition(Eu.matrixWorld).applyMatrix4(xs);const kp=Lo.update(Eu),Uy=Eu.material;if(Array.isArray(Uy)){const fv=kp.groups;for(let R1=0,ev=fv.length;R1<ev;R1++){const gS=fv[R1],Ky=Uy[gS.materialIndex];Ky&&Ky.visible&&lr.push(Eu,kp,Ky,ul,Ms.z,gS)}}else Uy.visible&&lr.push(Eu,kp,Uy,ul,Ms.z,null)}}const Ul=Eu.children;for(let kp=0,Uy=Ul.length;kp<Uy;kp++)Hl(Ul[kp],Sp,ul,Vp)})(Us,Fo,0,kr.sortObjects),lr.finish(),kr.sortObjects===!0&&lr.sort(_s,Ts),Co===!0&&oy.beginShadows();const Ao=xr.state.shadowsArray;_m.render(Ao,Us,Fo),xr.setupLights(),xr.setupLightsView(Fo),Co===!0&&oy.endShadows(),this.info.autoReset===!0&&this.info.reset(),t1.render(lr,Us);const Wo=lr.opaque,vu=lr.transmissive,rm=lr.transparent;Wo.length>0&&rE(Wo,Us,Fo),vu.length>0&&(function(Hl,Eu,Sp,ul){if(Qo===null){const kp=Lt===!0&&zo.isWebGL2===!0;Qo=new(kp?jt:Kt)(1024,1024,{generateMipmaps:!0,type:R_.convert(1016)!==null?1016:1009,minFilter:1008,magFilter:1003,wrapS:1001,wrapT:1001})}const Vp=kr.getRenderTarget();kr.setRenderTarget(Qo),kr.clear();const Ul=kr.toneMapping;kr.toneMapping=0,rE(Hl,Sp,ul),kr.toneMapping=Ul,$s.updateMultisampleRenderTarget(Qo),$s.updateRenderTargetMipmap(Qo),kr.setRenderTarget(Vp),rE(Eu,Sp,ul)})(Wo,vu,Us,Fo),rm.length>0&&rE(rm,Us,Fo),On!==null&&($s.updateMultisampleRenderTarget(On),$s.updateRenderTargetMipmap(On)),Us.isScene===!0&&Us.onAfterRender(kr,Us,Fo),Jo.buffers.depth.setTest(!0),Jo.buffers.depth.setMask(!0),Jo.buffers.color.setMask(!0),Jo.setPolygonOffset(!1),B0.resetDefaultState(),Kn=-1,Mn=null,Ir.pop(),xr=Ir.length>0?Ir[Ir.length-1]:null,wr.pop(),lr=wr.length>0?wr[wr.length-1]:null},this.getActiveCubeFace=function(){return Xr},this.getActiveMipmapLevel=function(){return _n},this.getRenderTarget=function(){return On},this.setRenderTarget=function(Us,Fo=0,Ao=0){On=Us,Xr=Fo,_n=Ao,Us&&fs.get(Us).__webglFramebuffer===void 0&&$s.setupRenderTarget(Us);let Wo=null,vu=!1,rm=!1;if(Us){const Hl=Us.texture;(Hl.isDataTexture3D||Hl.isDataTexture2DArray)&&(rm=!0);const Eu=fs.get(Us).__webglFramebuffer;Us.isWebGLCubeRenderTarget?(Wo=Eu[Fo],vu=!0):Wo=Us.isWebGLMultisampleRenderTarget?fs.get(Us).__webglMultisampledFramebuffer:Eu,ca.copy(Us.viewport),Gn.copy(Us.scissor),Qn=Us.scissorTest}else ca.copy(ws).multiplyScalar(gs).floor(),Gn.copy(oo).multiplyScalar(gs).floor(),Qn=no;if(Jo.bindFramebuffer(36160,Wo)&&zo.drawBuffers){let Hl=!1;if(Us)if(Us.isWebGLMultipleRenderTargets){const Eu=Us.texture;if(js.length!==Eu.length||js[0]!==36064){for(let Sp=0,ul=Eu.length;Sp<ul;Sp++)js[Sp]=36064+Sp;js.length=Eu.length,Hl=!0}}else js.length===1&&js[0]===36064||(js[0]=36064,js.length=1,Hl=!0);else js.length===1&&js[0]===1029||(js[0]=1029,js.length=1,Hl=!0);Hl&&(zo.isWebGL2?cu.drawBuffers(js):Ys.get("WEBGL_draw_buffers").drawBuffersWEBGL(js))}if(Jo.viewport(ca),Jo.scissor(Gn),Jo.setScissorTest(Qn),vu){const Hl=fs.get(Us.texture);cu.framebufferTexture2D(36160,36064,34069+Fo,Hl.__webglTexture,Ao)}else if(rm){const Hl=fs.get(Us.texture),Eu=Fo||0;cu.framebufferTextureLayer(36160,36064,Hl.__webglTexture,Ao||0,Eu)}},this.readRenderTargetPixels=function(Us,Fo,Ao,Wo,vu,rm,Hl){if(!Us||!Us.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Eu=fs.get(Us).__webglFramebuffer;if(Us.isWebGLCubeRenderTarget&&Hl!==void 0&&(Eu=Eu[Hl]),Eu){Jo.bindFramebuffer(36160,Eu);try{const Sp=Us.texture,ul=Sp.format,Vp=Sp.type;if(ul!==1023&&R_.convert(ul)!==cu.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const Ul=Vp===1016&&(Ys.has("EXT_color_buffer_half_float")||zo.isWebGL2&&Ys.has("EXT_color_buffer_float"));if(!(Vp===1009||R_.convert(Vp)===cu.getParameter(35738)||Vp===1015&&(zo.isWebGL2||Ys.has("OES_texture_float")||Ys.has("WEBGL_color_buffer_float"))||Ul))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");cu.checkFramebufferStatus(36160)===36053?Fo>=0&&Fo<=Us.width-Wo&&Ao>=0&&Ao<=Us.height-vu&&cu.readPixels(Fo,Ao,Wo,vu,R_.convert(ul),R_.convert(Vp),rm):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const Sp=On!==null?fs.get(On).__webglFramebuffer:null;Jo.bindFramebuffer(36160,Sp)}}},this.copyFramebufferToTexture=function(Us,Fo,Ao=0){const Wo=Math.pow(2,-Ao),vu=Math.floor(Fo.image.width*Wo),rm=Math.floor(Fo.image.height*Wo);let Hl=R_.convert(Fo.format);zo.isWebGL2&&(Hl===6407&&(Hl=32849),Hl===6408&&(Hl=32856)),$s.setTexture2D(Fo,0),cu.copyTexImage2D(3553,Ao,Hl,Us.x,Us.y,vu,rm,0),Jo.unbindTexture()},this.copyTextureToTexture=function(Us,Fo,Ao,Wo=0){const vu=Fo.image.width,rm=Fo.image.height,Hl=R_.convert(Ao.format),Eu=R_.convert(Ao.type);$s.setTexture2D(Ao,0),cu.pixelStorei(37440,Ao.flipY),cu.pixelStorei(37441,Ao.premultiplyAlpha),cu.pixelStorei(3317,Ao.unpackAlignment),Fo.isDataTexture?cu.texSubImage2D(3553,Wo,Us.x,Us.y,vu,rm,Hl,Eu,Fo.image.data):Fo.isCompressedTexture?cu.compressedTexSubImage2D(3553,Wo,Us.x,Us.y,Fo.mipmaps[0].width,Fo.mipmaps[0].height,Hl,Fo.mipmaps[0].data):cu.texSubImage2D(3553,Wo,Us.x,Us.y,Hl,Eu,Fo.image),Wo===0&&Ao.generateMipmaps&&cu.generateMipmap(3553),Jo.unbindTexture()},this.copyTextureToTexture3D=function(Us,Fo,Ao,Wo,vu=0){if(kr.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const rm=Us.max.x-Us.min.x+1,Hl=Us.max.y-Us.min.y+1,Eu=Us.max.z-Us.min.z+1,Sp=R_.convert(Wo.format),ul=R_.convert(Wo.type);let Vp;if(Wo.isDataTexture3D)$s.setTexture3D(Wo,0),Vp=32879;else{if(!Wo.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");$s.setTexture2DArray(Wo,0),Vp=35866}cu.pixelStorei(37440,Wo.flipY),cu.pixelStorei(37441,Wo.premultiplyAlpha),cu.pixelStorei(3317,Wo.unpackAlignment);const Ul=cu.getParameter(3314),kp=cu.getParameter(32878),Uy=cu.getParameter(3316),fv=cu.getParameter(3315),R1=cu.getParameter(32877),ev=Ao.isCompressedTexture?Ao.mipmaps[0]:Ao.image;cu.pixelStorei(3314,ev.width),cu.pixelStorei(32878,ev.height),cu.pixelStorei(3316,Us.min.x),cu.pixelStorei(3315,Us.min.y),cu.pixelStorei(32877,Us.min.z),Ao.isDataTexture||Ao.isDataTexture3D?cu.texSubImage3D(Vp,vu,Fo.x,Fo.y,Fo.z,rm,Hl,Eu,Sp,ul,ev.data):Ao.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),cu.compressedTexSubImage3D(Vp,vu,Fo.x,Fo.y,Fo.z,rm,Hl,Eu,Sp,ev.data)):cu.texSubImage3D(Vp,vu,Fo.x,Fo.y,Fo.z,rm,Hl,Eu,Sp,ul,ev),cu.pixelStorei(3314,Ul),cu.pixelStorei(32878,kp),cu.pixelStorei(3316,Uy),cu.pixelStorei(3315,fv),cu.pixelStorei(32877,R1),vu===0&&Wo.generateMipmaps&&cu.generateMipmap(Vp),Jo.unbindTexture()},this.initTexture=function(Us){$s.setTexture2D(Us,0),Jo.unbindTexture()},this.resetState=function(){Xr=0,_n=0,On=null,Jo.reset(),B0.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}(class extends Ql{}).prototype.isWebGL1Renderer=!0;class fy extends rn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(it,lt){return super.copy(it,lt),it.background!==null&&(this.background=it.background.clone()),it.environment!==null&&(this.environment=it.environment.clone()),it.fog!==null&&(this.fog=it.fog.clone()),it.overrideMaterial!==null&&(this.overrideMaterial=it.overrideMaterial.clone()),this.autoUpdate=it.autoUpdate,this.matrixAutoUpdate=it.matrixAutoUpdate,this}toJSON(it){const lt=super.toJSON(it);return this.fog!==null&&(lt.object.fog=this.fog.toJSON()),lt}}fy.prototype.isScene=!0;class U0{constructor(it,lt){this.array=it,this.stride=lt,this.count=it!==void 0?it.length/lt:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=bt()}onUploadCallback(){}set needsUpdate(it){it===!0&&this.version++}setUsage(it){return this.usage=it,this}copy(it){return this.array=new it.array.constructor(it.array),this.count=it.count,this.stride=it.stride,this.usage=it.usage,this}copyAt(it,lt,pt){it*=this.stride,pt*=lt.stride;for(let _t=0,Dt=this.stride;_t<Dt;_t++)this.array[it+_t]=lt.array[pt+_t];return this}set(it,lt=0){return this.array.set(it,lt),this}clone(it){it.arrayBuffers===void 0&&(it.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=bt()),it.arrayBuffers[this.array.buffer._uuid]===void 0&&(it.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const lt=new this.array.constructor(it.arrayBuffers[this.array.buffer._uuid]),pt=new this.constructor(lt,this.stride);return pt.setUsage(this.usage),pt}onUpload(it){return this.onUploadCallback=it,this}toJSON(it){return it.arrayBuffers===void 0&&(it.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=bt()),it.arrayBuffers[this.array.buffer._uuid]===void 0&&(it.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}U0.prototype.isInterleavedBuffer=!0;const Pl=new Ot;class gm{constructor(it,lt,pt,_t=!1){this.name="",this.data=it,this.itemSize=lt,this.offset=pt,this.normalized=_t===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(it){this.data.needsUpdate=it}applyMatrix4(it){for(let lt=0,pt=this.data.count;lt<pt;lt++)Pl.x=this.getX(lt),Pl.y=this.getY(lt),Pl.z=this.getZ(lt),Pl.applyMatrix4(it),this.setXYZ(lt,Pl.x,Pl.y,Pl.z);return this}applyNormalMatrix(it){for(let lt=0,pt=this.count;lt<pt;lt++)Pl.x=this.getX(lt),Pl.y=this.getY(lt),Pl.z=this.getZ(lt),Pl.applyNormalMatrix(it),this.setXYZ(lt,Pl.x,Pl.y,Pl.z);return this}transformDirection(it){for(let lt=0,pt=this.count;lt<pt;lt++)Pl.x=this.getX(lt),Pl.y=this.getY(lt),Pl.z=this.getZ(lt),Pl.transformDirection(it),this.setXYZ(lt,Pl.x,Pl.y,Pl.z);return this}setX(it,lt){return this.data.array[it*this.data.stride+this.offset]=lt,this}setY(it,lt){return this.data.array[it*this.data.stride+this.offset+1]=lt,this}setZ(it,lt){return this.data.array[it*this.data.stride+this.offset+2]=lt,this}setW(it,lt){return this.data.array[it*this.data.stride+this.offset+3]=lt,this}getX(it){return this.data.array[it*this.data.stride+this.offset]}getY(it){return this.data.array[it*this.data.stride+this.offset+1]}getZ(it){return this.data.array[it*this.data.stride+this.offset+2]}getW(it){return this.data.array[it*this.data.stride+this.offset+3]}setXY(it,lt,pt){return it=it*this.data.stride+this.offset,this.data.array[it+0]=lt,this.data.array[it+1]=pt,this}setXYZ(it,lt,pt,_t){return it=it*this.data.stride+this.offset,this.data.array[it+0]=lt,this.data.array[it+1]=pt,this.data.array[it+2]=_t,this}setXYZW(it,lt,pt,_t,Dt){return it=it*this.data.stride+this.offset,this.data.array[it+0]=lt,this.data.array[it+1]=pt,this.data.array[it+2]=_t,this.data.array[it+3]=Dt,this}clone(it){if(it===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const lt=[];for(let pt=0;pt<this.count;pt++){const _t=pt*this.data.stride+this.offset;for(let Dt=0;Dt<this.itemSize;Dt++)lt.push(this.data.array[_t+Dt])}return new vs(new this.array.constructor(lt),this.itemSize,this.normalized)}return it.interleavedBuffers===void 0&&(it.interleavedBuffers={}),it.interleavedBuffers[this.data.uuid]===void 0&&(it.interleavedBuffers[this.data.uuid]=this.data.clone(it)),new gm(it.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(it){if(it===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const lt=[];for(let pt=0;pt<this.count;pt++){const _t=pt*this.data.stride+this.offset;for(let Dt=0;Dt<this.itemSize;Dt++)lt.push(this.data.array[_t+Dt])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:lt,normalized:this.normalized}}return it.interleavedBuffers===void 0&&(it.interleavedBuffers={}),it.interleavedBuffers[this.data.uuid]===void 0&&(it.interleavedBuffers[this.data.uuid]=this.data.toJSON(it)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}gm.prototype.isInterleavedBufferAttribute=!0;class z0 extends Ku{constructor(it){super(),this.type="SpriteMaterial",this.color=new mn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.map=it.map,this.alphaMap=it.alphaMap,this.rotation=it.rotation,this.sizeAttenuation=it.sizeAttenuation,this}}let G0;z0.prototype.isSpriteMaterial=!0;const Nm=new Ot,x0=new Ot,kv=new Ot,$l=new wt,sv=new wt,wp=new Nn,yl=new Ot,Tp=new Ot,Hv=new Ot,vm=new wt,Qm=new wt,V0=new wt;class Ov extends rn{constructor(it){if(super(),this.type="Sprite",G0===void 0){G0=new Wu;const lt=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),pt=new U0(lt,5);G0.setIndex([0,1,2,0,2,3]),G0.setAttribute("position",new gm(pt,3,0,!1)),G0.setAttribute("uv",new gm(pt,2,3,!1))}this.geometry=G0,this.material=it!==void 0?it:new z0,this.center=new wt(.5,.5)}raycast(it,lt){it.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),x0.setFromMatrixScale(this.matrixWorld),wp.copy(it.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(it.camera.matrixWorldInverse,this.matrixWorld),kv.setFromMatrixPosition(this.modelViewMatrix),it.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&x0.multiplyScalar(-kv.z);const pt=this.material.rotation;let _t,Dt;pt!==0&&(Dt=Math.cos(pt),_t=Math.sin(pt));const Lt=this.center;Sv(yl.set(-.5,-.5,0),kv,Lt,x0,_t,Dt),Sv(Tp.set(.5,-.5,0),kv,Lt,x0,_t,Dt),Sv(Hv.set(.5,.5,0),kv,Lt,x0,_t,Dt),vm.set(0,0),Qm.set(1,0),V0.set(1,1);let $t=it.ray.intersectTriangle(yl,Tp,Hv,!1,Nm);if($t===null&&(Sv(Tp.set(-.5,.5,0),kv,Lt,x0,_t,Dt),Qm.set(0,1),$t=it.ray.intersectTriangle(yl,Hv,Tp,!1,Nm),$t===null))return;const Xt=it.ray.origin.distanceTo(Nm);Xt<it.near||Xt>it.far||lt.push({distance:Xt,point:Nm.clone(),uv:Gu.getUV(Nm,yl,Tp,Hv,vm,Qm,V0,new wt),face:null,object:this})}copy(it){return super.copy(it),it.center!==void 0&&this.center.copy(it.center),this.material=it.material,this}}function Sv(vt,it,lt,pt,_t,Dt){$l.subVectors(vt,lt).addScalar(.5).multiply(pt),_t!==void 0?(sv.x=Dt*$l.x-_t*$l.y,sv.y=_t*$l.x+Dt*$l.y):sv.copy($l),vt.copy(it),vt.x+=sv.x,vt.y+=sv.y,vt.applyMatrix4(wp)}Ov.prototype.isSprite=!0;const c_=new Ot,ey=new Vt,py=new Vt,Tr=new Ot,br=new Nn;class zr extends os{constructor(it,lt){super(it,lt),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Nn,this.bindMatrixInverse=new Nn}copy(it){return super.copy(it),this.bindMode=it.bindMode,this.bindMatrix.copy(it.bindMatrix),this.bindMatrixInverse.copy(it.bindMatrixInverse),this.skeleton=it.skeleton,this}bind(it,lt){this.skeleton=it,lt===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),lt=this.matrixWorld),this.bindMatrix.copy(lt),this.bindMatrixInverse.copy(lt).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const it=new Vt,lt=this.geometry.attributes.skinWeight;for(let pt=0,_t=lt.count;pt<_t;pt++){it.x=lt.getX(pt),it.y=lt.getY(pt),it.z=lt.getZ(pt),it.w=lt.getW(pt);const Dt=1/it.manhattanLength();Dt!==1/0?it.multiplyScalar(Dt):it.set(1,0,0,0),lt.setXYZW(pt,it.x,it.y,it.z,it.w)}}updateMatrixWorld(it){super.updateMatrixWorld(it),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(it,lt){const pt=this.skeleton,_t=this.geometry;ey.fromBufferAttribute(_t.attributes.skinIndex,it),py.fromBufferAttribute(_t.attributes.skinWeight,it),c_.fromBufferAttribute(_t.attributes.position,it).applyMatrix4(this.bindMatrix),lt.set(0,0,0);for(let Dt=0;Dt<4;Dt++){const Lt=py.getComponent(Dt);if(Lt!==0){const $t=ey.getComponent(Dt);br.multiplyMatrices(pt.bones[$t].matrixWorld,pt.boneInverses[$t]),lt.addScaledVector(Tr.copy(c_).applyMatrix4(br),Lt)}}return lt.applyMatrix4(this.bindMatrixInverse)}}zr.prototype.isSkinnedMesh=!0;class $r extends rn{constructor(){super(),this.type="Bone"}}$r.prototype.isBone=!0;class an extends Ft{constructor(it=null,lt=1,pt=1,_t,Dt,Lt,$t,Xt,Yt=1003,Zt=1003,lr,xr){super(null,Lt,$t,Xt,Yt,Zt,_t,Dt,lr,xr),this.image={data:it,width:lt,height:pt},this.magFilter=Yt,this.minFilter=Zt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}an.prototype.isDataTexture=!0;const yn=new Nn,as=new Nn,hs=[],ys=new os;class Ss extends os{constructor(it,lt,pt){super(it,lt),this.instanceMatrix=new vs(new Float32Array(16*pt),16),this.instanceColor=null,this.count=pt,this.frustumCulled=!1}copy(it){return super.copy(it),this.instanceMatrix.copy(it.instanceMatrix),it.instanceColor!==null&&(this.instanceColor=it.instanceColor.clone()),this.count=it.count,this}getColorAt(it,lt){lt.fromArray(this.instanceColor.array,3*it)}getMatrixAt(it,lt){lt.fromArray(this.instanceMatrix.array,16*it)}raycast(it,lt){const pt=this.matrixWorld,_t=this.count;if(ys.geometry=this.geometry,ys.material=this.material,ys.material!==void 0)for(let Dt=0;Dt<_t;Dt++){this.getMatrixAt(Dt,yn),as.multiplyMatrices(pt,yn),ys.matrixWorld=as,ys.raycast(it,hs);for(let Lt=0,$t=hs.length;Lt<$t;Lt++){const Xt=hs[Lt];Xt.instanceId=Dt,Xt.object=this,lt.push(Xt)}hs.length=0}}setColorAt(it,lt){this.instanceColor===null&&(this.instanceColor=new vs(new Float32Array(3*this.count),3)),lt.toArray(this.instanceColor.array,3*it)}setMatrixAt(it,lt){lt.toArray(this.instanceMatrix.array,16*it)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Ss.prototype.isInstancedMesh=!0;class zs extends Ku{constructor(it){super(),this.type="LineBasicMaterial",this.color=new mn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.linewidth=it.linewidth,this.linecap=it.linecap,this.linejoin=it.linejoin,this.morphTargets=it.morphTargets,this}}zs.prototype.isLineBasicMaterial=!0;const wo=new Ot,hu=new Ot,ko=new Nn,Xu=new Cn,Ju=new Hn;class jp extends rn{constructor(it=new Wu,lt=new zs){super(),this.type="Line",this.geometry=it,this.material=lt,this.updateMorphTargets()}copy(it){return super.copy(it),this.material=it.material,this.geometry=it.geometry,this}computeLineDistances(){const it=this.geometry;if(it.isBufferGeometry)if(it.index===null){const lt=it.attributes.position,pt=[0];for(let _t=1,Dt=lt.count;_t<Dt;_t++)wo.fromBufferAttribute(lt,_t-1),hu.fromBufferAttribute(lt,_t),pt[_t]=pt[_t-1],pt[_t]+=wo.distanceTo(hu);it.setAttribute("lineDistance",new Mo(pt,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else it.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(it,lt){const pt=this.geometry,_t=this.matrixWorld,Dt=it.params.Line.threshold,Lt=pt.drawRange;if(pt.boundingSphere===null&&pt.computeBoundingSphere(),Ju.copy(pt.boundingSphere),Ju.applyMatrix4(_t),Ju.radius+=Dt,it.ray.intersectsSphere(Ju)===!1)return;ko.copy(_t).invert(),Xu.copy(it.ray).applyMatrix4(ko);const $t=Dt/((this.scale.x+this.scale.y+this.scale.z)/3),Xt=$t*$t,Yt=new Ot,Zt=new Ot,lr=new Ot,xr=new Ot,wr=this.isLineSegments?2:1;if(pt.isBufferGeometry){const Ir=pt.index,kr=pt.attributes.position;if(Ir!==null)for(let Lr=Math.max(0,Lt.start),Xr=Math.min(Ir.count,Lt.start+Lt.count)-1;Lr<Xr;Lr+=wr){const _n=Ir.getX(Lr),On=Ir.getX(Lr+1);if(Yt.fromBufferAttribute(kr,_n),Zt.fromBufferAttribute(kr,On),Xu.distanceSqToSegment(Yt,Zt,xr,lr)>Xt)continue;xr.applyMatrix4(this.matrixWorld);const Kn=it.ray.origin.distanceTo(xr);Kn<it.near||Kn>it.far||lt.push({distance:Kn,point:lr.clone().applyMatrix4(this.matrixWorld),index:Lr,face:null,faceIndex:null,object:this})}else for(let Lr=Math.max(0,Lt.start),Xr=Math.min(kr.count,Lt.start+Lt.count)-1;Lr<Xr;Lr+=wr){if(Yt.fromBufferAttribute(kr,Lr),Zt.fromBufferAttribute(kr,Lr+1),Xu.distanceSqToSegment(Yt,Zt,xr,lr)>Xt)continue;xr.applyMatrix4(this.matrixWorld);const _n=it.ray.origin.distanceTo(xr);_n<it.near||_n>it.far||lt.push({distance:_n,point:lr.clone().applyMatrix4(this.matrixWorld),index:Lr,face:null,faceIndex:null,object:this})}}else pt.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const it=this.geometry;if(it.isBufferGeometry){const lt=it.morphAttributes,pt=Object.keys(lt);if(pt.length>0){const _t=lt[pt[0]];if(_t!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Dt=0,Lt=_t.length;Dt<Lt;Dt++){const $t=_t[Dt].name||String(Dt);this.morphTargetInfluences.push(0),this.morphTargetDictionary[$t]=Dt}}}}else{const lt=it.morphTargets;lt!==void 0&&lt.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}jp.prototype.isLine=!0;const wv=new Ot,Vy=new Ot;class S0 extends jp{constructor(it,lt){super(it,lt),this.type="LineSegments"}computeLineDistances(){const it=this.geometry;if(it.isBufferGeometry)if(it.index===null){const lt=it.attributes.position,pt=[];for(let _t=0,Dt=lt.count;_t<Dt;_t+=2)wv.fromBufferAttribute(lt,_t),Vy.fromBufferAttribute(lt,_t+1),pt[_t]=_t===0?0:pt[_t-1],pt[_t+1]=pt[_t]+wv.distanceTo(Vy);it.setAttribute("lineDistance",new Mo(pt,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else it.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}S0.prototype.isLineSegments=!0;class Tv extends jp{constructor(it,lt){super(it,lt),this.type="LineLoop"}}Tv.prototype.isLineLoop=!0;class Fm extends Ku{constructor(it){super(),this.type="PointsMaterial",this.color=new mn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.map=it.map,this.alphaMap=it.alphaMap,this.size=it.size,this.sizeAttenuation=it.sizeAttenuation,this.morphTargets=it.morphTargets,this}}Fm.prototype.isPointsMaterial=!0;const w0=new Nn,qv=new Cn,bp=new Hn,T0=new Ot;class Bm extends rn{constructor(it=new Wu,lt=new Fm){super(),this.type="Points",this.geometry=it,this.material=lt,this.updateMorphTargets()}copy(it){return super.copy(it),this.material=it.material,this.geometry=it.geometry,this}raycast(it,lt){const pt=this.geometry,_t=this.matrixWorld,Dt=it.params.Points.threshold,Lt=pt.drawRange;if(pt.boundingSphere===null&&pt.computeBoundingSphere(),bp.copy(pt.boundingSphere),bp.applyMatrix4(_t),bp.radius+=Dt,it.ray.intersectsSphere(bp)===!1)return;w0.copy(_t).invert(),qv.copy(it.ray).applyMatrix4(w0);const $t=Dt/((this.scale.x+this.scale.y+this.scale.z)/3),Xt=$t*$t;if(pt.isBufferGeometry){const Yt=pt.index,Zt=pt.attributes.position;if(Yt!==null)for(let lr=Math.max(0,Lt.start),xr=Math.min(Yt.count,Lt.start+Lt.count);lr<xr;lr++){const wr=Yt.getX(lr);T0.fromBufferAttribute(Zt,wr),H0(T0,wr,Xt,_t,it,lt,this)}else for(let lr=Math.max(0,Lt.start),xr=Math.min(Zt.count,Lt.start+Lt.count);lr<xr;lr++)T0.fromBufferAttribute(Zt,lr),H0(T0,lr,Xt,_t,it,lt,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const it=this.geometry;if(it.isBufferGeometry){const lt=it.morphAttributes,pt=Object.keys(lt);if(pt.length>0){const _t=lt[pt[0]];if(_t!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Dt=0,Lt=_t.length;Dt<Lt;Dt++){const $t=_t[Dt].name||String(Dt);this.morphTargetInfluences.push(0),this.morphTargetDictionary[$t]=Dt}}}}else{const lt=it.morphTargets;lt!==void 0&&lt.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function H0(vt,it,lt,pt,_t,Dt,Lt){const $t=qv.distanceSqToPoint(vt);if($t<lt){const Xt=new Ot;qv.closestPointToPoint(vt,Xt),Xt.applyMatrix4(pt);const Yt=_t.ray.origin.distanceTo(Xt);if(Yt<_t.near||Yt>_t.far)return;Dt.push({distance:Yt,distanceToRay:Math.sqrt($t),point:Xt,index:it,face:null,object:Lt})}}Bm.prototype.isPoints=!0,(class extends Ft{constructor(vt,it,lt,pt,_t,Dt,Lt,$t,Xt){super(vt,it,lt,pt,_t,Dt,Lt,$t,Xt),this.format=Lt!==void 0?Lt:1022,this.minFilter=Dt!==void 0?Dt:1006,this.magFilter=_t!==void 0?_t:1006,this.generateMipmaps=!1;const Yt=this;"requestVideoFrameCallback"in vt&&vt.requestVideoFrameCallback(function Zt(){Yt.needsUpdate=!0,vt.requestVideoFrameCallback(Zt)})}clone(){return new this.constructor(this.image).copy(this)}update(){const vt=this.image;!("requestVideoFrameCallback"in vt)&&vt.readyState>=vt.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;class jx extends Ft{constructor(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr){super(null,Lt,$t,Xt,Yt,Zt,_t,Dt,lr,xr),this.image={width:lt,height:pt},this.mipmaps=it,this.flipY=!1,this.generateMipmaps=!1}}jx.prototype.isCompressedTexture=!0,(class extends Ft{constructor(vt,it,lt,pt,_t,Dt,Lt,$t,Xt){super(vt,it,lt,pt,_t,Dt,Lt,$t,Xt),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0,(class extends Ft{constructor(vt,it,lt,pt,_t,Dt,Lt,$t,Xt,Yt){if((Yt=Yt!==void 0?Yt:1026)!==1026&&Yt!==1027)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");lt===void 0&&Yt===1026&&(lt=1012),lt===void 0&&Yt===1027&&(lt=1020),super(null,pt,_t,Dt,Lt,$t,Yt,lt,Xt),this.image={width:vt,height:it},this.magFilter=Lt!==void 0?Lt:1003,this.minFilter=$t!==void 0?$t:1003,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isDepthTexture=!0;class am{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(it,lt){const pt=this.getUtoTmapping(it);return this.getPoint(pt,lt)}getPoints(it=5){const lt=[];for(let pt=0;pt<=it;pt++)lt.push(this.getPoint(pt/it));return lt}getSpacedPoints(it=5){const lt=[];for(let pt=0;pt<=it;pt++)lt.push(this.getPointAt(pt/it));return lt}getLength(){const it=this.getLengths();return it[it.length-1]}getLengths(it=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===it+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const lt=[];let pt,_t=this.getPoint(0),Dt=0;lt.push(0);for(let Lt=1;Lt<=it;Lt++)pt=this.getPoint(Lt/it),Dt+=pt.distanceTo(_t),lt.push(Dt),_t=pt;return this.cacheArcLengths=lt,lt}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(it,lt){const pt=this.getLengths();let _t=0;const Dt=pt.length;let Lt;Lt=lt||it*pt[Dt-1];let $t,Xt=0,Yt=Dt-1;for(;Xt<=Yt;)if(_t=Math.floor(Xt+(Yt-Xt)/2),$t=pt[_t]-Lt,$t<0)Xt=_t+1;else{if(!($t>0)){Yt=_t;break}Yt=_t-1}if(_t=Yt,pt[_t]===Lt)return _t/(Dt-1);const Zt=pt[_t];return(_t+(Lt-Zt)/(pt[_t+1]-Zt))/(Dt-1)}getTangent(it,lt){let pt=it-1e-4,_t=it+1e-4;pt<0&&(pt=0),_t>1&&(_t=1);const Dt=this.getPoint(pt),Lt=this.getPoint(_t),$t=lt||(Dt.isVector2?new wt:new Ot);return $t.copy(Lt).sub(Dt).normalize(),$t}getTangentAt(it,lt){const pt=this.getUtoTmapping(it);return this.getTangent(pt,lt)}computeFrenetFrames(it,lt){const pt=new Ot,_t=[],Dt=[],Lt=[],$t=new Ot,Xt=new Nn;for(let wr=0;wr<=it;wr++){const Ir=wr/it;_t[wr]=this.getTangentAt(Ir,new Ot),_t[wr].normalize()}Dt[0]=new Ot,Lt[0]=new Ot;let Yt=Number.MAX_VALUE;const Zt=Math.abs(_t[0].x),lr=Math.abs(_t[0].y),xr=Math.abs(_t[0].z);Zt<=Yt&&(Yt=Zt,pt.set(1,0,0)),lr<=Yt&&(Yt=lr,pt.set(0,1,0)),xr<=Yt&&pt.set(0,0,1),$t.crossVectors(_t[0],pt).normalize(),Dt[0].crossVectors(_t[0],$t),Lt[0].crossVectors(_t[0],Dt[0]);for(let wr=1;wr<=it;wr++){if(Dt[wr]=Dt[wr-1].clone(),Lt[wr]=Lt[wr-1].clone(),$t.crossVectors(_t[wr-1],_t[wr]),$t.length()>Number.EPSILON){$t.normalize();const Ir=Math.acos(St(_t[wr-1].dot(_t[wr]),-1,1));Dt[wr].applyMatrix4(Xt.makeRotationAxis($t,Ir))}Lt[wr].crossVectors(_t[wr],Dt[wr])}if(lt===!0){let wr=Math.acos(St(Dt[0].dot(Dt[it]),-1,1));wr/=it,_t[0].dot($t.crossVectors(Dt[0],Dt[it]))>0&&(wr=-wr);for(let Ir=1;Ir<=it;Ir++)Dt[Ir].applyMatrix4(Xt.makeRotationAxis(_t[Ir],wr*Ir)),Lt[Ir].crossVectors(_t[Ir],Dt[Ir])}return{tangents:_t,normals:Dt,binormals:Lt}}clone(){return new this.constructor().copy(this)}copy(it){return this.arcLengthDivisions=it.arcLengthDivisions,this}toJSON(){const it={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return it.arcLengthDivisions=this.arcLengthDivisions,it.type=this.type,it}fromJSON(it){return this.arcLengthDivisions=it.arcLengthDivisions,this}}class _p extends am{constructor(it=0,lt=0,pt=1,_t=1,Dt=0,Lt=2*Math.PI,$t=!1,Xt=0){super(),this.type="EllipseCurve",this.aX=it,this.aY=lt,this.xRadius=pt,this.yRadius=_t,this.aStartAngle=Dt,this.aEndAngle=Lt,this.aClockwise=$t,this.aRotation=Xt}getPoint(it,lt){const pt=lt||new wt,_t=2*Math.PI;let Dt=this.aEndAngle-this.aStartAngle;const Lt=Math.abs(Dt)<Number.EPSILON;for(;Dt<0;)Dt+=_t;for(;Dt>_t;)Dt-=_t;Dt<Number.EPSILON&&(Dt=Lt?0:_t),this.aClockwise!==!0||Lt||(Dt===_t?Dt=-_t:Dt-=_t);const $t=this.aStartAngle+it*Dt;let Xt=this.aX+this.xRadius*Math.cos($t),Yt=this.aY+this.yRadius*Math.sin($t);if(this.aRotation!==0){const Zt=Math.cos(this.aRotation),lr=Math.sin(this.aRotation),xr=Xt-this.aX,wr=Yt-this.aY;Xt=xr*Zt-wr*lr+this.aX,Yt=xr*lr+wr*Zt+this.aY}return pt.set(Xt,Yt)}copy(it){return super.copy(it),this.aX=it.aX,this.aY=it.aY,this.xRadius=it.xRadius,this.yRadius=it.yRadius,this.aStartAngle=it.aStartAngle,this.aEndAngle=it.aEndAngle,this.aClockwise=it.aClockwise,this.aRotation=it.aRotation,this}toJSON(){const it=super.toJSON();return it.aX=this.aX,it.aY=this.aY,it.xRadius=this.xRadius,it.yRadius=this.yRadius,it.aStartAngle=this.aStartAngle,it.aEndAngle=this.aEndAngle,it.aClockwise=this.aClockwise,it.aRotation=this.aRotation,it}fromJSON(it){return super.fromJSON(it),this.aX=it.aX,this.aY=it.aY,this.xRadius=it.xRadius,this.yRadius=it.yRadius,this.aStartAngle=it.aStartAngle,this.aEndAngle=it.aEndAngle,this.aClockwise=it.aClockwise,this.aRotation=it.aRotation,this}}_p.prototype.isEllipseCurve=!0;class ux extends _p{constructor(it,lt,pt,_t,Dt,Lt){super(it,lt,pt,pt,_t,Dt,Lt),this.type="ArcCurve"}}function k_(){let vt=0,it=0,lt=0,pt=0;function _t(Dt,Lt,$t,Xt){vt=Dt,it=$t,lt=-3*Dt+3*Lt-2*$t-Xt,pt=2*Dt-2*Lt+$t+Xt}return{initCatmullRom:function(Dt,Lt,$t,Xt,Yt){_t(Lt,$t,Yt*($t-Dt),Yt*(Xt-Lt))},initNonuniformCatmullRom:function(Dt,Lt,$t,Xt,Yt,Zt,lr){let xr=(Lt-Dt)/Yt-($t-Dt)/(Yt+Zt)+($t-Lt)/Zt,wr=($t-Lt)/Zt-(Xt-Lt)/(Zt+lr)+(Xt-$t)/lr;xr*=Zt,wr*=Zt,_t(Lt,$t,xr,wr)},calc:function(Dt){const Lt=Dt*Dt;return vt+it*Dt+lt*Lt+pt*(Lt*Dt)}}}ux.prototype.isArcCurve=!0;const i1=new Ot,lx=new k_,cx=new k_,dx=new k_;class O_ extends am{constructor(it=[],lt=!1,pt="centripetal",_t=.5){super(),this.type="CatmullRomCurve3",this.points=it,this.closed=lt,this.curveType=pt,this.tension=_t}getPoint(it,lt=new Ot){const pt=lt,_t=this.points,Dt=_t.length,Lt=(Dt-(this.closed?0:1))*it;let $t,Xt,Yt=Math.floor(Lt),Zt=Lt-Yt;this.closed?Yt+=Yt>0?0:(Math.floor(Math.abs(Yt)/Dt)+1)*Dt:Zt===0&&Yt===Dt-1&&(Yt=Dt-2,Zt=1),this.closed||Yt>0?$t=_t[(Yt-1)%Dt]:(i1.subVectors(_t[0],_t[1]).add(_t[0]),$t=i1);const lr=_t[Yt%Dt],xr=_t[(Yt+1)%Dt];if(this.closed||Yt+2<Dt?Xt=_t[(Yt+2)%Dt]:(i1.subVectors(_t[Dt-1],_t[Dt-2]).add(_t[Dt-1]),Xt=i1),this.curveType==="centripetal"||this.curveType==="chordal"){const wr=this.curveType==="chordal"?.5:.25;let Ir=Math.pow($t.distanceToSquared(lr),wr),kr=Math.pow(lr.distanceToSquared(xr),wr),Lr=Math.pow(xr.distanceToSquared(Xt),wr);kr<1e-4&&(kr=1),Ir<1e-4&&(Ir=kr),Lr<1e-4&&(Lr=kr),lx.initNonuniformCatmullRom($t.x,lr.x,xr.x,Xt.x,Ir,kr,Lr),cx.initNonuniformCatmullRom($t.y,lr.y,xr.y,Xt.y,Ir,kr,Lr),dx.initNonuniformCatmullRom($t.z,lr.z,xr.z,Xt.z,Ir,kr,Lr)}else this.curveType==="catmullrom"&&(lx.initCatmullRom($t.x,lr.x,xr.x,Xt.x,this.tension),cx.initCatmullRom($t.y,lr.y,xr.y,Xt.y,this.tension),dx.initCatmullRom($t.z,lr.z,xr.z,Xt.z,this.tension));return pt.set(lx.calc(Zt),cx.calc(Zt),dx.calc(Zt)),pt}copy(it){super.copy(it),this.points=[];for(let lt=0,pt=it.points.length;lt<pt;lt++){const _t=it.points[lt];this.points.push(_t.clone())}return this.closed=it.closed,this.curveType=it.curveType,this.tension=it.tension,this}toJSON(){const it=super.toJSON();it.points=[];for(let lt=0,pt=this.points.length;lt<pt;lt++){const _t=this.points[lt];it.points.push(_t.toArray())}return it.closed=this.closed,it.curveType=this.curveType,it.tension=this.tension,it}fromJSON(it){super.fromJSON(it),this.points=[];for(let lt=0,pt=it.points.length;lt<pt;lt++){const _t=it.points[lt];this.points.push(new Ot().fromArray(_t))}return this.closed=it.closed,this.curveType=it.curveType,this.tension=it.tension,this}}function Hy(vt,it,lt,pt,_t){const Dt=.5*(pt-it),Lt=.5*(_t-lt),$t=vt*vt;return(2*lt-2*pt+Dt+Lt)*(vt*$t)+(-3*lt+3*pt-2*Dt-Lt)*$t+Dt*vt+lt}function Ev(vt,it,lt,pt){return(function(_t,Dt){const Lt=1-_t;return Lt*Lt*Dt})(vt,it)+(function(_t,Dt){return 2*(1-_t)*_t*Dt})(vt,lt)+(function(_t,Dt){return _t*_t*Dt})(vt,pt)}function Ry(vt,it,lt,pt,_t){return(function(Dt,Lt){const $t=1-Dt;return $t*$t*$t*Lt})(vt,it)+(function(Dt,Lt){const $t=1-Dt;return 3*$t*$t*Dt*Lt})(vt,lt)+(function(Dt,Lt){return 3*(1-Dt)*Dt*Dt*Lt})(vt,pt)+(function(Dt,Lt){return Dt*Dt*Dt*Lt})(vt,_t)}O_.prototype.isCatmullRomCurve3=!0;class fl extends am{constructor(it=new wt,lt=new wt,pt=new wt,_t=new wt){super(),this.type="CubicBezierCurve",this.v0=it,this.v1=lt,this.v2=pt,this.v3=_t}getPoint(it,lt=new wt){const pt=lt,_t=this.v0,Dt=this.v1,Lt=this.v2,$t=this.v3;return pt.set(Ry(it,_t.x,Dt.x,Lt.x,$t.x),Ry(it,_t.y,Dt.y,Lt.y,$t.y)),pt}copy(it){return super.copy(it),this.v0.copy(it.v0),this.v1.copy(it.v1),this.v2.copy(it.v2),this.v3.copy(it.v3),this}toJSON(){const it=super.toJSON();return it.v0=this.v0.toArray(),it.v1=this.v1.toArray(),it.v2=this.v2.toArray(),it.v3=this.v3.toArray(),it}fromJSON(it){return super.fromJSON(it),this.v0.fromArray(it.v0),this.v1.fromArray(it.v1),this.v2.fromArray(it.v2),this.v3.fromArray(it.v3),this}}fl.prototype.isCubicBezierCurve=!0;class t0 extends am{constructor(it=new Ot,lt=new Ot,pt=new Ot,_t=new Ot){super(),this.type="CubicBezierCurve3",this.v0=it,this.v1=lt,this.v2=pt,this.v3=_t}getPoint(it,lt=new Ot){const pt=lt,_t=this.v0,Dt=this.v1,Lt=this.v2,$t=this.v3;return pt.set(Ry(it,_t.x,Dt.x,Lt.x,$t.x),Ry(it,_t.y,Dt.y,Lt.y,$t.y),Ry(it,_t.z,Dt.z,Lt.z,$t.z)),pt}copy(it){return super.copy(it),this.v0.copy(it.v0),this.v1.copy(it.v1),this.v2.copy(it.v2),this.v3.copy(it.v3),this}toJSON(){const it=super.toJSON();return it.v0=this.v0.toArray(),it.v1=this.v1.toArray(),it.v2=this.v2.toArray(),it.v3=this.v3.toArray(),it}fromJSON(it){return super.fromJSON(it),this.v0.fromArray(it.v0),this.v1.fromArray(it.v1),this.v2.fromArray(it.v2),this.v3.fromArray(it.v3),this}}t0.prototype.isCubicBezierCurve3=!0;class Xn extends am{constructor(it=new wt,lt=new wt){super(),this.type="LineCurve",this.v1=it,this.v2=lt}getPoint(it,lt=new wt){const pt=lt;return it===1?pt.copy(this.v2):(pt.copy(this.v2).sub(this.v1),pt.multiplyScalar(it).add(this.v1)),pt}getPointAt(it,lt){return this.getPoint(it,lt)}getTangent(it,lt){const pt=lt||new wt;return pt.copy(this.v2).sub(this.v1).normalize(),pt}copy(it){return super.copy(it),this.v1.copy(it.v1),this.v2.copy(it.v2),this}toJSON(){const it=super.toJSON();return it.v1=this.v1.toArray(),it.v2=this.v2.toArray(),it}fromJSON(it){return super.fromJSON(it),this.v1.fromArray(it.v1),this.v2.fromArray(it.v2),this}}Xn.prototype.isLineCurve=!0;class wS extends am{constructor(it=new wt,lt=new wt,pt=new wt){super(),this.type="QuadraticBezierCurve",this.v0=it,this.v1=lt,this.v2=pt}getPoint(it,lt=new wt){const pt=lt,_t=this.v0,Dt=this.v1,Lt=this.v2;return pt.set(Ev(it,_t.x,Dt.x,Lt.x),Ev(it,_t.y,Dt.y,Lt.y)),pt}copy(it){return super.copy(it),this.v0.copy(it.v0),this.v1.copy(it.v1),this.v2.copy(it.v2),this}toJSON(){const it=super.toJSON();return it.v0=this.v0.toArray(),it.v1=this.v1.toArray(),it.v2=this.v2.toArray(),it}fromJSON(it){return super.fromJSON(it),this.v0.fromArray(it.v0),this.v1.fromArray(it.v1),this.v2.fromArray(it.v2),this}}wS.prototype.isQuadraticBezierCurve=!0;class k1 extends am{constructor(it=new Ot,lt=new Ot,pt=new Ot){super(),this.type="QuadraticBezierCurve3",this.v0=it,this.v1=lt,this.v2=pt}getPoint(it,lt=new Ot){const pt=lt,_t=this.v0,Dt=this.v1,Lt=this.v2;return pt.set(Ev(it,_t.x,Dt.x,Lt.x),Ev(it,_t.y,Dt.y,Lt.y),Ev(it,_t.z,Dt.z,Lt.z)),pt}copy(it){return super.copy(it),this.v0.copy(it.v0),this.v1.copy(it.v1),this.v2.copy(it.v2),this}toJSON(){const it=super.toJSON();return it.v0=this.v0.toArray(),it.v1=this.v1.toArray(),it.v2=this.v2.toArray(),it}fromJSON(it){return super.fromJSON(it),this.v0.fromArray(it.v0),this.v1.fromArray(it.v1),this.v2.fromArray(it.v2),this}}k1.prototype.isQuadraticBezierCurve3=!0;class W0 extends am{constructor(it=[]){super(),this.type="SplineCurve",this.points=it}getPoint(it,lt=new wt){const pt=lt,_t=this.points,Dt=(_t.length-1)*it,Lt=Math.floor(Dt),$t=Dt-Lt,Xt=_t[Lt===0?Lt:Lt-1],Yt=_t[Lt],Zt=_t[Lt>_t.length-2?_t.length-1:Lt+1],lr=_t[Lt>_t.length-3?_t.length-1:Lt+2];return pt.set(Hy($t,Xt.x,Yt.x,Zt.x,lr.x),Hy($t,Xt.y,Yt.y,Zt.y,lr.y)),pt}copy(it){super.copy(it),this.points=[];for(let lt=0,pt=it.points.length;lt<pt;lt++){const _t=it.points[lt];this.points.push(_t.clone())}return this}toJSON(){const it=super.toJSON();it.points=[];for(let lt=0,pt=this.points.length;lt<pt;lt++){const _t=this.points[lt];it.points.push(_t.toArray())}return it}fromJSON(it){super.fromJSON(it),this.points=[];for(let lt=0,pt=it.points.length;lt<pt;lt++){const _t=it.points[lt];this.points.push(new wt().fromArray(_t))}return this}}W0.prototype.isSplineCurve=!0;var O1=Object.freeze({__proto__:null,ArcCurve:ux,CatmullRomCurve3:O_,CubicBezierCurve:fl,CubicBezierCurve3:t0,EllipseCurve:_p,LineCurve:Xn,LineCurve3:class extends am{constructor(vt=new Ot,it=new Ot){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=vt,this.v2=it}getPoint(vt,it=new Ot){const lt=it;return vt===1?lt.copy(this.v2):(lt.copy(this.v2).sub(this.v1),lt.multiplyScalar(vt).add(this.v1)),lt}getPointAt(vt,it){return this.getPoint(vt,it)}copy(vt){return super.copy(vt),this.v1.copy(vt.v1),this.v2.copy(vt.v2),this}toJSON(){const vt=super.toJSON();return vt.v1=this.v1.toArray(),vt.v2=this.v2.toArray(),vt}fromJSON(vt){return super.fromJSON(vt),this.v1.fromArray(vt.v1),this.v2.fromArray(vt.v2),this}},QuadraticBezierCurve:wS,QuadraticBezierCurve3:k1,SplineCurve:W0});const q1=function(vt,it,lt=2){const pt=it&&it.length,_t=pt?it[0]*lt:vt.length;let Dt=Py(vt,0,_t,lt,!0);const Lt=[];if(!Dt||Dt.next===Dt.prev)return Lt;let $t,Xt,Yt,Zt,lr,xr,wr;if(pt&&(Dt=(function(Ir,kr,Lr,Xr){const _n=[];let On,Kn,Mn,ca,Gn;for(On=0,Kn=kr.length;On<Kn;On++)Mn=kr[On]*Xr,ca=On<Kn-1?kr[On+1]*Xr:Ir.length,Gn=Py(Ir,Mn,ca,Xr,!1),Gn===Gn.next&&(Gn.steiner=!0),_n.push(jm(Gn));for(_n.sort(Ux),On=0;On<_n.length;On++)L1(_n[On],Lr),Lr=d_(Lr,Lr.next);return Lr})(vt,it,Dt,lt)),vt.length>80*lt){$t=Yt=vt[0],Xt=Zt=vt[1];for(let Ir=lt;Ir<_t;Ir+=lt)lr=vt[Ir],xr=vt[Ir+1],lr<$t&&($t=lr),xr<Xt&&(Xt=xr),lr>Yt&&(Yt=lr),xr>Zt&&(Zt=xr);wr=Math.max(Yt-$t,Zt-Xt),wr=wr!==0?1/wr:0}return hx(Dt,Lt,lt,$t,Xt,wr),Lt};function Py(vt,it,lt,pt,_t){let Dt,Lt;if(_t===(function($t,Xt,Yt,Zt){let lr=0;for(let xr=Xt,wr=Yt-Zt;xr<Yt;xr+=Zt)lr+=($t[wr]-$t[xr])*($t[xr+1]+$t[wr+1]),wr=xr;return lr})(vt,it,lt,pt)>0)for(Dt=it;Dt<lt;Dt+=pt)Lt=Km(Dt,vt[Dt],vt[Dt+1],Lt);else for(Dt=lt-pt;Dt>=it;Dt-=pt)Lt=Km(Dt,vt[Dt],vt[Dt+1],Lt);return Lt&&m_(Lt,Lt.next)&&(F1(Lt),Lt=Lt.next),Lt}function d_(vt,it){if(!vt)return vt;it||(it=vt);let lt,pt=vt;do if(lt=!1,pt.steiner||!m_(pt,pt.next)&&xp(pt.prev,pt,pt.next)!==0)pt=pt.next;else{if(F1(pt),pt=it=pt.prev,pt===pt.next)break;lt=!0}while(lt||pt!==it);return it}function hx(vt,it,lt,pt,_t,Dt,Lt){if(!vt)return;!Lt&&Dt&&(function(Zt,lr,xr,wr){let Ir=Zt;do Ir.z===null&&(Ir.z=f_(Ir.x,Ir.y,lr,xr,wr)),Ir.prevZ=Ir.prev,Ir.nextZ=Ir.next,Ir=Ir.next;while(Ir!==Zt);Ir.prevZ.nextZ=null,Ir.prevZ=null,(function(kr){let Lr,Xr,_n,On,Kn,Mn,ca,Gn,Qn=1;do{for(Xr=kr,kr=null,Kn=null,Mn=0;Xr;){for(Mn++,_n=Xr,ca=0,Lr=0;Lr<Qn&&(ca++,_n=_n.nextZ,_n);Lr++);for(Gn=Qn;ca>0||Gn>0&&_n;)ca!==0&&(Gn===0||!_n||Xr.z<=_n.z)?(On=Xr,Xr=Xr.nextZ,ca--):(On=_n,_n=_n.nextZ,Gn--),Kn?Kn.nextZ=On:kr=On,On.prevZ=Kn,Kn=On;Xr=_n}Kn.nextZ=null,Qn*=2}while(Mn>1)})(Ir)})(vt,pt,_t,Dt);let $t,Xt,Yt=vt;for(;vt.prev!==vt.next;)if($t=vt.prev,Xt=vt.next,Dt?$x(vt,pt,_t,Dt):uw(vt))it.push($t.i/lt),it.push(vt.i/lt),it.push(Xt.i/lt),F1(vt),vt=Xt.next,Yt=Xt.next;else if((vt=Xt)===Yt){Lt?Lt===1?hx(vt=h_(d_(vt),it,lt),it,lt,pt,_t,Dt,2):Lt===2&&my(vt,it,lt,pt,_t,Dt):hx(d_(vt),it,lt,pt,_t,Dt,1);break}}function uw(vt){const it=vt.prev,lt=vt,pt=vt.next;if(xp(it,lt,pt)>=0)return!1;let _t=vt.next.next;for(;_t!==vt.prev;){if(X0(it.x,it.y,lt.x,lt.y,pt.x,pt.y,_t.x,_t.y)&&xp(_t.prev,_t,_t.next)>=0)return!1;_t=_t.next}return!0}function $x(vt,it,lt,pt){const _t=vt.prev,Dt=vt,Lt=vt.next;if(xp(_t,Dt,Lt)>=0)return!1;const $t=_t.x<Dt.x?_t.x<Lt.x?_t.x:Lt.x:Dt.x<Lt.x?Dt.x:Lt.x,Xt=_t.y<Dt.y?_t.y<Lt.y?_t.y:Lt.y:Dt.y<Lt.y?Dt.y:Lt.y,Yt=_t.x>Dt.x?_t.x>Lt.x?_t.x:Lt.x:Dt.x>Lt.x?Dt.x:Lt.x,Zt=_t.y>Dt.y?_t.y>Lt.y?_t.y:Lt.y:Dt.y>Lt.y?Dt.y:Lt.y,lr=f_($t,Xt,it,lt,pt),xr=f_(Yt,Zt,it,lt,pt);let wr=vt.prevZ,Ir=vt.nextZ;for(;wr&&wr.z>=lr&&Ir&&Ir.z<=xr;){if(wr!==vt.prev&&wr!==vt.next&&X0(_t.x,_t.y,Dt.x,Dt.y,Lt.x,Lt.y,wr.x,wr.y)&&xp(wr.prev,wr,wr.next)>=0||(wr=wr.prevZ,Ir!==vt.prev&&Ir!==vt.next&&X0(_t.x,_t.y,Dt.x,Dt.y,Lt.x,Lt.y,Ir.x,Ir.y)&&xp(Ir.prev,Ir,Ir.next)>=0))return!1;Ir=Ir.nextZ}for(;wr&&wr.z>=lr;){if(wr!==vt.prev&&wr!==vt.next&&X0(_t.x,_t.y,Dt.x,Dt.y,Lt.x,Lt.y,wr.x,wr.y)&&xp(wr.prev,wr,wr.next)>=0)return!1;wr=wr.prevZ}for(;Ir&&Ir.z<=xr;){if(Ir!==vt.prev&&Ir!==vt.next&&X0(_t.x,_t.y,Dt.x,Dt.y,Lt.x,Lt.y,Ir.x,Ir.y)&&xp(Ir.prev,Ir,Ir.next)>=0)return!1;Ir=Ir.nextZ}return!0}function h_(vt,it,lt){let pt=vt;do{const _t=pt.prev,Dt=pt.next.next;!m_(_t,Dt)&&g_(_t,pt,pt.next,Dt)&&Av(_t,Dt)&&Av(Dt,_t)&&(it.push(_t.i/lt),it.push(pt.i/lt),it.push(Dt.i/lt),F1(pt),F1(pt.next),pt=vt=Dt),pt=pt.next}while(pt!==vt);return d_(pt)}function my(vt,it,lt,pt,_t,Dt){let Lt=vt;do{let $t=Lt.next.next;for(;$t!==Lt.prev;){if(Lt.i!==$t.i&&p_(Lt,$t)){let Xt=v_(Lt,$t);return Lt=d_(Lt,Lt.next),Xt=d_(Xt,Xt.next),hx(Lt,it,lt,pt,_t,Dt),void hx(Xt,it,lt,pt,_t,Dt)}$t=$t.next}Lt=Lt.next}while(Lt!==vt)}function Ux(vt,it){return vt.x-it.x}function L1(vt,it){if(it=(function(lt,pt){let _t=pt;const Dt=lt.x,Lt=lt.y;let $t,Xt=-1/0;do{if(Lt<=_t.y&&Lt>=_t.next.y&&_t.next.y!==_t.y){const Ir=_t.x+(Lt-_t.y)*(_t.next.x-_t.x)/(_t.next.y-_t.y);if(Ir<=Dt&&Ir>Xt){if(Xt=Ir,Ir===Dt){if(Lt===_t.y)return _t;if(Lt===_t.next.y)return _t.next}$t=_t.x<_t.next.x?_t:_t.next}}_t=_t.next}while(_t!==pt);if(!$t)return null;if(Dt===Xt)return $t;const Yt=$t,Zt=$t.x,lr=$t.y;let xr,wr=1/0;_t=$t;do Dt>=_t.x&&_t.x>=Zt&&Dt!==_t.x&&X0(Lt<lr?Dt:Xt,Lt,Zt,lr,Lt<lr?Xt:Dt,Lt,_t.x,_t.y)&&(xr=Math.abs(Lt-_t.y)/(Dt-_t.x),Av(_t,lt)&&(xr<wr||xr===wr&&(_t.x>$t.x||_t.x===$t.x&&oE($t,_t)))&&($t=_t,wr=xr)),_t=_t.next;while(_t!==Yt);return $t})(vt,it)){const lt=v_(it,vt);d_(it,it.next),d_(lt,lt.next)}}function oE(vt,it){return xp(vt.prev,vt,it.prev)<0&&xp(it.next,vt,vt.next)<0}function f_(vt,it,lt,pt,_t){return(vt=1431655765&((vt=858993459&((vt=252645135&((vt=16711935&((vt=32767*(vt-lt)*_t)|vt<<8))|vt<<4))|vt<<2))|vt<<1))|(it=1431655765&((it=858993459&((it=252645135&((it=16711935&((it=32767*(it-pt)*_t)|it<<8))|it<<4))|it<<2))|it<<1))<<1}function jm(vt){let it=vt,lt=vt;do(it.x<lt.x||it.x===lt.x&&it.y<lt.y)&&(lt=it),it=it.next;while(it!==vt);return lt}function X0(vt,it,lt,pt,_t,Dt,Lt,$t){return(_t-Lt)*(it-$t)-(vt-Lt)*(Dt-$t)>=0&&(vt-Lt)*(pt-$t)-(lt-Lt)*(it-$t)>=0&&(lt-Lt)*(Dt-$t)-(_t-Lt)*(pt-$t)>=0}function p_(vt,it){return vt.next.i!==it.i&&vt.prev.i!==it.i&&!(function(lt,pt){let _t=lt;do{if(_t.i!==lt.i&&_t.next.i!==lt.i&&_t.i!==pt.i&&_t.next.i!==pt.i&&g_(_t,_t.next,lt,pt))return!0;_t=_t.next}while(_t!==lt);return!1})(vt,it)&&(Av(vt,it)&&Av(it,vt)&&(function(lt,pt){let _t=lt,Dt=!1;const Lt=(lt.x+pt.x)/2,$t=(lt.y+pt.y)/2;do _t.y>$t!=_t.next.y>$t&&_t.next.y!==_t.y&&Lt<(_t.next.x-_t.x)*($t-_t.y)/(_t.next.y-_t.y)+_t.x&&(Dt=!Dt),_t=_t.next;while(_t!==lt);return Dt})(vt,it)&&(xp(vt.prev,vt,it.prev)||xp(vt,it.prev,it))||m_(vt,it)&&xp(vt.prev,vt,vt.next)>0&&xp(it.prev,it,it.next)>0)}function xp(vt,it,lt){return(it.y-vt.y)*(lt.x-it.x)-(it.x-vt.x)*(lt.y-it.y)}function m_(vt,it){return vt.x===it.x&&vt.y===it.y}function g_(vt,it,lt,pt){const _t=q_(xp(vt,it,lt)),Dt=q_(xp(vt,it,pt)),Lt=q_(xp(lt,pt,vt)),$t=q_(xp(lt,pt,it));return _t!==Dt&&Lt!==$t||!(_t!==0||!r0(vt,lt,it))||!(Dt!==0||!r0(vt,pt,it))||!(Lt!==0||!r0(lt,vt,pt))||!($t!==0||!r0(lt,it,pt))}function r0(vt,it,lt){return it.x<=Math.max(vt.x,lt.x)&&it.x>=Math.min(vt.x,lt.x)&&it.y<=Math.max(vt.y,lt.y)&&it.y>=Math.min(vt.y,lt.y)}function q_(vt){return vt>0?1:vt<0?-1:0}function Av(vt,it){return xp(vt.prev,vt,vt.next)<0?xp(vt,it,vt.next)>=0&&xp(vt,vt.prev,it)>=0:xp(vt,it,vt.prev)<0||xp(vt,vt.next,it)<0}function v_(vt,it){const lt=new TS(vt.i,vt.x,vt.y),pt=new TS(it.i,it.x,it.y),_t=vt.next,Dt=it.prev;return vt.next=it,it.prev=vt,lt.next=_t,_t.prev=lt,pt.next=lt,lt.prev=pt,Dt.next=pt,pt.prev=Dt,pt}function Km(vt,it,lt,pt){const _t=new TS(vt,it,lt);return pt?(_t.next=pt.next,_t.prev=pt,pt.next.prev=_t,pt.next=_t):(_t.prev=_t,_t.next=_t),_t}function F1(vt){vt.next.prev=vt.prev,vt.prev.next=vt.next,vt.prevZ&&(vt.prevZ.nextZ=vt.nextZ),vt.nextZ&&(vt.nextZ.prevZ=vt.prevZ)}function TS(vt,it,lt){this.i=vt,this.x=it,this.y=lt,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class E0{static area(it){const lt=it.length;let pt=0;for(let _t=lt-1,Dt=0;Dt<lt;_t=Dt++)pt+=it[_t].x*it[Dt].y-it[Dt].x*it[_t].y;return .5*pt}static isClockWise(it){return E0.area(it)<0}static triangulateShape(it,lt){const pt=[],_t=[],Dt=[];A0(it),C0(pt,it);let Lt=it.length;lt.forEach(A0);for(let Xt=0;Xt<lt.length;Xt++)_t.push(Lt),Lt+=lt[Xt].length,C0(pt,lt[Xt]);const $t=q1(pt,_t);for(let Xt=0;Xt<$t.length;Xt+=3)Dt.push($t.slice(Xt,Xt+3));return Dt}}function A0(vt){const it=vt.length;it>2&&vt[it-1].equals(vt[0])&&vt.pop()}function C0(vt,it){for(let lt=0;lt<it.length;lt++)vt.push(it[lt].x),vt.push(it[lt].y)}class Em extends Wu{constructor(it,lt){super(),this.type="ExtrudeGeometry",this.parameters={shapes:it,options:lt},it=Array.isArray(it)?it:[it];const pt=this,_t=[],Dt=[];for(let $t=0,Xt=it.length;$t<Xt;$t++)Lt(it[$t]);function Lt($t){const Xt=[],Yt=lt.curveSegments!==void 0?lt.curveSegments:12,Zt=lt.steps!==void 0?lt.steps:1;let lr=lt.depth!==void 0?lt.depth:100,xr=lt.bevelEnabled===void 0||lt.bevelEnabled,wr=lt.bevelThickness!==void 0?lt.bevelThickness:6,Ir=lt.bevelSize!==void 0?lt.bevelSize:wr-2,kr=lt.bevelOffset!==void 0?lt.bevelOffset:0,Lr=lt.bevelSegments!==void 0?lt.bevelSegments:3;const Xr=lt.extrudePath,_n=lt.UVGenerator!==void 0?lt.UVGenerator:Ny;lt.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),lr=lt.amount);let On,Kn,Mn,ca,Gn,Qn=!1;Xr&&(On=Xr.getSpacedPoints(Zt),Qn=!0,xr=!1,Kn=Xr.computeFrenetFrames(Zt,!1),Mn=new Ot,ca=new Ot,Gn=new Ot),xr||(Lr=0,wr=0,Ir=0,kr=0);const ks=$t.extractPoints(Yt);let Cs=ks.shape;const gs=ks.holes;if(!E0.isClockWise(Cs)){Cs=Cs.reverse();for(let mo=0,fs=gs.length;mo<fs;mo++){const $s=gs[mo];E0.isClockWise($s)&&(gs[mo]=$s.reverse())}}const _s=E0.triangulateShape(Cs,gs),Ts=Cs;for(let mo=0,fs=gs.length;mo<fs;mo++){const $s=gs[mo];Cs=Cs.concat($s)}function ws(mo,fs,$s){return fs||console.error("THREE.ExtrudeGeometry: vec does not exist"),fs.clone().multiplyScalar($s).add(mo)}const oo=Cs.length,no=_s.length;function js(mo,fs,$s){let lo,go,Qs;const Lo=mo.x-fs.x,Cu=mo.y-fs.y,Du=$s.x-mo.x,Mu=$s.y-mo.y,Xl=Lo*Lo+Cu*Cu,oy=Lo*Mu-Cu*Du;if(Math.abs(oy)>Number.EPSILON){const _m=Math.sqrt(Xl),t1=Math.sqrt(Du*Du+Mu*Mu),iT=fs.x-Cu/_m,SA=fs.y+Lo/_m,wA=(($s.x-Mu/t1-iT)*Mu-($s.y+Du/t1-SA)*Du)/(Lo*Mu-Cu*Du);lo=iT+Lo*wA-mo.x,go=SA+Cu*wA-mo.y;const R_=lo*lo+go*go;if(R_<=2)return new wt(lo,go);Qs=Math.sqrt(R_/2)}else{let _m=!1;Lo>Number.EPSILON?Du>Number.EPSILON&&(_m=!0):Lo<-Number.EPSILON?Du<-Number.EPSILON&&(_m=!0):Math.sign(Cu)===Math.sign(Mu)&&(_m=!0),_m?(lo=-Cu,go=Lo,Qs=Math.sqrt(Xl)):(lo=Lo,go=Cu,Qs=Math.sqrt(Xl/2))}return new wt(lo/Qs,go/Qs)}const Ws=[];for(let mo=0,fs=Ts.length,$s=fs-1,lo=mo+1;mo<fs;mo++,$s++,lo++)$s===fs&&($s=0),lo===fs&&(lo=0),Ws[mo]=js(Ts[mo],Ts[$s],Ts[lo]);const Co=[];let jo,Qo=Ws.concat();for(let mo=0,fs=gs.length;mo<fs;mo++){const $s=gs[mo];jo=[];for(let lo=0,go=$s.length,Qs=go-1,Lo=lo+1;lo<go;lo++,Qs++,Lo++)Qs===go&&(Qs=0),Lo===go&&(Lo=0),jo[lo]=js($s[lo],$s[Qs],$s[Lo]);Co.push(jo),Qo=Qo.concat(jo)}for(let mo=0;mo<Lr;mo++){const fs=mo/Lr,$s=wr*Math.cos(fs*Math.PI/2),lo=Ir*Math.sin(fs*Math.PI/2)+kr;for(let go=0,Qs=Ts.length;go<Qs;go++){const Lo=ws(Ts[go],Ws[go],lo);Io(Lo.x,Lo.y,-$s)}for(let go=0,Qs=gs.length;go<Qs;go++){const Lo=gs[go];jo=Co[go];for(let Cu=0,Du=Lo.length;Cu<Du;Cu++){const Mu=ws(Lo[Cu],jo[Cu],lo);Io(Mu.x,Mu.y,-$s)}}}const xs=Ir+kr;for(let mo=0;mo<oo;mo++){const fs=xr?ws(Cs[mo],Qo[mo],xs):Cs[mo];Qn?(ca.copy(Kn.normals[0]).multiplyScalar(fs.x),Mn.copy(Kn.binormals[0]).multiplyScalar(fs.y),Gn.copy(On[0]).add(ca).add(Mn),Io(Gn.x,Gn.y,Gn.z)):Io(fs.x,fs.y,0)}for(let mo=1;mo<=Zt;mo++)for(let fs=0;fs<oo;fs++){const $s=xr?ws(Cs[fs],Qo[fs],xs):Cs[fs];Qn?(ca.copy(Kn.normals[mo]).multiplyScalar($s.x),Mn.copy(Kn.binormals[mo]).multiplyScalar($s.y),Gn.copy(On[mo]).add(ca).add(Mn),Io(Gn.x,Gn.y,Gn.z)):Io($s.x,$s.y,lr/Zt*mo)}for(let mo=Lr-1;mo>=0;mo--){const fs=mo/Lr,$s=wr*Math.cos(fs*Math.PI/2),lo=Ir*Math.sin(fs*Math.PI/2)+kr;for(let go=0,Qs=Ts.length;go<Qs;go++){const Lo=ws(Ts[go],Ws[go],lo);Io(Lo.x,Lo.y,lr+$s)}for(let go=0,Qs=gs.length;go<Qs;go++){const Lo=gs[go];jo=Co[go];for(let Cu=0,Du=Lo.length;Cu<Du;Cu++){const Mu=ws(Lo[Cu],jo[Cu],lo);Qn?Io(Mu.x,Mu.y+On[Zt-1].y,On[Zt-1].x+$s):Io(Mu.x,Mu.y,lr+$s)}}}function Ms(mo,fs){let $s=mo.length;for(;--$s>=0;){const lo=$s;let go=$s-1;go<0&&(go=mo.length-1);for(let Qs=0,Lo=Zt+2*Lr;Qs<Lo;Qs++){const Cu=oo*Qs,Du=oo*(Qs+1);Ys(fs+lo+Cu,fs+go+Cu,fs+go+Du,fs+lo+Du)}}}function Io(mo,fs,$s){Xt.push(mo),Xt.push(fs),Xt.push($s)}function _o(mo,fs,$s){zo(mo),zo(fs),zo($s);const lo=_t.length/3,go=_n.generateTopUV(pt,_t,lo-3,lo-2,lo-1);Jo(go[0]),Jo(go[1]),Jo(go[2])}function Ys(mo,fs,$s,lo){zo(mo),zo(fs),zo(lo),zo(fs),zo($s),zo(lo);const go=_t.length/3,Qs=_n.generateSideWallUV(pt,_t,go-6,go-3,go-2,go-1);Jo(Qs[0]),Jo(Qs[1]),Jo(Qs[3]),Jo(Qs[1]),Jo(Qs[2]),Jo(Qs[3])}function zo(mo){_t.push(Xt[3*mo+0]),_t.push(Xt[3*mo+1]),_t.push(Xt[3*mo+2])}function Jo(mo){Dt.push(mo.x),Dt.push(mo.y)}(function(){const mo=_t.length/3;if(xr){let fs=0,$s=oo*fs;for(let lo=0;lo<no;lo++){const go=_s[lo];_o(go[2]+$s,go[1]+$s,go[0]+$s)}fs=Zt+2*Lr,$s=oo*fs;for(let lo=0;lo<no;lo++){const go=_s[lo];_o(go[0]+$s,go[1]+$s,go[2]+$s)}}else{for(let fs=0;fs<no;fs++){const $s=_s[fs];_o($s[2],$s[1],$s[0])}for(let fs=0;fs<no;fs++){const $s=_s[fs];_o($s[0]+oo*Zt,$s[1]+oo*Zt,$s[2]+oo*Zt)}}pt.addGroup(mo,_t.length/3-mo,0)})(),(function(){const mo=_t.length/3;let fs=0;Ms(Ts,fs),fs+=Ts.length;for(let $s=0,lo=gs.length;$s<lo;$s++){const go=gs[$s];Ms(go,fs),fs+=go.length}pt.addGroup(mo,_t.length/3-mo,1)})()}this.setAttribute("position",new Mo(_t,3)),this.setAttribute("uv",new Mo(Dt,2)),this.computeVertexNormals()}toJSON(){const it=super.toJSON();return(function(lt,pt,_t){if(_t.shapes=[],Array.isArray(lt))for(let Dt=0,Lt=lt.length;Dt<Lt;Dt++){const $t=lt[Dt];_t.shapes.push($t.uuid)}else _t.shapes.push(lt.uuid);return pt.extrudePath!==void 0&&(_t.options.extrudePath=pt.extrudePath.toJSON()),_t})(this.parameters.shapes,this.parameters.options,it)}static fromJSON(it,lt){const pt=[];for(let Dt=0,Lt=it.shapes.length;Dt<Lt;Dt++){const $t=lt[it.shapes[Dt]];pt.push($t)}const _t=it.options.extrudePath;return _t!==void 0&&(it.options.extrudePath=new O1[_t.type]().fromJSON(_t)),new Em(pt,it.options)}}const Ny={generateTopUV:function(vt,it,lt,pt,_t){const Dt=it[3*lt],Lt=it[3*lt+1],$t=it[3*pt],Xt=it[3*pt+1],Yt=it[3*_t],Zt=it[3*_t+1];return[new wt(Dt,Lt),new wt($t,Xt),new wt(Yt,Zt)]},generateSideWallUV:function(vt,it,lt,pt,_t,Dt){const Lt=it[3*lt],$t=it[3*lt+1],Xt=it[3*lt+2],Yt=it[3*pt],Zt=it[3*pt+1],lr=it[3*pt+2],xr=it[3*_t],wr=it[3*_t+1],Ir=it[3*_t+2],kr=it[3*Dt],Lr=it[3*Dt+1],Xr=it[3*Dt+2];return Math.abs($t-Zt)<Math.abs(Lt-Yt)?[new wt(Lt,1-Xt),new wt(Yt,1-lr),new wt(xr,1-Ir),new wt(kr,1-Xr)]:[new wt($t,1-Xt),new wt(Zt,1-lr),new wt(wr,1-Ir),new wt(Lr,1-Xr)]}};class ty extends Wu{constructor(it,lt=12){super(),this.type="ShapeGeometry",this.parameters={shapes:it,curveSegments:lt};const pt=[],_t=[],Dt=[],Lt=[];let $t=0,Xt=0;if(Array.isArray(it)===!1)Yt(it);else for(let Zt=0;Zt<it.length;Zt++)Yt(it[Zt]),this.addGroup($t,Xt,Zt),$t+=Xt,Xt=0;function Yt(Zt){const lr=_t.length/3,xr=Zt.extractPoints(lt);let wr=xr.shape;const Ir=xr.holes;E0.isClockWise(wr)===!1&&(wr=wr.reverse());for(let Lr=0,Xr=Ir.length;Lr<Xr;Lr++){const _n=Ir[Lr];E0.isClockWise(_n)===!0&&(Ir[Lr]=_n.reverse())}const kr=E0.triangulateShape(wr,Ir);for(let Lr=0,Xr=Ir.length;Lr<Xr;Lr++){const _n=Ir[Lr];wr=wr.concat(_n)}for(let Lr=0,Xr=wr.length;Lr<Xr;Lr++){const _n=wr[Lr];_t.push(_n.x,_n.y,0),Dt.push(0,0,1),Lt.push(_n.x,_n.y)}for(let Lr=0,Xr=kr.length;Lr<Xr;Lr++){const _n=kr[Lr],On=_n[0]+lr,Kn=_n[1]+lr,Mn=_n[2]+lr;pt.push(On,Kn,Mn),Xt+=3}}this.setIndex(pt),this.setAttribute("position",new Mo(_t,3)),this.setAttribute("normal",new Mo(Dt,3)),this.setAttribute("uv",new Mo(Lt,2))}toJSON(){const it=super.toJSON();return(function(lt,pt){if(pt.shapes=[],Array.isArray(lt))for(let _t=0,Dt=lt.length;_t<Dt;_t++){const Lt=lt[_t];pt.shapes.push(Lt.uuid)}else pt.shapes.push(lt.uuid);return pt})(this.parameters.shapes,it)}static fromJSON(it,lt){const pt=[];for(let _t=0,Dt=it.shapes.length;_t<Dt;_t++){const Lt=lt[it.shapes[_t]];pt.push(Lt)}return new ty(pt,it.curveSegments)}}class a1 extends Ku{constructor(it){super(),this.type="ShadowMaterial",this.color=new mn(0),this.transparent=!0,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this}}a1.prototype.isShadowMaterial=!0;class gy extends mu{constructor(it){super(it),this.type="RawShaderMaterial"}}gy.prototype.isRawShaderMaterial=!0;class lw extends Ku{constructor(it){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new mn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(it)}copy(it){return super.copy(it),this.defines={STANDARD:""},this.color.copy(it.color),this.roughness=it.roughness,this.metalness=it.metalness,this.map=it.map,this.lightMap=it.lightMap,this.lightMapIntensity=it.lightMapIntensity,this.aoMap=it.aoMap,this.aoMapIntensity=it.aoMapIntensity,this.emissive.copy(it.emissive),this.emissiveMap=it.emissiveMap,this.emissiveIntensity=it.emissiveIntensity,this.bumpMap=it.bumpMap,this.bumpScale=it.bumpScale,this.normalMap=it.normalMap,this.normalMapType=it.normalMapType,this.normalScale.copy(it.normalScale),this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.roughnessMap=it.roughnessMap,this.metalnessMap=it.metalnessMap,this.alphaMap=it.alphaMap,this.envMap=it.envMap,this.envMapIntensity=it.envMapIntensity,this.refractionRatio=it.refractionRatio,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.wireframeLinecap=it.wireframeLinecap,this.wireframeLinejoin=it.wireframeLinejoin,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this.flatShading=it.flatShading,this.vertexTangents=it.vertexTangents,this}}lw.prototype.isMeshStandardMaterial=!0;class ES extends lw{constructor(it){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new wt(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(lt){this.reflectivity=St(2.5*(lt-1)/(lt+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new mn(1,1,1),this.setValues(it)}copy(it){return super.copy(it),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=it.clearcoat,this.clearcoatMap=it.clearcoatMap,this.clearcoatRoughness=it.clearcoatRoughness,this.clearcoatRoughnessMap=it.clearcoatRoughnessMap,this.clearcoatNormalMap=it.clearcoatNormalMap,this.clearcoatNormalScale.copy(it.clearcoatNormalScale),this.reflectivity=it.reflectivity,it.sheen?this.sheen=(this.sheen||new mn).copy(it.sheen):this.sheen=null,this.transmission=it.transmission,this.transmissionMap=it.transmissionMap,this.thickness=it.thickness,this.thicknessMap=it.thicknessMap,this.attenuationDistance=it.attenuationDistance,this.attenuationColor.copy(it.attenuationColor),this}}ES.prototype.isMeshPhysicalMaterial=!0;class s1 extends Ku{constructor(it){super(),this.type="MeshPhongMaterial",this.color=new mn(16777215),this.specular=new mn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.specular.copy(it.specular),this.shininess=it.shininess,this.map=it.map,this.lightMap=it.lightMap,this.lightMapIntensity=it.lightMapIntensity,this.aoMap=it.aoMap,this.aoMapIntensity=it.aoMapIntensity,this.emissive.copy(it.emissive),this.emissiveMap=it.emissiveMap,this.emissiveIntensity=it.emissiveIntensity,this.bumpMap=it.bumpMap,this.bumpScale=it.bumpScale,this.normalMap=it.normalMap,this.normalMapType=it.normalMapType,this.normalScale.copy(it.normalScale),this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.specularMap=it.specularMap,this.alphaMap=it.alphaMap,this.envMap=it.envMap,this.combine=it.combine,this.reflectivity=it.reflectivity,this.refractionRatio=it.refractionRatio,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.wireframeLinecap=it.wireframeLinecap,this.wireframeLinejoin=it.wireframeLinejoin,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this.flatShading=it.flatShading,this}}s1.prototype.isMeshPhongMaterial=!0;class o1 extends Ku{constructor(it){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new mn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.map=it.map,this.gradientMap=it.gradientMap,this.lightMap=it.lightMap,this.lightMapIntensity=it.lightMapIntensity,this.aoMap=it.aoMap,this.aoMapIntensity=it.aoMapIntensity,this.emissive.copy(it.emissive),this.emissiveMap=it.emissiveMap,this.emissiveIntensity=it.emissiveIntensity,this.bumpMap=it.bumpMap,this.bumpScale=it.bumpScale,this.normalMap=it.normalMap,this.normalMapType=it.normalMapType,this.normalScale.copy(it.normalScale),this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.alphaMap=it.alphaMap,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.wireframeLinecap=it.wireframeLinecap,this.wireframeLinejoin=it.wireframeLinejoin,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this}}o1.prototype.isMeshToonMaterial=!0;class B1 extends Ku{constructor(it){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(it)}copy(it){return super.copy(it),this.bumpMap=it.bumpMap,this.bumpScale=it.bumpScale,this.normalMap=it.normalMap,this.normalMapType=it.normalMapType,this.normalScale.copy(it.normalScale),this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this.flatShading=it.flatShading,this}}B1.prototype.isMeshNormalMaterial=!0;class fx extends Ku{constructor(it){super(),this.type="MeshLambertMaterial",this.color=new mn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(it)}copy(it){return super.copy(it),this.color.copy(it.color),this.map=it.map,this.lightMap=it.lightMap,this.lightMapIntensity=it.lightMapIntensity,this.aoMap=it.aoMap,this.aoMapIntensity=it.aoMapIntensity,this.emissive.copy(it.emissive),this.emissiveMap=it.emissiveMap,this.emissiveIntensity=it.emissiveIntensity,this.specularMap=it.specularMap,this.alphaMap=it.alphaMap,this.envMap=it.envMap,this.combine=it.combine,this.reflectivity=it.reflectivity,this.refractionRatio=it.refractionRatio,this.wireframe=it.wireframe,this.wireframeLinewidth=it.wireframeLinewidth,this.wireframeLinecap=it.wireframeLinecap,this.wireframeLinejoin=it.wireframeLinejoin,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this}}fx.prototype.isMeshLambertMaterial=!0;class AS extends Ku{constructor(it){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new mn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new wt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(it)}copy(it){return super.copy(it),this.defines={MATCAP:""},this.color.copy(it.color),this.matcap=it.matcap,this.map=it.map,this.bumpMap=it.bumpMap,this.bumpScale=it.bumpScale,this.normalMap=it.normalMap,this.normalMapType=it.normalMapType,this.normalScale.copy(it.normalScale),this.displacementMap=it.displacementMap,this.displacementScale=it.displacementScale,this.displacementBias=it.displacementBias,this.alphaMap=it.alphaMap,this.morphTargets=it.morphTargets,this.morphNormals=it.morphNormals,this.flatShading=it.flatShading,this}}AS.prototype.isMeshMatcapMaterial=!0;class CS extends zs{constructor(it){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(it)}copy(it){return super.copy(it),this.scale=it.scale,this.dashSize=it.dashSize,this.gapSize=it.gapSize,this}}CS.prototype.isLineDashedMaterial=!0;const dm={arraySlice:function(vt,it,lt){return dm.isTypedArray(vt)?new vt.constructor(vt.subarray(it,lt!==void 0?lt:vt.length)):vt.slice(it,lt)},convertArray:function(vt,it,lt){return!vt||!lt&&vt.constructor===it?vt:typeof it.BYTES_PER_ELEMENT=="number"?new it(vt):Array.prototype.slice.call(vt)},isTypedArray:function(vt){return ArrayBuffer.isView(vt)&&!(vt instanceof DataView)},getKeyframeOrder:function(vt){const it=vt.length,lt=new Array(it);for(let pt=0;pt!==it;++pt)lt[pt]=pt;return lt.sort(function(pt,_t){return vt[pt]-vt[_t]}),lt},sortedArray:function(vt,it,lt){const pt=vt.length,_t=new vt.constructor(pt);for(let Dt=0,Lt=0;Lt!==pt;++Dt){const $t=lt[Dt]*it;for(let Xt=0;Xt!==it;++Xt)_t[Lt++]=vt[$t+Xt]}return _t},flattenJSON:function(vt,it,lt,pt){let _t=1,Dt=vt[0];for(;Dt!==void 0&&Dt[pt]===void 0;)Dt=vt[_t++];if(Dt===void 0)return;let Lt=Dt[pt];if(Lt!==void 0)if(Array.isArray(Lt))do Lt=Dt[pt],Lt!==void 0&&(it.push(Dt.time),lt.push.apply(lt,Lt)),Dt=vt[_t++];while(Dt!==void 0);else if(Lt.toArray!==void 0)do Lt=Dt[pt],Lt!==void 0&&(it.push(Dt.time),Lt.toArray(lt,lt.length)),Dt=vt[_t++];while(Dt!==void 0);else do Lt=Dt[pt],Lt!==void 0&&(it.push(Dt.time),lt.push(Lt)),Dt=vt[_t++];while(Dt!==void 0)},subclip:function(vt,it,lt,pt,_t=30){const Dt=vt.clone();Dt.name=it;const Lt=[];for(let Xt=0;Xt<Dt.tracks.length;++Xt){const Yt=Dt.tracks[Xt],Zt=Yt.getValueSize(),lr=[],xr=[];for(let wr=0;wr<Yt.times.length;++wr){const Ir=Yt.times[wr]*_t;if(!(Ir<lt||Ir>=pt)){lr.push(Yt.times[wr]);for(let kr=0;kr<Zt;++kr)xr.push(Yt.values[wr*Zt+kr])}}lr.length!==0&&(Yt.times=dm.convertArray(lr,Yt.times.constructor),Yt.values=dm.convertArray(xr,Yt.values.constructor),Lt.push(Yt))}Dt.tracks=Lt;let $t=1/0;for(let Xt=0;Xt<Dt.tracks.length;++Xt)$t>Dt.tracks[Xt].times[0]&&($t=Dt.tracks[Xt].times[0]);for(let Xt=0;Xt<Dt.tracks.length;++Xt)Dt.tracks[Xt].shift(-1*$t);return Dt.resetDuration(),Dt},makeClipAdditive:function(vt,it=0,lt=vt,pt=30){pt<=0&&(pt=30);const _t=lt.tracks.length,Dt=it/pt;for(let Lt=0;Lt<_t;++Lt){const $t=lt.tracks[Lt],Xt=$t.ValueTypeName;if(Xt==="bool"||Xt==="string")continue;const Yt=vt.tracks.find(function(Xr){return Xr.name===$t.name&&Xr.ValueTypeName===Xt});if(Yt===void 0)continue;let Zt=0;const lr=$t.getValueSize();$t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(Zt=lr/3);let xr=0;const wr=Yt.getValueSize();Yt.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(xr=wr/3);const Ir=$t.times.length-1;let kr;if(Dt<=$t.times[0]){const Xr=Zt,_n=lr-Zt;kr=dm.arraySlice($t.values,Xr,_n)}else if(Dt>=$t.times[Ir]){const Xr=Ir*lr+Zt,_n=Xr+lr-Zt;kr=dm.arraySlice($t.values,Xr,_n)}else{const Xr=$t.createInterpolant(),_n=Zt,On=lr-Zt;Xr.evaluate(Dt),kr=dm.arraySlice(Xr.resultBuffer,_n,On)}Xt==="quaternion"&&new Ut().fromArray(kr).normalize().conjugate().toArray(kr);const Lr=Yt.times.length;for(let Xr=0;Xr<Lr;++Xr){const _n=Xr*wr+xr;if(Xt==="quaternion")Ut.multiplyQuaternionsFlat(Yt.values,_n,kr,0,Yt.values,_n);else{const On=wr-2*xr;for(let Kn=0;Kn<On;++Kn)Yt.values[_n+Kn]-=kr[Kn]}}}return vt.blendMode=2501,vt}};class D0{constructor(it,lt,pt,_t){this.parameterPositions=it,this._cachedIndex=0,this.resultBuffer=_t!==void 0?_t:new lt.constructor(pt),this.sampleValues=lt,this.valueSize=pt,this.settings=null,this.DefaultSettings_={}}evaluate(it){const lt=this.parameterPositions;let pt=this._cachedIndex,_t=lt[pt],Dt=lt[pt-1];e:{t:{let Lt;r:{n:if(!(it<_t)){for(let $t=pt+2;;){if(_t===void 0){if(it<Dt)break n;return pt=lt.length,this._cachedIndex=pt,this.afterEnd_(pt-1,it,Dt)}if(pt===$t)break;if(Dt=_t,_t=lt[++pt],it<_t)break t}Lt=lt.length;break r}if(it>=Dt)break e;{const $t=lt[1];it<$t&&(pt=2,Dt=$t);for(let Xt=pt-2;;){if(Dt===void 0)return this._cachedIndex=0,this.beforeStart_(0,it,_t);if(pt===Xt)break;if(_t=Dt,Dt=lt[--pt-1],it>=Dt)break t}Lt=pt,pt=0}}for(;pt<Lt;){const $t=pt+Lt>>>1;it<lt[$t]?Lt=$t:pt=$t+1}if(_t=lt[pt],Dt=lt[pt-1],Dt===void 0)return this._cachedIndex=0,this.beforeStart_(0,it,_t);if(_t===void 0)return pt=lt.length,this._cachedIndex=pt,this.afterEnd_(pt-1,Dt,it)}this._cachedIndex=pt,this.intervalChanged_(pt,Dt,_t)}return this.interpolate_(pt,Dt,it,_t)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(it){const lt=this.resultBuffer,pt=this.sampleValues,_t=this.valueSize,Dt=it*_t;for(let Lt=0;Lt!==_t;++Lt)lt[Lt]=pt[Dt+Lt];return lt}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}D0.prototype.beforeStart_=D0.prototype.copySampleValue_,D0.prototype.afterEnd_=D0.prototype.copySampleValue_;class cw extends D0{constructor(it,lt,pt,_t){super(it,lt,pt,_t),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(it,lt,pt){const _t=this.parameterPositions;let Dt=it-2,Lt=it+1,$t=_t[Dt],Xt=_t[Lt];if($t===void 0)switch(this.getSettings_().endingStart){case 2401:Dt=it,$t=2*lt-pt;break;case 2402:Dt=_t.length-2,$t=lt+_t[Dt]-_t[Dt+1];break;default:Dt=it,$t=pt}if(Xt===void 0)switch(this.getSettings_().endingEnd){case 2401:Lt=it,Xt=2*pt-lt;break;case 2402:Lt=1,Xt=pt+_t[1]-_t[0];break;default:Lt=it-1,Xt=lt}const Yt=.5*(pt-lt),Zt=this.valueSize;this._weightPrev=Yt/(lt-$t),this._weightNext=Yt/(Xt-pt),this._offsetPrev=Dt*Zt,this._offsetNext=Lt*Zt}interpolate_(it,lt,pt,_t){const Dt=this.resultBuffer,Lt=this.sampleValues,$t=this.valueSize,Xt=it*$t,Yt=Xt-$t,Zt=this._offsetPrev,lr=this._offsetNext,xr=this._weightPrev,wr=this._weightNext,Ir=(pt-lt)/(_t-lt),kr=Ir*Ir,Lr=kr*Ir,Xr=-xr*Lr+2*xr*kr-xr*Ir,_n=(1+xr)*Lr+(-1.5-2*xr)*kr+(-.5+xr)*Ir+1,On=(-1-wr)*Lr+(1.5+wr)*kr+.5*Ir,Kn=wr*Lr-wr*kr;for(let Mn=0;Mn!==$t;++Mn)Dt[Mn]=Xr*Lt[Zt+Mn]+_n*Lt[Yt+Mn]+On*Lt[Xt+Mn]+Kn*Lt[lr+Mn];return Dt}}class j1 extends D0{constructor(it,lt,pt,_t){super(it,lt,pt,_t)}interpolate_(it,lt,pt,_t){const Dt=this.resultBuffer,Lt=this.sampleValues,$t=this.valueSize,Xt=it*$t,Yt=Xt-$t,Zt=(pt-lt)/(_t-lt),lr=1-Zt;for(let xr=0;xr!==$t;++xr)Dt[xr]=Lt[Yt+xr]*lr+Lt[Xt+xr]*Zt;return Dt}}class Am extends D0{constructor(it,lt,pt,_t){super(it,lt,pt,_t)}interpolate_(it){return this.copySampleValue_(it-1)}}class vy{constructor(it,lt,pt,_t){if(it===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(lt===void 0||lt.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+it);this.name=it,this.times=dm.convertArray(lt,this.TimeBufferType),this.values=dm.convertArray(pt,this.ValueBufferType),this.setInterpolation(_t||this.DefaultInterpolation)}static toJSON(it){const lt=it.constructor;let pt;if(lt.toJSON!==this.toJSON)pt=lt.toJSON(it);else{pt={name:it.name,times:dm.convertArray(it.times,Array),values:dm.convertArray(it.values,Array)};const _t=it.getInterpolation();_t!==it.DefaultInterpolation&&(pt.interpolation=_t)}return pt.type=it.ValueTypeName,pt}InterpolantFactoryMethodDiscrete(it){return new Am(this.times,this.values,this.getValueSize(),it)}InterpolantFactoryMethodLinear(it){return new j1(this.times,this.values,this.getValueSize(),it)}InterpolantFactoryMethodSmooth(it){return new cw(this.times,this.values,this.getValueSize(),it)}setInterpolation(it){let lt;switch(it){case 2300:lt=this.InterpolantFactoryMethodDiscrete;break;case 2301:lt=this.InterpolantFactoryMethodLinear;break;case 2302:lt=this.InterpolantFactoryMethodSmooth}if(lt===void 0){const pt="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0){if(it===this.DefaultInterpolation)throw new Error(pt);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",pt),this}return this.createInterpolant=lt,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(it){if(it!==0){const lt=this.times;for(let pt=0,_t=lt.length;pt!==_t;++pt)lt[pt]+=it}return this}scale(it){if(it!==1){const lt=this.times;for(let pt=0,_t=lt.length;pt!==_t;++pt)lt[pt]*=it}return this}trim(it,lt){const pt=this.times,_t=pt.length;let Dt=0,Lt=_t-1;for(;Dt!==_t&&pt[Dt]<it;)++Dt;for(;Lt!==-1&&pt[Lt]>lt;)--Lt;if(++Lt,Dt!==0||Lt!==_t){Dt>=Lt&&(Lt=Math.max(Lt,1),Dt=Lt-1);const $t=this.getValueSize();this.times=dm.arraySlice(pt,Dt,Lt),this.values=dm.arraySlice(this.values,Dt*$t,Lt*$t)}return this}validate(){let it=!0;const lt=this.getValueSize();lt-Math.floor(lt)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),it=!1);const pt=this.times,_t=this.values,Dt=pt.length;Dt===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),it=!1);let Lt=null;for(let $t=0;$t!==Dt;$t++){const Xt=pt[$t];if(typeof Xt=="number"&&isNaN(Xt)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,$t,Xt),it=!1;break}if(Lt!==null&&Lt>Xt){console.error("THREE.KeyframeTrack: Out of order keys.",this,$t,Xt,Lt),it=!1;break}Lt=Xt}if(_t!==void 0&&dm.isTypedArray(_t))for(let $t=0,Xt=_t.length;$t!==Xt;++$t){const Yt=_t[$t];if(isNaN(Yt)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,$t,Yt),it=!1;break}}return it}optimize(){const it=dm.arraySlice(this.times),lt=dm.arraySlice(this.values),pt=this.getValueSize(),_t=this.getInterpolation()===2302,Dt=it.length-1;let Lt=1;for(let $t=1;$t<Dt;++$t){let Xt=!1;const Yt=it[$t];if(Yt!==it[$t+1]&&($t!==1||Yt!==it[0]))if(_t)Xt=!0;else{const Zt=$t*pt,lr=Zt-pt,xr=Zt+pt;for(let wr=0;wr!==pt;++wr){const Ir=lt[Zt+wr];if(Ir!==lt[lr+wr]||Ir!==lt[xr+wr]){Xt=!0;break}}}if(Xt){if($t!==Lt){it[Lt]=it[$t];const Zt=$t*pt,lr=Lt*pt;for(let xr=0;xr!==pt;++xr)lt[lr+xr]=lt[Zt+xr]}++Lt}}if(Dt>0){it[Lt]=it[Dt];for(let $t=Dt*pt,Xt=Lt*pt,Yt=0;Yt!==pt;++Yt)lt[Xt+Yt]=lt[$t+Yt];++Lt}return Lt!==it.length?(this.times=dm.arraySlice(it,0,Lt),this.values=dm.arraySlice(lt,0,Lt*pt)):(this.times=it,this.values=lt),this}clone(){const it=dm.arraySlice(this.times,0),lt=dm.arraySlice(this.values,0),pt=new this.constructor(this.name,it,lt);return pt.createInterpolant=this.createInterpolant,pt}}vy.prototype.TimeBufferType=Float32Array,vy.prototype.ValueBufferType=Float32Array,vy.prototype.DefaultInterpolation=2301;class u1 extends vy{}u1.prototype.ValueTypeName="bool",u1.prototype.ValueBufferType=Array,u1.prototype.DefaultInterpolation=2300,u1.prototype.InterpolantFactoryMethodLinear=void 0,u1.prototype.InterpolantFactoryMethodSmooth=void 0;class dw extends vy{}dw.prototype.ValueTypeName="color";class zx extends vy{}zx.prototype.ValueTypeName="number";class cT extends D0{constructor(it,lt,pt,_t){super(it,lt,pt,_t)}interpolate_(it,lt,pt,_t){const Dt=this.resultBuffer,Lt=this.sampleValues,$t=this.valueSize,Xt=(pt-lt)/(_t-lt);let Yt=it*$t;for(let Zt=Yt+$t;Yt!==Zt;Yt+=4)Ut.slerpFlat(Dt,0,Lt,Yt-$t,Lt,Yt,Xt);return Dt}}class l1 extends vy{InterpolantFactoryMethodLinear(it){return new cT(this.times,this.values,this.getValueSize(),it)}}l1.prototype.ValueTypeName="quaternion",l1.prototype.DefaultInterpolation=2301,l1.prototype.InterpolantFactoryMethodSmooth=void 0;class c1 extends vy{}c1.prototype.ValueTypeName="string",c1.prototype.ValueBufferType=Array,c1.prototype.DefaultInterpolation=2300,c1.prototype.InterpolantFactoryMethodLinear=void 0,c1.prototype.InterpolantFactoryMethodSmooth=void 0;class ky extends vy{}ky.prototype.ValueTypeName="vector";class $1{constructor(it,lt=-1,pt,_t=2500){this.name=it,this.tracks=pt,this.duration=lt,this.blendMode=_t,this.uuid=bt(),this.duration<0&&this.resetDuration()}static parse(it){const lt=[],pt=it.tracks,_t=1/(it.fps||1);for(let Lt=0,$t=pt.length;Lt!==$t;++Lt)lt.push(hw(pt[Lt]).scale(_t));const Dt=new this(it.name,it.duration,lt,it.blendMode);return Dt.uuid=it.uuid,Dt}static toJSON(it){const lt=[],pt=it.tracks,_t={name:it.name,duration:it.duration,tracks:lt,uuid:it.uuid,blendMode:it.blendMode};for(let Dt=0,Lt=pt.length;Dt!==Lt;++Dt)lt.push(vy.toJSON(pt[Dt]));return _t}static CreateFromMorphTargetSequence(it,lt,pt,_t){const Dt=lt.length,Lt=[];for(let $t=0;$t<Dt;$t++){let Xt=[],Yt=[];Xt.push(($t+Dt-1)%Dt,$t,($t+1)%Dt),Yt.push(0,1,0);const Zt=dm.getKeyframeOrder(Xt);Xt=dm.sortedArray(Xt,1,Zt),Yt=dm.sortedArray(Yt,1,Zt),_t||Xt[0]!==0||(Xt.push(Dt),Yt.push(Yt[0])),Lt.push(new zx(".morphTargetInfluences["+lt[$t].name+"]",Xt,Yt).scale(1/pt))}return new this(it,-1,Lt)}static findByName(it,lt){let pt=it;if(!Array.isArray(it)){const _t=it;pt=_t.geometry&&_t.geometry.animations||_t.animations}for(let _t=0;_t<pt.length;_t++)if(pt[_t].name===lt)return pt[_t];return null}static CreateClipsFromMorphTargetSequences(it,lt,pt){const _t={},Dt=/^([\w-]*?)([\d]+)$/;for(let $t=0,Xt=it.length;$t<Xt;$t++){const Yt=it[$t],Zt=Yt.name.match(Dt);if(Zt&&Zt.length>1){const lr=Zt[1];let xr=_t[lr];xr||(_t[lr]=xr=[]),xr.push(Yt)}}const Lt=[];for(const $t in _t)Lt.push(this.CreateFromMorphTargetSequence($t,_t[$t],lt,pt));return Lt}static parseAnimation(it,lt){if(!it)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const pt=function(Zt,lr,xr,wr,Ir){if(xr.length!==0){const kr=[],Lr=[];dm.flattenJSON(xr,kr,Lr,wr),kr.length!==0&&Ir.push(new Zt(lr,kr,Lr))}},_t=[],Dt=it.name||"default",Lt=it.fps||30,$t=it.blendMode;let Xt=it.length||-1;const Yt=it.hierarchy||[];for(let Zt=0;Zt<Yt.length;Zt++){const lr=Yt[Zt].keys;if(lr&&lr.length!==0)if(lr[0].morphTargets){const xr={};let wr;for(wr=0;wr<lr.length;wr++)if(lr[wr].morphTargets)for(let Ir=0;Ir<lr[wr].morphTargets.length;Ir++)xr[lr[wr].morphTargets[Ir]]=-1;for(const Ir in xr){const kr=[],Lr=[];for(let Xr=0;Xr!==lr[wr].morphTargets.length;++Xr){const _n=lr[wr];kr.push(_n.time),Lr.push(_n.morphTarget===Ir?1:0)}_t.push(new zx(".morphTargetInfluence["+Ir+"]",kr,Lr))}Xt=xr.length*Lt}else{const xr=".bones["+lt[Zt].name+"]";pt(ky,xr+".position",lr,"pos",_t),pt(l1,xr+".quaternion",lr,"rot",_t),pt(ky,xr+".scale",lr,"scl",_t)}}return _t.length===0?null:new this(Dt,Xt,_t,$t)}resetDuration(){let it=0;for(let lt=0,pt=this.tracks.length;lt!==pt;++lt){const _t=this.tracks[lt];it=Math.max(it,_t.times[_t.times.length-1])}return this.duration=it,this}trim(){for(let it=0;it<this.tracks.length;it++)this.tracks[it].trim(0,this.duration);return this}validate(){let it=!0;for(let lt=0;lt<this.tracks.length;lt++)it=it&&this.tracks[lt].validate();return it}optimize(){for(let it=0;it<this.tracks.length;it++)this.tracks[it].optimize();return this}clone(){const it=[];for(let lt=0;lt<this.tracks.length;lt++)it.push(this.tracks[lt].clone());return new this.constructor(this.name,this.duration,it,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function hw(vt){if(vt.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const it=(function(lt){switch(lt.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return zx;case"vector":case"vector2":case"vector3":case"vector4":return ky;case"color":return dw;case"quaternion":return l1;case"bool":case"boolean":return u1;case"string":return c1}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+lt)})(vt.type);if(vt.times===void 0){const lt=[],pt=[];dm.flattenJSON(vt.keys,lt,pt,"value"),vt.times=lt,vt.values=pt}return it.parse!==void 0?it.parse(vt):new it(vt.name,vt.times,vt.values,vt.interpolation)}const d1={enabled:!1,files:{},add:function(vt,it){this.enabled!==!1&&(this.files[vt]=it)},get:function(vt){if(this.enabled!==!1)return this.files[vt]},remove:function(vt){delete this.files[vt]},clear:function(){this.files={}}};class $m{constructor(it,lt,pt){const _t=this;let Dt=!1,Lt=0,$t=0,Xt;const Yt=[];this.onStart=void 0,this.onLoad=it,this.onProgress=lt,this.onError=pt,this.itemStart=function(Zt){$t++,Dt===!1&&_t.onStart!==void 0&&_t.onStart(Zt,Lt,$t),Dt=!0},this.itemEnd=function(Zt){Lt++,_t.onProgress!==void 0&&_t.onProgress(Zt,Lt,$t),Lt===$t&&(Dt=!1,_t.onLoad!==void 0&&_t.onLoad())},this.itemError=function(Zt){_t.onError!==void 0&&_t.onError(Zt)},this.resolveURL=function(Zt){return Xt?Xt(Zt):Zt},this.setURLModifier=function(Zt){return Xt=Zt,this},this.addHandler=function(Zt,lr){return Yt.push(Zt,lr),this},this.removeHandler=function(Zt){const lr=Yt.indexOf(Zt);return lr!==-1&&Yt.splice(lr,2),this},this.getHandler=function(Zt){for(let lr=0,xr=Yt.length;lr<xr;lr+=2){const wr=Yt[lr],Ir=Yt[lr+1];if(wr.global&&(wr.lastIndex=0),wr.test(Zt))return Ir}return null}}}const Vl=new $m;class Y0{constructor(it){this.manager=it!==void 0?it:Vl,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(it,lt){const pt=this;return new Promise(function(_t,Dt){pt.load(it,_t,lt,Dt)})}parse(){}setCrossOrigin(it){return this.crossOrigin=it,this}setWithCredentials(it){return this.withCredentials=it,this}setPath(it){return this.path=it,this}setResourcePath(it){return this.resourcePath=it,this}setRequestHeader(it){return this.requestHeader=it,this}}const Cv={};class Wv extends Y0{constructor(it){super(it)}load(it,lt,pt,_t){it===void 0&&(it=""),this.path!==void 0&&(it=this.path+it),it=this.manager.resolveURL(it);const Dt=this,Lt=d1.get(it);if(Lt!==void 0)return Dt.manager.itemStart(it),setTimeout(function(){lt&&lt(Lt),Dt.manager.itemEnd(it)},0),Lt;if(Cv[it]!==void 0)return void Cv[it].push({onLoad:lt,onProgress:pt,onError:_t});const $t=it.match(/^data:(.*?)(;base64)?,(.*)$/);let Xt;if($t){const Yt=$t[1],Zt=!!$t[2];let lr=$t[3];lr=decodeURIComponent(lr),Zt&&(lr=atob(lr));try{let xr;const wr=(this.responseType||"").toLowerCase();switch(wr){case"arraybuffer":case"blob":const Ir=new Uint8Array(lr.length);for(let Lr=0;Lr<lr.length;Lr++)Ir[Lr]=lr.charCodeAt(Lr);xr=wr==="blob"?new Blob([Ir.buffer],{type:Yt}):Ir.buffer;break;case"document":xr=new DOMParser().parseFromString(lr,Yt);break;case"json":xr=JSON.parse(lr);break;default:xr=lr}setTimeout(function(){lt&&lt(xr),Dt.manager.itemEnd(it)},0)}catch(xr){setTimeout(function(){_t&&_t(xr),Dt.manager.itemError(it),Dt.manager.itemEnd(it)},0)}}else{Cv[it]=[],Cv[it].push({onLoad:lt,onProgress:pt,onError:_t}),Xt=new XMLHttpRequest,Xt.open("GET",it,!0),Xt.addEventListener("load",function(Yt){const Zt=this.response,lr=Cv[it];if(delete Cv[it],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),d1.add(it,Zt);for(let xr=0,wr=lr.length;xr<wr;xr++){const Ir=lr[xr];Ir.onLoad&&Ir.onLoad(Zt)}Dt.manager.itemEnd(it)}else{for(let xr=0,wr=lr.length;xr<wr;xr++){const Ir=lr[xr];Ir.onError&&Ir.onError(Yt)}Dt.manager.itemError(it),Dt.manager.itemEnd(it)}},!1),Xt.addEventListener("progress",function(Yt){const Zt=Cv[it];for(let lr=0,xr=Zt.length;lr<xr;lr++){const wr=Zt[lr];wr.onProgress&&wr.onProgress(Yt)}},!1),Xt.addEventListener("error",function(Yt){const Zt=Cv[it];delete Cv[it];for(let lr=0,xr=Zt.length;lr<xr;lr++){const wr=Zt[lr];wr.onError&&wr.onError(Yt)}Dt.manager.itemError(it),Dt.manager.itemEnd(it)},!1),Xt.addEventListener("abort",function(Yt){const Zt=Cv[it];delete Cv[it];for(let lr=0,xr=Zt.length;lr<xr;lr++){const wr=Zt[lr];wr.onError&&wr.onError(Yt)}Dt.manager.itemError(it),Dt.manager.itemEnd(it)},!1),this.responseType!==void 0&&(Xt.responseType=this.responseType),this.withCredentials!==void 0&&(Xt.withCredentials=this.withCredentials),Xt.overrideMimeType&&Xt.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(const Yt in this.requestHeader)Xt.setRequestHeader(Yt,this.requestHeader[Yt]);Xt.send(null)}return Dt.manager.itemStart(it),Xt}setResponseType(it){return this.responseType=it,this}setMimeType(it){return this.mimeType=it,this}}class n0 extends Y0{constructor(it){super(it)}load(it,lt,pt,_t){this.path!==void 0&&(it=this.path+it),it=this.manager.resolveURL(it);const Dt=this,Lt=d1.get(it);if(Lt!==void 0)return Dt.manager.itemStart(it),setTimeout(function(){lt&&lt(Lt),Dt.manager.itemEnd(it)},0),Lt;const $t=document.createElementNS("http://www.w3.org/1999/xhtml","img");function Xt(){$t.removeEventListener("load",Xt,!1),$t.removeEventListener("error",Yt,!1),d1.add(it,this),lt&&lt(this),Dt.manager.itemEnd(it)}function Yt(Zt){$t.removeEventListener("load",Xt,!1),$t.removeEventListener("error",Yt,!1),_t&&_t(Zt),Dt.manager.itemError(it),Dt.manager.itemEnd(it)}return $t.addEventListener("load",Xt,!1),$t.addEventListener("error",Yt,!1),it.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&($t.crossOrigin=this.crossOrigin),Dt.manager.itemStart(it),$t.src=it,$t}}class uE extends Y0{constructor(it){super(it)}load(it,lt,pt,_t){const Dt=new up,Lt=new n0(this.manager);Lt.setCrossOrigin(this.crossOrigin),Lt.setPath(this.path);let $t=0;function Xt(Yt){Lt.load(it[Yt],function(Zt){Dt.images[Yt]=Zt,$t++,$t===6&&(Dt.needsUpdate=!0,lt&&lt(Dt))},void 0,_t)}for(let Yt=0;Yt<it.length;++Yt)Xt(Yt);return Dt}}class fw extends Y0{constructor(it){super(it)}load(it,lt,pt,_t){const Dt=new Ft,Lt=new n0(this.manager);return Lt.setCrossOrigin(this.crossOrigin),Lt.setPath(this.path),Lt.load(it,function($t){Dt.image=$t;const Xt=it.search(/\.jpe?g($|\?)/i)>0||it.search(/^data\:image\/jpeg/)===0;Dt.format=Xt?1022:1023,Dt.needsUpdate=!0,lt!==void 0&&lt(Dt)},pt,_t),Dt}}class ov extends am{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(it){this.curves.push(it)}closePath(){const it=this.curves[0].getPoint(0),lt=this.curves[this.curves.length-1].getPoint(1);it.equals(lt)||this.curves.push(new Xn(lt,it))}getPoint(it){const lt=it*this.getLength(),pt=this.getCurveLengths();let _t=0;for(;_t<pt.length;){if(pt[_t]>=lt){const Dt=pt[_t]-lt,Lt=this.curves[_t],$t=Lt.getLength(),Xt=$t===0?0:1-Dt/$t;return Lt.getPointAt(Xt)}_t++}return null}getLength(){const it=this.getCurveLengths();return it[it.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const it=[];let lt=0;for(let pt=0,_t=this.curves.length;pt<_t;pt++)lt+=this.curves[pt].getLength(),it.push(lt);return this.cacheLengths=it,it}getSpacedPoints(it=40){const lt=[];for(let pt=0;pt<=it;pt++)lt.push(this.getPoint(pt/it));return this.autoClose&&lt.push(lt[0]),lt}getPoints(it=12){const lt=[];let pt;for(let _t=0,Dt=this.curves;_t<Dt.length;_t++){const Lt=Dt[_t],$t=Lt&&Lt.isEllipseCurve?2*it:Lt&&(Lt.isLineCurve||Lt.isLineCurve3)?1:Lt&&Lt.isSplineCurve?it*Lt.points.length:it,Xt=Lt.getPoints($t);for(let Yt=0;Yt<Xt.length;Yt++){const Zt=Xt[Yt];pt&&pt.equals(Zt)||(lt.push(Zt),pt=Zt)}}return this.autoClose&&lt.length>1&&!lt[lt.length-1].equals(lt[0])&&lt.push(lt[0]),lt}copy(it){super.copy(it),this.curves=[];for(let lt=0,pt=it.curves.length;lt<pt;lt++){const _t=it.curves[lt];this.curves.push(_t.clone())}return this.autoClose=it.autoClose,this}toJSON(){const it=super.toJSON();it.autoClose=this.autoClose,it.curves=[];for(let lt=0,pt=this.curves.length;lt<pt;lt++){const _t=this.curves[lt];it.curves.push(_t.toJSON())}return it}fromJSON(it){super.fromJSON(it),this.autoClose=it.autoClose,this.curves=[];for(let lt=0,pt=it.curves.length;lt<pt;lt++){const _t=it.curves[lt];this.curves.push(new O1[_t.type]().fromJSON(_t))}return this}}class Q0 extends ov{constructor(it){super(),this.type="Path",this.currentPoint=new wt,it&&this.setFromPoints(it)}setFromPoints(it){this.moveTo(it[0].x,it[0].y);for(let lt=1,pt=it.length;lt<pt;lt++)this.lineTo(it[lt].x,it[lt].y);return this}moveTo(it,lt){return this.currentPoint.set(it,lt),this}lineTo(it,lt){const pt=new Xn(this.currentPoint.clone(),new wt(it,lt));return this.curves.push(pt),this.currentPoint.set(it,lt),this}quadraticCurveTo(it,lt,pt,_t){const Dt=new wS(this.currentPoint.clone(),new wt(it,lt),new wt(pt,_t));return this.curves.push(Dt),this.currentPoint.set(pt,_t),this}bezierCurveTo(it,lt,pt,_t,Dt,Lt){const $t=new fl(this.currentPoint.clone(),new wt(it,lt),new wt(pt,_t),new wt(Dt,Lt));return this.curves.push($t),this.currentPoint.set(Dt,Lt),this}splineThru(it){const lt=[this.currentPoint.clone()].concat(it),pt=new W0(lt);return this.curves.push(pt),this.currentPoint.copy(it[it.length-1]),this}arc(it,lt,pt,_t,Dt,Lt){const $t=this.currentPoint.x,Xt=this.currentPoint.y;return this.absarc(it+$t,lt+Xt,pt,_t,Dt,Lt),this}absarc(it,lt,pt,_t,Dt,Lt){return this.absellipse(it,lt,pt,pt,_t,Dt,Lt),this}ellipse(it,lt,pt,_t,Dt,Lt,$t,Xt){const Yt=this.currentPoint.x,Zt=this.currentPoint.y;return this.absellipse(it+Yt,lt+Zt,pt,_t,Dt,Lt,$t,Xt),this}absellipse(it,lt,pt,_t,Dt,Lt,$t,Xt){const Yt=new _p(it,lt,pt,_t,Dt,Lt,$t,Xt);if(this.curves.length>0){const lr=Yt.getPoint(0);lr.equals(this.currentPoint)||this.lineTo(lr.x,lr.y)}this.curves.push(Yt);const Zt=Yt.getPoint(1);return this.currentPoint.copy(Zt),this}copy(it){return super.copy(it),this.currentPoint.copy(it.currentPoint),this}toJSON(){const it=super.toJSON();return it.currentPoint=this.currentPoint.toArray(),it}fromJSON(it){return super.fromJSON(it),this.currentPoint.fromArray(it.currentPoint),this}}class h1 extends Q0{constructor(it){super(it),this.uuid=bt(),this.type="Shape",this.holes=[]}getPointsHoles(it){const lt=[];for(let pt=0,_t=this.holes.length;pt<_t;pt++)lt[pt]=this.holes[pt].getPoints(it);return lt}extractPoints(it){return{shape:this.getPoints(it),holes:this.getPointsHoles(it)}}copy(it){super.copy(it),this.holes=[];for(let lt=0,pt=it.holes.length;lt<pt;lt++){const _t=it.holes[lt];this.holes.push(_t.clone())}return this}toJSON(){const it=super.toJSON();it.uuid=this.uuid,it.holes=[];for(let lt=0,pt=this.holes.length;lt<pt;lt++){const _t=this.holes[lt];it.holes.push(_t.toJSON())}return it}fromJSON(it){super.fromJSON(it),this.uuid=it.uuid,this.holes=[];for(let lt=0,pt=it.holes.length;lt<pt;lt++){const _t=it.holes[lt];this.holes.push(new Q0().fromJSON(_t))}return this}}class Oy extends rn{constructor(it,lt=1){super(),this.type="Light",this.color=new mn(it),this.intensity=lt}dispose(){}copy(it){return super.copy(it),this.color.copy(it.color),this.intensity=it.intensity,this}toJSON(it){const lt=super.toJSON(it);return lt.object.color=this.color.getHex(),lt.object.intensity=this.intensity,this.groundColor!==void 0&&(lt.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(lt.object.distance=this.distance),this.angle!==void 0&&(lt.object.angle=this.angle),this.decay!==void 0&&(lt.object.decay=this.decay),this.penumbra!==void 0&&(lt.object.penumbra=this.penumbra),this.shadow!==void 0&&(lt.object.shadow=this.shadow.toJSON()),lt}}Oy.prototype.isLight=!0;class DS extends Oy{constructor(it,lt,pt){super(it,pt),this.type="HemisphereLight",this.position.copy(rn.DefaultUp),this.updateMatrix(),this.groundColor=new mn(lt)}copy(it){return Oy.prototype.copy.call(this,it),this.groundColor.copy(it.groundColor),this}}DS.prototype.isHemisphereLight=!0;const yy=new Nn,sm=new Ot,L_=new Ot;class U1{constructor(it){this.camera=it,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new wt(512,512),this.map=null,this.mapPass=null,this.matrix=new Nn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new dl,this._frameExtents=new wt(1,1),this._viewportCount=1,this._viewports=[new Vt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(it){const lt=this.camera,pt=this.matrix;sm.setFromMatrixPosition(it.matrixWorld),lt.position.copy(sm),L_.setFromMatrixPosition(it.target.matrixWorld),lt.lookAt(L_),lt.updateMatrixWorld(),yy.multiplyMatrices(lt.projectionMatrix,lt.matrixWorldInverse),this._frustum.setFromProjectionMatrix(yy),pt.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),pt.multiply(lt.projectionMatrix),pt.multiply(lt.matrixWorldInverse)}getViewport(it){return this._viewports[it]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(it){return this.camera=it.camera.clone(),this.bias=it.bias,this.radius=it.radius,this.mapSize.copy(it.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const it={};return this.bias!==0&&(it.bias=this.bias),this.normalBias!==0&&(it.normalBias=this.normalBias),this.radius!==1&&(it.radius=this.radius),this.mapSize.x===512&&this.mapSize.y===512||(it.mapSize=this.mapSize.toArray()),it.camera=this.camera.toJSON(!1).object,delete it.camera.matrix,it}}class Wy extends U1{constructor(){super(new lu(50,1,.5,500)),this.focus=1}updateMatrices(it){const lt=this.camera,pt=2*mt*it.angle*this.focus,_t=this.mapSize.width/this.mapSize.height,Dt=it.distance||lt.far;pt===lt.fov&&_t===lt.aspect&&Dt===lt.far||(lt.fov=pt,lt.aspect=_t,lt.far=Dt,lt.updateProjectionMatrix()),super.updateMatrices(it)}copy(it){return super.copy(it),this.focus=it.focus,this}}Wy.prototype.isSpotLightShadow=!0;class F_ extends Oy{constructor(it,lt,pt=0,_t=Math.PI/3,Dt=0,Lt=1){super(it,lt),this.type="SpotLight",this.position.copy(rn.DefaultUp),this.updateMatrix(),this.target=new rn,this.distance=pt,this.angle=_t,this.penumbra=Dt,this.decay=Lt,this.shadow=new Wy}get power(){return this.intensity*Math.PI}set power(it){this.intensity=it/Math.PI}dispose(){this.shadow.dispose()}copy(it){return super.copy(it),this.distance=it.distance,this.angle=it.angle,this.penumbra=it.penumbra,this.decay=it.decay,this.target=it.target.clone(),this.shadow=it.shadow.clone(),this}}F_.prototype.isSpotLight=!0;const MS=new Nn,y_=new Ot,Gx=new Ot;class Vx extends U1{constructor(){super(new lu(90,1,.5,500)),this._frameExtents=new wt(4,2),this._viewportCount=6,this._viewports=[new Vt(2,1,1,1),new Vt(0,1,1,1),new Vt(3,1,1,1),new Vt(1,1,1,1),new Vt(3,0,1,1),new Vt(1,0,1,1)],this._cubeDirections=[new Ot(1,0,0),new Ot(-1,0,0),new Ot(0,0,1),new Ot(0,0,-1),new Ot(0,1,0),new Ot(0,-1,0)],this._cubeUps=[new Ot(0,1,0),new Ot(0,1,0),new Ot(0,1,0),new Ot(0,1,0),new Ot(0,0,1),new Ot(0,0,-1)]}updateMatrices(it,lt=0){const pt=this.camera,_t=this.matrix,Dt=it.distance||pt.far;Dt!==pt.far&&(pt.far=Dt,pt.updateProjectionMatrix()),y_.setFromMatrixPosition(it.matrixWorld),pt.position.copy(y_),Gx.copy(pt.position),Gx.add(this._cubeDirections[lt]),pt.up.copy(this._cubeUps[lt]),pt.lookAt(Gx),pt.updateMatrixWorld(),_t.makeTranslation(-y_.x,-y_.y,-y_.z),MS.multiplyMatrices(pt.projectionMatrix,pt.matrixWorldInverse),this._frustum.setFromProjectionMatrix(MS)}}Vx.prototype.isPointLightShadow=!0;class mx extends Oy{constructor(it,lt,pt=0,_t=1){super(it,lt),this.type="PointLight",this.distance=pt,this.decay=_t,this.shadow=new Vx}get power(){return 4*this.intensity*Math.PI}set power(it){this.intensity=it/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(it){return super.copy(it),this.distance=it.distance,this.decay=it.decay,this.shadow=it.shadow.clone(),this}}mx.prototype.isPointLight=!0;class qy extends zu{constructor(it=-1,lt=1,pt=1,_t=-1,Dt=.1,Lt=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=it,this.right=lt,this.top=pt,this.bottom=_t,this.near=Dt,this.far=Lt,this.updateProjectionMatrix()}copy(it,lt){return super.copy(it,lt),this.left=it.left,this.right=it.right,this.top=it.top,this.bottom=it.bottom,this.near=it.near,this.far=it.far,this.zoom=it.zoom,this.view=it.view===null?null:Object.assign({},it.view),this}setViewOffset(it,lt,pt,_t,Dt,Lt){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=it,this.view.fullHeight=lt,this.view.offsetX=pt,this.view.offsetY=_t,this.view.width=Dt,this.view.height=Lt,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const it=(this.right-this.left)/(2*this.zoom),lt=(this.top-this.bottom)/(2*this.zoom),pt=(this.right+this.left)/2,_t=(this.top+this.bottom)/2;let Dt=pt-it,Lt=pt+it,$t=_t+lt,Xt=_t-lt;if(this.view!==null&&this.view.enabled){const Yt=(this.right-this.left)/this.view.fullWidth/this.zoom,Zt=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Dt+=Yt*this.view.offsetX,Lt=Dt+Yt*this.view.width,$t-=Zt*this.view.offsetY,Xt=$t-Zt*this.view.height}this.projectionMatrix.makeOrthographic(Dt,Lt,$t,Xt,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(it){const lt=super.toJSON(it);return lt.object.zoom=this.zoom,lt.object.left=this.left,lt.object.right=this.right,lt.object.top=this.top,lt.object.bottom=this.bottom,lt.object.near=this.near,lt.object.far=this.far,this.view!==null&&(lt.object.view=Object.assign({},this.view)),lt}}qy.prototype.isOrthographicCamera=!0;class Hx extends U1{constructor(){super(new qy(-5,5,5,-5,.5,500))}}Hx.prototype.isDirectionalLightShadow=!0;class B_ extends Oy{constructor(it,lt){super(it,lt),this.type="DirectionalLight",this.position.copy(rn.DefaultUp),this.updateMatrix(),this.target=new rn,this.shadow=new Hx}dispose(){this.shadow.dispose()}copy(it){return super.copy(it),this.target=it.target.clone(),this.shadow=it.shadow.clone(),this}}B_.prototype.isDirectionalLight=!0;class ry extends Oy{constructor(it,lt){super(it,lt),this.type="AmbientLight"}}ry.prototype.isAmbientLight=!0;class j_ extends Oy{constructor(it,lt,pt=10,_t=10){super(it,lt),this.type="RectAreaLight",this.width=pt,this.height=_t}copy(it){return super.copy(it),this.width=it.width,this.height=it.height,this}toJSON(it){const lt=super.toJSON(it);return lt.object.width=this.width,lt.object.height=this.height,lt}}j_.prototype.isRectAreaLight=!0;class IS{constructor(){this.coefficients=[];for(let it=0;it<9;it++)this.coefficients.push(new Ot)}set(it){for(let lt=0;lt<9;lt++)this.coefficients[lt].copy(it[lt]);return this}zero(){for(let it=0;it<9;it++)this.coefficients[it].set(0,0,0);return this}getAt(it,lt){const pt=it.x,_t=it.y,Dt=it.z,Lt=this.coefficients;return lt.copy(Lt[0]).multiplyScalar(.282095),lt.addScaledVector(Lt[1],.488603*_t),lt.addScaledVector(Lt[2],.488603*Dt),lt.addScaledVector(Lt[3],.488603*pt),lt.addScaledVector(Lt[4],pt*_t*1.092548),lt.addScaledVector(Lt[5],_t*Dt*1.092548),lt.addScaledVector(Lt[6],.315392*(3*Dt*Dt-1)),lt.addScaledVector(Lt[7],pt*Dt*1.092548),lt.addScaledVector(Lt[8],.546274*(pt*pt-_t*_t)),lt}getIrradianceAt(it,lt){const pt=it.x,_t=it.y,Dt=it.z,Lt=this.coefficients;return lt.copy(Lt[0]).multiplyScalar(.886227),lt.addScaledVector(Lt[1],1.023328*_t),lt.addScaledVector(Lt[2],1.023328*Dt),lt.addScaledVector(Lt[3],1.023328*pt),lt.addScaledVector(Lt[4],.858086*pt*_t),lt.addScaledVector(Lt[5],.858086*_t*Dt),lt.addScaledVector(Lt[6],.743125*Dt*Dt-.247708),lt.addScaledVector(Lt[7],.858086*pt*Dt),lt.addScaledVector(Lt[8],.429043*(pt*pt-_t*_t)),lt}add(it){for(let lt=0;lt<9;lt++)this.coefficients[lt].add(it.coefficients[lt]);return this}addScaledSH(it,lt){for(let pt=0;pt<9;pt++)this.coefficients[pt].addScaledVector(it.coefficients[pt],lt);return this}scale(it){for(let lt=0;lt<9;lt++)this.coefficients[lt].multiplyScalar(it);return this}lerp(it,lt){for(let pt=0;pt<9;pt++)this.coefficients[pt].lerp(it.coefficients[pt],lt);return this}equals(it){for(let lt=0;lt<9;lt++)if(!this.coefficients[lt].equals(it.coefficients[lt]))return!1;return!0}copy(it){return this.set(it.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(it,lt=0){const pt=this.coefficients;for(let _t=0;_t<9;_t++)pt[_t].fromArray(it,lt+3*_t);return this}toArray(it=[],lt=0){const pt=this.coefficients;for(let _t=0;_t<9;_t++)pt[_t].toArray(it,lt+3*_t);return it}static getBasisAt(it,lt){const pt=it.x,_t=it.y,Dt=it.z;lt[0]=.282095,lt[1]=.488603*_t,lt[2]=.488603*Dt,lt[3]=.488603*pt,lt[4]=1.092548*pt*_t,lt[5]=1.092548*_t*Dt,lt[6]=.315392*(3*Dt*Dt-1),lt[7]=1.092548*pt*Dt,lt[8]=.546274*(pt*pt-_t*_t)}}IS.prototype.isSphericalHarmonics3=!0;class RS extends Oy{constructor(it=new IS,lt=1){super(void 0,lt),this.sh=it}copy(it){return super.copy(it),this.sh.copy(it.sh),this}fromJSON(it){return this.intensity=it.intensity,this.sh.fromArray(it.sh),this}toJSON(it){const lt=super.toJSON(it);return lt.object.sh=this.sh.toArray(),lt}}RS.prototype.isLightProbe=!0;class lE{static decodeText(it){if(typeof TextDecoder<"u")return new TextDecoder().decode(it);let lt="";for(let pt=0,_t=it.length;pt<_t;pt++)lt+=String.fromCharCode(it[pt]);try{return decodeURIComponent(escape(lt))}catch{return lt}}static extractUrlBase(it){const lt=it.lastIndexOf("/");return lt===-1?"./":it.substr(0,lt+1)}}class pw extends Wu{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(it){return super.copy(it),this.instanceCount=it.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){const it=super.toJSON(this);return it.instanceCount=this.instanceCount,it.isInstancedBufferGeometry=!0,it}}pw.prototype.isInstancedBufferGeometry=!0;class gx extends vs{constructor(it,lt,pt,_t=1){typeof pt=="number"&&(_t=pt,pt=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(it,lt,pt),this.meshPerAttribute=_t}copy(it){return super.copy(it),this.meshPerAttribute=it.meshPerAttribute,this}toJSON(){const it=super.toJSON();return it.meshPerAttribute=this.meshPerAttribute,it.isInstancedBufferAttribute=!0,it}}gx.prototype.isInstancedBufferAttribute=!0,(class extends Y0{constructor(vt){super(vt),typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(vt){return this.options=vt,this}load(vt,it,lt,pt){vt===void 0&&(vt=""),this.path!==void 0&&(vt=this.path+vt),vt=this.manager.resolveURL(vt);const _t=this,Dt=d1.get(vt);if(Dt!==void 0)return _t.manager.itemStart(vt),setTimeout(function(){it&&it(Dt),_t.manager.itemEnd(vt)},0),Dt;const Lt={};Lt.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",Lt.headers=this.requestHeader,fetch(vt,Lt).then(function($t){return $t.blob()}).then(function($t){return createImageBitmap($t,Object.assign(_t.options,{colorSpaceConversion:"none"}))}).then(function($t){d1.add(vt,$t),it&&it($t),_t.manager.itemEnd(vt)}).catch(function($t){pt&&pt($t),_t.manager.itemError(vt),_t.manager.itemEnd(vt)}),_t.manager.itemStart(vt)}}).prototype.isImageBitmapLoader=!0;let mw;const kA=function(){return mw===void 0&&(mw=new(window.AudioContext||window.webkitAudioContext)),mw};class gw extends Y0{constructor(it){super(it)}load(it,lt,pt,_t){const Dt=this,Lt=new Wv(this.manager);Lt.setResponseType("arraybuffer"),Lt.setPath(this.path),Lt.setRequestHeader(this.requestHeader),Lt.setWithCredentials(this.withCredentials),Lt.load(it,function($t){try{const Xt=$t.slice(0);kA().decodeAudioData(Xt,function(Yt){lt(Yt)})}catch(Xt){_t?_t(Xt):console.error(Xt),Dt.manager.itemError(it)}},pt,_t)}}(class extends RS{constructor(vt,it,lt=1){super(void 0,lt);const pt=new mn().set(vt),_t=new mn().set(it),Dt=new Ot(pt.r,pt.g,pt.b),Lt=new Ot(_t.r,_t.g,_t.b),$t=Math.sqrt(Math.PI),Xt=$t*Math.sqrt(.75);this.sh.coefficients[0].copy(Dt).add(Lt).multiplyScalar($t),this.sh.coefficients[1].copy(Dt).sub(Lt).multiplyScalar(Xt)}}).prototype.isHemisphereLightProbe=!0,(class extends RS{constructor(vt,it=1){super(void 0,it);const lt=new mn().set(vt);this.sh.coefficients[0].set(lt.r,lt.g,lt.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class by extends rn{constructor(it){super(),this.type="Audio",this.listener=it,this.context=it.context,this.gain=this.context.createGain(),this.gain.connect(it.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(it){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=it,this.connect(),this}setMediaElementSource(it){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(it),this.connect(),this}setMediaStreamSource(it){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(it),this.connect(),this}setBuffer(it){return this.buffer=it,this.sourceType="buffer",this.autoplay&&this.play(),this}play(it=0){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+it;const lt=this.context.createBufferSource();return lt.buffer=this.buffer,lt.loop=this.loop,lt.loopStart=this.loopStart,lt.loopEnd=this.loopEnd,lt.onended=this.onEnded.bind(this),lt.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=lt,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl!==!1)return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(this.hasPlaybackControl!==!1)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let it=1,lt=this.filters.length;it<lt;it++)this.filters[it-1].connect(this.filters[it]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let it=1,lt=this.filters.length;it<lt;it++)this.filters[it-1].disconnect(this.filters[it]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(it){return it||(it=[]),this._connected===!0?(this.disconnect(),this.filters=it.slice(),this.connect()):this.filters=it.slice(),this}setDetune(it){if(this.detune=it,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(it){return this.setFilters(it?[it]:[])}setPlaybackRate(it){if(this.hasPlaybackControl!==!1)return this.playbackRate=it,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(it){if(this.hasPlaybackControl!==!1)return this.loop=it,this.isPlaying===!0&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(it){return this.loopStart=it,this}setLoopEnd(it){return this.loopEnd=it,this}getVolume(){return this.gain.gain.value}setVolume(it){return this.gain.gain.setTargetAtTime(it,this.context.currentTime,.01),this}}class _y{constructor(it,lt,pt){let _t,Dt,Lt;switch(this.binding=it,this.valueSize=pt,lt){case"quaternion":_t=this._slerp,Dt=this._slerpAdditive,Lt=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*pt),this._workIndex=5;break;case"string":case"bool":_t=this._select,Dt=this._select,Lt=this._setAdditiveIdentityOther,this.buffer=new Array(5*pt);break;default:_t=this._lerp,Dt=this._lerpAdditive,Lt=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*pt)}this._mixBufferRegion=_t,this._mixBufferRegionAdditive=Dt,this._setIdentity=Lt,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(it,lt){const pt=this.buffer,_t=this.valueSize,Dt=it*_t+_t;let Lt=this.cumulativeWeight;if(Lt===0){for(let $t=0;$t!==_t;++$t)pt[Dt+$t]=pt[$t];Lt=lt}else{Lt+=lt;const $t=lt/Lt;this._mixBufferRegion(pt,Dt,0,$t,_t)}this.cumulativeWeight=Lt}accumulateAdditive(it){const lt=this.buffer,pt=this.valueSize,_t=pt*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(lt,_t,0,it,pt),this.cumulativeWeightAdditive+=it}apply(it){const lt=this.valueSize,pt=this.buffer,_t=it*lt+lt,Dt=this.cumulativeWeight,Lt=this.cumulativeWeightAdditive,$t=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,Dt<1){const Xt=lt*this._origIndex;this._mixBufferRegion(pt,_t,Xt,1-Dt,lt)}Lt>0&&this._mixBufferRegionAdditive(pt,_t,this._addIndex*lt,1,lt);for(let Xt=lt,Yt=lt+lt;Xt!==Yt;++Xt)if(pt[Xt]!==pt[Xt+lt]){$t.setValue(pt,_t);break}}saveOriginalState(){const it=this.binding,lt=this.buffer,pt=this.valueSize,_t=pt*this._origIndex;it.getValue(lt,_t);for(let Dt=pt,Lt=_t;Dt!==Lt;++Dt)lt[Dt]=lt[_t+Dt%pt];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const it=3*this.valueSize;this.binding.setValue(this.buffer,it)}_setAdditiveIdentityNumeric(){const it=this._addIndex*this.valueSize,lt=it+this.valueSize;for(let pt=it;pt<lt;pt++)this.buffer[pt]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const it=this._origIndex*this.valueSize,lt=this._addIndex*this.valueSize;for(let pt=0;pt<this.valueSize;pt++)this.buffer[lt+pt]=this.buffer[it+pt]}_select(it,lt,pt,_t,Dt){if(_t>=.5)for(let Lt=0;Lt!==Dt;++Lt)it[lt+Lt]=it[pt+Lt]}_slerp(it,lt,pt,_t){Ut.slerpFlat(it,lt,it,lt,it,pt,_t)}_slerpAdditive(it,lt,pt,_t,Dt){const Lt=this._workIndex*Dt;Ut.multiplyQuaternionsFlat(it,Lt,it,lt,it,pt),Ut.slerpFlat(it,lt,it,lt,it,Lt,_t)}_lerp(it,lt,pt,_t,Dt){const Lt=1-_t;for(let $t=0;$t!==Dt;++$t){const Xt=lt+$t;it[Xt]=it[Xt]*Lt+it[pt+$t]*_t}}_lerpAdditive(it,lt,pt,_t,Dt){for(let Lt=0;Lt!==Dt;++Lt){const $t=lt+Lt;it[$t]=it[$t]+it[pt+Lt]*_t}}}const i0=new RegExp("[\\[\\]\\.:\\/]","g"),PS="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",cE=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),M0=/(WCOD+)?/.source.replace("WCOD",PS),K0=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),dE=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),$_=new RegExp("^"+cE+M0+K0+dE+"$"),hE=["material","materials","bones"];class Ep{constructor(it,lt,pt){this.path=lt,this.parsedPath=pt||Ep.parseTrackName(lt),this.node=Ep.findNode(it,this.parsedPath.nodeName)||it,this.rootNode=it,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(it,lt,pt){return it&&it.isAnimationObjectGroup?new Ep.Composite(it,lt,pt):new Ep(it,lt,pt)}static sanitizeNodeName(it){return it.replace(/\s/g,"_").replace(i0,"")}static parseTrackName(it){const lt=$_.exec(it);if(!lt)throw new Error("PropertyBinding: Cannot parse trackName: "+it);const pt={nodeName:lt[2],objectName:lt[3],objectIndex:lt[4],propertyName:lt[5],propertyIndex:lt[6]},_t=pt.nodeName&&pt.nodeName.lastIndexOf(".");if(_t!==void 0&&_t!==-1){const Dt=pt.nodeName.substring(_t+1);hE.indexOf(Dt)!==-1&&(pt.nodeName=pt.nodeName.substring(0,_t),pt.objectName=Dt)}if(pt.propertyName===null||pt.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+it);return pt}static findNode(it,lt){if(!lt||lt===""||lt==="."||lt===-1||lt===it.name||lt===it.uuid)return it;if(it.skeleton){const pt=it.skeleton.getBoneByName(lt);if(pt!==void 0)return pt}if(it.children){const pt=function(Dt){for(let Lt=0;Lt<Dt.length;Lt++){const $t=Dt[Lt];if($t.name===lt||$t.uuid===lt)return $t;const Xt=pt($t.children);if(Xt)return Xt}return null},_t=pt(it.children);if(_t)return _t}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(it,lt){it[lt]=this.node[this.propertyName]}_getValue_array(it,lt){const pt=this.resolvedProperty;for(let _t=0,Dt=pt.length;_t!==Dt;++_t)it[lt++]=pt[_t]}_getValue_arrayElement(it,lt){it[lt]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(it,lt){this.resolvedProperty.toArray(it,lt)}_setValue_direct(it,lt){this.targetObject[this.propertyName]=it[lt]}_setValue_direct_setNeedsUpdate(it,lt){this.targetObject[this.propertyName]=it[lt],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(it,lt){this.targetObject[this.propertyName]=it[lt],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(it,lt){const pt=this.resolvedProperty;for(let _t=0,Dt=pt.length;_t!==Dt;++_t)pt[_t]=it[lt++]}_setValue_array_setNeedsUpdate(it,lt){const pt=this.resolvedProperty;for(let _t=0,Dt=pt.length;_t!==Dt;++_t)pt[_t]=it[lt++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(it,lt){const pt=this.resolvedProperty;for(let _t=0,Dt=pt.length;_t!==Dt;++_t)pt[_t]=it[lt++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(it,lt){this.resolvedProperty[this.propertyIndex]=it[lt]}_setValue_arrayElement_setNeedsUpdate(it,lt){this.resolvedProperty[this.propertyIndex]=it[lt],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(it,lt){this.resolvedProperty[this.propertyIndex]=it[lt],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(it,lt){this.resolvedProperty.fromArray(it,lt)}_setValue_fromArray_setNeedsUpdate(it,lt){this.resolvedProperty.fromArray(it,lt),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(it,lt){this.resolvedProperty.fromArray(it,lt),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(it,lt){this.bind(),this.getValue(it,lt)}_setValue_unbound(it,lt){this.bind(),this.setValue(it,lt)}bind(){let it=this.node;const lt=this.parsedPath,pt=lt.objectName,_t=lt.propertyName;let Dt=lt.propertyIndex;if(it||(it=Ep.findNode(this.rootNode,lt.nodeName)||this.rootNode,this.node=it),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!it)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(pt){let Yt=lt.objectIndex;switch(pt){case"materials":if(!it.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!it.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);it=it.material.materials;break;case"bones":if(!it.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);it=it.skeleton.bones;for(let Zt=0;Zt<it.length;Zt++)if(it[Zt].name===Yt){Yt=Zt;break}break;default:if(it[pt]===void 0)return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);it=it[pt]}if(Yt!==void 0){if(it[Yt]===void 0)return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,it);it=it[Yt]}}const Lt=it[_t];if(Lt===void 0){const Yt=lt.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+Yt+"."+_t+" but it wasn't found.",it)}let $t=this.Versioning.None;this.targetObject=it,it.needsUpdate!==void 0?$t=this.Versioning.NeedsUpdate:it.matrixWorldNeedsUpdate!==void 0&&($t=this.Versioning.MatrixWorldNeedsUpdate);let Xt=this.BindingType.Direct;if(Dt!==void 0){if(_t==="morphTargetInfluences"){if(!it.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!it.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!it.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);it.morphTargetDictionary[Dt]!==void 0&&(Dt=it.morphTargetDictionary[Dt])}Xt=this.BindingType.ArrayElement,this.resolvedProperty=Lt,this.propertyIndex=Dt}else Lt.fromArray!==void 0&&Lt.toArray!==void 0?(Xt=this.BindingType.HasFromToArray,this.resolvedProperty=Lt):Array.isArray(Lt)?(Xt=this.BindingType.EntireArray,this.resolvedProperty=Lt):this.propertyName=_t;this.getValue=this.GetterByBindingType[Xt],this.setValue=this.SetterByBindingTypeAndVersioning[Xt][$t]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ep.Composite=class{constructor(vt,it,lt){const pt=lt||Ep.parseTrackName(it);this._targetGroup=vt,this._bindings=vt.subscribe_(it,pt)}getValue(vt,it){this.bind();const lt=this._targetGroup.nCachedObjects_,pt=this._bindings[lt];pt!==void 0&&pt.getValue(vt,it)}setValue(vt,it){const lt=this._bindings;for(let pt=this._targetGroup.nCachedObjects_,_t=lt.length;pt!==_t;++pt)lt[pt].setValue(vt,it)}bind(){const vt=this._bindings;for(let it=this._targetGroup.nCachedObjects_,lt=vt.length;it!==lt;++it)vt[it].bind()}unbind(){const vt=this._bindings;for(let it=this._targetGroup.nCachedObjects_,lt=vt.length;it!==lt;++it)vt[it].unbind()}},Ep.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ep.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ep.prototype.GetterByBindingType=[Ep.prototype._getValue_direct,Ep.prototype._getValue_array,Ep.prototype._getValue_arrayElement,Ep.prototype._getValue_toArray],Ep.prototype.SetterByBindingTypeAndVersioning=[[Ep.prototype._setValue_direct,Ep.prototype._setValue_direct_setNeedsUpdate,Ep.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ep.prototype._setValue_array,Ep.prototype._setValue_array_setNeedsUpdate,Ep.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ep.prototype._setValue_arrayElement,Ep.prototype._setValue_arrayElement_setNeedsUpdate,Ep.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ep.prototype._setValue_fromArray,Ep.prototype._setValue_fromArray_setNeedsUpdate,Ep.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class vx{constructor(it,lt,pt=null,_t=lt.blendMode){this._mixer=it,this._clip=lt,this._localRoot=pt,this.blendMode=_t;const Dt=lt.tracks,Lt=Dt.length,$t=new Array(Lt),Xt={endingStart:2400,endingEnd:2400};for(let Yt=0;Yt!==Lt;++Yt){const Zt=Dt[Yt].createInterpolant(null);$t[Yt]=Zt,Zt.settings=Xt}this._interpolantSettings=Xt,this._interpolants=$t,this._propertyBindings=new Array(Lt),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(it){return this._startTime=it,this}setLoop(it,lt){return this.loop=it,this.repetitions=lt,this}setEffectiveWeight(it){return this.weight=it,this._effectiveWeight=this.enabled?it:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(it){return this._scheduleFading(it,0,1)}fadeOut(it){return this._scheduleFading(it,1,0)}crossFadeFrom(it,lt,pt){if(it.fadeOut(lt),this.fadeIn(lt),pt){const _t=this._clip.duration,Dt=it._clip.duration,Lt=Dt/_t,$t=_t/Dt;it.warp(1,Lt,lt),this.warp($t,1,lt)}return this}crossFadeTo(it,lt,pt){return it.crossFadeFrom(this,lt,pt)}stopFading(){const it=this._weightInterpolant;return it!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(it)),this}setEffectiveTimeScale(it){return this.timeScale=it,this._effectiveTimeScale=this.paused?0:it,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(it){return this.timeScale=this._clip.duration/it,this.stopWarping()}syncWith(it){return this.time=it.time,this.timeScale=it.timeScale,this.stopWarping()}halt(it){return this.warp(this._effectiveTimeScale,0,it)}warp(it,lt,pt){const _t=this._mixer,Dt=_t.time,Lt=this.timeScale;let $t=this._timeScaleInterpolant;$t===null&&($t=_t._lendControlInterpolant(),this._timeScaleInterpolant=$t);const Xt=$t.parameterPositions,Yt=$t.sampleValues;return Xt[0]=Dt,Xt[1]=Dt+pt,Yt[0]=it/Lt,Yt[1]=lt/Lt,this}stopWarping(){const it=this._timeScaleInterpolant;return it!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(it)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(it,lt,pt,_t){if(!this.enabled)return void this._updateWeight(it);const Dt=this._startTime;if(Dt!==null){const Xt=(it-Dt)*pt;if(Xt<0||pt===0)return;this._startTime=null,lt=pt*Xt}lt*=this._updateTimeScale(it);const Lt=this._updateTime(lt),$t=this._updateWeight(it);if($t>0){const Xt=this._interpolants,Yt=this._propertyBindings;switch(this.blendMode){case 2501:for(let Zt=0,lr=Xt.length;Zt!==lr;++Zt)Xt[Zt].evaluate(Lt),Yt[Zt].accumulateAdditive($t);break;case 2500:default:for(let Zt=0,lr=Xt.length;Zt!==lr;++Zt)Xt[Zt].evaluate(Lt),Yt[Zt].accumulate(_t,$t)}}}_updateWeight(it){let lt=0;if(this.enabled){lt=this.weight;const pt=this._weightInterpolant;if(pt!==null){const _t=pt.evaluate(it)[0];lt*=_t,it>pt.parameterPositions[1]&&(this.stopFading(),_t===0&&(this.enabled=!1))}}return this._effectiveWeight=lt,lt}_updateTimeScale(it){let lt=0;if(!this.paused){lt=this.timeScale;const pt=this._timeScaleInterpolant;pt!==null&&(lt*=pt.evaluate(it)[0],it>pt.parameterPositions[1]&&(this.stopWarping(),lt===0?this.paused=!0:this.timeScale=lt))}return this._effectiveTimeScale=lt,lt}_updateTime(it){const lt=this._clip.duration,pt=this.loop;let _t=this.time+it,Dt=this._loopCount;const Lt=pt===2202;if(it===0)return Dt===-1?_t:Lt&&(1&Dt)==1?lt-_t:_t;if(pt===2200){Dt===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(_t>=lt)_t=lt;else{if(!(_t<0)){this.time=_t;break e}_t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=_t,this._mixer.dispatchEvent({type:"finished",action:this,direction:it<0?-1:1})}}else{if(Dt===-1&&(it>=0?(Dt=0,this._setEndings(!0,this.repetitions===0,Lt)):this._setEndings(this.repetitions===0,!0,Lt)),_t>=lt||_t<0){const $t=Math.floor(_t/lt);_t-=lt*$t,Dt+=Math.abs($t);const Xt=this.repetitions-Dt;if(Xt<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,_t=it>0?lt:0,this.time=_t,this._mixer.dispatchEvent({type:"finished",action:this,direction:it>0?1:-1});else{if(Xt===1){const Yt=it<0;this._setEndings(Yt,!Yt,Lt)}else this._setEndings(!1,!1,Lt);this._loopCount=Dt,this.time=_t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:$t})}}else this.time=_t;if(Lt&&(1&Dt)==1)return lt-_t}return _t}_setEndings(it,lt,pt){const _t=this._interpolantSettings;pt?(_t.endingStart=2401,_t.endingEnd=2401):(_t.endingStart=it?this.zeroSlopeAtStart?2401:2400:2402,_t.endingEnd=lt?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(it,lt,pt){const _t=this._mixer,Dt=_t.time;let Lt=this._weightInterpolant;Lt===null&&(Lt=_t._lendControlInterpolant(),this._weightInterpolant=Lt);const $t=Lt.parameterPositions,Xt=Lt.sampleValues;return $t[0]=Dt,Xt[0]=lt,$t[1]=Dt+it,Xt[1]=pt,this}}(class extends dt{constructor(vt){super(),this._root=vt,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(vt,it){const lt=vt._localRoot||this._root,pt=vt._clip.tracks,_t=pt.length,Dt=vt._propertyBindings,Lt=vt._interpolants,$t=lt.uuid,Xt=this._bindingsByRootAndName;let Yt=Xt[$t];Yt===void 0&&(Yt={},Xt[$t]=Yt);for(let Zt=0;Zt!==_t;++Zt){const lr=pt[Zt],xr=lr.name;let wr=Yt[xr];if(wr!==void 0)Dt[Zt]=wr;else{if(wr=Dt[Zt],wr!==void 0){wr._cacheIndex===null&&(++wr.referenceCount,this._addInactiveBinding(wr,$t,xr));continue}const Ir=it&&it._propertyBindings[Zt].binding.parsedPath;wr=new _y(Ep.create(lt,xr,Ir),lr.ValueTypeName,lr.getValueSize()),++wr.referenceCount,this._addInactiveBinding(wr,$t,xr),Dt[Zt]=wr}Lt[Zt].resultBuffer=wr.buffer}}_activateAction(vt){if(!this._isActiveAction(vt)){if(vt._cacheIndex===null){const lt=(vt._localRoot||this._root).uuid,pt=vt._clip.uuid,_t=this._actionsByClip[pt];this._bindAction(vt,_t&&_t.knownActions[0]),this._addInactiveAction(vt,pt,lt)}const it=vt._propertyBindings;for(let lt=0,pt=it.length;lt!==pt;++lt){const _t=it[lt];_t.useCount++==0&&(this._lendBinding(_t),_t.saveOriginalState())}this._lendAction(vt)}}_deactivateAction(vt){if(this._isActiveAction(vt)){const it=vt._propertyBindings;for(let lt=0,pt=it.length;lt!==pt;++lt){const _t=it[lt];--_t.useCount==0&&(_t.restoreOriginalState(),this._takeBackBinding(_t))}this._takeBackAction(vt)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const vt=this;this.stats={actions:{get total(){return vt._actions.length},get inUse(){return vt._nActiveActions}},bindings:{get total(){return vt._bindings.length},get inUse(){return vt._nActiveBindings}},controlInterpolants:{get total(){return vt._controlInterpolants.length},get inUse(){return vt._nActiveControlInterpolants}}}}_isActiveAction(vt){const it=vt._cacheIndex;return it!==null&&it<this._nActiveActions}_addInactiveAction(vt,it,lt){const pt=this._actions,_t=this._actionsByClip;let Dt=_t[it];if(Dt===void 0)Dt={knownActions:[vt],actionByRoot:{}},vt._byClipCacheIndex=0,_t[it]=Dt;else{const Lt=Dt.knownActions;vt._byClipCacheIndex=Lt.length,Lt.push(vt)}vt._cacheIndex=pt.length,pt.push(vt),Dt.actionByRoot[lt]=vt}_removeInactiveAction(vt){const it=this._actions,lt=it[it.length-1],pt=vt._cacheIndex;lt._cacheIndex=pt,it[pt]=lt,it.pop(),vt._cacheIndex=null;const _t=vt._clip.uuid,Dt=this._actionsByClip,Lt=Dt[_t],$t=Lt.knownActions,Xt=$t[$t.length-1],Yt=vt._byClipCacheIndex;Xt._byClipCacheIndex=Yt,$t[Yt]=Xt,$t.pop(),vt._byClipCacheIndex=null,delete Lt.actionByRoot[(vt._localRoot||this._root).uuid],$t.length===0&&delete Dt[_t],this._removeInactiveBindingsForAction(vt)}_removeInactiveBindingsForAction(vt){const it=vt._propertyBindings;for(let lt=0,pt=it.length;lt!==pt;++lt){const _t=it[lt];--_t.referenceCount==0&&this._removeInactiveBinding(_t)}}_lendAction(vt){const it=this._actions,lt=vt._cacheIndex,pt=this._nActiveActions++,_t=it[pt];vt._cacheIndex=pt,it[pt]=vt,_t._cacheIndex=lt,it[lt]=_t}_takeBackAction(vt){const it=this._actions,lt=vt._cacheIndex,pt=--this._nActiveActions,_t=it[pt];vt._cacheIndex=pt,it[pt]=vt,_t._cacheIndex=lt,it[lt]=_t}_addInactiveBinding(vt,it,lt){const pt=this._bindingsByRootAndName,_t=this._bindings;let Dt=pt[it];Dt===void 0&&(Dt={},pt[it]=Dt),Dt[lt]=vt,vt._cacheIndex=_t.length,_t.push(vt)}_removeInactiveBinding(vt){const it=this._bindings,lt=vt.binding,pt=lt.rootNode.uuid,_t=lt.path,Dt=this._bindingsByRootAndName,Lt=Dt[pt],$t=it[it.length-1],Xt=vt._cacheIndex;$t._cacheIndex=Xt,it[Xt]=$t,it.pop(),delete Lt[_t],Object.keys(Lt).length===0&&delete Dt[pt]}_lendBinding(vt){const it=this._bindings,lt=vt._cacheIndex,pt=this._nActiveBindings++,_t=it[pt];vt._cacheIndex=pt,it[pt]=vt,_t._cacheIndex=lt,it[lt]=_t}_takeBackBinding(vt){const it=this._bindings,lt=vt._cacheIndex,pt=--this._nActiveBindings,_t=it[pt];vt._cacheIndex=pt,it[pt]=vt,_t._cacheIndex=lt,it[lt]=_t}_lendControlInterpolant(){const vt=this._controlInterpolants,it=this._nActiveControlInterpolants++;let lt=vt[it];return lt===void 0&&(lt=new j1(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),lt.__cacheIndex=it,vt[it]=lt),lt}_takeBackControlInterpolant(vt){const it=this._controlInterpolants,lt=vt.__cacheIndex,pt=--this._nActiveControlInterpolants,_t=it[pt];vt.__cacheIndex=pt,it[pt]=vt,_t.__cacheIndex=lt,it[lt]=_t}clipAction(vt,it,lt){const pt=it||this._root,_t=pt.uuid;let Dt=typeof vt=="string"?$1.findByName(pt,vt):vt;const Lt=Dt!==null?Dt.uuid:vt,$t=this._actionsByClip[Lt];let Xt=null;if(lt===void 0&&(lt=Dt!==null?Dt.blendMode:2500),$t!==void 0){const Zt=$t.actionByRoot[_t];if(Zt!==void 0&&Zt.blendMode===lt)return Zt;Xt=$t.knownActions[0],Dt===null&&(Dt=Xt._clip)}if(Dt===null)return null;const Yt=new vx(this,Dt,it,lt);return this._bindAction(Yt,Xt),this._addInactiveAction(Yt,Lt,_t),Yt}existingAction(vt,it){const lt=it||this._root,pt=lt.uuid,_t=typeof vt=="string"?$1.findByName(lt,vt):vt,Dt=_t?_t.uuid:vt,Lt=this._actionsByClip[Dt];return Lt!==void 0&&Lt.actionByRoot[pt]||null}stopAllAction(){const vt=this._actions;for(let it=this._nActiveActions-1;it>=0;--it)vt[it].stop();return this}update(vt){vt*=this.timeScale;const it=this._actions,lt=this._nActiveActions,pt=this.time+=vt,_t=Math.sign(vt),Dt=this._accuIndex^=1;for(let Xt=0;Xt!==lt;++Xt)it[Xt]._update(pt,vt,_t,Dt);const Lt=this._bindings,$t=this._nActiveBindings;for(let Xt=0;Xt!==$t;++Xt)Lt[Xt].apply(Dt);return this}setTime(vt){this.time=0;for(let it=0;it<this._actions.length;it++)this._actions[it].time=0;return this.update(vt)}getRoot(){return this._root}uncacheClip(vt){const it=this._actions,lt=vt.uuid,pt=this._actionsByClip,_t=pt[lt];if(_t!==void 0){const Dt=_t.knownActions;for(let Lt=0,$t=Dt.length;Lt!==$t;++Lt){const Xt=Dt[Lt];this._deactivateAction(Xt);const Yt=Xt._cacheIndex,Zt=it[it.length-1];Xt._cacheIndex=null,Xt._byClipCacheIndex=null,Zt._cacheIndex=Yt,it[Yt]=Zt,it.pop(),this._removeInactiveBindingsForAction(Xt)}delete pt[lt]}}uncacheRoot(vt){const it=vt.uuid,lt=this._actionsByClip;for(const _t in lt){const Dt=lt[_t].actionByRoot[it];Dt!==void 0&&(this._deactivateAction(Dt),this._removeInactiveAction(Dt))}const pt=this._bindingsByRootAndName[it];if(pt!==void 0)for(const _t in pt){const Dt=pt[_t];Dt.restoreOriginalState(),this._removeInactiveBinding(Dt)}}uncacheAction(vt,it){const lt=this.existingAction(vt,it);lt!==null&&(this._deactivateAction(lt),this._removeInactiveAction(lt))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1),(class extends U0{constructor(vt,it,lt=1){super(vt,it),this.meshPerAttribute=lt}copy(vt){return super.copy(vt),this.meshPerAttribute=vt.meshPerAttribute,this}clone(vt){const it=super.clone(vt);return it.meshPerAttribute=this.meshPerAttribute,it}toJSON(vt){const it=super.toJSON(vt);return it.isInstancedInterleavedBuffer=!0,it.meshPerAttribute=this.meshPerAttribute,it}}).prototype.isInstancedInterleavedBuffer=!0,(class extends rn{constructor(vt){super(),this.material=vt,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}).prototype.isImmediateRenderObject=!0;const xy=new Ot,f1=new Nn,Wx=new Nn,NS=new Float32Array(1);new Int32Array(NS.buffer);const p1=[.125,.215,.35,.446,.526,.582],Xx=5+p1.length,yx=new ss({side:1,depthWrite:!1,depthTest:!1});new os(new eo,yx),Um();function Um(){const vt=[],it=[],lt=[];let pt=8;for(let _t=0;_t<Xx;_t++){const Dt=Math.pow(2,pt);it.push(Dt);let Lt=1/Dt;_t>4?Lt=p1[_t-8+4-1]:_t==0&&(Lt=0),lt.push(Lt);const $t=1/(Dt-1),Xt=-$t/2,Yt=1+$t/2,Zt=[Xt,Xt,Yt,Xt,Yt,Yt,Xt,Xt,Yt,Yt,Xt,Yt],lr=6,xr=6,wr=3,Ir=2,kr=1,Lr=new Float32Array(wr*xr*lr),Xr=new Float32Array(Ir*xr*lr),_n=new Float32Array(kr*xr*lr);for(let Kn=0;Kn<lr;Kn++){const Mn=Kn%3*2/3-1,ca=Kn>2?0:-1,Gn=[Mn,ca,0,Mn+2/3,ca,0,Mn+2/3,ca+1,0,Mn,ca,0,Mn+2/3,ca+1,0,Mn,ca+1,0];Lr.set(Gn,wr*xr*Kn),Xr.set(Zt,Ir*xr*Kn);const Qn=[Kn,Kn,Kn,Kn,Kn,Kn];_n.set(Qn,kr*xr*Kn)}const On=new Wu;On.setAttribute("position",new vs(Lr,wr)),On.setAttribute("uv",new vs(Xr,Ir)),On.setAttribute("faceIndex",new vs(_n,kr)),vt.push(On),pt>4&&pt--}return{_lodPlanes:vt,_sizeLods:it,_sigmas:lt}}am.create=function(vt,it){return console.log("THREE.Curve.create() has been deprecated"),vt.prototype=Object.create(am.prototype),vt.prototype.constructor=vt,vt.prototype.getPoint=it,vt},Q0.prototype.fromPoints=function(vt){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(vt)},(class extends S0{constructor(vt=10,it=10,lt=4473924,pt=8947848){lt=new mn(lt),pt=new mn(pt);const _t=it/2,Dt=vt/it,Lt=vt/2,$t=[],Xt=[];for(let Zt=0,lr=0,xr=-Lt;Zt<=it;Zt++,xr+=Dt){$t.push(-Lt,0,xr,Lt,0,xr),$t.push(xr,0,-Lt,xr,0,Lt);const wr=Zt===_t?lt:pt;wr.toArray(Xt,lr),lr+=3,wr.toArray(Xt,lr),lr+=3,wr.toArray(Xt,lr),lr+=3,wr.toArray(Xt,lr),lr+=3}const Yt=new Wu;Yt.setAttribute("position",new Mo($t,3)),Yt.setAttribute("color",new Mo(Xt,3)),super(Yt,new zs({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}).prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},(class extends S0{constructor(vt){const it=(function $t(Xt){const Yt=[];Xt&&Xt.isBone&&Yt.push(Xt);for(let Zt=0;Zt<Xt.children.length;Zt++)Yt.push.apply(Yt,$t(Xt.children[Zt]));return Yt})(vt),lt=new Wu,pt=[],_t=[],Dt=new mn(0,0,1),Lt=new mn(0,1,0);for(let $t=0;$t<it.length;$t++){const Xt=it[$t];Xt.parent&&Xt.parent.isBone&&(pt.push(0,0,0),pt.push(0,0,0),_t.push(Dt.r,Dt.g,Dt.b),_t.push(Lt.r,Lt.g,Lt.b))}lt.setAttribute("position",new Mo(pt,3)),lt.setAttribute("color",new Mo(_t,3)),super(lt,new zs({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=vt,this.bones=it,this.matrix=vt.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(vt){const it=this.bones,lt=this.geometry,pt=lt.getAttribute("position");Wx.copy(this.root.matrixWorld).invert();for(let _t=0,Dt=0;_t<it.length;_t++){const Lt=it[_t];Lt.parent&&Lt.parent.isBone&&(f1.multiplyMatrices(Wx,Lt.matrixWorld),xy.setFromMatrixPosition(f1),pt.setXYZ(Dt,xy.x,xy.y,xy.z),f1.multiplyMatrices(Wx,Lt.parent.matrixWorld),xy.setFromMatrixPosition(f1),pt.setXYZ(Dt+1,xy.x,xy.y,xy.z),Dt+=2)}lt.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(vt)}}).prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Y0.prototype.extractUrlBase=function(vt){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),lE.extractUrlBase(vt)},Y0.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},tr.prototype.center=function(vt){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(vt)},tr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},tr.prototype.isIntersectionBox=function(vt){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(vt)},tr.prototype.isIntersectionSphere=function(vt){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(vt)},tr.prototype.size=function(vt){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(vt)},Hn.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},dl.prototype.setFromMatrix=function(vt){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(vt)},At.prototype.flattenToArrayOffset=function(vt,it){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(vt,it)},At.prototype.multiplyVector3=function(vt){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),vt.applyMatrix3(this)},At.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},At.prototype.applyToBufferAttribute=function(vt){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),vt.applyMatrix3(this)},At.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},At.prototype.getInverse=function(vt){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(vt).invert()},Nn.prototype.extractPosition=function(vt){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(vt)},Nn.prototype.flattenToArrayOffset=function(vt,it){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(vt,it)},Nn.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new Ot().setFromMatrixColumn(this,3)},Nn.prototype.setRotationFromQuaternion=function(vt){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(vt)},Nn.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Nn.prototype.multiplyVector3=function(vt){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),vt.applyMatrix4(this)},Nn.prototype.multiplyVector4=function(vt){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),vt.applyMatrix4(this)},Nn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Nn.prototype.rotateAxis=function(vt){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),vt.transformDirection(this)},Nn.prototype.crossVector=function(vt){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),vt.applyMatrix4(this)},Nn.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Nn.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Nn.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Nn.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Nn.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Nn.prototype.applyToBufferAttribute=function(vt){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),vt.applyMatrix4(this)},Nn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Nn.prototype.makeFrustum=function(vt,it,lt,pt,_t,Dt){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(vt,it,pt,lt,_t,Dt)},Nn.prototype.getInverse=function(vt){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(vt).invert()},lp.prototype.isIntersectionLine=function(vt){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(vt)},Ut.prototype.multiplyVector3=function(vt){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),vt.applyQuaternion(this)},Ut.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Cn.prototype.isIntersectionBox=function(vt){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(vt)},Cn.prototype.isIntersectionPlane=function(vt){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(vt)},Cn.prototype.isIntersectionSphere=function(vt){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(vt)},Gu.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Gu.prototype.barycoordFromPoint=function(vt,it){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(vt,it)},Gu.prototype.midpoint=function(vt){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(vt)},Gu.prototypenormal=function(vt){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(vt)},Gu.prototype.plane=function(vt){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(vt)},Gu.barycoordFromPoint=function(vt,it,lt,pt,_t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Gu.getBarycoord(vt,it,lt,pt,_t)},Gu.normal=function(vt,it,lt,pt){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Gu.getNormal(vt,it,lt,pt)},h1.prototype.extractAllPoints=function(vt){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(vt)},h1.prototype.extrude=function(vt){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Em(this,vt)},h1.prototype.makeGeometry=function(vt){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new ty(this,vt)},wt.prototype.fromAttribute=function(vt,it,lt){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(vt,it,lt)},wt.prototype.distanceToManhattan=function(vt){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(vt)},wt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Ot.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},Ot.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},Ot.prototype.getPositionFromMatrix=function(vt){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(vt)},Ot.prototype.getScaleFromMatrix=function(vt){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(vt)},Ot.prototype.getColumnFromMatrix=function(vt,it){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(it,vt)},Ot.prototype.applyProjection=function(vt){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(vt)},Ot.prototype.fromAttribute=function(vt,it,lt){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(vt,it,lt)},Ot.prototype.distanceToManhattan=function(vt){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(vt)},Ot.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Vt.prototype.fromAttribute=function(vt,it,lt){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(vt,it,lt)},Vt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},rn.prototype.getChildByName=function(vt){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(vt)},rn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},rn.prototype.translate=function(vt,it){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(it,vt)},rn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},rn.prototype.applyMatrix=function(vt){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(vt)},Object.defineProperties(rn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(vt){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=vt}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),os.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(os.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),zr.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},lu.prototype.setLens=function(vt,it){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),it!==void 0&&(this.filmGauge=it),this.setFocalLength(vt)},Object.defineProperties(Oy.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(vt){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=vt}},shadowCameraLeft:{set:function(vt){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=vt}},shadowCameraRight:{set:function(vt){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=vt}},shadowCameraTop:{set:function(vt){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=vt}},shadowCameraBottom:{set:function(vt){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=vt}},shadowCameraNear:{set:function(vt){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=vt}},shadowCameraFar:{set:function(vt){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=vt}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(vt){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=vt}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(vt){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=vt}},shadowMapHeight:{set:function(vt){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=vt}}}),Object.defineProperties(vs.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===35048},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),vs.prototype.setDynamic=function(vt){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(vt===!0?35048:35044),this},vs.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},vs.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Wu.prototype.addIndex=function(vt){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(vt)},Wu.prototype.addAttribute=function(vt,it){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),it&&it.isBufferAttribute||it&&it.isInterleavedBufferAttribute?vt==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(it),this):this.setAttribute(vt,it):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(vt,new vs(arguments[1],arguments[2])))},Wu.prototype.addDrawCall=function(vt,it,lt){lt!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(vt,it)},Wu.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Wu.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Wu.prototype.removeAttribute=function(vt){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(vt)},Wu.prototype.applyMatrix=function(vt){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(vt)},Object.defineProperties(Wu.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),U0.prototype.setDynamic=function(vt){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(vt===!0?35048:35044),this},U0.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Em.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Em.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Em.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},fy.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Object.defineProperties(Ku.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new mn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(vt){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=vt===1}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(vt){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=vt}}}),Object.defineProperties(mu.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(vt){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=vt}}}),Ql.prototype.clearTarget=function(vt,it,lt,pt){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(vt),this.clear(it,lt,pt)},Ql.prototype.animate=function(vt){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(vt)},Ql.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Ql.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Ql.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Ql.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Ql.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Ql.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Ql.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Ql.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Ql.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Ql.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Ql.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Ql.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Ql.prototype.enableScissorTest=function(vt){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(vt)},Ql.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Ql.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Ql.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Ql.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Ql.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Ql.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Ql.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Ql.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Ql.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Ql.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Ql.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(vt){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=vt}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(vt){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=vt}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(vt){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=vt===!0?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(pp.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Kt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(vt){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=vt}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(vt){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=vt}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(vt){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=vt}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(vt){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=vt}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(vt){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=vt}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(vt){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=vt}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(vt){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=vt}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(vt){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=vt}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(vt){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=vt}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(vt){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=vt}}}),by.prototype.load=function(vt){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const it=this;return new gw().load(vt,function(lt){it.setBuffer(lt)}),this},vl.prototype.updateCubeMap=function(vt,it){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(vt,it)},vl.prototype.clear=function(vt,it,lt,pt){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(vt,it,lt,pt)},Pt.crossOrigin=void 0,Pt.loadTexture=function(vt,it,lt,pt){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const _t=new fw;_t.setCrossOrigin(this.crossOrigin);const Dt=_t.load(vt,lt,void 0,pt);return it&&(Dt.mapping=it),Dt},Pt.loadTextureCube=function(vt,it,lt,pt){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const _t=new uE;_t.setCrossOrigin(this.crossOrigin);const Dt=_t.load(vt,lt,void 0,pt);return it&&(Dt.mapping=it),Dt},Pt.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Pt.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"130"}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="130");var Yx=tt(6),em=tt.n(Yx),Ly=tt(34),Dp=tt.n(Ly),kS=tt(9),bl=tt.n(kS);class Z0{constructor(){this.camera=new qy(10,10,10,10),this.camera.position.z=100,this.camera.position.x=0,this.camera.position.y=0}focus(it,lt){it.position.z=50}updateAspect(it,lt){this.camera.left=-1*it/2,this.camera.right=it/2,this.camera.top=lt/2,this.camera.bottom=-1*lt/2,this.camera.updateProjectionMatrix()}}const U_={linear:(vt,it,lt,pt)=>lt*vt/pt+it,easeIn:(vt,it,lt,pt)=>lt*(vt/=pt)*vt+it,strongEaseIn:(vt,it,lt,pt)=>lt*(vt/=pt)*vt*vt*vt*vt+it,strongEaseOut:(vt,it,lt,pt)=>lt*((vt=vt/pt-1)*vt*vt*vt*vt+1)+it,sineaseIn:(vt,it,lt,pt)=>lt*(vt/=pt)*vt*vt+it,sineaseOut:(vt,it,lt,pt)=>lt*((vt=vt/pt-1)*vt*vt+1)+it},$p=new Ft;class Lv{constructor(){this.camera=new Z0,this.mesh=new os,this.material=null,this.geometry=null}applyOptions(it){}addObjects(it){this.mesh.position.z=50,it.add(this.mesh)}setSize(it,lt){this.camera.updateAspect(it,lt),this.geometry=new Vm(it,lt,1,1),this.material=new mu({fragmentShader:this.fragmentShader,vertexShader:`
varying vec2 vUv;
void main(){
vUv = uv;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
`}),this.material.uniforms={width:{value:it},height:{value:lt},timePercent:{value:0},texturePrev:{value:$p},textureNext:{value:$p}},this.applyOptions(this.options),this.mesh.geometry=this.geometry,this.mesh.material=this.material}setPrevTexture(it){this.material.uniforms.texturePrev.value=it}setNextTexture(it){this.material.uniforms.textureNext.value=it}updateAnimation(it){this.material.uniforms.timePercent.value=it}dispose(){var it,lt;(it=this.geometry)===null||it===void 0||it.dispose(),(lt=this.material)===null||lt===void 0||lt.dispose()}}var OS=tt(72),bx=tt.n(OS),I0=tt(73),Nl=tt.n(I0),Xy=tt(74),pl=tt.n(Xy),Sy=tt(75),Dv=tt.n(Sy),_x=tt(76),J0=tt.n(_x),uv=tt(77),al=tt.n(uv),z1=tt(78),Qx=tt.n(z1),m1=tt(79),ub=tt.n(m1),Yu=tt(80),z_=tt.n(Yu),lv=tt(81),R0=tt.n(lv),vw=tt(82),g1=tt.n(vw),qS=tt(83),G1=tt.n(qS),LS=tt(84),dT=tt.n(LS),FS=tt(85),ny=tt.n(FS);class ym{constructor(){this.camera=new lu(60,1,1,2e3),this.camera.position.z=1e3,this.camera.position.x=0,this.camera.position.y=0}updateAspect(it,lt){this.camera.aspect=it/lt,this.camera.updateProjectionMatrix()}focus(it,lt){const pt=.5*lt/Math.tan(Math.PI/6);it.position.z=1e3-pt}}class hm{constructor(){this.prevTexture=$p,this.nextTexture=$p,this.geometry=new Wu,this.material=null,this.camera=new ym,this.mesh=new os,this.textureWidth=0,this.textureHeight=0}horizontalSegments(){return Math.ceil(this.verticalSegments*this.textureWidth/this.textureHeight)}applyOptions(it){this.options=it}initMesh(it,lt){const pt=[],_t=[],Dt=[],Lt=this.verticalSegments,$t=this.horizontalSegments(),Xt=it/2,Yt=lt/2,Zt=it/$t,lr=lt/Lt,xr=this.extraAttributes(),wr=Object.keys(xr),Ir=wr.reduce((kr,Lr)=>(kr[Lr]=[],kr),{});for(let kr=0;kr<Lt;kr++){const Lr=kr*lr-Yt;for(let Xr=0;Xr<$t;Xr++){const _n=Xr*Zt-Xt;_t.push(_n,-Lr,0),Dt.push(1*Xr/$t,1-1*kr/Lt),wr.forEach(On=>Ir[On].push(...xr[On].generator(kr,Xr))),_t.push(_n+Zt,-Lr,0),Dt.push(1*(Xr+1)/$t,1-1*kr/Lt),wr.forEach(On=>Ir[On].push(...xr[On].generator(kr,Xr))),_t.push(_n,-Lr-lr,0),Dt.push(1*Xr/$t,1-1*(kr+1)/Lt),wr.forEach(On=>Ir[On].push(...xr[On].generator(kr,Xr))),_t.push(_n+Zt,-Lr-lr,0),Dt.push(1*(Xr+1)/$t,1-1*(kr+1)/Lt),wr.forEach(On=>Ir[On].push(...xr[On].generator(kr,Xr)))}}for(let kr=0;kr<Lt*$t;kr++){const Lr=4*kr,Xr=Lr+1,_n=Lr+2,On=Lr+3;pt.push(Xr,Lr,On),pt.push(Lr,_n,On)}return this.geometry.setIndex(pt),this.geometry.setAttribute("position",new Mo(_t,3)),this.geometry.setAttribute("uv",new Mo(new Float32Array(Dt),2)),wr.forEach(kr=>{const{threeType:Lr,jsType:Xr,itemSize:_n}=xr[kr];this.geometry.setAttribute(kr,new Lr(new Xr(Ir[kr]),_n))}),{verticalSegments:Lt,horizontalSegments:$t,segmentWidth:Zt,segmentHeight:lr}}setSize(it,lt){this.textureWidth=it,this.textureHeight=lt,this.camera.updateAspect(it,lt),this.camera.focus(this.mesh,lt),this.material=new mu({fragmentShader:this.fragmentShader,vertexShader:this.vertexShader,side:2}),this.mesh.geometry=this.geometry,this.material.transparent=!0,this.mesh.material=this.material;const{verticalSegments:pt,horizontalSegments:_t,segmentWidth:Dt,segmentHeight:Lt}=this.initMesh(it,lt);this.material.uniforms={segmentWidth:{value:Dt},segmentHeight:{value:Lt},verticalSegments:{value:pt},horizontalSegments:{value:_t},timePercent:{value:0},texturePrev:{value:$p},textureNext:{value:$p}},this.applyOptions(this.options)}setPrevTexture(it){this.prevTexture=it,this.material.uniforms.texturePrev.value=it}setNextTexture(it){this.nextTexture=it,this.material.uniforms.textureNext.value=it}addObjects(it){it.add(this.mesh)}updateAnimation(it){this.material.uniforms.timePercent.value=it}dispose(){var it,lt;(it=this.geometry)===null||it===void 0||it.dispose(),(lt=this.material)===null||lt===void 0||lt.dispose()}}var yw=tt(86),Kx=tt.n(yw),a0=tt(87),fE=tt.n(a0),V1=tt(88),pE=tt.n(V1),hT=tt(89),mE=tt.n(hT),xx=tt(90),y1=tt.n(xx),gE=tt(91),fT=tt.n(gE),BS=tt(92),vE=tt.n(BS),pT=tt(93),mT=tt.n(pT),Zx=tt(94),jS=tt.n(Zx),b1=tt(95),yE=tt.n(b1),bw=tt(96),H1=tt.n(bw),cv=tt(97),vb=tt.n(cv);class _1 extends hm{constructor(){super(...arguments),this.duration=1250,this.options=[],this.fragmentShader=vb.a,this.vertexShader=H1.a,this.verticalSegments=100}addObjects(it){it.add(this.mesh),it.background=this.nextTexture}extraAttributes(){return{}}applyOptions(it){super.applyOptions(it);const lt=this.options.find(pt=>pt.name==="invX");this.material.uniforms.option={value:lt?.value?Number(lt.value):0}}}var bE=tt(98),_E=tt.n(bE),G_=tt(99),gT=tt.n(G_),_w=tt(100),xE=tt.n(_w),SE=tt(101),b_=tt.n(SE),$S=tt(102),OA=tt.n($S),Sx=tt(103),xw=tt.n(Sx),V_=tt(104),Sw=tt.n(V_),ww=tt(105),qA=tt.n(ww),wE=tt(47),W1=tt.n(wE),vT=tt(48),Tw=tt.n(vT),Ew=tt(106),Aw=tt.n(Ew),TE=tt(107),yT=tt.n(TE);const bT={RandomLines:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=Nl.a,this.options=[{name:"dir",value:"horz"}]}genRandomLines(){let vt=[1];for(let lt=20;lt--;){let pt=vt.sort((Xt,Yt)=>Yt-Xt)[0],_t=vt.indexOf(pt),Dt=Math.random(),Lt=pt*Dt,$t=pt*(1-Dt);vt.splice(_t,1),vt.push(Lt,$t)}let it=vt.length;for(;it;){let lt=Math.floor(Math.random()*it--);[vt[lt],vt[it]]=[vt[it],vt[lt]]}return vt}applyOptions(vt){var it,lt;super.applyOptions(vt),this.material.uniforms.direction={value:((lt=(it=this.options)===null||it===void 0?void 0:it[0])===null||lt===void 0?void 0:lt.value)==="horz"?0:1}}setSize(vt,it){super.setSize(vt,it),this.material.uniforms.lines={value:this.genRandomLines()},this.material.vertexShader=bx.a}},Shape:class extends Lv{constructor(){super(...arguments),this.duration=800,this.fragmentShader=pl.a,this.options=[]}},Ripples:class extends Lv{constructor(){super(...arguments),this.duration=1400,this.fragmentShader=Dv.a,this.options=[{name:"dir",value:"center"}],this.optionsMap={center:0,ru:1,lu:2,ld:3,rd:4}}applyOptions(vt){var it,lt;super.applyOptions(vt);const pt=this.options.find(_t=>_t.name==="dir");this.material.uniforms.option={value:(it=this.optionsMap)===null||it===void 0?void 0:it[(lt=pt?.value)!==null&&lt!==void 0?lt:"center"]}}},Erase:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=J0.a,this.options=[],this.defaultDir="right",this.optionsMap={[this.defaultDir]:0,d:1,r:2,u:3}}applyOptions(vt){var it,lt;super.applyOptions(vt);const pt=this.options.find(_t=>_t.name==="dir");this.material.uniforms.option={value:(it=this.optionsMap)===null||it===void 0?void 0:it[(lt=pt?.value)!==null&&lt!==void 0?lt:this.defaultDir]}}},Dissolve:class extends Lv{constructor(){super(...arguments),this.duration=1200,this.fragmentShader=al.a,this.options=[],this.dissolveIndices={}}random40(){return Math.ceil(40*Math.random())}setSize(vt,it){super.setSize(vt,it);for(let lt=0;lt<1600;lt++){let pt=this.random40(),_t=this.random40();for(;this.dissolveIndices[`${pt}_${_t}`]!==void 0;)pt=this.random40(),_t=this.random40();this.dissolveIndices[`${pt}_${_t}`]=0}this.material.uniforms.dissolveTexture={value:this.genDissolveToTexture()}}genDissolveToTexture(){var vt=new Uint8Array(4800);for(let it=0;it<1600;it++){const lt=it%40+1,pt=Math.floor(it/40)+1,_t=3*it;this.dissolveIndices[`${lt}_${pt}`]===0?(vt[_t]=0,vt[_t+1]=0,vt[_t+2]=0):(vt[_t]=255,vt[_t+1]=255,vt[_t+2]=255)}return new an(vt,40,40,1022)}updateAnimation(vt){const it=1600*vt-Object.keys(this.dissolveIndices).filter(lt=>this.dissolveIndices[lt]===1).length;for(let lt=0;lt<it;lt++){const pt=Object.keys(this.dissolveIndices).filter(Dt=>this.dissolveIndices[Dt]===0),_t=Math.ceil(Math.random()*pt.length)-1;this.dissolveIndices[pt[_t]]=1}this.material.uniforms.dissolveTexture.value=this.genDissolveToTexture()}},Smooth:class extends Lv{constructor(){super(...arguments),this.duration=2e3,this.fragmentShader=Qx.a,this.options=[]}},FadeInOut:class extends Lv{constructor(){super(...arguments),this.duration=700,this.fragmentShader=ub.a,this.options=[]}applyOptions(vt){super.applyOptions(vt);const it=this.options.find(lt=>lt.name==="thruBlk");this.material.uniforms.option={value:it?.value==="1"?1:0}}},Push:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=z_.a,this.options=[],this.optionsMap={u:0,r:1,d:2,l:3}}applyOptions(vt){var it,lt;super.applyOptions(vt);const pt=this.options.find(_t=>_t.name==="dir");this.material.uniforms.option={value:(it=this.optionsMap)===null||it===void 0?void 0:it[(lt=pt?.value)!==null&&lt!==void 0?lt:"l"]}}},Separation:class extends Lv{constructor(){super(...arguments),this.duration=1500,this.fragmentShader=R0.a,this.options=[]}applyOptions(vt){super.applyOptions(vt);const it=this.options.find(pt=>pt.name==="orient"),lt=this.options.find(pt=>pt.name==="dir");this.material.uniforms.orient={value:it?.value==="vert"},this.material.uniforms.direction={value:lt?.value==="in"}}},Display:class extends Lv{constructor(){super(...arguments),this.duration=3400,this.fragmentShader=g1.a,this.options=[]}applyOptions(vt){const it=this.options.find(pt=>pt.name==="dir"),lt=this.options.find(pt=>pt.name==="thruBlk");this.material.uniforms.direction={value:it?.value==="r"},this.material.uniforms.thruBlk={value:lt?.value==="1"}}},Uncover:class extends Lv{constructor(){super(...arguments),this.duration=750,this.fragmentShader=G1.a,this.options=[],this.defaultDir="right",this.optionsMap={[this.defaultDir]:0,d:1,r:2,u:3,ld:4,lu:5,rd:6,ru:7},this.selfOptionsList=[{x:-1,y:0},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:-1,y:-1},{x:-1,y:1},{x:1,y:-1},{x:1,y:1}]}applyOptions(vt){var it;super.applyOptions(vt);const lt=this.options.find(Dt=>Dt.name==="dir"),pt=this.optionsMap[(it=lt?.value)!==null&&it!==void 0?it:this.defaultDir],_t=this.selfOptionsList[pt];this.material.uniforms.optionX={value:_t.x},this.material.uniforms.optionY={value:_t.y}}},Cover:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=dT.a,this.options=[],this.defaultDir="right",this.optionsMap={[this.defaultDir]:0,d:1,r:2,u:3,ld:4,lu:5,rd:6,ru:7},this.selfOptionsList=[{x:-1,y:0},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:-1,y:-1},{x:-1,y:1},{x:1,y:-1},{x:1,y:1}]}applyOptions(vt){var it;super.applyOptions(vt);const lt=this.options.find(Dt=>Dt.name==="dir"),pt=this.optionsMap[(it=lt?.value)!==null&&it!==void 0?it:this.defaultDir],_t=this.selfOptionsList[pt];this.material.uniforms.optionX={value:_t.x},this.material.uniforms.optionY={value:_t.y}}},Flash:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=ny.a,this.options=[]}},Checkerboard:class extends hm{constructor(){super(...arguments),this.duration=2500,this.options=[{name:"dir",value:"horz"}],this.fragmentShader=fE.a,this.vertexShader=Kx.a,this.vIndex="",this.delay=0,this.verticalSegments=5}extraAttributes(){return{times:{threeType:Mo,jsType:Float32Array,itemSize:1,generator:(vt,it)=>(this.vIndex!==`${vt}${it}`&&(this.delay=.3*Math.random(),this.vIndex=`${vt}${it}`),[this.delay])},segment:{threeType:Mo,jsType:Float32Array,itemSize:2,generator:(vt,it)=>[it,vt]},option:{threeType:co,jsType:Int32Array,itemSize:1,generator:()=>[this.options.find(vt=>vt.name==="dir"&&vt.value==="horz")?0:1]}}}},Vortex:class{constructor(){this.duration=4e3,this.geometry=new Wu,this.material=new mu({fragmentShader:mE.a,vertexShader:pE.a,side:2}),this.camera=new ym,this.mesh=new os}initData(vt,it){const lt=[],pt=[],_t=[],Dt=[],Lt=[],$t=[],Xt=Math.ceil(124*vt/it),Yt=vt/2,Zt=it/2,lr=vt/Xt,xr=it/124;for(let wr=0;wr<124;wr++){const Ir=wr*xr-Zt;for(let kr=0;kr<Xt;kr++){const Lr=kr*lr-Yt,Xr=Math.ceil((kr+1)/((Xt+1)/12)),_n=.4/Xr,On=(Xr-1)*_n+Math.random()*_n;pt.push(Lr,-Ir,0),Dt.push(1*kr/Xt,1-1*wr/124),_t.push(0,0,1),Lt.push(kr,wr),$t.push(On),pt.push(Lr+lr,-Ir,0),Dt.push(1*(kr+1)/Xt,1-1*wr/124),_t.push(0,0,1),Lt.push(kr,wr),$t.push(On),pt.push(Lr,-Ir-xr,0),Dt.push(1*kr/Xt,1-1*(wr+1)/124),_t.push(0,0,1),Lt.push(kr,wr),$t.push(On),pt.push(Lr+lr,-Ir-xr,0),Dt.push(1*(kr+1)/Xt,1-1*(wr+1)/124),_t.push(0,0,1),Lt.push(kr,wr),$t.push(On)}}for(let wr=0;wr<124*Xt;wr++){const Ir=4*wr,kr=Ir+1,Lr=Ir+2,Xr=Ir+3;lt.push(kr,Ir,Xr),lt.push(Ir,Lr,Xr)}return this.geometry.setIndex(lt),this.geometry.setAttribute("position",new Mo(pt,3)),this.geometry.setAttribute("normal",new Mo(_t,3)),this.geometry.setAttribute("uv",new Mo(new Float32Array(Dt),2)),this.geometry.setAttribute("segment",new Mo(new Float32Array(Lt),2)),this.geometry.setAttribute("times",new Mo(new Float32Array($t),1)),{verticalSegments:124,horizontalSegments:Xt,segmentWidth:lr,segmentHeight:xr}}setSize(vt,it){const{verticalSegments:lt,horizontalSegments:pt,segmentWidth:_t,segmentHeight:Dt}=this.initData(vt,it);this.material.uniforms={duration:{value:this.duration},segmentWidth:{value:_t},segmentHeight:{value:Dt},verticalSegments:{value:lt},horizontalSegments:{value:pt},timePercent:{value:0},texturePrev:{value:$p},textureNext:{value:$p}},this.camera.updateAspect(vt,it),this.camera.focus(this.mesh,it),this.mesh.geometry=this.geometry,new s1({side:2,vertexColors:!0}).wireframe=!0,this.material.transparent=!0,this.mesh.material=this.material}setPrevTexture(vt){this.material.uniforms.texturePrev.value=vt}setNextTexture(vt){this.material.uniforms.textureNext.value=vt}addObjects(vt){vt.add(this.mesh)}updateAnimation(vt){this.material.uniforms.timePercent.value=vt}dispose(){var vt,it;(vt=this.geometry)===null||vt===void 0||vt.dispose(),(it=this.material)===null||it===void 0||it.dispose()}},WindowShades:class{constructor(){this.duration=1600,this.geometry=new Wu,this.material=new mu({fragmentShader:fT.a,vertexShader:y1.a,side:2}),this.horizontalSegments=16,this.meshToCameraDistance=0,this.camera=new ym,this.mesh=new os}initData(vt,it){const lt=[],pt=[],_t=[],Dt=[],Lt=[],$t=[],Xt=vt/2,Yt=it/2,Zt=vt/this.horizontalSegments;for(let lr=0;lr<this.horizontalSegments;lr++){const xr=Math.abs(lr-Math.ceil(this.horizontalSegments/2))*(.3/Math.ceil(this.horizontalSegments/2)),wr=lr*Zt-Xt;pt.push(wr,Yt,0),_t.push(0),Dt.push(lr/this.horizontalSegments,1),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,Yt,0),_t.push(0),Dt.push((lr+1)/this.horizontalSegments,1),Lt.push(lr),$t.push(xr),pt.push(wr,-1*Yt,0),_t.push(0),Dt.push(lr/this.horizontalSegments,0),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,-1*Yt,0),Dt.push((lr+1)/this.horizontalSegments,0),_t.push(0),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,Yt,0),_t.push(1),Dt.push(lr/this.horizontalSegments,1),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,Yt,-1*Zt),_t.push(1),Dt.push((lr+1)/this.horizontalSegments,1),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,-1*Yt,0),_t.push(1),Dt.push(lr/this.horizontalSegments,0),Lt.push(lr),$t.push(xr),pt.push(wr+Zt,-1*Yt,-1*Zt),Dt.push((lr+1)/this.horizontalSegments,0),_t.push(1),Lt.push(lr),$t.push(xr)}for(let lr=0;lr<this.horizontalSegments;lr++){const xr=8*lr,wr=xr+1,Ir=xr+2,kr=xr+3,Lr=xr+4,Xr=xr+5,_n=xr+6,On=xr+7;lt.push(wr,xr,kr),lt.push(xr,Ir,kr),lt.push(Xr,Lr,On),lt.push(Lr,_n,On)}this.geometry.setIndex(lt),this.geometry.setAttribute("position",new Mo(pt,3)),this.geometry.setAttribute("uv",new Mo(new Float32Array(Dt),2)),this.geometry.setAttribute("index",new Mo(new Float32Array(Lt),1)),this.geometry.setAttribute("type",new Mo(new Float32Array(_t),1)),this.geometry.setAttribute("delay",new Mo(new Float32Array($t),1))}setPrevTexture(vt){this.material.uniforms.texturePrev.value=vt}setNextTexture(vt){this.material.uniforms.textureNext.value=vt}setSize(vt,it){this.initData(vt,it),this.material.uniforms={segments:{value:this.horizontalSegments},segmentWidth:{value:vt/this.horizontalSegments},timePercent:{value:0},texturePrev:{value:$p},textureNext:{value:$p}},this.meshToCameraDistance=.5*it/Math.tan(Math.PI/6),this.camera.updateAspect(vt,it),this.camera.focus(this.mesh,it),this.mesh.geometry=this.geometry,this.material.transparent=!0,this.mesh.material=this.material}addObjects(vt){vt.add(this.mesh)}updateAnimation(vt){this.material.uniforms.timePercent.value=vt}dispose(){var vt,it;(vt=this.geometry)===null||vt===void 0||vt.dispose(),(it=this.material)===null||it===void 0||it.dispose()}},Curtain:class extends hm{constructor(){super(...arguments),this.duration=6e3,this.options=[],this.fragmentShader=mT.a,this.vertexShader=vE.a,this.verticalSegments=100}extraAttributes(){return{isLeft:{threeType:Mo,jsType:Float32Array,itemSize:1,generator:(vt,it)=>[it<this.horizontalSegments()/2?1:0]}}}addObjects(vt){super.addObjects(vt),this.mesh.position.z+=20,vt.background=this.nextTexture}},Fall:class extends hm{constructor(){super(...arguments),this.zCurveLimit=100,this.duration=2e3,this.options=[{name:"invX",value:"0"}],this.verticalSegments=100,this.fragmentShader=yE.a,this.vertexShader=jS.a}extraAttributes(){return{}}setSize(vt,it){var lt;super.setSize(vt,it);const pt=this.options.find(_t=>_t.name==="invX");this.material.uniforms.zCurveLimit={value:this.zCurveLimit},this.material.uniforms.aCoefficient={value:this.zCurveLimit/(this.textureHeight/2*(this.textureHeight/2))},this.material.uniforms.option={value:(lt=pt?.value)!==null&&lt!==void 0?lt:0}}addObjects(vt){vt.add(this.mesh),vt.background=this.nextTexture}updateAnimation(vt){this.material.uniforms.timePercent.value=vt}},Suspension:class extends _1{constructor(){super(...arguments),this.duration=2e3,this.fragmentShader=gT.a,this.vertexShader=_E.a}addObjects(vt){vt.add(this.mesh),vt.background=this.prevTexture}},Clock:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=xE.a,this.options=[]}},Combing:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=b_.a,this.options=[]}applyOptions(vt){super.applyOptions(vt);const it=this.options.find(lt=>lt.name==="dir");this.material.uniforms.option={value:it?.value==="vert"?1:0}}},Scale:class extends Lv{constructor(){super(...arguments),this.duration=900,this.fragmentShader=OA.a,this.options=[]}applyOptions(vt){super.applyOptions(vt);const it=this.options.find(lt=>lt.name==="dir");this.material.uniforms.option={value:it?.value==="in"?0:1}}},PeelOff:_1,Flip:class extends hm{constructor(){super(...arguments),this.duration=1250,this.options=[],this.fragmentShader=Sw.a,this.vertexShader=xw.a,this.verticalSegments=1}extraAttributes(){return{}}applyOptions(vt){const it=this.options.find(lt=>lt.name==="dir");this.material.uniforms.option={value:it?.value==="l"?1:0}}},Strips:class extends Lv{constructor(){super(...arguments),this.duration=1e3,this.fragmentShader=qA.a,this.options=[],this.defaultDir="lu",this.optionsMap={[this.defaultDir]:0,ld:1,rd:2,ru:3}}applyOptions(vt){var it,lt;super.applyOptions(vt);const pt=this.options.find(_t=>_t.name==="dir");this.material.uniforms.option={value:(it=this.optionsMap)===null||it===void 0?void 0:it[(lt=pt?.value)!==null&&lt!==void 0?lt:this.defaultDir]}}},Gallery:class{constructor(){this.camera=new ym,this.duration=1600,this.options=[],this.gap=10,this.group=new Vv,this.prevMesh=new os,this.nextMesh=new os,this.width=100,this.height=100,this.prevMaterial=new mu({vertexShader:W1.a,fragmentShader:Tw.a,side:2,uniforms:{galleryTexture:{value:$p},galleryHeight:{value:1}}}),this.nextMaterial=new mu({vertexShader:W1.a,fragmentShader:Tw.a,side:2,uniforms:{galleryTexture:{value:$p},galleryHeight:{value:1}}})}get isRight(){const vt=this.options.find(it=>it.name==="dir");return!vt||vt.value==="r"}addObjects(vt){this.group.add(this.prevMesh),this.group.add(this.nextMesh),vt.add(this.group)}dispose(){this.prevMaterial.dispose(),this.nextMaterial.dispose(),this.prevMesh.geometry.dispose(),this.nextMesh.geometry.dispose()}setNextTexture(vt){this.nextMaterial.uniforms.galleryTexture.value=vt,this.nextMesh.material=this.nextMaterial}setPrevTexture(vt){this.prevMaterial.uniforms.galleryTexture.value=vt,this.prevMesh.material=this.prevMaterial}setSize(vt,it){this.camera.updateAspect(vt,it),this.camera.focus(this.prevMesh,it),this.width=vt,this.height=it,this.gap=this.width/20,this.prevMaterial.uniforms.galleryHeight.value=it,this.nextMaterial.uniforms.galleryHeight.value=it;const lt=new Vm(vt,1.2*it+8,1,1);this.prevMesh.geometry=lt;const pt=new Vm(vt,1.2*it+8,1,1);this.nextMesh.geometry=pt,this.nextMesh.position.z=this.prevMesh.position.z,this.isRight?this.nextMesh.position.x=vt+this.gap:this.nextMesh.position.x=-1*(vt+this.gap)}updateAnimation(vt){if(vt<.3){const it=vt/.3;this.isRight?(this.group.position.z=.25*this.height*-1*it,this.group.rotation.y=Math.PI/12*-1*it):(this.group.position.z=.25*this.height*-1*it,this.group.rotation.y=Math.PI/12*it)}else if(vt>=.3&&vt<.7){const it=(vt-.3)/.4;this.isRight?(this.group.position.z=-1*(.25*this.height+.55*this.height*it),this.group.position.x=-1*(this.width+this.gap)*it):(this.group.position.z=-1*(.25*this.height+.55*this.height*it),this.group.position.x=(this.width+this.gap)*it)}else{const it=(vt-.7)/.3;this.isRight?(this.group.position.x=-1*(this.width+this.gap),this.group.position.z=.8*this.height*-1*(1-it),this.group.rotation.y=Math.PI/12*-1*(1-it)):(this.group.position.x=this.width+this.gap,this.group.position.z=.8*this.height*-1*(1-it),this.group.rotation.y=Math.PI/12*(1-it))}}},Switch:class{constructor(){this.camera=new ym,this.duration=6e3,this.options=[],this.prevMesh=new os,this.nextMesh=new os,this.width=100,this.height=100,this.depth=1,this.prevDepth=1}addObjects(vt){vt.add(this.prevMesh),vt.add(this.nextMesh)}dispose(){Array.isArray(this.prevMesh.material)?this.prevMesh.material.forEach(vt=>vt.dispose()):this.prevMesh.material.dispose(),this.prevMesh.geometry.dispose(),Array.isArray(this.nextMesh.material)?this.nextMesh.material.forEach(vt=>vt.dispose()):this.nextMesh.material.dispose(),this.nextMesh.geometry.dispose()}setNextTexture(vt){const it=new ss({map:vt});this.nextMesh.material=it}setPrevTexture(vt){const it=new ss({map:vt});this.prevMesh.material=it}setSize(vt,it){this.camera.updateAspect(vt,it),this.camera.focus(this.prevMesh,it),this.width=vt,this.height=it,this.depth=it/2;const lt=new Vm(vt,it,1,1);this.prevMesh.geometry=lt;const pt=new Vm(vt,it,1,1);this.nextMesh.geometry=pt,this.prevDepth=this.prevMesh.position.z}updateAnimation(vt){const it=this.options.find(lt=>lt.name==="dir");if(vt<.5){const lt=vt/.5;this.prevMesh.position.x=this.width/2*lt,this.prevMesh.rotation.y=-Math.PI/10*lt,this.nextMesh.position.x=-this.width/2*lt,this.nextMesh.rotation.y=Math.PI/10*lt,this.nextMesh.position.z=this.prevDepth-this.depth*(1-lt)}else{const lt=(vt-.5)/.5;this.prevMesh.position.x=this.width/2*(1-lt),this.prevMesh.rotation.y=-Math.PI/10*(1-lt),this.prevMesh.position.z=this.prevDepth-this.depth*lt,this.nextMesh.position.x=-this.width/2*(1-lt),this.nextMesh.rotation.y=Math.PI/10*(1-lt)}if(it&&it.value==="l")if(vt<.5){const lt=vt/.5;this.prevMesh.position.x=-this.width/2*lt,this.prevMesh.rotation.y=Math.PI/10*lt,this.nextMesh.position.x=this.width/2*lt,this.nextMesh.rotation.y=-Math.PI/10*lt}else{const lt=(vt-.5)/.5;this.prevMesh.position.x=-this.width/2*(1-lt),this.prevMesh.rotation.y=Math.PI/10*(1-lt),this.nextMesh.position.x=this.width/2*(1-lt),this.nextMesh.rotation.y=-Math.PI/10*(1-lt)}}},Prism:class{constructor(){this.camera=new ym,this.duration=6e3,this.preset=null,this.presetZ=0,this.mesh=new os,this.width=100,this.height=100}addObjects(vt){this.mesh.geometry=this.box,vt.add(this.mesh)}dispose(){Array.isArray(this.mesh.material)?this.mesh.material.forEach(vt=>vt.dispose()):this.mesh.material.dispose(),this.mesh.geometry.dispose()}setNextTexture(vt){const it=Array.isArray(this.mesh.material)?this.mesh.material:[];it.push(new ss({map:vt})),it.push(new ss({map:vt})),it.push(new ss({map:vt})),this.mesh.material=it}setPrevTexture(vt){const it=Array.isArray(this.mesh.material)?this.mesh.material:[];it.push(new ss({map:vt})),it.push(new ss({map:vt})),it.push(new ss({map:vt})),this.mesh.material=it}setSize(vt,it){this.camera.updateAspect(vt,it),this.camera.focus(this.mesh,it),this.mesh.position.z-=vt/2,this.width=vt,this.height=it,this.box=new eo(vt,it,vt,1,1,1),this.mesh.geometry=this.box}updateAnimation(vt){this.preset===null&&(this.preset=vt>0?0:Math.PI/2,this.presetZ=this.mesh.position.z);const it=Math.PI/2*vt,lt=(Math.sqrt(2)-1)*(this.width/2);this.mesh.rotation.y=this.preset+it,this.mesh.position.z=vt<=.5?this.presetZ-vt/.5*lt:this.presetZ-(1-(vt-.5)/.5)*lt}},Doors:class{constructor(){this.camera=new ym,this.duration=1600,this.options=[],this.width=100,this.preMaterial=new mu({fragmentShader:yT.a,vertexShader:Aw.a,uniforms:{prevTexture:{value:$p},timePercent:{value:0},offset:{value:0}}}),this.prevGeometry=new Wu,this.prevMesh=new os,this.nextMesh=new os}addObjects(vt){this.prevMesh.material=this.preMaterial,this.prevMesh.geometry=this.prevGeometry,this.prevMesh.material.transparent=!0,vt.add(this.prevMesh),vt.add(this.nextMesh)}setNextTexture(vt){this.nextMesh.material=new ss({map:vt})}setPrevTexture(vt){this.preMaterial.uniforms.prevTexture.value=vt}setSize(vt,it){this.width=vt,this.camera.updateAspect(vt,it),this.camera.focus(this.prevMesh,it);const lt=vt/2,pt=it/2;this.preMaterial.uniforms.offset.value=vt/2,this.prevGeometry.setIndex([0,1,2,3,4,5,6,7,8,9,10,11]);const _t=this.options.find(Lt=>Lt.name==="dir"),Dt=_t&&_t.value==="vert"?0:1;this.preMaterial.uniforms.option={value:Dt},Dt===1?(this.prevGeometry.setAttribute("position",new Mo([-lt,pt,0,-lt,0,0,lt,pt,0,-lt,0,0,lt,0,0,lt,pt,0,-lt,0,0,-lt,-pt,0,lt,0,0,-lt,-pt,0,lt,-pt,0,lt,0,0],3)),this.prevGeometry.setAttribute("uv",new Mo([0,1,0,.5,1,1,0,.5,1,.5,1,1,0,.5,0,0,1,.5,0,0,1,0,1,.5],2))):(this.prevGeometry.setAttribute("position",new Mo([-lt,pt,0,-lt,-pt,0,0,pt,0,-lt,-pt,0,0,-pt,0,0,pt,0,0,pt,0,0,-pt,0,lt,pt,0,0,-pt,0,lt,-pt,0,lt,pt,0],3)),this.prevGeometry.setAttribute("uv",new Mo([0,1,0,0,.5,1,0,0,.5,0,.5,1,.5,1,.5,0,1,1,.5,0,1,0,1,1],2))),this.prevGeometry.setAttribute("left",new Mo([1,1,1,1,1,1,0,0,0,0,0,0],1)),this.nextMesh.geometry=new Vm(vt,it,1,1),this.nextMesh.position.z=this.prevMesh.position.z-vt/4}updateAnimation(vt){this.preMaterial.uniforms.timePercent.value=vt,this.nextMesh.position.z=this.prevMesh.position.z-(1-vt)*(this.width/4)}dispose(){}}};class iy{constructor(){this.startTime=0,this.lastTime=0,this.lastFPSTime=0,this.renderingDuration=16,this.reverse=!1,this.scene=new fy,this.delay=0,this.easeFn=U_.linear,this.preset=null,this.onTransactionEnd=()=>{},this.isTransactionStartApplied=!1,this.prevTexture=null,this.nextTexture=null,this.animationId=null,this.config=null,this.renderer=new Ql({alpha:!0,premultipliedAlpha:!0}),this.isPlaying=!1,this.animate=(it=-1)=>{var lt,pt,_t;if(!this.fps(it))return void(this.animationId=window.requestAnimationFrame(this.animate));this.renderer.clear(),it>this.delay&&this.lastTime===0&&(this.lastTime=it,this.startTime=it);let Dt=0;this.lastTime>0&&Dt<1&&(Dt=this.easeFn(it-this.startTime,0,1,(pt=(lt=this.preset)===null||lt===void 0?void 0:lt.duration)!==null&&pt!==void 0?pt:0)),Dt>1&&(Dt=1),(_t=this.preset)===null||_t===void 0||_t.updateAnimation(this.reverse?1-Dt:Dt),this.rerender(),this.isTransactionStartApplied||(this.isTransactionStartApplied=!0),Dt<1?this.animationId=window.requestAnimationFrame(this.animate):this.onTransactionEnd()}}initPlayer(it){this.config=it,this.reverse=it.reverse,it.delay&&Number.isInteger(it.delay)&&(this.delay=it.delay),it.easeFn&&(this.easeFn=U_[it.easeFn]),it.maxFPS&&Number.isInteger(it.maxFPS)&&it.maxFPS>0&&(this.renderingDuration=Math.ceil(1e3/it.maxFPS)),this.startTime=0,this.lastTime=0,this.scene.clear(),this.renderer.shadowMap.enabled=!0,this.renderer.autoClear=!1,this.renderer.setClearColor(it.clearColor||0),this.isTransactionStartApplied=!1,this.renderer.setSize(it.stageWidth,it.stageHeight),this.preset=new bT[it.presetType],it.options&&(this.preset.options=it.options),it.duration&&Number.isInteger(it.duration)&&(this.preset.duration=it.duration),this.preset.setSize(it.stageWidth,it.stageHeight)}setPrevTexture(it){var lt,pt,_t,Dt;it.needsUpdate=!0,this.reverse?(this.nextTexture=it,(lt=this.preset)===null||lt===void 0||lt.setNextTexture(it)):(this.prevTexture=it,(pt=this.preset)===null||pt===void 0||pt.setPrevTexture(it)),(_t=this.preset)===null||_t===void 0||_t.addObjects(this.scene),(Dt=this.preset)===null||Dt===void 0||Dt.updateAnimation(this.reverse?1:0),this.rerender()}setNextTexture(it){var lt,pt;it.needsUpdate=!0,this.reverse?(this.prevTexture=it,(lt=this.preset)===null||lt===void 0||lt.setPrevTexture(it)):(this.nextTexture=it,(pt=this.preset)===null||pt===void 0||pt.setNextTexture(it))}play(){return new Promise(it=>{this.onTransactionEnd=it,this.animate(),this.isPlaying=!0})}rerender(){var it;this.renderer.clear(),!((it=this.preset)===null||it===void 0)&&it.camera.camera&&this.renderer.render(this.scene,this.preset.camera.camera)}fps(it){return it<=0?!0:this.lastFPSTime<0?(this.lastFPSTime=it,!0):it-this.lastFPSTime>=this.renderingDuration&&(this.lastFPSTime=it,!0)}skip(){var it;(it=this.preset)===null||it===void 0||it.updateAnimation(this.reverse?0:1),this.rerender(),this.dispose(),this.onTransactionEnd()}dispose(){var it,lt,pt;window.cancelAnimationFrame(this.animationId),this.renderer.clear(),this.isPlaying=!1,(it=this.preset)===null||it===void 0||it.dispose(),(lt=this.prevTexture)===null||lt===void 0||lt.dispose(),(pt=this.nextTexture)===null||pt===void 0||pt.dispose();for(let _t=this.scene.children.length-1;_t>=0;_t--){const Dt=this.scene.children[_t];this.scene.remove(Dt)}this.scene.background=null}destroy(){this.dispose(),this.renderer.forceContextLoss(),this.renderer.dispose()}}tt(139);var cl=tt(3),Ol=tt(5);Ol.c.mixin({accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1});var Cw=(function(){function vt(it){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,(cl.isMobile.tablet||cl.isMobile.phone)&&this.createTouchHook();var lt=document.createElement("div");lt.style.width="100px",lt.style.height="100px",lt.style.position="absolute",lt.style.top="0px",lt.style.left="0px",lt.style.zIndex="2",this.div=lt,this.renderer=it,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(vt.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),vt.prototype.createTouchHook=function(){var it=this,lt=document.createElement("button");lt.style.width="1px",lt.style.height="1px",lt.style.position="absolute",lt.style.top="-1000px",lt.style.left="-1000px",lt.style.zIndex="2",lt.style.backgroundColor="#FF0000",lt.title="select to enable accessibility for this content",lt.addEventListener("focus",function(){it._isMobileAccessibility=!0,it.activate(),it.destroyTouchHook()}),document.body.appendChild(lt),this._hookDiv=lt},vt.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},vt.prototype.activate=function(){var it;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),(it=this.renderer.view.parentNode)===null||it===void 0||it.appendChild(this.div))},vt.prototype.deactivate=function(){var it;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),(it=this.div.parentNode)===null||it===void 0||it.removeChild(this.div))},vt.prototype.updateAccessibleObjects=function(it){if(it.visible&&it.accessibleChildren){it.accessible&&it.interactive&&(it._accessibleActive||this.addChild(it),it.renderId=this.renderId);var lt=it.children;if(lt)for(var pt=0;pt<lt.length;pt++)this.updateAccessibleObjects(lt[pt])}},vt.prototype.update=function(){var it=performance.now();if(!(cl.isMobile.android.device&&it<this.androidUpdateCount)&&(this.androidUpdateCount=it+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var lt=this.renderer.view.getBoundingClientRect(),pt=lt.left,_t=lt.top,Dt=lt.width,Lt=lt.height,$t=this.renderer,Xt=$t.width,Yt=$t.height,Zt=$t.resolution,lr=Dt/Xt*Zt,xr=Lt/Yt*Zt,wr=this.div;wr.style.left=pt+"px",wr.style.top=_t+"px",wr.style.width=Xt+"px",wr.style.height=Yt+"px";for(var Ir=0;Ir<this.children.length;Ir++){var kr=this.children[Ir];if(kr.renderId!==this.renderId)kr._accessibleActive=!1,Object(cl.removeItems)(this.children,Ir,1),this.div.removeChild(kr._accessibleDiv),this.pool.push(kr._accessibleDiv),kr._accessibleDiv=null,Ir--;else{wr=kr._accessibleDiv;var Lr=kr.hitArea,Xr=kr.worldTransform;kr.hitArea?(wr.style.left=(Xr.tx+Lr.x*Xr.a)*lr+"px",wr.style.top=(Xr.ty+Lr.y*Xr.d)*xr+"px",wr.style.width=Lr.width*Xr.a*lr+"px",wr.style.height=Lr.height*Xr.d*xr+"px"):(Lr=kr.getBounds(),this.capHitArea(Lr),wr.style.left=Lr.x*lr+"px",wr.style.top=Lr.y*xr+"px",wr.style.width=Lr.width*lr+"px",wr.style.height=Lr.height*xr+"px",wr.title!==kr.accessibleTitle&&kr.accessibleTitle!==null&&(wr.title=kr.accessibleTitle),wr.getAttribute("aria-label")!==kr.accessibleHint&&kr.accessibleHint!==null&&wr.setAttribute("aria-label",kr.accessibleHint)),kr.accessibleTitle===wr.title&&kr.tabIndex===wr.tabIndex||(wr.title=kr.accessibleTitle,wr.tabIndex=kr.tabIndex,this.debug&&this.updateDebugHTML(wr))}}this.renderId++}},vt.prototype.updateDebugHTML=function(it){it.innerHTML="type: "+it.type+"</br> title : "+it.title+"</br> tabIndex: "+it.tabIndex},vt.prototype.capHitArea=function(it){it.x<0&&(it.width+=it.x,it.x=0),it.y<0&&(it.height+=it.y,it.y=0);var lt=this.renderer,pt=lt.width,_t=lt.height;it.x+it.width>pt&&(it.width=pt-it.x),it.y+it.height>_t&&(it.height=_t-it.y)},vt.prototype.addChild=function(it){var lt=this.pool.pop();lt||((lt=document.createElement("button")).style.width="100px",lt.style.height="100px",lt.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",lt.style.position="absolute",lt.style.zIndex="2",lt.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?lt.setAttribute("aria-live","off"):lt.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?lt.setAttribute("aria-relevant","additions"):lt.setAttribute("aria-relevant","text"),lt.addEventListener("click",this._onClick.bind(this)),lt.addEventListener("focus",this._onFocus.bind(this)),lt.addEventListener("focusout",this._onFocusOut.bind(this))),lt.style.pointerEvents=it.accessiblePointerEvents,lt.type=it.accessibleType,it.accessibleTitle&&it.accessibleTitle!==null?lt.title=it.accessibleTitle:it.accessibleHint&&it.accessibleHint!==null||(lt.title="displayObject "+it.tabIndex),it.accessibleHint&&it.accessibleHint!==null&&lt.setAttribute("aria-label",it.accessibleHint),this.debug&&this.updateDebugHTML(lt),it._accessibleActive=!0,it._accessibleDiv=lt,lt.displayObject=it,this.children.push(it),this.div.appendChild(it._accessibleDiv),it._accessibleDiv.tabIndex=it.tabIndex},vt.prototype._onClick=function(it){var lt=this.renderer.plugins.interaction,pt=it.target.displayObject,_t=lt.eventData;lt.dispatchEvent(pt,"click",_t),lt.dispatchEvent(pt,"pointertap",_t),lt.dispatchEvent(pt,"tap",_t)},vt.prototype._onFocus=function(it){it.target.getAttribute("aria-live")||it.target.setAttribute("aria-live","assertive");var lt=this.renderer.plugins.interaction,pt=it.target.displayObject,_t=lt.eventData;lt.dispatchEvent(pt,"mouseover",_t)},vt.prototype._onFocusOut=function(it){it.target.getAttribute("aria-live")||it.target.setAttribute("aria-live","polite");var lt=this.renderer.plugins.interaction,pt=it.target.displayObject,_t=lt.eventData;lt.dispatchEvent(pt,"mouseout",_t)},vt.prototype._onKeyDown=function(it){it.keyCode===9&&this.activate()},vt.prototype._onMouseMove=function(it){it.movementX===0&&it.movementY===0||this.deactivate()},vt.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},vt})(),Ho=tt(1),Fy=tt(7),Gt=(function(){function vt(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new Ho.g,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(vt.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),vt.prototype.getLocalPosition=function(it,lt,pt){return it.worldTransform.applyInverse(pt||this.global,lt)},vt.prototype.copyEvent=function(it){"isPrimary"in it&&it.isPrimary&&(this.isPrimary=!0),this.button="button"in it&&it.button;var lt="buttons"in it&&it.buttons;this.buttons=Number.isInteger(lt)?lt:"which"in it&&it.which,this.width="width"in it&&it.width,this.height="height"in it&&it.height,this.tiltX="tiltX"in it&&it.tiltX,this.tiltY="tiltY"in it&&it.tiltY,this.pointerType="pointerType"in it&&it.pointerType,this.pressure="pressure"in it&&it.pressure,this.rotationAngle="rotationAngle"in it&&it.rotationAngle,this.twist="twist"in it&&it.twist||0,this.tangentialPressure="tangentialPressure"in it&&it.tangentialPressure||0},vt.prototype.reset=function(){this.isPrimary=!1},vt})(),er=function(vt,it){return(er=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},hr=(function(){function vt(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return vt.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},vt.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},vt})(),Fr=(function(){function vt(it){this._pointerId=it,this._flags=vt.FLAGS.NONE}return vt.prototype._doSet=function(it,lt){this._flags=lt?this._flags|it:this._flags&~it},Object.defineProperty(vt.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"flags",{get:function(){return this._flags},set:function(it){this._flags=it},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"none",{get:function(){return this._flags===vt.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"over",{get:function(){return(this._flags&vt.FLAGS.OVER)!=0},set:function(it){this._doSet(vt.FLAGS.OVER,it)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"rightDown",{get:function(){return(this._flags&vt.FLAGS.RIGHT_DOWN)!=0},set:function(it){this._doSet(vt.FLAGS.RIGHT_DOWN,it)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"leftDown",{get:function(){return(this._flags&vt.FLAGS.LEFT_DOWN)!=0},set:function(it){this._doSet(vt.FLAGS.LEFT_DOWN,it)},enumerable:!1,configurable:!0}),vt.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),vt})(),nn=(function(){function vt(){this._tempPoint=new Ho.g}return vt.prototype.recursiveFindHit=function(it,lt,pt,_t,Dt){if(!lt||!lt.visible)return!1;var Lt=it.data.global,$t=!1,Xt=Dt=lt.interactive||Dt,Yt=!0;if(lt.hitArea?(_t&&(lt.worldTransform.applyInverse(Lt,this._tempPoint),lt.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?$t=!0:(_t=!1,Yt=!1)),Xt=!1):lt._mask&&_t&&(lt._mask.containsPoint&&lt._mask.containsPoint(Lt)||(_t=!1)),Yt&&lt.interactiveChildren&&lt.children)for(var Zt=lt.children,lr=Zt.length-1;lr>=0;lr--){var xr=Zt[lr],wr=this.recursiveFindHit(it,xr,pt,_t,Xt);if(wr){if(!xr.parent)continue;Xt=!1,wr&&(it.target&&(_t=!1),$t=!0)}}return Dt&&(_t&&!it.target&&!lt.hitArea&&lt.containsPoint&&lt.containsPoint(Lt)&&($t=!0),lt.interactive&&($t&&!it.target&&(it.target=lt),pt&&pt(it,lt,!!$t))),$t},vt.prototype.findHit=function(it,lt,pt,_t){this.recursiveFindHit(it,lt,pt,_t,!1)},vt})(),zn={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return this.cursor==="pointer"},set buttonMode(vt){vt?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};Ol.c.mixin(zn);var _i={target:null,data:{global:null}},As=(function(vt){function it(lt,pt){var _t=vt.call(this)||this;return pt=pt||{},_t.renderer=lt,_t.autoPreventDefault=pt.autoPreventDefault===void 0||pt.autoPreventDefault,_t.interactionFrequency=pt.interactionFrequency||10,_t.mouse=new Gt,_t.mouse.identifier=1,_t.mouse.global.set(-999999),_t.activeInteractionData={},_t.activeInteractionData[1]=_t.mouse,_t.interactionDataPool=[],_t.eventData=new hr,_t.interactionDOMElement=null,_t.moveWhenInside=!1,_t.eventsAdded=!1,_t.tickerAdded=!1,_t.mouseOverRenderer=!("PointerEvent"in globalThis),_t.supportsTouchEvents="ontouchstart"in globalThis,_t.supportsPointerEvents=!!globalThis.PointerEvent,_t.onPointerUp=_t.onPointerUp.bind(_t),_t.processPointerUp=_t.processPointerUp.bind(_t),_t.onPointerCancel=_t.onPointerCancel.bind(_t),_t.processPointerCancel=_t.processPointerCancel.bind(_t),_t.onPointerDown=_t.onPointerDown.bind(_t),_t.processPointerDown=_t.processPointerDown.bind(_t),_t.onPointerMove=_t.onPointerMove.bind(_t),_t.processPointerMove=_t.processPointerMove.bind(_t),_t.onPointerOut=_t.onPointerOut.bind(_t),_t.processPointerOverOut=_t.processPointerOverOut.bind(_t),_t.onPointerOver=_t.onPointerOver.bind(_t),_t.cursorStyles={default:"inherit",pointer:"pointer"},_t.currentCursorMode=null,_t.cursor=null,_t.resolution=1,_t.delayedEvents=[],_t.search=new nn,_t._tempDisplayObject=new Ol.d,_t._eventListenerOptions={capture:!0,passive:!1},_t._useSystemTicker=pt.useSystemTicker===void 0||pt.useSystemTicker,_t.setTargetElement(_t.renderer.view,_t.renderer.resolution),_t}return(function(lt,pt){function _t(){this.constructor=lt}er(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),Object.defineProperty(it.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(lt){this._useSystemTicker=lt,lt?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),it.prototype.hitTest=function(lt,pt){return _i.target=null,_i.data.global=lt,pt||(pt=this.lastObjectRendered),this.processInteractive(_i,pt,null,!0),_i.target},it.prototype.setTargetElement=function(lt,pt){pt===void 0&&(pt=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=lt,this.resolution=pt,this.addEvents(),this.addTickerListener()},it.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(Fy.a.system.add(this.tickerUpdate,this,Fy.c.INTERACTION),this.tickerAdded=!0)},it.prototype.removeTickerListener=function(){this.tickerAdded&&(Fy.a.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},it.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var lt=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(lt.msContentZooming="none",lt.msTouchAction="none"):this.supportsPointerEvents&&(lt.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}},it.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var lt=this.interactionDOMElement.style;globalThis.navigator.msPointerEnabled?(lt.msContentZooming="",lt.msTouchAction=""):this.supportsPointerEvents&&(lt.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}},it.prototype.tickerUpdate=function(lt){this._deltaTime+=lt,this._deltaTime<this.interactionFrequency||(this._deltaTime=0,this.update())},it.prototype.update=function(){if(this.interactionDOMElement)if(this._didMove)this._didMove=!1;else{for(var lt in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(lt)){var pt=this.activeInteractionData[lt];if(pt.originalEvent&&pt.pointerType!=="touch"){var _t=this.configureInteractionEventForDOMEvent(this.eventData,pt.originalEvent,pt);this.processInteractive(_t,this.lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},it.prototype.setCursorMode=function(lt){lt=lt||"default";var pt=!0;if(globalThis.OffscreenCanvas&&this.interactionDOMElement instanceof OffscreenCanvas&&(pt=!1),this.currentCursorMode!==lt){this.currentCursorMode=lt;var _t=this.cursorStyles[lt];if(_t)switch(typeof _t){case"string":pt&&(this.interactionDOMElement.style.cursor=_t);break;case"function":_t(lt);break;case"object":pt&&Object.assign(this.interactionDOMElement.style,_t)}else pt&&typeof lt=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,lt)&&(this.interactionDOMElement.style.cursor=lt)}},it.prototype.dispatchEvent=function(lt,pt,_t){_t.stopPropagationHint&&lt!==_t.stopsPropagatingAt||(_t.currentTarget=lt,_t.type=pt,lt.emit(pt,_t),lt[pt]&&lt[pt](_t))},it.prototype.delayDispatchEvent=function(lt,pt,_t){this.delayedEvents.push({displayObject:lt,eventString:pt,eventData:_t})},it.prototype.mapPositionToPoint=function(lt,pt,_t){var Dt;Dt=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:this.interactionDOMElement.width,height:this.interactionDOMElement.height,left:0,top:0};var Lt=1/this.resolution;lt.x=(pt-Dt.left)*(this.interactionDOMElement.width/Dt.width)*Lt,lt.y=(_t-Dt.top)*(this.interactionDOMElement.height/Dt.height)*Lt},it.prototype.processInteractive=function(lt,pt,_t,Dt){var Lt=this.search.findHit(lt,pt,_t,Dt),$t=this.delayedEvents;if(!$t.length)return Lt;lt.stopPropagationHint=!1;var Xt=$t.length;this.delayedEvents=[];for(var Yt=0;Yt<Xt;Yt++){var Zt=$t[Yt],lr=Zt.displayObject,xr=Zt.eventString,wr=Zt.eventData;wr.stopsPropagatingAt===lr&&(wr.stopPropagationHint=!0),this.dispatchEvent(lr,xr,wr)}return Lt},it.prototype.onPointerDown=function(lt){if(!this.supportsTouchEvents||lt.pointerType!=="touch"){var pt=this.normalizeToPointerData(lt);this.autoPreventDefault&&pt[0].isNormalized&&(lt.cancelable||!("cancelable"in lt))&&lt.preventDefault();for(var _t=pt.length,Dt=0;Dt<_t;Dt++){var Lt=pt[Dt],$t=this.getInteractionDataForPointerId(Lt),Xt=this.configureInteractionEventForDOMEvent(this.eventData,Lt,$t);if(Xt.data.originalEvent=lt,this.processInteractive(Xt,this.lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",Xt),Lt.pointerType==="touch")this.emit("touchstart",Xt);else if(Lt.pointerType==="mouse"||Lt.pointerType==="pen"){var Yt=Lt.button===2;this.emit(Yt?"rightdown":"mousedown",this.eventData)}}}},it.prototype.processPointerDown=function(lt,pt,_t){var Dt=lt.data,Lt=lt.data.identifier;if(_t){if(pt.trackedPointers[Lt]||(pt.trackedPointers[Lt]=new Fr(Lt)),this.dispatchEvent(pt,"pointerdown",lt),Dt.pointerType==="touch")this.dispatchEvent(pt,"touchstart",lt);else if(Dt.pointerType==="mouse"||Dt.pointerType==="pen"){var $t=Dt.button===2;$t?pt.trackedPointers[Lt].rightDown=!0:pt.trackedPointers[Lt].leftDown=!0,this.dispatchEvent(pt,$t?"rightdown":"mousedown",lt)}}},it.prototype.onPointerComplete=function(lt,pt,_t){for(var Dt=this.normalizeToPointerData(lt),Lt=Dt.length,$t=lt.target!==this.interactionDOMElement?"outside":"",Xt=0;Xt<Lt;Xt++){var Yt=Dt[Xt],Zt=this.getInteractionDataForPointerId(Yt),lr=this.configureInteractionEventForDOMEvent(this.eventData,Yt,Zt);if(lr.data.originalEvent=lt,this.processInteractive(lr,this.lastObjectRendered,_t,pt||!$t),this.emit(pt?"pointercancel":"pointerup"+$t,lr),Yt.pointerType==="mouse"||Yt.pointerType==="pen"){var xr=Yt.button===2;this.emit(xr?"rightup"+$t:"mouseup"+$t,lr)}else Yt.pointerType==="touch"&&(this.emit(pt?"touchcancel":"touchend"+$t,lr),this.releaseInteractionDataForPointerId(Yt.pointerId))}},it.prototype.onPointerCancel=function(lt){this.supportsTouchEvents&&lt.pointerType==="touch"||this.onPointerComplete(lt,!0,this.processPointerCancel)},it.prototype.processPointerCancel=function(lt,pt){var _t=lt.data,Dt=lt.data.identifier;pt.trackedPointers[Dt]!==void 0&&(delete pt.trackedPointers[Dt],this.dispatchEvent(pt,"pointercancel",lt),_t.pointerType==="touch"&&this.dispatchEvent(pt,"touchcancel",lt))},it.prototype.onPointerUp=function(lt){this.supportsTouchEvents&&lt.pointerType==="touch"||this.onPointerComplete(lt,!1,this.processPointerUp)},it.prototype.processPointerUp=function(lt,pt,_t){var Dt=lt.data,Lt=lt.data.identifier,$t=pt.trackedPointers[Lt],Xt=Dt.pointerType==="touch",Yt=Dt.pointerType==="mouse"||Dt.pointerType==="pen",Zt=!1;if(Yt){var lr=Dt.button===2,xr=Fr.FLAGS,wr=lr?xr.RIGHT_DOWN:xr.LEFT_DOWN,Ir=$t!==void 0&&$t.flags&wr;_t?(this.dispatchEvent(pt,lr?"rightup":"mouseup",lt),Ir&&(this.dispatchEvent(pt,lr?"rightclick":"click",lt),Zt=!0)):Ir&&this.dispatchEvent(pt,lr?"rightupoutside":"mouseupoutside",lt),$t&&(lr?$t.rightDown=!1:$t.leftDown=!1)}_t?(this.dispatchEvent(pt,"pointerup",lt),Xt&&this.dispatchEvent(pt,"touchend",lt),$t&&(Yt&&!Zt||this.dispatchEvent(pt,"pointertap",lt),Xt&&(this.dispatchEvent(pt,"tap",lt),$t.over=!1))):$t&&(this.dispatchEvent(pt,"pointerupoutside",lt),Xt&&this.dispatchEvent(pt,"touchendoutside",lt)),$t&&$t.none&&delete pt.trackedPointers[Lt]},it.prototype.onPointerMove=function(lt){if(!this.supportsTouchEvents||lt.pointerType!=="touch"){var pt=this.normalizeToPointerData(lt);pt[0].pointerType!=="mouse"&&pt[0].pointerType!=="pen"||(this._didMove=!0,this.cursor=null);for(var _t=pt.length,Dt=0;Dt<_t;Dt++){var Lt=pt[Dt],$t=this.getInteractionDataForPointerId(Lt),Xt=this.configureInteractionEventForDOMEvent(this.eventData,Lt,$t);Xt.data.originalEvent=lt,this.processInteractive(Xt,this.lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",Xt),Lt.pointerType==="touch"&&this.emit("touchmove",Xt),Lt.pointerType!=="mouse"&&Lt.pointerType!=="pen"||this.emit("mousemove",Xt)}pt[0].pointerType==="mouse"&&this.setCursorMode(this.cursor)}},it.prototype.processPointerMove=function(lt,pt,_t){var Dt=lt.data,Lt=Dt.pointerType==="touch",$t=Dt.pointerType==="mouse"||Dt.pointerType==="pen";$t&&this.processPointerOverOut(lt,pt,_t),this.moveWhenInside&&!_t||(this.dispatchEvent(pt,"pointermove",lt),Lt&&this.dispatchEvent(pt,"touchmove",lt),$t&&this.dispatchEvent(pt,"mousemove",lt))},it.prototype.onPointerOut=function(lt){if(!this.supportsTouchEvents||lt.pointerType!=="touch"){var pt=this.normalizeToPointerData(lt)[0];pt.pointerType==="mouse"&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var _t=this.getInteractionDataForPointerId(pt),Dt=this.configureInteractionEventForDOMEvent(this.eventData,pt,_t);Dt.data.originalEvent=pt,this.processInteractive(Dt,this.lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",Dt),pt.pointerType==="mouse"||pt.pointerType==="pen"?this.emit("mouseout",Dt):this.releaseInteractionDataForPointerId(_t.identifier)}},it.prototype.processPointerOverOut=function(lt,pt,_t){var Dt=lt.data,Lt=lt.data.identifier,$t=Dt.pointerType==="mouse"||Dt.pointerType==="pen",Xt=pt.trackedPointers[Lt];_t&&!Xt&&(Xt=pt.trackedPointers[Lt]=new Fr(Lt)),Xt!==void 0&&(_t&&this.mouseOverRenderer?(Xt.over||(Xt.over=!0,this.delayDispatchEvent(pt,"pointerover",lt),$t&&this.delayDispatchEvent(pt,"mouseover",lt)),$t&&this.cursor===null&&(this.cursor=pt.cursor)):Xt.over&&(Xt.over=!1,this.dispatchEvent(pt,"pointerout",this.eventData),$t&&this.dispatchEvent(pt,"mouseout",lt),Xt.none&&delete pt.trackedPointers[Lt]))},it.prototype.onPointerOver=function(lt){var pt=this.normalizeToPointerData(lt)[0],_t=this.getInteractionDataForPointerId(pt),Dt=this.configureInteractionEventForDOMEvent(this.eventData,pt,_t);Dt.data.originalEvent=pt,pt.pointerType==="mouse"&&(this.mouseOverRenderer=!0),this.emit("pointerover",Dt),pt.pointerType!=="mouse"&&pt.pointerType!=="pen"||this.emit("mouseover",Dt)},it.prototype.getInteractionDataForPointerId=function(lt){var pt,_t=lt.pointerId;return _t===1||lt.pointerType==="mouse"?pt=this.mouse:this.activeInteractionData[_t]?pt=this.activeInteractionData[_t]:((pt=this.interactionDataPool.pop()||new Gt).identifier=_t,this.activeInteractionData[_t]=pt),pt.copyEvent(lt),pt},it.prototype.releaseInteractionDataForPointerId=function(lt){var pt=this.activeInteractionData[lt];pt&&(delete this.activeInteractionData[lt],pt.reset(),this.interactionDataPool.push(pt))},it.prototype.configureInteractionEventForDOMEvent=function(lt,pt,_t){return lt.data=_t,this.mapPositionToPoint(_t.global,pt.clientX,pt.clientY),pt.pointerType==="touch"&&(pt.globalX=_t.global.x,pt.globalY=_t.global.y),_t.originalEvent=pt,lt.reset(),lt},it.prototype.normalizeToPointerData=function(lt){var pt=[];if(this.supportsTouchEvents&&lt instanceof TouchEvent)for(var _t=0,Dt=lt.changedTouches.length;_t<Dt;_t++){var Lt=lt.changedTouches[_t];Lt.button===void 0&&(Lt.button=lt.touches.length?1:0),Lt.buttons===void 0&&(Lt.buttons=lt.touches.length?1:0),Lt.isPrimary===void 0&&(Lt.isPrimary=lt.touches.length===1&&lt.type==="touchstart"),Lt.width===void 0&&(Lt.width=Lt.radiusX||1),Lt.height===void 0&&(Lt.height=Lt.radiusY||1),Lt.tiltX===void 0&&(Lt.tiltX=0),Lt.tiltY===void 0&&(Lt.tiltY=0),Lt.pointerType===void 0&&(Lt.pointerType="touch"),Lt.pointerId===void 0&&(Lt.pointerId=Lt.identifier||0),Lt.pressure===void 0&&(Lt.pressure=Lt.force||.5),Lt.twist===void 0&&(Lt.twist=0),Lt.tangentialPressure===void 0&&(Lt.tangentialPressure=0),Lt.layerX===void 0&&(Lt.layerX=Lt.offsetX=Lt.clientX),Lt.layerY===void 0&&(Lt.layerY=Lt.offsetY=Lt.clientY),Lt.isNormalized=!0,pt.push(Lt)}else if(globalThis.MouseEvent&&(!(lt instanceof MouseEvent)||this.supportsPointerEvents&&lt instanceof globalThis.PointerEvent))pt.push(lt);else{var $t=lt;$t.isPrimary===void 0&&($t.isPrimary=!0),$t.width===void 0&&($t.width=1),$t.height===void 0&&($t.height=1),$t.tiltX===void 0&&($t.tiltX=0),$t.tiltY===void 0&&($t.tiltY=0),$t.pointerType===void 0&&($t.pointerType="mouse"),$t.pointerId===void 0&&($t.pointerId=1),$t.pressure===void 0&&($t.pressure=.5),$t.twist===void 0&&($t.twist=0),$t.tangentialPressure===void 0&&($t.tangentialPressure=0),$t.isNormalized=!0,pt.push($t)}return pt},it.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},it})(cl.EventEmitter),ps=tt(2),xo=(function(){function vt(it){var lt=this;this.stage=new Ol.b,it=Object.assign({forceCanvas:!1},it),this.renderer=Object(ps.y)(it),vt._plugins.forEach(function(pt){pt.init.call(lt,it)})}return vt.registerPlugin=function(it){vt._plugins.push(it)},vt.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(vt.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),vt.prototype.destroy=function(it,lt){var pt=this,_t=vt._plugins.slice(0);_t.reverse(),_t.forEach(function(Dt){Dt.destroy.call(pt)}),this.stage.destroy(lt),this.stage=null,this.renderer.destroy(it),this.renderer=null},vt._plugins=[],vt})(),Pu=(function(){function vt(){}return vt.init=function(it){var lt=this;Object.defineProperty(this,"resizeTo",{set:function(pt){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=pt,pt&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){lt._resizeTo&&(lt.cancelResize(),lt._resizeId=requestAnimationFrame(function(){return lt.resize()}))},this.cancelResize=function(){lt._resizeId&&(cancelAnimationFrame(lt._resizeId),lt._resizeId=null)},this.resize=function(){if(lt._resizeTo){var pt,_t;if(lt.cancelResize(),lt._resizeTo===globalThis.window)pt=globalThis.innerWidth,_t=globalThis.innerHeight;else{var Dt=lt._resizeTo;pt=Dt.clientWidth,_t=Dt.clientHeight}lt.renderer.resize(pt,_t)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=it.resizeTo||null},vt.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},vt})();xo.registerPlugin(Pu);/*!
* @pixi/extract - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/extract is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Bu=/iPhone/i,_f=/iPod/i,zp=/iPad/i,s0=/\biOS-universal(?:.+)Mac\b/i,Xv=/\bAndroid(?:.+)Mobile\b/i,ho=/Android/i,Zs=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,No=/Silk/i,iu=/Windows Phone/i,wu=/\bWindows(?:.+)ARM\b/i,ju=/BlackBerry/i,ml=/BB10/i,Mp=/Opera Mini/i,Cm=/\b(CriOS|Chrome)(?:.+)Mobile/i,Wl=/Mobile(?:.+)Firefox\b/i,x1=function(vt){return vt!==void 0&&vt.platform==="MacIntel"&&typeof vt.maxTouchPoints=="number"&&vt.maxTouchPoints>1&&typeof MSStream>"u"};/*!
* @pixi/settings - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var EE,tD,rD,US,nD,ql,LA,_T,iD,wx,FA,AE,aD,sD,Tx,Dw,oD,xT,uD,ST=(function(vt){var it={userAgent:"",platform:"",maxTouchPoints:0};vt||typeof navigator>"u"?typeof vt=="string"?it.userAgent=vt:vt&&vt.userAgent&&(it={userAgent:vt.userAgent,platform:vt.platform,maxTouchPoints:vt.maxTouchPoints||0}):it={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var lt=it.userAgent,pt=lt.split("[FBAN");pt[1]!==void 0&&(lt=pt[0]),(pt=lt.split("Twitter"))[1]!==void 0&&(lt=pt[0]);var _t=(function(Lt){return function($t){return $t.test(Lt)}})(lt),Dt={apple:{phone:_t(Bu)&&!_t(iu),ipod:_t(_f),tablet:!_t(Bu)&&(_t(zp)||x1(it))&&!_t(iu),universal:_t(s0),device:(_t(Bu)||_t(_f)||_t(zp)||_t(s0)||x1(it))&&!_t(iu)},amazon:{phone:_t(Zs),tablet:!_t(Zs)&&_t(No),device:_t(Zs)||_t(No)},android:{phone:!_t(iu)&&_t(Zs)||!_t(iu)&&_t(Xv),tablet:!_t(iu)&&!_t(Zs)&&!_t(Xv)&&(_t(No)||_t(ho)),device:!_t(iu)&&(_t(Zs)||_t(No)||_t(Xv)||_t(ho))||_t(/\bokhttp\b/i)},windows:{phone:_t(iu),tablet:_t(wu),device:_t(iu)||_t(wu)},other:{blackberry:_t(ju),blackberry10:_t(ml),opera:_t(Mp),firefox:_t(Wl),chrome:_t(Cm),device:_t(ju)||_t(ml)||_t(Mp)||_t(Wl)||_t(Cm)},any:!1,phone:!1,tablet:!1};return Dt.any=Dt.apple.device||Dt.android.device||Dt.windows.device||Dt.other.device,Dt.phone=Dt.apple.phone||Dt.android.phone||Dt.windows.phone,Dt.tablet=Dt.apple.tablet||Dt.android.tablet||Dt.windows.tablet,Dt})(globalThis.navigator);(function(vt){vt[vt.WEBGL_LEGACY=0]="WEBGL_LEGACY",vt[vt.WEBGL=1]="WEBGL",vt[vt.WEBGL2=2]="WEBGL2"})(EE||(EE={})),(function(vt){vt[vt.UNKNOWN=0]="UNKNOWN",vt[vt.WEBGL=1]="WEBGL",vt[vt.CANVAS=2]="CANVAS"})(tD||(tD={})),(function(vt){vt[vt.COLOR=16384]="COLOR",vt[vt.DEPTH=256]="DEPTH",vt[vt.STENCIL=1024]="STENCIL"})(rD||(rD={})),(function(vt){vt[vt.NORMAL=0]="NORMAL",vt[vt.ADD=1]="ADD",vt[vt.MULTIPLY=2]="MULTIPLY",vt[vt.SCREEN=3]="SCREEN",vt[vt.OVERLAY=4]="OVERLAY",vt[vt.DARKEN=5]="DARKEN",vt[vt.LIGHTEN=6]="LIGHTEN",vt[vt.COLOR_DODGE=7]="COLOR_DODGE",vt[vt.COLOR_BURN=8]="COLOR_BURN",vt[vt.HARD_LIGHT=9]="HARD_LIGHT",vt[vt.SOFT_LIGHT=10]="SOFT_LIGHT",vt[vt.DIFFERENCE=11]="DIFFERENCE",vt[vt.EXCLUSION=12]="EXCLUSION",vt[vt.HUE=13]="HUE",vt[vt.SATURATION=14]="SATURATION",vt[vt.COLOR=15]="COLOR",vt[vt.LUMINOSITY=16]="LUMINOSITY",vt[vt.NORMAL_NPM=17]="NORMAL_NPM",vt[vt.ADD_NPM=18]="ADD_NPM",vt[vt.SCREEN_NPM=19]="SCREEN_NPM",vt[vt.NONE=20]="NONE",vt[vt.SRC_OVER=0]="SRC_OVER",vt[vt.SRC_IN=21]="SRC_IN",vt[vt.SRC_OUT=22]="SRC_OUT",vt[vt.SRC_ATOP=23]="SRC_ATOP",vt[vt.DST_OVER=24]="DST_OVER",vt[vt.DST_IN=25]="DST_IN",vt[vt.DST_OUT=26]="DST_OUT",vt[vt.DST_ATOP=27]="DST_ATOP",vt[vt.ERASE=26]="ERASE",vt[vt.SUBTRACT=28]="SUBTRACT",vt[vt.XOR=29]="XOR"})(US||(US={})),(function(vt){vt[vt.POINTS=0]="POINTS",vt[vt.LINES=1]="LINES",vt[vt.LINE_LOOP=2]="LINE_LOOP",vt[vt.LINE_STRIP=3]="LINE_STRIP",vt[vt.TRIANGLES=4]="TRIANGLES",vt[vt.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",vt[vt.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(nD||(nD={})),(function(vt){vt[vt.RGBA=6408]="RGBA",vt[vt.RGB=6407]="RGB",vt[vt.RG=33319]="RG",vt[vt.RED=6403]="RED",vt[vt.RGBA_INTEGER=36249]="RGBA_INTEGER",vt[vt.RGB_INTEGER=36248]="RGB_INTEGER",vt[vt.RG_INTEGER=33320]="RG_INTEGER",vt[vt.RED_INTEGER=36244]="RED_INTEGER",vt[vt.ALPHA=6406]="ALPHA",vt[vt.LUMINANCE=6409]="LUMINANCE",vt[vt.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",vt[vt.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",vt[vt.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(ql||(ql={})),(function(vt){vt[vt.TEXTURE_2D=3553]="TEXTURE_2D",vt[vt.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",vt[vt.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(LA||(LA={})),(function(vt){vt[vt.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",vt[vt.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",vt[vt.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",vt[vt.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",vt[vt.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",vt[vt.UNSIGNED_INT=5125]="UNSIGNED_INT",vt[vt.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",vt[vt.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",vt[vt.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",vt[vt.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",vt[vt.BYTE=5120]="BYTE",vt[vt.SHORT=5122]="SHORT",vt[vt.INT=5124]="INT",vt[vt.FLOAT=5126]="FLOAT",vt[vt.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",vt[vt.HALF_FLOAT=36193]="HALF_FLOAT"})(_T||(_T={})),(function(vt){vt[vt.FLOAT=0]="FLOAT",vt[vt.INT=1]="INT",vt[vt.UINT=2]="UINT"})(iD||(iD={})),(function(vt){vt[vt.NEAREST=0]="NEAREST",vt[vt.LINEAR=1]="LINEAR"})(wx||(wx={})),(function(vt){vt[vt.CLAMP=33071]="CLAMP",vt[vt.REPEAT=10497]="REPEAT",vt[vt.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(FA||(FA={})),(function(vt){vt[vt.OFF=0]="OFF",vt[vt.POW2=1]="POW2",vt[vt.ON=2]="ON",vt[vt.ON_MANUAL=3]="ON_MANUAL"})(AE||(AE={})),(function(vt){vt[vt.NPM=0]="NPM",vt[vt.UNPACK=1]="UNPACK",vt[vt.PMA=2]="PMA",vt[vt.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",vt[vt.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",vt[vt.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",vt[vt.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(aD||(aD={})),(function(vt){vt[vt.NO=0]="NO",vt[vt.YES=1]="YES",vt[vt.AUTO=2]="AUTO",vt[vt.BLEND=0]="BLEND",vt[vt.CLEAR=1]="CLEAR",vt[vt.BLIT=2]="BLIT"})(sD||(sD={})),(function(vt){vt[vt.AUTO=0]="AUTO",vt[vt.MANUAL=1]="MANUAL"})(Tx||(Tx={})),(function(vt){vt.LOW="lowp",vt.MEDIUM="mediump",vt.HIGH="highp"})(Dw||(Dw={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.SCISSOR=1]="SCISSOR",vt[vt.STENCIL=2]="STENCIL",vt[vt.SPRITE=3]="SPRITE"})(oD||(oD={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.LOW=2]="LOW",vt[vt.MEDIUM=4]="MEDIUM",vt[vt.HIGH=8]="HIGH"})(xT||(xT={})),(function(vt){vt[vt.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",vt[vt.ARRAY_BUFFER=34962]="ARRAY_BUFFER",vt[vt.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(uD||(uD={}));var lD={MIPMAP_TEXTURES:AE.POW2,FILTER_MULTISAMPLE:xT.NONE,SPRITE_MAX_TEXTURES:(function(vt){var it=!0;if(ST.tablet||ST.phone){var lt;ST.apple.device&&(lt=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(lt[1],10)<11&&(it=!1),ST.android.device&&(lt=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(lt[1],10)<7&&(it=!1)}return it?vt:4})(32),GC_MODE:Tx.AUTO,WRAP_MODE:FA.CLAMP,SCALE_MODE:wx.LINEAR,PRECISION_VERTEX:Dw.HIGH,PRECISION_FRAGMENT:ST.apple.device?Dw.HIGH:Dw.MEDIUM,SORTABLE_CHILDREN:!1},dv=(function(){function vt(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return vt.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},vt.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},vt.prototype.getRectangle=function(it){return this.minX>this.maxX||this.minY>this.maxY?Ho.j.EMPTY:((it=it||new Ho.j(0,0,1,1)).x=this.minX,it.y=this.minY,it.width=this.maxX-this.minX,it.height=this.maxY-this.minY,it)},vt.prototype.addPoint=function(it){this.minX=Math.min(this.minX,it.x),this.maxX=Math.max(this.maxX,it.x),this.minY=Math.min(this.minY,it.y),this.maxY=Math.max(this.maxY,it.y)},vt.prototype.addPointMatrix=function(it,lt){var pt=it.a,_t=it.b,Dt=it.c,Lt=it.d,$t=it.tx,Xt=it.ty,Yt=pt*lt.x+Dt*lt.y+$t,Zt=_t*lt.x+Lt*lt.y+Xt;this.minX=Math.min(this.minX,Yt),this.maxX=Math.max(this.maxX,Yt),this.minY=Math.min(this.minY,Zt),this.maxY=Math.max(this.maxY,Zt)},vt.prototype.addQuad=function(it){var lt=this.minX,pt=this.minY,_t=this.maxX,Dt=this.maxY,Lt=it[0],$t=it[1];lt=Lt<lt?Lt:lt,pt=$t<pt?$t:pt,_t=Lt>_t?Lt:_t,Dt=$t>Dt?$t:Dt,lt=(Lt=it[2])<lt?Lt:lt,pt=($t=it[3])<pt?$t:pt,_t=Lt>_t?Lt:_t,Dt=$t>Dt?$t:Dt,lt=(Lt=it[4])<lt?Lt:lt,pt=($t=it[5])<pt?$t:pt,_t=Lt>_t?Lt:_t,Dt=$t>Dt?$t:Dt,lt=(Lt=it[6])<lt?Lt:lt,pt=($t=it[7])<pt?$t:pt,_t=Lt>_t?Lt:_t,Dt=$t>Dt?$t:Dt,this.minX=lt,this.minY=pt,this.maxX=_t,this.maxY=Dt},vt.prototype.addFrame=function(it,lt,pt,_t,Dt){this.addFrameMatrix(it.worldTransform,lt,pt,_t,Dt)},vt.prototype.addFrameMatrix=function(it,lt,pt,_t,Dt){var Lt=it.a,$t=it.b,Xt=it.c,Yt=it.d,Zt=it.tx,lr=it.ty,xr=this.minX,wr=this.minY,Ir=this.maxX,kr=this.maxY,Lr=Lt*lt+Xt*pt+Zt,Xr=$t*lt+Yt*pt+lr;xr=Lr<xr?Lr:xr,wr=Xr<wr?Xr:wr,Ir=Lr>Ir?Lr:Ir,kr=Xr>kr?Xr:kr,xr=(Lr=Lt*_t+Xt*pt+Zt)<xr?Lr:xr,wr=(Xr=$t*_t+Yt*pt+lr)<wr?Xr:wr,Ir=Lr>Ir?Lr:Ir,kr=Xr>kr?Xr:kr,xr=(Lr=Lt*lt+Xt*Dt+Zt)<xr?Lr:xr,wr=(Xr=$t*lt+Yt*Dt+lr)<wr?Xr:wr,Ir=Lr>Ir?Lr:Ir,kr=Xr>kr?Xr:kr,xr=(Lr=Lt*_t+Xt*Dt+Zt)<xr?Lr:xr,wr=(Xr=$t*_t+Yt*Dt+lr)<wr?Xr:wr,Ir=Lr>Ir?Lr:Ir,kr=Xr>kr?Xr:kr,this.minX=xr,this.minY=wr,this.maxX=Ir,this.maxY=kr},vt.prototype.addVertexData=function(it,lt,pt){for(var _t=this.minX,Dt=this.minY,Lt=this.maxX,$t=this.maxY,Xt=lt;Xt<pt;Xt+=2){var Yt=it[Xt],Zt=it[Xt+1];_t=Yt<_t?Yt:_t,Dt=Zt<Dt?Zt:Dt,Lt=Yt>Lt?Yt:Lt,$t=Zt>$t?Zt:$t}this.minX=_t,this.minY=Dt,this.maxX=Lt,this.maxY=$t},vt.prototype.addVertices=function(it,lt,pt,_t){this.addVerticesMatrix(it.worldTransform,lt,pt,_t)},vt.prototype.addVerticesMatrix=function(it,lt,pt,_t,Dt,Lt){Dt===void 0&&(Dt=0),Lt===void 0&&(Lt=Dt);for(var $t=it.a,Xt=it.b,Yt=it.c,Zt=it.d,lr=it.tx,xr=it.ty,wr=this.minX,Ir=this.minY,kr=this.maxX,Lr=this.maxY,Xr=pt;Xr<_t;Xr+=2){var _n=lt[Xr],On=lt[Xr+1],Kn=$t*_n+Yt*On+lr,Mn=Zt*On+Xt*_n+xr;wr=Math.min(wr,Kn-Dt),kr=Math.max(kr,Kn+Dt),Ir=Math.min(Ir,Mn-Lt),Lr=Math.max(Lr,Mn+Lt)}this.minX=wr,this.minY=Ir,this.maxX=kr,this.maxY=Lr},vt.prototype.addBounds=function(it){var lt=this.minX,pt=this.minY,_t=this.maxX,Dt=this.maxY;this.minX=it.minX<lt?it.minX:lt,this.minY=it.minY<pt?it.minY:pt,this.maxX=it.maxX>_t?it.maxX:_t,this.maxY=it.maxY>Dt?it.maxY:Dt},vt.prototype.addBoundsMask=function(it,lt){var pt=it.minX>lt.minX?it.minX:lt.minX,_t=it.minY>lt.minY?it.minY:lt.minY,Dt=it.maxX<lt.maxX?it.maxX:lt.maxX,Lt=it.maxY<lt.maxY?it.maxY:lt.maxY;if(pt<=Dt&&_t<=Lt){var $t=this.minX,Xt=this.minY,Yt=this.maxX,Zt=this.maxY;this.minX=pt<$t?pt:$t,this.minY=_t<Xt?_t:Xt,this.maxX=Dt>Yt?Dt:Yt,this.maxY=Lt>Zt?Lt:Zt}},vt.prototype.addBoundsMatrix=function(it,lt){this.addFrameMatrix(lt,it.minX,it.minY,it.maxX,it.maxY)},vt.prototype.addBoundsArea=function(it,lt){var pt=it.minX>lt.x?it.minX:lt.x,_t=it.minY>lt.y?it.minY:lt.y,Dt=it.maxX<lt.x+lt.width?it.maxX:lt.x+lt.width,Lt=it.maxY<lt.y+lt.height?it.maxY:lt.y+lt.height;if(pt<=Dt&&_t<=Lt){var $t=this.minX,Xt=this.minY,Yt=this.maxX,Zt=this.maxY;this.minX=pt<$t?pt:$t,this.minY=_t<Xt?_t:Xt,this.maxX=Dt>Yt?Dt:Yt,this.maxY=Lt>Zt?Lt:Zt}},vt.prototype.pad=function(it,lt){it===void 0&&(it=0),lt===void 0&&(lt=it),this.isEmpty()||(this.minX-=it,this.maxX+=it,this.minY-=lt,this.maxY+=lt)},vt.prototype.addFramePad=function(it,lt,pt,_t,Dt,Lt){it-=Dt,lt-=Lt,pt+=Dt,_t+=Lt,this.minX=this.minX<it?this.minX:it,this.maxX=this.maxX>pt?this.maxX:pt,this.minY=this.minY<lt?this.minY:lt,this.maxY=this.maxY>_t?this.maxY:_t},vt})(),__=function(vt,it){return(__=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function CE(vt,it){function lt(){this.constructor=vt}__(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}var BA,cD,jA,$A,dD,UA,hD,fD,Mw,Iw,pD,wT,DE,zA,ME,RE,PE,TT,mD,ET=(function(vt){function it(){var lt=vt.call(this)||this;return lt.tempDisplayObjectParent=null,lt.transform=new Ho.m,lt.alpha=1,lt.visible=!0,lt.renderable=!0,lt.cullable=!1,lt.cullArea=null,lt.parent=null,lt.worldAlpha=1,lt._lastSortedIndex=0,lt._zIndex=0,lt.filterArea=null,lt.filters=null,lt._enabledFilters=null,lt._bounds=new dv,lt._localBounds=null,lt._boundsID=0,lt._boundsRect=null,lt._localBoundsRect=null,lt._mask=null,lt._maskRefCount=0,lt._destroyed=!1,lt.isSprite=!1,lt.isMask=!1,lt}return CE(it,vt),it.mixin=function(lt){for(var pt=Object.keys(lt),_t=0;_t<pt.length;++_t){var Dt=pt[_t];Object.defineProperty(it.prototype,Dt,Object.getOwnPropertyDescriptor(lt,Dt))}},Object.defineProperty(it.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),it.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},it.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},it.prototype.getBounds=function(lt,pt){return lt||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),pt||(this._boundsRect||(this._boundsRect=new Ho.j),pt=this._boundsRect),this._bounds.getRectangle(pt)},it.prototype.getLocalBounds=function(lt){lt||(this._localBoundsRect||(this._localBoundsRect=new Ho.j),lt=this._localBoundsRect),this._localBounds||(this._localBounds=new dv);var pt=this.transform,_t=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var Dt=this._bounds,Lt=this._boundsID;this._bounds=this._localBounds;var $t=this.getBounds(!1,lt);return this.parent=_t,this.transform=pt,this._bounds=Dt,this._bounds.updateID+=this._boundsID-Lt,$t},it.prototype.toGlobal=function(lt,pt,_t){return _t===void 0&&(_t=!1),_t||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(lt,pt)},it.prototype.toLocal=function(lt,pt,_t,Dt){return pt&&(lt=pt.toGlobal(lt,_t,Dt)),Dt||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(lt,_t)},it.prototype.setParent=function(lt){if(!lt||!lt.addChild)throw new Error("setParent: Argument must be a Container");return lt.addChild(this),lt},it.prototype.setTransform=function(lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt){return lt===void 0&&(lt=0),pt===void 0&&(pt=0),_t===void 0&&(_t=1),Dt===void 0&&(Dt=1),Lt===void 0&&(Lt=0),$t===void 0&&($t=0),Xt===void 0&&(Xt=0),Yt===void 0&&(Yt=0),Zt===void 0&&(Zt=0),this.position.x=lt,this.position.y=pt,this.scale.x=_t||1,this.scale.y=Dt||1,this.rotation=Lt,this.skew.x=$t,this.skew.y=Xt,this.pivot.x=Yt,this.pivot.y=Zt,this},it.prototype.destroy=function(lt){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(it.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new Rw),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),it.prototype.enableTempParent=function(){var lt=this.parent;return this.parent=this._tempDisplayObjectParent,lt},it.prototype.disableTempParent=function(lt){this.parent=lt},Object.defineProperty(it.prototype,"x",{get:function(){return this.position.x},set:function(lt){this.transform.position.x=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"y",{get:function(){return this.position.y},set:function(lt){this.transform.position.y=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"position",{get:function(){return this.transform.position},set:function(lt){this.transform.position.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"scale",{get:function(){return this.transform.scale},set:function(lt){this.transform.scale.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(lt){this.transform.pivot.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"skew",{get:function(){return this.transform.skew},set:function(lt){this.transform.skew.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(lt){this.transform.rotation=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"angle",{get:function(){return this.transform.rotation*Ho.i},set:function(lt){this.transform.rotation=lt*Ho.b},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"zIndex",{get:function(){return this._zIndex},set:function(lt){this._zIndex=lt,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"worldVisible",{get:function(){var lt=this;do{if(!lt.visible)return!1;lt=lt.parent}while(lt);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"mask",{get:function(){return this._mask},set:function(lt){if(this._mask!==lt){var pt;this._mask&&((pt=this._mask.maskObject||this._mask)._maskRefCount--,pt._maskRefCount===0&&(pt.renderable=!0,pt.isMask=!1)),this._mask=lt,this._mask&&((pt=this._mask.maskObject||this._mask)._maskRefCount===0&&(pt.renderable=!1,pt.isMask=!0),pt._maskRefCount++)}},enumerable:!1,configurable:!0}),it})(cl.EventEmitter),Rw=(function(vt){function it(){var lt=vt!==null&&vt.apply(this,arguments)||this;return lt.sortDirty=null,lt}return CE(it,vt),it})(ET);function JM(vt,it){return vt.zIndex===it.zIndex?vt._lastSortedIndex-it._lastSortedIndex:vt.zIndex-it.zIndex}ET.prototype.displayObjectUpdateTransform=ET.prototype.updateTransform,(function(vt){vt[vt.WEBGL_LEGACY=0]="WEBGL_LEGACY",vt[vt.WEBGL=1]="WEBGL",vt[vt.WEBGL2=2]="WEBGL2"})(BA||(BA={})),(function(vt){vt[vt.UNKNOWN=0]="UNKNOWN",vt[vt.WEBGL=1]="WEBGL",vt[vt.CANVAS=2]="CANVAS"})(cD||(cD={})),(function(vt){vt[vt.COLOR=16384]="COLOR",vt[vt.DEPTH=256]="DEPTH",vt[vt.STENCIL=1024]="STENCIL"})(jA||(jA={})),(function(vt){vt[vt.NORMAL=0]="NORMAL",vt[vt.ADD=1]="ADD",vt[vt.MULTIPLY=2]="MULTIPLY",vt[vt.SCREEN=3]="SCREEN",vt[vt.OVERLAY=4]="OVERLAY",vt[vt.DARKEN=5]="DARKEN",vt[vt.LIGHTEN=6]="LIGHTEN",vt[vt.COLOR_DODGE=7]="COLOR_DODGE",vt[vt.COLOR_BURN=8]="COLOR_BURN",vt[vt.HARD_LIGHT=9]="HARD_LIGHT",vt[vt.SOFT_LIGHT=10]="SOFT_LIGHT",vt[vt.DIFFERENCE=11]="DIFFERENCE",vt[vt.EXCLUSION=12]="EXCLUSION",vt[vt.HUE=13]="HUE",vt[vt.SATURATION=14]="SATURATION",vt[vt.COLOR=15]="COLOR",vt[vt.LUMINOSITY=16]="LUMINOSITY",vt[vt.NORMAL_NPM=17]="NORMAL_NPM",vt[vt.ADD_NPM=18]="ADD_NPM",vt[vt.SCREEN_NPM=19]="SCREEN_NPM",vt[vt.NONE=20]="NONE",vt[vt.SRC_OVER=0]="SRC_OVER",vt[vt.SRC_IN=21]="SRC_IN",vt[vt.SRC_OUT=22]="SRC_OUT",vt[vt.SRC_ATOP=23]="SRC_ATOP",vt[vt.DST_OVER=24]="DST_OVER",vt[vt.DST_IN=25]="DST_IN",vt[vt.DST_OUT=26]="DST_OUT",vt[vt.DST_ATOP=27]="DST_ATOP",vt[vt.ERASE=26]="ERASE",vt[vt.SUBTRACT=28]="SUBTRACT",vt[vt.XOR=29]="XOR"})($A||($A={})),(function(vt){vt[vt.POINTS=0]="POINTS",vt[vt.LINES=1]="LINES",vt[vt.LINE_LOOP=2]="LINE_LOOP",vt[vt.LINE_STRIP=3]="LINE_STRIP",vt[vt.TRIANGLES=4]="TRIANGLES",vt[vt.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",vt[vt.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(dD||(dD={})),(function(vt){vt[vt.RGBA=6408]="RGBA",vt[vt.RGB=6407]="RGB",vt[vt.RG=33319]="RG",vt[vt.RED=6403]="RED",vt[vt.RGBA_INTEGER=36249]="RGBA_INTEGER",vt[vt.RGB_INTEGER=36248]="RGB_INTEGER",vt[vt.RG_INTEGER=33320]="RG_INTEGER",vt[vt.RED_INTEGER=36244]="RED_INTEGER",vt[vt.ALPHA=6406]="ALPHA",vt[vt.LUMINANCE=6409]="LUMINANCE",vt[vt.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",vt[vt.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",vt[vt.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(UA||(UA={})),(function(vt){vt[vt.TEXTURE_2D=3553]="TEXTURE_2D",vt[vt.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",vt[vt.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(hD||(hD={})),(function(vt){vt[vt.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",vt[vt.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",vt[vt.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",vt[vt.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",vt[vt.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",vt[vt.UNSIGNED_INT=5125]="UNSIGNED_INT",vt[vt.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",vt[vt.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",vt[vt.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",vt[vt.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",vt[vt.BYTE=5120]="BYTE",vt[vt.SHORT=5122]="SHORT",vt[vt.INT=5124]="INT",vt[vt.FLOAT=5126]="FLOAT",vt[vt.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",vt[vt.HALF_FLOAT=36193]="HALF_FLOAT"})(fD||(fD={})),(function(vt){vt[vt.FLOAT=0]="FLOAT",vt[vt.INT=1]="INT",vt[vt.UINT=2]="UINT"})(Mw||(Mw={})),(function(vt){vt[vt.NEAREST=0]="NEAREST",vt[vt.LINEAR=1]="LINEAR"})(Iw||(Iw={})),(function(vt){vt[vt.CLAMP=33071]="CLAMP",vt[vt.REPEAT=10497]="REPEAT",vt[vt.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(pD||(pD={})),(function(vt){vt[vt.OFF=0]="OFF",vt[vt.POW2=1]="POW2",vt[vt.ON=2]="ON",vt[vt.ON_MANUAL=3]="ON_MANUAL"})(wT||(wT={})),(function(vt){vt[vt.NPM=0]="NPM",vt[vt.UNPACK=1]="UNPACK",vt[vt.PMA=2]="PMA",vt[vt.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",vt[vt.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",vt[vt.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",vt[vt.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(DE||(DE={})),(function(vt){vt[vt.NO=0]="NO",vt[vt.YES=1]="YES",vt[vt.AUTO=2]="AUTO",vt[vt.BLEND=0]="BLEND",vt[vt.CLEAR=1]="CLEAR",vt[vt.BLIT=2]="BLIT"})(zA||(zA={})),(function(vt){vt[vt.AUTO=0]="AUTO",vt[vt.MANUAL=1]="MANUAL"})(ME||(ME={})),(function(vt){vt.LOW="lowp",vt.MEDIUM="mediump",vt.HIGH="highp"})(RE||(RE={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.SCISSOR=1]="SCISSOR",vt[vt.STENCIL=2]="STENCIL",vt[vt.SPRITE=3]="SPRITE"})(PE||(PE={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.LOW=2]="LOW",vt[vt.MEDIUM=4]="MEDIUM",vt[vt.HIGH=8]="HIGH"})(TT||(TT={})),(function(vt){vt[vt.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",vt[vt.ARRAY_BUFFER=34962]="ARRAY_BUFFER",vt[vt.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(mD||(mD={}));var GA=(function(vt){function it(){var lt=vt.call(this)||this;return lt.children=[],lt.sortableChildren=lD.SORTABLE_CHILDREN,lt.sortDirty=!1,lt}return CE(it,vt),it.prototype.onChildrenChange=function(lt){},it.prototype.addChild=function(){for(var lt=arguments,pt=[],_t=0;_t<arguments.length;_t++)pt[_t]=lt[_t];if(pt.length>1)for(var Dt=0;Dt<pt.length;Dt++)this.addChild(pt[Dt]);else{var Lt=pt[0];Lt.parent&&Lt.parent.removeChild(Lt),Lt.parent=this,this.sortDirty=!0,Lt.transform._parentID=-1,this.children.push(Lt),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",Lt,this,this.children.length-1),Lt.emit("added",this)}return pt[0]},it.prototype.addChildAt=function(lt,pt){if(pt<0||pt>this.children.length)throw new Error(lt+"addChildAt: The index "+pt+" supplied is out of bounds "+this.children.length);return lt.parent&&lt.parent.removeChild(lt),lt.parent=this,this.sortDirty=!0,lt.transform._parentID=-1,this.children.splice(pt,0,lt),this._boundsID++,this.onChildrenChange(pt),lt.emit("added",this),this.emit("childAdded",lt,this,pt),lt},it.prototype.swapChildren=function(lt,pt){if(lt!==pt){var _t=this.getChildIndex(lt),Dt=this.getChildIndex(pt);this.children[_t]=pt,this.children[Dt]=lt,this.onChildrenChange(_t<Dt?_t:Dt)}},it.prototype.getChildIndex=function(lt){var pt=this.children.indexOf(lt);if(pt===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return pt},it.prototype.setChildIndex=function(lt,pt){if(pt<0||pt>=this.children.length)throw new Error("The index "+pt+" supplied is out of bounds "+this.children.length);var _t=this.getChildIndex(lt);Object(cl.removeItems)(this.children,_t,1),this.children.splice(pt,0,lt),this.onChildrenChange(pt)},it.prototype.getChildAt=function(lt){if(lt<0||lt>=this.children.length)throw new Error("getChildAt: Index ("+lt+") does not exist.");return this.children[lt]},it.prototype.removeChild=function(){for(var lt=arguments,pt=[],_t=0;_t<arguments.length;_t++)pt[_t]=lt[_t];if(pt.length>1)for(var Dt=0;Dt<pt.length;Dt++)this.removeChild(pt[Dt]);else{var Lt=pt[0],$t=this.children.indexOf(Lt);if($t===-1)return null;Lt.parent=null,Lt.transform._parentID=-1,Object(cl.removeItems)(this.children,$t,1),this._boundsID++,this.onChildrenChange($t),Lt.emit("removed",this),this.emit("childRemoved",Lt,this,$t)}return pt[0]},it.prototype.removeChildAt=function(lt){var pt=this.getChildAt(lt);return pt.parent=null,pt.transform._parentID=-1,Object(cl.removeItems)(this.children,lt,1),this._boundsID++,this.onChildrenChange(lt),pt.emit("removed",this),this.emit("childRemoved",pt,this,lt),pt},it.prototype.removeChildren=function(lt,pt){lt===void 0&&(lt=0),pt===void 0&&(pt=this.children.length);var _t,Dt=lt,Lt=pt-Dt;if(Lt>0&&Lt<=pt){_t=this.children.splice(Dt,Lt);for(var $t=0;$t<_t.length;++$t)_t[$t].parent=null,_t[$t].transform&&(_t[$t].transform._parentID=-1);for(this._boundsID++,this.onChildrenChange(lt),$t=0;$t<_t.length;++$t)_t[$t].emit("removed",this),this.emit("childRemoved",_t[$t],this,$t);return _t}if(Lt===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},it.prototype.sortChildren=function(){for(var lt=!1,pt=0,_t=this.children.length;pt<_t;++pt){var Dt=this.children[pt];Dt._lastSortedIndex=pt,lt||Dt.zIndex===0||(lt=!0)}lt&&this.children.length>1&&this.children.sort(JM),this.sortDirty=!1},it.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var lt=0,pt=this.children.length;lt<pt;++lt){var _t=this.children[lt];_t.visible&&_t.updateTransform()}},it.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var lt=0;lt<this.children.length;lt++){var pt=this.children[lt];if(pt.visible&&pt.renderable)if(pt.calculateBounds(),pt._mask){var _t=pt._mask.maskObject||pt._mask;_t.calculateBounds(),this._bounds.addBoundsMask(pt._bounds,_t._bounds)}else pt.filterArea?this._bounds.addBoundsArea(pt._bounds,pt.filterArea):this._bounds.addBounds(pt._bounds)}this._bounds.updateID=this._boundsID},it.prototype.getLocalBounds=function(lt,pt){pt===void 0&&(pt=!1);var _t=vt.prototype.getLocalBounds.call(this,lt);if(!pt)for(var Dt=0,Lt=this.children.length;Dt<Lt;++Dt){var $t=this.children[Dt];$t.visible&&$t.updateTransform()}return _t},it.prototype._calculateBounds=function(){},it.prototype._renderWithCulling=function(lt){var pt=lt.renderTexture.sourceFrame;if(pt.width>0&&pt.height>0){var _t,Dt;if(this.cullArea?(_t=this.cullArea,Dt=this.worldTransform):this._render!==it.prototype._render&&(_t=this.getBounds(!0)),_t&&pt.intersects(_t,Dt))this._render(lt);else if(this.cullArea)return;for(var Lt=0,$t=this.children.length;Lt<$t;++Lt){var Xt=this.children[Lt],Yt=Xt.cullable;Xt.cullable=Yt||!this.cullArea,Xt.render(lt),Xt.cullable=Yt}}},it.prototype.render=function(lt){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(lt);else if(this.cullable)this._renderWithCulling(lt);else{this._render(lt);for(var pt=0,_t=this.children.length;pt<_t;++pt)this.children[pt].render(lt)}},it.prototype.renderAdvanced=function(lt){var pt=this.filters,_t=this._mask;if(pt){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var Dt=0;Dt<pt.length;Dt++)pt[Dt].enabled&&this._enabledFilters.push(pt[Dt])}var Lt=pt&&this._enabledFilters&&this._enabledFilters.length||_t&&(!_t.isMaskData||_t.enabled&&(_t.autoDetect||_t.type!==PE.NONE));if(Lt&&lt.batch.flush(),pt&&this._enabledFilters&&this._enabledFilters.length&&lt.filter.push(this,this._enabledFilters),_t&&lt.mask.push(this,this._mask),this.cullable)this._renderWithCulling(lt);else{this._render(lt),Dt=0;for(var $t=this.children.length;Dt<$t;++Dt)this.children[Dt].render(lt)}Lt&&lt.batch.flush(),_t&&lt.mask.pop(this),pt&&this._enabledFilters&&this._enabledFilters.length&&lt.filter.pop()},it.prototype._render=function(lt){},it.prototype.destroy=function(lt){vt.prototype.destroy.call(this),this.sortDirty=!1;var pt=typeof lt=="boolean"?lt:lt&&lt.children,_t=this.removeChildren(0,this.children.length);if(pt)for(var Dt=0;Dt<_t.length;++Dt)_t[Dt].destroy(lt)},Object.defineProperty(it.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(lt){var pt=this.getLocalBounds().width;this.scale.x=pt!==0?lt/pt:1,this._width=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(lt){var pt=this.getLocalBounds().height;this.scale.y=pt!==0?lt/pt:1,this._height=lt},enumerable:!1,configurable:!0}),it})(ET);GA.prototype.containerUpdateTransform=GA.prototype.updateTransform;var NE=new Ho.j,AT=(function(){function vt(it){this.renderer=it}return vt.prototype.image=function(it,lt,pt){var _t=new Image;return _t.src=this.base64(it,lt,pt),_t},vt.prototype.base64=function(it,lt,pt){return this.canvas(it).toDataURL(lt,pt)},vt.prototype.canvas=function(it){var lt,pt,_t,Dt=this.renderer,Lt=!1,$t=!1;it&&(it instanceof ps.p?_t=it:(_t=this.renderer.generateTexture(it),$t=!0)),_t?(lt=_t.baseTexture.resolution,pt=_t.frame,Lt=!1,Dt.renderTexture.bind(_t)):(lt=this.renderer.resolution,Lt=!0,(pt=NE).width=this.renderer.width,pt.height=this.renderer.height,Dt.renderTexture.bind(null));var Xt=Math.floor(pt.width*lt+1e-4),Yt=Math.floor(pt.height*lt+1e-4),Zt=new cl.CanvasRenderTarget(Xt,Yt,1),lr=new Uint8Array(4*Xt*Yt),xr=Dt.gl;xr.readPixels(pt.x*lt,pt.y*lt,Xt,Yt,xr.RGBA,xr.UNSIGNED_BYTE,lr);var wr=Zt.context.getImageData(0,0,Xt,Yt);if(vt.arrayPostDivide(lr,wr.data),Zt.context.putImageData(wr,0,0),Lt){var Ir=new cl.CanvasRenderTarget(Zt.width,Zt.height,1);Ir.context.scale(1,-1),Ir.context.drawImage(Zt.canvas,0,-Yt),Zt.destroy(),Zt=Ir}return $t&&_t.destroy(!0),Zt.canvas},vt.prototype.pixels=function(it,lt){var pt,_t,Dt,Lt=this.renderer,$t=!1;it&&(it instanceof ps.p?Dt=it:it instanceof ET&&(Dt=this.renderer.generateTexture(it),$t=!0)),Dt?lt?(pt=lt.resolution,_t=Dt.frame,Lt.renderTexture.bind(Dt)):(pt=Dt.baseTexture.resolution,_t=Dt.frame,Lt.renderTexture.bind(Dt)):lt?(pt=lt.resolution,(_t=NE).width=lt.width,_t.height=lt.height,Lt.renderTexture.bind(null)):(pt=Lt.resolution,(_t=NE).width=Lt.width,_t.height=Lt.height,Lt.renderTexture.bind(null));var Xt=_t.width*pt,Yt=_t.height*pt,Zt=new Uint8Array(4*Xt*Yt),lr=Lt.gl;return lr.readPixels(_t.x*pt,_t.y*pt,Xt,Yt,lr.RGBA,lr.UNSIGNED_BYTE,Zt),$t&&Dt.destroy(!0),vt.arrayPostDivide(Zt,Zt),Zt},vt.prototype.destroy=function(){this.renderer=null},vt.arrayPostDivide=function(it,lt){for(var pt=0;pt<it.length;pt+=4){var _t=lt[pt+3]=it[pt+3];_t!==0?(lt[pt]=Math.round(Math.min(255*it[pt]/_t,255)),lt[pt+1]=Math.round(Math.min(255*it[pt+1]/_t,255)),lt[pt+2]=Math.round(Math.min(255*it[pt+2]/_t,255))):(lt[pt]=it[pt],lt[pt+1]=it[pt+1],lt[pt+2]=it[pt+2])}},vt})(),CT=(function(){function vt(it,lt,pt){lt===void 0&&(lt=!1),this._fn=it,this._once=lt,this._thisArg=pt,this._next=this._prev=this._owner=null}return vt.prototype.detach=function(){return this._owner!==null&&(this._owner.detach(this),!0)},vt})();function VA(vt,it){return vt._head?(vt._tail._next=it,it._prev=vt._tail,vt._tail=it):(vt._head=it,vt._tail=it),it._owner=vt,it}var kE,X1=(function(){function vt(){this._head=this._tail=void 0}return vt.prototype.handlers=function(it){it===void 0&&(it=!1);var lt=this._head;if(it)return!!lt;for(var pt=[];lt;)pt.push(lt),lt=lt._next;return pt},vt.prototype.has=function(it){if(!(it instanceof CT))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return it._owner===this},vt.prototype.dispatch=function(){for(var it=arguments,lt=[],pt=0;pt<arguments.length;pt++)lt[pt]=it[pt];var _t=this._head;if(!_t)return!1;for(;_t;)_t._once&&this.detach(_t),_t._fn.apply(_t._thisArg,lt),_t=_t._next;return!0},vt.prototype.add=function(it,lt){if(lt===void 0&&(lt=null),typeof it!="function")throw new Error("MiniSignal#add(): First arg must be a Function.");return VA(this,new CT(it,!1,lt))},vt.prototype.once=function(it,lt){if(lt===void 0&&(lt=null),typeof it!="function")throw new Error("MiniSignal#once(): First arg must be a Function.");return VA(this,new CT(it,!0,lt))},vt.prototype.detach=function(it){if(!(it instanceof CT))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return it._owner!==this||(it._prev&&(it._prev._next=it._next),it._next&&(it._next._prev=it._prev),it===this._head?(this._head=it._next,it._next===null&&(this._tail=null)):it===this._tail&&(this._tail=it._prev,this._tail._next=null),it._owner=null),this},vt.prototype.detachAll=function(){var it=this._head;if(!it)return this;for(this._head=this._tail=null;it;)it._owner=null,it=it._next;return this},vt})();function Pw(vt,it){it=it||{};for(var lt={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},pt=lt.parser[it.strictMode?"strict":"loose"].exec(vt),_t={},Dt=14;Dt--;)_t[lt.key[Dt]]=pt[Dt]||"";return _t[lt.q.name]={},_t[lt.key[12]].replace(lt.q.parser,function(Lt,$t,Xt){$t&&(_t[lt.q.name][$t]=Xt)}),_t}var Nw=null;function HA(){}function DT(vt,it,lt){it&&it.indexOf(".")===0&&(it=it.substring(1)),it&&(vt[it]=lt)}function zS(vt){return vt.toString().replace("object ","")}var zm=(function(){function vt(it,lt,pt){if(this._dequeue=HA,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,typeof it!="string"||typeof lt!="string")throw new Error("Both name and url are required for constructing a resource.");pt=pt||{},this._flags=0,this._setFlag(vt.STATUS_FLAGS.DATA_URL,lt.indexOf("data:")===0),this.name=it,this.url=lt,this.extension=this._getExtension(),this.data=null,this.crossOrigin=pt.crossOrigin===!0?"anonymous":pt.crossOrigin,this.timeout=pt.timeout||0,this.loadType=pt.loadType||this._determineLoadType(),this.xhrType=pt.xhrType,this.metadata=pt.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=vt.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=HA,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new X1,this.onProgress=new X1,this.onComplete=new X1,this.onAfterMiddleware=new X1}return vt.setExtensionLoadType=function(it,lt){DT(vt._loadTypeMap,it,lt)},vt.setExtensionXhrType=function(it,lt){DT(vt._xhrTypeMap,it,lt)},Object.defineProperty(vt.prototype,"isDataUrl",{get:function(){return this._hasFlag(vt.STATUS_FLAGS.DATA_URL)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"isComplete",{get:function(){return this._hasFlag(vt.STATUS_FLAGS.COMPLETE)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"isLoading",{get:function(){return this._hasFlag(vt.STATUS_FLAGS.LOADING)},enumerable:!1,configurable:!0}),vt.prototype.complete=function(){this._clearEvents(),this._finish()},vt.prototype.abort=function(it){if(!this.error){if(this.error=new Error(it),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=vt.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},vt.prototype.load=function(it){var lt=this;if(!this.isLoading)if(this.isComplete)it&&setTimeout(function(){return it(lt)},1);else switch(it&&this.onComplete.once(it),this._setFlag(vt.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),this.crossOrigin!==!1&&typeof this.crossOrigin=="string"||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case vt.LOAD_TYPE.IMAGE:this.type=vt.TYPE.IMAGE,this._loadElement("image");break;case vt.LOAD_TYPE.AUDIO:this.type=vt.TYPE.AUDIO,this._loadSourceElement("audio");break;case vt.LOAD_TYPE.VIDEO:this.type=vt.TYPE.VIDEO,this._loadSourceElement("video");break;case vt.LOAD_TYPE.XHR:default:kE===void 0&&(kE=!(!globalThis.XDomainRequest||"withCredentials"in new XMLHttpRequest)),kE&&this.crossOrigin?this._loadXdr():this._loadXhr()}},vt.prototype._hasFlag=function(it){return(this._flags&it)!=0},vt.prototype._setFlag=function(it,lt){this._flags=lt?this._flags|it:this._flags&~it},vt.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))},vt.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(vt.STATUS_FLAGS.COMPLETE,!0),this._setFlag(vt.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},vt.prototype._loadElement=function(it){this.metadata.loadElement?this.data=this.metadata.loadElement:it==="image"&&globalThis.Image!==void 0?this.data=new Image:this.data=document.createElement(it),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))},vt.prototype._loadSourceElement=function(it){if(this.metadata.loadElement?this.data=this.metadata.loadElement:it==="audio"&&globalThis.Audio!==void 0?this.data=new Audio:this.data=document.createElement(it),this.data!==null){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 lt=this.metadata.mimeType,pt=0;pt<this.url.length;++pt)this.data.appendChild(this._createSource(it,this.url[pt],Array.isArray(lt)?lt[pt]:lt));else lt=this.metadata.mimeType,this.data.appendChild(this._createSource(it,this.url,Array.isArray(lt)?lt[0]:lt));this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+it)},vt.prototype._loadXhr=function(){typeof this.xhrType!="string"&&(this.xhrType=this._determineXhrType());var it=this.xhr=new XMLHttpRequest;this.crossOrigin==="use-credentials"&&(it.withCredentials=!0),it.open("GET",this.url,!0),it.timeout=this.timeout,this.xhrType===vt.XHR_RESPONSE_TYPE.JSON||this.xhrType===vt.XHR_RESPONSE_TYPE.DOCUMENT?it.responseType=vt.XHR_RESPONSE_TYPE.TEXT:it.responseType=this.xhrType,it.addEventListener("error",this._boundXhrOnError,!1),it.addEventListener("timeout",this._boundXhrOnTimeout,!1),it.addEventListener("abort",this._boundXhrOnAbort,!1),it.addEventListener("progress",this._boundOnProgress,!1),it.addEventListener("load",this._boundXhrOnLoad,!1),it.send()},vt.prototype._loadXdr=function(){typeof this.xhrType!="string"&&(this.xhrType=this._determineXhrType());var it=this.xhr=new globalThis.XDomainRequest;it.timeout=this.timeout||5e3,it.onerror=this._boundXhrOnError,it.ontimeout=this._boundXhrOnTimeout,it.onprogress=this._boundOnProgress,it.onload=this._boundXhrOnLoad,it.open("GET",this.url,!0),setTimeout(function(){return it.send()},1)},vt.prototype._createSource=function(it,lt,pt){pt||(pt=it+"/"+this._getExtension(lt));var _t=document.createElement("source");return _t.src=lt,_t.type=pt,_t},vt.prototype._onError=function(it){this.abort("Failed to load element using: "+it.target.nodeName)},vt.prototype._onProgress=function(it){it&&it.lengthComputable&&this.onProgress.dispatch(this,it.loaded/it.total)},vt.prototype._onTimeout=function(){this.abort("Load timed out.")},vt.prototype._xhrOnError=function(){var it=this.xhr;this.abort(zS(it)+" Request failed. Status: "+it.status+', text: "'+it.statusText+'"')},vt.prototype._xhrOnTimeout=function(){var it=this.xhr;this.abort(zS(it)+" Request timed out.")},vt.prototype._xhrOnAbort=function(){var it=this.xhr;this.abort(zS(it)+" Request was aborted by the user.")},vt.prototype._xhrOnLoad=function(){var it=this.xhr,lt="",pt=it.status===void 0?200:it.status;if(it.responseType!==""&&it.responseType!=="text"&&it.responseType!==void 0||(lt=it.responseText),pt===0&&(lt.length>0||it.responseType===vt.XHR_RESPONSE_TYPE.BUFFER)?pt=200:pt===1223&&(pt=204),(pt/100|0)===2){if(this.xhrType===vt.XHR_RESPONSE_TYPE.TEXT)this.data=lt,this.type=vt.TYPE.TEXT;else if(this.xhrType===vt.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(lt),this.type=vt.TYPE.JSON}catch(Lt){return void this.abort("Error trying to parse loaded json: "+Lt)}else if(this.xhrType===vt.XHR_RESPONSE_TYPE.DOCUMENT)try{if(globalThis.DOMParser){var _t=new DOMParser;this.data=_t.parseFromString(lt,"text/xml")}else{var Dt=document.createElement("div");Dt.innerHTML=lt,this.data=Dt}this.type=vt.TYPE.XML}catch(Lt){return void this.abort("Error trying to parse loaded xml: "+Lt)}else this.data=it.response||lt;this.complete()}else this.abort("["+it.status+"] "+it.statusText+": "+it.responseURL)},vt.prototype._determineCrossOrigin=function(it,lt){if(it.indexOf("data:")===0)return"";if(globalThis.origin!==globalThis.location.origin)return"anonymous";lt=lt||globalThis.location,Nw||(Nw=document.createElement("a")),Nw.href=it;var pt=Pw(Nw.href,{strictMode:!0}),_t=!pt.port&&lt.port===""||pt.port===lt.port,Dt=pt.protocol?pt.protocol+":":"";return pt.host===lt.hostname&&_t&&Dt===lt.protocol?"":"anonymous"},vt.prototype._determineXhrType=function(){return vt._xhrTypeMap[this.extension]||vt.XHR_RESPONSE_TYPE.TEXT},vt.prototype._determineLoadType=function(){return vt._loadTypeMap[this.extension]||vt.LOAD_TYPE.XHR},vt.prototype._getExtension=function(it){it===void 0&&(it=this.url);var lt="";if(this.isDataUrl){var pt=it.indexOf("/");lt=it.substring(pt+1,it.indexOf(";",pt))}else{var _t=it.indexOf("?"),Dt=it.indexOf("#"),Lt=Math.min(_t>-1?_t:it.length,Dt>-1?Dt:it.length);lt=(it=it.substring(0,Lt)).substring(it.lastIndexOf(".")+1)}return lt.toLowerCase()},vt.prototype._getMimeFromXhrType=function(it){switch(it){case vt.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case vt.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case vt.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case vt.XHR_RESPONSE_TYPE.JSON:return"application/json";case vt.XHR_RESPONSE_TYPE.DEFAULT:case vt.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},vt})();function Y1(){}function Ex(vt){return function(){for(var it=arguments,lt=[],pt=0;pt<arguments.length;pt++)lt[pt]=it[pt];if(vt===null)throw new Error("Callback was already called.");var _t=vt;vt=null,_t.apply(this,lt)}}(function(vt){var it,lt,pt,_t;(it=vt.STATUS_FLAGS||(vt.STATUS_FLAGS={}))[it.NONE=0]="NONE",it[it.DATA_URL=1]="DATA_URL",it[it.COMPLETE=2]="COMPLETE",it[it.LOADING=4]="LOADING",(lt=vt.TYPE||(vt.TYPE={}))[lt.UNKNOWN=0]="UNKNOWN",lt[lt.JSON=1]="JSON",lt[lt.XML=2]="XML",lt[lt.IMAGE=3]="IMAGE",lt[lt.AUDIO=4]="AUDIO",lt[lt.VIDEO=5]="VIDEO",lt[lt.TEXT=6]="TEXT",(pt=vt.LOAD_TYPE||(vt.LOAD_TYPE={}))[pt.XHR=1]="XHR",pt[pt.IMAGE=2]="IMAGE",pt[pt.AUDIO=3]="AUDIO",pt[pt.VIDEO=4]="VIDEO",(_t=vt.XHR_RESPONSE_TYPE||(vt.XHR_RESPONSE_TYPE={})).DEFAULT="text",_t.BUFFER="arraybuffer",_t.BLOB="blob",_t.DOCUMENT="document",_t.JSON="json",_t.TEXT="text",vt._loadTypeMap={gif:vt.LOAD_TYPE.IMAGE,png:vt.LOAD_TYPE.IMAGE,bmp:vt.LOAD_TYPE.IMAGE,jpg:vt.LOAD_TYPE.IMAGE,jpeg:vt.LOAD_TYPE.IMAGE,tif:vt.LOAD_TYPE.IMAGE,tiff:vt.LOAD_TYPE.IMAGE,webp:vt.LOAD_TYPE.IMAGE,tga:vt.LOAD_TYPE.IMAGE,svg:vt.LOAD_TYPE.IMAGE,"svg+xml":vt.LOAD_TYPE.IMAGE,mp3:vt.LOAD_TYPE.AUDIO,ogg:vt.LOAD_TYPE.AUDIO,wav:vt.LOAD_TYPE.AUDIO,mp4:vt.LOAD_TYPE.VIDEO,webm:vt.LOAD_TYPE.VIDEO},vt._xhrTypeMap={xhtml:vt.XHR_RESPONSE_TYPE.DOCUMENT,html:vt.XHR_RESPONSE_TYPE.DOCUMENT,htm:vt.XHR_RESPONSE_TYPE.DOCUMENT,xml:vt.XHR_RESPONSE_TYPE.DOCUMENT,tmx:vt.XHR_RESPONSE_TYPE.DOCUMENT,svg:vt.XHR_RESPONSE_TYPE.DOCUMENT,tsx:vt.XHR_RESPONSE_TYPE.DOCUMENT,gif:vt.XHR_RESPONSE_TYPE.BLOB,png:vt.XHR_RESPONSE_TYPE.BLOB,bmp:vt.XHR_RESPONSE_TYPE.BLOB,jpg:vt.XHR_RESPONSE_TYPE.BLOB,jpeg:vt.XHR_RESPONSE_TYPE.BLOB,tif:vt.XHR_RESPONSE_TYPE.BLOB,tiff:vt.XHR_RESPONSE_TYPE.BLOB,webp:vt.XHR_RESPONSE_TYPE.BLOB,tga:vt.XHR_RESPONSE_TYPE.BLOB,json:vt.XHR_RESPONSE_TYPE.JSON,text:vt.XHR_RESPONSE_TYPE.TEXT,txt:vt.XHR_RESPONSE_TYPE.TEXT,ttf:vt.XHR_RESPONSE_TYPE.BUFFER,otf:vt.XHR_RESPONSE_TYPE.BUFFER},vt.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="})(zm||(zm={}));var gD=function(vt,it){this.data=vt,this.callback=it},OE=(function(){function vt(it,lt){var pt=this;if(lt===void 0&&(lt=1),this.workers=0,this.saturated=Y1,this.unsaturated=Y1,this.empty=Y1,this.drain=Y1,this.error=Y1,this.started=!1,this.paused=!1,this._tasks=[],this._insert=function(_t,Dt,Lt){if(Lt&&typeof Lt!="function")throw new Error("task callback must be a function");if(pt.started=!0,_t==null&&pt.idle())setTimeout(function(){return pt.drain()},1);else{var $t=new gD(_t,typeof Lt=="function"?Lt:Y1);Dt?pt._tasks.unshift($t):pt._tasks.push($t),setTimeout(pt.process,1)}},this.process=function(){for(;!pt.paused&&pt.workers<pt.concurrency&&pt._tasks.length;){var _t=pt._tasks.shift();pt._tasks.length===0&&pt.empty(),pt.workers+=1,pt.workers===pt.concurrency&&pt.saturated(),pt._worker(_t.data,Ex(pt._next(_t)))}},this._worker=it,lt===0)throw new Error("Concurrency must not be zero");this.concurrency=lt,this.buffer=lt/4}return vt.prototype._next=function(it){var lt=this;return function(){for(var pt=arguments,_t=[],Dt=0;Dt<arguments.length;Dt++)_t[Dt]=pt[Dt];lt.workers-=1,it.callback.apply(it,_t),_t[0]!=null&&lt.error(_t[0],it.data),lt.workers<=lt.concurrency-lt.buffer&&lt.unsaturated(),lt.idle()&&lt.drain(),lt.process()}},vt.prototype.push=function(it,lt){this._insert(it,!1,lt)},vt.prototype.kill=function(){this.workers=0,this.drain=Y1,this.started=!1,this._tasks=[]},vt.prototype.unshift=function(it,lt){this._insert(it,!0,lt)},vt.prototype.length=function(){return this._tasks.length},vt.prototype.running=function(){return this.workers},vt.prototype.idle=function(){return this._tasks.length+this.workers===0},vt.prototype.pause=function(){this.paused!==!0&&(this.paused=!0)},vt.prototype.resume=function(){if(this.paused!==!1){this.paused=!1;for(var it=1;it<=this.concurrency;it++)this.process()}},vt.eachSeries=function(it,lt,pt,_t){var Dt=0,Lt=it.length;(function $t(Xt){Xt||Dt===Lt?pt&&pt(Xt):_t?setTimeout(function(){lt(it[Dt++],$t)},1):lt(it[Dt++],$t)})()},vt.queue=function(it,lt){return new vt(it,lt)},vt})(),eI=/(#[\w-]+)?$/,Q1=(function(){function vt(it,lt){var pt=this;it===void 0&&(it=""),lt===void 0&&(lt=10),this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(Xt,Yt){return pt._loadResource(Xt,Yt)},this.resources={},this.baseUrl=it,this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(Xt,Yt){return pt._loadResource(Xt,Yt)},this._queue=OE.queue(this._boundLoadResource,lt),this._queue.pause(),this.resources={},this.onProgress=new X1,this.onError=new X1,this.onLoad=new X1,this.onStart=new X1,this.onComplete=new X1;for(var _t=0;_t<vt._plugins.length;++_t){var Dt=vt._plugins[_t],Lt=Dt.pre,$t=Dt.use;Lt&&this.pre(Lt),$t&&this.use($t)}this._protected=!1}return vt.prototype._add=function(it,lt,pt,_t){if(this.loading&&(!pt||!pt.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[it])throw new Error('Resource named "'+it+'" already exists.');if(lt=this._prepareUrl(lt),this.resources[it]=new zm(it,lt,pt),typeof _t=="function"&&this.resources[it].onAfterMiddleware.once(_t),this.loading){for(var Dt=pt.parentResource,Lt=[],$t=0;$t<Dt.children.length;++$t)Dt.children[$t].isComplete||Lt.push(Dt.children[$t]);var Xt=Dt.progressChunk*(Lt.length+1)/(Lt.length+2);for(Dt.children.push(this.resources[it]),Dt.progressChunk=Xt,$t=0;$t<Lt.length;++$t)Lt[$t].progressChunk=Xt;this.resources[it].progressChunk=Xt}return this._queue.push(this.resources[it]),this},vt.prototype.pre=function(it){return this._beforeMiddleware.push(it),this},vt.prototype.use=function(it){return this._afterMiddleware.push(it),this},vt.prototype.reset=function(){for(var it in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var lt=this.resources[it];lt._onLoadBinding&&lt._onLoadBinding.detach(),lt.isLoading&&lt.abort("loader reset")}return this.resources={},this},vt.prototype.load=function(it){if(typeof it=="function"&&this.onComplete.once(it),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var lt=100/this._queue._tasks.length,pt=0;pt<this._queue._tasks.length;++pt)this._queue._tasks[pt].data.progressChunk=lt;this._onStart(),this._queue.resume()}return this},Object.defineProperty(vt.prototype,"concurrency",{get:function(){return this._queue.concurrency},set:function(it){this._queue.concurrency=it},enumerable:!1,configurable:!0}),vt.prototype._prepareUrl=function(it){var lt,pt=Pw(it,{strictMode:!0});if(lt=pt.protocol||!pt.path||it.indexOf("//")===0?it:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&it.charAt(0)!=="/"?this.baseUrl+"/"+it:this.baseUrl+it,this.defaultQueryString){var _t=eI.exec(lt)[0];(lt=lt.slice(0,lt.length-_t.length)).indexOf("?")!==-1?lt+="&"+this.defaultQueryString:lt+="?"+this.defaultQueryString,lt+=_t}return lt},vt.prototype._loadResource=function(it,lt){var pt=this;it._dequeue=lt,OE.eachSeries(this._beforeMiddleware,function(_t,Dt){_t.call(pt,it,function(){Dt(it.isComplete?{}:null)})},function(){it.isComplete?pt._onLoad(it):(it._onLoadBinding=it.onComplete.once(pt._onLoad,pt),it.load())},!0)},vt.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},vt.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},vt.prototype._onLoad=function(it){var lt=this;it._onLoadBinding=null,this._resourcesParsing.push(it),it._dequeue(),OE.eachSeries(this._afterMiddleware,function(pt,_t){pt.call(lt,it,_t)},function(){it.onAfterMiddleware.dispatch(it),lt.progress=Math.min(100,lt.progress+it.progressChunk),lt.onProgress.dispatch(lt,it),it.error?lt.onError.dispatch(it.error,lt,it):lt.onLoad.dispatch(lt,it),lt._resourcesParsing.splice(lt._resourcesParsing.indexOf(it),1),lt._queue.idle()&&lt._resourcesParsing.length===0&&lt._onComplete()},!0)},vt.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(vt,"shared",{get:function(){var it=vt._shared;return it||((it=new vt)._protected=!0,vt._shared=it),it},enumerable:!1,configurable:!0}),vt.registerPlugin=function(it){return vt._plugins.push(it),it.add&&it.add(),vt},vt._plugins=[],vt})();Q1.prototype.add=function(vt,it,lt,pt){if(Array.isArray(vt)){for(var _t=0;_t<vt.length;++_t)this.add(vt[_t]);return this}if(typeof vt=="object"&&(lt=vt,pt=it||lt.callback||lt.onComplete,it=lt.url,vt=lt.name||lt.key||lt.url),typeof it!="string"&&(pt=lt,lt=it,it=vt),typeof it!="string")throw new Error("No url passed to add resource to loader.");return typeof lt=="function"&&(pt=lt,lt=null),this._add(vt,it,lt,pt)};var vD=(function(){function vt(){}return vt.init=function(it){it=Object.assign({sharedLoader:!1},it),this.loader=it.sharedLoader?Q1.shared:new Q1},vt.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},vt})(),MT=(function(){function vt(){}return vt.add=function(){zm.setExtensionLoadType("svg",zm.LOAD_TYPE.XHR),zm.setExtensionXhrType("svg",zm.XHR_RESPONSE_TYPE.TEXT)},vt.use=function(it,lt){if(!it.data||it.type!==zm.TYPE.IMAGE&&it.extension!=="svg")lt();else{var pt=it.data,_t=it.url,Dt=it.name,Lt=it.metadata;ps.t.fromLoader(pt,_t,Dt,Lt).then(function($t){it.texture=$t,lt()}).catch(lt)}},vt})();Q1.registerPlugin({use:function(vt,it){if(vt.data){if(vt.xhr&&vt.xhrType===zm.XHR_RESPONSE_TYPE.BLOB)if(self.Blob&&typeof vt.data!="string"){if(vt.data.type.indexOf("image")===0){var lt=globalThis.URL||globalThis.webkitURL,pt=lt.createObjectURL(vt.data);return vt.blob=vt.data,vt.data=new Image,vt.data.src=pt,vt.type=zm.TYPE.IMAGE,void(vt.data.onload=function(){lt.revokeObjectURL(pt),vt.data.onload=null,it()})}}else{var _t=vt.xhr.getResponseHeader("content-type");if(_t&&_t.indexOf("image")===0)return vt.data=new Image,vt.data.src="data:"+_t+";base64,"+(function(Dt){for(var Lt="",$t=0;$t<Dt.length;){for(var Xt=[0,0,0],Yt=[0,0,0,0],Zt=0;Zt<Xt.length;++Zt)$t<Dt.length?Xt[Zt]=255&Dt.charCodeAt($t++):Xt[Zt]=0;switch(Yt[0]=Xt[0]>>2,Yt[1]=(3&Xt[0])<<4|Xt[1]>>4,Yt[2]=(15&Xt[1])<<2|Xt[2]>>6,Yt[3]=63&Xt[2],$t-(Dt.length-1)){case 2:Yt[3]=64,Yt[2]=64;break;case 1:Yt[3]=64}for(Zt=0;Zt<Yt.length;++Zt)Lt+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(Yt[Zt])}return Lt})(vt.xhr.responseText),vt.type=zm.TYPE.IMAGE,void(vt.data.onload=function(){vt.data.onload=null,it()})}it()}else it()}}),Q1.registerPlugin(MT);var Dm,ap,ol=tt(0);/*!
* @pixi/compressed-textures - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/compressed-textures is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/(function(vt){vt[vt.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",vt[vt.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",vt[vt.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",vt[vt.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",vt[vt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",vt[vt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",vt[vt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",vt[vt.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",vt[vt.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",vt[vt.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",vt[vt.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",vt[vt.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",vt[vt.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",vt[vt.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",vt[vt.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",vt[vt.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",vt[vt.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",vt[vt.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",vt[vt.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",vt[vt.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",vt[vt.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",vt[vt.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",vt[vt.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",vt[vt.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",vt[vt.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",vt[vt.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"})(ap||(ap={}));var qE=((Dm={})[ap.COMPRESSED_RGB_S3TC_DXT1_EXT]=.5,Dm[ap.COMPRESSED_RGBA_S3TC_DXT1_EXT]=.5,Dm[ap.COMPRESSED_RGBA_S3TC_DXT3_EXT]=1,Dm[ap.COMPRESSED_RGBA_S3TC_DXT5_EXT]=1,Dm[ap.COMPRESSED_SRGB_S3TC_DXT1_EXT]=.5,Dm[ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]=.5,Dm[ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]=1,Dm[ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]=1,Dm[ap.COMPRESSED_R11_EAC]=.5,Dm[ap.COMPRESSED_SIGNED_R11_EAC]=.5,Dm[ap.COMPRESSED_RG11_EAC]=1,Dm[ap.COMPRESSED_SIGNED_RG11_EAC]=1,Dm[ap.COMPRESSED_RGB8_ETC2]=.5,Dm[ap.COMPRESSED_RGBA8_ETC2_EAC]=1,Dm[ap.COMPRESSED_SRGB8_ETC2]=.5,Dm[ap.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]=1,Dm[ap.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Dm[ap.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Dm[ap.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]=.5,Dm[ap.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]=.5,Dm[ap.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]=.25,Dm[ap.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]=.25,Dm[ap.COMPRESSED_RGB_ETC1_WEBGL]=.5,Dm[ap.COMPRESSED_RGB_ATC_WEBGL]=.5,Dm[ap.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]=1,Dm[ap.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]=1,Dm),yD=function(vt,it){return(yD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function WA(vt,it){function lt(){this.constructor=vt}yD(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}function tI(vt,it){var lt,pt,_t,Dt,Lt={label:0,sent:function(){if(1&_t[0])throw _t[1];return _t[1]},trys:[],ops:[]};return Dt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Dt[Symbol.iterator]=function(){return this}),Dt;function $t(Xt){return function(Yt){return(function(Zt){if(lt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(lt=1,pt&&(_t=2&Zt[0]?pt.return:Zt[0]?pt.throw||((_t=pt.return)&&_t.call(pt),0):pt.next)&&!(_t=_t.call(pt,Zt[1])).done)return _t;switch(pt=0,_t&&(Zt=[2&Zt[0],_t.value]),Zt[0]){case 0:case 1:_t=Zt;break;case 4:return Lt.label++,{value:Zt[1],done:!1};case 5:Lt.label++,pt=Zt[1],Zt=[0];continue;case 7:Zt=Lt.ops.pop(),Lt.trys.pop();continue;default:if(_t=Lt.trys,!((_t=_t.length>0&&_t[_t.length-1])||Zt[0]!==6&&Zt[0]!==2)){Lt=0;continue}if(Zt[0]===3&&(!_t||Zt[1]>_t[0]&&Zt[1]<_t[3])){Lt.label=Zt[1];break}if(Zt[0]===6&&Lt.label<_t[1]){Lt.label=_t[1],_t=Zt;break}if(_t&&Lt.label<_t[2]){Lt.label=_t[2],Lt.ops.push(Zt);break}_t[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Zt=it.call(vt,Lt)}catch(lr){Zt=[6,lr],pt=0}finally{lt=_t=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}})([Xt,Yt])}}}var _b,S1,Ll=(function(vt){function it(lt,pt){var _t=vt.call(this,lt,pt)||this;return _t.format=pt.format,_t.levels=pt.levels||1,_t._width=pt.width,_t._height=pt.height,_t._extension=it._formatToExtension(_t.format),(pt.levelBuffers||_t.buffer)&&(_t._levelBuffers=pt.levelBuffers||it._createLevelBuffers(lt instanceof Uint8Array?lt:_t.buffer.uint8View,_t.format,_t.levels,4,4,_t.width,_t.height)),_t}return WA(it,vt),it.prototype.upload=function(lt,pt,_t){var Dt=lt.gl;if(!lt.context.extensions[this._extension])throw new Error(this._extension+" textures are not supported on the current machine");if(!this._levelBuffers)return!1;for(var Lt=0,$t=this.levels;Lt<$t;Lt++){var Xt=this._levelBuffers[Lt],Yt=Xt.levelID,Zt=Xt.levelWidth,lr=Xt.levelHeight,xr=Xt.levelBuffer;Dt.compressedTexImage2D(Dt.TEXTURE_2D,Yt,this.format,Zt,lr,0,xr)}return!0},it.prototype.onBlobLoaded=function(){this._levelBuffers=it._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)},it._formatToExtension=function(lt){if(lt>=33776&&lt<=33779)return"s3tc";if(lt>=37488&&lt<=37497)return"etc";if(lt>=35840&&lt<=35843)return"pvrtc";if(lt>=36196)return"etc1";if(lt>=35986&&lt<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},it._createLevelBuffers=function(lt,pt,_t,Dt,Lt,$t,Xt){for(var Yt=new Array(_t),Zt=lt.byteOffset,lr=$t,xr=Xt,wr=lr+Dt-1&~(Dt-1),Ir=xr+Lt-1&~(Lt-1),kr=wr*Ir*qE[pt],Lr=0;Lr<_t;Lr++)Yt[Lr]={levelID:Lr,levelWidth:_t>1?lr:wr,levelHeight:_t>1?xr:Ir,levelBuffer:new Uint8Array(lt.buffer,Zt,kr)},Zt+=kr,kr=(wr=(lr=lr>>1||1)+Dt-1&~(Dt-1))*(Ir=(xr=xr>>1||1)+Lt-1&~(Lt-1))*qE[pt];return Yt},it})((function(vt){function it(lt,pt){pt===void 0&&(pt={width:1,height:1,autoLoad:!0});var _t,Dt,Lt=this;return typeof lt=="string"?(_t=lt,Dt=new Uint8Array):(_t=null,Dt=lt),(Lt=vt.call(this,Dt,pt)||this).origin=_t,Lt.buffer=Dt?new ps.x(Dt):null,Lt.origin&&pt.autoLoad!==!1&&Lt.load(),Dt&&Dt.length&&(Lt.loaded=!0,Lt.onBlobLoaded(Lt.buffer.rawBinaryData)),Lt}return WA(it,vt),it.prototype.onBlobLoaded=function(lt){},it.prototype.load=function(){return lt=this,pt=void 0,Dt=function(){var Lt;return tI(this,function($t){switch($t.label){case 0:return[4,fetch(this.origin)];case 1:return[4,$t.sent().blob()];case 2:return[4,$t.sent().arrayBuffer()];case 3:return Lt=$t.sent(),this.data=new Uint32Array(Lt),this.buffer=new ps.x(Lt),this.loaded=!0,this.onBlobLoaded(Lt),this.update(),[2,this]}})},new((_t=Promise)||(_t=Promise))(function(Lt,$t){function Xt(lr){try{Zt(Dt.next(lr))}catch(xr){$t(xr)}}function Yt(lr){try{Zt(Dt.throw(lr))}catch(xr){$t(xr)}}function Zt(lr){lr.done?Lt(lr.value):new _t(function(xr){xr(lr.value)}).then(Xt,Yt)}Zt((Dt=Dt.apply(lt,pt||[])).next())});var lt,pt,_t,Dt},it})(ps.i)),Zm=(function(){function vt(){}return vt.use=function(it,lt){var pt=it.data;if(it.type===zm.TYPE.JSON&&pt&&pt.cacheID&&pt.textures){for(var _t=pt.textures,Dt=void 0,Lt=void 0,$t=0,Xt=_t.length;$t<Xt;$t++){var Yt=_t[$t],Zt=Yt.src,lr=Yt.format;if(lr||(Lt=Zt),vt.textureFormats[lr]){Dt=Zt;break}}if(!(Dt=Dt||Lt))return void lt(new Error("Cannot load compressed-textures in "+it.url+", make sure you provide a fallback"));if(Dt===it.url)return void lt(new Error("URL of compressed texture cannot be the same as the manifest's URL"));var xr={crossOrigin:it.crossOrigin,metadata:it.metadata.imageMetadata,parentResource:it},wr=cl.url.resolve(it.url.replace(this.baseUrl,""),Dt),Ir=pt.cacheID;this.add(Ir,wr,xr,function(kr){if(kr.error)lt(kr.error);else{var Lr=kr.texture,Xr=Lr===void 0?null:Lr,_n=kr.textures,On=_n===void 0?{}:_n;Object.assign(it,{texture:Xr,textures:On}),lt()}})}else lt()},Object.defineProperty(vt,"textureExtensions",{get:function(){if(!vt._textureExtensions){var it=document.createElement("canvas").getContext("webgl");if(!it)return console.warn("WebGL not available for compressed textures. Silently failing."),{};var lt={s3tc:it.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:it.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:it.getExtension("WEBGL_compressed_texture_etc"),etc1:it.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:it.getExtension("WEBGL_compressed_texture_pvrtc")||it.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:it.getExtension("WEBGL_compressed_texture_atc"),astc:it.getExtension("WEBGL_compressed_texture_astc")};vt._textureExtensions=lt}return vt._textureExtensions},enumerable:!1,configurable:!0}),Object.defineProperty(vt,"textureFormats",{get:function(){if(!vt._textureFormats){var it=vt.textureExtensions;for(var lt in vt._textureFormats={},it){var pt=it[lt];pt&&Object.assign(vt._textureFormats,Object.getPrototypeOf(pt))}}return vt._textureFormats},enumerable:!1,configurable:!0}),vt})();function Ls(vt,it,lt){var pt={textures:{},texture:null};return it&&it.map(function(_t){return new ps.t(new ps.c(_t,Object.assign({mipmap:ol.k.OFF,alphaMode:ol.a.NO_PREMULTIPLIED_ALPHA},lt)))}).forEach(function(_t,Dt){var Lt=_t.baseTexture,$t=vt+"-"+(Dt+1);ps.c.addToCache(Lt,$t),ps.t.addToCache(_t,$t),Dt===0&&(ps.c.addToCache(Lt,vt),ps.t.addToCache(_t,vt),pt.texture=_t),pt.textures[$t]=_t}),pt}zm.setExtensionXhrType("dds",zm.XHR_RESPONSE_TYPE.BUFFER);var By,o0,Jm=3,rI=4,Jx=7,bD=19,wb=2,IT=0,nI=1,eS=2,LE=3;(function(vt){vt[vt.DXGI_FORMAT_UNKNOWN=0]="DXGI_FORMAT_UNKNOWN",vt[vt.DXGI_FORMAT_R32G32B32A32_TYPELESS=1]="DXGI_FORMAT_R32G32B32A32_TYPELESS",vt[vt.DXGI_FORMAT_R32G32B32A32_FLOAT=2]="DXGI_FORMAT_R32G32B32A32_FLOAT",vt[vt.DXGI_FORMAT_R32G32B32A32_UINT=3]="DXGI_FORMAT_R32G32B32A32_UINT",vt[vt.DXGI_FORMAT_R32G32B32A32_SINT=4]="DXGI_FORMAT_R32G32B32A32_SINT",vt[vt.DXGI_FORMAT_R32G32B32_TYPELESS=5]="DXGI_FORMAT_R32G32B32_TYPELESS",vt[vt.DXGI_FORMAT_R32G32B32_FLOAT=6]="DXGI_FORMAT_R32G32B32_FLOAT",vt[vt.DXGI_FORMAT_R32G32B32_UINT=7]="DXGI_FORMAT_R32G32B32_UINT",vt[vt.DXGI_FORMAT_R32G32B32_SINT=8]="DXGI_FORMAT_R32G32B32_SINT",vt[vt.DXGI_FORMAT_R16G16B16A16_TYPELESS=9]="DXGI_FORMAT_R16G16B16A16_TYPELESS",vt[vt.DXGI_FORMAT_R16G16B16A16_FLOAT=10]="DXGI_FORMAT_R16G16B16A16_FLOAT",vt[vt.DXGI_FORMAT_R16G16B16A16_UNORM=11]="DXGI_FORMAT_R16G16B16A16_UNORM",vt[vt.DXGI_FORMAT_R16G16B16A16_UINT=12]="DXGI_FORMAT_R16G16B16A16_UINT",vt[vt.DXGI_FORMAT_R16G16B16A16_SNORM=13]="DXGI_FORMAT_R16G16B16A16_SNORM",vt[vt.DXGI_FORMAT_R16G16B16A16_SINT=14]="DXGI_FORMAT_R16G16B16A16_SINT",vt[vt.DXGI_FORMAT_R32G32_TYPELESS=15]="DXGI_FORMAT_R32G32_TYPELESS",vt[vt.DXGI_FORMAT_R32G32_FLOAT=16]="DXGI_FORMAT_R32G32_FLOAT",vt[vt.DXGI_FORMAT_R32G32_UINT=17]="DXGI_FORMAT_R32G32_UINT",vt[vt.DXGI_FORMAT_R32G32_SINT=18]="DXGI_FORMAT_R32G32_SINT",vt[vt.DXGI_FORMAT_R32G8X24_TYPELESS=19]="DXGI_FORMAT_R32G8X24_TYPELESS",vt[vt.DXGI_FORMAT_D32_FLOAT_S8X24_UINT=20]="DXGI_FORMAT_D32_FLOAT_S8X24_UINT",vt[vt.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS=21]="DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS",vt[vt.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT=22]="DXGI_FORMAT_X32_TYPELESS_G8X24_UINT",vt[vt.DXGI_FORMAT_R10G10B10A2_TYPELESS=23]="DXGI_FORMAT_R10G10B10A2_TYPELESS",vt[vt.DXGI_FORMAT_R10G10B10A2_UNORM=24]="DXGI_FORMAT_R10G10B10A2_UNORM",vt[vt.DXGI_FORMAT_R10G10B10A2_UINT=25]="DXGI_FORMAT_R10G10B10A2_UINT",vt[vt.DXGI_FORMAT_R11G11B10_FLOAT=26]="DXGI_FORMAT_R11G11B10_FLOAT",vt[vt.DXGI_FORMAT_R8G8B8A8_TYPELESS=27]="DXGI_FORMAT_R8G8B8A8_TYPELESS",vt[vt.DXGI_FORMAT_R8G8B8A8_UNORM=28]="DXGI_FORMAT_R8G8B8A8_UNORM",vt[vt.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB=29]="DXGI_FORMAT_R8G8B8A8_UNORM_SRGB",vt[vt.DXGI_FORMAT_R8G8B8A8_UINT=30]="DXGI_FORMAT_R8G8B8A8_UINT",vt[vt.DXGI_FORMAT_R8G8B8A8_SNORM=31]="DXGI_FORMAT_R8G8B8A8_SNORM",vt[vt.DXGI_FORMAT_R8G8B8A8_SINT=32]="DXGI_FORMAT_R8G8B8A8_SINT",vt[vt.DXGI_FORMAT_R16G16_TYPELESS=33]="DXGI_FORMAT_R16G16_TYPELESS",vt[vt.DXGI_FORMAT_R16G16_FLOAT=34]="DXGI_FORMAT_R16G16_FLOAT",vt[vt.DXGI_FORMAT_R16G16_UNORM=35]="DXGI_FORMAT_R16G16_UNORM",vt[vt.DXGI_FORMAT_R16G16_UINT=36]="DXGI_FORMAT_R16G16_UINT",vt[vt.DXGI_FORMAT_R16G16_SNORM=37]="DXGI_FORMAT_R16G16_SNORM",vt[vt.DXGI_FORMAT_R16G16_SINT=38]="DXGI_FORMAT_R16G16_SINT",vt[vt.DXGI_FORMAT_R32_TYPELESS=39]="DXGI_FORMAT_R32_TYPELESS",vt[vt.DXGI_FORMAT_D32_FLOAT=40]="DXGI_FORMAT_D32_FLOAT",vt[vt.DXGI_FORMAT_R32_FLOAT=41]="DXGI_FORMAT_R32_FLOAT",vt[vt.DXGI_FORMAT_R32_UINT=42]="DXGI_FORMAT_R32_UINT",vt[vt.DXGI_FORMAT_R32_SINT=43]="DXGI_FORMAT_R32_SINT",vt[vt.DXGI_FORMAT_R24G8_TYPELESS=44]="DXGI_FORMAT_R24G8_TYPELESS",vt[vt.DXGI_FORMAT_D24_UNORM_S8_UINT=45]="DXGI_FORMAT_D24_UNORM_S8_UINT",vt[vt.DXGI_FORMAT_R24_UNORM_X8_TYPELESS=46]="DXGI_FORMAT_R24_UNORM_X8_TYPELESS",vt[vt.DXGI_FORMAT_X24_TYPELESS_G8_UINT=47]="DXGI_FORMAT_X24_TYPELESS_G8_UINT",vt[vt.DXGI_FORMAT_R8G8_TYPELESS=48]="DXGI_FORMAT_R8G8_TYPELESS",vt[vt.DXGI_FORMAT_R8G8_UNORM=49]="DXGI_FORMAT_R8G8_UNORM",vt[vt.DXGI_FORMAT_R8G8_UINT=50]="DXGI_FORMAT_R8G8_UINT",vt[vt.DXGI_FORMAT_R8G8_SNORM=51]="DXGI_FORMAT_R8G8_SNORM",vt[vt.DXGI_FORMAT_R8G8_SINT=52]="DXGI_FORMAT_R8G8_SINT",vt[vt.DXGI_FORMAT_R16_TYPELESS=53]="DXGI_FORMAT_R16_TYPELESS",vt[vt.DXGI_FORMAT_R16_FLOAT=54]="DXGI_FORMAT_R16_FLOAT",vt[vt.DXGI_FORMAT_D16_UNORM=55]="DXGI_FORMAT_D16_UNORM",vt[vt.DXGI_FORMAT_R16_UNORM=56]="DXGI_FORMAT_R16_UNORM",vt[vt.DXGI_FORMAT_R16_UINT=57]="DXGI_FORMAT_R16_UINT",vt[vt.DXGI_FORMAT_R16_SNORM=58]="DXGI_FORMAT_R16_SNORM",vt[vt.DXGI_FORMAT_R16_SINT=59]="DXGI_FORMAT_R16_SINT",vt[vt.DXGI_FORMAT_R8_TYPELESS=60]="DXGI_FORMAT_R8_TYPELESS",vt[vt.DXGI_FORMAT_R8_UNORM=61]="DXGI_FORMAT_R8_UNORM",vt[vt.DXGI_FORMAT_R8_UINT=62]="DXGI_FORMAT_R8_UINT",vt[vt.DXGI_FORMAT_R8_SNORM=63]="DXGI_FORMAT_R8_SNORM",vt[vt.DXGI_FORMAT_R8_SINT=64]="DXGI_FORMAT_R8_SINT",vt[vt.DXGI_FORMAT_A8_UNORM=65]="DXGI_FORMAT_A8_UNORM",vt[vt.DXGI_FORMAT_R1_UNORM=66]="DXGI_FORMAT_R1_UNORM",vt[vt.DXGI_FORMAT_R9G9B9E5_SHAREDEXP=67]="DXGI_FORMAT_R9G9B9E5_SHAREDEXP",vt[vt.DXGI_FORMAT_R8G8_B8G8_UNORM=68]="DXGI_FORMAT_R8G8_B8G8_UNORM",vt[vt.DXGI_FORMAT_G8R8_G8B8_UNORM=69]="DXGI_FORMAT_G8R8_G8B8_UNORM",vt[vt.DXGI_FORMAT_BC1_TYPELESS=70]="DXGI_FORMAT_BC1_TYPELESS",vt[vt.DXGI_FORMAT_BC1_UNORM=71]="DXGI_FORMAT_BC1_UNORM",vt[vt.DXGI_FORMAT_BC1_UNORM_SRGB=72]="DXGI_FORMAT_BC1_UNORM_SRGB",vt[vt.DXGI_FORMAT_BC2_TYPELESS=73]="DXGI_FORMAT_BC2_TYPELESS",vt[vt.DXGI_FORMAT_BC2_UNORM=74]="DXGI_FORMAT_BC2_UNORM",vt[vt.DXGI_FORMAT_BC2_UNORM_SRGB=75]="DXGI_FORMAT_BC2_UNORM_SRGB",vt[vt.DXGI_FORMAT_BC3_TYPELESS=76]="DXGI_FORMAT_BC3_TYPELESS",vt[vt.DXGI_FORMAT_BC3_UNORM=77]="DXGI_FORMAT_BC3_UNORM",vt[vt.DXGI_FORMAT_BC3_UNORM_SRGB=78]="DXGI_FORMAT_BC3_UNORM_SRGB",vt[vt.DXGI_FORMAT_BC4_TYPELESS=79]="DXGI_FORMAT_BC4_TYPELESS",vt[vt.DXGI_FORMAT_BC4_UNORM=80]="DXGI_FORMAT_BC4_UNORM",vt[vt.DXGI_FORMAT_BC4_SNORM=81]="DXGI_FORMAT_BC4_SNORM",vt[vt.DXGI_FORMAT_BC5_TYPELESS=82]="DXGI_FORMAT_BC5_TYPELESS",vt[vt.DXGI_FORMAT_BC5_UNORM=83]="DXGI_FORMAT_BC5_UNORM",vt[vt.DXGI_FORMAT_BC5_SNORM=84]="DXGI_FORMAT_BC5_SNORM",vt[vt.DXGI_FORMAT_B5G6R5_UNORM=85]="DXGI_FORMAT_B5G6R5_UNORM",vt[vt.DXGI_FORMAT_B5G5R5A1_UNORM=86]="DXGI_FORMAT_B5G5R5A1_UNORM",vt[vt.DXGI_FORMAT_B8G8R8A8_UNORM=87]="DXGI_FORMAT_B8G8R8A8_UNORM",vt[vt.DXGI_FORMAT_B8G8R8X8_UNORM=88]="DXGI_FORMAT_B8G8R8X8_UNORM",vt[vt.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM=89]="DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM",vt[vt.DXGI_FORMAT_B8G8R8A8_TYPELESS=90]="DXGI_FORMAT_B8G8R8A8_TYPELESS",vt[vt.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB=91]="DXGI_FORMAT_B8G8R8A8_UNORM_SRGB",vt[vt.DXGI_FORMAT_B8G8R8X8_TYPELESS=92]="DXGI_FORMAT_B8G8R8X8_TYPELESS",vt[vt.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB=93]="DXGI_FORMAT_B8G8R8X8_UNORM_SRGB",vt[vt.DXGI_FORMAT_BC6H_TYPELESS=94]="DXGI_FORMAT_BC6H_TYPELESS",vt[vt.DXGI_FORMAT_BC6H_UF16=95]="DXGI_FORMAT_BC6H_UF16",vt[vt.DXGI_FORMAT_BC6H_SF16=96]="DXGI_FORMAT_BC6H_SF16",vt[vt.DXGI_FORMAT_BC7_TYPELESS=97]="DXGI_FORMAT_BC7_TYPELESS",vt[vt.DXGI_FORMAT_BC7_UNORM=98]="DXGI_FORMAT_BC7_UNORM",vt[vt.DXGI_FORMAT_BC7_UNORM_SRGB=99]="DXGI_FORMAT_BC7_UNORM_SRGB",vt[vt.DXGI_FORMAT_AYUV=100]="DXGI_FORMAT_AYUV",vt[vt.DXGI_FORMAT_Y410=101]="DXGI_FORMAT_Y410",vt[vt.DXGI_FORMAT_Y416=102]="DXGI_FORMAT_Y416",vt[vt.DXGI_FORMAT_NV12=103]="DXGI_FORMAT_NV12",vt[vt.DXGI_FORMAT_P010=104]="DXGI_FORMAT_P010",vt[vt.DXGI_FORMAT_P016=105]="DXGI_FORMAT_P016",vt[vt.DXGI_FORMAT_420_OPAQUE=106]="DXGI_FORMAT_420_OPAQUE",vt[vt.DXGI_FORMAT_YUY2=107]="DXGI_FORMAT_YUY2",vt[vt.DXGI_FORMAT_Y210=108]="DXGI_FORMAT_Y210",vt[vt.DXGI_FORMAT_Y216=109]="DXGI_FORMAT_Y216",vt[vt.DXGI_FORMAT_NV11=110]="DXGI_FORMAT_NV11",vt[vt.DXGI_FORMAT_AI44=111]="DXGI_FORMAT_AI44",vt[vt.DXGI_FORMAT_IA44=112]="DXGI_FORMAT_IA44",vt[vt.DXGI_FORMAT_P8=113]="DXGI_FORMAT_P8",vt[vt.DXGI_FORMAT_A8P8=114]="DXGI_FORMAT_A8P8",vt[vt.DXGI_FORMAT_B4G4R4A4_UNORM=115]="DXGI_FORMAT_B4G4R4A4_UNORM",vt[vt.DXGI_FORMAT_P208=116]="DXGI_FORMAT_P208",vt[vt.DXGI_FORMAT_V208=117]="DXGI_FORMAT_V208",vt[vt.DXGI_FORMAT_V408=118]="DXGI_FORMAT_V408",vt[vt.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE=119]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE",vt[vt.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE=120]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE",vt[vt.DXGI_FORMAT_FORCE_UINT=121]="DXGI_FORMAT_FORCE_UINT"})(By||(By={})),(function(vt){vt[vt.DDS_DIMENSION_TEXTURE1D=2]="DDS_DIMENSION_TEXTURE1D",vt[vt.DDS_DIMENSION_TEXTURE2D=3]="DDS_DIMENSION_TEXTURE2D",vt[vt.DDS_DIMENSION_TEXTURE3D=6]="DDS_DIMENSION_TEXTURE3D"})(o0||(o0={}));var tS,u0,RT,Ax=((_b={})[827611204]=ap.COMPRESSED_RGBA_S3TC_DXT1_EXT,_b[861165636]=ap.COMPRESSED_RGBA_S3TC_DXT3_EXT,_b[894720068]=ap.COMPRESSED_RGBA_S3TC_DXT5_EXT,_b),Mv=((S1={})[By.DXGI_FORMAT_BC1_TYPELESS]=ap.COMPRESSED_RGBA_S3TC_DXT1_EXT,S1[By.DXGI_FORMAT_BC1_UNORM]=ap.COMPRESSED_RGBA_S3TC_DXT1_EXT,S1[By.DXGI_FORMAT_BC2_TYPELESS]=ap.COMPRESSED_RGBA_S3TC_DXT3_EXT,S1[By.DXGI_FORMAT_BC2_UNORM]=ap.COMPRESSED_RGBA_S3TC_DXT3_EXT,S1[By.DXGI_FORMAT_BC3_TYPELESS]=ap.COMPRESSED_RGBA_S3TC_DXT5_EXT,S1[By.DXGI_FORMAT_BC3_UNORM]=ap.COMPRESSED_RGBA_S3TC_DXT5_EXT,S1[By.DXGI_FORMAT_BC1_UNORM_SRGB]=ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,S1[By.DXGI_FORMAT_BC2_UNORM_SRGB]=ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,S1[By.DXGI_FORMAT_BC3_UNORM_SRGB]=ap.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,S1),Fv=(function(){function vt(){}return vt.use=function(it,lt){if(it.extension==="dds"&&it.data)try{Object.assign(it,Ls(it.name||it.url,vt.parse(it.data),it.metadata))}catch(pt){return void lt(pt)}lt()},vt.parse=function(it){var lt=new Uint32Array(it);if(lt[0]!==542327876)throw new Error("Invalid DDS file magic word");var pt=new Uint32Array(it,0,124/Uint32Array.BYTES_PER_ELEMENT),_t=pt[Jm],Dt=pt[rI],Lt=pt[Jx],$t=new Uint32Array(it,bD*Uint32Array.BYTES_PER_ELEMENT,32/Uint32Array.BYTES_PER_ELEMENT),Xt=$t[1];if(4&Xt){var Yt=$t[wb];if(Yt!==808540228){var Zt=Ax[Yt],lr=new Uint8Array(it,128);return[new Ll(lr,{format:Zt,width:Dt,height:_t,levels:Lt})]}var xr=new Uint32Array(lt.buffer,128,20/Uint32Array.BYTES_PER_ELEMENT),wr=xr[IT],Ir=xr[nI],kr=xr[eS],Lr=xr[LE],Xr=Mv[wr];if(Xr===void 0)throw new Error("DDSLoader cannot parse texture data with DXGI format "+wr);if(kr===4)throw new Error("DDSLoader does not support cubemap textures");if(Ir===o0.DDS_DIMENSION_TEXTURE3D)throw new Error("DDSLoader does not supported 3D texture data");var _n=new Array;if(Lr===1)_n.push(new Uint8Array(it,148));else{for(var On=qE[Xr],Kn=0,Mn=Dt,ca=_t,Gn=0;Gn<Lt;Gn++)Kn+=Math.max(1,Mn+3&-4)*Math.max(1,ca+3&-4)*On,Mn>>>=1,ca>>>=1;var Qn=148;for(Gn=0;Gn<Lr;Gn++)_n.push(new Uint8Array(it,Qn,Kn)),Qn+=Kn}return _n.map(function(ks){return new Ll(ks,{format:Xr,width:Dt,height:_t,levels:Lt})})}throw 64&Xt?new Error("DDSLoader does not support uncompressed texture data."):512&Xt?new Error("DDSLoader does not supported YUV uncompressed texture data."):131072&Xt?new Error("DDSLoader does not support single-channel (lumninance) texture data!"):2&Xt?new Error("DDSLoader does not support single-channel (alpha) texture data!"):new Error("DDSLoader failed to load a texture file due to an unknown reason!")},vt})();zm.setExtensionXhrType("ktx",zm.XHR_RESPONSE_TYPE.BUFFER);var PT=[171,75,84,88,32,49,49,187,13,10,26,10],iI=12,aI=16,sI=24,oI=28,_D=36,uI=40,xD=44,rS=48,FE=52,x_=56,NT=60,P0=((tS={})[ol.r.UNSIGNED_BYTE]=1,tS[ol.r.UNSIGNED_SHORT]=2,tS[ol.r.INT]=4,tS[ol.r.UNSIGNED_INT]=4,tS[ol.r.FLOAT]=4,tS[ol.r.HALF_FLOAT]=8,tS),km=((u0={})[ol.h.RGBA]=4,u0[ol.h.RGB]=3,u0[ol.h.RG]=2,u0[ol.h.RED]=1,u0[ol.h.LUMINANCE]=1,u0[ol.h.LUMINANCE_ALPHA]=2,u0[ol.h.ALPHA]=1,u0),kw=((RT={})[ol.r.UNSIGNED_SHORT_4_4_4_4]=2,RT[ol.r.UNSIGNED_SHORT_5_5_5_1]=2,RT[ol.r.UNSIGNED_SHORT_5_6_5]=2,RT),SD=(function(){function vt(){}return vt.use=function(it,lt){if(it.extension==="ktx"&&it.data)try{var pt=it.name||it.url,_t=vt.parse(pt,it.data),Dt=_t.compressed,Lt=_t.uncompressed,$t=_t.kvData;if(Dt){var Xt=Ls(pt,Dt,it.metadata);if($t&&Xt.textures)for(var Yt in Xt.textures)Xt.textures[Yt].baseTexture.ktxKeyValueData=$t;Object.assign(it,Xt)}else if(Lt){var Zt={};Lt.forEach(function(lr,xr){var wr=new ps.t(new ps.c(lr.resource,{mipmap:ol.k.OFF,alphaMode:ol.a.NO_PREMULTIPLIED_ALPHA,type:lr.type,format:lr.format})),Ir=pt+"-"+(xr+1);$t&&(wr.baseTexture.ktxKeyValueData=$t),ps.c.addToCache(wr.baseTexture,Ir),ps.t.addToCache(wr,Ir),xr===0&&(Zt[pt]=wr,ps.c.addToCache(wr.baseTexture,pt),ps.t.addToCache(wr,pt)),Zt[Ir]=wr}),Object.assign(it,{textures:Zt})}}catch(lr){return void lt(lr)}lt()},vt.parse=function(it,lt){var pt=new DataView(lt);if(!vt.validate(it,pt))return null;var _t=pt.getUint32(iI,!0)===67305985,Dt=pt.getUint32(aI,_t),Lt=pt.getUint32(sI,_t),$t=pt.getUint32(oI,_t),Xt=pt.getUint32(_D,_t),Yt=pt.getUint32(uI,_t)||1,Zt=pt.getUint32(xD,_t)||1,lr=pt.getUint32(rS,_t)||1,xr=pt.getUint32(FE,_t),wr=pt.getUint32(x_,_t),Ir=pt.getUint32(NT,_t);if(Yt===0||Zt!==1)throw new Error("Only 2D textures are supported");if(xr!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(lr!==1)throw new Error("WebGL does not support array textures");var kr,Lr=Xt+3&-4,Xr=Yt+3&-4,_n=new Array(lr),On=Xt*Yt;if(Dt===0&&(On=Lr*Xr),(kr=Dt!==0?P0[Dt]?P0[Dt]*km[Lt]:kw[Dt]:qE[$t])===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var Kn=vt.loadKeyValueData?vt.parseKvData(pt,Ir,_t):null,Mn=On*kr,ca=Xt,Gn=Yt,Qn=Lr,ks=Xr,Cs=64+Ir,gs=0;gs<wr;gs++){for(var _s=pt.getUint32(Cs,_t),Ts=Cs+4,ws=0;ws<lr;ws++){var oo=_n[ws];oo||(oo=_n[ws]=new Array(wr)),oo[gs]={levelID:gs,levelWidth:wr>1||Dt!==0?ca:Qn,levelHeight:wr>1||Dt!==0?Gn:ks,levelBuffer:new Uint8Array(lt,Ts,Mn)},Ts+=Mn}Cs=(Cs+=_s+4)%4!=0?Cs+4-Cs%4:Cs,Mn=(Qn=(ca=ca>>1||1)+4-1&-4)*(ks=(Gn=Gn>>1||1)+4-1&-4)*kr}return Dt!==0?{uncompressed:_n.map(function(no){var js=no[0].levelBuffer,Ws=!1;return Dt===ol.r.FLOAT?js=new Float32Array(no[0].levelBuffer.buffer,no[0].levelBuffer.byteOffset,no[0].levelBuffer.byteLength/4):Dt===ol.r.UNSIGNED_INT?(Ws=!0,js=new Uint32Array(no[0].levelBuffer.buffer,no[0].levelBuffer.byteOffset,no[0].levelBuffer.byteLength/4)):Dt===ol.r.INT&&(Ws=!0,js=new Int32Array(no[0].levelBuffer.buffer,no[0].levelBuffer.byteOffset,no[0].levelBuffer.byteLength/4)),{resource:new ps.i(js,{width:no[0].levelWidth,height:no[0].levelHeight}),type:Dt,format:Ws?vt.convertFormatToInteger(Lt):Lt}}),kvData:Kn}:{compressed:_n.map(function(no){return new Ll(null,{format:$t,width:Xt,height:Yt,levels:wr,levelBuffers:no})}),kvData:Kn}},vt.validate=function(it,lt){for(var pt=0;pt<PT.length;pt++)if(lt.getUint8(pt)!==PT[pt])return console.error(it+" is not a valid *.ktx file!"),!1;return!0},vt.convertFormatToInteger=function(it){switch(it){case ol.h.RGBA:return ol.h.RGBA_INTEGER;case ol.h.RGB:return ol.h.RGB_INTEGER;case ol.h.RG:return ol.h.RG_INTEGER;case ol.h.RED:return ol.h.RED_INTEGER;default:return it}},vt.parseKvData=function(it,lt,pt){for(var _t=new Map,Dt=0;Dt<lt;){var Lt=it.getUint32(64+Dt,pt),$t=64+Dt+4,Xt=3-(Lt+3)%4;if(Lt===0||Lt>lt-Dt){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}for(var Yt=0;Yt<Lt&&it.getUint8($t+Yt)!==0;Yt++);if(Yt===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}var Zt=new TextDecoder().decode(new Uint8Array(it.buffer,$t,Yt)),lr=new DataView(it.buffer,$t+Yt+1,Lt-Yt-1);_t.set(Zt,lr),Dt+=4+Lt+Xt}return _t},vt.loadKeyValueData=!1,vt})(),wD=function(vt,it){return(wD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function TD(vt,it){function lt(){this.constructor=vt}wD(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}var H_,nS,XA=(function(vt){function it(lt,pt,_t,Dt){lt===void 0&&(lt=1500),_t===void 0&&(_t=16384),Dt===void 0&&(Dt=!1);var Lt=vt.call(this)||this;return _t>16384&&(_t=16384),Lt._properties=[!1,!0,!1,!1,!1],Lt._maxSize=lt,Lt._batchSize=_t,Lt._buffers=null,Lt._bufferUpdateIDs=[],Lt._updateID=0,Lt.interactiveChildren=!1,Lt.blendMode=ol.b.NORMAL,Lt.autoResize=Dt,Lt.roundPixels=!0,Lt.baseTexture=null,Lt.setProperties(pt),Lt._tint=0,Lt.tintRgb=new Float32Array(4),Lt.tint=16777215,Lt}return TD(it,vt),it.prototype.setProperties=function(lt){lt&&(this._properties[0]="vertices"in lt||"scale"in lt?!!lt.vertices||!!lt.scale:this._properties[0],this._properties[1]="position"in lt?!!lt.position:this._properties[1],this._properties[2]="rotation"in lt?!!lt.rotation:this._properties[2],this._properties[3]="uvs"in lt?!!lt.uvs:this._properties[3],this._properties[4]="tint"in lt||"alpha"in lt?!!lt.tint||!!lt.alpha:this._properties[4])},it.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(it.prototype,"tint",{get:function(){return this._tint},set:function(lt){this._tint=lt,Object(cl.hex2rgb)(lt,this.tintRgb)},enumerable:!1,configurable:!0}),it.prototype.render=function(lt){var pt=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 pt.onChildrenChange(0)})),lt.batch.setObjectRenderer(lt.plugins.particle),lt.plugins.particle.render(this))},it.prototype.onChildrenChange=function(lt){for(var pt=Math.floor(lt/this._batchSize);this._bufferUpdateIDs.length<pt;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[pt]=++this._updateID},it.prototype.dispose=function(){if(this._buffers){for(var lt=0;lt<this._buffers.length;++lt)this._buffers[lt].destroy();this._buffers=null}},it.prototype.destroy=function(lt){vt.prototype.destroy.call(this,lt),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},it})(Ol.b),K1=(function(){function vt(it,lt,pt){this.geometry=new ps.l,this.indexBuffer=null,this.size=pt,this.dynamicProperties=[],this.staticProperties=[];for(var _t=0;_t<it.length;++_t){var Dt=it[_t];Dt={attributeName:Dt.attributeName,size:Dt.size,uploadFunction:Dt.uploadFunction,type:Dt.type||ol.r.FLOAT,offset:Dt.offset},lt[_t]?this.dynamicProperties.push(Dt):this.staticProperties.push(Dt)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return vt.prototype.initBuffers=function(){var it=this.geometry,lt=0;this.indexBuffer=new ps.h(Object(cl.createIndicesForQuads)(this.size),!0,!0),it.addIndex(this.indexBuffer),this.dynamicStride=0;for(var pt=0;pt<this.dynamicProperties.length;++pt)($t=this.dynamicProperties[pt]).offset=lt,lt+=$t.size,this.dynamicStride+=$t.size;var _t=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(_t),this.dynamicDataUint32=new Uint32Array(_t),this.dynamicBuffer=new ps.h(this.dynamicData,!1,!1);var Dt=0;for(this.staticStride=0,pt=0;pt<this.staticProperties.length;++pt)($t=this.staticProperties[pt]).offset=Dt,Dt+=$t.size,this.staticStride+=$t.size;var Lt=new ArrayBuffer(this.size*this.staticStride*4*4);for(this.staticData=new Float32Array(Lt),this.staticDataUint32=new Uint32Array(Lt),this.staticBuffer=new ps.h(this.staticData,!0,!1),pt=0;pt<this.dynamicProperties.length;++pt){var $t=this.dynamicProperties[pt];it.addAttribute($t.attributeName,this.dynamicBuffer,0,$t.type===ol.r.UNSIGNED_BYTE,$t.type,4*this.dynamicStride,4*$t.offset)}for(pt=0;pt<this.staticProperties.length;++pt)$t=this.staticProperties[pt],it.addAttribute($t.attributeName,this.staticBuffer,0,$t.type===ol.r.UNSIGNED_BYTE,$t.type,4*this.staticStride,4*$t.offset)},vt.prototype.uploadDynamic=function(it,lt,pt){for(var _t=0;_t<this.dynamicProperties.length;_t++){var Dt=this.dynamicProperties[_t];Dt.uploadFunction(it,lt,pt,Dt.type===ol.r.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,Dt.offset)}this.dynamicBuffer._updateID++},vt.prototype.uploadStatic=function(it,lt,pt){for(var _t=0;_t<this.staticProperties.length;_t++){var Dt=this.staticProperties[_t];Dt.uploadFunction(it,lt,pt,Dt.type===ol.r.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,Dt.offset)}this.staticBuffer._updateID++},vt.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()},vt})(),Xc=(function(vt){function it(lt){var pt=vt.call(this,lt)||this;return pt.shader=null,pt.properties=null,pt.tempMatrix=new Ho.d,pt.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:pt.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:pt.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:pt.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:pt.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:ol.r.UNSIGNED_BYTE,uploadFunction:pt.uploadTint,offset:0}],pt.shader=ps.r.from(`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute vec2 aPositionCoord;
attribute float aRotation;
uniform mat3 translationMatrix;
uniform vec4 uColor;
varying vec2 vTextureCoord;
varying vec4 vColor;
void main(void){
float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);
float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);
vec2 v = vec2(x, y);
v = v + aPositionCoord;
gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vColor = aColor * uColor;
}
`,`varying vec2 vTextureCoord;
varying vec4 vColor;
uniform sampler2D uSampler;
void main(void){
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
gl_FragColor = color;
}`,{}),pt.state=ps.s.for2d(),pt}return TD(it,vt),it.prototype.render=function(lt){var pt=lt.children,_t=lt._maxSize,Dt=lt._batchSize,Lt=this.renderer,$t=pt.length;if($t!==0){$t>_t&&!lt.autoResize&&($t=_t);var Xt=lt._buffers;Xt||(Xt=lt._buffers=this.generateBuffers(lt));var Yt=pt[0]._texture.baseTexture;this.state.blendMode=Object(cl.correctBlendMode)(lt.blendMode,Yt.alphaMode),Lt.state.set(this.state);var Zt=Lt.gl,lr=lt.worldTransform.copyTo(this.tempMatrix);lr.prepend(Lt.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=lr.toArray(!0),this.shader.uniforms.uColor=Object(cl.premultiplyRgba)(lt.tintRgb,lt.worldAlpha,this.shader.uniforms.uColor,Yt.alphaMode),this.shader.uniforms.uSampler=Yt,this.renderer.shader.bind(this.shader);for(var xr=!1,wr=0,Ir=0;wr<$t;wr+=Dt,Ir+=1){var kr=$t-wr;kr>Dt&&(kr=Dt),Ir>=Xt.length&&Xt.push(this._generateOneMoreBuffer(lt));var Lr=Xt[Ir];Lr.uploadDynamic(pt,wr,kr);var Xr=lt._bufferUpdateIDs[Ir]||0;(xr=xr||Lr._updateID<Xr)&&(Lr._updateID=lt._updateID,Lr.uploadStatic(pt,wr,kr)),Lt.geometry.bind(Lr.geometry),Zt.drawElements(Zt.TRIANGLES,6*kr,Zt.UNSIGNED_SHORT,0)}}},it.prototype.generateBuffers=function(lt){for(var pt=[],_t=lt._maxSize,Dt=lt._batchSize,Lt=lt._properties,$t=0;$t<_t;$t+=Dt)pt.push(new K1(this.properties,Lt,Dt));return pt},it.prototype._generateOneMoreBuffer=function(lt){var pt=lt._batchSize,_t=lt._properties;return new K1(this.properties,_t,pt)},it.prototype.uploadVertices=function(lt,pt,_t,Dt,Lt,$t){for(var Xt=0,Yt=0,Zt=0,lr=0,xr=0;xr<_t;++xr){var wr=lt[pt+xr],Ir=wr._texture,kr=wr.scale.x,Lr=wr.scale.y,Xr=Ir.trim,_n=Ir.orig;Xr?(Xt=(Yt=Xr.x-wr.anchor.x*_n.width)+Xr.width,Zt=(lr=Xr.y-wr.anchor.y*_n.height)+Xr.height):(Xt=_n.width*(1-wr.anchor.x),Yt=_n.width*-wr.anchor.x,Zt=_n.height*(1-wr.anchor.y),lr=_n.height*-wr.anchor.y),Dt[$t]=Yt*kr,Dt[$t+1]=lr*Lr,Dt[$t+Lt]=Xt*kr,Dt[$t+Lt+1]=lr*Lr,Dt[$t+2*Lt]=Xt*kr,Dt[$t+2*Lt+1]=Zt*Lr,Dt[$t+3*Lt]=Yt*kr,Dt[$t+3*Lt+1]=Zt*Lr,$t+=4*Lt}},it.prototype.uploadPosition=function(lt,pt,_t,Dt,Lt,$t){for(var Xt=0;Xt<_t;Xt++){var Yt=lt[pt+Xt].position;Dt[$t]=Yt.x,Dt[$t+1]=Yt.y,Dt[$t+Lt]=Yt.x,Dt[$t+Lt+1]=Yt.y,Dt[$t+2*Lt]=Yt.x,Dt[$t+2*Lt+1]=Yt.y,Dt[$t+3*Lt]=Yt.x,Dt[$t+3*Lt+1]=Yt.y,$t+=4*Lt}},it.prototype.uploadRotation=function(lt,pt,_t,Dt,Lt,$t){for(var Xt=0;Xt<_t;Xt++){var Yt=lt[pt+Xt].rotation;Dt[$t]=Yt,Dt[$t+Lt]=Yt,Dt[$t+2*Lt]=Yt,Dt[$t+3*Lt]=Yt,$t+=4*Lt}},it.prototype.uploadUvs=function(lt,pt,_t,Dt,Lt,$t){for(var Xt=0;Xt<_t;++Xt){var Yt=lt[pt+Xt]._texture._uvs;Yt?(Dt[$t]=Yt.x0,Dt[$t+1]=Yt.y0,Dt[$t+Lt]=Yt.x1,Dt[$t+Lt+1]=Yt.y1,Dt[$t+2*Lt]=Yt.x2,Dt[$t+2*Lt+1]=Yt.y2,Dt[$t+3*Lt]=Yt.x3,Dt[$t+3*Lt+1]=Yt.y3,$t+=4*Lt):(Dt[$t]=0,Dt[$t+1]=0,Dt[$t+Lt]=0,Dt[$t+Lt+1]=0,Dt[$t+2*Lt]=0,Dt[$t+2*Lt+1]=0,Dt[$t+3*Lt]=0,Dt[$t+3*Lt+1]=0,$t+=4*Lt)}},it.prototype.uploadTint=function(lt,pt,_t,Dt,Lt,$t){for(var Xt=0;Xt<_t;++Xt){var Yt=lt[pt+Xt],Zt=Yt._texture.baseTexture.alphaMode>0,lr=Yt.alpha,xr=lr<1&&Zt?Object(cl.premultiplyTint)(Yt._tintRGB,lr):Yt._tintRGB+(255*lr<<24);Dt[$t]=xr,Dt[$t+Lt]=xr,Dt[$t+2*Lt]=xr,Dt[$t+3*Lt]=xr,$t+=4*Lt}},it.prototype.destroy=function(){vt.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},it})(ps.m),N0=tt(4);(function(vt){vt.MITER="miter",vt.BEVEL="bevel",vt.ROUND="round"})(H_||(H_={})),(function(vt){vt.BUTT="butt",vt.ROUND="round",vt.SQUARE="square"})(nS||(nS={}));var l0={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(vt,it){if(it===void 0&&(it=20),!this.adaptive||!vt||isNaN(vt))return it;var lt=Math.ceil(vt/this.maxLength);return lt<this.minSegments?lt=this.minSegments:lt>this.maxSegments&&(lt=this.maxSegments),lt}},YA=(function(){function vt(){this.color=16777215,this.alpha=1,this.texture=ps.t.WHITE,this.matrix=null,this.visible=!1,this.reset()}return vt.prototype.clone=function(){var it=new vt;return it.color=this.color,it.alpha=this.alpha,it.texture=this.texture,it.matrix=this.matrix,it.visible=this.visible,it},vt.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=ps.t.WHITE,this.matrix=null,this.visible=!1},vt.prototype.destroy=function(){this.texture=null,this.matrix=null},vt})(),BE=function(vt,it){return(BE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function Ip(vt,it){function lt(){this.constructor=vt}BE(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}function QA(vt,it){var lt,pt;it===void 0&&(it=!1);var _t=vt.length;if(!(_t<6)){for(var Dt=0,Lt=0,$t=vt[_t-2],Xt=vt[_t-1];Lt<_t;Lt+=2){var Yt=vt[Lt],Zt=vt[Lt+1];Dt+=(Yt-$t)*(Zt+Xt),$t=Yt,Xt=Zt}if(!it&&Dt>0||it&&Dt<=0){var lr=_t/2;for(Lt=lr+lr%2;Lt<_t;Lt+=2){var xr=_t-Lt-2,wr=_t-Lt-1,Ir=Lt,kr=Lt+1;lt=[vt[Ir],vt[xr]],vt[xr]=lt[0],vt[Ir]=lt[1],pt=[vt[kr],vt[wr]],vt[wr]=pt[0],vt[kr]=pt[1]}}}}var KA={build:function(vt){vt.points=vt.shape.points.slice()},triangulate:function(vt,it){var lt=vt.points,pt=vt.holes,_t=it.points,Dt=it.indices;if(lt.length>=6){QA(lt,!1);for(var Lt=[],$t=0;$t<pt.length;$t++){var Xt=pt[$t];QA(Xt.points,!0),Lt.push(lt.length/2),lt=lt.concat(Xt.points)}var Yt=Object(cl.earcut)(lt,Lt,2);if(!Yt)return;var Zt=_t.length/2;for($t=0;$t<Yt.length;$t+=3)Dt.push(Yt[$t]+Zt),Dt.push(Yt[$t+1]+Zt),Dt.push(Yt[$t+2]+Zt);for($t=0;$t<lt.length;$t++)_t.push(lt[$t])}}},GS={build:function(vt){var it,lt,pt,_t,Dt,Lt,$t=vt.points;if(vt.type===Ho.l.CIRC){var Xt=vt.shape;it=Xt.x,lt=Xt.y,Dt=Lt=Xt.radius,pt=_t=0}else if(vt.type===Ho.l.ELIP){var Yt=vt.shape;it=Yt.x,lt=Yt.y,Dt=Yt.width,Lt=Yt.height,pt=_t=0}else{var Zt=vt.shape,lr=Zt.width/2,xr=Zt.height/2;it=Zt.x+lr,lt=Zt.y+xr,pt=lr-(Dt=Lt=Math.max(0,Math.min(Zt.radius,Math.min(lr,xr)))),_t=xr-Lt}if(Dt>=0&&Lt>=0&&pt>=0&&_t>=0){var wr=Math.ceil(2.3*Math.sqrt(Dt+Lt)),Ir=8*wr+(pt?4:0)+(_t?4:0);if($t.length=Ir,Ir!==0){if(wr===0)return $t.length=8,$t[0]=$t[6]=it+pt,$t[1]=$t[3]=lt+_t,$t[2]=$t[4]=it-pt,void($t[5]=$t[7]=lt-_t);var kr=0,Lr=4*wr+(pt?2:0)+2,Xr=Lr,_n=Ir,On=it+(ks=pt+Dt),Kn=it-ks,Mn=lt+(Cs=_t);if($t[kr++]=On,$t[kr++]=Mn,$t[--Lr]=Mn,$t[--Lr]=Kn,_t){var ca=lt-Cs;$t[Xr++]=Kn,$t[Xr++]=ca,$t[--_n]=ca,$t[--_n]=On}for(var Gn=1;Gn<wr;Gn++){var Qn=Math.PI/2*(Gn/wr);On=it+(ks=pt+Math.cos(Qn)*Dt),Kn=it-ks,Mn=lt+(Cs=_t+Math.sin(Qn)*Lt),ca=lt-Cs,$t[kr++]=On,$t[kr++]=Mn,$t[--Lr]=Mn,$t[--Lr]=Kn,$t[Xr++]=Kn,$t[Xr++]=ca,$t[--_n]=ca,$t[--_n]=On}var ks,Cs;On=it+(ks=pt),Kn=it-ks,Mn=lt+(Cs=_t+Lt),ca=lt-Cs,$t[kr++]=On,$t[kr++]=Mn,$t[--_n]=ca,$t[--_n]=On,pt&&($t[kr++]=Kn,$t[kr++]=Mn,$t[--_n]=ca,$t[--_n]=Kn)}}else $t.length=0},triangulate:function(vt,it){var lt,pt,_t=vt.points,Dt=it.points,Lt=it.indices,$t=Dt.length/2,Xt=$t;if(vt.type!==Ho.l.RREC){var Yt=vt.shape;lt=Yt.x,pt=Yt.y}else{var Zt=vt.shape;lt=Zt.x+Zt.width/2,pt=Zt.y+Zt.height/2}var lr=vt.matrix;Dt.push(vt.matrix?lr.a*lt+lr.c*pt+lr.tx:lt,vt.matrix?lr.b*lt+lr.d*pt+lr.ty:pt),$t++,Dt.push(_t[0],_t[1]);for(var xr=2;xr<_t.length;xr+=2)Dt.push(_t[xr],_t[xr+1]),Lt.push($t++,Xt,$t);Lt.push(Xt+1,Xt,$t)}},lI={build:function(vt){var it=vt.shape,lt=it.x,pt=it.y,_t=it.width,Dt=it.height,Lt=vt.points;Lt.length=0,Lt.push(lt,pt,lt+_t,pt,lt+_t,pt+Dt,lt,pt+Dt)},triangulate:function(vt,it){var lt=vt.points,pt=it.points,_t=pt.length/2;pt.push(lt[0],lt[1],lt[2],lt[3],lt[6],lt[7],lt[4],lt[5]),it.indices.push(_t,_t+1,_t+2,_t+1,_t+2,_t+3)}};function Cx(vt,it,lt){return vt+(it-vt)*lt}function Ow(vt,it,lt,pt,_t,Dt,Lt){Lt===void 0&&(Lt=[]);for(var $t=Lt,Xt=0,Yt=0,Zt=0,lr=0,xr=0,wr=0,Ir=0,kr=0;Ir<=20;++Ir)Xt=Cx(vt,lt,kr=Ir/20),Yt=Cx(it,pt,kr),Zt=Cx(lt,_t,kr),lr=Cx(pt,Dt,kr),xr=Cx(Xt,Zt,kr),wr=Cx(Yt,lr,kr),Ir===0&&$t[$t.length-2]===xr&&$t[$t.length-1]===wr||$t.push(xr,wr);return $t}var cI={build:function(vt){if(wy.nextRoundedRectBehavior)GS.build(vt);else{var it=vt.shape,lt=vt.points,pt=it.x,_t=it.y,Dt=it.width,Lt=it.height,$t=Math.max(0,Math.min(it.radius,Math.min(Dt,Lt)/2));lt.length=0,$t?(Ow(pt,_t+$t,pt,_t,pt+$t,_t,lt),Ow(pt+Dt-$t,_t,pt+Dt,_t,pt+Dt,_t+$t,lt),Ow(pt+Dt,_t+Lt-$t,pt+Dt,_t+Lt,pt+Dt-$t,_t+Lt,lt),Ow(pt+$t,_t+Lt,pt,_t+Lt,pt,_t+Lt-$t,lt)):lt.push(pt,_t,pt+Dt,_t,pt+Dt,_t+Lt,pt,_t+Lt)}},triangulate:function(vt,it){if(wy.nextRoundedRectBehavior)GS.triangulate(vt,it);else{for(var lt=vt.points,pt=it.points,_t=it.indices,Dt=pt.length/2,Lt=Object(cl.earcut)(lt,null,2),$t=0,Xt=Lt.length;$t<Xt;$t+=3)_t.push(Lt[$t]+Dt),_t.push(Lt[$t+1]+Dt),_t.push(Lt[$t+2]+Dt);for($t=0,Xt=lt.length;$t<Xt;$t++)pt.push(lt[$t],lt[++$t])}}};function ED(vt,it,lt,pt,_t,Dt,Lt,$t){var Xt,Yt;Lt?(Xt=pt,Yt=-lt):(Xt=-pt,Yt=lt);var Zt=vt-lt*_t+Xt,lr=it-pt*_t+Yt,xr=vt+lt*Dt+Xt,wr=it+pt*Dt+Yt;return $t.push(Zt,lr),$t.push(xr,wr),2}function qw(vt,it,lt,pt,_t,Dt,Lt,$t){var Xt=lt-vt,Yt=pt-it,Zt=Math.atan2(Xt,Yt),lr=Math.atan2(_t-vt,Dt-it);$t&&Zt<lr?Zt+=2*Math.PI:!$t&&Zt>lr&&(lr+=2*Math.PI);var xr=Zt,wr=lr-Zt,Ir=Math.abs(wr),kr=Math.sqrt(Xt*Xt+Yt*Yt),Lr=1+(15*Ir*Math.sqrt(kr)/Math.PI>>0),Xr=wr/Lr;if(xr+=Xr,$t){Lt.push(vt,it),Lt.push(lt,pt);for(var _n=1,On=xr;_n<Lr;_n++,On+=Xr)Lt.push(vt,it),Lt.push(vt+Math.sin(On)*kr,it+Math.cos(On)*kr);Lt.push(vt,it),Lt.push(_t,Dt)}else{for(Lt.push(lt,pt),Lt.push(vt,it),_n=1,On=xr;_n<Lr;_n++,On+=Xr)Lt.push(vt+Math.sin(On)*kr,it+Math.cos(On)*kr),Lt.push(vt,it);Lt.push(_t,Dt),Lt.push(vt,it)}return 2*Lr}function ZA(vt,it){vt.lineStyle.native?(function(lt,pt){var _t=0,Dt=lt.shape,Lt=lt.points||Dt.points,$t=Dt.type!==Ho.l.POLY||Dt.closeStroke;if(Lt.length!==0){var Xt=pt.points,Yt=pt.indices,Zt=Lt.length/2,lr=Xt.length/2,xr=lr;for(Xt.push(Lt[0],Lt[1]),_t=1;_t<Zt;_t++)Xt.push(Lt[2*_t],Lt[2*_t+1]),Yt.push(xr,xr+1),xr++;$t&&Yt.push(xr,lr)}})(vt,it):(function(lt,pt){var _t=lt.shape,Dt=lt.points||_t.points.slice(),Lt=pt.closePointEps;if(Dt.length!==0){var $t=lt.lineStyle,Xt=new Ho.g(Dt[0],Dt[1]),Yt=new Ho.g(Dt[Dt.length-2],Dt[Dt.length-1]),Zt=_t.type!==Ho.l.POLY||_t.closeStroke,lr=Math.abs(Xt.x-Yt.x)<Lt&&Math.abs(Xt.y-Yt.y)<Lt;if(Zt){Dt=Dt.slice(),lr&&(Dt.pop(),Dt.pop(),Yt.set(Dt[Dt.length-2],Dt[Dt.length-1]));var xr=.5*(Xt.x+Yt.x),wr=.5*(Yt.y+Xt.y);Dt.unshift(xr,wr),Dt.push(xr,wr)}var Ir=pt.points,kr=Dt.length/2,Lr=Dt.length,Xr=Ir.length/2,_n=$t.width/2,On=_n*_n,Kn=$t.miterLimit*$t.miterLimit,Mn=Dt[0],ca=Dt[1],Gn=Dt[2],Qn=Dt[3],ks=0,Cs=0,gs=-(ca-Qn),_s=Mn-Gn,Ts=0,ws=0,oo=Math.sqrt(gs*gs+_s*_s);gs/=oo,_s/=oo,gs*=_n,_s*=_n;var no=$t.alignment,js=2*(1-no),Ws=2*no;Zt||($t.cap===nS.ROUND?Lr+=qw(Mn-gs*(js-Ws)*.5,ca-_s*(js-Ws)*.5,Mn-gs*js,ca-_s*js,Mn+gs*Ws,ca+_s*Ws,Ir,!0)+2:$t.cap===nS.SQUARE&&(Lr+=ED(Mn,ca,gs,_s,js,Ws,!0,Ir))),Ir.push(Mn-gs*js,ca-_s*js),Ir.push(Mn+gs*Ws,ca+_s*Ws);for(var Co=1;Co<kr-1;++Co){Mn=Dt[2*(Co-1)],ca=Dt[2*(Co-1)+1],Gn=Dt[2*Co],Qn=Dt[2*Co+1],ks=Dt[2*(Co+1)],Cs=Dt[2*(Co+1)+1],gs=-(ca-Qn),_s=Mn-Gn,gs/=oo=Math.sqrt(gs*gs+_s*_s),_s/=oo,gs*=_n,_s*=_n,Ts=-(Qn-Cs),ws=Gn-ks,Ts/=oo=Math.sqrt(Ts*Ts+ws*ws),ws/=oo,Ts*=_n,ws*=_n;var jo=Gn-Mn,Qo=ca-Qn,xs=Gn-ks,Ms=Cs-Qn,Io=Qo*xs-Ms*jo,_o=Io<0;if(Math.abs(Io)<.1)Ir.push(Gn-gs*js,Qn-_s*js),Ir.push(Gn+gs*Ws,Qn+_s*Ws);else{var Ys=(-gs+Mn)*(-_s+Qn)-(-gs+Gn)*(-_s+ca),zo=(-Ts+ks)*(-ws+Qn)-(-Ts+Gn)*(-ws+Cs),Jo=(jo*zo-xs*Ys)/Io,mo=(Ms*Ys-Qo*zo)/Io,fs=(Jo-Gn)*(Jo-Gn)+(mo-Qn)*(mo-Qn),$s=Gn+(Jo-Gn)*js,lo=Qn+(mo-Qn)*js,go=Gn-(Jo-Gn)*Ws,Qs=Qn-(mo-Qn)*Ws,Lo=_o?js:Ws;fs<=Math.min(jo*jo+Qo*Qo,xs*xs+Ms*Ms)+Lo*Lo*On?$t.join===H_.BEVEL||fs/On>Kn?(_o?(Ir.push($s,lo),Ir.push(Gn+gs*Ws,Qn+_s*Ws),Ir.push($s,lo),Ir.push(Gn+Ts*Ws,Qn+ws*Ws)):(Ir.push(Gn-gs*js,Qn-_s*js),Ir.push(go,Qs),Ir.push(Gn-Ts*js,Qn-ws*js),Ir.push(go,Qs)),Lr+=2):$t.join===H_.ROUND?_o?(Ir.push($s,lo),Ir.push(Gn+gs*Ws,Qn+_s*Ws),Lr+=qw(Gn,Qn,Gn+gs*Ws,Qn+_s*Ws,Gn+Ts*Ws,Qn+ws*Ws,Ir,!0)+4,Ir.push($s,lo),Ir.push(Gn+Ts*Ws,Qn+ws*Ws)):(Ir.push(Gn-gs*js,Qn-_s*js),Ir.push(go,Qs),Lr+=qw(Gn,Qn,Gn-gs*js,Qn-_s*js,Gn-Ts*js,Qn-ws*js,Ir,!1)+4,Ir.push(Gn-Ts*js,Qn-ws*js),Ir.push(go,Qs)):(Ir.push($s,lo),Ir.push(go,Qs)):(Ir.push(Gn-gs*js,Qn-_s*js),Ir.push(Gn+gs*Ws,Qn+_s*Ws),$t.join===H_.ROUND?Lr+=_o?qw(Gn,Qn,Gn+gs*Ws,Qn+_s*Ws,Gn+Ts*Ws,Qn+ws*Ws,Ir,!0)+2:qw(Gn,Qn,Gn-gs*js,Qn-_s*js,Gn-Ts*js,Qn-ws*js,Ir,!1)+2:$t.join===H_.MITER&&fs/On<=Kn&&(_o?(Ir.push(go,Qs),Ir.push(go,Qs)):(Ir.push($s,lo),Ir.push($s,lo)),Lr+=2),Ir.push(Gn-Ts*js,Qn-ws*js),Ir.push(Gn+Ts*Ws,Qn+ws*Ws),Lr+=2)}}Mn=Dt[2*(kr-2)],ca=Dt[2*(kr-2)+1],Gn=Dt[2*(kr-1)],gs=-(ca-(Qn=Dt[2*(kr-1)+1])),_s=Mn-Gn,gs/=oo=Math.sqrt(gs*gs+_s*_s),_s/=oo,gs*=_n,_s*=_n,Ir.push(Gn-gs*js,Qn-_s*js),Ir.push(Gn+gs*Ws,Qn+_s*Ws),Zt||($t.cap===nS.ROUND?Lr+=qw(Gn-gs*(js-Ws)*.5,Qn-_s*(js-Ws)*.5,Gn-gs*js,Qn-_s*js,Gn+gs*Ws,Qn+_s*Ws,Ir,!1)+2:$t.cap===nS.SQUARE&&(Lr+=ED(Gn,Qn,gs,_s,js,Ws,!1,Ir)));var Cu=pt.indices,Du=l0.epsilon*l0.epsilon;for(Co=Xr;Co<Lr+Xr-2;++Co)Mn=Ir[2*Co],ca=Ir[2*Co+1],Gn=Ir[2*(Co+1)],Qn=Ir[2*(Co+1)+1],ks=Ir[2*(Co+2)],Cs=Ir[2*(Co+2)+1],Math.abs(Mn*(Qn-Cs)+Gn*(Cs-ca)+ks*(ca-Qn))<Du||Cu.push(Co,Co+1,Co+2)}})(vt,it)}var Lw,AD=(function(){function vt(){}return vt.curveTo=function(it,lt,pt,_t,Dt,Lt){var $t=Lt[Lt.length-2],Xt=Lt[Lt.length-1]-lt,Yt=$t-it,Zt=_t-lt,lr=pt-it,xr=Math.abs(Xt*lr-Yt*Zt);if(xr<1e-8||Dt===0)return Lt[Lt.length-2]===it&&Lt[Lt.length-1]===lt||Lt.push(it,lt),null;var wr=Xt*Xt+Yt*Yt,Ir=Zt*Zt+lr*lr,kr=Xt*Zt+Yt*lr,Lr=Dt*Math.sqrt(wr)/xr,Xr=Dt*Math.sqrt(Ir)/xr,_n=Lr*kr/wr,On=Xr*kr/Ir,Kn=Lr*lr+Xr*Yt,Mn=Lr*Zt+Xr*Xt,ca=Yt*(Xr+_n),Gn=Xt*(Xr+_n),Qn=lr*(Lr+On),ks=Zt*(Lr+On);return{cx:Kn+it,cy:Mn+lt,radius:Dt,startAngle:Math.atan2(Gn-Mn,ca-Kn),endAngle:Math.atan2(ks-Mn,Qn-Kn),anticlockwise:Yt*Zt>lr*Xt}},vt.arc=function(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt){for(var Zt=$t-Lt,lr=l0._segmentsCount(Math.abs(Zt)*Dt,40*Math.ceil(Math.abs(Zt)/Ho.f)),xr=Zt/(2*lr),wr=2*xr,Ir=Math.cos(xr),kr=Math.sin(xr),Lr=lr-1,Xr=Lr%1/Lr,_n=0;_n<=Lr;++_n){var On=xr+Lt+wr*(_n+Xr*_n),Kn=Math.cos(On),Mn=-Math.sin(On);Yt.push((Ir*Kn+kr*Mn)*Dt+pt,(Ir*-Mn+kr*Kn)*Dt+_t)}},vt})(),dI=(function(){function vt(){}return vt.curveLength=function(it,lt,pt,_t,Dt,Lt,$t,Xt){for(var Yt=0,Zt=0,lr=0,xr=0,wr=0,Ir=0,kr=0,Lr=0,Xr=0,_n=0,On=0,Kn=it,Mn=lt,ca=1;ca<=10;++ca)_n=Kn-(Lr=(kr=(Ir=(wr=1-(Zt=ca/10))*wr)*wr)*it+3*Ir*Zt*pt+3*wr*(lr=Zt*Zt)*Dt+(xr=lr*Zt)*$t),On=Mn-(Xr=kr*lt+3*Ir*Zt*_t+3*wr*lr*Lt+xr*Xt),Kn=Lr,Mn=Xr,Yt+=Math.sqrt(_n*_n+On*On);return Yt},vt.curveTo=function(it,lt,pt,_t,Dt,Lt,$t){var Xt=$t[$t.length-2],Yt=$t[$t.length-1];$t.length-=2;var Zt=l0._segmentsCount(vt.curveLength(Xt,Yt,it,lt,pt,_t,Dt,Lt)),lr=0,xr=0,wr=0,Ir=0,kr=0;$t.push(Xt,Yt);for(var Lr=1,Xr=0;Lr<=Zt;++Lr)wr=(xr=(lr=1-(Xr=Lr/Zt))*lr)*lr,kr=(Ir=Xr*Xr)*Xr,$t.push(wr*Xt+3*xr*Xr*it+3*lr*Ir*pt+kr*Dt,wr*Yt+3*xr*Xr*lt+3*lr*Ir*_t+kr*Lt)},vt})(),hI=(function(){function vt(){}return vt.curveLength=function(it,lt,pt,_t,Dt,Lt){var $t=it-2*pt+Dt,Xt=lt-2*_t+Lt,Yt=2*pt-2*it,Zt=2*_t-2*lt,lr=4*($t*$t+Xt*Xt),xr=4*($t*Yt+Xt*Zt),wr=Yt*Yt+Zt*Zt,Ir=2*Math.sqrt(lr+xr+wr),kr=Math.sqrt(lr),Lr=2*lr*kr,Xr=2*Math.sqrt(wr),_n=xr/kr;return(Lr*Ir+kr*xr*(Ir-Xr)+(4*wr*lr-xr*xr)*Math.log((2*kr+_n+Ir)/(_n+Xr)))/(4*Lr)},vt.curveTo=function(it,lt,pt,_t,Dt){for(var Lt=Dt[Dt.length-2],$t=Dt[Dt.length-1],Xt=l0._segmentsCount(vt.curveLength(Lt,$t,it,lt,pt,_t)),Yt=0,Zt=0,lr=1;lr<=Xt;++lr){var xr=lr/Xt;Yt=Lt+(it-Lt)*xr,Zt=$t+(lt-$t)*xr,Dt.push(Yt+(it+(pt-it)*xr-Yt)*xr,Zt+(lt+(_t-lt)*xr-Zt)*xr)}},vt})(),fI=(function(){function vt(){this.reset()}return vt.prototype.begin=function(it,lt,pt){this.reset(),this.style=it,this.start=lt,this.attribStart=pt},vt.prototype.end=function(it,lt){this.attribSize=lt-this.attribStart,this.size=it-this.start},vt.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},vt})(),Fw=((Lw={})[Ho.l.POLY]=KA,Lw[Ho.l.CIRC]=GS,Lw[Ho.l.ELIP]=GS,Lw[Ho.l.RECT]=lI,Lw[Ho.l.RREC]=cI,Lw),jE=[],Bw=[],$E=(function(){function vt(it,lt,pt,_t){lt===void 0&&(lt=null),pt===void 0&&(pt=null),_t===void 0&&(_t=null),this.points=[],this.holes=[],this.shape=it,this.lineStyle=pt,this.fillStyle=lt,this.matrix=_t,this.type=it.type}return vt.prototype.clone=function(){return new vt(this.shape,this.fillStyle,this.lineStyle,this.matrix)},vt.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},vt})(),jw=new Ho.g,iS=new Ol.a,kT=(function(vt){function it(){var lt=vt.call(this)||this;return lt.closePointEps=1e-4,lt.boundsPadding=0,lt.uvsFloat32=null,lt.indicesUint16=null,lt.batchable=!1,lt.points=[],lt.colors=[],lt.uvs=[],lt.indices=[],lt.textureIds=[],lt.graphicsData=[],lt.drawCalls=[],lt.batchDirty=-1,lt.batches=[],lt.dirty=0,lt.cacheDirty=-1,lt.clearDirty=0,lt.shapeIndex=0,lt._bounds=new Ol.a,lt.boundsDirty=-1,lt}return Ip(it,vt),Object.defineProperty(it.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),it.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 lt=0;lt<this.drawCalls.length;lt++)this.drawCalls[lt].texArray.clear(),Bw.push(this.drawCalls[lt]);for(this.drawCalls.length=0,lt=0;lt<this.batches.length;lt++){var pt=this.batches[lt];pt.reset(),jE.push(pt)}this.batches.length=0},it.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},it.prototype.drawShape=function(lt,pt,_t,Dt){pt===void 0&&(pt=null),_t===void 0&&(_t=null),Dt===void 0&&(Dt=null);var Lt=new $E(lt,pt,_t,Dt);return this.graphicsData.push(Lt),this.dirty++,this},it.prototype.drawHole=function(lt,pt){if(pt===void 0&&(pt=null),!this.graphicsData.length)return null;var _t=new $E(lt,null,null,pt),Dt=this.graphicsData[this.graphicsData.length-1];return _t.lineStyle=Dt.lineStyle,Dt.holes.push(_t),this.dirty++,this},it.prototype.destroy=function(){vt.prototype.destroy.call(this);for(var lt=0;lt<this.graphicsData.length;++lt)this.graphicsData[lt].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},it.prototype.containsPoint=function(lt){for(var pt=this.graphicsData,_t=0;_t<pt.length;++_t){var Dt=pt[_t];if(Dt.fillStyle.visible&&Dt.shape&&(Dt.matrix?Dt.matrix.applyInverse(lt,jw):jw.copyFrom(lt),Dt.shape.contains(jw.x,jw.y))){var Lt=!1;if(Dt.holes){for(var $t=0;$t<Dt.holes.length;$t++)if(Dt.holes[$t].shape.contains(jw.x,jw.y)){Lt=!0;break}}if(!Lt)return!0}}return!1},it.prototype.updateBatches=function(lt){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var pt=this.uvs,_t=this.graphicsData,Dt=null,Lt=null;this.batches.length>0&&(Lt=(Dt=this.batches[this.batches.length-1]).style);for(var $t=this.shapeIndex;$t<_t.length;$t++){this.shapeIndex++;var Xt=_t[$t],Yt=Xt.fillStyle,Zt=Xt.lineStyle;Fw[Xt.type].build(Xt),Xt.matrix&&this.transformPoints(Xt.points,Xt.matrix),(Yt.visible||Zt.visible)&&this.processHoles(Xt.holes);for(var lr=0;lr<2;lr++){var xr=lr===0?Yt:Zt;if(xr.visible){var wr=xr.texture.baseTexture,Ir=this.indices.length,kr=this.points.length/2;wr.wrapMode=ol.s.REPEAT,lr===0?this.processFill(Xt):this.processLine(Xt);var Lr=this.points.length/2-kr;Lr!==0&&(Dt&&!this._compareStyles(Lt,xr)&&(Dt.end(Ir,kr),Dt=null),Dt||((Dt=jE.pop()||new fI).begin(xr,Ir,kr),this.batches.push(Dt),Lt=xr),this.addUvs(this.points,pt,xr.texture,kr,Lr,xr.matrix))}}}var Xr=this.indices.length,_n=this.points.length/2;if(Dt&&Dt.end(Xr,_n),this.batches.length!==0){if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var On=_n>65535&&lt;this.indicesUint16=On?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},it.prototype._compareStyles=function(lt,pt){return!(!lt||!pt)&&lt.texture.baseTexture===pt.texture.baseTexture&&lt.color+lt.alpha===pt.color+pt.alpha&&!!lt.native==!!pt.native},it.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var lt=0,pt=this.graphicsData.length;lt<pt;lt++){var _t=this.graphicsData[lt],Dt=_t.fillStyle,Lt=_t.lineStyle;if(Dt&&!Dt.texture.baseTexture.valid||Lt&&!Lt.texture.baseTexture.valid)return!1}return!0},it.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var lt=this.batches,pt=0,_t=lt.length;pt<_t;pt++)for(var Dt=lt[pt],Lt=0;Lt<Dt.size;Lt++){var $t=Dt.start+Lt;this.indicesUint16[$t]=this.indicesUint16[$t]-Dt.attribStart}},it.prototype.isBatchable=function(){if(this.points.length>131070)return!1;for(var lt=this.batches,pt=0;pt<lt.length;pt++)if(lt[pt].style.native)return!1;return this.points.length<2*it.BATCHABLE_SIZE},it.prototype.buildDrawCalls=function(){for(var lt=++ps.c._globalBatch,pt=0;pt<this.drawCalls.length;pt++)this.drawCalls[pt].texArray.clear(),Bw.push(this.drawCalls[pt]);this.drawCalls.length=0;var _t=this.colors,Dt=this.textureIds,Lt=Bw.pop();Lt||((Lt=new ps.d).texArray=new ps.g),Lt.texArray.count=0,Lt.start=0,Lt.size=0,Lt.type=ol.f.TRIANGLES;var $t=0,Xt=null,Yt=0,Zt=!1,lr=ol.f.TRIANGLES,xr=0;for(this.drawCalls.push(Lt),pt=0;pt<this.batches.length;pt++){var wr=this.batches[pt],Ir=wr.style,kr=Ir.texture.baseTexture;Zt!==!!Ir.native&&(lr=(Zt=!!Ir.native)?ol.f.LINES:ol.f.TRIANGLES,Xt=null,$t=8,lt++),Xt!==kr&&(Xt=kr,kr._batchEnabled!==lt&&($t===8&&(lt++,$t=0,Lt.size>0&&((Lt=Bw.pop())||((Lt=new ps.d).texArray=new ps.g),this.drawCalls.push(Lt)),Lt.start=xr,Lt.size=0,Lt.texArray.count=0,Lt.type=lr),kr.touched=1,kr._batchEnabled=lt,kr._batchLocation=$t,kr.wrapMode=ol.s.REPEAT,Lt.texArray.elements[Lt.texArray.count++]=kr,$t++)),Lt.size+=wr.size,xr+=wr.size,Yt=kr._batchLocation,this.addColors(_t,Ir.color,Ir.alpha,wr.attribSize,wr.attribStart),this.addTextureIds(Dt,Yt,wr.attribSize,wr.attribStart)}ps.c._globalBatch=lt,this.packAttributes()},it.prototype.packAttributes=function(){for(var lt=this.points,pt=this.uvs,_t=this.colors,Dt=this.textureIds,Lt=new ArrayBuffer(3*lt.length*4),$t=new Float32Array(Lt),Xt=new Uint32Array(Lt),Yt=0,Zt=0;Zt<lt.length/2;Zt++)$t[Yt++]=lt[2*Zt],$t[Yt++]=lt[2*Zt+1],$t[Yt++]=pt[2*Zt],$t[Yt++]=pt[2*Zt+1],Xt[Yt++]=_t[Zt],$t[Yt++]=Dt[Zt];this._buffer.update(Lt),this._indexBuffer.update(this.indicesUint16)},it.prototype.processFill=function(lt){lt.holes.length?KA.triangulate(lt,this):Fw[lt.type].triangulate(lt,this)},it.prototype.processLine=function(lt){ZA(lt,this);for(var pt=0;pt<lt.holes.length;pt++)ZA(lt.holes[pt],this)},it.prototype.processHoles=function(lt){for(var pt=0;pt<lt.length;pt++){var _t=lt[pt];Fw[_t.type].build(_t),_t.matrix&&this.transformPoints(_t.points,_t.matrix)}},it.prototype.calculateBounds=function(){var lt=this._bounds,pt=iS,_t=Ho.d.IDENTITY;this._bounds.clear(),pt.clear();for(var Dt=0;Dt<this.graphicsData.length;Dt++){var Lt=this.graphicsData[Dt],$t=Lt.shape,Xt=Lt.type,Yt=Lt.lineStyle,Zt=Lt.matrix||Ho.d.IDENTITY,lr=0;if(Yt&&Yt.visible&&(lr=Yt.width,Xt!==Ho.l.POLY||Lt.fillStyle.visible?lr*=Math.max(0,Yt.alignment):lr*=Math.max(Yt.alignment,1-Yt.alignment)),_t!==Zt&&(pt.isEmpty()||(lt.addBoundsMatrix(pt,_t),pt.clear()),_t=Zt),Xt===Ho.l.RECT||Xt===Ho.l.RREC){var xr=$t;pt.addFramePad(xr.x,xr.y,xr.x+xr.width,xr.y+xr.height,lr,lr)}else if(Xt===Ho.l.CIRC){var wr=$t;pt.addFramePad(wr.x,wr.y,wr.x,wr.y,wr.radius+lr,wr.radius+lr)}else if(Xt===Ho.l.ELIP){var Ir=$t;pt.addFramePad(Ir.x,Ir.y,Ir.x,Ir.y,Ir.width+lr,Ir.height+lr)}else{var kr=$t;lt.addVerticesMatrix(_t,kr.points,0,kr.points.length,lr,lr)}}pt.isEmpty()||lt.addBoundsMatrix(pt,_t),lt.pad(this.boundsPadding,this.boundsPadding)},it.prototype.transformPoints=function(lt,pt){for(var _t=0;_t<lt.length/2;_t++){var Dt=lt[2*_t],Lt=lt[2*_t+1];lt[2*_t]=pt.a*Dt+pt.c*Lt+pt.tx,lt[2*_t+1]=pt.b*Dt+pt.d*Lt+pt.ty}},it.prototype.addColors=function(lt,pt,_t,Dt,Lt){Lt===void 0&&(Lt=0);var $t=(pt>>16)+(65280&pt)+((255&pt)<<16),Xt=Object(cl.premultiplyTint)($t,_t);lt.length=Math.max(lt.length,Lt+Dt);for(var Yt=0;Yt<Dt;Yt++)lt[Lt+Yt]=Xt},it.prototype.addTextureIds=function(lt,pt,_t,Dt){Dt===void 0&&(Dt=0),lt.length=Math.max(lt.length,Dt+_t);for(var Lt=0;Lt<_t;Lt++)lt[Dt+Lt]=pt},it.prototype.addUvs=function(lt,pt,_t,Dt,Lt,$t){$t===void 0&&($t=null);for(var Xt=0,Yt=pt.length,Zt=_t.frame;Xt<Lt;){var lr=lt[2*(Dt+Xt)],xr=lt[2*(Dt+Xt)+1];if($t){var wr=$t.a*lr+$t.c*xr+$t.tx;xr=$t.b*lr+$t.d*xr+$t.ty,lr=wr}Xt++,pt.push(lr/Zt.width,xr/Zt.height)}var Ir=_t.baseTexture;(Zt.width<Ir.width||Zt.height<Ir.height)&&this.adjustUvs(pt,_t,Yt,Lt)},it.prototype.adjustUvs=function(lt,pt,_t,Dt){for(var Lt=pt.baseTexture,$t=1e-6,Xt=_t+2*Dt,Yt=pt.frame,Zt=Yt.width/Lt.width,lr=Yt.height/Lt.height,xr=Yt.x/Yt.width,wr=Yt.y/Yt.height,Ir=Math.floor(lt[_t]+$t),kr=Math.floor(lt[_t+1]+$t),Lr=_t+2;Lr<Xt;Lr+=2)Ir=Math.min(Ir,Math.floor(lt[Lr]+$t)),kr=Math.min(kr,Math.floor(lt[Lr+1]+$t));for(xr-=Ir,wr-=kr,Lr=_t;Lr<Xt;Lr+=2)lt[Lr]=(lt[Lr]+xr)*Zt,lt[Lr+1]=(lt[Lr+1]+wr)*lr},it.BATCHABLE_SIZE=100,it})(ps.e),jy=(function(vt){function it(){var lt=vt!==null&&vt.apply(this,arguments)||this;return lt.width=0,lt.alignment=.5,lt.native=!1,lt.cap=nS.BUTT,lt.join=H_.MITER,lt.miterLimit=10,lt}return Ip(it,vt),it.prototype.clone=function(){var lt=new it;return lt.color=this.color,lt.alpha=this.alpha,lt.texture=this.texture,lt.matrix=this.matrix,lt.visible=this.visible,lt.width=this.width,lt.alignment=this.alignment,lt.native=this.native,lt.cap=this.cap,lt.join=this.join,lt.miterLimit=this.miterLimit,lt},it.prototype.reset=function(){vt.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},it})(YA),e_=new Float32Array(3),JA={},wy=(function(vt){function it(lt){lt===void 0&&(lt=null);var pt=vt.call(this)||this;return pt.shader=null,pt.pluginName="batch",pt.currentPath=null,pt.batches=[],pt.batchTint=-1,pt.batchDirty=-1,pt.vertexData=null,pt._fillStyle=new YA,pt._lineStyle=new jy,pt._matrix=null,pt._holeMode=!1,pt.state=ps.s.for2d(),pt._geometry=lt||new kT,pt._geometry.refCount++,pt._transformID=-1,pt.tint=16777215,pt.blendMode=ol.b.NORMAL,pt}return Ip(it,vt),Object.defineProperty(it.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),it.prototype.clone=function(){return this.finishPoly(),new it(this._geometry)},Object.defineProperty(it.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(lt){this.state.blendMode=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"tint",{get:function(){return this._tint},set:function(lt){this._tint=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),it.prototype.lineStyle=function(lt,pt,_t,Dt,Lt){return lt===void 0&&(lt=null),pt===void 0&&(pt=0),_t===void 0&&(_t=1),Dt===void 0&&(Dt=.5),Lt===void 0&&(Lt=!1),typeof lt=="number"&&(lt={width:lt,color:pt,alpha:_t,alignment:Dt,native:Lt}),this.lineTextureStyle(lt)},it.prototype.lineTextureStyle=function(lt){lt=Object.assign({width:0,texture:ps.t.WHITE,color:lt&&lt.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:nS.BUTT,join:H_.MITER,miterLimit:10},lt),this.currentPath&&this.startPoly();var pt=lt.width>0&&lt.alpha>0;return pt?(lt.matrix&&(lt.matrix=lt.matrix.clone(),lt.matrix.invert()),Object.assign(this._lineStyle,{visible:pt},lt)):this._lineStyle.reset(),this},it.prototype.startPoly=function(){if(this.currentPath){var lt=this.currentPath.points,pt=this.currentPath.points.length;pt>2&&(this.drawShape(this.currentPath),this.currentPath=new Ho.h,this.currentPath.closeStroke=!1,this.currentPath.points.push(lt[pt-2],lt[pt-1]))}else this.currentPath=new Ho.h,this.currentPath.closeStroke=!1},it.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},it.prototype.moveTo=function(lt,pt){return this.startPoly(),this.currentPath.points[0]=lt,this.currentPath.points[1]=pt,this},it.prototype.lineTo=function(lt,pt){this.currentPath||this.moveTo(0,0);var _t=this.currentPath.points,Dt=_t[_t.length-2],Lt=_t[_t.length-1];return Dt===lt&&Lt===pt||_t.push(lt,pt),this},it.prototype._initCurve=function(lt,pt){lt===void 0&&(lt=0),pt===void 0&&(pt=0),this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[lt,pt]):this.moveTo(lt,pt)},it.prototype.quadraticCurveTo=function(lt,pt,_t,Dt){this._initCurve();var Lt=this.currentPath.points;return Lt.length===0&&this.moveTo(0,0),hI.curveTo(lt,pt,_t,Dt,Lt),this},it.prototype.bezierCurveTo=function(lt,pt,_t,Dt,Lt,$t){return this._initCurve(),dI.curveTo(lt,pt,_t,Dt,Lt,$t,this.currentPath.points),this},it.prototype.arcTo=function(lt,pt,_t,Dt,Lt){this._initCurve(lt,pt);var $t=this.currentPath.points,Xt=AD.curveTo(lt,pt,_t,Dt,Lt,$t);if(Xt){var Yt=Xt.cx,Zt=Xt.cy,lr=Xt.radius,xr=Xt.startAngle,wr=Xt.endAngle,Ir=Xt.anticlockwise;this.arc(Yt,Zt,lr,xr,wr,Ir)}return this},it.prototype.arc=function(lt,pt,_t,Dt,Lt,$t){if($t===void 0&&($t=!1),Dt===Lt)return this;if(!$t&&Lt<=Dt?Lt+=Ho.f:$t&&Dt<=Lt&&(Dt+=Ho.f),Lt-Dt===0)return this;var Xt=lt+Math.cos(Dt)*_t,Yt=pt+Math.sin(Dt)*_t,Zt=this._geometry.closePointEps,lr=this.currentPath?this.currentPath.points:null;if(lr){var xr=Math.abs(lr[lr.length-2]-Xt),wr=Math.abs(lr[lr.length-1]-Yt);xr<Zt&&wr<Zt||lr.push(Xt,Yt)}else this.moveTo(Xt,Yt),lr=this.currentPath.points;return AD.arc(Xt,Yt,lt,pt,_t,Dt,Lt,$t,lr),this},it.prototype.beginFill=function(lt,pt){return lt===void 0&&(lt=0),pt===void 0&&(pt=1),this.beginTextureFill({texture:ps.t.WHITE,color:lt,alpha:pt})},it.prototype.beginTextureFill=function(lt){lt=Object.assign({texture:ps.t.WHITE,color:16777215,alpha:1,matrix:null},lt),this.currentPath&&this.startPoly();var pt=lt.alpha>0;return pt?(lt.matrix&&(lt.matrix=lt.matrix.clone(),lt.matrix.invert()),Object.assign(this._fillStyle,{visible:pt},lt)):this._fillStyle.reset(),this},it.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},it.prototype.drawRect=function(lt,pt,_t,Dt){return this.drawShape(new Ho.j(lt,pt,_t,Dt))},it.prototype.drawRoundedRect=function(lt,pt,_t,Dt,Lt){return this.drawShape(new Ho.k(lt,pt,_t,Dt,Lt))},it.prototype.drawCircle=function(lt,pt,_t){return this.drawShape(new Ho.a(lt,pt,_t))},it.prototype.drawEllipse=function(lt,pt,_t,Dt){return this.drawShape(new Ho.c(lt,pt,_t,Dt))},it.prototype.drawPolygon=function(){for(var lt,pt=arguments,_t=[],Dt=0;Dt<arguments.length;Dt++)_t[Dt]=pt[Dt];var Lt=!0,$t=_t[0];$t.points?(Lt=$t.closeStroke,lt=$t.points):lt=Array.isArray(_t[0])?_t[0]:_t;var Xt=new Ho.h(lt);return Xt.closeStroke=Lt,this.drawShape(Xt),this},it.prototype.drawShape=function(lt){return this._holeMode?this._geometry.drawHole(lt,this._matrix):this._geometry.drawShape(lt,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},it.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},it.prototype.isFastRect=function(){var lt=this._geometry.graphicsData;return!(lt.length!==1||lt[0].shape.type!==Ho.l.RECT||lt[0].matrix||lt[0].holes.length||lt[0].lineStyle.visible&&lt[0].lineStyle.width)},it.prototype._render=function(lt){this.finishPoly();var pt=this._geometry,_t=lt.context.supports.uint32Indices;pt.updateBatches(_t),pt.batchable?(this.batchDirty!==pt.batchDirty&&this._populateBatches(),this._renderBatched(lt)):(lt.batch.flush(),this._renderDirect(lt))},it.prototype._populateBatches=function(){var lt=this._geometry,pt=this.blendMode,_t=lt.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=lt.batchDirty,this.batches.length=_t,this.vertexData=new Float32Array(lt.points);for(var Dt=0;Dt<_t;Dt++){var Lt=lt.batches[Dt],$t=Lt.style.color,Xt=new Float32Array(this.vertexData.buffer,4*Lt.attribStart*2,2*Lt.attribSize),Yt=new Float32Array(lt.uvsFloat32.buffer,4*Lt.attribStart*2,2*Lt.attribSize),Zt={vertexData:Xt,blendMode:pt,indices:new Uint16Array(lt.indicesUint16.buffer,2*Lt.start,Lt.size),uvs:Yt,_batchRGB:Object(cl.hex2rgb)($t),_tintRGB:$t,_texture:Lt.style.texture,alpha:Lt.style.alpha,worldAlpha:1};this.batches[Dt]=Zt}},it.prototype._renderBatched=function(lt){if(this.batches.length){lt.batch.setObjectRenderer(lt.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var pt=0,_t=this.batches.length;pt<_t;pt++){var Dt=this.batches[pt];Dt.worldAlpha=this.worldAlpha*Dt.alpha,lt.plugins[this.pluginName].render(Dt)}}},it.prototype._renderDirect=function(lt){var pt=this._resolveDirectShader(lt),_t=this._geometry,Dt=this.tint,Lt=this.worldAlpha,$t=pt.uniforms,Xt=_t.drawCalls;$t.translationMatrix=this.transform.worldTransform,$t.tint[0]=(Dt>>16&255)/255*Lt,$t.tint[1]=(Dt>>8&255)/255*Lt,$t.tint[2]=(255&Dt)/255*Lt,$t.tint[3]=Lt,lt.shader.bind(pt),lt.geometry.bind(_t,pt),lt.state.set(this.state);for(var Yt=0,Zt=Xt.length;Yt<Zt;Yt++)this._renderDrawCallDirect(lt,_t.drawCalls[Yt])},it.prototype._renderDrawCallDirect=function(lt,pt){for(var _t=pt.texArray,Dt=pt.type,Lt=pt.size,$t=pt.start,Xt=_t.count,Yt=0;Yt<Xt;Yt++)lt.texture.bind(_t.elements[Yt],Yt);lt.geometry.draw(Dt,Lt,$t)},it.prototype._resolveDirectShader=function(lt){var pt=this.shader,_t=this.pluginName;if(!pt){if(!JA[_t]){for(var Dt=lt.plugins[_t].MAX_TEXTURES,Lt=new Int32Array(Dt),$t=0;$t<Dt;$t++)Lt[$t]=$t;var Xt={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ho.d,default:ps.v.from({uSamplers:Lt},!0)},Yt=lt.plugins[_t]._shader.program;JA[_t]=new ps.r(Yt,Xt)}pt=JA[_t]}return pt},it.prototype._calculateBounds=function(){this.finishPoly();var lt=this._geometry;if(lt.graphicsData.length){var pt=lt.bounds,_t=pt.minX,Dt=pt.minY,Lt=pt.maxX,$t=pt.maxY;this._bounds.addFrame(this.transform,_t,Dt,Lt,$t)}},it.prototype.containsPoint=function(lt){return this.worldTransform.applyInverse(lt,it._TEMP_POINT),this._geometry.containsPoint(it._TEMP_POINT)},it.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var lt=Object(cl.hex2rgb)(this.tint,e_),pt=0;pt<this.batches.length;pt++){var _t=this.batches[pt],Dt=_t._batchRGB,Lt=(lt[0]*Dt[0]*255<<16)+(lt[1]*Dt[1]*255<<8)+(0|lt[2]*Dt[2]*255);_t._tintRGB=(Lt>>16)+(65280&Lt)+((255&Lt)<<16)}}},it.prototype.calculateVertices=function(){var lt=this.transform._worldID;if(this._transformID!==lt){this._transformID=lt;for(var pt=this.transform.worldTransform,_t=pt.a,Dt=pt.b,Lt=pt.c,$t=pt.d,Xt=pt.tx,Yt=pt.ty,Zt=this._geometry.points,lr=this.vertexData,xr=0,wr=0;wr<Zt.length;wr+=2){var Ir=Zt[wr],kr=Zt[wr+1];lr[xr++]=_t*Ir+Lt*kr+Xt,lr[xr++]=$t*kr+Dt*Ir+Yt}}},it.prototype.closePath=function(){var lt=this.currentPath;return lt&&(lt.closeStroke=!0,this.finishPoly()),this},it.prototype.setMatrix=function(lt){return this._matrix=lt,this},it.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},it.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},it.prototype.destroy=function(lt){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,vt.prototype.destroy.call(this,lt)},it.nextRoundedRectBehavior=!1,it._TEMP_POINT=new Ho.g,it})(Ol.b),CD=function(vt,it){return(CD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},$w,OT=new Ho.g,pI=new Uint16Array([0,1,2,0,2,3]),_g=(function(vt){function it(lt){var pt=vt.call(this)||this;return pt._anchor=new Ho.e(pt._onAnchorUpdate,pt,lt?lt.defaultAnchor.x:0,lt?lt.defaultAnchor.y:0),pt._texture=null,pt._width=0,pt._height=0,pt._tint=null,pt._tintRGB=null,pt.tint=16777215,pt.blendMode=ol.b.NORMAL,pt._cachedTint=16777215,pt.uvs=null,pt.texture=lt||ps.t.EMPTY,pt.vertexData=new Float32Array(8),pt.vertexTrimmedData=null,pt._transformID=-1,pt._textureID=-1,pt._transformTrimmedID=-1,pt._textureTrimmedID=-1,pt.indices=pI,pt.pluginName="batch",pt.isSprite=!0,pt._roundPixels=N0.b.ROUND_PIXELS,pt}return(function(lt,pt){function _t(){this.constructor=lt}CD(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Object(cl.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Object(cl.sign)(this.scale.y)*this._height/this._texture.orig.height)},it.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},it.prototype.calculateVertices=function(){var lt=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==lt._updateID){this._textureID!==lt._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=lt._updateID;var pt=this.transform.worldTransform,_t=pt.a,Dt=pt.b,Lt=pt.c,$t=pt.d,Xt=pt.tx,Yt=pt.ty,Zt=this.vertexData,lr=lt.trim,xr=lt.orig,wr=this._anchor,Ir=0,kr=0,Lr=0,Xr=0;if(lr?(Ir=(kr=lr.x-wr._x*xr.width)+lr.width,Lr=(Xr=lr.y-wr._y*xr.height)+lr.height):(Ir=(kr=-wr._x*xr.width)+xr.width,Lr=(Xr=-wr._y*xr.height)+xr.height),Zt[0]=_t*kr+Lt*Xr+Xt,Zt[1]=$t*Xr+Dt*kr+Yt,Zt[2]=_t*Ir+Lt*Xr+Xt,Zt[3]=$t*Xr+Dt*Ir+Yt,Zt[4]=_t*Ir+Lt*Lr+Xt,Zt[5]=$t*Lr+Dt*Ir+Yt,Zt[6]=_t*kr+Lt*Lr+Xt,Zt[7]=$t*Lr+Dt*kr+Yt,this._roundPixels)for(var _n=N0.b.RESOLUTION,On=0;On<Zt.length;++On)Zt[On]=Math.round((Zt[On]*_n|0)/_n)}},it.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var lt=this._texture,pt=this.vertexTrimmedData,_t=lt.orig,Dt=this._anchor,Lt=this.transform.worldTransform,$t=Lt.a,Xt=Lt.b,Yt=Lt.c,Zt=Lt.d,lr=Lt.tx,xr=Lt.ty,wr=-Dt._x*_t.width,Ir=wr+_t.width,kr=-Dt._y*_t.height,Lr=kr+_t.height;pt[0]=$t*wr+Yt*kr+lr,pt[1]=Zt*kr+Xt*wr+xr,pt[2]=$t*Ir+Yt*kr+lr,pt[3]=Zt*kr+Xt*Ir+xr,pt[4]=$t*Ir+Yt*Lr+lr,pt[5]=Zt*Lr+Xt*Ir+xr,pt[6]=$t*wr+Yt*Lr+lr,pt[7]=Zt*Lr+Xt*wr+xr},it.prototype._render=function(lt){this.calculateVertices(),lt.batch.setObjectRenderer(lt.plugins[this.pluginName]),lt.plugins[this.pluginName].render(this)},it.prototype._calculateBounds=function(){var lt=this._texture.trim,pt=this._texture.orig;!lt||lt.width===pt.width&&lt.height===pt.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},it.prototype.getLocalBounds=function(lt){return this.children.length===0?(this._localBounds||(this._localBounds=new Ol.a),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),lt||(this._localBoundsRect||(this._localBoundsRect=new Ho.j),lt=this._localBoundsRect),this._localBounds.getRectangle(lt)):vt.prototype.getLocalBounds.call(this,lt)},it.prototype.containsPoint=function(lt){this.worldTransform.applyInverse(lt,OT);var pt=this._texture.orig.width,_t=this._texture.orig.height,Dt=-pt*this.anchor.x,Lt=0;return OT.x>=Dt&&OT.x<Dt+pt&&(Lt=-_t*this.anchor.y,OT.y>=Lt&&OT.y<Lt+_t)},it.prototype.destroy=function(lt){if(vt.prototype.destroy.call(this,lt),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof lt=="boolean"?lt:lt&&lt.texture){var pt=typeof lt=="boolean"?lt:lt&&lt.baseTexture;this._texture.destroy(!!pt)}this._texture=null},it.from=function(lt,pt){return new it(lt instanceof ps.t?lt:ps.t.from(lt,pt))},Object.defineProperty(it.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(lt){this._roundPixels!==lt&&(this._transformID=-1),this._roundPixels=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(lt){var pt=Object(cl.sign)(this.scale.x)||1;this.scale.x=pt*lt/this._texture.orig.width,this._width=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(lt){var pt=Object(cl.sign)(this.scale.y)||1;this.scale.y=pt*lt/this._texture.orig.height,this._height=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"anchor",{get:function(){return this._anchor},set:function(lt){this._anchor.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"tint",{get:function(){return this._tint},set:function(lt){this._tint=lt,this._tintRGB=(lt>>16)+(65280&lt)+((255&lt)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"texture",{get:function(){return this._texture},set:function(lt){this._texture!==lt&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=lt||ps.t.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,lt&&(lt.baseTexture.valid?this._onTextureUpdate():lt.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),it})(Ol.b),Ty=function(vt,it){return(Ty=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};(function(vt){vt[vt.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",vt[vt.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"})($w||($w={}));var UE={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:$w.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},DD=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Uw=(function(){function vt(it){this.styleID=0,this.reset(),GE(this,it,it)}return vt.prototype.clone=function(){var it={};return GE(it,this,UE),new vt(it)},vt.prototype.reset=function(){GE(this,UE,UE)},Object.defineProperty(vt.prototype,"align",{get:function(){return this._align},set:function(it){this._align!==it&&(this._align=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"breakWords",{get:function(){return this._breakWords},set:function(it){this._breakWords!==it&&(this._breakWords=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(it){this._dropShadow!==it&&(this._dropShadow=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(it){this._dropShadowAlpha!==it&&(this._dropShadowAlpha=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(it){this._dropShadowAngle!==it&&(this._dropShadowAngle=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(it){this._dropShadowBlur!==it&&(this._dropShadowBlur=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(it){var lt=zE(it);this._dropShadowColor!==lt&&(this._dropShadowColor=lt,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(it){this._dropShadowDistance!==it&&(this._dropShadowDistance=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fill",{get:function(){return this._fill},set:function(it){var lt=zE(it);this._fill!==lt&&(this._fill=lt,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(it){this._fillGradientType!==it&&(this._fillGradientType=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(it){(function(lt,pt){if(!Array.isArray(lt)||!Array.isArray(pt)||lt.length!==pt.length)return!1;for(var _t=0;_t<lt.length;++_t)if(lt[_t]!==pt[_t])return!1;return!0})(this._fillGradientStops,it)||(this._fillGradientStops=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(it){this.fontFamily!==it&&(this._fontFamily=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fontSize",{get:function(){return this._fontSize},set:function(it){this._fontSize!==it&&(this._fontSize=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(it){this._fontStyle!==it&&(this._fontStyle=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(it){this._fontVariant!==it&&(this._fontVariant=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(it){this._fontWeight!==it&&(this._fontWeight=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(it){this._letterSpacing!==it&&(this._letterSpacing=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(it){this._lineHeight!==it&&(this._lineHeight=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"leading",{get:function(){return this._leading},set:function(it){this._leading!==it&&(this._leading=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(it){this._lineJoin!==it&&(this._lineJoin=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(it){this._miterLimit!==it&&(this._miterLimit=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"padding",{get:function(){return this._padding},set:function(it){this._padding!==it&&(this._padding=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"stroke",{get:function(){return this._stroke},set:function(it){var lt=zE(it);this._stroke!==lt&&(this._stroke=lt,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(it){this._strokeThickness!==it&&(this._strokeThickness=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(it){this._textBaseline!==it&&(this._textBaseline=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"trim",{get:function(){return this._trim},set:function(it){this._trim!==it&&(this._trim=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(it){this._whiteSpace!==it&&(this._whiteSpace=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(it){this._wordWrap!==it&&(this._wordWrap=it,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(it){this._wordWrapWidth!==it&&(this._wordWrapWidth=it,this.styleID++)},enumerable:!1,configurable:!0}),vt.prototype.toFontString=function(){var it=typeof this.fontSize=="number"?this.fontSize+"px":this.fontSize,lt=this.fontFamily;Array.isArray(this.fontFamily)||(lt=this.fontFamily.split(","));for(var pt=lt.length-1;pt>=0;pt--){var _t=lt[pt].trim();!/([\"\'])[^\'\"]+\1/.test(_t)&&DD.indexOf(_t)<0&&(_t='"'+_t+'"'),lt[pt]=_t}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+it+" "+lt.join(",")},vt})();function eC(vt){return typeof vt=="number"?Object(cl.hex2string)(vt):(typeof vt=="string"&&vt.indexOf("0x")===0&&(vt=vt.replace("0x","#")),vt)}function zE(vt){if(Array.isArray(vt)){for(var it=0;it<vt.length;++it)vt[it]=eC(vt[it]);return vt}return eC(vt)}function GE(vt,it,lt){for(var pt in lt)Array.isArray(it[pt])?vt[pt]=it[pt].slice():vt[pt]=it[pt]}var Z1=(function(){function vt(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt){this.text=it,this.style=lt,this.width=pt,this.height=_t,this.lines=Dt,this.lineWidths=Lt,this.lineHeight=$t,this.maxLineWidth=Xt,this.fontProperties=Yt}return vt.measureText=function(it,lt,pt,_t){_t===void 0&&(_t=vt._canvas),pt=pt??lt.wordWrap;var Dt=lt.toFontString(),Lt=vt.measureFont(Dt);Lt.fontSize===0&&(Lt.fontSize=lt.fontSize,Lt.ascent=lt.fontSize);var $t=_t.getContext("2d");$t.font=Dt;for(var Xt=(pt?vt.wordWrap(it,lt,_t):it).split(/(?:\r\n|\r|\n)/),Yt=new Array(Xt.length),Zt=0,lr=0;lr<Xt.length;lr++){var xr=$t.measureText(Xt[lr]).width+(Xt[lr].length-1)*lt.letterSpacing;Yt[lr]=xr,Zt=Math.max(Zt,xr)}var wr=Zt+lt.strokeThickness;lt.dropShadow&&(wr+=lt.dropShadowDistance);var Ir=lt.lineHeight||Lt.fontSize+lt.strokeThickness,kr=Math.max(Ir,Lt.fontSize+lt.strokeThickness)+(Xt.length-1)*(Ir+lt.leading);return lt.dropShadow&&(kr+=lt.dropShadowDistance),new vt(it,lt,wr,kr,Xt,Yt,Ir+lt.leading,Zt,Lt)},vt.wordWrap=function(it,lt,pt){pt===void 0&&(pt=vt._canvas);for(var _t=pt.getContext("2d"),Dt=0,Lt="",$t="",Xt=Object.create(null),Yt=lt.letterSpacing,Zt=lt.whiteSpace,lr=vt.collapseSpaces(Zt),xr=vt.collapseNewlines(Zt),wr=!lr,Ir=lt.wordWrapWidth+Yt,kr=vt.tokenize(it),Lr=0;Lr<kr.length;Lr++){var Xr=kr[Lr];if(vt.isNewline(Xr)){if(!xr){$t+=vt.addLine(Lt),wr=!lr,Lt="",Dt=0;continue}Xr=" "}if(lr){var _n=vt.isBreakingSpace(Xr),On=vt.isBreakingSpace(Lt[Lt.length-1]);if(_n&&On)continue}var Kn=vt.getFromCache(Xr,Yt,Xt,_t);if(Kn>Ir)if(Lt!==""&&($t+=vt.addLine(Lt),Lt="",Dt=0),vt.canBreakWords(Xr,lt.breakWords))for(var Mn=vt.wordWrapSplit(Xr),ca=0;ca<Mn.length;ca++){for(var Gn=Mn[ca],Qn=1;Mn[ca+Qn];){var ks=Mn[ca+Qn],Cs=Gn[Gn.length-1];if(vt.canBreakChars(Cs,ks,Xr,ca,lt.breakWords))break;Gn+=ks,Qn++}ca+=Gn.length-1;var gs=vt.getFromCache(Gn,Yt,Xt,_t);gs+Dt>Ir&&($t+=vt.addLine(Lt),wr=!1,Lt="",Dt=0),Lt+=Gn,Dt+=gs}else{Lt.length>0&&($t+=vt.addLine(Lt),Lt="",Dt=0);var _s=Lr===kr.length-1;$t+=vt.addLine(Xr,!_s),wr=!1,Lt="",Dt=0}else Kn+Dt>Ir&&(wr=!1,$t+=vt.addLine(Lt),Lt="",Dt=0),(Lt.length>0||!vt.isBreakingSpace(Xr)||wr)&&(Lt+=Xr,Dt+=Kn)}return $t+=vt.addLine(Lt,!1)},vt.addLine=function(it,lt){return lt===void 0&&(lt=!0),it=vt.trimRight(it),it=lt?it+`
`:it},vt.getFromCache=function(it,lt,pt,_t){var Dt=pt[it];if(typeof Dt!="number"){var Lt=it.length*lt;Dt=_t.measureText(it).width+Lt,pt[it]=Dt}return Dt},vt.collapseSpaces=function(it){return it==="normal"||it==="pre-line"},vt.collapseNewlines=function(it){return it==="normal"},vt.trimRight=function(it){if(typeof it!="string")return"";for(var lt=it.length-1;lt>=0;lt--){var pt=it[lt];if(!vt.isBreakingSpace(pt))break;it=it.slice(0,-1)}return it},vt.isNewline=function(it){return typeof it=="string"&&vt._newlines.indexOf(it.charCodeAt(0))>=0},vt.isBreakingSpace=function(it,lt){return typeof it=="string"&&vt._breakingSpaces.indexOf(it.charCodeAt(0))>=0},vt.tokenize=function(it){var lt=[],pt="";if(typeof it!="string")return lt;for(var _t=0;_t<it.length;_t++){var Dt=it[_t],Lt=it[_t+1];vt.isBreakingSpace(Dt,Lt)||vt.isNewline(Dt)?(pt!==""&&(lt.push(pt),pt=""),lt.push(Dt)):pt+=Dt}return pt!==""&&lt.push(pt),lt},vt.canBreakWords=function(it,lt){return lt},vt.canBreakChars=function(it,lt,pt,_t,Dt){return!0},vt.wordWrapSplit=function(it){return it.split("")},vt.measureFont=function(it){if(vt._fonts[it])return vt._fonts[it];var lt={ascent:0,descent:0,fontSize:0},pt=vt._canvas,_t=vt._context;_t.font=it;var Dt=vt.METRICS_STRING+vt.BASELINE_SYMBOL,Lt=Math.ceil(_t.measureText(Dt).width),$t=Math.ceil(_t.measureText(vt.BASELINE_SYMBOL).width),Xt=Math.ceil(vt.HEIGHT_MULTIPLIER*$t);$t=$t*vt.BASELINE_MULTIPLIER|0,pt.width=Lt,pt.height=Xt,_t.fillStyle="#f00",_t.fillRect(0,0,Lt,Xt),_t.font=it,_t.textBaseline="alphabetic",_t.fillStyle="#000",_t.fillText(Dt,0,$t);var Yt=_t.getImageData(0,0,Lt,Xt).data,Zt=Yt.length,lr=4*Lt,xr=0,wr=0,Ir=!1;for(xr=0;xr<$t;++xr){for(var kr=0;kr<lr;kr+=4)if(Yt[wr+kr]!==255){Ir=!0;break}if(Ir)break;wr+=lr}for(lt.ascent=$t-xr,wr=Zt-lr,Ir=!1,xr=Xt;xr>$t;--xr){for(kr=0;kr<lr;kr+=4)if(Yt[wr+kr]!==255){Ir=!0;break}if(Ir)break;wr-=lr}return lt.descent=xr-$t,lt.fontSize=lt.ascent+lt.descent,vt._fonts[it]=lt,lt},vt.clearMetrics=function(it){it===void 0&&(it=""),it?delete vt._fonts[it]:vt._fonts={}},Object.defineProperty(vt,"_canvas",{get:function(){if(!vt.__canvas){var it=void 0;try{var lt=new OffscreenCanvas(0,0),pt=lt.getContext("2d");if(pt&&pt.measureText)return vt.__canvas=lt,lt;it=document.createElement("canvas")}catch{it=document.createElement("canvas")}it.width=it.height=10,vt.__canvas=it}return vt.__canvas},enumerable:!1,configurable:!0}),Object.defineProperty(vt,"_context",{get:function(){return vt.__context||(vt.__context=vt._canvas.getContext("2d")),vt.__context},enumerable:!1,configurable:!0}),vt})();Z1._fonts={},Z1.METRICS_STRING="|ÉqÅ",Z1.BASELINE_SYMBOL="M",Z1.BASELINE_MULTIPLIER=1.4,Z1.HEIGHT_MULTIPLIER=2,Z1._newlines=[10,13],Z1._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var mI={texture:!0,children:!1,baseTexture:!0},tC=(function(vt){function it(lt,pt,_t){var Dt=this,Lt=!1;_t||(_t=document.createElement("canvas"),Lt=!0),_t.width=3,_t.height=3;var $t=ps.t.from(_t);return $t.orig=new Ho.j,$t.trim=new Ho.j,(Dt=vt.call(this,$t)||this)._ownCanvas=Lt,Dt.canvas=_t,Dt.context=Dt.canvas.getContext("2d"),Dt._resolution=N0.b.RESOLUTION,Dt._autoResolution=!0,Dt._text=null,Dt._style=null,Dt._styleListener=null,Dt._font="",Dt.text=lt,Dt.style=pt,Dt.localStyleID=-1,Dt}return(function(lt,pt){function _t(){this.constructor=lt}Ty(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype.updateText=function(lt){var pt=this._style;if(this.localStyleID!==pt.styleID&&(this.dirty=!0,this.localStyleID=pt.styleID),this.dirty||!lt){this._font=this._style.toFontString();var _t,Dt,Lt=this.context,$t=Z1.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),Xt=$t.width,Yt=$t.height,Zt=$t.lines,lr=$t.lineHeight,xr=$t.lineWidths,wr=$t.maxLineWidth,Ir=$t.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,Xt)+2*pt.padding)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,Yt)+2*pt.padding)*this._resolution),Lt.scale(this._resolution,this._resolution),Lt.clearRect(0,0,this.canvas.width,this.canvas.height),Lt.font=this._font,Lt.lineWidth=pt.strokeThickness,Lt.textBaseline=pt.textBaseline,Lt.lineJoin=pt.lineJoin,Lt.miterLimit=pt.miterLimit;for(var kr=pt.dropShadow?2:1,Lr=0;Lr<kr;++Lr){var Xr=pt.dropShadow&&Lr===0,_n=Xr?Math.ceil(Math.max(1,Yt)+2*pt.padding):0,On=_n*this._resolution;if(Xr){Lt.fillStyle="black",Lt.strokeStyle="black";var Kn=pt.dropShadowColor,Mn=Object(cl.hex2rgb)(typeof Kn=="number"?Kn:Object(cl.string2hex)(Kn)),ca=pt.dropShadowBlur*this._resolution,Gn=pt.dropShadowDistance*this._resolution;Lt.shadowColor="rgba("+255*Mn[0]+","+255*Mn[1]+","+255*Mn[2]+","+pt.dropShadowAlpha+")",Lt.shadowBlur=ca,Lt.shadowOffsetX=Math.cos(pt.dropShadowAngle)*Gn,Lt.shadowOffsetY=Math.sin(pt.dropShadowAngle)*Gn+On}else Lt.fillStyle=this._generateFillStyle(pt,Zt,$t),Lt.strokeStyle=pt.stroke,Lt.shadowColor="black",Lt.shadowBlur=0,Lt.shadowOffsetX=0,Lt.shadowOffsetY=0;var Qn=(lr-Ir.fontSize)/2;(!it.nextLineHeightBehavior||lr-Ir.fontSize<0)&&(Qn=0);for(var ks=0;ks<Zt.length;ks++)_t=pt.strokeThickness/2,Dt=pt.strokeThickness/2+ks*lr+Ir.ascent+Qn,pt.align==="right"?_t+=wr-xr[ks]:pt.align==="center"&&(_t+=(wr-xr[ks])/2),pt.stroke&&pt.strokeThickness&&this.drawLetterSpacing(Zt[ks],_t+pt.padding,Dt+pt.padding-_n,!0),pt.fill&&this.drawLetterSpacing(Zt[ks],_t+pt.padding,Dt+pt.padding-_n)}this.updateTexture()}},it.prototype.drawLetterSpacing=function(lt,pt,_t,Dt){Dt===void 0&&(Dt=!1);var Lt=this._style.letterSpacing,$t=it.experimentalLetterSpacing&&("letterSpacing"in CanvasRenderingContext2D.prototype||"textLetterSpacing"in CanvasRenderingContext2D.prototype);if(Lt===0||$t)return $t&&(this.context.letterSpacing=Lt,this.context.textLetterSpacing=Lt),void(Dt?this.context.strokeText(lt,pt,_t):this.context.fillText(lt,pt,_t));for(var Xt=pt,Yt=Array.from?Array.from(lt):lt.split(""),Zt=this.context.measureText(lt).width,lr=0,xr=0;xr<Yt.length;++xr){var wr=Yt[xr];Dt?this.context.strokeText(wr,Xt,_t):this.context.fillText(wr,Xt,_t);for(var Ir="",kr=xr+1;kr<Yt.length;++kr)Ir+=Yt[kr];Xt+=Zt-(lr=this.context.measureText(Ir).width)+Lt,Zt=lr}},it.prototype.updateTexture=function(){var lt=this.canvas;if(this._style.trim){var pt=Object(cl.trimCanvas)(lt);pt.data&&(lt.width=pt.width,lt.height=pt.height,this.context.putImageData(pt.data,0,0))}var _t=this._texture,Dt=this._style,Lt=Dt.trim?0:Dt.padding,$t=_t.baseTexture;_t.trim.width=_t._frame.width=lt.width/this._resolution,_t.trim.height=_t._frame.height=lt.height/this._resolution,_t.trim.x=-Lt,_t.trim.y=-Lt,_t.orig.width=_t._frame.width-2*Lt,_t.orig.height=_t._frame.height-2*Lt,this._onTextureUpdate(),$t.setRealSize(lt.width,lt.height,this._resolution),_t.updateUvs(),this.dirty=!1},it.prototype._render=function(lt){this._autoResolution&&this._resolution!==lt.resolution&&(this._resolution=lt.resolution,this.dirty=!0),this.updateText(!0),vt.prototype._render.call(this,lt)},it.prototype.updateTransform=function(){this.updateText(!0),vt.prototype.updateTransform.call(this)},it.prototype.getBounds=function(lt,pt){return this.updateText(!0),this._textureID===-1&&(lt=!1),vt.prototype.getBounds.call(this,lt,pt)},it.prototype.getLocalBounds=function(lt){return this.updateText(!0),vt.prototype.getLocalBounds.call(this,lt)},it.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)},it.prototype._generateFillStyle=function(lt,pt,_t){var Dt,Lt=lt.fill;if(!Array.isArray(Lt))return Lt;if(Lt.length===1)return Lt[0];var $t=lt.dropShadow?lt.dropShadowDistance:0,Xt=lt.padding||0,Yt=this.canvas.width/this._resolution-$t-2*Xt,Zt=this.canvas.height/this._resolution-$t-2*Xt,lr=Lt.slice(),xr=lt.fillGradientStops.slice();if(!xr.length)for(var wr=lr.length+1,Ir=1;Ir<wr;++Ir)xr.push(Ir/wr);if(lr.unshift(Lt[0]),xr.unshift(0),lr.push(Lt[Lt.length-1]),xr.push(1),lt.fillGradientType===$w.LINEAR_VERTICAL){Dt=this.context.createLinearGradient(Yt/2,Xt,Yt/2,Zt+Xt);var kr=_t.fontProperties.fontSize+lt.strokeThickness;for(Ir=0;Ir<pt.length;Ir++){var Lr=_t.lineHeight*(Ir-1)+kr,Xr=_t.lineHeight*Ir,_n=Xr;Ir>0&&Lr>Xr&&(_n=(Xr+Lr)/2);var On=Xr+kr,Kn=_t.lineHeight*(Ir+1),Mn=On;Ir+1<pt.length&&Kn<On&&(Mn=(On+Kn)/2);for(var ca=(Mn-_n)/Zt,Gn=0;Gn<lr.length;Gn++){var Qn=0;Qn=typeof xr[Gn]=="number"?xr[Gn]:Gn/lr.length;var ks=Math.min(1,Math.max(0,_n/Zt+Qn*ca));ks=Number(ks.toFixed(5)),Dt.addColorStop(ks,lr[Gn])}}}else{Dt=this.context.createLinearGradient(Xt,Zt/2,Yt+Xt,Zt/2);var Cs=lr.length+1,gs=1;for(Ir=0;Ir<lr.length;Ir++){var _s=void 0;_s=typeof xr[Ir]=="number"?xr[Ir]:gs/Cs,Dt.addColorStop(_s,lr[Ir]),gs++}}return Dt},it.prototype.destroy=function(lt){typeof lt=="boolean"&&(lt={children:lt}),lt=Object.assign({},mI,lt),vt.prototype.destroy.call(this,lt),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(it.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(lt){this.updateText(!0);var pt=Object(cl.sign)(this.scale.x)||1;this.scale.x=pt*lt/this._texture.orig.width,this._width=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(lt){this.updateText(!0);var pt=Object(cl.sign)(this.scale.y)||1;this.scale.y=pt*lt/this._texture.orig.height,this._height=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"style",{get:function(){return this._style},set:function(lt){lt=lt||{},this._style=lt instanceof Uw?lt:new Uw(lt),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"text",{get:function(){return this._text},set:function(lt){lt=String(lt??""),this._text!==lt&&(this._text=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"resolution",{get:function(){return this._resolution},set:function(lt){this._autoResolution=!1,this._resolution!==lt&&(this._resolution=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),it.nextLineHeightBehavior=!1,it.experimentalLetterSpacing=!1,it})(_g);/*!
* @pixi/prepare - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/prepare is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/N0.b.UPLOADS_PER_FRAME=4;/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var aS=function(vt,it){return(aS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},gI=(function(){function vt(it){this.maxItemsPerFrame=it,this.itemsLeft=0}return vt.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},vt.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},vt})();function rC(vt,it){var lt=!1;if(vt&&vt._textures&&vt._textures.length){for(var pt=0;pt<vt._textures.length;pt++)if(vt._textures[pt]instanceof ps.t){var _t=vt._textures[pt].baseTexture;it.indexOf(_t)===-1&&(it.push(_t),lt=!0)}}return lt}function vI(vt,it){if(vt.baseTexture instanceof ps.c){var lt=vt.baseTexture;return it.indexOf(lt)===-1&&it.push(lt),!0}return!1}function Dx(vt,it){if(vt._texture&&vt._texture instanceof ps.t){var lt=vt._texture.baseTexture;return it.indexOf(lt)===-1&&it.push(lt),!0}return!1}function qT(vt,it){return it instanceof tC&&(it.updateText(!0),!0)}function zw(vt,it){if(it instanceof Uw){var lt=it.toFontString();return Z1.measureFont(lt),!0}return!1}function nC(vt,it){if(vt instanceof tC){it.indexOf(vt.style)===-1&&it.push(vt.style),it.indexOf(vt)===-1&&it.push(vt);var lt=vt._texture.baseTexture;return it.indexOf(lt)===-1&&it.push(lt),!0}return!1}function MD(vt,it){return vt instanceof Uw&&(it.indexOf(vt)===-1&&it.push(vt),!0)}var ID=(function(){function vt(it){var lt=this;this.limiter=new gI(N0.b.UPLOADS_PER_FRAME),this.renderer=it,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){lt.queue&&lt.prepareItems()},this.registerFindHook(nC),this.registerFindHook(MD),this.registerFindHook(rC),this.registerFindHook(vI),this.registerFindHook(Dx),this.registerUploadHook(qT),this.registerUploadHook(zw)}return vt.prototype.upload=function(it,lt){typeof it=="function"&&(lt=it,it=null),it&&this.add(it),this.queue.length?(lt&&this.completes.push(lt),this.ticking||(this.ticking=!0,Fy.a.system.addOnce(this.tick,this,Fy.c.UTILITY))):lt&&lt()},vt.prototype.tick=function(){setTimeout(this.delayedTick,0)},vt.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var it=this.queue[0],lt=!1;if(it&&!it._destroyed){for(var pt=0,_t=this.uploadHooks.length;pt<_t;pt++)if(this.uploadHooks[pt](this.uploadHookHelper,it)){this.queue.shift(),lt=!0;break}}lt||this.queue.shift()}if(this.queue.length)Fy.a.system.addOnce(this.tick,this,Fy.c.UTILITY);else{this.ticking=!1;var Dt=this.completes.slice(0);for(this.completes.length=0,pt=0,_t=Dt.length;pt<_t;pt++)Dt[pt]()}},vt.prototype.registerFindHook=function(it){return it&&this.addHooks.push(it),this},vt.prototype.registerUploadHook=function(it){return it&&this.uploadHooks.push(it),this},vt.prototype.add=function(it){for(var lt=0,pt=this.addHooks.length;lt<pt&&!this.addHooks[lt](it,this.queue);lt++);if(it instanceof Ol.b)for(lt=it.children.length-1;lt>=0;lt--)this.add(it.children[lt]);return this},vt.prototype.destroy=function(){this.ticking&&Fy.a.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},vt})();function RD(vt,it){return it instanceof ps.c&&(it._glTextures[vt.CONTEXT_UID]||vt.texture.bind(it),!0)}function yI(vt,it){if(!(it instanceof wy))return!1;var lt=it.geometry;it.finishPoly(),lt.updateBatches();for(var pt=lt.batches,_t=0;_t<pt.length;_t++){var Dt=pt[_t].style.texture;Dt&&RD(vt,Dt.baseTexture)}return lt.batchable||vt.geometry.bind(lt,it._resolveDirectShader(vt)),!0}function Gw(vt,it){return vt instanceof wy&&(it.push(vt),!0)}var bI=(function(vt){function it(lt){var pt=vt.call(this,lt)||this;return pt.uploadHookHelper=pt.renderer,pt.registerFindHook(Gw),pt.registerUploadHook(RD),pt.registerUploadHook(yI),pt}return(function(lt,pt){function _t(){this.constructor=lt}aS(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it})(ID),PD=(function(){function vt(it,lt,pt){pt===void 0&&(pt=null),this._texture=it instanceof ps.t?it:null,this.baseTexture=it instanceof ps.c?it:this._texture.baseTexture,this.textures={},this.animations={},this.data=lt;var _t=this.baseTexture.resource;this.resolution=this._updateResolution(pt||(_t?_t.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return vt.prototype._updateResolution=function(it){it===void 0&&(it=null);var lt=this.data.meta.scale,pt=Object(cl.getResolutionOfUrl)(it,null);return pt===null&&(pt=lt!==void 0?parseFloat(lt):1),pt!==1&&this.baseTexture.setResolution(pt),pt},vt.prototype.parse=function(it){this._batchIndex=0,this._callback=it,this._frameKeys.length<=vt.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},vt.prototype._processFrames=function(it){for(var lt=it,pt=vt.BATCH_SIZE;lt-it<pt&&lt<this._frameKeys.length;){var _t=this._frameKeys[lt],Dt=this._frames[_t],Lt=Dt.frame;if(Lt){var $t=null,Xt=null,Yt=Dt.trimmed!==!1&&Dt.sourceSize?Dt.sourceSize:Dt.frame,Zt=new Ho.j(0,0,Math.floor(Yt.w)/this.resolution,Math.floor(Yt.h)/this.resolution);$t=Dt.rotated?new Ho.j(Math.floor(Lt.x)/this.resolution,Math.floor(Lt.y)/this.resolution,Math.floor(Lt.h)/this.resolution,Math.floor(Lt.w)/this.resolution):new Ho.j(Math.floor(Lt.x)/this.resolution,Math.floor(Lt.y)/this.resolution,Math.floor(Lt.w)/this.resolution,Math.floor(Lt.h)/this.resolution),Dt.trimmed!==!1&&Dt.spriteSourceSize&&(Xt=new Ho.j(Math.floor(Dt.spriteSourceSize.x)/this.resolution,Math.floor(Dt.spriteSourceSize.y)/this.resolution,Math.floor(Lt.w)/this.resolution,Math.floor(Lt.h)/this.resolution)),this.textures[_t]=new ps.t(this.baseTexture,$t,Zt,Xt,Dt.rotated?2:0,Dt.anchor),ps.t.addToCache(this.textures[_t],_t)}lt++}},vt.prototype._processAnimations=function(){var it=this.data.animations||{};for(var lt in it){this.animations[lt]=[];for(var pt=0;pt<it[lt].length;pt++){var _t=it[lt][pt];this.animations[lt].push(this.textures[_t])}}},vt.prototype._parseComplete=function(){var it=this._callback;this._callback=null,this._batchIndex=0,it.call(this,this.textures)},vt.prototype._nextBatch=function(){var it=this;this._processFrames(this._batchIndex*vt.BATCH_SIZE),this._batchIndex++,setTimeout(function(){it._batchIndex*vt.BATCH_SIZE<it._frameKeys.length?it._nextBatch():(it._processAnimations(),it._parseComplete())},0)},vt.prototype.destroy=function(it){var lt;for(var pt in it===void 0&&(it=!1),this.textures)this.textures[pt].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,it&&((lt=this._texture)===null||lt===void 0||lt.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},vt.BATCH_SIZE=1e3,vt})(),_I=(function(){function vt(){}return vt.use=function(it,lt){var pt,_t,Dt=this,Lt=it.name+"_image";if(it.data&&it.type===zm.TYPE.JSON&&it.data.frames&&!Dt.resources[Lt]){var $t=(_t=(pt=it.data)===null||pt===void 0?void 0:pt.meta)===null||_t===void 0?void 0:_t.related_multi_packs;if(Array.isArray($t))for(var Xt=function(wr){if(typeof wr!="string")return"continue";var Ir=wr.replace(".json",""),kr=cl.url.resolve(it.url.replace(Dt.baseUrl,""),wr);if(Dt.resources[Ir]||Object.values(Dt.resources).some(function(Xr){return cl.url.format(cl.url.parse(Xr.url))===kr}))return"continue";var Lr={crossOrigin:it.crossOrigin,loadType:zm.LOAD_TYPE.XHR,xhrType:zm.XHR_RESPONSE_TYPE.JSON,parentResource:it,metadata:it.metadata};Dt.add(Ir,kr,Lr)},Yt=0,Zt=$t;Yt<Zt.length;Yt++)Xt(Zt[Yt]);var lr={crossOrigin:it.crossOrigin,metadata:it.metadata.imageMetadata,parentResource:it},xr=vt.getResourcePath(it,Dt.baseUrl);Dt.add(Lt,xr,lr,function(wr){if(wr.error)lt(wr.error);else{var Ir=new PD(wr.texture,it.data,it.url);Ir.parse(function(){it.spritesheet=Ir,it.textures=Ir.textures,lt()})}})}else lt()},vt.getResourcePath=function(it,lt){return it.isDataUrl?it.data.meta.image:cl.url.resolve(it.url.replace(lt,""),it.data.meta.image)},vt})(),VE=function(vt,it){return(VE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function iC(vt,it){function lt(){this.constructor=vt}VE(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}var LT=new Ho.g,aC=(function(vt){function it(lt,pt,_t){pt===void 0&&(pt=100),_t===void 0&&(_t=100);var Dt=vt.call(this,lt)||this;return Dt.tileTransform=new Ho.m,Dt._width=pt,Dt._height=_t,Dt.uvMatrix=Dt.texture.uvMatrix||new ps.u(lt),Dt.pluginName="tilingSprite",Dt.uvRespectAnchor=!1,Dt}return iC(it,vt),Object.defineProperty(it.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(lt){this.uvMatrix.clampMargin=lt,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(lt){this.tileTransform.scale.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(lt){this.tileTransform.position.copyFrom(lt)},enumerable:!1,configurable:!0}),it.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},it.prototype._render=function(lt){var pt=this._texture;pt&&pt.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),lt.batch.setObjectRenderer(lt.plugins[this.pluginName]),lt.plugins[this.pluginName].render(this))},it.prototype._calculateBounds=function(){var lt=this._width*-this._anchor._x,pt=this._height*-this._anchor._y,_t=this._width*(1-this._anchor._x),Dt=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,lt,pt,_t,Dt)},it.prototype.getLocalBounds=function(lt){return this.children.length===0?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),lt||(this._localBoundsRect||(this._localBoundsRect=new Ho.j),lt=this._localBoundsRect),this._bounds.getRectangle(lt)):vt.prototype.getLocalBounds.call(this,lt)},it.prototype.containsPoint=function(lt){this.worldTransform.applyInverse(lt,LT);var pt=this._width,_t=this._height,Dt=-pt*this.anchor._x;if(LT.x>=Dt&&LT.x<Dt+pt){var Lt=-_t*this.anchor._y;if(LT.y>=Lt&&LT.y<Lt+_t)return!0}return!1},it.prototype.destroy=function(lt){vt.prototype.destroy.call(this,lt),this.tileTransform=null,this.uvMatrix=null},it.from=function(lt,pt){return new it(lt instanceof ps.t?lt:ps.t.from(lt,pt),pt.width,pt.height)},Object.defineProperty(it.prototype,"width",{get:function(){return this._width},set:function(lt){this._width=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"height",{get:function(){return this._height},set:function(lt){this._height=lt},enumerable:!1,configurable:!0}),it})(_g),FT=`#version 100
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,HE=new Ho.d,xI=(function(vt){function it(lt){var pt=vt.call(this,lt)||this;return lt.runners.contextChange.add(pt),pt.quad=new ps.o,pt.state=ps.s.for2d(),pt}return iC(it,vt),it.prototype.contextChange=function(){var lt=this.renderer,pt={globals:lt.globalUniforms};this.simpleShader=ps.r.from(FT,`#version 100
#define SHADER_NAME Tiling-Sprite-Simple-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
void main(void)
{
vec4 texSample = texture2D(uSampler, vTextureCoord);
gl_FragColor = texSample * uColor;
}
`,pt),this.shader=lt.context.webGLVersion>1?ps.r.from(`#version 300 es
#define SHADER_NAME Tiling-Sprite-300
precision lowp float;
in vec2 aVertexPosition;
in vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform mat3 uTransform;
out vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
}
`,`#version 300 es
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
in vec2 vTextureCoord;
out vec4 fragmentColor;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0
fragmentColor = texSample * uColor;
}
`,pt):ps.r.from(FT,`#version 100
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
#define SHADER_NAME Tiling-Sprite-100
precision lowp float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 uColor;
uniform mat3 uMapCoord;
uniform vec4 uClampFrame;
uniform vec2 uClampOffset;
void main(void)
{
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
coord = (uMapCoord * vec3(coord, 1.0)).xy;
vec2 unclamped = coord;
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
#ifdef GL_EXT_shader_texture_lod
vec4 texSample = unclamped == coord
? texture2D(uSampler, coord)
: texture2DLodEXT(uSampler, coord, 0);
#else
vec4 texSample = texture2D(uSampler, coord);
#endif
gl_FragColor = texSample * uColor;
}
`,pt)},it.prototype.render=function(lt){var pt=this.renderer,_t=this.quad,Dt=_t.vertices;Dt[0]=Dt[6]=lt._width*-lt.anchor.x,Dt[1]=Dt[3]=lt._height*-lt.anchor.y,Dt[2]=Dt[4]=lt._width*(1-lt.anchor.x),Dt[5]=Dt[7]=lt._height*(1-lt.anchor.y);var Lt=lt.uvRespectAnchor?lt.anchor.x:0,$t=lt.uvRespectAnchor?lt.anchor.y:0;(Dt=_t.uvs)[0]=Dt[6]=-Lt,Dt[1]=Dt[3]=-$t,Dt[2]=Dt[4]=1-Lt,Dt[5]=Dt[7]=1-$t,_t.invalidate();var Xt=lt._texture,Yt=Xt.baseTexture,Zt=lt.tileTransform.localTransform,lr=lt.uvMatrix,xr=Yt.isPowerOfTwo&&Xt.frame.width===Yt.width&&Xt.frame.height===Yt.height;xr&&(Yt._glTextures[pt.CONTEXT_UID]?xr=Yt.wrapMode!==ol.s.CLAMP:Yt.wrapMode===ol.s.CLAMP&&(Yt.wrapMode=ol.s.REPEAT));var wr=xr?this.simpleShader:this.shader,Ir=Xt.width,kr=Xt.height,Lr=lt._width,Xr=lt._height;HE.set(Zt.a*Ir/Lr,Zt.b*Ir/Xr,Zt.c*kr/Lr,Zt.d*kr/Xr,Zt.tx/Lr,Zt.ty/Xr),HE.invert(),xr?HE.prepend(lr.mapCoord):(wr.uniforms.uMapCoord=lr.mapCoord.toArray(!0),wr.uniforms.uClampFrame=lr.uClampFrame,wr.uniforms.uClampOffset=lr.uClampOffset),wr.uniforms.uTransform=HE.toArray(!0),wr.uniforms.uColor=Object(cl.premultiplyTintToRgba)(lt.tint,lt.worldAlpha,wr.uniforms.uColor,Yt.alphaMode),wr.uniforms.translationMatrix=lt.transform.worldTransform.toArray(!0),wr.uniforms.uSampler=Xt,pt.shader.bind(wr),pt.geometry.bind(_t),this.state.blendMode=Object(cl.correctBlendMode)(lt.blendMode,Yt.alphaMode),pt.state.set(this.state),pt.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},it})(ps.m),Mx=tt(8),ND=function(vt,it){return(ND=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},WE=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]},SI=(function(){function vt(){}return vt.test=function(it){return typeof it=="string"&&it.indexOf("info face=")===0},vt.parse=function(it){var lt=it.match(/^[a-z]+\s+.+$/gm),pt={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(var _t in lt){var Dt=lt[_t].match(/^[a-z]+/gm)[0],Lt=lt[_t].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),$t={};for(var Xt in Lt){var Yt=Lt[Xt].split("="),Zt=Yt[0],lr=Yt[1].replace(/"/gm,""),xr=parseFloat(lr),wr=isNaN(xr)?lr:xr;$t[Zt]=wr}pt[Dt].push($t)}var Ir=new WE;return pt.info.forEach(function(kr){return Ir.info.push({face:kr.face,size:parseInt(kr.size,10)})}),pt.common.forEach(function(kr){return Ir.common.push({lineHeight:parseInt(kr.lineHeight,10)})}),pt.page.forEach(function(kr){return Ir.page.push({id:parseInt(kr.id,10),file:kr.file})}),pt.char.forEach(function(kr){return Ir.char.push({id:parseInt(kr.id,10),page:parseInt(kr.page,10),x:parseInt(kr.x,10),y:parseInt(kr.y,10),width:parseInt(kr.width,10),height:parseInt(kr.height,10),xoffset:parseInt(kr.xoffset,10),yoffset:parseInt(kr.yoffset,10),xadvance:parseInt(kr.xadvance,10)})}),pt.kerning.forEach(function(kr){return Ir.kerning.push({first:parseInt(kr.first,10),second:parseInt(kr.second,10),amount:parseInt(kr.amount,10)})}),pt.distanceField.forEach(function(kr){return Ir.distanceField.push({distanceRange:parseInt(kr.distanceRange,10),fieldType:kr.fieldType})}),Ir},vt})(),k0=(function(){function vt(){}return vt.test=function(it){return it instanceof XMLDocument&&it.getElementsByTagName("page").length&&it.getElementsByTagName("info")[0].getAttribute("face")!==null},vt.parse=function(it){for(var lt=new WE,pt=it.getElementsByTagName("info"),_t=it.getElementsByTagName("common"),Dt=it.getElementsByTagName("page"),Lt=it.getElementsByTagName("char"),$t=it.getElementsByTagName("kerning"),Xt=it.getElementsByTagName("distanceField"),Yt=0;Yt<pt.length;Yt++)lt.info.push({face:pt[Yt].getAttribute("face"),size:parseInt(pt[Yt].getAttribute("size"),10)});for(Yt=0;Yt<_t.length;Yt++)lt.common.push({lineHeight:parseInt(_t[Yt].getAttribute("lineHeight"),10)});for(Yt=0;Yt<Dt.length;Yt++)lt.page.push({id:parseInt(Dt[Yt].getAttribute("id"),10)||0,file:Dt[Yt].getAttribute("file")});for(Yt=0;Yt<Lt.length;Yt++){var Zt=Lt[Yt];lt.char.push({id:parseInt(Zt.getAttribute("id"),10),page:parseInt(Zt.getAttribute("page"),10)||0,x:parseInt(Zt.getAttribute("x"),10),y:parseInt(Zt.getAttribute("y"),10),width:parseInt(Zt.getAttribute("width"),10),height:parseInt(Zt.getAttribute("height"),10),xoffset:parseInt(Zt.getAttribute("xoffset"),10),yoffset:parseInt(Zt.getAttribute("yoffset"),10),xadvance:parseInt(Zt.getAttribute("xadvance"),10)})}for(Yt=0;Yt<$t.length;Yt++)lt.kerning.push({first:parseInt($t[Yt].getAttribute("first"),10),second:parseInt($t[Yt].getAttribute("second"),10),amount:parseInt($t[Yt].getAttribute("amount"),10)});for(Yt=0;Yt<Xt.length;Yt++)lt.distanceField.push({fieldType:Xt[Yt].getAttribute("fieldType"),distanceRange:parseInt(Xt[Yt].getAttribute("distanceRange"),10)});return lt},vt})(),c0=(function(){function vt(){}return vt.test=function(it){if(typeof it=="string"&&it.indexOf("<font>")>-1){var lt=new globalThis.DOMParser().parseFromString(it,"text/xml");return k0.test(lt)}return!1},vt.parse=function(it){var lt=new globalThis.DOMParser().parseFromString(it,"text/xml");return k0.parse(lt)},vt})(),sC=[SI,k0,c0];function kD(vt){for(var it=0;it<sC.length;it++)if(sC[it].test(vt))return sC[it];return null}function wI(vt,it,lt,pt,_t,Dt,Lt){var $t=lt.text,Xt=lt.fontProperties;it.translate(pt,_t),it.scale(Dt,Dt);var Yt=Lt.strokeThickness/2,Zt=-Lt.strokeThickness/2;if(it.font=Lt.toFontString(),it.lineWidth=Lt.strokeThickness,it.textBaseline=Lt.textBaseline,it.lineJoin=Lt.lineJoin,it.miterLimit=Lt.miterLimit,it.fillStyle=(function(kr,Lr,Xr,_n,On,Kn){var Mn,ca=Xr.fill;if(!Array.isArray(ca))return ca;if(ca.length===1)return ca[0];var Gn=Xr.dropShadow?Xr.dropShadowDistance:0,Qn=Xr.padding||0,ks=kr.width/_n-Gn-2*Qn,Cs=kr.height/_n-Gn-2*Qn,gs=ca.slice(),_s=Xr.fillGradientStops.slice();if(!_s.length)for(var Ts=gs.length+1,ws=1;ws<Ts;++ws)_s.push(ws/Ts);if(gs.unshift(ca[0]),_s.unshift(0),gs.push(ca[ca.length-1]),_s.push(1),Xr.fillGradientType===$w.LINEAR_VERTICAL){Mn=Lr.createLinearGradient(ks/2,Qn,ks/2,Cs+Qn);var oo=0,no=(Kn.fontProperties.fontSize+Xr.strokeThickness)/Cs;for(ws=0;ws<On.length;ws++)for(var js=Kn.lineHeight*ws,Ws=0;Ws<gs.length;Ws++){var Co=js/Cs+(typeof _s[Ws]=="number"?_s[Ws]:Ws/gs.length)*no,jo=Math.max(oo,Co);jo=Math.min(jo,1),Mn.addColorStop(jo,gs[Ws]),oo=jo}}else{Mn=Lr.createLinearGradient(Qn,Cs/2,ks+Qn,Cs/2);var Qo=gs.length+1,xs=1;for(ws=0;ws<gs.length;ws++){var Ms=void 0;Ms=typeof _s[ws]=="number"?_s[ws]:xs/Qo,Mn.addColorStop(Ms,gs[ws]),xs++}}return Mn})(vt,it,Lt,Dt,[$t],lt),it.strokeStyle=Lt.stroke,Lt.dropShadow){var lr=Lt.dropShadowColor,xr=Object(cl.hex2rgb)(typeof lr=="number"?lr:Object(cl.string2hex)(lr)),wr=Lt.dropShadowBlur*Dt,Ir=Lt.dropShadowDistance*Dt;it.shadowColor="rgba("+255*xr[0]+","+255*xr[1]+","+255*xr[2]+","+Lt.dropShadowAlpha+")",it.shadowBlur=wr,it.shadowOffsetX=Math.cos(Lt.dropShadowAngle)*Ir,it.shadowOffsetY=Math.sin(Lt.dropShadowAngle)*Ir}else it.shadowColor="black",it.shadowBlur=0,it.shadowOffsetX=0,it.shadowOffsetY=0;Lt.stroke&&Lt.strokeThickness&&it.strokeText($t,Yt,Zt+lt.lineHeight-Xt.descent),Lt.fill&&it.fillText($t,Yt,Zt+lt.lineHeight-Xt.descent),it.setTransform(1,0,0,1,0,0),it.fillStyle="rgba(0, 0, 0, 0)"}function OD(vt){return Array.from?Array.from(vt):vt.split("")}function Vw(vt){return vt.codePointAt?vt.codePointAt(0):vt.charCodeAt(0)}var VS=(function(){function vt(it,lt,pt){var _t,Dt,Lt=it.info[0],$t=it.common[0],Xt=it.page[0],Yt=it.distanceField[0],Zt=Object(cl.getResolutionOfUrl)(Xt.file),lr={};this._ownsTextures=pt,this.font=Lt.face,this.size=Lt.size,this.lineHeight=$t.lineHeight/Zt,this.chars={},this.pageTextures=lr;for(var xr=0;xr<it.page.length;xr++){var wr=it.page[xr],Ir=wr.id,kr=wr.file;lr[Ir]=lt instanceof Array?lt[xr]:lt[kr],Yt?.fieldType&&Yt.fieldType!=="none"&&(lr[Ir].baseTexture.alphaMode=ol.a.NO_PREMULTIPLIED_ALPHA)}for(xr=0;xr<it.char.length;xr++){var Lr=it.char[xr],Xr=(Ir=Lr.id,Lr.page),_n=it.char[xr],On=_n.x,Kn=_n.y,Mn=_n.width,ca=_n.height,Gn=_n.xoffset,Qn=_n.yoffset,ks=_n.xadvance;On/=Zt,Kn/=Zt,Mn/=Zt,ca/=Zt,Gn/=Zt,Qn/=Zt,ks/=Zt;var Cs=new Ho.j(On+lr[Xr].frame.x/Zt,Kn+lr[Xr].frame.y/Zt,Mn,ca);this.chars[Ir]={xOffset:Gn,yOffset:Qn,xAdvance:ks,kerning:{},texture:new ps.t(lr[Xr].baseTexture,Cs),page:Xr}}for(xr=0;xr<it.kerning.length;xr++){var gs=it.kerning[xr],_s=gs.first,Ts=gs.second,ws=gs.amount;_s/=Zt,Ts/=Zt,ws/=Zt,this.chars[Ts]&&(this.chars[Ts].kerning[_s]=ws)}this.distanceFieldRange=Yt?.distanceRange,this.distanceFieldType=(Dt=(_t=Yt?.fieldType)===null||_t===void 0?void 0:_t.toLowerCase())!==null&&Dt!==void 0?Dt:"none"}return vt.prototype.destroy=function(){for(var it in this.chars)this.chars[it].texture.destroy(),this.chars[it].texture=null;for(var it in this.pageTextures)this._ownsTextures&&this.pageTextures[it].destroy(!0),this.pageTextures[it]=null;this.chars=null,this.pageTextures=null},vt.install=function(it,lt,pt){var _t;if(it instanceof WE)_t=it;else{var Dt=kD(it);if(!Dt)throw new Error("Unrecognized data format for font.");_t=Dt.parse(it)}lt instanceof ps.t&&(lt=[lt]);var Lt=new vt(_t,lt,pt);return vt.available[Lt.font]=Lt,Lt},vt.uninstall=function(it){var lt=vt.available[it];if(!lt)throw new Error("No font found named '"+it+"'");lt.destroy(),delete vt.available[it]},vt.from=function(it,lt,pt){if(!it)throw new Error("[BitmapFont] Property `name` is required.");var _t=Object.assign({},vt.defaultOptions,pt),Dt=_t.chars,Lt=_t.padding,$t=_t.resolution,Xt=_t.textureWidth,Yt=_t.textureHeight,Zt=(function(Co){typeof Co=="string"&&(Co=[Co]);for(var jo=[],Qo=0,xs=Co.length;Qo<xs;Qo++){var Ms=Co[Qo];if(Array.isArray(Ms)){if(Ms.length!==2)throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got "+Ms.length+".");var Io=Ms[0].charCodeAt(0),_o=Ms[1].charCodeAt(0);if(_o<Io)throw new Error("[BitmapFont]: Invalid character range.");for(var Ys=Io,zo=_o;Ys<=zo;Ys++)jo.push(String.fromCharCode(Ys))}else jo.push.apply(jo,OD(Ms))}if(jo.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return jo})(Dt),lr=lt instanceof Uw?lt:new Uw(lt),xr=Xt,wr=new WE;wr.info[0]={face:lr.fontFamily,size:lr.fontSize},wr.common[0]={lineHeight:lr.fontSize};for(var Ir,kr,Lr,Xr=0,_n=0,On=0,Kn=[],Mn=0;Mn<Zt.length;Mn++){Ir||((Ir=document.createElement("canvas")).width=Xt,Ir.height=Yt,kr=Ir.getContext("2d"),Lr=new ps.c(Ir,{resolution:$t}),Kn.push(new ps.t(Lr)),wr.page.push({id:Kn.length-1,file:""}));var ca=Z1.measureText(Zt[Mn],lr,!1,Ir),Gn=ca.width,Qn=Math.ceil(ca.height),ks=Math.ceil((lr.fontStyle==="italic"?2:1)*Gn);if(_n>=Yt-Qn*$t){if(_n===0)throw new Error("[BitmapFont] textureHeight "+Yt+"px is too small for "+lr.fontSize+"px fonts");--Mn,Ir=null,kr=null,Lr=null,_n=0,Xr=0,On=0}else if(On=Math.max(Qn+ca.fontProperties.descent,On),ks*$t+Xr>=xr)--Mn,_n+=On*$t,_n=Math.ceil(_n),Xr=0,On=0;else{wI(Ir,kr,ca,Xr,_n,$t,lr);var Cs=Vw(ca.text);wr.char.push({id:Cs,page:Kn.length-1,x:Xr/$t,y:_n/$t,width:ks,height:Qn,xoffset:0,yoffset:0,xadvance:Math.ceil(Gn-(lr.dropShadow?lr.dropShadowDistance:0)-(lr.stroke?lr.strokeThickness:0))}),Xr+=(ks+2*Lt)*$t,Xr=Math.ceil(Xr)}}Mn=0;for(var gs=Zt.length;Mn<gs;Mn++)for(var _s=Zt[Mn],Ts=0;Ts<gs;Ts++){var ws=Zt[Ts],oo=kr.measureText(_s).width,no=kr.measureText(ws).width,js=kr.measureText(_s+ws).width-(oo+no);js&&wr.kerning.push({first:Vw(_s),second:Vw(ws),amount:js})}var Ws=new vt(wr,Kn,!0);return vt.available[it]!==void 0&&vt.uninstall(it),vt.available[it]=Ws,Ws},vt.ALPHA=[["a","z"],["A","Z"]," "],vt.NUMERIC=[["0","9"]],vt.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],vt.ASCII=[[" ","~"]],vt.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:vt.ALPHANUMERIC},vt.available={},vt})(),oC=[],TI=[],qD=[],EI=((function(vt){function it(lt,pt){pt===void 0&&(pt={});var _t=vt.call(this)||this;_t._tint=16777215;var Dt=Object.assign({},it.styleDefaults,pt),Lt=Dt.align,$t=Dt.tint,Xt=Dt.maxWidth,Yt=Dt.letterSpacing,Zt=Dt.fontName,lr=Dt.fontSize;if(!VS.available[Zt])throw new Error('Missing BitmapFont "'+Zt+'"');return _t._activePagesMeshData=[],_t._textWidth=0,_t._textHeight=0,_t._align=Lt,_t._tint=$t,_t._fontName=Zt,_t._fontSize=lr||VS.available[Zt].size,_t.text=lt,_t._maxWidth=Xt,_t._maxLineHeight=0,_t._letterSpacing=Yt,_t._anchor=new Ho.e(function(){_t.dirty=!0},_t,0,0),_t._roundPixels=N0.b.ROUND_PIXELS,_t.dirty=!0,_t._resolution=N0.b.RESOLUTION,_t._autoResolution=!0,_t._textureCache={},_t}(function(lt,pt){function _t(){this.constructor=lt}ND(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype.updateText=function(){for(var lt,pt=VS.available[this._fontName],_t=this._fontSize/pt.size,Dt=new Ho.g,Lt=[],$t=[],Xt=[],Yt=OD(this._text.replace(/(?:\r\n|\r)/g,`
`)||" "),Zt=this._maxWidth*pt.size/this._fontSize,lr=pt.distanceFieldType==="none"?oC:TI,xr=null,wr=0,Ir=0,kr=0,Lr=-1,Xr=0,_n=0,On=0,Kn=0,Mn=0;Mn<Yt.length;Mn++){var ca=Vw(Ys=Yt[Mn]);if(/(?:\s)/.test(Ys)&&(Lr=Mn,Xr=wr,Kn++),Ys!=="\r"&&Ys!==`
`){var Gn=pt.chars[ca];if(Gn){xr&&Gn.kerning[xr]&&(Dt.x+=Gn.kerning[xr]);var Qn=qD.pop()||{texture:ps.t.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Ho.g};Qn.texture=Gn.texture,Qn.line=kr,Qn.charCode=ca,Qn.position.x=Dt.x+Gn.xOffset+this._letterSpacing/2,Qn.position.y=Dt.y+Gn.yOffset,Qn.prevSpaces=Kn,Lt.push(Qn),wr=Qn.position.x+Math.max(Gn.xAdvance,Gn.texture.orig.width),Dt.x+=Gn.xAdvance+this._letterSpacing,On=Math.max(On,Gn.yOffset+Gn.texture.height),xr=ca,Lr!==-1&&Zt>0&&Dt.x>Zt&&(++_n,Object(cl.removeItems)(Lt,1+Lr-_n,1+Mn-Lr),Mn=Lr,Lr=-1,$t.push(Xr),Xt.push(Lt.length>0?Lt[Lt.length-1].prevSpaces:0),Ir=Math.max(Ir,Xr),kr++,Dt.x=0,Dt.y+=pt.lineHeight,xr=null,Kn=0)}}else $t.push(wr),Xt.push(-1),Ir=Math.max(Ir,wr),++kr,++_n,Dt.x=0,Dt.y+=pt.lineHeight,xr=null,Kn=0}var ks=Yt[Yt.length-1];ks!=="\r"&&ks!==`
`&&(/(?:\s)/.test(ks)&&(wr=Xr),$t.push(wr),Ir=Math.max(Ir,wr),Xt.push(-1));var Cs=[];for(Mn=0;Mn<=kr;Mn++){var gs=0;this._align==="right"?gs=Ir-$t[Mn]:this._align==="center"?gs=(Ir-$t[Mn])/2:this._align==="justify"&&(gs=Xt[Mn]<0?0:(Ir-$t[Mn])/Xt[Mn]),Cs.push(gs)}var _s=Lt.length,Ts={},ws=[],oo=this._activePagesMeshData;for(Mn=0;Mn<oo.length;Mn++)lr.push(oo[Mn]);for(Mn=0;Mn<_s;Mn++){var no=(Jo=Lt[Mn].texture).baseTexture.uid;if(!Ts[no]){if(!(Lo=lr.pop())){var js=new Mx.b,Ws=void 0,Co=void 0;pt.distanceFieldType==="none"?(Ws=new Mx.c(ps.t.EMPTY),Co=ol.b.NORMAL):(Ws=new Mx.c(ps.t.EMPTY,{program:ps.n.from(`// Mesh material default fragment\r
attribute vec2 aVertexPosition;\r
attribute vec2 aTextureCoord;\r
\r
uniform mat3 projectionMatrix;\r
uniform mat3 translationMatrix;\r
uniform mat3 uTextureMatrix;\r
\r
varying vec2 vTextureCoord;\r
\r
void main(void)\r
{\r
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
\r
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
}\r
`,`// Pixi texture info\r
varying vec2 vTextureCoord;\r
uniform sampler2D uSampler;\r
\r
// Tint\r
uniform vec4 uColor;\r
\r
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
uniform float uFWidth;\r
\r
void main(void) {\r
\r
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
\r
// MSDF\r
float median = texColor.r + texColor.g + texColor.b -\r
min(texColor.r, min(texColor.g, texColor.b)) -\r
max(texColor.r, max(texColor.g, texColor.b));\r
// SDF\r
median = min(median, texColor.a);\r
\r
float screenPxDistance = uFWidth * (median - 0.5);\r
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
\r
// NPM Textures, NPM outputs\r
gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r
\r
}\r
`),uniforms:{uFWidth:0}}),Co=ol.b.NORMAL_NPM);var jo=new Mx.a(js,Ws);jo.blendMode=Co,Lo={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:jo,vertices:null,uvs:null,indices:null}}Lo.index=0,Lo.indexCount=0,Lo.vertexCount=0,Lo.uvsCount=0,Lo.total=0;var Qo=this._textureCache;Qo[no]=Qo[no]||new ps.t(Jo.baseTexture),Lo.mesh.texture=Qo[no],Lo.mesh.tint=this._tint,ws.push(Lo),Ts[no]=Lo}Ts[no].total++}for(Mn=0;Mn<oo.length;Mn++)ws.indexOf(oo[Mn])===-1&&this.removeChild(oo[Mn].mesh);for(Mn=0;Mn<ws.length;Mn++)ws[Mn].mesh.parent!==this&&this.addChild(ws[Mn].mesh);for(var Mn in this._activePagesMeshData=ws,Ts){var xs=(Lo=Ts[Mn]).total;if(!(((lt=Lo.indices)===null||lt===void 0?void 0:lt.length)>6*xs)||Lo.vertices.length<2*Mx.a.BATCHABLE_SIZE)Lo.vertices=new Float32Array(8*xs),Lo.uvs=new Float32Array(8*xs),Lo.indices=new Uint16Array(6*xs);else for(var Ms=Lo.total,Io=Lo.vertices,_o=4*Ms*2;_o<Io.length;_o++)Io[_o]=0;Lo.mesh.size=6*xs}for(Mn=0;Mn<_s;Mn++){var Ys,zo=(Ys=Lt[Mn]).position.x+Cs[Ys.line]*(this._align==="justify"?Ys.prevSpaces:1);this._roundPixels&&(zo=Math.round(zo));var Jo,mo=zo*_t,fs=Ys.position.y*_t,$s=Ts[(Jo=Ys.texture).baseTexture.uid],lo=Jo.frame,go=Jo._uvs,Qs=$s.index++;$s.indices[6*Qs+0]=0+4*Qs,$s.indices[6*Qs+1]=1+4*Qs,$s.indices[6*Qs+2]=2+4*Qs,$s.indices[6*Qs+3]=0+4*Qs,$s.indices[6*Qs+4]=2+4*Qs,$s.indices[6*Qs+5]=3+4*Qs,$s.vertices[8*Qs+0]=mo,$s.vertices[8*Qs+1]=fs,$s.vertices[8*Qs+2]=mo+lo.width*_t,$s.vertices[8*Qs+3]=fs,$s.vertices[8*Qs+4]=mo+lo.width*_t,$s.vertices[8*Qs+5]=fs+lo.height*_t,$s.vertices[8*Qs+6]=mo,$s.vertices[8*Qs+7]=fs+lo.height*_t,$s.uvs[8*Qs+0]=go.x0,$s.uvs[8*Qs+1]=go.y0,$s.uvs[8*Qs+2]=go.x1,$s.uvs[8*Qs+3]=go.y1,$s.uvs[8*Qs+4]=go.x2,$s.uvs[8*Qs+5]=go.y2,$s.uvs[8*Qs+6]=go.x3,$s.uvs[8*Qs+7]=go.y3}for(var Mn in this._textWidth=Ir*_t,this._textHeight=(Dt.y+pt.lineHeight)*_t,Ts){var Lo=Ts[Mn];if(this.anchor.x!==0||this.anchor.y!==0)for(var Cu=0,Du=this._textWidth*this.anchor.x,Mu=this._textHeight*this.anchor.y,Xl=0;Xl<Lo.total;Xl++)Lo.vertices[Cu++]-=Du,Lo.vertices[Cu++]-=Mu,Lo.vertices[Cu++]-=Du,Lo.vertices[Cu++]-=Mu,Lo.vertices[Cu++]-=Du,Lo.vertices[Cu++]-=Mu,Lo.vertices[Cu++]-=Du,Lo.vertices[Cu++]-=Mu;this._maxLineHeight=On*_t;var oy=Lo.mesh.geometry.getBuffer("aVertexPosition"),_m=Lo.mesh.geometry.getBuffer("aTextureCoord"),t1=Lo.mesh.geometry.getIndex();oy.data=Lo.vertices,_m.data=Lo.uvs,t1.data=Lo.indices,oy.update(),_m.update(),t1.update()}for(Mn=0;Mn<Lt.length;Mn++)qD.push(Lt[Mn])},it.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},it.prototype._render=function(lt){this._autoResolution&&this._resolution!==lt.resolution&&(this._resolution=lt.resolution,this.dirty=!0);var pt=VS.available[this._fontName],_t=pt.distanceFieldRange,Dt=pt.distanceFieldType,Lt=pt.size;if(Dt!=="none")for(var $t=this.worldTransform,Xt=$t.a,Yt=$t.b,Zt=$t.c,lr=$t.d,xr=Math.sqrt(Xt*Xt+Yt*Yt),wr=Math.sqrt(Zt*Zt+lr*lr),Ir=(Math.abs(xr)+Math.abs(wr))/2,kr=this._fontSize/Lt,Lr=0,Xr=this._activePagesMeshData;Lr<Xr.length;Lr++)Xr[Lr].mesh.shader.uniforms.uFWidth=Ir*_t*kr*this._resolution;vt.prototype._render.call(this,lt)},it.prototype.getLocalBounds=function(){return this.validate(),vt.prototype.getLocalBounds.call(this)},it.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},Object.defineProperty(it.prototype,"tint",{get:function(){return this._tint},set:function(lt){if(this._tint!==lt){this._tint=lt;for(var pt=0;pt<this._activePagesMeshData.length;pt++)this._activePagesMeshData[pt].mesh.tint=lt}},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"align",{get:function(){return this._align},set:function(lt){this._align!==lt&&(this._align=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"fontName",{get:function(){return this._fontName},set:function(lt){if(!VS.available[lt])throw new Error('Missing BitmapFont "'+lt+'"');this._fontName!==lt&&(this._fontName=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"fontSize",{get:function(){return this._fontSize},set:function(lt){this._fontSize!==lt&&(this._fontSize=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"anchor",{get:function(){return this._anchor},set:function(lt){typeof lt=="number"?this._anchor.set(lt):this._anchor.copyFrom(lt)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"text",{get:function(){return this._text},set:function(lt){lt=String(lt??""),this._text!==lt&&(this._text=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(lt){this._maxWidth!==lt&&(this._maxWidth=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"maxLineHeight",{get:function(){return this.validate(),this._maxLineHeight},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"textWidth",{get:function(){return this.validate(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(lt){this._letterSpacing!==lt&&(this._letterSpacing=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(lt){lt!==this._roundPixels&&(this._roundPixels=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"textHeight",{get:function(){return this.validate(),this._textHeight},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"resolution",{get:function(){return this._resolution},set:function(lt){this._autoResolution=!1,this._resolution!==lt&&(this._resolution=lt,this.dirty=!0)},enumerable:!1,configurable:!0}),it.prototype.destroy=function(lt){var pt=this._textureCache;for(var _t in pt)pt[_t].destroy(),delete pt[_t];this._textureCache=null,vt.prototype.destroy.call(this,lt)},it.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0}})(Ol.b),(function(){function vt(){}return vt.add=function(){zm.setExtensionXhrType("fnt",zm.XHR_RESPONSE_TYPE.TEXT)},vt.use=function(it,lt){var pt=kD(it.data);if(pt)for(var _t=vt.getBaseUrl(this,it),Dt=pt.parse(it.data),Lt={},$t=function(kr){Lt[kr.metadata.pageFile]=kr.texture,Object.keys(Lt).length===Dt.page.length&&(it.bitmapFont=VS.install(Dt,Lt,!0),lt())},Xt=0;Xt<Dt.page.length;++Xt){var Yt=Dt.page[Xt].file,Zt=_t+Yt,lr=!1;for(var xr in this.resources){var wr=this.resources[xr];if(wr.url===Zt){wr.metadata.pageFile=Yt,wr.texture?$t(wr):wr.onAfterMiddleware.add($t),lr=!0;break}}if(!lr){var Ir={crossOrigin:it.crossOrigin,loadType:zm.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:Yt},it.metadata.imageMetadata),parentResource:it};this.add(Zt,Ir,$t)}}else lt()},vt.getBaseUrl=function(it,lt){var pt=lt.isDataUrl?"":vt.dirname(lt.url);return lt.isDataUrl&&(pt==="."&&(pt=""),it.baseUrl&&pt&&it.baseUrl.charAt(it.baseUrl.length-1)==="/"&&(pt+="/")),(pt=pt.replace(it.baseUrl,""))&&pt.charAt(pt.length-1)!=="/"&&(pt+="/"),pt},vt.dirname=function(it){var lt=it.replace(/\\/g,"/").replace(/\/$/,"").replace(/\/[^\/]*$/,"");return lt===it?".":lt===""?"/":lt},vt})()),XE=function(vt,it){return(XE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};(function(vt){function it(lt){lt===void 0&&(lt=1);var pt=vt.call(this,ps.A,`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float uAlpha;
void main(void)
{
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
}
`,{uAlpha:1})||this;return pt.alpha=lt,pt}return(function(lt,pt){function _t(){this.constructor=lt}XE(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),Object.defineProperty(it.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(lt){this.uniforms.uAlpha=lt},enumerable:!1,configurable:!0}),it})(ps.k);var LD=function(vt,it){return(LD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function FD(vt,it){function lt(){this.constructor=vt}LD(vt,it),vt.prototype=it===null?Object.create(it):(lt.prototype=it.prototype,new lt)}var uC,O0,YE,lC,cC,BD,dC,QE,hC,BT,jD,$D,UD,jT,KE,Hw,fC,zD,W_,pC={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},GD=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
`);(function(vt){vt[vt.WEBGL_LEGACY=0]="WEBGL_LEGACY",vt[vt.WEBGL=1]="WEBGL",vt[vt.WEBGL2=2]="WEBGL2"})(uC||(uC={})),(function(vt){vt[vt.UNKNOWN=0]="UNKNOWN",vt[vt.WEBGL=1]="WEBGL",vt[vt.CANVAS=2]="CANVAS"})(O0||(O0={})),(function(vt){vt[vt.COLOR=16384]="COLOR",vt[vt.DEPTH=256]="DEPTH",vt[vt.STENCIL=1024]="STENCIL"})(YE||(YE={})),(function(vt){vt[vt.NORMAL=0]="NORMAL",vt[vt.ADD=1]="ADD",vt[vt.MULTIPLY=2]="MULTIPLY",vt[vt.SCREEN=3]="SCREEN",vt[vt.OVERLAY=4]="OVERLAY",vt[vt.DARKEN=5]="DARKEN",vt[vt.LIGHTEN=6]="LIGHTEN",vt[vt.COLOR_DODGE=7]="COLOR_DODGE",vt[vt.COLOR_BURN=8]="COLOR_BURN",vt[vt.HARD_LIGHT=9]="HARD_LIGHT",vt[vt.SOFT_LIGHT=10]="SOFT_LIGHT",vt[vt.DIFFERENCE=11]="DIFFERENCE",vt[vt.EXCLUSION=12]="EXCLUSION",vt[vt.HUE=13]="HUE",vt[vt.SATURATION=14]="SATURATION",vt[vt.COLOR=15]="COLOR",vt[vt.LUMINOSITY=16]="LUMINOSITY",vt[vt.NORMAL_NPM=17]="NORMAL_NPM",vt[vt.ADD_NPM=18]="ADD_NPM",vt[vt.SCREEN_NPM=19]="SCREEN_NPM",vt[vt.NONE=20]="NONE",vt[vt.SRC_OVER=0]="SRC_OVER",vt[vt.SRC_IN=21]="SRC_IN",vt[vt.SRC_OUT=22]="SRC_OUT",vt[vt.SRC_ATOP=23]="SRC_ATOP",vt[vt.DST_OVER=24]="DST_OVER",vt[vt.DST_IN=25]="DST_IN",vt[vt.DST_OUT=26]="DST_OUT",vt[vt.DST_ATOP=27]="DST_ATOP",vt[vt.ERASE=26]="ERASE",vt[vt.SUBTRACT=28]="SUBTRACT",vt[vt.XOR=29]="XOR"})(lC||(lC={})),(function(vt){vt[vt.POINTS=0]="POINTS",vt[vt.LINES=1]="LINES",vt[vt.LINE_LOOP=2]="LINE_LOOP",vt[vt.LINE_STRIP=3]="LINE_STRIP",vt[vt.TRIANGLES=4]="TRIANGLES",vt[vt.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",vt[vt.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(cC||(cC={})),(function(vt){vt[vt.RGBA=6408]="RGBA",vt[vt.RGB=6407]="RGB",vt[vt.RG=33319]="RG",vt[vt.RED=6403]="RED",vt[vt.RGBA_INTEGER=36249]="RGBA_INTEGER",vt[vt.RGB_INTEGER=36248]="RGB_INTEGER",vt[vt.RG_INTEGER=33320]="RG_INTEGER",vt[vt.RED_INTEGER=36244]="RED_INTEGER",vt[vt.ALPHA=6406]="ALPHA",vt[vt.LUMINANCE=6409]="LUMINANCE",vt[vt.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",vt[vt.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",vt[vt.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(BD||(BD={})),(function(vt){vt[vt.TEXTURE_2D=3553]="TEXTURE_2D",vt[vt.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",vt[vt.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(dC||(dC={})),(function(vt){vt[vt.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",vt[vt.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",vt[vt.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",vt[vt.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",vt[vt.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",vt[vt.UNSIGNED_INT=5125]="UNSIGNED_INT",vt[vt.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",vt[vt.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",vt[vt.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",vt[vt.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",vt[vt.BYTE=5120]="BYTE",vt[vt.SHORT=5122]="SHORT",vt[vt.INT=5124]="INT",vt[vt.FLOAT=5126]="FLOAT",vt[vt.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",vt[vt.HALF_FLOAT=36193]="HALF_FLOAT"})(QE||(QE={})),(function(vt){vt[vt.FLOAT=0]="FLOAT",vt[vt.INT=1]="INT",vt[vt.UINT=2]="UINT"})(hC||(hC={})),(function(vt){vt[vt.NEAREST=0]="NEAREST",vt[vt.LINEAR=1]="LINEAR"})(BT||(BT={})),(function(vt){vt[vt.CLAMP=33071]="CLAMP",vt[vt.REPEAT=10497]="REPEAT",vt[vt.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(jD||(jD={})),(function(vt){vt[vt.OFF=0]="OFF",vt[vt.POW2=1]="POW2",vt[vt.ON=2]="ON",vt[vt.ON_MANUAL=3]="ON_MANUAL"})($D||($D={})),(function(vt){vt[vt.NPM=0]="NPM",vt[vt.UNPACK=1]="UNPACK",vt[vt.PMA=2]="PMA",vt[vt.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",vt[vt.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",vt[vt.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",vt[vt.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(UD||(UD={})),(function(vt){vt[vt.NO=0]="NO",vt[vt.YES=1]="YES",vt[vt.AUTO=2]="AUTO",vt[vt.BLEND=0]="BLEND",vt[vt.CLEAR=1]="CLEAR",vt[vt.BLIT=2]="BLIT"})(jT||(jT={})),(function(vt){vt[vt.AUTO=0]="AUTO",vt[vt.MANUAL=1]="MANUAL"})(KE||(KE={})),(function(vt){vt.LOW="lowp",vt.MEDIUM="mediump",vt.HIGH="highp"})(Hw||(Hw={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.SCISSOR=1]="SCISSOR",vt[vt.STENCIL=2]="STENCIL",vt[vt.SPRITE=3]="SPRITE"})(fC||(fC={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.LOW=2]="LOW",vt[vt.MEDIUM=4]="MEDIUM",vt[vt.HIGH=8]="HIGH"})(zD||(zD={})),(function(vt){vt[vt.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",vt[vt.ARRAY_BUFFER=34962]="ARRAY_BUFFER",vt[vt.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(W_||(W_={}));var mC=(function(vt){function it(lt,pt,_t,Dt,Lt){pt===void 0&&(pt=8),_t===void 0&&(_t=4),Dt===void 0&&(Dt=N0.b.FILTER_RESOLUTION),Lt===void 0&&(Lt=5);var $t=this,Xt=(function(Zt,lr){var xr,wr=Math.ceil(Zt/2),Ir=`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform float strength;
varying vec2 vBlurTexCoords[%size%];
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vec2 textureCoord = filterTextureCoord();
%blur%
}`,kr="";xr=lr?"vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var Lr=0;Lr<Zt;Lr++){var Xr=xr.replace("%index%",Lr.toString());kr+=Xr=Xr.replace("%sampleIndex%",Lr-(wr-1)+".0"),kr+=`
`}return Ir=(Ir=Ir.replace("%blur%",kr)).replace("%size%",Zt.toString())})(Lt,lt),Yt=(function(Zt){for(var lr,xr=pC[Zt],wr=xr.length,Ir=GD,kr="",Lr=0;Lr<Zt;Lr++){var Xr="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",Lr.toString());lr=Lr,Lr>=wr&&(lr=Zt-Lr-1),kr+=Xr=Xr.replace("%value%",xr[lr].toString()),kr+=`
`}return Ir=(Ir=Ir.replace("%blur%",kr)).replace("%size%",Zt.toString())})(Lt);return($t=vt.call(this,Xt,Yt)||this).horizontal=lt,$t.resolution=Dt,$t._quality=0,$t.quality=_t,$t.blur=pt,$t}return FD(it,vt),it.prototype.apply=function(lt,pt,_t,Dt){if(_t?this.horizontal?this.uniforms.strength=1/_t.width*(_t.width/pt.width):this.uniforms.strength=1/_t.height*(_t.height/pt.height):this.horizontal?this.uniforms.strength=1/lt.renderer.width*(lt.renderer.width/pt.width):this.uniforms.strength=1/lt.renderer.height*(lt.renderer.height/pt.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)lt.applyFilter(this,pt,_t,Dt);else{var Lt=lt.getFilterTexture(),$t=lt.renderer,Xt=pt,Yt=Lt;this.state.blend=!1,lt.applyFilter(this,Xt,Yt,jT.CLEAR);for(var Zt=1;Zt<this.passes-1;Zt++){lt.bindAndClear(Xt,jT.BLIT),this.uniforms.uSampler=Yt;var lr=Yt;Yt=Xt,Xt=lr,$t.shader.bind(this),$t.geometry.draw(5)}this.state.blend=!0,lt.applyFilter(this,Yt,_t,Dt),lt.returnFilterTexture(Lt)}},Object.defineProperty(it.prototype,"blur",{get:function(){return this.strength},set:function(lt){this.padding=1+2*Math.abs(lt),this.strength=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"quality",{get:function(){return this._quality},set:function(lt){this._quality=lt,this.passes=lt},enumerable:!1,configurable:!0}),it})(ps.k),AI=(function(vt){function it(lt,pt,_t,Dt){lt===void 0&&(lt=8),pt===void 0&&(pt=4),_t===void 0&&(_t=N0.b.FILTER_RESOLUTION),Dt===void 0&&(Dt=5);var Lt=vt.call(this)||this;return Lt.blurXFilter=new mC(!0,lt,pt,_t,Dt),Lt.blurYFilter=new mC(!1,lt,pt,_t,Dt),Lt.resolution=_t,Lt.quality=pt,Lt.blur=lt,Lt.repeatEdgePixels=!1,Lt}return FD(it,vt),it.prototype.apply=function(lt,pt,_t,Dt){var Lt=Math.abs(this.blurXFilter.strength),$t=Math.abs(this.blurYFilter.strength);if(Lt&&$t){var Xt=lt.getFilterTexture();this.blurXFilter.apply(lt,pt,Xt,jT.CLEAR),this.blurYFilter.apply(lt,Xt,_t,Dt),lt.returnFilterTexture(Xt)}else $t?this.blurYFilter.apply(lt,pt,_t,Dt):this.blurXFilter.apply(lt,pt,_t,Dt)},it.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},Object.defineProperty(it.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(lt){this.blurXFilter.blur=this.blurYFilter.blur=lt,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(lt){this.blurXFilter.quality=this.blurYFilter.quality=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(lt){this.blurXFilter.blur=lt,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(lt){this.blurYFilter.blur=lt,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(lt){this.blurYFilter.blendMode=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(lt){this._repeatEdgePixels=lt,this.updatePadding()},enumerable:!1,configurable:!0}),it})(ps.k),gC=function(vt,it){return(gC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},$T=(function(vt){function it(){var lt=this,pt={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(lt=vt.call(this,ps.z,`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform float m[20];
uniform float uAlpha;
void main(void)
{
vec4 c = texture2D(uSampler, vTextureCoord);
if (uAlpha == 0.0) {
gl_FragColor = c;
return;
}
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (c.a > 0.0) {
c.rgb /= c.a;
}
vec4 result;
result.r = (m[0] * c.r);
result.r += (m[1] * c.g);
result.r += (m[2] * c.b);
result.r += (m[3] * c.a);
result.r += m[4];
result.g = (m[5] * c.r);
result.g += (m[6] * c.g);
result.g += (m[7] * c.b);
result.g += (m[8] * c.a);
result.g += m[9];
result.b = (m[10] * c.r);
result.b += (m[11] * c.g);
result.b += (m[12] * c.b);
result.b += (m[13] * c.a);
result.b += m[14];
result.a = (m[15] * c.r);
result.a += (m[16] * c.g);
result.a += (m[17] * c.b);
result.a += (m[18] * c.a);
result.a += m[19];
vec3 rgb = mix(c.rgb, result.rgb, uAlpha);
// Premultiply alpha again.
rgb *= result.a;
gl_FragColor = vec4(rgb, result.a);
}
`,pt)||this).alpha=1,lt}return(function(lt,pt){function _t(){this.constructor=lt}gC(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype._loadMatrix=function(lt,pt){pt===void 0&&(pt=!1);var _t=lt;pt&&(this._multiply(_t,this.uniforms.m,lt),_t=this._colorMatrix(_t)),this.uniforms.m=_t},it.prototype._multiply=function(lt,pt,_t){return lt[0]=pt[0]*_t[0]+pt[1]*_t[5]+pt[2]*_t[10]+pt[3]*_t[15],lt[1]=pt[0]*_t[1]+pt[1]*_t[6]+pt[2]*_t[11]+pt[3]*_t[16],lt[2]=pt[0]*_t[2]+pt[1]*_t[7]+pt[2]*_t[12]+pt[3]*_t[17],lt[3]=pt[0]*_t[3]+pt[1]*_t[8]+pt[2]*_t[13]+pt[3]*_t[18],lt[4]=pt[0]*_t[4]+pt[1]*_t[9]+pt[2]*_t[14]+pt[3]*_t[19]+pt[4],lt[5]=pt[5]*_t[0]+pt[6]*_t[5]+pt[7]*_t[10]+pt[8]*_t[15],lt[6]=pt[5]*_t[1]+pt[6]*_t[6]+pt[7]*_t[11]+pt[8]*_t[16],lt[7]=pt[5]*_t[2]+pt[6]*_t[7]+pt[7]*_t[12]+pt[8]*_t[17],lt[8]=pt[5]*_t[3]+pt[6]*_t[8]+pt[7]*_t[13]+pt[8]*_t[18],lt[9]=pt[5]*_t[4]+pt[6]*_t[9]+pt[7]*_t[14]+pt[8]*_t[19]+pt[9],lt[10]=pt[10]*_t[0]+pt[11]*_t[5]+pt[12]*_t[10]+pt[13]*_t[15],lt[11]=pt[10]*_t[1]+pt[11]*_t[6]+pt[12]*_t[11]+pt[13]*_t[16],lt[12]=pt[10]*_t[2]+pt[11]*_t[7]+pt[12]*_t[12]+pt[13]*_t[17],lt[13]=pt[10]*_t[3]+pt[11]*_t[8]+pt[12]*_t[13]+pt[13]*_t[18],lt[14]=pt[10]*_t[4]+pt[11]*_t[9]+pt[12]*_t[14]+pt[13]*_t[19]+pt[14],lt[15]=pt[15]*_t[0]+pt[16]*_t[5]+pt[17]*_t[10]+pt[18]*_t[15],lt[16]=pt[15]*_t[1]+pt[16]*_t[6]+pt[17]*_t[11]+pt[18]*_t[16],lt[17]=pt[15]*_t[2]+pt[16]*_t[7]+pt[17]*_t[12]+pt[18]*_t[17],lt[18]=pt[15]*_t[3]+pt[16]*_t[8]+pt[17]*_t[13]+pt[18]*_t[18],lt[19]=pt[15]*_t[4]+pt[16]*_t[9]+pt[17]*_t[14]+pt[18]*_t[19]+pt[19],lt},it.prototype._colorMatrix=function(lt){var pt=new Float32Array(lt);return pt[4]/=255,pt[9]/=255,pt[14]/=255,pt[19]/=255,pt},it.prototype.brightness=function(lt,pt){var _t=[lt,0,0,0,0,0,lt,0,0,0,0,0,lt,0,0,0,0,0,1,0];this._loadMatrix(_t,pt)},it.prototype.tint=function(lt,pt){var _t=[(lt>>16&255)/255,0,0,0,0,0,(lt>>8&255)/255,0,0,0,0,0,(255&lt)/255,0,0,0,0,0,1,0];this._loadMatrix(_t,pt)},it.prototype.greyscale=function(lt,pt){var _t=[lt,lt,lt,0,0,lt,lt,lt,0,0,lt,lt,lt,0,0,0,0,0,1,0];this._loadMatrix(_t,pt)},it.prototype.blackAndWhite=function(lt){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],lt)},it.prototype.hue=function(lt,pt){lt=(lt||0)/180*Math.PI;var _t=Math.cos(lt),Dt=Math.sin(lt),Lt=1/3,$t=(0,Math.sqrt)(Lt),Xt=[_t+(1-_t)*Lt,Lt*(1-_t)-$t*Dt,Lt*(1-_t)+$t*Dt,0,0,Lt*(1-_t)+$t*Dt,_t+Lt*(1-_t),Lt*(1-_t)-$t*Dt,0,0,Lt*(1-_t)-$t*Dt,Lt*(1-_t)+$t*Dt,_t+Lt*(1-_t),0,0,0,0,0,1,0];this._loadMatrix(Xt,pt)},it.prototype.contrast=function(lt,pt){var _t=(lt||0)+1,Dt=-.5*(_t-1),Lt=[_t,0,0,0,Dt,0,_t,0,0,Dt,0,0,_t,0,Dt,0,0,0,1,0];this._loadMatrix(Lt,pt)},it.prototype.saturate=function(lt,pt){lt===void 0&&(lt=0);var _t=2*lt/3+1,Dt=-.5*(_t-1),Lt=[_t,Dt,Dt,0,0,Dt,_t,Dt,0,0,Dt,Dt,_t,0,0,0,0,0,1,0];this._loadMatrix(Lt,pt)},it.prototype.desaturate=function(){this.saturate(-1)},it.prototype.negative=function(lt){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],lt)},it.prototype.sepia=function(lt){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],lt)},it.prototype.technicolor=function(lt){this._loadMatrix([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],lt)},it.prototype.polaroid=function(lt){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],lt)},it.prototype.toBGR=function(lt){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],lt)},it.prototype.kodachrome=function(lt){this._loadMatrix([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],lt)},it.prototype.browni=function(lt){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],lt)},it.prototype.vintage=function(lt){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],lt)},it.prototype.colorTone=function(lt,pt,_t,Dt,Lt){var $t=((_t=_t||16770432)>>16&255)/255,Xt=(_t>>8&255)/255,Yt=(255&_t)/255,Zt=((Dt=Dt||3375104)>>16&255)/255,lr=(Dt>>8&255)/255,xr=(255&Dt)/255,wr=[.3,.59,.11,0,0,$t,Xt,Yt,lt=lt||.2,0,Zt,lr,xr,pt=pt||.15,0,$t-Zt,Xt-lr,Yt-xr,0,0];this._loadMatrix(wr,Lt)},it.prototype.night=function(lt,pt){var _t=[-2*(lt=lt||.1),-lt,0,0,0,-lt,0,lt,0,0,0,lt,2*lt,0,0,0,0,0,1,0];this._loadMatrix(_t,pt)},it.prototype.predator=function(lt,pt){var _t=[11.224130630493164*lt,-4.794486999511719*lt,-2.8746118545532227*lt,0*lt,.40342438220977783*lt,-3.6330697536468506*lt,9.193157196044922*lt,-2.951810836791992*lt,0*lt,-1.316135048866272*lt,-3.2184197902679443*lt,-4.2375030517578125*lt,7.476448059082031*lt,0*lt,.8044459223747253*lt,0,0,0,1,0];this._loadMatrix(_t,pt)},it.prototype.lsd=function(lt){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],lt)},it.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(it.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(lt){this.uniforms.m=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(lt){this.uniforms.uAlpha=lt},enumerable:!1,configurable:!0}),it})(ps.k);$T.prototype.grayscale=$T.prototype.greyscale;/*!
* @pixi/filter-displacement - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/filter-displacement is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var vC=function(vt,it){return(vC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};(function(vt){function it(lt,pt){var _t=this,Dt=new Ho.d;return lt.renderable=!1,(_t=vt.call(this,`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
uniform mat3 filterMatrix;
varying vec2 vTextureCoord;
varying vec2 vFilterCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
}
`,`varying vec2 vFilterCoord;
varying vec2 vTextureCoord;
uniform vec2 scale;
uniform mat2 rotation;
uniform sampler2D uSampler;
uniform sampler2D mapSampler;
uniform highp vec4 inputSize;
uniform vec4 inputClamp;
void main(void)
{
vec4 map = texture2D(mapSampler, vFilterCoord);
map -= 0.5;
map.xy = scale * inputSize.zw * (rotation * map.xy);
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
}
`,{mapSampler:lt._texture,filterMatrix:Dt,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=lt,_t.maskMatrix=Dt,pt==null&&(pt=20),_t.scale=new Ho.g(pt,pt),_t}return(function(lt,pt){function _t(){this.constructor=lt}vC(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype.apply=function(lt,pt,_t,Dt){this.uniforms.filterMatrix=lt.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var Lt=this.maskSprite.worldTransform,$t=Math.sqrt(Lt.a*Lt.a+Lt.b*Lt.b),Xt=Math.sqrt(Lt.c*Lt.c+Lt.d*Lt.d);$t!==0&&Xt!==0&&(this.uniforms.rotation[0]=Lt.a/$t,this.uniforms.rotation[1]=Lt.b/$t,this.uniforms.rotation[2]=Lt.c/Xt,this.uniforms.rotation[3]=Lt.d/Xt),lt.applyFilter(this,pt,_t,Dt)},Object.defineProperty(it.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(lt){this.uniforms.mapSampler=lt},enumerable:!1,configurable:!0}),it})(ps.k);var VD=function(vt,it){return(VD=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};(function(vt){function it(){return vt.call(this,`
attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
void texcoords(vec2 fragCoord, vec2 inverseVP,
out vec2 v_rgbNW, out vec2 v_rgbNE,
out vec2 v_rgbSW, out vec2 v_rgbSE,
out vec2 v_rgbM) {
v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;
v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;
v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;
v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;
v_rgbM = vec2(fragCoord * inverseVP);
}
void main(void) {
gl_Position = filterVertexPosition();
vFragCoord = aVertexPosition * outputFrame.zw;
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
}
`,`varying vec2 v_rgbNW;
varying vec2 v_rgbNE;
varying vec2 v_rgbSW;
varying vec2 v_rgbSE;
varying vec2 v_rgbM;
varying vec2 vFragCoord;
uniform sampler2D uSampler;
uniform highp vec4 inputSize;
/**
Basic FXAA implementation based on the code on geeks3d.com with the
modification that the texture2DLod stuff was removed since it's
unsupported by WebGL.
--
From:
https://github.com/mitsuhiko/webgl-meincraft
Copyright (c) 2011 by Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FXAA_REDUCE_MIN
#define FXAA_REDUCE_MIN (1.0/ 128.0)
#endif
#ifndef FXAA_REDUCE_MUL
#define FXAA_REDUCE_MUL (1.0 / 8.0)
#endif
#ifndef FXAA_SPAN_MAX
#define FXAA_SPAN_MAX 8.0
#endif
//optimized version for mobile, where dependent
//texture reads can be a bottleneck
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
vec2 v_rgbNW, vec2 v_rgbNE,
vec2 v_rgbSW, vec2 v_rgbSE,
vec2 v_rgbM) {
vec4 color;
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;
vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;
vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;
vec4 texColor = texture2D(tex, v_rgbM);
vec3 rgbM = texColor.xyz;
vec3 luma = vec3(0.299, 0.587, 0.114);
float lumaNW = dot(rgbNW, luma);
float lumaNE = dot(rgbNE, luma);
float lumaSW = dot(rgbSW, luma);
float lumaSE = dot(rgbSE, luma);
float lumaM = dot(rgbM, luma);
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
mediump vec2 dir;
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
dir * rcpDirMin)) * inverseVP;
vec3 rgbA = 0.5 * (
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
vec3 rgbB = rgbA * 0.5 + 0.25 * (
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
float lumaB = dot(rgbB, luma);
if ((lumaB < lumaMin) || (lumaB > lumaMax))
color = vec4(rgbA, texColor.a);
else
color = vec4(rgbB, texColor.a);
return color;
}
void main() {
vec4 color;
color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
gl_FragColor = color;
}
`)||this}return(function(lt,pt){function _t(){this.constructor=lt}VD(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it})(ps.k);var Ww=function(vt,it){return(Ww=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)},yC,HD,bC,WD,_C,Xw,XD,ZE,xC,JE,YD,Ix,SC,Qt,sr,Rr,cn,Bn,ns;(function(vt){function it(lt,pt){lt===void 0&&(lt=.5),pt===void 0&&(pt=Math.random());var _t=vt.call(this,ps.z,`precision highp float;
varying vec2 vTextureCoord;
varying vec4 vColor;
uniform float uNoise;
uniform float uSeed;
uniform sampler2D uSampler;
float rand(vec2 co)
{
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
}
void main()
{
vec4 color = texture2D(uSampler, vTextureCoord);
float randomValue = rand(gl_FragCoord.xy * uSeed);
float diff = (randomValue - 0.5) * uNoise;
// Un-premultiply alpha before applying the color matrix. See issue #3539.
if (color.a > 0.0) {
color.rgb /= color.a;
}
color.r += diff;
color.g += diff;
color.b += diff;
// Premultiply alpha again.
color.rgb *= color.a;
gl_FragColor = color;
}
`,{uNoise:0,uSeed:0})||this;return _t.noise=lt,_t.seed=pt,_t}return(function(lt,pt){function _t(){this.constructor=lt}Ww(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),Object.defineProperty(it.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(lt){this.uniforms.uNoise=lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(lt){this.uniforms.uSeed=lt},enumerable:!1,configurable:!0}),it})(ps.k),(function(vt){vt[vt.WEBGL_LEGACY=0]="WEBGL_LEGACY",vt[vt.WEBGL=1]="WEBGL",vt[vt.WEBGL2=2]="WEBGL2"})(yC||(yC={})),(function(vt){vt[vt.UNKNOWN=0]="UNKNOWN",vt[vt.WEBGL=1]="WEBGL",vt[vt.CANVAS=2]="CANVAS"})(HD||(HD={})),(function(vt){vt[vt.COLOR=16384]="COLOR",vt[vt.DEPTH=256]="DEPTH",vt[vt.STENCIL=1024]="STENCIL"})(bC||(bC={})),(function(vt){vt[vt.NORMAL=0]="NORMAL",vt[vt.ADD=1]="ADD",vt[vt.MULTIPLY=2]="MULTIPLY",vt[vt.SCREEN=3]="SCREEN",vt[vt.OVERLAY=4]="OVERLAY",vt[vt.DARKEN=5]="DARKEN",vt[vt.LIGHTEN=6]="LIGHTEN",vt[vt.COLOR_DODGE=7]="COLOR_DODGE",vt[vt.COLOR_BURN=8]="COLOR_BURN",vt[vt.HARD_LIGHT=9]="HARD_LIGHT",vt[vt.SOFT_LIGHT=10]="SOFT_LIGHT",vt[vt.DIFFERENCE=11]="DIFFERENCE",vt[vt.EXCLUSION=12]="EXCLUSION",vt[vt.HUE=13]="HUE",vt[vt.SATURATION=14]="SATURATION",vt[vt.COLOR=15]="COLOR",vt[vt.LUMINOSITY=16]="LUMINOSITY",vt[vt.NORMAL_NPM=17]="NORMAL_NPM",vt[vt.ADD_NPM=18]="ADD_NPM",vt[vt.SCREEN_NPM=19]="SCREEN_NPM",vt[vt.NONE=20]="NONE",vt[vt.SRC_OVER=0]="SRC_OVER",vt[vt.SRC_IN=21]="SRC_IN",vt[vt.SRC_OUT=22]="SRC_OUT",vt[vt.SRC_ATOP=23]="SRC_ATOP",vt[vt.DST_OVER=24]="DST_OVER",vt[vt.DST_IN=25]="DST_IN",vt[vt.DST_OUT=26]="DST_OUT",vt[vt.DST_ATOP=27]="DST_ATOP",vt[vt.ERASE=26]="ERASE",vt[vt.SUBTRACT=28]="SUBTRACT",vt[vt.XOR=29]="XOR"})(WD||(WD={})),(function(vt){vt[vt.POINTS=0]="POINTS",vt[vt.LINES=1]="LINES",vt[vt.LINE_LOOP=2]="LINE_LOOP",vt[vt.LINE_STRIP=3]="LINE_STRIP",vt[vt.TRIANGLES=4]="TRIANGLES",vt[vt.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",vt[vt.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(_C||(_C={})),(function(vt){vt[vt.RGBA=6408]="RGBA",vt[vt.RGB=6407]="RGB",vt[vt.RG=33319]="RG",vt[vt.RED=6403]="RED",vt[vt.RGBA_INTEGER=36249]="RGBA_INTEGER",vt[vt.RGB_INTEGER=36248]="RGB_INTEGER",vt[vt.RG_INTEGER=33320]="RG_INTEGER",vt[vt.RED_INTEGER=36244]="RED_INTEGER",vt[vt.ALPHA=6406]="ALPHA",vt[vt.LUMINANCE=6409]="LUMINANCE",vt[vt.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",vt[vt.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",vt[vt.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Xw||(Xw={})),(function(vt){vt[vt.TEXTURE_2D=3553]="TEXTURE_2D",vt[vt.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",vt[vt.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",vt[vt.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",vt[vt.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(XD||(XD={})),(function(vt){vt[vt.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",vt[vt.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",vt[vt.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",vt[vt.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",vt[vt.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",vt[vt.UNSIGNED_INT=5125]="UNSIGNED_INT",vt[vt.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",vt[vt.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",vt[vt.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",vt[vt.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",vt[vt.BYTE=5120]="BYTE",vt[vt.SHORT=5122]="SHORT",vt[vt.INT=5124]="INT",vt[vt.FLOAT=5126]="FLOAT",vt[vt.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",vt[vt.HALF_FLOAT=36193]="HALF_FLOAT"})(ZE||(ZE={})),(function(vt){vt[vt.FLOAT=0]="FLOAT",vt[vt.INT=1]="INT",vt[vt.UINT=2]="UINT"})(xC||(xC={})),(function(vt){vt[vt.NEAREST=0]="NEAREST",vt[vt.LINEAR=1]="LINEAR"})(JE||(JE={})),(function(vt){vt[vt.CLAMP=33071]="CLAMP",vt[vt.REPEAT=10497]="REPEAT",vt[vt.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(YD||(YD={})),(function(vt){vt[vt.OFF=0]="OFF",vt[vt.POW2=1]="POW2",vt[vt.ON=2]="ON",vt[vt.ON_MANUAL=3]="ON_MANUAL"})(Ix||(Ix={})),(function(vt){vt[vt.NPM=0]="NPM",vt[vt.UNPACK=1]="UNPACK",vt[vt.PMA=2]="PMA",vt[vt.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",vt[vt.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",vt[vt.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",vt[vt.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(SC||(SC={})),(function(vt){vt[vt.NO=0]="NO",vt[vt.YES=1]="YES",vt[vt.AUTO=2]="AUTO",vt[vt.BLEND=0]="BLEND",vt[vt.CLEAR=1]="CLEAR",vt[vt.BLIT=2]="BLIT"})(Qt||(Qt={})),(function(vt){vt[vt.AUTO=0]="AUTO",vt[vt.MANUAL=1]="MANUAL"})(sr||(sr={})),(function(vt){vt.LOW="lowp",vt.MEDIUM="mediump",vt.HIGH="highp"})(Rr||(Rr={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.SCISSOR=1]="SCISSOR",vt[vt.STENCIL=2]="STENCIL",vt[vt.SPRITE=3]="SPRITE"})(cn||(cn={})),(function(vt){vt[vt.NONE=0]="NONE",vt[vt.LOW=2]="LOW",vt[vt.MEDIUM=4]="MEDIUM",vt[vt.HIGH=8]="HIGH"})(Bn||(Bn={})),(function(vt){vt[vt.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",vt[vt.ARRAY_BUFFER=34962]="ARRAY_BUFFER",vt[vt.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(ns||(ns={}));var Ds=new Ho.d;Ol.c.prototype._cacheAsBitmap=!1,Ol.c.prototype._cacheData=null,Ol.c.prototype._cacheAsBitmapResolution=null,Ol.c.prototype._cacheAsBitmapMultisample=Bn.NONE;var Fs=function(){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};Object.defineProperties(Ol.c.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(vt){vt!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=vt,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(vt){vt!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=vt,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(vt){var it;this._cacheAsBitmap!==vt&&(this._cacheAsBitmap=vt,vt?(this._cacheData||(this._cacheData=new Fs),(it=this._cacheData).originalRender=this.render,it.originalRenderCanvas=this.renderCanvas,it.originalUpdateTransform=this.updateTransform,it.originalCalculateBounds=this.calculateBounds,it.originalGetLocalBounds=this.getLocalBounds,it.originalDestroy=this.destroy,it.originalContainsPoint=this.containsPoint,it.originalMask=this._mask,it.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((it=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=it.originalRender,this.renderCanvas=it.originalRenderCanvas,this.calculateBounds=it.originalCalculateBounds,this.getLocalBounds=it.originalGetLocalBounds,this.destroy=it.originalDestroy,this.updateTransform=it.originalUpdateTransform,this.containsPoint=it.originalContainsPoint,this._mask=it.originalMask,this.filterArea=it.originalFilterArea))}}}),Ol.c.prototype._renderCached=function(vt){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(vt),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(vt))},Ol.c.prototype._initCachedDisplayObject=function(vt){var it;if(!this._cacheData||!this._cacheData.sprite){var lt=this.alpha;this.alpha=1,vt.batch.flush();var pt=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var _t=this.filters[0].padding;pt.pad(_t)}pt.ceil(N0.b.RESOLUTION);var Dt=vt.renderTexture.current,Lt=vt.renderTexture.sourceFrame.clone(),$t=vt.renderTexture.destinationFrame.clone(),Xt=vt.projection.transform,Yt=ps.p.create({width:pt.width,height:pt.height,resolution:this.cacheAsBitmapResolution||vt.resolution,multisample:(it=this.cacheAsBitmapMultisample)!==null&&it!==void 0?it:vt.multisample}),Zt="cacheAsBitmap_"+Object(cl.uid)();this._cacheData.textureCacheId=Zt,ps.c.addToCache(Yt.baseTexture,Zt),ps.t.addToCache(Yt,Zt);var lr=this.transform.localTransform.copyTo(Ds).invert().translate(-pt.x,-pt.y);this.render=this._cacheData.originalRender,vt.render(this,{renderTexture:Yt,clear:!0,transform:lr,skipUpdateTransform:!1}),vt.framebuffer.blit(),vt.projection.transform=Xt,vt.renderTexture.bind(Dt,Lt,$t),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=lt;var xr=new _g(Yt);xr.transform.worldTransform=this.transform.worldTransform,xr.anchor.x=-pt.x/pt.width,xr.anchor.y=-pt.y/pt.height,xr.alpha=lt,xr._bounds=this._bounds,this._cacheData.sprite=xr,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=xr.containsPoint.bind(xr)}},Ol.c.prototype._renderCachedCanvas=function(vt){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(vt),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(vt))},Ol.c.prototype._initCachedDisplayObjectCanvas=function(vt){if(!this._cacheData||!this._cacheData.sprite){var it=this.getLocalBounds(null,!0),lt=this.alpha;this.alpha=1;var pt=vt.context,_t=vt._projTransform;it.ceil(N0.b.RESOLUTION);var Dt=ps.p.create({width:it.width,height:it.height}),Lt="cacheAsBitmap_"+Object(cl.uid)();this._cacheData.textureCacheId=Lt,ps.c.addToCache(Dt.baseTexture,Lt),ps.t.addToCache(Dt,Lt);var $t=Ds;this.transform.localTransform.copyTo($t),$t.invert(),$t.tx-=it.x,$t.ty-=it.y,this.renderCanvas=this._cacheData.originalRenderCanvas,vt.render(this,{renderTexture:Dt,clear:!0,transform:$t,skipUpdateTransform:!1}),vt.context=pt,vt._projTransform=_t,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=lt;var Xt=new _g(Dt);Xt.transform.worldTransform=this.transform.worldTransform,Xt.anchor.x=-it.x/it.width,Xt.anchor.y=-it.y/it.height,Xt.alpha=lt,Xt._bounds=this._bounds,this._cacheData.sprite=Xt,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=vt._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=Xt.containsPoint.bind(Xt)}},Ol.c.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},Ol.c.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},Ol.c.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,ps.c.removeFromCache(this._cacheData.textureCacheId),ps.t.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Ol.c.prototype._cacheAsBitmapDestroy=function(vt){this.cacheAsBitmap=!1,this.destroy(vt)},Ol.c.prototype.name=null,Ol.b.prototype.getChildByName=function(vt,it){for(var lt=0,pt=this.children.length;lt<pt;lt++)if(this.children[lt].name===vt)return this.children[lt];if(it){for(lt=0,pt=this.children.length;lt<pt;lt++)if(this.children[lt].getChildByName){var _t=this.children[lt].getChildByName(vt,!0);if(_t)return _t}}return null},Ol.c.prototype.getGlobalPosition=function(vt,it){return vt===void 0&&(vt=new Ho.g),it===void 0&&(it=!1),this.parent?this.parent.toGlobal(this.position,vt,it):(vt.x=this.position.x,vt.y=this.position.y),vt};var ro=tt(16),Go=(tt(12),function(vt,it){return(Go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)}),Uo=(function(vt){function it(lt,pt){pt===void 0&&(pt=!0);var _t=vt.call(this,lt[0]instanceof ps.t?lt[0]:lt[0].texture)||this;return _t._textures=null,_t._durations=null,_t._autoUpdate=pt,_t._isConnectedToTicker=!1,_t.animationSpeed=1,_t.loop=!0,_t.updateAnchor=!1,_t.onComplete=null,_t.onFrameChange=null,_t.onLoop=null,_t._currentTime=0,_t._playing=!1,_t._previousFrame=null,_t.textures=lt,_t}return(function(lt,pt){function _t(){this.constructor=lt}Go(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Fy.a.shared.remove(this.update,this),this._isConnectedToTicker=!1))},it.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Fy.a.shared.add(this.update,this,Fy.c.HIGH),this._isConnectedToTicker=!0))},it.prototype.gotoAndStop=function(lt){this.stop();var pt=this.currentFrame;this._currentTime=lt,pt!==this.currentFrame&&this.updateTexture()},it.prototype.gotoAndPlay=function(lt){var pt=this.currentFrame;this._currentTime=lt,pt!==this.currentFrame&&this.updateTexture(),this.play()},it.prototype.update=function(lt){if(this._playing){var pt=this.animationSpeed*lt,_t=this.currentFrame;if(this._durations!==null){var Dt=this._currentTime%1*this._durations[this.currentFrame];for(Dt+=pt/60*1e3;Dt<0;)this._currentTime--,Dt+=this._durations[this.currentFrame];var Lt=Math.sign(this.animationSpeed*lt);for(this._currentTime=Math.floor(this._currentTime);Dt>=this._durations[this.currentFrame];)Dt-=this._durations[this.currentFrame]*Lt,this._currentTime+=Lt;this._currentTime+=Dt/this._durations[this.currentFrame]}else this._currentTime+=pt;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()):_t!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<_t||this.animationSpeed<0&&this.currentFrame>_t)&&this.onLoop(),this.updateTexture())}},it.prototype.updateTexture=function(){var lt=this.currentFrame;this._previousFrame!==lt&&(this._previousFrame=lt,this._texture=this._textures[lt],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))},it.prototype.destroy=function(lt){this.stop(),vt.prototype.destroy.call(this,lt),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},it.fromFrames=function(lt){for(var pt=[],_t=0;_t<lt.length;++_t)pt.push(ps.t.from(lt[_t]));return new it(pt)},it.fromImages=function(lt){for(var pt=[],_t=0;_t<lt.length;++_t)pt.push(ps.t.from(lt[_t]));return new it(pt)},Object.defineProperty(it.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"textures",{get:function(){return this._textures},set:function(lt){if(lt[0]instanceof ps.t)this._textures=lt,this._durations=null;else{this._textures=[],this._durations=[];for(var pt=0;pt<lt.length;pt++)this._textures.push(lt[pt].texture),this._durations.push(lt[pt].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"currentFrame",{get:function(){var lt=Math.floor(this._currentTime)%this._textures.length;return lt<0&&(lt+=this._textures.length),lt},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(lt){lt!==this._autoUpdate&&(this._autoUpdate=lt,!this._autoUpdate&&this._isConnectedToTicker?(Fy.a.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Fy.a.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),it})(_g);/*!
* pixi.js - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* pixi.js is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/ps.q.registerPlugin("accessibility",Cw),ps.q.registerPlugin("extract",AT),ps.q.registerPlugin("interaction",As),ps.q.registerPlugin("particle",Xc),ps.q.registerPlugin("prepare",bI),ps.q.registerPlugin("batch",ps.f),ps.q.registerPlugin("tilingSprite",xI),Q1.registerPlugin(EI),Q1.registerPlugin(Zm),Q1.registerPlugin(Fv),Q1.registerPlugin(SD),Q1.registerPlugin(_I),xo.registerPlugin(Fy.b),xo.registerPlugin(vD);var tu,Su={BlurFilter:AI,ColorMatrixFilter:$T},qu=tt(11),xl=tt(35),Kl=(function(){function vt(){}return vt.offsetPolygon=function(it,lt){var pt=[],_t=it.length;lt=vt.isPolygonClockwise(it)?lt:-1*lt;for(var Dt=0;Dt<_t;Dt+=2){var Lt=Dt-2;Lt<0&&(Lt+=_t);var $t=(Dt+2)%_t,Xt=it[Dt]-it[Lt],Yt=it[Dt+1]-it[Lt+1],Zt=Math.sqrt(Xt*Xt+Yt*Yt);Xt/=Zt,Yt/=Zt;var lr=-(Yt*=lt),xr=Xt*=lt,wr=[it[Lt]+lr,it[Lt+1]+xr],Ir=[it[Dt]+lr,it[Dt+1]+xr],kr=it[$t]-it[Dt],Lr=it[$t+1]-it[Dt+1];kr/=Zt=Math.sqrt(kr*kr+Lr*Lr),Lr/=Zt;var Xr=-(Lr*=lt),_n=kr*=lt,On=[it[Dt]+Xr,it[Dt+1]+_n],Kn=[it[$t]+Xr,it[$t+1]+_n],Mn=vt.findIntersection(wr[0],wr[1],Ir[0],Ir[1],On[0],On[1],Kn[0],Kn[1]);Mn&&pt.push.apply(pt,Mn)}return pt},vt.findIntersection=function(it,lt,pt,_t,Dt,Lt,$t,Xt){var Yt=(Xt-Lt)*(pt-it)-($t-Dt)*(_t-lt),Zt=($t-Dt)*(lt-Lt)-(Xt-Lt)*(it-Dt);if(Yt===0)return Zt===0&&(pt-it)*(lt-Lt)-(_t-lt)*(it-Dt)===0?[(it+pt)/2,(lt+_t)/2]:null;var lr=Zt/Yt;return[it+lr*(pt-it),lt+lr*(_t-lt)]},vt.isPolygonClockwise=function(it){for(var lt=0,pt=0,_t=it.length-2;pt<it.length;_t=pt,pt+=2)lt+=(it[pt]-it[_t])*(it[pt+1]+it[_t+1]);return lt>0},vt})(),Tl=(function(){function vt(it){this._svgMatrix=null,this._tempMatrix=new Ho.d,this.renderer=it}return vt.prototype._calcCanvasStyle=function(it,lt){var pt;return it.texture&&it.texture.baseTexture!==ps.t.WHITE.baseTexture?it.texture.valid?(pt=qu.b.getTintedPattern(it.texture,lt),this.setPatternTransform(pt,it.matrix||Ho.d.IDENTITY)):pt="#808080":pt="#"+("00000"+(0|lt).toString(16)).slice(-6),pt},vt.prototype.render=function(it){var lt=this.renderer,pt=lt.context,_t=it.worldAlpha,Dt=it.transform.worldTransform;lt.setContextTransform(Dt),lt.setBlendMode(it.blendMode);for(var Lt,$t,Xt=it.geometry.graphicsData,Yt=(it.tint>>16&255)/255,Zt=(it.tint>>8&255)/255,lr=(255&it.tint)/255,xr=0;xr<Xt.length;xr++){var wr=Xt[xr],Ir=wr.shape,kr=wr.fillStyle,Lr=wr.lineStyle,Xr=0|wr.fillStyle.color,_n=0|wr.lineStyle.color;if(wr.matrix&&lt.setContextTransform(Dt.copyTo(this._tempMatrix).append(wr.matrix)),kr.visible){var On=((Xr>>16&255)/255*Yt*255<<16)+((Xr>>8&255)/255*Zt*255<<8)+(255&Xr)/255*lr*255;Lt=this._calcCanvasStyle(kr,On)}if(Lr.visible){var Kn=((_n>>16&255)/255*Yt*255<<16)+((_n>>8&255)/255*Zt*255<<8)+(255&_n)/255*lr*255;$t=this._calcCanvasStyle(Lr,Kn)}if(pt.lineWidth=Lr.width,pt.lineCap=Lr.cap,pt.lineJoin=Lr.join,pt.miterLimit=Lr.miterLimit,wr.type===Ho.l.POLY){pt.beginPath();var Mn=(ws=Ir).points,ca=wr.holes,Gn=void 0,Qn=void 0,ks=void 0,Cs=void 0,gs=void 0;pt.moveTo(Mn[0],Mn[1]);for(var _s=2;_s<Mn.length;_s+=2)pt.lineTo(Mn[_s],Mn[_s+1]);if(ws.closeStroke&&pt.closePath(),ca.length>0){for(gs=[],Gn=0,ks=Mn[0],Cs=Mn[1],_s=2;_s+2<Mn.length;_s+=2)Gn+=(Mn[_s]-ks)*(Mn[_s+3]-Cs)-(Mn[_s+2]-ks)*(Mn[_s+1]-Cs);for(var Ts=0;Ts<ca.length;Ts++)if(Mn=ca[Ts].shape.points){for(Qn=0,ks=Mn[0],Cs=Mn[1],_s=2;_s+2<Mn.length;_s+=2)Qn+=(Mn[_s]-ks)*(Mn[_s+3]-Cs)-(Mn[_s+2]-ks)*(Mn[_s+1]-Cs);if(Qn*Gn<0)for(pt.moveTo(Mn[0],Mn[1]),_s=2;_s<Mn.length;_s+=2)pt.lineTo(Mn[_s],Mn[_s+1]);else for(pt.moveTo(Mn[Mn.length-2],Mn[Mn.length-1]),_s=Mn.length-4;_s>=0;_s-=2)pt.lineTo(Mn[_s],Mn[_s+1]);ca[Ts].shape.closeStroke&&pt.closePath(),gs[Ts]=Qn*Gn<0}}kr.visible&&(pt.globalAlpha=kr.alpha*_t,pt.fillStyle=Lt,pt.fill()),Lr.visible&&this.paintPolygonStroke(ws,Lr,$t,ca,gs,_t,pt)}else if(wr.type===Ho.l.RECT){var ws=Ir;if(kr.visible&&(pt.globalAlpha=kr.alpha*_t,pt.fillStyle=Lt,pt.fillRect(ws.x,ws.y,ws.width,ws.height)),Lr.visible){var oo=Lr.width*(.5-(1-Lr.alignment)),no=ws.width+2*oo,js=ws.height+2*oo;pt.globalAlpha=Lr.alpha*_t,pt.strokeStyle=$t,pt.strokeRect(ws.x-oo,ws.y-oo,no,js)}}else if(wr.type===Ho.l.CIRC)ws=Ir,pt.beginPath(),pt.arc(ws.x,ws.y,ws.radius,0,2*Math.PI),pt.closePath(),kr.visible&&(pt.globalAlpha=kr.alpha*_t,pt.fillStyle=Lt,pt.fill()),Lr.visible&&(Lr.alignment!==.5&&(oo=Lr.width*(.5-(1-Lr.alignment)),pt.beginPath(),pt.arc(ws.x,ws.y,ws.radius+oo,0,2*Math.PI),pt.closePath()),pt.globalAlpha=Lr.alpha*_t,pt.strokeStyle=$t,pt.stroke());else if(wr.type===Ho.l.ELIP){if(ws=Ir,(Jo=Lr.alignment===1)||this.paintEllipse(ws,kr,Lr,Lt,_t,pt),Lr.visible){if(Lr.alignment!==.5){oo=Lr.width*(.5-(1-Lr.alignment));var Ws=2*(ws.width+oo),Co=2*(ws.height+oo),jo=ws.x-Ws/2,Qo=ws.y-Co/2,xs=Ws/2*.5522848,Ms=Co/2*.5522848,Io=jo+Ws,_o=Qo+Co,Ys=jo+Ws/2,zo=Qo+Co/2;pt.beginPath(),pt.moveTo(jo,zo),pt.bezierCurveTo(jo,zo-Ms,Ys-xs,Qo,Ys,Qo),pt.bezierCurveTo(Ys+xs,Qo,Io,zo-Ms,Io,zo),pt.bezierCurveTo(Io,zo+Ms,Ys+xs,_o,Ys,_o),pt.bezierCurveTo(Ys-xs,_o,jo,zo+Ms,jo,zo),pt.closePath()}pt.globalAlpha=Lr.alpha*_t,pt.strokeStyle=$t,pt.stroke()}Jo&&this.paintEllipse(ws,kr,Lr,Lt,_t,pt)}else if(wr.type===Ho.l.RREC){var Jo;if(ws=Ir,(Jo=Lr.alignment===1)||this.paintRoundedRectangle(ws,kr,Lr,Lt,_t,pt),Lr.visible){if(Lr.alignment!==.5){no=ws.width,js=ws.height,oo=Lr.width*(.5-(1-Lr.alignment));var mo=ws.x-oo,fs=ws.y-oo,$s=ws.width+2*oo,lo=ws.height+2*oo,go=oo*(Lr.alignment>=1?Math.min($s/no,lo/js):Math.min(no/$s,js/lo)),Qs=ws.radius+go,Lo=Math.min($s,lo)/2;Qs=Qs>Lo?Lo:Qs,pt.beginPath(),pt.moveTo(mo,fs+Qs),pt.lineTo(mo,fs+lo-Qs),pt.quadraticCurveTo(mo,fs+lo,mo+Qs,fs+lo),pt.lineTo(mo+$s-Qs,fs+lo),pt.quadraticCurveTo(mo+$s,fs+lo,mo+$s,fs+lo-Qs),pt.lineTo(mo+$s,fs+Qs),pt.quadraticCurveTo(mo+$s,fs,mo+$s-Qs,fs),pt.lineTo(mo+Qs,fs),pt.quadraticCurveTo(mo,fs,mo,fs+Qs),pt.closePath()}pt.globalAlpha=Lr.alpha*_t,pt.strokeStyle=$t,pt.stroke()}Jo&&this.paintRoundedRectangle(ws,kr,Lr,Lt,_t,pt)}}},vt.prototype.paintPolygonStroke=function(it,lt,pt,_t,Dt,Lt,$t){if(lt.alignment!==.5){var Xt=lt.width*(.5-(1-lt.alignment)),Yt=Kl.offsetPolygon(it.points,Xt),Zt=void 0;$t.beginPath(),$t.moveTo(Yt[0],Yt[1]);for(var lr=2;lr<Yt.length;lr+=2)$t.lineTo(Yt[lr],Yt[lr+1]);it.closeStroke&&$t.closePath();for(var xr=0;xr<_t.length;xr++){if(Zt=_t[xr].shape.points,Yt=Kl.offsetPolygon(Zt,Xt),Dt[xr])for($t.moveTo(Yt[0],Yt[1]),lr=2;lr<Yt.length;lr+=2)$t.lineTo(Yt[lr],Yt[lr+1]);else for($t.moveTo(Yt[Yt.length-2],Yt[Yt.length-1]),lr=Yt.length-4;lr>=0;lr-=2)$t.lineTo(Yt[lr],Yt[lr+1]);_t[xr].shape.closeStroke&&$t.closePath()}}$t.globalAlpha=lt.alpha*Lt,$t.strokeStyle=pt,$t.stroke()},vt.prototype.paintEllipse=function(it,lt,pt,_t,Dt,Lt){var $t=2*it.width,Xt=2*it.height,Yt=it.x-$t/2,Zt=it.y-Xt/2,lr=$t/2*.5522848,xr=Xt/2*.5522848,wr=Yt+$t,Ir=Zt+Xt,kr=Yt+$t/2,Lr=Zt+Xt/2;pt.alignment===0&&Lt.save(),Lt.beginPath(),Lt.moveTo(Yt,Lr),Lt.bezierCurveTo(Yt,Lr-xr,kr-lr,Zt,kr,Zt),Lt.bezierCurveTo(kr+lr,Zt,wr,Lr-xr,wr,Lr),Lt.bezierCurveTo(wr,Lr+xr,kr+lr,Ir,kr,Ir),Lt.bezierCurveTo(kr-lr,Ir,Yt,Lr+xr,Yt,Lr),Lt.closePath(),pt.alignment===0&&Lt.clip(),lt.visible&&(Lt.globalAlpha=lt.alpha*Dt,Lt.fillStyle=_t,Lt.fill()),pt.alignment===0&&Lt.restore()},vt.prototype.paintRoundedRectangle=function(it,lt,pt,_t,Dt,Lt){var $t=it.x,Xt=it.y,Yt=it.width,Zt=it.height,lr=it.radius,xr=Math.min(Yt,Zt)/2;lr=lr>xr?xr:lr,pt.alignment===0&&Lt.save(),Lt.beginPath(),Lt.moveTo($t,Xt+lr),Lt.lineTo($t,Xt+Zt-lr),Lt.quadraticCurveTo($t,Xt+Zt,$t+lr,Xt+Zt),Lt.lineTo($t+Yt-lr,Xt+Zt),Lt.quadraticCurveTo($t+Yt,Xt+Zt,$t+Yt,Xt+Zt-lr),Lt.lineTo($t+Yt,Xt+lr),Lt.quadraticCurveTo($t+Yt,Xt,$t+Yt-lr,Xt),Lt.lineTo($t+lr,Xt),Lt.quadraticCurveTo($t,Xt,$t,Xt+lr),Lt.closePath(),pt.alignment===0&&Lt.clip(),lt.visible&&(Lt.globalAlpha=lt.alpha*Dt,Lt.fillStyle=_t,Lt.fill()),pt.alignment===0&&Lt.restore()},vt.prototype.setPatternTransform=function(it,lt){if(this._svgMatrix!==!1){if(!this._svgMatrix){var pt=document.createElementNS("http://www.w3.org/2000/svg","svg");if(pt&&pt.createSVGMatrix&&(this._svgMatrix=pt.createSVGMatrix()),!this._svgMatrix||!it.setTransform)return void(this._svgMatrix=!1)}this._svgMatrix.a=lt.a,this._svgMatrix.b=lt.b,this._svgMatrix.c=lt.c,this._svgMatrix.d=lt.d,this._svgMatrix.e=lt.tx,this._svgMatrix.f=lt.ty,it.setTransform(this._svgMatrix.inverse())}},vt.prototype.destroy=function(){this.renderer=null,this._svgMatrix=null,this._tempMatrix=null},vt})(),ep=new Ho.d;wy.prototype.generateCanvasTexture=function(vt,it){it===void 0&&(it=1);var lt=this.getLocalBounds(),pt=ps.p.create({width:lt.width,height:lt.height,scaleMode:vt,resolution:it});tu||(tu=new qu.a),this.transform.updateLocalTransform(),this.transform.localTransform.copyTo(ep),ep.invert(),ep.tx-=lt.x,ep.ty-=lt.y,tu.render(this,{renderTexture:pt,clear:!0,transform:ep});var _t=ps.t.from(pt.baseTexture._canvasRenderTarget.canvas,{scaleMode:vt});return _t.baseTexture.setResolution(it),_t},wy.prototype.cachedGraphicsData=[],wy.prototype._renderCanvas=function(vt){this.isMask!==!0&&(this.finishPoly(),vt.plugins.graphics.render(this))};/*!
* @pixi/canvas-sprite - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/canvas-sprite is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Rp=new Ho.d,S_=(function(){function vt(it){this.renderer=it}return vt.prototype.render=function(it){var lt=it._texture,pt=this.renderer,_t=pt.context;if(lt.valid){var Dt=lt._frame.width,Lt=lt._frame.height,$t=it.transform.worldTransform,Xt=0,Yt=0,Zt=lt.baseTexture.getDrawableSource();if(!(lt.orig.width<=0||lt.orig.height<=0)&&lt.valid&&Zt){pt.setBlendMode(it.blendMode,!0),pt.context.globalAlpha=it.worldAlpha;var lr=lt.baseTexture.scaleMode===ol.p.LINEAR;pt.smoothProperty&&pt.context[pt.smoothProperty]!==lr&&(_t[pt.smoothProperty]=lr),lt.trim?(Xt=lt.trim.width/2+lt.trim.x-it.anchor.x*lt.orig.width,Yt=lt.trim.height/2+lt.trim.y-it.anchor.y*lt.orig.height):(Xt=(.5-it.anchor.x)*lt.orig.width,Yt=(.5-it.anchor.y)*lt.orig.height),lt.rotate&&($t.copyTo(Rp),$t=Rp,Ho.n.matrixAppendRotationInv($t,lt.rotate,Xt,Yt),Xt=0,Yt=0),Xt-=Dt/2,Yt-=Lt/2,pt.setContextTransform($t,it.roundPixels,1),it.roundPixels&&(Xt|=0,Yt|=0);var xr=lt.baseTexture.resolution,wr=pt._outerBlend;wr&&(_t.save(),_t.beginPath(),_t.rect(Xt*pt.resolution,Yt*pt.resolution,Dt*pt.resolution,Lt*pt.resolution),_t.clip()),it.tint!==16777215?(it._cachedTint===it.tint&&it._tintedCanvas.tintId===it._texture._updateID||(it._cachedTint=it.tint,it._tintedCanvas=qu.b.getTintedCanvas(it,it.tint)),_t.drawImage(it._tintedCanvas,0,0,Math.floor(Dt*xr),Math.floor(Lt*xr),Math.floor(Xt*pt.resolution),Math.floor(Yt*pt.resolution),Math.floor(Dt*pt.resolution),Math.floor(Lt*pt.resolution))):_t.drawImage(Zt,lt._frame.x*xr,lt._frame.y*xr,Math.floor(Dt*xr),Math.floor(Lt*xr),Math.floor(Xt*pt.resolution),Math.floor(Yt*pt.resolution),Math.floor(Dt*pt.resolution),Math.floor(Lt*pt.resolution)),wr&&_t.restore(),pt.setBlendMode(ol.b.NORMAL)}}},vt.prototype.destroy=function(){this.renderer=null},vt})();_g.prototype._tintedCanvas=null,_g.prototype._renderCanvas=function(vt){vt.plugins.sprite.render(this)};/*!
* @pixi/canvas-extract - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/canvas-extract is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Yy=new Ho.j,fm=(function(){function vt(it){this.renderer=it}return vt.prototype.image=function(it,lt,pt){var _t=new Image;return _t.src=this.base64(it,lt,pt),_t},vt.prototype.base64=function(it,lt,pt){return this.canvas(it).toDataURL(lt,pt)},vt.prototype.canvas=function(it){var lt,pt,_t,Dt,Lt=this.renderer;it&&(Dt=it instanceof ps.p?it:Lt.generateTexture(it)),Dt?(lt=Dt.baseTexture._canvasRenderTarget.context,pt=Dt.baseTexture._canvasRenderTarget.resolution,_t=Dt.frame):(lt=Lt.rootContext,pt=Lt.resolution,(_t=Yy).width=this.renderer.width,_t.height=this.renderer.height);var $t=Math.floor(_t.width*pt+1e-4),Xt=Math.floor(_t.height*pt+1e-4),Yt=new cl.CanvasRenderTarget($t,Xt,1),Zt=lt.getImageData(_t.x*pt,_t.y*pt,$t,Xt);return Yt.context.putImageData(Zt,0,0),Yt.canvas},vt.prototype.pixels=function(it){var lt,pt,_t,Dt,Lt=this.renderer;it&&(Dt=it instanceof ps.p?it:Lt.generateTexture(it)),Dt?(lt=Dt.baseTexture._canvasRenderTarget.context,pt=Dt.baseTexture._canvasRenderTarget.resolution,_t=Dt.frame):(lt=Lt.rootContext,pt=Lt.resolution,(_t=Yy).width=Lt.width,_t.height=Lt.height);var $t=_t.x*pt,Xt=_t.y*pt,Yt=_t.width*pt,Zt=_t.height*pt;return lt.getImageData($t,Xt,Yt,Zt).data},vt.prototype.destroy=function(){this.renderer=null},vt})(),Bv=function(vt,it){return(Bv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(lt,pt){lt.__proto__=pt}||function(lt,pt){for(var _t in pt)pt.hasOwnProperty(_t)&&(lt[_t]=pt[_t])})(vt,it)};function w1(vt,it){var lt=vt;if(it instanceof ps.c){var pt=it.source,_t=pt.width===0?lt.canvas.width:Math.min(lt.canvas.width,pt.width),Dt=pt.height===0?lt.canvas.height:Math.min(lt.canvas.height,pt.height);return lt.ctx.drawImage(pt,0,0,_t,Dt,0,0,lt.canvas.width,lt.canvas.height),!0}return!1}var Om,UT=(function(vt){function it(lt){var pt=vt.call(this,lt)||this;return pt.uploadHookHelper=pt,pt.canvas=document.createElement("canvas"),pt.canvas.width=16,pt.canvas.height=16,pt.ctx=pt.canvas.getContext("2d"),pt.registerUploadHook(w1),pt}return(function(lt,pt){function _t(){this.constructor=lt}Bv(lt,pt),lt.prototype=pt===null?Object.create(pt):(_t.prototype=pt.prototype,new _t)})(it,vt),it.prototype.destroy=function(){vt.prototype.destroy.call(this),this.ctx=null,this.canvas=null},it})(ID),zT=new Ho.d,eA=new Ho.d,sS=[new Ho.g,new Ho.g,new Ho.g,new Ho.g];/*!
* @pixi/canvas-sprite-tiling - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/canvas-sprite-tiling is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/aC.prototype._renderCanvas=function(vt){var it=this._texture;if(it.baseTexture.valid){var lt=vt.context,pt=this.worldTransform,_t=it.baseTexture,Dt=_t.getDrawableSource(),Lt=_t.resolution;if(this._textureID!==this._texture._updateID||this._cachedTint!==this.tint){this._textureID=this._texture._updateID;var $t=new cl.CanvasRenderTarget(it._frame.width,it._frame.height,Lt);this.tint!==16777215?(this._tintedCanvas=qu.b.getTintedCanvas(this,this.tint),$t.context.drawImage(this._tintedCanvas,0,0)):$t.context.drawImage(Dt,-it._frame.x*Lt,-it._frame.y*Lt),this._cachedTint=this.tint,this._canvasPattern=$t.context.createPattern($t.canvas,"repeat")}lt.globalAlpha=this.worldAlpha,vt.setBlendMode(this.blendMode),this.tileTransform.updateLocalTransform();var Xt=this.tileTransform.localTransform,Yt=this._width,Zt=this._height;zT.identity(),eA.copyFrom(Xt),this.uvRespectAnchor||eA.translate(-this.anchor.x*Yt,-this.anchor.y*Zt),eA.scale(this.tileScale.x/Lt,this.tileScale.y/Lt),zT.prepend(eA),zT.prepend(pt),vt.setContextTransform(zT),lt.fillStyle=this._canvasPattern;var lr=this.anchor.x*-Yt,xr=this.anchor.y*-Zt;sS[0].set(lr,xr),sS[1].set(lr+Yt,xr),sS[2].set(lr+Yt,xr+Zt),sS[3].set(lr,xr+Zt);for(var wr=0;wr<4;wr++)eA.applyInverse(sS[wr],sS[wr]);for(lt.beginPath(),lt.moveTo(sS[0].x,sS[0].y),wr=1;wr<4;wr++)lt.lineTo(sS[wr].x,sS[wr].y);lt.closePath(),lt.fill()}},XA.prototype.renderCanvas=function(vt){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var it=vt.context,lt=this.worldTransform,pt=!0,_t=0,Dt=0,Lt=0,$t=0;vt.setBlendMode(this.blendMode),it.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var Xt=0;Xt<this.children.length;++Xt){var Yt=this.children[Xt];if(Yt.visible&&Yt._texture.valid){var Zt=Yt._texture.frame;if(it.globalAlpha=this.worldAlpha*Yt.alpha,Yt.rotation%(2*Math.PI)==0)pt&&(vt.setContextTransform(lt,!1,1),pt=!1),_t=Yt.anchor.x*(-Zt.width*Yt.scale.x)+Yt.position.x+.5,Dt=Yt.anchor.y*(-Zt.height*Yt.scale.y)+Yt.position.y+.5,Lt=Zt.width*Yt.scale.x,$t=Zt.height*Yt.scale.y;else{pt||(pt=!0),Yt.displayObjectUpdateTransform();var lr=Yt.worldTransform;vt.setContextTransform(lr,this.roundPixels,1),_t=Yt.anchor.x*-Zt.width+.5,Dt=Yt.anchor.y*-Zt.height+.5,Lt=Zt.width,$t=Zt.height}var xr=Yt._texture.baseTexture.resolution;it.drawImage(Yt._texture.baseTexture.getDrawableSource(),Zt.x*xr,Zt.y*xr,Zt.width*xr,Zt.height*xr,_t*vt.resolution,Dt*vt.resolution,Lt*vt.resolution,$t*vt.resolution)}}}},Ol.b.prototype._renderCanvas=function(vt){},Ol.b.prototype.renderCanvas=function(vt){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&vt.maskManager.pushMask(this._mask),this._renderCanvas(vt);for(var it=0,lt=this.children.length;it<lt;++it)this.children[it].renderCanvas(vt);this._mask&&vt.maskManager.popMask(vt)}},Ol.c.prototype.renderCanvas=function(vt){},tC.prototype._renderCanvas=function(vt){this._autoResolution&&this._resolution!==vt.resolution&&(this._resolution=vt.resolution,this.dirty=!0),this.updateText(!0),_g.prototype._renderCanvas.call(this,vt)},qu.a.registerPlugin("accessibility",Cw),qu.a.registerPlugin("extract",fm),qu.a.registerPlugin("graphics",Tl),qu.a.registerPlugin("interaction",As),qu.a.registerPlugin("mesh",xl.a),qu.a.registerPlugin("prepare",UT),qu.a.registerPlugin("sprite",S_);class jN extends em.a{constructor(){super(),this.prevTime=-1,this.times=0,this.valueTotal=0,this.destroyed=!1,this.value=0,this.calcFps()}calcFps(){requestAnimationFrame(it=>{const lt=it-this.prevTime;this.valueTotal+=lt,this.times+=1,this.times>20&&(this.value=Math.floor(1e3*this.times/this.valueTotal),this.valueTotal=0,this.times=0,this.destroyed||this.emit("update",this.value)),this.prevTime=it,this.destroyed||this.calcFps()})}destroy(){this.destroyed=!0}}(function(vt){vt.ResourceError="RESOURCE_ERROR",vt.RuntimeError="RUNTIME_ERROR",vt.RuntimeWarn="RUNTIME_WARN",vt.CanvasCrash="CANVAS_CRASH"})(Om||(Om={}));class Gm extends Error{constructor(it,lt){var pt,_t;super(lt),pt=this,_t=new.target.prototype,Object.setPrototypeOf?Object.setPrototypeOf(pt,_t):pt.__proto__&&(pt.__proto__=_t),this.errorType=it,this.errorMsg=lt}static transform(it){return it instanceof Gm?it:new Gm(Om.RuntimeError,it.message)}}function GT(){return function(vt,it,lt){const pt=lt.value;lt.value=function(..._t){try{return pt.apply(this,_t)}catch(Dt){throw new Gm(Om.RuntimeWarn,Dt.message)}}}}var OR=tt(49),CI=tt.n(OR),d0=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};function Yw(){return nt()}const q0="__delay_resolve_result__";function QD(vt){return new Promise(it=>{setTimeout(()=>{it(q0)},vt)})}function w_(vt,it){return d0(this,void 0,void 0,function*(){const lt=yield Promise.race([vt(),QD(it)]);return lt===q0?q0:lt})}function tA(vt,it){return d0(this,void 0,void 0,function*(){const lt=Date.now();for(;!vt()&&Date.now()-lt<it;)yield QD(16)})}var HS=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};function oS(vt,it){return HS(this,void 0,void 0,function*(){const lt=yield w_(()=>fetch(vt),it);if(lt===q0)throw new Gm(Om.ResourceError,`"${vt}" loaded timeout"`);if(!lt.ok)throw new Gm(Om.ResourceError,`"${vt}" loaded failed with status "${lt.status}"`);return lt})}class Mm{constructor(it,lt,pt,_t,Dt,Lt,$t){this.timeout=15e3,this.useCache=!1,this.taskId="",this.delegate=null,this.urlInterrupter=null,this.useCache=lt,this.localStorage=it,this.logger=pt,this.tracker=_t,this.timeout=Dt,this.delegate=Lt||null,this.urlInterrupter=$t||null}attachTaskId(it){this.taskId=it}fetchJson(it){return HS(this,void 0,void 0,function*(){const lt=Date.now();let pt=it;const _t=it;if(this.urlInterrupter&&typeof this.urlInterrupter=="function"){const Lt=Date.now();pt=yield this.urlInterrupter(pt),this.logger.info(`use url interrupter, ${pt}, time: ${Date.now()-Lt}`,this.taskId)}let Dt;if(this.useCache&&(this.logger.info("load resource from cache. "+_t,this.taskId||""),Dt=yield this.localStorage.getItem(_t)),Dt)return this.logger.info("cache hit. "+_t,this.taskId||""),this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-lt,url:pt,type:"json",channel:"cache"}}),Dt;{let Lt;if(this.delegate){this.logger.info("load resource by delegate. "+_t,this.taskId||"");const $t=Date.now();try{const Xt=yield w_(()=>this.delegate.loadJson(pt),this.timeout);if(this.logger.info(`load resource by delegate end. ${_t}, time: ${Date.now()-$t}`,this.taskId||""),Xt===q0)throw new Gm(Om.ResourceError,`"${_t}" loaded timeout"`);Lt=JSON.parse(Xt),this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-lt,url:pt,type:"json",channel:"delegate"}})}catch(Xt){throw this.tracker({name:"slideResourceLoad",result:"fail",reason:Xt+"",payload:{duration:Date.now()-lt,url:pt,type:"json",channel:"delegate"}}),new Gm(Om.ResourceError,`"${_t}" loaded timeout"`)}}else{this.logger.info("load resource from server. "+_t,this.taskId||"");const $t=Date.now();try{Lt=yield(yield oS(""+pt,this.timeout)).json()}catch(Xt){throw this.tracker({name:"slideResourceLoad",result:"fail",reason:Xt+"",payload:{duration:Date.now()-lt,url:pt,type:"json",channel:"fetch"}}),Xt}this.logger.info(`load resource from server end. ${_t}, time: ${Date.now()-$t}`,this.taskId||""),this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-lt,url:pt,type:"json",channel:"fetch"}})}return this.logger.info("load end. "+_t,this.taskId||""),this.useCache&&this.localStorage.setItem(_t,Lt).catch(()=>{}),Lt}})}fetchPng(it,lt){return HS(this,void 0,void 0,function*(){const pt=Date.now();let _t=it;const Dt=it;if(this.urlInterrupter&&typeof this.urlInterrupter=="function"){const Lr=Date.now();_t=yield this.urlInterrupter(_t),this.logger.info(`use url interrupter, ${_t}, time: ${Date.now()-Lr}`,this.taskId)}let Lt;const $t=Dt+"-v3";if(this.useCache){this.logger.info("load resource from cache. "+Dt,this.taskId||"");const Lr=yield this.localStorage.getItem($t);Lr&&(Lt=Lr.base64,this.logger.info("cache hit. "+Dt,this.taskId||""),this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-pt,url:_t,type:"image",channel:"cache"}}))}if(!Lt){let Lr;if(this.delegate)try{this.logger.info("load resource by delegate. "+Dt,this.taskId||"");const Xr=Date.now();if(Lr=yield w_(()=>this.delegate.loadImage(_t),this.timeout),this.logger.info(`load resource by delegate end. ${Dt}, time: ${Date.now()-Xr}`,this.taskId||""),Lr===q0)throw new Gm(Om.ResourceError,`"${Dt}" loaded timeout"`);this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-pt,url:_t,type:"image",channel:"delegate"}})}catch(Xr){this.tracker({name:"slideResourceLoad",result:"fail",reason:Xr+"",payload:{duration:Date.now()-pt,url:_t,type:"image",channel:"delegate"}})}else try{this.logger.info("load resource from server. "+Dt,this.taskId||"");const Xr=Date.now(),_n=yield oS(_t,this.timeout);this.logger.info(`load resource from server end. ${Dt}, time: ${Date.now()-Xr}`,this.taskId||""),Lr=yield _n.blob(),this.tracker({name:"slideResourceLoad",result:"success",reason:"",payload:{duration:Date.now()-pt,url:_t,type:"image",channel:"fetch"}})}catch(Xr){this.tracker({name:"slideResourceLoad",result:"fail",reason:Xr+"",payload:{duration:Date.now()-pt,url:_t,type:"image",channel:"fetch"}})}Lt=yield(function(Xr){return new Promise((_n,On)=>{const Kn=new FileReader;Kn.onload=()=>{_n(Kn.result)},Kn.onerror=()=>{On(new Gm(Om.ResourceError,"Failed parse blob data."))},Kn.readAsDataURL(Xr)})})(Lr),this.useCache&&this.localStorage.setItem($t,{base64:Lt}).catch(()=>{})}const Xt=document.createElement("img");Xt.src=Lt,yield new Promise((Lr,Xr)=>{Xt.onload=()=>Lr(""),Xt.onerror=()=>Xr(new Error("load sprite image failed"))});let Yt=lt;const Zt=Xt.width||1,lr=Xt.height||1;if(Zt>2048||lr>2048){Yt*=2048/Zt;const Lr=Yt*lr;Lr>2048&&(Yt*=lr/Lr)}const xr=document.createElement("canvas"),wr=Math.ceil(Xt.width*Yt),Ir=Math.ceil(Xt.height*Yt);xr.width=wr,xr.height=Ir,xr.getContext("2d").drawImage(Xt,0,0,wr,Ir);const kr=new ps.c(xr,{resolution:1});return this.logger.info("load end. "+Dt,this.taskId||""),{baseTexture:kr,scale:Yt}})}destroy(){}}var rA=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class qR{constructor(it){this.isPaused=!1,this.timestamp=0,this.callbackList=[],this.onTimeUpdate=lt=>{const pt=lt/(N0.b.TARGET_FPMS||.06);if(!this.isPaused){this.timestamp+=pt,this.callbackList=this.callbackList.filter(Dt=>Dt&&!Dt.applied);let{length:_t}=this.callbackList;for(let Dt=0;Dt<_t;Dt++){const Lt=this.callbackList[Dt];if(Lt&&!Lt.applied){if(!(Lt.triggerTime<=this.timestamp))break;Lt.running=!0,Lt.fn(),Lt.applied=!0,_t=this.callbackList.length}}}},this.ticker=it,this.ticker.add(this.onTimeUpdate)}setTimeout(it,lt){const pt=Yw(),_t=this.timestamp+Math.max(lt||16,16);return this.callbackList.push({fn:it,triggerTime:_t,id:pt,applied:!1,running:!1}),this.callbackList.sort((Dt,Lt)=>Dt.triggerTime-Lt.triggerTime),pt}clearTimeout(it){const lt=this.callbackList.findIndex(pt=>pt.id===it);lt>=0&&!this.callbackList[lt].running&&this.callbackList.splice(lt,1)}delay(it){return new Promise(lt=>{this.setTimeout(lt,it)})}waitUntil(it,lt){return rA(this,void 0,void 0,function*(){const pt=this.timestamp;for(;!it()&&this.timestamp-pt<lt;)yield this.delay(50)})}pause(){this.isPaused=!0}resume(){this.isPaused=!1}}var LR=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};function uS(vt,it,lt){return lt?Math.floor(parseFloat(vt)*it):Math.ceil(parseFloat(vt)*it)}const Qw={w:!1,h:!1,x:!0,y:!0};class $N{constructor(it){this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null),this.spriteSheets=[],this.loader=it}getTexture(it){return this.textures[it]||null}getFrameData(it){return this.frames[it]}getGifFrames(it){return this.gifs[it]?this.gifs[it].filter(lt=>!!lt):[]}loadSpriteSheetItem(it,lt,pt,_t){return LR(this,void 0,void 0,function*(){const Dt=yield this.loader.fetchJson(`${it}/${lt}/jsonOutput/${pt}.json`),{baseTexture:Lt,scale:$t}=yield this.loader.fetchPng(`${it}/${lt}/jsonOutput/${pt}.png`,_t);(function(Yt,Zt){Yt.meta&&Yt.meta.size&&["w","h"].forEach(lr=>{Yt.meta.size[lr]=uS(Yt.meta.size[lr],Zt,Qw[lr])}),Yt.frames&&Object.keys(Yt.frames).forEach(lr=>{Yt.frames[lr].frame&&["x","y","w","h"].forEach(xr=>{Yt.frames[lr].frame[xr]=uS(Yt.frames[lr].frame[xr],Zt,Qw[xr])}),Yt.frames[lr].spriteSourceSize&&["x","y","w","h"].forEach(xr=>{Yt.frames[lr].spriteSourceSize[xr]=uS(Yt.frames[lr].spriteSourceSize[xr],Zt,Qw[xr])}),Yt.frames[lr].sourceSize&&["w","h"].forEach(xr=>{Yt.frames[lr].sourceSize[xr]=uS(Yt.frames[lr].sourceSize[xr],Zt,Qw[xr])})})})(Dt,$t);const Xt=new PD(Lt,Dt);yield new Promise(Yt=>{Xt.parse(()=>Yt(""))}),this.spriteSheets.push(Xt),Object.keys(Xt.textures).forEach(Yt=>{const Zt=Yt.match(/^(.+)_gif_(\d+)$/);if(Zt&&Zt[1]&&Zt[2]){const lr=Zt[1];this.gifs[lr]||(this.gifs[lr]=[]);const xr=parseInt(Zt[2],10);this.gifs[lr][xr]=Xt.textures[Yt]}else this.frames[Yt]=Dt.frames[Yt],this.textures[Yt]=Xt.textures[Yt]})})}destroy(){this.spriteSheets.forEach(it=>it.destroy(!0)),this.spriteSheets=[],this.gifs=Object.create(null),this.textures=Object.create(null),this.frames=Object.create(null)}}var FR=tt(18),$y=tt.n(FR),Yv=tt(13),WS=tt.n(Yv);function BR(vt,it,lt){let pt,_t;const Dt=Math.round(vt)%360;if(Dt%180==0)pt=Math.cos(Dt*(Math.PI/180))*it,_t=0;else if(Dt%90==0)pt=0,_t=Math.sin(Dt*(Math.PI/180))*lt;else{const Lt=(function($t){const Xt=$t*Math.PI/180;return Math.tan(Xt)})(Dt);pt=it*lt/Math.sqrt(Math.pow(lt,2)+Math.pow(it*Lt,2)),(Dt>90&&Dt<270||Dt<-90&&Dt>-270)&&(pt=-pt),_t=Lt*pt}return{x:pt,y:_t}}function UN(vt,it,lt,pt,_t,Dt){const Lt=vt,$t=it;let Xt,Yt,Zt,lr,xr;if(Math.round(pt)===0)Xt=_t,Yt=Dt,xr=0;else if(Math.round(pt)>=360)Xt=_t,Yt=Dt,Zt=_t+2*vt*Math.abs(Math.cos(-lt/180*Math.PI)),lr=Dt+2*it*Math.sin(-lt/180*Math.PI),xr=1;else{const wr=-lt,Ir=-(lt+pt),{x:kr,y:Lr}=BR(wr,Lt,$t),Xr=_t-kr,_n=Dt+Lr,{x:On,y:Kn}=BR(Ir,Lt,$t);Xt=On+Xr,Yt=_n-Kn,xr=pt>=-360&&pt<-180?1:pt>=-180&&pt<0||pt>0&&pt<180?0:1}return{radiusX:Lt,radiusY:$t,xAxisRotation:0,largeArcFlag:xr,sweepFlag:pt>0?1:0,endX:Xt,endY:Yt,middleX:Zt,middleY:lr}}class jR{constructor(){this.pool=[]}getObject(it){const lt=this.pool.find(pt=>!pt.isUsed);if(lt)return lt.isUsed=!0,lt.obj;{const pt={obj:this.createObject(),isUsed:!0,group:it};return this.pool.push(pt),pt.obj}}collectObject(it){const lt=this.pool.find(pt=>pt.obj===it);lt&&(lt.isUsed=!1,this.resetObject(lt.obj))}collectObjectByGroup(it){this.pool.filter(lt=>lt.group===it).forEach(lt=>this.collectObject(lt.obj))}}const DI=new class extends jR{createObject(){const vt=document.createElementNS("http://www.w3.org/2000/svg","svg");return vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),vt.setAttribute("version","1.1"),vt}resetObject(vt){vt.removeAttribute("viewBox"),vt.removeAttribute("width"),vt.removeAttribute("height"),vt.innerHTML=""}};var $R=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class UR{constructor(it){this.svgElements=[],this.idToHashMap=Object.create(null),this.textures=Object.create(null),this.graphics=[],this.hashToIdMap=Object.create(null),this.maxResolution=it}render(it,lt,pt,_t){return $R(this,void 0,void 0,function*(){const{items:Dt,width:Lt,height:$t}=it,Xt=document.createElement("canvas");Xt.width=Lt*_t,Xt.height=$t*_t;const Yt=new ps.c(Xt,{width:Lt*_t,height:$t*_t,resolution:1}),Zt=DI.getObject(pt);this.svgElements.push(Zt),Zt.setAttribute("viewBox",`0 0 ${Lt} ${$t}`),Zt.setAttribute("width",""+Lt),Zt.setAttribute("height",""+$t);const lr={};Dt.forEach(kr=>{const{item:Lr,x:Xr,y:_n}=kr,On=Xr+2,Kn=_n+2;Lr.pathsData.forEach(Gn=>{let Qn="";Gn.cmds.forEach(([ks,Cs])=>{Qn+=ks+" ",Qn+=Cs.map(gs=>(WS()(gs)||(gs.x=gs.x+Gn.offset.x+On,gs.y=gs.y+Gn.offset.y+Kn),gs)).reduce((gs,_s)=>(WS()(_s)?gs+=_s+" ":gs+=`${_s.x} ${_s.y} `,gs),""),Qn+=" "}),Gn.pathElement.setAttribute("d",Qn),Zt.appendChild(Gn.pathElement)});const Mn=Lr.width-4-2*Lr.padding,ca=Lr.height-4-2*Lr.padding;this.textures[Lr.hash]={texture:new ps.t(Yt,new Ho.j((On+2)*_t,(Kn+2)*_t,Mn*_t,ca*_t)),pivot:Lr.pivot,scale:1/_t},lr[Lr.hash]=this.hashToIdMap[Lr.hash]});const xr=(wr='<?xml version="1.0" encoding="utf-8"?>'+Zt.outerHTML,"data:image/svg+xml,"+encodeURIComponent(wr).replace(/'/g,"%27").replace(/"/g,"%22"));var wr;const Ir=document.createElement("img");Ir.src=xr,yield new Promise((kr,Lr)=>{Ir.onload=()=>kr(""),Ir.onerror=()=>Lr()}),Xt.getContext("2d").drawImage(Ir,0,0,Xt.width,Xt.height)})}getGraphicsData(it){const lt=this.idToHashMap[it]||"";return this.textures[lt]||null}addGraphics(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr){var xr,wr;if(!$t&&!Yt)return it;const Ir=$y()(pt+((wr=(xr=$t?.width)===null||xr===void 0?void 0:xr.toString())!==null&&wr!==void 0?wr:0)+Yt+Zt+lr);if(this.hashToIdMap[Ir]||(this.hashToIdMap[Ir]=[]),this.hashToIdMap[Ir].push(it),this.idToHashMap[it]=Ir,this.graphics.findIndex(kr=>kr.hash===Ir)<0){const{graphicsWidth:kr,graphicsHeight:Lr,pathsData:Xr,pivot:_n,padding:On}=(function(Kn,Mn,ca,Gn,Qn,ks,Cs,gs,_s){var Ts;const ws=[],oo={x:Math.abs(Qn.x),y:Math.abs(Qn.y)};let no=0,js=0,Ws=0,Co=0,jo=0,Qo="none";const xs=(Ts=Gn?.width)!==null&&Ts!==void 0?Ts:0;return Cs?(no=Mn,js=ca,jo=0):(Qo=_s||"#ff0000",jo=xs,Ws=.5*xs,Co=.5*xs,no=Mn+xs,js=ca+xs,oo.x+=.5*xs,oo.y+=.5*xs),no+=Math.abs(Qn.x),js+=Math.abs(Qn.y),Ws+=Math.abs(Qn.x),Co+=Math.abs(Qn.y),no+=4,js+=4,Ws+=2,Co+=2,no=Math.ceil(no),js=Math.ceil(js),Kn.forEach(Ms=>{const Io=document.createElementNS("http://www.w3.org/2000/svg","path");Ms.fill!=="none"&&Cs?Io.setAttribute("fill",gs||"#ff0000"):Io.setAttribute("fill","none"),Ms.hasStroke&&!Cs&&(Io.setAttribute("stroke-linecap",Gn?.cap||"butt"),Io.setAttribute("stroke-linejoin",Gn?.join||"miter"),Io.setAttribute("stroke-width",jo.toString()),Io.setAttribute("stroke",Qo),Gn?.dash&&Io.setAttribute("stroke-dasharray",Gn.dash));const{scale:_o}=Ms,Ys=Ms.path.trim().split(" ");let zo={x:0,y:0};const Jo={offset:{x:Ws,y:Co},cmds:[],pathElement:Io};for(let mo=0;mo<Ys.length;mo+=2){const fs=Ys[mo],$s=Ys[mo+1];if(fs==="M"){let[lo,go]=$s.split(",").map(Qs=>Number(Qs));zo={x:lo,y:go},lo=lo/9525*_o.x,go=go/9525*_o.y,Jo.cmds.push(["M",[{x:lo,y:go}]])}else if(fs==="A"){const[lo,go,Qs,Lo]=$s.split(",").map(Xl=>Number(Xl)),Cu=Qs/Math.PI*180,Du=Lo/Math.PI*180,Mu=UN(lo,go,Cu,Du,zo.x,zo.y);Math.round(Du)>=360?(zo={x:Mu.endX,y:Mu.endY},Jo.cmds.push(["A",[Mu.radiusX/9525*_o.x,Mu.radiusY/9525*_o.y,Mu.xAxisRotation,Mu.largeArcFlag,Mu.sweepFlag,{x:Mu.middleX/9525*_o.x,y:Mu.middleY/9525*_o.y}]]),Jo.cmds.push(["A",[Mu.radiusX/9525*_o.x,Mu.radiusY/9525*_o.y,Mu.xAxisRotation,Mu.largeArcFlag,Mu.sweepFlag,{x:Mu.endX/9525*_o.x,y:Mu.endY/9525*_o.y}]])):(zo={x:Mu.endX,y:Mu.endY},Jo.cmds.push(["A",[Mu.radiusX/9525*_o.x,Mu.radiusY/9525*_o.y,Mu.xAxisRotation,Mu.largeArcFlag,Mu.sweepFlag,{x:Mu.endX/9525*_o.x,y:Mu.endY/9525*_o.y}]]))}else if(fs==="L"){let[lo,go]=$s.split(",").map(Qs=>Number(Qs));zo={x:lo,y:go},lo=lo/9525*_o.x,go=go/9525*_o.y,Jo.cmds.push(["L",[{x:lo,y:go}]])}else if(fs==="QB"){let[lo,go,Qs,Lo]=$s.split(",").map(Cu=>Number(Cu));zo={x:Qs,y:Lo},lo=lo/9525*_o.x,go=go/9525*_o.y,Qs=Qs/9525*_o.x,Lo=Lo/9525*_o.y,Jo.cmds.push(["Q",[{x:lo,y:go},{x:Qs,y:Lo}]])}else if(fs==="CB"){let[lo,go,Qs,Lo,Cu,Du]=$s.split(",").map(Mu=>Number(Mu));zo={x:Cu,y:Du},lo=lo/9525*_o.x,go=go/9525*_o.y,Qs=Qs/9525*_o.x,Lo=Lo/9525*_o.y,Cu=Cu/9525*_o.x,Du=Du/9525*_o.y,Jo.cmds.push(["C",[{x:lo,y:go},{x:Qs,y:Lo},{x:Cu,y:Du}]])}else fs==="C"&&Jo.cmds.push(["Z",[]])}ws.push(Jo)}),{graphicsWidth:no,graphicsHeight:js,pivot:oo,padding:2,pathsData:ws}})(lt,Dt,Lt,$t,_t,0,Yt,Zt,lr);this.graphics.push({hash:Ir,pathsData:Xr,pivot:_n,width:kr,height:Lr,padding:On})}return it}pack(){return this.graphics.forEach(it=>{it.width+=4,it.height+=4}),(function it(lt){const pt=[],_t=lt.filter(Zt=>{const lr=Zt.width<2048&&Zt.height<2048;return lr||pt.push(Zt),lr}).sort((Zt,lr)=>Zt.width*Zt.height-lr.width*lr.height);let Dt=_t.length+1,Lt=2050,$t=2050;const Xt=[];let Yt=null;for(;(Lt>2048||$t>2048)&&_t.length>0;)Dt-=1,Yt=CI()(_t.slice(0,Dt)),Lt=Yt.width,$t=Yt.height;return Yt&&Xt.push(Yt),pt.forEach(Zt=>{const lr=CI()([Zt]);Xt.push(lr)}),Dt<_t.length?Xt.concat(it(_t.slice(Dt))):Xt})(this.graphics)}destroy(){Object.keys(this.textures).forEach(it=>{var lt;(lt=this.textures[it])===null||lt===void 0||lt.texture.destroy(!0)}),this.textures=Object.create(null),this.svgElements.forEach(it=>DI.collectObject(it)),this.graphics=[]}}class zN{constructor(){this.runningTimeNodes={}}addRunningTimeNode(it,lt,pt){const _t=`${lt}_${it}`;if(this.runningTimeNodes[_t])try{this.runningTimeNodes[_t].dispose(!0)}catch{}this.runningTimeNodes[_t]=pt}removeRunningTimeNode(it,lt){const pt=`${lt}_${it}`;delete this.runningTimeNodes[pt]}}class GN{constructor(it){this.eventHub=it,this.targets=Object.create(null)}getTargets(){return Object.keys(this.targets).map(it=>this.targets[it])}addTarget(it,lt){this.targets[it]=lt}getTargetById(it){return this.targets[it]}getTarget(it,lt,pt={type:"el",index:0,id:""}){var _t,Dt;let Lt=this.targets[it.id];return it.type!=="shape"?Lt:(it.type==="shape"&&it.txEl&&(Lt=(_t=Lt?.getTextElement(it.txEl.type,it.txEl.range))!==null&&_t!==void 0?_t:null),it.type==="shape"&&it.bg&&pt.index===0&&(lt=!1,Lt=(Dt=Lt?.getBgElement())!==null&&Dt!==void 0?Dt:null,this.eventHub.emit("IterateTimeNodeEnd",pt.id)),lt&&Lt?Lt.getIterateEntry(pt.type,pt.index,pt.id):(Lt||this.eventHub.emit("IterateTimeNodeEnd",pt.id),Lt))}clearTargets(){this.targets=Object.create(null)}}class VN{constructor(it){this.target=it}get color(){return this.target.strokeColorFilter.currentColor}set color(it){this.target.strokeColorFilter.color=it}get on(){return this.target.strokeActive?"true":"false"}set on(it){this.target.strokeActive=it==="true"}}class zR{constructor(it){this.applyCommand=(lt,pt)=>{this.target.applyCommand(lt,pt)},this.target=it}}class KD{constructor(it){this.target=it}get color(){return this.target.pptColorFilter.currentColor}set color(it){this.target.pptColorActive&&(this.target.pptColorFilter.color=it)}get on(){return this.target.pptColorActive?"true":"false"}set on(it){this.target.pptColorActive=it==="true"}get designColor(){return this.target.pptColorFilter.designColor}toString(){return this.color}}class GR{constructor(it){this.target=it}get color(){return this.target.fillColorFilter.currentColor}set color(it){this.target.fillActive&&(this.target.fillColorFilter.color=it)}get on(){return this.target.fillActive?"true":"false"}set on(it){this.target.fillActive=it==="true"}get designColor(){return this.target.fillColorFilter.designColor}}class HN extends em.a{constructor(it,lt,pt){super(),this.hardHidden=!1,this.designRotation=0,this.target=it,lt===!0&&(this.hardHidden=!0),this.designRotation=pt}get opacity(){return this.target.alpha}set opacity(it){this.target.alpha=it}get rotation(){return this.target.rotation/Math.PI*180}set rotation(it){this.target.rotation=it/180*Math.PI+this.designRotation}get visibility(){return this.target.visible?"visible":"hidden"}set visibility(it){const lt=this.visibility;this.visibility===it||this.hardHidden||(this.target.visible=it==="visible",this.emit("visibilityChange",lt==="visible",this.target.visible))}}class MI{constructor(it,lt){this.actions=[],this.ctx=lt,this.object=it,this.object.interactive=!0}reset(it){this.object.interactive=!1,this.object.removeAllListeners(),this.object=it,this.object.interactive=!0}addAction(it,lt){this.actions.push([it,lt]),lt==="click"?(this.object.addListener("pointertap",()=>this.handleAction(it)),this.object.cursor="pointer"):lt==="hover"&&this.object.addListener("mouseover",()=>this.handleAction(it))}getOriginHitArea(){return this.object.hitArea?this.object.hitArea:new Ho.k(0,0,this.object.width,this.object.height)}handleAction(it){this.ctx.eventHub.emit(pu.hyperlinkTrigger,it),this.execAction(it)}execAction(it){var lt;if(this.ctx.eventHub.emit(pu.userInput),it.action==="ppaction://hlinksldjump"){const pt=((lt=it?.target)!==null&&lt!==void 0?lt:"").match(/slide(\d+)\.xml/);pt&&pt[1]&&this.ctx.eventHub.emit(pu.requestGotoSlide,Number(pt[1]))}else if(it.action==="ppaction://hlinkshowjump?jump=nextslide")this.ctx.eventHub.emit(pu.requestNextSlide);else if(it.action==="ppaction://hlinkshowjump?jump=previousslide")this.ctx.eventHub.emit(pu.requestPrevSlide);else if(it.action==="ppaction://hlinkshowjump?jump=firstslide")this.ctx.eventHub.emit(pu.requestGotoSlide,1);else if(it.action==="ppaction://hlinkshowjump?jump=lastslide")this.ctx.eventHub.emit(pu.requestGotoSlide,-1);else if(it.action==="ppaction://hlinkshowjump?jump=lastslideviewed"){const pt=this.ctx.lastViewedIndex;this.ctx.eventHub.emit(pu.requestGotoSlide,pt)}else it.action==="ppaction://hlinkshowjump?jump=endshow"?this.ctx.eventHub.emit(pu.requestGotoSlide,-1):(it.action===""||it.action==="ppaction://hlinkfile")&&this.ctx.eventHub.emit(pu.requestOpenUrl,it.target)}}function X_(vt,it,lt=5){return Math.abs(vt-it)<=Math.pow(10,-lt)}function nA(vt){return Math.floor(1e6*vt)/1e6}class Kw{constructor(){this.point={x:0,y:0},this.slope=Math.PI/4}static fromPointSlope(it,lt){const pt=new Kw;return pt.point=it,pt.slope=lt,pt}resolveY(it){return Math.tan(this.slope)*(it-this.point.x)+this.point.y}distanceToLinearEquation(it){return X_(this.slope,it.slope)?this.distanceToPoint(it.point):-1}distanceToPoint(it){let lt=0;if(Math.tan(this.slope)*(it.x-this.point.x)+this.point.y===it.y)return 0;lt=this.slope>=Math.PI/2?this.slope-Math.PI/2:Math.PI/2+this.slope;const pt=Kw.fromPointSlope(it,lt),_t=this.crossPoint(pt);return _t?Math.ceil(Math.sqrt(Math.pow(_t.x-it.x,2)+Math.pow(_t.y-it.y,2))):0}crossPoint(it){if(X_(it.slope,this.slope))return null;let lt=0,pt=0;const _t=Math.tan(it.slope),Dt=Math.tan(this.slope),{x:Lt,y:$t}=this.point,{x:Xt,y:Yt}=it.point;return X_(this.slope,Math.PI/2)?(lt=this.point.x,pt=_t*(lt-Xt)+Yt):X_(it.slope,Math.PI/2)?(lt=it.point.x,pt=Dt*(lt-Lt)+$t):X_(this.slope,Math.PI)||X_(this.slope,0)?(pt=this.point.y,lt=(pt-Yt)/_t+Xt):X_(it.slope,Math.PI)||X_(it.slope,0)?(pt=it.point.y,lt=(pt-$t)/Dt+Lt):(lt=(_t*Xt-Yt+$t-Dt*Lt)/(_t-Dt),pt=Dt*(lt-Lt)+$t),{x:lt,y:pt}}}class II{constructor(it,lt,pt){var _t,Dt,Lt,$t,Xt,Yt;this.scaleExt={x:1,y:1},this.scaleOrigin={x:1,y:1},this.designScale={x:1,y:1},this.bound=new Ho.j(0,0,1,1),this.pptX=0,this.pptY=0,this.presetSubType=0,this.designWidth=0,this.designHeight=0,this.designX=0,this.designY=0,this.hasPreset=!1,this.container=new Ol.b,this.ctx=lt,this.option=pt,this.style=new HN(this.container,!!it.hardHidden,it.rotation||0),this.designGlobalPosition={x:pt.parentGlobalPos.x+((Dt=(_t=it.position)===null||_t===void 0?void 0:_t.x)!==null&&Dt!==void 0?Dt:0),y:pt.parentGlobalPos.y+(($t=(Lt=it.position)===null||Lt===void 0?void 0:Lt.y)!==null&&$t!==void 0?$t:0)},(it.hlinkClick||it.hlinkHover)&&(this.hyperlink=new MI(this.container,this.ctx),it.hlinkHover&&((Xt=this.hyperlink)===null||Xt===void 0||Xt.addAction(it.hlinkHover,"hover")),it.hlinkClick&&((Yt=this.hyperlink)===null||Yt===void 0||Yt.addAction(it.hlinkClick,"click"))),this.ctx.clock.waitUntil(()=>{try{return!!this.container.width}catch{return!1}},3e3).then(()=>{try{this.designWidth=this.designWidth||this.container.width}catch{}}),this.ctx.clock.waitUntil(()=>{try{return!!this.container.height}catch{return!1}},3e3).then(()=>{try{this.designHeight=this.designHeight||this.container.height}catch{}})}updateScale(){this.container&&(this.container.scale.x=this.designScale.x*this.scaleExt.x*this.scaleOrigin.x,this.container.scale.y=this.designScale.y*this.scaleExt.y*this.scaleOrigin.y)}updateTransform(it){var lt,pt,_t,Dt,Lt,$t,Xt,Yt;this.designWidth=it.width,this.designHeight=it.height,this.designX=(pt=(lt=it.position)===null||lt===void 0?void 0:lt.x)!==null&&pt!==void 0?pt:0,this.designY=(Dt=(_t=it.position)===null||_t===void 0?void 0:_t.y)!==null&&Dt!==void 0?Dt:0;const Zt=this.designWidth/2,lr=this.designHeight/2;this.container.width=this.designWidth,this.container.height=this.designHeight,this.container.pivot.x=Zt,this.container.pivot.y=lr;const xr=($t=(Lt=it.position)===null||Lt===void 0?void 0:Lt.x)!==null&&$t!==void 0?$t:0,wr=(Yt=(Xt=it.position)===null||Xt===void 0?void 0:Xt.y)!==null&&Yt!==void 0?Yt:0;this.container.x=xr+Zt,this.container.y=wr+lr,it.scale&&(this.designScale={x:it.scale.x,y:it.scale.y},this.container.scale.x=it.scale.x,this.container.scale.y=it.scale.y),it.rotation&&(this.container.rotation=it.rotation);const Ir=new wy;Ir.drawRect(0,0,this.designWidth,this.designHeight),this.container.addChild(Ir),this.json.hardHidden&&(this.container.visible=!1),this.bound.x=xr,this.bound.y=wr,this.bound.width=this.designWidth,this.bound.height=this.designHeight}get scale(){return this.scaleOrigin}set scale(it){this.scaleOrigin.x=it.x,this.scaleOrigin.y=it.y,this.updateScale()}get design_ppt_w(){return nA(this.designWidth/this.ctx.stageWidth)}get design_ppt_h(){return nA((this.designHeight||this.container.height)/this.ctx.stageHeight)}get design_ppt_x(){return nA(this.designX/this.ctx.stageWidth)}get design_ppt_y(){return nA(this.designY/this.ctx.stageHeight)}get ppt_w(){return this.scaleExt.x*this.scaleOrigin.x*this.designWidth/this.ctx.stageWidth}set ppt_w(it){this.designWidth&&(this.scaleExt.x=it*this.ctx.stageWidth/this.designWidth,this.updateScale())}get ppt_h(){const it=this.designHeight||this.container.height;return this.scaleExt.y*this.scaleOrigin.y*it/this.ctx.stageHeight}set ppt_h(it){this.designHeight&&(this.scaleExt.y=it*this.ctx.stageHeight/this.designHeight,this.updateScale())}get ppt_x(){return(this.container.position.x-this.container.pivot.x)/this.ctx.stageWidth}set ppt_x(it){this.pptX=it;const lt=this.presetSubType===544?this.scaleExt.x:1;this.container.position.x=it*this.ctx.stageWidth+this.container.pivot.x*lt}get ppt_y(){return(this.container.position.y-this.container.pivot.y)/this.ctx.stageHeight}set ppt_y(it){this.pptY=it;const lt=this.presetSubType===544?this.scaleExt.y:1;this.container.position.y=it*this.ctx.stageHeight+this.container.pivot.y*lt}get r(){return this.container.rotation}set r(it){this.container.rotation=it}get ppt_r(){return this.container.angle}set ppt_r(it){this.container.angle=it}set xshear(it){this.container.skew.x=it}get xshear(){return this.container.skew.x}set yshear(it){this.container.skew.y=it}get yshear(){return this.container.skew.y}}var WN=tt(112),XN=tt.n(WN);class wC{constructor(it){if(this._isInit=!1,this.h=0,this.s=0,this.l=0,this.a=1,it){this._isInit=!0;const lt=it.match(/-?[0-9]+/g);lt&&(this.h=parseInt(lt[0],10),this.s=parseInt(lt[1],10)/100,this.l=parseInt(lt[2],10)/100)}}isInit(){return this._isInit}by(it,lt){lt.h=Math.max(Math.min(this.h+it.h,359),0),lt.s=Math.max(Math.min(this.s+it.s,1),0),lt.l=Math.max(Math.min(this.l+it.l,1),0),lt.a=Math.max(Math.min(this.a+it.a,1),0)}fromHexString(it){const[lt,pt,_t,Dt]=T_(it);let Lt=0,$t=0,Xt=0;const Yt=Math.max(lt,pt,_t),Zt=Math.min(lt,pt,_t),lr=Yt-Zt;Xt=(Yt+Zt)/2,lr===0?Lt=0:Yt===lt?Lt=(pt-_t)/lr%6*60:Yt===pt?Lt=60*((_t-lt)/lr+2):Yt===_t&&(Lt=60*((lt-pt)/lr+4)),$t=lr===0?0:lr/(1-Math.abs(2*Xt-1)),this.h=Lt,this.s=$t,this.l=Xt,this.a=Dt}interpolationFrom(it,lt,pt){const _t=it.h+(this.h-it.h)*lt,Dt=it.s+(this.s-it.s)*lt,Lt=it.l+(this.l-it.l)*lt,$t=it.a+(this.a-it.a)*lt;pt.h=Math.max(Math.min(_t,359),0),pt.s=Math.max(Math.min(Dt,1),0),pt.l=Math.max(Math.min(Lt,1),0),pt.a=Math.max(Math.min($t,1),0)}toHexString(){let it=[0,0,0,0];const{h:lt,s:pt,l:_t}=this;if(lt<360&&lt>=0&&pt<=1&&pt>=0&&_t<=1&&_t>=0){let Dt,Lt,$t;const Xt=(1-Math.abs(2*_t-1))*pt,Yt=Xt*(1-Math.abs(lt/60%2-1)),Zt=_t-Xt/2;[Dt,Lt,$t]=lt>=0&&lt<60?[Xt,Yt,0]:lt>=60&&lt<120?[Yt,Xt,0]:lt>=120&&lt<180?[0,Xt,Yt]:lt>=180&&lt<240?[0,Yt,Xt]:lt>=240&&lt<300?[Yt,0,Xt]:[Xt,0,Yt],it=[Dt+Zt,Lt+Zt,$t+Zt,this.a]}return RI(it)}}class ZD{constructor(it){this._isInit=!1,this.r=0,this.g=0,this.b=0,this.a=0,it&&(this._isInit=!0,this.fromHexString(it))}fromHexString(it){const[lt,pt,_t,Dt]=T_(it);this.r=lt,this.g=pt,this.b=_t,this.a=Dt}isInit(){return this._isInit}interpolationFrom(it,lt,pt){pt.r=it.r+(this.r-it.r)*lt,pt.g=it.g+(this.g-it.g)*lt,pt.b=it.b+(this.b-it.b)*lt,pt.a=it.a+(this.a-it.a)*lt}by(it,lt){lt.r=Math.min(Math.max(this.r+it.r,0),255),lt.g=Math.min(Math.max(this.g+it.g,0),255),lt.b=Math.min(Math.max(this.b+it.b,0),255),lt.a=Math.min(Math.max(this.a+it.a,0),1)}toHexString(){return RI([this.r,this.g,this.b,this.a])}}function VR(vt){const it=vt.substring(1);return[parseInt(it.substring(0,6),16),parseInt(it.substring(6,8),16)/255]}function T_(vt){return(vt=vt.replace(/^#/,"")).substring(6,8).length===0&&(vt+="FF"),[parseInt(vt.substring(0,2).padStart(8,"0"),16)/255,parseInt(vt.substring(2,4).padStart(8,"0"),16)/255,parseInt(vt.substring(4,6).padStart(8,"0"),16)/255,parseInt(vt.substring(6,8).padStart(8,"0"),16)/255]}function RI(vt){return"#"+Math.round(255*vt[0]).toString(16).padStart(2,"0")+Math.round(255*vt[1]).toString(16).padStart(2,"0")+Math.round(255*vt[2]).toString(16).padStart(2,"0")+Math.round(255*vt[3]).toString(16).padStart(2,"0")}function lS(vt,it,lt){const pt=T_(vt),_t=T_(it),Dt=Math.round(255*(pt[0]+(_t[0]-pt[0])*lt)),Lt=Math.round(255*(pt[1]+(_t[1]-pt[1])*lt)),$t=Math.round(255*(pt[2]+(_t[2]-pt[2])*lt)),Xt=Math.round(255*(pt[3]+(_t[3]-pt[3])*lt));return"#"+Dt.toString(16).padStart(2,"0")+Lt.toString(16).padStart(2,"0")+$t.toString(16).padStart(2,"0")+Xt.toString(16).padStart(2,"0")}class VT extends ps.k{constructor(){super(void 0,`
varying vec2 vTextureCoord;
uniform vec4 color;
uniform sampler2D uSampler;
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
if (texColor.a > 0.0) {
vec4 resultColor = color;
resultColor = resultColor * texColor.a;
gl_FragColor = resultColor;
} else {
gl_FragColor = texColor;
}
}
`,{color:new Float32Array([0,0,0,0]),active:0}),this.currentColor="#FFFFFFFF",this.designColor="#FFFFFFFF"}set color(it){this.currentColor=it;const lt=T_(it);this.uniforms.color=Float32Array.from(lt)}get color(){return this.currentColor}}class HR extends ps.k{constructor(it){super(void 0,`
varying vec2 vTextureCoord;
uniform vec4 color;
uniform sampler2D uSampler;
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
if (texColor.a > 0.0) {
gl_FragColor = color;
} else {
gl_FragColor = texColor;
}
}
`,{color:new Float32Array([0,0,0,0]),active:0});const lt=T_(it);this.uniforms.color=Float32Array.from(lt)}}const WR=new Su.ColorMatrixFilter;WR.matrix=[1,0,0,0,-.2,0,1,0,0,-.2,0,0,1,0,-.2,0,0,0,1,0];const JD=new Su.ColorMatrixFilter;JD.matrix=[1,0,0,0,-.1,0,1,0,0,-.1,0,0,1,0,-.1,0,0,0,1,0];const eM=new Su.ColorMatrixFilter;eM.matrix=[1,0,0,0,.2,0,1,0,0,.2,0,0,1,0,.2,0,0,0,1,0];const tM=new Su.ColorMatrixFilter;tM.matrix=[1,0,0,0,.1,0,1,0,0,.1,0,0,1,0,.1,0,0,0,1,0];const YN={darken:WR,darkenLess:JD,lightenLess:tM,lighten:eM};class PI extends II{get fillActive(){var it,lt;return((lt=(it=this.container.filters)===null||it===void 0?void 0:it.length)!==null&&lt!==void 0?lt:-1)>0}set fillActive(it){var lt,pt;it?((pt=(lt=this.container.filters)===null||lt===void 0?void 0:lt.indexOf(this.fillColorFilter))!==null&&pt!==void 0?pt:-1)<0&&(this.container.filters=[this.fillColorFilter]):this.container.filters=[]}constructor(it,lt,pt){super({position:{x:it.x,y:it.y},width:it.width,height:it.height},lt,pt),this.fillColorFilter=new VT,this.fill=new GR(this),this.json=it,this.ctx=lt,this.parentGlobalPos=pt.parentGlobalPos,this.global={x:pt.parentGlobalPos.x+it.x,y:pt.parentGlobalPos.y+it.y},this.updateTransform({position:{x:it.x,y:it.y},width:it.width,height:it.height})}get renderContainer(){return this.container}get interactiveContainer(){return this.container}clearOnSlideChange(){}initOnReuse(){}getTextElement(){return null}getBgElement(){return null}get ppt_x(){return this.global.x/this.ctx.stageWidth}set ppt_x(it){const lt=it*this.ctx.stageWidth-this.global.x,pt=this.presetSubType===544?this.scaleExt.x:1;this.container.position.x=this.designX+lt+this.container.pivot.x*pt}get ppt_y(){return this.global.y/this.ctx.stageHeight}set ppt_y(it){const lt=it*this.ctx.stageHeight-this.global.y,pt=this.presetSubType===544?this.scaleExt.y:1;this.container.position.y=this.designY+lt+this.container.pivot.y*pt}get design_ppt_x(){return nA(this.global.x/this.ctx.stageWidth)}get design_ppt_y(){return nA(this.global.y/this.ctx.stageHeight)}}class QN{constructor(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr){this.ctx=it,this.type=lt,this.lineWidth=pt,this.width=_t,this.height=Dt,this.fillColor=Lt,this.isHorz=$t,this.renderContainer=new Ol.b,this.ghcTextureId=`${Xt}-text-p${Yt}-l${Zt}-u${lr}-underLine`}createPaths(){if(this.type==="ww")return null;{let it=`M 0,0 L ${9525*this.width},0`,[lt,pt]=[this.width,this.lineWidth];return this.isHorz||(it="M 0,0 L 0,"+9525*this.height,[lt,pt]=[this.lineWidth,this.height]),{paths:[{id:Yw(),path:it,fill:"norm",hasStroke:!0,scale:{x:1,y:1},hash:$y()(it)}],width:lt,height:pt}}}getLineStyle(){const it={width:this.lineWidth};return this.type==="dotted"&&(it.dash=""+this.lineWidth),it}preRender(){const it=this.createPaths();if(it){const{paths:lt,width:pt,height:_t}=it,Dt=lt.reduce((Lt,$t)=>Lt+$t.hash,"");this.ctx.graphicsTexture.addGraphics(this.ghcTextureId,lt,Dt,{x:0,y:0},pt,_t,this.getLineStyle(),this.ctx.objectPoolGroup,!1,null,this.fillColor)}}render(){if(this.ghcTextureId){const it=this.ctx.graphicsTexture.getGraphicsData(this.ghcTextureId);it&&(this.sprite=new _g,this.sprite.texture=it.texture,this.sprite.pivot.x=it.pivot.x,this.sprite.scale.x=it.scale,this.sprite.scale.y=it.scale)}}destroy(){var it;(it=this.sprite)===null||it===void 0||it.destroy({texture:!0})}}const h0=134217729;function NI(vt,it,lt,pt,_t){let Dt,Lt,$t,Xt,Yt=it[0],Zt=pt[0],lr=0,xr=0;Zt>Yt==Zt>-Yt?(Dt=Yt,Yt=it[++lr]):(Dt=Zt,Zt=pt[++xr]);let wr=0;if(lr<vt&&xr<lt)for(Zt>Yt==Zt>-Yt?(Lt=Yt+Dt,$t=Dt-(Lt-Yt),Yt=it[++lr]):(Lt=Zt+Dt,$t=Dt-(Lt-Zt),Zt=pt[++xr]),Dt=Lt,$t!==0&&(_t[wr++]=$t);lr<vt&&xr<lt;)Zt>Yt==Zt>-Yt?(Lt=Dt+Yt,Xt=Lt-Dt,$t=Dt-(Lt-Xt)+(Yt-Xt),Yt=it[++lr]):(Lt=Dt+Zt,Xt=Lt-Dt,$t=Dt-(Lt-Xt)+(Zt-Xt),Zt=pt[++xr]),Dt=Lt,$t!==0&&(_t[wr++]=$t);for(;lr<vt;)Lt=Dt+Yt,Xt=Lt-Dt,$t=Dt-(Lt-Xt)+(Yt-Xt),Yt=it[++lr],Dt=Lt,$t!==0&&(_t[wr++]=$t);for(;xr<lt;)Lt=Dt+Zt,Xt=Lt-Dt,$t=Dt-(Lt-Xt)+(Zt-Xt),Zt=pt[++xr],Dt=Lt,$t!==0&&(_t[wr++]=$t);return Dt===0&&wr!==0||(_t[wr++]=Dt),wr}function KN(vt,it){let lt=it[0];for(let pt=1;pt<vt;pt++)lt+=it[pt];return lt}function TC(vt){return new Float64Array(vt)}const iA=TC(4),XR=TC(8),kI=TC(12),YR=TC(16),E_=TC(4);function EC(vt,it,lt,pt,_t,Dt){const Lt=(it-Dt)*(lt-_t),$t=(vt-_t)*(pt-Dt),Xt=Lt-$t;if(Lt===0||$t===0||Lt>0!=$t>0)return Xt;const Yt=Math.abs(Lt+$t);return Math.abs(Xt)>=33306690738754716e-32*Yt?Xt:-(function(Zt,lr,xr,wr,Ir,kr,Lr){let Xr,_n,On,Kn,Mn,ca,Gn,Qn,ks,Cs,gs,_s,Ts,ws,oo,no,js,Ws;const Co=Zt-Ir,jo=xr-Ir,Qo=lr-kr,xs=wr-kr;ws=Co*xs,ca=h0*Co,Gn=ca-(ca-Co),Qn=Co-Gn,ca=h0*xs,ks=ca-(ca-xs),Cs=xs-ks,oo=Qn*Cs-(ws-Gn*ks-Qn*ks-Gn*Cs),no=Qo*jo,ca=h0*Qo,Gn=ca-(ca-Qo),Qn=Qo-Gn,ca=h0*jo,ks=ca-(ca-jo),Cs=jo-ks,js=Qn*Cs-(no-Gn*ks-Qn*ks-Gn*Cs),gs=oo-js,Mn=oo-gs,iA[0]=oo-(gs+Mn)+(Mn-js),_s=ws+gs,Mn=_s-ws,Ts=ws-(_s-Mn)+(gs-Mn),gs=Ts-no,Mn=Ts-gs,iA[1]=Ts-(gs+Mn)+(Mn-no),Ws=_s+gs,Mn=Ws-_s,iA[2]=_s-(Ws-Mn)+(gs-Mn),iA[3]=Ws;let Ms=KN(4,iA),Io=22204460492503146e-32*Lr;if(Ms>=Io||-Ms>=Io||(Mn=Zt-Co,Xr=Zt-(Co+Mn)+(Mn-Ir),Mn=xr-jo,On=xr-(jo+Mn)+(Mn-Ir),Mn=lr-Qo,_n=lr-(Qo+Mn)+(Mn-kr),Mn=wr-xs,Kn=wr-(xs+Mn)+(Mn-kr),Xr===0&&_n===0&&On===0&&Kn===0)||(Io=11093356479670487e-47*Lr+33306690738754706e-32*Math.abs(Ms),Ms+=Co*Kn+xs*Xr-(Qo*On+jo*_n),Ms>=Io||-Ms>=Io))return Ms;ws=Xr*xs,ca=h0*Xr,Gn=ca-(ca-Xr),Qn=Xr-Gn,ca=h0*xs,ks=ca-(ca-xs),Cs=xs-ks,oo=Qn*Cs-(ws-Gn*ks-Qn*ks-Gn*Cs),no=_n*jo,ca=h0*_n,Gn=ca-(ca-_n),Qn=_n-Gn,ca=h0*jo,ks=ca-(ca-jo),Cs=jo-ks,js=Qn*Cs-(no-Gn*ks-Qn*ks-Gn*Cs),gs=oo-js,Mn=oo-gs,E_[0]=oo-(gs+Mn)+(Mn-js),_s=ws+gs,Mn=_s-ws,Ts=ws-(_s-Mn)+(gs-Mn),gs=Ts-no,Mn=Ts-gs,E_[1]=Ts-(gs+Mn)+(Mn-no),Ws=_s+gs,Mn=Ws-_s,E_[2]=_s-(Ws-Mn)+(gs-Mn),E_[3]=Ws;const _o=NI(4,iA,4,E_,XR);ws=Co*Kn,ca=h0*Co,Gn=ca-(ca-Co),Qn=Co-Gn,ca=h0*Kn,ks=ca-(ca-Kn),Cs=Kn-ks,oo=Qn*Cs-(ws-Gn*ks-Qn*ks-Gn*Cs),no=Qo*On,ca=h0*Qo,Gn=ca-(ca-Qo),Qn=Qo-Gn,ca=h0*On,ks=ca-(ca-On),Cs=On-ks,js=Qn*Cs-(no-Gn*ks-Qn*ks-Gn*Cs),gs=oo-js,Mn=oo-gs,E_[0]=oo-(gs+Mn)+(Mn-js),_s=ws+gs,Mn=_s-ws,Ts=ws-(_s-Mn)+(gs-Mn),gs=Ts-no,Mn=Ts-gs,E_[1]=Ts-(gs+Mn)+(Mn-no),Ws=_s+gs,Mn=Ws-_s,E_[2]=_s-(Ws-Mn)+(gs-Mn),E_[3]=Ws;const Ys=NI(_o,XR,4,E_,kI);ws=Xr*Kn,ca=h0*Xr,Gn=ca-(ca-Xr),Qn=Xr-Gn,ca=h0*Kn,ks=ca-(ca-Kn),Cs=Kn-ks,oo=Qn*Cs-(ws-Gn*ks-Qn*ks-Gn*Cs),no=_n*On,ca=h0*_n,Gn=ca-(ca-_n),Qn=_n-Gn,ca=h0*On,ks=ca-(ca-On),Cs=On-ks,js=Qn*Cs-(no-Gn*ks-Qn*ks-Gn*Cs),gs=oo-js,Mn=oo-gs,E_[0]=oo-(gs+Mn)+(Mn-js),_s=ws+gs,Mn=_s-ws,Ts=ws-(_s-Mn)+(gs-Mn),gs=Ts-no,Mn=Ts-gs,E_[1]=Ts-(gs+Mn)+(Mn-no),Ws=_s+gs,Mn=Ws-_s,E_[2]=_s-(Ws-Mn)+(gs-Mn),E_[3]=Ws;const zo=NI(Ys,kI,4,E_,YR);return YR[zo-1]})(vt,it,lt,pt,_t,Dt,Yt)}const QR=Math.pow(2,-52),rM=new Uint32Array(512);class OI{static from(it,lt=KR,pt=JN){const _t=it.length,Dt=new Float64Array(2*_t);for(let Lt=0;Lt<_t;Lt++){const $t=it[Lt];Dt[2*Lt]=lt($t),Dt[2*Lt+1]=pt($t)}return new OI(Dt)}constructor(it){const lt=it.length>>1;if(lt>0&&typeof it[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=it;const pt=Math.max(2*lt-5,0);this._triangles=new Uint32Array(3*pt),this._halfedges=new Int32Array(3*pt),this._hashSize=Math.ceil(Math.sqrt(lt)),this._hullPrev=new Uint32Array(lt),this._hullNext=new Uint32Array(lt),this._hullTri=new Uint32Array(lt),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(lt),this._dists=new Float64Array(lt),this.update()}update(){const{coords:it,_hullPrev:lt,_hullNext:pt,_hullTri:_t,_hullHash:Dt}=this,Lt=it.length>>1;let $t=1/0,Xt=1/0,Yt=-1/0,Zt=-1/0;for(let Cs=0;Cs<Lt;Cs++){const gs=it[2*Cs],_s=it[2*Cs+1];gs<$t&&($t=gs),_s<Xt&&(Xt=_s),gs>Yt&&(Yt=gs),_s>Zt&&(Zt=_s),this._ids[Cs]=Cs}const lr=($t+Yt)/2,xr=(Xt+Zt)/2;let wr,Ir,kr,Lr=1/0;for(let Cs=0;Cs<Lt;Cs++){const gs=nM(lr,xr,it[2*Cs],it[2*Cs+1]);gs<Lr&&(wr=Cs,Lr=gs)}const Xr=it[2*wr],_n=it[2*wr+1];Lr=1/0;for(let Cs=0;Cs<Lt;Cs++){if(Cs===wr)continue;const gs=nM(Xr,_n,it[2*Cs],it[2*Cs+1]);gs<Lr&&gs>0&&(Ir=Cs,Lr=gs)}let On=it[2*Ir],Kn=it[2*Ir+1],Mn=1/0;for(let Cs=0;Cs<Lt;Cs++){if(Cs===wr||Cs===Ir)continue;const gs=qI(Xr,_n,On,Kn,it[2*Cs],it[2*Cs+1]);gs<Mn&&(kr=Cs,Mn=gs)}let ca=it[2*kr],Gn=it[2*kr+1];if(Mn===1/0){for(let _s=0;_s<Lt;_s++)this._dists[_s]=it[2*_s]-it[0]||it[2*_s+1]-it[1];A_(this._ids,this._dists,0,Lt-1);const Cs=new Uint32Array(Lt);let gs=0;for(let _s=0,Ts=-1/0;_s<Lt;_s++){const ws=this._ids[_s];this._dists[ws]>Ts&&(Cs[gs++]=ws,Ts=this._dists[ws])}return this.hull=Cs.subarray(0,gs),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(EC(Xr,_n,On,Kn,ca,Gn)<0){const Cs=Ir,gs=On,_s=Kn;Ir=kr,On=ca,Kn=Gn,kr=Cs,ca=gs,Gn=_s}const Qn=(function(Cs,gs,_s,Ts,ws,oo){const no=_s-Cs,js=Ts-gs,Ws=ws-Cs,Co=oo-gs,jo=no*no+js*js,Qo=Ws*Ws+Co*Co,xs=.5/(no*Co-js*Ws);return{x:Cs+(Co*jo-js*Qo)*xs,y:gs+(no*Qo-Ws*jo)*xs}})(Xr,_n,On,Kn,ca,Gn);this._cx=Qn.x,this._cy=Qn.y;for(let Cs=0;Cs<Lt;Cs++)this._dists[Cs]=nM(it[2*Cs],it[2*Cs+1],Qn.x,Qn.y);A_(this._ids,this._dists,0,Lt-1),this._hullStart=wr;let ks=3;pt[wr]=lt[kr]=Ir,pt[Ir]=lt[wr]=kr,pt[kr]=lt[Ir]=wr,_t[wr]=0,_t[Ir]=1,_t[kr]=2,Dt.fill(-1),Dt[this._hashKey(Xr,_n)]=wr,Dt[this._hashKey(On,Kn)]=Ir,Dt[this._hashKey(ca,Gn)]=kr,this.trianglesLen=0,this._addTriangle(wr,Ir,kr,-1,-1,-1);for(let Cs,gs,_s=0;_s<this._ids.length;_s++){const Ts=this._ids[_s],ws=it[2*Ts],oo=it[2*Ts+1];if(_s>0&&Math.abs(ws-Cs)<=QR&&Math.abs(oo-gs)<=QR||(Cs=ws,gs=oo,Ts===wr||Ts===Ir||Ts===kr))continue;let no=0;for(let Qo=0,xs=this._hashKey(ws,oo);Qo<this._hashSize&&(no=Dt[(xs+Qo)%this._hashSize],no===-1||no===pt[no]);Qo++);no=lt[no];let js,Ws=no;for(;js=pt[Ws],EC(ws,oo,it[2*Ws],it[2*Ws+1],it[2*js],it[2*js+1])>=0;)if(Ws=js,Ws===no){Ws=-1;break}if(Ws===-1)continue;let Co=this._addTriangle(Ws,Ts,pt[Ws],-1,-1,_t[Ws]);_t[Ts]=this._legalize(Co+2),_t[Ws]=Co,ks++;let jo=pt[Ws];for(;js=pt[jo],EC(ws,oo,it[2*jo],it[2*jo+1],it[2*js],it[2*js+1])<0;)Co=this._addTriangle(jo,Ts,js,_t[Ts],-1,_t[jo]),_t[Ts]=this._legalize(Co+2),pt[jo]=jo,ks--,jo=js;if(Ws===no)for(;js=lt[Ws],EC(ws,oo,it[2*js],it[2*js+1],it[2*Ws],it[2*Ws+1])<0;)Co=this._addTriangle(js,Ts,Ws,-1,_t[Ws],_t[js]),this._legalize(Co+2),_t[js]=Co,pt[Ws]=Ws,ks--,Ws=js;this._hullStart=lt[Ts]=Ws,pt[Ws]=lt[jo]=Ts,pt[Ts]=jo,Dt[this._hashKey(ws,oo)]=Ts,Dt[this._hashKey(it[2*Ws],it[2*Ws+1])]=Ws}this.hull=new Uint32Array(ks);for(let Cs=0,gs=this._hullStart;Cs<ks;Cs++)this.hull[Cs]=gs,gs=pt[gs];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(it,lt){return Math.floor((function(pt,_t){const Dt=pt/(Math.abs(pt)+Math.abs(_t));return(_t>0?3-Dt:1+Dt)/4})(it-this._cx,lt-this._cy)*this._hashSize)%this._hashSize}_legalize(it){const{_triangles:lt,_halfedges:pt,coords:_t}=this;let Dt=0,Lt=0;for(;;){const $t=pt[it],Xt=it-it%3;if(Lt=Xt+(it+2)%3,$t===-1){if(Dt===0)break;it=rM[--Dt];continue}const Yt=$t-$t%3,Zt=Xt+(it+1)%3,lr=Yt+($t+2)%3,xr=lt[Lt],wr=lt[it],Ir=lt[Zt],kr=lt[lr];if(ZN(_t[2*xr],_t[2*xr+1],_t[2*wr],_t[2*wr+1],_t[2*Ir],_t[2*Ir+1],_t[2*kr],_t[2*kr+1])){lt[it]=kr,lt[$t]=xr;const Lr=pt[lr];if(Lr===-1){let _n=this._hullStart;do{if(this._hullTri[_n]===lr){this._hullTri[_n]=it;break}_n=this._hullPrev[_n]}while(_n!==this._hullStart)}this._link(it,Lr),this._link($t,pt[Lt]),this._link(Lt,lr);const Xr=Yt+($t+1)%3;Dt<rM.length&&(rM[Dt++]=Xr)}else{if(Dt===0)break;it=rM[--Dt]}}return Lt}_link(it,lt){this._halfedges[it]=lt,lt!==-1&&(this._halfedges[lt]=it)}_addTriangle(it,lt,pt,_t,Dt,Lt){const $t=this.trianglesLen;return this._triangles[$t]=it,this._triangles[$t+1]=lt,this._triangles[$t+2]=pt,this._link($t,_t),this._link($t+1,Dt),this._link($t+2,Lt),this.trianglesLen+=3,$t}}function nM(vt,it,lt,pt){const _t=vt-lt,Dt=it-pt;return _t*_t+Dt*Dt}function ZN(vt,it,lt,pt,_t,Dt,Lt,$t){const Xt=vt-Lt,Yt=it-$t,Zt=lt-Lt,lr=pt-$t,xr=_t-Lt,wr=Dt-$t,Ir=Zt*Zt+lr*lr,kr=xr*xr+wr*wr;return Xt*(lr*kr-Ir*wr)-Yt*(Zt*kr-Ir*xr)+(Xt*Xt+Yt*Yt)*(Zt*wr-lr*xr)<0}function qI(vt,it,lt,pt,_t,Dt){const Lt=lt-vt,$t=pt-it,Xt=_t-vt,Yt=Dt-it,Zt=Lt*Lt+$t*$t,lr=Xt*Xt+Yt*Yt,xr=.5/(Lt*Yt-$t*Xt),wr=(Yt*Zt-$t*lr)*xr,Ir=(Lt*lr-Xt*Zt)*xr;return wr*wr+Ir*Ir}function A_(vt,it,lt,pt){if(pt-lt<=20)for(let _t=lt+1;_t<=pt;_t++){const Dt=vt[_t],Lt=it[Dt];let $t=_t-1;for(;$t>=lt&&it[vt[$t]]>Lt;)vt[$t+1]=vt[$t--];vt[$t+1]=Dt}else{let _t=lt+1,Dt=pt;aA(vt,lt+pt>>1,_t),it[vt[lt]]>it[vt[pt]]&&aA(vt,lt,pt),it[vt[_t]]>it[vt[pt]]&&aA(vt,_t,pt),it[vt[lt]]>it[vt[_t]]&&aA(vt,lt,_t);const Lt=vt[_t],$t=it[Lt];for(;;){do _t++;while(it[vt[_t]]<$t);do Dt--;while(it[vt[Dt]]>$t);if(Dt<_t)break;aA(vt,_t,Dt)}vt[lt+1]=vt[Dt],vt[Dt]=Lt,pt-_t+1>=Dt-lt?(A_(vt,it,_t,pt),A_(vt,it,lt,Dt-1)):(A_(vt,it,lt,Dt-1),A_(vt,it,_t,pt))}}function aA(vt,it,lt){const pt=vt[it];vt[it]=vt[lt],vt[lt]=pt}function KR(vt){return vt[0]}function JN(vt){return vt[1]}function tk(vt,it,lt){let pt=null;const _t=new Ol.b;if(vt.stopList.sort((Lt,$t)=>Lt.pos-$t.pos),!vt.stopList.find(Lt=>Lt.pos===0)){const Lt=vt.stopList[0];vt.stopList.unshift({pos:0,color:Lt.color})}if(!vt.stopList.find(Lt=>Lt.pos===1)){const Lt=vt.stopList[vt.stopList.length-1];vt.stopList.push({pos:1,color:Lt.color})}const Dt=Lt=>{const $t=[];for(let Xt=0,Yt=Lt.length;Xt<Yt-1;Xt++){const Zt=Lt[Xt],lr=Lt[Xt+1],xr=Zt.pos+.5*(lr.pos-Zt.pos),wr=lS(Zt.color,lr.color,.5),Ir=2*Xt;$t[Ir]=Zt,$t[Ir+1]={color:wr,pos:xr},$t[Ir+2]=lr}return $t};for(let Lt=0;Lt<2;Lt++)vt.stopList=Dt(vt.stopList);if(pt=vt.line?cS(vt,it,lt):vt.path?(function(Lt,$t,Xt){var Yt,Zt,lr;const xr=[],wr={x:0,y:0};if(((Yt=Lt.path)===null||Yt===void 0?void 0:Yt.path)==="circle"||((Zt=Lt.path)===null||Zt===void 0?void 0:Zt.path)==="rect"||((lr=Lt.path)===null||lr===void 0?void 0:lr.path)==="shape"){const Ir=$t/2,kr=Xt/2;Lt.stopList.forEach(Lr=>{if(Lr.pos===0)xr.push({point:{x:0,y:0},color:Lr.color});else{const Xr=new Q0;Xr.absellipse(0,0,Ir*Lr.pos,kr*Lr.pos,0,2*Math.PI,!1,0),Xr.getPoints(40).forEach(_n=>{xr.push({point:{x:_n.x,y:_n.y},color:Lr.color})})}wr.x=Ir,wr.y=kr})}return{points:xr,position:wr}})(vt,it,lt):cS(vt,it,lt),pt){const Lt=[],$t=[],{position:Xt,points:Yt}=pt,Zt=OI.from(Yt,kr=>kr.point.x,kr=>kr.point.y);for(let kr=0;kr<Zt.triangles.length;kr+=3)Lt.push(Yt[Zt.triangles[kr]].point.x,Yt[Zt.triangles[kr]].point.y),Lt.push(Yt[Zt.triangles[kr+1]].point.x,Yt[Zt.triangles[kr+1]].point.y),Lt.push(Yt[Zt.triangles[kr+2]].point.x,Yt[Zt.triangles[kr+2]].point.y),$t.push(...T_(Yt[Zt.triangles[kr]].color)),$t.push(...T_(Yt[Zt.triangles[kr+1]].color)),$t.push(...T_(Yt[Zt.triangles[kr+2]].color));const lr=new ps.l;lr.addAttribute("aVertexPosition",Lt,2),lr.addAttribute("aColor",$t,4);const xr=ps.r.from(`
precision mediump float;
attribute vec2 aVertexPosition;
attribute vec4 aColor;
uniform mat3 translationMatrix;
uniform mat3 projectionMatrix;
varying vec4 vColor;
void main() {
vColor = aColor;
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
}`,`precision mediump float;
varying vec4 vColor;
void main() {
float alpha = vColor.a;
vec4 color = vColor;
color.a = 1.0;
gl_FragColor = color * alpha;
}
`),wr=new wy;wr.drawRect(0,0,it+1,lt+1),_t.mask=wr,_t.addChild(wr);const Ir=new Mx.a(lr,xr);Ir.position.x=Xt.x,Ir.position.y=Xt.y,_t.addChild(Ir)}return _t}function cS(vt,it,lt){const pt=it/2,_t=lt/2,Dt=[{x:-pt,y:_t},{x:-pt,y:-_t},{x:pt,y:_t},{x:pt,y:-_t}],Lt=[Kw.fromPointSlope({x:-pt,y:0},Math.PI/2),Kw.fromPointSlope({x:0,y:_t},0),Kw.fromPointSlope({x:pt,y:0},Math.PI/2),Kw.fromPointSlope({x:0,y:-_t},0)],$t=[],Xt=vt.stopList.slice(1,vt.stopList.length-1).map(Ir=>{var kr,Lr,Xr;const _n=2*Math.PI;let On=(Lr=(kr=vt.line)===null||kr===void 0?void 0:kr.ang)!==null&&Lr!==void 0?Lr:0;for(;On>_n;)On-=_n;for(;On<0;)On+=_n;const Kn={x:0,y:0};X_(On,Math.PI/2)?(Kn.x=0,Kn.y=lt/2-Ir.pos*lt):X_(On,0)?(Kn.x=Ir.pos*it-it/2,Kn.y=0):(Kn.x=Ir.pos*it-it/2,Kn.y=lt/2-Ir.pos*lt),On>Math.PI/2&&On<=Math.PI&&(Kn.x*=-1),On>Math.PI&&On<=2*Math.PI&&(Kn.y*=-1);const Mn=Kw.fromPointSlope(Kn,Math.PI/2-(((Xr=vt.line)===null||Xr===void 0?void 0:Xr.ang)||0)),ca=Lt.map(Qn=>Mn.crossPoint(Qn)).filter(Qn=>Qn&&Qn.x<=pt&&Qn.x>=-pt&&Qn.y<=_t&&Qn.y>=-_t).map(Qn=>({point:Qn,color:Ir.color})).sort((Qn,ks)=>ks.point.y-Qn.point.y);$t.push(...ca);let Gn=Math.abs(ca[1].point.x-ca[0].point.x)/10;for(let Qn=20;Qn--;){const ks=Qn%2==0?1:-1,Cs=Kn.x+ks*Gn,gs=Mn.resolveY(Cs);Cs<=pt&&Cs>=-pt&&gs<=_t&&gs>=-_t&&$t.push({point:{x:Cs,y:gs},color:Ir.color}),Gn+=Gn}return Mn});let Yt=[],Zt=[];e:for(let Ir=0;Ir<Dt.length;Ir++){const kr=Dt[Ir];for(let Kn=0;Kn<Xt.length-1;Kn++){const Mn=Xt[Kn],ca=Xt[Kn+1],Gn=Mn.distanceToLinearEquation(ca),Qn=Mn.distanceToPoint(kr),ks=ca.distanceToPoint(kr);if(Qn<Gn&&ks<Gn){const Cs=vt.stopList.slice(1,vt.stopList.length-1)[Kn],gs=vt.stopList.slice(1,vt.stopList.length-1)[Kn+1],_s=lS(Cs.color,gs.color,Qn/Gn);$t.splice(Kn+1,0,{point:kr,color:_s});continue e}}const Lr=Xt[0],Xr=Xt[Xt.length-1],_n=Lr.distanceToPoint(kr),On=Xr.distanceToPoint(kr);_n<=On?Yt.push({point:kr,dis:_n}):Zt.push({point:kr,dis:On})}Yt=Yt.sort((Ir,kr)=>kr.dis-Ir.dis);const lr=Yt.map((Ir,kr)=>{if(kr===0)return{point:Ir.point,color:vt.stopList[0].color};{const Lr=vt.stopList[0].color,Xr=vt.stopList[1].color;return{point:Ir.point,color:lS(Lr,Xr,1-(Yt[0].dis===0?1:Ir.dis/Yt[0].dis))}}}).sort((Ir,kr)=>kr.point.y-Ir.point.y);Zt=Zt.sort((Ir,kr)=>kr.dis-Ir.dis);const xr=Zt.map((Ir,kr)=>{if(kr===0)return{point:Ir.point,color:vt.stopList[vt.stopList.length-1].color};{const Lr=vt.stopList[vt.stopList.length-2].color,Xr=vt.stopList[vt.stopList.length-1].color;return{point:Ir.point,color:lS(Lr,Xr,Zt[0].dis===0?0:Ir.dis/Zt[0].dis)}}}).sort((Ir,kr)=>kr.point.y-Ir.point.y),wr=lr.concat(...$t).concat(xr);for(let Ir=0;Ir<wr.length;Ir++)wr[Ir].point.x+=pt,wr[Ir].point.y=-wr[Ir].point.y+_t;return{points:wr,position:{x:0,y:0}}}const AC=`
vec3 rgb2hsl(vec3 rgb) {
float cMax = max(max(rgb.r, rgb.g), rgb.b);
float cMin = min(min(rgb.r, rgb.g), rgb.b);
float delta = cMax - cMin;
float h = 0.0;
if (delta == 0.0) {
h = 0.0;
} else if (cMax == rgb.r) {
h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);
} else if (cMax == rgb.g ) {
h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);
} else if (cMax == rgb.b) {
h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);
}
float l = (cMax + cMin) / 2.0;
float s = 0.0;
if (delta == 0.0) {
s = 0.0;
} else {
s = delta / (1.0 - abs(2.0 * l - 1.0));
}
return vec3(h, s, l);
}
`,ZR=[AC],rk={biLevel:`
vec4 transform(vec4 texColor, float arg) {
mat3 rgb2yuv = mat3(
0.2126, 0.7152, 0.0722,
-0.09991, -0.33609, 0.43600,
0.615, -0.5586, -0.05639
);
vec3 yuv = texColor.rgb * rgb2yuv;
if (yuv.x >= arg || texColor.a < 0.9) {
return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;
} else {
return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;
}
}
`,alphaModFix:`
vec4 transform(vec4 texColor, float arg) {
return texColor * arg;
}
`,alphaBiLevel:`
vec4 transform(vec4 texColor, float arg) {
vec4 result = vec4(texColor);
result.rgb = result.rgb / texColor.a;
if (texColor.a < arg) {
result.a = 0.0;
} else {
result.a = 1.0;
}
return result;
}
`,alphaCeiling:`
vec4 transform(vec4 texColor, float arg) {
vec4 result = vec4(texColor);
result.rgb = result.rgb / texColor.a;
if (texColor.a > 0.0) {
result.a = 1.0;
}
return result;
}
`,alphaFloor:`
vec4 transform(vec4 texColor, float arg) {
vec4 result = vec4(texColor);
result.rgb = result.rgb / texColor.a;
if (texColor.a < 1.0) {
result.a = 0.0;
}
return result;
}
`,grayscl:`
vec4 transform(vec4 texColor, float arg) {
float avg = (texColor.r + texColor.g + texColor.b) / 3.0;
return vec4(avg, avg, avg, texColor.a);
}
`};class JR extends ps.k{constructor(it,lt){var pt;super(void 0,(pt=rk[it],`
varying vec2 vTextureCoord;
uniform float arg;
uniform sampler2D uSampler;
${ZR.map(_t=>_t+`
`).join(`
`)}
${pt}
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
gl_FragColor = transform(texColor, arg);
}
`),{arg:lt})}}const eP=[AC],tP={clrChange:`
vec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {
float epsilon = 0.001;
vec3 colorDiff = arg1.rgb - (texColor.rgb / max(texColor.a, 0.0000000001));
float colorDistance = length(colorDiff);
if (colorDistance < epsilon) {
arg2.rgb *= arg2.a;
return arg2;
} else {
return texColor;
}
}
`,changeBulletColor:`
vec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {
if (texColor.a == 0.0) {
return texColor;
} else {
return arg2;
}
}
`,duotone:`
vec4 transform(vec4 texColor, vec4 arg1, vec4 arg2) {
// float avg = (texColor.r + texColor.g + texColor.b) / 3.0;
// vec3 hsl = rgb2hsl(vec3(avg, avg, avg));
// vec3 result = arg2.rgb * hsl.z + arg1.rgb * (1.0 - hsl.z);
// return vec4(result * texColor.a, texColor.a);
float brightness = texColor.r * 0.3 + texColor.g * 0.59 + texColor.b * 0.11;
return vec4(
(arg1.r + brightness * (arg2.r - arg1.r)) * texColor.a,
(arg1.g + brightness * (arg2.g - arg1.g)) * texColor.a,
(arg1.b + brightness * (arg2.b - arg1.b)) * texColor.a,
texColor.a
);
}
`};class rP extends ps.k{constructor(it,lt,pt){var _t;super(void 0,(_t=tP[it],`
varying vec2 vTextureCoord;
uniform vec4 arg1;
uniform vec4 arg2;
uniform sampler2D uSampler;
${eP.map(Dt=>Dt+`
`).join(`
`)}
${_t}
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
gl_FragColor = transform(texColor, arg1, arg2);
}
`),{arg1:Float32Array.from(lt),arg2:Float32Array.from(pt)})}}const LI=[AC],nP={lum:`
vec4 transform(vec4 texColor, float arg1, float arg2) {
vec3 rgb = texColor.rgb / texColor.a;
// 对比度
highp float C = arg2 * 255.0;
highp float F = (259.0 * (255.0 + C)) / (255.0 * (259.0 - C));
rgb.rgb = F * (rgb.rgb - 0.5) + 0.5;
// 亮度
rgb.rgb += arg1 * rgb.rgb;
rgb.rgb *= texColor.a;
return vec4(rgb, texColor.a);
}
`};class iP extends ps.k{constructor(it,lt,pt){var _t;super(void 0,(_t=nP[it],`
varying vec2 vTextureCoord;
uniform float arg1;
uniform float arg2;
uniform sampler2D uSampler;
${LI.map(Dt=>Dt+`
`).join(`
`)}
${_t}
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
gl_FragColor = transform(texColor, arg1, arg2);
}
`),{arg1:lt,arg2:pt})}}const iM=[AC],aM={alphaInv:`
vec4 transform(vec4 texColor, vec4 arg1) {
float alpha = 1.0 - texColor.a;
arg1.rgb = arg1.rgb * alpha;
arg1.a = alpha;
return arg1;
}
`};class nk extends ps.k{constructor(it,lt){var pt;super(void 0,(pt=aM[it],`
varying vec2 vTextureCoord;
uniform vec4 arg1;
uniform sampler2D uSampler;
${iM.map(_t=>_t+`
`).join(`
`)}
${pt}
void main(void){
vec4 texColor = texture2D(uSampler, vTextureCoord);
gl_FragColor = transform(texColor, arg1);
}
`),{arg1:Float32Array.from(lt)})}}function sM(vt,it){const lt=[];return vt.forEach(pt=>{const _t=(it?.filter||[]).indexOf(pt.type)>=0;if(["biLevel","alphaBiLevel","alphaCeiling","alphaModFix","alphaFloor","grayscl"].indexOf(pt.type)>=0&&_t)lt.push(new JR(pt.type,pt.args[0]||0));else if(["clrChange","changeBulletColor","duotone"].indexOf(pt.type)>=0&&_t){const Dt=T_(pt.args[0]),Lt=T_(pt.args[1]);lt.push(new rP(pt.type,Dt,Lt))}else if(pt.type==="lum"&&_t)lt.push(new iP(pt.type,pt.args[0],pt.args[1]));else if(pt.type==="alphaInv"&&_t){const Dt=T_(pt.args[0]);lt.push(new nk(pt.type,Dt))}}),lt}class XS{get displayObject(){return this._displayObject||(this._displayObject=this.createDisplayObject()),this._displayObject}set displayObject(it){this._displayObject&&this._displayObject.destroy({children:!0,texture:!0}),this._displayObject=it}get hasFill(){return!!this.fillStyle&&this.fillStyle.fillType!=="noFill"}constructor(it,lt,pt,_t,Dt){this.ctx=it,this.fillStyle=lt,this.width=pt,this.height=_t,this.config=Dt,this.clonedObjects=[],this._displayObject=null,this.gradientHash=$y()(`${JSON.stringify(lt)}${Math.ceil(pt)}${Math.ceil(_t)}`)}createDisplayObject(){var it,lt;if(!this.fillStyle)return null;if(this.config.useSlideBackgroundFill&&this.ctx.bgTexture){const pt=new _g;return pt.texture=this.ctx.bgTexture,pt}if(this.fillStyle.fillType==="solidFill"||this.fillStyle.fillType==="noFill")return null;if(this.fillStyle.fillType==="gradientFill"){const pt=new _g,_t=tk(JSON.parse(JSON.stringify(this.fillStyle)),this.width,this.height),Dt=ps.p.create({width:this.width,height:this.height,resolution:this.ctx.renderer.resolution});return this.ctx.renderer.render(_t,{renderTexture:Dt}),_t.destroy({children:!0,texture:!0}),pt.texture=Dt,pt}if(this.fillStyle.fillType==="blipFill"){const{src:pt,filters:_t}=this.fillStyle,Dt=this.ctx.spriteTexture.getTexture(pt),Lt=this.ctx.spriteTexture.getFrameData(pt);if(Dt){const $t=new _g;if($t.texture=Dt,_t.length>0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&($t.filters=sM(_t,this.ctx.featureList)),this.config.fillFloat){const{l:Xt,t:Yt,r:Zt,b:lr}=this.config.fillFloat.fillRect,xr=this.width*(1-Xt-Zt),wr=this.height*(1-Yt-lr),Ir=((it=this.config.shapeRotation)!==null&&it!==void 0?it:0)+((lt=this.config.groupRotation)!==null&&lt!==void 0?lt:0),kr=new wy;kr.drawRect(0,0,xr,wr),kr.pivot.x=xr/2,kr.pivot.y=wr/2,kr.rotation=Ir;const Lr=kr.getBounds(),Xr=Lr.width,_n=Lr.height;$t.width=Xr,$t.height=_n,$t.anchor.x=.5,$t.anchor.y=.5,$t.rotation=-1*Ir,$t.name="math-texture",Ir===0?($t.position.x=Xr/2+Xt*this.width,$t.position.y=_n/2+Yt*this.height):($t.position.x=this.width/2,$t.position.y=this.height/2)}else $t.width=this.width,$t.height=this.height,Lt.rotate&&($t.position.x=this.width/2,$t.position.y=this.height/2,$t.anchor.x=.5,$t.anchor.y=.5,$t.rotation=Lt.rotate/180*Math.PI);return $t}}else if(this.fillStyle.fillType==="gifFill"){const{src:pt,delays:_t,filters:Dt}=this.fillStyle,Lt=this.ctx.spriteTexture.getGifFrames(pt).map((Zt,lr)=>({texture:Zt,time:_t[lr]||20})),$t=new Uo(Lt,!0);$t.name=Yw(),$t.width=this.width,$t.height=this.height,Dt.length>0&&this.config.useFilter&&(this.ctx.featureList||{}).filter&&($t.filters=sM(Dt,this.ctx.featureList));const Xt=this.fillStyle.loop;let Yt=1;return $t.onLoop=()=>{Yt+=1,Xt>0&&Yt>Xt&&$t.gotoAndStop($t.totalFrames-1)},$t}return null}isSolidFill(){var it;return((it=this.fillStyle)===null||it===void 0?void 0:it.fillType)==="solidFill"}getSolidFillColor(){var it;return((it=this.fillStyle)===null||it===void 0?void 0:it.fillType)==="solidFill"?this.fillStyle.color:"#000000"}getClonedDisplayObject(){const it=this.createDisplayObject();return this.clonedObjects.push(it),it}destroy(){var it;(it=this._displayObject)===null||it===void 0||it.destroy(),this._displayObject=null,this.clonedObjects.forEach(lt=>{lt?.destroy()}),this.clonedObjects=[]}}class oM extends ps.k{}var aP=tt(113),sP=tt.n(aP),oP=tt(114),uP=tt.n(oP);class sA extends oM{constructor(it){super(sP.a,uP.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uGlowColor:T_(it.color),uSdfSampler:ps.t.WHITE,uSdfReady:0,uSdfMaxDis:0,uRad:it.rad/2,uSdfPosition:new Float32Array([0,0])}),this.priority=3,this.json=it}filterAreaJustify(it){const lt=Math.ceil(this.json.rad),pt=Math.ceil(it.width+2*lt),_t=Math.ceil(it.height+2*lt);return new Ho.j(it.x-lt,it.y-lt,pt,_t)}sdfBox(it,lt){const pt=Math.ceil(this.json.rad),_t=Math.ceil(it+2*pt),Dt=Math.ceil(lt+2*pt);return new Ho.j(pt,pt,_t,Dt)}}var uM=tt(19),lM=tt.n(uM),cM=tt(115),lP=tt.n(cM);class cP extends oM{constructor(it){super(lM.a,lP.a,{uShapeFilterArea:new Float32Array([0,0,0,0]),uRad:it.rad,uSdfSampler:ps.t.WHITE,uSdfReady:0,uSdfMaxDis:1}),this.priority=2,this.json=it}filterAreaJustify(it){return it}sdfBox(it,lt){return new Ho.j(0,0,it,lt)}}class dP{}var sk=tt(116),ok=tt.n(sk);class dM extends ps.k{constructor(it){super(lM.a,ok.a,{uColor:T_(it)})}}class hM extends dP{constructor(it,lt,pt){super(),this.order=1,this.outputTexture=ps.t.WHITE,this.frameTextures=[],this.json=it,this.effectContainer=lt,this.outputSprite=new _g,this.targetScale=pt,this.outputSprite.scale.x=this.json.sx,this.outputSprite.scale.y=this.json.sy,this.outputSprite.skew.x=(this.targetScale.x>0?1:-1)*this.json.kx,this.outputSprite.skew.y=(this.targetScale.y>0?1:-1)*this.json.ky,this.outputSprite.filters=[new Su.BlurFilter(this.json.blurRad/2,4),new dM(this.json.color)]}updateFrame(it){const lt=this.frameTextures[it];if(lt){const pt=this.effectContainer.getBounds(),_t=(this.effectContainer.width-lt.width)/2,Dt=(this.effectContainer.height-lt.height)/2,Lt=new Ho.g(pt.x,pt.y),$t=new Ho.g(pt.x,pt.y);switch(this.json.align){case"tl":$t.x=pt.x,$t.y=pt.y;break;case"t":$t.x=pt.x+pt.width/2,$t.y=pt.y,Lt.x+=pt.width/2;break;case"tr":$t.x=pt.x+pt.width,$t.y=pt.y,Lt.x+=pt.width;break;case"l":$t.x=pt.x,$t.y=pt.y+pt.height/2,Lt.y+=pt.height/2;break;case"ctr":$t.x=pt.x+pt.width/2,$t.y=pt.y+pt.height/2,Lt.x+=pt.width/2,Lt.y+=pt.height/2;break;case"r":$t.x=pt.x+pt.width,$t.y=pt.y+pt.height/2,Lt.x+=pt.width,Lt.y+=pt.height/2;break;case"bl":$t.x=pt.x,$t.y=pt.y+pt.height,Lt.y+=pt.height;break;case"b":$t.x=pt.x+pt.width/2,$t.y=pt.y+pt.height,Lt.x+=pt.width/2,Lt.y+=pt.height;break;case"br":$t.x=pt.x+pt.width,$t.y=pt.y+pt.height,Lt.x+=pt.width,Lt.y+=pt.height}const Xt=this.effectContainer.toLocal($t);this.outputSprite.pivot.x=Xt.x,this.outputSprite.pivot.y=Xt.y;const Yt=new Ho.g(this.json.dist,0),Zt=new Ho.d;Zt.rotate(this.json.dir),Zt.translate(Lt.x+_t,Lt.y+Dt),Zt.apply({x:Yt.x,y:Yt.y},Yt);const lr=this.effectContainer.toLocal(Yt);this.outputSprite.position.x=lr.x,this.outputSprite.position.y=lr.y,this.outputSprite.texture=lt}}createOutput(it,lt){this.frameTextures[lt]=it}setFrameOffset(it,lt){}}var uk=tt(117),hP=tt.n(uk);class fP extends ps.k{constructor(it,lt){super(lM.a,hP.a,{uStartAlpha:it.startAlpha,uEndAlpha:it.endAlpha,uStartPos:it.startPos,uEndPos:it.endPos,uHeight:lt}),console.log(this)}}class pk extends dP{constructor(it,lt,pt,_t,Dt){super(),this.order=2,this.outputSprite=new _g,this.outputTexture=ps.t.WHITE,this.frameTextures=[],this.json=it,this.shapeScaleX=_t,this.effectContainer=lt,this.rotation=pt,this.ctx=Dt,this.outputSprite.anchor.x=.5,this.outputSprite.anchor.y=.5;const Lt=this.effectContainer.getBounds();this.outputSprite.filters=[new Su.BlurFilter(this.json.blurRad/2,4),new fP(this.json,Lt.height)],this.outputSprite.alpha=.5,this.outputSprite.rotation=this.shapeScaleX===-1?Math.PI+2*this.rotation:Math.PI-2*this.rotation,this.outputSprite.scale.x=-1}updateFrame(it){const lt=this.frameTextures[it];lt&&(this.outputSprite.texture=lt)}createOutput(it,lt){this.frameTextures[lt]=it}setFrameOffset(it,lt){const pt=this.effectContainer.getBounds(),_t=new Ho.g(pt.x+pt.width/2,pt.y+pt.height/2),Dt=new Ho.g(_t.x,_t.y+pt.height+this.json.dist),Lt=this.effectContainer.toLocal(Dt);this.outputSprite.position.x=Lt.x+it,this.outputSprite.position.y=Lt.y+lt}}var pP=tt(118),mk=tt.n(pP);class oA extends oM{constructor(it){super(lM.a,mk.a,{}),this.priority=1,this.json=it}filterAreaJustify(it){return it}sdfBox(){return null}}var FI=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class mP extends em.a{get container(){return this._targetContainer}constructor(it,lt,pt,_t,Dt,Lt){super(),this.effects=[],this.attachs=[],this.frames=new Map,this._targetContainer=new Ol.b,this.frameCount=1,this.ctx=_t,this.originWidth=it.width,this.originHeight=it.height,this.cacheKey=pt,this.sourceSprite=new _g;for(const wr of lt)switch(wr.type){case"innerShadow":this.effects.push(new oA(wr));break;case"softEdge":this.effects.push(new cP(wr));break;case"glow":this.effects.push(new sA(wr));break;case"reflection":this.attachs.push(new pk(wr,it,Dt,Lt.x,this.ctx));break;case"outerShadow":this.attachs.push(new hM(wr,it,Lt))}this.effects=this.effects.sort((wr,Ir)=>wr.priority-Ir.priority),this.attachs=this.attachs.sort((wr,Ir)=>wr.order-Ir.order);for(const wr of this.attachs)this._targetContainer.addChild(wr.outputSprite);this.sourceSprite.name="source-sprite";const $t=new Ho.j(0,0,this.originWidth,this.originHeight),Xt=this.effects.map(wr=>wr.filterAreaJustify($t)),Yt=Xt.map(wr=>wr.x),Zt=Xt.map(wr=>wr.y),lr=Xt.map(wr=>wr.width),xr=Xt.map(wr=>wr.height);this.filterArea=new Ho.j(Math.min(...Yt,0),Math.min(...Zt,0),Math.max(...lr,this.originWidth),Math.max(...xr,this.originHeight)),this.sourceSprite.filters=this.effects,this.sourceSprite.filterArea=new Ho.j(0,0,this.filterArea.width,this.filterArea.height),this._targetSprite=new _g,this._targetSprite.name="effect-sprite",this._targetContainer.sortableChildren=!0,this._targetSprite.zIndex=999,this._targetContainer.addChild(this._targetSprite)}getSdfTexture(it,lt){return FI(this,void 0,void 0,function*(){const pt=`${this.cacheKey}_${it}`,_t=this.effects.map(Dt=>({sdfRect:Dt.sdfBox(lt.width,lt.height)})).reduce((Dt,Lt)=>(Lt.sdfRect&&(Dt.width<Lt.sdfRect.width&&(Dt.width=Lt.sdfRect.width),Dt.height<Lt.sdfRect.height&&(Dt.height=Lt.sdfRect.height)),Dt),new Ho.j(0,0));return _t.width===0||_t.height===0?null:this.ctx.sdfManager.getSdf(lt,_t,pt)})}setFrameCount(it){this.frameCount=it}updateFrame(it){const lt=this.frames.get(it);if(lt){this._targetSprite.texture=lt.texture,this._targetSprite.pivot.x=lt.pivotX,this._targetSprite.pivot.y=lt.pivotY;for(const pt of this.attachs)pt.updateFrame(it)}}hasFrame(it){return this.frames.has(it)}setFrameOffset(it,lt){this._targetContainer.position.x=-1*it,this._targetContainer.position.y=-1*lt,this.attachs.forEach(pt=>pt.setFrameOffset(it,lt))}createFrame(it,lt){var pt,_t;return FI(this,void 0,void 0,function*(){const Dt=lt.width,Lt=lt.height;if(this.frames.has(it))return;const $t=yield this.getSdfTexture(it,lt),Xt=(pt=$t?.texture.width)!==null&&pt!==void 0?pt:0,Yt=(_t=$t?.texture.height)!==null&&_t!==void 0?_t:0;for(const kr of this.effects){const Lr=kr.sdfBox(lt.width,lt.height);Lr&&$t&&(kr.uniforms.uSdfSampler=$t.texture,kr.uniforms.uSdfIsReady=1,kr.uniforms.uSdfMaxDis=$t.maxDis,kr.uniforms.uSdfPosition=new Float32Array([($t.texture.width-Lr.width)/2/$t.texture.width,($t.texture.height-Lr.height)/2/$t.texture.height])),kr.uniforms.uShapeFilterArea=new Float32Array([0,0,this.filterArea.width,this.filterArea.height])}this.sourceSprite.texture=lt;const Zt=(this.filterArea.width-this.sourceSprite.width)/2,lr=(this.filterArea.height-this.sourceSprite.height)/2;this.sourceSprite.x=Zt,this.sourceSprite.y=lr;const xr=Math.max(Dt,Xt,this.filterArea.width),wr=Math.max(Lt,Yt,this.filterArea.height),Ir=ps.p.create({width:xr,height:wr,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.sourceSprite,{renderTexture:Ir}),this.frames.set(it,{texture:Ir,pivotX:-1*(this.originWidth-xr)/2,pivotY:-1*(this.originWidth-xr)/2});for(const kr of this.attachs)kr.createOutput(Ir,it);Array.from(this.frames.keys()).length===this.frameCount&&this.emit("ready")})}}var gP=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class vk extends PI{constructor(it,lt,pt){var _t;super(it,lt,pt),this.textureContainer=new Ol.b,this.underline=null,this.cacheSprite=new _g,this.effectContainer=new Ol.b,this.effectObject=null;const{shapeId:Dt,paragraphIndex:Lt,lineIndex:$t,unitIndex:Xt,lineHeight:Yt,width:Zt,underLine:lr,fill:xr,height:wr,isHorz:Ir,lineWidth:kr}=it,Lr=((_t=xr?.fill)===null||_t===void 0?void 0:_t.fillType)==="solidFill"?xr.fill.color:null;if(lr){const Xr=Ir?Yt/16:kr/16;this.underline=new QN(lt,lr.type,Xr,Zt,wr,Lr,Ir,Dt,Lt,$t,Xt)}if(this.textGraphics=this.createTextGraphics(),this.textFill=this.createTextFill(),this.strokeGraphics=this.createStrokeGraphics(),this.strokeFill=this.createStrokeFill(),this.effectContainer.name="effect-container",this.effectContainer.zIndex=1,this.container.addChild(this.effectContainer),it.effectIndexList&&it.effectIndexList.length&&pt.effectList){const{effectList:Xr}=pt;this.effectList=it.effectIndexList.map(_n=>{const On=Xr[_n];return On.type==="outerShadow"&&On.dist>5&&(On.dist=5),Xr[_n]}),this.ctx.slideScopeEventHub.once("slide-render",_n=>{if(this.ctx.slideIndex===_n&&this.effectObject){const On=this.getEffectTexture();if(On){const{texture:Kn,offsetX:Mn,offsetY:ca}=On;this.effectObject.setFrameOffset(Mn,ca),this.effectObject.createFrame(1,Kn)}}})}}getEffectTexture(){const{lineHeight:it,fillLineHeight:lt,isHorz:pt,lineWidth:_t}=this.json,Dt=this.effectContainer.getLocalBounds();let Lt=0,$t=0;for(const Zt of this.effectContainer.children)Zt.pivot.x>Lt&&(Lt=Zt.pivot.x),Zt.pivot.y>$t&&($t=Zt.pivot.y);const Xt=new Ho.d;Xt.translate(Lt,$t);const Yt=ps.p.create({width:pt?Dt.width:_t,height:pt?Math.max(lt,it):Dt.height,resolution:2});return this.ctx.renderer.render(this.effectContainer,{renderTexture:Yt,transform:Xt}),{texture:Yt,offsetX:Lt,offsetY:$t}}createStrokeFill(){const{stroke:it,lineWidth:lt,lineHeight:pt}=this.json;return new XS(this.ctx,it?.fill,lt,pt,{useFilter:!1,useSlideBackgroundFill:!1})}createStrokeGraphics(){const{stroke:it}=this.json,lt=it?.key?{fillType:"blipFill",src:it.key,filters:[]}:void 0;return new XS(this.ctx,lt,it?.width||0,it?.height||0,{useFilter:!1,useSlideBackgroundFill:!1})}applyEffectCacheAsBitMap(){}createTextFill(){const{isHorz:it,fill:lt,lineWidth:pt,lineHeight:_t,fillLineHeight:Dt}=this.json;return it?new XS(this.ctx,lt?.fill,pt,Math.max(Dt,_t),{useFilter:!1,useSlideBackgroundFill:!1}):new XS(this.ctx,lt?.fill,Dt,_t,{useFilter:!1,useSlideBackgroundFill:!1})}createTextGraphics(){var it;const{fill:lt,content:pt}=this.json;let _t="#000000";((it=lt?.fill)===null||it===void 0?void 0:it.fillType)==="solidFill"&&(_t=lt.fill.color);const Dt=lt?.key?{fillType:"blipFill",src:lt.key,filters:[{type:"changeBulletColor",args:["#000000",_t]}]}:void 0;return new XS(this.ctx,Dt,lt?.width||0,lt?.height||0,{useFilter:pt==="◾",useSlideBackgroundFill:!1})}getIterateEntry(){return null}getBgElement(){return null}updateTransform(it){var lt,pt,_t,Dt;const{isHorz:Lt}=this.json;it.position={x:Lt&&(pt=(lt=it.position)===null||lt===void 0?void 0:lt.x)!==null&&pt!==void 0?pt:0,y:Lt?0:(Dt=(_t=it.position)===null||_t===void 0?void 0:_t.y)!==null&&Dt!==void 0?Dt:0},it.width=Lt?this.json.width:this.json.lineWidth,it.height=Lt?this.json.lineHeight:this.json.height,super.updateTransform(it)}preRender(){var it;(it=this.underline)===null||it===void 0||it.preRender()}render(it){it.addSubMTask(()=>gP(this,void 0,void 0,function*(){this.doRender()}),"@TextUnitImpl[doRender]"),it.addSubMTask(()=>gP(this,void 0,void 0,function*(){var lt;if(this.effectList&&this.effectList.length>0){const pt=`${this.ctx.taskId}_${this.ctx.slideIndex}_${(lt=this.json.fill)===null||lt===void 0?void 0:lt.key}_${this.json.effectIndexList}`;this.effectObject=new mP(this.effectContainer,this.effectList,pt,this.ctx,0,new Ho.g(1,1)),this.effectObject.on("ready",()=>{var _t;this.effectContainer.visible=!1,this.effectObject.container.zIndex=10,this.container.addChild(this.effectObject.container),(_t=this.effectObject)===null||_t===void 0||_t.updateFrame(1)})}}),"@ShapeImpl[post.render]")}doRender(){let it=!1;const{lineWidth:lt,lineHeight:pt,baseLine:_t,isHorz:Dt,underline:Lt,stroke:$t,height:Xt,width:Yt,highlightColor:Zt,x:lr,y:xr,content:wr,fillLineHeight:Ir,fill:kr}=this.json;let Lr=this.json.needFill!==!1;if(kr&&kr.fill&&kr.fill.fillType!=="solidFill"&&(Lr=!0),Zt){const Xr=new wy,[_n,On]=VR(Zt);Xr.beginFill(_n,On),Xr.drawRect(0,0,Dt?Yt:lt,Dt?pt:Xt),Xr.endFill(),this.textureContainer.addChild(Xr)}if(this.textGraphics.displayObject){const Xr=this.textGraphics.displayObject;if(Dt&&(Xr.position.y=xr>0?xr:0),Lr){const _n=this.textFill.displayObject;if(_n)_n.mask=Xr,_n.addChild(Xr),_n.position.x=-lr,Xr.position.x+=lr,it=!0,this.textureContainer.addChild(_n);else if(this.textFill.isSolidFill()){const On=new VT;On.color=this.textFill.getSolidFillColor(),Xr.filters=[On],it=!0,this.textureContainer.addChild(Xr)}}else this.textureContainer.addChild(Xr)}if(this.strokeGraphics.displayObject){const Xr=this.strokeGraphics.displayObject;if(Lr){const On=this.strokeFill.displayObject;if(On)On.mask=Xr,On.addChild(Xr),Dt?On.position.y=xr>0?xr:0:On.position.x=lr,this.textureContainer.addChild(On);else if(this.strokeFill.isSolidFill()){Dt?Xr.position.y=Math.max(xr,0):Xr.position.x=lr;const Kn=new VT;Kn.color=this.strokeFill.getSolidFillColor(),Xr.filters=[Kn],it=!0,this.textureContainer.addChild(Xr)}}else Dt?Xr.position.y=xr>0?xr:0:Xr.position.x=lr,this.textureContainer.addChild(Xr);const _n=$t&&kr?($t.width-kr?.width)/4:0;Xr.position.x-=_n}if(this.underline&&(this.underline.render(),this.underline.sprite)){Dt?(this.underline.sprite.position.y=Lt?Lt-pt/16:_t,this.underline.sprite.position.x=0):(this.underline.sprite.position.x=0,this.underline.sprite.position.y=0);const Xr=this.textFill.getClonedDisplayObject();Xr?(Xr.mask=this.underline.sprite,Xr.addChild(this.underline.sprite),this.textureContainer.addChild(Xr)):this.textureContainer.addChild(this.underline.sprite)}if(it){const Xr=ps.p.create({width:Dt?Yt:lt,height:Dt?Math.max(Ir,pt):Xt,resolution:this.ctx.renderer.resolution});this.ctx.renderer.render(this.textureContainer,{renderTexture:Xr}),this.cacheSprite.texture=Xr,Dt&&xr<0&&(this.cacheSprite.position.y=xr),this.effectContainer.addChild(this.cacheSprite)}else this.effectContainer.addChild(this.textureContainer);this.container.name=wr}destroy(){this.textFill.destroy(),this.textGraphics.destroy(),this.strokeFill.destroy(),this.strokeGraphics.destroy(),this.cacheSprite.texture.destroy(!0),this.cacheSprite.destroy(),this.textureContainer.destroy(),this.container.destroy()}}var vP=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class yk extends PI{constructor(it,lt,pt){super(it,lt,pt),this.units=[],this.isHorz=!0,this.hyperLinkMap=new Map,this.hyperLinkContainerMap=new Map,this.effectList=[],pt.effectList&&(this.effectList=pt.effectList)}getIterateElements(){return this.units}getIterateEntry(it,lt,pt){return this.units[lt]?this.units[lt]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",pt),null)}preRender(){}applyEffectCacheAsBitMap(){}createUnits(it,lt,pt,_t){for(let Dt=0,Lt=this.json.textUnits.length;Dt<Lt;Dt++)_t.addSubMTask(()=>vP(this,void 0,void 0,function*(){const $t=this.json.textUnits[Dt],{height:Xt,width:Yt,fillHeight:Zt,baseline:lr,y:xr,underline:wr}=this.json,Ir=new vk(Object.assign(Object.assign({},$t),{lineHeight:Xt,lineWidth:Yt,baseLine:lr-xr,underline:wr,fillLineHeight:Zt||Xt,isHorz:this.isHorz,shapeId:it,paragraphIndex:lt,lineIndex:pt,unitIndex:Dt}),this.ctx,{parentGlobalPos:this.global,effectList:this.effectList});if(Ir.preRender(),this.units.push(Ir),$t.hyperlink||$t.hlinkHover){const kr=new MI(Ir.container,this.ctx);$t.hyperlink&&kr.addAction($t.hyperlink,"click"),$t.hlinkHover&&kr.addAction($t.hlinkHover,"hover"),this.container.sortableChildren=!0}}),"@TextLineImpl[createUnits]")}render(it){for(const lt of this.units.reverse())lt.render(it),it.addSubMTask(()=>vP(this,void 0,void 0,function*(){this.container.addChild(lt.container)}),"@TextLineImpl[container.addChild]")}destroy(){this.units.forEach(it=>{it.destroy()}),this.container.destroy({children:!1}),this.hyperLinkMap.clear();for(const it of this.hyperLinkContainerMap.values())it.destroy({children:!0,baseTexture:!0,texture:!0});this.hyperLinkContainerMap.clear()}}var yP=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class _k extends PI{constructor(it,lt,pt){super(it,lt,pt),this.iterateElements=[],this.lines=[],this.effectList=[],this.isHorz=!0,pt.effectList&&(this.effectList=pt.effectList)}getIterateElements(){if(this.iterateElements.length>0)return this.iterateElements;const it=this.lines.reduce((lt,pt)=>lt=lt.concat(pt.getIterateElements()),[]);return this.iterateElements=it,it}getIterateEntry(it,lt,pt){const _t=this.getIterateElements();return _t[lt]?_t[lt]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",pt),null)}preRender(){}applyEffectCacheAsBitMap(){}createLines(it,lt,pt){for(let _t=0,Dt=this.json.lines.length;_t<Dt;_t++)pt.addSubMTask(()=>yP(this,void 0,void 0,function*(){const Lt=this.json.lines[_t],$t=new yk(Lt,this.ctx,{parentGlobalPos:this.global,effectList:this.effectList});$t.isHorz=this.isHorz,$t.container.name="line-"+_t,$t.createUnits(it,lt,_t,pt),this.lines.push($t)}),"@TextParagraphImpl[createLines]")}render(it){for(const lt of this.lines)lt.render(it),it.addSubMTask(()=>yP(this,void 0,void 0,function*(){this.container.addChild(lt.container)}),"@TextParagraphImpl[container.addChild]")}destroy(){this.lines.forEach(it=>{it.destroy()}),this.container.destroy({children:!1})}}function xk(vt,it,lt){let pt,_t;const Dt=Math.round(vt)%360;if(Dt%180==0)pt=Math.cos(Dt*(Math.PI/180))*it,_t=0;else if(Dt%90==0)pt=0,_t=-Math.sin(Dt*(Math.PI/180))*lt;else{const Lt=Math.tan(Dt*Math.PI/180);pt=it*lt/Math.sqrt(Math.pow(lt,2)+Math.pow(it*Lt,2)),(Dt>90&&Dt<270||Dt<-90&&Dt>-270)&&(pt=-pt),_t=-Lt*pt}return{x:pt,y:_t}}function bP(vt,it,lt,pt,_t,Dt){const Lt=xk((_t=-_t)/Math.PI*180,lt,pt),$t=vt.x-Lt.x,Xt=vt.y-Lt.y;return{centerX:$t/9525*it.x,centerY:Xt/9525*it.y,rx:lt/9525*it.x,ry:pt/9525*it.y,st:-_t,end:-_t+Dt,aClockWise:Dt<0}}function YS(vt){const it=new Q0,{scale:lt}=vt;let pt={x:0,y:0};const _t=vt.path.trim().split(" ");for(let Dt=0;Dt<_t.length;Dt+=2){const Lt=_t[Dt],$t=_t[Dt+1];if(Lt==="M"){let[Xt,Yt]=$t.split(",").map(Zt=>Number(Zt));pt={x:Xt,y:Yt},Xt=Xt/9525*lt.x,Yt=Yt/9525*lt.y,it.moveTo(Xt,Yt)}else if(Lt==="A"){const[Xt,Yt,Zt,lr]=$t.split(",").map(On=>Number(On)),{centerX:xr,centerY:wr,rx:Ir,ry:kr,st:Lr,end:Xr,aClockWise:_n}=bP(pt,lt,Xt,Yt,Zt,lr);it.absellipse(xr,wr,Ir,kr,Lr,Xr,_n,0)}else if(Lt==="L"){let[Xt,Yt]=$t.split(",").map(Zt=>Number(Zt));pt={x:Xt,y:Yt},Xt=Xt/9525*lt.x,Yt=Yt/9525*lt.y,it.lineTo(Xt,Yt)}else if(Lt==="QB"){let[Xt,Yt,Zt,lr]=$t.split(",").map(xr=>Number(xr));pt={x:Zt,y:lr},Xt=Xt/9525*lt.x,Yt=Yt/9525*lt.y,Zt=Zt/9525*lt.x,lr=lr/9525*lt.y,it.quadraticCurveTo(Xt,Yt,Zt,lr)}else if(Lt==="CB"){let[Xt,Yt,Zt,lr,xr,wr]=$t.split(",").map(Ir=>Number(Ir));pt={x:xr,y:wr},Xt=Xt/9525*lt.x,Yt=Yt/9525*lt.y,Zt=Zt/9525*lt.x,lr=lr/9525*lt.y,xr=xr/9525*lt.x,wr=wr/9525*lt.y,it.bezierCurveTo(Xt,Yt,Zt,lr,xr,wr)}else if(Lt==="C")try{it.closePath()}catch{}}return it}function Pp(vt,it){return vt.curves.map(lt=>lt.getPoints(it)).reduce((lt,pt)=>lt.concat(pt),[])}const uA={textCirclePour:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textStop:{top:vt=>Pp(vt,100),bottom:vt=>Pp(vt,100)},textPlain:{top:vt=>Pp(vt,100),bottom:vt=>Pp(vt,100)},textTriangle:{top:vt=>Pp(vt,50),bottom:vt=>Pp(vt,101)},textTriangleInverted:{bottom:vt=>Pp(vt,50),top:vt=>Pp(vt,101)},textChevron:{bottom:vt=>Pp(vt,50),top:vt=>Pp(vt,50)},textChevronInverted:{bottom:vt=>Pp(vt,50),top:vt=>Pp(vt,50)},textRingInside:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textRingOutside:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textArchUpPour:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textArchDownPour:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textCurveUp:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textCurveDown:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textCanUp:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textCanDown:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textWave1:{top:vt=>vt.getPoints(180),bottom:vt=>vt.getPoints(180)},textWave2:{top:vt=>vt.getPoints(180),bottom:vt=>vt.getPoints(180)},textDoubleWave1:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textWave4:{top:vt=>vt.getPoints(360),bottom:vt=>vt.getPoints(360)},textInflate:{top:vt=>vt.getPoints(180),bottom:vt=>vt.getPoints(180)},textDeflate:{top:vt=>vt.getPoints(180),bottom:vt=>vt.getPoints(180)},textInflateBottom:{top:vt=>Pp(vt,180),bottom:vt=>vt.getPoints(180)},textDeflateBottom:{top:vt=>Pp(vt,180),bottom:vt=>vt.getPoints(180)},textInflateTop:{bottom:vt=>Pp(vt,180),top:vt=>vt.getPoints(180)},textDeflateTop:{bottom:vt=>Pp(vt,180),top:vt=>vt.getPoints(180)},textFadeRight:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textFadeLeft:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textFadeUp:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textFadeDown:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textSlantUp:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textSlantDown:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textCascadeUp:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textCascadeDown:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textArchUp:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textArchDown:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)},textCircle:{bottom:vt=>Pp(vt,180),top:vt=>Pp(vt,180)}};function qm(vt,it,lt,pt,_t){const Dt=vt.trim().split(" "),[Lt,$t]=Dt[1].split(",").map(_n=>parseFloat(_n)),[Xt,Yt,Zt,lr]=Dt[3].split(",").map(_n=>parseFloat(_n)),xr=(function(_n,On,Kn,Mn,ca,Gn){const Qn=Math.abs(Gn*Math.sqrt((Kn*Kn+Mn*Mn)/2)),ks=Math.ceil(Qn/9525/10);let Cs=0,gs=ca,_s={x:_n+Kn*Math.cos(gs),y:On+Mn*Math.sin(gs)};for(let Ts=0;Ts<ks;Ts+=1){gs+=Gn/ks;const ws={x:_n+Kn*Math.cos(gs),y:On+Mn*Math.sin(gs)};Cs+=Math.sqrt(Math.pow(ws.x-_s.x,2)+Math.pow(ws.y-_s.y,2)),_s=ws}return Cs})(Lt,$t,Xt,Yt,Zt,lr);_t*=Math.min(1,xr/9525/pt);const wr=new Ho.d;wr.translate(_t+it/2,0),wr.rotate(2*Math.PI-Zt);const Ir=new Ho.g(0,0),kr=wr.apply(Ir);kr.x+=it/2,kr.y=lt/2-kr.y;const Lr=Xt+9525*_t,Xr=Yt+9525*_t;return`M ${9525*kr.x},${9525*kr.y} A ${Lr},${Xr},${Zt},${lr}`}var CC=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class L0{get width(){return this.json.width}get height(){return this.json.height}get x(){return this.json.position.x}get y(){return this.json.position.y}set color(it){var lt;((lt=this.container.filters)!==null&&lt!==void 0?lt:[]).length>0&&(this.textColorFilter.color=it)}get color(){return this.textColorFilter.color}get on(){var it;return((it=this.container.filters)!==null&&it!==void 0?it:[]).length>0?"true":"false"}set on(it){var lt;it==="true"?((lt=this.container.filters)!==null&&lt!==void 0?lt:[]).indexOf(this.textColorFilter)<0&&(this.container.filters=[this.textColorFilter]):this.container.filters=[]}constructor(it,lt,pt,_t,Dt){var Lt;this.iterateElements=[],this.paragraphs=[],this.effectList=[],this.container=new Ol.b,this.textContainer=new Ol.b,this.textColorFilter=new VT,this.json=it,this.ctx=lt,this.shapeRotation=Dt,this.parentGlobalPos=_t,this.iterateType=pt,this.container.name="textBody",this.global={x:this.parentGlobalPos.x+it.position.x,y:this.parentGlobalPos.y+it.position.y},this.container.position.x=it.position.x,this.container.position.y=it.position.y,this.container.scale.x=it.scale.x,this.container.scale.y=it.scale.y;const $t=new wy;$t.drawRect(0,0,it.width,it.height),this.container.addChild($t),this.container.addChild(this.textContainer),this.textColorFilter.currentColor="#000000FF",this.textColorFilter.designColor="#000000FF",this.effectList=(Lt=it.effectList)!==null&&Lt!==void 0?Lt:[],this.json.rot&&(this.container.pivot.x+=this.json.width/2,this.container.pivot.y+=this.json.height/2,this.container.rotation=this.json.rot*Math.PI/180,this.container.position.x+=this.json.width/2*this.container.scale.x,this.container.position.y+=this.json.height/2*this.container.scale.y)}getTextElement(it,lt){return it==="paragraph"?this.paragraphs[lt[0]]:null}getIterateEntry(it,lt){return this.iterateElements[it]?this.iterateElements[it]:(this.ctx.eventHub.emit("IterateTimeNodeEnd",lt),null)}applyEffectCacheAsBitMap(){}destroy(){this.paragraphs.forEach(it=>{it.destroy()}),this.textColorFilter.destroy()}createParagraphs(it,lt){for(let pt=0,_t=this.json.paragraphs.length;pt<_t;pt++)lt.addSubMTask(()=>CC(this,void 0,void 0,function*(){var Dt;const Lt=this.json.paragraphs[pt],$t=new _k(Lt,this.ctx,{parentGlobalPos:this.global,effectList:this.effectList});$t.isHorz=(Dt=this.json.isHorz)===null||Dt===void 0||Dt,$t.createLines(it,pt,lt),lt.addSubMTask(()=>CC(this,void 0,void 0,function*(){this.iterateElements=this.iterateElements.concat($t.getIterateElements()),$t.container.name="段落-"+pt,this.paragraphs.push($t)}),"@TextBodyImpl[paragraphs.push]")}),"@TextBodyImpl[createParagraphs]")}render(it){for(const lt of this.paragraphs)lt.render(it),it.addSubMTask(()=>CC(this,void 0,void 0,function*(){this.textContainer.addChild(lt.container)}),"@TextBodyImpl[container.addChild]");it.addSubMTask(()=>CC(this,void 0,void 0,function*(){const{width:lt}=this.container;this.container.scale.x<0&&(this.container.x+=-1*lt)}),"@TextBodyImpl[reset width]"),it.addSubMTask(()=>CC(this,void 0,void 0,function*(){if(this.json.presetTextShape){const lt=this.json.paragraphs.map(Zt=>Zt.x).reduce((Zt,lr)=>Math.min(Zt,lr)),pt=this.json.paragraphs[0].y,_t=this.textContainer.getBounds(),Dt=this.json.paragraphs.map(Zt=>Zt.lines.map(lr=>lr.width).sort((lr,xr)=>lr-xr)[0]).sort((Zt,lr)=>Zt-lr)[0],{width:Lt,height:$t}=_t,{geometry:Xt,type:Yt}=this.json.presetTextShape;if(Xt.paths){const Zt=ps.p.create({width:Dt,height:$t,resolution:this.ctx.renderer.resolution}),lr=new Ho.d;lr.translate(-lt,-pt),this.ctx.renderer.render(this.textContainer,{renderTexture:Zt,transform:lr});const xr=this.json.isHorz!==void 0&&!this.json.isHorz;if(["textCircle","textArchUp","textArchDown"].indexOf(this.json.presetTextShape.type)>=0){const Ir=qm(Xt.paths[0].path,this.json.width,this.json.height,Lt,$t);Xt.paths.unshift(Object.assign(Object.assign({},Xt.paths[0]),{path:Ir}))}const wr=(function(Ir,kr,Lr,Xr){if(!uA[Lr])return null;const _n=uA[Lr].top(YS(kr)),On=uA[Lr].bottom(YS(Ir));if(_n.length!==On.length)return null;const Kn=Math.min(_n.length,On.length),Mn=1/(Kn-1),ca=[],Gn=[],Qn=new Array(2*Kn).fill("").map((ks,Cs)=>Cs);for(let ks=0;ks<Kn;ks++)ca.push(_n[ks].x,_n[ks].y),Xr?Gn.push(1,Mn*ks):Gn.push(Mn*ks,0),ca.push(On[ks].x,On[ks].y),Xr?Gn.push(0,Mn*ks):Gn.push(Mn*ks,1);return{vertices:new Float32Array(ca),uvs:new Float32Array(Gn),drawMode:ol.f.TRIANGLE_STRIP,indices:new Uint16Array(Qn)}})(Xt.paths[1],Xt.paths[0],Yt,xr);if(wr){const Ir=new ro.b(Zt,wr.vertices,wr.uvs,wr.indices,wr.drawMode);this.textContainer.visible=!1,this.container.addChild(Ir)}}}}),"presetTextShape")}}class _P{constructor(it){this.scaleX=1,this.scaleY=1,this.pivot={x:0,y:0},this.paths=[],this.hash="",this.width=0,this.height=0,this.graphicsId="",this.textureId="",this.id=it.id,this.type=it.type,this.heightSize=it.heightSize,this.widthSize=it.widthSize,this.fillStyle=it.fillStyle||{fillType:"solidFill",color:"#ffffffff"},this.lineWidth=it.lineWidth||1,this.position=it.position||{x:0,y:0},this.rotate=it.rotation||1,this.path=this.getUnitPath(),this.setScaleFromLineWidth(),this.setScaleFromSize(),this.generatePaths(),this.setPivot()}setPivot(){switch(this.type){case"oval":case"diamond":this.pivot={x:this.width/2,y:this.height/2};break;case"triangle":this.pivot={x:.7*this.width,y:this.height/2};break;case"arrow":case"stealth":default:this.pivot={x:this.width,y:this.height/2}}}generatePaths(){this.hash="arrow-"+$y()(this.path+this.scaleX+this.scaleY),this.paths=[{id:this.id,path:this.path,fill:"norm",hasStroke:!1,hash:this.hash,scale:{x:this.scaleX,y:this.scaleY}}]}getUnitPath(){switch(this.type){case"stealth":return"M 0,0 L 95250,47625 L 0,95250 L 28575,47625 C C";case"oval":return"M 0,47625 A 47625,47625,-3.14159265,6.2831853 C C";case"diamond":return"M 47625,0 L 95250,47625 L 47625,95250 L 0,47625 C C";case"arrow":return"M 9525,0 L 95250,47625 L 9525,95250 L 0,85725 L 68389.5,47625 L 0,9525 C C";case"triangle":return"M 0,0 L 95250,47625 L 0,95250 C C";default:return""}}setScaleFromLineWidth(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=.29*this.lineWidth+.7,this.scaleY*=.29*this.lineWidth+.7;break;default:throw new Error("can't match any arrow type!")}}setScaleFromSize(){switch(this.type){case"stealth":case"oval":case"diamond":case"arrow":case"triangle":this.scaleX*=1,this.scaleY*=1;break;default:throw new Error("can't match any arrow type!")}switch(this.widthSize){case"sm":this.scaleX*=3/4;break;case"lg":this.scaleX*=1.25;break;case"med":this.scaleX*=1}switch(this.heightSize){case"sm":this.scaleY*=3/4;break;case"lg":this.scaleY*=1.25;break;case"med":this.scaleY*=1}this.width=10*this.scaleX,this.height=10*this.scaleY}}class Zw{get displayObject(){return this._displayObject}constructor(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr){this.id=it,this.ctx=lt,this.paths=pt,this.hash=_t,this.nept=Dt,this.width=Lt,this.height=$t,this.lineStyle=Xt,this.shouldFill=Yt,this.bgColor=Zt,this.lnColor=lr,this.clonedObjects=[],this._displayObject=null,this.isRectangle=!1,this.isPureRect=!1,this.isColoredPureRect=!1,this.isRectangle=this.rectangleDetect(pt),this.isRectangle&&Yt?this.bgColor?this.isColoredPureRect=!0:this.isPureRect=!0:this.ctx.graphicsTexture.addGraphics(this.id,this.paths,this.hash,this.nept,this.width,this.height,this.lineStyle,this.ctx.objectPoolGroup,this.shouldFill,this.bgColor,this.lnColor)}pointDis(it,lt){return Math.pow(it.x-lt.x,2)+Math.pow(it.y-lt.y,2)}isPoint(it){return Number.isNaN(Number(it.x))||Number.isNaN(Number(it.y))}isSolidSquare(it,lt){if(it.join("")!=="MLLLC"&&it.join("")!=="MLLLCC")return!1;const pt=lt.filter(Xt=>!this.isPoint(Xt));if(pt.length!==4)return!1;const _t=Math.min(...pt.map(Xt=>Xt.x)),Dt=Math.min(...pt.map(Xt=>Xt.y)),Lt=Math.max(...pt.map(Xt=>Xt.x)),$t=Math.max(...pt.map(Xt=>Xt.y));for(const Xt of pt)if(Xt.x!==_t&&Xt.x!==Lt||Xt.y!==Dt&&Xt.y!==$t)return!1;return!0}rectangleDetect(it){if(it.length!==1)return!1;const lt=it[0].path.trim().split(" "),pt=[],_t=[];if(lt.length<4)return!1;for(let Xt=0;Xt<lt.length;Xt+=2){const Yt=lt[Xt],Zt=lt[Xt+1],[lr,xr]=Zt.split(",").map(wr=>Number(wr)/100);pt.push(Yt),_t.push({x:lr,y:xr})}if(_t.length<4||pt.find(Xt=>Xt==="CB"||Xt==="QB"||Xt==="A"))return!1;if(this.isSolidSquare(pt,_t))return!0;for(let Xt=0;Xt<3;Xt++){const Yt=_t[Xt],Zt=_t[Xt+1];if(Yt.x!==Zt.x&&Yt.y!==Zt.y)return!1}if(pt.join("").includes("CM"))return!1;const Dt=_t.slice(0,4).reduce((Xt,Yt)=>Xt+Yt.x,0)/4,Lt=_t.slice(0,4).reduce((Xt,Yt)=>Xt+Yt.y,0)/4;if(Number.isNaN(Dt)||Number.isNaN(Lt))return!1;const $t={x:Dt,y:Lt};return X_(this.pointDis($t,_t[0]),this.pointDis($t,_t[1]))&&X_(this.pointDis($t,_t[0]),this.pointDis($t,_t[2]))&&X_(this.pointDis($t,_t[0]),this.pointDis($t,_t[3]))&&this.pointDis($t,_t[0])===this.pointDis($t,_t[1])}createDisplayObject(){if(this.isPureRect){const it=new wy;return it.beginFill(0,1),it.drawRect(0,0,this.width,this.height),it}if(this.isColoredPureRect&&this.bgColor){const it=new wy,[lt,pt]=VR(this.bgColor);return it.beginFill(lt,pt),it.drawRect(0,0,this.width,this.height),it}{const it=new _g,lt=this.ctx.graphicsTexture.getGraphicsData(this.id);return lt?(it.texture=lt.texture,it.pivot.x=lt.pivot.x,it.pivot.y=lt.pivot.y,it.scale.x=lt.scale,it.scale.y=lt.scale,it):null}}getClonedDisplayObject(){const it=this.createDisplayObject();return this.clonedObjects.push(it),it}getPictureMask(){const it=this.createDisplayObject();if(it){it.filters=[new HR("#ff0000")];const lt=ps.p.create({width:it?.width,height:it?.height||0,resolution:1});this.ctx.renderer.render(it,{renderTexture:lt});const pt=new _g;return pt.texture=lt,pt}return null}render(){this._displayObject=this.createDisplayObject()}isNeedMask(it,lt){let pt=!1;return this._displayObject&&(pt=!(this.isRectangle&&Math.abs(it-this._displayObject.width)<2&&Math.abs(lt-this._displayObject.height)<2&&this.shouldFill)),pt}addArrows(it){var lt;(lt=this._displayObject)===null||lt===void 0||lt.addChild(it)}destroy(){var it;(it=this._displayObject)===null||it===void 0||it.destroy(),this._displayObject=null,this.clonedObjects.forEach(lt=>{lt?.destroy()}),this.clonedObjects=[]}}const HT=[[10,10,2],[10,20,3],[10,30,5],[10,40,6],[10,50,8],[10,60,9],[10,70,9],[10,80,10],[10,90,10],[10,100,10],[10,110,9],[10,120,9],[10,130,8],[10,140,6],[10,150,5],[10,160,3],[10,170,2],[10,180,0],[10,190,-2],[10,200,-3],[10,210,-5],[10,220,-6],[10,230,-8],[10,240,-9],[10,250,-9],[10,260,-10],[10,270,-10],[10,280,-10],[10,290,-9],[10,300,-9],[10,310,-8],[10,320,-6],[10,330,-5],[10,340,-3],[10,350,-2],[10,360,0],[20,10,4],[20,20,7],[20,30,10],[20,40,14],[20,50,16],[20,60,18],[20,70,19],[20,80,20],[20,90,20],[20,100,20],[20,110,19],[20,120,18],[20,130,16],[20,140,14],[20,150,10],[20,160,7],[20,170,4],[20,180,0],[20,190,-4],[20,200,-7],[20,210,-10],[20,220,-14],[20,230,-16],[20,240,-18],[20,250,-19],[20,260,-20],[20,270,-20],[20,280,-20],[20,290,-19],[20,300,-18],[20,310,-16],[20,320,-14],[20,330,-10],[20,340,-7],[20,350,-4],[20,360,0],[30,10,6],[30,20,11],[30,30,16],[30,40,20],[30,50,23],[30,60,26],[30,70,28],[30,80,30],[30,90,30],[30,100,30],[30,110,28],[30,120,26],[30,130,23],[30,140,20],[30,150,16],[30,160,11],[30,170,6],[30,180,0],[30,190,-6],[30,200,-11],[30,210,-16],[30,220,-20],[30,230,-23],[30,240,-26],[30,250,-28],[30,260,-30],[30,270,-30],[30,280,-30],[30,290,-28],[30,300,-26],[30,310,-23],[30,320,-20],[40,10,8],[40,20,16],[40,30,23],[40,40,28],[40,50,33],[40,60,36],[40,70,38],[40,80,40],[40,90,40],[40,100,40],[40,110,38],[40,120,36],[40,130,33],[40,140,28],[40,150,23],[40,160,16],[40,170,8],[40,180,0],[40,190,-8],[40,200,-16],[40,210,-23],[40,220,-28],[40,230,-33],[40,240,-36],[40,250,-38],[40,260,-40],[40,270,-40],[40,280,-40],[40,290,-38],[40,300,-36],[40,310,-33],[40,320,-28],[40,330,-23],[40,340,-16],[40,350,-8],[40,360,0],[50,10,12],[50,20,22],[50,30,31],[50,40,37],[50,50,42],[50,60,46],[50,70,48],[50,80,50],[50,90,50],[50,100,50],[50,110,48],[50,120,46],[50,130,42],[50,140,37],[50,150,31],[50,160,22],[50,170,12],[50,180,0],[50,190,-12],[50,200,-22],[50,210,-31],[50,220,-37],[50,230,-42],[50,240,-46],[50,250,-48],[50,260,-50],[50,270,-50],[50,280,-50],[50,290,-48],[50,300,-46],[50,310,-42],[50,320,-37],[50,330,-31],[50,340,-22],[50,350,-12],[50,360,0],[60,10,17],[60,20,31],[60,30,41],[60,40,48],[60,50,53],[60,60,56],[60,70,58],[60,80,60],[60,90,60],[60,100,60],[60,110,58],[60,120,56],[60,130,53],[60,140,48],[60,150,41],[60,160,31],[60,170,17],[60,180,0],[60,190,-17],[60,200,-31],[60,210,-41],[60,220,-48],[60,230,-53],[60,240,-56],[60,250,-58],[60,260,-60],[60,270,-60],[60,280,-60],[60,290,-58],[60,300,-56],[60,310,-53],[60,320,-48],[60,330,-41],[60,340,-31],[60,350,-17],[60,360,0],[70,10,26],[70,20,43],[70,30,54],[70,40,60],[70,50,65],[70,60,67],[70,70,68],[70,80,70],[70,90,70],[70,100,70],[70,110,68],[70,120,67],[70,130,65],[70,140,60],[70,150,54],[70,160,43],[70,170,26],[70,180,0],[70,190,-26],[70,200,-43],[70,210,-54],[70,220,-60],[70,230,-65],[70,240,-67],[70,250,-68],[70,260,-70],[70,270,-70],[70,280,-70],[70,290,-68],[70,300,-67],[70,310,-65],[70,320,-60],[70,330,-54],[70,340,-43],[70,350,-26],[70,360,0],[80,10,45],[80,20,62],[80,30,70],[80,40,74],[80,50,77],[80,60,78],[80,70,79],[80,80,80],[80,90,80],[80,100,80],[80,110,79],[80,120,78],[80,130,77],[80,140,74],[80,150,70],[80,160,62],[80,170,45],[80,180,0],[80,190,-45],[80,200,-62],[80,210,-70],[80,220,-74],[80,230,-77],[80,240,-78],[80,250,-79],[80,260,-80],[80,270,-80],[80,280,-80],[80,290,-79],[80,300,-78],[80,310,-77],[80,320,-74],[80,330,-70],[80,340,-62],[80,350,-45],[80,360,0],[90,10,0],[90,20,0],[90,30,0],[90,40,0],[90,50,0],[90,60,0],[90,70,0],[90,80,0],[90,90,0],[90,100,0],[90,110,0],[90,120,0],[90,130,0],[90,140,0],[90,150,0],[90,160,0],[90,170,0],[90,180,0],[90,190,0],[90,200,0],[90,210,0],[90,220,0],[90,230,0],[90,240,0],[90,250,0],[90,260,0],[90,270,0],[90,280,0],[90,290,0],[90,300,0],[90,310,0],[90,320,0],[90,330,0],[90,340,0],[90,350,0],[90,360,0],[100,10,-45],[100,20,-63],[100,30,-71],[100,40,-74],[100,50,-77],[100,60,-78],[100,70,-79],[100,80,-80],[100,90,-80],[100,100,-80],[100,110,-79],[100,120,-78],[100,130,-77],[100,140,-74],[100,150,-71],[100,160,-63],[100,170,-45],[100,180,0],[100,190,45],[100,200,63],[100,210,71],[100,220,74],[100,230,77],[100,240,78],[100,250,79],[100,260,80],[100,270,80],[100,280,80],[100,290,79],[100,300,78],[100,310,77],[100,320,74],[100,330,71],[100,340,63],[100,350,45],[100,360,0],[110,10,-26],[110,20,-43],[110,30,-54],[110,40,-60],[110,50,-65],[110,60,-67],[110,70,-69],[110,80,-70],[110,90,-70],[110,100,-70],[110,110,-69],[110,120,-67],[110,130,-65],[110,140,-60],[110,150,-54],[110,160,-43],[110,170,-26],[110,180,0],[110,190,26],[110,200,43],[110,210,54],[110,220,60],[110,230,65],[110,240,67],[110,250,69],[110,260,70],[110,270,70],[110,280,70],[110,290,69],[110,300,67],[110,310,65],[110,320,60],[110,330,54],[110,340,43],[110,350,26],[110,360,0],[120,10,-17],[120,20,-31],[120,30,-41],[120,40,-48],[120,50,-53],[120,60,-56],[120,70,-58],[120,80,-60],[120,90,-60],[120,100,-60],[120,110,-58],[120,120,-56],[120,130,-53],[120,140,-48],[120,150,-41],[120,160,-31],[120,170,-17],[120,180,0],[120,190,17],[120,200,31],[120,210,41],[120,220,48],[120,230,53],[120,240,56],[120,250,58],[120,260,60],[120,270,60],[120,280,60],[120,290,58],[120,300,56],[120,310,53],[120,320,48],[120,330,41],[120,340,31],[120,350,17],[120,360,0],[130,10,-12],[130,20,-22],[130,30,-31],[130,40,-37],[130,50,-42],[130,60,-46],[130,70,-48],[130,80,-49],[130,90,-50],[130,100,-49],[130,110,-48],[130,120,-46],[130,130,-42],[130,140,-37],[130,150,-31],[130,160,-22],[130,170,-12],[130,180,0],[130,190,12],[130,200,22],[130,210,31],[130,220,37],[130,230,42],[130,240,46],[130,250,48],[130,260,49],[130,270,50],[130,280,49],[130,290,48],[130,300,46],[130,310,42],[130,320,37],[130,330,31],[130,340,22],[130,350,12],[140,10,-8],[140,20,-16],[140,30,-23],[140,40,-28],[140,50,-33],[140,60,-36],[140,70,-38],[140,80,-40],[140,90,-40],[140,100,-40],[140,110,-38],[140,120,-36],[140,130,-33],[140,140,-28],[140,150,-23],[140,160,-16],[140,170,-8],[140,180,0],[140,190,8],[140,200,16],[140,210,23],[140,220,28],[140,230,33],[140,240,36],[140,250,38],[140,260,39],[140,270,40],[140,280,39],[140,290,38],[140,300,36],[140,310,33],[140,320,28],[140,330,23],[140,340,16],[140,350,8],[140,360,0],[150,10,-6],[150,20,-11],[150,30,-16],[150,40,-20],[150,50,-24],[150,60,-27],[150,70,-29],[150,80,-31],[150,90,-30],[150,100,-31],[150,110,-29],[150,120,-27],[150,130,-24],[150,140,-20],[150,150,-16],[150,160,-11],[150,170,-6],[150,180,0],[150,190,6],[150,200,11],[150,210,16],[150,220,20],[150,230,24],[150,240,27],[150,250,29],[150,260,31],[150,270,30],[150,280,31],[150,290,29],[150,300,27],[150,310,24],[150,320,20],[150,330,16],[150,340,11],[150,350,6],[150,360,0],[160,10,-4],[160,20,-7],[160,30,-10],[160,40,-13],[160,50,-16],[160,60,-18],[160,70,-19],[160,80,-20],[160,90,-20],[160,100,-20],[160,110,-19],[160,120,-18],[160,130,-16],[160,140,-13],[160,150,-10],[160,160,-7],[160,170,-4],[160,180,0],[160,190,4],[160,200,7],[160,210,10],[160,220,13],[160,230,16],[160,240,18],[160,250,19],[160,260,20],[160,270,20],[160,280,20],[160,290,19],[160,300,18],[160,310,16],[160,320,13],[160,330,10],[160,340,7],[160,350,4],[160,360,0],[170,10,-2],[170,20,-4],[170,30,-5],[170,40,-6],[170,50,-8],[170,60,-9],[170,70,-9],[170,80,-10],[170,90,-10],[170,100,-10],[170,110,-9],[170,120,-9],[170,130,-8],[170,140,-6],[170,150,-5],[170,160,-4],[170,170,-2],[170,180,0],[170,190,2],[170,200,4],[170,210,5],[170,220,6],[170,230,8],[170,240,9],[170,250,9],[170,260,10],[170,270,10],[170,280,10],[170,290,9],[170,300,9],[170,310,8],[170,320,6],[170,330,5],[170,340,4],[170,350,2],[170,360,0],[180,10,0],[180,20,0],[180,30,0],[180,40,0],[180,50,0],[180,60,0],[180,70,0],[180,80,0],[180,90,0],[180,100,0],[180,110,0],[180,120,0],[180,130,0],[180,140,0],[180,150,0],[180,160,0],[180,170,0],[180,180,0],[180,190,0],[180,200,0],[180,210,0],[180,220,0],[180,230,0],[180,240,0],[180,250,0],[180,260,0],[180,270,0],[180,280,0],[180,290,0],[180,300,0],[180,310,0],[180,320,0],[180,330,0],[180,340,0],[180,350,0],[180,360,0],[190,10,2],[190,20,4],[190,30,5],[190,40,6],[190,50,8],[190,60,9],[190,70,9],[190,80,10],[190,90,10],[190,100,10],[190,110,9],[190,120,9],[190,130,8],[190,140,6],[190,150,5],[190,160,4],[190,170,2],[190,180,0],[190,190,-2],[190,200,-4],[190,210,-5],[190,220,-6],[190,230,-8],[190,240,-9],[190,250,-9],[190,260,-10],[190,270,-10],[190,280,-10],[190,290,-9],[190,300,-9],[190,310,-8],[190,320,-6],[190,330,-5],[190,340,-4],[190,350,-2],[190,360,0],[200,10,4],[200,20,7],[200,30,11],[200,40,13],[200,50,16],[200,60,18],[200,70,19],[200,80,20],[200,90,20],[200,100,20],[200,110,19],[200,120,18],[200,130,16],[200,140,13],[200,150,11],[200,160,7],[200,170,4],[200,180,0],[200,190,-4],[200,200,-7],[200,210,-11],[200,220,-13],[200,230,-16],[200,240,-18],[200,250,-19],[200,260,-20],[200,270,-20],[200,280,-20],[200,290,-19],[200,300,-18],[200,310,-16],[200,320,-13],[200,330,-11],[200,340,-7],[200,350,-4],[200,360,0],[210,10,6],[210,20,12],[210,30,16],[210,40,20],[210,50,24],[210,60,27],[210,70,29],[210,80,30],[210,90,30],[210,100,30],[210,110,29],[210,120,27],[210,130,24],[210,140,20],[210,150,16],[210,160,12],[210,170,6],[210,180,0],[210,190,-6],[210,200,-12],[210,210,-16],[210,220,-20],[210,230,-24],[210,240,-27],[210,250,-29],[210,260,-30],[210,270,-30],[210,280,-30],[210,290,-29],[210,300,-27],[210,310,-24],[210,320,-20],[210,330,-16],[210,340,-12],[210,350,-6],[210,360,0],[220,10,8],[220,20,16],[220,30,23],[220,40,28],[220,50,33],[220,60,36],[220,70,38],[220,80,40],[220,90,40],[220,100,40],[220,110,38],[220,120,36],[220,130,33],[220,140,28],[220,150,23],[220,160,16],[220,170,8],[220,180,0],[220,190,-8],[220,200,-16],[220,210,-23],[220,220,-28],[220,230,-33],[220,240,-36],[220,250,-38],[220,260,-40],[220,270,-40],[220,280,-40],[220,290,-38],[220,300,-36],[220,310,-33],[220,320,-28],[220,330,-23],[220,340,-16],[220,350,-8],[220,360,0],[230,10,12],[230,20,22],[230,30,31],[230,40,38],[230,50,42],[230,60,46],[230,70,48],[230,80,50],[230,90,50],[230,100,50],[230,110,48],[230,120,46],[230,130,42],[230,140,38],[230,150,31],[230,160,22],[230,170,12],[230,180,0],[230,190,-12],[230,200,-22],[230,210,-31],[230,220,-38],[230,230,-42],[230,240,-46],[230,250,-48],[230,260,-50],[230,270,-50],[230,280,-50],[230,290,-48],[230,300,-46],[230,310,-42],[230,320,-38],[230,330,-31],[230,340,-22],[230,350,-12],[230,360,0],[240,10,17],[240,20,31],[240,30,41],[240,40,48],[240,50,53],[240,60,56],[240,70,59],[240,80,60],[240,90,60],[240,100,60],[240,110,59],[240,120,56],[240,130,53],[240,140,48],[240,150,41],[240,160,31],[240,170,17],[240,180,0],[240,190,-17],[240,200,-31],[240,210,-41],[240,220,-48],[240,230,-53],[240,240,-56],[240,250,-59],[240,260,-60],[240,270,-60],[240,280,-60],[240,290,-59],[240,300,-56],[240,310,-53],[240,320,-48],[240,330,-41],[240,340,-31],[240,350,-17],[240,360,0],[250,10,26],[250,20,44],[250,30,54],[250,40,61],[250,50,65],[250,60,67],[250,70,69],[250,80,70],[250,90,70],[250,100,70],[250,110,69],[250,120,67],[250,130,65],[250,140,61],[250,150,54],[250,160,44],[250,170,26],[250,180,0],[250,190,-26],[250,200,-44],[250,210,-54],[250,220,-61],[250,230,-65],[250,240,-67],[250,250,-69],[250,260,-70],[250,270,-70],[250,280,-70],[250,290,-69],[250,300,-67],[250,310,-65],[250,320,-61],[250,330,-54],[250,340,-44],[250,350,-26],[250,360,0],[260,10,45],[260,20,63],[260,30,71],[260,40,75],[260,50,77],[260,60,79],[260,70,79],[260,80,80],[260,90,80],[260,100,80],[260,110,79],[260,120,79],[260,130,77],[260,140,75],[260,150,71],[260,160,63],[260,170,45],[260,180,0],[260,190,-45],[260,200,-63],[260,210,-71],[260,220,-75],[260,230,-77],[260,240,-79],[260,250,-79],[260,260,-80],[260,270,-80],[260,280,-80],[260,290,-79],[260,300,-79],[260,310,-77],[260,320,-75],[260,330,-71],[260,340,-63],[260,350,-45],[260,360,0],[270,10,90],[270,20,90],[270,30,90],[270,40,90],[270,50,90],[270,60,90],[270,70,90],[270,80,90],[270,90,90],[270,100,90],[270,110,90],[270,120,90],[270,130,90],[270,140,90],[270,150,90],[270,160,90],[270,170,90],[270,180,90],[270,190,90],[270,200,90],[270,210,90],[270,220,90],[270,230,90],[270,240,90],[270,250,90],[270,260,90],[270,270,90],[270,280,90],[270,290,90],[270,300,90],[270,310,90],[270,320,90],[270,330,90],[270,340,90],[270,350,90],[270,360,90],[280,10,-45],[280,20,-63],[280,30,-71],[280,40,-75],[280,50,-77],[280,60,-79],[280,70,-79],[280,80,-80],[280,90,-80],[280,100,-80],[280,110,-79],[280,120,-79],[280,130,-77],[280,140,-75],[280,150,-71],[280,160,-63],[280,170,-45],[280,180,90],[280,190,45],[280,20,63],[280,210,71],[280,220,75],[280,230,77],[280,240,79],[280,250,79],[280,260,80],[280,270,80],[280,280,80],[280,290,79],[280,300,79],[280,310,77],[280,320,75],[280,330,71],[280,340,63],[280,350,45],[280,360,90],[290,10,-26],[290,20,-43],[290,30,-54],[290,40,-60],[290,50,-65],[290,60,-67],[290,70,-69],[290,80,-70],[290,90,-70],[290,100,-70],[290,110,-69],[290,120,-67],[290,130,-65],[290,140,-60],[290,150,-54],[290,160,-43],[290,170,-26],[290,180,0],[290,190,26],[290,200,43],[290,210,54],[290,220,60],[290,230,65],[290,240,67],[290,250,69],[290,260,70],[290,270,70],[290,280,70],[290,290,69],[290,300,67],[290,310,65],[290,320,60],[290,330,54],[290,340,43],[290,350,26],[290,360,0],[300,10,-17],[300,20,-31],[300,30,-41],[300,40,-48],[300,50,-53],[300,60,-56],[300,70,-58],[300,80,-60],[300,90,-60],[300,100,-60],[300,110,-58],[300,120,-56],[300,130,-53],[300,140,-48],[300,150,-41],[300,160,-31],[300,170,-17],[300,180,0],[300,190,17],[300,200,31],[300,210,41],[300,220,48],[300,230,53],[300,240,56],[300,250,58],[300,260,60],[300,270,60],[300,280,60],[300,290,58],[300,300,56],[300,310,53],[300,320,48],[300,330,41],[300,340,31],[300,350,17],[300,360,0],[310,10,-12],[310,20,-23],[310,30,-31],[310,40,-38],[310,50,-43],[310,60,-46],[310,70,-48],[310,80,-50],[310,90,-50],[310,100,-50],[310,110,-48],[310,120,-46],[310,130,-43],[310,140,-38],[310,150,-31],[310,160,-23],[310,170,-12],[310,180,0],[310,190,12],[310,200,23],[310,210,31],[310,220,38],[310,230,43],[310,240,46],[310,250,48],[310,260,50],[310,270,50],[310,280,50],[310,290,48],[310,300,46],[310,310,43],[310,320,38],[310,330,31],[310,340,23],[310,350,12],[310,360,0],[320,10,-9],[320,20,-16],[320,30,-23],[320,40,-29],[320,50,-33],[320,60,-36],[320,70,-39],[320,80,-40],[320,90,-40],[320,100,-40],[320,110,-39],[320,120,-36],[320,130,-33],[320,140,-29],[320,150,-23],[320,160,-16],[320,170,-9],[320,180,0],[320,190,9],[320,200,16],[320,210,23],[320,220,29],[320,230,33],[320,240,36],[320,250,39],[320,260,40],[320,270,40],[320,280,40],[320,290,39],[320,300,36],[320,310,33],[320,320,29],[320,330,23],[320,340,16],[320,350,9],[320,360,0],[330,10,-6],[330,20,-11],[330,30,-16],[330,40,-21],[330,50,-24],[330,60,-27],[330,70,-29],[330,80,-30],[330,90,-30],[330,100,-30],[330,110,-29],[330,120,-27],[330,130,-24],[330,140,-21],[330,150,-16],[330,160,-11],[330,170,-6],[330,180,0],[330,190,6],[330,200,11],[330,210,16],[330,220,21],[330,230,24],[330,240,27],[330,250,29],[330,260,30],[330,270,30],[330,280,30],[330,290,29],[330,300,27],[330,310,24],[330,320,21],[330,330,16],[330,340,11],[330,350,6],[330,360,0],[340,10,-4],[340,20,-8],[340,30,-11],[340,40,-13],[340,50,-16],[340,60,-18],[340,70,-19],[340,80,-20],[340,90,-20],[340,100,-20],[340,110,-19],[340,120,-18],[340,130,-16],[340,140,-13],[340,150,-11],[340,160,-8],[340,170,-4],[340,180,0],[340,190,4],[340,200,8],[340,210,11],[340,220,13],[340,230,16],[340,240,18],[340,250,19],[340,260,20],[340,270,20],[340,280,20],[340,290,19],[340,300,18],[340,310,16],[340,320,13],[340,330,11],[340,340,8],[340,350,4],[340,360,0],[350,10,-2],[350,20,-4],[350,30,-5],[350,40,-7],[350,50,-8],[350,60,-9],[350,70,-10],[350,80,-10],[350,90,-10],[350,100,-10],[350,110,-10],[350,120,-9],[350,130,-8],[350,140,-7],[350,150,-5],[350,160,-4],[350,170,-2],[350,180,0],[350,190,2],[350,200,4],[350,210,5],[350,220,7],[350,230,8],[350,240,9],[350,250,10],[350,260,10],[350,270,10],[350,280,10],[350,290,10],[350,300,9],[350,310,8],[350,320,7],[350,330,5],[350,340,4],[350,350,2],[350,360,0],[360,10,0],[360,20,0],[360,30,0],[360,40,0],[360,50,0],[360,60,0],[360,70,0],[360,80,0],[360,90,0],[360,100,0],[360,110,0],[360,120,0],[360,130,0],[360,140,0],[360,150,0],[360,160,0],[360,170,0],[360,180,0],[360,190,0],[360,200,0],[360,210,0],[360,220,0],[360,230,0],[360,240,0],[360,250,0],[45,35,30],[315,35,-30],[314.7,324.6,30],[314.7,35.4,-30],[64,18,33],[334,18,-8],[306.5,301.3,49],[26,18,9],[296,18,-32],[53.5,301.3,-49]];function T1(vt,it){const lt=[];return vt.forEach(pt=>{const _t=(function(Dt,Lt){try{const[$t,Xt]=Dt,[Yt,Zt]=Lt;return Math.sqrt(Math.pow(Yt-$t,2)+Math.pow(Zt-Xt,2))}catch{return 1/0}})(pt,it);if(lt.length<4&&lt.push([...pt,_t]),_t<Math.max(...lt.map(Dt=>Dt[3]))){const Dt=lt.findIndex(Lt=>Lt[3]===Math.max(...lt.map($t=>$t[3])));lt[Dt]=[...pt,_t]}}),lt}var fM=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};const Rx={pivot:{x:0,y:0},width:0,height:0};class DC extends II{constructor(it,lt,pt){var _t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr;super(it,lt,pt),this.renderContainer=new Ol.b,this.needCacheAsBitMap=!1,this.backgroundGraphics=null,this.effectList=[],this.strokeGraphics=null,this.ghco=null,this.useGroupFill=!1,this.arrowList=[],this.fillColorFilter=new VT,this.strokeColorFilter=new VT,this.pptColorFilter=new VT,this.id="",this.ppt_c=new KD(this),this.fill=new GR(this),this.stroke=new VN(this),this.effectObject=null,this.effectContainer=new Ol.b,this.effectDisposer=()=>{},this.json=it,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&pt.groupFillStyle&&(this.json.fillStyle=pt.groupFillStyle,this.useGroupFill=!0),this.id=it.id;const{fillStyle:wr,lineStyle:Ir}=this.json;this.container.sortableChildren=!0,this.container.name=it.id+"_container_[Shape]",this.effectContainer.name="effect-container",this.effectContainer.zIndex=1,this.container.addChild(this.effectContainer),this.renderContainer.name=it.id+"_render_container_[Shape]",this.generateArrowList(),this.backgroundFill=this.createBackgroundFill(),this.backgroundGraphics=this.createBackgroundGraphics(),this.strokeFill=this.createStrokeFill(),this.strokeGraphics=this.createStrokeGraphics();try{this.ghco=new Zw(this.json.id+"-path-graphics-text-wrap",this.ctx,(Lt=(Dt=(_t=this.json.textBody)===null||_t===void 0?void 0:_t.presetTextShape)===null||Dt===void 0?void 0:Dt.geometry.paths)!==null&&Lt!==void 0?Lt:[],(Yt=(Xt=($t=this.json.textBody)===null||$t===void 0?void 0:$t.presetTextShape)===null||Xt===void 0?void 0:Xt.geometry.hash)!==null&&Yt!==void 0?Yt:"",{x:0,y:0},((Zt=this.json.textBody)===null||Zt===void 0?void 0:Zt.width)||100,((lr=this.json.textBody)===null||lr===void 0?void 0:lr.height)||100,{width:2,fill:{fillType:"solidFill",color:"#FF0000FF"}},!1,null,null)}catch(kr){this.ctx.logger.error(kr.message,this.ctx.taskId)}if(this.ctx.timingTargets.addTarget(this.id,this),wr?.fillType==="solidFill"&&(this.fillColorFilter.currentColor=wr.color,this.fillColorFilter.designColor=wr.color),((xr=Ir?.fill)===null||xr===void 0?void 0:xr.fillType)==="solidFill"&&(this.strokeColorFilter.currentColor=Ir.fill.color,this.strokeColorFilter.designColor=Ir.fill.color),this.updateTransform(this.json),it.textBody&&(this.text=new L0(it.textBody,this.ctx,it.textBody.iterateType,{x:this.designGlobalPosition.x,y:this.designGlobalPosition.y},this.json.rotation||0)),this.container.hitArea=new Ho.k(1,1,this.json.width,this.json.height),this.ctx.slideScopeEventHub.once("slide-render",kr=>{if(this.ctx.slideIndex===kr&&this.effectObject){const Lr=this.getEffectTexture();if(Lr){const{texture:Xr,offsetX:_n,offsetY:On}=Lr;this.effectObject.setFrameOffset(_n,On),this.effectObject.createFrame(1,Xr)}}}),this.ctx.mode==="addLink"){this.interactiveContainer.interactive=!0,this.interactiveContainer.cursor="pointer";const kr=new wy;this.interactiveContainer.addListener("pointerover",()=>{const Lr=this.interactiveContainer.getLocalBounds();kr.lineStyle(2,65535),kr.beginFill(65535,.2),kr.drawRect(0,0,Lr.width,Lr.height),kr.endFill(),kr.position.set(Lr.x,Lr.y),this.interactiveContainer.addChild(kr),this.interactiveContainer.alpha=.9}),this.interactiveContainer.addListener("pointerout",()=>{this.interactiveContainer.removeChild(kr),kr.clear(),this.interactiveContainer.alpha=1}),this.interactiveContainer.addListener("click",()=>{this.ctx.globalEventHub.emit("user-add-click",this.json.id)})}}get interactiveContainer(){return this.renderContainer}get strokeActive(){var it,lt,pt,_t,Dt,Lt,$t;return this.strokeFill.displayObject?((pt=(lt=(it=this.strokeFill.displayObject)===null||it===void 0?void 0:it.filters)===null||lt===void 0?void 0:lt.length)!==null&&pt!==void 0?pt:-1)>0:(($t=(Lt=(Dt=(_t=this.strokeGraphics)===null||_t===void 0?void 0:_t.displayObject)===null||Dt===void 0?void 0:Dt.filters)===null||Lt===void 0?void 0:Lt.length)!==null&&$t!==void 0?$t:-1)>0}set strokeActive(it){var lt,pt,_t,Dt,Lt,$t;const{displayObject:Xt}=this.strokeFill;it?Xt&&((pt=(lt=Xt.filters)===null||lt===void 0?void 0:lt.indexOf(this.strokeColorFilter))!==null&&pt!==void 0?pt:-1)<0?Xt.filters=[this.strokeColorFilter]:!((_t=this.strokeGraphics)===null||_t===void 0)&&_t.displayObject&&((Lt=(Dt=this.strokeGraphics.displayObject.filters)===null||Dt===void 0?void 0:Dt.indexOf(this.strokeColorFilter))!==null&&Lt!==void 0?Lt:-1)<0&&(this.strokeGraphics.displayObject.filters=[this.strokeColorFilter]):Xt?Xt.filters=[]:!(($t=this.strokeGraphics)===null||$t===void 0)&&$t.displayObject&&(this.strokeGraphics.displayObject.filters=[])}get pptColorActive(){var it,lt;return((lt=(it=this.renderContainer.filters)===null||it===void 0?void 0:it.length)!==null&&lt!==void 0?lt:-1)>0}set pptColorActive(it){this.renderContainer.filters=it?[this.pptColorFilter]:[]}get fillActive(){var it,lt,pt,_t,Dt,Lt,$t;return this.backgroundFill.displayObject?((pt=(lt=(it=this.backgroundFill.displayObject)===null||it===void 0?void 0:it.filters)===null||lt===void 0?void 0:lt.length)!==null&&pt!==void 0?pt:-1)>0:(($t=(Lt=(Dt=(_t=this.backgroundGraphics)===null||_t===void 0?void 0:_t.displayObject)===null||Dt===void 0?void 0:Dt.filters)===null||Lt===void 0?void 0:Lt.length)!==null&&$t!==void 0?$t:-1)>0}set fillActive(it){var lt,pt,_t,Dt,Lt,$t;it?this.backgroundFill.displayObject&&((pt=(lt=this.backgroundFill.displayObject.filters)===null||lt===void 0?void 0:lt.indexOf(this.fillColorFilter))!==null&&pt!==void 0?pt:-1)<0?this.backgroundFill.displayObject.filters=[this.fillColorFilter]:!((_t=this.backgroundGraphics)===null||_t===void 0)&&_t.displayObject&&((Lt=(Dt=this.backgroundGraphics.displayObject.filters)===null||Dt===void 0?void 0:Dt.indexOf(this.fillColorFilter))!==null&&Lt!==void 0?Lt:-1)<0&&(this.backgroundGraphics.displayObject.filters=[this.fillColorFilter]):this.backgroundFill.displayObject?this.backgroundFill.displayObject.filters=[]:!(($t=this.backgroundGraphics)===null||$t===void 0)&&$t.displayObject&&(this.backgroundGraphics.displayObject.filters=[])}getTextElement(it,lt){var pt,_t;if(this.json.isMathFallback){if(!this.json.textBody)return this;const Dt=()=>this.json.textBody.paragraphs[0].lines.length<=1,Lt=()=>this.json.textBody.paragraphs[0].lines[0].textUnits.length<=1,$t=()=>this.json.textBody.paragraphs[0].lines[0].textUnits[0].content.trim()==="";if(this.json.textBody.paragraphs.length<=1&&Dt()&&Lt()&&$t())return this}return(_t=(pt=this.text)===null||pt===void 0?void 0:pt.getTextElement(it,lt))!==null&&_t!==void 0?_t:null}getBgElement(){return this}getIterateEntry(it,lt,pt){return lt===0?this:it==="el"?(this.ctx.eventHub.emit("IterateTimeNodeEnd",pt),null):this.text?this.text.getIterateEntry(lt-1,pt)||null:(this.ctx.eventHub.emit("IterateTimeNodeEnd",pt),null)}getEffectTexture(){const it=this.effectContainer.getLocalBounds();let lt=0,pt=0;for(const Lt of this.effectContainer.children)Lt.pivot.x>lt&&(lt=Lt.pivot.x),Lt.pivot.y>pt&&(pt=Lt.pivot.y);const _t=new Ho.d;if(_t.translate(lt,pt),this.effectContainer.children.length===0)return null;const Dt=ps.p.create({width:it.width,height:it.height,resolution:Math.min(this.ctx.renderer.resolution,window.devicePixelRatio||2,2)});return this.ctx.renderer.render(this.effectContainer,{renderTexture:Dt,transform:_t}),{texture:Dt,offsetX:lt,offsetY:pt}}createStrokeGraphics(){var it,lt,pt,_t;const{id:Dt,geometry:Lt,lineStyle:$t}=this.json,{width:Xt,height:Yt,pivot:Zt}=Lt?.lineTransform||Rx,lr=Xt||this.json.width,xr=Yt||this.json.height,wr=((it=$t?.fill)===null||it===void 0?void 0:it.fillType)==="solidFill"?$t.fill.color:null;return $t&&((lt=$t.fill)===null||lt===void 0?void 0:lt.fillType)!=="noFill"?new Zw(Dt+"-path-graphics",this.ctx,(pt=Lt?.paths)!==null&&pt!==void 0?pt:[],(_t=Lt?.hash)!==null&&_t!==void 0?_t:"",Zt||{x:0,y:0},lr,xr,$t,!1,null,wr):null}createStrokeFill(){const[it,lt]=this.calculateFillObjectOffset(),{geometry:pt,lineStyle:_t,width:Dt,height:Lt}=this.json,$t=pt?.lineTransform||Rx,Xt=WS()(_t?.width)?_t.width:1;return new XS(this.ctx,_t?.fill,($t.width||Dt)+Xt+it,Math.max(($t.height||Lt)+Xt,lt),{useFilter:!0,useSlideBackgroundFill:!1})}createBackgroundGraphics(){var it;const{geometry:lt,lineStyle:pt,fillStyle:_t,id:Dt}=this.json,{width:Lt,height:$t,pivot:Xt}=lt?.lineTransform||Rx,Yt=Lt||this.json.width,Zt=$t||this.json.height,lr=_t?.fillType==="solidFill"?_t.color:null;return _t&&_t.fillType!=="noFill"||this.json.isPicture?new Zw(Dt+"-bg-graphics",this.ctx,(it=lt?.paths)!==null&&it!==void 0?it:[],lt?.hash||"",Xt||{x:0,y:0},Yt,Zt,pt,!0,lr,null):null}createBackgroundFill(){var it,lt,pt,_t;const{fillStyle:Dt,width:Lt,height:$t,lineStyle:Xt,geometry:Yt}=this.json,Zt=Yt?.fillTransform||Rx,lr={useFilter:!0,useSlideBackgroundFill:this.json.useBgFill,fillFloat:this.json.fillFloat,shapeRotation:this.json.rotation,groupRotation:this.option.groupRotation},xr=this.useGroupFill&&(!((it=this.option.groupSize)===null||it===void 0)&&it.w)?this.option.groupSize.w:Zt.width||Lt,wr=this.useGroupFill&&(!((lt=this.option.groupSize)===null||lt===void 0)&&lt.h)?this.option.groupSize.h:Zt.height||$t;return new XS(this.ctx,Dt,xr+((pt=Xt?.width)!==null&&pt!==void 0?pt:0),wr+((_t=Xt?.width)!==null&&_t!==void 0?_t:0),lr)}createBackground(){var it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr;const{pivot:wr,width:Ir,height:kr}=((it=this.json.geometry)===null||it===void 0?void 0:it.fillTransform)||Rx,{displayObject:Lr}=this.backgroundFill;Lr?(this.json.useBgFill&&(!((pt=this.backgroundGraphics)===null||pt===void 0)&&pt.displayObject)?(this.needCacheAsBitMap=!0,Lr.mask=this.backgroundGraphics.displayObject,Lr.pivot.x=((_t=this.json.position)===null||_t===void 0?void 0:_t.x)||0,Lr.pivot.y=((Dt=this.json.position)===null||Dt===void 0?void 0:Dt.y)||0,this.effectContainer.addChild(this.backgroundGraphics.displayObject)):((Lt=this.json.fillStyle)===null||Lt===void 0?void 0:Lt.fillType)==="gifFill"?(Lr.height=kr||this.designHeight,Lr.width=Ir||this.designWidth,Lr instanceof Uo&&Lr.play(),!(($t=this.backgroundGraphics)===null||$t===void 0)&&$t.isNeedMask(Lr.width,Lr.height)&&(Lr.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))):!((Xt=this.backgroundGraphics)===null||Xt===void 0)&&Xt.isNeedMask(Lr.width,Lr.height)&&(this.json.fillFloat||(this.needCacheAsBitMap=!0,Lr.mask=this.backgroundGraphics.displayObject,this.backgroundGraphics.displayObject&&this.effectContainer.addChild(this.backgroundGraphics.displayObject))),this.json.fillFloat||(Lr.x=wr.x,Lr.y=wr.y),this.useGroupFill&&(Lr.x-=(Zt=(Yt=this.json.position)===null||Yt===void 0?void 0:Yt.x)!==null&&Zt!==void 0?Zt:0,Lr.y-=(xr=(lr=this.json.position)===null||lr===void 0?void 0:lr.y)!==null&&xr!==void 0?xr:0),this.effectContainer.addChild(Lr)):this.backgroundFill.hasFill&&(!((lt=this.backgroundGraphics)===null||lt===void 0)&&lt.displayObject)&&this.effectContainer.addChild(this.backgroundGraphics.displayObject)}createPathFill(){var it,lt,pt;const{displayObject:_t}=this.strokeFill,Dt=(it=this.strokeGraphics)===null||it===void 0?void 0:it.displayObject,[Lt,$t]=this.calculateFillObjectOffset();_t?(!((lt=this.strokeGraphics)===null||lt===void 0)&&lt.isNeedMask(_t.width,_t.height)&&Dt&&(this.needCacheAsBitMap=!0,_t.pivot.x=Dt.pivot.x,_t.pivot.y=Dt.pivot.y,Dt.pivot.x=0,Dt.pivot.y=0,_t.mask=Dt,_t.addChild(Dt),_t.position.x=-Lt/2,_t.position.y=-$t/2,Dt.position.x=Lt/2,Dt.position.y=$t/2),this.effectContainer.addChild(_t)):this.strokeFill.hasFill&&(!((pt=this.strokeGraphics)===null||pt===void 0)&&pt.displayObject)&&this.effectContainer.addChild(this.strokeGraphics.displayObject)}createFilledPathMask(){var it,lt,pt;const _t=((lt=(it=this.json.geometry)===null||it===void 0?void 0:it.paths)===null||lt===void 0?void 0:lt.filter(Dt=>Dt.fill!=="none"&&Dt.fill!=="norm"))||[];for(const Dt of _t){const Lt=this.ctx.graphicsTexture.getGraphicsData(Dt.id);if(Lt){const $t=new _g(Lt.texture);$t.pivot.x=Lt.pivot.x,$t.pivot.y=Lt.pivot.y,$t.scale.x=Lt.scale,$t.scale.y=Lt.scale;const Xt=this.backgroundFill.getClonedDisplayObject(),Yt=(pt=this.backgroundGraphics)===null||pt===void 0?void 0:pt.getClonedDisplayObject(),Zt=Xt||Yt;Zt&&(this.backgroundFill.displayObject&&(Zt.pivot.x=this.backgroundFill.displayObject.pivot.x,Zt.pivot.y=this.backgroundFill.displayObject.pivot.y),Zt.mask=$t,Zt.filters=[YN[Dt.fill]],this.needCacheAsBitMap=!0,this.effectContainer.addChild(Zt),this.effectContainer.addChild($t))}}}createArrow(){this.arrowList.length&&this.arrowList.forEach(it=>{var lt;const pt=this.ctx.graphicsTexture.getGraphicsData(it.graphicsId);if(pt){const{texture:_t}=pt,Dt=new _g(_t);Dt.pivot.x=it.pivot.x,Dt.pivot.y=it.pivot.y,Dt.position.x=it.position.x,Dt.position.y=it.position.y,Dt.rotation=it.rotate/180*Math.PI,Dt.scale.x=pt.scale,Dt.scale.y=pt.scale,this.json.fillStyle&&this.json.fillStyle.fillType!=="noFill"?(lt=this.backgroundGraphics)===null||lt===void 0||lt.addArrows(Dt):this.effectContainer.addChild(Dt)}})}generateArrowList(){var it,lt;const{lineArrowList:pt,lineStyle:_t,id:Dt}=this.json,Lt=((it=_t?.fill)===null||it===void 0?void 0:it.fillType)==="solidFill"?_t.fill.color:null;(lt=pt||[])===null||lt===void 0||lt.forEach(($t,Xt)=>{var Yt,Zt,lr,xr,wr,Ir,kr,Lr;const Xr=new _P(Object.assign(Object.assign({},$t),{position:{x:$t.position.x-((lr=(Zt=(Yt=this.json.geometry)===null||Yt===void 0?void 0:Yt.lineTransform)===null||Zt===void 0?void 0:Zt.pivot.x)!==null&&lr!==void 0?lr:0),y:$t.position.y-((Ir=(wr=(xr=this.json.geometry)===null||xr===void 0?void 0:xr.lineTransform)===null||wr===void 0?void 0:wr.pivot.y)!==null&&Ir!==void 0?Ir:0)},fillStyle:_t?.fill,lineWidth:(kr=_t?.width)!==null&&kr!==void 0?kr:0}));Xr.graphicsId=`${Dt}-arrow-${Xt}-graphics`,Xr.textureId=`${Dt}-arrow-${Xt}-fill`,this.ctx.graphicsTexture.addGraphics(Xr.graphicsId,(Lr=Xr.paths)!==null&&Lr!==void 0?Lr:[],Xr.hash,{x:0,y:0},Xr.width,Xr.height,void 0,this.ctx.objectPoolGroup,!0,Lt,null),this.arrowList.push(Xr)})}calculateFillObjectOffset(){let[it,lt]=[0,0];return this.arrowList.length&&(it=this.arrowList.reduce((pt,_t)=>Math.max(pt,_t.width),0),lt=this.arrowList.reduce((pt,_t)=>Math.max(pt,_t.height),0)),[it,lt]}preRender(it){var lt,pt,_t;const{lineStyle:Dt,geometry:Lt}=this.json,{width:$t,height:Xt}=Lt?.lineTransform||Rx,Yt=$t||this.json.width,Zt=Xt||this.json.height,lr=((lt=Lt?.paths)===null||lt===void 0?void 0:lt.filter(wr=>wr.fill!=="none"&&wr.fill!=="norm"))||[],xr=((pt=Dt?.fill)===null||pt===void 0?void 0:pt.fillType)==="solidFill"?Dt.fill.color:null;it.addSubMTask(()=>fM(this,void 0,void 0,function*(){for(const wr of lr)this.ctx.graphicsTexture.addGraphics(wr.id,[wr],wr.hash,(Lt?.lineTransform||Rx).pivot,Yt,Zt,Dt,this.ctx.objectPoolGroup,!0,null,xr)}),"@ShapeImpl[addGraphics]"),(_t=this.text)===null||_t===void 0||_t.createParagraphs(this.json.id,it)}subClassRender(){return fM(this,void 0,void 0,function*(){})}render(it){it.addSubMTask(()=>fM(this,void 0,void 0,function*(){var lt,pt;(lt=this.strokeGraphics)===null||lt===void 0||lt.render(),(pt=this.backgroundGraphics)===null||pt===void 0||pt.render(),this.createBackground(),yield this.subClassRender(),this.createFilledPathMask(),this.createPathFill(),this.createArrow()}),"@ShapeImpl[render]"),this.text&&this.text.render(it),it.addSubMTask(()=>fM(this,void 0,void 0,function*(){var lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr,wr,Ir,kr,Lr,Xr,_n,On,Kn;if(((lt=this.json.textBody)===null||lt===void 0?void 0:lt.iterateType)==="wd"||((pt=this.json.textBody)===null||pt===void 0?void 0:pt.iterateType)==="lt"){if(this.renderContainer.addChild(this.container),this.text){const{x:Mn,y:ca}=(_t=this.json.scale)!==null&&_t!==void 0?_t:{x:1,y:1};this.text.container.scale.x=ca<0?-Math.abs(Mn):Math.abs(Mn),this.text.container.scale.y=ca,this.text.container.position.x=((Lt=(Dt=this.json.position)===null||Dt===void 0?void 0:Dt.x)!==null&&Lt!==void 0?Lt:0)+this.text.x,this.text.container.position.y=((Xt=($t=this.json.position)===null||$t===void 0?void 0:$t.y)!==null&&Xt!==void 0?Xt:0)+this.text.y,this.text.container.scale.y<0&&(this.text.container.position.y+=this.text.height),this.text.container.scale.x<0&&(this.text.container.position.x+=this.json.width),this.json.textRotation&&(this.text.container.rotation=this.json.textRotation),this.renderContainer.addChild(this.text.container)}}else{if(this.text){if(this.json.textRotation){this.text.container.rotation=this.json.textRotation;const{width:Qn,height:ks}=this.text,{x:Cs,y:gs}=this.text.container.position;this.text.container.pivot.x=Qn/2,this.text.container.pivot.y=ks/2,this.text.container.x=Cs+Qn/2,this.text.container.y=gs+ks/2}if(XN()(this.json.textRotateWithShape)&&!this.json.textRotateWithShape){const Qn=this.json.rotation||0;this.text.container.rotation=-Qn;const{width:ks}=this.text;this.text.container.position.x=ks}this.text.container.zIndex=100;const Mn=(Yt=this.json.effectList)===null||Yt===void 0?void 0:Yt.find(Qn=>Qn.type==="outerShadow"),ca=(Zt=this.json.effectList)===null||Zt===void 0?void 0:Zt.find(Qn=>Qn.type==="softEdge"),Gn=(lr=this.json.effectList)===null||lr===void 0?void 0:lr.find(Qn=>Qn.type==="glow");Mn&&Mn.sx!==1||ca||Gn?this.container.addChild(this.text.container):this.effectContainer.addChild(this.text.container)}this.renderContainer.addChild(this.container)}if(this.json.id==="background"&&this.ctx.hasBackgroundFillShape){const Mn=ps.p.create({width:this.json.width,height:this.json.height,resolution:Math.ceil(this.ctx.renderer.resolution)});this.ctx.renderer.render(this.renderContainer,{renderTexture:Mn}),this.ctx.bgTexture=Mn}if(((xr=this.json.fillStyle)===null||xr===void 0?void 0:xr.fillType)==="noFill"){const Mn=(Ir=(wr=this.json.effectList)===null||wr===void 0?void 0:wr.findIndex(ca=>ca.type==="innerShadow"))!==null&&Ir!==void 0?Ir:-1;Mn>=0&&((kr=this.json.effectList)===null||kr===void 0||kr.splice(Mn,1))}if(this.json.effectList&&this.json.effectList.length>0&&(!((Lr=this.ctx.featureList)===null||Lr===void 0)&&Lr.effect)&&!this.ctx.forceCanvas&&!this.json.media&&(this.effectObject=new mP(this.effectContainer,this.json.effectList,`${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`,this.ctx,this.json.rotation||0,new Ho.g(((Xr=this.json.scale)===null||Xr===void 0?void 0:Xr.x)||1,((_n=this.json.scale)===null||_n===void 0?void 0:_n.y)||1)),(function(Mn){var ca,Gn,Qn;return((ca=Mn.fillStyle)===null||ca===void 0?void 0:ca.fillType)==="gifFill"||((Qn=(Gn=Mn.lineStyle)===null||Gn===void 0?void 0:Gn.fill)===null||Qn===void 0?void 0:Qn.fillType)==="gifFill"||!!Mn.picFill&&Mn.picFill.fillType==="gifFill"})(this.json)&&this.effectObject.setFrameCount(-1),this.effectObject.on("ready",()=>{var Mn;this.effectContainer.visible=!1,this.effectObject.container.zIndex=10,this.container.addChild(this.effectObject.container),(Mn=this.effectObject)===null||Mn===void 0||Mn.updateFrame(1),this.applyEffectCacheAsBitMap(!0)})),(Kn=(On=this.json.scene3d)===null||On===void 0?void 0:On.camera)===null||Kn===void 0?void 0:Kn.rotation)try{const{latitude:Mn,longitude:ca,revolution:Gn}=this.json.scene3d.camera.rotation,Qn=(function(ws,oo){if(ws===0||oo===0)return 0;const no=HT.find(js=>js[0]===ws&&js[1]===oo);return no?no[2]*Math.PI/180:(function(js){if(js.length<4)return 0;let Ws=0;for(const Co of js)Ws+=Co[2];return Ws/js.length})(T1(HT,[ws,oo]))*Math.PI/180})(ca,Mn),{width:ks,height:Cs}=this.effectContainer;let gs=Math.cos(ca/180*Math.PI);const _s=Math.cos(Mn/180*Math.PI);Qn!==0&&(gs/=Math.cos(Qn)),this.effectContainer.scale.x*=gs,this.effectContainer.scale.y*=_s,this.effectContainer.skew.y=Qn,this.effectContainer.position.x+=(ks-this.effectContainer.width*Math.cos(Qn))/2;const Ts=this.effectContainer.height+this.effectContainer.width*Math.sin(Qn);this.effectContainer.position.y+=(Cs-Ts)/2,this.effectContainer.angle-=Gn}catch(Mn){this.ctx.logger.error("[ShapeImpl][render] 3d scene error: "+Mn.message,this.ctx.taskId)}}),"@ShapeImpl[post.render]")}applyEffectCacheAsBitMap(it){var lt,pt;((lt=this.json.fillStyle)===null||lt===void 0?void 0:lt.fillType)!=="gifFill"&&((pt=this.effectObject)===null||pt===void 0||pt.container.children.forEach(_t=>{_t.name!=="effect-sprite"&&(_t.cacheAsBitmap=it)}))}clearOnSlideChange(){}initOnReuse(){}destroy(){var it,lt,pt,_t;(it=this.text)===null||it===void 0||it.destroy(),this.fillColorFilter.destroy(),this.strokeColorFilter.destroy(),this.backgroundFill.destroy(),(lt=this.backgroundGraphics)===null||lt===void 0||lt.destroy(),this.strokeFill.destroy(),(pt=this.strokeGraphics)===null||pt===void 0||pt.destroy(),this.renderContainer.destroy(),(_t=this.arrowRenderTexture)===null||_t===void 0||_t.destroy(!0),this.arrowList=[],this.effectDisposer()}}var Sk=tt(119);const BI=new(tt.n(Sk)).a,wk=BI.getDevice(),xP=BI.getBrowser(),pM=BI.getOS(),WT={isDesktop(){let vt=!0;return wk.type==="mobile"&&(vt=!1),/Samsung/.test(xP.name||"")&&(vt=!1),window.__nativeTags&&window.__nativeTags.platform&&(vt=!1),vt},isIOS(){let vt=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^ios/i.test(window.__nativeTags.platform)&&(vt=!0),pM.name&&/iOS/.test(pM.name)&&(vt=!0),vt},isAndroid(){let vt=!1;return window.__nativeTags&&window.__nativeTags.platform&&/^android/i.test(window.__nativeTags.platform)&&(vt=!0),pM.name&&/android/i.test(pM.name)&&(vt=!0),vt},isLowGpuMemory(){var vt,it;const lt=(it=(vt=window.__nativeTags)===null||vt===void 0?void 0:vt.platform)!==null&&it!==void 0?it:"";if(lt){const pt=lt.split(" ");if(pt[1]){if(/^iPad/.test(pt[1])){const _t=pt[1].match(/^iPad(\d+)/);return!(_t&&_t[1]&&parseInt(_t[1],10)>=6)}if(/^iPhone/.test(pt[1])){const _t=pt[1].match(/^iPhone(\d+)/);return!(_t&&_t[1]&&parseInt(_t[1],10)>=9)}return!1}return!1}return!0}};var MC=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};function jv(vt,it){for(const lt in it)vt.style[lt]=it[lt]}const Px={medianContainerClass:"median-container",hoverHiddeDelay:1500,portalWidth:300,portalHeight:50,hiddenOpacity:"0",hoverOpacity:"1",opacityAnimationTime:.4};class dS{get clippedDuration(){return this.duration}constructor(it){var lt,pt;this.progress=document.createElement("div"),this.totalTime=document.createElement("span"),this.playButton=document.createElement("div"),this.pauseButton=document.createElement("div"),this.currentTime=document.createElement("span"),this.mediaController=document.createElement("div"),this.currentProgress=document.createElement("div"),this.fullScreenButton=document.createElement("div"),this.exitFullScreenButton=document.createElement("div"),this.medianIsEnd=!1,this.pickBookmarkIndex=0,this.playCallBackList=[],this.duration=0,this.isVideo=!1,this.start=0,this.end=0,this.fullscreenStatus=!1,this.fadeState={in:!1,out:!1},this.changeMediaProgress=_t=>{if(this.ctx.isPlayerPaused())return void this.ctx.logger.info("Media controller prevent seek event with paused state",this.ctx.taskId);_t.stopPropagation();const Dt=_t.offsetX/this.progress.clientWidth*this.duration;this.medianIsEnd=!1,this.ctx.mode!=="interactive"&&this.jumpToTime(Dt),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(pu.mediaSeek,{id:this.targetId,time:Dt,isPlaying:this.media.isPlaying}),this.delayHide()},this.jumpToTime=(_t=0)=>MC(this,void 0,void 0,function*(){yield tA(()=>!!this.duration,3e3);const Dt=Math.floor(_t)+this.start;this.media.currentTime!==Dt&&(this.media.currentTime=Dt,this.changeBookmarkIndex(Dt,Dt>this.media.currentTime))}),this.showController=_t=>{_t.stopPropagation(),this.show()},this.getMediaDuration=()=>{this.duration&&!Number.isNaN(this.duration)||(this.duration=this.media.duration,this.start&&(this.duration-=this.start,this.jumpToTime()),this.end&&(this.duration-=this.end)),this.totalTime.innerText=dS.formatTime(this.duration)},this.playMedia=()=>MC(this,void 0,void 0,function*(){this.playButton.style.display="none",this.pauseButton.style.display="block",yield this.media.play(),this.medianIsEnd&&(this.medianIsEnd=!1,this.jumpToTime()),this.playCallBackList.forEach(_t=>{_t()}),this.delayHide()}),this.pauseMedia=()=>MC(this,void 0,void 0,function*(){this.playButton.style.display="block",this.pauseButton.style.display="none",yield this.media.pause()}),this.onMouseOut=_t=>{_t.stopPropagation(),this.hide()},this.mediaTimeUpdate=()=>MC(this,void 0,void 0,function*(){const _t=this.media.currentTime-this.start;if(console.log(_t,this.duration),this.duration<.5?this.duration>0&&_t>=this.duration&&(yield this.pauseMedia(),this.medianIsEnd=!0,this.jumpToTime(),this.ctx.eventHub.emit(pu.mediaStop,{id:this.targetId}),this.onClickCancelFullScreenButtonHandle()):this.duration>0&&(Math.abs(_t-this.duration)<.3||_t>this.duration)&&(yield this.pauseMedia(),this.medianIsEnd=!0,this.jumpToTime(),this.ctx.eventHub.emit(pu.mediaStop,{id:this.targetId}),this.onClickCancelFullScreenButtonHandle()),this.currentTime.innerText=dS.formatTime(_t),this.currentProgress.style.flex=(_t/this.duration).toString(),this.bookmarkList&&this.bookmarkList.length>0){const Dt=this.bookmarkList[this.pickBookmarkIndex];Dt&&Dt.time.toFixed(0)===this.media.currentTime.toFixed(0)&&(this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${Dt.name}`),this.pickBookmarkIndex+=1)}this.fadeHit(_t)}),this.onPauseMedia=()=>{this.playButton.style.display="block",this.pauseButton.style.display="none"},this.onPlayMedia=()=>{this.fadeState={in:!1,out:!1},this.fadeHit(0),this.playButton.style.display="none",this.pauseButton.style.display="block",this.playCallBackList.forEach(_t=>{_t()}),this.media.currentTime<this.start&&this.jumpToTime()},this._playMediaFromCtrl=()=>{this.playMediaFromCtrl(!1)},this._pauseMediaFromCtrl=()=>{this.pauseMediaFromCtrl(!1),this.delayHide()},this.onClickFullScreenButtonHandle=()=>{this.fullscreenPlay()},this.onClickCancelFullScreenButtonHandle=()=>{this.fullscreenStatus=!1,this.media.requestCancelFullscreen(),this.ctx.eventHub.emit(pu.fullscreenChange,{targetId:this.targetId,state:!1}),this.delayHide()},this.onFullScreenChange=_t=>{const{status:Dt,targetId:Lt,slideIndex:$t}=_t;this.changeFullScreenState(Dt,Lt,$t),this.delayHide()},this.onContainerSizeChange=()=>{this.setControllerPosition()},this.onControllerShowStatusChange=({slideIndex:_t,targetId:Dt,status:Lt})=>{if(_t===this.ctx.slideIndex){if(this.targetId===Dt){const{hiddenOpacity:$t,hoverOpacity:Xt}=Px;Lt?(this.mediaController.style.opacity=Xt,this.mediaController.style.display="flex"):this.mediaController.style.opacity=$t}this.delayHide()}},this.targetId=it.targetId,this.ctx=it.ctx,this.height=it.height,this.width=it.width,this.target=it.target,this.media=it.media,this.info=it.info,this.shapeId=it.shapeId,this.canvasElement=it.canvasElement,this.media.type==="video"&&(this.isVideo=!0),this.getMedianContainer(),this.createMediaController(),this.info.cut&&(this.start=(lt=this.info.cut.start)!==null&&lt!==void 0?lt:0,this.end=(pt=this.info.cut.end)!==null&&pt!==void 0?pt:0),this.info.bookmarkList&&(this.bookmarkList=this.info.bookmarkList.sort((_t,Dt)=>_t.time-Dt.time)),this.ctx.globalEventHub.on("togglePlayStatus",_t=>{_t===this.targetId&&(this.media.isPlaying?this.pauseMediaFromCtrl(!1):this.playMediaFromCtrl(!1))})}getMedianContainer(){var it;const{medianContainerClass:lt}=Px;let pt=(it=this.canvasElement.parentElement)===null||it===void 0?void 0:it.querySelector("."+lt);pt||(pt=document.createElement("div"),pt.className=lt,this.canvasElement.parentElement.appendChild(pt)),this.container=pt}static formatTime(it){let lt="00:00";if(it){const pt=Math.floor(it/60),_t=String(pt<0?0:pt).padStart(2,"0"),Dt=Math.floor(it%60);lt=`${_t}:${String(Dt<0?0:Dt).padStart(2,"0")}`}return lt}generatePlayButton(it=20,lt=20){const pt=document.createElementNS("http://www.w3.org/2000/svg","svg");pt.setAttributeNS(null,"viewBox","0 0 512 512"),pt.setAttributeNS(null,"height",it.toString()),pt.setAttributeNS(null,"width",lt.toString());const _t=document.createElementNS("http://www.w3.org/2000/svg","polyline");return _t.setAttributeNS(null,"points","35 0, 477 256, 35 512"),_t.setAttributeNS(null,"fill","#000000"),pt.appendChild(_t),pt}generatePauseButton(it=20,lt=20){const pt=document.createElementNS("http://www.w3.org/2000/svg","svg");jv(pt,{height:it+"px"}),pt.setAttributeNS(null,"viewBox","0 0 512 512"),pt.setAttributeNS(null,"height",it.toString()),pt.setAttributeNS(null,"width",lt.toString());const _t=document.createElementNS("http://www.w3.org/2000/svg","rect");_t.setAttributeNS(null,"x","35"),_t.setAttributeNS(null,"y","0"),_t.setAttributeNS(null,"width","148"),_t.setAttributeNS(null,"height","512");const Dt=_t.cloneNode(!0);return Dt.setAttributeNS(null,"x","330"),pt.append(_t,Dt),pt}generateFullScreenButton(it=20,lt=20){const pt=document.createElementNS("http://www.w3.org/2000/svg","svg");jv(pt,{height:it+"px",width:lt+"px"}),pt.setAttributeNS(null,"width",lt.toString()),pt.setAttributeNS(null,"height",it.toString()),pt.setAttributeNS(null,"viewBox","0 0 1024 1024");const _t=document.createElementNS("http://www.w3.org/2000/svg","path");return _t.setAttributeNS(null,"d","M918.116352 107.409408c10.186752 10.175488 10.186752 26.691584 0 36.87936L653.734912 407.038976c-10.187776 10.187776-26.703872 10.187776-36.891648 0-10.175488-10.187776-10.175488-26.703872 0.013312-36.891648l264.38144-262.73792c10.174464-10.187776 26.69056-10.200064 36.87936-0.013312L918.117376 107.409408zM878.281728 148.096l-161.155072-0.44544c-11.283456 0.279552-20.85888-8.226816-21.90336-19.458048l0-13.421568c0.318464-10.671104 8.889344-19.241984 19.560448-19.560448l187.030528 0.827392c0.1792-0.037888 0.357376-0.0768 0.523264-0.089088l9.549824-0.229376c5.005312-0.152576 9.843712 1.770496 13.372416 5.336064 3.32288 3.629056 4.9664 8.49408 4.545536 13.40928l-1.032192 9.537536c0 0.191488 0.70144 0.318464 0.70144 0.49664l-0.534528 188.279808c-0.54784 9.984-9.092096 17.637376-19.076096 17.089536-0.165888-0.012288-0.319488-0.0256-0.484352-0.037888L896.009216 329.8304c-10.379264-0.0512-18.733056-8.506368-18.681856-18.885632 0.013312-0.191488 0.013312-0.381952 0.013312-0.585728L878.281728 148.096zM105.884672 916.661248c-10.187776-10.175488-10.200064-26.691584-0.013312-36.87936 0 0 0-0.013312 0.013312-0.013312l265.19552-262.73792c10.35264-10.008576 26.86976-9.729024 36.866048 0.636928 9.766912 10.110976 9.766912 26.131456 0 36.242432L143.579136 916.661248C133.072896 926.848 116.3776 926.848 105.884672 916.661248L105.884672 916.661248zM146.533376 875.973632l161.154048 0.433152c11.283456-0.292864 20.85888 8.213504 21.891072 19.458048l0 13.38368c-0.292864 10.672128-8.876032 19.255296-19.560448 19.561472l-187.858944-0.828416c-0.165888 0.037888-0.344064 0.075776-0.509952 0.089088l-9.550848 0.229376c-5.004288 0.152576-9.831424-1.782784-13.35808-5.336064-3.323904-3.629056-4.979712-8.493056-4.54656-13.395968l1.031168-9.537536c0-0.191488-0.712704-0.330752-0.700416-0.509952l0.534528-188.278784c0.534528-9.984 9.066496-17.625088 19.050496-17.089536 0.165888 0.013312 0.330752 0.0256 0.508928 0.037888l14.212096 0c10.365952 0.0512 18.719744 8.507392 18.656256 18.873344 0 0.191488 0 0.395264-0.013312 0.598016L146.533376 875.973632zM918.116352 916.661248c10.186752-10.175488 10.200064-26.691584 0.012288-36.87936 0 0 0-0.013312-0.012288-0.013312l-264.38144-262.73792c-10.365952-10.008576-26.86976-9.729024-36.87936 0.636928-9.766912 10.110976-9.766912 26.131456 0 36.242432L881.22368 916.661248c10.186752 10.186752 26.703872 10.186752 36.891648 0.013312L918.115328 916.661248 918.116352 916.661248zM878.281728 875.973632l-161.168384 0.433152c-11.270144-0.292864-20.845568 8.213504-21.890048 19.458048l0 13.38368c0.306176 10.672128 8.889344 19.241984 19.560448 19.561472l187.030528-0.828416c0.1792 0.037888 0.357376 0.075776 0.523264 0.089088l9.549824 0.229376c5.005312 0.152576 9.843712-1.782784 13.372416-5.336064 3.32288-3.629056 4.978688-8.493056 4.545536-13.395968l-1.032192-9.537536c0-0.191488 0.70144-0.330752 0.70144-0.509952l-0.534528-188.278784c-0.54784-9.984-9.092096-17.637376-19.076096-17.089536-0.165888 0.013312-0.319488 0.0256-0.484352 0.037888L896.009216 694.19008c-10.379264 0.0512-18.733056 8.507392-18.681856 18.885632 0 0.191488 0.013312 0.381952 0.013312 0.584704L878.281728 875.973632zM105.884672 107.409408c-10.187776 10.175488-10.187776 26.691584 0 36.87936l265.19552 262.750208c10.187776 10.187776 26.691584 10.187776 36.87936 0s10.175488-26.703872-0.012288-36.891648l-264.368128-262.73792C133.072896 97.222656 116.3776 97.222656 105.884672 107.409408L105.884672 107.409408zM146.533376 148.096l161.154048-0.44544c11.283456 0.292864 20.85888-8.213504 21.891072-19.458048l0-13.421568c-0.306176-10.671104-8.889344-19.241984-19.560448-19.560448l-187.858944 0.827392c-0.165888-0.0512-0.344064-0.0768-0.509952-0.089088l-9.550848-0.229376c-5.004288-0.152576-9.831424 1.782784-13.35808 5.336064-3.323904 3.629056-4.979712 8.49408-4.54656 13.40928l1.031168 9.537536c0 0.191488-0.712704 0.318464-0.700416 0.49664l0.534528 188.279808c0.534528 9.970688 9.066496 17.624064 19.050496 17.089536 0.165888-0.012288 0.330752-0.0256 0.508928-0.037888l14.212096 0c10.365952-0.0512 18.719744-8.506368 18.656256-18.87232 0-0.191488 0-0.395264-0.013312-0.598016L146.533376 148.096z"),pt.appendChild(_t),document.body.appendChild(pt),pt}generateExitFullScreenButton(it=20,lt=20){const pt=document.createElementNS("http://www.w3.org/2000/svg","svg");jv(pt,{height:it+"px",width:lt+"px"}),pt.setAttributeNS(null,"width",lt.toString()),pt.setAttributeNS(null,"height",it.toString()),pt.setAttributeNS(null,"viewBox","0 0 1024 1024");const _t=document.createElementNS("http://www.w3.org/2000/svg","path"),Dt=document.createElementNS("http://www.w3.org/2000/svg","path");return _t.setAttributeNS(null,"d","M716.8 998.4a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 0 1 25.6-25.6h256a25.6 25.6 0 1 1 0 51.2h-230.4v230.4a25.6 25.6 0 0 1-25.6 25.6zM307.2 998.4a25.6 25.6 0 0 1-25.6-25.6v-230.4H51.2a25.6 25.6 0 1 1 0-51.2h256a25.6 25.6 0 0 1 25.6 25.6v256a25.6 25.6 0 0 1-25.6 25.6zM972.8 332.8h-256a25.6 25.6 0 0 1-25.6-25.6v-256a25.6 25.6 0 1 1 51.2 0v230.4h230.4a25.6 25.6 0 1 1 0 51.2zM307.2 332.8h-256a25.6 25.6 0 1 1 0-51.2h230.4V51.2a25.6 25.6 0 1 1 51.2 0v256a25.6 25.6 0 0 1-25.6 25.6z"),Dt.setAttributeNS(null,"d","M307.2 332.8a25.6 25.6 0 0 1-18.112-7.488L56.896 93.12a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192A25.6 25.6 0 0 1 307.2 332.8zM716.8 332.8a25.6 25.6 0 0 1-18.112-43.712L930.88 56.896a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488zM948.992 974.592a25.6 25.6 0 0 1-18.112-7.488l-232.192-232.192a25.6 25.6 0 0 1 36.224-36.224l232.192 232.192a25.6 25.6 0 0 1-18.112 43.712zM75.008 974.592a25.6 25.6 0 0 1-18.112-43.712l232.192-232.192a25.6 25.6 0 0 1 36.224 36.224l-232.192 232.192a25.472 25.472 0 0 1-18.112 7.488z"),pt.appendChild(_t),pt.appendChild(Dt),document.body.appendChild(pt),pt}createButton(){const it={marginLeft:"15px",marginRight:"10px",fontSize:"0",height:"20px",display:"flex",justifyContent:"center",alignItems:"center"};jv(this.playButton,Object.assign(Object.assign({},it),{display:"block"}));const lt=this.generatePlayButton();jv(lt,{height:"20px"}),this.playButton.appendChild(lt),jv(this.pauseButton,Object.assign(Object.assign({},it),{display:"none"}));const pt=this.generatePauseButton();if(jv(pt,{height:"20px"}),this.pauseButton.appendChild(pt),!this.isVideo)return;const _t=this.generateFullScreenButton(20,20);this.fullScreenButton.appendChild(_t),jv(this.fullScreenButton,Object.assign(Object.assign({},it),{display:"block"}));const Dt=this.generateExitFullScreenButton(20,20);this.exitFullScreenButton.appendChild(Dt),jv(this.exitFullScreenButton,Object.assign(Object.assign({},it),{display:"none"}))}createTimer(){const it=document.createElement("div");jv(it,{width:"100px"}),this.currentTime.innerText="00:00";const lt=document.createElement("span");return lt.innerText="/",it.append(this.currentTime,lt,this.totalTime),it}createProgress(){const it={flex:"1",position:"relative"};this.isVideo||(it.marginRight="10px"),jv(this.progress,it);const lt=document.createElement("div");jv(lt,{background:"#D9D9D9",position:"relative",height:"10px",display:"flex"}),this.progress.appendChild(lt),jv(this.currentProgress,{background:"#4F4F4F",top:"0px",left:"0",height:"10px",flex:"0"}),lt.appendChild(this.currentProgress)}fadeHit(it){if(!this.info.fade)return;const{start:lt,end:pt}=this.info.fade;lt&&!this.fadeState.in&&it>=0&&(this.fadeState.in=!0,this.media.fadeIn(0,lt)),pt&&!this.fadeState.out&&it>=this.duration-pt/1e3&&(this.fadeState.out=!0,this.media.fadeOut(0,pt))}changeBookmarkIndex(it,lt){if(this.bookmarkList&&this.bookmarkList.length!==0){if(this.pickBookmarkIndex>0){for(let pt=0;pt<this.pickBookmarkIndex;pt++)if(this.bookmarkList[pt].time>it){this.pickBookmarkIndex=pt;break}}if(lt){let pt=this.pickBookmarkIndex-1;for(let _t=0;_t<this.bookmarkList.length;_t++)this.bookmarkList[_t].time<it&&(pt=_t);for(let _t=this.pickBookmarkIndex;_t<=pt;_t++){const Dt=this.bookmarkList[_t];Dt&&this.ctx.timingEventHub.emit(`shape ${this.shapeId} onMediaBookmark ${Dt.name}`)}this.pickBookmarkIndex=pt+1}}}playMediaFromCtrl(it){this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent play event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.playMedia(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(pu.mediaPlay,{id:this.targetId,time:this.media.currentTime-this.start,_stateOnly:it}))}pauseMediaFromCtrl(it){this.ctx.isPlayerPaused()?this.ctx.logger.info("Media controller prevent pause event with paused state",this.ctx.taskId):(this.ctx.mode!=="interactive"&&this.pauseMedia(),this.ctx.mode==="local"||this.ctx.isRendering||this.ctx.eventHub.emit(pu.mediaPause,{id:this.targetId,time:this.media.currentTime-this.start,_stateOnly:it}))}setControllerPosition(){var it;const{target:lt}=this,{portalWidth:pt,portalHeight:_t}=Px,{stageWidth:Dt,stageHeight:Lt}=this.ctx,$t=lt.getGlobalPosition(),Xt=Number((it=this.container)===null||it===void 0?void 0:it.getAttribute("data-scale")),Yt=Dt*Xt,Zt=1/Xt*(pt>Yt?Yt/pt:1);$t.y=$t.y+this.height-_t,$t.x=Math.max($t.x,0),$t.x=Math.min($t.x,Dt-pt*Zt),$t.y=Math.max($t.y,0),$t.y=Math.min($t.y,Lt-_t),jv(this.mediaController,{height:_t+"px",borderRadius:_t/2+"px",width:pt+"px",flexDirection:"row",alignItems:"center",position:"absolute",left:$t.x+"px",top:$t.y+"px",background:"#fff",zIndex:"2",border:"1px solid #ccc",transform:`scale(${Zt})`,transformOrigin:"0 100%"}),this.fullscreenStatus&&jv(this.mediaController,{left:"0",top:Lt-_t+"px"})}createMediaController(){this.setControllerPosition(),jv(this.mediaController,{display:"none",transition:`opacity ${Px.opacityAnimationTime}s`}),this.createButton();const it=this.createTimer();this.createProgress(),this.mediaController.append(this.playButton,this.pauseButton,it,this.progress),this.isVideo&&this.mediaController.append(this.fullScreenButton,this.exitFullScreenButton),this.container.appendChild(this.mediaController),this.bindEvent()}addPlayCallBack(it){this.playCallBackList.push(it)}fullscreenPlay(){this.fullscreenStatus=!0,this.ctx.mode!=="interactive"&&this.media.requestFullscreen(),this.ctx.mode!=="local"&&this.ctx.eventHub.emit(pu.fullscreenChange,{targetId:this.targetId,state:!0}),this.delayHide()}changeFullScreenState(it,lt,pt){pt===this.ctx.slideIndex&&(it&&this.targetId===lt?this.fullscreenStatus=it:this.fullscreenStatus=!1,this.fullscreenStatus?(this.fullScreenButton.style.display="none",this.exitFullScreenButton.style.display="block"):(this.fullScreenButton.style.display="block",this.exitFullScreenButton.style.display="none"),this.setControllerPosition())}bindEvent(){WT.isDesktop()&&(this.mediaController.addEventListener("mouseout",this.onMouseOut,!1),this.mediaController.addEventListener("mouseover",this.showController,!1)),this.progress.addEventListener("click",this.changeMediaProgress,!1),this.playButton.addEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.addEventListener("click",this._pauseMediaFromCtrl,!1),this.media.on("durationchange",this.getMediaDuration,!1),this.media.on("timeupdate",this.mediaTimeUpdate,!1),this.media.on("pause",this.onPauseMedia,!1),this.media.on("play",this.onPlayMedia,!1),this.containerObserver=new MutationObserver(this.onContainerSizeChange),this.container&&this.containerObserver.observe(this.container,{attributes:!0,attributeFilter:["data-scale","style"]}),this.isVideo&&(this.ctx.globalEventHub.on("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.on("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.addEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.addEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}unbindEvent(){var it;WT.isDesktop()&&(this.mediaController.removeEventListener("mouseout",this.onMouseOut,!1),this.mediaController.removeEventListener("mouseover",this.showController,!1)),this.progress.removeEventListener("click",this.changeMediaProgress,!1),this.playButton.removeEventListener("click",this._playMediaFromCtrl,!1),this.pauseButton.removeEventListener("click",this._pauseMediaFromCtrl,!1),this.media.removeAllListeners(),(it=this.containerObserver)===null||it===void 0||it.disconnect(),this.isVideo&&(this.ctx.globalEventHub.removeListener("onFullscreenChange",this.onFullScreenChange),this.ctx.globalEventHub.removeListener("controllerShowStatusChange",this.onControllerShowStatusChange),this.fullScreenButton.removeEventListener("click",this.onClickFullScreenButtonHandle,!1),this.exitFullScreenButton.removeEventListener("click",this.onClickCancelFullScreenButtonHandle,!1))}show(){this.setControllerPosition(),this.mediaController.style.opacity=Px.hoverOpacity,this.fullscreenStatus||(this.mediaController.style.display="flex"),this.delayHide()}hide(){this.fullscreenStatus?this.mediaController.style.opacity=Px.hiddenOpacity:this.mediaController.style.display="none"}delayHide(){clearTimeout(this.autoHiddenTimer),this.autoHiddenTimer=setTimeout(()=>{this.hide()},Px.hoverHiddeDelay)}destroy(){var it;this.unbindEvent(),this.playCallBackList=[],(it=this.container)===null||it===void 0||it.removeChild(this.mediaController)}}var Y_=tt(120);class IC extends em.a{constructor(it,lt,pt,_t){var Dt,Lt;super(),this.isGlobalPause=!1,this.lastTime=-1,this.howl=null,this.rctClient=null,this.domAudio=null,this.pcmSource=null,this.isHowlEnd=!1,this.isHowlLoadEmit=!1,this.staticEventId=1001,this._catParams=void 0,this.isDomAudioPlayed=!1,this.domAudioRemainSeek=[],this.url=it,this.runningAudio=lt,pt&&(this._catParams=pt),C_.RtcAudioClazz?(this.rctClient=new C_.RtcAudioClazz(it,(Dt=this._catParams)===null||Dt===void 0?void 0:Dt.start,(Lt=this._catParams)===null||Lt===void 0?void 0:Lt.end),this.rctClient.on("load",()=>this.emit("load")),this.rctClient.on("pause",()=>this.emit("pause")),this.rctClient.on("play",()=>{this.startTimeChangeEmit(),this.emit("play")}),this.rctClient.on("resumeAllAudioInterruptByAudioSessionChanged",()=>{this.emit("resumeAllAudioInterruptByAudioSessionChanged")})):window.__pcmProxy?(this.domAudio=document.createElement("audio"),this.domAudio.src=it,this.domAudio.crossOrigin="anonymous",this.domAudio.addEventListener("pause",()=>{this.emit("pause")}),this.pcmSource=window.__pcmProxy.connect(this.domAudio),this.domAudio.addEventListener("loadedmetadata",()=>{this.emit("load")}),this.domAudio.addEventListener("playing",()=>{this.isDomAudioPlayed=!0,this.domAudioRemainSeek.length>0&&this.domAudio&&(this.domAudio.currentTime=this.domAudioRemainSeek[this.domAudioRemainSeek.length-1]),this.startTimeChangeEmit(),this.emit("play")})):(this.howl=new Y_.Howl({src:[it],html5:_t?.enableWebAudio}),[this.staticEventId]=this.howl._getSoundIds(),this.howl.load(),this.howl.on("load",()=>{this.isHowlLoadEmit=!0,this.emit("load")}),this.howl.on("pause",()=>this.emit("pause")),this.howl.on("play",()=>{this.isHowlLoadEmit||this.emit("load"),this.isHowlEnd=!1,this.startTimeChangeEmit(),this.emit("play")}),this.howl.on("end",()=>{this.isHowlEnd=!0}))}startTimeChangeEmit(){this.currentTime!==this.lastTime&&(this.lastTime=this.currentTime,this.emit("timeupdate",this.lastTime)),this.isPaused||setTimeout(()=>{this.isPaused||this.startTimeChangeEmit()},300)}isUsedRemixAudio(){return!!this.rctClient||!!this.domAudio}play(){var it,lt,pt,_t;this.runningAudio.has(this.url)&&((it=this.runningAudio.get(this.url))===null||it===void 0||it.stop(),this.runningAudio.delete(this.url)),this.isHowlEnd=!1,this.lastTime=-1,(lt=this.howl)===null||lt===void 0||lt.play(this.staticEventId),(pt=this.rctClient)===null||pt===void 0||pt.play(),(_t=this.domAudio)===null||_t===void 0||_t.play(),this.runningAudio.set(this.url,this)}fade(it,lt,pt){this.howl&&this.howl.fade(it,lt,pt)}pause(){var it,lt,pt;(it=this.howl)===null||it===void 0||it.pause(this.staticEventId),(lt=this.rctClient)===null||lt===void 0||lt.pause(),(pt=this.domAudio)===null||pt===void 0||pt.pause(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}globalPause(){this.isPaused||(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}stop(){var it,lt;(it=this.howl)===null||it===void 0||it.pause(this.staticEventId),(lt=this.domAudio)===null||lt===void 0||lt.pause(),this.rctClient&&(this.rctClient.pause(),this.rctClient.currentTime=0),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}destroy(){var it,lt,pt,_t,Dt,Lt,$t,Xt,Yt;(it=this.howl)===null||it===void 0||it.stop(this.staticEventId),(lt=this.howl)===null||lt===void 0||lt.unload(),(pt=this.rctClient)===null||pt===void 0||pt.pause(),(_t=this.rctClient)===null||_t===void 0||_t.destroy(),(Dt=this.rctClient)===null||Dt===void 0||Dt.removeAllListeners("load"),(Lt=this.rctClient)===null||Lt===void 0||Lt.removeAllListeners("play"),($t=this.rctClient)===null||$t===void 0||$t.removeAllListeners("pause"),(Xt=this.rctClient)===null||Xt===void 0||Xt.removeAllListeners("resumeAllAudioInterruptByAudioSessionChanged"),(Yt=this.pcmSource)===null||Yt===void 0||Yt.disconnect(),this.runningAudio.has(this.url)&&this.runningAudio.delete(this.url)}get currentTime(){return this.rctClient?this.rctClient.currentTime:this.howl?this.howl.seek(this.staticEventId):this.domAudio?this.domAudio.currentTime:-1}set currentTime(it){this.rctClient?this.rctClient.currentTime=it:this.howl?this.howl.seek(it,this.staticEventId):this.domAudio&&(this.isDomAudioPlayed?this.domAudio.currentTime=it:this.domAudioRemainSeek.push(it))}get duration(){return this.rctClient?this.rctClient.duration:this.howl?this.howl.duration(this.staticEventId):this.domAudio?this.domAudio.duration:0}get isPaused(){return this.rctClient?this.rctClient.isPaused:this.howl?!this.howl.playing(this.staticEventId):!!this.domAudio&&this.domAudio.paused}volume(it){this.rctClient?this.rctClient.volume(it):this.howl?this.howl.volume(it):this.domAudio&&(this.domAudio.volume=it)}}var jI=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class mM extends em.a{get videoElement(){return this.videoResource.source}get isUsedRemixAudio(){var it,lt;return(lt=(it=this.rtcAudio)===null||it===void 0?void 0:it.isUsedRemixAudio())!==null&&lt!==void 0&&lt}get currentTime(){var it,lt;return(lt=(it=this.videoElement)===null||it===void 0?void 0:it.currentTime)!==null&&lt!==void 0?lt:0}set currentTime(it){this.videoElement&&(this.videoElement.currentTime=it),this.rtcAudio&&(this.rtcAudio.currentTime=it)}get paused(){var it,lt;return(lt=(it=this.videoElement)===null||it===void 0?void 0:it.paused)===null||lt===void 0||lt}get duration(){var it,lt;return(lt=(it=this.videoElement)===null||it===void 0?void 0:it.duration)!==null&&lt!==void 0?lt:0}get clippedDuration(){return this.controller.clippedDuration}constructor(it){var lt,pt,_t,Dt,Lt,$t,Xt;super(),this.type="video",this.sprite=new _g,this.rtcAudio=null,this.isPlaying=!1,this.isGlobalPause=!1,this.fullscreen=!1,this.url="",this.isLoaded=!1,this.onVideoResourceLoaded=()=>{this.isLoaded=!0},this.onVideoStalled=()=>{this.ctx.logger.warn(this.url+", Failed to fetch data, but trying.",this.ctx.taskId)},this.updateVolume=Lr=>{var Xr;(Xr=this.rtcAudio)===null||Xr===void 0||Xr.volume(Lr),this.videoElement&&(this.videoElement.volume=Lr)},this.syncFullscreenVideoState=Lr=>{const{targetId:Xr,state:_n,slideIndex:On}=Lr;On===this.ctx.slideIndex&&Xr===this.id&&(_n?(this.requestFullscreen(),this.ctx.latestChangeFullscreenTargetId=Xr):this.requestCancelFullscreen())},this.id=it.id,this.start=(lt=it.video.cut)===null||lt===void 0?void 0:lt.start,this.end=(pt=it.video.cut)===null||pt===void 0?void 0:pt.end,this.fullscreen=(_t=it.video.fullscreen)!==null&&_t!==void 0&&_t,this.container=it.container,this.ctx=it.ctx,this.ctx.medias[this.id]=this;const Yt=it.video.src;this.videoResource=new ps.w(Yt,{autoLoad:!0,autoPlay:!1,updateFPS:30,crossorigin:!0}),(Dt=this.videoElement)===null||Dt===void 0||Dt.addEventListener("stalled",this.onVideoStalled),(Lt=this.videoElement)===null||Lt===void 0||Lt.addEventListener("loadedmetadata",this.onVideoResourceLoaded),this.url=it.video.src;let Zt=it.video.src.replace(/4$/,"3");this.ctx.loaderDelegate&&(Zt=this.ctx.loaderDelegate.redirectMedia(Zt),this.ctx.logger.info(`redirect media url from ${it.video.src.replace(/4$/,"3")} to ${Zt} by delegate.`,it.ctx.taskId)),this.rtcAudio=new IC(Zt,it.ctx.runningAudio,{start:($t=it.video.cut)===null||$t===void 0?void 0:$t.start,end:(Xt=it.video.cut)===null||Xt===void 0?void 0:Xt.end},{enableWebAudio:it.ctx.enableWebAudio}),this.rtcAudio.on("timeupdate",Lr=>{if(this.videoElement){const Xr=this.videoElement.currentTime;Math.abs(Xr-Lr)>.5&&(this.videoElement.currentTime=Lr)}}),this.rtcAudio.on("resumeAllAudioInterruptByAudioSessionChanged",()=>{var Lr;(Lr=this.videoElement)===null||Lr===void 0||Lr.pause(),setTimeout(()=>{var Xr,_n;!((Xr=this.rtcAudio)===null||Xr===void 0)&&Xr.isPaused||(_n=this.videoElement)===null||_n===void 0||_n.play()},200)});const{video:lr,width:xr,height:wr,target:Ir}=it;this.controller=new dS({targetId:it.id,shapeId:it.shapeId,ctx:it.ctx,width:xr,height:wr,target:Ir,media:this,info:lr,canvasElement:it.canvasElement}),this.controller.addPlayCallBack(()=>{this.sprite.width=xr,this.sprite.height=wr,this.ctx.clock.setTimeout(()=>{this.sprite.visible=!0},50)});const kr=new ps.c(null,{height:wr,width:xr});kr.resource=this.videoResource,this.videoResource.bind(kr),this.sprite=new _g,this.sprite.visible=!1,this.sprite.texture=new ps.t(kr),this.sprite.interactive=!0,this.container.addChild(this.sprite),this.sprite.on("mouseover",Lr=>{Lr.stopPropagation(),this.controller.show()}),this.sprite.on("mouseout",Lr=>{Lr.stopPropagation(),this.controller.hide()}),["durationchange","timeupdate","pause","play"].forEach(Lr=>{var Xr;(Xr=this.videoElement)===null||Xr===void 0||Xr.addEventListener(Lr,()=>{Lr==="timeupdate"&&this.isPlaying,this.emit(Lr)})}),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume),this.ctx.globalEventHub.on("syncFullscreenVideoState",this.syncFullscreenVideoState)}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return jI(this,void 0,void 0,function*(){this.isPlaying=!0,this.updateVolume(this.ctx.volumeAdjuster.volume),yield this.load(),yield this.ctx.clock.waitUntil(()=>{const lt=this.videoElement;return!!(lt&&lt.videoWidth>0)},3e3);const it=this.videoElement;it&&it.videoWidth<=0||(this.videoElement&&(this.videoElement.volume=0,this.videoElement.muted=!0),this.rtcAudio?(this.rtcAudio.on("play",()=>{var lt;(lt=this.videoElement)===null||lt===void 0||lt.play(),this.fullscreen&&this.controller.fullscreenPlay()}),this.rtcAudio.play()):this.videoElement&&(this.videoElement.addEventListener("playing",()=>{this.fullscreen&&this.controller.fullscreenPlay()}),this.videoElement.play()))})}load(){return this.videoResource.load()}pause(){var it;this.isPlaying=!1,this.ctx.logger.warn(this.url+", pause video manual.",this.ctx.taskId),this.ctx.logger.warn(this.url+", pause rtc audio manual.",this.ctx.taskId),this.rtcAudio&&(this.rtcAudio.once("pause",()=>{var lt;(lt=this.videoElement)===null||lt===void 0||lt.pause()}),this.rtcAudio.pause()),(it=this.videoElement)===null||it===void 0||it.pause()}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(it){this.controller.jumpToTime(it)}stop(){var it;(it=this.rtcAudio)===null||it===void 0||it.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(pu.mediaStop,{id:this.id})}requestFullscreen(){return jI(this,void 0,void 0,function*(){yield tA(()=>this.isLoaded,5e3);const it=new ps.t(this.sprite.texture.baseTexture);this.ctx.globalEventHub.emit("requestFullscreen",{texture:it,index:this.ctx.slideIndex,targetId:this.id})})}requestCancelFullscreen(){this.ctx.globalEventHub.emit("requestCancelFullscreen",{targetId:this.id,index:this.ctx.slideIndex})}destroy(){var it,lt,pt,_t;this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.ctx.globalEventHub.removeListener("syncFullscreenVideoState",this.syncFullscreenVideoState),(it=this.videoElement)===null||it===void 0||it.removeEventListener("stalled",this.onVideoStalled),(lt=this.videoElement)===null||lt===void 0||lt.removeEventListener("loadedmetadata",this.onVideoResourceLoaded),this.sprite.interactive=!1,this.sprite.destroy({texture:!0,baseTexture:!0}),(pt=this.videoResource)===null||pt===void 0||pt.destroy(),(_t=this.rtcAudio)===null||_t===void 0||_t.destroy(),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this)}fadeIn(it,lt){var pt;(pt=this.rtcAudio)===null||pt===void 0||pt.fade(it,this.ctx.volumeAdjuster.volume,lt)}fadeOut(it,lt){var pt;(pt=this.rtcAudio)===null||pt===void 0||pt.fade(this.ctx.volumeAdjuster.volume,it,lt)}}var SP=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class gM extends em.a{constructor(it){var lt,pt;super(),this.type="audio",this.isPlaying=!1,this.isGlobalPause=!1,this.updateVolume=Xt=>{this.audioPlayer.volume(Xt)},this.id=it.id;const _t=it.audio.src;this.audioPlayer=new IC(_t,it.ctx.runningAudio,{start:(lt=it.audio.cut)===null||lt===void 0?void 0:lt.start,end:(pt=it.audio.cut)===null||pt===void 0?void 0:pt.end},{enableWebAudio:it.ctx.enableWebAudio}),it.audio.cut&&(this.start=it.audio.cut.start,this.end=it.audio.cut.end),this.ctx=it.ctx,this.ctx.medias[this.id]=this;const{width:Dt,height:Lt,target:$t}=it;this.controller=new dS({targetId:it.id,shapeId:it.shapeId,ctx:it.ctx,height:Lt,width:Dt,target:$t,media:this,info:it.audio,canvasElement:it.canvasElement}),this.audioPlayer.on("load",()=>this.emit("durationchange")),this.audioPlayer.on("timeupdate",()=>this.emit("timeupdate")),this.audioPlayer.on("pause",()=>this.emit("pause")),this.audioPlayer.on("play",()=>this.emit("play")),this.ctx.activeMedia.add(this),this.ctx.volumeAdjuster.on("update",this.updateVolume)}get isUsedRemixAudio(){var it,lt;return(lt=(it=this.audioPlayer)===null||it===void 0?void 0:it.isUsedRemixAudio())!==null&&lt!==void 0&&lt}get currentTime(){return this.audioPlayer.currentTime}set currentTime(it){this.audioPlayer.currentTime=it}get clippedDuration(){return this.controller.clippedDuration}get paused(){return this.audioPlayer.isPaused}get isPaused(){return this.audioPlayer.isPaused}get duration(){return this.audioPlayer.duration}load(){return Promise.resolve()}showController(){this.controller.show()}hideController(){this.controller.hide()}play(){return SP(this,void 0,void 0,function*(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent play event with paused state",this.ctx.taskId):(this.updateVolume(this.ctx.volumeAdjuster.volume),this.isPlaying=!0,this.audioPlayer.play())})}pause(){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent pause event with paused state",this.ctx.taskId):(this.isPlaying=!1,this.audioPlayer.pause())}globalPause(){this.isPlaying&&(this.isGlobalPause=!0,this.pause())}globalResume(){this.isGlobalPause&&(this.isGlobalPause=!1,this.play())}togglePause(){this.isPlaying?this.pause():this.play()}seek(it){this.ctx.isPlayerPaused()?this.ctx.logger.info("Audio player prevent seek event with paused state",this.ctx.taskId):this.controller.jumpToTime(it)}stop(){this.audioPlayer.stop(),this.seek(0),this.pause(),this.ctx.eventHub.emit(pu.mediaStop,{id:this.id})}requestFullscreen(){}requestCancelFullscreen(){}destroy(){this.ctx.volumeAdjuster.removeListener("update",this.updateVolume),this.stop(),this.controller.destroy(),this.ctx.activeMedia.delete(this),this.audioPlayer.destroy()}fadeIn(it,lt){this.audioPlayer.fade(it,this.ctx.volumeAdjuster.volume,lt)}fadeOut(it,lt){this.audioPlayer.fade(this.ctx.volumeAdjuster.volume,it,lt)}}var lA=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class vM extends DC{constructor(it,lt,pt){var _t,Dt;super(Object.assign(Object.assign({},it),{type:"Shape",useBgFill:!1,textRotateWithShape:!0,isPicture:!0}),lt,pt),this.isInteractiveOutside=!1,this.maxLimitLoop=0,this.cmd=new zR(this),this.onSlideRenderPlayGif=(Lt,$t)=>{var Xt;const{displayObject:Yt}=this.picFill;Yt&&Yt instanceof Uo&&this.ctx.slideIndex===Lt&&((Xt=this.effectObject)===null||Xt===void 0||Xt.setFrameCount(Yt.totalFrames),$t?Yt.gotoAndPlay(0):this.maxLimitLoop>0?Yt.gotoAndStop(Yt.totalFrames-1):Yt.gotoAndPlay(0),Yt.onFrameChange=Zt=>{if(this.effectObject)if(this.effectObject.hasFrame(Zt))this.effectObject.updateFrame(Zt);else{const lr=this.getEffectTexture();lr&&(this.effectObject.createFrame(Zt,lr.texture),this.effectObject.setFrameOffset(lr.offsetX,lr.offsetY))}})},this.media=it?.media,this.container.name=it.id+"_container_[Picture]",this.renderContainer.name=it.id+"_render_container_[Picture]",this.picFill=new XS(this.ctx,it.picFill,it.width,it.height,{useFilter:!0,useSlideBackgroundFill:!1}),((_t=it.picFill)===null||_t===void 0?void 0:_t.fillType)==="gifFill"&&(this.maxLimitLoop=(Dt=it.picFill.loop)!==null&&Dt!==void 0?Dt:0),this.style.on("visibilityChange",(Lt,$t)=>{this.mediaPlayer&&Lt&&!$t&&this.mediaPlayer.stop()})}applyCommand(it,lt){var pt,_t,Dt,Lt;if(lt==="call")if(/playFrom\(([0-9.]+)\)/.test(it)){const $t=it.match(/playFrom\(([0-9.]+)\)/),Xt=Number($t[1]||"0");(pt=this.mediaPlayer)===null||pt===void 0||pt.controller.playMediaFromCtrl(!0),Math.abs(Xt)>.1&&((_t=this.mediaPlayer)===null||_t===void 0||_t.controller.jumpToTime(Xt))}else it==="custom-pause"?(Dt=this.mediaPlayer)===null||Dt===void 0||Dt.controller.pauseMediaFromCtrl(!0):it==="togglePause"?this.mediaPlayer&&(this.mediaPlayer.isPlaying?this.mediaPlayer.controller.pauseMediaFromCtrl(!0):this.mediaPlayer.controller.playMediaFromCtrl(!0)):it==="stop"&&((Lt=this.mediaPlayer)===null||Lt===void 0||Lt.stop())}applyEffectCacheAsBitMap(it){var lt,pt,_t;((lt=this.json.fillStyle)===null||lt===void 0?void 0:lt.fillType)==="gifFill"||this.media&&this.media.type==="video"||((pt=this.json.picFill)===null||pt===void 0?void 0:pt.fillType)==="gifFill"||(_t=this.effectObject)===null||_t===void 0||_t.container.children.forEach(Dt=>{Dt.name!=="effect-sprite"&&(Dt.cacheAsBitmap=it)})}renderPic(){var it,lt,pt,_t,Dt,Lt;return lA(this,void 0,void 0,function*(){const{displayObject:$t}=this.picFill;if($t){$t.name=this.json.id+"_pic_fill_[Picture]";const Xt=(it=this.backgroundGraphics)===null||it===void 0?void 0:it.getPictureMask();if(!((lt=this.backgroundGraphics)===null||lt===void 0)&&lt.isNeedMask($t.width,$t.height)&&Xt&&($t.mask=Xt,this.effectContainer.addChild(Xt)),$t.width=this.designWidth,$t.height=this.designHeight,$t instanceof Uo&&this.ctx.slideScopeEventHub.on("slide-render",this.onSlideRenderPlayGif),this.effectContainer.addChild($t),this.media){let Yt=this.media.src;const[Zt,lr]=Yt.split("dynamicConvert");if(lr&&(Yt=`${this.ctx.prefix}${lr}`),this.media.type==="audio"&&/mp4$/.test(Yt)&&(Yt=Yt.replace(/mp4$/,"mp3")),this.ctx.urlInterrupter){const xr=Date.now();Yt=yield this.ctx.urlInterrupter(Yt),this.ctx.logger.info("redirect media url by interrupter. time: "+(Date.now()-xr),this.ctx.taskId)}this.ctx.loaderDelegate&&(Yt=this.ctx.loaderDelegate.redirectMedia(Yt),this.ctx.logger.info(`redirect media url to ${Yt} by delegate.`,this.ctx.taskId)),this.media.src=Yt}if(((pt=this.media)===null||pt===void 0?void 0:pt.type)==="video"&&this.media.src){if(this.mediaPlayer=new mM({id:this.json.id+"-video",shapeId:this.json.id,ctx:this.ctx,video:this.media,height:this.designHeight,width:this.designWidth,target:$t,container:this.effectContainer,canvasElement:this.ctx.view}),((_t=this.mediaPlayer)===null||_t===void 0?void 0:_t.sprite)&&Xt){const Yt=(Dt=this.backgroundGraphics)===null||Dt===void 0?void 0:Dt.getClonedDisplayObject();Yt&&(this.mediaPlayer.sprite.mask=Yt,this.container.addChild(Yt))}}else((Lt=this.media)===null||Lt===void 0?void 0:Lt.type)==="audio"&&this.media.src&&(this.mediaPlayer=new gM({id:this.json.id+"-audio",shapeId:this.json.id,ctx:this.ctx,audio:this.media,height:this.designHeight,width:this.designWidth,target:$t,canvasElement:this.ctx.view,fade:this.media.fade}));this.mediaPlayer&&(this.isInteractiveOutside=!!this.container.interactive,this.container.interactive=!0,WT.isDesktop()?(this.container.on("mouseover",()=>{this.mediaPlayer.showController()}),this.container.on("mouseout",()=>{this.mediaPlayer.hideController()},!1)):this.container.on("pointerdown",()=>{this.mediaPlayer.showController()}))}})}preRender(it){super.preRender(it)}subClassRender(){return lA(this,void 0,void 0,function*(){yield this.renderPic()})}clearOnSlideChange(){super.clearOnSlideChange(),this.mediaPlayer&&(this.container.interactive=!1,this.mediaPlayer.stop(),this.mediaPlayer.hideController())}initOnReuse(){super.initOnReuse(),this.mediaPlayer&&(this.container.interactive=!0)}destroy(){this.mediaPlayer&&(this.picFill.displayObject&&!this.isInteractiveOutside&&(this.container.interactive=!1),this.mediaPlayer.destroy(),this.mediaPlayer=void 0),this.picFill.destroy(),this.ctx.slideScopeEventHub.removeListener("slide-render",this.onSlideRenderPlayGif),this.style.removeAllListeners()}}var cA=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class QS extends II{constructor(it,lt,pt,_t){super(it,lt,pt),this.children=[],this.cacheSprite=new _g,this.cacheContainer=new Ol.b,this.json=it,this.json.fillStyle&&this.json.fillStyle.fillType==="groupFill"&&pt.groupFillStyle&&(this.json.fillStyle=pt.groupFillStyle),this.container.name=it.id+"_container_[Container]",this.cacheContainer.name=it.id+"_cache_container_[Container]",this.ctx.timingTargets.addTarget(it.id,this),this.updateTransform(this.json),this.fillObject=new XS(this.ctx,it.fillStyle,it.width,it.height,{useFilter:!1,useSlideBackgroundFill:!1}),this.createChildren(_t)}createChildren(it){var lt,pt,_t,Dt;const Lt={x:(pt=(lt=this.json.position)===null||lt===void 0?void 0:lt.x)!==null&&pt!==void 0?pt:0,y:(Dt=(_t=this.json.position)===null||_t===void 0?void 0:_t.y)!==null&&Dt!==void 0?Dt:0};for(let $t=0,Xt=this.json.children.length;$t<Xt;$t++)it.addSubMTask(()=>cA(this,void 0,void 0,function*(){var Yt,Zt,lr,xr;let wr=this.json.children[$t],Ir=null;if(!(!this.ctx.featureList||!this.ctx.featureList.smartArt)&&(wr?.type==="Shape"||wr?.type==="Picture")&&this.ctx.smartArtShapeList){const{id:Lr}=wr,Xr=this.ctx.smartArtShapeList.find(_n=>_n.id===Lr);Xr&&(wr=Xr)}const kr={parentGlobalPos:Lt,groupFillStyle:(Yt=this.json.fillStyle)!==null&&Yt!==void 0?Yt:{fillType:"noFill"},groupSize:{w:this.json.width,h:this.json.height},groupRotation:((Zt=this.json.rotation)!==null&&Zt!==void 0?Zt:0)+((xr=(lr=this.option)===null||lr===void 0?void 0:lr.groupRotation)!==null&&xr!==void 0?xr:0)};wr?.type==="Shape"?Ir=new DC(wr,this.ctx,kr):wr?.type==="Picture"?Ir=new vM(wr,this.ctx,kr):wr?.type==="Container"&&(Ir=new QS(wr,this.ctx,kr,it)),Ir&&this.children.push(Ir)}),"@ContainerImpl[child.init]")}get interactiveContainer(){return this.container}get renderContainer(){return this.container}preRender(it){for(const lt of this.children)it.addSubMTask(()=>cA(this,void 0,void 0,function*(){lt.preRender(it)}),"@ContainerImpl[child.preRender]")}getBgElement(){return null}getIterateEntry(it,lt,pt){return lt===0?this:(this.ctx.eventHub.emit("IterateTimeNodeEnd",pt),null)}getTextElement(){return null}render(it){for(const lt of this.children)lt.render(it),it.addSubMTask(()=>cA(this,void 0,void 0,function*(){this.cacheContainer.addChild(lt.renderContainer)}),"@ContainerImpl[child.render]");it.addSubMTask(()=>cA(this,void 0,void 0,function*(){this.container.addChild(this.cacheContainer)}),"@ContainerImpl[child.append]")}applyEffectCacheAsBitMap(it){this.children.forEach(lt=>lt.applyEffectCacheAsBitMap(it))}clearOnSlideChange(){this.children.forEach(it=>it.clearOnSlideChange())}initOnReuse(){this.children.forEach(it=>it.initOnReuse())}isChildrenInteractive(){for(const it of this.json.children)if(it?.type==="Container"||it?.type==="Stage"||it?.hlinkHover||it?.hlinkClick)return!0;return!1}destroy(){this.cacheSprite&&this.cacheSprite.destroy({texture:!0}),this.children.forEach(it=>it.destroy()),this.container.destroy({children:!0,texture:!0,baseTexture:!0}),this.cacheContainer.destroy({children:!0,texture:!0,baseTexture:!0})}}class KS extends em.a{constructor(it,lt,pt,_t){super(),this.cond={},this.timeoutIds=[],this.condHandle=(Dt,Lt={})=>{if(Dt)if(Dt.delay&&Dt.delay>0){const $t=this.ctx.clock.setTimeout(()=>{Dt.event&&(this.cond[Dt.event]=!0,this.detectTrigger(Lt))},Dt.delay);this.timeoutIds.push($t)}else this.cond[Dt.event]=!0,this.detectTrigger(Lt);else this.detectTrigger(Lt)},this.id=it,this.ctx=_t,this.eventHubs=pt,lt.forEach(Dt=>{this.addCond(Dt)})}setTriggerParams(it){this.triggerParams=it}addCond(it){const lt=(...pt)=>{this.condHandle(it,pt)};it.event&&(/^shape/.test(it.event)||/^time/.test(it.event)?(this.cond[it.event]=!1,this.eventHubs.global.addListener(it.event,lt)):/^runtime/.test(it.event)?(this.cond[it.event]=!1,this.eventHubs.runtime.addListener(it.event,lt)):/^self/.test(it.event)?it.delay&&it.delay>0&&(this.cond[it.event]=!1,this.eventHubs.runtime.addListener(it.event,lt)):this.cond[it.event]=!1)}isTrigger(){return Object.keys(this.cond).every(it=>!!this.cond[it])}isTriggerWithoutParent(){return Object.keys(this.cond).filter(it=>it!=="self").every(it=>!!this.cond[it])}detectTrigger(it){if(Object.keys(this.cond).every(lt=>!!this.cond[lt])){Object.keys(this.cond).forEach(pt=>{this.cond[pt]=!1});const lt=this.triggerParams;this.triggerParams=void 0,this.emit("active",lt,it)}}reset(){Object.keys(this.cond).forEach(it=>{this.cond[it]=!1}),this.timeoutIds.forEach(it=>this.ctx.clock.clearTimeout(it))}}class mp extends em.a{constructor(it){super(),this.isTimeNodeEndSync=!1,this.interactiveListeners=[],this.runtimeNodeEventHub=new em.a,this._currentSeqIndex=0,this._currentSeqState="idle",this.isForward=!0,this.autoPlay=!1,this.handlePrev=(xr=!1)=>{var wr,Ir,kr,Lr,Xr,_n;this.hasPrev()||!this.isMainSeq?this.currentSeqState==="idle"?(this.decrSeqIndex(),(wr=this.commonTimeNode.children[this.currentSeqIndex])===null||wr===void 0||wr.commonTimeNode.seekToStart(),(Ir=this.commonTimeNode.children[this.currentSeqIndex])===null||Ir===void 0||Ir.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="running"?((kr=this.commonTimeNode.children[this.currentSeqIndex])===null||kr===void 0||kr.commonTimeNode.seekToStart(),(Lr=this.commonTimeNode.children[this.currentSeqIndex])===null||Lr===void 0||Lr.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.currentSeqState==="end"&&(this.currentSeqIndex>=this.commonTimeNode.children.length&&(this.currentSeqIndex=this.commonTimeNode.children.length-1),(Xr=this.commonTimeNode.children[this.currentSeqIndex])===null||Xr===void 0||Xr.commonTimeNode.seekToStart(),(_n=this.commonTimeNode.children[this.currentSeqIndex])===null||_n===void 0||_n.commonTimeNode.clearSubList(),this.currentSeqState="idle"):this.globalEventHub.emit("c:prev slide",xr)},this.handleNext=(xr,wr)=>{var Ir,kr,Lr,Xr;if(this.isTimeNodeEndSync&&(this.isTimeNodeEndSync=!1,this.currentSeqState="idle",this.currentSeqIndex=0),!this.hasNext()&&this.isMainSeq&&wr)this.globalEventHub.emit("c:next slide",xr);else{if(this.isInteractiveSeq){this.globalEventHub.emit("shape slide onNext"+(this.json.ctn.id||""));const _n={result:null};this.findChildInfiniteRepeat(this.commonTimeNode,_n),this.commonTimeNode.children.length===1&&_n.result&&(_n.result.json.subTnLst||[]).length>0&&this.currentSeqIndex===0&&this.currentSeqState==="running"&&this.commonTimeNode.allChildrenEndHandle()}this.currentSeqState==="idle"?(Ir=this.commonTimeNode.children[this.currentSeqIndex])===null||Ir===void 0||Ir.commonTimeNode.startTimeNodeForce():this.currentSeqState==="running"?((kr=this.commonTimeNode.children[this.currentSeqIndex])===null||kr===void 0||kr.commonTimeNode.seekToEnd(!1,!0),this.currentSeqState="end",this.incrSeqIndex(),(Lr=this.commonTimeNode.children[this.currentSeqIndex])===null||Lr===void 0||Lr.commonTimeNode.startTimeNodeForce()):this.currentSeqState==="end"&&(this.incrSeqIndex(),(Xr=this.commonTimeNode.children[this.currentSeqIndex])===null||Xr===void 0||Xr.commonTimeNode.startTimeNodeForce())}};const{json:lt,iterateType:pt,isIterate:_t,isSub:Dt,parent:Lt,ctx:$t,eventHub:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr}=it;this.isMainSeq=lt.ctn.nodeType==="mainSeq",this.isInteractiveSeq=lt.ctn.nodeType==="interactiveSeq",this.id=lt.ctn.id,this.isIterate=_t,this.json=lt,this.ctx=$t,this.globalEventHub=Xt,this.commonTimeNode=new f0({json:lt.ctn,isSub:Dt,eventHubs:{global:Xt,runtime:this.runtimeNodeEventHub},ctx:$t,parent:Lt,isIterate:!1,iterateType:pt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr||this.isInteractiveSeq,fromSeqId:this.isInteractiveSeq?this.json.ctn.id:""}),this.bindShapeEvent(),this.nextConds=new KS("mainSeq",lt.nextCondLst,{global:Xt,runtime:this.runtimeNodeEventHub},this.ctx),this.prevConds=new KS("mainSeq",lt.preCondLst,{global:Xt,runtime:this.runtimeNodeEventHub},this.ctx),this.commonTimeNode.on("timeNodeRestart",()=>{this.currentSeqIndex=0,this.currentSeqState="idle"}),this.commonTimeNode.on("childTimeNodeStart",xr=>{const wr=this.commonTimeNode.children.findIndex(Ir=>Ir.commonTimeNode.uuid===xr.id);wr>=0&&(this.currentSeqIndex=wr),this.currentSeqState="running",this.isMainSeq&&this.ctx.eventHub.emit(pu.mainSeqStepStart,wr)}),this.commonTimeNode.on("childTimeNodeEnd",xr=>{const wr=this.commonTimeNode.children.findIndex(Ir=>Ir.commonTimeNode.uuid===xr.id);wr>=0&&(this.currentSeqIndex=wr),this.currentSeqState="end",this.autoPlay&&this.ctx.clock.setTimeout(()=>{this.handleNext(!1,!0)}),this.isMainSeq&&this.ctx.eventHub.emit(pu.mainSeqStepEnd,wr)}),this.commonTimeNode.on("timeNodeEndSync",()=>{this.isTimeNodeEndSync=!0,this.commonTimeNode.resetForRepeat()}),this.commonTimeNode.on("timeNodeDestroy",()=>{this.interactiveListeners.forEach(([xr,wr])=>{xr&&wr&&xr.interactiveContainer.removeListener("pointerdown",wr)}),this.interactiveListeners=[]}),this.nextConds.on("active",(xr,wr)=>{Array.isArray(wr)?this.handleNext(wr[0],wr[1]):this.handleNext(wr,!0)}),this.prevConds.on("active",(xr,wr)=>{Array.isArray(wr)?this.handlePrev(wr[0]):this.handlePrev(wr)})}get currentSeqIndex(){return this._currentSeqIndex}set currentSeqIndex(it){this._currentSeqIndex=it,this.isMainSeq?this.ctx.eventHub.emit(pu.mainSeqStepChange,it):this.isInteractiveSeq&&this.ctx.eventHub.emit(pu.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:it,state:this._currentSeqState}})}get currentSeqState(){return this._currentSeqState}set currentSeqState(it){this._currentSeqState=it,this.isMainSeq?this.ctx.eventHub.emit(pu.mainSeqStateChange,it):this.isInteractiveSeq&&this.ctx.eventHub.emit(pu.interactiveSeqStateChange,{id:this.json.ctn.id,state:{step:this._currentSeqIndex,state:it}})}get stepLength(){return this.commonTimeNode.children.length}get currentStep(){return this.currentSeqIndex}get currentState(){return this.currentSeqState}startAutoPlay(){this.autoPlay=!0,this.commonTimeNode.children[0].commonTimeNode.startTimeNodeForce()}incrSeqIndex(){this.currentSeqIndex+1<=this.commonTimeNode.children.length&&(this.currentSeqIndex+=1)}decrSeqIndex(){this.currentSeqIndex-1>=-1&&(this.currentSeqIndex-=1)}hasPrev(){return!(this.currentSeqIndex<=0&&this.currentSeqState==="idle")}hasNext(){return!(this.currentSeqIndex>=this.commonTimeNode.children.length||this.currentSeqIndex===this.commonTimeNode.children.length-1&&this.currentSeqState==="end")}findChildInfiniteRepeat(it,lt){it.isInfiniteRepeat()?lt.result=it:it.children.map(pt=>pt.commonTimeNode).forEach(pt=>this.findChildInfiniteRepeat(pt,lt))}bindShapeEvent(){this.json.ctn.nodeType==="interactiveSeq"&&this.json.nextCondLst.forEach(it=>{if(/^shape/.test(it.event)){const lt=it.event.split(" ")[1];if(lt){const pt=this.ctx.timingTargets.getTargetById(lt);if(pt){pt.interactiveContainer.interactive=!0,pt.interactiveContainer.cursor="pointer";const _t=()=>{this.ctx.eventHub.emit(pu.userInput);const Dt=`shape ${lt} onClick`,{mode:Lt}=this.ctx;Lt!=="interactive"&&Lt!=="sync"||this.ctx.eventHub.emit(pu.interactiveSeqAction,{action:Dt,seqId:this.json.ctn.id}),Lt!=="sync"&&Lt!=="local"||this.globalEventHub.emit(Dt)};pt.interactiveContainer.on("pointerdown",_t),this.interactiveListeners.push([pt,_t])}}}})}setCurrentStep(it,lt){const{length:pt}=this.commonTimeNode.children;if(it>pt)return;this.isInteractiveSeq&&this.commonTimeNode.applyCount===0&&(this.commonTimeNode.applyCount=1);let _t=it;if(this.commonTimeNode.seekToStart(),_t===-1&&(_t=pt-1),_t!==0||lt!=="start"){if(_t>=0&&_t<pt)for(let Dt=0;Dt<=_t;Dt++){const Lt=this.commonTimeNode.children[Dt];Dt!==_t?Lt.commonTimeNode.seekToEnd(!1,!0):lt==="start"?Lt.commonTimeNode.seekToStart():lt==="end"&&Lt.commonTimeNode.seekToEnd(!1,!0)}this.currentSeqIndex=_t,this.currentSeqState=lt==="start"?"idle":"end"}}}function J1(vt,it,lt){const pt=it.split(".");pt.reduce((_t,Dt,Lt)=>{if(_t)return Lt!==pt.length-1?_t[Dt]:void(_t[Dt]=lt);console.warn(`${vt} not support ${it}`)},vt)}function RC(vt,it){return it?it.split(".").reduce((lt,pt)=>lt?lt[pt]:(console.warn(`${vt} not support ${it}`),null),vt):null}class hS{constructor(it){this.timingTarget=null,this.runtimeNodeEventHub=new em.a,this.basicOnTimeNodeEnd=()=>{if(this.isConflict){const{target:wr}=this.json.cBhvr,Ir=this.getTargetId(wr);this.ctx.conflictTimeNodeManager.removeRunningTimeNode(Ir,this.modifyAttrKey)}},this.basicOnTimeNodeStart=()=>{this.timingTarget&&this.timingTarget.applyEffectCacheAsBitMap(!1)},this.basicOnTimeLineStart=()=>{if(this.isConflict){const{target:wr}=this.json.cBhvr;if(this.activeWhenConflict==="next"){const Ir=this.getTargetId(wr);this.ctx.conflictTimeNodeManager.addRunningTimeNode(Ir,this.modifyAttrKey,this.commonTimeNode)}else this.activeWhenConflict==="prev"&&this.commonTimeNode.dispose()}};const{isIterate:lt,isSub:pt,json:_t,ctx:Dt,parent:Lt,eventHub:$t,iterateType:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr}=it;this.json=_t,this.id=_t.cBhvr.ctn.id,this.ctx=Dt,this.globalEventHub=$t,this.commonTimeNode=new f0({json:_t.cBhvr.ctn,isSub:pt,eventHubs:{global:$t,runtime:this.runtimeNodeEventHub},ctx:Dt,parent:Lt,isIterate:lt,iterateType:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr}),this.timingTarget=this.ctx.timingTargets.getTarget(_t.cBhvr.target,lt,{type:Xt,index:Yt,id:Zt}),this.commonTimeNode.on("seekToStart",()=>this.onSeekToStart()),this.commonTimeNode.on("seekToEnd",()=>this.onSeekToEnd()),this.commonTimeNode.on("timelineStart",this.basicOnTimeLineStart),this.commonTimeNode.on("timeNodeEnd",this.basicOnTimeNodeEnd),this.commonTimeNode.on("timeNodeStart",this.basicOnTimeNodeStart)}getTargetId(it){let lt=it.id;return it.type==="shape"&&it.txEl&&(lt=`${lt}-txEl-${it.txEl.range[0]}`),this.commonTimeNode.isIterate&&(lt=`${lt}-iterate-${this.commonTimeNode.iterateIndex}`),lt}}class PC extends hS{constructor(it){super(it),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.updateStartValue=()=>{this.timingTarget&&(this.startVal=RC(this.timingTarget,this.json.cBhvr.attrList[0]))},this.onSeekToStart=()=>{const lt=this.json.cBhvr.attrList[0];this.startVal!==null&&this.timingTarget&&J1(this.timingTarget,lt,this.startVal)},this.onSeekToEnd=()=>{const lt=this.json.cBhvr.attrList[0],pt=this.json.cBhvr.to||this.json.to;pt&&this.timingTarget&&J1(this.timingTarget,lt,pt)},this.commonTimeNode.on("timeNodeStart",this.updateStartValue),this.commonTimeNode.on("timeNodeCreate",this.updateStartValue),this.commonTimeNode.on("timeUpdate",({duration:lt,delta:pt})=>{if(pt/lt>=1){const _t=this.json.cBhvr.attrList[0];this.json.cBhvr.attrList.length>1&&console.warn("this.json.cBhvr.attrList.length > 0");const Dt=this.json.cBhvr.to||this.json.to;Dt&&this.timingTarget&&J1(this.timingTarget,_t,Dt)}})}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}}var NC=function(vt,it,lt,pt){var _t,Dt=arguments.length,Lt=Dt<3?it:pt===null?pt=Object.getOwnPropertyDescriptor(it,lt):pt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Lt=Reflect.decorate(vt,it,lt,pt);else for(var $t=vt.length-1;$t>=0;$t--)(_t=vt[$t])&&(Lt=(Dt<3?_t(Lt):Dt>3?_t(it,lt,Lt):_t(it,lt))||Lt);return Dt>3&&Lt&&Object.defineProperty(it,lt,Lt),Lt};class dA{constructor(it,lt){this.math={pi:Math.PI,e:Math.E,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,ceil:Math.ceil,cos:Math.cos,cosh:Math.cosh,deg:pt=>pt/Math.PI*180,exp:Math.exp,floor:Math.floor,ln:Math.log,max:Math.max,min:Math.min,rad:pt=>pt/180*Math.PI,rand:pt=>Math.random()*pt,sin:Math.sin,sinh:Math.sinh,sqrt:Math.sqrt,tan:Math.tan,tanh:Math.tanh},this.timingTarget=lt,this.val=it.val.value,this.time=it.time,it.fmla&&(this.fmla=this.parseFmla(it.fmla))}parseFmla(it){let lt=it.replace(/#ppt_h/g,`(${this.timingTarget.design_ppt_h})`);return lt=lt.replace(/#ppt_w/g,`(${this.timingTarget.design_ppt_w})`),lt=lt.replace(/#ppt_x/g,`(${this.timingTarget.design_ppt_x})`),lt=lt.replace(/#ppt_y/g,`(${this.timingTarget.design_ppt_y})`),lt=lt.replace(/ppt_w/g,"vars.ppt_w"),lt=lt.replace(/ppt_h/g,"vars.ppt_h"),lt=lt.replace(/ppt_x/g,"vars.ppt_x"),lt=lt.replace(/ppt_y/g,"vars.ppt_y"),lt=lt.replace(/ppt_r/g,"vars.ppt_r"),lt=lt.replace(/#/g,"vars."),["abs","acos","asin","atan","ceil","cos","cosh","deg","exp","floor","ln","max","min","rad","rand","sin","sinh","sqrt","tan","tanh","pi","e"].forEach(pt=>{const _t=new RegExp(`([^a-z])${pt}([^a-z])`,"g");lt=lt.replace(_t,(Dt,Lt,$t)=>`${Lt}math.${pt}${$t}`)}),new Function("vars","math","$","return "+lt)}}class yM extends dA{constructor(it,lt,pt){super(it,lt),this.value=it.val.value,pt&&(this.fmla=this.parseFmla(pt))}resolveValue(){return this.value}interpolationFrom(it,lt,pt){const _t=it.resolveValue(pt),Dt=_t+(this.resolveValue()-_t)*lt;return it.fmla?it.fmla(pt,this.math,Dt):Dt}}NC([GT()],yM.prototype,"interpolationFrom",null);class hA extends dA{constructor(it,lt){var pt;super(it,lt),this.value=(pt=it.val)===null||pt===void 0?void 0:pt.value}interpolationFrom(it,lt,pt){let _t=it.resolveValue(pt);return lt>this.time&&["hidden","visible"].indexOf(_t)<0&&(_t=this.resolveValue()),_t}resolveValue(){return this.value||""}}NC([GT()],hA.prototype,"interpolationFrom",null);class ZS extends dA{constructor(it,lt){super(it,lt),this.fn=this.parseFmla(this.val)}resolveValue(it){return this.fn(it,this.math,1)}interpolationFrom(it,lt,pt){var _t,Dt;this.fromValue=(_t=this.fromValue)!==null&&_t!==void 0?_t:it.resolveValue(pt),this.toValue=(Dt=this.toValue)!==null&&Dt!==void 0?Dt:this.resolveValue(pt);const Lt=this.fromValue+(this.toValue-this.fromValue)*lt;return it.fmla?it.fmla(pt,this.math,Lt):Lt}}NC([GT()],ZS.prototype,"interpolationFrom",null);class bM extends dA{constructor(it,lt){super(it,lt),this.value=it.val.value}interpolationFrom(it,lt){return lS(it.resolveValue(),this.value,lt)}resolveValue(){return this.value}}NC([GT()],bM.prototype,"interpolationFrom",null);class wP extends hS{constructor(it){super(it),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.createVal=null,this.vars={ppt_x:0,ppt_y:0,ppt_w:0,ppt_h:0,ppt_r:0},this.keyFrames=[],this.isColorAnim=!1,this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal=RC(this.timingTarget,this.json.cBhvr.attrList[0]))},this.updateVars=()=>{var lt,pt,_t,Dt;!((lt=this.timingTarget)===null||lt===void 0)&&lt.ppt_h&&(this.vars.ppt_h=this.timingTarget.ppt_h),!((pt=this.timingTarget)===null||pt===void 0)&&pt.ppt_w&&(this.vars.ppt_w=this.timingTarget.ppt_w),!((_t=this.timingTarget)===null||_t===void 0)&&_t.ppt_x&&(this.vars.ppt_x=this.timingTarget.ppt_x),!((Dt=this.timingTarget)===null||Dt===void 0)&&Dt.ppt_y&&(this.vars.ppt_y=this.timingTarget.ppt_y),this.isColorAnim},this.onTimeUpdate=({duration:lt,delta:pt})=>{const _t=pt/lt,Dt=this.keyFrames.findIndex(xr=>_t<=xr[0]),{attrList:Lt}=this.json.cBhvr;if(Dt<0){const xr=this.keyFrames[this.keyFrames.length-1];return void(this.timingTarget&&Lt&&Lt[0]&&(xr?J1(this.timingTarget,Lt[0],xr[1].resolveValue(this.vars)):this.ctx.logger.error("no keyframe found for anim behavior",this.ctx.taskId)))}const $t=Dt-1,Xt=this.keyFrames[Dt],Yt=this.keyFrames[$t]||Xt,Zt=Xt[0]-Yt[0]==0?1:(_t-Yt[0])/(Xt[0]-Yt[0]),lr=Xt[1].interpolationFrom(Yt[1],Zt,this.vars);this.timingTarget&&Lt&&Lt[0]&&J1(this.timingTarget,Lt[0],lr)},this.onSeekToStart=()=>{this.startVal!==null&&this.timingTarget&&J1(this.timingTarget,this.json.cBhvr.attrList[0],this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.onDestroy=()=>{this.createVal!==null&&this.timingTarget&&J1(this.timingTarget,this.json.cBhvr.attrList[0],this.createVal)},this.initKeyFrames(),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timelineStart",this.updateVars),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeDestroy",this.onDestroy),this.createVal=RC(this.timingTarget,this.json.cBhvr.attrList[0])}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}initKeyFrames(){var it;const{valueType:lt}=this.json;if(this.json.tavLst.length<=0){if(this.json.to){if(this.json.from||this.startVal){const _t={time:0,val:{type:"string",value:this.json.from||this.startVal.toString()},fmla:""};if(lt==="num"&&this.timingTarget){const Dt=new ZS(_t,this.timingTarget);this.keyFrames.push([_t.time,Dt])}else if(lt==="str"&&this.timingTarget){const Dt=new hA(_t,this.timingTarget);this.keyFrames.push([_t.time,Dt])}}const pt={time:1,val:{type:"string",value:this.json.to},fmla:""};if(lt==="num"&&this.timingTarget){const _t=new ZS(pt,this.timingTarget);this.keyFrames.push([pt.time,_t])}else if(lt==="str"&&this.timingTarget){const _t=new hA(pt,this.timingTarget);this.keyFrames.push([pt.time,_t])}}else if(this.json.by){const pt={time:0,val:{type:"string",value:this.json.cBhvr.attrList[0]},fmla:""};if(lt==="num"&&this.timingTarget){const Dt=new ZS(pt,this.timingTarget);this.keyFrames.push([pt.time,Dt])}const _t={time:1,val:{type:"string",value:(((it=pt.val)===null||it===void 0?void 0:it.value)||"")+"+"+this.json.by},fmla:""};if(lt==="num"&&this.timingTarget){const Dt=new ZS(_t,this.timingTarget);this.keyFrames.push([_t.time,Dt])}}}if(this.json.tavLst.length>0){for(const pt of this.json.tavLst)if(pt.val&&this.timingTarget){let _t=null;pt.val.type==="string"?lt==="num"?_t=new ZS(pt,this.timingTarget):lt==="str"&&(_t=new hA(pt,this.timingTarget)):pt.val.type==="number"?_t=new yM(pt,this.timingTarget):pt.val.type==="color"?(this.isColorAnim=!0,_t=new bM(pt,this.timingTarget)):pt.val.type==="boolean"&&console.warn("not implements"),_t&&this.keyFrames.push([pt.time,_t])}}}}class Qv extends ps.k{constructor(it,lt,pt){super(it,lt,pt)}set percent(it){this.uniforms.percent=it}set transition(it){this.uniforms.transition=it}}var TP=tt(121),E1=tt.n(TP),Tk=tt(122),EP=tt.n(Tk),$I=tt(123),kC=tt.n($I),UI=tt(124),_M=tt.n(UI),xM=tt(10),Q_=tt.n(xM),Jw=tt(125),SM=tt.n(Jw),Ek=tt(126),Ak=tt.n(Ek);const AP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAr5QTFRFAAAATwAAOQAAZgAAKwAAPAAAPQAA7AAA/wAA/QAAugAA5QAAsQAAwQAAsAAAfwAAawAASQAAZAAAOAAAJwAALAAALQAAqQAAiwAAmgAA5AAA7QAAtQAAhQAALwAAfAAAXwAAYQAAigAAuQAAfgAAswAAcgAArQAAqgAAZwAAaQAAMgAAGAAAiAAAjwAA1gAA6QAA+wAA7wAA2AAAbQAA2gAA3QAAuwAA3wAA2QAAxQAA0QAAzwAA0gAAXQAAYAAADAAADwAAGQAALgAAjgAAcAAAzQAAwgAA+gAA3AAAGwAAoAAAowAAcQAAVwAA1QAAIQAAWQAA5wAAsgAAuAAASwAAbwAARwAAMAAAnAAAUQAAaAAA9wAA4gAAPwAAbAAAOwAAlwAA0wAAjQAAvAAAwwAAkwAAQQAAvgAAnwAAvQAA0AAA2wAAwAAAWwAATQAACwAABwAAQgAAtgAAgwAAvwAAgQAAlgAAEAAAxgAAtwAAmAAARgAAjAAAdwAAqwAArwAAywAAYgAACAAAmwAAHwAApQAA8QAAdAAAbgAAFgAAgAAAogAAewAAXgAA6AAA9gAA/AAAzgAA3gAAkgAAngAAdQAARAAAmQAATgAAUgAAJQAAIgAAqAAARQAAPgAAxwAACQAAAgAAMQAAiQAAhwAA4AAAUAAABQAAeQAAygAA9AAAFQAAVQAAyAAANQAA4wAAKAAAWAAAZQAApwAA4QAAyQAAXAAAkQAArAAAdgAApgAAHgAA8gAA/gAA6gAA8wAAFwAAHQAAhgAArgAAnQAANAAASAAA7gAAlQAAJgAA+AAA8AAANwAAJAAAHAAANgAAkAAAKQAAoQAAzAAABgAAFAAATAAAeAAAAQAADgAAggAA6wAAEQAAfQAAVAAA9QAAIAAADQAAEgAAVgAA5gAAQAAABAAA1wAA+QAAUHExBAAAJDlJREFUeJwlevk/lPv7/2XtOrKNsWcbzGCMJSmSpSxJZtQkjPEOg5mxRWns+xpZyr5ECGmcLIOsdVK2oyJbcVI0J8fp/Bff2+d7/+BhPO6Z1+u+ruf1XF4GAEAGZOXkFRQBTiD+dgKVTiqrqKqpq5M0ZMmaWtoAOrp6+qcMDMFIzdiEYmpmbqJBpVlYWtFJitYMG1sbFTskLvvTDmcQHM+ec3ImXp13uYCubvB/l7sHkC9eAk8jcy9Eb5/LvldQzQ+v+jsw1ZAlfwYDAK5dZ98IvIlBwXRNXVYIJ9TpLJUb9j9LvBVOj4jkRVGj/Y1i8AwiH09eEwhjMU4uXtsiAWLlqInMcLh+28okKRnuhNy945lic0+Uqu7NdErDdB/5DBo7MwuE4J+dw8jIzcsvwEIUFFGEisWQm1ACpcZlxF7vl1c8YMCJyqrqGio+fFRbVw8NjU2uec0isNWhVuq2XMPzmjcRBVHhSWCtXaPR2mZoybHzL0TUfmxPabeR6yg/+6QTY83VQNOkSwkbumsgkgzwtKe8tDdHYM7ts3sW1Q/Pn3PEWaGmYjoje+B3ewx9bM4V0LNfDB5XL3/o5v1hSBi5fzvQkQESOkQOwiiwI++5YBdkDjFIrKEx3cZK4Ti8eAlZpjcnYMSHKG0ygKKVeFSLRpOZNL9p19Ku1Q9enKlp45lZiQGr7hlWS17RKWp03mv8481cQnwBUNTAXwIUeAvsJwCCTnV4FyJC9CrKYDnOT91DpRZSG8Bsn7pAw2Ihd7Hn7R0hynXezjQcvQTyMGgUjV12kiW75XaR7Z9OK9kD0/j6ckfyk/fcPHCkvkz48NG/r3p4FeRpoQa9JA74sJAOcLubirEPqXqTpZ1hNzUN5exoNVbk5RmSOQqcJix5yWvvRZZ9nyay+tqAsb6U76oAwo3wgXvJkK6sCpOYQBTIdT6cg92rSxWh16pdV2c8NnDzfQhveqvND4k6aAB0ssWnHuL2yZQ7AHLzJTgUrreyZeWewhawpw1RMDWYHLP1OcNQgKzwlKVP5JV5crB7cZ+NRJ6AB3wx/x3RsEufEkozLu+g7+zkekfLbFQo8byEubp5ld7Ot2CQKxJ7qguZxF4SB3ozQF2pCEIbcaFxg6eAr0/MbeHb1DCK+vQCA3j4YTcwjNiWyEgcq1dRlfnXsq31K3hhhvNX/CYM0JC+asxk91d+7ahTr6AAaTAn3U2lTBfjIc1pr5VEX94yw8uIZhWQVAHQj66iLErxDLqNmN0wuO9hYf6FN+boQb1FjENYJAiWKrru2ejWzoZX6M9A91p2Sw1TTRT/rdDQsyiOT1f6br4fKm6Fpeb9qocNfvYOLPAuczuA5BTbeVT2O/ghlkYEScGHX0Df3StfyMT4iYHCTEQTLj04iWePVx6aomPYGLc08OXB+drJLqoq42/wXqB5eagtaqR+ZAPsymG8utBxt1rO8zFTPHITA50gCMQ4Gw7tQBZFo0DBsWb5ExlyKoBbvRAO7jdv6U8jMYne4Y+iWXmg53gvbNYsGg+gU3elEnaeXB/ufFUKJiyZdNZemo10NviBxr65KE1k/Rijg8KTan5647eoiJQAYPIL+9fuHPb/VSMucg/bcJHzKt557SPRYF8voq1+2SIWmSgQCZo2ZjhlymMigEZdZQ3MzX6wmmMTECwNWieLpWDlKihSZ2sVVwNX9AmecOXtMHP7C/WwPzvKbZqiJIYFZ7PuZngFJmNi9YatOLLQU77vGbS6PzGdsQVn/Ad7nQyALeZVbm01GA72t5bvR/aWTWVIIEVDwDJanzjqAc8QuFl4Yr9/2WTdPVPmHCtY7ZEZ4mJoDqURsbWcaHwtmIqJWrIXshpck5ilsHlYM34YFFXTG3dGzKrDMBxB8gsDn7G3bW/TDpe51ALDmy5KQW8lUgg4guspE7TN7wCTbFWnf7gBB16vuHtYoXsWo14j1cD9/Z+oyj5GF95jqI9KG0s6YtJ0N0jtISrVAZQcIO251QuKrBIaH7k2hLK/Mw8pyNmCnott3tGm6XjT9DsZUps7H8DCHwjc731hFRtTaF2UQ572Ca4Qp/On0RVdmFD0A219YL4DcFBN/lnfBvNr12E0W2MSZatepyNLVIbbFIg7jaYfoR/4W1VUKqL6zsF4NpNiq4orZEhCEjExd7AQ2j+B6GMOPmekeA7+DsM0IAsIqj31xrtAzvWqBsjmIWC6+uBONItM9R+HA8rGHxptX9JAF/G0L6QEiy3McdFEhp4+YNA0FHNwnW0/RFFEtwHRb/hwQsbzX/heYihsB6nNVJssfHnqQe/acYKMv8LqcRe7aEF7Y6ugtWxKLILeNmlzVF277PqxIg8dSxpo5gsaMBFxfgwvdWBhOvzOHHHzx4JUHLNpyc8LUzkLcfiIv3A2jQxpeQ1iL4IKUJ1dTmigtKLpgi6QjX2d8ISbHl1B8bH0UEbnI2DMVm5h4+6Ko+kTd3VVSVPGkpp4/p+BW7/faCjBhlD7MoDqRpcOJxz6lBe8gWYtBP80qaKf86k0FP9L1ziS+Y1m8MPaWpcD8BXkG2flILIvKvoC/hr8upkS1N2pwbQD5NtZmC6iNb2JUVJTRDoZxTXibAjQDp3w/y5Bhld8zynk7OU1S3S3LPnJLvjhzcfUaKeYeJwtkmPDDbYpWt0gTaf8e/gL32vUwV1i7lHVD65CN0n+CySLiHLZfbSx/XYollUUj09xeL/Cjqg2DUp2eM7igsEZPyXlnve63tfjYjZSbBwtUf7mlAhvX0N/CzxFIKE25lol9uEzuf4B95AK6EAVtXBSn3XGA6bVuISAxQuuFKTClSg4xz/VEivy43BYA1UY4x7aSd/i1RMdwdgzi68x0JEYIfLBbEMag6Kcur0R3WGGtXvT2744+WPE4QaWz1rrbq5fEmwQTMwOLPRNs2jAJiPTPpAjXA48lyGNDo/aEnNyEv39YQtTIKcLY2gVw/SWl2eGCgmvgRKcowIU96xWM6PvyJhk/4dRHbP4A2JaG+uq0xb1J15Gaa++VgngHKhh3L3grVzTsa95kyjw3wgZLYViuASK6smRQA8Ds39GAisCnrN+wiGik1BsIZfpFhk9aVvJNr+pUWJbSmxoOAqRzseBsHsCPJ+9EvFA6HLDuymPuB3VbLuUAeRzs5AnmhdV52drj6JdA/9JE6GEWqDZIrYYlrYCDM7hLcefRsAoFiZc4P3tYx5qFsH9ttFzAL0L/lgSwvjbS4Hlik7xGLuSVfejKzFhvtnHF3039B8VGq1UCpg4+cLt0KMDi46N3M5F9YWHiD/InKc21mDdj2pCGZNgqLihu2j14oFnH9dxycOd1FsVBZ+cMEBkuu0U7wwPJEfc9SWATH9MuG0EvfyJPxuf9enmuy3ipIOtB/Tq8fRSfpzQFs03/H+7yBgpxgsOgaPD69B90NfAH5SMhqmB4xns1ARtQlmao4VcBTRTDeuo6wPwzlIp/AQcGagk6KNOsPIQxV8P+wi/EIUDDVLWFGWvjTzIZnkLRH1UoJhWpXMTjPAjt3UAX17p6WGAJwxrWKi26AC0+gNR2jzhlwfEJrgvQCombOyaY8/bLwB9fMvueMLQvWNkBKGC0lq0Ht3KzP5jCcE4StVpESb3tdp2iHeZtLDMQ26rGa6n0GpULC4tIz4jBBxadsL3wHdFQPwahEAq1xR5rwJkcKwXQrx0f6F7awZw4fPbGa1gUiXJVpYOUgng1Il6/kdwHeGfQlS+PdZEZ/WbBBOmQjvC0LG6wpXRfApSSh5UP+GjCtGd2HwGkHtuvHkJDGvpqBlcXLXap5CKR9eJRzlgZ8W4zK891g7/yQl4SpDRz5B6E6FEUxFv8K/4i/p8Hn1DOZxLx2FQHi3X/cwgM0LCK+TZnTMszAMO3JUIXyO6zOQNiThG4OXOrwJNCE8XwV95JJ175KWLydZwJE882VhaOGyWMiSKcP771g4kaYKUFB2Dmz0JUdUk75Pplh8T7VBZwUY90zTpUDwWxIJNQ4p3+oSPgHVcJUQVskdpHklpVCunu2AMvq7HI2HuekbnizilxbZeVzVwQLUBT133fJUvswkKMu+OHgCDmIJX9+b8TDTiXIyTQUrXPXFm5NsIOF7X6snH0GkbLAqxPlJ9ecWoX5Ywy8Vl/GgAlgE21JAfp4T0F8NwItrDq/BXLuXDsET46eLTOOKK5svMyhZ3Ah1ePwHOvYdijiwWbAEJnbIP5V95SOcbXM43qIJm+5G32UABbhvaNNvRffVynh4jmDDQ3V+XtC1dHWnr5PFwd9Ds2UdVaIEHmECBo9V1OAz0w9Q7ZONc7xXtF+8+ETCmmX+G7+2+flmEDTEww2Dr5eQAbJggPltoLQ9vmismCRLQYIvSsXqDWOIS85DgRSlAhWjGdOxACJXNVdyGoSxA1lu2eETiYQrdn23iL9SxSRCa5LgEX0CruBRSxHIQWrdV/mq5qOUyNgs9QUYv+xsmlhwRichkxSqZko2RwH46USV7CUofNLnT23rewuaB+3Y+8g82zzjibgmdChhbQRFk34o/zPECaRHy7wKj5wlFDE8H30Jva81PwVlVT/UNLeH5C/T9cIDrBy3capubs5y2F7ATbAwpRvThn7BsaBvwbu0BBMDxHEtAsSE3DVOdF+kWWcXsfX3AFYeWSbrZP/TS/H80MGryotBYxj1U8rWXomZeevT+aQ0crFNLeulQLpiCr0J3rB5jTS3MR+wbSYRJirC2/5eEGCMHpzOUFWEplMsWaW0SVaCL8y8rZVI4hiy4qyEC7CW0YwNHTGLxvJ2vW6GNMctZQNF8YFxN+y/di6ENOZNtphmlCkIZsU3uvDqzlidm8vQCrkUfzYk6D4AYr6tk+mccy/i8xBKFQzibM/wWTIysZ6cDt/XhySBb1niUMBJRN+ILdWbj7Z6dnUgLZELPYXWeyXNhzV48NvUbAWzWEC0lD8PwVIGTt6rveS3h3gX3XiVRg1O5poRFvgPCL17nEx324dKJT5AC5OU7RFWXuEp0U1v+MRgY7mxikdoB4lle086YyXrr61aA8eVem+VOaY1TKn/sOxOeRhIcR4AZLNrygau7faIG/T/vTPO010Kbci6K9mAYPE3+D/Q/02VDHhOfPxxTud5MF+8KsrdY8Bw4TELjh26cdDiBfCo2ptEyDRsJrRk1KZcvgta3ckuK5CRPn7AxcptUHMpozoAU68b9ElVYL1uhaVz7RTJwRJ15W+0X8HZs7gUMi9wPAEik099Y6ilYhW7j1KNLmlFXlRwAb+NvU+PbN1AfHY1t+/sN4J1JVfn7FDYLloP1Scsg9GA3s2b6XMPgHYNbve6n3ghsmK0WGyzvNrCU7t0veADh7RGOKA7vXwYQc0uuPZMJMUQMLbBdz+2kFzkStJJNFEvH/f/cT1wnXJfsflkfnn+qJe89nGfU5c6Fpsd3vp8y31fD+eHg8uZSYXdwqcoBT9DS0aTRKoaZrdSqk0KtkFZb4+BBqXAnpKdyVLXBuP5clrK5wxSYyIWrghPCaNnLhJkp/A3x8fsMgMczROQeBhpGULvpU+ZNQqKLZQMr2c5uvEvEMHOemnBn5rN1M88Y+/TkhOxUIBP/2P2jr1+oIelfW2KEQFOnrjfGzrGWUsS6YsjIBTxTDwc64bw+fGhfW5AnvnpxLYAJDBm2lJ6rvaNZZMrsfTANYByHtYSbJahyNwhmaepqjdIPb+zS9jVAgfRHPZEjU1Gd3rhA/5cI2/I7HkyV/yE2rhd7VLRC+6h3nRnBwqHqGw2HNB46i9yPFIYrAbBjbP8Xiw3DuyzbyCf9d4TVDRcSKQussrgoejwBiAjYwZi0qcQK8KuYyotDvMBHuWgDgNhVUXyHsaOlkxmK4H0+NoRd5BhMX9v+E0DX3JzZF4fOt9EZhbDdj5dngkuAUBvofWKvSxgvWN/JXhGtuib/SxfY8KRQCXuP9M9m4RKN/YNl9WjkI76xL/vI3tkUW8UwNyBJ97wf3vZkr8zgZWjt09M51pPhhhhIa5n7iOjQUKxcVfAILZl0T4jc7FxaD1109JL9Ca0sSBbrEuNCQcFBiIv+SZSJPYe/1EYItPw54SrCk2fKxMmvjDJ19ORWT937dR9t2yrEWeJCbBTuaVFvARwhlXYkVrmPmMoeHL//5uHAvRj2Y8axOXO33AUsW/qXsBWn9CxkKIYN1C7xCb9tfTfE+3+m+utf4yM6L/i+ic02U8cQ2F98GKWj7KuD2pLDXkPCLCOzaCvJfwOemmSw+9kphfUY4yI+yj5/MmQxX+dJTNMaPNhkZY4Wbc3tEQKBn08wseAkoa6qqIQUIOD3kPmDGdgoM1ToC4KklkiDUBk4Uk/Fidp8zCJcFBMgHj+etTxbRFeHvwhf80CiSt3z3DIFYl6k1lWLVvRBn0lpMVKj6PITC0tar9jbVAPhHP8k4rhblOqCcOdqrAPy67Z1WL4TfMfVx0GLrHQJyH8iQUus8lkFKuv5kcYrNvW13YfKuZ89ORAmC15BmyKxBFilYKq8dxQRWdqGLLb8Rij6WrIs7/mxVyFptbrarK6uDO1v3yxzOWQjtaz2W/01pTvN/Omyfx8D2VGPK80olW8HfnliYW8J7UjIcIlewB+DJW6whrBEqHlPOAQ8W/xs1Hn5GmuasOM+K9M5T9RYI+PMwnvMsCTG6r+dbVXfMESA2YjneGLq0D1CQv4w2JrzNXBsshiH+QHHQa2Mr/AZ4I3FCYwSF30Bqgti3TOnZKmjAfxUANcv/0JqQQ2HHnOhMOwJodHns6/25Jg743Q1lQ+KbmEPuPq51Bt83snYTH17IxKtNv2roT2epeJDTPX4a0X9SZHNHJqSie0RtRDgKb5JGNRAJr4h2aypQVI68DWseD13hXjPfFQtgcpsWw3+bHWbYNMQ5bN4cjo9d8aBirB8/oJdnePZQoxNeCAZZbotwjOCA0wROeUdcuZjnmA4UdjXjcB5b5xb9AZYmwdFSH2DdhvscW5z5QnIMnYTFRngKajbkSdjvvVyWw6LwIJWxlYhshBPGlg4xDUFZOFLf2UlA4MUe8DA8TIea+IX2smNzuP0vmleE8ArQR+UsNqTqekrljgz0+vhX5+FaB5qs3t9J5cPuwScX+MPS/UkluQXNh5WrJFM9p4CGban0P71P43YKxglb2X+cyKQ94h/diX4v9RaCpnBsnLBEiBNo/0idpiYrznuGrJbXrCBGfcS8UOZNOTvW4hnUTwJkuVcBHodNx3R8t5LtTDmf9/EmsNByWOE4XyHplSzut+ilAlOYAW6FAoMlRP17j9CYvp40MImU7d5GfS2Drx+GW3yciuygcSeJPwW0wzd8Jx7iITtZPchNXC6aPAtKQrB2xa8z53r/+NXr2nhyLPFySAhSY0IYOQBgKT6h3kSWUhtwoeuSh11H23xn6OOue1lRwSZFtnWn9cdSaaEGqWp9dYsa7+ChyZcubQzxJjXzXLk9h89vBXfZGDIlvpsP4QIbmPMjqxhqsBfefv19nkI6ATGqFQsHNSKV1bi5RDhNzYOR3Ckunra8gfjADKT/ll0bAtT+Gyj2d7NLfv1oX/s3Dxbwcs6upK916xmn4Cn9qoUPECeybc02KdxfxGRB0zT8l0Zikliu1neuQQ0TmnzytBG1jCdcA7AUAfwLbEnAjIqNRI/tr3AS3HHzaJJ1AVHLTuHM72nkWqYVDDf+j66wmI+h8Lmvxl4OGEXnX3JOrwBz08R7ELtwHigs810rOj0viiWN/+sC7Ni5oBKQ6bZk8eHN3PYLZzQgVjEb5jNex3lMrEC0EzpQ3faNx4xd523exujDDnuf5ZP5S7v7/UuKqkqW2X94NfxXy7549ho3WWi6n1Vt7ABUIeJc5cdqWkRZrf4aNACabeODzxEINKtnW6CGh5734US98i9pjARiQfrdT+ax6iuaQ68hRSbykUQcJUr4DoFBkm4wgd2hq4tBIt5iGqkmIYjIK97X2Ac+y7Al6Eas2r5VF3EkYVixIGsqzlkm0RXA05xqwaznFZjzk8V80Y+iIDhMyNdfSpEMp3IheR2cbKGSnSfWK1HK5rU73te+Y+mp46Jt6oD3xe3/MKUzoD2UBzNmu3iQW2uCJHd2ne9t/x3h7lnn4kBxCEAK//UgVlyjyz9W5JHgDWu3g3OlGHBZO/680MjgZCrLsuOfLU+5jPl2Pxck02uqzyqmPlhPA0isbdnhRis6Qh/S179zV226tq30IMf1KqJ+bHgSCHhjM64dbIL8GGt21vGOEXP+/AJcER6NjIb286TKSzTCCidNp6Zf3rpsWZnG5dNhuEqU94Fd2sYHaDOgM3A3LO9nxQazFRTOJsT7cD4eScDOsG8UfQGqlmCqM7L0/3ZpnWylRSPqBu/B+eHEfYNZO+0QTaWrYVbLURYIK4TWR8iESRGfHHQWgthnGCFSR6XhpDR2Xtq0uhr2QQvOUVv8Giw6ImYIgOdd8OPo1dxm1hQCQV84zTzso6krY75wTfRjcwV5Geb/tJ4owfFd8kC7FDPX9B9mBYVZ0zuK21vYoVpvazdgKlwKfwFKZSgPgFfDQtTRYNOvy6JNZ7OeYCWEFJq/hygT5KPD9mIbenEBsAvHdzCG/K5iPb4S4aP/YhnMDJHIP/icNM6ztIK9gkRRdA71nyoMef+2jb3neklwx0pHH2SIdKb2jwOWG3JCmYK4Iva+7eEG0a3If9Da4KaFAGMYlTTCfFBFSoyK7YMSwyuICgV8M49c7bf4VqtKi5LOaLKCJlVZ5zBpLrIr9LvsMNctO/oiM3ab/MknNJPPbnirNLPbGflQrRr2aJJYXg/QIsh8k1PXzz+z9w5gIxiXea4P0RlO2OUDqhJdvv8EBpRLy6Z9p8GR+FFKgDHcGsMkkbMnJz0q7hAhDVdF3sCfBM6hj2P4SlE5njIsBmSky6FhkNYd2UfgLt37a35+BEvupCA+Jh5kmC5dWaGeQNmz35EEQvhwZG3qxKo/RZr66hM7IJ5Won7gh78anK172Zt3buKAMKyMDjzdR9ufcCZ0zU4DOA5RKIgkAMTbytB3LQFlT5MH/An6qfRJPjj2dg5WFP3mdlZkwFePrA+3eN2Wu0A+WAFKZrztzJRibcqCweEddxU/PSGWxOnjHtOUDzfDk9lEvDDj39cFH1E9dVeQLGVI3Qgeo0M34dZ6K/3cb9BBZcZf8uS+BivagqBuLW31L60FMADuX1jiTur3n1ZrBrIgpkFO//0OmyT9qWthHcnwzLRswTdDbgUflRNCAvfaODDSX8vQLo7QBDltK42Y/OdFbS1zUYFLv6qSiV43zDiUrcAtbEqoMVBPa37+RMTuT1gmrJVH1qqYsi12cyakNWPLrTGqg9NO1KY2vPwISkCnxobu6FodJWlXUwABhb1LwveepTps6Tt0E8j+tabfLiI+MdLLWSxLqA1cJON1hz8aZkisUWXUMhNOQpLrIR062CCV3Bg0ZwlU9OhbKefT1NjDog/g2q+TAW89zQllayE0d/y9qAdSAucb3iKOXZYzSSmdealQNS1IL3qMUpowYU6uuO7LEqyPD05MgXvXy6frzzrkpBXlAx+J30gur7J4OT/ziwA3fvIcKvLAHet4sqms0BCkZk6CKbyRPu8Xqwsv5KGfYcI4thniGI9nFwFwt1bfZm9racBom20+/R8n0upa1EAueM5b9A7lN3BE9empZqOTj5NkKNeCf630MV2jeKeEP8cImJ5W9l3gYGDg1wPxxZcmBvsZ4qZXUMim6a/M2jKAsHtYvPN1A0FsH3AAbpFvCxA200RpdN9ME2nSQL2g5pg9OIw6KkYT3gKe7QmWrItoXK1c/XBbJQ6pVOca2BzfQfoOCTygsFljpEPDG+tBLrte+jUDP2DcYKLisBjhgtTZnAmgmg8/Aus/awVIZGqScBZ1xa/82qG7rzT0BDLldEs0sP5HS8oNhU3lhDue5NS0TUt0T7YTZvSGH0HEYEs97dJ7xpNO1TKokYmLWenco4PvNEsv2hQ85pcgDjlA29jwVT9IoAcXQGCnhPG8fgYyhJ64NNzBiWf5p1XdoBx+xtXoPiVbK44FcHipEqTaar9/ruKsdneZuJmevOHPOjhmtvwVVX8Nmx+/eftj7gZmxlF3ocI/n5T0byPxzPfMi24AxSQeAGjdI3Q4hc5ffAT7v7F89ZNEgj6fheuHl2hjRQlG4EMMwpiAnsm1HT499a+zKPMejH0uAfnT4JyItDTiDQ4l5DoO/sQZ0HkzGpiM8KQNwaHk0Un9WaO+yuA1ZTV9z8Jm13bqwTlfNHncIi8M/kHQMFhMF7Imo2mUw/Sox7Bh3W6UplqvEiy+g2NvVzFPCtGkHSTLuFSL2CtGzpPY+E5O0PK3HSbUnBzNBZodkNnUAlch2Zk9/9F8JuAYBirgoVpE7QyheJ33WDOysDFYMSXBdm20XfXCWcGzsGyvXE8FJN7EadsGjIDzZ+GtIUEBWuQ6o87kaDvo4eplYs4dz6P06lSSCA0yAvpXKD1djjC8dnWdYtWsLpl4Fplhje74Y6i/M7VMSQnRvD54/CC4LPzx4vghhIOzVo6bLzl7QIHPvVyM/drqBBZ3tW1lYqvXfauRfH5WHe+RcHI+xxeqDECqJ9tdXLyy9L7RqxyUaZKwmlAux+zEzdzITSRlr36YuSm0LBhTpkivodWytR6BNULFxftqF42QqKLmoog9WlYNRb4GtNm93bHuxBvV5VcOUeY6N/9xDutwbqYhaN3rIzpg1M6XfrYctTdA5Msr2v4Aydmb+Nl2/Eqw+jSXYvctmuDHYUAei0pUc6E5N1bULPEjHAr+HI3gwDjpDg0nE2fMkXneCumq9ifZR5IKUOqn0aDIfN64olrhaHfV4msozkdG/3j5HHqsf5Els8kwvDrCaK4/BXb+YzYC00mJEOu8njPsKgB9dG+FjqqeToCsJKLTvHS+iQTnqFquCJ+yCckuDaHLnP4GzroGg7BelrYZWStEFay3j+vkEuXHy3B2zG5xBqSx+/pxoEOv+OfiCfq5QMCCNq26xXC+1DZ+eQdH2jJ9FXSh9yrISZTk56jTzMIzG9+Ye+pumQffxmh2lcvPXjmNWL3PoOgRpkx4o/TZzE2y3IMtEZNxpNUlBqFlnBVXuPS0TIBkF+ZfvW3y2bGWD14zb8Cju5+wiSW1pIIRRtD0DeaxOLIvup5BZ2R2QfQVx6ryHH4H/rls/fRJy6KIdsJ/qVsWrBZaKgKOhP0GOUjA16wS+vlpcmot72SIWJWQDwyiD04TLSU6LyObtnOC2W5QA0OCGXHtlTi9Cyh95AIL8UU6AaQOaDSDfuf3DbxO4065WUdqPZ6Zj9S26jGlhDs/3mX1c4h+to5J2UwvgO3dkFtmKMBF3OuQvskMsOO8R5FnXblT4zMUpkjhs3m1ygag6zQWKfFOQCFM8jmAFtaCpCqDX77xqhE3B99uGU3UT+41SufAp9fQENvgk5lwqneywazIE9IpGT8v23sBPibAHG34mLWiivxnjk8p2S5ofshihnLQd4CU5ABpVcMX/5Hg39Jm55k+hgxugBCGIR5KmY+qz6US5/wKYimBbjTOSBlyD9OiYpWxtoLH6PcoaUdK0dW4vKR121dfMwumvgSBf8g0fsVN0w8jbplh7Df1FVC9wZuTbZStSswGJu6IngHRvBgOFag8F3hwPVNuUYjxNngNURuMvnnOvway+3l+1sK7aILbzdSzAxUCtG9/CaaHsBFIVzMWEH7upNL6Hr6P+oI4i+VqT6NyQrYUMkRXYd2P1ZjEMDaJ1rrurxTBgTfMw9cZe8SHIAz0JA7jpgDmr+InVbg0HrkFNZVhQ2uBKn75tLEZwfMp2azBhkglsAXDPx2BccwTDGmnsjRDh2jHh9ynTQY4vLqcuv/NWRlP8sFHWyxSmm38ikF1UoTywoZL0oFE4I4ujqIcvCuo+0ABPohIMdyq8EqgTcogXcYNCGdgvytDCA/fwt2eG78+OAANOgmKkOI8WdjE3FaFdqW6rx/oOBunJoqMLOwnPtv67Cw7PY8c4jFvek2G/hk1Thivu5Pf2iV8YDA8DyziBPz6MKlF9XQlRt7ZRV09nZrygwo00ME7IpFuOiEsUrd14UcCvNC/DPkbFmqB1uQIg477mFiq2niVADUYnvdjiQPNpFfMTo4yg4X+tDW3rmH2WE9E2rY0ES40wM6QRwaQL5/fepJULkj3Zc6L1ItuWmO6zXbvou399GBCPcQwB2+rRpubsw03qWL2iRyHH9Afl/YHuFYa8v7zEXDEigXJo9RAtTM4BTzElQhSgePv55AmHTo4W9v4SmkPDlLIhOpcXBK4GO2AnyzeN0MaKP7umX9bZAfc5LA84bxj3frYCxezbP9KG7QeJzevIhiAU4p/j+y2OyMV2mxNgAAAABJRU5ErkJggg==";var wM=tt(127),zI=tt.n(wM),Ck=tt(128),XT=tt.n(Ck),CP=tt(129),DP=tt.n(CP),Dk=tt(130),Mk=tt.n(Dk),Ik=tt(131),MP=tt.n(Ik),TM=tt(132),OC=tt.n(TM),IP=tt(133),EM=tt.n(IP),A1=tt(134),eT=tt.n(A1),AM=tt(135),Nx=tt.n(AM);const qC={wipe:class extends Qv{constructor(vt){super(EP.a,E1.a,{percent:0,direction:1,transition:0});let it=1;vt==="up"?it=1:vt==="down"?it=2:vt==="left"?it=3:vt==="right"&&(it=4),this.uniforms.direction=it}},fade:class extends Qv{constructor(vt){super(void 0,kC.a,{percent:0,transition:1});let it=1;vt==="out"?it=-1:vt==="in"&&(it=1),this.uniforms.transition=Math.pow(it,it)}},blinds:class extends Qv{constructor(vt){super(Q_.a,_M.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="vertical"?1:0}},checkerboard:class extends Qv{constructor(vt){super(Q_.a,SM.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="down"?1:0}},dissolve:class extends Qv{constructor(vt){super(Q_.a,Ak.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.setTextTure()}setTextTure(){this.uniforms.dissolveSampler=ps.t.from(AP)}},randombar:class extends Qv{constructor(vt){super(Q_.a,zI.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="vertical"?1:0,this.setTextTure()}setTextTure(){this.uniforms.dissolveSampler=ps.t.from(AP)}},circle:class extends Qv{constructor(vt){super(Q_.a,XT.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="out"?1:0}},box:class extends Qv{constructor(vt){super(Q_.a,DP.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="out"?1:0}},diamond:class extends Qv{constructor(vt){super(Q_.a,Mk.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="out"?1:0}},plus:class extends Qv{constructor(vt){super(Q_.a,MP.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="out"?1:0}},barn:class extends Qv{constructor(vt){super(Q_.a,OC.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="inHorizontal"?1:vt==="outHorizontal"?2:vt==="outVertical"?3:0}},strips:class extends Qv{constructor(vt){super(Q_.a,EM.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=vt==="upLeft"?1:vt==="downRight"?2:vt==="upRight"?3:0}},wedge:class extends Qv{constructor(vt){super(Q_.a,eT.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])})}},wheel:class extends Qv{constructor(vt){super(Q_.a,Nx.a,{percent:0,transition:1,rect:new Float32Array([0,0,0,0])}),this.uniforms.option=Number(vt)||1}}};class Rk extends hS{constructor(it){var lt;super(it),this.filterType="",this.isConflict=!1,this.activeWhenConflict="prev",this.removeTimeout=null,this.onTimeUpdate=({duration:Dt,delta:Lt})=>{var $t;const Xt=Lt/Dt;if(this.filter){this.filter.percent=this.commonTimeNode.applyTimeFilter(Xt);const Yt=($t=this.timingTarget)===null||$t===void 0?void 0:$t.container.getBounds();Yt&&(this.filter.uniforms.uBoundRect=new Float32Array([Yt.x,Yt.y,Yt.width,Yt.height]))}Xt>=1&&this.timingTarget&&(this.removeTimeout=this.ctx.clock.setTimeout(()=>{this.removeFilter(),this.removeTimeout=null},34))},this.onSeekToStart=()=>{this.timingTarget&&this.removeFilter()},this.onSeekToEnd=()=>{this.timingTarget&&this.removeFilter()},this.onDestroy=()=>{this.removeFilter()},this.commonTimeNode.on("timelineStart",()=>{this.removeTimeout&&(this.ctx.clock.clearTimeout(this.removeTimeout),this.removeTimeout=null),this.filter&&this.timingTarget&&(this.timingTarget.container.filters&&this.timingTarget.container.filters.length!==0?this.timingTarget.container.filters.push(this.filter):this.timingTarget.container.filters=[this.filter])}),this.commonTimeNode.on("timeNodeDestroy",this.onDestroy),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate);let pt=1;it.json.transition==="out"&&(pt=-1);const _t=(lt=it.json.filter)===null||lt===void 0?void 0:lt.match(/^([a-zA-Z]+)(\((.+)\))?/);if(_t){const Dt=_t[1],Lt=_t[3];qC[Dt]&&(this.filter=new qC[Dt](Lt),this.filterType=`${Dt}-${Lt}`,this.filter&&(this.filter.transition=pt))}}get modifyAttrKey(){return this.filterType}removeFilter(){var it;if(!(!((it=this.timingTarget)===null||it===void 0)&&it.container.filters)||!this.filter)return;const lt=this.timingTarget.container.filters.findIndex(pt=>pt===this.filter);lt>=0&&this.timingTarget.container.filters.splice(lt,1)}}class RP extends hS{constructor(it){super(it),this.isConflict=!0,this.activeWhenConflict="next",this.startPos=null,this.onTimeNodeStart=()=>{var lt,pt;this.startPos={x:((lt=this.timingTarget)===null||lt===void 0?void 0:lt.ppt_x)||0,y:((pt=this.timingTarget)===null||pt===void 0?void 0:pt.ppt_y)||0}},this.onTimeUpdate=({duration:lt,delta:pt})=>{var _t;const Dt=pt/lt,Lt=(_t=this.path)===null||_t===void 0?void 0:_t.getPoint(Dt);this.timingTarget&&Lt&&(this.timingTarget.ppt_x=Lt.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=Lt.y+ +this.timingTarget.design_ppt_y)},this.onSeekToStart=()=>{this.timingTarget&&this.startPos&&(this.timingTarget.ppt_x=this.startPos.x,this.timingTarget.ppt_y=this.startPos.y)},this.onSeekToEnd=()=>{var lt,pt,_t;const Dt=(pt=(lt=this.commonTimeNode.json)===null||lt===void 0?void 0:lt.spd)!==null&&pt!==void 0?pt:1,Lt=(_t=this.path)===null||_t===void 0?void 0:_t.getPoint(Dt>0?1:0);this.timingTarget&&Lt&&(this.timingTarget.ppt_x=Lt.x+this.timingTarget.design_ppt_x,this.timingTarget.ppt_y=Lt.y+this.timingTarget.design_ppt_y)},this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeDestroy",this.onSeekToStart),this.createPath()}get modifyAttrKey(){return"motion"}createPath(){var it;const lt=new Q0,pt=(it=this.json.path)===null||it===void 0?void 0:it.match(/[MLCmlc][^MLCmlc]+/g);if(pt)for(const _t of pt){const[Dt,...Lt]=_t.trim().replace(/\s+/g," ").split(" ");if(Dt==="M"){const[$t,Xt]=Lt.map(Yt=>Number(Yt));lt.moveTo($t,Xt)}else if(Dt==="L"){const[$t,Xt]=Lt.map(Yt=>Number(Yt));lt.lineTo($t,Xt)}else if(Dt==="C"){const[$t,Xt,Yt,Zt,lr,xr]=Lt.map(wr=>Number(wr));lt.bezierCurveTo($t,Xt,Yt,Zt,lr,xr)}else if(Dt==="Z")lt.closePath();else if(Dt==="E")console.warn("not implements");else if(Dt==="c"){const[$t,Xt,Yt,Zt,lr,xr]=Lt.map(Ir=>Number(Ir)),wr=lt.currentPoint;lt.bezierCurveTo($t+wr.x,Xt+wr.y,Yt+wr.x,Zt+wr.y,lr+wr.x,xr+wr.y)}else if(Dt==="l"){const $t=lt.currentPoint,[Xt,Yt]=Lt.map(Zt=>Number(Zt));lt.lineTo(Xt+$t.x,Yt+$t.y)}else if(Dt==="m"){const $t=lt.currentPoint,[Xt,Yt]=Lt.map(Zt=>Number(Zt));lt.moveTo(Xt+$t.x,Yt+$t.y)}}this.path=lt}}class CM extends hS{constructor(it){var lt;super(it),this.isConflict=!0,this.activeWhenConflict="next",this.startVal=null,this.createVal=null,this.onTimelineStart=pt=>{pt.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:pt,delta:_t})=>{var Dt,Lt,$t,Xt,Yt;const Zt=_t/pt,lr={x:1,y:1};if(this.to){const xr=(Dt=this.from)!==null&&Dt!==void 0?Dt:{x:($t=(Lt=this.startVal)===null||Lt===void 0?void 0:Lt.x)!==null&&$t!==void 0?$t:1,y:(Yt=(Xt=this.startVal)===null||Xt===void 0?void 0:Xt.y)!==null&&Yt!==void 0?Yt:1};lr.x=xr.x+(this.to.x-xr.x)*Zt,lr.y=xr.y+(this.to.y-xr.y)*Zt}else if(this.by){const xr={x:this.by.x,y:this.by.y};lr.x=1+(xr.x-1)*Zt,lr.y=1+(xr.y-1)*Zt}this.timingTarget&&(this.timingTarget.scale=lr)},this.onTimeNodeStart=()=>{this.timingTarget&&(this.startVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})},this.onSeekToStart=()=>{this.timingTarget&&this.startVal&&(this.timingTarget.scale=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.onDestroy=()=>{this.createVal!==null&&this.timingTarget&&(this.timingTarget.scale=this.createVal)},this.from=it.json.from,this.to=it.json.to,this.by=it.json.by,this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeDestroy",this.onSeekToStart),!((lt=this.timingTarget)===null||lt===void 0)&&lt.scale.x&&(this.createVal={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}get modifyAttrKey(){return"scale"}updateCurrentValue(){this.timingTarget&&(this.current={x:this.timingTarget.scale.x,y:this.timingTarget.scale.y})}}class Pk extends hS{constructor(it){super(it),this.isConflict=!1,this.activeWhenConflict="next",this.isTimelineStart=!1,this.startColorString=null,this.currentColorString="#FFFFFFFF",this.onTimelineStart=lt=>{if(this.isTimelineStart)return;this.isTimelineStart=!0,lt.isReverse||this.updateCurrentValue(),this.from.isInit()||this.from.fromHexString(this.currentColorString),this.to.isInit()||this.from.by(this.by,this.to);const pt=this.json.cBhvr.attrList[0],[_t]=pt.split(".");J1(this.timingTarget,_t+".on","true")},this.onTimeNodeEnd=()=>{const lt=this.json.cBhvr.attrList[0];if(this.json.cBhvr.ctn.fill==="remove"){const[pt]=lt.split(".");J1(this.timingTarget,pt+".on","false")}this.isTimelineStart=!1},this.onSeekToStart=()=>{var lt;const pt=this.json.cBhvr.attrList[0];if(this.timingTarget){this.onTimeUpdate({duration:1,delta:0});const _t=pt==="ppt_c.color"||pt==="text.color";if(((lt=this.timingTarget.fill)===null||lt===void 0?void 0:lt.designColor.toUpperCase())===this.from.toHexString().toUpperCase()||_t){const[Dt]=pt.split(".");J1(this.timingTarget,Dt+".on","false")}}},this.onTimeNodeStart=()=>{if(this.timingTarget){const lt=this.json.cBhvr.attrList[0],pt=RC(this.timingTarget,lt);pt&&(this.startColorString=pt)}},this.onTimeUpdate=({delta:lt,duration:pt})=>{const _t=lt/pt;if(this.to.interpolationFrom(this.from,_t,this.target),this.timingTarget){const Dt=this.json.cBhvr.attrList[0];J1(this.timingTarget,Dt,this.target.toHexString())}},this.onSeekToEnd=()=>{this.isTimelineStart||this.onTimelineStart({isReverse:!1,activeCount:0,id:""}),this.onTimeUpdate({duration:1,delta:1})},this.replaceAttrToRelation(),this.json.clrSpc==="rgb"?(this.from=new ZD(this.json.from),this.to=new ZD(this.json.to),this.by=new ZD(this.json.by),this.target=new ZD):(this.from=new wC(this.json.from),this.to=new wC(this.json.to),this.by=new wC(this.json.by),this.target=new wC),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeNodeEnd",this.onTimeNodeEnd),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeDestroy",this.onSeekToStart)}replaceAttrToRelation(){const it=this.json.cBhvr.attrList[0];it!=="ppt_c"?it==="style.color"&&(this.json.cBhvr.attrList[0]="text.color"):this.json.cBhvr.attrList[0]="ppt_c.color"}get modifyAttrKey(){return this.json.cBhvr.attrList[0]}updateCurrentValue(){if(this.timingTarget){const it=this.json.cBhvr.attrList[0],lt=RC(this.timingTarget,it);lt&&(this.currentColorString=lt)}}}class C1 extends hS{constructor(it){super(it),this.isConflict=!1,this.activeWhenConflict="next",this.startVal=null,this.createVal=null,this.lastVal=null,this.onTimelineStart=lt=>{this.lastVal=null,lt.isReverse||this.updateCurrentValue()},this.onTimeUpdate=({duration:lt,delta:pt})=>{const _t=pt/lt;let Dt=0,Lt=0;if(this.from!==void 0&&this.to!==void 0){Dt=this.from,Lt=this.to;const $t=Dt+(Lt-Dt)*_t;this.timingTarget&&(this.timingTarget.r=$t)}else if(this.by!==void 0){this.lastVal||(this.lastVal=0);const $t=this.by*_t-this.lastVal;this.lastVal=this.by*_t,this.timingTarget&&(this.timingTarget.r+=$t)}},this.onTimeNodeCreate=()=>{var lt;WS()((lt=this.timingTarget)===null||lt===void 0?void 0:lt.r)&&(this.createVal=this.timingTarget.r)},this.onTimeNodeStart=()=>{var lt;WS()((lt=this.timingTarget)===null||lt===void 0?void 0:lt.r)&&(this.startVal=this.timingTarget.r)},this.onSeekToStart=()=>{this.timingTarget&&this.startVal!==null&&(this.timingTarget.r=this.startVal)},this.onSeekToEnd=()=>{this.onTimeUpdate({duration:1,delta:1,isReverse:!1})},this.onDestroy=()=>{this.timingTarget&&this.createVal!==null&&(this.timingTarget.r=this.createVal),this.startVal=null},this.from=this.json.from,this.to=this.json.to,this.by=this.json.by,this.by?this.isConflict=!1:this.isConflict=!0,this.onTimeNodeCreate(),this.commonTimeNode.on("timeNodeStart",this.onTimeNodeStart),this.commonTimeNode.on("timeNodeCreate",this.onTimeNodeStart),this.commonTimeNode.on("timelineStart",this.onTimelineStart),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("timeNodeDestroy",this.onDestroy)}get modifyAttrKey(){return"rotate"}updateCurrentValue(){var it;this.currentVal=(it=this.timingTarget)===null||it===void 0?void 0:it.r}}class JS extends hS{constructor(it){super(it),this.isConflict=!1,this.activeWhenConflict="next",this.isApplied=!1,this.onTimeUpdate=()=>{var lt,pt;const{cmd:_t,cmdType:Dt}=this.json;!this.isApplied&&_t&&Dt&&(this.isApplied=!0,(pt=(lt=this.timingTarget)===null||lt===void 0?void 0:lt.cmd)===null||pt===void 0||pt.applyCommand(_t,Dt))},this.onSeekToStart=()=>{var lt,pt;this.commonTimeNode.isInInteractiveSeq||(pt=(lt=this.timingTarget)===null||lt===void 0?void 0:lt.cmd)===null||pt===void 0||pt.applyCommand("custom-pause","call")},this.onSeekToEnd=()=>{},this.commonTimeNode.on("timeNodeStart",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeNodeEnd",()=>{this.isApplied=!1}),this.commonTimeNode.on("timeUpdate",this.onTimeUpdate),this.commonTimeNode.on("seekToStart",this.onSeekToStart),this.commonTimeNode.on("seekToEnd",this.onSeekToEnd)}get modifyAttrKey(){var it,lt,pt,_t;return((lt=(it=this.json)===null||it===void 0?void 0:it.cmd)!==null&&lt!==void 0?lt:"")+((_t=(pt=this.json)===null||pt===void 0?void 0:pt.cmdType)!==null&&_t!==void 0?_t:"")}}class PP{constructor(it){this.runtimeNodeEventHub=new em.a,this.onVolumeUpdate=Lr=>{this.audio.volume(Lr)},this.stopAudio=()=>{this.audio.stop()},this.destroy=()=>{this.stopAudio(),this.audio.destroy(),this.ctx.activeMedia.delete(this.audio),this.ctx.volumeAdjuster.off("update",this.onVolumeUpdate)};const{json:lt,isIterate:pt,isSub:_t,eventHub:Dt,ctx:Lt,parent:$t,iterateType:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr}=it;this.json=lt,this.id=lt.cMediaNode.ctn.id,this.commonTimeNode=new f0({json:lt.cMediaNode.ctn,isSub:_t,eventHubs:{global:Dt,runtime:this.runtimeNodeEventHub},ctx:Lt,parent:$t,isIterate:pt,iterateType:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr});let wr=lt.cMediaNode.tgtEl;const[Ir,kr]=wr.split("dynamicConvert");kr&&(wr=`${Lt.prefix}${kr}`),Lt.loaderDelegate&&(wr=Lt.loaderDelegate.redirectMedia(wr),Lt.logger.info(`redirect media url from ${lt.cMediaNode.tgtEl} to ${wr} by delegate.`,Lt.taskId)),this.audio=new IC(wr,Lt.runningAudio,void 0,{enableWebAudio:Lt.enableWebAudio}),Lt.activeMedia.add(this.audio),this.commonTimeNode.on("timelineStart",()=>{this.audio.volume(Lt.volumeAdjuster.volume),this.audio.play()}),this.commonTimeNode.on("seekToStart",this.stopAudio),this.commonTimeNode.on("seekToEnd",this.stopAudio),this.commonTimeNode.on("timeNodeDestroy",this.destroy),this.ctx=Lt,this.ctx.volumeAdjuster.on("update",this.onVolumeUpdate)}}function GI(vt){return(function(it){return!!it?.cBhvr})(vt)?vt.cBhvr.ctn:(function(it){var lt;return!!(!((lt=it?.cMediaNode)===null||lt===void 0)&&lt.ctn)})(vt)?vt.cMediaNode.ctn:vt.ctn}var Nk=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class f0 extends em.a{constructor(it){var lt,pt;super(),this.uuid=Yw(),this.isSub=!1,this.isShadow=!1,this.startCount=0,this.applyCount=0,this.isReverse=!1,this.isConflictDispose=!1,this.isIterateEnd=!1,this.parentTimeNode=null,this.isActive=!1,this.isDestroy=!1,this.shouldSeekOnStart=!1,this.repeatTimeoutId="",this.iterateShadows=[],this.isEndEventsEmitted=!1,this.tmFilter=[],this.timeDelta=0,this.isIterate=!1,this.iterateType="el",this.iterateIndex=0,this.children=[],this.subList=[],this.duration=0,this.isNegativeSpeed=!1,this.handleEndCond=()=>{this.isActive&&(this.isActive=!1,this.isInfiniteRepeat()?this.repeatTimeNodeEnd():this.seekToEnd(!1,!0))},this.handleActive=(Xr=!0)=>{if(this.isActive=!0,this.isConflictDispose=!1,this.applyCount+=1,this.json.iterate||this.emit("timeNodeStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startCount>0&&this.json.restart){if(this.json.restart==="never")return;this.json.restart!=="whenNotActive"&&this.json.restart!=="always"||(this.seekToStart(),this.emit("timeNodeRestart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.startTimeLine(Xr))}else this.startTimeLine(Xr)},this.updateTimeLine=Xr=>{const _n=Xr/(N0.b.TARGET_FPMS||.06);this.timeDelta+=_n,this.duration-this.timeDelta<=_n&&(this.timeDelta=this.duration),this.timeDelta<this.duration?this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?this.duration-this.timeDelta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}):(this.emit("timeUpdate",{delta:this.isReverse||this.isNegativeSpeed?0:this.duration,duration:this.duration,isReverse:this.isReverse}),this.onTimeLineEnd())},this.handleEnd=(Xr=!1)=>{(this.isTimeNodeEnd()||Xr)&&(this.isActive=!1,this.isSub&&this.destroy(),this.emitEndEvents())};const{isSub:_t,isIterate:Dt,ctx:Lt,eventHubs:$t,parent:Xt,json:Yt,iterateType:Zt,iterateId:lr,iterateIndex:xr,isInInteractiveSeq:wr,fromSeqId:Ir}=it;this.isSub=_t,this.fromSeqId=Ir,this.isInInteractiveSeq=wr,this.isIterate=Dt,this.parentTimeNode=Xt,this.json=Yt,this.ctx=Lt,this.iterateIndex=xr,this.eventHubs=$t,this.iterateType=Zt,this.iterateId=lr,this.tmFilter=(pt=(lt=Yt.tmFilter)===null||lt===void 0?void 0:lt.split(";").map(Xr=>Xr.split(",").map(_n=>parseFloat(_n.trim()))))!==null&&pt!==void 0?pt:[];const kr=Number(this.json.dur),Lr=this.json.spd||1;if(this.isNegativeSpeed=Lr<0,Number.isNaN(kr)||(this.duration=kr/Math.abs(Lr)),this.uuid+="--"+this.json.id,this.setPreStyle(),Yt.childTnLst&&this.createChildren(Yt.childTnLst),this.startConds=new KS(this.json.id||"",Yt.stCondLst,$t,this.ctx),this.endConds=new KS(this.json.id||"",Yt.endCondLst,$t,this.ctx),Yt.endSync&&(this.endSync=new KS(this.json.id||"",[Yt.endSync],$t,this.ctx),this.endSync.on("active",()=>{var Xr;this.json.nodeType==="interactiveSeq"&&(this.isActive=!1,this.shouldSeekOnStart=!0,this.emit("timeNodeEndSync"),(Xr=this.endSync)===null||Xr===void 0||Xr.reset())})),this.startConds.on("active",Xr=>{this.isActive||(this.shouldSeekOnStart&&(this.shouldSeekOnStart=!1,this.seekToStart()),this.handleActive(Xr))}),this.endConds.on("active",()=>{this.handleEndCond(),this.children.forEach(Xr=>Xr.commonTimeNode.handleEndCond())}),this.parentTimeNode&&this.parentTimeNode.on("timeNodeStart",()=>{this.applyCount=0}),this.isSub&&this.json.masterRel==="nextClick"){const Xr="shape slide onNext"+this.fromSeqId;this.startConds.addCond({event:Xr})}this.json.iterate&&this.isIterate===!1&&this.createIterateShadow()}createIterateShadow(){const it=Yw();let lt=!0,pt=0;const _t=Dt=>{Dt===it&&(lt=!1,this.ctx.eventHub.removeListener("IterateTimeNodeEnd",_t))};for(this.ctx.eventHub.on("IterateTimeNodeEnd",_t);lt;){const Dt=JSON.parse(JSON.stringify(this.json)),Lt=new f0({json:Dt,isSub:!1,eventHubs:this.eventHubs,ctx:this.ctx,parent:null,isIterate:!0,iterateType:Dt.iterate.type,iterateIndex:pt,iterateId:it,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId});this.iterateShadows[pt]=Lt,pt+=1}}isInfiniteRepeat(){return this.json.repeatCount>999999998}getReverse(){return this.isReverse}setReverse(it){this.isReverse=it}createTimeNode(it,lt){let pt=null;const _t={json:it,isSub:lt,isIterate:this.isIterate,eventHub:this.eventHubs.global,ctx:this.ctx,parent:this,iterateType:this.iterateType,iterateIndex:this.iterateIndex,iterateId:this.iterateId,isInInteractiveSeq:this.isInInteractiveSeq,fromSeqId:this.fromSeqId};return it.type==="seq"?pt=new mp(_t):it.type==="par"?pt=new VI(_t):it.type==="set"?pt=new PC(_t):it.type==="anim"?pt=new wP(_t):it.type==="animEffect"?pt=new Rk(_t):it.type==="animMotion"?pt=new RP(_t):it.type==="animScale"?pt=new CM(_t):it.type==="animClr"?pt=new Pk(_t):it.type==="animRot"?pt=new C1(_t):it.type==="cmd"?pt=new JS(_t):it.type==="audio"&&(pt=new PP(_t)),pt}createSubList(it){this.subList&&this.subList.forEach(lt=>lt.commonTimeNode.destroy()),this.subList=[],it.forEach(lt=>{const pt=this.createTimeNode(lt,!0);pt&&this.subList.push(pt)})}bindCommonTimeNodeEvent(it){it.commonTimeNode.on("timeNodeStart",lt=>{this.emit("childTimeNodeStart",lt)}),it.commonTimeNode.on("timeNodeEnd",lt=>{this.emit("childTimeNodeEnd",lt),this.children.every(pt=>pt.commonTimeNode.isTimeNodeEndWhenDetectEndSync())&&(this.json.iterate||this.allChildrenEndHandle())})}createChildren(it){function lt(Dt){return GI(Dt).presetOrder}function pt(Dt){return/^slide/.test(Dt)?"slide":/^layout/.test(Dt)?"layout":/^master/.test(Dt)?"master":"unknow"}const _t=["master","layout","slide","unknow"];it&&it[0]&&lt(it[0])?[...it].sort((Dt,Lt)=>{var $t,Xt,Yt,Zt;const lr=GI(Dt).id,xr=GI(Lt).id;if(lr&&xr){const wr=pt(lr),Ir=pt(xr);return wr===Ir?(($t=lt(Dt))!==null&&$t!==void 0?$t:0)-((Xt=lt(Lt))!==null&&Xt!==void 0?Xt:0):_t.indexOf(wr)-_t.indexOf(Ir)}return((Yt=lt(Dt))!==null&&Yt!==void 0?Yt:0)-((Zt=lt(Lt))!==null&&Zt!==void 0?Zt:0)}).forEach(Dt=>{const Lt=this.createTimeNode(Dt,!1);Lt&&(this.bindCommonTimeNodeEvent(Lt),this.children.push(Lt))}):it.forEach(Dt=>{const Lt=this.createTimeNode(Dt,!1);Lt&&(this.bindCommonTimeNodeEvent(Lt),this.children.push(Lt))})}playReverse(){this.isReverse=!0,this.startReverseTimeLine(),this.children.forEach(it=>it.commonTimeNode.playReverse())}allChildrenEndHandle(){if(!this.isDestroy){if(this.json.autoRev&&!this.isReverse)return this.isReverse=!0,void this.playReverse();this.isReverse&&(this.isReverse=!1),this.json.repeatCount&&this.json.repeatCount>this.applyCount?this.repeatTimeoutId=this.ctx.clock.setTimeout(()=>{this.seekToStart(!1),this.resetForRepeat(),this.startTimeNodeRepeat()}):(this.json.iterate&&!this.isIterate&&(this.isIterateEnd=!0),this.eventHubs.runtime.emit("runtime all end"),this.startSubList(),this.handleEnd())}}resetForRepeat(){this.isInInteractiveSeq&&this.isInfiniteRepeat()&&this.repeatTimeNodeEnd(),this.timeDelta=0,this.children.forEach(it=>it.commonTimeNode.resetForRepeat())}startSubList(){this.subList.forEach(it=>it.commonTimeNode.startTimeNode())}startReverseTimeLine(){this.isEndEventsEmitted=!1,this.timeDelta=0;const it=1e3/this.ctx.ticker.maxFPS;this.duration<=it&&this.duration>0?(this.emit("timeUpdate",{delta:this.duration,duration:this.duration,isReverse:this.isReverse}),this.ctx.eventHub.emit(pu.animateEnd),this.ctx.ticker.remove(this.updateTimeLine)):this.duration>it&&(this.ctx.eventHub.emit(pu.animateStart),this.ctx.ticker.add(this.updateTimeLine))}startTimeLine(it=!0){if(it&&(this.isEndEventsEmitted=!1,this.eventHubs.global.emit(`time ${this.json.id} begin`),this.eventHubs.global.emit(`time ${this.json.id} onBegin`),this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)),this.json.iterate)return void this.startIterate();this.timeDelta=0,this.emit("timelineStart",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse});const lt=1e3/this.ctx.ticker.maxFPS;this.duration<=lt&&this.duration>0?(this.timeDelta=this.isReverse?0:this.duration,this.emit("timeUpdate",{delta:this.timeDelta,duration:this.duration,isReverse:this.isReverse}),this.emit("timelineEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}),this.ctx.ticker.addOnce(()=>{this.onTimeLineEnd()})):this.duration>lt&&(this.ctx.eventHub.emit(pu.animateStart),this.updateTimeLine(0),this.ctx.ticker.add(this.updateTimeLine))}startIterate(){return Nk(this,void 0,void 0,function*(){if(this.json.iterate){this.isIterateEnd=!1;for(const it of this.iterateShadows){if(this.isIterateEnd)break;it.children.forEach(lt=>{lt.commonTimeNode.startTimeNode()}),it.applyCount+=1,yield this.ctx.clock.delay(this.json.iterate.interval)}this.onTimeLineEnd()}})}applyTimeFilter(it){if(!this.tmFilter.every(lt=>WS()(lt[0])&&WS()(lt[1])))return it;for(let lt=0;lt<this.tmFilter.length;lt++){const pt=this.tmFilter[lt];if(it<pt[0]){const _t=this.tmFilter[lt-1];return(it-_t[0])/(pt[0]-_t[0])*(pt[1]-_t[1])+_t[1]}}return this.tmFilter.length>0?this.tmFilter[this.tmFilter.length-1][1]:it}isNatureTimeEnd(){return this.duration>=0&&this.timeDelta>=this.duration}findTargets(){const it=[],lt=pt=>{pt.forEach(_t=>{var Dt,Lt,$t;_t.cBhvr&&_t.cBhvr.target&&it.findIndex(Xt=>Xt.id===_t.cBhvr.target.id)<0&&it.push(_t.cBhvr.target),!((Lt=(Dt=_t?.cBhvr)===null||Dt===void 0?void 0:Dt.ctn)===null||Lt===void 0)&&Lt.childTnLst&&_t.cBhvr.ctn.childTnLst.length>0&&lt(_t.cBhvr.ctn.childTnLst),!(($t=_t?.ctn)===null||$t===void 0)&&$t.childTnLst&&_t.ctn.childTnLst.length>0&&lt(_t.ctn.childTnLst)})};return lt(this.json.childTnLst||[]),it}setPreStyle(){this.json.presetClass&&this.findTargets().forEach(it=>{if(this.json.iterate){let lt=0,pt=!0;for(;pt;){const _t=this.ctx.timingTargets.getTarget(it,!0,{type:this.json.iterate.type,index:lt,id:""});_t&&(this.setPreStyleForTarget(_t),lt+=1),pt=!!_t}}else{const lt=this.ctx.timingTargets.getTarget(it,!1);lt&&this.setPreStyleForTarget(lt)}})}setPreStyleForTarget(it){var lt,pt;if(it&&this.json.presetSubtype&&(it.presetSubType=this.json.presetSubtype),it&&!it.hasPreset)if(this.json.presetClass==="entr"){const _t=(pt=(lt=this.json)===null||lt===void 0?void 0:lt.childTnLst)===null||pt===void 0?void 0:pt.filter(Dt=>Dt.type==="set"&&Dt.to==="visible");_t?.length&&(it.hasPreset=!0,it.style.visibility="hidden")}else(this.json.presetClass==="exit"||this.json.presetClass==="path"||this.json.presetClass==="emph")&&(it.hasPreset=!0,it.style.visibility="visible")}startTimeNodeRepeat(){this.timeDelta=0,this.isActive=!0,this.applyCount+=1,this.startTimeLine(!1),this.json.iterate||this.emit("timeNodeRepeat",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse})}startTimeNodeForce(){this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.timeDelta=0,this.isActive=!0,this.handleActive(!1)}startTimeNode(it=!0){if(this.isDestroy)return;this.collectStartValue(),this.timeDelta=0,this.isReverse=!1,this.json.subTnLst&&this.createSubList(this.json.subTnLst),this.startConds.setTriggerParams(it);const lt=this.json.stCondLst.filter(_t=>/^self/.test(_t.event||""))[0];lt&&this.startConds.condHandle(lt);const pt=this.json.endCondLst.filter(_t=>/^self/.test(_t.event||""))[0];pt&&this.endConds.condHandle(pt),this.startConds.condHandle()}onTimeLineEnd(){this.dispose(),(this.children.length===0||this.json.iterate)&&this.allChildrenEndHandle()}clearSubList(){this.subList.forEach(it=>it.commonTimeNode.destroy())}seekToStart(it=!0){if(this.isEndEventsEmitted=!1,this.isActive=!1,this.dispose(),this.timeDelta=0,this.emit("seekToStart"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(lt=>lt.seekToStart(it));if(it)for(let lt=this.subList.length-1;lt>=0;lt--){const pt=this.subList[lt];pt?.commonTimeNode.seekToStart()}for(let lt=this.children.length-1;lt>=0;lt--){const pt=this.children[lt];pt?.commonTimeNode.seekToStart()}if(this.children.length>1)for(let lt=this.children.length-1;lt>=0;lt--){const pt=this.children[lt];pt?.commonTimeNode.seekToStart()}}repeatTimeNodeEnd(){this.dispose(),this.children.forEach(it=>{it.commonTimeNode.isActive=!1,it.commonTimeNode.dispose()})}dispose(it=!1){this.isConflictDispose=it,this.ctx.clock.clearTimeout(this.repeatTimeoutId),this.ctx.eventHub.emit(pu.animateEnd);try{this.ctx.ticker.remove(this.updateTimeLine)}catch{}this.startConds.reset(),this.endConds.reset()}seekToEnd(it,lt=!1){if(this.isInfiniteRepeat())return;!this.isActive&&this.applyCount<=0&&this.collectStartValue(),this.applyCount=this.json.repeatCount,this.json.autoRev&&(this.isReverse=!0),this.timeDelta=this.duration,this.isActive=!1,this.dispose();const pt=this.json.autoRev||it;if(pt?this.emit("seekToStart"):this.emit("seekToEnd"),this.json.iterate&&!this.isIterate)return this.isIterateEnd=!0,void this.iterateShadows.forEach(_t=>_t.seekToEnd(pt,lt));this.children.length===0&&(this.eventHubs.runtime.emit("runtime all end"),this.handleEnd()),this.children.forEach(_t=>_t.commonTimeNode.seekToEnd(pt,lt)),lt&&this.json.subTnLst&&(this.subList.length<=0&&this.createSubList(this.json.subTnLst),this.subList.forEach(_t=>_t.commonTimeNode.seekToEnd(!1)),this.clearSubList())}isTimeNodeEndWhenDetectEndSync(){if(this.isInInteractiveSeq&&this.isInfiniteRepeat())return!0;let it=!0;return this.children.length>0&&(it=it&&this.children.every(lt=>lt.commonTimeNode.isTimeNodeEndWhenDetectEndSync())),this.json.repeatCount&&(it=it&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(it=it&&!this.isReverse),it=it&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||it}isTimeNodeEnd(){let it=!0;return this.children.length>0&&(it=it&&this.children.every(lt=>lt.commonTimeNode.isTimeNodeEnd())),this.json.repeatCount&&(it=it&&this.applyCount>=this.json.repeatCount),this.json.autoRev&&(it=it&&!this.isReverse),it=it&&this.isNatureTimeEnd(),!!this.isConflictDispose||!(!this.isIterateEnd||!this.json.iterate)||it}emitEndEvents(){this.isEndEventsEmitted||(this.isEndEventsEmitted=!0,this.eventHubs.global.emit(`time ${this.json.id} end`),this.eventHubs.global.emit(`time ${this.json.id} onEnd`),this.eventHubs.runtime.emit(`runtime ${this.json.id} end`),this.emit("timeNodeEnd",{id:this.uuid,activeCount:this.applyCount,isReverse:this.isReverse}))}collectStartValue(){this.emit("timeNodeCreate"),this.children.forEach(it=>it.commonTimeNode.collectStartValue())}destroy(){this.emit("timeNodeDestroy"),this.isDestroy=!0,this.dispose(),this.startConds.removeAllListeners(),this.endConds.removeAllListeners(),this.children.forEach(it=>it.commonTimeNode.destroy()),this.clearSubList()}}class VI extends em.a{constructor(it){super(),this.isRunning=!1,this.runtimeNodeEventHub=new em.a;const{json:lt,iterateType:pt,isIterate:_t,isSub:Dt,parent:Lt,ctx:$t,eventHub:Xt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr}=it;this.id=lt.ctn.id,this.json=lt,this.ctx=$t,this.isIterate=_t,this.globalEventHub=Xt,this.commonTimeNode=new f0({json:lt.ctn,isSub:Dt,eventHubs:{global:Xt,runtime:this.runtimeNodeEventHub},ctx:$t,parent:Lt,isIterate:!1,iterateType:pt,iterateIndex:Yt,iterateId:Zt,isInInteractiveSeq:lr,fromSeqId:xr}),this.commonTimeNode.on("timeNodeStart",()=>{this.commonTimeNode.children.forEach(wr=>{wr.commonTimeNode.setReverse(this.commonTimeNode.getReverse()),wr.commonTimeNode.startTimeNode()}),this.isRunning||(this.isRunning=!0,this.globalEventHub.emit(`runtime ${this.id} begin`),this.emit("begin"))}),this.commonTimeNode.on("timeNodeRepeat",()=>{this.commonTimeNode.children.forEach(wr=>{wr.commonTimeNode.startTimeNode(!1)})}),this.commonTimeNode.on("timeNodeEnd",()=>{this.commonTimeNode.isTimeNodeEnd()&&this.isRunning&&(this.isRunning=!1,this.globalEventHub.emit(`runtime ${this.id} end`),this.emit("end")),this.commonTimeNode.json.presetClass==="exit"&&this.commonTimeNode.children.length>=1&&this.commonTimeNode.children[this.commonTimeNode.children.length-1]instanceof PC&&this.commonTimeNode.children.forEach(wr=>{wr instanceof PC||typeof wr.onSeekToStart!="function"||wr.onSeekToStart()})})}}var HI=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class NP{constructor(it,lt,pt){this.json=it,this.ctx=pt,this.globalEventHub=lt;const _t=it.timeNodeList.find(Dt=>Dt.type==="par"&&Dt.ctn.nodeType==="tmRoot");_t&&(this.tmRoot=new VI({json:_t,isSub:!1,isIterate:!1,eventHub:lt,ctx:pt,parent:null,iterateType:"el",iterateIndex:0,iterateId:"",isInInteractiveSeq:!1,fromSeqId:""}),this.mainSeq=this.tmRoot.commonTimeNode.children.find(Dt=>{var Lt,$t,Xt;return((Lt=Dt.json)===null||Lt===void 0?void 0:Lt.type)==="seq"&&((Xt=($t=Dt.json)===null||$t===void 0?void 0:$t.ctn)===null||Xt===void 0?void 0:Xt.nodeType)==="mainSeq"}))}findSeq(it){var lt;return(lt=this.tmRoot)===null||lt===void 0?void 0:lt.commonTimeNode.children.find(pt=>{var _t,Dt,Lt;return((_t=pt.json)===null||_t===void 0?void 0:_t.type)==="seq"&&((Lt=(Dt=pt.json)===null||Dt===void 0?void 0:Dt.ctn)===null||Lt===void 0?void 0:Lt.id)===it})}start(){var it,lt;return HI(this,void 0,void 0,function*(){this.json.autoPlayMainSeq?(yield this.ctx.clock.delay(16),(it=this.mainSeq)===null||it===void 0||it.commonTimeNode.startTimeNode()):(lt=this.mainSeq)===null||lt===void 0||lt.commonTimeNode.startTimeNode()})}setMainSeqApplied(){this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1)}collectMainSeqStartValue(){var it;(it=this.mainSeq)===null||it===void 0||it.commonTimeNode.collectStartValue()}setMainSeqStep(it,lt){var pt;it===-1&&this.mainSeq&&(this.mainSeq.commonTimeNode.applyCount=1),(pt=this.mainSeq)===null||pt===void 0||pt.setCurrentStep(it,lt)}destroy(){var it;this.globalEventHub.removeAllListeners(),(it=this.tmRoot)===null||it===void 0||it.commonTimeNode.destroy()}hasMainSeq(){return!!this.mainSeq&&this.mainSeq.commonTimeNode.children.length>0}currentMainSeqState(){return this.mainSeq?this.mainSeq.currentState:null}currentMainSeqStep(){return this.mainSeq?this.mainSeq.currentStep:0}currentMainSeqLength(){return this.mainSeq?this.mainSeq.stepLength:0}mainSeqHasNextStep(){return!!this.mainSeq&&this.mainSeq.hasNext()}mainSeqHasPrevStep(){return!!this.mainSeq&&this.mainSeq.hasPrev()}seekInteractiveSeqToEnd(it){const lt=this.findSeq(it);lt&&lt.commonTimeNode.seekToEnd(!1,!0)}setInteractiveSeqState(it,lt,pt){const _t=this.findSeq(it);_t&&_t.setCurrentStep(lt,pt)}resetAllInteractiveSeq(){var it;(((it=this.tmRoot)===null||it===void 0?void 0:it.commonTimeNode.children.filter(lt=>{var pt,_t,Dt;return((pt=lt.json)===null||pt===void 0?void 0:pt.type)==="seq"&&((Dt=(_t=lt.json)===null||_t===void 0?void 0:_t.ctn)===null||Dt===void 0?void 0:Dt.nodeType)==="interactiveSeq"}))||[]).forEach(lt=>{lt.setCurrentStep(0,"start")})}applyInteractiveAction(it){this.globalEventHub.emit(it)}}var fA=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class tT extends QS{constructor(it,lt,pt,_t){super({id:"stage",width:it.width,height:it.height,type:"Container",children:it.children},lt,{parentGlobalPos:pt},_t),this.isRendered=!1,this.isTimingStartValueCollected=!1,this.json=it,this.json.smartArtShapeList&&(lt.smartArtShapeList=this.json.smartArtShapeList),lt.hasBackgroundFillShape=this.detectUseBackgroundFill(this.json),this.container.visible=!1,this.ctx=lt;const Dt=new wy;Dt.beginFill(16777215),Dt.drawRect(0,0,it.width,it.height),Dt.endFill(),this.container.addChild(Dt)}detectUseBackgroundFill(it){return!!it&&(it.type==="Picture"||it.type==="Shape"?it.useBgFill:!(!it.children||!Array.isArray(it.children))&&it.children.some(lt=>this.detectUseBackgroundFill(lt)))}initOnReuse(){super.initOnReuse(),this.ctx.timingEventHub.on("c:prev slide",it=>{this.ctx.eventHub.emit(pu.requestPrevSlide,it)}),this.ctx.timingEventHub.on("c:next slide",(it,lt)=>{this.ctx.eventHub.emit(pu.requestNextSlide,it,lt)})}get interactiveContainer(){return this.container}applyEffectCacheAsBitMap(it){this.children.forEach(lt=>lt.applyEffectCacheAsBitMap(it))}render(it){this.isRendered||(this.collectAnimatedIds().forEach(lt=>this.ctx.animatedIds.add(lt)),this.isRendered=!0,super.render(it),it.addSubMTask(()=>fA(this,void 0,void 0,function*(){this.ctx.eventHub.emit("StageRenderEnd")}),"@StageImpl[emit.StageRenderEnd]"))}isListTimeNode(it){return["excel","seq","par"].indexOf(it.type)>=0}isAnimatedTimeNode(it){return!!it.cBhvr}collectAnimatedIdsForTimeNode(it,lt){var pt;this.isListTimeNode(it)?(pt=it.ctn.childTnLst)===null||pt===void 0||pt.forEach(_t=>{this.collectAnimatedIdsForTimeNode(_t,lt)}):this.isAnimatedTimeNode(it)&&lt.push(it.cBhvr.target.id)}collectAnimatedIds(){const it=[];return this.json.timing&&this.json.timing.timeNodeList.forEach(lt=>{this.collectAnimatedIdsForTimeNode(lt,it)}),it}createTiming(){this.json.timing&&!this.timing&&(this.timing=new NP(this.json.timing,this.ctx.timingEventHub,this.ctx))}startTiming(){var it;return((it=this.timing)===null||it===void 0?void 0:it.start())||Promise.resolve()}setMainSeqApplied(){var it;(it=this.timing)===null||it===void 0||it.setMainSeqApplied()}setMainSeqStep(it,lt){var pt;(pt=this.timing)===null||pt===void 0||pt.setMainSeqStep(it,lt)}collectMainSeqStartValue(){var it;this.isTimingStartValueCollected||(this.isTimingStartValueCollected=!0,(it=this.timing)===null||it===void 0||it.collectMainSeqStartValue())}hasTiming(){return!!this.timing}clearOnSlideChange(){this.ctx.eventHub.removeAllListeners(),this.ctx.timingEventHub.removeAllListeners(),super.clearOnSlideChange()}clearOnTransactionEnd(){var it,lt;this.ctx.timingTargets.getTargets().forEach(pt=>{pt.hasPreset=!1}),(it=this.timing)===null||it===void 0||it.resetAllInteractiveSeq(),(lt=this.timing)===null||lt===void 0||lt.destroy(),this.timing=void 0}destroy(){var it,lt;this.isTimingStartValueCollected=!1,this.isRendered=!1,this.ctx.eventHub.removeAllListeners(),this.ctx.graphicsTexture.destroy(),(it=this.ctx.bgTexture)===null||it===void 0||it.destroy(!0),this.ctx.spriteTexture.destroy(),this.ctx.timingEventHub.removeAllListeners(),(lt=this.timing)===null||lt===void 0||lt.destroy(),this.timing=void 0,super.destroy()}mainSeqStep(){var it,lt;return(lt=(it=this.timing)===null||it===void 0?void 0:it.currentMainSeqStep())!==null&&lt!==void 0?lt:0}mainSeqLength(){var it,lt;return(lt=(it=this.timing)===null||it===void 0?void 0:it.currentMainSeqLength())!==null&&lt!==void 0?lt:0}mainSeqHasNextStep(){var it,lt;return(lt=(it=this.timing)===null||it===void 0?void 0:it.mainSeqHasNextStep())!==null&&lt!==void 0&&lt}mainSeqHasPrevStep(){var it,lt;return(lt=(it=this.timing)===null||it===void 0?void 0:it.mainSeqHasPrevStep())!==null&&lt!==void 0&&lt}mainSeqState(){return this.timing?this.timing.currentMainSeqState():null}nextStep(it,lt){var pt;this.hasTiming()&&(!((pt=this.timing)===null||pt===void 0)&&pt.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onNext",it,lt)):this.ctx.eventHub.emit(pu.requestNextSlide,it,lt)}prevStep(it=!1){var lt;this.hasTiming()&&(!((lt=this.timing)===null||lt===void 0)&&lt.hasMainSeq())?(this.ctx.timingEventHub.emit("shape slide onStopAudio"),this.ctx.timingEventHub.emit("shape slide onPrev",it)):this.ctx.eventHub.emit(pu.requestPrevSlide,it)}applyInteractiveAction(it){var lt;(lt=this.timing)===null||lt===void 0||lt.applyInteractiveAction(it)}seekInteractiveSeqToEnd(it){var lt;(lt=this.timing)===null||lt===void 0||lt.seekInteractiveSeqToEnd(it)}setInteractiveSeqState(it,lt,pt){var _t;(_t=this.timing)===null||_t===void 0||_t.setInteractiveSeqState(it,lt,pt)}setMediaState(it,lt,pt){return fA(this,void 0,void 0,function*(){const _t=this.ctx.medias[it];_t&&(lt?pt?(yield tA(()=>_t.clippedDuration>0,5e3),pt<_t.clippedDuration&&(_t.once("play",()=>{_t.seek(pt)}),yield _t.play())):yield _t.play():(pt&&_t.seek(pt),yield _t.pause()))})}setMediaCurrentTime(it,lt){const pt=this.ctx.medias[it];pt&&pt.seek(lt)}}class kP{constructor(it){this.ticker=it,this.tasks=[],this.couldRunning=!1,this.applyNext=()=>{this.tasks=this.tasks.filter(pt=>!pt.isEmpty());const lt=this.tasks[0];lt&&lt.applyNext()},it.add(this.applyNext)}addTask(it){this.tasks.push(it),it.once("task-finish",()=>{const lt=this.tasks.indexOf(it);lt>=0&&this.tasks.splice(lt,1)}),it.once("task-error",()=>{const lt=this.tasks.indexOf(it);lt>=0&&this.tasks.splice(lt,1)})}start(){this.couldRunning=!0}stop(){this.couldRunning=!1}}var OP=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};const qP=vt=>new Promise(it=>setTimeout(it,vt));class WI extends em.a{constructor(it,lt,pt){super(),this.slideIndex=it,this.taskId=lt,this.logger=pt,this.uuid=Yw(),this.isCancel=!1,this.tasks=[]}isEmpty(){return this.tasks.length===0}addMTask(it,lt){this.tasks.push({fn:it,state:"wait",sub:[],name:lt})}addSubMTask(it,lt){let pt=this.tasks.findIndex(_t=>_t.state==="running");pt<0&&(pt=0),this.tasks[pt].sub.push({fn:it,state:"wait",sub:[],name:lt})}cancel(){this.tasks=[],this.isCancel=!0}applyNext(){if(this.tasks.some(lt=>lt.state==="running")||this.tasks.some(lt=>lt.state==="error"))return;if(this.tasks.every(lt=>lt.state==="finish"))return void(this.isCancel||this.emit("task-finish"));const it=this.tasks.find(lt=>lt.state==="wait");it&&(it.state="running",it.fn.apply(null).then(()=>{if(it.state="finish",it.sub.length>0){const lt=this.tasks.findIndex(pt=>pt===it);this.tasks.splice(lt+1,0,...it.sub)}}).catch(lt=>{it.state="error",this.logger.error(`${lt} ${lt.stack}`,this.taskId),this.emit("task-error",Gm.transform(lt),this.slideIndex)}))}applyAll(){return OP(this,void 0,void 0,function*(){for(;!this.tasks.every(it=>it.state==="finish");)if(this.tasks.some(it=>it.state==="running"))yield qP(16);else{if(this.tasks.some(it=>it.state==="error"))return;{const it=this.tasks.find(lt=>lt.state==="wait");if(it){it.state="running";try{if((yield w_(()=>it.fn.apply(null),6e4))===q0)throw new Gm(Om.RuntimeError,`subtask ${it.name} apply timeout`);if(it.state="finish",it.sub.length>0){const lt=this.tasks.findIndex(pt=>pt===it);this.tasks.splice(lt+1,0,...it.sub)}}catch(lt){let pt;pt=lt?.errorType?lt:new Gm(Om.RuntimeError,`subtask ${it.name} error. ${lt}`),it.state="error",this.logger.error(`${lt} ${lt.stack}`,this.taskId),this.emit("task-error",Gm.transform(pt),this.slideIndex);break}}}}!this.isCancel&&this.tasks.every(it=>it.state==="finish")&&this.emit("task-finish")})}}var XI=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class LP{constructor(it,lt){this.renderer=it,this.localStorage=lt,this.worker=null,this.outputData=new Map,this.loadingSdfKeys=new Set;const pt=new Blob([`
self.onmessage = function(e) {
var data = e.data.data;
var key = e.data.key;
var height = Math.ceil(e.data.height);
var width = Math.ceil(e.data.width);
if (!data || !key) {
return;
}
var maxDis = 0;
var d = [];
var p = [];
var maxInt = Number.MAX_SAFE_INTEGER || 255 * 255 * 255;
var setD = function(x, y, v) { d[y * width + x] = v; };
var getD = function(x, y) { return d[y * width + x]; };
var setP = function(x, y, v) { p[y * width + x] = v; };
var getP = function(x, y) { return p[y * width + x]; };
var isContains = function(x, y) { return x >= 0 && x < width && y >= 0 && y < height; };
var isInterior = function(x, y) { return data[(y * width + x) * 4 + 3] > 10; };
for (var y = 0; y < height; ++ y) {
for (var x = 0; x < width; ++ x) {
var c = isInterior(x, y);
var t = isContains(x, y - 1) ? isInterior(x, y - 1) : false;
var b = isContains(x, y + 1) ? isInterior(x, y + 1) : false;
var l = isContains(x - 1, y) ? isInterior(x - 1, y) : false;
var r = isContains(x + 1, y) ? isInterior(x + 1, y) : false;
if (c !== t || c !== b || c !== l || c !== r) {
setD(x, y, 0);
setP(x, y, [x, y]);
} else {
setD(x, y, maxInt);
setP(x, y, [-1, -1]);
}
}
}
var f = function (x, y, dir) {
var d1 = 1;
var d2 = Math.sqrt(2);
var dx;
var dy;
var od;
switch (dir) {
case "TL": dx = -1; dy = -1; od = d2; break;
case "T": dx = 0; dy = -1; od = d1; break;
case "TR": dx = 1; dy = -1; od = d2; break;
case "L": dx = -1; dy = 0; od = d1; break;
case "R": dx = 1; dy = 0; od = d1; break;
case "BL": dx = -1; dy = 1; od = d2; break;
case "B": dx = 0; dy = 1; od = d1; break;
case "BR": dx = 1; dy = 1; od = d2; break;
}
var b = isContains(x + dx, y + dy);
var cb = b ? getD(x + dx, y + dy) : maxInt;
if (cb + od < getD(x, y)) {
var p = b ? getP(x + dx, y + dy) : [-1, -1];
var dis = Math.sqrt(Math.pow(x - p[0], 2) + Math.pow(y - p[1], 2));
setP(x, y, p);
setD(x, y, dis);
if (dis > maxDis) {
maxDis = dis;
}
}
};
for (var y = 0; y < height; ++ y) {
for (var x = 0; x < width; ++ x) {
var dirs = ["TL", "T", "TR", "L"];
for (var i = 0; i < dirs.length; ++ i) {
var dir = dirs[i];
f(x, y, dir);
}
}
}
for (var y = height - 1; y >= 0; -- y) {
for (var x = width - 1; x >= 0; -- x) {
var dirs = ["R", "BL", "B", "BR"];
for (var i = 0; i < dirs.length; ++ i) {
var dir = dirs[i];
f(x, y, dir);
}
}
}
var outputData = [];
for (var y = 0; y < height; ++ y) {
for (var x = 0; x < width; ++ x) {
outputData.push(isInterior(x, y) ? 255: 0);
outputData.push(0);
outputData.push(0);
outputData.push(Math.ceil(getD(x, y) / maxDis * 255));
}
}
self.postMessage({
key, outputData, maxDis
});
};
`],{type:"text/javascript"});this.worker=new Worker(URL.createObjectURL(pt)),this.worker.onmessage=_t=>{this.outputData.set(_t.data.key,{data:_t.data.outputData,maxDis:_t.data.maxDis})},this.outputData.set("111","222")}createSdfByWorker(it,lt,pt,_t,Dt,Lt,$t,Xt){const Yt=document.createElement("canvas");Yt.width=Dt,Yt.height=Lt;const Zt=Yt.getContext("2d");if(!Zt||!this.worker)return;Zt.drawImage($t,it,lt,pt,_t);const{data:lr}=Zt.getImageData(0,0,Dt,Lt);this.worker.postMessage({data:lr,key:Xt,width:Dt,height:Lt})}createSdf(it,lt,pt){const _t=document.createElement("canvas");_t.width=it,_t.height=lt;const Dt=_t.getContext("2d");if(!Dt)return{src:"",maxDis:1};Dt.drawImage(pt,0,0);let Lt=0;const{data:$t}=Dt.getImageData(0,0,it,lt),Xt=[],Yt=[],Zt=function(_n,On,Kn){Xt[On*it+_n]=Kn},lr=function(_n,On){return Xt[On*it+_n]},xr=function(_n,On,Kn){Yt[On*it+_n]=Kn},wr=function(_n,On){return Yt[On*it+_n]},Ir=function(_n,On){return _n>=0&&_n<it&&On>=0&&On<lt},kr=function(_n,On){return $t[4*(On*it+_n)+3]>10};for(let _n=0;_n<lt;++_n)for(let On=0;On<it;++On){const Kn=kr(On,_n),Mn=!!Ir(On,_n-1)&&kr(On,_n-1),ca=!!Ir(On,_n+1)&&kr(On,_n+1),Gn=!!Ir(On-1,_n)&&kr(On-1,_n),Qn=!!Ir(On+1,_n)&&kr(On+1,_n);Kn!==Mn||Kn!==ca||Kn!==Gn||Kn!==Qn?(Zt(On,_n,0),xr(On,_n,[On,_n])):(Zt(On,_n,Number.MAX_SAFE_INTEGER),xr(On,_n,[-1,-1]))}const Lr=function(_n,On,Kn){const Mn=Math.sqrt(2);let ca,Gn,Qn;switch(Kn){case"TL":ca=-1,Gn=-1,Qn=Mn;break;case"T":ca=0,Gn=-1,Qn=1;break;case"TR":ca=1,Gn=-1,Qn=Mn;break;case"L":ca=-1,Gn=0,Qn=1;break;case"R":ca=1,Gn=0,Qn=1;break;case"BL":ca=-1,Gn=1,Qn=Mn;break;case"B":ca=0,Gn=1,Qn=1;break;case"BR":ca=1,Gn=1,Qn=Mn}const ks=Ir(_n+ca,On+Gn);if((ks?lr(_n+ca,On+Gn):Number.MAX_SAFE_INTEGER)+Qn<lr(_n,On)){const Cs=ks?wr(_n+ca,On+Gn):[-1,-1],gs=Math.sqrt(Math.pow(_n-Cs[0],2)+Math.pow(On-Cs[1],2));xr(_n,On,Cs),Zt(_n,On,gs),gs>Lt&&(Lt=gs)}};for(let _n=0;_n<lt;++_n)for(let On=0;On<it;++On){const Kn=["TL","T","TR","L"];for(const Mn of Kn)Lr(On,_n,Mn)}for(let _n=lt-1;_n>=0;--_n)for(let On=it-1;On>=0;--On){const Kn=["R","BL","B","BR"];for(const Mn of Kn)Lr(On,_n,Mn)}const Xr=[];for(let _n=0;_n<lt;++_n)for(let On=0;On<it;++On)Xr.push(0,0,0,Math.ceil(lr(On,_n)/Lt*255));return Dt.putImageData(new ImageData(Uint8ClampedArray.from(Xr),it,lt),0,0),{src:_t.toDataURL("image/png"),maxDis:Lt}}getSdf(it,lt,pt){return XI(this,void 0,void 0,function*(){const _t=Math.ceil(lt.width),Dt=Math.ceil(lt.height),Lt=Math.ceil(lt.width-it.width)/2,$t=Math.ceil(lt.height-it.height)/2;let Xt=yield this.localStorage.getItem(`sdf-${pt}-src`),Yt=yield this.localStorage.getItem(`sdf-${pt}-maxDis`);if(!(Xt&&Yt||this.loadingSdfKeys.has(pt))){this.loadingSdfKeys.add(pt);const Zt=this.renderer.plugins.extract.image(it,"image/png");Zt.addEventListener("load",()=>{this.createSdfByWorker(Lt,$t,it.width,it.height,_t,Dt,Zt,pt)}),Zt.addEventListener("error",()=>null),yield tA(()=>!!this.outputData.has(pt),2e3),this.loadingSdfKeys.delete(pt);const lr=this.outputData.get(pt);if(lr){this.outputData.delete(pt);const xr=document.createElement("canvas");xr.width=_t,xr.height=Dt;const wr=xr.getContext("2d");if(!wr)return null;wr.putImageData(new ImageData(Uint8ClampedArray.from(lr.data),_t,Dt),0,0),Xt=xr.toDataURL("image/png"),Yt=lr.maxDis,this.localStorage.setItem(`sdf-${pt}-src`,Xt).catch(()=>{}),this.localStorage.setItem(`sdf-${pt}-maxDis`,Yt).catch(()=>{})}}return!Xt||!Yt?null:(document.createElement("img").src=Xt,ps.t.fromURL(Xt).then(Zt=>({texture:Zt,maxDis:Yt})).catch(()=>null))})}destroy(){var it;(it=this.worker)===null||it===void 0||it.terminate(),this.worker=null}}var YT=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class DM{constructor(it,lt,pt,_t,Dt,Lt,$t,Xt,Yt,Zt,lr,xr,wr,Ir,kr,Lr,Xr,_n,On){this.loader=it,this.mode=lt,this.renderer=pt,this.ticker=_t,this.view=Dt,this.clock=Lt,this.objPoolGroup=$t,this.errorChannel=Xt,this.localstorage=Yt,this.logger=Zt,this.loaderDelegate=lr,this.urlInterrupter=xr,this.isPlayerPaused=wr,this.maxResolution=Ir,this.volumeAdjuster=kr,this.forceCanvas=Lr,this.globalEventHub=Xr,this.enableWebAudio=_n,this.customLinks=On,this.currentStageIndex=0,this.cacheCount=WT.isDesktop()?2:1,this.stageStates=Object.create(null),this.stageJsons=Object.create(null),this.stageCtxs=Object.create(null),this.stageImpls=Object.create(null),this.taskId="",this.url="",this.runningAudio=new Map,this.activeMedia=new Set,this.microTaskManager=new kP(_t),this.sdfManager=new LP(pt,Yt)}setResourceData(it,lt){this.taskId=it,this.url=lt}createCtx(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>YT(this,void 0,void 0,function*(){const pt=new $N(this.loader),_t=new em.a,Dt={taskId:this.taskId,prefix:this.url,mode:this.mode,renderer:this.renderer,graphicsTexture:new UR(this.maxResolution),stageWidth:0,stageHeight:0,ticker:this.ticker,timingTargets:new GN(_t),eventHub:_t,view:this.view,medias:Object.create(null),lastViewedIndex:0,conflictTimeNodeManager:new zN,clock:this.clock,spriteTexture:pt,slideIndex:it,objectPoolGroup:this.objPoolGroup,hasBackgroundFillShape:!1,slideScopeEventHub:new em.a,logger:this.logger,sdfManager:this.sdfManager,loaderDelegate:this.loaderDelegate,runningAudio:this.runningAudio,activeMedia:this.activeMedia,isPlayerPaused:this.isPlayerPaused,timingEventHub:new em.a,maxResolution:this.maxResolution,animatedIds:new Set,volumeAdjuster:this.volumeAdjuster,forceCanvas:this.forceCanvas,globalEventHub:this.globalEventHub,latestChangeFullscreenTargetId:"",isRendering:!1,urlInterrupter:this.urlInterrupter,enableWebAudio:this.enableWebAudio};this.stageCtxs[it]=Dt}),"@StagePool[createCtx]")}loadStageJson(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>YT(this,void 0,void 0,function*(){const pt=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${it}.json`);this.stageJsons[it]=pt,this.stageCtxs[it].stageWidth=pt.width,this.stageCtxs[it].stageHeight=pt.height,this.stageCtxs[it].featureList=pt.featureList}),"@StagePool[loadStageJson]")}loadSpriteSheets(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>{const pt=this.stageJsons[it],{spriteTexture:_t,stageWidth:Dt,stageHeight:Lt}=this.stageCtxs[it],{coloredSheets:$t,sheets:Xt}=pt,Yt=$t||Xt;return Yt&&Yt.forEach(Zt=>{lt.addSubMTask(()=>{let lr=1;if(Dt>this.maxResolution.x||Lt>this.maxResolution.y){lr=this.maxResolution.x/Dt;const xr=lr*Lt;xr>this.maxResolution.y&&(lr*=this.maxResolution.y/xr)}return lr=Math.min(1,lr),_t.loadSpriteSheetItem(this.url,this.taskId,Zt,lr)},"@StagePool[spriteTexture.loadSpriteSheetItem]")}),Promise.resolve()},"@StagePool[loadSpriteSheets]")}insertCustomLinksFromScope(it,lt){it&&it.length&&it.forEach(pt=>{pt&&(pt.type==="Shape"||pt.type==="Picture"?pt.id===lt.shapeId&&(pt.hlinkClick&&this.logger.warn(`Custom link ${lt.shapeId} already has action, will force rewrite`,this.taskId),pt.hlinkClick={uuid:`customLink-${lt.pageIndex}-${lt.shapeId}`,action:"",target:lt.link}):pt.children&&this.insertCustomLinksFromScope(pt.children,lt))})}insertCustomLinks(it,lt){return lt&&lt.length&&lt.forEach(pt=>{let _t;_t=pt.shapeId.startsWith("master")?it.children[1]:pt.shapeId.startsWith("layout")?it.children[2]:it.children[3],_t?this.insertCustomLinksFromScope(_t.children,pt):this.logger.error("Cannot find scope for custom link "+pt.shapeId,this.taskId)}),it}createStage(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>{var pt;let _t=this.stageJsons[it];const Dt=this.stageCtxs[it],Lt=(pt=this.customLinks)===null||pt===void 0?void 0:pt.filter(Xt=>Xt.pageIndex===it);_t=this.insertCustomLinks(_t,Lt);const $t=new tT(_t,Dt,{x:0,y:0},lt);return this.stageImpls[it]=$t,Promise.resolve()},"@StagePool[createStage]")}preRenderStage(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>(this.stageImpls[it].preRender(lt),Promise.resolve()),"@StagePool[preRenderStage]")}createGraphicsTexture(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>YT(this,void 0,void 0,function*(){const pt=this.stageCtxs[it];pt.graphicsTexture.pack().forEach((_t,Dt)=>{lt.addSubMTask(()=>pt.graphicsTexture.render(_t,Dt,this.objPoolGroup,1),"@StagePool[graphicsTexture.render]")})}),"@StagePool[createGraphicsTexture]")}renderStage(it){const{task:lt}=this.stageStates[it];lt.addMTask(()=>YT(this,void 0,void 0,function*(){yield this.stageImpls[it].render(lt)}),"@StagePool[renderStage]")}destroyStageByIndex(it){this.stageStates[it].state==="load"&&this.stageStates[it].task.cancel(),delete this.stageStates[it],this.stageImpls[it].destroy(),delete this.stageImpls[it],delete this.stageCtxs[it]}destroyStage(){Object.keys(this.stageImpls).forEach(it=>{const lt=parseInt(it,10);Math.abs(this.currentStageIndex-lt)>this.cacheCount&&this.destroyStageByIndex(lt)})}destroyAllStage(){Object.keys(this.stageImpls).forEach(it=>{const lt=parseInt(it,10);this.destroyStageByIndex(lt)})}preloadResource(it){return YT(this,void 0,void 0,function*(){const lt=yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${it}.json`),{coloredSheets:pt,sheets:_t}=lt,Dt=pt||_t;for(const Lt of Dt){yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/${Lt}.json`);let $t=1;if(lt.width>this.maxResolution.x||lt.height>this.maxResolution.y){$t=this.maxResolution.x/lt.width;const Xt=$t*lt.height;Xt>this.maxResolution.y&&($t*=this.maxResolution.y/Xt)}$t=Math.min(1,$t),yield this.loader.fetchPng(`${this.url}/${this.taskId}/jsonOutput/${Lt}.png`,$t)}})}preload(it,lt=!1){return this.stageImpls[it]||this.stageStates[it]?Promise.resolve():new Promise((pt,_t)=>{const Dt=new WI(it,this.taskId,this.logger);Dt.on("task-error",(Lt,$t)=>{delete this.stageStates[$t],delete this.stageImpls[$t],delete this.stageCtxs[$t],this.errorChannel.emit("error",Lt,$t),_t(Lt)}),this.stageStates[it]={state:"load",task:Dt},this.createCtx(it),this.loadStageJson(it),this.loadSpriteSheets(it),this.createStage(it),this.preRenderStage(it),this.createGraphicsTexture(it),this.renderStage(it),this.microTaskManager.addTask(Dt),lt?Dt.applyAll().then(()=>{pt()}).catch(Lt=>{_t(Lt)}):Dt.once("task-finish",()=>{this.stageStates[it].state="finish",Object.keys(this.stageStates).length>2*this.cacheCount+1&&this.destroyStage(),pt()})})}getStageJson(it){return this.stageJsons[it]||null}getStage(it){return YT(this,void 0,void 0,function*(){this.currentStageIndex=it;const lt=this.stageStates[it];return lt?.state==="finish"&&this.stageImpls[it]?this.stageImpls[it]:lt?.state==="load"?(yield lt.task.applyAll(),this.stageImpls[it]):(yield this.preload(it,!0),this.stageImpls[it])})}destroy(){this.runningAudio.clear(),this.sdfManager.destroy()}}const LC=new class extends jR{createObject(){return document.createElement("img")}resetObject(vt){vt.removeAttribute("src")}};var MM=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};class t_{constructor(it){var lt;this.logger=it,this.taskId="",this.isIndexDBReady=!1,this.memoryCache=new Map,(lt=t_.localCache)===null||lt===void 0||lt.ready(pt=>{pt||(this.isIndexDBReady=!0)}).catch(()=>{it.warn("local storage not ready",this.taskId)})}get couldUseIndexDBCache(){return this.isIndexDBReady&&this.taskId.length>0}attachTaskId(it){this.taskId=it}getItem(it){return MM(this,void 0,void 0,function*(){let lt=null;if(this.couldUseIndexDBCache&&t_.localCache)try{lt=yield w_(()=>t_.localCache.getItem(`${this.taskId}/${it}`),500)}catch{}return lt=lt===q0?null:lt,lt||this.memoryCache.get(it)||null})}setItem(it,lt,pt=!1){return MM(this,void 0,void 0,function*(){if(!this.couldUseIndexDBCache)return pt&&this.memoryCache.set(it,lt),Promise.resolve();if(t_.localCache){let _t=null;try{_t=yield w_(()=>t_.localCache.setItem(`${this.taskId}/${it}`,lt).catch(()=>{pt&&this.memoryCache.set(it,lt)}),500)}catch{}_t!==q0&&_t!==null||!pt||this.memoryCache.set(it,lt)}})}dispose(){var it;this.memoryCache=new Map,this.couldUseIndexDBCache&&((it=t_.localCache)===null||it===void 0||it.keys().then(lt=>{lt.filter(pt=>pt.indexOf(this.taskId)>=0).forEach(pt=>{var _t;(_t=t_.localCache)===null||_t===void 0||_t.removeItem(pt).catch(()=>{})})}).catch(()=>{}))}}t_.localCache=null;try{t_.localCache=st.createInstance({name:"slide_local_cache",driver:st.INDEXEDDB,version:1})}catch{}const YI=new Ho.j;class QI{constructor(it){this.localStorage=it}canvas(it,lt,pt,_t){let Dt,Lt,$t,Xt=!1,Yt=!1;it&&(it instanceof ps.p?$t=it:($t=lt.generateTexture(it),Yt=!0)),$t?(Dt=$t.baseTexture.resolution,Lt=$t.frame,Xt=!1):(Dt=lt.resolution,Xt=!0,Lt=YI,Lt.width=lt.width,Lt.height=lt.height,lt.renderTexture.bind(null));const Zt=Math.floor(Lt.width*Dt+1e-4),lr=Math.floor(Lt.height*Dt+1e-4);let xr=document.createElement("canvas");xr.width=Zt,xr.height=lr;const wr=xr.getContext("2d");if(!wr)throw new Error("ctx");if(pt)wr.putImageData(pt,0,0);else{const Ir=wr.getImageData(0,0,Zt,lr),kr=new Uint8Array(4*Zt*lr),{gl:Lr}=lt;Lr.readPixels(Lt.x*Dt,Lt.y*Dt,Zt,lr,Lr.RGBA,Lr.UNSIGNED_BYTE,kr),QI.arrayPostDivide(kr,Ir.data),wr.putImageData(Ir,0,0),_t&&this.localStorage.setItem(_t,Ir).catch(()=>{})}if(Xt){const Ir=document.createElement("canvas");Ir.width=Zt,Ir.height=lr;const kr=Ir.getContext("2d");kr.scale(1,-1),kr.drawImage(xr,0,-lr),xr=Ir}return Yt&&$t?.destroy(!0),xr}static arrayPostDivide(it,lt){for(let pt=0;pt<it.length;pt+=4){const _t=lt[pt+3]=it[pt+3];_t!==0?(lt[pt]=Math.round(Math.min(255*it[pt]/_t,255)),lt[pt+1]=Math.round(Math.min(255*it[pt+1]/_t,255)),lt[pt+2]=Math.round(Math.min(255*it[pt+2]/_t,255))):(lt[pt]=it[pt],lt[pt+1]=it[pt+1],lt[pt+2]=it[pt+2])}}}class KI extends em.a{constructor(){super(...arguments),this._volume=.5}get volume(){return this._volume}set volume(it){it<0&&(it=0),it>1&&(it=1),this._volume=it,this.emit("update",this._volume)}}var QT=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})};cl.skipHello();const FP={randomBar:"RandomLines",circle:"Shape",ripple:"Ripples",wipe:"Erase",dissolve:"Dissolve",morph:"Smooth",fade:"FadeInOut",push:"Push",split:"Separation",reveal:"Display",pull:"Uncover",cover:"Cover",flash:"Flash",checker:"Checkerboard",blinds:"WindowShades",curtains:"Curtain",fallOver:"Fall",drape:"Suspension",wheel:"Clock",comb:"Combing",warp:"Scale",peelOff:"PeelOff",flip:"Flip",gallery:"Gallery",switch:"Switch",prism:"Prism",doors:"Doors"},pu={mainSeqStepChange:"mainSeqStepChange",mainSeqStateChange:"mainSeqStateChange",interactiveSeqStateChange:"interactiveSeqStateChange",interactiveSeqAction:"interactiveSeqAction",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",slideChange:"slideChange",renderStart:"renderStart",renderEnd:"renderEnd",hyperlinkTrigger:"hyperlinkTrigger",animateStart:"animateStart",animateEnd:"animateEnd",mediaSeek:"mediaSeek",mediaPlay:"mediaPlay",mediaPause:"mediaPause",mediaStop:"mediaStop",requestNextStep:"requestNextStep",requestNextSlide:"requestNextSlide",requestPrevSlide:"requestPrevSlide",requestGotoSlide:"requestGotoSlide",requestOpenUrl:"requestOpenUrl",userInput:"userInput",fullscreenChange:"fullscreenChange",changeLocalFullscreenState:"changeLocalFullscreenState",useraddLink:"useraddLink"};class C_ extends em.a{get view(){return this.app.renderer?this.app.view:null}get nextSlideIndex(){var it;return!((it=this.currentStage)===null||it===void 0)&&it.json.nextIndex?this.currentStage.json.nextIndex:this.currentIndex+1}get prevSlideIndex(){var it;return!((it=this.currentStage)===null||it===void 0)&&it.json.prevIndex?this.currentStage.json.prevIndex:this.currentIndex-1}constructor(it,lt={}){super(),this.errorChannel=new em.a,this.transactionPlayer=null,this.isForward=!0,this.drawCall=0,this.scale=1,this._isPaused=!1,this.maxResolution=new Ho.g(0,0),this.transitionResolution=new Ho.g(0,0),this.isNVIDIA=!1,this.fps=new jN,this.designWidth=0,this.designHeight=0,this.currentIndex=0,this.slideCount=0,this.runtime={drawCall:0,fps:0},this.globalEventHub=new em.a,this.globalVideoBackground=new wy,this.globalVideoSprite=new _g,this.onMousemoveTimeout=null,this.cacheFunctionMap=new Map,this.enableAutoForward=!1,this.isPlayerPaused=()=>this._isPaused,this.onWebGLLost=()=>{this.errorChannel.emit("error",new Gm(Om.CanvasCrash,"webgl context lost."))},this.fullscreenOnMousemove=({index:Dt,targetId:Lt})=>{this.globalEventHub.emit("controllerShowStatusChange",{slideIndex:Dt,targetId:Lt,status:!0}),this.onMousemoveTimeout&&clearTimeout(this.onMousemoveTimeout),this.onMousemoveTimeout=setTimeout(()=>{this.globalEventHub.emit("controllerShowStatusChange",{slideIndex:Dt,targetId:Lt,status:!1})},Px.hoverHiddeDelay)},this.fullscreenOnMouseleave=({index:Dt,targetId:Lt})=>{this.globalEventHub.emit("controllerShowStatusChange",{slideIndex:Dt,targetId:Lt,status:!1})},this.calculateFullscreenVideoPosition=Dt=>{const{width:Lt,height:$t}=Dt,{designWidth:Xt,designHeight:Yt}=this,Zt=Math.min(Xt/Lt,Yt/$t);return{x:(Xt-Lt*Zt)/2,y:(Yt-$t*Zt)/2,width:Lt*Zt,height:$t*Zt}},this.onRequestFullscreenVideo=Dt=>{const{texture:Lt,index:$t,targetId:Xt}=Dt;if($t!==this.currentIndex)return void Lt.destroy(!1);this.onRequestCancelFullscreenVideo(),this.globalVideoBackground.width=this.designWidth,this.globalVideoBackground.height=this.designHeight,this.globalVideoBackground.beginFill(0,1),this.globalVideoBackground.drawRect(0,0,this.designWidth,this.designHeight),this.globalVideoBackground.endFill(),this.globalVideoBackground.interactive=!0,this.app.stage.addChild(this.globalVideoBackground);const{x:Yt,y:Zt,width:lr,height:xr}=this.calculateFullscreenVideoPosition(Lt);this.globalVideoSprite.texture=Lt,this.globalVideoSprite.width=lr,this.globalVideoSprite.height=xr,this.globalVideoSprite.position.x=Yt,this.globalVideoSprite.position.y=Zt,this.globalVideoBackground.addChild(this.globalVideoSprite),this.globalEventHub.emit("onFullscreenChange",{status:!0,targetId:Xt,slideIndex:this.currentIndex}),this.clearFullscreenEventListenersWithAppView();const wr={handleEvent:()=>{var Ir;(Ir=this.currentStage)===null||Ir===void 0||Ir.ctx.eventHub.emit(pu.userInput)}};if(this.app.view.addEventListener("pointerdown",wr,!1),this.cacheFunctionMap.set("pointerdown",wr),WT.isDesktop()){const Ir={handleEvent:()=>{this.fullscreenOnMouseleave({index:$t,targetId:Xt})}};this.app.view.addEventListener("mouseout",Ir,!1);const kr={handleEvent:()=>{this.globalEventHub.emit("controllerShowStatusChange",{slideIndex:$t,targetId:Xt,status:!0})}};this.app.view.addEventListener("mouseover",kr,!1);const Lr={handleEvent:()=>{this.fullscreenOnMousemove({index:$t,targetId:Xt})}},Xr={handleEvent:()=>{var _n;(_n=this.currentStage)===null||_n===void 0||_n.ctx.globalEventHub.emit("togglePlayStatus",Xt)}};this.app.view.addEventListener("mousemove",Lr,!1),this.app.view.addEventListener("click",Xr,!1),this.cacheFunctionMap.set("click",Xr),this.cacheFunctionMap.set("mouseover",kr),this.cacheFunctionMap.set("mousemove",Lr),this.cacheFunctionMap.set("mouseout",Ir)}else{const Ir={handleEvent:()=>{var kr;this.fullscreenOnMousemove({index:$t,targetId:Xt}),(kr=this.currentStage)===null||kr===void 0||kr.ctx.globalEventHub.emit("togglePlayStatus",Xt)}};this.app.view.addEventListener("touchstart",Ir,!1),this.cacheFunctionMap.set("touchstart",Ir)}},this.onRequestCancelFullscreenVideo=(Dt=!1)=>{var Lt,$t;this.globalVideoSprite.texture.destroy(!1);try{this.globalVideoBackground.removeChild(this.globalVideoSprite)}catch{this.logger.error("removeChild error: PPTPlayer:1057",this.taskId)}try{this.app.stage.removeChild(this.globalVideoBackground)}catch{this.logger.error("removeChild error: PPTPlayer:1062",this.taskId)}this.globalEventHub.emit("onFullscreenChange",{status:!1,slideIndex:this.currentIndex,targetId:(Lt=this.currentStage)===null||Lt===void 0?void 0:Lt.ctx.latestChangeFullscreenTargetId}),this.clearFullscreenEventListenersWithAppView(),Dt&&this.emit(pu.changeLocalFullscreenState,{status:!1,slideIndex:this.currentIndex,targetId:($t=this.currentStage)===null||$t===void 0?void 0:$t.ctx.latestChangeFullscreenTargetId})},this.logger=it.logger,this.tracker=it.tracker,this.mode=it.mode,this.volumeAdjuster=it.volumeAdjuster,this.localStorage=new t_(this.logger),this.cachedExtract=new QI(this.localStorage),this.enableWebAudio=!!bl()(it.enableWebAudio)||it.enableWebAudio,this.enableAutoForward=!bl()(it.enableAutoForward)&&it.enableAutoForward,this.config={minFPS:bl()(lt.minFPS)?30:lt.minFPS,maxFPS:bl()(lt.maxFPS)?40:lt.maxFPS,resolution:bl()(lt.resolution)?1:lt.resolution,autoFPS:!bl()(lt.autoFPS)&&lt.autoFPS,autoResolution:!bl()(lt.autoResolution)&&lt.autoResolution,transactionBgColor:bl()(lt.transactionBgColor)?0:lt.transactionBgColor,maxResolutionLevel:this.getMaxResolution(lt.maxResolutionLevel),forceCanvas:!bl()(lt.forceCanvas)&&lt.forceCanvas,enableNvidiaDetect:!bl()(lt.enableNvidiaDetect)&&lt.enableNvidiaDetect,transitionResolutionLevel:this.getMaxResolution(lt.transitionResolutionLevel),antialias:!!bl()(lt.antialias)||lt.antialias},this.updateMaxResolutionLevel(this.config.maxResolutionLevel),this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel),this.loader=new Mm(this.localStorage,it.useLocalCache,this.logger,this.tracker,it.resourceTimeout,it.loadDelegate,it.urlInterrupter);const pt=cl.isWebGLSupported();this.app=new xo({antialias:this.config.antialias,autoDensity:!1,backgroundColor:16777215,forceCanvas:this.config.forceCanvas||!pt}),globalThis.__PIXI_APP__=this.app,this.tracker({name:"slidePlayerCreate",result:"",reason:"",payload:{webgl:pt,resolution:this.config.resolution,minFPS:this.config.minFPS,maxFPS:this.config.maxFPS,maxResolutionLevel:this.config.maxResolutionLevel,forceCanvas:this.config.forceCanvas}}),this.updateConfig(this.config),this.app.ticker.maxFPS=60,this.app.ticker.minFPS=this.config.minFPS,this.app.ticker.maxFPS=this.config.maxFPS,this.app.view.style.zIndex="1",this.app.stage.sortableChildren=!0;const _t=this.app.renderer;if(_t.gl){const{drawElements:Dt}=_t.gl,Lt=_t.gl.getExtension("WEBGL_debug_renderer_info"),$t=_t.gl.getParameter(Lt.UNMASKED_RENDERER_WEBGL);/nvidia/i.test($t)&&this.config.enableNvidiaDetect&&(this.isNVIDIA=!0),_t.gl.drawElements=(...Xt)=>{Dt.call(_t.gl,...Xt),this.drawCall+=1}}this.fps.on("update",Dt=>{if(Dt<this.config.minFPS){if(this.config.autoResolution){const Lt=.7*this.scale,$t=this.app.renderer.resolution,Xt=Math.max(Lt,$t-.1);Xt>=Lt&&this.updateResolution(Xt)}}else if(Dt>this.config.maxFPS&&this.config.autoResolution){const Lt=this.scale*this.config.resolution,$t=this.app.renderer.resolution,Xt=Math.min(Lt,$t+.1);Xt<=this.config.resolution&&this.updateResolution(Xt)}}),this.app.ticker.add(()=>{this.runtime.drawCall=this.drawCall,this.runtime.fps=Math.floor(this.app.ticker.minFPS),this.drawCall=0},null,Fy.c.LOW),this.clock=new qR(this.app.ticker),this.objPoolGroup=Yw(),this.stagePool=new DM(this.loader,this.mode,this.app.renderer,this.app.ticker,this.app.view,this.clock,this.objPoolGroup,this.errorChannel,this.localStorage,this.logger,it.loadDelegate,it.urlInterrupter,this.isPlayerPaused,this.maxResolution,this.volumeAdjuster,this.config.forceCanvas,this.globalEventHub,this.enableWebAudio,it.customLinks),this.app.view.addEventListener("webglcontextlost",this.onWebGLLost);try{this.config.forceCanvas||(this.transactionPlayer=new iy)}catch(Dt){/Error creating WebGL context/.test(Dt.message)?this.errorChannel.emit("error",new Gm(Om.CanvasCrash,"webgl context lost.")):this.errorChannel.emit("error",new Gm(Om.RuntimeWarn,Dt.message))}this.globalEventHub.on("requestFullscreen",this.onRequestFullscreenVideo),this.globalEventHub.on("requestCancelFullscreen",this.onRequestCancelFullscreenVideo),this.mode==="addLink"&&this.globalEventHub.on("user-add-click",Dt=>{this.emit(pu.useraddLink,Dt)}),this.enableAutoForward&&this.on(pu.mainSeqStepEnd,()=>{this.startAutoForwardTimer(this.currentStage)})}getMaxResolution(it){return!bl()(it)&&Number.isInteger(it)?(it<1&&(it=1),it>4&&(it=4),it):C_.platform.isAndroid()||C_.platform.isIOS()?2:4}updateMaxResolutionLevel(it){it<0&&(it=0),it>4&&(it=4);const lt=[640,960,1280,1920,3200][it],pt=[360,540,720,1080,1800][it];this.maxResolution.set(lt,pt)}updateTransitionResolutionLevel(it){it<0&&(it=0),it>4&&(it=4);const lt=[640,960,1280,1920,3200][it],pt=[360,540,720,1080,1800][it];this.transitionResolution.set(lt,pt)}updateConfig(it){bl()(it.maxFPS)||bl()(it.minFPS)||(this.config.maxFPS=it.maxFPS,this.app.ticker.maxFPS=it.maxFPS,this.config.minFPS=it.minFPS,this.app.ticker.minFPS=it.minFPS),bl()(it.resolution)||(this.config.resolution=it.resolution,this.updateResolution(this.scale*this.config.resolution)),bl()(it.autoFPS)||(this.config.autoFPS=it.autoFPS),bl()(it.autoResolution)||(this.config.autoResolution=it.autoResolution),bl()(it.transactionBgColor)||(this.config.transactionBgColor=it.transactionBgColor),this.taskId&&this.logger.info("ppt player update config: "+JSON.stringify(this.config),this.taskId),bl()(it.maxResolutionLevel)||(this.config.maxResolutionLevel=it.maxResolutionLevel,this.updateMaxResolutionLevel(this.config.maxResolutionLevel)),bl()(it.transitionResolutionLevel)||(this.config.transitionResolutionLevel=it.transitionResolutionLevel,this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel))}preload(it){return QT(this,void 0,void 0,function*(){if(it<1||it>this.slideCount)return;const lt=Date.now();this.logger.info(`preload slide ${it} begin`,this.taskId),yield this.stagePool.preload(it),this.logger.info(`preload slide ${it} end`,this.taskId),this.tracker({name:"slidePreload",reason:"",result:"",payload:{duration:Date.now()-lt,index:it}})})}preloadResource(it){return QT(this,void 0,void 0,function*(){if(it<1||it>this.slideCount)return;const lt=Date.now();this.logger.info(`preload slide resource ${it} begin`,this.taskId),yield this.stagePool.preloadResource(it),this.logger.info(`preload slide resource ${it} end`,this.taskId),this.tracker({name:"slidePreloadResource",reason:"",result:"",payload:{duration:Date.now()-lt,index:it}})})}setResourceData(it,lt){this.logger.info("ppt player init config: "+JSON.stringify(this.config),it),this.logger.info("set resource to "+lt,it),this.taskId=it,this.url=lt,this.stagePool.setResourceData(it,lt),this.localStorage.attachTaskId(it),this.loader.attachTaskId(it)}setInteractive(it){this.app.stage.interactive=it,this.app.stage.interactiveChildren=it}translateEvent(it,lt){lt.forEach(pt=>{it.on(pt,(..._t)=>{var Dt,Lt,$t,Xt;pt===pu.requestGotoSlide&&_t[0]!==this.currentIndex&&((Lt=(Dt=this.currentStage)===null||Dt===void 0?void 0:Dt.timing)===null||Lt===void 0||Lt.setMainSeqStep(0,"start"),(Xt=($t=this.currentStage)===null||$t===void 0?void 0:$t.timing)===null||Xt===void 0||Xt.destroy()),this.emit(pt,..._t)})})}clearAutoForwardTimer(){this.enableAutoForward&&this.autoForwardTimer&&(this.clock.clearTimeout(this.autoForwardTimer),this.autoForwardTimer=null)}startAutoForwardTimer(it){var lt;if(!this.enableAutoForward||!it)return;this.clearAutoForwardTimer();const pt=(lt=it.json.transition)===null||lt===void 0?void 0:lt.advTm;bl()(pt)||(this.autoForwardTimer=this.clock.setTimeout(()=>{this.view&&this.mainSeqState()!=="running"&&(this.mainSeqHasNextStep()?this.emit(pu.requestNextStep):this.currentIndex<this.slideCount?this.emit(pu.requestNextSlide,!1):this.clearAutoForwardTimer())},pt/(this.mainSeqLength()+1)))}renderSlide(it){var lt,pt,_t;return QT(this,void 0,void 0,function*(){if(this.clearAutoForwardTimer(),this._isPaused)return void this.logger.info("ppt play prevent render slide with paused state",this.taskId);const Dt=this.currentIndex,Lt=Date.now();this.logger.info("render slide "+it,this.taskId),this.emit(pu.renderStart,it);const $t=yield this.stagePool.getStage(it),Xt=`snapshot-${it}-${this.isForward?"start":"end"}`,Yt=yield this.localStorage.getItem(Xt);if(!$t)return;$t.ctx.isRendering=!0,this.translateEvent($t.ctx.eventHub,[pu.mainSeqStepChange,pu.mainSeqStateChange,pu.hyperlinkTrigger,pu.interactiveSeqAction,pu.mainSeqStepStart,pu.mainSeqStepEnd,pu.animateStart,pu.animateEnd,pu.mediaPlay,pu.mediaPause,pu.mediaSeek,pu.mediaStop,pu.requestGotoSlide,pu.requestOpenUrl,pu.requestNextSlide,pu.requestPrevSlide,pu.interactiveSeqStateChange,pu.userInput,pu.fullscreenChange,pu.changeLocalFullscreenState]),this.currentIndex=Number(it);const{width:Zt,height:lr,slideCount:xr}=$t.json;this.slideCount=xr,this.designWidth=Zt,this.designHeight=lr,(lt=this.currentStage)===null||lt===void 0||lt.clearOnSlideChange();const wr=this.currentStage;this.currentStage=$t,$t.initOnReuse(),$t.createTiming(),$t.container.visible=!0,$t.collectMainSeqStartValue(),this.isForward?$t.setMainSeqStep(0,"start"):$t.setMainSeqStep(-1,"end"),this.onRequestCancelFullscreenVideo(!0);let Ir=!1;if(cl.isWebGLSupported()&&!this.config.forceCanvas&&$t.json.transition&&$t.json.transition.type&&this.app.stage.children.length>0&&this.view&&wr){let{transition:kr}=$t.json;!this.isForward&&wr?.json.transition&&(kr=wr.json.transition);const Lr=this.getTransactionTexture(wr,this.view,null,null);this.initTransactionPlayer(kr),(pt=this.transactionPlayer)===null||pt===void 0||pt.setPrevTexture(Lr),Ir=!0}if(this.app.stage.addChild($t.container),this.updateResolution(this.config.resolution*this.scale),wr){wr.clearOnTransactionEnd();try{this.app.stage.removeChild(wr.container)}catch{this.logger.error("removeChild error: PPTPlayer:622",this.taskId)}}if($t.json.transition&&$t.json.transition.type&&this.app.stage.children.length>0&&this.view&&this.transactionPlayer&&Ir){const kr=yield this.getTransactionTexture($t,this.view,Xt,Yt);this.transactionPlayer.setNextTexture(kr),this.tracker({name:"slidePageChangePure",reason:"",result:"",payload:{duration:Date.now()-Lt,from:Dt,to:it}}),yield this.transactionPlayer.play();const Lr=this.transactionPlayer.renderer.domElement;if(this.view.parentElement&&Lr)try{this.view.parentElement.removeChild(Lr)}catch{this.logger.error("removeChild error: PPTPlayer:637",this.taskId)}(_t=this.transactionPlayer)===null||_t===void 0||_t.dispose()}this.isForward?yield $t.startTiming():$t.setMainSeqApplied(),$t.ctx.slideScopeEventHub.emit("slide-render",$t.ctx.slideIndex,this.isForward),this.emit(pu.renderEnd,it),this.emit(pu.slideChange,it),$t.ctx.isRendering=!1,this.preload(it+1).catch(kr=>{this.errorChannel.emit("error",Gm.transform(kr),it+1)}),this.preload(it-1).catch(kr=>{this.errorChannel.emit("error",Gm.transform(kr),it-1)}),this.logger.info(`render slide ${it} done, time: ${Date.now()-Lt}ms`,this.taskId),this.isForward&&this.startAutoForwardTimer($t),this.tracker({name:"slidePageChange",reason:"",result:"",payload:{duration:Date.now()-Lt,from:Dt,to:it}})})}getTransactionTexture(it,lt,pt,_t){let Dt=this.transitionResolution.x/it.json.width;Math.floor(it.json.height*Dt+1e-4)>it.json.height&&(Dt=this.transitionResolution.y/it.json.height),Dt=Math.min(1,Dt);const Lt=ps.p.create({width:it.json.width*Dt,height:it.json.height*Dt,resolution:1}),$t=new Ho.d;$t.scale(Dt,Dt),this.app.renderer.render(it.container,{renderTexture:Lt,transform:$t});const Xt=this.cachedExtract.canvas(Lt,this.app.renderer,_t,pt);return new Ft(Xt)}renderToBase64(it,lt,pt){return QT(this,void 0,void 0,function*(){const _t=yield this.stagePool.getStage(it);if(_t){const{width:Dt,height:Lt}=_t.json;this.designWidth=Dt,this.designHeight=Lt;const $t=ps.p.create({width:this.designWidth,height:this.designHeight,resolution:lt});_t.container.visible=!0,this.app.renderer.render(_t.container,{renderTexture:$t});const Xt=this.app.renderer.plugins.extract.base64($t,pt);return this.stagePool.destroyStageByIndex(it),Xt}return"__null__"})}renderMainSeqToBase64(it,lt,pt){return QT(this,void 0,void 0,function*(){const _t=[],Dt=yield this.stagePool.getStage(it);if(Dt.createTiming(),Dt){const{width:Lt,height:$t}=Dt.json;this.designWidth=Lt,this.designHeight=$t;const Xt=ps.p.create({width:this.designWidth,height:this.designHeight,resolution:lt});Dt.container.visible=!0;const Yt=Dt.mainSeqLength();Dt.setMainSeqStep(0,"start"),this.app.renderer.render(Dt.container,{renderTexture:Xt});const Zt=this.app.renderer.plugins.extract.base64(Xt,pt);_t.push(Zt);for(let lr=0;lr<Yt;lr+=1){Dt.setMainSeqStep(lr,"end"),this.app.renderer.render(Dt.container,{renderTexture:Xt});const xr=this.app.renderer.plugins.extract.base64(Xt,pt);_t.push(xr)}}return _t})}snapshotWithTimingEnd(it){return QT(this,void 0,void 0,function*(){const lt=yield this.stagePool.getStage(it);if(lt){const{width:pt,height:_t}=lt.json;this.designWidth=pt,this.designHeight=_t;const Dt=ps.p.create({width:this.designWidth,height:this.designHeight,resolution:1});lt.container.visible=!0,lt.initOnReuse(),lt.createTiming(),lt.collectMainSeqStartValue(),lt.setMainSeqStep(-1,"end"),this.app.renderer.render(lt.container,{renderTexture:Dt});const Lt=this.app.renderer.plugins.extract.base64(Dt,"image/png");return it!==this.currentIndex&&this.stagePool.destroyStageByIndex(it),Lt}return null})}getBase64(it){if(!it.container.transform)return null;const lt=ps.p.create({width:this.designWidth,height:this.designHeight,resolution:1});this.app.renderer.render(it.container,{renderTexture:lt});const pt=this.app.renderer.plugins.extract.base64(lt,"image/jpeg");return lt.destroy(!0),pt}initTransactionPlayer(it){var lt,pt,_t,Dt,Lt;const $t=(lt=this.view)===null||lt===void 0?void 0:lt.parentElement;if(this.view&&$t&&FP[it.type]&&this.transactionPlayer){const Xt=(pt=this.transactionPlayer)===null||pt===void 0?void 0:pt.renderer.domElement;this.transactionPlayer.initPlayer({reverse:!this.isForward,stageWidth:this.view.width,stageHeight:this.view.height,presetType:FP[it.type],duration:(Dt=(_t=this.currentStage)===null||_t===void 0?void 0:_t.json.transition)===null||Dt===void 0?void 0:Dt.dur,delay:0,clearColor:this.config.transactionBgColor,maxFPS:Math.ceil((Lt=this.config.maxFPS)!==null&&Lt!==void 0?Lt:60),options:it.options}),Xt&&(Xt.style.position="absolute",Xt.style.zIndex="9",Xt.style.left="0",Xt.style.top="0",Xt.style.width=this.view.style.width,Xt.style.height=this.view.style.height),$t.appendChild(Xt)}}scaleView(it,lt,pt){var _t;this.view&&(this.view.style.width=Math.floor(this.designWidth*it)+"px",this.view.style.height=Math.floor(this.designHeight*it)+"px");const Dt=(_t=this.transactionPlayer)===null||_t===void 0?void 0:_t.renderer.domElement;if(Dt&&this.view&&(Dt.style.width=this.view.style.width,Dt.style.height=this.view.style.height),lt){this.scale=it;const Lt=this.scale*this.config.resolution;this.updateResolution(Lt,pt)}}updateResolution(it,lt){this.app.ticker.addOnce(()=>{let pt=WT.isDesktop()?it:1;for(;pt*this.designWidth>this.maxResolution.x||pt*this.designHeight>this.maxResolution.y;)pt-=.1;this.app.renderer.resolution=pt,this.app.renderer.plugins.interaction.resolution=this.app.renderer.resolution,this.app.renderer.resize(this.designWidth,this.designHeight),Dp()(lt)&&lt()})}nextStep(it,lt){var pt;if(this._isPaused)this.logger.info("ppt play prevent next step with paused state",this.taskId);else{this.logger.info("ppt play trigger next step",this.taskId);try{this.onRequestCancelFullscreenVideo(!0),(pt=this.currentStage)===null||pt===void 0||pt.nextStep(it,lt)}catch(_t){this.errorChannel.emit("error",Gm.transform(_t),this.currentIndex)}}}prevStep(it=!1){var lt;if(this._isPaused)this.logger.info("ppt play prevent prev step with paused state",this.taskId);else{this.logger.info("ppt play trigger prev step",this.taskId);try{this.clearAutoForwardTimer(),this.onRequestCancelFullscreenVideo(!0),(lt=this.currentStage)===null||lt===void 0||lt.prevStep(it)}catch(pt){this.errorChannel.emit("error",Gm.transform(pt),this.currentIndex)}}}mainSeqLength(){var it,lt;return(lt=(it=this.currentStage)===null||it===void 0?void 0:it.mainSeqLength())!==null&&lt!==void 0?lt:0}mainSeqStep(){var it,lt;return(lt=(it=this.currentStage)===null||it===void 0?void 0:it.mainSeqStep())!==null&&lt!==void 0?lt:0}setMainSeqStep(it,lt){var pt;(pt=this.currentStage)===null||pt===void 0||pt.setMainSeqStep(it,lt)}mainSeqState(){var it,lt;return(lt=(it=this.currentStage)===null||it===void 0?void 0:it.mainSeqState())!==null&&lt!==void 0?lt:null}mainSeqHasNextStep(){var it,lt;return(lt=(it=this.currentStage)===null||it===void 0?void 0:it.mainSeqHasNextStep())!==null&&lt!==void 0&&lt}mainSeqHasPrevStep(){var it,lt;return(lt=(it=this.currentStage)===null||it===void 0?void 0:it.mainSeqHasPrevStep())!==null&&lt!==void 0&&lt}nextTick(it){this.app.ticker.addOnce(()=>{it()},Fy.c.LOW)}applyInteractiveAction(it){var lt;(lt=this.currentStage)===null||lt===void 0||lt.applyInteractiveAction(it)}seekInteractiveSeqToEnd(it){var lt;(lt=this.currentStage)===null||lt===void 0||lt.seekInteractiveSeqToEnd(it)}setInteractiveSeqState(it,lt,pt){var _t;(_t=this.currentStage)===null||_t===void 0||_t.setInteractiveSeqState(it,lt,pt)}setMediaState(it,lt,pt){var _t;return QT(this,void 0,void 0,function*(){yield(_t=this.currentStage)===null||_t===void 0?void 0:_t.setMediaState(it,lt,pt)})}setMediaCurrentTime(it,lt){var pt;(pt=this.currentStage)===null||pt===void 0||pt.setMediaCurrentTime(it,lt)}pause(){var it;this.app.ticker.stop(),(it=this.currentStage)===null||it===void 0||it.ctx.activeMedia.forEach(lt=>{lt.globalPause()}),this._isPaused=!0}resume(){var it;this._isPaused=!1,this.app.ticker.start(),(it=this.currentStage)===null||it===void 0||it.ctx.activeMedia.forEach(lt=>{lt.globalResume()})}getSnapshot(){return this.currentStage&&this.getBase64(this.currentStage)||""}clearLocalCache(){this.localStorage.dispose()}static clearLocalCache(){var it;(it=t_.localCache)===null||it===void 0||it.clear().catch(()=>{})}clearFullscreenEventListenersWithAppView(){["mousemove","click","mouseout","mouseover","touchstart","pointerdown"].forEach(it=>{this.cacheFunctionMap.has(it)&&(this.app.view.removeEventListener(it,this.cacheFunctionMap.get(it),!1),this.cacheFunctionMap.delete(it))})}syncFullscreenVideoState(it){this.globalEventHub.emit("syncFullscreenVideoState",it)}destroy(){var it;try{this.clearAutoForwardTimer(),this.app.view.removeEventListener("webglcontextlost",this.onWebGLLost),this.app.renderer.filter.texturePool.clear(!0),DI.collectObjectByGroup(this.objPoolGroup),LC.collectObjectByGroup(this.objPoolGroup),(it=this.transactionPlayer)===null||it===void 0||it.destroy(),this.loader.destroy(),this.fps.destroy(),this.stagePool.destroyAllStage(),this.stagePool.destroy(),this.app.renderer.gl.getExtension("WEBGL_lose_context").loseContext(),this.app.destroy(!0,{children:!0,texture:!0,baseTexture:!0}),this.tracker({name:"slidePlayerDestroy",result:"",reason:"",payload:{}})}catch{}}}C_.platform=WT,C_.RtcAudioClazz=null;var FC=new Map,BC,IM=tt(136),BP=tt.n(IM),ZI=tt(24),jC=tt.n(ZI),Ok=tt(50),jP=tt.n(Ok),rT=[],JI="ResizeObserver loop completed with undelivered notifications.";(function(vt){vt.BORDER_BOX="border-box",vt.CONTENT_BOX="content-box",vt.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(BC||(BC={}));var eR,ew=function(vt){return Object.freeze(vt)},qk=function(vt,it){this.inlineSize=vt,this.blockSize=it,ew(this)},RM=(function(){function vt(it,lt,pt,_t){return this.x=it,this.y=lt,this.width=pt,this.height=_t,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ew(this)}return vt.prototype.toJSON=function(){var it=this;return{x:it.x,y:it.y,top:it.top,right:it.right,bottom:it.bottom,left:it.left,width:it.width,height:it.height}},vt.fromRect=function(it){return new vt(it.x,it.y,it.width,it.height)},vt})(),tR=function(vt){return vt instanceof SVGElement&&"getBBox"in vt},$P=function(vt){if(tR(vt)){var it=vt.getBBox(),lt=it.width,pt=it.height;return!lt&&!pt}var _t=vt,Dt=_t.offsetWidth,Lt=_t.offsetHeight;return!(Dt||Lt||vt.getClientRects().length)},UP=function(vt){var it;if(vt instanceof Element)return!0;var lt=(it=vt?.ownerDocument)===null||it===void 0?void 0:it.defaultView;return!!(lt&&vt instanceof lt.Element)},pA=typeof window<"u"?window:{},PM=new WeakMap,NM=/auto|scroll/,Lk=/^tb|vertical/,zP=/msie|trident/i.test(pA.navigator&&pA.navigator.userAgent),fS=function(vt){return parseFloat(vt||"0")},mA=function(vt,it,lt){return vt===void 0&&(vt=0),it===void 0&&(it=0),lt===void 0&&(lt=!1),new qk((lt?it:vt)||0,(lt?vt:it)||0)},rR=ew({devicePixelContentBoxSize:mA(),borderBoxSize:mA(),contentBoxSize:mA(),contentRect:new RM(0,0,0,0)}),GP=function(vt,it){if(it===void 0&&(it=!1),PM.has(vt)&&!it)return PM.get(vt);if($P(vt))return PM.set(vt,rR),rR;var lt=getComputedStyle(vt),pt=tR(vt)&&vt.ownerSVGElement&&vt.getBBox(),_t=!zP&&lt.boxSizing==="border-box",Dt=Lk.test(lt.writingMode||""),Lt=!pt&&NM.test(lt.overflowY||""),$t=!pt&&NM.test(lt.overflowX||""),Xt=pt?0:fS(lt.paddingTop),Yt=pt?0:fS(lt.paddingRight),Zt=pt?0:fS(lt.paddingBottom),lr=pt?0:fS(lt.paddingLeft),xr=pt?0:fS(lt.borderTopWidth),wr=pt?0:fS(lt.borderRightWidth),Ir=pt?0:fS(lt.borderBottomWidth),kr=lr+Yt,Lr=Xt+Zt,Xr=(pt?0:fS(lt.borderLeftWidth))+wr,_n=xr+Ir,On=$t?vt.offsetHeight-_n-vt.clientHeight:0,Kn=Lt?vt.offsetWidth-Xr-vt.clientWidth:0,Mn=_t?kr+Xr:0,ca=_t?Lr+_n:0,Gn=pt?pt.width:fS(lt.width)-Mn-Kn,Qn=pt?pt.height:fS(lt.height)-ca-On,ks=Gn+kr+Kn+Xr,Cs=Qn+Lr+On+_n,gs=ew({devicePixelContentBoxSize:mA(Math.round(Gn*devicePixelRatio),Math.round(Qn*devicePixelRatio),Dt),borderBoxSize:mA(ks,Cs,Dt),contentBoxSize:mA(Gn,Qn,Dt),contentRect:new RM(lr,Xt,Gn,Qn)});return PM.set(vt,gs),gs},kM=function(vt,it,lt){var pt=GP(vt,lt),_t=pt.borderBoxSize,Dt=pt.contentBoxSize,Lt=pt.devicePixelContentBoxSize;switch(it){case BC.DEVICE_PIXEL_CONTENT_BOX:return Lt;case BC.BORDER_BOX:return _t;default:return Dt}},Fk=function(vt){var it=GP(vt);this.target=vt,this.contentRect=it.contentRect,this.borderBoxSize=ew([it.borderBoxSize]),this.contentBoxSize=ew([it.contentBoxSize]),this.devicePixelContentBoxSize=ew([it.devicePixelContentBoxSize])},nR=function(vt){if($P(vt))return 1/0;for(var it=0,lt=vt.parentNode;lt;)it+=1,lt=lt.parentNode;return it},iR=function(){var vt=1/0,it=[];rT.forEach(function(_t){if(_t.activeTargets.length!==0){var Dt=[];_t.activeTargets.forEach(function(Lt){var $t=new Fk(Lt.target),Xt=nR(Lt.target);Dt.push($t),Lt.lastReportedSize=kM(Lt.target,Lt.observedBox),Xt<vt&&(vt=Xt)}),it.push(function(){_t.callback.call(_t.observer,Dt,_t.observer)}),_t.activeTargets.splice(0,_t.activeTargets.length)}});for(var lt=0,pt=it;lt<pt.length;lt++)(0,pt[lt])();return vt},VP=function(vt){rT.forEach(function(it){it.activeTargets.splice(0,it.activeTargets.length),it.skippedTargets.splice(0,it.skippedTargets.length),it.observationTargets.forEach(function(lt){lt.isActive()&&(nR(lt.target)>vt?it.activeTargets.push(lt):it.skippedTargets.push(lt))})})},HP=function(){var vt,it=0;for(VP(it);rT.some(function(lt){return lt.activeTargets.length>0});)it=iR(),VP(it);return rT.some(function(lt){return lt.skippedTargets.length>0})&&(typeof ErrorEvent=="function"?vt=new ErrorEvent("error",{message:JI}):((vt=document.createEvent("Event")).initEvent("error",!1,!1),vt.message=JI),window.dispatchEvent(vt)),it>0},aR=[],Bk=function(vt){if(!eR){var it=0,lt=document.createTextNode("");new MutationObserver(function(){return aR.splice(0).forEach(function(pt){return pt()})}).observe(lt,{characterData:!0}),eR=function(){lt.textContent="".concat(it?it--:it++)}}aR.push(vt),eR()},sR=0,D1={attributes:!0,characterData:!0,childList:!0,subtree:!0},oR=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],WP=function(vt){return vt===void 0&&(vt=0),Date.now()+vt},uR=!1,$C=new((function(){function vt(){var it=this;this.stopped=!0,this.listener=function(){return it.schedule()}}return vt.prototype.run=function(it){var lt=this;if(it===void 0&&(it=250),!uR){uR=!0;var pt,_t=WP(it);pt=function(){var Dt=!1;try{Dt=HP()}finally{if(uR=!1,it=_t-WP(),!sR)return;Dt?lt.run(1e3):it>0?lt.run(it):lt.start()}},Bk(function(){requestAnimationFrame(pt)})}},vt.prototype.schedule=function(){this.stop(),this.run()},vt.prototype.observe=function(){var it=this,lt=function(){return it.observer&&it.observer.observe(document.body,D1)};document.body?lt():pA.addEventListener("DOMContentLoaded",lt)},vt.prototype.start=function(){var it=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),oR.forEach(function(lt){return pA.addEventListener(lt,it.listener,!0)}))},vt.prototype.stop=function(){var it=this;this.stopped||(this.observer&&this.observer.disconnect(),oR.forEach(function(lt){return pA.removeEventListener(lt,it.listener,!0)}),this.stopped=!0)},vt})()),XP=function(vt){!sR&&vt>0&&$C.start(),!(sR+=vt)&&$C.stop()},YP=(function(){function vt(it,lt){this.target=it,this.observedBox=lt||BC.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return vt.prototype.isActive=function(){var it,lt=kM(this.target,this.observedBox,!0);return it=this.target,tR(it)||(function(pt){switch(pt.tagName){case"INPUT":if(pt.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1})(it)||getComputedStyle(it).display!=="inline"||(this.lastReportedSize=lt),this.lastReportedSize.inlineSize!==lt.inlineSize||this.lastReportedSize.blockSize!==lt.blockSize},vt})(),$k=function(vt,it){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=vt,this.callback=it},OM=new WeakMap,lR=function(vt,it){for(var lt=0;lt<vt.length;lt+=1)if(vt[lt].target===it)return lt;return-1},qM=(function(){function vt(){}return vt.connect=function(it,lt){var pt=new $k(it,lt);OM.set(it,pt)},vt.observe=function(it,lt,pt){var _t=OM.get(it),Dt=_t.observationTargets.length===0;lR(_t.observationTargets,lt)<0&&(Dt&&rT.push(_t),_t.observationTargets.push(new YP(lt,pt&&pt.box)),XP(1),$C.schedule())},vt.unobserve=function(it,lt){var pt=OM.get(it),_t=lR(pt.observationTargets,lt),Dt=pt.observationTargets.length===1;_t>=0&&(Dt&&rT.splice(rT.indexOf(pt),1),pt.observationTargets.splice(_t,1),XP(-1))},vt.disconnect=function(it){var lt=this,pt=OM.get(it);pt.observationTargets.slice().forEach(function(_t){return lt.unobserve(it,_t.target)}),pt.activeTargets.splice(0,pt.activeTargets.length)},vt})(),Uk=(function(){function vt(it){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof it!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");qM.connect(this,it)}return vt.prototype.observe=function(it,lt){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!UP(it))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");qM.observe(this,it,lt)},vt.prototype.unobserve=function(it){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!UP(it))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");qM.unobserve(this,it)},vt.prototype.disconnect=function(){qM.disconnect(this)},vt.toString=function(){return"function ResizeObserver () { [polyfill code] }"},vt})(),zk=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})},D_=function(vt,it){var lt,pt,_t,Dt,Lt={label:0,sent:function(){if(1&_t[0])throw _t[1];return _t[1]},trys:[],ops:[]};return Dt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Dt[Symbol.iterator]=function(){return this}),Dt;function $t(Xt){return function(Yt){return(function(Zt){if(lt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(lt=1,pt&&(_t=2&Zt[0]?pt.return:Zt[0]?pt.throw||((_t=pt.return)&&_t.call(pt),0):pt.next)&&!(_t=_t.call(pt,Zt[1])).done)return _t;switch(pt=0,_t&&(Zt=[2&Zt[0],_t.value]),Zt[0]){case 0:case 1:_t=Zt;break;case 4:return Lt.label++,{value:Zt[1],done:!1};case 5:Lt.label++,pt=Zt[1],Zt=[0];continue;case 7:Zt=Lt.ops.pop(),Lt.trys.pop();continue;default:if(_t=Lt.trys,!((_t=_t.length>0&&_t[_t.length-1])||Zt[0]!==6&&Zt[0]!==2)){Lt=0;continue}if(Zt[0]===3&&(!_t||Zt[1]>_t[0]&&Zt[1]<_t[3])){Lt.label=Zt[1];break}if(Zt[0]===6&&Lt.label<_t[1]){Lt.label=_t[1],_t=Zt;break}if(_t&&Lt.label<_t[2]){Lt.label=_t[2],Lt.ops.push(Zt);break}_t[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Zt=it.call(vt,Lt)}catch(lr){Zt=[6,lr],pt=0}finally{lt=_t=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}})([Xt,Yt])}}},UC=(function(){function vt(it,lt,pt,_t,Dt){this.state="idle",this.index=-1,this.slideIndex=-1,this.fn=pt,this.index=it,this.slideIndex=lt,this.eventHub=_t,this.id=Dt}return vt.prototype.apply=function(){return zk(this,void 0,void 0,function(){var it;return D_(this,function(lt){switch(lt.label){case 0:this.eventHub.emit("task-start",this),lt.label=1;case 1:return lt.trys.push([1,3,,4]),this.state="start",[4,this.fn()];case 2:return lt.sent(),this.state="end",this.eventHub.emit("task-end",this),[3,4];case 3:return it=lt.sent(),this.eventHub.emit("task-error",{task:this,error:it}),[3,4];case 4:return[2]}})})},vt})(),M1=(function(){function vt(){var it=this;this.eventHub=new em.a,this.tasks=[],this.index=0,this.eventHub.on("task-end",function(lt){var pt,_t=it.tasks.findIndex(function(Lt){return Lt.index===lt.index}),Dt=_t+1;Dt>=0&&((pt=it.tasks[Dt])===null||pt===void 0||pt.apply()),_t>=0&&(it.tasks.splice(_t,1),it.replaceIdleTask()),it.eventHub.emit("task-end-"+lt.id)}),this.eventHub.on("task-error",function(lt){var pt=lt.task,_t=it.tasks.findIndex(function(Dt){return Dt.index===pt.index});_t>=0&&(it.tasks.splice(_t,1),it.replaceIdleTask()),it.eventHub.emit("task-error-"+pt.id)})}return vt.prototype.replaceIdleTask=function(){for(var it,lt=this,pt=new Set,_t=0,Dt=this.tasks.length;_t<Dt;_t++)this.tasks[_t].state==="idle"&&((it=this.tasks[_t+1])===null||it===void 0?void 0:it.state)==="idle"&&pt.add(_t);Array.from(pt).forEach(function(Lt){lt.tasks.splice(Lt,1)})},vt.prototype.addTask=function(it,lt,pt){var _t=new UC(this.index++,lt,it,this.eventHub,pt);this.tasks.push(_t),this.tasks.sort(function(Dt,Lt){return Dt.index-Lt.index}),this.replaceIdleTask(),this.tasks.length===1&&_t.apply()},vt.prototype.hasStartTask=function(){return this.tasks.some(function(it){return it.state==="start"})},vt.prototype.destroy=function(){this.eventHub.removeAllListeners()},vt})();function ay(vt,it){var lt=vt.__state.conversionName.toString(),pt=Math.round(vt.r),_t=Math.round(vt.g),Dt=Math.round(vt.b),Lt=vt.a,$t=Math.round(vt.h),Xt=vt.s.toFixed(1),Yt=vt.v.toFixed(1);if(it||lt==="THREE_CHAR_HEX"||lt==="SIX_CHAR_HEX"){for(var Zt=vt.hex.toString(16);Zt.length<6;)Zt="0"+Zt;return"#"+Zt}return lt==="CSS_RGB"?"rgb("+pt+","+_t+","+Dt+")":lt==="CSS_RGBA"?"rgba("+pt+","+_t+","+Dt+","+Lt+")":lt==="HEX"?"0x"+vt.hex.toString(16):lt==="RGB_ARRAY"?"["+pt+","+_t+","+Dt+"]":lt==="RGBA_ARRAY"?"["+pt+","+_t+","+Dt+","+Lt+"]":lt==="RGB_OBJ"?"{r:"+pt+",g:"+_t+",b:"+Dt+"}":lt==="RGBA_OBJ"?"{r:"+pt+",g:"+_t+",b:"+Dt+",a:"+Lt+"}":lt==="HSV_OBJ"?"{h:"+$t+",s:"+Xt+",v:"+Yt+"}":lt==="HSVA_OBJ"?"{h:"+$t+",s:"+Xt+",v:"+Yt+",a:"+Lt+"}":"unknown format"}var Gp=Array.prototype.forEach,gA=Array.prototype.slice,eu={BREAK:{},extend:function(vt){return this.each(gA.call(arguments,1),function(it){(this.isObject(it)?Object.keys(it):[]).forEach((function(lt){this.isUndefined(it[lt])||(vt[lt]=it[lt])}).bind(this))},this),vt},defaults:function(vt){return this.each(gA.call(arguments,1),function(it){(this.isObject(it)?Object.keys(it):[]).forEach((function(lt){this.isUndefined(vt[lt])&&(vt[lt]=it[lt])}).bind(this))},this),vt},compose:function(){var vt=gA.call(arguments);return function(){for(var it=gA.call(arguments),lt=vt.length-1;lt>=0;lt--)it=[vt[lt].apply(this,it)];return it[0]}},each:function(vt,it,lt){if(vt){if(Gp&&vt.forEach&&vt.forEach===Gp)vt.forEach(it,lt);else if(vt.length===vt.length+0){var pt,_t=void 0;for(_t=0,pt=vt.length;_t<pt;_t++)if(_t in vt&&it.call(lt,vt[_t],_t)===this.BREAK)return}else for(var Dt in vt)if(it.call(lt,vt[Dt],Dt)===this.BREAK)return}},defer:function(vt){setTimeout(vt,0)},debounce:function(vt,it,lt){var pt=void 0;return function(){var _t=this,Dt=arguments;function Lt(){pt=null,lt||vt.apply(_t,Dt)}var $t=lt||!pt;clearTimeout(pt),pt=setTimeout(Lt,it),$t&&vt.apply(_t,Dt)}},toArray:function(vt){return vt.toArray?vt.toArray():gA.call(vt)},isUndefined:function(vt){return vt===void 0},isNull:function(vt){return vt===null},isNaN:(function(vt){function it(lt){return vt.apply(this,arguments)}return it.toString=function(){return vt.toString()},it})(function(vt){return isNaN(vt)}),isArray:Array.isArray||function(vt){return vt.constructor===Array},isObject:function(vt){return vt===Object(vt)},isNumber:function(vt){return vt===vt+0},isString:function(vt){return vt===vt+""},isBoolean:function(vt){return vt===!1||vt===!0},isFunction:function(vt){return vt instanceof Function}},QP=[{litmus:eu.isString,conversions:{THREE_CHAR_HEX:{read:function(vt){var it=vt.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return it!==null&&{space:"HEX",hex:parseInt("0x"+it[1].toString()+it[1].toString()+it[2].toString()+it[2].toString()+it[3].toString()+it[3].toString(),0)}},write:ay},SIX_CHAR_HEX:{read:function(vt){var it=vt.match(/^#([A-F0-9]{6})$/i);return it!==null&&{space:"HEX",hex:parseInt("0x"+it[1].toString(),0)}},write:ay},CSS_RGB:{read:function(vt){var it=vt.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);return it!==null&&{space:"RGB",r:parseFloat(it[1]),g:parseFloat(it[2]),b:parseFloat(it[3])}},write:ay},CSS_RGBA:{read:function(vt){var it=vt.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);return it!==null&&{space:"RGB",r:parseFloat(it[1]),g:parseFloat(it[2]),b:parseFloat(it[3]),a:parseFloat(it[4])}},write:ay}}},{litmus:eu.isNumber,conversions:{HEX:{read:function(vt){return{space:"HEX",hex:vt,conversionName:"HEX"}},write:function(vt){return vt.hex}}}},{litmus:eu.isArray,conversions:{RGB_ARRAY:{read:function(vt){return vt.length===3&&{space:"RGB",r:vt[0],g:vt[1],b:vt[2]}},write:function(vt){return[vt.r,vt.g,vt.b]}},RGBA_ARRAY:{read:function(vt){return vt.length===4&&{space:"RGB",r:vt[0],g:vt[1],b:vt[2],a:vt[3]}},write:function(vt){return[vt.r,vt.g,vt.b,vt.a]}}}},{litmus:eu.isObject,conversions:{RGBA_OBJ:{read:function(vt){return!!(eu.isNumber(vt.r)&&eu.isNumber(vt.g)&&eu.isNumber(vt.b)&&eu.isNumber(vt.a))&&{space:"RGB",r:vt.r,g:vt.g,b:vt.b,a:vt.a}},write:function(vt){return{r:vt.r,g:vt.g,b:vt.b,a:vt.a}}},RGB_OBJ:{read:function(vt){return!!(eu.isNumber(vt.r)&&eu.isNumber(vt.g)&&eu.isNumber(vt.b))&&{space:"RGB",r:vt.r,g:vt.g,b:vt.b}},write:function(vt){return{r:vt.r,g:vt.g,b:vt.b}}},HSVA_OBJ:{read:function(vt){return!!(eu.isNumber(vt.h)&&eu.isNumber(vt.s)&&eu.isNumber(vt.v)&&eu.isNumber(vt.a))&&{space:"HSV",h:vt.h,s:vt.s,v:vt.v,a:vt.a}},write:function(vt){return{h:vt.h,s:vt.s,v:vt.v,a:vt.a}}},HSV_OBJ:{read:function(vt){return!!(eu.isNumber(vt.h)&&eu.isNumber(vt.s)&&eu.isNumber(vt.v))&&{space:"HSV",h:vt.h,s:vt.s,v:vt.v}},write:function(vt){return{h:vt.h,s:vt.s,v:vt.v}}}}}],vA=void 0,yA=void 0,tw=function(){yA=!1;var vt=arguments.length>1?eu.toArray(arguments):arguments[0];return eu.each(QP,function(it){if(it.litmus(vt))return eu.each(it.conversions,function(lt,pt){if(vA=lt.read(vt),yA===!1&&vA!==!1)return yA=vA,vA.conversionName=pt,vA.conversion=lt,eu.BREAK}),eu.BREAK}),yA},K_=void 0,LM={hsv_to_rgb:function(vt,it,lt){var pt=Math.floor(vt/60)%6,_t=vt/60-Math.floor(vt/60),Dt=lt*(1-it),Lt=lt*(1-_t*it),$t=lt*(1-(1-_t)*it),Xt=[[lt,$t,Dt],[Lt,lt,Dt],[Dt,lt,$t],[Dt,Lt,lt],[$t,Dt,lt],[lt,Dt,Lt]][pt];return{r:255*Xt[0],g:255*Xt[1],b:255*Xt[2]}},rgb_to_hsv:function(vt,it,lt){var pt=Math.min(vt,it,lt),_t=Math.max(vt,it,lt),Dt=_t-pt,Lt=void 0;return _t===0?{h:NaN,s:0,v:0}:(Lt=vt===_t?(it-lt)/Dt:it===_t?2+(lt-vt)/Dt:4+(vt-it)/Dt,(Lt/=6)<0&&(Lt+=1),{h:360*Lt,s:Dt/_t,v:_t/255})},rgb_to_hex:function(vt,it,lt){var pt=this.hex_with_component(0,2,vt);return pt=this.hex_with_component(pt,1,it),pt=this.hex_with_component(pt,0,lt)},component_from_hex:function(vt,it){return vt>>8*it&255},hex_with_component:function(vt,it,lt){return lt<<(K_=8*it)|vt&~(255<<K_)}},zC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(vt){return typeof vt}:function(vt){return vt&&typeof Symbol=="function"&&vt.constructor===Symbol&&vt!==Symbol.prototype?"symbol":typeof vt},M_=function(vt,it){if(!(vt instanceof it))throw new TypeError("Cannot call a class as a function")},F0=(function(){function vt(it,lt){for(var pt=0;pt<lt.length;pt++){var _t=lt[pt];_t.enumerable=_t.enumerable||!1,_t.configurable=!0,"value"in _t&&(_t.writable=!0),Object.defineProperty(it,_t.key,_t)}}return function(it,lt,pt){return lt&&vt(it.prototype,lt),pt&&vt(it,pt),it}})(),kx=function vt(it,lt,pt){it===null&&(it=Function.prototype);var _t=Object.getOwnPropertyDescriptor(it,lt);if(_t===void 0){var Dt=Object.getPrototypeOf(it);return Dt===null?void 0:vt(Dt,lt,pt)}if("value"in _t)return _t.value;var Lt=_t.get;return Lt!==void 0?Lt.call(pt):void 0},I_=function(vt,it){if(typeof it!="function"&&it!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof it);vt.prototype=Object.create(it&&it.prototype,{constructor:{value:vt,enumerable:!1,writable:!0,configurable:!0}}),it&&(Object.setPrototypeOf?Object.setPrototypeOf(vt,it):vt.__proto__=it)},rw=function(vt,it){if(!vt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!it||typeof it!="object"&&typeof it!="function"?vt:it},p0=(function(){function vt(){if(M_(this,vt),this.__state=tw.apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return F0(vt,[{key:"toString",value:function(){return ay(this)}},{key:"toHexString",value:function(){return ay(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),vt})();function ex(vt,it,lt){Object.defineProperty(vt,it,{get:function(){return this.__state.space==="RGB"||p0.recalculateRGB(this,it,lt),this.__state[it]},set:function(pt){this.__state.space!=="RGB"&&(p0.recalculateRGB(this,it,lt),this.__state.space="RGB"),this.__state[it]=pt}})}function cR(vt,it){Object.defineProperty(vt,it,{get:function(){return this.__state.space==="HSV"||p0.recalculateHSV(this),this.__state[it]},set:function(lt){this.__state.space!=="HSV"&&(p0.recalculateHSV(this),this.__state.space="HSV"),this.__state[it]=lt}})}p0.recalculateRGB=function(vt,it,lt){if(vt.__state.space==="HEX")vt.__state[it]=LM.component_from_hex(vt.__state.hex,lt);else{if(vt.__state.space!=="HSV")throw new Error("Corrupted color state");eu.extend(vt.__state,LM.hsv_to_rgb(vt.__state.h,vt.__state.s,vt.__state.v))}},p0.recalculateHSV=function(vt){var it=LM.rgb_to_hsv(vt.r,vt.g,vt.b);eu.extend(vt.__state,{s:it.s,v:it.v}),eu.isNaN(it.h)?eu.isUndefined(vt.__state.h)&&(vt.__state.h=0):vt.__state.h=it.h},p0.COMPONENTS=["r","g","b","h","s","v","hex","a"],ex(p0.prototype,"r",2),ex(p0.prototype,"g",1),ex(p0.prototype,"b",0),cR(p0.prototype,"h"),cR(p0.prototype,"s"),cR(p0.prototype,"v"),Object.defineProperty(p0.prototype,"a",{get:function(){return this.__state.a},set:function(vt){this.__state.a=vt}}),Object.defineProperty(p0.prototype,"hex",{get:function(){return this.__state.space!=="HEX"&&(this.__state.hex=LM.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(vt){this.__state.space="HEX",this.__state.hex=vt}});var KT=(function(){function vt(it,lt){M_(this,vt),this.initialValue=it[lt],this.domElement=document.createElement("div"),this.object=it,this.property=lt,this.__onChange=void 0,this.__onFinishChange=void 0}return F0(vt,[{key:"onChange",value:function(it){return this.__onChange=it,this}},{key:"onFinishChange",value:function(it){return this.__onFinishChange=it,this}},{key:"setValue",value:function(it){return this.object[this.property]=it,this.__onChange&&this.__onChange.call(this,it),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),vt})(),r_={};eu.each({HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},function(vt,it){eu.each(vt,function(lt){r_[lt]=it})});var I1=/(\d+(\.\d+)?)px/;function Z_(vt){if(vt==="0"||eu.isUndefined(vt))return 0;var it=vt.match(I1);return eu.isNull(it)?0:parseFloat(it[1])}var Eo={makeSelectable:function(vt,it){vt!==void 0&&vt.style!==void 0&&(vt.onselectstart=it?function(){return!1}:function(){},vt.style.MozUserSelect=it?"auto":"none",vt.style.KhtmlUserSelect=it?"auto":"none",vt.unselectable=it?"on":"off")},makeFullscreen:function(vt,it,lt){var pt=lt,_t=it;eu.isUndefined(_t)&&(_t=!0),eu.isUndefined(pt)&&(pt=!0),vt.style.position="absolute",_t&&(vt.style.left=0,vt.style.right=0),pt&&(vt.style.top=0,vt.style.bottom=0)},fakeEvent:function(vt,it,lt,pt){var _t=lt||{},Dt=r_[it];if(!Dt)throw new Error("Event type "+it+" not supported.");var Lt=document.createEvent(Dt);switch(Dt){case"MouseEvents":var $t=_t.x||_t.clientX||0,Xt=_t.y||_t.clientY||0;Lt.initMouseEvent(it,_t.bubbles||!1,_t.cancelable||!0,window,_t.clickCount||1,0,0,$t,Xt,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var Yt=Lt.initKeyboardEvent||Lt.initKeyEvent;eu.defaults(_t,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),Yt(it,_t.bubbles||!1,_t.cancelable,window,_t.ctrlKey,_t.altKey,_t.shiftKey,_t.metaKey,_t.keyCode,_t.charCode);break;default:Lt.initEvent(it,_t.bubbles||!1,_t.cancelable||!0)}eu.defaults(Lt,pt),vt.dispatchEvent(Lt)},bind:function(vt,it,lt,pt){var _t=pt||!1;return vt.addEventListener?vt.addEventListener(it,lt,_t):vt.attachEvent&&vt.attachEvent("on"+it,lt),Eo},unbind:function(vt,it,lt,pt){var _t=pt||!1;return vt.removeEventListener?vt.removeEventListener(it,lt,_t):vt.detachEvent&&vt.detachEvent("on"+it,lt),Eo},addClass:function(vt,it){if(vt.className===void 0)vt.className=it;else if(vt.className!==it){var lt=vt.className.split(/ +/);lt.indexOf(it)===-1&&(lt.push(it),vt.className=lt.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return Eo},removeClass:function(vt,it){if(it)if(vt.className===it)vt.removeAttribute("class");else{var lt=vt.className.split(/ +/),pt=lt.indexOf(it);pt!==-1&&(lt.splice(pt,1),vt.className=lt.join(" "))}else vt.className=void 0;return Eo},hasClass:function(vt,it){return new RegExp("(?:^|\\s+)"+it+"(?:\\s+|$)").test(vt.className)||!1},getWidth:function(vt){var it=getComputedStyle(vt);return Z_(it["border-left-width"])+Z_(it["border-right-width"])+Z_(it["padding-left"])+Z_(it["padding-right"])+Z_(it.width)},getHeight:function(vt){var it=getComputedStyle(vt);return Z_(it["border-top-width"])+Z_(it["border-bottom-width"])+Z_(it["padding-top"])+Z_(it["padding-bottom"])+Z_(it.height)},getOffset:function(vt){var it=vt,lt={left:0,top:0};if(it.offsetParent)do lt.left+=it.offsetLeft,lt.top+=it.offsetTop,it=it.offsetParent;while(it);return lt},isActive:function(vt){return vt===document.activeElement&&(vt.type||vt.href)}},KP=(function(vt){function it(lt,pt){M_(this,it);var _t=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt)),Dt=_t;return _t.__prev=_t.getValue(),_t.__checkbox=document.createElement("input"),_t.__checkbox.setAttribute("type","checkbox"),Eo.bind(_t.__checkbox,"change",function(){Dt.setValue(!Dt.__prev)},!1),_t.domElement.appendChild(_t.__checkbox),_t.updateDisplay(),_t}return I_(it,vt),F0(it,[{key:"setValue",value:function(lt){var pt=kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"setValue",this).call(this,lt);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),pt}},{key:"updateDisplay",value:function(){return this.getValue()===!0?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"updateDisplay",this).call(this)}}]),it})(KT),Gk=(function(vt){function it(lt,pt,_t){M_(this,it);var Dt=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt)),Lt=_t,$t=Dt;if(Dt.__select=document.createElement("select"),eu.isArray(Lt)){var Xt={};eu.each(Lt,function(Yt){Xt[Yt]=Yt}),Lt=Xt}return eu.each(Lt,function(Yt,Zt){var lr=document.createElement("option");lr.innerHTML=Zt,lr.setAttribute("value",Yt),$t.__select.appendChild(lr)}),Dt.updateDisplay(),Eo.bind(Dt.__select,"change",function(){var Yt=this.options[this.selectedIndex].value;$t.setValue(Yt)}),Dt.domElement.appendChild(Dt.__select),Dt}return I_(it,vt),F0(it,[{key:"setValue",value:function(lt){var pt=kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"setValue",this).call(this,lt);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),pt}},{key:"updateDisplay",value:function(){return Eo.isActive(this.__select)?this:(this.__select.value=this.getValue(),kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"updateDisplay",this).call(this))}}]),it})(KT),ZP=(function(vt){function it(lt,pt){M_(this,it);var _t=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt)),Dt=_t;function Lt(){Dt.setValue(Dt.__input.value)}return _t.__input=document.createElement("input"),_t.__input.setAttribute("type","text"),Eo.bind(_t.__input,"keyup",Lt),Eo.bind(_t.__input,"change",Lt),Eo.bind(_t.__input,"blur",function(){Dt.__onFinishChange&&Dt.__onFinishChange.call(Dt,Dt.getValue())}),Eo.bind(_t.__input,"keydown",function($t){$t.keyCode===13&&this.blur()}),_t.updateDisplay(),_t.domElement.appendChild(_t.__input),_t}return I_(it,vt),F0(it,[{key:"updateDisplay",value:function(){return Eo.isActive(this.__input)||(this.__input.value=this.getValue()),kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"updateDisplay",this).call(this)}}]),it})(KT);function JP(vt){var it=vt.toString();return it.indexOf(".")>-1?it.length-it.indexOf(".")-1:0}var eN=(function(vt){function it(lt,pt,_t){M_(this,it);var Dt=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt)),Lt=_t||{};return Dt.__min=Lt.min,Dt.__max=Lt.max,Dt.__step=Lt.step,eu.isUndefined(Dt.__step)?Dt.initialValue===0?Dt.__impliedStep=1:Dt.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(Dt.initialValue))/Math.LN10))/10:Dt.__impliedStep=Dt.__step,Dt.__precision=JP(Dt.__impliedStep),Dt}return I_(it,vt),F0(it,[{key:"setValue",value:function(lt){var pt=lt;return this.__min!==void 0&&pt<this.__min?pt=this.__min:this.__max!==void 0&&pt>this.__max&&(pt=this.__max),this.__step!==void 0&&pt%this.__step!=0&&(pt=Math.round(pt/this.__step)*this.__step),kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"setValue",this).call(this,pt)}},{key:"min",value:function(lt){return this.__min=lt,this}},{key:"max",value:function(lt){return this.__max=lt,this}},{key:"step",value:function(lt){return this.__step=lt,this.__impliedStep=lt,this.__precision=JP(lt),this}}]),it})(KT),GC=(function(vt){function it(lt,pt,_t){M_(this,it);var Dt=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt,_t));Dt.__truncationSuspended=!1;var Lt=Dt,$t=void 0;function Xt(){Lt.__onFinishChange&&Lt.__onFinishChange.call(Lt,Lt.getValue())}function Yt(lr){var xr=$t-lr.clientY;Lt.setValue(Lt.getValue()+xr*Lt.__impliedStep),$t=lr.clientY}function Zt(){Eo.unbind(window,"mousemove",Yt),Eo.unbind(window,"mouseup",Zt),Xt()}return Dt.__input=document.createElement("input"),Dt.__input.setAttribute("type","text"),Eo.bind(Dt.__input,"change",function(){var lr=parseFloat(Lt.__input.value);eu.isNaN(lr)||Lt.setValue(lr)}),Eo.bind(Dt.__input,"blur",function(){Xt()}),Eo.bind(Dt.__input,"mousedown",function(lr){Eo.bind(window,"mousemove",Yt),Eo.bind(window,"mouseup",Zt),$t=lr.clientY}),Eo.bind(Dt.__input,"keydown",function(lr){lr.keyCode===13&&(Lt.__truncationSuspended=!0,this.blur(),Lt.__truncationSuspended=!1,Xt())}),Dt.updateDisplay(),Dt.domElement.appendChild(Dt.__input),Dt}return I_(it,vt),F0(it,[{key:"updateDisplay",value:function(){var lt,pt,_t;return this.__input.value=this.__truncationSuspended?this.getValue():(lt=this.getValue(),pt=this.__precision,_t=Math.pow(10,pt),Math.round(lt*_t)/_t),kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"updateDisplay",this).call(this)}}]),it})(eN);function _u(vt,it,lt,pt,_t){return pt+(vt-it)/(lt-it)*(_t-pt)}var El=(function(vt){function it(lt,pt,_t,Dt,Lt){M_(this,it);var $t=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt,{min:_t,max:Dt,step:Lt})),Xt=$t;function Yt(wr){wr.preventDefault();var Ir=Xt.__background.getBoundingClientRect();return Xt.setValue(_u(wr.clientX,Ir.left,Ir.right,Xt.__min,Xt.__max)),!1}function Zt(){Eo.unbind(window,"mousemove",Yt),Eo.unbind(window,"mouseup",Zt),Xt.__onFinishChange&&Xt.__onFinishChange.call(Xt,Xt.getValue())}function lr(wr){var Ir=wr.touches[0].clientX,kr=Xt.__background.getBoundingClientRect();Xt.setValue(_u(Ir,kr.left,kr.right,Xt.__min,Xt.__max))}function xr(){Eo.unbind(window,"touchmove",lr),Eo.unbind(window,"touchend",xr),Xt.__onFinishChange&&Xt.__onFinishChange.call(Xt,Xt.getValue())}return $t.__background=document.createElement("div"),$t.__foreground=document.createElement("div"),Eo.bind($t.__background,"mousedown",function(wr){document.activeElement.blur(),Eo.bind(window,"mousemove",Yt),Eo.bind(window,"mouseup",Zt),Yt(wr)}),Eo.bind($t.__background,"touchstart",function(wr){wr.touches.length===1&&(Eo.bind(window,"touchmove",lr),Eo.bind(window,"touchend",xr),lr(wr))}),Eo.addClass($t.__background,"slider"),Eo.addClass($t.__foreground,"slider-fg"),$t.updateDisplay(),$t.__background.appendChild($t.__foreground),$t.domElement.appendChild($t.__background),$t}return I_(it,vt),F0(it,[{key:"updateDisplay",value:function(){var lt=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*lt+"%",kx(it.prototype.__proto__||Object.getPrototypeOf(it.prototype),"updateDisplay",this).call(this)}}]),it})(eN),ZT=(function(vt){function it(lt,pt,_t){M_(this,it);var Dt=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt)),Lt=Dt;return Dt.__button=document.createElement("div"),Dt.__button.innerHTML=_t===void 0?"Fire":_t,Eo.bind(Dt.__button,"click",function($t){return $t.preventDefault(),Lt.fire(),!1}),Eo.addClass(Dt.__button,"button"),Dt.domElement.appendChild(Dt.__button),Dt}return I_(it,vt),F0(it,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),it})(KT),n_=(function(vt){function it(lt,pt){M_(this,it);var _t=rw(this,(it.__proto__||Object.getPrototypeOf(it)).call(this,lt,pt));_t.__color=new p0(_t.getValue()),_t.__temp=new p0(0);var Dt=_t;_t.domElement=document.createElement("div"),Eo.makeSelectable(_t.domElement,!1),_t.__selector=document.createElement("div"),_t.__selector.className="selector",_t.__saturation_field=document.createElement("div"),_t.__saturation_field.className="saturation-field",_t.__field_knob=document.createElement("div"),_t.__field_knob.className="field-knob",_t.__field_knob_border="2px solid ",_t.__hue_knob=document.createElement("div"),_t.__hue_knob.className="hue-knob",_t.__hue_field=document.createElement("div"),_t.__hue_field.className="hue-field",_t.__input=document.createElement("input"),_t.__input.type="text",_t.__input_textShadow="0 1px 1px ",Eo.bind(_t.__input,"keydown",function(Lr){Lr.keyCode===13&&xr.call(this)}),Eo.bind(_t.__input,"blur",xr),Eo.bind(_t.__selector,"mousedown",function(){Eo.addClass(this,"drag").bind(window,"mouseup",function(){Eo.removeClass(Dt.__selector,"drag")})}),Eo.bind(_t.__selector,"touchstart",function(){Eo.addClass(this,"drag").bind(window,"touchend",function(){Eo.removeClass(Dt.__selector,"drag")})});var Lt,$t=document.createElement("div");function Xt(Lr){Ir(Lr),Eo.bind(window,"mousemove",Ir),Eo.bind(window,"touchmove",Ir),Eo.bind(window,"mouseup",Zt),Eo.bind(window,"touchend",Zt)}function Yt(Lr){kr(Lr),Eo.bind(window,"mousemove",kr),Eo.bind(window,"touchmove",kr),Eo.bind(window,"mouseup",lr),Eo.bind(window,"touchend",lr)}function Zt(){Eo.unbind(window,"mousemove",Ir),Eo.unbind(window,"touchmove",Ir),Eo.unbind(window,"mouseup",Zt),Eo.unbind(window,"touchend",Zt),wr()}function lr(){Eo.unbind(window,"mousemove",kr),Eo.unbind(window,"touchmove",kr),Eo.unbind(window,"mouseup",lr),Eo.unbind(window,"touchend",lr),wr()}function xr(){var Lr=tw(this.value);Lr!==!1?(Dt.__color.__state=Lr,Dt.setValue(Dt.__color.toOriginal())):this.value=Dt.__color.toString()}function wr(){Dt.__onFinishChange&&Dt.__onFinishChange.call(Dt,Dt.__color.toOriginal())}function Ir(Lr){Lr.type.indexOf("touch")===-1&&Lr.preventDefault();var Xr=Dt.__saturation_field.getBoundingClientRect(),_n=Lr.touches&&Lr.touches[0]||Lr,On=_n.clientX,Kn=_n.clientY,Mn=(On-Xr.left)/(Xr.right-Xr.left),ca=1-(Kn-Xr.top)/(Xr.bottom-Xr.top);return ca>1?ca=1:ca<0&&(ca=0),Mn>1?Mn=1:Mn<0&&(Mn=0),Dt.__color.v=ca,Dt.__color.s=Mn,Dt.setValue(Dt.__color.toOriginal()),!1}function kr(Lr){Lr.type.indexOf("touch")===-1&&Lr.preventDefault();var Xr=Dt.__hue_field.getBoundingClientRect(),_n=1-((Lr.touches&&Lr.touches[0]||Lr).clientY-Xr.top)/(Xr.bottom-Xr.top);return _n>1?_n=1:_n<0&&(_n=0),Dt.__color.h=360*_n,Dt.setValue(Dt.__color.toOriginal()),!1}return eu.extend(_t.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),eu.extend(_t.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:_t.__field_knob_border+(_t.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),eu.extend(_t.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),eu.extend(_t.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),eu.extend($t.style,{width:"100%",height:"100%",background:"none"}),dR($t,"top","rgba(0,0,0,0)","#000"),eu.extend(_t.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),(Lt=_t.__hue_field).style.background="",Lt.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",Lt.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",Lt.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",Lt.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",Lt.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",eu.extend(_t.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:_t.__input_textShadow+"rgba(0,0,0,0.7)"}),Eo.bind(_t.__saturation_field,"mousedown",Xt),Eo.bind(_t.__saturation_field,"touchstart",Xt),Eo.bind(_t.__field_knob,"mousedown",Xt),Eo.bind(_t.__field_knob,"touchstart",Xt),Eo.bind(_t.__hue_field,"mousedown",Yt),Eo.bind(_t.__hue_field,"touchstart",Yt),_t.__saturation_field.appendChild($t),_t.__selector.appendChild(_t.__field_knob),_t.__selector.appendChild(_t.__saturation_field),_t.__selector.appendChild(_t.__hue_field),_t.__hue_field.appendChild(_t.__hue_knob),_t.domElement.appendChild(_t.__input),_t.domElement.appendChild(_t.__selector),_t.updateDisplay(),_t}return I_(it,vt),F0(it,[{key:"updateDisplay",value:function(){var lt=tw(this.getValue());if(lt!==!1){var pt=!1;eu.each(p0.COMPONENTS,function(Lt){if(!eu.isUndefined(lt[Lt])&&!eu.isUndefined(this.__color.__state[Lt])&&lt[Lt]!==this.__color.__state[Lt])return pt=!0,{}},this),pt&&eu.extend(this.__color.__state,lt)}eu.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var _t=this.__color.v<.5||this.__color.s>.5?255:0,Dt=255-_t;eu.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+_t+","+_t+","+_t+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,dR(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),eu.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+_t+","+_t+","+_t+")",textShadow:this.__input_textShadow+"rgba("+Dt+","+Dt+","+Dt+",.7)"})}}]),it})(KT),Ap=["-moz-","-o-","-webkit-","-ms-",""];function dR(vt,it,lt,pt){vt.style.background="",eu.each(Ap,function(_t){vt.style.cssText+="background: "+_t+"linear-gradient("+it+", "+lt+" 0%, "+pt+" 100%); "})}var tN=function(vt,it){var lt=document,pt=document.createElement("style");pt.type="text/css",pt.innerHTML=vt;var _t=lt.getElementsByTagName("head")[0];try{_t.appendChild(pt)}catch{}},J_=`<div id="dg-save" class="dg dialogue">
Here's the new load parameter for your <code>GUI</code>'s constructor:
<textarea id="dg-new-constructor"></textarea>
<div id="dg-save-locally">
<input id="dg-local-storage" type="checkbox"/> Automatically save
values to <code>localStorage</code> on exit.
<div id="dg-local-explain">The values saved to <code>localStorage</code> will
override those passed to <code>dat.GUI</code>'s constructor. This makes it
easier to work incrementally, but <code>localStorage</code> is fragile,
and your friends may not see the same values you do.
</div>
</div>
</div>`,Vk=function(vt,it){var lt=vt[it];return eu.isArray(arguments[2])||eu.isObject(arguments[2])?new Gk(vt,it,arguments[2]):eu.isNumber(lt)?eu.isNumber(arguments[2])&&eu.isNumber(arguments[3])?eu.isNumber(arguments[4])?new El(vt,it,arguments[2],arguments[3],arguments[4]):new El(vt,it,arguments[2],arguments[3]):eu.isNumber(arguments[4])?new GC(vt,it,{min:arguments[2],max:arguments[3],step:arguments[4]}):new GC(vt,it,{min:arguments[2],max:arguments[3]}):eu.isString(lt)?new ZP(vt,it):eu.isFunction(lt)?new ZT(vt,it,""):eu.isBoolean(lt)?new KP(vt,it):null},Ey=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(vt){setTimeout(vt,1e3/60)},gu=(function(){function vt(){M_(this,vt),this.backgroundElement=document.createElement("div"),eu.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),Eo.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),eu.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var it=this;Eo.bind(this.backgroundElement,"click",function(){it.hide()})}return F0(vt,[{key:"show",value:function(){var it=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),eu.defer(function(){it.backgroundElement.style.opacity=1,it.domElement.style.opacity=1,it.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var it=this,lt=function pt(){it.domElement.style.display="none",it.backgroundElement.style.display="none",Eo.unbind(it.domElement,"webkitTransitionEnd",pt),Eo.unbind(it.domElement,"transitionend",pt),Eo.unbind(it.domElement,"oTransitionEnd",pt)};Eo.bind(this.domElement,"webkitTransitionEnd",lt),Eo.bind(this.domElement,"transitionend",lt),Eo.bind(this.domElement,"oTransitionEnd",lt),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-Eo.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-Eo.getHeight(this.domElement)/2+"px"}}]),vt})();tN((function(vt){if(typeof window<"u"){var it=document.createElement("style");return it.setAttribute("type","text/css"),it.innerHTML=vt,document.head.appendChild(it),vt}})(`.dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}
`));var pS=(function(){try{return!!window.localStorage}catch{return!1}})(),nw=void 0,FM=!0,Ox=void 0,hR=!1,fR=[],hv=function vt(it){var lt=this,pt=it||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),Eo.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],pt=eu.defaults(pt,{closeOnTop:!1,autoPlace:!0,width:vt.DEFAULT_WIDTH}),pt=eu.defaults(pt,{resizable:pt.autoPlace,hideable:pt.autoPlace}),eu.isUndefined(pt.load)?pt.load={preset:"Default"}:pt.preset&&(pt.load.preset=pt.preset),eu.isUndefined(pt.parent)&&pt.hideable&&fR.push(this),pt.resizable=eu.isUndefined(pt.parent)&&pt.resizable,pt.autoPlace&&eu.isUndefined(pt.scrollable)&&(pt.scrollable=!0);var _t,Dt=pS&&localStorage.getItem(tx(this,"isLocal"))==="true",Lt=void 0,$t=void 0;if(Object.defineProperties(this,{parent:{get:function(){return pt.parent}},scrollable:{get:function(){return pt.scrollable}},autoPlace:{get:function(){return pt.autoPlace}},closeOnTop:{get:function(){return pt.closeOnTop}},preset:{get:function(){return lt.parent?lt.getRoot().preset:pt.load.preset},set:function(Zt){lt.parent?lt.getRoot().preset=Zt:pt.load.preset=Zt,(function(lr){for(var xr=0;xr<lr.__preset_select.length;xr++)lr.__preset_select[xr].value===lr.preset&&(lr.__preset_select.selectedIndex=xr)})(this),lt.revert()}},width:{get:function(){return pt.width},set:function(Zt){pt.width=Zt,mR(lt,Zt)}},name:{get:function(){return pt.name},set:function(Zt){pt.name=Zt,$t&&($t.innerHTML=pt.name)}},closed:{get:function(){return pt.closed},set:function(Zt){pt.closed=Zt,pt.closed?Eo.addClass(lt.__ul,vt.CLASS_CLOSED):Eo.removeClass(lt.__ul,vt.CLASS_CLOSED),this.onResize(),lt.__closeButton&&(lt.__closeButton.innerHTML=Zt?vt.TEXT_OPEN:vt.TEXT_CLOSED)}},load:{get:function(){return pt.load}},useLocalStorage:{get:function(){return Dt},set:function(Zt){pS&&(Dt=Zt,Zt?Eo.bind(window,"unload",Lt):Eo.unbind(window,"unload",Lt),localStorage.setItem(tx(lt,"isLocal"),Zt))}}}),eu.isUndefined(pt.parent)){if(this.closed=pt.closed||!1,Eo.addClass(this.domElement,vt.CLASS_MAIN),Eo.makeSelectable(this.domElement,!1),pS&&Dt){lt.useLocalStorage=!0;var Xt=localStorage.getItem(tx(this,"gui"));Xt&&(pt.load=JSON.parse(Xt))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=vt.TEXT_CLOSED,Eo.addClass(this.__closeButton,vt.CLASS_CLOSE_BUTTON),pt.closeOnTop?(Eo.addClass(this.__closeButton,vt.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(Eo.addClass(this.__closeButton,vt.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),Eo.bind(this.__closeButton,"click",function(){lt.closed=!lt.closed})}else{pt.closed===void 0&&(pt.closed=!0);var Yt=document.createTextNode(pt.name);Eo.addClass(Yt,"controller-name"),$t=BM(lt,Yt),Eo.addClass(this.__ul,vt.CLASS_CLOSED),Eo.addClass($t,"title"),Eo.bind($t,"click",function(Zt){return Zt.preventDefault(),lt.closed=!lt.closed,!1}),pt.closed||(this.closed=!1)}pt.autoPlace&&(eu.isUndefined(pt.parent)&&(FM&&(Ox=document.createElement("div"),Eo.addClass(Ox,"dg"),Eo.addClass(Ox,vt.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(Ox),FM=!1),Ox.appendChild(this.domElement),Eo.addClass(this.domElement,vt.CLASS_AUTO_PLACE)),this.parent||mR(lt,pt.width)),this.__resizeHandler=function(){lt.onResizeDebounced()},Eo.bind(window,"resize",this.__resizeHandler),Eo.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),Eo.bind(this.__ul,"transitionend",this.__resizeHandler),Eo.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),pt.resizable&&aN(this),Lt=function(){pS&&localStorage.getItem(tx(lt,"isLocal"))==="true"&&localStorage.setItem(tx(lt,"gui"),JSON.stringify(lt.getSaveObject()))},this.saveToLocalStorageIfPossible=Lt,pt.parent||((_t=lt.getRoot()).width+=1,eu.defer(function(){_t.width-=1}))};function BM(vt,it,lt){var pt=document.createElement("li");return it&&pt.appendChild(it),lt?vt.__ul.insertBefore(pt,lt):vt.__ul.appendChild(pt),vt.onResize(),pt}function jM(vt){Eo.unbind(window,"resize",vt.__resizeHandler),vt.saveToLocalStorageIfPossible&&Eo.unbind(window,"unload",vt.saveToLocalStorageIfPossible)}function pR(vt,it){var lt=vt.__preset_select[vt.__preset_select.selectedIndex];lt.innerHTML=it?lt.value+"*":lt.value}function rN(vt,it){var lt=vt.getRoot(),pt=lt.__rememberedObjects.indexOf(it.object);if(pt!==-1){var _t=lt.__rememberedObjectIndecesToControllers[pt];if(_t===void 0&&(_t={},lt.__rememberedObjectIndecesToControllers[pt]=_t),_t[it.property]=it,lt.load&&lt.load.remembered){var Dt=lt.load.remembered,Lt=void 0;if(Dt[vt.preset])Lt=Dt[vt.preset];else{if(!Dt.Default)return;Lt=Dt.Default}if(Lt[pt]&&Lt[pt][it.property]!==void 0){var $t=Lt[pt][it.property];it.initialValue=$t,it.setValue($t)}}}}function VC(vt,it,lt,pt){if(it[lt]===void 0)throw new Error('Object "'+it+'" has no property "'+lt+'"');var _t=void 0;if(pt.color)_t=new n_(it,lt);else{var Dt=[it,lt].concat(pt.factoryArgs);_t=Vk.apply(vt,Dt)}pt.before instanceof KT&&(pt.before=pt.before.__li),rN(vt,_t),Eo.addClass(_t.domElement,"c");var Lt=document.createElement("span");Eo.addClass(Lt,"property-name"),Lt.innerHTML=_t.property;var $t=document.createElement("div");$t.appendChild(Lt),$t.appendChild(_t.domElement);var Xt=BM(vt,$t,pt.before);return Eo.addClass(Xt,hv.CLASS_CONTROLLER_ROW),_t instanceof n_?Eo.addClass(Xt,"color"):Eo.addClass(Xt,zC(_t.getValue())),(function(Yt,Zt,lr){if(lr.__li=Zt,lr.__gui=Yt,eu.extend(lr,{options:function(Ir){if(arguments.length>1){var kr=lr.__li.nextElementSibling;return lr.remove(),VC(Yt,lr.object,lr.property,{before:kr,factoryArgs:[eu.toArray(arguments)]})}if(eu.isArray(Ir)||eu.isObject(Ir)){var Lr=lr.__li.nextElementSibling;return lr.remove(),VC(Yt,lr.object,lr.property,{before:Lr,factoryArgs:[Ir]})}},name:function(Ir){return lr.__li.firstElementChild.firstElementChild.innerHTML=Ir,lr},listen:function(){return lr.__gui.listen(lr),lr},remove:function(){return lr.__gui.remove(lr),lr}}),lr instanceof El){var xr=new GC(lr.object,lr.property,{min:lr.__min,max:lr.__max,step:lr.__step});eu.each(["updateDisplay","onChange","onFinishChange","step","min","max"],function(Ir){var kr=lr[Ir],Lr=xr[Ir];lr[Ir]=xr[Ir]=function(){var Xr=Array.prototype.slice.call(arguments);return Lr.apply(xr,Xr),kr.apply(lr,Xr)}}),Eo.addClass(Zt,"has-slider"),lr.domElement.insertBefore(xr.domElement,lr.domElement.firstElementChild)}else if(lr instanceof GC){var wr=function(Ir){if(eu.isNumber(lr.__min)&&eu.isNumber(lr.__max)){var kr=lr.__li.firstElementChild.firstElementChild.innerHTML,Lr=lr.__gui.__listening.indexOf(lr)>-1;lr.remove();var Xr=VC(Yt,lr.object,lr.property,{before:lr.__li.nextElementSibling,factoryArgs:[lr.__min,lr.__max,lr.__step]});return Xr.name(kr),Lr&&Xr.listen(),Xr}return Ir};lr.min=eu.compose(wr,lr.min),lr.max=eu.compose(wr,lr.max)}else lr instanceof KP?(Eo.bind(Zt,"click",function(){Eo.fakeEvent(lr.__checkbox,"click")}),Eo.bind(lr.__checkbox,"click",function(Ir){Ir.stopPropagation()})):lr instanceof ZT?(Eo.bind(Zt,"click",function(){Eo.fakeEvent(lr.__button,"click")}),Eo.bind(Zt,"mouseover",function(){Eo.addClass(lr.__button,"hover")}),Eo.bind(Zt,"mouseout",function(){Eo.removeClass(lr.__button,"hover")})):lr instanceof n_&&(Eo.addClass(Zt,"color"),lr.updateDisplay=eu.compose(function(Ir){return Zt.style.borderLeftColor=lr.__color.toString(),Ir},lr.updateDisplay),lr.updateDisplay());lr.setValue=eu.compose(function(Ir){return Yt.getRoot().__preset_select&&lr.isModified()&&pR(Yt.getRoot(),!0),Ir},lr.setValue)})(vt,Xt,_t),vt.__controllers.push(_t),_t}function tx(vt,it){return document.location.href+"."+it}function Np(vt,it,lt){var pt=document.createElement("option");pt.innerHTML=it,pt.value=it,vt.__preset_select.appendChild(pt),lt&&(vt.__preset_select.selectedIndex=vt.__preset_select.length-1)}function nN(vt,it){it.style.display=vt.useLocalStorage?"block":"none"}function iN(vt){var it=vt.__save_row=document.createElement("li");Eo.addClass(vt.domElement,"has-save"),vt.__ul.insertBefore(it,vt.__ul.firstChild),Eo.addClass(it,"save-row");var lt=document.createElement("span");lt.innerHTML="&nbsp;",Eo.addClass(lt,"button gears");var pt=document.createElement("span");pt.innerHTML="Save",Eo.addClass(pt,"button"),Eo.addClass(pt,"save");var _t=document.createElement("span");_t.innerHTML="New",Eo.addClass(_t,"button"),Eo.addClass(_t,"save-as");var Dt=document.createElement("span");Dt.innerHTML="Revert",Eo.addClass(Dt,"button"),Eo.addClass(Dt,"revert");var Lt=vt.__preset_select=document.createElement("select");if(vt.load&&vt.load.remembered?eu.each(vt.load.remembered,function(Zt,lr){Np(vt,lr,lr===vt.preset)}):Np(vt,"Default",!1),Eo.bind(Lt,"change",function(){for(var Zt=0;Zt<vt.__preset_select.length;Zt++)vt.__preset_select[Zt].innerHTML=vt.__preset_select[Zt].value;vt.preset=this.value}),it.appendChild(Lt),it.appendChild(lt),it.appendChild(pt),it.appendChild(_t),it.appendChild(Dt),pS){var $t=document.getElementById("dg-local-explain"),Xt=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block",localStorage.getItem(tx(0,"isLocal"))==="true"&&Xt.setAttribute("checked","checked"),nN(vt,$t),Eo.bind(Xt,"change",function(){vt.useLocalStorage=!vt.useLocalStorage,nN(vt,$t)})}var Yt=document.getElementById("dg-new-constructor");Eo.bind(Yt,"keydown",function(Zt){!Zt.metaKey||Zt.which!==67&&Zt.keyCode!==67||nw.hide()}),Eo.bind(lt,"click",function(){Yt.innerHTML=JSON.stringify(vt.getSaveObject(),void 0,2),nw.show(),Yt.focus(),Yt.select()}),Eo.bind(pt,"click",function(){vt.save()}),Eo.bind(_t,"click",function(){var Zt=prompt("Enter a new preset name.");Zt&&vt.saveAs(Zt)}),Eo.bind(Dt,"click",function(){vt.revert()})}function aN(vt){var it=void 0;function lt(Dt){return Dt.preventDefault(),vt.width+=it-Dt.clientX,vt.onResize(),it=Dt.clientX,!1}function pt(){Eo.removeClass(vt.__closeButton,hv.CLASS_DRAG),Eo.unbind(window,"mousemove",lt),Eo.unbind(window,"mouseup",pt)}function _t(Dt){return Dt.preventDefault(),it=Dt.clientX,Eo.addClass(vt.__closeButton,hv.CLASS_DRAG),Eo.bind(window,"mousemove",lt),Eo.bind(window,"mouseup",pt),!1}vt.__resize_handle=document.createElement("div"),eu.extend(vt.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),Eo.bind(vt.__resize_handle,"mousedown",_t),Eo.bind(vt.__closeButton,"mousedown",_t),vt.domElement.insertBefore(vt.__resize_handle,vt.domElement.firstElementChild)}function mR(vt,it){vt.domElement.style.width=it+"px",vt.__save_row&&vt.autoPlace&&(vt.__save_row.style.width=it+"px"),vt.__closeButton&&(vt.__closeButton.style.width=it+"px")}function bA(vt,it){var lt={};return eu.each(vt.__rememberedObjects,function(pt,_t){var Dt={},Lt=vt.__rememberedObjectIndecesToControllers[_t];eu.each(Lt,function($t,Xt){Dt[Xt]=it?$t.initialValue:$t.getValue()}),lt[_t]=Dt}),lt}hv.toggleHide=function(){hR=!hR,eu.each(fR,function(vt){vt.domElement.style.display=hR?"none":""})},hv.CLASS_AUTO_PLACE="a",hv.CLASS_AUTO_PLACE_CONTAINER="ac",hv.CLASS_MAIN="main",hv.CLASS_CONTROLLER_ROW="cr",hv.CLASS_TOO_TALL="taller-than-window",hv.CLASS_CLOSED="closed",hv.CLASS_CLOSE_BUTTON="close-button",hv.CLASS_CLOSE_TOP="close-top",hv.CLASS_CLOSE_BOTTOM="close-bottom",hv.CLASS_DRAG="drag",hv.DEFAULT_WIDTH=245,hv.TEXT_CLOSED="Close Controls",hv.TEXT_OPEN="Open Controls",hv._keydownHandler=function(vt){document.activeElement.type==="text"||vt.which!==72&&vt.keyCode!==72||hv.toggleHide()},Eo.bind(window,"keydown",hv._keydownHandler,!1),eu.extend(hv.prototype,{add:function(vt,it){return VC(this,vt,it,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(vt,it){return VC(this,vt,it,{color:!0})},remove:function(vt){this.__ul.removeChild(vt.__li),this.__controllers.splice(this.__controllers.indexOf(vt),1);var it=this;eu.defer(function(){it.onResize()})},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&Ox.removeChild(this.domElement);var vt=this;eu.each(this.__folders,function(it){vt.removeFolder(it)}),Eo.unbind(window,"keydown",hv._keydownHandler,!1),jM(this)},addFolder:function(vt){if(this.__folders[vt]!==void 0)throw new Error('You already have a folder in this GUI by the name "'+vt+'"');var it={name:vt,parent:this};it.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[vt]&&(it.closed=this.load.folders[vt].closed,it.load=this.load.folders[vt]);var lt=new hv(it);this.__folders[vt]=lt;var pt=BM(this,lt.domElement);return Eo.addClass(pt,"folder"),lt},removeFolder:function(vt){this.__ul.removeChild(vt.domElement.parentElement),delete this.__folders[vt.name],this.load&&this.load.folders&&this.load.folders[vt.name]&&delete this.load.folders[vt.name],jM(vt);var it=this;eu.each(vt.__folders,function(lt){vt.removeFolder(lt)}),eu.defer(function(){it.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var vt=this.getRoot();if(vt.scrollable){var it=Eo.getOffset(vt.__ul).top,lt=0;eu.each(vt.__ul.childNodes,function(pt){vt.autoPlace&&pt===vt.__save_row||(lt+=Eo.getHeight(pt))}),window.innerHeight-it-20<lt?(Eo.addClass(vt.domElement,hv.CLASS_TOO_TALL),vt.__ul.style.height=window.innerHeight-it-20+"px"):(Eo.removeClass(vt.domElement,hv.CLASS_TOO_TALL),vt.__ul.style.height="auto")}vt.__resize_handle&&eu.defer(function(){vt.__resize_handle.style.height=vt.__ul.offsetHeight+"px"}),vt.__closeButton&&(vt.__closeButton.style.width=vt.width+"px")},onResizeDebounced:eu.debounce(function(){this.onResize()},50),remember:function(){if(eu.isUndefined(nw)&&((nw=new gu).domElement.innerHTML=J_),this.parent)throw new Error("You can only call remember on a top level GUI.");var vt=this;eu.each(Array.prototype.slice.call(arguments),function(it){vt.__rememberedObjects.length===0&&iN(vt),vt.__rememberedObjects.indexOf(it)===-1&&vt.__rememberedObjects.push(it)}),this.autoPlace&&mR(this,this.width)},getRoot:function(){for(var vt=this;vt.parent;)vt=vt.parent;return vt},getSaveObject:function(){var vt=this.load;return vt.closed=this.closed,this.__rememberedObjects.length>0&&(vt.preset=this.preset,vt.remembered||(vt.remembered={}),vt.remembered[this.preset]=bA(this)),vt.folders={},eu.each(this.__folders,function(it,lt){vt.folders[lt]=it.getSaveObject()}),vt},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=bA(this),pR(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(vt){this.load.remembered||(this.load.remembered={},this.load.remembered.Default=bA(this,!0)),this.load.remembered[vt]=bA(this),this.preset=vt,Np(this,vt,!0),this.saveToLocalStorageIfPossible()},revert:function(vt){eu.each(this.__controllers,function(it){this.getRoot().load.remembered?rN(vt||this.getRoot(),it):it.setValue(it.initialValue),it.__onFinishChange&&it.__onFinishChange.call(it,it.getValue())},this),eu.each(this.__folders,function(it){it.revert(it)}),vt||pR(this.getRoot(),!1)},listen:function(vt){var it=this.__listening.length===0;this.__listening.push(vt),it&&(function lt(pt){pt.length!==0&&Ey.call(window,function(){lt(pt)}),eu.each(pt,function(_t){_t.updateDisplay()})})(this.__listening)},updateDisplay:function(){eu.each(this.__controllers,function(vt){vt.updateDisplay()}),eu.each(this.__folders,function(vt){vt.updateDisplay()})}});var sN=hv,gR=(function(){function vt(it){this.player=it}return Object.defineProperty(vt.prototype,"frameRate",{get:function(){return this.player.fps.value},set:function(it){},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"drawFrames",{get:function(){return this.player.runtime.fps},set:function(it){},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"drawCall",{get:function(){return this.player.runtime.drawCall},set:function(it){},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"resolution",{get:function(){return this.player.config.resolution},set:function(it){this.player.updateConfig({resolution:it})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"size",{get:function(){var it,lt;return((it=this.player.view)===null||it===void 0?void 0:it.width)+"*"+((lt=this.player.view)===null||lt===void 0?void 0:lt.height)},set:function(it){},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"minFPS",{get:function(){return this.player.config.minFPS},set:function(it){this.player.updateConfig({minFPS:it,maxFPS:this.player.config.maxFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"maxFPS",{get:function(){return this.player.config.maxFPS},set:function(it){this.player.updateConfig({maxFPS:it,minFPS:this.player.config.minFPS})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"autoResolution",{get:function(){return this.player.config.autoResolution},set:function(it){this.player.updateConfig({autoResolution:it})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"autoFPS",{get:function(){return this.player.config.autoFPS},set:function(it){this.player.updateConfig({autoFPS:it})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"backgroundColor",{get:function(){return this.player.config.transactionBgColor},set:function(it){this.player.updateConfig({transactionBgColor:it})},enumerable:!1,configurable:!0}),Object.defineProperty(vt.prototype,"maxResolutionLevel",{get:function(){return this.player.config.maxResolutionLevel},set:function(it){this.player.updateConfig({maxResolutionLevel:it})},enumerable:!1,configurable:!0}),vt})(),_A=(function(){function vt(it,lt){var pt;this.config=new gR(it),this.anchor=lt,pt=this.createControllerGUI(),this.gui=pt[0],this.controller=pt[1],this.createStats()}return vt.prototype.createStats=function(){var it=this;this.stateId=setInterval(function(){it.controller.frameRate.updateDisplay(),it.controller.size.updateDisplay(),it.controller.minFPS.updateDisplay(),it.controller.drawFrames.updateDisplay(),it.controller.maxFPS.updateDisplay(),it.controller.resolution.updateDisplay(),it.controller.autoFps.updateDisplay(),it.controller.autoResolution.updateDisplay(),it.controller.drawCall.updateDisplay()},16)},vt.prototype.createControllerGUI=function(){var it=new sN({autoPlace:!0,closed:!0});it.domElement.style.opacity=".6",it.domElement.style.transformOrigin="100% 0",it.domElement.style.transform="scale(1)",this.anchor.appendChild(it.domElement),it.domElement.style.position="absolute",it.domElement.style.right="0",it.domElement.style.top="0",it.domElement.style.zIndex="2";var lt={frameRate:it.add(this.config,"frameRate"),drawFrames:it.add(this.config,"drawFrames"),drawCall:it.add(this.config,"drawCall"),size:it.add(this.config,"size"),minFPS:it.add(this.config,"minFPS",0,60),maxFPS:it.add(this.config,"maxFPS",0,60),resolution:it.add(this.config,"resolution",.5,8,.5),autoResolution:it.add(this.config,"autoResolution"),autoFps:it.add(this.config,"autoFPS"),maxResolutionLevel:it.add(this.config,"maxResolutionLevel",0,4,1),transactionBgColor:it.addColor(this.config,"backgroundColor")};return[it,lt]},vt.prototype.destroy=function(){try{window.clearInterval(this.stateId),this.anchor.removeChild(this.gui.domElement),this.gui.destroy()}catch{}},vt})(),vR=(function(){function vt(it){var lt=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){lt.isScheduling=!0;var pt=lt.tasks.shift();pt&&!lt.isDestroy&&lt.fn(pt).finally(function(){lt.tasks.length>0?window.requestAnimationFrame(lt.schedule):lt.isScheduling=!1})},this.fn=it}return vt.prototype.destroy=function(){this.isDestroy=!0},vt.prototype.addTask=function(it){this.tasks.push(it),this.isScheduling||this.schedule()},vt})(),oN=(function(){function vt(it){this.autoUnlock=Object.create(null),this.locks=Object.create(null),this.available=!1,this.available=it}return vt.prototype.addLock=function(it,lt){var pt=this;this.available&&(this.locks[it]=lt,this.autoUnlock[it]=window.setTimeout(function(){delete pt.locks[it]},3e3))},vt.prototype.unlock=function(it,lt){this.available&&lt&&this.locks[it]&&this.locks[it]===lt&&(window.clearTimeout(this.autoUnlock[it]),delete this.locks[it])},vt.prototype.isLocked=function(it){return!!this.available&&!!this.locks[it]},vt})(),uN=(function(){function vt(){var it=this;this.tasks=[],this.isDestroy=!1,this.isScheduling=!1,this.schedule=function(){it.isScheduling=!0;var lt=it.tasks.shift();lt&&!it.isDestroy&&(lt.status="running",lt.fn.apply(null).then(function(){it.tasks.length>0?setTimeout(it.schedule):it.isScheduling=!1}).catch(function(){it.tasks.length>0?setTimeout(it.schedule):it.isScheduling=!1}))}}return vt.prototype.getRunningTask=function(){return this.tasks[0]&&this.tasks[0].status==="running"?this.tasks[0]:null},vt.prototype.addTask=function(it,lt){var pt={type:it,status:"wait",fn:lt},_t=this.getRunningTask();_t&&it===_t.type||(this.tasks=this.tasks.filter(function(Dt){return Dt.type!==it}),this.tasks.push(pt),this.isScheduling||this.schedule())},vt.prototype.destroy=function(){this.isDestroy=!0},vt})(),$M=function(){return($M=Object.assign||function(vt){for(var it,lt=1,pt=arguments.length;lt<pt;lt++)for(var _t in it=arguments[lt])Object.prototype.hasOwnProperty.call(it,_t)&&(vt[_t]=it[_t]);return vt}).apply(this,arguments)},qx=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})},rx=function(vt,it){var lt,pt,_t,Dt,Lt={label:0,sent:function(){if(1&_t[0])throw _t[1];return _t[1]},trys:[],ops:[]};return Dt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Dt[Symbol.iterator]=function(){return this}),Dt;function $t(Xt){return function(Yt){return(function(Zt){if(lt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(lt=1,pt&&(_t=2&Zt[0]?pt.return:Zt[0]?pt.throw||((_t=pt.return)&&_t.call(pt),0):pt.next)&&!(_t=_t.call(pt,Zt[1])).done)return _t;switch(pt=0,_t&&(Zt=[2&Zt[0],_t.value]),Zt[0]){case 0:case 1:_t=Zt;break;case 4:return Lt.label++,{value:Zt[1],done:!1};case 5:Lt.label++,pt=Zt[1],Zt=[0];continue;case 7:Zt=Lt.ops.pop(),Lt.trys.pop();continue;default:if(_t=Lt.trys,!((_t=_t.length>0&&_t[_t.length-1])||Zt[0]!==6&&Zt[0]!==2)){Lt=0;continue}if(Zt[0]===3&&(!_t||Zt[1]>_t[0]&&Zt[1]<_t[3])){Lt.label=Zt[1];break}if(Zt[0]===6&&Lt.label<_t[1]){Lt.label=_t[1],_t=Zt;break}if(_t&&Lt.label<_t[2]){Lt.label=_t[2],Lt.ops.push(Zt);break}_t[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Zt=it.call(vt,Lt)}catch(lr){Zt=[6,lr],pt=0}finally{lt=_t=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}})([Xt,Yt])}}},Hk=(function(){function vt(){var it=this;this.logList=[],this.checkTimer=null,this.retryTimes=0,this.enable=!1,this.db=null,this.useIndexedDB=!1,this.DB_NAME="__slide_logs_report__",this.STORE_NAME="logs",this.BATCH_SIZE=1e3,this.uploadLoggerGlobalEvent=function(lt){lt.data.type==="@slide/_upload_log_"&&it.start()},this.config={checkTime:5e3,buffer:300},window.addEventListener("message",this.uploadLoggerGlobalEvent),this.initIndexedDB()}return vt.prototype.initIndexedDB=function(){return qx(this,void 0,void 0,function(){var it,lt=this;return rx(this,function(pt){if(!("indexedDB"in window))return this.useIndexedDB=!1,this.start(),[2];try{(it=indexedDB.open(this.DB_NAME,1)).onerror=function(){lt.useIndexedDB=!1},it.onsuccess=function(){lt.start(),lt.db=it.result,lt.useIndexedDB=!0},it.onupgradeneeded=function(_t){var Dt=_t.target.result;Dt.objectStoreNames.contains(lt.STORE_NAME)||Dt.createObjectStore(lt.STORE_NAME,{keyPath:"id",autoIncrement:!0}).createIndex("timestamp","timestamp")}}catch{this.useIndexedDB=!1}return[2]})})},vt.prototype.storeLogInIndexedDB=function(it){return qx(this,void 0,void 0,function(){var lt,pt=this;return rx(this,function(_t){switch(_t.label){case 0:if(!this.useIndexedDB)return[2];_t.label=1;case 1:return _t.trys.push([1,4,,5]),this.db&&this.isDatabaseHealthy()?[3,3]:[4,this.recreateDatabase()];case 2:if(_t.sent(),!this.db||!this.useIndexedDB)throw new Error("Database not available after recreation attempt");_t.label=3;case 3:return[2,new Promise(function(Dt,Lt){var $t=pt.db.transaction([pt.STORE_NAME],"readwrite"),Xt=$t.objectStore(pt.STORE_NAME).add(it);$t.onerror=function(){pt.recreateDatabase().then(function(){if(pt.db&&pt.useIndexedDB){var Yt=pt.db.transaction([pt.STORE_NAME],"readwrite").objectStore(pt.STORE_NAME).add(it);Yt.onsuccess=function(){return Dt()},Yt.onerror=function(){return Lt(Yt.error)}}else Lt(new Error("Database recreation failed"))}).catch(function(Yt){console.warn("Database recreation failed:",Yt),pt.useIndexedDB=!1,Lt(Yt)})},Xt.onsuccess=function(){return Dt()},Xt.onerror=function(){var Yt,Zt;((Yt=Xt.error)===null||Yt===void 0?void 0:Yt.name)==="UnknownError"||((Zt=Xt.error)===null||Zt===void 0?void 0:Zt.name)==="NotFoundError"?pt.recreateDatabase().catch(function(lr){console.warn("Database recreation failed:",lr),pt.useIndexedDB=!1}).finally(function(){return Lt(Xt.error)}):Lt(Xt.error)}})];case 4:throw lt=_t.sent(),this.useIndexedDB=!1,lt;case 5:return[2]}})})},vt.prototype.getLogsFromIndexedDB=function(it){return qx(this,void 0,void 0,function(){var lt=this;return rx(this,function(pt){switch(pt.label){case 0:if(!this.useIndexedDB)return[2,[]];pt.label=1;case 1:return pt.trys.push([1,4,,5]),this.db&&this.isDatabaseHealthy()?[3,3]:[4,this.recreateDatabase()];case 2:if(pt.sent(),!this.db||!this.useIndexedDB)return[2,[]];pt.label=3;case 3:return[2,new Promise(function(_t,Dt){var Lt=lt.db.transaction([lt.STORE_NAME],"readonly"),$t=Lt.objectStore(lt.STORE_NAME).index("timestamp").openCursor(null,"next"),Xt=[];Lt.onerror=function(){var Yt,Zt;((Yt=Lt.error)===null||Yt===void 0?void 0:Yt.name)==="UnknownError"||((Zt=Lt.error)===null||Zt===void 0?void 0:Zt.name)==="NotFoundError"?lt.recreateDatabase().catch(function(lr){console.warn("Database recreation failed:",lr),lt.useIndexedDB=!1}).finally(function(){return _t([])}):Dt(Lt.error)},$t.onsuccess=function(Yt){var Zt=Yt.target.result;Zt&&Xt.length<it?(Xt.push(Zt.value),Zt.continue()):_t(Xt.map(function(lr){var xr;return $M($M({},lr),{id:(xr=lr.id)===null||xr===void 0?void 0:xr.toString()})}))},$t.onerror=function(){var Yt,Zt;((Yt=$t.error)===null||Yt===void 0?void 0:Yt.name)==="UnknownError"||((Zt=$t.error)===null||Zt===void 0?void 0:Zt.name)==="NotFoundError"?lt.recreateDatabase().catch(function(lr){console.warn("Database recreation failed:",lr),lt.useIndexedDB=!1}).finally(function(){return _t([])}):Dt($t.error)}})];case 4:return pt.sent(),this.useIndexedDB=!1,[2,[]];case 5:return[2]}})})},vt.prototype.deleteLogsFromIndexedDB=function(it){return qx(this,void 0,void 0,function(){var lt=this;return rx(this,function(pt){switch(pt.label){case 0:if(!this.useIndexedDB||it.length===0)return[2];pt.label=1;case 1:return pt.trys.push([1,4,,5]),this.db&&this.isDatabaseHealthy()?[3,3]:[4,this.recreateDatabase()];case 2:if(pt.sent(),!this.db||!this.useIndexedDB)return[2];pt.label=3;case 3:return[2,new Promise(function(_t,Dt){var Lt=lt.db.transaction([lt.STORE_NAME],"readwrite"),$t=Lt.objectStore(lt.STORE_NAME),Xt=it.map(function(Yt){return new Promise(function(Zt,lr){var xr=Number(Yt.id);if(xr){var wr=$t.delete(xr);wr.onsuccess=function(){return Zt()},wr.onerror=function(){var Ir,kr;((Ir=wr.error)===null||Ir===void 0?void 0:Ir.name)==="UnknownError"||((kr=wr.error)===null||kr===void 0?void 0:kr.name)==="NotFoundError"?Zt():lr(wr.error)}}else Zt()})});Lt.onerror=function(){var Yt,Zt;((Yt=Lt.error)===null||Yt===void 0?void 0:Yt.name)==="UnknownError"||((Zt=Lt.error)===null||Zt===void 0?void 0:Zt.name)==="NotFoundError"?lt.recreateDatabase().catch(function(lr){console.warn("Database recreation failed:",lr),lt.useIndexedDB=!1}).finally(function(){return _t()}):Dt(Lt.error)},Promise.all(Xt).then(function(){return _t()}).catch(Dt)})];case 4:return pt.sent(),this.useIndexedDB=!1,[3,5];case 5:return[2]}})})},vt.prototype.start=function(){return qx(this,void 0,void 0,function(){var it=this;return rx(this,function(lt){return clearInterval(this.checkTimer),this.checkTimer=setInterval(function(){return qx(it,void 0,void 0,function(){return rx(this,function(pt){switch(pt.label){case 0:return[4,this.uploadLog()];case 1:return pt.sent(),[2]}})})},this.config.checkTime),[2]})})},vt.prototype.pause=function(){clearInterval(this.checkTimer)},vt.prototype.addLog=function(it,lt,pt,_t){return qx(this,void 0,void 0,function(){var Dt;return rx(this,function(Lt){switch(Lt.label){case 0:if(Dt={level:lt,taskId:pt,message:it,randomId:_t,timestamp:Date.now().toString()},!this.useIndexedDB)return[3,5];Lt.label=1;case 1:return Lt.trys.push([1,3,,4]),[4,this.storeLogInIndexedDB(Dt)];case 2:return Lt.sent(),[3,4];case 3:return Lt.sent(),this.logList.push(Dt),[3,4];case 4:return[3,6];case 5:this.logList.push(Dt),Lt.label=6;case 6:return[2]}})})},vt.prototype.isDatabaseHealthy=function(){if(!this.db)return!1;try{return this.db.transaction([this.STORE_NAME],"readonly").objectStore(this.STORE_NAME).index("timestamp"),!0}catch(it){return console.warn("Database health check failed:",it),!1}},vt.prototype.recreateDatabase=function(){return qx(this,void 0,void 0,function(){var it=this;return rx(this,function(lt){return[2,new Promise(function(pt,_t){try{it.db&&(it.db.close(),it.db=null);var Dt=indexedDB.open(it.DB_NAME,1);Dt.onerror=function(){it.useIndexedDB=!1,_t(Dt.error)},Dt.onsuccess=function(){it.db=Dt.result,it.useIndexedDB=!0,pt()},Dt.onupgradeneeded=function(Lt){var $t=Lt.target.result;$t.objectStoreNames.contains(it.STORE_NAME)||$t.createObjectStore(it.STORE_NAME,{keyPath:"id",autoIncrement:!0}).createIndex("timestamp","timestamp")}}catch(Lt){it.useIndexedDB=!1,_t(Lt)}})]})})},vt.prototype.destroy=function(){clearInterval(this.checkTimer),window.removeEventListener("message",this.uploadLoggerGlobalEvent),this.db&&(this.db.close(),this.db=null)},vt.prototype.uploadLog=function(it){return it===void 0&&(it=!1),qx(this,void 0,void 0,function(){var lt,pt,_t,Dt=this;return rx(this,function(Lt){switch(Lt.label){case 0:return lt=[],this.useIndexedDB?[4,this.getLogsFromIndexedDB(this.BATCH_SIZE)]:[3,2];case 1:return(lt=Lt.sent()).length===0?[2]:[3,3];case 2:if(!(this.logList.length>=this.config.buffer||it))return[2];lt=this.logList.splice(0),Lt.label=3;case 3:pt=function(){Dt.useIndexedDB||(Dt.logList=lt.concat(Dt.logList)),Dt.retryTimes>3&&Dt.pause(),Dt.retryTimes+=1},Lt.label=4;case 4:return Lt.trys.push([4,10,,11]),[4,fetch("https://netless-ppt-plugin-dev.cn-hangzhou.log.aliyuncs.com/logstores/netless-ppt-plugin-dev/track",{method:"POST",headers:{"x-log-apiversion":"0.6.0","Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify({__topic__:"netless-ppt-plugin-dev",__source__:"netless-ppt-plugin-dev",__logs__:lt})})];case 5:return Lt.sent().ok?(this.retryTimes=0,this.useIndexedDB?[4,this.deleteLogsFromIndexedDB(lt)]:[3,7]):[3,8];case 6:Lt.sent(),Lt.label=7;case 7:return[3,9];case 8:pt(),Lt.label=9;case 9:return[3,11];case 10:return _t=Lt.sent(),console.warn(_t),pt(),[3,11];case 11:return[2]}})})},vt.prototype.setEnable=function(it){this.enable!==it&&(it?this.start():this.pause())},vt})(),yR=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})},xA=function(vt,it){var lt,pt,_t,Dt,Lt={label:0,sent:function(){if(1&_t[0])throw _t[1];return _t[1]},trys:[],ops:[]};return Dt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Dt[Symbol.iterator]=function(){return this}),Dt;function $t(Xt){return function(Yt){return(function(Zt){if(lt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(lt=1,pt&&(_t=2&Zt[0]?pt.return:Zt[0]?pt.throw||((_t=pt.return)&&_t.call(pt),0):pt.next)&&!(_t=_t.call(pt,Zt[1])).done)return _t;switch(pt=0,_t&&(Zt=[2&Zt[0],_t.value]),Zt[0]){case 0:case 1:_t=Zt;break;case 4:return Lt.label++,{value:Zt[1],done:!1};case 5:Lt.label++,pt=Zt[1],Zt=[0];continue;case 7:Zt=Lt.ops.pop(),Lt.trys.pop();continue;default:if(_t=Lt.trys,!((_t=_t.length>0&&_t[_t.length-1])||Zt[0]!==6&&Zt[0]!==2)){Lt=0;continue}if(Zt[0]===3&&(!_t||Zt[1]>_t[0]&&Zt[1]<_t[3])){Lt.label=Zt[1];break}if(Zt[0]===6&&Lt.label<_t[1]){Lt.label=_t[1],_t=Zt;break}if(_t&&Lt.label<_t[2]){Lt.label=_t[2],Lt.ops.push(Zt);break}_t[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Zt=it.call(vt,Lt)}catch(lr){Zt=[6,lr],pt=0}finally{lt=_t=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}})([Xt,Yt])}}};function mS(vt,it,lt,pt,_t){return yR(this,void 0,void 0,function(){var Dt,Lt,$t,Xt,Yt,Zt;return xA(this,function(lr){switch(lr.label){case 0:return Dt=document.createElement("div"),(Lt=new Zl({anchor:Dt,renderOptions:{minFPS:1,maxFPS:1,resolution:1,maxResolutionLevel:lt,forceCanvas:!0},mode:"local",interactive:!1,useLocalCache:!0})).setResource(vt,it),[4,Lt.getSlideCountAsync()];case 1:$t=lr.sent(),lr.label=2;case 2:if(lr.trys.push([2,12,13,14]),!(_t&&_t.length>0))return[3,7];Xt=_t.filter(function(xr,wr){return _t.indexOf(xr)===wr}),Zt=0,lr.label=3;case 3:return Zt<Xt.length?(Yt=Xt[Zt])>0&&Yt<=$t?[4,Lt.player.stagePool.preload(Yt,!0)]:[3,5]:[3,6];case 4:lr.sent(),pt(Math.round((Zt+1)/Xt.length*100)/100),lr.label=5;case 5:return Zt++,[3,3];case 6:return[3,11];case 7:Zt=1,lr.label=8;case 8:return Zt<=$t?[4,Lt.player.stagePool.preload(Zt,!0)]:[3,11];case 9:lr.sent(),pt(Math.round(Zt/$t*100)/100),lr.label=10;case 10:return Zt++,[3,8];case 11:return[3,14];case 12:throw lr.sent();case 13:return Lt.destroy(),[7];case 14:return[2]}})})}var bR=(function(){var vt=function(it,lt){return(vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pt,_t){pt.__proto__=_t}||function(pt,_t){for(var Dt in _t)Object.prototype.hasOwnProperty.call(_t,Dt)&&(pt[Dt]=_t[Dt])})(it,lt)};return function(it,lt){if(typeof lt!="function"&&lt!==null)throw new TypeError("Class extends value "+String(lt)+" is not a constructor or null");function pt(){this.constructor=it}vt(it,lt),it.prototype=lt===null?Object.create(lt):(pt.prototype=lt.prototype,new pt)}})(),e1=function(){return(e1=Object.assign||function(vt){for(var it,lt=1,pt=arguments.length;lt<pt;lt++)for(var _t in it=arguments[lt])Object.prototype.hasOwnProperty.call(it,_t)&&(vt[_t]=it[_t]);return vt}).apply(this,arguments)},iw=function(vt,it,lt,pt){var _t,Dt=arguments.length,Lt=Dt<3?it:pt===null?pt=Object.getOwnPropertyDescriptor(it,lt):pt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Lt=Reflect.decorate(vt,it,lt,pt);else for(var $t=vt.length-1;$t>=0;$t--)(_t=vt[$t])&&(Lt=(Dt<3?_t(Lt):Dt>3?_t(it,lt,Lt):_t(it,lt))||Lt);return Dt>3&&Lt&&Object.defineProperty(it,lt,Lt),Lt},bm=function(vt,it,lt,pt){return new(lt||(lt=Promise))(function(_t,Dt){function Lt(Yt){try{Xt(pt.next(Yt))}catch(Zt){Dt(Zt)}}function $t(Yt){try{Xt(pt.throw(Yt))}catch(Zt){Dt(Zt)}}function Xt(Yt){var Zt;Yt.done?_t(Yt.value):(Zt=Yt.value,Zt instanceof lt?Zt:new lt(function(lr){lr(Zt)})).then(Lt,$t)}Xt((pt=pt.apply(vt,[])).next())})},sy=function(vt,it){var lt,pt,_t,Dt,Lt={label:0,sent:function(){if(1&_t[0])throw _t[1];return _t[1]},trys:[],ops:[]};return Dt={next:$t(0),throw:$t(1),return:$t(2)},typeof Symbol=="function"&&(Dt[Symbol.iterator]=function(){return this}),Dt;function $t(Xt){return function(Yt){return(function(Zt){if(lt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(lt=1,pt&&(_t=2&Zt[0]?pt.return:Zt[0]?pt.throw||((_t=pt.return)&&_t.call(pt),0):pt.next)&&!(_t=_t.call(pt,Zt[1])).done)return _t;switch(pt=0,_t&&(Zt=[2&Zt[0],_t.value]),Zt[0]){case 0:case 1:_t=Zt;break;case 4:return Lt.label++,{value:Zt[1],done:!1};case 5:Lt.label++,pt=Zt[1],Zt=[0];continue;case 7:Zt=Lt.ops.pop(),Lt.trys.pop();continue;default:if(_t=Lt.trys,!((_t=_t.length>0&&_t[_t.length-1])||Zt[0]!==6&&Zt[0]!==2)){Lt=0;continue}if(Zt[0]===3&&(!_t||Zt[1]>_t[0]&&Zt[1]<_t[3])){Lt.label=Zt[1];break}if(Zt[0]===6&&Lt.label<_t[1]){Lt.label=_t[1],_t=Zt;break}if(_t&&Lt.label<_t[2]){Lt.label=_t[2],Lt.ops.push(Zt);break}_t[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Zt=it.call(vt,Lt)}catch(lr){Zt=[6,lr],pt=0}finally{lt=_t=0}if(5&Zt[0])throw Zt[1];return{value:Zt[0]?Zt[1]:void 0,done:!0}})([Xt,Yt])}}},UM=window.ResizeObserver||Uk,nT=function(vt){return new Promise(function(it){return setTimeout(it,vt)})};function JT(vt,it){return bm(this,void 0,void 0,function(){var lt;return sy(this,function(pt){switch(pt.label){case 0:lt=Date.now(),pt.label=1;case 1:return!vt()&&Date.now()-lt<it?[4,nT(50)]:[3,3];case 2:return pt.sent(),lt=Date.now(),[3,1];case 3:return[2]}})})}var m0={syncDispatch:"syncDispatch",syncReceive:"syncReceive",syncEventLag:"syncEventLag",renderStart:"renderStart",renderEnd:"renderEnd",renderError:"renderError",slideChange:"slideChange",mainSeqStepStart:"mainSeqStepStart",mainSeqStepEnd:"mainSeqStepEnd",animateStart:"animateStart",animateEnd:"animateEnd",stateChange:"stateChange",slideStepEnd:"slideEnd",slideStepStart:"slideStart",useraddLink:"useraddLink"},eE={taskId:"",url:"",currentSlideIndex:-1,mainSeqStep:-1,mainSeqState:null,mediaState:Object.create(null),interactiveSeqState:Object.create(null)},_R="";try{_R="1.4.43"}catch{_R="-dev-"}var Ay=null;try{(Ay=st.createInstance({name:"__slide_local_log__",driver:st.INDEXEDDB,version:1})).ready(function(vt){}).catch(function(vt){})}catch{}navigator.userAgent.toUpperCase().includes("HUAWEI")&&document.createElement("canvas").getContext("2d").fillText("遥遥领先",0,10);var Zl=(function(vt){function it(_t){var Dt=vt.call(this)||this;return Dt.iosResetCache=[],Dt.version=_R,Dt.__slideState=jP()(eE),Dt.userInputTime=0,Dt.isSyncingSlideState=!1,Dt.frozenTaskManager=new uN,Dt.randomId=nt(),Dt.resize=!1,Dt.isAnimating=!1,Dt.renderingTaskManager=new M1,Dt.isLoading=!1,Dt.interactive=!0,Dt.renderingIndex=0,Dt.frameWidth=1,Dt.frameHeight=1,Dt.frame=document.createElement("div"),Dt.canvasContainer=document.createElement("div"),Dt.medianController=document.createElement("div"),Dt.frameResizeObserver=new UM(function(){return Dt.frameResizeHandler()}),Dt.timestamp=function(){return Date.now()},Dt.mode="local",Dt.enableGlobalClick=!1,Dt.lastEmitedState=null,Dt.playerController=null,Dt.isInitResized=!1,Dt.cacheImage=document.createElement("img"),Dt.isTouchStart=!1,Dt.touchStartId=void 0,Dt.taskId="",Dt.volumeAdjuster=new KI,Dt.designWidth=0,Dt.designHeight=0,Dt._slideCount=0,Dt._dispatchIncrId=0,Dt._receiveIncrId=0,Dt.resizeView=jC()(Dt._resizeView.bind(Dt),50),Dt.handleViewClick=jC()(Dt._handleViewClick.bind(Dt),300,{leading:!0}),Dt.slideNots=null,Dt.resourceList=[],Dt._updateVolumeByStaticAdjuster=function(Lt){Dt.volumeAdjuster.volume=Lt},Dt.recoverHandler=function(Lt){if(Lt.data.type==="@slide/_recover_"&&Lt.data.slideId===Dt.randomId){var $t=Lt.data,Xt=$t.recoverBy,Yt=$t.payload;if(!Yt)return;Xt==="renderOtherPage"&&Yt.slideIndex?Dt.doRenderSlide(Yt.slideIndex).catch(function(Zt){Dt.logger.error(Zt,Dt.taskId)}):Xt==="reloadCurrentPage"&&Dt.doRenderSlide(Dt.renderingIndex).catch(function(Zt){Dt.logger.error(Zt,Dt.taskId)})}},Dt.urlInterrupter=function(Lt){return bm(Dt,void 0,void 0,function(){var $t,Xt;return sy(this,function(Yt){return $t=Lt,this.resourceList.length>0&&(Xt=Lt.replace(/^.*__internal__/,""),$t=this.resourceList.find(function(Zt){return Zt.indexOf(Xt)>=0})||Lt),this.config.urlInterrupter?[2,this.config.urlInterrupter($t)]:[2,Promise.resolve($t)]})})},Dt.userInputHandle=function(){Dt.userInputTime=Date.now()},Dt.handleViewTouchStart=function(){window.clearTimeout(Dt.touchStartId),Dt.isTouchStart=!0,Dt.touchStartId=setTimeout(function(){Dt.isTouchStart=!1},350)},Dt.handleViewTouchEnd=function(){Dt.isTouchStart&&(Dt.isTouchStart=!1,Dt.handleViewClick())},Dt.handleSlideRef=function(){console.log(Dt),window.__slide=Dt},Dt.updateStageCountLimit=function(Lt){var $t=Number(Lt.detail.value);$t>0&&Number.isInteger($t)&&(it.__stageCountLimit=$t)},Dt.receiveSyncHandler=function(Lt){return bm(Dt,void 0,void 0,function(){var $t,Xt,Yt,Zt,lr,xr=this;return sy(this,function(wr){switch(wr.label){case 0:return WS()(Lt.incrId)&&(Lt.incrId&&Lt.incrId-this._receiveIncrId!=1&&this.emit(m0.syncEventLag),this._receiveIncrId=Lt.incrId||0),this.logger.info("sync receive "+JSON.stringify(Lt),this.taskId),Lt.type!=="nextStep"?[3,1]:(this.mainSeqStep!==Lt.next-1&&this.mainSeqStep+1!==this.mainSeqLength&&this.player?(this.setMainSeqStep(Lt.next,"start"),this.player.nextTick(function(){xr.doNextStep(!0,Lt.clientId||"")})):this.doNextStep(!0,Lt.clientId||""),[3,6]);case 1:return Lt.type!=="prevStep"?[3,2]:(this.mainSeqStep===0&&this.mainSeqState==="idle"||this.mainSeqStep===Lt.next+1||this.mainSeqStep+1===this.mainSeqLength?this.doPrevStep(!0):(this.setMainSeqStep(Lt.next+1,"start"),($t=this.player)===null||$t===void 0||$t.nextTick(function(){xr.doPrevStep(!0)})),[3,6]);case 2:return Lt.type!=="interactiveAnim"?[3,3]:(this.player?this.player.applyInteractiveAction(Lt.action):this.__slideState.interactiveSeqState[Lt.seqId]?this.__slideState.interactiveSeqState[Lt.seqId].step+=1:this.__slideState.interactiveSeqState[Lt.seqId]={step:0,state:"end"},[3,6]);case 3:return Lt.type!=="renderSlide"?[3,5]:[4,this.doRenderSlide(Lt.index,Lt.isForward)];case 4:return wr.sent(),[3,6];case 5:Lt.type==="mediaPlay"?((Xt=this.player)===null||Xt===void 0||Xt.setMediaState(Lt.id,!0),this.__slideState.mediaState[Lt.id]=Lt.state):Lt.type==="mediaPause"?((Yt=this.player)===null||Yt===void 0||Yt.setMediaState(Lt.id,!1),this.__slideState.mediaState[Lt.id]=Lt.state):Lt.type==="mediaSeek"?((Zt=this.player)===null||Zt===void 0||Zt.setMediaCurrentTime(Lt.id,Lt.time),this.__slideState.mediaState[Lt.id]=Lt.state):Lt.type==="mediaFullscreen"&&(Lt.targetId&&this.__slideState.mediaState[Lt.targetId]?this.__slideState.mediaState[Lt.targetId].fullscreen=Lt.state:this.__slideState.mediaState[Lt.targetId]={fullscreen:Lt.state,type:"pause",time:0},(lr=this.player)===null||lr===void 0||lr.syncFullscreenVideoState({targetId:Lt.targetId,state:Lt.state,slideIndex:Lt.slideIndex})),wr.label=6;case 6:return[2]}})})},Dt.flushDebounce=function(){Dt.resizeView.flush(),Dt.handleViewClick.flush()},Dt.handlePrevSlide=function(Lt){return Lt===void 0&&(Lt=!1),bm(Dt,void 0,void 0,function(){var $t,Xt;return sy(this,function(Yt){return this.player?(($t=this.player.prevSlideIndex)>=1&&(!((Xt=this.config.navigatorDelegate)===null||Xt===void 0)&&Xt.gotoPage?this.config.navigatorDelegate.gotoPage($t):Lt?this.doRenderSlide($t,!1):this.renderSlide($t,!1)),[2]):[2]})})},Dt.handleNextSlide=function(Lt){return Lt===void 0&&(Lt=!1),bm(Dt,void 0,void 0,function(){var $t,Xt;return sy(this,function(Yt){return this.player?(($t=this.player.nextSlideIndex)<=this.slideCount&&(!((Xt=this.config.navigatorDelegate)===null||Xt===void 0)&&Xt.gotoPage?this.config.navigatorDelegate.gotoPage($t):Lt?this.doRenderSlide($t,!0):this.renderSlide($t,!0)),[2]):[2]})})},Dt.handleGotoSlide=function(Lt){if(Lt<=Dt.slideCount&&Lt>=1){var $t=Dt.slideState.currentSlideIndex<=Lt;Dt.renderSlide(Lt,$t)}else Lt===-1&&Dt.renderSlide(Dt.slideCount,!0)},it.instances.push(Dt),Dt.config=Dt.initSlideConfig(_t),Dt.tracker=function(Lt){_t.whiteTracker&&_t.whiteTracker.commit({name:Lt.name,reason:Lt.reason,result:Lt.result,payload:e1(e1({},Lt.payload),{slideId:Dt.randomId,taskId:Dt.taskId})},{slideVersion:Dt.version||""})},it.trackLogger.setEnable(!!Dt.config.enableTracking),Dt.logger={info:function(Lt,$t){var Xt;it.appendLogString("INFO - "+new Date().toISOString()+" - {"+Dt.randomId+"}["+$t+"] "+Lt+`
`),it.trackLogger.addLog(Lt,"info",$t,Dt.randomId);var Yt=(Xt=Dt.config.logger)===null||Xt===void 0?void 0:Xt.info;Yt&&Yt("["+$t+"] "+Lt)},warn:function(Lt,$t){var Xt;it.appendLogString("WARN - "+new Date().toISOString()+" - {"+Dt.randomId+"}["+$t+"] "+Lt+`
`),it.trackLogger.addLog(Lt,"warn",$t,Dt.randomId);var Yt=(Xt=Dt.config.logger)===null||Xt===void 0?void 0:Xt.warn;Yt&&Yt("["+$t+"] "+Lt)},error:function(Lt,$t){var Xt;it.appendLogString("ERROR - "+new Date().toISOString()+" - {"+Dt.randomId+"}["+$t+"] "+Lt+`
`),it.trackLogger.addLog(Lt,"error",$t,Dt.randomId);var Yt=(Xt=Dt.config.logger)===null||Xt===void 0?void 0:Xt.error;Yt&&Yt("["+$t+"] "+Lt)}},Dt.logger.info("new slide with clientId: "+Dt.config.clientId+", version: "+Dt.version,Dt.taskId),Dt.tracker({name:"initSlide",result:"",reason:"",payload:{taskId:Dt.taskId}}),Dt.anchor=Dt.config.anchor,Dt.syncQueue=new vR(Dt.receiveSyncHandler),Dt.lock=new oN(Dt.mode==="interactive"),Dt.cacheImage.style.position="absolute",Dt.cacheImage.style.display="block",Dt.cacheImage.style.zIndex="100",Dt.setMedianControllerAttribute(),Dt.canvasContainer.style.position="relative",Dt.canvasContainer.style.fontSize="0",Dt.canvasContainer.appendChild(Dt.medianController),Dt.frame.appendChild(Dt.canvasContainer),Dt.frame.appendChild(Dt.cacheImage),Dt.frameResizeObserver.observe(Dt.frame),Dt.on(m0.syncReceive,function(Lt){Dt.lock.unlock(Lt.type,Lt.uuid),!Dt.player&&Dt.config.skipActionWhenFrozen||Dt.mode==="sync"&&Dt.config.clientId===Lt.clientId||Dt.syncQueue.addTask(Lt)}),Dt.renderingTaskManager.eventHub.on("task-error",function(Lt){var $t=Lt.error,Xt=Lt.task,Yt=Gm.transform($t);Yt.errorType===Om.RuntimeWarn?Dt.logger.warn(Yt.message,Dt.taskId):Dt.logger.error(Yt.message,Dt.taskId),Dt.isLoading=!1,Dt.reportError(Yt,Xt.slideIndex)}),window.addEventListener("__slide_ref__",Dt.handleSlideRef),window.addEventListener("__slide_updateStageCountLimit",Dt.updateStageCountLimit),Dt.resizeView=jC()(Dt.resizeView.bind(Dt),50),Dt.player=Dt.initPlayer(Dt.config),Dt.config.controller&&Dt.createController(),Dt.player.view&&Dt.canvasContainer.appendChild(Dt.player.view),Dt.handleViewClick=jC()(Dt.handleViewClick,300),Dt.player.errorChannel.on("error",function(Lt,$t){var Xt=Gm.transform(Lt);Xt.errorType===Om.RuntimeWarn?Dt.logger.warn(Xt.message,Dt.taskId):Dt.logger.error(Xt.message,Dt.taskId),Dt.isLoading=!1,Dt.reportError(Lt,$t),Dt.tracker({name:"slideError",reason:Xt.errorMsg,result:"",payload:{code:Xt.errorType}})}),window.addEventListener("message",Dt.recoverHandler),it.volumeAdjuster.on("update",Dt._updateVolumeByStaticAdjuster),Dt.volumeAdjuster.volume=it.volumeAdjuster.volume,Dt}var lt,pt;return bR(it,vt),it.flushLog=function(_t){return _t===void 0&&(_t=!1),bm(this,void 0,void 0,function(){return sy(this,function(Dt){switch(Dt.label){case 0:if(!(it._tempLog.length>131072||_t&&it._tempLog.length>0))return[3,5];Dt.label=1;case 1:return Dt.trys.push([1,3,,4]),[4,Ay?.setItem("run_time_log_"+it._tempLogIndex,it._tempLog)];case 2:return Dt.sent(),[3,4];case 3:return Dt.sent(),[3,4];case 4:it._tempLog="",it._tempLogIndex+=1,Dt.label=5;case 5:return[2]}})})},it.stopRemoteLog=function(){it.remoteLogAddress=null},it.startRemoteLog=function(_t){return bm(this,void 0,void 0,function(){var Dt,Lt,$t,Xt,Yt;return sy(this,function(Zt){switch(Zt.label){case 0:return it.remoteLogAddress=_t,[4,it.flushLog(!0)];case 1:if(Zt.sent(),!Ay)return[3,13];Dt=[],Zt.label=2;case 2:return Zt.trys.push([2,4,,5]),[4,Ay.keys()];case 3:return Dt=(Zt.sent()||[]).sort(function(lr,xr){return parseInt(lr.replace("run_time_log_",""))-parseInt(xr.replace("run_time_log_",""))}),[3,5];case 4:return Zt.sent(),[3,5];case 5:Lt=0,$t=Dt,Zt.label=6;case 6:if(!(Lt<$t.length))return[3,13];Xt=$t[Lt],Xt.replace("run_time_log_",""),Yt="",Zt.label=7;case 7:return Zt.trys.push([7,9,,10]),[4,Ay.getItem(Xt)];case 8:return Yt=Zt.sent()||"",[3,10];case 9:return Zt.sent(),[3,10];case 10:return[4,fetch(it.remoteLogAddress+"/logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({log:Yt})})];case 11:Zt.sent(),Zt.label=12;case 12:return Lt++,[3,6];case 13:return[2]}})})},it.appendLogString=function(_t){it._tempLog+=_t,it.remoteLogAddress&&fetch(it.remoteLogAddress+"/logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({log:_t})}).catch(function(){})},it.setStageCountLimit=function(_t){if(!WS()(_t)||!Number.isInteger(_t))throw new Error("Invalid stage count limit");it.__stageCountLimit=_t},Object.defineProperty(it.prototype,"dispatchIncrId",{get:function(){return this._dispatchIncrId++},enumerable:!1,configurable:!0}),it.prototype.reportError=function(_t,Dt){this.emit(m0.renderError,{error:_t,index:Dt}),window.postMessage({type:"@slide/_error_",errorType:_t.errorType,errorMsg:_t.errorMsg,slideId:this.randomId,slideIndex:Dt||-1,customMessage:"@slide/_error_"},"*"),it.trackLogger.uploadLog(!0)},it.prototype.initSlideConfig=function(_t){return _t.timestamp&&(this.timestamp=_t.timestamp),_t.rtcAudio&&(C_.RtcAudioClazz=_t.rtcAudio),_t.enableWebAudio!==!1&&(_t.enableWebAudio=!0),this.mode=_t.mode,this.anchor=_t.anchor,this.anchor.appendChild(this.frame),this.enableGlobalClick=!bl()(_t.enableGlobalClick)&&_t.enableGlobalClick,this.resize=_t.resize||!1,this.interactive=_t.interactive,this.frame.style.cssText=_t.fixedFrameSize?"width:"+_t.fixedFrameSize.width+"px;height:"+_t.fixedFrameSize.height+"px;":"width:100%;height:100%",this.frame.style.cssText+="display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;",_t.fixedFrameSize&&(this.frameWidth=_t.fixedFrameSize.width,this.frameHeight=_t.fixedFrameSize.height),_t},it.prototype.initPlayer=function(_t){var Dt,Lt,$t,Xt=this,Yt=new C_({mode:this.mode,useLocalCache:!!bl()(this.config.useLocalCache)||this.config.useLocalCache,logger:this.logger,resourceTimeout:bl()(this.config.resourceTimeout)?15e3:this.config.resourceTimeout,loadDelegate:this.config.loaderDelegate,volumeAdjuster:this.volumeAdjuster,urlInterrupter:this.urlInterrupter,tracker:this.tracker,enableWebAudio:this.config.enableWebAudio,enableAutoForward:this.config.enableAutoForward,customLinks:this.config.customLinks},_t.renderOptions);return Yt.setInteractive(this.interactive),Yt.updateConfig(_t.renderOptions||{}),Yt.on(pu.renderStart,function(Zt){Xt.isLoading=!0,Xt.emit(m0.renderStart,Zt),window.postMessage({type:"@slide/_render_start_",taskId:Xt.taskId,index:Zt},"*")}),Yt.on(pu.renderEnd,function(Zt){Xt.isLoading=!1,Xt.player&&(Xt.designHeight=Xt.player.designHeight,Xt.designWidth=Xt.player.designWidth,Xt.cacheImage.style.width=Xt.player.designWidth+"px",Xt.cacheImage.style.height=Xt.player.designHeight+"px",Xt.cacheImage.style.maxWidth=Xt.player.designWidth+"px",Xt.cacheImage.style.minWidth=Xt.player.designHeight+"px",Xt._slideCount=Xt.player.slideCount),Xt.emit(m0.renderEnd,Zt),window.postMessage({type:"@slide/_render_end_",taskId:Xt.taskId,index:Zt},"*")}),Yt.on(pu.slideChange,function(Zt){Xt.__slideState.currentSlideIndex=Zt,Xt.emitStateChange(),Xt.emit(m0.slideChange,Zt)}),Yt.on(pu.mainSeqStateChange,function(Zt){Xt.__slideState.mainSeqState=Zt,Xt.emitStateChange()}),Yt.on(pu.mainSeqStepChange,function(Zt){Xt.__slideState.mainSeqStep=Zt,Xt.emitStateChange()}),Yt.on(pu.interactiveSeqStateChange,function(Zt){var lr=Zt.id,xr=Zt.state;Xt.__slideState.interactiveSeqState[lr]=xr,Xt.emitStateChange()}),Yt.on(pu.animateStart,function(){Xt.isAnimating!==!0&&(Xt.isAnimating=!0,Xt.emit(m0.animateStart))}),Yt.on(pu.animateEnd,function(){Xt.isAnimating!==!1&&(Xt.isAnimating=!1,Xt.emit(m0.animateEnd))}),Yt.on(pu.interactiveSeqAction,function(Zt){var lr=Zt.action,xr=Zt.seqId;Xt.emitSyncDispatch({slideIndex:Xt.__slideState.currentSlideIndex,type:"interactiveAnim",action:lr,seqId:xr}),Xt.emitStateChange()}),Yt.on(pu.mainSeqStepStart,function(Zt){Xt.emit(m0.mainSeqStepStart,Zt)}),Yt.on(pu.mainSeqStepEnd,function(Zt){Xt.emit(m0.mainSeqStepEnd,Zt)}),Yt.on(pu.mediaPlay,function(Zt){var lr,xr=(lr=Xt.__slideState.mediaState[Zt.id])!==null&&lr!==void 0?lr:{};xr.type="play",xr.time=Xt.timestamp()-1e3*Zt.time,Xt.__slideState.mediaState[Zt.id]=xr,Zt._stateOnly?Xt.config.mode==="interactive"&&Xt.receiveSyncHandler({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaPlay",id:Zt.id,state:xr}).catch(function(wr){Xt.logger.error(wr?.message,Xt.taskId)}):Xt.emitSyncDispatch({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaPlay",id:Zt.id,state:xr}),Xt.emitStateChange()}),Yt.on(pu.mediaStop,function(Zt){delete Xt.__slideState.mediaState[Zt.id],Xt.emitStateChange()}),Yt.on(pu.mediaPause,function(Zt){var lr,xr=(lr=Xt.__slideState.mediaState[Zt.id])!==null&&lr!==void 0?lr:{};xr.type="pause",xr.time=Zt.time,Xt.__slideState.mediaState[Zt.id]=xr,Zt._stateOnly?Xt.config.mode==="interactive"&&Xt.receiveSyncHandler({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaPause",id:Zt.id,state:xr}).catch(function(wr){Xt.logger.error(wr?.message,Xt.taskId)}):Xt.emitSyncDispatch({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaPause",id:Zt.id,state:xr}),Xt.emitStateChange()}),Yt.on(pu.mediaSeek,function(Zt){var lr,xr=(lr=Xt.__slideState.mediaState[Zt.id])!==null&&lr!==void 0?lr:{};Zt.isPlaying?(xr.type="play",xr.time=Xt.timestamp()-1e3*Zt.time):(xr.type="pause",xr.time=Zt.time),Xt.__slideState.mediaState[Zt.id]=xr,Xt.emitSyncDispatch({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaSeek",id:Zt.id,time:Zt.time,state:xr}),Xt.emitStateChange()}),Yt.on(pu.requestNextStep,function(){Xt.nextStep()}),Yt.on(pu.requestPrevSlide,function(Zt){Xt.handlePrevSlide(Zt)}),Yt.on(pu.requestNextSlide,function(Zt){Xt.handleNextSlide(Zt)}),Yt.on(pu.useraddLink,function(Zt){Xt.emit(m0.useraddLink,Xt.taskId,Xt.renderingIndex,Zt)}),Yt.on(pu.requestGotoSlide,function(Zt){var lr;!((lr=Xt.config.navigatorDelegate)===null||lr===void 0)&&lr.gotoPage?Xt.config.navigatorDelegate.gotoPage(Zt):Xt.handleGotoSlide(Zt)}),Yt.on(pu.requestOpenUrl,function(Zt){var lr;!((lr=Xt.config.navigatorDelegate)===null||lr===void 0)&&lr.openUrl&&Xt.config.navigatorDelegate.openUrl(Zt)}),Yt.on(pu.fullscreenChange,function(Zt){var lr,xr=Zt.targetId,wr=Zt.state;Xt.emitSyncDispatch({slideIndex:Xt.__slideState.currentSlideIndex,type:"mediaFullscreen",targetId:xr,state:wr});var Ir=(lr=Xt.__slideState.mediaState[xr])!==null&&lr!==void 0?lr:{};Ir.fullscreen=wr,Xt.__slideState.mediaState[xr]=Ir,Xt.emitStateChange()}),Yt.on(pu.changeLocalFullscreenState,function(Zt){Zt.slideIndex===Xt.__slideState.currentSlideIndex?(Zt.targetId&&Xt.__slideState.mediaState[Zt.targetId]&&(Xt.__slideState.mediaState[Zt.targetId].fullscreen=Zt.status),Xt.emitStateChange()):Xt.logger.info("event slideIndex: "+Zt.slideIndex+", current slideIndex: "+Xt.__slideState.currentSlideIndex,Xt.taskId)}),(Dt=Yt.view)===null||Dt===void 0||Dt.addEventListener("touchend",this.handleViewTouchEnd),(Lt=Yt.view)===null||Lt===void 0||Lt.addEventListener("touchstart",this.handleViewTouchStart),($t=Yt.view)===null||$t===void 0||$t.addEventListener("click",this.handleViewClick),Yt.on(pu.userInput,this.userInputHandle),Yt},it.prototype._handleViewClick=function(){var _t=this;setTimeout(function(){var Dt=Date.now();Math.abs(Dt-_t.userInputTime)>500&&_t.enableGlobalClick&&_t.nextStep()})},it.prototype.createController=function(){this.player&&(this.playerController=new _A(this.player,this.frame))},it.prototype.setMedianControllerAttribute=function(){this.medianController.className="median-container",this.medianController.style.position="absolute",this.medianController.style.left="0",this.medianController.style.top="0",this.medianController.style.zIndex="2",this.medianController.style.fontSize="16px"},it.prototype.frameResizeHandler=function(){if(!this.config.fixedFrameSize){var _t=this.frame.getBoundingClientRect(),Dt=_t.width,Lt=_t.height;this.frameWidth=Dt,this.frameHeight=Lt,this.resizeView()}},it.prototype.updateFixedFrameSize=function(_t,Dt,Lt){this.config.fixedFrameSize&&(this.frameWidth=_t,this.frameHeight=Dt,this.frame.style.width=_t+"px",this.frame.style.height=Dt+"px",this.resizeView(Lt))},it.prototype._resizeView=function(_t){var Dt,Lt,$t=this,Xt=this.width,Yt=this.height;if(Xt>0&&Yt>0){var Zt=this.frameWidth/Xt,lr=Zt*Yt;lr>this.frameHeight&&(Zt*=this.frameHeight/lr),(Dt=this.player)===null||Dt===void 0||Dt.scaleView(Zt,this.resize,_t),this.cacheImage.style.transform="scale("+Zt+")",this.medianController.style.transform="scale("+Zt+")",this.medianController.setAttribute("data-scale",Zt.toString()),this.isInitResized||(this.isInitResized=!0,(Lt=this.player)===null||Lt===void 0||Lt.clock.setTimeout(function(){$t.frame.style.visibility="visible"},32))}},it.prototype.setSlideState=function(_t){var Dt,Lt,$t;return bm(this,void 0,void 0,function(){var Xt,Yt=this;return sy(this,function(Zt){switch(Zt.label){case 0:return this.isSyncingSlideState=!0,this.logger.info("stateChange receive "+JSON.stringify(_t),this.taskId),_t.taskId&&_t.taskId!==this.__slideState.taskId&&(this.__slideState.taskId=_t.taskId,(Dt=this.player)===null||Dt===void 0||Dt.setResourceData(_t.taskId,this.__slideState.url)),_t.url&&_t.url!==this.__slideState.url&&(this.__slideState.url=_t.url,(Lt=this.player)===null||Lt===void 0||Lt.setResourceData(this.__slideState.taskId,_t.url)),Number.isInteger(_t.currentSlideIndex)&&_t.currentSlideIndex!==this.__slideState.currentSlideIndex?(this.__slideState.currentSlideIndex=_t.currentSlideIndex,[4,this.doRenderSlide(_t.currentSlideIndex)]):[3,2];case 1:Zt.sent(),Zt.label=2;case 2:return[4,($t=this.player)===null||$t===void 0?void 0:$t.clock.waitUntil(function(){var lr,xr;return((lr=Yt.player)===null||lr===void 0?void 0:lr.currentIndex)===_t.currentSlideIndex&&((xr=Yt.player)===null||xr===void 0?void 0:xr.currentStage)},3e3)];case 3:return Zt.sent(),Xt=!1,Number.isInteger(_t.mainSeqStep)&&_t.mainSeqStep!==this.__slideState.mainSeqStep&&(Xt=!0,this.__slideState.mainSeqStep=_t.mainSeqStep),_t.mainSeqState&&_t.mainSeqState!==this.__slideState.mainSeqState&&(Xt=!0,this.__slideState.mainSeqState=_t.mainSeqState),Xt&&this.setMainSeqStep(this.__slideState.mainSeqStep,this.__slideState.mainSeqState==="idle"?"start":"end"),_t.interactiveSeqState&&(this.initInteractiveSeq(_t),this.__slideState.interactiveSeqState=_t.interactiveSeqState),[4,nT(1500)];case 4:return Zt.sent(),_t.mediaState&&(this.initMedia(_t),this.__slideState.mediaState=_t.mediaState),this.isSyncingSlideState=!1,[2]}})})},it.prototype.initInteractiveSeq=function(_t){var Dt;for(var Lt in _t.interactiveSeqState){var $t=_t.interactiveSeqState[Lt];(Dt=this.player)===null||Dt===void 0||Dt.setInteractiveSeqState(Lt,$t.step,$t.state==="idle"?"start":"end")}},it.prototype.initMedia=function(_t){var Dt,Lt,$t;for(var Xt in _t.mediaState){var Yt=_t.mediaState[Xt],Zt=this.__slideState.mediaState[Xt];if((Dt=this.player)===null||Dt===void 0||Dt.syncFullscreenVideoState({targetId:Xt,state:!!Yt.fullscreen,slideIndex:this.slideState.currentSlideIndex}),!Zt||Yt.type!==Zt.type||Yt.time!==Zt.time)if(Yt.type==="play"){var lr=(this.timestamp()-Yt.time)/1e3;(Lt=this.player)===null||Lt===void 0||Lt.setMediaState(Xt,!0,lr)}else($t=this.player)===null||$t===void 0||$t.setMediaState(Xt,!1,Yt.time)}},Object.defineProperty(it.prototype,"slideCount",{get:function(){return this._slideCount},enumerable:!1,configurable:!0}),it.prototype.getSizeAsync=function(){return bm(this,void 0,void 0,function(){var _t;return sy(this,function(Dt){switch(Dt.label){case 0:if(this.width>0&&this.height>0)return[2,[this.width,this.height]];Dt.label=1;case 1:return Dt.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,Dt.sent().json()];case 3:return[2,[(_t=Dt.sent()).width,_t.height]];case 4:return Dt.sent(),[2,[0,0]];case 5:return[2]}})})},it.prototype.getSlideCountAsync=function(){return bm(this,void 0,void 0,function(){return sy(this,function(_t){switch(_t.label){case 0:if(this._slideCount>0)return[2,this._slideCount];_t.label=1;case 1:return _t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/slide-1.json")];case 2:return[4,_t.sent().json()];case 3:return[2,_t.sent().slideCount];case 4:return _t.sent(),[2,0];case 5:return[2]}})})},Object.defineProperty(it.prototype,"slideState",{get:function(){return this.__slideState.mainSeqState=this.mainSeqState,this.__slideState.mainSeqStep=this.mainSeqStep,JSON.parse(JSON.stringify(this.__slideState))},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"mainSeqLength",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.mainSeqLength())||0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"mainSeqStep",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.mainSeqStep())||0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"mainSeqState",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.mainSeqState())||null},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"renderOptions",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.config)||null},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"drawCall",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.runtime.drawCall)||0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"renderFps",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.runtime.fps)||0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"runtimeFps",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.fps.value)||0},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"view",{get:function(){var _t;return((_t=this.player)===null||_t===void 0?void 0:_t.view)||null},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"width",{get:function(){return this.designWidth},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"height",{get:function(){return this.designHeight},enumerable:!1,configurable:!0}),it.prototype.updateRenderOption=function(_t){this.player&&(this.player.updateConfig(_t),this.renderOptions&&(this.config.renderOptions=this.renderOptions))},it.prototype.setResource=function(_t,Dt){var Lt;this.taskId=_t,(Lt=this.player)===null||Lt===void 0||Lt.setResourceData(_t,Dt),this.__slideState.taskId=_t,this.__slideState.url=Dt,this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"setResource",taskId:_t,url:Dt})},it.prototype.setResourceList=function(_t,Dt){var Lt;this.taskId=_t,this.resourceList=Dt,(Lt=this.player)===null||Lt===void 0||Lt.setResourceData(_t,"__internal__"),this.__slideState.taskId=_t,this.__slideState.url="__internal__"},it.prototype._renderSlide=function(_t){var Dt;return bm(this,void 0,void 0,function(){var Lt=this;return sy(this,function($t){switch($t.label){case 0:return this.renderingIndex=_t,this.player&&_t===this.player.currentIndex?[2]:((C_.platform.isIOS()||C_.platform.isAndroid())&&this.iosResetCache.indexOf(_t)<0&&this.iosResetCache.push(_t),this.flushDebounce(),[4,(Dt=this.player)===null||Dt===void 0?void 0:Dt.renderSlide(_t)]);case 1:return $t.sent(),this.__slideState.currentSlideIndex=_t,this.resizeView(),this.__slideState.interactiveSeqState={},this.__slideState.mediaState={},this.emitStateChange(),setTimeout(function(){var Xt,Yt;((Yt=(Xt=Lt.player)===null||Xt===void 0?void 0:Xt.view)===null||Yt===void 0?void 0:Yt.style.visibility)==="hidden"&&(Lt.player.view.style.visibility="visible"),Lt.frame.style.visibility==="hidden"&&(Lt.frame.style.visibility="visible"),Lt.cacheImage.style.display="none"},100),[2]}})})},it.prototype.renderSlide=function(_t,Dt){if(Dt===void 0&&(Dt=!0),this.player){var Lt=Number(_t);(Lt!==this.player.currentIndex||this.renderingTaskManager.hasStartTask())&&(Lt>this.slideCount&&this.slideCount>0||this.poseRenderSlide(Lt,Dt))}},it.prototype.needCreateNewPlayer=function(){var _t=it.__stageCountLimit;return _t<=0&&(_t=C_.platform.isLowGpuMemory()?15:30),(C_.platform.isIOS()||C_.platform.isAndroid())&&this.iosResetCache.length>_t},it.prototype.poseRenderSlide=function(_t,Dt){this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:_t,isForward:Dt}):this.mode==="sync"?(this.doRenderSlide(_t,Dt),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"renderSlide",index:_t,isForward:Dt})):this.doRenderSlide(_t,Dt)},it.prototype.doRenderSlide=function(_t,Dt){var Lt,$t,Xt,Yt=this;if(Dt===void 0&&(Dt=!0),!this.player)return Promise.resolve();if(this.needCreateNewPlayer()&&(this.iosResetCache=[],this.iosNewPlayer=this.initPlayer(this.config),this.iosNewPlayer.setResourceData(this.__slideState.taskId,this.__slideState.url)),this.iosNewPlayer){var Zt=this.player.getSnapshot();this.cacheImage.src=Zt,this.player.destroy(),(Lt=this.playerController)===null||Lt===void 0||Lt.destroy(),this.player=this.iosNewPlayer,this.iosNewPlayer=void 0,!(($t=this.config)===null||$t===void 0)&&$t.controller&&this.createController(),!((Xt=this==null?void 0:this.player)===null||Xt===void 0)&&Xt.view&&(this.player.view.style.visibility="hidden",this.canvasContainer.appendChild(this.player.view))}var lr=Math.random().toString(32).substr(2);return this.player.isForward=Dt,this.renderingTaskManager.addTask(function(){return Yt._renderSlide(_t)},_t,lr),new Promise(function(xr,wr){Yt.renderingTaskManager.eventHub.once("task-end-"+lr,xr),Yt.renderingTaskManager.eventHub.once("task-error-"+lr,wr)})},it.prototype.getSnapshot=function(){var _t,Dt;return(Dt=(_t=this.player)===null||_t===void 0?void 0:_t.getSnapshot())!==null&&Dt!==void 0?Dt:null},it.prototype.nextStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasNextStep()||this.emit(m0.slideStepEnd),this.player.mainSeqHasNextStep()?this.mode==="interactive"?this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()+1}):this.mode==="sync"?(this.doNextStep(!1,""),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"nextStep",next:this.player.mainSeqStep()})):this.doNextStep(!1,""):this.handleNextSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+!!this.player+", interactive: "+this.interactive,this.taskId)},it.prototype.doNextStep=function(_t,Dt){if(this.player){var Lt=!this.config.clientId||Dt===this.config.clientId;this.player.nextStep(_t,Lt);var $t=this.player.mainSeqStep();this.__slideState.mainSeqStep=$t,this.emitStateChange()}},it.prototype.prevStep=function(){!this.isLoading&&this.player&&this.interactive?(this.hasPrevStep()||this.emit(m0.slideStepStart),this.player.mainSeqHasPrevStep()?this.mode==="interactive"?this.emitSyncDispatch({type:"prevStep",slideIndex:this.__slideState.currentSlideIndex,next:this.player.mainSeqStep()-1}):this.mode==="sync"?(this.doPrevStep(),this.emitSyncDispatch({slideIndex:this.__slideState.currentSlideIndex,type:"prevStep",next:this.player.mainSeqStep()})):this.doPrevStep():this.handlePrevSlide()):this.logger.info("prevent nextStep. isLoading: "+this.isLoading+", player: "+this.player+", interactive: "+this.interactive,this.taskId)},it.prototype.doPrevStep=function(_t){if(_t===void 0&&(_t=!1),this.player){this.player.prevStep(_t);var Dt=this.player.mainSeqStep();this.__slideState.mainSeqStep=Dt,this.emitStateChange()}},it.prototype.isSlideStateReady=function(_t){return _t.taskId.length>0&&_t.url.length>0&&_t.currentSlideIndex>0},it.prototype.emitStateChange=function(){if(this.mode!=="local"&&!this.isSyncingSlideState){var _t=this.slideState;!BP()(this.lastEmitedState,_t)&&this.isSlideStateReady(_t)&&(this.lastEmitedState=_t,this.emit(m0.stateChange,_t),this.logger.info("stateChange dispatch "+JSON.stringify(this.slideState),this.taskId))}},it.prototype.emitSyncDispatch=function(_t){if(!this.lock.isLocked(_t.type)){var Dt=Math.random().toString(32).substr(2);this.lock.addLock(_t.type,Dt);var Lt=e1(e1({},_t),{uuid:Dt,clientId:this.config.clientId});this.config.mode==="sync"&&(Lt.incrId=this.dispatchIncrId),this.emit(m0.syncDispatch,Lt),this.logger.info("sync dispatch "+JSON.stringify(Lt),this.taskId)}},it.prototype.setMainSeqStep=function(_t,Dt){var Lt;(Lt=this.player)===null||Lt===void 0||Lt.setMainSeqStep(_t,Dt)},it.prototype.setInteractive=function(_t){var Dt;this.interactive=_t,(Dt=this.player)===null||Dt===void 0||Dt.setInteractive(_t)},it.prototype.pause=function(){var _t;(_t=this.player)===null||_t===void 0||_t.pause()},it.prototype.resume=function(){var _t;(_t=this.player)===null||_t===void 0||_t.resume()},it.prototype._doFrozen=function(_t){var Dt;return bm(this,void 0,void 0,function(){var Lt,$t,Xt,Yt=this;return sy(this,function(Zt){switch(Zt.label){case 0:return this.logger.info("do frozen with player["+!!this.player+"]",this.taskId),this.tracker({name:"frozenSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.view&&this.player?[4,this.player.clock.waitUntil(function(){return!Yt.isLoading},6e4)]:[3,2];case 1:for($t in Zt.sent(),Lt=this.player.getSnapshot()||"",this.cacheImage.src=Lt,this.cacheImage.style.display="block",this.player.destroy(),(Dt=this.playerController)===null||Dt===void 0||Dt.destroy(),this.player=void 0,this.__slideState.mediaState)Xt=this.__slideState.mediaState[$t],this.__slideState.mediaState[$t]=e1(e1({},Xt),{frozenTime:this.timestamp()});Zt.label=2;case 2:return _t&&_t(),[2]}})})},it.prototype.frozen=function(_t){var Dt=this;this.frozenTaskManager.addTask("frozen",function(){return Dt._doFrozen(_t)})},it.prototype._doRelease=function(_t){var Dt,Lt;return bm(this,void 0,void 0,function(){var $t,Xt,Yt,Zt;return sy(this,function(lr){switch(lr.label){case 0:if(this.logger.info("do release slide",this.taskId),this.tracker({name:"releaseSlide",reason:"",result:"",payload:{taskId:this.taskId}}),this.player)return[2];for(Xt in this.player=this.initPlayer(this.config),!((Dt=this.config)===null||Dt===void 0)&&Dt.controller&&this.createController(),this.player.view&&(this.canvasContainer.appendChild(this.player.view),this.player.view.style.visibility="hidden"),$t=this.__slideState,this.__slideState=jP()(eE),$t.mediaState)(Yt=$t.mediaState[Xt]).type==="play"&&(Zt=Math.max((Lt=Yt.frozenTime)!==null&&Lt!==void 0?Lt:0,Yt.time),Yt.time=this.timestamp()-(Zt-Yt.time),Yt.frozenTime=void 0);return[4,this.setSlideState($t)];case 1:return lr.sent(),[4,this.player.clock.delay(333)];case 2:return lr.sent(),this.player.view&&(this.player.view.style.visibility="visible"),this.cacheImage.style.display="none",_t&&_t(),[2]}})})},it.prototype.release=function(_t){var Dt=this;this.frozenTaskManager.addTask("release",function(){return Dt._doRelease(_t)})},it.prototype._doDestroy=function(){var _t,Dt,Lt,$t,Xt=this;this.logger.info("do destroy slide",this.taskId),this.tracker({name:"destroySlide",reason:"",result:"",payload:{taskId:this.taskId}});var Yt=it.instances.findIndex(function(Zt){return Zt.randomId===Xt.randomId});if(Yt>=0&&it.instances.splice(Yt,1),this.playerController&&this.playerController.destroy(),this.frameResizeObserver.disconnect(),(_t=this.player)===null||_t===void 0||_t.removeAllListeners(),(Dt=this.player)===null||Dt===void 0||Dt.destroy(),(Lt=this.player)===null||Lt===void 0||Lt.removeAllListeners(),this.logger={warn:function(){return{}},info:function(){return{}},error:function(){return{}}},this.syncQueue.destroy(),this.renderingTaskManager.destroy(),this.frozenTaskManager.destroy(),window.removeEventListener("__slide_ref__",this.handleSlideRef),window.removeEventListener("__slide_updateStageCountLimit",this.updateStageCountLimit),window.removeEventListener("message",this.recoverHandler),this.removeAllListeners(),($t=this.player)===null||$t===void 0?void 0:$t.view)try{this.anchor.removeChild(this.player.view)}catch{this.logger.error("removeChild error Slide.ts:1982",this.taskId)}try{this.anchor.removeChild(this.frame)}catch{this.logger.error("removeChild error Slide.ts:1988",this.taskId)}it.volumeAdjuster.off("update",this._updateVolumeByStaticAdjuster)},it.prototype.waitLoadEnd=function(){return bm(this,void 0,void 0,function(){var _t;return sy(this,function(Dt){switch(Dt.label){case 0:_t=0,Dt.label=1;case 1:return this.isLoading&&_t<10?[4,nT(100)]:[3,3];case 2:return Dt.sent(),_t+=1,[3,1];case 3:return[2]}})})},it.prototype.preload=function(_t){return this.player?this.player.preload(_t):Promise.resolve()},it.prototype.preloadResource=function(_t){return this.player?this.player.preloadResource(_t):Promise.resolve()},it.prototype.destroy=function(){var _t=this;this.logger.info("pre destroy slide",""),this.isLoading?this.waitLoadEnd().then(function(){_t._doDestroy()}):this._doDestroy()},it.prototype.clearSlideCache=function(){var _t;(_t=this.player)===null||_t===void 0||_t.clearLocalCache()},it.prototype.hasNextStep=function(){if(!this.player)return!1;var _t=this.player.currentIndex===this.slideCount,Dt=this.mainSeqLength===0||this.mainSeqStep>=this.mainSeqLength-1,Lt=this.mainSeqState==="end"||this.mainSeqState==="running"||this.mainSeqState==null;return!(_t&&Dt&&Lt)},it.prototype.hasPrevStep=function(){if(!this.player)return!1;var _t=this.player.currentIndex===1,Dt=this.mainSeqLength===0||this.mainSeqStep===0,Lt=this.mainSeqState==="idle"||this.mainSeqState===null;return!(_t&&Dt&&Lt)},it.prototype.snapshot=function(){return bm(this,void 0,void 0,function(){return sy(this,function(_t){return this.player?[2,this.player.getSnapshot()]:[2,null]})})},it.prototype.snapshotWithTimingEnd=function(_t){return bm(this,void 0,void 0,function(){return sy(this,function(Dt){return this.player?[2,this.player.snapshotWithTimingEnd(_t)]:[2,null]})})},it.prototype.updateGlobalVolume=function(_t){this.volumeAdjuster.volume=_t},it.prototype.getGlobalVolume=function(){return this.volumeAdjuster.volume},it.clearLocalCache=function(){C_.clearLocalCache()},it.disposeLocalCache=function(){},it.prototype.getNoteForCurrentSlide=function(_t){return bm(this,void 0,void 0,function(){var Dt,Lt;return sy(this,function($t){switch($t.label){case 0:if(!this.player)return[2,null];if(this.slideNots)return[2,this.slideNots[_t]];$t.label=1;case 1:return $t.trys.push([1,4,,5]),[4,fetch(this.__slideState.url+"/"+this.__slideState.taskId+"/jsonOutput/note.json")];case 2:return[4,$t.sent().json()];case 3:return Dt=$t.sent(),this.slideNots=Dt,[2,Dt[_t]];case 4:return Lt=$t.sent(),this.logger.error("getNotesForCurrentSlide error: "+String(Lt),this.taskId),[2,null];case 5:return[2]}})})},lt=it,it.preloadResource=mS,it.instances=[],it._tempFrozenIds=[],it._tempLog="",it._tempLogIndex=1,it.remoteLogAddress=null,it.usePlugin=function(_t){_t.context({logger:{info:function(Dt){it.appendLogString("INFO - "+new Date().toISOString()+" - "+Dt+`
`)},warn:function(Dt){it.appendLogString("WARN - "+new Date().toISOString()+" - "+Dt+`
`)},error:function(Dt){it.appendLogString("ERROR - "+new Date().toISOString()+" - "+Dt+`
`)}}}),(function(Dt){var Lt=FC.get(Dt.hookPoint)||[];Lt.push(Dt),FC.set(Dt.hookPoint,Lt)})(_t)},it.volumeAdjuster=new KI,it.__stageCountLimit=-1,it.trackLogger=new Hk,it.handleFrozenAllSlide=function(){it.instances.forEach(function(_t){_t.player&&(it._tempFrozenIds.push(_t.randomId),_t.frozen())})},it.handleReleaseAllSlide=function(){it._tempFrozenIds.forEach(function(_t){var Dt=it.instances.find(function(Lt){return Lt.randomId===_t});Dt&&Dt.release()}),it._tempFrozenIds=[]},it.handleLogReport=function(_t){return bm(void 0,void 0,void 0,function(){var Dt,Lt,$t,Xt,Yt,Zt;return sy(lt,function(lr){switch(lr.label){case 0:return[4,it.flushLog(!0)];case 1:if(lr.sent(),!Ay)return[3,12];Dt=[],lr.label=2;case 2:return lr.trys.push([2,4,,5]),[4,Ay.keys()];case 3:return Dt=(lr.sent()||[]).sort(function(xr,wr){return parseInt(xr.replace("run_time_log_",""))-parseInt(wr.replace("run_time_log_",""))}),[3,5];case 4:return lr.sent(),[3,5];case 5:if(Dt.length===0)return window.postMessage({type:"@slide/_report_log_",log:"",index:1,total:1,customMessage:"@slide/_report_log_",sessionId:_t},"*"),[2];Lt=0,$t=Dt,lr.label=6;case 6:if(!(Lt<$t.length))return[3,12];Xt=$t[Lt],Yt=Xt.replace("run_time_log_",""),Zt="",lr.label=7;case 7:return lr.trys.push([7,9,,10]),[4,Ay.getItem(Xt)];case 8:return Zt=lr.sent()||"",[3,10];case 9:return lr.sent(),[3,10];case 10:window.postMessage({type:"@slide/_report_log_",log:Zt,index:parseInt(Yt,10),total:Dt.length,customMessage:"@slide/_report_log_",sessionId:_t},"*"),lr.label=11;case 11:return Lt++,[3,6];case 12:return[2]}})})},it.handleLogDownload=function(){return bm(void 0,void 0,void 0,function(){var _t,Dt,Lt,$t,Xt,Yt,Zt;return sy(lt,function(lr){switch(lr.label){case 0:return lr.trys.push([0,7,,8]),[4,it.flushLog(!0)];case 1:return lr.sent(),_t="",Ay?[4,Ay.keys()]:[3,6];case 2:Dt=(lr.sent()||[]).sort(function(xr,wr){return parseInt(xr.replace("run_time_log_",""))-parseInt(wr.replace("run_time_log_",""))}),Lt=0,$t=Dt,lr.label=3;case 3:return Lt<$t.length?(Xt=$t[Lt],Yt=_t,[4,Ay.getItem(Xt)]):[3,6];case 4:_t=Yt+(lr.sent()||""),lr.label=5;case 5:return Lt++,[3,3];case 6:return(Zt=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(_t)),Zt.setAttribute("download","slide_log"),Zt.style.display="none",document.body.appendChild(Zt),Zt.click(),document.body.removeChild(Zt),[3,8];case 7:return lr.sent(),[3,8];case 8:return[2]}})})},iw([(pt="Slide.initConfig",function(_t,Dt,Lt){var $t=Lt.value;Lt.value=function(){for(var Xt=[],Yt=0;Yt<arguments.length;Yt++)Xt[Yt]=arguments[Yt];for(var Zt=FC.get(pt)||[],lr=Xt,xr=0,wr=Zt;xr<wr.length;xr++){var Ir=wr[xr];try{lr=Ir.before(lr)}catch{}if(!Array.isArray(lr)||lr.length!==Xt.length)throw new Error("plugin before hook return invalid args")}for(var kr=$t.bind(this).apply(void 0,lr),Lr=0,Xr=Zt.reverse();Lr<Xr.length;Lr++){Ir=Xr[Lr];try{kr=Ir.after(kr)}catch{}if(!kr)throw new Error("plugin after hook return undefined result")}return kr}})],it.prototype,"initSlideConfig",null),it})(em.a);Ay?.clear().catch(function(){}),window.addEventListener("__slide_log__",Zl.handleLogDownload),window.addEventListener("message",function(vt){var it;if(vt.data.type==="@slide/_request_log_")Zl.handleLogReport(vt.data.sessionId).catch(function(){});else if(vt.data.type==="@slide/_request_frozen_")Zl.handleFrozenAllSlide();else if(vt.data.type==="@slide/_request_release_")Zl.handleReleaseAllSlide();else if(vt.data.type==="@slide/_update_volume_"){var lt=.5;try{lt=parseFloat(vt.data.volume.toString())}catch{}Zl.volumeAdjuster.volume=lt}else if(vt.data.type==="@slide/_get_volume_")window.postMessage({type:"@slide/_report_volume_",volume:Zl.volumeAdjuster.volume,customMessage:"@slide/_report_volume_"},"*");else if(vt.data.type==="@slide/_preload_slide_"){var pt=(it=vt.data.sessionId)!==null&&it!==void 0?it:Math.random().toString(32).substr(2);Zl.preloadResource(vt.data.taskId,vt.data.prefix,vt.data.maxResolutionLevel,function(_t){window.postMessage({type:"@slide/_preload_slide_progress_",sessionId:pt,taskId:vt.data.taskId,progress:_t},"*")},vt.data.pages).catch(function(_t){window.postMessage({type:"@slide/_preload_slide_error_",sessionId:pt,taskId:vt.data.taskId,error:_t},"*")})}}),window.setInterval(function(){Zl.flushLog().catch(function(){})},2e3)}]),SOUP$1="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",SOUP_LEN$1=87,ID_LEN$1=20,reusedIdCarrier$1=[],genUID$1=()=>{for(let et=0;et<ID_LEN$1;et++)reusedIdCarrier$1[et]=SOUP$1.charAt(Math.random()*SOUP_LEN$1);return reusedIdCarrier$1.join("")};function invoke(et){try{return et()}catch(_e){console.error(_e)}}var SideEffectManager=class{constructor(){this.push=this.addDisposer,this.disposers=new Map}addDisposer(et,_e=this.genUID()){return this.flush(_e),this.disposers.set(_e,Array.isArray(et)?joinDisposers(et):et),_e}add(et,_e=this.genUID()){const tt=et();return tt?this.addDisposer(tt,_e):_e}addEventListener(et,_e,tt,rt,nt=this.genUID()){return et.addEventListener(_e,tt,rt),this.addDisposer(()=>et.removeEventListener(_e,tt,rt),nt),nt}setTimeout(et,_e,tt=this.genUID()){const rt=window.setTimeout(()=>{this.remove(tt),et()},_e);return this.addDisposer(()=>window.clearTimeout(rt),tt)}setInterval(et,_e,tt=this.genUID()){const rt=window.setInterval(et,_e);return this.addDisposer(()=>window.clearInterval(rt),tt)}remove(et){const _e=this.disposers.get(et);return this.disposers.delete(et),_e}flush(et){const _e=this.remove(et);_e&&_e()}flushAll(){this.disposers.forEach(invoke),this.disposers.clear()}genUID(){let et;do et=genUID$1();while(this.disposers.has(et));return et}};function joinDisposers(et){return()=>et.forEach(invoke)}function clamp$1(et,_e,tt){return Math.min(Math.max(et,_e),tt)}function isObj(et){return typeof et=="object"&&et!==null}function isEditable(et){if(!et)return!1;const _e=et.tagName;return _e==="INPUT"||_e==="TEXTAREA"||_e==="SELECT"}var colorString={exports:{}},colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},simpleSwizzle={exports:{}},isArrayish$1=function et(_e){return!_e||typeof _e=="string"?!1:_e instanceof Array||Array.isArray(_e)||_e.length>=0&&(_e.splice instanceof Function||Object.getOwnPropertyDescriptor(_e,_e.length-1)&&_e.constructor.name!=="String")},isArrayish2=isArrayish$1,concat=Array.prototype.concat,slice=Array.prototype.slice,swizzle$1=simpleSwizzle.exports=function et(_e){for(var tt=[],rt=0,nt=_e.length;rt<nt;rt++){var st=_e[rt];isArrayish2(st)?tt=concat.call(tt,slice.call(st)):tt.push(st)}return tt};swizzle$1.wrap=function(et){return function(){return et(swizzle$1(arguments))}};var colorNames=colorName,swizzle2=simpleSwizzle.exports,hasOwnProperty$1=Object.hasOwnProperty,reverseNames=Object.create(null);for(var name in colorNames)hasOwnProperty$1.call(colorNames,name)&&(reverseNames[colorNames[name]]=name);var cs=colorString.exports={to:{},get:{}};cs.get=function(et){var _e=et.substring(0,3).toLowerCase(),tt,rt;switch(_e){case"hsl":tt=cs.get.hsl(et),rt="hsl";break;case"hwb":tt=cs.get.hwb(et),rt="hwb";break;default:tt=cs.get.rgb(et),rt="rgb";break}return tt?{model:rt,value:tt}:null};cs.get.rgb=function(et){if(!et)return null;var _e=/^#([a-f0-9]{3,4})$/i,tt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,rt=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,nt=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,st=/^(\w+)$/,dt=[0,0,0,1],ft,ht,mt;if(ft=et.match(tt)){for(mt=ft[2],ft=ft[1],ht=0;ht<3;ht++){var bt=ht*2;dt[ht]=parseInt(ft.slice(bt,bt+2),16)}mt&&(dt[3]=parseInt(mt,16)/255)}else if(ft=et.match(_e)){for(ft=ft[1],mt=ft[3],ht=0;ht<3;ht++)dt[ht]=parseInt(ft[ht]+ft[ht],16);mt&&(dt[3]=parseInt(mt+mt,16)/255)}else if(ft=et.match(rt)){for(ht=0;ht<3;ht++)dt[ht]=parseInt(ft[ht+1],0);ft[4]&&(ft[5]?dt[3]=parseFloat(ft[4])*.01:dt[3]=parseFloat(ft[4]))}else if(ft=et.match(nt)){for(ht=0;ht<3;ht++)dt[ht]=Math.round(parseFloat(ft[ht+1])*2.55);ft[4]&&(ft[5]?dt[3]=parseFloat(ft[4])*.01:dt[3]=parseFloat(ft[4]))}else return(ft=et.match(st))?ft[1]==="transparent"?[0,0,0,0]:hasOwnProperty$1.call(colorNames,ft[1])?(dt=colorNames[ft[1]],dt[3]=1,dt):null:null;for(ht=0;ht<3;ht++)dt[ht]=clamp(dt[ht],0,255);return dt[3]=clamp(dt[3],0,1),dt};cs.get.hsl=function(et){if(!et)return null;var _e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,tt=et.match(_e);if(tt){var rt=parseFloat(tt[4]),nt=(parseFloat(tt[1])%360+360)%360,st=clamp(parseFloat(tt[2]),0,100),dt=clamp(parseFloat(tt[3]),0,100),ft=clamp(isNaN(rt)?1:rt,0,1);return[nt,st,dt,ft]}return null};cs.get.hwb=function(et){if(!et)return null;var _e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,tt=et.match(_e);if(tt){var rt=parseFloat(tt[4]),nt=(parseFloat(tt[1])%360+360)%360,st=clamp(parseFloat(tt[2]),0,100),dt=clamp(parseFloat(tt[3]),0,100),ft=clamp(isNaN(rt)?1:rt,0,1);return[nt,st,dt,ft]}return null};cs.to.hex=function(){var et=swizzle2(arguments);return"#"+hexDouble(et[0])+hexDouble(et[1])+hexDouble(et[2])+(et[3]<1?hexDouble(Math.round(et[3]*255)):"")};cs.to.rgb=function(){var et=swizzle2(arguments);return et.length<4||et[3]===1?"rgb("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+")":"rgba("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+", "+et[3]+")"};cs.to.rgb.percent=function(){var et=swizzle2(arguments),_e=Math.round(et[0]/255*100),tt=Math.round(et[1]/255*100),rt=Math.round(et[2]/255*100);return et.length<4||et[3]===1?"rgb("+_e+"%, "+tt+"%, "+rt+"%)":"rgba("+_e+"%, "+tt+"%, "+rt+"%, "+et[3]+")"};cs.to.hsl=function(){var et=swizzle2(arguments);return et.length<4||et[3]===1?"hsl("+et[0]+", "+et[1]+"%, "+et[2]+"%)":"hsla("+et[0]+", "+et[1]+"%, "+et[2]+"%, "+et[3]+")"};cs.to.hwb=function(){var et=swizzle2(arguments),_e="";return et.length>=4&&et[3]!==1&&(_e=", "+et[3]),"hwb("+et[0]+", "+et[1]+"%, "+et[2]+"%"+_e+")"};cs.to.keyword=function(et){return reverseNames[et.slice(0,3)]};function clamp(et,_e,tt){return Math.min(Math.max(_e,et),tt)}function hexDouble(et){var _e=Math.round(et).toString(16).toUpperCase();return _e.length<2?"0"+_e:_e}var ColorString=colorString.exports;class Logger{constructor(_e){this.enable=_e,this.apps={},this.level="debug",this.roomLogger=null,this._onMessage=tt=>{let rt;tt instanceof CustomEvent?rt=tt.detail:isObj(tt.data)&&(rt=tt.data),rt&&(typeof rt.slide=="boolean"?this.enable=rt.slide:rt.slide==="__instance"?console.log(this):rt.slide==="__debug"&&Object.values(this.apps).forEach(nt=>{var st,dt;(dt=(st=nt.controller)==null?void 0:st.slide)==null||dt.createController()}))},this.initialize()}setAppContext(_e,tt){var rt;((rt=this.apps)[_e]||(rt[_e]={})).context=tt,this.log(`[Slide] new ${_e}`)}setAppController(_e,tt){var rt;((rt=this.apps)[_e]||(rt[_e]={})).controller=tt}deleteApp(_e){delete this.apps[_e],this.log(`[Slide] delete ${_e}`)}initialize(){window.addEventListener("message",this._onMessage)}dispose(){window.removeEventListener("message",this._onMessage)}log(..._e){this.roomLogger?this.roomLogger.info(..._e):this.enable&&console.log(..._e)}verbose(..._e){this.roomLogger?this.roomLogger.debug(..._e):this.enable&&this.level==="verbose"&&console.log(..._e)}warn(..._e){this.roomLogger?this.roomLogger.warn(..._e):console.warn(..._e)}}const logger=new Logger(!1),log=logger.log.bind(logger),verbose=logger.verbose.bind(logger),setRoomLogger=et=>{logger.roomLogger=et.logger};function guessBgColor(et){try{const _e=window.getComputedStyle(et).backgroundColor;if(_e!=="rgba(0, 0, 0, 0)"&&_e!=="transparent")return _e;if(et.parentElement)return guessBgColor(et.parentElement)}catch{}return"#ffffff"}function toHex(et){const _e=ColorString.get(et);if(_e&&_e.model==="rgb"){const tt=_e.value,nt=(((Math.round(tt[0])&255)<<16)+((Math.round(tt[1])&255)<<8)+(Math.round(tt[2])&255)).toString(16);return"#"+"000000".substring(nt.length)+nt}else return et}let cachedBgColor="";function cachedGetBgColor(et){return cachedBgColor||(cachedBgColor=toHex(guessBgColor(et)),log("[Slide] guess bg color",cachedBgColor)),cachedBgColor}const getRoomTracker=et=>et.tracker;function createDocsViewerPages(et,_e=[]){const{width:tt,height:rt,slideCount:nt,slideState:st}=et,{taskId:dt,url:ft}=st,ht=[];for(let mt=1;mt<=nt;++mt){const bt=_e.find(St=>St.indexOf(`preview/${mt}.png`)>=0);bt?ht.push({width:tt,height:rt,thumbnail:bt,src:"ppt"}):ht.push({width:tt,height:rt,thumbnail:`${ft}/${dt}/preview/${mt}.png`,src:"ppt"})}return ht}function syncSceneWithSlide(et,_e,tt,rt){var nt;const st=tt.slideState.currentSlideIndex;if(!(st>0)||!_e.getIsWritable())return;const dt=[rt,st].join("/");if(_e.isAddApp&&et.scenePathType(dt)!=="page"){et.removeScenes(rt);const ht=tt.slideCount,mt=[];for(let bt=1;bt<=ht;++bt)mt.push({name:`${bt}`});et.putScenes(rt,mt)}let ft;_e.getBox().focus?ft=et.state.sceneState.scenePath:ft=((nt=_e.getView())==null?void 0:nt.focusScenePath)||"",ft!==dt&&et.scenePathType(dt)==="page"&&_e.setScenePath(dt)}const DefaultUrl="https://convertcdn.netless.link/dynamicConvert",MaxPollCount=40,EmptyAttributes={taskId:"",url:"",state:null,resourceList:[],previewList:[],customLinks:[],slideScale:1,translateX:.5,translateY:.5},noop$1=function et(){};class SlideControllerBase{constructor(_e){this.sideEffect=new SideEffectManager,this.previewList=[],this.ready=!1,this.readyPromise=new Promise(Et=>{this.resolveReady=Ct=>{this.ready?log("[Slide] render end",Ct):setTimeout(()=>{this.ready=!0,Et()},1e3)}}),this.onSyncDispatch=Et=>{if(this.context.getIsWritable()&&this.room){const Ct={type:Slide.SLIDE_EVENTS.syncDispatch,payload:Et};verbose("[Slide] dispatch",JSON.stringify(Et)),this.context.dispatchMagixEvent(Slide.SLIDE_EVENTS.syncDispatch,Ct)}},this.magixEventListener=Et=>{const{type:Ct,payload:Rt}=Et.payload;Ct===Slide.SLIDE_EVENTS.syncDispatch&&(this.syncStateOnce(),verbose("[Slide] receive",JSON.stringify(Rt)),this.slide.emit(Slide.SLIDE_EVENTS.syncReceive,Rt))},this.onStateChange=Et=>{this.context.getIsWritable()&&(verbose("[Slide] state change",JSON.stringify(Et,null,2)),this.context.storage.setState({state:Et}))},this.pollCount=0,this.pollReadyState=()=>{this.ready?this._toFreeze===1?this.freeze():this._toFreeze===-1&&this.unfreeze():this.pollCount<MaxPollCount?(this.pollCount++,setTimeout(this.pollReadyState,500)):(this.pollCount=0,log("[Slide] init timeout"))},this._pageCount=0,this.destroyed=!1,this.timestamp=()=>this.room&&this.room.calibrationTimestamp?this.room.calibrationTimestamp:this.player?this.player.beginTimestamp+this.player.progressTime:Date.now(),this.isFrozen=!1,this._toFreeze=0,this.freeze=()=>{this.isFrozen=!0,this.ready?(log("[Slide] freeze",this.context.appId),this.invisibleBehavior==="frozen"?this.slide.frozen():this.slide.pause()):this._toFreeze=1},this.unfreeze=async()=>{if(this.visible)if(this.isFrozen=!1,this.ready){let Et=!1;if(log("[Slide] unfreeze",this.context.appId),this.invisibleBehavior==="frozen"?(this.slide.release(),Et=!0):this.slide.resume(),Et){const Ct=this.context.storage.state.state;Ct&&(log("[Slide] sync storage",JSON.stringify(Ct)),this.slide.setSlideState(Ct))}}else this._toFreeze=-1},this.onVisibilityChange=async()=>{(this.visible=document.visibilityState==="visible")?(log("[Slide] unfreeze because tab becomes visible",{savedIsFrozen:this.savedIsFrozen}),this.savedIsFrozen||this.unfreeze()):(this.savedIsFrozen=this.isFrozen,log("[Slide] freeze because tab becomes invisible"),this.freeze())};const{context:tt,onRenderStart:rt,onPageChanged:nt,onTransitionStart:st,onTransitionEnd:dt,onNavigate:ft,onError:ht,onRenderError:mt,showRenderError:bt,invisibleBehavior:St}=_e;this.invisibleBehavior=St??"frozen",this.onRenderStart=rt,this.onPageChanged=nt,this.onTransitionStart=st,this.onTransitionEnd=dt,this.onNavigate=ft||noop$1,this.onError=ht,this.onRenderError=mt,this.showRenderError=bt??!0,this.context=tt,this.room=tt.getRoom(),this.player=this.room?void 0:tt.getDisplayer(),setRoomLogger(this.room||this.player),this.syncStateOnceFlag=!this.context.isAddApp,this.visible=document.visibilityState==="visible",this.savedIsFrozen=!1}jumpToPage(_e,tt){this.ready&&(_e=clamp$1(_e,1,this.pageCount),this.onNavigate(_e,tt),this.slide.renderSlide(_e))}initialize(){this.registerEventListeners(),this.kickStart()}kickStart(){const{context:_e,slide:tt}=this;_e.getIsWritable()&&_e.storage.ensureState(EmptyAttributes);const{taskId:rt,url:nt,resourceList:st,previewList:dt,state:ft}=_e.storage.state;this.previewList=dt,st&&st.length>0?tt.setResourceList(rt,st):tt.setResource(rt,nt||DefaultUrl),ft?(log("[Slide] init with state",JSON.stringify(ft)),this.syncStateOnceFlag=!1,tt.setSlideState(ft)):_e.isAddApp&&(log("[Slide] init by renderSlide",1),tt.renderSlide(1)),this.pollReadyState()}registerEventListeners(){const{context:_e,slide:tt}=this,rt=this.sideEffect.addDisposer(_e.storage.addStateChangedListener(()=>{_e.storage.state.state&&(this.syncStateOnce(),this.sideEffect.flush(rt))}));this.sideEffect.add(()=>_e.addMagixEventListener(Slide.SLIDE_EVENTS.syncDispatch,this.magixEventListener,{fireSelfEventAfterCommit:!0})),tt.on(Slide.SLIDE_EVENTS.renderStart,this.onRenderStart),tt.on(Slide.SLIDE_EVENTS.slideChange,this.onPageChanged),tt.on(Slide.SLIDE_EVENTS.renderEnd,this.onTransitionEnd),tt.on(Slide.SLIDE_EVENTS.mainSeqStepStart,this.onTransitionStart),tt.on(Slide.SLIDE_EVENTS.mainSeqStepEnd,this.onTransitionEnd),tt.on(Slide.SLIDE_EVENTS.renderError,this.onError),tt.on(Slide.SLIDE_EVENTS.stateChange,this.onStateChange),tt.on(Slide.SLIDE_EVENTS.syncDispatch,this.onSyncDispatch),tt.on(Slide.SLIDE_EVENTS.renderEnd,this.resolveReady),this.sideEffect.add(()=>(document.addEventListener("visibilitychange",this.onVisibilityChange),()=>document.removeEventListener("visibilitychange",this.onVisibilityChange)))}syncStateOnce(){if(this.syncStateOnceFlag){this.context.getIsWritable()&&this.context.storage.ensureState(EmptyAttributes);const{state:_e}=this.context.storage.state;_e&&(log("[Slide] sync with state (once)",JSON.stringify(_e)),this.slide.setSlideState(_e),this.syncStateOnceFlag=!1)}}get pageCount(){return this._pageCount>0?this._pageCount:(this._pageCount=this.slide.slideCount,this._pageCount)}get page(){return this.slide.slideState.currentSlideIndex}createSlide(_e,tt={}){var rt,nt,st,dt;const ft=this.context.getAppOptions()||{},ht=this.context.storage.state;return new Slide.Slide({anchor:_e,interactive:!0,mode:"interactive",controller:!1,enableGlobalClick:(rt=ft.enableGlobalClick)!=null?rt:!0,renderOptions:{minFPS:ft.minFPS||25,maxFPS:ft.maxFPS||30,autoFPS:(nt=ft.autoFPS)!=null?nt:!0,autoResolution:(st=ft.autoResolution)!=null?st:!0,resolution:ft.resolution,transactionBgColor:ft.bgColor||cachedGetBgColor(_e),maxResolutionLevel:ft.maxResolutionLevel,forceCanvas:ft.forceCanvas,enableNvidiaDetect:ft.enableNvidiaDetect},fixedFrameSize:ft.fixedFrameSize,loaderDelegate:ft.loaderDelegate,navigatorDelegate:ft.navigatorDelegate,urlInterrupter:ft.urlInterrupter,resourceTimeout:ft.resourceTimeout,rtcAudio:ft.rtcAudio,useLocalCache:ft.useLocalCache,logger:ft.logger,whiteTracker:tt.whiteTracker,timestamp:this.timestamp,customLinks:ht.customLinks,skipActionWhenFrozen:(dt=ft.skipActionWhenFrozen)!=null?dt:!0})}destroy(){this.sideEffect.flushAll(),this.destroyed||(log("[Slide] destroy slide (once)"),this.slide.destroy(),this.destroyed=!0)}}class SlideController extends SlideControllerBase{constructor(_e){super(_e),this.slide=this.createSlide(_e.anchor,{whiteTracker:getRoomTracker(_e.context.getDisplayer())}),this.initialize()}}function sidebarSVG(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-sidebar`),tt.setAttribute("viewBox","0 0 64 64");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M50 8H14c-3.309 0-6 2.691-6 6v36c0 3.309 2.691 6 6 6h36c3.309 0 6-2.691 6-6V14c0-3.309-2.691-6-6-6zM12 50V14c0-1.103.897-2 2-2h8v40h-8c-1.103 0-2-.897-2-2zm40 0c0 1.103-.897 2-2 2H26V12h24c1.103 0 2 .897 2 2z"),tt.appendChild(rt),tt}function arrowLeftSVG(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-arrow-left`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"),tt.appendChild(rt),tt}function arrowRightSVG(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-arrow-right`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"),tt.appendChild(rt),tt}function playSVG(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-play`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"),tt.appendChild(rt),tt}function pauseSVG(et){const _e="http://www.w3.org/2000/svg",tt=document.createElementNS(_e,"svg");tt.setAttribute("class",`${et}-footer-icon-pause`),tt.setAttribute("viewBox","0 0 500 500");const rt=document.createElementNS(_e,"path");return rt.setAttribute("fill","currentColor"),rt.setAttribute("d","M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"),tt.appendChild(rt),tt}const runningOnBrowser=typeof window<"u",isBot=runningOnBrowser&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),supportsIntersectionObserver=runningOnBrowser&&"IntersectionObserver"in window,supportsClassList=runningOnBrowser&&"classList"in document.createElement("p"),isHiDpi=runningOnBrowser&&window.devicePixelRatio>1,defaultSettings={elements_selector:".lazy",container:isBot||runningOnBrowser?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},getExtendedSettings=et=>Object.assign({},defaultSettings,et),createInstance=function(et,_e){let tt;const rt="LazyLoad::Initialized",nt=new et(_e);try{tt=new CustomEvent(rt,{detail:{instance:nt}})}catch{tt=document.createEvent("CustomEvent"),tt.initCustomEvent(rt,!1,!1,{instance:nt})}window.dispatchEvent(tt)},autoInitialize=(et,_e)=>{if(_e)if(!_e.length)createInstance(et,_e);else for(let tt=0,rt;rt=_e[tt];tt+=1)createInstance(et,rt)},SRC="src",SRCSET="srcset",SIZES="sizes",POSTER="poster",ORIGINALS="llOriginalAttrs",DATA="data",statusLoading="loading",statusLoaded="loaded",statusApplied="applied",statusEntered="entered",statusError="error",statusNative="native",dataPrefix="data-",statusDataName="ll-status",getData=(et,_e)=>et.getAttribute(dataPrefix+_e),setData=(et,_e,tt)=>{const rt=dataPrefix+_e;if(tt===null){et.removeAttribute(rt);return}et.setAttribute(rt,tt)},getStatus=et=>getData(et,statusDataName),setStatus=(et,_e)=>setData(et,statusDataName,_e),resetStatus=et=>setStatus(et,null),hasEmptyStatus=et=>getStatus(et)===null,hasStatusLoading=et=>getStatus(et)===statusLoading,hasStatusError=et=>getStatus(et)===statusError,hasStatusNative=et=>getStatus(et)===statusNative,statusesAfterLoading=[statusLoading,statusLoaded,statusApplied,statusError],hadStartedLoading=et=>statusesAfterLoading.indexOf(getStatus(et))>=0,safeCallback=(et,_e,tt,rt)=>{if(!(!et||typeof et!="function")){if(rt!==void 0){et(_e,tt,rt);return}if(tt!==void 0){et(_e,tt);return}et(_e)}},addClass=(et,_e)=>{if(_e!==""){if(supportsClassList){et.classList.add(_e);return}et.className+=(et.className?" ":"")+_e}},removeClass=(et,_e)=>{if(_e!==""){if(supportsClassList){et.classList.remove(_e);return}et.className=et.className.replace(new RegExp("(^|\\s+)"+_e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}},addTempImage=et=>{et.llTempImage=document.createElement("IMG")},deleteTempImage=et=>{delete et.llTempImage},getTempImage=et=>et.llTempImage,unobserve=(et,_e)=>{if(!_e)return;const tt=_e._observer;tt&&tt.unobserve(et)},resetObserver=et=>{et.disconnect()},unobserveEntered=(et,_e,tt)=>{_e.unobserve_entered&&unobserve(et,tt)},updateLoadingCount=(et,_e)=>{et&&(et.loadingCount+=_e)},decreaseToLoadCount=et=>{et&&(et.toLoadCount-=1)},setToLoadCount=(et,_e)=>{et&&(et.toLoadCount=_e)},isSomethingLoading=et=>et.loadingCount>0,haveElementsToLoad=et=>et.toLoadCount>0,getSourceTags=et=>{let _e=[];for(let tt=0,rt;rt=et.children[tt];tt+=1)rt.tagName==="SOURCE"&&_e.push(rt);return _e},forEachPictureSource=(et,_e)=>{const tt=et.parentNode;if(!tt||tt.tagName!=="PICTURE")return;getSourceTags(tt).forEach(_e)},forEachVideoSource=(et,_e)=>{getSourceTags(et).forEach(_e)},attrsSrc=[SRC],attrsSrcPoster=[SRC,POSTER],attrsSrcSrcsetSizes=[SRC,SRCSET,SIZES],attrsData=[DATA],hasOriginalAttrs=et=>!!et[ORIGINALS],getOriginalAttrs=et=>et[ORIGINALS],deleteOriginalAttrs=et=>delete et[ORIGINALS],setOriginalsObject=(et,_e)=>{if(hasOriginalAttrs(et))return;const tt={};_e.forEach(rt=>{tt[rt]=et.getAttribute(rt)}),et[ORIGINALS]=tt},saveOriginalBackgroundStyle=et=>{hasOriginalAttrs(et)||(et[ORIGINALS]={backgroundImage:et.style.backgroundImage})},setOrResetAttribute=(et,_e,tt)=>{if(!tt){et.removeAttribute(_e);return}et.setAttribute(_e,tt)},restoreOriginalAttrs=(et,_e)=>{if(!hasOriginalAttrs(et))return;const tt=getOriginalAttrs(et);_e.forEach(rt=>{setOrResetAttribute(et,rt,tt[rt])})},restoreOriginalBgImage=et=>{if(!hasOriginalAttrs(et))return;const _e=getOriginalAttrs(et);et.style.backgroundImage=_e.backgroundImage},manageApplied=(et,_e,tt)=>{addClass(et,_e.class_applied),setStatus(et,statusApplied),tt&&(_e.unobserve_completed&&unobserve(et,_e),safeCallback(_e.callback_applied,et,tt))},manageLoading=(et,_e,tt)=>{addClass(et,_e.class_loading),setStatus(et,statusLoading),tt&&(updateLoadingCount(tt,1),safeCallback(_e.callback_loading,et,tt))},setAttributeIfValue=(et,_e,tt)=>{tt&&et.setAttribute(_e,tt)},setImageAttributes=(et,_e)=>{setAttributeIfValue(et,SIZES,getData(et,_e.data_sizes)),setAttributeIfValue(et,SRCSET,getData(et,_e.data_srcset)),setAttributeIfValue(et,SRC,getData(et,_e.data_src))},setSourcesImg=(et,_e)=>{forEachPictureSource(et,tt=>{setOriginalsObject(tt,attrsSrcSrcsetSizes),setImageAttributes(tt,_e)}),setOriginalsObject(et,attrsSrcSrcsetSizes),setImageAttributes(et,_e)},setSourcesIframe=(et,_e)=>{setOriginalsObject(et,attrsSrc),setAttributeIfValue(et,SRC,getData(et,_e.data_src))},setSourcesVideo=(et,_e)=>{forEachVideoSource(et,tt=>{setOriginalsObject(tt,attrsSrc),setAttributeIfValue(tt,SRC,getData(tt,_e.data_src))}),setOriginalsObject(et,attrsSrcPoster),setAttributeIfValue(et,POSTER,getData(et,_e.data_poster)),setAttributeIfValue(et,SRC,getData(et,_e.data_src)),et.load()},setSourcesObject=(et,_e)=>{setOriginalsObject(et,attrsData),setAttributeIfValue(et,DATA,getData(et,_e.data_src))},setBackground=(et,_e,tt)=>{const rt=getData(et,_e.data_bg),nt=getData(et,_e.data_bg_hidpi),st=isHiDpi&&nt?nt:rt;st&&(et.style.backgroundImage=`url("${st}")`,getTempImage(et).setAttribute(SRC,st),manageLoading(et,_e,tt))},setMultiBackground=(et,_e,tt)=>{const rt=getData(et,_e.data_bg_multi),nt=getData(et,_e.data_bg_multi_hidpi),st=isHiDpi&&nt?nt:rt;st&&(et.style.backgroundImage=st,manageApplied(et,_e,tt))},setImgsetBackground=(et,_e,tt)=>{const rt=getData(et,_e.data_bg_set);if(!rt)return;const nt=rt.split("|");let st=nt.map(dt=>`image-set(${dt})`);et.style.backgroundImage=st.join(),et.style.backgroundImage===""&&(st=nt.map(dt=>`-webkit-image-set(${dt})`),et.style.backgroundImage=st.join()),manageApplied(et,_e,tt)},setSourcesFunctions={IMG:setSourcesImg,IFRAME:setSourcesIframe,VIDEO:setSourcesVideo,OBJECT:setSourcesObject},setSourcesNative=(et,_e)=>{const tt=setSourcesFunctions[et.tagName];tt&&tt(et,_e)},setSources=(et,_e,tt)=>{const rt=setSourcesFunctions[et.tagName];rt&&(rt(et,_e),manageLoading(et,_e,tt))},elementsWithLoadEvent=["IMG","IFRAME","VIDEO","OBJECT"],hasLoadEvent=et=>elementsWithLoadEvent.indexOf(et.tagName)>-1,checkFinish=(et,_e)=>{_e&&!isSomethingLoading(_e)&&!haveElementsToLoad(_e)&&safeCallback(et.callback_finish,_e)},addEventListener=(et,_e,tt)=>{et.addEventListener(_e,tt),et.llEvLisnrs[_e]=tt},removeEventListener=(et,_e,tt)=>{et.removeEventListener(_e,tt)},hasEventListeners=et=>!!et.llEvLisnrs,addEventListeners=(et,_e,tt)=>{hasEventListeners(et)||(et.llEvLisnrs={});const rt=et.tagName==="VIDEO"?"loadeddata":"load";addEventListener(et,rt,_e),addEventListener(et,"error",tt)},removeEventListeners=et=>{if(!hasEventListeners(et))return;const _e=et.llEvLisnrs;for(let tt in _e){const rt=_e[tt];removeEventListener(et,tt,rt)}delete et.llEvLisnrs},doneHandler=(et,_e,tt)=>{deleteTempImage(et),updateLoadingCount(tt,-1),decreaseToLoadCount(tt),removeClass(et,_e.class_loading),_e.unobserve_completed&&unobserve(et,tt)},loadHandler=(et,_e,tt,rt)=>{const nt=hasStatusNative(_e);doneHandler(_e,tt,rt),addClass(_e,tt.class_loaded),setStatus(_e,statusLoaded),safeCallback(tt.callback_loaded,_e,rt),nt||checkFinish(tt,rt)},errorHandler=(et,_e,tt,rt)=>{const nt=hasStatusNative(_e);doneHandler(_e,tt,rt),addClass(_e,tt.class_error),setStatus(_e,statusError),safeCallback(tt.callback_error,_e,rt),tt.restore_on_error&&restoreOriginalAttrs(_e,attrsSrcSrcsetSizes),nt||checkFinish(tt,rt)},addOneShotEventListeners=(et,_e,tt)=>{const rt=getTempImage(et)||et;if(hasEventListeners(rt))return;addEventListeners(rt,dt=>{loadHandler(dt,et,_e,tt),removeEventListeners(rt)},dt=>{errorHandler(dt,et,_e,tt),removeEventListeners(rt)})},loadBackground=(et,_e,tt)=>{addTempImage(et),addOneShotEventListeners(et,_e,tt),saveOriginalBackgroundStyle(et),setBackground(et,_e,tt),setMultiBackground(et,_e,tt),setImgsetBackground(et,_e,tt)},loadRegular=(et,_e,tt)=>{addOneShotEventListeners(et,_e,tt),setSources(et,_e,tt)},load=(et,_e,tt)=>{hasLoadEvent(et)?loadRegular(et,_e,tt):loadBackground(et,_e,tt)},loadNative=(et,_e,tt)=>{et.setAttribute("loading","lazy"),addOneShotEventListeners(et,_e,tt),setSourcesNative(et,_e),setStatus(et,statusNative)},removeImageAttributes=et=>{et.removeAttribute(SRC),et.removeAttribute(SRCSET),et.removeAttribute(SIZES)},resetSourcesImg=et=>{forEachPictureSource(et,_e=>{removeImageAttributes(_e)}),removeImageAttributes(et)},restoreImg=et=>{forEachPictureSource(et,_e=>{restoreOriginalAttrs(_e,attrsSrcSrcsetSizes)}),restoreOriginalAttrs(et,attrsSrcSrcsetSizes)},restoreVideo=et=>{forEachVideoSource(et,_e=>{restoreOriginalAttrs(_e,attrsSrc)}),restoreOriginalAttrs(et,attrsSrcPoster),et.load()},restoreIframe=et=>{restoreOriginalAttrs(et,attrsSrc)},restoreObject=et=>{restoreOriginalAttrs(et,attrsData)},restoreFunctions={IMG:restoreImg,IFRAME:restoreIframe,VIDEO:restoreVideo,OBJECT:restoreObject},restoreAttributes=et=>{const _e=restoreFunctions[et.tagName];if(!_e){restoreOriginalBgImage(et);return}_e(et)},resetClasses=(et,_e)=>{hasEmptyStatus(et)||hasStatusNative(et)||(removeClass(et,_e.class_entered),removeClass(et,_e.class_exited),removeClass(et,_e.class_applied),removeClass(et,_e.class_loading),removeClass(et,_e.class_loaded),removeClass(et,_e.class_error))},restore=(et,_e)=>{restoreAttributes(et),resetClasses(et,_e),resetStatus(et),deleteOriginalAttrs(et)},cancelLoading=(et,_e,tt,rt)=>{tt.cancel_on_exit&&hasStatusLoading(et)&&et.tagName==="IMG"&&(removeEventListeners(et),resetSourcesImg(et),restoreImg(et),removeClass(et,tt.class_loading),updateLoadingCount(rt,-1),resetStatus(et),safeCallback(tt.callback_cancel,et,_e,rt))},onEnter=(et,_e,tt,rt)=>{const nt=hadStartedLoading(et);setStatus(et,statusEntered),addClass(et,tt.class_entered),removeClass(et,tt.class_exited),unobserveEntered(et,tt,rt),safeCallback(tt.callback_enter,et,_e,rt),!nt&&load(et,tt,rt)},onExit=(et,_e,tt,rt)=>{hasEmptyStatus(et)||(addClass(et,tt.class_exited),cancelLoading(et,_e,tt,rt),safeCallback(tt.callback_exit,et,_e,rt))},tagsWithNativeLazy=["IMG","IFRAME","VIDEO"],shouldUseNative=et=>et.use_native&&"loading"in HTMLImageElement.prototype,loadAllNative=(et,_e,tt)=>{et.forEach(rt=>{tagsWithNativeLazy.indexOf(rt.tagName)!==-1&&loadNative(rt,_e,tt)}),setToLoadCount(tt,0)},isIntersecting=et=>et.isIntersecting||et.intersectionRatio>0,getObserverSettings=et=>({root:et.container===document?null:et.container,rootMargin:et.thresholds||et.threshold+"px"}),intersectionHandler=(et,_e,tt)=>{et.forEach(rt=>isIntersecting(rt)?onEnter(rt.target,rt,_e,tt):onExit(rt.target,rt,_e,tt))},observeElements=(et,_e)=>{_e.forEach(tt=>{et.observe(tt)})},updateObserver=(et,_e)=>{resetObserver(et),observeElements(et,_e)},setObserver=(et,_e)=>{!supportsIntersectionObserver||shouldUseNative(et)||(_e._observer=new IntersectionObserver(tt=>{intersectionHandler(tt,et,_e)},getObserverSettings(et)))},toArray=et=>Array.prototype.slice.call(et),queryElements=et=>et.container.querySelectorAll(et.elements_selector),excludeManagedElements=et=>toArray(et).filter(hasEmptyStatus),hasError=et=>hasStatusError(et),filterErrorElements=et=>toArray(et).filter(hasError),getElementsToLoad=(et,_e)=>excludeManagedElements(et||queryElements(_e)),retryLazyLoad=(et,_e)=>{filterErrorElements(queryElements(et)).forEach(rt=>{removeClass(rt,et.class_error),resetStatus(rt)}),_e.update()},setOnlineCheck=(et,_e)=>{runningOnBrowser&&(_e._onlineHandler=()=>{retryLazyLoad(et,_e)},window.addEventListener("online",_e._onlineHandler))},resetOnlineCheck=et=>{runningOnBrowser&&window.removeEventListener("online",et._onlineHandler)},LazyLoad=function(et,_e){const tt=getExtendedSettings(et);this._settings=tt,this.loadingCount=0,setObserver(tt,this),setOnlineCheck(tt,this),this.update(_e)};LazyLoad.prototype={update:function(et){const _e=this._settings,tt=getElementsToLoad(et,_e);if(setToLoadCount(this,tt.length),isBot||!supportsIntersectionObserver){this.loadAll(tt);return}if(shouldUseNative(_e)){loadAllNative(tt,_e,this);return}updateObserver(this._observer,tt)},destroy:function(){this._observer&&this._observer.disconnect(),resetOnlineCheck(this),queryElements(this._settings).forEach(et=>{deleteOriginalAttrs(et)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(et){const _e=this._settings;getElementsToLoad(et,_e).forEach(rt=>{unobserve(rt,this),load(rt,_e,this)})},restoreAll:function(){const et=this._settings;queryElements(et).forEach(_e=>{restore(_e,et)})}};LazyLoad.load=(et,_e)=>{const tt=getExtendedSettings(_e);load(et,tt)};LazyLoad.resetStatus=et=>{resetStatus(et)};runningOnBrowser&&autoInitialize(LazyLoad,window.lazyLoadOptions);class DocsViewer{constructor({readonly:_e,onNewPageIndex:tt,onPlay:rt,onPagesReady:nt,urlInterrupter:st}){this._pages=[],this.pageIndex=0,this.setPaused=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!1)},this.setPlaying=()=>{this.$btnPlay.classList.toggle(this.wrapClassName("footer-btn-playing"),!0)},this.namespace="netless-app-slide",this.isShowPreview=!1,this.isSmallBox=!1,this.sideEffect=new SideEffectManager,this.readonly=_e,this.onNewPageIndex=tt,this.onPlay=rt,this.onPagesReady=nt,this.urlInterrupter=st||(dt=>dt),this.render()}set pages(_e){this._pages=_e,this.refreshPreview().then(this.refreshBtnSidebar.bind(this)),this.refreshTotalPage(),this.onPagesReady&&this.onPagesReady(_e)}get pages(){return this._pages}unmount(){this.$content.remove(),this.$footer.remove()}setReadonly(_e){this.readonly=_e,this.$content.classList.toggle(this.wrapClassName("readonly"),_e),this.$footer.classList.toggle(this.wrapClassName("readonly"),_e),this.$pageNumberInput.disabled=_e}destroy(){var _e;(_e=this.previewLazyLoad)==null||_e.destroy(),this.sideEffect.flushAll(),this.unmount()}setPageIndex(_e){Number.isNaN(_e)||(this.pageIndex=_e,this.$pageNumberInput.value=String(_e+1))}refreshTotalPage(){this.pages.length?this.$totalPage.textContent=" / "+this.pages.length:this.$totalPage.textContent=""}setSmallBox(_e){this.isSmallBox!==_e&&(this.isSmallBox=_e,this.$footer.classList.toggle(this.wrapClassName("float-footer"),_e))}render(){return this.renderContent(),this.renderFooter(),this.$content}renderContent(){if(!this.$content){const _e=document.createElement("div");_e.className=this.wrapClassName("content"),this.$content=_e,this.readonly&&_e.classList.add(this.wrapClassName("readonly")),_e.appendChild(this.renderPreviewMask()),_e.appendChild(this.renderPreview())}return this.$content}renderPreview(){if(!this.$preview){const _e=document.createElement("div");_e.className=this.wrapClassName("preview")+" tele-fancy-scrollbar",this.$preview=_e,this.refreshPreview(),this.sideEffect.addEventListener(_e,"click",tt=>{var rt;if(this.readonly)return;const nt=(rt=tt.target.dataset)==null?void 0:rt.pageIndex;nt&&(tt.preventDefault(),tt.stopPropagation(),tt.stopImmediatePropagation(),this.onNewPageIndex(Number(nt),"preview"),this.togglePreview(!1))})}return this.$preview}async refreshPreview(){var _e,tt;const{$preview:rt}=this,nt=this.wrapClassName("preview-page"),st=this.wrapClassName("preview-page-name");for(;rt.firstChild;)rt.firstChild.remove();const dt=[];for(let ft=0,ht=this.pages.length;ft<ht;ft++){const mt=this.pages[ft],bt=(_e=mt.thumbnail)!=null?_e:mt.src.startsWith("ppt")?void 0:mt.src;bt&&(dt[ft]=this.urlInterrupter(bt))}for(let ft=0,ht=this.pages.length;ft<ht;ft++)dt[ft]=await dt[ft];this.pages.forEach((ft,ht)=>{const mt=dt[ht];if(!mt)return;const bt=String(ht),St=document.createElement("a");St.className=nt+" "+this.wrapClassName(`preview-page-${ht}`),St.setAttribute("href","#"),St.dataset.pageIndex=bt;const Et=document.createElement("span");Et.className=st,Et.textContent=String(ht+1),Et.dataset.pageIndex=bt;const Ct=document.createElement("img");Ct.width=ft.width,Ct.height=ft.height,Ct.dataset.src=mt,Ct.dataset.pageIndex=bt,St.appendChild(Ct),St.appendChild(Et),rt.appendChild(St)}),(tt=this.previewLazyLoad)==null||tt.update()}renderPreviewMask(){return this.$previewMask||(this.$previewMask=document.createElement("div"),this.$previewMask.className=this.wrapClassName("preview-mask"),this.sideEffect.addEventListener(this.$previewMask,"click",_e=>{this.readonly||_e.target===this.$previewMask&&this.togglePreview(!1)})),this.$previewMask}refreshBtnSidebar(){this.$btnSidebar.style.display=this.pages.length>0?"":"none"}renderFooter(){if(!this.$footer){const _e=document.createElement("div");_e.className=this.wrapClassName("footer"),this.$footer=_e,this.readonly&&_e.classList.add(this.wrapClassName("readonly")),this.isSmallBox&&_e.classList.add(this.wrapClassName("float-footer"));const tt=this.renderFooterBtn("btn-sidebar",sidebarSVG(this.namespace));this.sideEffect.addEventListener(tt,"click",()=>{this.readonly||this.togglePreview()}),this.$btnSidebar=tt,this.$btnSidebar.style.display="none",this.$footer.appendChild(tt);const rt=document.createElement("div");rt.className=this.wrapClassName("page-jumps");const nt=this.renderFooterBtn("btn-page-back",arrowLeftSVG(this.namespace));if(this.sideEffect.addEventListener(nt,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex-1,"navigation")}),rt.appendChild(nt),this.onPlay){const mt=this.renderFooterBtn("btn-page-play",playSVG(this.namespace),pauseSVG(this.namespace));this.$btnPlay=mt,this.sideEffect.addEventListener(mt,"click",()=>{this.readonly||(this.setPlaying(),this.onPlay&&this.onPlay())}),rt.appendChild(mt)}const st=this.renderFooterBtn("btn-page-next",arrowRightSVG(this.namespace));this.sideEffect.addEventListener(st,"click",()=>{this.readonly||this.onNewPageIndex(this.pageIndex+1,"navigation")}),rt.appendChild(st);const dt=document.createElement("div");dt.className=this.wrapClassName("page-number");const ft=document.createElement("input");ft.className=this.wrapClassName("page-number-input"),ft.value=String(this.pageIndex+1),this.readonly&&(ft.disabled=!0),this.$pageNumberInput=ft,this.sideEffect.addEventListener(ft,"focus",()=>{ft.select()}),this.sideEffect.addEventListener(ft,"change",()=>{this.readonly||ft.value&&this.onNewPageIndex(Number(ft.value)-1,"input")});const ht=document.createElement("span");this.$totalPage=ht,dt.appendChild(ft),dt.appendChild(ht),this.$footer.appendChild(rt),this.$footer.appendChild(dt)}return this.$footer}renderFooterBtn(_e,tt,rt){const nt=document.createElement("button");return nt.className=this.wrapClassName("footer-btn")+" "+this.wrapClassName(_e),nt.appendChild(tt),rt&&nt.appendChild(rt),nt}togglePreview(_e){if(this.isShowPreview=_e??!this.isShowPreview,this.$content.classList.toggle(this.wrapClassName("preview-active"),this.isShowPreview),this.isShowPreview){const tt=this.$preview.querySelector("."+this.wrapClassName(`preview-page-${this.pageIndex}`));tt&&(this.previewLazyLoad||(this.previewLazyLoad=new LazyLoad({container:this.$preview,elements_selector:`.${this.wrapClassName("preview-page>img")}`})),this.$preview.scrollTo({top:tt.offsetTop-16}))}}wrapClassName(_e){return`${this.namespace}-${_e}`}}class ScrollBar{constructor(_e,tt){this.horizontalScrollBar=null,this.verticalScrollBar=null,this.isDraggingHorizontal=!1,this.isDraggingVertical=!1,this.eventListeners=[],this.container=_e,this.resizableContainer=tt}addTrackedListener(_e,tt,rt){_e.addEventListener(tt,rt),this.eventListeners.push({element:_e,type:tt,listener:rt})}removeAllListeners(){this.eventListeners.forEach(({element:_e,type:tt,listener:rt})=>{_e.removeEventListener(tt,rt)}),this.eventListeners=[]}render(_e,tt,rt,nt){this.clearScrollBars(),rt>_e&&this.createHorizontalScrollBar(_e,rt),nt>tt&&this.createVerticalScrollBar(tt,nt)}handleNormalizeTranslate(_e,tt){const rt=Math.max(0,Math.min(1,_e)),nt=Math.max(0,Math.min(1,tt));if(this.horizontalScrollBar){const st=this.horizontalScrollBar.querySelector(".horizontal-thumb");if(st){const dt=this.horizontalScrollBar.offsetWidth,ft=st.offsetWidth,ht=dt-ft-2;if(ht>0){const mt=1+rt*ht;st.style.left=`${mt}px`}}}if(this.verticalScrollBar){const st=this.verticalScrollBar.querySelector(".vertical-thumb");if(st){const dt=this.verticalScrollBar.offsetHeight,ft=st.offsetHeight,ht=dt-ft-2;if(ht>0){const mt=1+nt*ht;st.style.top=`${mt}px`}}}}clearScrollBars(){this.removeAllListeners(),this.horizontalScrollBar&&(this.horizontalScrollBar.remove(),this.horizontalScrollBar=null),this.verticalScrollBar&&(this.verticalScrollBar.remove(),this.verticalScrollBar=null)}createHorizontalScrollBar(_e,tt){const rt=document.createElement("div");rt.className="scroll-bar horizontal";const nt=_e,st=nt,dt=Math.max(30,Math.min(st,st*nt/tt));rt.style.cssText=`
position: absolute;
bottom: 0;
left: 0;
width: ${st}px;
height: 6px;
z-index: 1000;
cursor: pointer;
opacity: 1;
transition: opacity 0.2s ease;
`;const ft=document.createElement("div");ft.className="scroll-bar-thumb horizontal-thumb",ft.style.cssText=`
position: absolute;
bottom: 0px;
left: 0px;
width: ${dt}px;
height: 6px;
background: #9E9E9E;
border-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
cursor: grab;
`,this.addThumbDragListener(ft,"horizontal",dt,st),rt.appendChild(ft),this.container.appendChild(rt),this.horizontalScrollBar=rt}createVerticalScrollBar(_e,tt){const rt=document.createElement("div");rt.className="scroll-bar vertical";const nt=_e,st=nt,dt=Math.max(30,Math.min(st,st*nt/tt));rt.style.cssText=`
position: absolute;
top: 0;
right: 0;
width: 6px;
height: ${st}px;
z-index: 1000;
cursor: pointer;
opacity: 1;
transition: opacity 0.2s ease;
`;const ft=document.createElement("div");ft.className="scroll-bar-thumb vertical-thumb",ft.style.cssText=`
position: absolute;
top: 1px;
left: 0px;
width: 6px;
height: ${dt}px;
background: #9E9E9E;
border-radius: 4px;
box-shadow: 1px 0 2px rgba(0, 0, 0, 0.2);
cursor: grab;
`,this.addThumbDragListener(ft,"vertical",dt,st),rt.appendChild(ft),this.container.appendChild(rt),this.verticalScrollBar=rt}addThumbDragListener(_e,tt,rt,nt){let st=0,dt=0;const ft=(Ct,Rt)=>{tt==="horizontal"?this.isDraggingHorizontal=!0:this.isDraggingVertical=!0,st=tt==="horizontal"?Ct:Rt,dt=tt==="horizontal"?parseFloat(_e.style.left)||0:parseFloat(_e.style.top)||0,_e.style.cursor="grabbing"},ht=(Ct,Rt)=>{var Tt,wt;if(!(tt==="horizontal"?this.isDraggingHorizontal:this.isDraggingVertical))return;const Pt=(tt==="horizontal"?Ct:Rt)-st;let It=dt+Pt;It=Math.max(1,Math.min(nt-rt-1,It)),tt==="horizontal"?_e.style.left=`${It}px`:_e.style.top=`${It}px`;const Ft=nt-rt-2;let qt=0;Ft>0&&(qt=(It-1)/Ft,qt=Math.max(0,Math.min(1,qt))),tt==="horizontal"?this.resizableContainer.handleNormalizeTranslate(qt,(Tt=this.resizableContainer.translateY)!=null?Tt:.5,{triggerScrollBar:!1,triggerSync:!0}):this.resizableContainer.handleNormalizeTranslate((wt=this.resizableContainer.translateX)!=null?wt:.5,qt,{triggerScrollBar:!1,triggerSync:!0})},mt=()=>{tt==="horizontal"?this.isDraggingHorizontal=!1:this.isDraggingVertical=!1,_e.style.cursor="grab"},bt=Ct=>{ft(Ct.clientX,Ct.clientY),Ct.preventDefault()},St=Ct=>{ht(Ct.clientX,Ct.clientY)},Et=()=>{mt()};this.addTrackedListener(_e,"mousedown",bt),this.addTrackedListener(document,"mousemove",St),this.addTrackedListener(document,"mouseup",Et)}destroy(){this.clearScrollBars()}}class ResizableContainer{constructor(_e,tt,rt){this.onScaleChanged=null,this.whiteboardContainer=null,this.slide=null,this.scale=1,this.resizeObserver=null,this.slideWidth=1,this.slideHeight=1,this.translateX=.5,this.translateY=.5,this.lastTriggerTime=0,this.updateSlideSize=()=>{if(this.slide){let nt=!1;(this.slideWidth!==this.slide.width||this.slideHeight!==this.slide.height)&&(this.slideWidth=this.slide.width,this.slideHeight=this.slide.height,nt=!0),nt&&this.updateResizableContainer()}},this.enableResize=rt||!0,this.parent=_e,this.context=tt,this.root=document.createElement("div"),this.root.style.width="100%",this.root.style.height="100%",this.root.style.overflow="hidden",this.parent.appendChild(this.root),this.scrollContainer=document.createElement("div"),this.scrollContainer.setAttribute("data-resizable-scroll","true"),this.scrollContainer.style.width="100%",this.scrollContainer.style.height="100%",this.scrollContainer.style.position="relative",this.scrollContainer.style.overflow="hidden",this.container=document.createElement("div"),this.container.style.position="relative",this.container.setAttribute("data-resizable-container","true"),this.scrollContainer.appendChild(this.container),this.root.appendChild(this.scrollContainer),this.scrollBar=new ScrollBar(this.root,this),this.resizeObserver=new ResizeObserver(()=>{this.updateResizableContainer()}),this.resizeObserver.observe(this.scrollContainer)}getTranslate(){return{x:this.translateX,y:this.translateY}}getScale(){return this.scale}renderScrollBar(_e,tt,rt,nt){this.scrollBar&&this.scrollBar.render(_e,rt,tt,nt)}setSlideObject(_e){this.slide=_e,this.slide.on("renderEnd",this.updateSlideSize)}updateResizableContainer(){if(Date.now()-this.lastTriggerTime<50)return;this.lastTriggerTime=Date.now();const _e=this.scrollContainer.getBoundingClientRect();if(this.container.style.width=`${_e.width*this.scale}px`,this.container.style.height=`${_e.height*this.scale}px`,this.whiteboardContainer){const tt=this.whiteboardContainer.getBoundingClientRect();if(tt.width/tt.height>this.slideWidth/this.slideHeight){const rt=tt.height*this.slideWidth/this.slideHeight,nt=(tt.width-rt)/2;this.whiteboardContainer.style.clipPath=`inset(0px ${nt}px 0px ${nt}px)`}else if(tt.width/tt.height<this.slideWidth/this.slideHeight){const rt=tt.width*this.slideHeight/this.slideWidth,nt=(tt.height-rt)/2;this.whiteboardContainer.style.clipPath=`inset(${nt}px 0px ${nt}px 0px)`}}this.translateX=.5,this.translateY=.5,this.renderScrollBar(_e.width,_e.width*this.scale,_e.height,_e.height*this.scale),this.handleNormalizeTranslate(this.translateX,this.translateY,{triggerScrollBar:!0,triggerSync:!0})}handleNormalizeTranslate(_e,tt,rt){if(Math.abs(_e-this.translateX)<.001&&Math.abs(tt-this.translateY)<.001&&!rt.triggerSync)return;const nt=this.scrollContainer.getBoundingClientRect(),st=this.container.getBoundingClientRect(),dt=-_e*(st.width-nt.width),ft=-tt*(st.height-nt.height);this.translateX=_e,this.translateY=tt,this.container.style.transform=`translate(${dt}px, ${ft}px)`,rt.triggerScrollBar&&this.scrollBar.handleNormalizeTranslate(_e,tt),rt.triggerSync&&this.context.storage.setState({translateX:this.translateX,translateY:this.translateY})}scaleContainer(_e){Math.abs(this.scale-_e)<.001||(_e>1?(this.scrollContainer.style.width="calc(100% - 6px)",this.scrollContainer.style.height="calc(100% - 6px)"):(this.scrollContainer.style.width="100%",this.scrollContainer.style.height="100%"),_e=this.enableResize?_e:1,this.onScaleChanged&&this.enableResize&&this.onScaleChanged(_e),this.scale=_e,setTimeout(()=>{this.updateResizableContainer()}))}addSlideContainer(_e){this.container.appendChild(_e)}addWhiteboardContainer(_e){this.container.appendChild(_e),this.whiteboardContainer=_e}getCurrentScale(){return this.scale}destroy(){var _e,tt;(_e=this.resizeObserver)==null||_e.disconnect(),(tt=this.scrollBar)==null||tt.destroy()}}const ClickThroughAppliances=new Set(["clicker"]),noop$2=function et(){};class SlideDocsViewer{constructor({context:_e,box:tt,view:rt,mountSlideController:nt,mountWhiteboard:st,baseScenePath:dt,appId:ft,urlInterrupter:ht,enableScale:mt,onPagesReady:bt,onNavigate:St}){this.slideController=null,this.isViewMounted=!1,this.justSildeReadonly=!1,this.onError=({error:Et,index:Ct})=>{var Rt,Tt;this.viewer.setPaused(),(Rt=this.slideController)!=null&&Rt.showRenderError&&(this.$overlay.textContent=`Error on slide[page=${this.slideController.page}]: ${Et.message}`,this.$overlay.style.opacity="1"),(Tt=this.slideController)!=null&&Tt.onRenderError&&this.slideController.onRenderError(Et,Ct),logger.warn("[Slide] render error",Et)},this.onRenderStart=()=>{this.$whiteboardView.classList.add(this.wrapClassName("wb-view-hidden")),this.viewer.setPlaying()},this.onRenderEnd=()=>{},this.onPageChanged=()=>{clearTimeout(this._onPageChangedTimer),this._onPageChangedTimer=setTimeout(this._onPageChanged,200)},this._onPageChangedTimer=0,this._onPageChanged=()=>{this.$overlay.style.opacity="",this.$whiteboardView.classList.remove(this.wrapClassName("wb-view-hidden"))},this.refreshPages=()=>{this.slideController&&(this.viewer.pages=createDocsViewerPages(this.slideController.slide,this.slideController.previewList),this.viewer.setPageIndex(this.getPageIndex(this.slideController.page)),this.scaleDocsToFit())},this.scaleDocsToFit=()=>{if(this.slideController){const{width:Et,height:Ct}=this.slideController.slide;Et&&Ct&&(this.whiteboardView.moveCameraToContain({originX:-Et/2,originY:-Ct/2,width:Et,height:Ct,animationMode:"immediately"}),this.whiteboardView.setCameraBound({damping:1,maxContentMode:()=>this.whiteboardView.camera.scale,minContentMode:()=>this.whiteboardView.camera.scale,centerX:0,centerY:0,width:Et,height:Ct}),this.isViewMounted||(this.isViewMounted=!0,console.log("[Slide] mount whiteboard view"),this.mountWhiteboard(this.$whiteboardView)))}},this.onPlay=()=>{this.slideController&&this.slideController.slide.nextStep()},this.onNewPageIndex=(Et,Ct)=>{this.slideController&&this.slideController.jumpToPage(Et+1,Ct)},this.sideEffect=new SideEffectManager,this.namespace="netless-app-slide",this.toPdf=async()=>{if(!this.slideController){this.reportProgress(100,null);return}const{slide:Et}=this.slideController,Ct=1920,Rt=document.createElement("canvas"),Tt=Rt.getContext("2d"),{slideCount:wt,width:At,height:Nt}=Et;let Pt=Math.floor(At),It=Math.floor(Nt);Pt>Ct&&(Pt=Ct,It=Math.floor(Nt*Pt/At)),It>Ct&&(It=Ct,Pt=Math.floor(At*It/Nt)),Rt.width=Pt,Rt.height=It;const Ft=document.createElement("canvas");Ft.width=Pt,Ft.height=It;const qt=Ft.getContext("2d");if(!qt||!this.getWhiteSnapshot||!Tt)return this.reportProgress(100,null),null;const Vt=Pt>It?"l":"p",{jsPDF:Kt}=await __vitePreload(async()=>{const{jsPDF:Wt}=await import("./jspdf.es.min-B0xhe8Uc.js").then(Bt=>Bt.j);return{jsPDF:Wt}},__vite__mapDeps([0,1,2])),jt=new Kt({format:[Pt,It],orientation:Vt,compress:!0});for(let Wt=1;Wt<=wt;Wt++){let Bt=null;try{Bt=await this.slideController.slide.snapshotWithTimingEnd(Wt)}catch{}if(Bt){const ar=document.createElement("img");ar.src=Bt,await new Promise(pr=>ar.onload=pr),Tt.drawImage(ar,0,0,Pt,It)}qt.clearRect(0,0,Pt,It),await this.getWhiteSnapshot(Wt,Ft,qt,At,Nt);try{const ar=Ft.toDataURL("image/png"),pr=document.createElement("img");pr.src=ar,await new Promise(cr=>pr.onload=cr),Tt.drawImage(pr,0,0,Pt,It)}catch{}const tr=Rt.toDataURL("image/jpeg",.6);Wt>1&&jt.addPage(),jt.addImage(tr,"JPEG",0,0,Pt,It,"","FAST"),Tt.clearRect(0,0,Pt,It),Math.ceil(Wt/wt*100)<100&&this.reportProgress(Math.ceil(Wt/wt*100),null)}const Ut=jt.output("arraybuffer"),Ot=this.box.title;this.reportProgress(100,{pdf:Ut,title:Ot})},this.context=_e,this.box=tt,this.whiteboardView=rt,this.mountSlideController=nt,this.mountWhiteboard=st,this.onNavigate=St||noop$2,this.baseScenePath=dt,this.enableScale=mt??!1,this.appId=ft,this.viewer=new DocsViewer({readonly:tt.readonly,onNewPageIndex:this.onNewPageIndex,onPlay:this.onPlay,urlInterrupter:ht,onPagesReady:bt}),this.sideEffect.add(()=>{const Et=Ct=>{this.setReadonly(Ct)};return tt.events.on("readonly",Et),()=>tt.events.off("readonly",Et)}),this.sideEffect.add(()=>{const Et=Ct=>{Ct.data.type==="@netless/_request_save_pdf_"&&Ct.data.appId===this.appId&&this.toPdf().catch(()=>this.reportProgress(100,null))};return window.addEventListener("message",Et),()=>{window.removeEventListener("message",Et)}}),this.render(),this.sideEffect.add(()=>{const Et=Rt=>{this.resizableContainer&&this.resizableContainer.scaleContainer(Rt)};console.log("[SlideDocsViewer] Initial storage state:",this.context.storage.state),console.log("[SlideDocsViewer] Initial slideScale:",this.context.storage.state.slideScale),this.context.storage.state.slideScale!==void 0?(console.log("[SlideDocsViewer] Applying initial slideScale:",this.context.storage.state.slideScale),Et(this.context.storage.state.slideScale)):console.log("[SlideDocsViewer] No initial slideScale found");const Ct=Rt=>{var Tt,wt;if(Rt.slideScale!==void 0){const At=Rt.slideScale.newValue;Et(At??1)}if(Rt.translateX!==void 0||Rt.translateY!==void 0){const At=this.resizableContainer.getTranslate(),Nt=Rt.translateX?(Tt=Rt.translateX.newValue)!=null?Tt:.5:At.x,Pt=Rt.translateY?(wt=Rt.translateY.newValue)!=null?wt:.5:At.y;this.resizableContainer&&this.resizableContainer.handleNormalizeTranslate(Nt,Pt,{triggerScrollBar:!0,triggerSync:!1})}};return console.log("[SlideDocsViewer] Adding storage state listener"),this.context.storage.onStateChanged.addListener(Ct),()=>{console.log("[SlideDocsViewer] Removing storage state listener"),this.context.storage.onStateChanged.removeListener(Ct)}})}setJustSildeReadonly(_e){var tt;this.justSildeReadonly=_e,(tt=this.slideController)==null||tt.slide.setInteractive(!this.justSildeReadonly)}render(){this.resizableContainer||(this.resizableContainer=new ResizableContainer(this.viewer.$content,this.context,this.enableScale)),this.renderSlideContainer(),this.renderWhiteboardView(),this.renderOverlay(),this.resizableContainer.addSlideContainer(this.$slide),this.resizableContainer.addWhiteboardContainer(this.$whiteboardView),this.viewer.$content.appendChild(this.$overlay),this.sideEffect.addEventListener(window,"keydown",_e=>{if(!this.justSildeReadonly&&this.box.focus&&this.slideController&&!isEditable(_e.target))switch(_e.key){case"ArrowUp":case"ArrowLeft":{this.slideController.slide.prevStep(),this.onNavigate(this.slideController.page,"keydown");break}case"ArrowRight":case"ArrowDown":{this.slideController.slide.nextStep(),this.onNavigate(this.slideController.page,"keydown");break}}})}renderOverlay(){if(!this.$overlay){const _e=document.createElement("div");_e.className=this.wrapClassName("overlay"),this.$overlay=_e}return this.$overlay}renderSlideContainer(){if(!this.$slide){const _e=document.createElement("div");_e.className=this.wrapClassName("slide"),_e.dataset.appKind="Slide",this.$slide=_e}return this.$slide}renderWhiteboardView(){return this.$whiteboardView||(this.$whiteboardView=document.createElement("div"),this.$whiteboardView.className=this.wrapClassName("wb-view")),this.$whiteboardView}mount(){return this.box.mountContent(this.viewer.$content),this.box.mountFooter(this.viewer.$footer),this.slideController=this.mountSlideController({anchor:this.$slide,onRenderStart:this.onRenderStart,onRenderEnd:this.onRenderEnd,onTransitionStart:this.viewer.setPlaying,onTransitionEnd:this.viewer.setPaused,onReady:this.refreshPages,onNavigate:this.onNavigate,onError:this.onError}),this.resizableContainer.setSlideObject(this.slideController.slide),this.scaleDocsToFit(),this.sideEffect.add(()=>(this.whiteboardView.callbacks.on("onSizeUpdated",this.scaleDocsToFit),()=>this.whiteboardView.callbacks.off("onSizeUpdated",this.scaleDocsToFit))),this}getPageIndex(_e){return(_e>0?_e:1)-1}unmount(){return this.slideController&&(this.slideController.destroy(),this.slideController=null),this.viewer.unmount(),this.resizableContainer.destroy(),this}setReadonly(_e){this.viewer.setReadonly(_e)}destroy(){this.sideEffect.flushAll(),this.unmount(),this.viewer.destroy()}toggleClickThrough(_e){this.$whiteboardView.style.pointerEvents=!_e||ClickThroughAppliances.has(_e)?"none":"auto"}wrapClassName(_e){return`${this.namespace}-${_e}`}async getWhiteSnapshot(_e,tt,rt,nt,st){const dt={centerX:0,centerY:0,scale:Math.min(tt.width/nt,tt.height/st)},ft=`${this.baseScenePath}/${_e}`,ht=this.context.manager.windowManger;ht._appliancePlugin?await ht._appliancePlugin.screenshotToCanvasAsync(rt,ft,tt.width,tt.height,dt):this.whiteboardView.screenshotToCanvas(rt,ft,tt.width,tt.height,dt)}reportProgress(_e,tt){window.postMessage({type:"@netless/_result_save_pdf_",appId:this.appId,progress:_e,result:tt})}}let useFreezer=!1,FreezerLength=2;const inspect=et=>"["+et+"]",apps={map:new Map,boxes:new Map,queue:[],validateQueue(){for(this.queue.sort((et,_e)=>{var tt,rt,nt,st;const dt=(rt=(tt=this.boxes.get(et))==null?void 0:tt.zIndex)!=null?rt:0,ft=(st=(nt=this.boxes.get(_e))==null?void 0:nt.zIndex)!=null?st:0;return-(dt-ft)}),log("[Slide] freezer: validate",inspect(this.queue));this.queue.length>FreezerLength;){const et=this.queue.pop(),_e=this.map.get(et);_e&&(log("[Slide] freezer: validate-freeze",et,inspect(this.queue)),_e.freeze())}},set(et,_e,tt){log("[Slide] freezer: add",et,inspect(this.queue)),this.map.set(et,_e),this.boxes.set(et,tt),this.queue.includes(et)||this.queue.unshift(et),this.validateQueue()},delete(et){this.map.delete(et),this.boxes.delete(et),this.queue=this.queue.filter(_e=>_e!==et),log("[Slide] freezer: delete",et,inspect(this.queue))},focus(et){const _e=this.map.get(et),tt=this.queue.indexOf(et);tt>-1&&this.queue.splice(tt,1),this.queue.unshift(et),this.validateQueue(),log("[Slide] freezer: focus",et,inspect(this.queue)),_e&&_e.unfreeze()}},on_created_callbacks=new Set,on_destroyed_callbacks=new Set,addHooks=et=>{useFreezer=!0,et.on("focus",({appId:_e})=>{apps.focus(_e)}),et.on("created",({appId:_e})=>{on_created_callbacks.forEach(tt=>tt(_e))}),et.on("destroy",({appId:_e})=>{on_destroyed_callbacks.forEach(tt=>tt(_e))})};var styles=`.netless-app-slide-content{position:relative;height:100%;overflow:hidden}.netless-app-slide-preview-mask{display:none;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%}.netless-app-slide-preview{display:flex;flex-direction:column;align-items:center;position:absolute;z-index:300;top:0;left:0;width:33%;max-width:200px;height:100%;padding-top:10px;transform:translate(-100%);background:rgba(237,237,240,.9);box-shadow:inset -1px 0 #0000001c;transition:transform .4s}.netless-app-slide-preview-active .netless-app-slide-preview-mask{display:block}.netless-app-slide-preview-active .netless-app-slide-preview{transform:translate(0)}.netless-app-slide-preview-page{position:relative;display:block;width:55%;margin-bottom:10px;font-size:0;color:transparent;outline:none;border:7px solid transparent;border-radius:4px;transition:border-color .3s;user-select:none}.netless-app-slide-preview-page:hover,.netless-app-slide-preview-page.netless-app-slide-preview-page-active{border-color:#444e601a}.netless-app-slide-preview-page>img{width:100%;height:auto;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);border-radius:1px;background-color:#fff;box-shadow:0 2px 8px #0000004d}.netless-app-slide-preview-page-name{position:absolute;top:1px;left:-10px;transform:translate(-100%);text-align:right;font-size:12px;color:#5f5f5f;user-select:none}.netless-app-slide-footer{box-sizing:border-box;height:26px;display:flex;align-items:center;padding:0 16px;border-top:1px solid #eeeef7;color:#191919}.netless-app-slide-float-footer{width:100%;min-height:26px;position:absolute;left:0;bottom:0;z-index:2000;background:rgba(249,249,252,.9);transition:opacity .4s}.netless-app-slide-footer-btn{box-sizing:border-box;width:26px;height:26px;font-size:0;margin:0;padding:3px;border:none;border-radius:1px;outline:none;color:currentColor;background:transparent;transition:background .4s;cursor:pointer;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-footer-btn:hover{background:rgba(237,237,240,.9)}@media (hover: none){.netless-app-slide-footer-btn:hover{background:transparent!important}}.netless-app-slide-footer-btn>svg{width:100%;height:100%}.netless-app-slide-footer-btn>svg:nth-of-type(2){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(1){display:none}.netless-app-slide-footer-btn.netless-app-slide-footer-btn-playing>svg:nth-of-type(2){display:initial}.netless-app-slide-footer-btn~.netless-app-slide-footer-btn{margin-left:15px}.netless-app-slide-page-jumps{flex:1;display:flex;justify-content:center;align-items:center}.netless-app-slide-page-number{margin-left:auto;font-size:13px;user-select:none;white-space:nowrap;word-break:keep-all}.netless-app-slide-page-number-input{border:none;outline:none;width:3em;margin:0;padding:0 2px;text-align:right;font-size:13px;line-height:1;font-weight:400;font-family:inherit;border-radius:2px;color:currentColor;background:transparent;transition:background .4s;user-select:text;-webkit-tap-highlight-color:rgba(0,0,0,0)}.netless-app-slide-page-number-input:hover,.netless-app-slide-page-number-input:focus,.netless-app-slide-page-number-input:active{background:#fff;box-shadow:#63636333 0 2px 8px}.netless-app-slide-readonly.netless-app-slide-footer{display:none}.telebox-color-scheme-dark .netless-app-slide-page-number-input{color:#a6a6a8}.telebox-color-scheme-dark .netless-app-slide-page-number-input:active,.telebox-color-scheme-dark .netless-app-slide-page-number-input:focus,.telebox-color-scheme-dark .netless-app-slide-page-number-input:hover{color:#222}.telebox-color-scheme-dark .netless-app-slide-footer{color:#a6a6a8;background:#2d2d33;border-top:none}.telebox-color-scheme-dark .netless-app-slide-footer-btn:hover{background:#212126}.telebox-color-scheme-dark .netless-app-slide-preview{background:rgba(50,50,50,.9)}.netless-app-slide-wb-view{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;overflow:hidden;transition:opacity .2s}.netless-app-slide-wb-view-hidden{opacity:0}.netless-app-slide-overlay{display:flex;align-items:center;justify-content:center;position:absolute;z-index:200;top:0;left:0;width:100%;height:100%;padding:8px;background:rgba(255,0,0,.25);transition:opacity .3s;opacity:0;pointer-events:none}.netless-app-slide-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.netless-app-slide-slide canvas{transform:scale(var(--netless-app-slide-scale, 1))}
`;Slide.Slide;const version$1="0.2.88",SlideApp={kind:"Slide",setup(et){var _e,tt,rt,nt;if(console.log("[Slide] setup @ "+version$1),et.getIsWritable()&&et.storage.ensureState(EmptyAttributes),!et.storage.state.taskId)throw new Error("[Slide] no taskId");const st=et.getView();if(!st)throw new Error("[Slide] no view, please set scenePath on addApp()");st.disableCameraTransform=!0;const dt=et.getBox();dt.mountStyles(styles);try{dt.$content.dataset.appSlideVersion=version$1}catch{}const ft=et.getInitScenePath();let ht=null;const mt=Ct=>{const Rt=et.getRoom();if(ht&&ht.slideController){let Tt=!1;Rt&&et.getIsWritable()&&(syncSceneWithSlide(Rt,et,ht.slideController.slide,ft),Tt=!0),log("[Slide] page to",Ct,Tt?"(synced)":""),ht.viewer.setPageIndex(Ct-1),ht.viewer.setPaused(),ht.onPageChanged();const wt=ht.viewer.pages.length;wt>0&&et.dispatchAppEvent("pageStateChange",{index:Ct-1,length:wt})}},bt=Ct=>{const Rt=et.getAppOptions()||{},Tt=new SlideController({context:et,...Ct,onPageChanged:mt,onNavigate:Ct.onNavigate,onRenderError:Rt.onRenderError,showRenderError:Rt.showRenderError,invisibleBehavior:Rt.invisibleBehavior});return useFreezer&&apps.set(et.appId,Tt,dt),logger.setAppController(et.appId,Tt),Tt.readyPromise.then(Ct.onReady).then(()=>{const wt=et.getRoom();let At=!1;wt&&et.getIsWritable()&&(syncSceneWithSlide(wt,et,Tt.slide,ft),At=!0);const Nt=Tt.slide.slideState.currentSlideIndex;log("[Slide] page to",Nt,At?"(synced)":"","(on ready)"),Tt.slide.on("renderEnd",Ct.onRenderEnd)}),Tt};ht=new SlideDocsViewer({context:et,box:dt,view:st,mountSlideController:bt,mountWhiteboard:et.mountView.bind(et),baseScenePath:ft,appId:et.appId,urlInterrupter:(_e=et.getAppOptions())==null?void 0:_e.urlInterrupter,enableScale:(rt=(tt=et.getAppOptions())==null?void 0:tt.enableScale)!=null?rt:!1,onPagesReady:({length:Ct})=>{const Rt=ht?.viewer.pageIndex||0;et.dispatchAppEvent("pageStateChange",{index:Rt,length:Ct})},onNavigate:(Ct,Rt)=>{log("[Slide] user navigate to",Ct,Rt?`(${Rt})`:"")}}),(nt=et.getAppOptions())!=null&&nt.justSildeReadonly&&ht?.setJustSildeReadonly(!0);const St=et.getRoom(),Et=new SideEffectManager;return Et.add(()=>{var Ct;return logger.setAppContext(et.appId,et),logger.enable=((Ct=et.getAppOptions())==null?void 0:Ct.debug)||!1,logger.level="debug",()=>logger.deleteApp(et.appId)}),St&&(ht.toggleClickThrough(St.state.memberState.currentApplianceName),Et.add(()=>{const Ct=Rt=>{Rt.memberState&&ht&&ht.toggleClickThrough(Rt.memberState.currentApplianceName)};return St.callbacks.on("onRoomStateChanged",Ct),()=>St.callbacks.off("onRoomStateChanged",Ct)})),et.emitter.on("destroy",()=>{log("[Slide] destroy",et.appId),useFreezer&&apps.delete(et.appId),Et.flushAll(),ht&&(ht.destroy(),ht=null)}),ht.mount(),{onScaleChanged:Ct=>{ht&&(ht.resizableContainer.onScaleChanged=Ct)},scaleView:Ct=>{let Rt=Number(Ct);Number.isNaN(Rt)&&(Rt=1),Rt<1&&(Rt=1),Rt>4&&(Rt=4),et.storage.setState({slideScale:Rt}),et.storage.setState({translateX:.5,translateY:.5}),ht?.resizableContainer.scaleContainer(Rt)},getViewScale:()=>ht?.resizableContainer.getScale(),translateView:(Ct,Rt)=>{var Tt,wt;if(ht?.resizableContainer){const At=ht.resizableContainer,Nt=et.getBox().$content.getBoundingClientRect(),Pt=At.container.getBoundingClientRect(),It=Pt.width-Nt.width,Ft=Pt.height-Nt.height;if(It>0||Ft>0){const qt=(Tt=At.translateX)!=null?Tt:.5,Vt=(wt=At.translateY)!=null?wt:.5,Kt=It>0?Ct/It:0,jt=Ft>0?Rt/Ft:0,Ut=Math.max(0,Math.min(1,qt+Kt)),Ot=Math.max(0,Math.min(1,Vt+jt));et.storage.setState({translateX:Ut,translateY:Ot}),At.handleNormalizeTranslate(Ut,Ot,{triggerScrollBar:!0,triggerSync:!1})}}},setSildeReadonly:Ct=>{ht?.setJustSildeReadonly(Ct)},viewer:()=>ht,controller:()=>ht?.slideController,slide:()=>{var Ct;return(Ct=ht?.slideController)==null?void 0:Ct.slide},nextStep:()=>{var Ct;return ht&&ht.slideController?((Ct=ht?.slideController)==null||Ct.slide.nextStep(),!0):!1},prevStep:()=>{var Ct;return ht&&ht.slideController?((Ct=ht?.slideController)==null||Ct.slide.prevStep(),!0):!1},position:()=>{const Ct=ht?.slideController;if(Ct)return[Ct.page,Ct.pageCount]},nextPage:()=>{const Ct=ht?.slideController;if(Ct){const{page:Rt,pageCount:Tt}=Ct;if(Tt>0&&Rt<Tt)return Ct.jumpToPage(Rt+1),!0}return!1},prevPage:()=>{const Ct=ht?.slideController;if(Ct){const{page:Rt,pageCount:Tt}=Ct;if(Tt>0&&Rt>1)return Ct.jumpToPage(Rt-1),!0}return!1},jumpToPage:Ct=>{const Rt=ht?.slideController;if(Rt){const{page:Tt,pageCount:wt}=Rt;if(wt>0&&Tt>0&&Tt<=wt)return Rt.jumpToPage(Ct),!0}return!1}}}};Slide.Slide;var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(et,_e,tt)=>_e in et?__defProp(et,_e,{enumerable:!0,configurable:!0,writable:!0,value:tt}):et[_e]=tt,__spreadValues=(et,_e)=>{for(var tt in _e||(_e={}))__hasOwnProp.call(_e,tt)&&__defNormalProp(et,tt,_e[tt]);if(__getOwnPropSymbols)for(var tt of __getOwnPropSymbols(_e))__propIsEnum.call(_e,tt)&&__defNormalProp(et,tt,_e[tt]);return et},__spreadProps=(et,_e)=>__defProps(et,__getOwnPropDescs(_e)),__objRest=(et,_e)=>{var tt={};for(var rt in et)__hasOwnProp.call(et,rt)&&_e.indexOf(rt)<0&&(tt[rt]=et[rt]);if(et!=null&&__getOwnPropSymbols)for(var rt of __getOwnPropSymbols(et))_e.indexOf(rt)<0&&__propIsEnum.call(et,rt)&&(tt[rt]=et[rt]);return tt},__publicField=(et,_e,tt)=>(__defNormalProp(et,typeof _e!="symbol"?_e+"":_e,tt),tt);function noop(){}function safe_not_equal(et,_e){return et!=et?_e==_e:et!==_e||et&&typeof et=="object"||typeof et=="function"}function readable(et,_e=noop){let tt;const rt=new Set;function nt(ht){if(safe_not_equal(et,ht)&&(et=ht,tt))for(const mt of rt)mt(et)}function st(ht){return rt.add(ht),rt.size===1&&(tt=_e(nt)||noop),ht(et),()=>{rt.delete(ht),rt.size===0&&(tt&&tt(),tt=void 0)}}function dt(ht){return rt.add(ht),rt.size===1&&(tt=_e(nt)||noop),()=>{rt.delete(ht),rt.size===0&&(tt&&tt(),tt=void 0)}}function ft(ht){ht!==void 0&&nt(ht),rt.clear(),tt&&tt(),tt=void 0}return{get value(){return rt.size===0&&(tt=_e(nt)||noop,tt(),tt=void 0),et},subscribe:st,reaction:dt,dispose:ft}}function writable(et,_e=noop,tt){const rt=readable(et,_e);return{get value(){return rt.value},subscribe:rt.subscribe,reaction:rt.reaction,set:tt,update(nt){tt(nt(rt.value))},dispose:rt.dispose}}function getImageSize(et,_e,tt){return new Promise(rt=>{const nt=new Image;applyCrossOrigin(nt,et,tt),nt.onload=()=>rt(nt),nt.onerror=()=>rt(_e),nt.src=et})}function applyCrossOrigin(et,_e,tt){tt===void 0&&!_e.startsWith("data:")?et.crossOrigin=determineCrossOrigin(_e):tt!==!1&&(et.crossOrigin=typeof tt=="string"?tt:"anonymous")}function determineCrossOrigin(et){if(et.startsWith("data:")||typeof window>"u"||!window.location)return"";const _e=window.location;try{const tt=new URL(et,document.baseURI);return tt.hostname!==_e.hostname||tt.port!==_e.port||tt.protocol!==_e.protocol?"anonymous":""}catch{return""}}function makeSlideParams(et){const _e=[];let tt="",rt="";const nt=new RegExp("^pptx?(?<prefix>:\\/\\/\\S+?dynamicConvert)\\/(?<taskId>\\w+)\\/");for(const{name:st,ppt:dt}of et){if(_e.push({name:st}),!dt||!dt.src.startsWith("ppt"))continue;const ft=nt.exec(dt.src);if(!(!ft||!ft.groups)){tt=ft.groups.taskId,rt=`https${ft.groups.prefix}`;break}}return{scenes:_e,taskId:tt,url:rt}}function convertedFileToScene(et,_e){return{name:String(_e+1),ppt:{src:et.conversionFileUrl,width:et.width,height:et.height,previewURL:et.preview}}}var SOUP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",SOUP_LEN=62,ID_LEN=20,reusedIdCarrier=Array(ID_LEN);function genUID(){for(let et=0;et<ID_LEN;et++)reusedIdCarrier[et]=SOUP.charAt(Math.random()*SOUP_LEN);return reusedIdCarrier.join("")}var warnings={"no-ppt-in-scenes":"You're probably inserting the slide app in a wrong way, there shouldn't exist `scenes[0].ppt`."},warned=new Set;function warn(et){warned.has(et)||(warned.add(et),console.warn(warnings[et]))}function ensure_official_plugins(et){const _e=new Set(et.invisiblePlugins||[]);return _e.add(WindowManager),_e.add(SyncedStorePlugin),et.invisiblePlugins=[..._e],et}function transform_app_status(et){return et==="start"?"loading":et==="failed"?"failed":"idle"}var register=WindowManager.register.bind(WindowManager),DefaultApps={Monaco:{src:"https://netless-app.oss-cn-hangzhou.aliyuncs.com/@netless/app-monaco/0.1.14-beta.1/dist/main.iife.js"},Countdown:{src:"https://netless-app.oss-cn-hangzhou.aliyuncs.com/@netless/app-countdown/0.0.2-alpha.1/dist/main.iife.min.js"},GeoGebra:{src:"https://netless-app.oss-cn-hangzhou.aliyuncs.com/@netless/app-geogebra/0.0.4/dist/main.iife.js",appOptions:{HTML5Codebase:"https://flat-storage-cn-hz.whiteboard.agora.io/GeoGebra/HTML5/5.0/web3d"}},EmbeddedPage:{src:"https://netless-app.oss-cn-hangzhou.aliyuncs.com/@netless/app-embedded-page/0.1.1/dist/main.iife.js"},Plyr:{src:"https://netless-app.oss-cn-hangzhou.aliyuncs.com/@netless/app-plyr/0.1.3/dist/main.iife.js"}};for(const et in DefaultApps)if(Object.prototype.hasOwnProperty.call(DefaultApps,et)){const _e=DefaultApps[et];WindowManager.register(__spreadValues({kind:et},_e))}var version="1.1.0";if(typeof window<"u"){let et=window.__netlessUA||"";et+=` @netless/fastboard@${version} `,window.__netlessUA=et}function noop2(){}var FastboardAppBase=class{constructor(et,_e,tt,rt,nt,st,dt){this.sdk=et,this.room=_e,this.manager=tt,this.hotKeys=rt,this.syncedStore=nt,this.appliancePlugin=st,this.appInMainViewPlugin=dt,__publicField(this,"_destroyed",!1)}_assertNotDestroyed(){if(this._destroyed)throw new Error("FastboardApp has been destroyed")}_addRoomListener(et,_e){return this._destroyed?noop2:(this.room.callbacks.on(et,_e),()=>this.room.callbacks.off(et,_e))}_addManagerListener(et,_e){return this._destroyed?noop2:(this.manager.emitter.on(et,_e),()=>this.manager.emitter.off(et,_e))}_addMainViewListener(et,_e){return this._destroyed?noop2:(this.manager.mainView.callbacks.on(et,_e),()=>this.manager.mainView.callbacks.off(et,_e))}_addApplianceListener(et,_e){return this._destroyed||!this.appliancePlugin?noop2:(this.appliancePlugin.addListener(et,_e),()=>{var tt;return(tt=this.appliancePlugin)==null?void 0:tt.removeListener(et,_e)})}_addAppInMainViewListener(et,_e){return this._destroyed||!this.appInMainViewPlugin?noop2:(this.appInMainViewPlugin.addListener(et,_e),()=>{var tt;return(tt=this.appInMainViewPlugin)==null?void 0:tt.removeListener(et,_e)})}async destroy(){var et,_e;this._destroyed=!0,this.manager.destroy(),(et=this.appliancePlugin)==null||et.destroy(),(_e=this.appInMainViewPlugin)==null||_e.destroy(),await this.room.disconnect().catch(console.warn)}},FastboardApp=class extends FastboardAppBase{constructor(){super(...arguments),__publicField(this,"writable",writable(this.room.isWritable,et=>(et(this.room.isWritable),this._addRoomListener("onEnableWriteNowChanged",()=>et(this.room.isWritable))),this.room.setWritable.bind(this.room))),__publicField(this,"phase",readable(this.room.phase,et=>(et(this.room.phase),this._addRoomListener("onPhaseChanged",et)))),__publicField(this,"boxState",readable(this.manager.boxState,et=>(et(this.manager.boxState),this._addManagerListener("boxStateChange",et)))),__publicField(this,"focusedApp",readable(this.manager.focused,et=>(et(this.manager.focused),this._addManagerListener("focusedChange",et)))),__publicField(this,"canRedoSteps",readable(this.manager.canRedoSteps,et=>(et(this.manager.canRedoSteps),this._addManagerListener("canRedoStepsChange",et)))),__publicField(this,"canUndoSteps",readable(this.manager.canUndoSteps,et=>(et(this.manager.canUndoSteps),this._addManagerListener("canUndoStepsChange",et)))),__publicField(this,"camera",readable(this.manager.cameraState,et=>(et(this.manager.cameraState),this._addManagerListener("cameraStateChange",et)))),__publicField(this,"memberState",readable(this.room.state.memberState,et=>(et(this.room.state.memberState),this._addRoomListener("onRoomStateChanged",({memberState:_e})=>_e&&et(_e))))),__publicField(this,"sceneIndex",writable(this.manager.mainViewSceneIndex,et=>(et(this.manager.mainViewSceneIndex),this._addManagerListener("mainViewSceneIndexChange",et)),this.manager.setMainViewSceneIndex.bind(this.manager))),__publicField(this,"sceneLength",readable(this.manager.mainViewScenesLength,et=>(et(this.manager.mainViewScenesLength),this._addManagerListener("mainViewScenesLengthChange",et)))),__publicField(this,"_appsStatus",{}),__publicField(this,"appsStatus",readable({},et=>this._addManagerListener("loadApp",({kind:_e,status:tt,reason:rt})=>{this._appsStatus[_e]={status:transform_app_status(tt),reason:rt},et(this._appsStatus)}))),__publicField(this,"_visibleApps",new Set),__publicField(this,"visibleApps",readable(this._visibleApps,et=>{if(!this.appInMainViewPlugin){et(this._visibleApps);return}const _e=this.appInMainViewPlugin.currentPageVisibleApps;return _e&&(this._visibleApps=_e),et(this._visibleApps),this._addAppInMainViewListener("appMenuChange",tt=>{this._visibleApps=new Set([...tt.entries()].filter(([rt,{status:nt}])=>nt==="visible").map(([rt])=>rt)),et(this._visibleApps)})}))}bindContainer(et){this._assertNotDestroyed(),this.manager.bindContainer(et)}bindCollector(et){this._assertNotDestroyed(),this.manager.bindCollectorContainer(et)}get canOperate(){return this.room.isWritable&&this.room.phase==="connected"}undo(){if(this._assertNotDestroyed(),this.appliancePlugin){this.appliancePlugin.undo();return}this.manager.undo()}redo(){if(this._assertNotDestroyed(),this.appliancePlugin){this.appliancePlugin.redo();return}this.manager.redo()}moveCamera(et){this._assertNotDestroyed(),this.manager.moveCamera(et)}moveCameraToContain(et){this._assertNotDestroyed(),this.manager.moveCameraToContain(et)}cleanCurrentScene(){this._assertNotDestroyed(),this.manager.cleanCurrentScene()}setAppliance(et,_e){this._assertNotDestroyed(),this.manager.mainView.setMemberState({currentApplianceName:et,shapeType:_e})}setStrokeWidth(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({strokeWidth:et})}setStrokeColor(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({strokeColor:et})}setTextSize(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({textSize:et})}setTextColor(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({textColor:et})}toggleDottedLine(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({dottedLine:et??!this.memberState.value.dottedLine})}setPencilEraserSize(et){this._assertNotDestroyed(),this.manager.mainView.setMemberState({pencilEraserSize:et})}prevPage(){return this._assertNotDestroyed(),this.manager.prevPage()}nextPage(){return this._assertNotDestroyed(),this.manager.nextPage()}jumpPage(et){return this._assertNotDestroyed(),this.manager.jumpPage(et)}addPage(et){return this._assertNotDestroyed(),this.manager.addPage(et)}removePage(et){return this._assertNotDestroyed(),this.manager.removePage(et)}async insertImage(et,_e){this._assertNotDestroyed(),await this.manager.switchMainViewToWriter();const{divElement:tt}=this.manager.mainView,rt={width:tt?.scrollWidth||window.innerWidth,height:tt?.scrollHeight||window.innerHeight},nt=rt.width*.8;let{width:st,height:dt}=await getImageSize(et,rt,_e);const ft=Math.min(nt/st,1),ht=genUID(),{centerX:mt,centerY:bt}=this.manager.camera;st*=ft,dt*=ft;const St=this.appliancePlugin||this.manager.mainView;St.insertImage({uuid:ht,centerX:mt,centerY:bt,width:st,height:dt,locked:!1,crossOrigin:_e}),St.completeImageUpload(ht,et),st/=.8,dt/=.8;const Et=mt-st/2,Ct=bt-dt/2;this.manager.moveCameraToContain({originX:Et,originY:Ct,width:st,height:dt})}insertDocs(et,_e){if(this._assertNotDestroyed(),typeof et=="object"&&"fileType"in et)return this._insertDocsImpl(et);if(_e&&_e.status!=="Finished")throw new Error("FastboardApp cannot insert a converting doc.");if(_e&&"progress"in _e){const tt=et,rt=`/${_e.uuid}/${genUID()}`,nt=_e.progress.convertedFileList.map(convertedFileToScene),{scenes:st,taskId:dt,url:ft}=makeSlideParams(nt);return dt&&ft?this._insertDocsImpl({fileType:"pptx",scenePath:rt,scenes:st,title:tt,taskId:dt,url:ft}):this._insertDocsImpl({fileType:"pdf",scenePath:rt,scenes:nt,title:tt})}else if(_e&&_e.images){const tt=et,rt=`/${_e.uuid}/${genUID()}`,nt=[];for(const st in _e.images){const{width:dt,height:ft,url:ht}=_e.images[st];nt.push({name:st,ppt:{width:dt,height:ft,src:ht}})}return this._insertDocsImpl({fileType:"pdf",scenePath:rt,scenes:nt,title:tt})}else if(_e&&_e.prefix){const tt=et,rt=`/${_e.uuid}/${genUID()}`,nt=_e.uuid,st=_e.prefix;this._insertDocsImpl({fileType:"pptx",scenePath:rt,taskId:nt,title:tt,url:st})}else throw new Error("Invalid input: not found 'progress', 'prefix' nor 'images'")}_insertDocsImpl(et){var _e=et,{fileType:tt,scenePath:rt,title:nt,scenes:st}=_e,dt=__objRest(_e,["fileType","scenePath","title","scenes"]);switch(this._assertNotDestroyed(),tt){case"pdf":return this.manager.addApp({kind:"DocsViewer",options:{scenePath:rt,title:nt,scenes:st}});case"pptx":return st&&st[0].ppt&&warn("no-ppt-in-scenes"),this.manager.addApp({kind:"Slide",options:{scenePath:rt,title:nt,scenes:st},attributes:dt})}}insertMedia(et,_e){return this._assertNotDestroyed(),this.manager.addApp({kind:BuiltinApps.MediaPlayer,options:{title:et},attributes:{src:_e}})}insertCodeEditor(){return this._assertNotDestroyed(),this.manager.addApp({kind:"Monaco",options:{title:"Code Editor"}})}insertCountdown(){return this._assertNotDestroyed(),this.manager.addApp({kind:"Countdown",options:{title:"Countdown"}})}insertGeoGebra(){return this._assertNotDestroyed(),this.manager.addApp({kind:"GeoGebra",options:{title:"GeoGebra"}})}async destroy(){await super.destroy(),this.phase.dispose("disconnected"),this.writable.dispose(!1)}};async function createFastboard(et){var _e=et,{sdkConfig:tt,joinRoom:rt}=_e,nt=rt,{callbacks:st}=nt,dt=__objRest(nt,["callbacks"]),{managerConfig:ft,netlessApps:ht,enableAppliancePlugin:mt,enableAppInMainViewPlugin:bt}=_e,St,Et;const Ct=!!(mt?.cdn.fullWorkerUrl&&mt?.cdn.subWorkerUrl),Rt=ensure_official_plugins(dt);let Tt;if(Ct){const{ApplianceMultiPlugin:Kt}=await __vitePreload(async()=>{const{ApplianceMultiPlugin:jt}=await import("./appliance-plugin-BKualpMO.js").then(Ut=>Ut.ah);return{ApplianceMultiPlugin:jt}},__vite__mapDeps([3,1,2,4]));Tt=Kt,Rt.invisiblePlugins&&(Rt.invisiblePlugins=[...Rt.invisiblePlugins,Tt]),ft&&(ft.supportAppliancePlugin=!0)}let wt;if(bt&&Rt.invisiblePlugins){const{AppInMainViewPlugin:Kt}=await __vitePreload(async()=>{const{AppInMainViewPlugin:jt}=await import("./app-in-mainview-plugin-sbukcpr0.js");return{AppInMainViewPlugin:jt}},__vite__mapDeps([5,4,1,2]));wt=Kt,Rt.invisiblePlugins=[...Rt.invisiblePlugins,wt]}const At=new whiteWebSdkExports.WhiteWebSdk(__spreadProps(__spreadValues({},tt),{useMobXState:!0})),Nt=dt.hotKeys||__spreadProps(__spreadValues({},whiteWebSdkExports.DefaultHotKeys),{changeToSelector:"s",changeToLaserPointer:"z",changeToPencil:"p",changeToRectangle:"r",changeToEllipse:"c",changeToEraser:"e",changeToText:"t",changeToStraight:"l",changeToArrow:"a",changeToHand:"h"});ht&&ht.forEach(Kt=>{register({kind:Kt.kind,src:Kt})});const Pt=await At.joinRoom(__spreadProps(__spreadValues({floatBar:!0,hotKeys:Nt},Rt),{useMultiViews:!0,disableNewPencil:!1,disableMagixEventDispatchLimit:!0}),st),It=await SyncedStorePlugin.init(Pt),Ft=await WindowManager.mount(__spreadProps(__spreadValues({cursor:!0},ft),{room:Pt}));let qt;bt&&wt&&(qt=await wt.getInstance(Ft,bt===!0?void 0:bt));let Vt;if(Ct&&mt&&Tt&&(Vt=await Tt.getInstance(Ft,{options:mt})),Pt.isWritable&&((St=Pt.floatBarOptions)!=null&&St.colors.length)){const Kt=(Et=Pt.floatBarOptions)==null?void 0:Et.colors,jt=Kt.length,Ut=Pt.observerId%jt,Ot=Kt[Ut];Ft.mainView.setMemberState({strokeColor:Ot,textColor:Ot})}return Ft.mainView.setCameraBound({minContentMode:whiteWebSdkExports.contentModeScale(.3),maxContentMode:whiteWebSdkExports.contentModeScale(3)}),new FastboardApp(At,Pt,Ft,Nt,It,Vt,qt)}WindowManager.register({kind:"Slide",appOptions:{debug:!1},src:SlideApp,addHooks});function injectStyle(et){if(typeof document<"u"){var _e=document.createElement("style"),tt=document.createTextNode(et);_e.appendChild(tt),document.head.appendChild(_e)}}var style_default='@charset "UTF-8";.vjs-modal-dialog .vjs-modal-dialog-content,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-button>.vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) format("woff");font-weight:400;font-style:normal}.vjs-icon-play,.video-js .vjs-play-control .vjs-icon-placeholder,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.video-js .vjs-big-play-button .vjs-icon-placeholder:before{content:"\\f101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\f102"}.vjs-icon-pause,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pause:before,.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before{content:"\\f103"}.vjs-icon-volume-mute,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mute:before,.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before{content:"\\f104"}.vjs-icon-volume-low,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-low:before,.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before{content:"\\f105"}.vjs-icon-volume-mid,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-mid:before,.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before{content:"\\f106"}.vjs-icon-volume-high,.video-js .vjs-mute-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-volume-high:before,.video-js .vjs-mute-control .vjs-icon-placeholder:before{content:"\\f107"}.vjs-icon-fullscreen-enter,.video-js .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-enter:before,.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before{content:"\\f108"}.vjs-icon-fullscreen-exit,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-fullscreen-exit:before,.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before{content:"\\f109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\f10a"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\f10b"}.vjs-icon-subtitles,.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-subtitles:before,.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before{content:"\\f10c"}.vjs-icon-captions,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-captions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-captions:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-captions-button .vjs-icon-placeholder:before{content:"\\f10d"}.vjs-icon-chapters,.video-js .vjs-chapters-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-chapters:before,.video-js .vjs-chapters-button .vjs-icon-placeholder:before{content:"\\f10e"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\f10f"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\f110"}.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder,.video-js .vjs-volume-level,.video-js .vjs-play-progress{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before,.video-js .vjs-volume-level:before,.video-js .vjs-play-progress:before{content:"\\f111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\f112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\f113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\f114"}.vjs-icon-cancel,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cancel:before,.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before{content:"\\f115"}.vjs-icon-replay,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-replay:before,.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before{content:"\\f116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\f117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\\f118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\f119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\f11a"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\f11b"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\f11c"}.vjs-icon-audio-description,.video-js .vjs-descriptions-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio-description:before,.video-js .vjs-descriptions-button .vjs-icon-placeholder:before{content:"\\f11d"}.vjs-icon-audio,.video-js .vjs-audio-button .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-audio:before,.video-js .vjs-audio-button .vjs-icon-placeholder:before{content:"\\f11e"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\f11f"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\f120"}.vjs-icon-picture-in-picture-enter,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-enter:before,.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:"\\f121"}.vjs-icon-picture-in-picture-exit,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-picture-in-picture-exit:before,.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before{content:"\\f122"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:initial}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,.video-js *:before,.video-js *:after{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-fluid,.video-js.vjs-16-9,.video-js.vjs-4-3,.video-js.vjs-9-16,.video-js.vjs-1-1{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-9-16{padding-top:177.7777777778%}.video-js.vjs-1-1{padding-top:100%}.video-js.vjs-fill{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0;width:100%;height:100%}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;inset:0}.video-js.vjs-fullscreen:not(.vjs-ios-native-fs){width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:#2b333fb3;border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.81666em;margin-left:-1.5em}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{border-color:#fff;background-color:#73859f;background-color:#73859f80;transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button,.vjs-error .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),rgba(255,255,255,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover,.js-focus-visible .vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:#73859f80}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover,.js-focus-visible .vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible){background:none}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0em;margin-bottom:1.5em;border-top-color:#2b333fb3}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:#2b333fb3;position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,.vjs-menu-button-popup .vjs-menu.vjs-lock-showing{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline:hover,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline:hover .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline.vjs-slider-active .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:#2b333fb3}.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;pointer-events:none;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar,.vjs-error .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.vjs-button>.vjs-icon-placeholder{display:block}.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before,.video-js .vjs-control:focus{text-shadow:0em 0em 1em white}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-play-progress,.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.3333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:#000c}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:#73859f80}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0em 0em 1em white;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal{width:5em;height:3em;margin-right:0}.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active{width:10em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em;z-index:1}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em;z-index:1}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:#2b333fb3}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.video-js .vjs-volume-tooltip{background-color:#fff;background-color:#fffc;border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-volume-control:hover .vjs-volume-tooltip,.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip{display:block;font-size:1em;visibility:visible}.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip{left:1em;top:-12px}.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip{font-size:1em}.video-js .vjs-volume-control .vjs-mouse-display{display:none;position:absolute;width:100%;height:1px;background-color:#000;z-index:1}.video-js .vjs-volume-horizontal .vjs-mouse-display{width:1px;height:100%}.vjs-no-flex .vjs-volume-control .vjs-mouse-display{z-index:0}.video-js .vjs-volume-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-volume-tooltip{color:#fff;background-color:#000;background-color:#000c}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;inset:0;height:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js:not(.vjs-live) .vjs-live-control,.video-js.vjs-liveui .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{align-items:center;cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.vjs-live .vjs-time-control,.video-js .vjs-current-time,.vjs-no-flex .vjs-current-time,.video-js .vjs-duration,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;inset:0 0 3em;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-picture-in-picture-control,.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.vjs-playback-rate>.vjs-menu-button,.vjs-playback-rate .vjs-playback-rate-value{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:before,.vjs-loading-spinner:after{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:before,.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(360deg)}}@-webkit-keyframes vjs-spinner-spin{to{-webkit-transform:rotate(360deg)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\\f10d";font-size:1.5em;line-height:inherit}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \\f11d";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-small .vjs-current-time,.video-js.vjs-layout-small .vjs-time-divider,.video-js.vjs-layout-small .vjs-duration,.video-js.vjs-layout-small .vjs-remaining-time,.video-js.vjs-layout-small .vjs-playback-rate,.video-js.vjs-layout-small .vjs-volume-control,.video-js.vjs-layout-x-small .vjs-current-time,.video-js.vjs-layout-x-small .vjs-time-divider,.video-js.vjs-layout-x-small .vjs-duration,.video-js.vjs-layout-x-small .vjs-remaining-time,.video-js.vjs-layout-x-small .vjs-playback-rate,.video-js.vjs-layout-x-small .vjs-volume-control,.video-js.vjs-layout-tiny .vjs-current-time,.video-js.vjs-layout-tiny .vjs-time-divider,.video-js.vjs-layout-tiny .vjs-duration,.video-js.vjs-layout-tiny .vjs-remaining-time,.video-js.vjs-layout-tiny .vjs-playback-rate,.video-js.vjs-layout-tiny .vjs-volume-control{display:none}.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover{width:auto;width:initial}.video-js.vjs-layout-x-small .vjs-progress-control,.video-js.vjs-layout-tiny .vjs-progress-control{display:none}.video-js.vjs-layout-x-small .vjs-custom-control-spacer{flex:auto;display:block}.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer{width:auto}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:#2b333fbf;color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-font,.vjs-text-track-settings .vjs-track-settings-controls{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display: grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:focus,.vjs-track-settings-controls button:active{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f 100%)}.vjs-track-settings-controls button:hover{color:#2b333fbf}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f 100%);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>*:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js *:focus:not(.focus-visible){outline:none}.video-js *:focus:not(:focus-visible){outline:none}.netless-window-manager-playground{width:100%;height:100%;position:relative;z-index:1;overflow:hidden;user-select:none}.netless-window-manager-sizer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;overflow:hidden;display:flex}.netless-window-manager-sizer-horizontal{flex-direction:column}.netless-window-manager-sizer:before,.netless-window-manager-sizer:after{flex:1;content:"";display:block}.netless-window-manager-chess-sizer:before,.netless-window-manager-chess-sizer:after{background-image:linear-gradient(45deg,#b0b0b0 25%,transparent 25%),linear-gradient(-45deg,#b0b0b0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#b0b0b0 75%),linear-gradient(-45deg,transparent 75%,#b0b0b0 75%);background-color:#fff;background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px}.netless-window-manager-wrapper{position:relative;z-index:1;width:100%;height:100%;overflow:hidden}.netless-window-manager-main-view{width:100%;height:100%}.netless-window-manager-cursor-pencil-image,.netless-window-manager-cursor-eraser-image{width:26px;height:26px}.netless-window-manager-cursor-selector-image{width:24px;height:24px}.netless-window-manager-cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.netless-window-manager-cursor-selector-avatar img{width:12px}.netless-window-manager-cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.netless-window-manager-cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.netless-window-manager-cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.netless-window-manager-cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:26px;height:26px;z-index:2147483647;left:0;top:0;will-change:transform;transition:transform .12s;transform-origin:0 0;user-select:none;pointer-events:none}.netless-window-manager-cursor-pencil-offset{margin-left:-20px}.netless-window-manager-cursor-selector-offset{margin-left:-22px;margin-top:56px}.netless-window-manager-cursor-text-offset{margin-left:-30px;margin-top:18px}.netless-window-manager-cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.netless-window-manager-cursor-laserPointer-image,.netless-window-manager-cursor-pencilEraser-image{margin-left:-22px;margin-top:3px}.netless-window-manager-laserPointer-pencilEraser-offset{margin-left:-18px}.netless-window-manager-pencilEraser-3-offset{margin-top:-14px;margin-left:-6px}.netless-window-manager-cursor-name{width:100%;height:48px;display:flex;align-items:center;justify-content:center;position:absolute;top:-40px}.cursor-image-wrapper{display:flex;justify-content:center}.telebox-collector{position:absolute;right:10px;bottom:15px}.netless-iframe-brdige-hidden,.netless-window-manager-fullscreen .telebox-titlebar,.netless-window-manager-fullscreen .telebox-max-titlebar-maximized,.netless-window-manager-fullscreen .netless-app-slide-footer,.netless-window-manager-fullscreen .telebox-footer-wrap,.netless-window-manager-fullscreen .telebox-titlebar-wrap{display:none}.tele-fancy-scrollbar{overscroll-behavior:contain;overflow:auto;overflow-y:scroll;overflow-y:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.tele-fancy-scrollbar::-webkit-scrollbar{height:8px;width:8px}.tele-fancy-scrollbar::-webkit-scrollbar-track{background-color:transparent}.tele-fancy-scrollbar::-webkit-scrollbar-thumb{background-color:#444e601a;background-color:transparent;border-radius:4px;transition:background-color .4s}.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb{background-color:#444e601a}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active{background-color:#444e6033}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical{min-height:50px}.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-box{position:absolute;top:0;left:0;z-index:100;transition:width .4s cubic-bezier(.4,.9,.71,1.02),height .4s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .4s ease}.telebox-box-main{position:relative;width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#f9f9fc;box-shadow:0 4px 10px #2f419226;border-radius:6px;border:1px solid #e3e3ec}.telebox-titlebar-wrap{flex-shrink:0;position:relative;z-index:1}.telebox-content-wrap{flex:1;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}.telebox-content{width:100%;height:100%;position:relative}.telebox-footer-wrap{flex-shrink:0;display:flex;flex-direction:column}.telebox-footer-wrap:before{content:"";display:block;flex:1}.telebox-resize-handle{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:absolute;z-index:2147483647}.telebox-n{width:100%;height:5px;left:0;top:-5px;cursor:n-resize}.telebox-s{width:100%;height:5px;left:0;bottom:-5px;cursor:s-resize}.telebox-w{width:5px;height:100%;left:-5px;top:0;cursor:w-resize}.telebox-e{width:5px;height:100%;right:-5px;top:0;cursor:e-resize}.telebox-nw{width:15px;height:15px;top:-5px;left:-5px;cursor:nw-resize}.telebox-ne{width:15px;height:15px;top:-5px;right:-5px;cursor:ne-resize}.telebox-se{width:15px;height:15px;bottom:-5px;right:-5px;cursor:se-resize}.telebox-sw{width:15px;height:15px;bottom:-5px;left:-5px;cursor:sw-resize}.telebox-track-mask{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;position:fixed;top:0;left:0;z-index:2147483647;width:100%;height:100%;background:rgba(0,0,0,.0001);cursor:move}.telebox-cursor-n{cursor:n-resize}.telebox-cursor-s{cursor:s-resize}.telebox-cursor-w{cursor:w-resize}.telebox-cursor-e{cursor:e-resize}.telebox-cursor-nw{cursor:nw-resize}.telebox-cursor-ne{cursor:ne-resize}.telebox-cursor-se{cursor:se-resize}.telebox-cursor-sw{cursor:sw-resize}.telebox-maximized .telebox-resize-handles,.telebox-no-resize .telebox-resize-handles{display:none}.telebox-maximized{box-shadow:none;transition:none}.telebox-minimized{transition:width .05s cubic-bezier(.4,.9,.71,1.02),height .05s cubic-bezier(.55,.82,.63,.95),opacity .6s cubic-bezier(.7,0,.84,0),transform .6s ease;opacity:0;pointer-events:none;user-select:none}.telebox-transforming{will-change:transform;transition:opacity .6s cubic-bezier(.7,0,.84,0)}.telebox-readonly .telebox-resize-handle{cursor:initial!important;pointer-events:none!important}.telebox-color-scheme-dark .telebox-box-main{color:#e9e9e9;background:#212126;border-color:#43434d}.telebox-titlebar{-webkit-touch-callout:none;-webkit-user-select:none;box-sizing:border-box;height:26px;display:flex;align-items:center;background:#fff;user-select:none;border-bottom:1px solid #eeeef7;touch-action:manipulation}.telebox-title-area{padding-left:16px;overflow:hidden;position:relative;height:100%;flex:1;display:flex;align-items:center}.telebox-title{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;overflow:hidden;margin:0;padding:0;font-size:14px;font-weight:400;font-family:PingFangSC-Regular,PingFang SC;white-space:nowrap;word-break:keep-all;text-overflow:ellipsis;color:#191919}.telebox-drag-area{position:absolute;inset:0;margin:auto;z-index:10}.telebox-titlebar-btns{position:absolute;right:16px;white-space:nowrap;word-break:keep-all;margin-left:auto;font-size:0;z-index:10}.telebox-titlebar-btn{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;width:22px;height:22px;padding:0;outline:none;border:none;background:transparent;cursor:pointer}.telebox-titlebar-btn~.telebox-titlebar-btn{margin-left:10px}.telebox-titlebar-btn-icon{width:22px;height:22px}.telebox-readonly .telebox-titlebar-btn{cursor:not-allowed}.telebox-titlebar-icon-minimize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPHBhdGggZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOSAxM2gxMHYxLjZIOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-titlebar-icon-maximize{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.telebox-titlebar-icon-maximize.is-active{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.telebox-titlebar-icon-close{background:center/cover no-repeat url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjQiPgogICAgICAgIDxwYXRoIGQ9Ik04LjM1MyAyMC4zMzIxTDIwLjMzMiA4LjM1M00yMC4zMzIyIDIwLjMzMjFMOC4zNTMgOC4zNTMiIC8+CiAgICA8L2c+Cjwvc3ZnPgo=)}.telebox-color-scheme-dark .telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-collector{-webkit-touch-callout:none;-webkit-user-select:none;visibility:hidden;display:block;position:absolute;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;background:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;pointer-events:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent}.telebox-collector-visible{visibility:visible;pointer-events:initial}.telebox-collector-readonly{cursor:not-allowed}.telebox-color-scheme-dark.telebox-collector{background-color:#43434d}.telebox-max-titlebar{user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;display:none;position:absolute;top:0;left:0;z-index:50000}.telebox-max-titlebar .telebox-title,.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-titles{display:none}.telebox-max-titlebar.telebox-max-titlebar-single-title .telebox-title{display:block}.telebox-max-titlebar-maximized{display:flex}.telebox-titles{height:100%;margin:0;overflow-y:hidden;overflow-x:scroll;overflow-x:overlay;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:auto}.telebox-titles::-webkit-scrollbar{height:8px;width:8px}.telebox-titles::-webkit-scrollbar-track{background-color:transparent}.telebox-titles::-webkit-scrollbar-thumb{background-color:#eeeef7cc;background-color:transparent;border-radius:4px;transition:background-color .4s}.telebox-titles:hover::-webkit-scrollbar-thumb{background-color:#eeeef7cc}.telebox-titles::-webkit-scrollbar-thumb:hover{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:active{background-color:#eeeef7}.telebox-titles::-webkit-scrollbar-thumb:vertical{min-height:50px}.telebox-titles::-webkit-scrollbar-thumb:horizontal{min-width:50px}.telebox-titles-content{height:100%;display:flex;flex-wrap:nowrap;align-items:center;padding:0}.telebox-titles-tab{height:100%;overflow:hidden;max-width:182px;min-width:50px;padding:0 26px 0 16px;outline:none;font-size:13px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;border:none;border-right:1px solid #e5e5f0;color:#7b88a0;background:transparent;cursor:pointer;user-select:none}.telebox-titles-tab-focus{color:#357bf6}.telebox-readonly .telebox-titles-tab{cursor:not-allowed}.telebox-color-scheme-dark{color-scheme:dark}.telebox-color-scheme-dark.telebox-titlebar{color:#e9e9e9;background:#43434d;border-bottom:none}.telebox-color-scheme-dark .telebox-titles-tab{border-right-color:#7b88a0}.telebox-color-scheme-dark .telebox-title{color:#e9e9e9}:root{--text-editor-border-color-unable: rgba(0, 0, 0, .12)}.appliance-plugin-main-view-displayer,.appliance-plugin-app-view-displayer{position:relative;width:100%;height:100%;transform:translateY(-100%);pointer-events:none;z-index:2;box-sizing:content-box}.appliance-plugin-floatbtns{position:absolute;left:3px;transform:translateY(-60px);display:flex;flex-direction:row;align-items:center;background:#fff;border:1px solid #EFEFEF;box-shadow:0 6px 12px #0000001f;border-radius:4px;color-scheme:light;pointer-events:auto;z-index:9}.appliance-plugin-floatbtns .normal-button{width:40px;height:40px;touch-action:none}.appliance-plugin-floatbtns .button{display:flex;justify-content:center;align-items:center;cursor:pointer;border:none}.appliance-plugin-floatbtns .button:hover,.appliance-plugin-floatbtns .button.active{background-color:#eef0f6}.appliance-plugin-floatbtns .shapeOpt-sub-menu,.appliance-plugin-floatbtns .font-style-menu,.appliance-plugin-floatbtns .image-layer-menu,.appliance-plugin-floatbtns .font-colors-menu{box-sizing:border-box;display:flex;flex-wrap:wrap;flex-direction:row;justify-content:flex-start;align-items:center;position:absolute;padding:4px;background:#fff;box-shadow:0 3px 6px #0000001f;border-radius:2px;top:50px;touch-action:none}.appliance-plugin-floatbtns .shapeOpt-sub-menu .normal-button,.appliance-plugin-floatbtns .font-style-menu .normal-button,.appliance-plugin-floatbtns .image-layer-menu .normal-button,.appliance-plugin-floatbtns .font-colors-menu .normal-button{width:32px;height:32px;touch-action:none}.appliance-plugin-floatbtns .font-colors-menu{justify-content:flex-start;width:128px}.appliance-plugin-floatbtns .font-colors-menu .font-color-button{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:4px;width:22px;height:22px;border-radius:50%;border-width:1px;border-style:solid;border-color:#fff;background-image:conic-gradient(rgba(0,0,0,.06) 0 25%,transparent 0 50%,rgba(0,0,0,.06) 0 75%,transparent 0);background-size:6px 6px;box-sizing:border-box}.appliance-plugin-floatbtns .font-colors-menu .font-color-button.active{border-color:#a7a7a7}.appliance-plugin-floatbtns .font-colors-menu .font-color-button .circle{box-sizing:border-box;width:16px;height:16px;border-radius:50%;border:1px solid rgba(0,0,0,.12);touch-action:none}.appliance-plugin-floatbtns .font-colors-menu .font-color-button .none{position:relative;background-color:#fff}.appliance-plugin-floatbtns .font-colors-menu .font-color-button .none:before{content:"";position:absolute;left:50%;width:1px;height:100%;background-color:#0000001f;transform:rotate(45deg)}.appliance-plugin-floatbtns .font-colors-icon{flex-direction:column}.appliance-plugin-floatbtns .font-colors-icon .color-bar{height:2px;width:12px;margin-top:-2px;background-image:conic-gradient(rgba(0,0,0,.06) 0 25%,transparent 0 50%,rgba(0,0,0,.06) 0 75%,transparent 0);background-size:6px 6px}.appliance-plugin-floatbtns .font-colors-icon .color-bar .color-bar-color{width:100%;height:100%}.appliance-plugin-floatbtns .font-colors-icon .color-bar-fill,.appliance-plugin-floatbtns .font-colors-icon .color-bar-ring{height:12px;width:12px;border-radius:6px;border:1px solid rgba(0,0,0,.12);background-image:conic-gradient(rgba(0,0,0,.06) 0 25%,transparent 0 50%,rgba(0,0,0,.06) 0 75%,transparent 0);background-size:6px 6px}.appliance-plugin-floatbtns .font-colors-icon .color-bar-fill .circle,.appliance-plugin-floatbtns .font-colors-icon .color-bar-ring .circle{width:100%;height:100%;border-radius:50%;touch-action:none}.appliance-plugin-floatbtns .font-colors-icon .color-bar-ring{border:0}.appliance-plugin-floatbtns .font-colors-icon .color-bar-ring .circle{transform:translate(35%,30%);width:60%;height:60%;border-radius:50%;background-color:#fff;touch-action:none}.appliance-plugin-floatbtns .font-color-opacity{box-sizing:border-box;width:100px;height:6px;margin:5px 0 10px;border-radius:3px;background-image:conic-gradient(rgba(0,0,0,.06) 0 25%,transparent 0 50%,rgba(0,0,0,.06) 0 75%,transparent 0);background-size:6px 6px;position:relative}.appliance-plugin-floatbtns .font-color-opacity .range-color{height:6px;box-shadow:inset 0 0 1px #00000040;border-radius:4px;inset:0}.appliance-plugin-floatbtns .font-color-opacity .range-opacity{position:absolute;top:0;left:-10px;height:6px;width:120px;touch-action:auto}.appliance-plugin-floatbtns .font-color-opacity .range-opacity .range-opacity-data-icon{position:absolute;top:10px;left:0;width:30px;height:16px;text-align:center;background-color:#333;border-radius:4px;font-size:12px;color:#fff;display:none}.appliance-plugin-floatbtns .font-color-opacity .range-opacity:hover .range-opacity-data-icon{display:block}.appliance-plugin-floatbtns .font-color-opacity .circle{position:absolute;top:-3px;border:2px solid #ffffff;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 1px #00000040,0 0 0 1px #0000000f;width:12px;height:12px;box-sizing:border-box;touch-action:none}.appliance-plugin-floatbtns .font-style-menu{justify-content:space-between;width:128px}.appliance-plugin-floatbtns .font-style-menu .font-style-button{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:4px;width:22px;height:22px;box-sizing:border-box}.appliance-plugin-floatbtns .font-style-menu .font-style-button.active{border-color:#a7a7a7}.appliance-plugin-floatbtns .font-size-barBtn .font-size-input{line-height:20px;height:20px;padding:0 2px;margin-left:2px;width:25px;border:1px solid;border-radius:3px}.appliance-plugin-floatbtns .font-size-barBtn .font-size-input:focus{background:#eef0f6}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns{width:15px;margin-left:3px;display:flex;flex-direction:column;justify-content:center}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-add,.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-cut{position:relative;width:10px;height:10px}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-add:hover,.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-cut:hover{background:#eef0f6}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-add:after,.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-cut:after{content:"";position:absolute;top:0;border:4px solid #999;border-left-color:transparent;border-right-color:transparent}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-add{margin-bottom:3px}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-add:after{border-top-color:transparent}.appliance-plugin-floatbtns .font-size-barBtn .font-size-btns .font-size-cut:after{border-bottom-color:transparent}.appliance-plugin-floatbtns .font-size-barBtn .font-size-menu{position:absolute;top:35px;width:50px;overflow-y:auto;display:flex;flex-direction:column;align-items:center;background:#fff;border:1px solid #EFEFEF;box-shadow:0 6px 12px #0000001f}.appliance-plugin-floatbtns .font-size-barBtn .font-size-menu .font-size-btn{font-size:12px;line-height:20px;width:100%;text-align:center}.appliance-plugin-floatbtns .font-size-barBtn .font-size-menu .font-size-btn:hover{background:#eef0f6}.appliance-plugin-floatbtns .font-size-barBtn:hover{background:#fff}.appliance-plugin-floatbtns .shapeOpt-sub-menu{flex-direction:column;touch-action:none}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-tabs{display:flex;flex-direction:row;justify-content:flex-start;width:100%}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-tabs .tab-button{width:32px;height:24px}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content{flex:1;background-color:#eef0f6;display:flex;flex-direction:column;align-items:baseline;width:100%}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button{flex:1;height:32px;padding:5px 0;cursor:default;display:flex;flex-direction:row;justify-content:flex-start;width:100%}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button img{width:16px;height:16px;margin:0 5px}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number{flex:1;padding:0 3px;height:20px;border:1px solid;border-radius:3px;margin-right:5px;max-width:70px;min-width:40px}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns{width:15px;display:flex;flex-direction:column;justify-content:center}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-add,.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-cut{position:relative;width:10px;height:10px;cursor:pointer}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-add:hover,.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-cut:hover{background:#eef0f6}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-add:after,.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-cut:after{content:"";position:absolute;top:0;border:4px solid #999;border-left-color:transparent;border-right-color:transparent}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-add{margin-bottom:3px}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-add:after{border-top-color:transparent}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .input-number-btns .input-number-cut:after{border-bottom-color:transparent}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .range-number-container{flex:1;box-sizing:border-box;width:100px;height:6px;margin:7px 6px 7px 0;border-radius:3px;background-color:#3381ff;position:relative}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .range-number-container .range-number-color{height:6px;box-shadow:inset 0 0 1px #00000040;border-radius:4px;inset:0}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .range-number-container .range-number{position:absolute;top:0;left:-6px;height:6px;width:112px;cursor:pointer}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .range-number-container .circle{position:absolute;top:-3px;border:2px solid #ffffff;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 1px #00000040,0 0 0 1px #0000000f;width:12px;height:12px;box-sizing:border-box;background-color:#3381ff;touch-action:none}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .select-option-menu{position:absolute;top:60px;left:30px;width:80px;display:flex;flex-direction:column;align-items:center;background:#fff;border:1px solid #EFEFEF;box-shadow:0 6px 12px #0000001f}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .select-option-menu .select-option-btn{font-size:12px;line-height:20px;width:100%;text-align:center}.appliance-plugin-floatbtns .shapeOpt-sub-menu .shapeOpt-sub-menu-content .input-button .select-option-menu .select-option-btn:hover{background:#eef0f6}.appliance-plugin-floatbtns .font-colors-line{width:100%;height:0px;border-bottom:1px dashed #ccc;margin-bottom:3px}.appliance-plugin-floatbtns .stroke-type-box{width:100%;height:15px;display:flex;flex-direction:row;justify-content:space-around;padding-top:8px;cursor:default}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item{box-sizing:content-box;padding-top:2px;width:20px;height:3px;border:0;cursor:pointer;opacity:.3}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item.active{opacity:1}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item.Stroke{margin-top:2px;padding:0;height:3px;border-radius:0 10px}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item.Normal{height:0;border-bottom:3px solid}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item.Dotted{height:0;border-bottom:3px dotted}.appliance-plugin-floatbtns .stroke-type-box .stroke-type-box-item.LongDotted{height:0;border-bottom:3px dashed}.appliance-plugin-fill-scene-snapshot-img{position:absolute;top:50%;left:50%;max-width:100%;max-height:100%;transform:translate(-50%,-50%);pointer-events:none}.index-module__Container__nLsM3{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;outline:none;pointer-events:none;touch-action:none}.index-module__Container__nLsM3 *{touch-action:none}.index-module__Container__nLsM3 .index-module__CanvasBox__j2Xe-{position:relative;width:100%;height:100%;pointer-events:none}.index-module__Container__nLsM3 .index-module__CanvasBox__j2Xe- .index-module__FloatCanvas__d1YR7{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.index-module__Container__nLsM3 .index-module__CanvasBox__j2Xe- .index-module__TopFloatCanvas__7IaCw{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.index-module__Container__nLsM3 .index-module__CanvasBoxSub__hcMeK{position:absolute!important;top:0;left:0;width:100%;height:100%;z-index:1}.index-module__Container__nLsM3 .index-module__SnapshotBox__--eeE{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:-1}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL{position:absolute;top:0;left:0;width:0;height:0;pointer-events:none}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box{position:relative;box-sizing:border-box;width:100%;height:100%;border:1px solid;z-index:1;pointer-events:none}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .point{position:absolute;width:7px;height:7px;transform:translate(-50%,-50%);pointer-events:none}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .point-dot{margin:-1px 0 0 -1px;width:5px;height:5px;border:1px solid;border-radius:3px;background-color:#fff}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LT,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LB{left:0}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LT,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .TC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RT{top:0}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RT,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RB{right:-7px}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RB,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .BC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LB{bottom:-7px}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .RC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .LC{top:50%}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .TC,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .BC{left:50%}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-hightlight-box .lock{pointer-events:none;position:absolute;width:22px;height:22px;top:-11px;left:-11px}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-floatCanvas-box{position:absolute;z-index:1;overflow:hidden}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .appliance-plugin-floatCanvas{width:100%;height:100%}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor-box{position:absolute;touch-action:none}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor-box.readonly{pointer-events:none;border-color:transparent}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor{position:relative;padding:5px;pointer-events:none;font-family:sans-serif;resize:none;z-index:2;white-space:pre;box-sizing:content-box;display:flex;flex-direction:column;align-items:baseline}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor:focus,.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor:focus-visible{outline:none}.index-module__Container__nLsM3 .index-module__FloatBar__cm-EL .editor div{min-width:2px;min-height:inherit}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf{position:absolute;cursor:move;top:0;left:0;width:16px;height:16px;z-index:2;pointer-events:auto}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-btn{position:absolute;left:0;top:0;width:16px;height:16px;border-radius:8px;display:flex;justify-content:center;align-items:center;pointer-events:none}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-btn img{width:12px;height:12px}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-mouse-pointer{position:relative;width:100%;height:100%;opacity:0;pointer-events:none}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-mouse-pointer.active{opacity:1}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-mouse-pointer img{width:100%;height:100%}.index-module__Container__nLsM3 .index-module__RotateBtn__HSSkf .appliance-plugin-rotate-mouse-pointer .angle-icon{position:absolute;top:-16px;left:-16px;width:30px;height:16px;text-align:center;background-color:#333;border-radius:4px;font-size:12px;color:#fff}.index-module__Container__nLsM3 .index-module__ResizeBtn__yjvda{position:absolute;box-sizing:content-box;top:0;width:0;left:0;z-index:1;touch-action:none}.index-module__Container__nLsM3 .index-module__CursorBox__2UHvI{position:absolute;left:0;top:0;z-index:2}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none;overflow:hidden;transform:translateZ(0)}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box{position:absolute;touch-action:none;border:1px dashed transparent}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.none{display:none}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.active{pointer-events:auto}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.active:hover{border-style:solid;cursor:text}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.active .editor{opacity:0;pointer-events:none}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.editing{pointer-events:auto}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.editing .editor{opacity:1;pointer-events:none}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.editing:hover{border-color:var(--text-editor-border-color-unable)!important}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.hover:hover{border-style:solid}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor-box.hover .editor{opacity:1;pointer-events:auto}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor{position:relative;padding:5px;pointer-events:none;font-family:sans-serif;resize:none;z-index:2;white-space:nowrap;box-sizing:content-box;display:flex;flex-direction:column;align-items:baseline}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor:focus,.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor:focus-visible{outline:none}.index-module__Container__nLsM3 .index-module__TextEditorContainer__Qm8KC .editor div{min-width:2px;min-height:inherit}.index-module__Container__nLsM3 .index-module__ResizeTowBox__HOllX{position:absolute;top:0;width:0;left:0}.index-module__Container__nLsM3 .index-module__ResizeTowBox__HOllX .appliance-plugin-point-btn{position:absolute;width:5px;height:5px;border:1px solid;border-radius:3px;transform:translate(-50%,-50%);background-color:#fff;z-index:2}.index-module__Container__nLsM3 .index-module__ResizeTowBox__HOllX .appliance-plugin-point-draggable-btn{position:absolute;width:10px;height:10px;margin-top:-5px;margin-left:-5px;z-index:3;pointer-events:auto;cursor:move;touch-action:none}.index-module__Container__nLsM3 .index-module__FloatBarBtn__FJrOG{position:absolute;pointer-events:none}.cursor-box{color:#fff;padding:4px;border-radius:2px;width:100%;height:100%}.cursor-box .cursor-name-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:80px}.cursor-pencil-image{width:26px;height:26px}.cursor-selector-image{width:24px;height:24px}.cursor-selector-avatar{border-radius:50%;border-style:solid;border-width:2px;border-color:#fff;margin-bottom:2px}.cursor-inner{border-radius:4px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:4px;padding-right:4px;font-size:12px}.cursor-inner-mellow{height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:row;padding-left:16px;padding-right:16px}.cursor-tag-name{font-size:12px;margin-left:4px;padding:2px 8px;border-radius:4px}.cursor-mid{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px}.cursor-shape-offset{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:180px;height:64px;margin-left:-30px;margin-top:12px}.telebox-readonly~.default-app-in-main-view-plugin-app-menu-container{cursor:not-allowed}.default-app-in-main-view-plugin-app-menu-container{position:absolute;right:10px;bottom:15px;display:none;z-index:200;width:40px;height:40px;margin:0;padding:0;border:none;outline:none;font-size:0;border-radius:50%;background-color:#fff;box-shadow:0 2px 6px #2f419226;cursor:pointer;user-select:none;background-repeat:no-repeat;background-size:18px 16px;background-position:center;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxNiI+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxwYXRoIHN0cm9rZT0iIzdCODhBMCIgc3Ryb2tlLXdpZHRoPSIxLjQiIGQ9Ik0uNyAxLjJoMTYuNnYxMy42SC43eiIgLz4KICAgICAgICA8cGF0aCBmaWxsPSIjN0I4OEEwIiBkPSJNNCA1LjVoNnYxLjRINHpNNCA5LjVoMTB2MS40SDR6IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.default-app-in-main-view-plugin-app-menu-container.dark,.default-app-in-main-view-plugin-app-menu-container.dark .default-app-in-main-view-plugin-app-menu-tooltip{background-color:#43434d;color-scheme:dark}.default-app-in-main-view-plugin-app-menu-container.dark .default-app-in-main-view-plugin-app-menu-tooltip .default-app-in-main-view-plugin-app-menu-item{color:#999}.default-app-in-main-view-plugin-app-menu-container.dark .default-app-in-main-view-plugin-app-menu-tooltip .default-app-in-main-view-plugin-app-menu-item:hover{background-color:#383b42}.default-app-in-main-view-plugin-app-menu-container.dark .default-app-in-main-view-plugin-app-menu-tooltip .default-app-in-main-view-plugin-app-menu-item.active{color:#fff}.default-app-in-main-view-plugin-app-menu-badge{position:absolute;right:0;top:0;z-index:1;width:auto;height:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff;background-color:red;border-radius:6px;padding:0 4px;font-size:12px;line-height:12px;text-align:center;transform:scale(.7)}.default-app-in-main-view-plugin-app-menu-tooltip{position:absolute;right:0;bottom:0;transform:translateY(-50px);width:100px;height:auto;display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-end;box-shadow:0 2px 6px #2f419226;border-radius:4px;padding:3px 0;background-color:#fff}.default-app-in-main-view-plugin-app-menu-item{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;padding:0 5px 0 15px;box-sizing:border-box;width:100%;pointer-events:none;color:#999}.default-app-in-main-view-plugin-app-menu-item:hover{background-color:#f0f0f0}.default-app-in-main-view-plugin-app-menu-item.show-all,.default-app-in-main-view-plugin-app-menu-item.hidden-all{padding-left:20px;pointer-events:none;background-size:15%;background-position-y:center;background-position-x:2px;background-repeat:no-repeat}.default-app-in-main-view-plugin-app-menu-item.active{color:#333;pointer-events:auto}.default-app-in-main-view-plugin-app-menu-item.hidden-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjZ2MjZIMHoiIC8+CiAgICAgICAgPHBhdGggaWQ9ImMiIGQ9Ik0yNi44NjkgMEwyOCAxLjEzMVYyNi44N0wyNi44NjkgMjhIMS4xM0wwIDI2Ljg3VjEuMTMxTDEuMTMgMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPgogICAgICAgICAgICA8bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNhIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tNC42NDI5LTQuNjQyOWgzNS4yODU4djM1LjI4NThILTQuNjQyOXoiIG1hc2s9InVybCgjYikiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8bWFzayBpZD0iZCIgZmlsbD0iI2ZmZiI+CiAgICAgICAgICAgICAgICA8dXNlIHhsaW5rOmhyZWY9IiNjIiAvPgogICAgICAgICAgICA8L21hc2s+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0tMTcuNTE2OCAxNEwxNC0xNy41MTY4IDQ1LjUxNjggMTQgMTQgNDUuNTE2OHoiIG1hc2s9InVybCgjZCkiIC8+CiAgICAgICAgPC9nPgogICAgICAgIDxwYXRoIHN0cm9rZT0iI0E3QTdDQSIgc3Ryb2tlLXdpZHRoPSIxLjIiCiAgICAgICAgICAgIGQ9Ik0xMC4wODg2IDIxLjQ4NjV2LTMuNjk2Nkg2LjM5Mk0yMS4zODU1IDEwLjE4OTVoLTMuNjk2NlY2LjQ5M00yMS40MDIgMTcuNzk4M2gtMy42OTY2djMuNjk2Nk0xMC4yNTAzIDYuMTQ5OHYzLjg5ODVINi4zNTE3IiAvPgogICAgPC9nPgo8L3N2Zz4K)}.default-app-in-main-view-plugin-app-menu-item.show-all{border-top:1px solid #ccc;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjggMjgiPgogICAgPGRlZnM+CiAgICAgICAgPHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjh2MjhIMHoiIC8+CiAgICA8L2RlZnM+CiAgICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj4KICAgICAgICAgICAgPHVzZSB4bGluazpocmVmPSIjYSIgLz4KICAgICAgICA8L21hc2s+CiAgICAgICAgPGcgZmlsbD0iI0E3QTdDQSIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIj4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik0yMC40ODEgMTcuMWgxLjJ2NC41ODFIMTcuMXYtMS4yaDMuMzgxVjE3LjF6bS0xNC4xOTA1LS4wMDloMS4ydjMuMzgxaDMuMzgwOXYxLjJoLTQuNTgxdi00LjU4MXpNMTcuMSA2LjE5MDVoNC41ODF2NC41ODA5aC0xLjJ2LTMuMzgxSDE3LjF2LTEuMnptLTEwLjcwMDguMTA4N2g0Ljc5ODV2MS4ySDcuNTk5MnYzLjU5ODVoLTEuMlY2LjI5OTJ6IiAvPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==)}.default-app-in-main-view-plugin-app-menu-item-dot{position:absolute;left:5px;width:4px;height:4px;background-color:red;border-radius:50%;pointer-events:none}.default-app-in-main-view-plugin-app-menu-item-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:20px;text-align:left;height:20px;pointer-events:none}';injectStyle(style_default);const _hoisted_1={class:"box"},_sfc_main=defineComponent({__name:"index",setup(et){const _e=useRoute();return(async()=>{let rt=_e.query.appid,nt=_e.query.uid,st=_e.query.uuid,dt=_e.query.room_token,ft=_e.query.write=="1",ht=await createFastboard({sdkConfig:{appIdentifier:rt,region:"cn-hz"},joinRoom:{uid:nt,uuid:st,roomToken:dt,isWritable:ft},managerConfig:{cursor:!0}}),mt=document.querySelector(".box");createUI(ht,mt)})(),(rt,nt)=>(openBlock(),createElementBlock("div",_hoisted_1))}}),index=_export_sfc(_sfc_main,[["__scopeId","data-v-81fc299f"]]),index$1=Object.freeze(Object.defineProperty({__proto__:null,default:index},Symbol.toStringTag,{value:"Module"}));export{requireReactDom as a,requireEs_promise as b,requireEs_string_match as c,requireEs_string_replace as d,requireEs_string_startsWith as e,requireEs_array_iterator as f,getDefaultExportFromCjs as g,requireWeb_domCollections_iterator as h,requireEs_array_reduce as i,requireEs_string_endsWith as j,requireEs_string_split as k,lodashExports as l,commonjsGlobal as m,requireEs_string_trim as n,requireEs_array_indexOf as o,requireEs_string_includes as p,requireEs_array_reverse as q,requireReact as r,requireEs_regexp_toString as s,index$1 as t,whiteWebSdkExports as w};