@syhr/sy-threed-graph 1.0.0-bate4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,99 @@
1
+ (function(bt,T){typeof exports=="object"&&typeof module!="undefined"?T(exports,require("vue"),require("pinia"),require("lodash-es"),require("three-edit-cores")):typeof define=="function"&&define.amd?define(["exports","vue","pinia","lodash-es","three-edit-cores"],T):(bt=typeof globalThis!="undefined"?globalThis:bt||self,T(bt.SyThreedGraph={},bt.Vue,bt.Pinia,bt._,bt.ThreeEditCores))})(this,function(bt,T,Ft,Ht,Qt){"use strict";var mw=Object.defineProperty,yw=Object.defineProperties;var gw=Object.getOwnPropertyDescriptors;var vo=Object.getOwnPropertySymbols;var xd=Object.prototype.hasOwnProperty,md=Object.prototype.propertyIsEnumerable;var oi=(bt,T)=>(T=Symbol[bt])?T:Symbol.for("Symbol."+bt),vw=bt=>{throw TypeError(bt)},yd=Math.pow,wc=(bt,T,Ft)=>T in bt?mw(bt,T,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):bt[T]=Ft,Ut=(bt,T)=>{for(var Ft in T||(T={}))xd.call(T,Ft)&&wc(bt,Ft,T[Ft]);if(vo)for(var Ft of vo(T))md.call(T,Ft)&&wc(bt,Ft,T[Ft]);return bt},tr=(bt,T)=>yw(bt,gw(T));var gd=(bt,T)=>{var Ft={};for(var Ht in bt)xd.call(bt,Ht)&&T.indexOf(Ht)<0&&(Ft[Ht]=bt[Ht]);if(bt!=null&&vo)for(var Ht of vo(bt))T.indexOf(Ht)<0&&md.call(bt,Ht)&&(Ft[Ht]=bt[Ht]);return Ft};var xn=(bt,T,Ft)=>wc(bt,typeof T!="symbol"?T+"":T,Ft);var _t=(bt,T,Ft)=>new Promise((Ht,Qt)=>{var Gt=te=>{try{ie(Ft.next(te))}catch(ue){Qt(ue)}},yt=te=>{try{ie(Ft.throw(te))}catch(ue){Qt(ue)}},ie=te=>te.done?Ht(te.value):Promise.resolve(te.value).then(Gt,yt);ie((Ft=Ft.apply(bt,T)).next())}),mn=function(bt,T){this[0]=bt,this[1]=T},bc=(bt,T,Ft)=>{var Ht=(yt,ie,te,ue)=>{try{var wo=Ft[yt](ie),bo=(ie=wo.value)instanceof mn,Ji=wo.done;Promise.resolve(bo?ie[0]:ie).then(Oe=>bo?Ht(yt==="return"?yt:"next",ie[1]?{done:Oe.done,value:Oe.value}:Oe,te,ue):te({value:Oe,done:Ji})).catch(Oe=>Ht("throw",Oe,te,ue))}catch(Oe){ue(Oe)}},Qt=yt=>Gt[yt]=ie=>new Promise((te,ue)=>Ht(yt,ie,te,ue)),Gt={};return Ft=Ft.apply(bt,T),Gt[oi("asyncIterator")]=()=>Gt,Qt("next"),Qt("throw"),Qt("return"),Gt},Ec=bt=>{var T=bt[oi("asyncIterator")],Ft=!1,Ht,Qt={};return T==null?(T=bt[oi("iterator")](),Ht=Gt=>Qt[Gt]=yt=>T[Gt](yt)):(T=T.call(bt),Ht=Gt=>Qt[Gt]=yt=>{if(Ft){if(Ft=!1,Gt==="throw")throw yt;return yt}return Ft=!0,{done:!1,value:new mn(new Promise(ie=>{var te=T[Gt](yt);te instanceof Object||vw("Object expected"),ie(te)}),1)}}),Qt[oi("iterator")]=()=>Qt,Ht("next"),"throw"in T?Ht("throw"):Qt.throw=Gt=>{throw Gt},"return"in T&&Ht("return"),Qt},vd=(bt,T,Ft)=>(T=bt[oi("asyncIterator")])?T.call(bt):(bt=bt[oi("iterator")](),T={},Ft=(Ht,Qt)=>(Qt=bt[Ht])&&(T[Ht]=Gt=>new Promise((yt,ie,te)=>(Gt=Qt.call(bt,Gt),te=Gt.done,Promise.resolve(Gt.value).then(ue=>yt({value:ue,done:te}),ie)))),Ft("next"),Ft("return"),T);var td,ed,rd,nd,id,sd,od,ad,cd,ld,ud,hd,fd,dd,pd;var Gt=document.createElement("style");Gt.textContent=`@charset "UTF-8";.threed-editor[data-v-65e621f7]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sc-bg-color)}.threed-preview[data-v-a0197fe6]{width:100%;height:100%}
2
+ /*$vite$:1*/`,document.head.appendChild(Gt);var yt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ie(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function te(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var ue=TypeError;const Ji=te(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Oe=typeof Map=="function"&&Map.prototype,Eo=Object.getOwnPropertyDescriptor&&Oe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Zi=Oe&&Eo&&typeof Eo.get=="function"?Eo.get:null,Ac=Oe&&Map.prototype.forEach,Ao=typeof Set=="function"&&Set.prototype,_o=Object.getOwnPropertyDescriptor&&Ao?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Qi=Ao&&_o&&typeof _o.get=="function"?_o.get:null,_c=Ao&&Set.prototype.forEach,Ed=typeof WeakMap=="function"&&WeakMap.prototype,ai=Ed?WeakMap.prototype.has:null,Ad=typeof WeakSet=="function"&&WeakSet.prototype,ci=Ad?WeakSet.prototype.has:null,_d=typeof WeakRef=="function"&&WeakRef.prototype,Sc=_d?WeakRef.prototype.deref:null,Sd=Boolean.prototype.valueOf,Cd=Object.prototype.toString,Bd=Function.prototype.toString,Fd=String.prototype.match,So=String.prototype.slice,Br=String.prototype.replace,Dd=String.prototype.toUpperCase,Cc=String.prototype.toLowerCase,Bc=RegExp.prototype.test,Fc=Array.prototype.concat,er=Array.prototype.join,Md=Array.prototype.slice,Dc=Math.floor,Co=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Bo=Object.getOwnPropertySymbols,Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,yn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",li=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===yn||!0)?Symbol.toStringTag:null,Mc=Object.prototype.propertyIsEnumerable,Ic=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Tc(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Bc.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-Dc(-n):Dc(n);if(r!==n){var i=String(r),s=So.call(t,i.length+1);return Br.call(i,e,"$&_")+"."+Br.call(Br.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Br.call(t,e,"$&_")}var Do=Ji,Rc=Do.custom,Oc=Nc(Rc)?Rc:null,Pc={__proto__:null,double:'"',single:"'"},Id={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},ts=function n(t,e,r,i){var s=e||{};if(xr(s,"quoteStyle")&&!xr(Pc,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xr(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=xr(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(xr(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(xr(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Uc(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return a?Tc(t,u):u}if(typeof t=="bigint"){var c=String(t)+"n";return a?Tc(t,c):c}var l=typeof s.depth=="undefined"?5:s.depth;if(typeof r=="undefined"&&(r=0),r>=l&&l>0&&typeof t=="object")return Mo(t)?"[Array]":"[Object]";var f=Yd(s,r);if(typeof i=="undefined")i=[];else if(Lc(i,t)>=0)return"[Circular]";function h(j,K,V){if(K&&(i=Md.call(i),i.push(K)),V){var J={depth:s.depth};return xr(s,"quoteStyle")&&(J.quoteStyle=s.quoteStyle),n(j,J,r+1,i)}return n(j,s,r+1,i)}if(typeof t=="function"&&!kc(t)){var x=Ud(t),p=es(t,h);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(p.length>0?" { "+er.call(p,", ")+" }":"")}if(Nc(t)){var y=yn?Br.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Fo.call(t);return typeof t=="object"&&!yn?ui(y):y}if(jd(t)){for(var g="<"+Cc.call(String(t.nodeName)),E=t.attributes||[],A=0;A<E.length;A++)g+=" "+E[A].name+"="+zc(Td(E[A].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+Cc.call(String(t.nodeName))+">",g}if(Mo(t)){if(t.length===0)return"[]";var b=es(t,h);return f&&!Xd(b)?"["+To(b,f)+"]":"[ "+er.call(b,", ")+" ]"}if(Od(t)){var _=es(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!Mc.call(t,"cause")?"{ ["+String(t)+"] "+er.call(Fc.call("[cause]: "+h(t.cause),_),", ")+" }":_.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+er.call(_,", ")+" }"}if(typeof t=="object"&&o){if(Oc&&typeof t[Oc]=="function"&&Do)return Do(t,{depth:l-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($d(t)){var S=[];return Ac&&Ac.call(t,function(j,K){S.push(h(K,t,!0)+" => "+h(j,t))}),$c("Map",Zi.call(t),S,f)}if(Wd(t)){var I=[];return _c&&_c.call(t,function(j){I.push(h(j,t))}),$c("Set",Qi.call(t),I,f)}if(Hd(t))return Io("WeakMap");if(Vd(t))return Io("WeakSet");if(qd(t))return Io("WeakRef");if(zd(t))return ui(h(Number(t)));if(Nd(t))return ui(h(Co.call(t)));if(kd(t))return ui(Sd.call(t));if(Pd(t))return ui(h(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof yt!="undefined"&&t===yt)return"{ [object globalThis] }";if(!Rd(t)&&!kc(t)){var R=es(t,h),z=Ic?Ic(t)===Object.prototype:t instanceof Object||t.constructor===Object,X=t instanceof Object?"":"null prototype",O=!z&&li&&Object(t)===t&&li in t?So.call(Fr(t),8,-1):X?"Object":"",P=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",q=P+(O||X?"["+er.call(Fc.call([],O||[],X||[]),": ")+"] ":"");return R.length===0?q+"{}":f?q+"{"+To(R,f)+"}":q+"{ "+er.call(R,", ")+" }"}return String(t)};function zc(n,t,e){var r=e.quoteStyle||t,i=Pc[r];return i+n+i}function Td(n){return Br.call(String(n),/"/g,"&quot;")}function qr(n){return!li||!(typeof n=="object"&&(li in n||typeof n[li]!="undefined"))}function Mo(n){return Fr(n)==="[object Array]"&&qr(n)}function Rd(n){return Fr(n)==="[object Date]"&&qr(n)}function kc(n){return Fr(n)==="[object RegExp]"&&qr(n)}function Od(n){return Fr(n)==="[object Error]"&&qr(n)}function Pd(n){return Fr(n)==="[object String]"&&qr(n)}function zd(n){return Fr(n)==="[object Number]"&&qr(n)}function kd(n){return Fr(n)==="[object Boolean]"&&qr(n)}function Nc(n){if(yn)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!Fo)return!1;try{return Fo.call(n),!0}catch(t){}return!1}function Nd(n){if(!n||typeof n!="object"||!Co)return!1;try{return Co.call(n),!0}catch(t){}return!1}var Ld=Object.prototype.hasOwnProperty||function(n){return n in this};function xr(n,t){return Ld.call(n,t)}function Fr(n){return Cd.call(n)}function Ud(n){if(n.name)return n.name;var t=Fd.call(Bd.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function Lc(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1}function $d(n){if(!Zi||!n||typeof n!="object")return!1;try{Zi.call(n);try{Qi.call(n)}catch(t){return!0}return n instanceof Map}catch(t){}return!1}function Hd(n){if(!ai||!n||typeof n!="object")return!1;try{ai.call(n,ai);try{ci.call(n,ci)}catch(t){return!0}return n instanceof WeakMap}catch(t){}return!1}function qd(n){if(!Sc||!n||typeof n!="object")return!1;try{return Sc.call(n),!0}catch(t){}return!1}function Wd(n){if(!Qi||!n||typeof n!="object")return!1;try{Qi.call(n);try{Zi.call(n)}catch(t){return!0}return n instanceof Set}catch(t){}return!1}function Vd(n){if(!ci||!n||typeof n!="object")return!1;try{ci.call(n,ci);try{ai.call(n,ai)}catch(t){return!0}return n instanceof WeakSet}catch(t){}return!1}function jd(n){return!n||typeof n!="object"?!1:typeof HTMLElement!="undefined"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function Uc(n,t){if(n.length>t.maxStringLength){var e=n.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return Uc(So.call(n,0,t.maxStringLength),t)+r}var i=Id[t.quoteStyle||"single"];i.lastIndex=0;var s=Br.call(Br.call(n,i,"\\$1"),/[\x00-\x1f]/g,Gd);return zc(s,"single",t)}function Gd(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+Dd.call(t.toString(16))}function ui(n){return"Object("+n+")"}function Io(n){return n+" { ? }"}function $c(n,t,e,r){var i=r?To(e,r):er.call(e,", ");return n+" ("+t+") {"+i+"}"}function Xd(n){for(var t=0;t<n.length;t++)if(Lc(n[t],`
3
+ `)>=0)return!1;return!0}function Yd(n,t){var e;if(n.indent===" ")e=" ";else if(typeof n.indent=="number"&&n.indent>0)e=er.call(Array(n.indent+1)," ");else return null;return{base:e,prev:er.call(Array(t+1),e)}}function To(n,t){if(n.length===0)return"";var e=`
4
+ `+t.prev+t.base;return e+er.call(n,","+e)+`
5
+ `+t.prev}function es(n,t){var e=Mo(n),r=[];if(e){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=xr(n,i)?t(n[i],n):""}var s=typeof Bo=="function"?Bo(n):[],o;if(yn){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var u in n)xr(n,u)&&(e&&String(Number(u))===u&&u<n.length||yn&&o["$"+u]instanceof Symbol||(Bc.call(/[^\w$]/,u)?r.push(t(u,n)+": "+t(n[u],n)):r.push(u+": "+t(n[u],n))));if(typeof Bo=="function")for(var c=0;c<s.length;c++)Mc.call(n,s[c])&&r.push("["+t(s[c])+"]: "+t(n[s[c]],n));return r}var Kd=ts,Jd=ue,rs=function(n,t,e){for(var r=n,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,e||(i.next=n.next,n.next=i),i},Zd=function(n,t){if(n){var e=rs(n,t);return e&&e.value}},Qd=function(n,t,e){var r=rs(n,t);r?r.value=e:n.next={key:t,next:n.next,value:e}},tp=function(n,t){return n?!!rs(n,t):!1},ep=function(n,t){if(n)return rs(n,t,!0)},rp=function(){var t,e={assert:function(r){if(!e.has(r))throw new Jd("Side channel does not contain "+Kd(r))},delete:function(r){var i=t&&t.next,s=ep(t,r);return s&&i&&i===s&&(t=void 0),!!s},get:function(r){return Zd(t,r)},has:function(r){return tp(t,r)},set:function(r,i){t||(t={next:void 0}),Qd(t,r,i)}};return e},Hc=Object,np=Error,ip=EvalError,sp=RangeError,op=ReferenceError,ap=SyntaxError,cp=URIError,lp=Math.abs,up=Math.floor,hp=Math.max,fp=Math.min,dp=Math.pow,pp=Math.round,xp=Number.isNaN||function(t){return t!==t},mp=xp,yp=function(t){return mp(t)||t===0?t:t<0?-1:1},gp=Object.getOwnPropertyDescriptor,ns=gp;if(ns)try{ns([],"length")}catch(n){ns=null}var qc=ns,is=Object.defineProperty||!1;if(is)try{is({},"a",{value:1})}catch(n){is=!1}var vp=is,Ro,Wc;function wp(){return Wc||(Wc=1,Ro=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==i||a.enumerable!==!0)return!1}return!0}),Ro}var Oo,Vc;function bp(){if(Vc)return Oo;Vc=1;var n=typeof Symbol!="undefined"&&Symbol,t=wp();return Oo=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Oo}var Po,jc;function Gc(){return jc||(jc=1,Po=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),Po}var zo,Xc;function Yc(){if(Xc)return zo;Xc=1;var n=Hc;return zo=n.getPrototypeOf||null,zo}var ko,Kc;function Ep(){if(Kc)return ko;Kc=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(u,c){for(var l=[],f=0;f<u.length;f+=1)l[f]=u[f];for(var h=0;h<c.length;h+=1)l[h+u.length]=c[h];return l},s=function(u,c){for(var l=[],f=c,h=0;f<u.length;f+=1,h+=1)l[h]=u[f];return l},o=function(a,u){for(var c="",l=0;l<a.length;l+=1)c+=a[l],l+1<a.length&&(c+=u);return c};return ko=function(u){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(n+c);for(var l=s(arguments,1),f,h=function(){if(this instanceof f){var E=c.apply(this,i(l,arguments));return Object(E)===E?E:this}return c.apply(u,i(l,arguments))},x=e(0,c.length-l.length),p=[],y=0;y<x;y++)p[y]="$"+y;if(f=Function("binder","return function ("+o(p,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var g=function(){};g.prototype=c.prototype,f.prototype=new g,g.prototype=null}return f},ko}var No,Jc;function ss(){if(Jc)return No;Jc=1;var n=Ep();return No=Function.prototype.bind||n,No}var Lo,Zc;function Uo(){return Zc||(Zc=1,Lo=Function.prototype.call),Lo}var $o,Qc;function tl(){return Qc||(Qc=1,$o=Function.prototype.apply),$o}var Ap=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,_p=ss(),Sp=tl(),Cp=Uo(),Bp=Ap,Fp=Bp||_p.call(Cp,Sp),Dp=ss(),Mp=ue,Ip=Uo(),Tp=Fp,el=function(t){if(t.length<1||typeof t[0]!="function")throw new Mp("a function is required");return Tp(Dp,Ip,t)},Ho,rl;function Rp(){if(rl)return Ho;rl=1;var n=el,t=qc,e;try{e=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return Ho=r&&typeof r.get=="function"?n([r.get]):typeof s=="function"?function(a){return s(a==null?a:i(a))}:!1,Ho}var qo,nl;function Op(){if(nl)return qo;nl=1;var n=Gc(),t=Yc(),e=Rp();return qo=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,qo}var Wo,il;function Pp(){if(il)return Wo;il=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=ss();return Wo=e.call(n,t),Wo}var Dt,zp=Hc,kp=np,Np=ip,Lp=sp,Up=op,gn=ap,vn=ue,$p=cp,Hp=lp,qp=up,Wp=hp,Vp=fp,jp=dp,Gp=pp,Xp=yp,sl=Function,Vo=function(n){try{return sl('"use strict"; return ('+n+").constructor;")()}catch(t){}},hi=qc,Yp=vp,jo=function(){throw new vn},Kp=hi?function(){try{return arguments.callee,jo}catch(n){try{return hi(arguments,"callee").get}catch(t){return jo}}}():jo,wn=bp()(),he=Op(),Jp=Yc(),Zp=Gc(),ol=tl(),fi=Uo(),bn={},Qp=typeof Uint8Array=="undefined"||!he?Dt:he(Uint8Array),Wr={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Dt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Dt:ArrayBuffer,"%ArrayIteratorPrototype%":wn&&he?he([][Symbol.iterator]()):Dt,"%AsyncFromSyncIteratorPrototype%":Dt,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics=="undefined"?Dt:Atomics,"%BigInt%":typeof BigInt=="undefined"?Dt:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Dt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Dt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Dt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":kp,"%eval%":eval,"%EvalError%":Np,"%Float16Array%":typeof Float16Array=="undefined"?Dt:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Dt:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Dt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Dt:FinalizationRegistry,"%Function%":sl,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array=="undefined"?Dt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Dt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Dt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wn&&he?he(he([][Symbol.iterator]())):Dt,"%JSON%":typeof JSON=="object"?JSON:Dt,"%Map%":typeof Map=="undefined"?Dt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!wn||!he?Dt:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":zp,"%Object.getOwnPropertyDescriptor%":hi,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Dt:Promise,"%Proxy%":typeof Proxy=="undefined"?Dt:Proxy,"%RangeError%":Lp,"%ReferenceError%":Up,"%Reflect%":typeof Reflect=="undefined"?Dt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Dt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!wn||!he?Dt:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Dt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wn&&he?he(""[Symbol.iterator]()):Dt,"%Symbol%":wn?Symbol:Dt,"%SyntaxError%":gn,"%ThrowTypeError%":Kp,"%TypedArray%":Qp,"%TypeError%":vn,"%Uint8Array%":typeof Uint8Array=="undefined"?Dt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Dt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Dt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Dt:Uint32Array,"%URIError%":$p,"%WeakMap%":typeof WeakMap=="undefined"?Dt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Dt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Dt:WeakSet,"%Function.prototype.call%":fi,"%Function.prototype.apply%":ol,"%Object.defineProperty%":Yp,"%Object.getPrototypeOf%":Jp,"%Math.abs%":Hp,"%Math.floor%":qp,"%Math.max%":Wp,"%Math.min%":Vp,"%Math.pow%":jp,"%Math.round%":Gp,"%Math.sign%":Xp,"%Reflect.getPrototypeOf%":Zp};if(he)try{null.error}catch(n){var tx=he(he(n));Wr["%Error.prototype%"]=tx}var ex=function n(t){var e;if(t==="%AsyncFunction%")e=Vo("async function () {}");else if(t==="%GeneratorFunction%")e=Vo("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Vo("async function* () {}");else if(t==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(e=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&he&&(e=he(i.prototype))}return Wr[t]=e,e},al={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},di=ss(),os=Pp(),rx=di.call(fi,Array.prototype.concat),nx=di.call(ol,Array.prototype.splice),cl=di.call(fi,String.prototype.replace),as=di.call(fi,String.prototype.slice),ix=di.call(fi,RegExp.prototype.exec),sx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ox=/\\(\\)?/g,ax=function(t){var e=as(t,0,1),r=as(t,-1);if(e==="%"&&r!=="%")throw new gn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&e!=="%")throw new gn("invalid intrinsic syntax, expected opening `%`");var i=[];return cl(t,sx,function(s,o,a,u){i[i.length]=a?cl(u,ox,"$1"):o||s}),i},cx=function(t,e){var r=t,i;if(os(al,r)&&(i=al[r],r="%"+i[0]+"%"),os(Wr,r)){var s=Wr[r];if(s===bn&&(s=ex(r)),typeof s=="undefined"&&!e)throw new vn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new gn("intrinsic "+t+" does not exist!")},Go=function(t,e){if(typeof t!="string"||t.length===0)throw new vn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new vn('"allowMissing" argument must be a boolean');if(ix(/^%?[^%]*%?$/,t)===null)throw new gn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ax(t),i=r.length>0?r[0]:"",s=cx("%"+i+"%",e),o=s.name,a=s.value,u=!1,c=s.alias;c&&(i=c[0],nx(r,rx([0,1],c)));for(var l=1,f=!0;l<r.length;l+=1){var h=r[l],x=as(h,0,1),p=as(h,-1);if((x==='"'||x==="'"||x==="`"||p==='"'||p==="'"||p==="`")&&x!==p)throw new gn("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(u=!0),i+="."+h,o="%"+i+"%",os(Wr,o))a=Wr[o];else if(a!=null){if(!(h in a)){if(!e)throw new vn("base intrinsic for "+t+" exists, but the property is not available.");return}if(hi&&l+1>=r.length){var y=hi(a,h);f=!!y,f&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[h]}else f=os(a,h),a=a[h];f&&!u&&(Wr[o]=a)}}return a},ll=Go,ul=el,lx=ul([ll("%String.prototype.indexOf%")]),hl=function(t,e){var r=ll(t,!!e);return typeof r=="function"&&lx(t,".prototype.")>-1?ul([r]):r},ux=Go,pi=hl,hx=ts,fx=ue,fl=ux("%Map%",!0),dx=pi("Map.prototype.get",!0),px=pi("Map.prototype.set",!0),xx=pi("Map.prototype.has",!0),mx=pi("Map.prototype.delete",!0),yx=pi("Map.prototype.size",!0),dl=!!fl&&function(){var t,e={assert:function(r){if(!e.has(r))throw new fx("Side channel does not contain "+hx(r))},delete:function(r){if(t){var i=mx(t,r);return yx(t)===0&&(t=void 0),i}return!1},get:function(r){if(t)return dx(t,r)},has:function(r){return t?xx(t,r):!1},set:function(r,i){t||(t=new fl),px(t,r,i)}};return e},gx=Go,cs=hl,vx=ts,ls=dl,wx=ue,En=gx("%WeakMap%",!0),bx=cs("WeakMap.prototype.get",!0),Ex=cs("WeakMap.prototype.set",!0),Ax=cs("WeakMap.prototype.has",!0),_x=cs("WeakMap.prototype.delete",!0),Sx=En?function(){var t,e,r={assert:function(i){if(!r.has(i))throw new wx("Side channel does not contain "+vx(i))},delete:function(i){if(En&&i&&(typeof i=="object"||typeof i=="function")){if(t)return _x(t,i)}else if(ls&&e)return e.delete(i);return!1},get:function(i){return En&&i&&(typeof i=="object"||typeof i=="function")&&t?bx(t,i):e&&e.get(i)},has:function(i){return En&&i&&(typeof i=="object"||typeof i=="function")&&t?Ax(t,i):!!e&&e.has(i)},set:function(i,s){En&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new En),Ex(t,i,s)):ls&&(e||(e=ls()),e.set(i,s))}};return r}:ls,Cx=ue,Bx=ts,Fx=rp,Dx=dl,Mx=Sx,Ix=Mx||Dx||Fx,pl=function(){var t,e={assert:function(r){if(!e.has(r))throw new Cx("Side channel does not contain "+Bx(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,i){t||(t=Ix()),t.set(r,i)}};return e},Tx=String.prototype.replace,Rx=/%20/g,Xo={RFC1738:"RFC1738",RFC3986:"RFC3986"},Yo={default:Xo.RFC3986,formatters:{RFC1738:function(n){return Tx.call(n,Rx,"+")},RFC3986:function(n){return String(n)}},RFC1738:Xo.RFC1738,RFC3986:Xo.RFC3986},Ox=Yo,Px=pl,Ko=Object.prototype.hasOwnProperty,Vr=Array.isArray,us=Px(),An=function(t,e){return us.set(t,e),t},jr=function(t){return us.has(t)},xi=function(t){return us.get(t)},Jo=function(t,e){us.set(t,e)},rr=function(){for(var n=[],t=0;t<256;++t)n[n.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return n}(),zx=function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(Vr(r)){for(var i=[],s=0;s<r.length;++s)typeof r[s]!="undefined"&&(i[i.length]=r[s]);e.obj[e.prop]=i}}},mi=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},i=0;i<t.length;++i)typeof t[i]!="undefined"&&(r[i]=t[i]);return r},kx=function n(t,e,r){if(!e)return t;if(typeof e!="object"&&typeof e!="function"){if(Vr(t)){var i=t.length;if(r&&typeof r.arrayLimit=="number"&&i>r.arrayLimit)return An(mi(t.concat(e),r),i);t[i]=e}else if(t&&typeof t=="object")if(jr(t)){var s=xi(t)+1;t[s]=e,Jo(t,s)}else{if(r&&r.strictMerge)return[t,e];(r&&(r.plainObjects||r.allowPrototypes)||!Ko.call(Object.prototype,e))&&(t[e]=!0)}else return[t,e];return t}if(!t||typeof t!="object"){if(jr(e)){for(var o=Object.keys(e),a=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},u=0;u<o.length;u++){var c=parseInt(o[u],10);a[c+1]=e[o[u]]}return An(a,xi(e)+1)}var l=[t].concat(e);return r&&typeof r.arrayLimit=="number"&&l.length>r.arrayLimit?An(mi(l,r),l.length-1):l}var f=t;return Vr(t)&&!Vr(e)&&(f=mi(t,r)),Vr(t)&&Vr(e)?(e.forEach(function(h,x){if(Ko.call(t,x)){var p=t[x];p&&typeof p=="object"&&h&&typeof h=="object"?t[x]=n(p,h,r):t[t.length]=h}else t[x]=h}),t):Object.keys(e).reduce(function(h,x){var p=e[x];if(Ko.call(h,x)?h[x]=n(h[x],p,r):h[x]=p,jr(e)&&!jr(h)&&An(h,xi(e)),jr(h)){var y=parseInt(x,10);String(y)===x&&y>=0&&y>xi(h)&&Jo(h,y)}return h},f)},Nx=function(t,e){return Object.keys(e).reduce(function(r,i){return r[i]=e[i],r},t)},Lx=function(n,t,e){var r=n.replace(/\+/g," ");if(e==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},Zo=1024,Ux=function(t,e,r,i,s){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(x){return"%26%23"+parseInt(x.slice(2),16)+"%3B"});for(var a="",u=0;u<o.length;u+=Zo){for(var c=o.length>=Zo?o.slice(u,u+Zo):o,l=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===Ox.RFC1738&&(h===40||h===41)){l[l.length]=c.charAt(f);continue}if(h<128){l[l.length]=rr[h];continue}if(h<2048){l[l.length]=rr[192|h>>6]+rr[128|h&63];continue}if(h<55296||h>=57344){l[l.length]=rr[224|h>>12]+rr[128|h>>6&63]+rr[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),l[l.length]=rr[240|h>>18]+rr[128|h>>12&63]+rr[128|h>>6&63]+rr[128|h&63]}a+=l.join("")}return a},$x=function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],i=0;i<e.length;++i)for(var s=e[i],o=s.obj[s.prop],a=Object.keys(o),u=0;u<a.length;++u){var c=a[u],l=o[c];typeof l=="object"&&l!==null&&r.indexOf(l)===-1&&(e[e.length]={obj:o,prop:c},r[r.length]=l)}return zx(e),t},Hx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},qx=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Wx=function(t,e,r,i){if(jr(t)){var s=xi(t)+1;return t[s]=e,Jo(t,s),t}var o=[].concat(t,e);return o.length>r?An(mi(o,{plainObjects:i}),o.length-1):o},Vx=function(t,e){if(Vr(t)){for(var r=[],i=0;i<t.length;i+=1)r[r.length]=e(t[i]);return r}return e(t)},xl={arrayToObject:mi,assign:Nx,combine:Wx,compact:$x,decode:Lx,encode:Ux,isBuffer:qx,isOverflow:jr,isRegExp:Hx,markOverflow:An,maybeMap:Vx,merge:kx},ml=pl,hs=xl,yi=Yo,jx=Object.prototype.hasOwnProperty,yl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},nr=Array.isArray,Gx=Array.prototype.push,gl=function(n,t){Gx.apply(n,nr(t)?t:[t])},Xx=Date.prototype.toISOString,vl=yi.default,se={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:hs.encode,encodeValuesOnly:!1,filter:void 0,format:vl,formatter:yi.formatters[vl],indices:!1,serializeDate:function(t){return Xx.call(t)},skipNulls:!1,strictNullHandling:!1},Yx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Qo={},Kx=function n(t,e,r,i,s,o,a,u,c,l,f,h,x,p,y,g,E,A){for(var b=t,_=A,S=0,I=!1;(_=_.get(Qo))!==void 0&&!I;){var R=_.get(t);if(S+=1,typeof R!="undefined"){if(R===S)throw new RangeError("Cyclic object value");I=!0}typeof _.get(Qo)=="undefined"&&(S=0)}if(typeof l=="function"?b=l(e,b):b instanceof Date?b=x(b):r==="comma"&&nr(b)&&(b=hs.maybeMap(b,function(at){return at instanceof Date?x(at):at})),b===null){if(o)return c&&!g?c(e,se.encoder,E,"key",p):e;b=""}if(Yx(b)||hs.isBuffer(b)){if(c){var z=g?e:c(e,se.encoder,E,"key",p);return[y(z)+"="+y(c(b,se.encoder,E,"value",p))]}return[y(e)+"="+y(String(b))]}var X=[];if(typeof b=="undefined")return X;var O;if(r==="comma"&&nr(b))g&&c&&(b=hs.maybeMap(b,c)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(nr(l))O=l;else{var P=Object.keys(b);O=f?P.sort(f):P}var q=u?String(e).replace(/\./g,"%2E"):String(e),j=i&&nr(b)&&b.length===1?q+"[]":q;if(s&&nr(b)&&b.length===0)return j+"[]";for(var K=0;K<O.length;++K){var V=O[K],J=typeof V=="object"&&V&&typeof V.value!="undefined"?V.value:b[V];if(!(a&&J===null)){var ot=h&&u?String(V).replace(/\./g,"%2E"):String(V),rt=nr(b)?typeof r=="function"?r(j,ot):j:j+(h?"."+ot:"["+ot+"]");A.set(t,S);var lt=ml();lt.set(Qo,A),gl(X,n(J,rt,r,i,s,o,a,u,r==="comma"&&g&&nr(b)?null:c,l,f,h,x,p,y,g,E,lt))}}return X},Jx=function(t){if(!t)return se;if(typeof t.allowEmptyArrays!="undefined"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys!="undefined"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder!="undefined"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var e=t.charset||se.charset;if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=yi.default;if(typeof t.format!="undefined"){if(!jx.call(yi.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=yi.formatters[r],s=se.filter;(typeof t.filter=="function"||nr(t.filter))&&(s=t.filter);var o;if(t.arrayFormat in yl?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=se.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots=="undefined"?t.encodeDotInKeys===!0?!0:se.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:se.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:se.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:se.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter=="undefined"?se.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:se.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:se.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:se.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:se.encodeValuesOnly,filter:s,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:se.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:se.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:se.strictNullHandling}},Zx=function(n,t){var e=n,r=Jx(t),i,s;typeof r.filter=="function"?(s=r.filter,e=s("",e)):nr(r.filter)&&(s=r.filter,i=s);var o=[];if(typeof e!="object"||e===null)return"";var a=yl[r.arrayFormat],u=a==="comma"&&r.commaRoundTrip;i||(i=Object.keys(e)),r.sort&&i.sort(r.sort);for(var c=ml(),l=0;l<i.length;++l){var f=i[l],h=e[f];r.skipNulls&&h===null||gl(o,Kx(h,f,a,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var x=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),x.length>0?p+x:""},ir=xl,fs=Object.prototype.hasOwnProperty,ta=Array.isArray,Xt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ir.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},Qx=function(n){return n.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},wl=function(n,t,e){if(n&&typeof n=="string"&&t.comma&&n.indexOf(",")>-1)return n.split(",");if(t.throwOnLimitExceeded&&e>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return n},t1="utf8=%26%2310003%3B",e1="utf8=%E2%9C%93",r1=function(t,e){var r={__proto__:null},i=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=e.parameterLimit===1/0?void 0:e.parameterLimit,o=i.split(e.delimiter,e.throwOnLimitExceeded&&typeof s!="undefined"?s+1:s);if(e.throwOnLimitExceeded&&typeof s!="undefined"&&o.length>s)throw new RangeError("Parameter limit exceeded. Only "+s+" parameter"+(s===1?"":"s")+" allowed.");var a=-1,u,c=e.charset;if(e.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===e1?c="utf-8":o[u]===t1&&(c="iso-8859-1"),a=u,u=o.length);for(u=0;u<o.length;++u)if(u!==a){var l=o[u],f=l.indexOf("]="),h=f===-1?l.indexOf("="):f+1,x,p;if(h===-1?(x=e.decoder(l,Xt.decoder,c,"key"),p=e.strictNullHandling?null:""):(x=e.decoder(l.slice(0,h),Xt.decoder,c,"key"),x!==null&&(p=ir.maybeMap(wl(l.slice(h+1),e,ta(r[x])?r[x].length:0),function(g){return e.decoder(g,Xt.decoder,c,"value")}))),p&&e.interpretNumericEntities&&c==="iso-8859-1"&&(p=Qx(String(p))),l.indexOf("[]=")>-1&&(p=ta(p)?[p]:p),e.comma&&ta(p)&&p.length>e.arrayLimit){if(e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");p=ir.combine([],p,e.arrayLimit,e.plainObjects)}if(x!==null){var y=fs.call(r,x);y&&(e.duplicates==="combine"||l.indexOf("[]=")>-1)?r[x]=ir.combine(r[x],p,e.arrayLimit,e.plainObjects):(!y||e.duplicates==="last")&&(r[x]=p)}}return r},n1=function(n,t,e,r){var i=0;if(n.length>0&&n[n.length-1]==="[]"){var s=n.slice(0,-1).join("");i=Array.isArray(t)&&t[s]?t[s].length:0}for(var o=r?t:wl(t,e,i),a=n.length-1;a>=0;--a){var u,c=n[a];if(c==="[]"&&e.parseArrays)ir.isOverflow(o)?u=o:u=e.allowEmptyArrays&&(o===""||e.strictNullHandling&&o===null)?[]:ir.combine([],o,e.arrayLimit,e.plainObjects);else{u=e.plainObjects?{__proto__:null}:{};var l=c.charAt(0)==="["&&c.charAt(c.length-1)==="]"?c.slice(1,-1):c,f=e.decodeDotInKeys?l.replace(/%2E/g,"."):l,h=parseInt(f,10),x=!isNaN(h)&&c!==f&&String(h)===f&&h>=0&&e.parseArrays;if(!e.parseArrays&&f==="")u={0:o};else if(x&&h<e.arrayLimit)u=[],u[h]=o;else{if(x&&e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");x?(u[h]=o,ir.markOverflow(u,h)):f!=="__proto__"&&(u[f]=o)}}o=u}return o},i1=function(t,e){var r=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(e.depth<=0)return!e.plainObjects&&fs.call(Object.prototype,r)&&!e.allowPrototypes?void 0:[r];var i=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,o=i.exec(r),a=o?r.slice(0,o.index):r,u=[];if(a){if(!e.plainObjects&&fs.call(Object.prototype,a)&&!e.allowPrototypes)return;u[u.length]=a}for(var c=0;(o=s.exec(r))!==null&&c<e.depth;){c+=1;var l=o[1].slice(1,-1);if(!e.plainObjects&&fs.call(Object.prototype,l)&&!e.allowPrototypes)return;u[u.length]=o[1]}if(o){if(e.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+e.depth+" and strictDepth is true");u[u.length]="["+r.slice(o.index)+"]"}return u},s1=function(t,e,r,i){if(t){var s=i1(t,r);if(s)return n1(s,e,r,i)}},o1=function(t){if(!t)return Xt;if(typeof t.allowEmptyArrays!="undefined"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys!="undefined"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder!="undefined"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded!="undefined"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=typeof t.charset=="undefined"?Xt.charset:t.charset,r=typeof t.duplicates=="undefined"?Xt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots=="undefined"?t.decodeDotInKeys===!0?!0:Xt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Xt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Xt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Xt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Xt.arrayLimit,charset:e,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Xt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Xt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Xt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Xt.decoder,delimiter:typeof t.delimiter=="string"||ir.isRegExp(t.delimiter)?t.delimiter:Xt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Xt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Xt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Xt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Xt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Xt.strictDepth,strictMerge:typeof t.strictMerge=="boolean"?!!t.strictMerge:Xt.strictMerge,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Xt.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},a1=function(n,t){var e=o1(t);if(n===""||n===null||typeof n=="undefined")return e.plainObjects?{__proto__:null}:{};for(var r=typeof n=="string"?r1(n,e):n,i=e.plainObjects?{__proto__:null}:{},s=Object.keys(r),o=0;o<s.length;++o){var a=s[o],u=s1(a,r[a],e,typeof n=="string");i=ir.merge(i,u,e)}return e.allowSparse===!0?i:ir.compact(i)},c1=Zx,l1=a1,u1=Yo,h1={formats:u1,parse:l1,stringify:c1};const f1=ie(h1);function bl(n,t){return function(){return n.apply(t,arguments)}}const{toString:d1}=Object.prototype,{getPrototypeOf:ds}=Object,{iterator:ps,toStringTag:El}=Symbol,xs=(n=>t=>{const e=d1.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ue=n=>(n=n.toLowerCase(),t=>xs(t)===n),ms=n=>t=>typeof t===n,{isArray:_n}=Array,Sn=ms("undefined");function gi(n){return n!==null&&!Sn(n)&&n.constructor!==null&&!Sn(n.constructor)&&Se(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Al=Ue("ArrayBuffer");function p1(n){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Al(n.buffer),t}const x1=ms("string"),Se=ms("function"),_l=ms("number"),vi=n=>n!==null&&typeof n=="object",m1=n=>n===!0||n===!1,ys=n=>{if(xs(n)!=="object")return!1;const t=ds(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(El in n)&&!(ps in n)},y1=n=>{if(!vi(n)||gi(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch(t){return!1}},g1=Ue("Date"),v1=Ue("File"),w1=n=>!!(n&&typeof n.uri!="undefined"),b1=n=>n&&typeof n.getParts!="undefined",E1=Ue("Blob"),A1=Ue("FileList"),_1=n=>vi(n)&&Se(n.pipe);function S1(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Sl=S1(),Cl=typeof Sl.FormData!="undefined"?Sl.FormData:void 0,C1=n=>{if(!n)return!1;if(Cl&&n instanceof Cl)return!0;const t=ds(n);if(!t||t===Object.prototype||!Se(n.append))return!1;const e=xs(n);return e==="formdata"||e==="object"&&Se(n.toString)&&n.toString()==="[object FormData]"},B1=Ue("URLSearchParams"),[F1,D1,M1,I1]=["ReadableStream","Request","Response","Headers"].map(Ue),T1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wi(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n=="undefined")return;let r,i;if(typeof n!="object"&&(n=[n]),_n(n))for(r=0,i=n.length;r<i;r++)t.call(null,n[r],r,n);else{if(gi(n))return;const s=e?Object.getOwnPropertyNames(n):Object.keys(n),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,n[a],a,n)}}function Bl(n,t){if(gi(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,i;for(;r-- >0;)if(i=e[r],t===i.toLowerCase())return i;return null}const Gr=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Fl=n=>!Sn(n)&&n!==Gr;function ea(){const{caseless:n,skipUndefined:t}=Fl(this)&&this||{},e={},r=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=n&&Bl(e,s)||s;ys(e[o])&&ys(i)?e[o]=ea(e[o],i):ys(i)?e[o]=ea({},i):_n(i)?e[o]=i.slice():(!t||!Sn(i))&&(e[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&wi(arguments[i],r);return e}const R1=(n,t,e,{allOwnKeys:r}={})=>(wi(t,(i,s)=>{e&&Se(i)?Object.defineProperty(n,s,{value:bl(i,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),O1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),P1=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},z1=(n,t,e,r)=>{let i,s,o;const a={};if(t=t||{},n==null)return t;do{for(i=Object.getOwnPropertyNames(n),s=i.length;s-- >0;)o=i[s],(!r||r(o,n,t))&&!a[o]&&(t[o]=n[o],a[o]=!0);n=e!==!1&&ds(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},k1=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},N1=n=>{if(!n)return null;if(_n(n))return n;let t=n.length;if(!_l(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},L1=(n=>t=>n&&t instanceof n)(typeof Uint8Array!="undefined"&&ds(Uint8Array)),U1=(n,t)=>{const r=(n&&n[ps]).call(n);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(n,s[0],s[1])}},$1=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},H1=Ue("HTMLFormElement"),q1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,r,i){return r.toUpperCase()+i}),Dl=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),W1=Ue("RegExp"),Ml=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};wi(e,(i,s)=>{let o;(o=t(i,s,n))!==!1&&(r[s]=o||i)}),Object.defineProperties(n,r)},V1=n=>{Ml(n,(t,e)=>{if(Se(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Se(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},j1=(n,t)=>{const e={},r=i=>{i.forEach(s=>{e[s]=!0})};return _n(n)?r(n):r(String(n).split(t)),e},G1=()=>{},X1=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function Y1(n){return!!(n&&Se(n.append)&&n[El]==="FormData"&&n[ps])}const K1=n=>{const t=new Array(10),e=(r,i)=>{if(vi(r)){if(t.indexOf(r)>=0)return;if(gi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=_n(r)?[]:{};return wi(r,(o,a)=>{const u=e(o,i+1);!Sn(u)&&(s[a]=u)}),t[i]=void 0,s}}return r};return e(n,0)},J1=Ue("AsyncFunction"),Z1=n=>n&&(vi(n)||Se(n))&&Se(n.then)&&Se(n.catch),Il=((n,t)=>n?setImmediate:t?((e,r)=>(Gr.addEventListener("message",({source:i,data:s})=>{i===Gr&&s===e&&r.length&&r.shift()()},!1),i=>{r.push(i),Gr.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Se(Gr.postMessage)),Q1=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Gr):typeof process!="undefined"&&process.nextTick||Il,Y={isArray:_n,isArrayBuffer:Al,isBuffer:gi,isFormData:C1,isArrayBufferView:p1,isString:x1,isNumber:_l,isBoolean:m1,isObject:vi,isPlainObject:ys,isEmptyObject:y1,isReadableStream:F1,isRequest:D1,isResponse:M1,isHeaders:I1,isUndefined:Sn,isDate:g1,isFile:v1,isReactNativeBlob:w1,isReactNative:b1,isBlob:E1,isRegExp:W1,isFunction:Se,isStream:_1,isURLSearchParams:B1,isTypedArray:L1,isFileList:A1,forEach:wi,merge:ea,extend:R1,trim:T1,stripBOM:O1,inherits:P1,toFlatObject:z1,kindOf:xs,kindOfTest:Ue,endsWith:k1,toArray:N1,forEachEntry:U1,matchAll:$1,isHTMLForm:H1,hasOwnProperty:Dl,hasOwnProp:Dl,reduceDescriptors:Ml,freezeMethods:V1,toObjectSet:j1,toCamelCase:q1,noop:G1,toFiniteNumber:X1,findKey:Bl,global:Gr,isContextDefined:Fl,isSpecCompliantForm:Y1,toJSONObject:K1,isAsyncFn:J1,isThenable:Z1,setImmediate:Il,asap:Q1,isIterable:n=>n!=null&&Se(n[ps])};let At=class wd extends Error{static from(t,e,r,i,s,o){const a=new wd(t.message,e||t.code,r,i,s);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,e,r,i,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}};At.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",At.ERR_BAD_OPTION="ERR_BAD_OPTION",At.ECONNABORTED="ECONNABORTED",At.ETIMEDOUT="ETIMEDOUT",At.ERR_NETWORK="ERR_NETWORK",At.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",At.ERR_DEPRECATED="ERR_DEPRECATED",At.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",At.ERR_BAD_REQUEST="ERR_BAD_REQUEST",At.ERR_CANCELED="ERR_CANCELED",At.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",At.ERR_INVALID_URL="ERR_INVALID_URL",At.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const tm=null;function ra(n){return Y.isPlainObject(n)||Y.isArray(n)}function Tl(n){return Y.endsWith(n,"[]")?n.slice(0,-2):n}function na(n,t,e){return n?n.concat(t).map(function(i,s){return i=Tl(i),!e&&s?"["+i+"]":i}).join(e?".":""):t}function em(n){return Y.isArray(n)&&!n.some(ra)}const rm=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function gs(n,t,e){if(!Y.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Y.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,E){return!Y.isUndefined(E[g])});const r=e.metaTokens,i=e.visitor||f,s=e.dots,o=e.indexes,a=e.Blob||typeof Blob!="undefined"&&Blob,u=e.maxDepth===void 0?100:e.maxDepth,c=a&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(Y.isDate(y))return y.toISOString();if(Y.isBoolean(y))return y.toString();if(!c&&Y.isBlob(y))throw new At("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(y)||Y.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function f(y,g,E){let A=y;if(Y.isReactNative(t)&&Y.isReactNativeBlob(y))return t.append(na(E,g,s),l(y)),!1;if(y&&!E&&typeof y=="object"){if(Y.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(Y.isArray(y)&&em(y)||(Y.isFileList(y)||Y.endsWith(g,"[]"))&&(A=Y.toArray(y)))return g=Tl(g),A.forEach(function(_,S){!(Y.isUndefined(_)||_===null)&&t.append(o===!0?na([g],S,s):o===null?g:g+"[]",l(_))}),!1}return ra(y)?!0:(t.append(na(E,g,s),l(y)),!1)}const h=[],x=Object.assign(rm,{defaultVisitor:f,convertValue:l,isVisitable:ra});function p(y,g,E=0){if(!Y.isUndefined(y)){if(E>u)throw new At("Object is too deeply nested ("+E+" levels). Max depth: "+u,At.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(y),Y.forEach(y,function(b,_){(!(Y.isUndefined(b)||b===null)&&i.call(t,b,Y.isString(_)?_.trim():_,g,x))===!0&&p(b,g?g.concat(_):[_],E+1)}),h.pop()}}if(!Y.isObject(n))throw new TypeError("data must be an object");return p(n),t}function Rl(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ia(n,t){this._pairs=[],n&&gs(n,this,t)}const Ol=ia.prototype;Ol.append=function(t,e){this._pairs.push([t,e])},Ol.toString=function(t){const e=t?function(r){return t.call(this,r,Rl)}:Rl;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function nm(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pl(n,t,e){if(!t)return n;const r=e&&e.encode||nm,i=Y.isFunction(e)?{serialize:e}:e,s=i&&i.serialize;let o;if(s?o=s(t,i):o=Y.isURLSearchParams(t)?t.toString():new ia(t,i).toString(r),o){const a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}class zl{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const sa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},im={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ia,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},oa=typeof window!="undefined"&&typeof document!="undefined",aa=typeof navigator=="object"&&navigator||void 0,sm=oa&&(!aa||["ReactNative","NativeScript","NS"].indexOf(aa.product)<0),om=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",am=oa&&window.location.href||"http://localhost",ge=Ut(Ut({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oa,hasStandardBrowserEnv:sm,hasStandardBrowserWebWorkerEnv:om,navigator:aa,origin:am},Symbol.toStringTag,{value:"Module"}))),im);function cm(n,t){return gs(n,new ge.classes.URLSearchParams,Ut({visitor:function(e,r,i,s){return ge.isNode&&Y.isBuffer(e)?(this.append(r,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function lm(n){return Y.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function um(n){const t={},e=Object.keys(n);let r;const i=e.length;let s;for(r=0;r<i;r++)s=e[r],t[s]=n[s];return t}function kl(n){function t(e,r,i,s){let o=e[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),u=s>=e.length;return o=!o&&Y.isArray(i)?i.length:o,u?(Y.hasOwnProp(i,o)?i[o]=Y.isArray(i[o])?i[o].concat(r):[i[o],r]:i[o]=r,!a):((!i[o]||!Y.isObject(i[o]))&&(i[o]=[]),t(e,r,i[o],s)&&Y.isArray(i[o])&&(i[o]=um(i[o])),!a)}if(Y.isFormData(n)&&Y.isFunction(n.entries)){const e={};return Y.forEachEntry(n,(r,i)=>{t(lm(r),i,e,0)}),e}return null}const Cn=(n,t)=>n!=null&&Y.hasOwnProp(n,t)?n[t]:void 0;function hm(n,t,e){if(Y.isString(n))try{return(t||JSON.parse)(n),Y.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const bi={transitional:sa,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",i=r.indexOf("application/json")>-1,s=Y.isObject(t);if(s&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return i?JSON.stringify(kl(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const u=Cn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return cm(t,u).toString();if((a=Y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=Cn(this,"env"),l=c&&c.FormData;return gs(a?{"files[]":t}:t,l&&new l,u)}}return s||i?(e.setContentType("application/json",!1),hm(t)):t}],transformResponse:[function(t){const e=Cn(this,"transitional")||bi.transitional,r=e&&e.forcedJSONParsing,i=Cn(this,"responseType"),s=i==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(r&&!i||s)){const a=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t,Cn(this,"parseReviver"))}catch(u){if(a)throw u.name==="SyntaxError"?At.from(u,At.ERR_BAD_RESPONSE,this,null,Cn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],n=>{bi.headers[n]={}});const fm=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dm=n=>{const t={};let e,r,i;return n&&n.split(`
6
+ `).forEach(function(o){i=o.indexOf(":"),e=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!e||t[e]&&fm[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Nl=Symbol("internals"),pm=/[^\x09\x20-\x7E\x80-\xFF]/g;function xm(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}function Ei(n){return n&&String(n).trim().toLowerCase()}function mm(n){return xm(n.replace(pm,""))}function vs(n){return n===!1||n==null?n:Y.isArray(n)?n.map(vs):mm(String(n))}function ym(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const gm=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ca(n,t,e,r,i){if(Y.isFunction(r))return r.call(this,t,e);if(i&&(t=e),!!Y.isString(t)){if(Y.isString(r))return t.indexOf(r)!==-1;if(Y.isRegExp(r))return r.test(t)}}function vm(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function wm(n,t){const e=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let Ce=class{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function s(a,u,c){const l=Ei(u);if(!l)throw new Error("header name must be a non-empty string");const f=Y.findKey(i,l);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||u]=vs(a))}const o=(a,u)=>Y.forEach(a,(c,l)=>s(c,l,u));if(Y.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(Y.isString(t)&&(t=t.trim())&&!gm(t))o(dm(t),e);else if(Y.isObject(t)&&Y.isIterable(t)){let a={},u,c;for(const l of t){if(!Y.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(u=a[c])?Y.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}o(a,e)}else t!=null&&s(e,t,r);return this}get(t,e){if(t=Ei(t),t){const r=Y.findKey(this,t);if(r){const i=this[r];if(!e)return i;if(e===!0)return ym(i);if(Y.isFunction(e))return e.call(this,i,r);if(Y.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ei(t),t){const r=Y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||ca(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let i=!1;function s(o){if(o=Ei(o),o){const a=Y.findKey(r,o);a&&(!e||ca(r,r[a],a,e))&&(delete r[a],i=!0)}}return Y.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const s=e[r];(!t||ca(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,r={};return Y.forEach(this,(i,s)=>{const o=Y.findKey(r,s);if(o){e[o]=vs(i),delete e[s];return}const a=t?vm(s):String(s).trim();a!==s&&delete e[s],e[a]=vs(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Y.forEach(this,(r,i)=>{r!=null&&r!==!1&&(e[i]=t&&Y.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
7
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Nl]=this[Nl]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Ei(o);r[a]||(wm(i,o),r[a]=!0)}return Y.isArray(t)?t.forEach(s):s(t),this}};Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Ce.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Y.freezeMethods(Ce);function la(n,t){const e=this||bi,r=t||e,i=Ce.from(r.headers);let s=r.data;return Y.forEach(n,function(a){s=a.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Ll(n){return!!(n&&n.__CANCEL__)}let Ai=class extends At{constructor(t,e,r){super(t==null?"canceled":t,At.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ul(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new At("Request failed with status code "+e.status,[At.ERR_BAD_REQUEST,At.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function bm(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function Em(n,t){n=n||10;const e=new Array(n),r=new Array(n);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),l=r[s];o||(o=c),e[i]=u,r[i]=c;let f=s,h=0;for(;f!==i;)h+=e[f++],f=f%n;if(i=(i+1)%n,i===s&&(s=(s+1)%n),c-o<t)return;const x=l&&c-l;return x?Math.round(h*1e3/x):void 0}}function Am(n,t){let e=0,r=1e3/t,i,s;const o=(c,l=Date.now())=>{e=l,i=null,s&&(clearTimeout(s),s=null),n(...c)};return[(...c)=>{const l=Date.now(),f=l-e;f>=r?o(c,l):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const ws=(n,t,e=3)=>{let r=0;const i=Em(50,250);return Am(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,u=a!=null?Math.min(o,a):o,c=Math.max(0,u-r),l=i(c);r=Math.max(r,u);const f={loaded:u,total:a,progress:a?u/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-u)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};n(f)},e)},$l=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Hl=n=>(...t)=>Y.asap(()=>n(...t)),_m=ge.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,ge.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Sm=ge.hasStandardBrowserEnv?{write(n,t,e,r,i,s,o){if(typeof document=="undefined")return;const a=[`${n}=${encodeURIComponent(t)}`];Y.isNumber(e)&&a.push(`expires=${new Date(e).toUTCString()}`),Y.isString(r)&&a.push(`path=${r}`),Y.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),Y.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(n){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Cm(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Bm(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function ql(n,t,e){let r=!Cm(t);return n&&(r||e===!1)?Bm(n,t):t}const Wl=n=>n instanceof Ce?Ut({},n):n;function Xr(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,l,f,h){return Y.isPlainObject(c)&&Y.isPlainObject(l)?Y.merge.call({caseless:h},c,l):Y.isPlainObject(l)?Y.merge({},l):Y.isArray(l)?l.slice():l}function i(c,l,f,h){if(Y.isUndefined(l)){if(!Y.isUndefined(c))return r(void 0,c,f,h)}else return r(c,l,f,h)}function s(c,l){if(!Y.isUndefined(l))return r(void 0,l)}function o(c,l){if(Y.isUndefined(l)){if(!Y.isUndefined(c))return r(void 0,c)}else return r(void 0,l)}function a(c,l,f){if(Y.hasOwnProp(t,f))return r(c,l);if(Y.hasOwnProp(n,f))return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:a,headers:(c,l,f)=>i(Wl(c),Wl(l),f,!0)};return Y.forEach(Object.keys(Ut(Ut({},n),t)),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const f=Y.hasOwnProp(u,l)?u[l]:i,h=Y.hasOwnProp(n,l)?n[l]:void 0,x=Y.hasOwnProp(t,l)?t[l]:void 0,p=f(h,x,l);Y.isUndefined(p)&&f!==a||(e[l]=p)}),e}const Vl=n=>{const t=Xr({},n),e=h=>Y.hasOwnProp(t,h)?t[h]:void 0,r=e("data");let i=e("withXSRFToken");const s=e("xsrfHeaderName"),o=e("xsrfCookieName");let a=e("headers");const u=e("auth"),c=e("baseURL"),l=e("allowAbsoluteUrls"),f=e("url");if(t.headers=a=Ce.from(a),t.url=Pl(ql(c,f,l),n.params,n.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),Y.isFormData(r)){if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Y.isFunction(r.getHeaders)){const h=r.getHeaders(),x=["content-type","content-length"];Object.entries(h).forEach(([p,y])=>{x.includes(p.toLowerCase())&&a.set(p,y)})}}if(ge.hasStandardBrowserEnv&&(Y.isFunction(i)&&(i=i(t)),i===!0||i==null&&_m(t.url))){const x=s&&o&&Sm.read(o);x&&a.set(s,x)}return t},Fm=typeof XMLHttpRequest!="undefined"&&function(n){return new Promise(function(e,r){const i=Vl(n);let s=i.data;const o=Ce.from(i.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=i,l,f,h,x,p;function y(){x&&x(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function E(){if(!g)return;const b=Ce.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:b,config:n,request:g};Ul(function(R){e(R),y()},function(R){r(R),y()},S),g=null}"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(E)},g.onabort=function(){g&&(r(new At("Request aborted",At.ECONNABORTED,n,g)),g=null)},g.onerror=function(_){const S=_&&_.message?_.message:"Network Error",I=new At(S,At.ERR_NETWORK,n,g);I.event=_||null,r(I),g=null},g.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||sa;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),r(new At(_,S.clarifyTimeoutError?At.ETIMEDOUT:At.ECONNABORTED,n,g)),g=null},s===void 0&&o.setContentType(null),"setRequestHeader"in g&&Y.forEach(o.toJSON(),function(_,S){g.setRequestHeader(S,_)}),Y.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),a&&a!=="json"&&(g.responseType=i.responseType),c&&([h,p]=ws(c,!0),g.addEventListener("progress",h)),u&&g.upload&&([f,x]=ws(u),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",x)),(i.cancelToken||i.signal)&&(l=b=>{g&&(r(!b||b.type?new Ai(null,n,g):b),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const A=bm(i.url);if(A&&ge.protocols.indexOf(A)===-1){r(new At("Unsupported protocol "+A+":",At.ERR_BAD_REQUEST,n));return}g.send(s||null)})},Dm=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const l=c instanceof Error?c:this.reason;r.abort(l instanceof At?l:new Ai(l instanceof Error?l.message:l))}};let o=t&&setTimeout(()=>{o=null,s(new At(`timeout of ${t}ms exceeded`,At.ETIMEDOUT))},t);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),n=null)};n.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>Y.asap(a),u}},Mm=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,i;for(;r<e;)i=r+t,yield n.slice(r,i),r=i},Im=function(n,t){return bc(this,null,function*(){try{for(var e=vd(Tm(n)),r,i,s;r=!(i=yield new mn(e.next())).done;r=!1){const o=i.value;yield*Ec(Mm(o,t))}}catch(i){s=[i]}finally{try{r&&(i=e.return)&&(yield new mn(i.call(e)))}finally{if(s)throw s[0]}}})},Tm=function(n){return bc(this,null,function*(){if(n[Symbol.asyncIterator]){yield*Ec(n);return}const t=n.getReader();try{for(;;){const{done:e,value:r}=yield new mn(t.read());if(e)break;yield r}}finally{yield new mn(t.cancel())}})},jl=(n,t,e,r)=>{const i=Im(n,t);let s=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({pull(c){return _t(this,null,function*(){try{const{done:l,value:f}=yield i.next();if(l){a(),c.close();return}let h=f.byteLength;if(e){let x=s+=h;e(x)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}})},cancel(c){return a(c),i.return()}},{highWaterMark:2})},Gl=64*1024,{isFunction:bs}=Y,Rm=(({Request:n,Response:t})=>({Request:n,Response:t}))(Y.global),{ReadableStream:Xl,TextEncoder:Yl}=Y.global,Kl=(n,...t)=>{try{return!!n(...t)}catch(e){return!1}},Om=n=>{n=Y.merge.call({skipUndefined:!0},Rm,n);const{fetch:t,Request:e,Response:r}=n,i=t?bs(t):typeof fetch=="function",s=bs(e),o=bs(r);if(!i)return!1;const a=i&&bs(Xl),u=i&&(typeof Yl=="function"?(p=>y=>p.encode(y))(new Yl):p=>_t(this,null,function*(){return new Uint8Array(yield new e(p).arrayBuffer())})),c=s&&a&&Kl(()=>{let p=!1;const y=new e(ge.origin,{body:new Xl,method:"POST",get duplex(){return p=!0,"half"}}),g=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),p&&!g}),l=o&&a&&Kl(()=>Y.isReadableStream(new r("").body)),f={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(y,g)=>{let E=y&&y[p];if(E)return E.call(y);throw new At(`Response type '${p}' is not supported`,At.ERR_NOT_SUPPORT,g)})});const h=p=>_t(this,null,function*(){if(p==null)return 0;if(Y.isBlob(p))return p.size;if(Y.isSpecCompliantForm(p))return(yield new e(ge.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(p)||Y.isArrayBuffer(p))return p.byteLength;if(Y.isURLSearchParams(p)&&(p=p+""),Y.isString(p))return(yield u(p)).byteLength}),x=(p,y)=>_t(this,null,function*(){const g=Y.toFiniteNumber(p.getContentLength());return g==null?h(y):g});return p=>_t(this,null,function*(){let{url:y,method:g,data:E,signal:A,cancelToken:b,timeout:_,onDownloadProgress:S,onUploadProgress:I,responseType:R,headers:z,withCredentials:X="same-origin",fetchOptions:O}=Vl(p),P=t||fetch;R=R?(R+"").toLowerCase():"text";let q=Dm([A,b&&b.toAbortSignal()],_),j=null;const K=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let V;try{if(I&&c&&g!=="get"&&g!=="head"&&(V=yield x(z,E))!==0){let U=new e(y,{method:"POST",body:E,duplex:"half"}),G;if(Y.isFormData(E)&&(G=U.headers.get("content-type"))&&z.setContentType(G),U.body){const[tt,Q]=$l(V,ws(Hl(I)));E=jl(U.body,Gl,tt,Q)}}Y.isString(X)||(X=X?"include":"omit");const J=s&&"credentials"in e.prototype;if(Y.isFormData(E)){const U=z.getContentType();U&&/^multipart\/form-data/i.test(U)&&!/boundary=/i.test(U)&&z.delete("content-type")}const ot=tr(Ut({},O),{signal:q,method:g.toUpperCase(),headers:z.normalize().toJSON(),body:E,duplex:"half",credentials:J?X:void 0});j=s&&new e(y,ot);let rt=yield s?P(j,O):P(y,ot);const lt=l&&(R==="stream"||R==="response");if(l&&(S||lt&&K)){const U={};["status","statusText","headers"].forEach(Et=>{U[Et]=rt[Et]});const G=Y.toFiniteNumber(rt.headers.get("content-length")),[tt,Q]=S&&$l(G,ws(Hl(S),!0))||[];rt=new r(jl(rt.body,Gl,tt,()=>{Q&&Q(),K&&K()}),U)}R=R||"text";let at=yield f[Y.findKey(f,R)||"text"](rt,p);return!lt&&K&&K(),yield new Promise((U,G)=>{Ul(U,G,{data:at,headers:Ce.from(rt.headers),status:rt.status,statusText:rt.statusText,config:p,request:j})})}catch(J){throw K&&K(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new At("Network Error",At.ERR_NETWORK,p,j,J&&J.response),{cause:J.cause||J}):At.from(J,J&&J.code,p,j,J&&J.response)}})},Pm=new Map,Jl=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:i}=t,s=[r,i,e];let o=s.length,a=o,u,c,l=Pm;for(;a--;)u=s[a],c=l.get(u),c===void 0&&l.set(u,c=a?new Map:Om(t)),l=c;return c};Jl();const ua={http:tm,xhr:Fm,fetch:{get:Jl}};Y.forEach(ua,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch(e){}Object.defineProperty(n,"adapterName",{value:t})}});const Zl=n=>`- ${n}`,zm=n=>Y.isFunction(n)||n===null||n===!1;function km(n,t){n=Y.isArray(n)?n:[n];const{length:e}=n;let r,i;const s={};for(let o=0;o<e;o++){r=n[o];let a;if(i=r,!zm(r)&&(i=ua[(a=String(r)).toLowerCase()],i===void 0))throw new At(`Unknown adapter '${a}'`);if(i&&(Y.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
8
+ `+o.map(Zl).join(`
9
+ `):" "+Zl(o[0]):"as no adapter specified";throw new At("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const Ql={getAdapter:km,adapters:ua};function ha(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ai(null,n)}function tu(n){return ha(n),n.headers=Ce.from(n.headers),n.data=la.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ql.getAdapter(n.adapter||bi.adapter,n)(n).then(function(r){return ha(n),r.data=la.call(n,n.transformResponse,r),r.headers=Ce.from(r.headers),r},function(r){return Ll(r)||(ha(n),r&&r.response&&(r.response.data=la.call(n,n.transformResponse,r.response),r.response.headers=Ce.from(r.response.headers))),Promise.reject(r)})}const eu="1.15.2",Es={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Es[n]=function(r){return typeof r===n||"a"+(t<1?"n ":" ")+n}});const ru={};Es.transitional=function(t,e,r){function i(s,o){return"[Axios v"+eu+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new At(i(o," has been removed"+(e?" in "+e:"")),At.ERR_DEPRECATED);return e&&!ru[o]&&(ru[o]=!0,console.warn(i(o," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,o,a):!0}},Es.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Nm(n,t,e){if(typeof n!="object")throw new At("options must be an object",At.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const s=r[i],o=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(o){const a=n[s],u=a===void 0||o(a,s,n);if(u!==!0)throw new At("option "+s+" must be "+u,At.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new At("Unknown option "+s,At.ERR_BAD_OPTION)}}const As={assertOptions:Nm,validators:Es},Pe=As.validators;let Yr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new zl,response:new zl}}request(t,e){return _t(this,null,function*(){try{return yield this._request(t,e)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=(()=>{if(!i.stack)return"";const o=i.stack.indexOf(`
10
+ `);return o===-1?"":i.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
11
+ `),a=o===-1?-1:s.indexOf(`
12
+ `,o+1),u=a===-1?"":s.slice(a+1);String(r.stack).endsWith(u)||(r.stack+=`
13
+ `+s)}}catch(o){}}throw r}})}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Xr(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:s}=e;r!==void 0&&As.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean),legacyInterceptorReqResOrdering:Pe.transitional(Pe.boolean)},!1),i!=null&&(Y.isFunction(i)?e.paramsSerializer={serialize:i}:As.assertOptions(i,{encode:Pe.function,serialize:Pe.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),As.assertOptions(e,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&Y.merge(s.common,s[e.method]);s&&Y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),e.headers=Ce.concat(o,s);const a=[];let u=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(e)===!1)return;u=u&&y.synchronous;const g=e.transitional||sa;g&&g.legacyInterceptorReqResOrdering?a.unshift(y.fulfilled,y.rejected):a.push(y.fulfilled,y.rejected)});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let l,f=0,h;if(!u){const p=[tu.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,l=Promise.resolve(e);f<h;)l=l.then(p[f++],p[f++]);return l}h=a.length;let x=e;for(;f<h;){const p=a[f++],y=a[f++];try{x=p(x)}catch(g){y.call(this,g);break}}try{l=tu.call(this,x)}catch(p){return Promise.reject(p)}for(f=0,h=c.length;f<h;)l=l.then(c[f++],c[f++]);return l}getUri(t){t=Xr(this.defaults,t);const e=ql(t.baseURL,t.url,t.allowAbsoluteUrls);return Pl(e,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Yr.prototype[t]=function(e,r){return this.request(Xr(r||{},{method:t,url:e,data:(r||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function e(r){return function(s,o,a){return this.request(Xr(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Yr.prototype[t]=e(),Yr.prototype[t+"Form"]=e(!0)});let Lm=class bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Ai(s,o,a),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new bd(function(i){t=i}),cancel:t}}};function Um(n){return function(e){return n.apply(null,e)}}function $m(n){return Y.isObject(n)&&n.isAxiosError===!0}const fa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fa).forEach(([n,t])=>{fa[t]=n});function nu(n){const t=new Yr(n),e=bl(Yr.prototype.request,t);return Y.extend(e,Yr.prototype,t,{allOwnKeys:!0}),Y.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return nu(Xr(n,i))},e}const ee=nu(bi);ee.Axios=Yr,ee.CanceledError=Ai,ee.CancelToken=Lm,ee.isCancel=Ll,ee.VERSION=eu,ee.toFormData=gs,ee.AxiosError=At,ee.Cancel=ee.CanceledError,ee.all=function(t){return Promise.all(t)},ee.spread=Um,ee.isAxiosError=$m,ee.mergeConfig=Xr,ee.AxiosHeaders=Ce,ee.formToJSON=n=>kl(Y.isHTMLForm(n)?new FormData(n):n),ee.getAdapter=Ql.getAdapter,ee.HttpStatusCode=fa,ee.default=ee;const{Axios:Cw,AxiosError:Bw,CanceledError:Fw,isCancel:Dw,CancelToken:Mw,VERSION:Iw,all:Tw,Cancel:Rw,isAxiosError:Ow,spread:Pw,toFormData:zw,AxiosHeaders:kw,HttpStatusCode:Nw,formToJSON:Lw,getAdapter:Uw,mergeConfig:$w}=ee,mr={NONE:"none",WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},iu={ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"}};var _s={};/*!
14
+ * vite-plugin-qiankun.js v1.0.14
15
+ * (c) 2021-2022 Teng Mao Qing
16
+ * Released under the MIT License.
17
+ */Object.defineProperty(_s,"__esModule",{value:!0});var Bn=typeof window!="undefined"?window.proxy||window:{},su=function(n){Bn!=null&&Bn.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),Bn.qiankunName&&(window.moudleQiankunAppLifeCycles[Bn.qiankunName]=n))};_s.default=su;var Ss=_s.qiankunWindow=Bn;_s.renderWithQiankun=su;function Hm(){return window.__POWERED_BY_WUJIE__||window.$wujie?mr.WUJIE:window.__POWERED_BY_QIANKUN__||Ss!=null&&Ss.__POWERED_BY_QIANKUN__?mr.QIANKUN:window.__MICRO_APP_ENVIRONMENT__||window.microApp?mr.MICROAPP:mr.NONE}function qm(){return{microType:Hm()}}const Wm="/",{microType:ou}=qm(),Vm=Ss||window,Cs=ou!==mr.NONE?ou:(ed=(td=Vm.meta)==null?void 0:td.vite.micro)==null?void 0:ed.type,jm=Cs===mr.WUJIE,Gm=Cs===mr.QIANKUN,Xm=Cs===mr.MICROAPP,Ym=window.top!==window.self||Cs!==mr.NONE;console.log("🚀 ~ isNested:",Ym,jm,Gm,Xm);const Km=location.origin,au={savePath:((nd=(rd=window.meta)==null?void 0:rd.graph)==null?void 0:nd.savePath)||"/cockpit/drawing",graphPenPath:((sd=(id=window.meta)==null?void 0:id.graph)==null?void 0:sd.graphPenPath)||"/cockpit/graph",templatePath:((ad=(od=window.meta)==null?void 0:od.graph)==null?void 0:ad.templatePath)||"/cockpit/template",graphImgUploadPath:((ld=(cd=window.meta)==null?void 0:cd.graph)==null?void 0:ld.graphImgUploadPath)||"/cockpit/upload",threeSavePath:((hd=(ud=window.meta)==null?void 0:ud.graph)==null?void 0:hd.threeSavePath)||"/cockpit/threed",threeModelPath:((dd=(fd=window.meta)==null?void 0:fd.graph)==null?void 0:dd.threeModelPath)||"/cockpit/models"},Yt=ee.create({baseURL:Km,timeout:window.meta.axios.timeout||12e4,withCredentials:!1,paramsSerializer:n=>f1.stringify(n)});Yt.interceptors.request.use(n=>(n.headers["x-token"]="ewoglCJhbGcilDogpc3",n),n=>Promise.reject(n)),Yt.interceptors.response.use(n=>{const{data:t}=n;return Promise.resolve(t)},n=>Promise.reject(n));function Jm(n,t={},e={}){return new Promise(r=>{Yt.get(n,Ut({params:t},e)).then(i=>r({res:i,err:null})).catch(i=>r({res:null,err:i}))})}function Zm(n,t={},e={}){return new Promise(r=>{Yt.post(n,t,e).then(i=>r({res:i,err:null})).catch(i=>r({res:null,err:i}))})}function Qm(n,t={},e={}){return Yt.get(n,Ut({params:t},e))}function ty(n,t={},e={}){return Yt.post(n,t,e)}function ey(n,t={}){return Yt.get(`/filehandle/${n}`,{params:t})}function ry(n,t={},e={}){return Yt.post(`/filehandle/${n}`,t,e)}function ny(n,t={}){return Yt.get(`/user/${n}`,{params:t})}function iy(n,t={},e={}){return Yt.post(`/user/${n}`,t,e)}function sy(n,t={}){return Yt.get(`${n}`,t.local?{params:t,baseURL:Wm}:{params:t})}function oy(n,t={}){return Yt.get(`/media/${n}/`,{params:t})}function ay(n,t={},e={}){return Yt.post(`/media/${n}/`,t,e)}function cy(n,t={}){return Yt.get(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,{params:t})}function ly(n,t={},e={}){return Yt.post(`/${window.meta.app.isFactory?window.meta.factory.singo_prefix||"acproxy/common":"common"}/${n}/`,t,e)}function uy(n,t={}){return Yt.get(`/history/${n}`,{params:t})}function hy(n,t={},e={}){return Yt.post(`/history/${n}`,t,e)}function fy(n,t={}){return Yt.get(`/scada/${n}`,{params:t})}function dy(n,t={},e={}){return Yt.post(`/scada/${n}`,t,e)}function py(n,t={}){return Yt.get(`/common/factory/${n}`,{params:t})}function xy(n,t={},e={}){return Yt.post(`/common/factory/${n}`,t,e)}function my(n,t={}){return Yt.get(`/factory/${n}`,{params:t})}function yy(n,t={},e={}){return Yt.post(`/factory/${n}`,t,e)}const sr={getApi:Jm,postApi:Zm,getFileApi:ey,postFileApi:ry,getBaseApi:Qm,postBaseApi:ty,getUserApi:ny,postUserApi:iy,getGraphApi:sy,getMediaApi:oy,postMediaApi:ay,getScadaApi:fy,postScadaApi:dy,getCommonApi:cy,postCommonApi:ly,getHistoryApi:uy,postHistoryApi:hy,getFactoryApi:my,postFactoryApi:yy,getCommonFactoryApi:py,postCommonFactoryApi:xy};var gy={exports:{}};(function(n,t){(function(e,r){n.exports=r()})(yt,function(){var e=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",c="day",l="week",f="month",h="quarter",x="year",p="date",y="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(K){var V=["th","st","nd","rd"],J=K%100;return"["+K+(V[(J-20)%10]||V[J]||V[0])+"]"}},b=function(K,V,J){var ot=String(K);return!ot||ot.length>=V?K:""+Array(V+1-ot.length).join(J)+K},_={s:b,z:function(K){var V=-K.utcOffset(),J=Math.abs(V),ot=Math.floor(J/60),rt=J%60;return(V<=0?"+":"-")+b(ot,2,"0")+":"+b(rt,2,"0")},m:function K(V,J){if(V.date()<J.date())return-K(J,V);var ot=12*(J.year()-V.year())+(J.month()-V.month()),rt=V.clone().add(ot,f),lt=J-rt<0,at=V.clone().add(ot+(lt?-1:1),f);return+(-(ot+(J-rt)/(lt?rt-at:at-rt))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:f,y:x,w:l,d:c,D:p,h:u,m:a,s:o,ms:s,Q:h}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},S="en",I={};I[S]=A;var R="$isDayjsObject",z=function(K){return K instanceof q||!(!K||!K[R])},X=function K(V,J,ot){var rt;if(!V)return S;if(typeof V=="string"){var lt=V.toLowerCase();I[lt]&&(rt=lt),J&&(I[lt]=J,rt=lt);var at=V.split("-");if(!rt&&at.length>1)return K(at[0])}else{var U=V.name;I[U]=V,rt=U}return!ot&&rt&&(S=rt),rt||!ot&&S},O=function(K,V){if(z(K))return K.clone();var J=typeof V=="object"?V:{};return J.date=K,J.args=arguments,new q(J)},P=_;P.l=X,P.i=z,P.w=function(K,V){return O(K,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var q=function(){function K(J){this.$L=X(J.locale,null,!0),this.parse(J),this.$x=this.$x||J.x||{},this[R]=!0}var V=K.prototype;return V.parse=function(J){this.$d=function(ot){var rt=ot.date,lt=ot.utc;if(rt===null)return new Date(NaN);if(P.u(rt))return new Date;if(rt instanceof Date)return new Date(rt);if(typeof rt=="string"&&!/Z$/i.test(rt)){var at=rt.match(g);if(at){var U=at[2]-1||0,G=(at[7]||"0").substring(0,3);return lt?new Date(Date.UTC(at[1],U,at[3]||1,at[4]||0,at[5]||0,at[6]||0,G)):new Date(at[1],U,at[3]||1,at[4]||0,at[5]||0,at[6]||0,G)}}return new Date(rt)}(J),this.init()},V.init=function(){var J=this.$d;this.$y=J.getFullYear(),this.$M=J.getMonth(),this.$D=J.getDate(),this.$W=J.getDay(),this.$H=J.getHours(),this.$m=J.getMinutes(),this.$s=J.getSeconds(),this.$ms=J.getMilliseconds()},V.$utils=function(){return P},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(J,ot){var rt=O(J);return this.startOf(ot)<=rt&&rt<=this.endOf(ot)},V.isAfter=function(J,ot){return O(J)<this.startOf(ot)},V.isBefore=function(J,ot){return this.endOf(ot)<O(J)},V.$g=function(J,ot,rt){return P.u(J)?this[ot]:this.set(rt,J)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(J,ot){var rt=this,lt=!!P.u(ot)||ot,at=P.p(J),U=function(Wt,__$t__){var Jt=P.w(rt.$u?Date.UTC(rt.$y,__$t__,Wt):new Date(rt.$y,__$t__,Wt),rt);return lt?Jt:Jt.endOf(c)},G=function(Wt,__$t__){return P.w(rt.toDate()[Wt].apply(rt.toDate("s"),(lt?[0,0,0,0]:[23,59,59,999]).slice(__$t__)),rt)},tt=this.$W,Q=this.$M,Et=this.$D,Bt="set"+(this.$u?"UTC":"");switch(at){case x:return lt?U(1,0):U(31,11);case f:return lt?U(1,Q):U(0,Q+1);case l:var Lt=this.$locale().weekStart||0,wt=(tt<Lt?tt+7:tt)-Lt;return U(lt?Et-wt:Et+(6-wt),Q);case c:case p:return G(Bt+"Hours",0);case u:return G(Bt+"Minutes",1);case a:return G(Bt+"Seconds",2);case o:return G(Bt+"Milliseconds",3);default:return this.clone()}},V.endOf=function(J){return this.startOf(J,!1)},V.$set=function(J,ot){var rt,lt=P.p(J),at="set"+(this.$u?"UTC":""),U=(rt={},rt[c]=at+"Date",rt[p]=at+"Date",rt[f]=at+"Month",rt[x]=at+"FullYear",rt[u]=at+"Hours",rt[a]=at+"Minutes",rt[o]=at+"Seconds",rt[s]=at+"Milliseconds",rt)[lt],G=lt===c?this.$D+(ot-this.$W):ot;if(lt===f||lt===x){var tt=this.clone().set(p,1);tt.$d[U](G),tt.init(),this.$d=tt.set(p,Math.min(this.$D,tt.daysInMonth())).$d}else U&&this.$d[U](G);return this.init(),this},V.set=function(J,ot){return this.clone().$set(J,ot)},V.get=function(J){return this[P.p(J)]()},V.add=function(J,ot){var rt,lt=this;J=Number(J);var at=P.p(ot),U=function(Q){var Et=O(lt);return P.w(Et.date(Et.date()+Math.round(Q*J)),lt)};if(at===f)return this.set(f,this.$M+J);if(at===x)return this.set(x,this.$y+J);if(at===c)return U(1);if(at===l)return U(7);var G=(rt={},rt[a]=r,rt[u]=i,rt[o]=e,rt)[at]||1,tt=this.$d.getTime()+J*G;return P.w(tt,this)},V.subtract=function(J,ot){return this.add(-1*J,ot)},V.format=function(J){var ot=this,rt=this.$locale();if(!this.isValid())return rt.invalidDate||y;var lt=J||"YYYY-MM-DDTHH:mm:ssZ",at=P.z(this),U=this.$H,G=this.$m,tt=this.$M,Q=rt.weekdays,Et=rt.months,Bt=rt.meridiem,Lt=function(__$t__,Jt,Kt,Tt){return __$t__&&(__$t__[Jt]||__$t__(ot,lt))||Kt[Jt].slice(0,Tt)},wt=function(__$t__){return P.s(U%12||12,__$t__,"0")},Wt=Bt||function(__$t__,Jt,Kt){var Tt=__$t__<12?"AM":"PM";return Kt?Tt.toLowerCase():Tt};return lt.replace(E,function(__$t__,Jt){return Jt||function(Kt){switch(Kt){case"YY":return String(ot.$y).slice(-2);case"YYYY":return P.s(ot.$y,4,"0");case"M":return tt+1;case"MM":return P.s(tt+1,2,"0");case"MMM":return Lt(rt.monthsShort,tt,Et,3);case"MMMM":return Lt(Et,tt);case"D":return ot.$D;case"DD":return P.s(ot.$D,2,"0");case"d":return String(ot.$W);case"dd":return Lt(rt.weekdaysMin,ot.$W,Q,2);case"ddd":return Lt(rt.weekdaysShort,ot.$W,Q,3);case"dddd":return Q[ot.$W];case"H":return String(U);case"HH":return P.s(U,2,"0");case"h":return wt(1);case"hh":return wt(2);case"a":return Wt(U,G,!0);case"A":return Wt(U,G,!1);case"m":return String(G);case"mm":return P.s(G,2,"0");case"s":return String(ot.$s);case"ss":return P.s(ot.$s,2,"0");case"SSS":return P.s(ot.$ms,3,"0");case"Z":return at}return null}(__$t__)||at.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(J,ot,rt){var lt,at=this,U=P.p(ot),G=O(J),tt=(G.utcOffset()-this.utcOffset())*r,Q=this-G,Et=function(){return P.m(at,G)};switch(U){case x:lt=Et()/12;break;case f:lt=Et();break;case h:lt=Et()/3;break;case l:lt=(Q-tt)/6048e5;break;case c:lt=(Q-tt)/864e5;break;case u:lt=Q/i;break;case a:lt=Q/r;break;case o:lt=Q/e;break;default:lt=Q}return rt?lt:P.a(lt)},V.daysInMonth=function(){return this.endOf(f).$D},V.$locale=function(){return I[this.$L]},V.locale=function(J,ot){if(!J)return this.$L;var rt=this.clone(),lt=X(J,ot,!0);return lt&&(rt.$L=lt),rt},V.clone=function(){return P.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},K}(),j=q.prototype;return O.prototype=j,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",c],["$M",f],["$y",x],["$D",p]].forEach(function(K){j[K[1]]=function(V){return this.$g(V,K[0],K[1])}}),O.extend=function(K,V){return K.$i||(K(V,q,O),K.$i=!0),O},O.locale=X,O.isDayjs=z,O.unix=function(K){return O(1e3*K)},O.en=I[S],O.Ls=I,O.p={},O})})(gy);const vy=()=>{var r;const n={},t=((r=window.location.href.split("?"))==null?void 0:r[1])||"",e=new URLSearchParams(t);for(const[i,s]of e.entries())n[i]=s;return n};function cu(n){return Object.prototype.toString.call(n).slice(8,-1)}function da(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16))}function wy(n){return{all:n=n||new Map,on:function(t,e){var r=n.get(t);r?r.push(e):n.set(t,[e])},off:function(t,e){var r=n.get(t);r&&(e?r.splice(r.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var r=n.get(t);r&&r.slice().map(function(i){i(e)}),(r=n.get("*"))&&r.slice().map(function(i){i(t,e)})}}}const pa=wy();class by{constructor(t={}){this._options=Ut({url:t.socketUrl,onOpen:null,onClose:null,onError:null,onMessage:null},t),this._client=null,this._isConnect=!1,this._closeClient=!1,this._retryCount=0,this._retryTimes=10,this._retryInterval=1e4,this._retryIntervalObj=null,this._initSockjs()}_initSockjs(){const{url:t,onOpen:e,onClose:r,onError:i,onMessage:s,token:o}=this._options;WebSocket!==void 0?this._client=new WebSocket(t,[o]):this.$message({type:"error",message:"当前浏览器不支持WebSocket推送!"}),this._client.onopen=a=>{this._client.readyState===WebSocket.OPEN&&(this._retryCount=0,this._isConnect=!0,this._closeClient=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null),e&&e(a)},this._client.onclose=a=>{!this._closeClient&&this.retryIntervalStart(),this._isConnect=!1,r&&r(a)},this._client.onerror=a=>{i&&i(a)},this._client.onmessage=a=>{s&&s(a)}}_reconnect(){if(this._retryCount===this._retryTimes){this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null;return}this._client=null,this._initSockjs(),this._retryCount++}retryIntervalStart(){this._closeClient=!0,this._retryIntervalObj||(this._retryIntervalObj=setInterval(()=>{this._reconnect()},this._retryInterval))}sendMsg(t){this._isConnect&&this._client.send(t)}destroy(){this._client&&(this._isConnect=!1,this._retryIntervalObj&&clearInterval(this._retryIntervalObj),this._retryIntervalObj=null,this._closeClient=!0,this._client.close(),this._client=null)}}const Ey=(n,t)=>new Promise((e,r)=>{sr.postApi("/filehandle/save",{path:n,data:t}).then(i=>{i.res.success?e(!0):r(!1)})});Ft.createPinia();var Ay={exports:{}};function _i(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xa={exports:{}},lu;function Mt(){return lu||(lu=1,function(n,t){(function(e,r){n.exports=r()})(yt,function(){var e=e||function(r,i){var s;if(typeof window!="undefined"&&window.crypto&&(s=window.crypto),typeof self!="undefined"&&self.crypto&&(s=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window!="undefined"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof yt!="undefined"&&yt.crypto&&(s=yt.crypto),!s&&typeof _i=="function")try{s=Ji}catch(A){}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch(A){}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch(A){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function A(){}return function(b){var _;return A.prototype=b,_=new A,A.prototype=null,_}}(),u={},c=u.lib={},l=c.Base=function(){return{extend:function(A){var b=a(this);return A&&b.mixIn(A),(!b.hasOwnProperty("init")||this.init===b.init)&&(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var A=this.extend();return A.init.apply(A,arguments),A},init:function(){},mixIn:function(A){for(var b in A)A.hasOwnProperty(b)&&(this[b]=A[b]);A.hasOwnProperty("toString")&&(this.toString=A.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=l.extend({init:function(A,b){A=this.words=A||[],b!=i?this.sigBytes=b:this.sigBytes=A.length*4},toString:function(A){return(A||x).stringify(this)},concat:function(A){var b=this.words,_=A.words,S=this.sigBytes,I=A.sigBytes;if(this.clamp(),S%4)for(var R=0;R<I;R++){var z=_[R>>>2]>>>24-R%4*8&255;b[S+R>>>2]|=z<<24-(S+R)%4*8}else for(var X=0;X<I;X+=4)b[S+X>>>2]=_[X>>>2];return this.sigBytes+=I,this},clamp:function(){var A=this.words,b=this.sigBytes;A[b>>>2]&=4294967295<<32-b%4*8,A.length=r.ceil(b/4)},clone:function(){var A=l.clone.call(this);return A.words=this.words.slice(0),A},random:function(A){for(var b=[],_=0;_<A;_+=4)b.push(o());return new f.init(b,A)}}),h=u.enc={},x=h.Hex={stringify:function(A){for(var b=A.words,_=A.sigBytes,S=[],I=0;I<_;I++){var R=b[I>>>2]>>>24-I%4*8&255;S.push((R>>>4).toString(16)),S.push((R&15).toString(16))}return S.join("")},parse:function(A){for(var b=A.length,_=[],S=0;S<b;S+=2)_[S>>>3]|=parseInt(A.substr(S,2),16)<<24-S%8*4;return new f.init(_,b/2)}},p=h.Latin1={stringify:function(A){for(var b=A.words,_=A.sigBytes,S=[],I=0;I<_;I++){var R=b[I>>>2]>>>24-I%4*8&255;S.push(String.fromCharCode(R))}return S.join("")},parse:function(A){for(var b=A.length,_=[],S=0;S<b;S++)_[S>>>2]|=(A.charCodeAt(S)&255)<<24-S%4*8;return new f.init(_,b)}},y=h.Utf8={stringify:function(A){try{return decodeURIComponent(escape(p.stringify(A)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(A){return p.parse(unescape(encodeURIComponent(A)))}},g=c.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(A){typeof A=="string"&&(A=y.parse(A)),this._data.concat(A),this._nDataBytes+=A.sigBytes},_process:function(A){var b,_=this._data,S=_.words,I=_.sigBytes,R=this.blockSize,z=R*4,X=I/z;A?X=r.ceil(X):X=r.max((X|0)-this._minBufferSize,0);var O=X*R,P=r.min(O*4,I);if(O){for(var q=0;q<O;q+=R)this._doProcessBlock(S,q);b=S.splice(0,O),_.sigBytes-=P}return new f.init(b,P)},clone:function(){var A=l.clone.call(this);return A._data=this._data.clone(),A},_minBufferSize:0});c.Hasher=g.extend({cfg:l.extend(),init:function(A){this.cfg=this.cfg.extend(A),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(A){return this._append(A),this._process(),this},finalize:function(A){A&&this._append(A);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(A){return function(b,_){return new A.init(_).finalize(b)}},_createHmacHelper:function(A){return function(b,_){return new E.HMAC.init(A,_).finalize(b)}}});var E=u.algo={};return u}(Math);return e})}(xa)),xa.exports}var ma={exports:{}},uu;function Bs(){return uu||(uu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(r){var i=e,s=i.lib,o=s.Base,a=s.WordArray,u=i.x64={};u.Word=o.extend({init:function(c,l){this.high=c,this.low=l}}),u.WordArray=o.extend({init:function(c,l){c=this.words=c||[],l!=r?this.sigBytes=l:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,l=c.length,f=[],h=0;h<l;h++){var x=c[h];f.push(x.high),f.push(x.low)}return a.create(f,this.sigBytes)},clone:function(){for(var c=o.clone.call(this),l=c.words=this.words.slice(0),f=l.length,h=0;h<f;h++)l[h]=l[h].clone();return c}})}(),e})}(ma)),ma.exports}var ya={exports:{}},hu;function _y(){return hu||(hu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(){if(typeof ArrayBuffer=="function"){var r=e,i=r.lib,s=i.WordArray,o=s.init,a=s.init=function(u){if(u instanceof ArrayBuffer&&(u=new Uint8Array(u)),(u instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&u instanceof Uint8ClampedArray||u instanceof Int16Array||u instanceof Uint16Array||u instanceof Int32Array||u instanceof Uint32Array||u instanceof Float32Array||u instanceof Float64Array)&&(u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength)),u instanceof Uint8Array){for(var c=u.byteLength,l=[],f=0;f<c;f++)l[f>>>2]|=u[f]<<24-f%4*8;o.call(this,l,c)}else o.apply(this,arguments)};a.prototype=s}}(),e.lib.WordArray})}(ya)),ya.exports}var ga={exports:{}},fu;function Sy(){return fu||(fu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=r.enc;o.Utf16=o.Utf16BE={stringify:function(u){for(var c=u.words,l=u.sigBytes,f=[],h=0;h<l;h+=2){var x=c[h>>>2]>>>16-h%4*8&65535;f.push(String.fromCharCode(x))}return f.join("")},parse:function(u){for(var c=u.length,l=[],f=0;f<c;f++)l[f>>>1]|=u.charCodeAt(f)<<16-f%2*16;return s.create(l,c*2)}},o.Utf16LE={stringify:function(u){for(var c=u.words,l=u.sigBytes,f=[],h=0;h<l;h+=2){var x=a(c[h>>>2]>>>16-h%4*8&65535);f.push(String.fromCharCode(x))}return f.join("")},parse:function(u){for(var c=u.length,l=[],f=0;f<c;f++)l[f>>>1]|=a(u.charCodeAt(f)<<16-f%2*16);return s.create(l,c*2)}};function a(u){return u<<8&4278255360|u>>>8&16711935}}(),e.enc.Utf16})}(ga)),ga.exports}var va={exports:{}},du;function Kr(){return du||(du=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=r.enc;o.Base64={stringify:function(u){var c=u.words,l=u.sigBytes,f=this._map;u.clamp();for(var h=[],x=0;x<l;x+=3)for(var p=c[x>>>2]>>>24-x%4*8&255,y=c[x+1>>>2]>>>24-(x+1)%4*8&255,g=c[x+2>>>2]>>>24-(x+2)%4*8&255,E=p<<16|y<<8|g,A=0;A<4&&x+A*.75<l;A++)h.push(f.charAt(E>>>6*(3-A)&63));var b=f.charAt(64);if(b)for(;h.length%4;)h.push(b);return h.join("")},parse:function(u){var c=u.length,l=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<l.length;h++)f[l.charCodeAt(h)]=h}var x=l.charAt(64);if(x){var p=u.indexOf(x);p!==-1&&(c=p)}return a(u,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,c,l){for(var f=[],h=0,x=0;x<c;x++)if(x%4){var p=l[u.charCodeAt(x-1)]<<x%4*2,y=l[u.charCodeAt(x)]>>>6-x%4*2,g=p|y;f[h>>>2]|=g<<24-h%4*8,h++}return s.create(f,h)}}(),e.enc.Base64})}(va)),va.exports}var wa={exports:{}},pu;function Cy(){return pu||(pu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=r.enc;o.Base64url={stringify:function(u,c){c===void 0&&(c=!0);var l=u.words,f=u.sigBytes,h=c?this._safe_map:this._map;u.clamp();for(var x=[],p=0;p<f;p+=3)for(var y=l[p>>>2]>>>24-p%4*8&255,g=l[p+1>>>2]>>>24-(p+1)%4*8&255,E=l[p+2>>>2]>>>24-(p+2)%4*8&255,A=y<<16|g<<8|E,b=0;b<4&&p+b*.75<f;b++)x.push(h.charAt(A>>>6*(3-b)&63));var _=h.charAt(64);if(_)for(;x.length%4;)x.push(_);return x.join("")},parse:function(u,c){c===void 0&&(c=!0);var l=u.length,f=c?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var x=0;x<f.length;x++)h[f.charCodeAt(x)]=x}var p=f.charAt(64);if(p){var y=u.indexOf(p);y!==-1&&(l=y)}return a(u,l,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(u,c,l){for(var f=[],h=0,x=0;x<c;x++)if(x%4){var p=l[u.charCodeAt(x-1)]<<x%4*2,y=l[u.charCodeAt(x)]>>>6-x%4*2,g=p|y;f[h>>>2]|=g<<24-h%4*8,h++}return s.create(f,h)}}(),e.enc.Base64url})}(wa)),wa.exports}var ba={exports:{}},xu;function Jr(){return xu||(xu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(r){var i=e,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,c=[];(function(){for(var y=0;y<64;y++)c[y]=r.abs(r.sin(y+1))*4294967296|0})();var l=u.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(y,g){for(var E=0;E<16;E++){var A=g+E,b=y[A];y[A]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}var _=this._hash.words,S=y[g+0],I=y[g+1],R=y[g+2],z=y[g+3],X=y[g+4],O=y[g+5],P=y[g+6],q=y[g+7],j=y[g+8],K=y[g+9],V=y[g+10],J=y[g+11],ot=y[g+12],rt=y[g+13],lt=y[g+14],at=y[g+15],U=_[0],G=_[1],tt=_[2],Q=_[3];U=f(U,G,tt,Q,S,7,c[0]),Q=f(Q,U,G,tt,I,12,c[1]),tt=f(tt,Q,U,G,R,17,c[2]),G=f(G,tt,Q,U,z,22,c[3]),U=f(U,G,tt,Q,X,7,c[4]),Q=f(Q,U,G,tt,O,12,c[5]),tt=f(tt,Q,U,G,P,17,c[6]),G=f(G,tt,Q,U,q,22,c[7]),U=f(U,G,tt,Q,j,7,c[8]),Q=f(Q,U,G,tt,K,12,c[9]),tt=f(tt,Q,U,G,V,17,c[10]),G=f(G,tt,Q,U,J,22,c[11]),U=f(U,G,tt,Q,ot,7,c[12]),Q=f(Q,U,G,tt,rt,12,c[13]),tt=f(tt,Q,U,G,lt,17,c[14]),G=f(G,tt,Q,U,at,22,c[15]),U=h(U,G,tt,Q,I,5,c[16]),Q=h(Q,U,G,tt,P,9,c[17]),tt=h(tt,Q,U,G,J,14,c[18]),G=h(G,tt,Q,U,S,20,c[19]),U=h(U,G,tt,Q,O,5,c[20]),Q=h(Q,U,G,tt,V,9,c[21]),tt=h(tt,Q,U,G,at,14,c[22]),G=h(G,tt,Q,U,X,20,c[23]),U=h(U,G,tt,Q,K,5,c[24]),Q=h(Q,U,G,tt,lt,9,c[25]),tt=h(tt,Q,U,G,z,14,c[26]),G=h(G,tt,Q,U,j,20,c[27]),U=h(U,G,tt,Q,rt,5,c[28]),Q=h(Q,U,G,tt,R,9,c[29]),tt=h(tt,Q,U,G,q,14,c[30]),G=h(G,tt,Q,U,ot,20,c[31]),U=x(U,G,tt,Q,O,4,c[32]),Q=x(Q,U,G,tt,j,11,c[33]),tt=x(tt,Q,U,G,J,16,c[34]),G=x(G,tt,Q,U,lt,23,c[35]),U=x(U,G,tt,Q,I,4,c[36]),Q=x(Q,U,G,tt,X,11,c[37]),tt=x(tt,Q,U,G,q,16,c[38]),G=x(G,tt,Q,U,V,23,c[39]),U=x(U,G,tt,Q,rt,4,c[40]),Q=x(Q,U,G,tt,S,11,c[41]),tt=x(tt,Q,U,G,z,16,c[42]),G=x(G,tt,Q,U,P,23,c[43]),U=x(U,G,tt,Q,K,4,c[44]),Q=x(Q,U,G,tt,ot,11,c[45]),tt=x(tt,Q,U,G,at,16,c[46]),G=x(G,tt,Q,U,R,23,c[47]),U=p(U,G,tt,Q,S,6,c[48]),Q=p(Q,U,G,tt,q,10,c[49]),tt=p(tt,Q,U,G,lt,15,c[50]),G=p(G,tt,Q,U,O,21,c[51]),U=p(U,G,tt,Q,ot,6,c[52]),Q=p(Q,U,G,tt,z,10,c[53]),tt=p(tt,Q,U,G,V,15,c[54]),G=p(G,tt,Q,U,I,21,c[55]),U=p(U,G,tt,Q,j,6,c[56]),Q=p(Q,U,G,tt,at,10,c[57]),tt=p(tt,Q,U,G,P,15,c[58]),G=p(G,tt,Q,U,rt,21,c[59]),U=p(U,G,tt,Q,X,6,c[60]),Q=p(Q,U,G,tt,J,10,c[61]),tt=p(tt,Q,U,G,R,15,c[62]),G=p(G,tt,Q,U,K,21,c[63]),_[0]=_[0]+U|0,_[1]=_[1]+G|0,_[2]=_[2]+tt|0,_[3]=_[3]+Q|0},_doFinalize:function(){var y=this._data,g=y.words,E=this._nDataBytes*8,A=y.sigBytes*8;g[A>>>5]|=128<<24-A%32;var b=r.floor(E/4294967296),_=E;g[(A+64>>>9<<4)+15]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,g[(A+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,y.sigBytes=(g.length+1)*4,this._process();for(var S=this._hash,I=S.words,R=0;R<4;R++){var z=I[R];I[R]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360}return S},clone:function(){var y=a.clone.call(this);return y._hash=this._hash.clone(),y}});function f(y,g,E,A,b,_,S){var I=y+(g&E|~g&A)+b+S;return(I<<_|I>>>32-_)+g}function h(y,g,E,A,b,_,S){var I=y+(g&A|E&~A)+b+S;return(I<<_|I>>>32-_)+g}function x(y,g,E,A,b,_,S){var I=y+(g^E^A)+b+S;return(I<<_|I>>>32-_)+g}function p(y,g,E,A,b,_,S){var I=y+(E^(g|~A))+b+S;return(I<<_|I>>>32-_)+g}i.MD5=a._createHelper(l),i.HmacMD5=a._createHmacHelper(l)}(Math),e.MD5})}(ba)),ba.exports}var Ea={exports:{}},mu;function yu(){return mu||(mu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=i.Hasher,a=r.algo,u=[],c=a.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,f){for(var h=this._hash.words,x=h[0],p=h[1],y=h[2],g=h[3],E=h[4],A=0;A<80;A++){if(A<16)u[A]=l[f+A]|0;else{var b=u[A-3]^u[A-8]^u[A-14]^u[A-16];u[A]=b<<1|b>>>31}var _=(x<<5|x>>>27)+E+u[A];A<20?_+=(p&y|~p&g)+1518500249:A<40?_+=(p^y^g)+1859775393:A<60?_+=(p&y|p&g|y&g)-1894007588:_+=(p^y^g)-899497514,E=g,g=y,y=p<<30|p>>>2,p=x,x=_}h[0]=h[0]+x|0,h[1]=h[1]+p|0,h[2]=h[2]+y|0,h[3]=h[3]+g|0,h[4]=h[4]+E|0},_doFinalize:function(){var l=this._data,f=l.words,h=this._nDataBytes*8,x=l.sigBytes*8;return f[x>>>5]|=128<<24-x%32,f[(x+64>>>9<<4)+14]=Math.floor(h/4294967296),f[(x+64>>>9<<4)+15]=h,l.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var l=o.clone.call(this);return l._hash=this._hash.clone(),l}});r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c)}(),e.SHA1})}(Ea)),Ea.exports}var Aa={exports:{}},gu;function _a(){return gu||(gu=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){return function(r){var i=e,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,c=[],l=[];(function(){function x(E){for(var A=r.sqrt(E),b=2;b<=A;b++)if(!(E%b))return!1;return!0}function p(E){return(E-(E|0))*4294967296|0}for(var y=2,g=0;g<64;)x(y)&&(g<8&&(c[g]=p(r.pow(y,1/2))),l[g]=p(r.pow(y,1/3)),g++),y++})();var f=[],h=u.SHA256=a.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(x,p){for(var y=this._hash.words,g=y[0],E=y[1],A=y[2],b=y[3],_=y[4],S=y[5],I=y[6],R=y[7],z=0;z<64;z++){if(z<16)f[z]=x[p+z]|0;else{var X=f[z-15],O=(X<<25|X>>>7)^(X<<14|X>>>18)^X>>>3,P=f[z-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;f[z]=O+f[z-7]+q+f[z-16]}var j=_&S^~_&I,K=g&E^g&A^E&A,V=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),J=(_<<26|_>>>6)^(_<<21|_>>>11)^(_<<7|_>>>25),ot=R+J+j+l[z]+f[z],rt=V+K;R=I,I=S,S=_,_=b+ot|0,b=A,A=E,E=g,g=ot+rt|0}y[0]=y[0]+g|0,y[1]=y[1]+E|0,y[2]=y[2]+A|0,y[3]=y[3]+b|0,y[4]=y[4]+_|0,y[5]=y[5]+S|0,y[6]=y[6]+I|0,y[7]=y[7]+R|0},_doFinalize:function(){var x=this._data,p=x.words,y=this._nDataBytes*8,g=x.sigBytes*8;return p[g>>>5]|=128<<24-g%32,p[(g+64>>>9<<4)+14]=r.floor(y/4294967296),p[(g+64>>>9<<4)+15]=y,x.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var x=a.clone.call(this);return x._hash=this._hash.clone(),x}});i.SHA256=a._createHelper(h),i.HmacSHA256=a._createHmacHelper(h)}(Math),e.SHA256})}(Aa)),Aa.exports}var Sa={exports:{}},vu;function By(){return vu||(vu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),_a())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=r.algo,a=o.SHA256,u=o.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});r.SHA224=a._createHelper(u),r.HmacSHA224=a._createHmacHelper(u)}(),e.SHA224})}(Sa)),Sa.exports}var Ca={exports:{}},wu;function bu(){return wu||(wu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Bs())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.Hasher,o=r.x64,a=o.Word,u=o.WordArray,c=r.algo;function l(){return a.create.apply(a,arguments)}var f=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],h=[];(function(){for(var p=0;p<80;p++)h[p]=l()})();var x=c.SHA512=s.extend({_doReset:function(){this._hash=new u.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(p,y){for(var g=this._hash.words,E=g[0],A=g[1],b=g[2],_=g[3],S=g[4],I=g[5],R=g[6],z=g[7],X=E.high,O=E.low,P=A.high,q=A.low,j=b.high,K=b.low,V=_.high,J=_.low,ot=S.high,rt=S.low,lt=I.high,at=I.low,U=R.high,G=R.low,tt=z.high,Q=z.low,Et=X,Bt=O,Lt=P,wt=q,Wt=j,__$t__=K,Jt=V,Kt=J,Tt=ot,jt=rt,ce=lt,M=at,d=U,m=G,B=tt,N=Q,Z=0;Z<80;Z++){var nt,mt,vt=h[Z];if(Z<16)mt=vt.high=p[y+Z*2]|0,nt=vt.low=p[y+Z*2+1]|0;else{var Rt=h[Z-15],zt=Rt.high,Ot=Rt.low,Ke=(zt>>>1|Ot<<31)^(zt>>>8|Ot<<24)^zt>>>7,hr=(Ot>>>1|zt<<31)^(Ot>>>8|zt<<24)^(Ot>>>7|zt<<25),fr=h[Z-2],Je=fr.high,dr=fr.low,Jn=(Je>>>19|dr<<13)^(Je<<3|dr>>>29)^Je>>>6,pr=(dr>>>19|Je<<13)^(dr<<3|Je>>>29)^(dr>>>6|Je<<26),Zn=h[Z-7],Qn=Zn.high,hn=Zn.low,Ur=h[Z-16],Hi=Ur.high,Te=Ur.low;nt=hr+hn,mt=Ke+Qn+(nt>>>0<hr>>>0?1:0),nt=nt+pr,mt=mt+Jn+(nt>>>0<pr>>>0?1:0),nt=nt+Te,mt=mt+Hi+(nt>>>0<Te>>>0?1:0),vt.high=mt,vt.low=nt}var qi=Tt&ce^~Tt&d,ti=jt&M^~jt&m,ei=Et&Lt^Et&Wt^Lt&Wt,Wi=Bt&wt^Bt&__$t__^wt&__$t__,Vi=(Et>>>28|Bt<<4)^(Et<<30|Bt>>>2)^(Et<<25|Bt>>>7),ri=(Bt>>>28|Et<<4)^(Bt<<30|Et>>>2)^(Bt<<25|Et>>>7),ji=(Tt>>>14|jt<<18)^(Tt>>>18|jt<<14)^(Tt<<23|jt>>>9),Gi=(jt>>>14|Tt<<18)^(jt>>>18|Tt<<14)^(jt<<23|Tt>>>9),ni=f[Z],Xi=ni.high,ii=ni.low,ye=N+Gi,Ne=B+ji+(ye>>>0<N>>>0?1:0),ye=ye+ti,Ne=Ne+qi+(ye>>>0<ti>>>0?1:0),ye=ye+ii,Ne=Ne+Xi+(ye>>>0<ii>>>0?1:0),ye=ye+nt,Ne=Ne+mt+(ye>>>0<nt>>>0?1:0),fn=ri+Wi,Yi=Vi+ei+(fn>>>0<ri>>>0?1:0);B=d,N=m,d=ce,m=M,ce=Tt,M=jt,jt=Kt+ye|0,Tt=Jt+Ne+(jt>>>0<Kt>>>0?1:0)|0,Jt=Wt,Kt=__$t__,Wt=Lt,__$t__=wt,Lt=Et,wt=Bt,Bt=ye+fn|0,Et=Ne+Yi+(Bt>>>0<ye>>>0?1:0)|0}O=E.low=O+Bt,E.high=X+Et+(O>>>0<Bt>>>0?1:0),q=A.low=q+wt,A.high=P+Lt+(q>>>0<wt>>>0?1:0),K=b.low=K+__$t__,b.high=j+Wt+(K>>>0<__$t__>>>0?1:0),J=_.low=J+Kt,_.high=V+Jt+(J>>>0<Kt>>>0?1:0),rt=S.low=rt+jt,S.high=ot+Tt+(rt>>>0<jt>>>0?1:0),at=I.low=at+M,I.high=lt+ce+(at>>>0<M>>>0?1:0),G=R.low=G+m,R.high=U+d+(G>>>0<m>>>0?1:0),Q=z.low=Q+N,z.high=tt+B+(Q>>>0<N>>>0?1:0)},_doFinalize:function(){var p=this._data,y=p.words,g=this._nDataBytes*8,E=p.sigBytes*8;y[E>>>5]|=128<<24-E%32,y[(E+128>>>10<<5)+30]=Math.floor(g/4294967296),y[(E+128>>>10<<5)+31]=g,p.sigBytes=y.length*4,this._process();var A=this._hash.toX32();return A},clone:function(){var p=s.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=s._createHelper(x),r.HmacSHA512=s._createHmacHelper(x)}(),e.SHA512})}(Ca)),Ca.exports}var Ba={exports:{}},Eu;function Fy(){return Eu||(Eu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Bs(),bu())})(yt,function(e){return function(){var r=e,i=r.x64,s=i.Word,o=i.WordArray,a=r.algo,u=a.SHA512,c=a.SHA384=u.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var l=u._doFinalize.call(this);return l.sigBytes-=16,l}});r.SHA384=u._createHelper(c),r.HmacSHA384=u._createHmacHelper(c)}(),e.SHA384})}(Ba)),Ba.exports}var Fa={exports:{}},Au;function Dy(){return Au||(Au=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Bs())})(yt,function(e){return function(r){var i=e,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.x64,c=u.Word,l=i.algo,f=[],h=[],x=[];(function(){for(var g=1,E=0,A=0;A<24;A++){f[g+5*E]=(A+1)*(A+2)/2%64;var b=E%5,_=(2*g+3*E)%5;g=b,E=_}for(var g=0;g<5;g++)for(var E=0;E<5;E++)h[g+5*E]=E+(2*g+3*E)%5*5;for(var S=1,I=0;I<24;I++){for(var R=0,z=0,X=0;X<7;X++){if(S&1){var O=(1<<X)-1;O<32?z^=1<<O:R^=1<<O-32}S&128?S=S<<1^113:S<<=1}x[I]=c.create(R,z)}})();var p=[];(function(){for(var g=0;g<25;g++)p[g]=c.create()})();var y=l.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var g=this._state=[],E=0;E<25;E++)g[E]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(g,E){for(var A=this._state,b=this.blockSize/2,_=0;_<b;_++){var S=g[E+2*_],I=g[E+2*_+1];S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360;var R=A[_];R.high^=I,R.low^=S}for(var z=0;z<24;z++){for(var X=0;X<5;X++){for(var O=0,P=0,q=0;q<5;q++){var R=A[X+5*q];O^=R.high,P^=R.low}var j=p[X];j.high=O,j.low=P}for(var X=0;X<5;X++)for(var K=p[(X+4)%5],V=p[(X+1)%5],J=V.high,ot=V.low,O=K.high^(J<<1|ot>>>31),P=K.low^(ot<<1|J>>>31),q=0;q<5;q++){var R=A[X+5*q];R.high^=O,R.low^=P}for(var rt=1;rt<25;rt++){var O,P,R=A[rt],lt=R.high,at=R.low,U=f[rt];U<32?(O=lt<<U|at>>>32-U,P=at<<U|lt>>>32-U):(O=at<<U-32|lt>>>64-U,P=lt<<U-32|at>>>64-U);var G=p[h[rt]];G.high=O,G.low=P}var tt=p[0],Q=A[0];tt.high=Q.high,tt.low=Q.low;for(var X=0;X<5;X++)for(var q=0;q<5;q++){var rt=X+5*q,R=A[rt],Et=p[rt],Bt=p[(X+1)%5+5*q],Lt=p[(X+2)%5+5*q];R.high=Et.high^~Bt.high&Lt.high,R.low=Et.low^~Bt.low&Lt.low}var R=A[0],wt=x[z];R.high^=wt.high,R.low^=wt.low}},_doFinalize:function(){var g=this._data,E=g.words;this._nDataBytes*8;var A=g.sigBytes*8,b=this.blockSize*32;E[A>>>5]|=1<<24-A%32,E[(r.ceil((A+1)/b)*b>>>5)-1]|=128,g.sigBytes=E.length*4,this._process();for(var _=this._state,S=this.cfg.outputLength/8,I=S/8,R=[],z=0;z<I;z++){var X=_[z],O=X.high,P=X.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,R.push(P),R.push(O)}return new o.init(R,S)},clone:function(){for(var g=a.clone.call(this),E=g._state=this._state.slice(0),A=0;A<25;A++)E[A]=E[A].clone();return g}});i.SHA3=a._createHelper(y),i.HmacSHA3=a._createHmacHelper(y)}(Math),e.SHA3})}(Fa)),Fa.exports}var Da={exports:{}},_u;function My(){return _u||(_u=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){/** @preserve
18
+ (c) 2012 by Cédric Mesnil. All rights reserved.
19
+
20
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
21
+
22
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
23
+ - 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.
24
+
25
+ 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 HOLDER 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.
26
+ */return function(r){var i=e,s=i.lib,o=s.WordArray,a=s.Hasher,u=i.algo,c=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),h=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),x=o.create([0,1518500249,1859775393,2400959708,2840853838]),p=o.create([1352829926,1548603684,1836072691,2053994217,0]),y=u.RIPEMD160=a.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(I,R){for(var z=0;z<16;z++){var X=R+z,O=I[X];I[X]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var P=this._hash.words,q=x.words,j=p.words,K=c.words,V=l.words,J=f.words,ot=h.words,rt,lt,at,U,G,tt,Q,Et,Bt,Lt;tt=rt=P[0],Q=lt=P[1],Et=at=P[2],Bt=U=P[3],Lt=G=P[4];for(var wt,z=0;z<80;z+=1)wt=rt+I[R+K[z]]|0,z<16?wt+=g(lt,at,U)+q[0]:z<32?wt+=E(lt,at,U)+q[1]:z<48?wt+=A(lt,at,U)+q[2]:z<64?wt+=b(lt,at,U)+q[3]:wt+=_(lt,at,U)+q[4],wt=wt|0,wt=S(wt,J[z]),wt=wt+G|0,rt=G,G=U,U=S(at,10),at=lt,lt=wt,wt=tt+I[R+V[z]]|0,z<16?wt+=_(Q,Et,Bt)+j[0]:z<32?wt+=b(Q,Et,Bt)+j[1]:z<48?wt+=A(Q,Et,Bt)+j[2]:z<64?wt+=E(Q,Et,Bt)+j[3]:wt+=g(Q,Et,Bt)+j[4],wt=wt|0,wt=S(wt,ot[z]),wt=wt+Lt|0,tt=Lt,Lt=Bt,Bt=S(Et,10),Et=Q,Q=wt;wt=P[1]+at+Bt|0,P[1]=P[2]+U+Lt|0,P[2]=P[3]+G+tt|0,P[3]=P[4]+rt+Q|0,P[4]=P[0]+lt+Et|0,P[0]=wt},_doFinalize:function(){var I=this._data,R=I.words,z=this._nDataBytes*8,X=I.sigBytes*8;R[X>>>5]|=128<<24-X%32,R[(X+64>>>9<<4)+14]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360,I.sigBytes=(R.length+1)*4,this._process();for(var O=this._hash,P=O.words,q=0;q<5;q++){var j=P[q];P[q]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360}return O},clone:function(){var I=a.clone.call(this);return I._hash=this._hash.clone(),I}});function g(I,R,z){return I^R^z}function E(I,R,z){return I&R|~I&z}function A(I,R,z){return(I|~R)^z}function b(I,R,z){return I&z|R&~z}function _(I,R,z){return I^(R|~z)}function S(I,R){return I<<R|I>>>32-R}i.RIPEMD160=a._createHelper(y),i.HmacRIPEMD160=a._createHmacHelper(y)}(),e.RIPEMD160})}(Da)),Da.exports}var Ma={exports:{}},Su;function Ia(){return Su||(Su=1,function(n,t){(function(e,r){n.exports=r(Mt())})(yt,function(e){(function(){var r=e,i=r.lib,s=i.Base,o=r.enc,a=o.Utf8,u=r.algo;u.HMAC=s.extend({init:function(c,l){c=this._hasher=new c.init,typeof l=="string"&&(l=a.parse(l));var f=c.blockSize,h=f*4;l.sigBytes>h&&(l=c.finalize(l)),l.clamp();for(var x=this._oKey=l.clone(),p=this._iKey=l.clone(),y=x.words,g=p.words,E=0;E<f;E++)y[E]^=1549556828,g[E]^=909522486;x.sigBytes=p.sigBytes=h,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var l=this._hasher,f=l.finalize(c);l.reset();var h=l.finalize(this._oKey.clone().concat(f));return h}})})()})}(Ma)),Ma.exports}var Ta={exports:{}},Cu;function Iy(){return Cu||(Cu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),_a(),Ia())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,u=a.SHA256,c=a.HMAC,l=a.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,h){for(var x=this.cfg,p=c.create(x.hasher,f),y=o.create(),g=o.create([1]),E=y.words,A=g.words,b=x.keySize,_=x.iterations;E.length<b;){var S=p.update(h).finalize(g);p.reset();for(var I=S.words,R=I.length,z=S,X=1;X<_;X++){z=p.finalize(z),p.reset();for(var O=z.words,P=0;P<R;P++)I[P]^=O[P]}y.concat(S),A[0]++}return y.sigBytes=b*4,y}});r.PBKDF2=function(f,h,x){return l.create(x).compute(f,h)}}(),e.PBKDF2})}(Ta)),Ta.exports}var Ra={exports:{}},Bu;function Dr(){return Bu||(Bu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),yu(),Ia())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.Base,o=i.WordArray,a=r.algo,u=a.MD5,c=a.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:u,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,f){for(var h,x=this.cfg,p=x.hasher.create(),y=o.create(),g=y.words,E=x.keySize,A=x.iterations;g.length<E;){h&&p.update(h),h=p.update(l).finalize(f),p.reset();for(var b=1;b<A;b++)h=p.finalize(h),p.reset();y.concat(h)}return y.sigBytes=E*4,y}});r.EvpKDF=function(l,f,h){return c.create(h).compute(l,f)}}(),e.EvpKDF})}(Ra)),Ra.exports}var Oa={exports:{}},Fu;function fe(){return Fu||(Fu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Dr())})(yt,function(e){e.lib.Cipher||function(r){var i=e,s=i.lib,o=s.Base,a=s.WordArray,u=s.BufferedBlockAlgorithm,c=i.enc;c.Utf8;var l=c.Base64,f=i.algo,h=f.EvpKDF,x=s.Cipher=u.extend({cfg:o.extend(),createEncryptor:function(O,P){return this.create(this._ENC_XFORM_MODE,O,P)},createDecryptor:function(O,P){return this.create(this._DEC_XFORM_MODE,O,P)},init:function(O,P,q){this.cfg=this.cfg.extend(q),this._xformMode=O,this._key=P,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(O){return this._append(O),this._process()},finalize:function(O){O&&this._append(O);var P=this._doFinalize();return P},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function O(P){return typeof P=="string"?X:I}return function(P){return{encrypt:function(q,j,K){return O(j).encrypt(P,q,j,K)},decrypt:function(q,j,K){return O(j).decrypt(P,q,j,K)}}}}()});s.StreamCipher=x.extend({_doFinalize:function(){var O=this._process(!0);return O},blockSize:1});var p=i.mode={},y=s.BlockCipherMode=o.extend({createEncryptor:function(O,P){return this.Encryptor.create(O,P)},createDecryptor:function(O,P){return this.Decryptor.create(O,P)},init:function(O,P){this._cipher=O,this._iv=P}}),g=p.CBC=function(){var O=y.extend();O.Encryptor=O.extend({processBlock:function(q,j){var K=this._cipher,V=K.blockSize;P.call(this,q,j,V),K.encryptBlock(q,j),this._prevBlock=q.slice(j,j+V)}}),O.Decryptor=O.extend({processBlock:function(q,j){var K=this._cipher,V=K.blockSize,J=q.slice(j,j+V);K.decryptBlock(q,j),P.call(this,q,j,V),this._prevBlock=J}});function P(q,j,K){var V,J=this._iv;J?(V=J,this._iv=r):V=this._prevBlock;for(var ot=0;ot<K;ot++)q[j+ot]^=V[ot]}return O}(),E=i.pad={},A=E.Pkcs7={pad:function(O,P){for(var q=P*4,j=q-O.sigBytes%q,K=j<<24|j<<16|j<<8|j,V=[],J=0;J<j;J+=4)V.push(K);var ot=a.create(V,j);O.concat(ot)},unpad:function(O){var P=O.words[O.sigBytes-1>>>2]&255;O.sigBytes-=P}};s.BlockCipher=x.extend({cfg:x.cfg.extend({mode:g,padding:A}),reset:function(){var O;x.reset.call(this);var P=this.cfg,q=P.iv,j=P.mode;this._xformMode==this._ENC_XFORM_MODE?O=j.createEncryptor:(O=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==O?this._mode.init(this,q&&q.words):(this._mode=O.call(j,this,q&&q.words),this._mode.__creator=O)},_doProcessBlock:function(O,P){this._mode.processBlock(O,P)},_doFinalize:function(){var O,P=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(P.pad(this._data,this.blockSize),O=this._process(!0)):(O=this._process(!0),P.unpad(O)),O},blockSize:128/32});var b=s.CipherParams=o.extend({init:function(O){this.mixIn(O)},toString:function(O){return(O||this.formatter).stringify(this)}}),_=i.format={},S=_.OpenSSL={stringify:function(O){var P,q=O.ciphertext,j=O.salt;return j?P=a.create([1398893684,1701076831]).concat(j).concat(q):P=q,P.toString(l)},parse:function(O){var P,q=l.parse(O),j=q.words;return j[0]==1398893684&&j[1]==1701076831&&(P=a.create(j.slice(2,4)),j.splice(0,4),q.sigBytes-=16),b.create({ciphertext:q,salt:P})}},I=s.SerializableCipher=o.extend({cfg:o.extend({format:S}),encrypt:function(O,P,q,j){j=this.cfg.extend(j);var K=O.createEncryptor(q,j),V=K.finalize(P),J=K.cfg;return b.create({ciphertext:V,key:q,iv:J.iv,algorithm:O,mode:J.mode,padding:J.padding,blockSize:O.blockSize,formatter:j.format})},decrypt:function(O,P,q,j){j=this.cfg.extend(j),P=this._parse(P,j.format);var K=O.createDecryptor(q,j).finalize(P.ciphertext);return K},_parse:function(O,P){return typeof O=="string"?P.parse(O,this):O}}),R=i.kdf={},z=R.OpenSSL={execute:function(O,P,q,j,K){if(j||(j=a.random(64/8)),K)var V=h.create({keySize:P+q,hasher:K}).compute(O,j);else var V=h.create({keySize:P+q}).compute(O,j);var J=a.create(V.words.slice(P),q*4);return V.sigBytes=P*4,b.create({key:V,iv:J,salt:j})}},X=s.PasswordBasedCipher=I.extend({cfg:I.cfg.extend({kdf:z}),encrypt:function(O,P,q,j){j=this.cfg.extend(j);var K=j.kdf.execute(q,O.keySize,O.ivSize,j.salt,j.hasher);j.iv=K.iv;var V=I.encrypt.call(this,O,P,K.key,j);return V.mixIn(K),V},decrypt:function(O,P,q,j){j=this.cfg.extend(j),P=this._parse(P,j.format);var K=j.kdf.execute(q,O.keySize,O.ivSize,P.salt,j.hasher);j.iv=K.iv;var V=I.decrypt.call(this,O,P,K.key,j);return V}})}()})}(Oa)),Oa.exports}var Pa={exports:{}},Du;function Ty(){return Du||(Du=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.mode.CFB=function(){var r=e.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize;i.call(this,s,o,u,a),this._prevBlock=s.slice(o,o+u)}}),r.Decryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,c=s.slice(o,o+u);i.call(this,s,o,u,a),this._prevBlock=c}});function i(s,o,a,u){var c,l=this._iv;l?(c=l.slice(0),this._iv=void 0):c=this._prevBlock,u.encryptBlock(c,0);for(var f=0;f<a;f++)s[o+f]^=c[f]}return r}(),e.mode.CFB})}(Pa)),Pa.exports}var za={exports:{}},Mu;function Ry(){return Mu||(Mu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.mode.CTR=function(){var r=e.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,c=this._iv,l=this._counter;c&&(l=this._counter=c.slice(0),this._iv=void 0);var f=l.slice(0);a.encryptBlock(f,0),l[u-1]=l[u-1]+1|0;for(var h=0;h<u;h++)s[o+h]^=f[h]}});return r.Decryptor=i,r}(),e.mode.CTR})}(za)),za.exports}var ka={exports:{}},Iu;function Oy(){return Iu||(Iu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){/** @preserve
27
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
28
+ * derived from CryptoJS.mode.CTR
29
+ * Jan Hruby jhruby.web@gmail.com
30
+ */return e.mode.CTRGladman=function(){var r=e.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var u=a>>16&255,c=a>>8&255,l=a&255;u===255?(u=0,c===255?(c=0,l===255?l=0:++l):++c):++u,a=0,a+=u<<16,a+=c<<8,a+=l}else a+=1<<24;return a}function s(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var o=r.Encryptor=r.extend({processBlock:function(a,u){var c=this._cipher,l=c.blockSize,f=this._iv,h=this._counter;f&&(h=this._counter=f.slice(0),this._iv=void 0),s(h);var x=h.slice(0);c.encryptBlock(x,0);for(var p=0;p<l;p++)a[u+p]^=x[p]}});return r.Decryptor=o,r}(),e.mode.CTRGladman})}(ka)),ka.exports}var Na={exports:{}},Tu;function Py(){return Tu||(Tu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.mode.OFB=function(){var r=e.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var a=this._cipher,u=a.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(l,0);for(var f=0;f<u;f++)s[o+f]^=l[f]}});return r.Decryptor=i,r}(),e.mode.OFB})}(Na)),Na.exports}var La={exports:{}},Ru;function zy(){return Ru||(Ru=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.mode.ECB=function(){var r=e.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,s){this._cipher.encryptBlock(i,s)}}),r.Decryptor=r.extend({processBlock:function(i,s){this._cipher.decryptBlock(i,s)}}),r}(),e.mode.ECB})}(La)),La.exports}var Ua={exports:{}},Ou;function ky(){return Ou||(Ou=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.pad.AnsiX923={pad:function(r,i){var s=r.sigBytes,o=i*4,a=o-s%o,u=s+a-1;r.clamp(),r.words[u>>>2]|=a<<24-u%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},e.pad.Ansix923})}(Ua)),Ua.exports}var $a={exports:{}},Pu;function Ny(){return Pu||(Pu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.pad.Iso10126={pad:function(r,i){var s=i*4,o=s-r.sigBytes%s;r.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},e.pad.Iso10126})}($a)),$a.exports}var Ha={exports:{}},zu;function Ly(){return zu||(zu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.pad.Iso97971={pad:function(r,i){r.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(r,i)},unpad:function(r){e.pad.ZeroPadding.unpad(r),r.sigBytes--}},e.pad.Iso97971})}(Ha)),Ha.exports}var qa={exports:{}},ku;function Uy(){return ku||(ku=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.pad.ZeroPadding={pad:function(r,i){var s=i*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var i=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(i[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},e.pad.ZeroPadding})}(qa)),qa.exports}var Wa={exports:{}},Nu;function $y(){return Nu||(Nu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})}(Wa)),Wa.exports}var Va={exports:{}},Lu;function Hy(){return Lu||(Lu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),fe())})(yt,function(e){return function(r){var i=e,s=i.lib,o=s.CipherParams,a=i.enc,u=a.Hex,c=i.format;c.Hex={stringify:function(l){return l.ciphertext.toString(u)},parse:function(l){var f=u.parse(l);return o.create({ciphertext:f})}}}(),e.format.Hex})}(Va)),Va.exports}var ja={exports:{}},Uu;function qy(){return Uu||(Uu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.BlockCipher,o=r.algo,a=[],u=[],c=[],l=[],f=[],h=[],x=[],p=[],y=[],g=[];(function(){for(var b=[],_=0;_<256;_++)_<128?b[_]=_<<1:b[_]=_<<1^283;for(var S=0,I=0,_=0;_<256;_++){var R=I^I<<1^I<<2^I<<3^I<<4;R=R>>>8^R&255^99,a[S]=R,u[R]=S;var z=b[S],X=b[z],O=b[X],P=b[R]*257^R*16843008;c[S]=P<<24|P>>>8,l[S]=P<<16|P>>>16,f[S]=P<<8|P>>>24,h[S]=P;var P=O*16843009^X*65537^z*257^S*16843008;x[R]=P<<24|P>>>8,p[R]=P<<16|P>>>16,y[R]=P<<8|P>>>24,g[R]=P,S?(S=z^b[b[b[O^z]]],I^=b[b[I]]):S=I=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],A=o.AES=s.extend({_doReset:function(){var b;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,S=_.words,I=_.sigBytes/4,R=this._nRounds=I+6,z=(R+1)*4,X=this._keySchedule=[],O=0;O<z;O++)O<I?X[O]=S[O]:(b=X[O-1],O%I?I>6&&O%I==4&&(b=a[b>>>24]<<24|a[b>>>16&255]<<16|a[b>>>8&255]<<8|a[b&255]):(b=b<<8|b>>>24,b=a[b>>>24]<<24|a[b>>>16&255]<<16|a[b>>>8&255]<<8|a[b&255],b^=E[O/I|0]<<24),X[O]=X[O-I]^b);for(var P=this._invKeySchedule=[],q=0;q<z;q++){var O=z-q;if(q%4)var b=X[O];else var b=X[O-4];q<4||O<=4?P[q]=b:P[q]=x[a[b>>>24]]^p[a[b>>>16&255]]^y[a[b>>>8&255]]^g[a[b&255]]}}},encryptBlock:function(b,_){this._doCryptBlock(b,_,this._keySchedule,c,l,f,h,a)},decryptBlock:function(b,_){var S=b[_+1];b[_+1]=b[_+3],b[_+3]=S,this._doCryptBlock(b,_,this._invKeySchedule,x,p,y,g,u);var S=b[_+1];b[_+1]=b[_+3],b[_+3]=S},_doCryptBlock:function(b,_,S,I,R,z,X,O){for(var P=this._nRounds,q=b[_]^S[0],j=b[_+1]^S[1],K=b[_+2]^S[2],V=b[_+3]^S[3],J=4,ot=1;ot<P;ot++){var rt=I[q>>>24]^R[j>>>16&255]^z[K>>>8&255]^X[V&255]^S[J++],lt=I[j>>>24]^R[K>>>16&255]^z[V>>>8&255]^X[q&255]^S[J++],at=I[K>>>24]^R[V>>>16&255]^z[q>>>8&255]^X[j&255]^S[J++],U=I[V>>>24]^R[q>>>16&255]^z[j>>>8&255]^X[K&255]^S[J++];q=rt,j=lt,K=at,V=U}var rt=(O[q>>>24]<<24|O[j>>>16&255]<<16|O[K>>>8&255]<<8|O[V&255])^S[J++],lt=(O[j>>>24]<<24|O[K>>>16&255]<<16|O[V>>>8&255]<<8|O[q&255])^S[J++],at=(O[K>>>24]<<24|O[V>>>16&255]<<16|O[q>>>8&255]<<8|O[j&255])^S[J++],U=(O[V>>>24]<<24|O[q>>>16&255]<<16|O[j>>>8&255]<<8|O[K&255])^S[J++];b[_]=rt,b[_+1]=lt,b[_+2]=at,b[_+3]=U},keySize:256/32});r.AES=s._createHelper(A)}(),e.AES})}(ja)),ja.exports}var Ga={exports:{}},$u;function Wy(){return $u||($u=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.WordArray,o=i.BlockCipher,a=r.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],x=a.DES=o.extend({_doReset:function(){for(var E=this._key,A=E.words,b=[],_=0;_<56;_++){var S=u[_]-1;b[_]=A[S>>>5]>>>31-S%32&1}for(var I=this._subKeys=[],R=0;R<16;R++){for(var z=I[R]=[],X=l[R],_=0;_<24;_++)z[_/6|0]|=b[(c[_]-1+X)%28]<<31-_%6,z[4+(_/6|0)]|=b[28+(c[_+24]-1+X)%28]<<31-_%6;z[0]=z[0]<<1|z[0]>>>31;for(var _=1;_<7;_++)z[_]=z[_]>>>(_-1)*4+3;z[7]=z[7]<<5|z[7]>>>27}for(var O=this._invSubKeys=[],_=0;_<16;_++)O[_]=I[15-_]},encryptBlock:function(E,A){this._doCryptBlock(E,A,this._subKeys)},decryptBlock:function(E,A){this._doCryptBlock(E,A,this._invSubKeys)},_doCryptBlock:function(E,A,b){this._lBlock=E[A],this._rBlock=E[A+1],p.call(this,4,252645135),p.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),p.call(this,1,1431655765);for(var _=0;_<16;_++){for(var S=b[_],I=this._lBlock,R=this._rBlock,z=0,X=0;X<8;X++)z|=f[X][((R^S[X])&h[X])>>>0];this._lBlock=R,this._rBlock=I^z}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,p.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),E[A]=this._lBlock,E[A+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(E,A){var b=(this._lBlock>>>E^this._rBlock)&A;this._rBlock^=b,this._lBlock^=b<<E}function y(E,A){var b=(this._rBlock>>>E^this._lBlock)&A;this._lBlock^=b,this._rBlock^=b<<E}r.DES=o._createHelper(x);var g=a.TripleDES=o.extend({_doReset:function(){var E=this._key,A=E.words;if(A.length!==2&&A.length!==4&&A.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var b=A.slice(0,2),_=A.length<4?A.slice(0,2):A.slice(2,4),S=A.length<6?A.slice(0,2):A.slice(4,6);this._des1=x.createEncryptor(s.create(b)),this._des2=x.createEncryptor(s.create(_)),this._des3=x.createEncryptor(s.create(S))},encryptBlock:function(E,A){this._des1.encryptBlock(E,A),this._des2.decryptBlock(E,A),this._des3.encryptBlock(E,A)},decryptBlock:function(E,A){this._des3.decryptBlock(E,A),this._des2.encryptBlock(E,A),this._des1.decryptBlock(E,A)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=o._createHelper(g)}(),e.TripleDES})}(Ga)),Ga.exports}var Xa={exports:{}},Hu;function Vy(){return Hu||(Hu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.StreamCipher,o=r.algo,a=o.RC4=s.extend({_doReset:function(){for(var l=this._key,f=l.words,h=l.sigBytes,x=this._S=[],p=0;p<256;p++)x[p]=p;for(var p=0,y=0;p<256;p++){var g=p%h,E=f[g>>>2]>>>24-g%4*8&255;y=(y+x[p]+E)%256;var A=x[p];x[p]=x[y],x[y]=A}this._i=this._j=0},_doProcessBlock:function(l,f){l[f]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var l=this._S,f=this._i,h=this._j,x=0,p=0;p<4;p++){f=(f+1)%256,h=(h+l[f])%256;var y=l[f];l[f]=l[h],l[h]=y,x|=l[(l[f]+l[h])%256]<<24-p*8}return this._i=f,this._j=h,x}r.RC4=s._createHelper(a);var c=o.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)u.call(this)}});r.RC4Drop=s._createHelper(c)}(),e.RC4})}(Xa)),Xa.exports}var Ya={exports:{}},qu;function jy(){return qu||(qu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],u=[],c=[],l=o.Rabbit=s.extend({_doReset:function(){for(var h=this._key.words,x=this.cfg.iv,p=0;p<4;p++)h[p]=(h[p]<<8|h[p]>>>24)&16711935|(h[p]<<24|h[p]>>>8)&4278255360;var y=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],g=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var p=0;p<4;p++)f.call(this);for(var p=0;p<8;p++)g[p]^=y[p+4&7];if(x){var E=x.words,A=E[0],b=E[1],_=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,S=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,I=_>>>16|S&4294901760,R=S<<16|_&65535;g[0]^=_,g[1]^=I,g[2]^=S,g[3]^=R,g[4]^=_,g[5]^=I,g[6]^=S,g[7]^=R;for(var p=0;p<4;p++)f.call(this)}},_doProcessBlock:function(h,x){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var y=0;y<4;y++)a[y]=(a[y]<<8|a[y]>>>24)&16711935|(a[y]<<24|a[y]>>>8)&4278255360,h[x+y]^=a[y]},blockSize:128/32,ivSize:64/32});function f(){for(var h=this._X,x=this._C,p=0;p<8;p++)u[p]=x[p];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<u[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<u[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<u[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<u[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<u[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<u[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<u[6]>>>0?1:0)|0,this._b=x[7]>>>0<u[7]>>>0?1:0;for(var p=0;p<8;p++){var y=h[p]+x[p],g=y&65535,E=y>>>16,A=((g*g>>>17)+g*E>>>15)+E*E,b=((y&4294901760)*y|0)+((y&65535)*y|0);c[p]=A^b}h[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,h[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,h[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,h[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,h[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,h[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,h[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,h[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=s._createHelper(l)}(),e.Rabbit})}(Ya)),Ya.exports}var Ka={exports:{}},Wu;function Gy(){return Wu||(Wu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.StreamCipher,o=r.algo,a=[],u=[],c=[],l=o.RabbitLegacy=s.extend({_doReset:function(){var h=this._key.words,x=this.cfg.iv,p=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],y=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var g=0;g<4;g++)f.call(this);for(var g=0;g<8;g++)y[g]^=p[g+4&7];if(x){var E=x.words,A=E[0],b=E[1],_=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,S=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,I=_>>>16|S&4294901760,R=S<<16|_&65535;y[0]^=_,y[1]^=I,y[2]^=S,y[3]^=R,y[4]^=_,y[5]^=I,y[6]^=S,y[7]^=R;for(var g=0;g<4;g++)f.call(this)}},_doProcessBlock:function(h,x){var p=this._X;f.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var y=0;y<4;y++)a[y]=(a[y]<<8|a[y]>>>24)&16711935|(a[y]<<24|a[y]>>>8)&4278255360,h[x+y]^=a[y]},blockSize:128/32,ivSize:64/32});function f(){for(var h=this._X,x=this._C,p=0;p<8;p++)u[p]=x[p];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<u[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<u[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<u[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<u[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<u[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<u[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<u[6]>>>0?1:0)|0,this._b=x[7]>>>0<u[7]>>>0?1:0;for(var p=0;p<8;p++){var y=h[p]+x[p],g=y&65535,E=y>>>16,A=((g*g>>>17)+g*E>>>15)+E*E,b=((y&4294901760)*y|0)+((y&65535)*y|0);c[p]=A^b}h[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,h[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,h[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,h[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,h[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,h[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,h[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,h[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=s._createHelper(l)}(),e.RabbitLegacy})}(Ka)),Ka.exports}var Ja={exports:{}},Vu;function Xy(){return Vu||(Vu=1,function(n,t){(function(e,r,i){n.exports=r(Mt(),Kr(),Jr(),Dr(),fe())})(yt,function(e){return function(){var r=e,i=r.lib,s=i.BlockCipher,o=r.algo;const a=16,u=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function f(g,E){let A=E>>24&255,b=E>>16&255,_=E>>8&255,S=E&255,I=g.sbox[0][A]+g.sbox[1][b];return I=I^g.sbox[2][_],I=I+g.sbox[3][S],I}function h(g,E,A){let b=E,_=A,S;for(let I=0;I<a;++I)b=b^g.pbox[I],_=f(g,b)^_,S=b,b=_,_=S;return S=b,b=_,_=S,_=_^g.pbox[a],b=b^g.pbox[a+1],{left:b,right:_}}function x(g,E,A){let b=E,_=A,S;for(let I=a+1;I>1;--I)b=b^g.pbox[I],_=f(g,b)^_,S=b,b=_,_=S;return S=b,b=_,_=S,_=_^g.pbox[1],b=b^g.pbox[0],{left:b,right:_}}function p(g,E,A){for(let R=0;R<4;R++){g.sbox[R]=[];for(let z=0;z<256;z++)g.sbox[R][z]=c[R][z]}let b=0;for(let R=0;R<a+2;R++)g.pbox[R]=u[R]^E[b],b++,b>=A&&(b=0);let _=0,S=0,I=0;for(let R=0;R<a+2;R+=2)I=h(g,_,S),_=I.left,S=I.right,g.pbox[R]=_,g.pbox[R+1]=S;for(let R=0;R<4;R++)for(let z=0;z<256;z+=2)I=h(g,_,S),_=I.left,S=I.right,g.sbox[R][z]=_,g.sbox[R][z+1]=S;return!0}var y=o.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var g=this._keyPriorReset=this._key,E=g.words,A=g.sigBytes/4;p(l,E,A)}},encryptBlock:function(g,E){var A=h(l,g[E],g[E+1]);g[E]=A.left,g[E+1]=A.right},decryptBlock:function(g,E){var A=x(l,g[E],g[E+1]);g[E]=A.left,g[E+1]=A.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=s._createHelper(y)}(),e.Blowfish})}(Ja)),Ja.exports}(function(n,t){(function(e,r,i){n.exports=r(Mt(),Bs(),_y(),Sy(),Kr(),Cy(),Jr(),yu(),_a(),By(),bu(),Fy(),Dy(),My(),Ia(),Iy(),Dr(),fe(),Ty(),Ry(),Oy(),Py(),zy(),ky(),Ny(),Ly(),Uy(),$y(),Hy(),qy(),Wy(),Vy(),jy(),Gy(),Xy())})(yt,function(e){return e})})(Ay);var Ct={},Fs={};Fs.byteLength=Jy,Fs.toByteArray=Qy,Fs.fromByteArray=rg;for(var or=[],ze=[],Yy=typeof Uint8Array!="undefined"?Uint8Array:Array,Za="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fn=0,Ky=Za.length;Fn<Ky;++Fn)or[Fn]=Za[Fn],ze[Za.charCodeAt(Fn)]=Fn;ze[45]=62,ze[95]=63;function ju(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var r=e===t?0:4-e%4;return[e,r]}function Jy(n){var t=ju(n),e=t[0],r=t[1];return(e+r)*3/4-r}function Zy(n,t,e){return(t+e)*3/4-e}function Qy(n){var t,e=ju(n),r=e[0],i=e[1],s=new Yy(Zy(n,r,i)),o=0,a=i>0?r-4:r,u;for(u=0;u<a;u+=4)t=ze[n.charCodeAt(u)]<<18|ze[n.charCodeAt(u+1)]<<12|ze[n.charCodeAt(u+2)]<<6|ze[n.charCodeAt(u+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=t&255;return i===2&&(t=ze[n.charCodeAt(u)]<<2|ze[n.charCodeAt(u+1)]>>4,s[o++]=t&255),i===1&&(t=ze[n.charCodeAt(u)]<<10|ze[n.charCodeAt(u+1)]<<4|ze[n.charCodeAt(u+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function tg(n){return or[n>>18&63]+or[n>>12&63]+or[n>>6&63]+or[n&63]}function eg(n,t,e){for(var r,i=[],s=t;s<e;s+=3)r=(n[s]<<16&16711680)+(n[s+1]<<8&65280)+(n[s+2]&255),i.push(tg(r));return i.join("")}function rg(n){for(var t,e=n.length,r=e%3,i=[],s=16383,o=0,a=e-r;o<a;o+=s)i.push(eg(n,o,o+s>a?a:o+s));return r===1?(t=n[e-1],i.push(or[t>>2]+or[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(or[t>>10]+or[t>>4&63]+or[t<<2&63]+"=")),i.join("")}var Qa={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Qa.read=function(n,t,e,r,i){var s,o,a=i*8-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=e?i-1:0,h=e?-1:1,x=n[t+f];for(f+=h,s=x&(1<<-l)-1,x>>=-l,l+=a;l>0;s=s*256+n[t+f],f+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=o*256+n[t+f],f+=h,l-=8);if(s===0)s=1-c;else{if(s===u)return o?NaN:(x?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-c}return(x?-1:1)*o*Math.pow(2,s-r)},Qa.write=function(n,t,e,r,i,s){var o,a,u,c=s*8-i-1,l=(1<<c)-1,f=l>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=r?0:s-1,p=r?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(o++,u/=2),o+f>=l?(a=0,o=l):o+f>=1?(a=(t*u-1)*Math.pow(2,i),o=o+f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;n[e+x]=a&255,x+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;n[e+x]=o&255,x+=p,o/=256,c-=8);n[e+x-p]|=y*128};/*!
31
+ * The buffer module from node.js, for the browser.
32
+ *
33
+ * @author Feross Aboukhadijeh <https://feross.org>
34
+ * @license MIT
35
+ */(function(n){var t=Fs,e=Qa,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=A,n.INSPECT_MAX_BYTES=50;var i=2147483647;n.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var M=new Uint8Array(1),d={foo:function(){return 42}};return Object.setPrototypeOf(d,Uint8Array.prototype),Object.setPrototypeOf(M,d),M.foo()===42}catch(m){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(M){if(M>i)throw new RangeError('The value "'+M+'" is invalid for option "size"');var d=new Uint8Array(M);return Object.setPrototypeOf(d,a.prototype),d}function a(M,d,m){if(typeof M=="number"){if(typeof d=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(M)}return u(M,d,m)}a.poolSize=8192;function u(M,d,m){if(typeof M=="string")return h(M,d);if(ArrayBuffer.isView(M))return p(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(Tt(M,ArrayBuffer)||M&&Tt(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Tt(M,SharedArrayBuffer)||M&&Tt(M.buffer,SharedArrayBuffer)))return y(M,d,m);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var B=M.valueOf&&M.valueOf();if(B!=null&&B!==M)return a.from(B,d,m);var N=g(M);if(N)return N;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return a.from(M[Symbol.toPrimitive]("string"),d,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}a.from=function(M,d,m){return u(M,d,m)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function l(M,d,m){return c(M),M<=0?o(M):d!==void 0?typeof m=="string"?o(M).fill(d,m):o(M).fill(d):o(M)}a.alloc=function(M,d,m){return l(M,d,m)};function f(M){return c(M),o(M<0?0:E(M)|0)}a.allocUnsafe=function(M){return f(M)},a.allocUnsafeSlow=function(M){return f(M)};function h(M,d){if((typeof d!="string"||d==="")&&(d="utf8"),!a.isEncoding(d))throw new TypeError("Unknown encoding: "+d);var m=b(M,d)|0,B=o(m),N=B.write(M,d);return N!==m&&(B=B.slice(0,N)),B}function x(M){for(var d=M.length<0?0:E(M.length)|0,m=o(d),B=0;B<d;B+=1)m[B]=M[B]&255;return m}function p(M){if(Tt(M,Uint8Array)){var d=new Uint8Array(M);return y(d.buffer,d.byteOffset,d.byteLength)}return x(M)}function y(M,d,m){if(d<0||M.byteLength<d)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<d+(m||0))throw new RangeError('"length" is outside of buffer bounds');var B;return d===void 0&&m===void 0?B=new Uint8Array(M):m===void 0?B=new Uint8Array(M,d):B=new Uint8Array(M,d,m),Object.setPrototypeOf(B,a.prototype),B}function g(M){if(a.isBuffer(M)){var d=E(M.length)|0,m=o(d);return m.length===0||M.copy(m,0,0,d),m}if(M.length!==void 0)return typeof M.length!="number"||jt(M.length)?o(0):x(M);if(M.type==="Buffer"&&Array.isArray(M.data))return x(M.data)}function E(M){if(M>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return M|0}function A(M){return+M!=M&&(M=0),a.alloc(+M)}a.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==a.prototype},a.compare=function(d,m){if(Tt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),Tt(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),!a.isBuffer(d)||!a.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===m)return 0;for(var B=d.length,N=m.length,Z=0,nt=Math.min(B,N);Z<nt;++Z)if(d[Z]!==m[Z]){B=d[Z],N=m[Z];break}return B<N?-1:N<B?1:0},a.isEncoding=function(d){switch(String(d).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}},a.concat=function(d,m){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return a.alloc(0);var B;if(m===void 0)for(m=0,B=0;B<d.length;++B)m+=d[B].length;var N=a.allocUnsafe(m),Z=0;for(B=0;B<d.length;++B){var nt=d[B];if(Tt(nt,Uint8Array))Z+nt.length>N.length?a.from(nt).copy(N,Z):Uint8Array.prototype.set.call(N,nt,Z);else if(a.isBuffer(nt))nt.copy(N,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=nt.length}return N};function b(M,d){if(a.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||Tt(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);var m=M.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&m===0)return 0;for(var N=!1;;)switch(d){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return wt(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return Jt(M).length;default:if(N)return B?-1:wt(M).length;d=(""+d).toLowerCase(),N=!0}}a.byteLength=b;function _(M,d,m){var B=!1;if((d===void 0||d<0)&&(d=0),d>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,d>>>=0,m<=d))return"";for(M||(M="utf8");;)switch(M){case"hex":return lt(this,d,m);case"utf8":case"utf-8":return K(this,d,m);case"ascii":return ot(this,d,m);case"latin1":case"binary":return rt(this,d,m);case"base64":return j(this,d,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,d,m);default:if(B)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),B=!0}}a.prototype._isBuffer=!0;function S(M,d,m){var B=M[d];M[d]=M[m],M[m]=B}a.prototype.swap16=function(){var d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var m=0;m<d;m+=2)S(this,m,m+1);return this},a.prototype.swap32=function(){var d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var m=0;m<d;m+=4)S(this,m,m+3),S(this,m+1,m+2);return this},a.prototype.swap64=function(){var d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var m=0;m<d;m+=8)S(this,m,m+7),S(this,m+1,m+6),S(this,m+2,m+5),S(this,m+3,m+4);return this},a.prototype.toString=function(){var d=this.length;return d===0?"":arguments.length===0?K(this,0,d):_.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(d){if(!a.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:a.compare(this,d)===0},a.prototype.inspect=function(){var d="",m=n.INSPECT_MAX_BYTES;return d=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(d+=" ... "),"<Buffer "+d+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(d,m,B,N,Z){if(Tt(d,Uint8Array)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(m===void 0&&(m=0),B===void 0&&(B=d?d.length:0),N===void 0&&(N=0),Z===void 0&&(Z=this.length),m<0||B>d.length||N<0||Z>this.length)throw new RangeError("out of range index");if(N>=Z&&m>=B)return 0;if(N>=Z)return-1;if(m>=B)return 1;if(m>>>=0,B>>>=0,N>>>=0,Z>>>=0,this===d)return 0;for(var nt=Z-N,mt=B-m,vt=Math.min(nt,mt),Rt=this.slice(N,Z),zt=d.slice(m,B),Ot=0;Ot<vt;++Ot)if(Rt[Ot]!==zt[Ot]){nt=Rt[Ot],mt=zt[Ot];break}return nt<mt?-1:mt<nt?1:0};function I(M,d,m,B,N){if(M.length===0)return-1;if(typeof m=="string"?(B=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,jt(m)&&(m=N?0:M.length-1),m<0&&(m=M.length+m),m>=M.length){if(N)return-1;m=M.length-1}else if(m<0)if(N)m=0;else return-1;if(typeof d=="string"&&(d=a.from(d,B)),a.isBuffer(d))return d.length===0?-1:R(M,d,m,B,N);if(typeof d=="number")return d=d&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(M,d,m):Uint8Array.prototype.lastIndexOf.call(M,d,m):R(M,[d],m,B,N);throw new TypeError("val must be string, number or Buffer")}function R(M,d,m,B,N){var Z=1,nt=M.length,mt=d.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(M.length<2||d.length<2)return-1;Z=2,nt/=2,mt/=2,m/=2}function vt(hr,fr){return Z===1?hr[fr]:hr.readUInt16BE(fr*Z)}var Rt;if(N){var zt=-1;for(Rt=m;Rt<nt;Rt++)if(vt(M,Rt)===vt(d,zt===-1?0:Rt-zt)){if(zt===-1&&(zt=Rt),Rt-zt+1===mt)return zt*Z}else zt!==-1&&(Rt-=Rt-zt),zt=-1}else for(m+mt>nt&&(m=nt-mt),Rt=m;Rt>=0;Rt--){for(var Ot=!0,Ke=0;Ke<mt;Ke++)if(vt(M,Rt+Ke)!==vt(d,Ke)){Ot=!1;break}if(Ot)return Rt}return-1}a.prototype.includes=function(d,m,B){return this.indexOf(d,m,B)!==-1},a.prototype.indexOf=function(d,m,B){return I(this,d,m,B,!0)},a.prototype.lastIndexOf=function(d,m,B){return I(this,d,m,B,!1)};function z(M,d,m,B){m=Number(m)||0;var N=M.length-m;B?(B=Number(B),B>N&&(B=N)):B=N;var Z=d.length;B>Z/2&&(B=Z/2);for(var nt=0;nt<B;++nt){var mt=parseInt(d.substr(nt*2,2),16);if(jt(mt))return nt;M[m+nt]=mt}return nt}function X(M,d,m,B){return Kt(wt(d,M.length-m),M,m,B)}function O(M,d,m,B){return Kt(Wt(d),M,m,B)}function P(M,d,m,B){return Kt(Jt(d),M,m,B)}function q(M,d,m,B){return Kt(__$t__(d,M.length-m),M,m,B)}a.prototype.write=function(d,m,B,N){if(m===void 0)N="utf8",B=this.length,m=0;else if(B===void 0&&typeof m=="string")N=m,B=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(B)?(B=B>>>0,N===void 0&&(N="utf8")):(N=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Z=this.length-m;if((B===void 0||B>Z)&&(B=Z),d.length>0&&(B<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");for(var nt=!1;;)switch(N){case"hex":return z(this,d,m,B);case"utf8":case"utf-8":return X(this,d,m,B);case"ascii":case"latin1":case"binary":return O(this,d,m,B);case"base64":return P(this,d,m,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,d,m,B);default:if(nt)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),nt=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(M,d,m){return d===0&&m===M.length?t.fromByteArray(M):t.fromByteArray(M.slice(d,m))}function K(M,d,m){m=Math.min(M.length,m);for(var B=[],N=d;N<m;){var Z=M[N],nt=null,mt=Z>239?4:Z>223?3:Z>191?2:1;if(N+mt<=m){var vt,Rt,zt,Ot;switch(mt){case 1:Z<128&&(nt=Z);break;case 2:vt=M[N+1],(vt&192)===128&&(Ot=(Z&31)<<6|vt&63,Ot>127&&(nt=Ot));break;case 3:vt=M[N+1],Rt=M[N+2],(vt&192)===128&&(Rt&192)===128&&(Ot=(Z&15)<<12|(vt&63)<<6|Rt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(nt=Ot));break;case 4:vt=M[N+1],Rt=M[N+2],zt=M[N+3],(vt&192)===128&&(Rt&192)===128&&(zt&192)===128&&(Ot=(Z&15)<<18|(vt&63)<<12|(Rt&63)<<6|zt&63,Ot>65535&&Ot<1114112&&(nt=Ot))}}nt===null?(nt=65533,mt=1):nt>65535&&(nt-=65536,B.push(nt>>>10&1023|55296),nt=56320|nt&1023),B.push(nt),N+=mt}return J(B)}var V=4096;function J(M){var d=M.length;if(d<=V)return String.fromCharCode.apply(String,M);for(var m="",B=0;B<d;)m+=String.fromCharCode.apply(String,M.slice(B,B+=V));return m}function ot(M,d,m){var B="";m=Math.min(M.length,m);for(var N=d;N<m;++N)B+=String.fromCharCode(M[N]&127);return B}function rt(M,d,m){var B="";m=Math.min(M.length,m);for(var N=d;N<m;++N)B+=String.fromCharCode(M[N]);return B}function lt(M,d,m){var B=M.length;(!d||d<0)&&(d=0),(!m||m<0||m>B)&&(m=B);for(var N="",Z=d;Z<m;++Z)N+=ce[M[Z]];return N}function at(M,d,m){for(var B=M.slice(d,m),N="",Z=0;Z<B.length-1;Z+=2)N+=String.fromCharCode(B[Z]+B[Z+1]*256);return N}a.prototype.slice=function(d,m){var B=this.length;d=~~d,m=m===void 0?B:~~m,d<0?(d+=B,d<0&&(d=0)):d>B&&(d=B),m<0?(m+=B,m<0&&(m=0)):m>B&&(m=B),m<d&&(m=d);var N=this.subarray(d,m);return Object.setPrototypeOf(N,a.prototype),N};function U(M,d,m){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+d>m)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(d,m,B){d=d>>>0,m=m>>>0,B||U(d,m,this.length);for(var N=this[d],Z=1,nt=0;++nt<m&&(Z*=256);)N+=this[d+nt]*Z;return N},a.prototype.readUintBE=a.prototype.readUIntBE=function(d,m,B){d=d>>>0,m=m>>>0,B||U(d,m,this.length);for(var N=this[d+--m],Z=1;m>0&&(Z*=256);)N+=this[d+--m]*Z;return N},a.prototype.readUint8=a.prototype.readUInt8=function(d,m){return d=d>>>0,m||U(d,1,this.length),this[d]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(d,m){return d=d>>>0,m||U(d,2,this.length),this[d]|this[d+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(d,m){return d=d>>>0,m||U(d,2,this.length),this[d]<<8|this[d+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(d,m){return d=d>>>0,m||U(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(d,m){return d=d>>>0,m||U(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},a.prototype.readIntLE=function(d,m,B){d=d>>>0,m=m>>>0,B||U(d,m,this.length);for(var N=this[d],Z=1,nt=0;++nt<m&&(Z*=256);)N+=this[d+nt]*Z;return Z*=128,N>=Z&&(N-=Math.pow(2,8*m)),N},a.prototype.readIntBE=function(d,m,B){d=d>>>0,m=m>>>0,B||U(d,m,this.length);for(var N=m,Z=1,nt=this[d+--N];N>0&&(Z*=256);)nt+=this[d+--N]*Z;return Z*=128,nt>=Z&&(nt-=Math.pow(2,8*m)),nt},a.prototype.readInt8=function(d,m){return d=d>>>0,m||U(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},a.prototype.readInt16LE=function(d,m){d=d>>>0,m||U(d,2,this.length);var B=this[d]|this[d+1]<<8;return B&32768?B|4294901760:B},a.prototype.readInt16BE=function(d,m){d=d>>>0,m||U(d,2,this.length);var B=this[d+1]|this[d]<<8;return B&32768?B|4294901760:B},a.prototype.readInt32LE=function(d,m){return d=d>>>0,m||U(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},a.prototype.readInt32BE=function(d,m){return d=d>>>0,m||U(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},a.prototype.readFloatLE=function(d,m){return d=d>>>0,m||U(d,4,this.length),e.read(this,d,!0,23,4)},a.prototype.readFloatBE=function(d,m){return d=d>>>0,m||U(d,4,this.length),e.read(this,d,!1,23,4)},a.prototype.readDoubleLE=function(d,m){return d=d>>>0,m||U(d,8,this.length),e.read(this,d,!0,52,8)},a.prototype.readDoubleBE=function(d,m){return d=d>>>0,m||U(d,8,this.length),e.read(this,d,!1,52,8)};function G(M,d,m,B,N,Z){if(!a.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(d>N||d<Z)throw new RangeError('"value" argument is out of bounds');if(m+B>M.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(d,m,B,N){if(d=+d,m=m>>>0,B=B>>>0,!N){var Z=Math.pow(2,8*B)-1;G(this,d,m,B,Z,0)}var nt=1,mt=0;for(this[m]=d&255;++mt<B&&(nt*=256);)this[m+mt]=d/nt&255;return m+B},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(d,m,B,N){if(d=+d,m=m>>>0,B=B>>>0,!N){var Z=Math.pow(2,8*B)-1;G(this,d,m,B,Z,0)}var nt=B-1,mt=1;for(this[m+nt]=d&255;--nt>=0&&(mt*=256);)this[m+nt]=d/mt&255;return m+B},a.prototype.writeUint8=a.prototype.writeUInt8=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,1,255,0),this[m]=d&255,m+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,2,65535,0),this[m]=d&255,this[m+1]=d>>>8,m+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,2,65535,0),this[m]=d>>>8,this[m+1]=d&255,m+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,4,4294967295,0),this[m+3]=d>>>24,this[m+2]=d>>>16,this[m+1]=d>>>8,this[m]=d&255,m+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,4,4294967295,0),this[m]=d>>>24,this[m+1]=d>>>16,this[m+2]=d>>>8,this[m+3]=d&255,m+4},a.prototype.writeIntLE=function(d,m,B,N){if(d=+d,m=m>>>0,!N){var Z=Math.pow(2,8*B-1);G(this,d,m,B,Z-1,-Z)}var nt=0,mt=1,vt=0;for(this[m]=d&255;++nt<B&&(mt*=256);)d<0&&vt===0&&this[m+nt-1]!==0&&(vt=1),this[m+nt]=(d/mt>>0)-vt&255;return m+B},a.prototype.writeIntBE=function(d,m,B,N){if(d=+d,m=m>>>0,!N){var Z=Math.pow(2,8*B-1);G(this,d,m,B,Z-1,-Z)}var nt=B-1,mt=1,vt=0;for(this[m+nt]=d&255;--nt>=0&&(mt*=256);)d<0&&vt===0&&this[m+nt+1]!==0&&(vt=1),this[m+nt]=(d/mt>>0)-vt&255;return m+B},a.prototype.writeInt8=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,1,127,-128),d<0&&(d=255+d+1),this[m]=d&255,m+1},a.prototype.writeInt16LE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,2,32767,-32768),this[m]=d&255,this[m+1]=d>>>8,m+2},a.prototype.writeInt16BE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,2,32767,-32768),this[m]=d>>>8,this[m+1]=d&255,m+2},a.prototype.writeInt32LE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,4,2147483647,-2147483648),this[m]=d&255,this[m+1]=d>>>8,this[m+2]=d>>>16,this[m+3]=d>>>24,m+4},a.prototype.writeInt32BE=function(d,m,B){return d=+d,m=m>>>0,B||G(this,d,m,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[m]=d>>>24,this[m+1]=d>>>16,this[m+2]=d>>>8,this[m+3]=d&255,m+4};function tt(M,d,m,B,N,Z){if(m+B>M.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function Q(M,d,m,B,N){return d=+d,m=m>>>0,N||tt(M,d,m,4),e.write(M,d,m,B,23,4),m+4}a.prototype.writeFloatLE=function(d,m,B){return Q(this,d,m,!0,B)},a.prototype.writeFloatBE=function(d,m,B){return Q(this,d,m,!1,B)};function Et(M,d,m,B,N){return d=+d,m=m>>>0,N||tt(M,d,m,8),e.write(M,d,m,B,52,8),m+8}a.prototype.writeDoubleLE=function(d,m,B){return Et(this,d,m,!0,B)},a.prototype.writeDoubleBE=function(d,m,B){return Et(this,d,m,!1,B)},a.prototype.copy=function(d,m,B,N){if(!a.isBuffer(d))throw new TypeError("argument should be a Buffer");if(B||(B=0),!N&&N!==0&&(N=this.length),m>=d.length&&(m=d.length),m||(m=0),N>0&&N<B&&(N=B),N===B||d.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),d.length-m<N-B&&(N=d.length-m+B);var Z=N-B;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,B,N):Uint8Array.prototype.set.call(d,this.subarray(B,N),m),Z},a.prototype.fill=function(d,m,B,N){if(typeof d=="string"){if(typeof m=="string"?(N=m,m=0,B=this.length):typeof B=="string"&&(N=B,B=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!a.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(d.length===1){var Z=d.charCodeAt(0);(N==="utf8"&&Z<128||N==="latin1")&&(d=Z)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(m<0||this.length<m||this.length<B)throw new RangeError("Out of range index");if(B<=m)return this;m=m>>>0,B=B===void 0?this.length:B>>>0,d||(d=0);var nt;if(typeof d=="number")for(nt=m;nt<B;++nt)this[nt]=d;else{var mt=a.isBuffer(d)?d:a.from(d,N),vt=mt.length;if(vt===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(nt=0;nt<B-m;++nt)this[nt+m]=mt[nt%vt]}return this};var Bt=/[^+/0-9A-Za-z-_]/g;function Lt(M){if(M=M.split("=")[0],M=M.trim().replace(Bt,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function wt(M,d){d=d||1/0;for(var m,B=M.length,N=null,Z=[],nt=0;nt<B;++nt){if(m=M.charCodeAt(nt),m>55295&&m<57344){if(!N){if(m>56319){(d-=3)>-1&&Z.push(239,191,189);continue}else if(nt+1===B){(d-=3)>-1&&Z.push(239,191,189);continue}N=m;continue}if(m<56320){(d-=3)>-1&&Z.push(239,191,189),N=m;continue}m=(N-55296<<10|m-56320)+65536}else N&&(d-=3)>-1&&Z.push(239,191,189);if(N=null,m<128){if((d-=1)<0)break;Z.push(m)}else if(m<2048){if((d-=2)<0)break;Z.push(m>>6|192,m&63|128)}else if(m<65536){if((d-=3)<0)break;Z.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((d-=4)<0)break;Z.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return Z}function Wt(M){for(var d=[],m=0;m<M.length;++m)d.push(M.charCodeAt(m)&255);return d}function __$t__(M,d){for(var m,B,N,Z=[],nt=0;nt<M.length&&!((d-=2)<0);++nt)m=M.charCodeAt(nt),B=m>>8,N=m%256,Z.push(N),Z.push(B);return Z}function Jt(M){return t.toByteArray(Lt(M))}function Kt(M,d,m,B){for(var N=0;N<B&&!(N+m>=d.length||N>=M.length);++N)d[N+m]=M[N];return N}function Tt(M,d){return M instanceof d||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===d.name}function jt(M){return M!==M}var ce=function(){for(var M="0123456789abcdef",d=new Array(256),m=0;m<16;++m)for(var B=m*16,N=0;N<16;++N)d[B+N]=M[m]+M[N];return d}()})(Ct);var ng=Ct.Buffer,ig=function(n){if(n instanceof Uint8Array){if(n.byteOffset===0&&n.byteLength===n.buffer.byteLength)return n.buffer;if(typeof n.buffer.slice=="function")return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}if(ng.isBuffer(n)){for(var t=new Uint8Array(n.length),e=n.length,r=0;r<e;r++)t[r]=n[r];return t.buffer}else throw new Error("Argument must be a Buffer")};const Si=ie(ig);var Gu={exports:{}};(function(n,t){(function(){var e,r=0xdeadbeefcafe,i=(r&16777215)==15715070;function s(v,w,F){v!=null&&(typeof v=="number"?this.fromNumber(v,w,F):w==null&&typeof v!="string"?this.fromString(v,256):this.fromString(v,w))}function o(){return new s(null)}function a(v,w,F,H,st,ut){for(;--ut>=0;){var pt=w*this[v++]+F[H]+st;st=Math.floor(pt/67108864),F[H++]=pt&67108863}return st}function u(v,w,F,H,st,ut){for(var pt=w&32767,xt=w>>15;--ut>=0;){var qt=this[v]&32767,xe=this[v++]>>15,Le=xt*qt+xe*pt;qt=pt*qt+((Le&32767)<<15)+F[H]+(st&1073741823),st=(qt>>>30)+(Le>>>15)+xt*xe+(st>>>30),F[H++]=qt&1073741823}return st}function c(v,w,F,H,st,ut){for(var pt=w&16383,xt=w>>14;--ut>=0;){var qt=this[v]&16383,xe=this[v++]>>14,Le=xt*qt+xe*pt;qt=pt*qt+((Le&16383)<<14)+F[H]+st,st=(qt>>28)+(Le>>14)+xt*xe,F[H++]=qt&268435455}return st}var l=typeof navigator!="undefined";l&&i&&navigator.appName=="Microsoft Internet Explorer"?(s.prototype.am=u,e=30):l&&i&&navigator.appName!="Netscape"?(s.prototype.am=a,e=26):(s.prototype.am=c,e=28),s.prototype.DB=e,s.prototype.DM=(1<<e)-1,s.prototype.DV=1<<e;var f=52;s.prototype.FV=Math.pow(2,f),s.prototype.F1=f-e,s.prototype.F2=2*e-f;var h="0123456789abcdefghijklmnopqrstuvwxyz",x=new Array,p,y;for(p=48,y=0;y<=9;++y)x[p++]=y;for(p=97,y=10;y<36;++y)x[p++]=y;for(p=65,y=10;y<36;++y)x[p++]=y;function g(v){return h.charAt(v)}function E(v,w){var F=x[v.charCodeAt(w)];return F==null?-1:F}function A(v){for(var w=this.t-1;w>=0;--w)v[w]=this[w];v.t=this.t,v.s=this.s}function b(v){this.t=1,this.s=v<0?-1:0,v>0?this[0]=v:v<-1?this[0]=v+this.DV:this.t=0}function _(v){var w=o();return w.fromInt(v),w}function S(v,w){var F;if(w==16)F=4;else if(w==8)F=3;else if(w==256)F=8;else if(w==2)F=1;else if(w==32)F=5;else if(w==4)F=2;else{this.fromRadix(v,w);return}this.t=0,this.s=0;for(var H=v.length,st=!1,ut=0;--H>=0;){var pt=F==8?v[H]&255:E(v,H);if(pt<0){v.charAt(H)=="-"&&(st=!0);continue}st=!1,ut==0?this[this.t++]=pt:ut+F>this.DB?(this[this.t-1]|=(pt&(1<<this.DB-ut)-1)<<ut,this[this.t++]=pt>>this.DB-ut):this[this.t-1]|=pt<<ut,ut+=F,ut>=this.DB&&(ut-=this.DB)}F==8&&v[0]&128&&(this.s=-1,ut>0&&(this[this.t-1]|=(1<<this.DB-ut)-1<<ut)),this.clamp(),st&&s.ZERO.subTo(this,this)}function I(){for(var v=this.s&this.DM;this.t>0&&this[this.t-1]==v;)--this.t}function R(v){if(this.s<0)return"-"+this.negate().toString(v);var w;if(v==16)w=4;else if(v==8)w=3;else if(v==2)w=1;else if(v==32)w=5;else if(v==4)w=2;else return this.toRadix(v);var F=(1<<w)-1,H,st=!1,ut="",pt=this.t,xt=this.DB-pt*this.DB%w;if(pt-- >0)for(xt<this.DB&&(H=this[pt]>>xt)>0&&(st=!0,ut=g(H));pt>=0;)xt<w?(H=(this[pt]&(1<<xt)-1)<<w-xt,H|=this[--pt]>>(xt+=this.DB-w)):(H=this[pt]>>(xt-=w)&F,xt<=0&&(xt+=this.DB,--pt)),H>0&&(st=!0),st&&(ut+=g(H));return st?ut:"0"}function z(){var v=o();return s.ZERO.subTo(this,v),v}function X(){return this.s<0?this.negate():this}function O(v){var w=this.s-v.s;if(w!=0)return w;var F=this.t;if(w=F-v.t,w!=0)return this.s<0?-w:w;for(;--F>=0;)if((w=this[F]-v[F])!=0)return w;return 0}function P(v){var w=1,F;return(F=v>>>16)!=0&&(v=F,w+=16),(F=v>>8)!=0&&(v=F,w+=8),(F=v>>4)!=0&&(v=F,w+=4),(F=v>>2)!=0&&(v=F,w+=2),(F=v>>1)!=0&&(v=F,w+=1),w}function q(){return this.t<=0?0:this.DB*(this.t-1)+P(this[this.t-1]^this.s&this.DM)}function j(v,w){var F;for(F=this.t-1;F>=0;--F)w[F+v]=this[F];for(F=v-1;F>=0;--F)w[F]=0;w.t=this.t+v,w.s=this.s}function K(v,w){for(var F=v;F<this.t;++F)w[F-v]=this[F];w.t=Math.max(this.t-v,0),w.s=this.s}function V(v,w){var F=v%this.DB,H=this.DB-F,st=(1<<H)-1,ut=Math.floor(v/this.DB),pt=this.s<<F&this.DM,xt;for(xt=this.t-1;xt>=0;--xt)w[xt+ut+1]=this[xt]>>H|pt,pt=(this[xt]&st)<<F;for(xt=ut-1;xt>=0;--xt)w[xt]=0;w[ut]=pt,w.t=this.t+ut+1,w.s=this.s,w.clamp()}function J(v,w){w.s=this.s;var F=Math.floor(v/this.DB);if(F>=this.t){w.t=0;return}var H=v%this.DB,st=this.DB-H,ut=(1<<H)-1;w[0]=this[F]>>H;for(var pt=F+1;pt<this.t;++pt)w[pt-F-1]|=(this[pt]&ut)<<st,w[pt-F]=this[pt]>>H;H>0&&(w[this.t-F-1]|=(this.s&ut)<<st),w.t=this.t-F,w.clamp()}function ot(v,w){for(var F=0,H=0,st=Math.min(v.t,this.t);F<st;)H+=this[F]-v[F],w[F++]=H&this.DM,H>>=this.DB;if(v.t<this.t){for(H-=v.s;F<this.t;)H+=this[F],w[F++]=H&this.DM,H>>=this.DB;H+=this.s}else{for(H+=this.s;F<v.t;)H-=v[F],w[F++]=H&this.DM,H>>=this.DB;H-=v.s}w.s=H<0?-1:0,H<-1?w[F++]=this.DV+H:H>0&&(w[F++]=H),w.t=F,w.clamp()}function rt(v,w){var F=this.abs(),H=v.abs(),st=F.t;for(w.t=st+H.t;--st>=0;)w[st]=0;for(st=0;st<H.t;++st)w[st+F.t]=F.am(0,H[st],w,st,0,F.t);w.s=0,w.clamp(),this.s!=v.s&&s.ZERO.subTo(w,w)}function lt(v){for(var w=this.abs(),F=v.t=2*w.t;--F>=0;)v[F]=0;for(F=0;F<w.t-1;++F){var H=w.am(F,w[F],v,2*F,0,1);(v[F+w.t]+=w.am(F+1,2*w[F],v,2*F+1,H,w.t-F-1))>=w.DV&&(v[F+w.t]-=w.DV,v[F+w.t+1]=1)}v.t>0&&(v[v.t-1]+=w.am(F,w[F],v,2*F,0,1)),v.s=0,v.clamp()}function at(v,w,F){var H=v.abs();if(!(H.t<=0)){var st=this.abs();if(st.t<H.t){w!=null&&w.fromInt(0),F!=null&&this.copyTo(F);return}F==null&&(F=o());var ut=o(),pt=this.s,xt=v.s,qt=this.DB-P(H[H.t-1]);qt>0?(H.lShiftTo(qt,ut),st.lShiftTo(qt,F)):(H.copyTo(ut),st.copyTo(F));var xe=ut.t,Le=ut[xe-1];if(Le!=0){var Re=Le*(1<<this.F1)+(xe>1?ut[xe-2]>>this.F2:0),Cr=this.FV/Re,yo=(1<<this.F1)/Re,Ze=1<<this.F2,Qe=F.t,go=Qe-xe,Hr=w==null?o():w;for(ut.dlShiftTo(go,Hr),F.compareTo(Hr)>=0&&(F[F.t++]=1,F.subTo(Hr,F)),s.ONE.dlShiftTo(xe,Hr),Hr.subTo(ut,ut);ut.t<xe;)ut[ut.t++]=0;for(;--go>=0;){var vc=F[--Qe]==Le?this.DM:Math.floor(F[Qe]*Cr+(F[Qe-1]+Ze)*yo);if((F[Qe]+=ut.am(0,vc,F,go,0,xe))<vc)for(ut.dlShiftTo(go,Hr),F.subTo(Hr,F);F[Qe]<--vc;)F.subTo(Hr,F)}w!=null&&(F.drShiftTo(xe,w),pt!=xt&&s.ZERO.subTo(w,w)),F.t=xe,F.clamp(),qt>0&&F.rShiftTo(qt,F),pt<0&&s.ZERO.subTo(F,F)}}}function U(v){var w=o();return this.abs().divRemTo(v,null,w),this.s<0&&w.compareTo(s.ZERO)>0&&v.subTo(w,w),w}function G(v){this.m=v}function tt(v){return v.s<0||v.compareTo(this.m)>=0?v.mod(this.m):v}function Q(v){return v}function Et(v){v.divRemTo(this.m,null,v)}function Bt(v,w,F){v.multiplyTo(w,F),this.reduce(F)}function Lt(v,w){v.squareTo(w),this.reduce(w)}G.prototype.convert=tt,G.prototype.revert=Q,G.prototype.reduce=Et,G.prototype.mulTo=Bt,G.prototype.sqrTo=Lt;function wt(){if(this.t<1)return 0;var v=this[0];if(!(v&1))return 0;var w=v&3;return w=w*(2-(v&15)*w)&15,w=w*(2-(v&255)*w)&255,w=w*(2-((v&65535)*w&65535))&65535,w=w*(2-v*w%this.DV)%this.DV,w>0?this.DV-w:-w}function Wt(v){this.m=v,this.mp=v.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<v.DB-15)-1,this.mt2=2*v.t}function __$t__(v){var w=o();return v.abs().dlShiftTo(this.m.t,w),w.divRemTo(this.m,null,w),v.s<0&&w.compareTo(s.ZERO)>0&&this.m.subTo(w,w),w}function Jt(v){var w=o();return v.copyTo(w),this.reduce(w),w}function Kt(v){for(;v.t<=this.mt2;)v[v.t++]=0;for(var w=0;w<this.m.t;++w){var F=v[w]&32767,H=F*this.mpl+((F*this.mph+(v[w]>>15)*this.mpl&this.um)<<15)&v.DM;for(F=w+this.m.t,v[F]+=this.m.am(0,H,v,w,0,this.m.t);v[F]>=v.DV;)v[F]-=v.DV,v[++F]++}v.clamp(),v.drShiftTo(this.m.t,v),v.compareTo(this.m)>=0&&v.subTo(this.m,v)}function Tt(v,w){v.squareTo(w),this.reduce(w)}function jt(v,w,F){v.multiplyTo(w,F),this.reduce(F)}Wt.prototype.convert=__$t__,Wt.prototype.revert=Jt,Wt.prototype.reduce=Kt,Wt.prototype.mulTo=jt,Wt.prototype.sqrTo=Tt;function ce(){return(this.t>0?this[0]&1:this.s)==0}function M(v,w){if(v>4294967295||v<1)return s.ONE;var F=o(),H=o(),st=w.convert(this),ut=P(v)-1;for(st.copyTo(F);--ut>=0;)if(w.sqrTo(F,H),(v&1<<ut)>0)w.mulTo(H,st,F);else{var pt=F;F=H,H=pt}return w.revert(F)}function d(v,w){var F;return v<256||w.isEven()?F=new G(w):F=new Wt(w),this.exp(v,F)}s.prototype.copyTo=A,s.prototype.fromInt=b,s.prototype.fromString=S,s.prototype.clamp=I,s.prototype.dlShiftTo=j,s.prototype.drShiftTo=K,s.prototype.lShiftTo=V,s.prototype.rShiftTo=J,s.prototype.subTo=ot,s.prototype.multiplyTo=rt,s.prototype.squareTo=lt,s.prototype.divRemTo=at,s.prototype.invDigit=wt,s.prototype.isEven=ce,s.prototype.exp=M,s.prototype.toString=R,s.prototype.negate=z,s.prototype.abs=X,s.prototype.compareTo=O,s.prototype.bitLength=q,s.prototype.mod=U,s.prototype.modPowInt=d,s.ZERO=_(0),s.ONE=_(1);function m(){var v=o();return this.copyTo(v),v}function B(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function N(){return this.t==0?this.s:this[0]<<24>>24}function Z(){return this.t==0?this.s:this[0]<<16>>16}function nt(v){return Math.floor(Math.LN2*this.DB/Math.log(v))}function mt(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function vt(v){if(v==null&&(v=10),this.signum()==0||v<2||v>36)return"0";var w=this.chunkSize(v),F=Math.pow(v,w),H=_(F),st=o(),ut=o(),pt="";for(this.divRemTo(H,st,ut);st.signum()>0;)pt=(F+ut.intValue()).toString(v).substr(1)+pt,st.divRemTo(H,st,ut);return ut.intValue().toString(v)+pt}function Rt(v,w){this.fromInt(0),w==null&&(w=10);for(var F=this.chunkSize(w),H=Math.pow(w,F),st=!1,ut=0,pt=0,xt=0;xt<v.length;++xt){var qt=E(v,xt);if(qt<0){v.charAt(xt)=="-"&&this.signum()==0&&(st=!0);continue}pt=w*pt+qt,++ut>=F&&(this.dMultiply(H),this.dAddOffset(pt,0),ut=0,pt=0)}ut>0&&(this.dMultiply(Math.pow(w,ut)),this.dAddOffset(pt,0)),st&&s.ZERO.subTo(this,this)}function zt(v,w,F){if(typeof w=="number")if(v<2)this.fromInt(1);else for(this.fromNumber(v,F),this.testBit(v-1)||this.bitwiseTo(s.ONE.shiftLeft(v-1),pr,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(w);)this.dAddOffset(2,0),this.bitLength()>v&&this.subTo(s.ONE.shiftLeft(v-1),this);else{var H=new Array,st=v&7;H.length=(v>>3)+1,w.nextBytes(H),st>0?H[0]&=(1<<st)-1:H[0]=0,this.fromString(H,256)}}function Ot(){var v=this.t,w=new Array;w[0]=this.s;var F=this.DB-v*this.DB%8,H,st=0;if(v-- >0)for(F<this.DB&&(H=this[v]>>F)!=(this.s&this.DM)>>F&&(w[st++]=H|this.s<<this.DB-F);v>=0;)F<8?(H=(this[v]&(1<<F)-1)<<8-F,H|=this[--v]>>(F+=this.DB-8)):(H=this[v]>>(F-=8)&255,F<=0&&(F+=this.DB,--v)),H&128&&(H|=-256),st==0&&(this.s&128)!=(H&128)&&++st,(st>0||H!=this.s)&&(w[st++]=H);return w}function Ke(v){return this.compareTo(v)==0}function hr(v){return this.compareTo(v)<0?this:v}function fr(v){return this.compareTo(v)>0?this:v}function Je(v,w,F){var H,st,ut=Math.min(v.t,this.t);for(H=0;H<ut;++H)F[H]=w(this[H],v[H]);if(v.t<this.t){for(st=v.s&this.DM,H=ut;H<this.t;++H)F[H]=w(this[H],st);F.t=this.t}else{for(st=this.s&this.DM,H=ut;H<v.t;++H)F[H]=w(st,v[H]);F.t=v.t}F.s=w(this.s,v.s),F.clamp()}function dr(v,w){return v&w}function Jn(v){var w=o();return this.bitwiseTo(v,dr,w),w}function pr(v,w){return v|w}function Zn(v){var w=o();return this.bitwiseTo(v,pr,w),w}function Qn(v,w){return v^w}function hn(v){var w=o();return this.bitwiseTo(v,Qn,w),w}function Ur(v,w){return v&~w}function Hi(v){var w=o();return this.bitwiseTo(v,Ur,w),w}function Te(){for(var v=o(),w=0;w<this.t;++w)v[w]=this.DM&~this[w];return v.t=this.t,v.s=~this.s,v}function qi(v){var w=o();return v<0?this.rShiftTo(-v,w):this.lShiftTo(v,w),w}function ti(v){var w=o();return v<0?this.lShiftTo(-v,w):this.rShiftTo(v,w),w}function ei(v){if(v==0)return-1;var w=0;return v&65535||(v>>=16,w+=16),v&255||(v>>=8,w+=8),v&15||(v>>=4,w+=4),v&3||(v>>=2,w+=2),v&1||++w,w}function Wi(){for(var v=0;v<this.t;++v)if(this[v]!=0)return v*this.DB+ei(this[v]);return this.s<0?this.t*this.DB:-1}function Vi(v){for(var w=0;v!=0;)v&=v-1,++w;return w}function ri(){for(var v=0,w=this.s&this.DM,F=0;F<this.t;++F)v+=Vi(this[F]^w);return v}function ji(v){var w=Math.floor(v/this.DB);return w>=this.t?this.s!=0:(this[w]&1<<v%this.DB)!=0}function Gi(v,w){var F=s.ONE.shiftLeft(v);return this.bitwiseTo(F,w,F),F}function ni(v){return this.changeBit(v,pr)}function Xi(v){return this.changeBit(v,Ur)}function ii(v){return this.changeBit(v,Qn)}function ye(v,w){for(var F=0,H=0,st=Math.min(v.t,this.t);F<st;)H+=this[F]+v[F],w[F++]=H&this.DM,H>>=this.DB;if(v.t<this.t){for(H+=v.s;F<this.t;)H+=this[F],w[F++]=H&this.DM,H>>=this.DB;H+=this.s}else{for(H+=this.s;F<v.t;)H+=v[F],w[F++]=H&this.DM,H>>=this.DB;H+=v.s}w.s=H<0?-1:0,H>0?w[F++]=H:H<-1&&(w[F++]=this.DV+H),w.t=F,w.clamp()}function Ne(v){var w=o();return this.addTo(v,w),w}function fn(v){var w=o();return this.subTo(v,w),w}function Yi(v){var w=o();return this.multiplyTo(v,w),w}function nc(){var v=o();return this.squareTo(v),v}function ic(v){var w=o();return this.divRemTo(v,w,null),w}function sc(v){var w=o();return this.divRemTo(v,null,w),w}function oc(v){var w=o(),F=o();return this.divRemTo(v,w,F),new Array(w,F)}function ac(v){this[this.t]=this.am(0,v-1,this,0,0,this.t),++this.t,this.clamp()}function cc(v,w){if(v!=0){for(;this.t<=w;)this[this.t++]=0;for(this[w]+=v;this[w]>=this.DV;)this[w]-=this.DV,++w>=this.t&&(this[this.t++]=0),++this[w]}}function dn(){}function po(v){return v}function lc(v,w,F){v.multiplyTo(w,F)}function uc(v,w){v.squareTo(w)}dn.prototype.convert=po,dn.prototype.revert=po,dn.prototype.mulTo=lc,dn.prototype.sqrTo=uc;function hc(v){return this.exp(v,new dn)}function fc(v,w,F){var H=Math.min(this.t+v.t,w);for(F.s=0,F.t=H;H>0;)F[--H]=0;var st;for(st=F.t-this.t;H<st;++H)F[H+this.t]=this.am(0,v[H],F,H,0,this.t);for(st=Math.min(v.t,w);H<st;++H)this.am(0,v[H],F,H,0,w-H);F.clamp()}function dc(v,w,F){--w;var H=F.t=this.t+v.t-w;for(F.s=0;--H>=0;)F[H]=0;for(H=Math.max(w-this.t,0);H<v.t;++H)F[this.t+H-w]=this.am(w-H,v[H],F,0,0,this.t+H-w);F.clamp(),F.drShiftTo(1,F)}function Sr(v){this.r2=o(),this.q3=o(),s.ONE.dlShiftTo(2*v.t,this.r2),this.mu=this.r2.divide(v),this.m=v}function xo(v){if(v.s<0||v.t>2*this.m.t)return v.mod(this.m);if(v.compareTo(this.m)<0)return v;var w=o();return v.copyTo(w),this.reduce(w),w}function pn(v){return v}function mo(v){for(v.drShiftTo(this.m.t-1,this.r2),v.t>this.m.t+1&&(v.t=this.m.t+1,v.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);v.compareTo(this.r2)<0;)v.dAddOffset(1,this.m.t+1);for(v.subTo(this.r2,v);v.compareTo(this.m)>=0;)v.subTo(this.m,v)}function $r(v,w){v.squareTo(w),this.reduce(w)}function pc(v,w,F){v.multiplyTo(w,F),this.reduce(F)}Sr.prototype.convert=xo,Sr.prototype.revert=pn,Sr.prototype.reduce=mo,Sr.prototype.mulTo=pc,Sr.prototype.sqrTo=$r;function si(v,w){var F=v.bitLength(),H,st=_(1),ut;if(F<=0)return st;F<18?H=1:F<48?H=3:F<144?H=4:F<768?H=5:H=6,F<8?ut=new G(w):w.isEven()?ut=new Sr(w):ut=new Wt(w);var pt=new Array,xt=3,qt=H-1,xe=(1<<H)-1;if(pt[1]=ut.convert(this),H>1){var Le=o();for(ut.sqrTo(pt[1],Le);xt<=xe;)pt[xt]=o(),ut.mulTo(Le,pt[xt-2],pt[xt]),xt+=2}var Re=v.t-1,Cr,yo=!0,Ze=o(),Qe;for(F=P(v[Re])-1;Re>=0;){for(F>=qt?Cr=v[Re]>>F-qt&xe:(Cr=(v[Re]&(1<<F+1)-1)<<qt-F,Re>0&&(Cr|=v[Re-1]>>this.DB+F-qt)),xt=H;!(Cr&1);)Cr>>=1,--xt;if((F-=xt)<0&&(F+=this.DB,--Re),yo)pt[Cr].copyTo(st),yo=!1;else{for(;xt>1;)ut.sqrTo(st,Ze),ut.sqrTo(Ze,st),xt-=2;xt>0?ut.sqrTo(st,Ze):(Qe=st,st=Ze,Ze=Qe),ut.mulTo(Ze,pt[Cr],st)}for(;Re>=0&&!(v[Re]&1<<F);)ut.sqrTo(st,Ze),Qe=st,st=Ze,Ze=Qe,--F<0&&(F=this.DB-1,--Re)}return ut.revert(st)}function Ki(v){var w=this.s<0?this.negate():this.clone(),F=v.s<0?v.negate():v.clone();if(w.compareTo(F)<0){var H=w;w=F,F=H}var st=w.getLowestSetBit(),ut=F.getLowestSetBit();if(ut<0)return w;for(st<ut&&(ut=st),ut>0&&(w.rShiftTo(ut,w),F.rShiftTo(ut,F));w.signum()>0;)(st=w.getLowestSetBit())>0&&w.rShiftTo(st,w),(st=F.getLowestSetBit())>0&&F.rShiftTo(st,F),w.compareTo(F)>=0?(w.subTo(F,w),w.rShiftTo(1,w)):(F.subTo(w,F),F.rShiftTo(1,F));return ut>0&&F.lShiftTo(ut,F),F}function xc(v){if(v<=0)return 0;var w=this.DV%v,F=this.s<0?v-1:0;if(this.t>0)if(w==0)F=this[0]%v;else for(var H=this.t-1;H>=0;--H)F=(w*F+this[H])%v;return F}function mc(v){var w=v.isEven();if(this.isEven()&&w||v.signum()==0)return s.ZERO;for(var F=v.clone(),H=this.clone(),st=_(1),ut=_(0),pt=_(0),xt=_(1);F.signum()!=0;){for(;F.isEven();)F.rShiftTo(1,F),w?((!st.isEven()||!ut.isEven())&&(st.addTo(this,st),ut.subTo(v,ut)),st.rShiftTo(1,st)):ut.isEven()||ut.subTo(v,ut),ut.rShiftTo(1,ut);for(;H.isEven();)H.rShiftTo(1,H),w?((!pt.isEven()||!xt.isEven())&&(pt.addTo(this,pt),xt.subTo(v,xt)),pt.rShiftTo(1,pt)):xt.isEven()||xt.subTo(v,xt),xt.rShiftTo(1,xt);F.compareTo(H)>=0?(F.subTo(H,F),w&&st.subTo(pt,st),ut.subTo(xt,ut)):(H.subTo(F,H),w&&pt.subTo(st,pt),xt.subTo(ut,xt))}if(H.compareTo(s.ONE)!=0)return s.ZERO;if(xt.compareTo(v)>=0)return xt.subtract(v);if(xt.signum()<0)xt.addTo(v,xt);else return xt;return xt.signum()<0?xt.add(v):xt}var le=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],yc=(1<<26)/le[le.length-1];function gc(v){var w,F=this.abs();if(F.t==1&&F[0]<=le[le.length-1]){for(w=0;w<le.length;++w)if(F[0]==le[w])return!0;return!1}if(F.isEven())return!1;for(w=1;w<le.length;){for(var H=le[w],st=w+1;st<le.length&&H<yc;)H*=le[st++];for(H=F.modInt(H);w<st;)if(H%le[w++]==0)return!1}return F.millerRabin(v)}function C(v){var w=this.subtract(s.ONE),F=w.getLowestSetBit();if(F<=0)return!1;var H=w.shiftRight(F);v=v+1>>1,v>le.length&&(v=le.length);for(var st=o(),ut=0;ut<v;++ut){st.fromInt(le[Math.floor(Math.random()*le.length)]);var pt=st.modPow(H,this);if(pt.compareTo(s.ONE)!=0&&pt.compareTo(w)!=0){for(var xt=1;xt++<F&&pt.compareTo(w)!=0;)if(pt=pt.modPowInt(2,this),pt.compareTo(s.ONE)==0)return!1;if(pt.compareTo(w)!=0)return!1}}return!0}s.prototype.chunkSize=nt,s.prototype.toRadix=vt,s.prototype.fromRadix=Rt,s.prototype.fromNumber=zt,s.prototype.bitwiseTo=Je,s.prototype.changeBit=Gi,s.prototype.addTo=ye,s.prototype.dMultiply=ac,s.prototype.dAddOffset=cc,s.prototype.multiplyLowerTo=fc,s.prototype.multiplyUpperTo=dc,s.prototype.modInt=xc,s.prototype.millerRabin=C,s.prototype.clone=m,s.prototype.intValue=B,s.prototype.byteValue=N,s.prototype.shortValue=Z,s.prototype.signum=mt,s.prototype.toByteArray=Ot,s.prototype.equals=Ke,s.prototype.min=hr,s.prototype.max=fr,s.prototype.and=Jn,s.prototype.or=Zn,s.prototype.xor=hn,s.prototype.andNot=Hi,s.prototype.not=Te,s.prototype.shiftLeft=qi,s.prototype.shiftRight=ti,s.prototype.getLowestSetBit=Wi,s.prototype.bitCount=ri,s.prototype.testBit=ji,s.prototype.setBit=ni,s.prototype.clearBit=Xi,s.prototype.flipBit=ii,s.prototype.add=Ne,s.prototype.subtract=fn,s.prototype.multiply=Yi,s.prototype.divide=ic,s.prototype.remainder=sc,s.prototype.divideAndRemainder=oc,s.prototype.modPow=si,s.prototype.modInverse=mc,s.prototype.pow=hc,s.prototype.gcd=Ki,s.prototype.isProbablePrime=gc,s.prototype.square=nc,s.prototype.Barrett=Sr;var k,D,L;function W(v){D[L++]^=v&255,D[L++]^=v>>8&255,D[L++]^=v>>16&255,D[L++]^=v>>24&255,L>=Vt&&(L-=Vt)}function $(){W(new Date().getTime())}if(D==null){D=new Array,L=0;var et;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var ct=new Uint8Array(32);for(window.crypto.getRandomValues(ct),et=0;et<32;++et)D[L++]=ct[et]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var ht=window.crypto.random(32);for(et=0;et<ht.length;++et)D[L++]=ht.charCodeAt(et)&255}}for(;L<Vt;)et=Math.floor(65536*Math.random()),D[L++]=et>>>8,D[L++]=et&255;L=0,$()}function ft(){if(k==null){for($(),k=Zt(),k.init(D),L=0;L<D.length;++L)D[L]=0;L=0}return k.next()}function dt(v){var w;for(w=0;w<v.length;++w)v[w]=ft()}function gt(){}gt.prototype.nextBytes=dt;function St(){this.i=0,this.j=0,this.S=new Array}function Pt(v){var w,F,H;for(w=0;w<256;++w)this.S[w]=w;for(F=0,w=0;w<256;++w)F=F+this.S[w]+v[w%v.length]&255,H=this.S[w],this.S[w]=this.S[F],this.S[F]=H;this.i=0,this.j=0}function kt(){var v;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,v=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=v,this.S[v+this.S[this.i]&255]}St.prototype.init=Pt,St.prototype.next=kt;function Zt(){return new St}var Vt=256;n.exports={default:s,BigInteger:s,SecureRandom:gt}}).call(yt)})(Gu);var Nt=Gu.exports,sg=Nt.BigInteger.prototype.Barrett;function _e(n,t){this.x=t,this.q=n}function Be(n,t,e,r){this.curve=n,this.x=t,this.y=e,this.z=r==null?Nt.BigInteger.ONE:r,this.zinv=null}function ar(n,t,e){this.q=n,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(e),this.infinity=new Be(this,null,null),this.reducer=new sg(this.q)}_e.prototype.equals=function(n){return n==this||this.q.equals(n.q)&&this.x.equals(n.x)},_e.prototype.toBigInteger=function(){return this.x},_e.prototype.negate=function(){return new _e(this.q,this.x.negate().mod(this.q))},_e.prototype.add=function(n){return new _e(this.q,this.x.add(n.toBigInteger()).mod(this.q))},_e.prototype.subtract=function(n){return new _e(this.q,this.x.subtract(n.toBigInteger()).mod(this.q))},_e.prototype.multiply=function(n){return new _e(this.q,this.x.multiply(n.toBigInteger()).mod(this.q))},_e.prototype.square=function(){return new _e(this.q,this.x.square().mod(this.q))},_e.prototype.divide=function(n){return new _e(this.q,this.x.multiply(n.toBigInteger().modInverse(this.q)).mod(this.q))},Be.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var n=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(n),this.curve.fromBigInteger(n)},Be.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var n=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(n),this.curve.fromBigInteger(n)},Be.prototype.equals=function(n){return n==this||(this.isInfinity()?n.isInfinity():n.isInfinity()?this.isInfinity():!!n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q).equals(Nt.BigInteger.ZERO)&&n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q).equals(Nt.BigInteger.ZERO))},Be.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(Nt.BigInteger.ZERO)&&!this.y.toBigInteger().equals(Nt.BigInteger.ZERO)},Be.prototype.negate=function(){return new Be(this.curve,this.x,this.y.negate(),this.z)},Be.prototype.add=function(n){if(this.isInfinity())return n;if(n.isInfinity())return this;var t=n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q),e=n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q);if(Nt.BigInteger.ZERO.equals(e))return Nt.BigInteger.ZERO.equals(t)?this.twice():this.curve.getInfinity();var r=new Nt.BigInteger("3"),i=this.x.toBigInteger(),s=this.y.toBigInteger(),o=(n.x.toBigInteger(),n.y.toBigInteger(),e.square()),a=o.multiply(e),u=i.multiply(o),c=t.square().multiply(this.z),l=c.subtract(u.shiftLeft(1)).multiply(n.z).subtract(a).multiply(e).mod(this.curve.q),f=u.multiply(r).multiply(t).subtract(s.multiply(a)).subtract(c.multiply(t)).multiply(n.z).add(t.multiply(a)).mod(this.curve.q),h=a.multiply(this.z).multiply(n.z).mod(this.curve.q);return new Be(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(f),h)},Be.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var n=new Nt.BigInteger("3"),t=this.x.toBigInteger(),e=this.y.toBigInteger(),r=e.multiply(this.z),i=r.multiply(e).mod(this.curve.q),s=this.curve.a.toBigInteger(),o=t.square().multiply(n);Nt.BigInteger.ZERO.equals(s)||(o=o.add(this.z.square().multiply(s)));var a=(o=o.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),u=o.multiply(n).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(o.square().multiply(o)).mod(this.curve.q),c=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new Be(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(u),c)},Be.prototype.multiply=function(n){if(this.isInfinity())return this;if(n.signum()==0)return this.curve.getInfinity();var t,e=n,r=e.multiply(new Nt.BigInteger("3")),i=this.negate(),s=this;for(t=r.bitLength()-2;t>0;--t){s=s.twice();var o=r.testBit(t);o!=e.testBit(t)&&(s=s.add(o?this:i))}return s},Be.prototype.multiplyTwo=function(n,t,e){var r;r=n.bitLength()>e.bitLength()?n.bitLength()-1:e.bitLength()-1;for(var i=this.curve.getInfinity(),s=this.add(t);r>=0;)i=i.twice(),n.testBit(r)?i=e.testBit(r)?i.add(s):i.add(this):e.testBit(r)&&(i=i.add(t)),--r;return i},ar.prototype.getQ=function(){return this.q},ar.prototype.getA=function(){return this.a},ar.prototype.getB=function(){return this.b},ar.prototype.equals=function(n){return n==this||this.q.equals(n.q)&&this.a.equals(n.a)&&this.b.equals(n.b)},ar.prototype.getInfinity=function(){return this.infinity},ar.prototype.fromBigInteger=function(n){return new _e(this.q,n)},ar.prototype.reduce=function(n){this.reducer.reduce(n)},ar.prototype.decodePointHex=function(n){switch(parseInt(n.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(n.length-2)/2,e=n.substr(2,t),r=n.substr(t+2,t);return new Be(this,this.fromBigInteger(new Nt.BigInteger(e,16)),this.fromBigInteger(new Nt.BigInteger(r,16)));default:return null}},ar.prototype.encodePointHex=function(n){if(n.isInfinity())return"00";var t=n.getX().toBigInteger().toString(16),e=n.getY().toBigInteger().toString(16),r=this.getQ().toString(16).length;for(r%2!=0&&r++;t.length<r;)t="0"+t;for(;e.length<r;)e="0"+e;return"04"+t+e};var de=function(n,t){return n<<(t%=32)|n>>>32-t},cr=function(n,t){var e=t-n.length;return(e>0?"0".repeat(e):"")+n},og=function(n){return n<16?2043430169:2055708042},ag=function(n,t,e,r){return r<16?n^t^e:n&t|n&e|t&e},cg=function(n,t,e,r){return r<16?n^t^e:n&t|~n&e},lg=function(n,t,e){for(var r,i,s,o,a,u=function(A){var b,_=new Array(132);A.forEach(function(R,z){_[z]=R});for(var S=16;S<68;S++)_[S]=(b=_[S-16]^_[S-9]^de(_[S-3],15))^de(b,15)^de(b,23)^de(_[S-13],7)^_[S-6];for(var I=0;I<64;I++)_[I+68]=_[I]^_[I+4];return _}(t),c=n[0],l=n[1],f=n[2],h=n[3],x=n[4],p=n[5],y=n[6],g=n[7],E=0;E<64;E++)i=(r=de(de(c,12)+x+de(og(E),E),7))^de(c,12),s=ag(c,l,f,E)+h+i+u[E+68],o=cg(x,p,y,E)+g+r+u[E],h=f,f=de(l,9),l=c,c=s,g=y,y=de(p,19),p=x,x=(a=o)^de(a,9)^de(a,17);return[c^n[0],l^n[1],f^n[2],h^n[3],x^n[4],p^n[5],y^n[6],g^n[7]]},t0=function(n,t,e){if(typeof n=="string"?n=Ct.Buffer.from(n,t||"utf8"):n instanceof ArrayBuffer&&(n=Ct.Buffer.from(n)),!Ct.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var r,i,s,o,a,u;r=n,i=Ct.Buffer.alloc(1,128),o=Ct.Buffer.alloc(s=(s=r.length%64)>=56?64-s%56-1:56-s-1,0),a=Ct.Buffer.alloc(8),u=8*r.length,a.writeUInt32BE(Math.floor(u/Math.pow(2,32)),0),a.writeUInt32BE(u%Math.pow(2,32),4);for(var c=(n=Ct.Buffer.concat([r,i,o,a],r.length+1+s+8)).length/64,l=new Array(c),f=0;f<c;f++){l[f]=new Array(16);for(var h=0;h<16;h++)l[f][h]=n.readUInt32BE(64*f+4*h)}var x=new Array(c);x[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var p=0;p<c;p++)x[p+1]=lg(x[p],l[p]);var y=Ct.Buffer.alloc(32);return x[c].forEach(function(g,E){return y.writeInt32BE(g,4*E)}),e?y.toString(e):Si(y)},Xu=new Nt.SecureRandom,e0=function(){var n=new ar(new Nt.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new Nt.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new Nt.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),t=n.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:n,G:t,n:new Nt.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),Yu=e0.curve,Ku=e0.G,Ds=e0.n;function Ju(n,t){for(var e=[],r=Math.ceil(t/32),i=t%32,s=1;s<=r;s++){var o=Ct.Buffer.allocUnsafe(4);o.writeUInt32BE(s);var a=t0(Ct.Buffer.concat([n,o]));e.push(s===r&&i?Ct.Buffer.from(a).slice(0,i):Ct.Buffer.from(a))}return Ct.Buffer.concat(e,t)}var ug={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var n=new Nt.BigInteger(Ds.bitLength(),Xu).mod(Ds.subtract(new Nt.BigInteger("2"))).add(Nt.BigInteger.ONE),t=cr(n.toString(16),64),e=Ku.multiply(n);return{privateKey:t,publicKey:"04"+cr(e.getX().toBigInteger().toString(16),64)+cr(e.getY().toBigInteger().toString(16),64)}},encrypt:function(n,t,e){var r=e||{},i=r.mode,s=i===void 0?1:i,o=r.outputEncoding,a=r.pc;if(typeof n=="string"?n=Ct.Buffer.from(n,r.inputEncoding||"utf8"):n instanceof ArrayBuffer&&(n=Ct.Buffer.from(n)),!Ct.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var u=new Nt.BigInteger(Ds.bitLength(),Xu).mod(Ds.subtract(Nt.BigInteger.ONE)).add(Nt.BigInteger.ONE),c=Ku.multiply(u),l=cr(c.getX().toBigInteger().toString(16),64)+cr(c.getY().toBigInteger().toString(16),64),f=Yu.decodePointHex(t).multiply(u),h=cr(f.getX().toBigInteger().toString(16),64),x=cr(f.getY().toBigInteger().toString(16),64),p=Ju(Ct.Buffer.from(h+x,"hex"),n.length),y=cr(new Nt.BigInteger(n.toString("hex"),16).xor(new Nt.BigInteger(p.toString("hex"),16)).toString(16),2*n.length),g=t0(h+n.toString("hex")+x,"hex","hex"),E=Ct.Buffer.from((a?"04":"")+(s===0?l+y+g:l+g+y),"hex");return o?E.toString(o):Si(E)},decrypt:function(n,t,e){var r=e||{},i=r.mode,s=i===void 0?1:i,o=r.outputEncoding,a=r.pc;if(typeof n=="string"?n=Ct.Buffer.from(n,r.inputEncoding):n instanceof ArrayBuffer&&(n=Ct.Buffer.from(n)),!Ct.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var u=(n=a?n.slice(1):n).slice(0,32).toString("hex"),c=n.slice(32,64).toString("hex"),l=Yu.decodePointHex("04"+u+c).multiply(new Nt.BigInteger(t,16)),f=cr(l.getX().toBigInteger().toString(16),64),h=cr(l.getY().toBigInteger().toString(16),64),x=n.slice(64,96),p=n.slice(96);s===0&&(x=n.slice(n.length-32),p=n.slice(64,n.length-32));var y=Ju(Ct.Buffer.from(f+h,"hex"),p.length),g=new Nt.BigInteger(p.toString("hex"),16).xor(new Nt.BigInteger(y.toString("hex"),16)).toString(16),E=t0(f+g+h,"hex","hex")===x.toString("hex")?Ct.Buffer.from(g,"hex"):Ct.Buffer.alloc(0);return o?E.toString(o):Si(E)}},Ms=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],Is=[2746333894,1453994832,1736282519,2993693404],hg=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],Ts=/^[0-9a-f]{32}$/i,Zu=function(n){return Ms[(4026531840&n)>>>28][(251658240&n)>>>24]<<24|Ms[(15728640&n)>>>20][(983040&n)>>>16]<<16|Ms[(61440&n)>>>12][(3840&n)>>>8]<<8|Ms[(240&n)>>>4][(15&n)>>>0]<<0},Qu=function(n){return(t=Zu(n))^de(t,2)^de(t,10)^de(t,18)^de(t,24);var t},th=function(n){var t,e=new Array(36);e[0]=n[0]^Is[0],e[1]=n[1]^Is[1],e[2]=n[2]^Is[2],e[3]=n[3]^Is[3];for(var r=new Array(32),i=0;i<32;i++)e[i+4]=e[i]^(t=Zu(e[i+1]^e[i+2]^e[i+3]^hg[i]))^de(t,13)^de(t,23),r[i]=e[i+4];return r},eh=function(n,t){for(var e=th(t),r=0;r<32;r++)n[r+4]=n[r]^Qu(n[r+1]^n[r+2]^n[r+3]^e[r]);return[n[35],n[34],n[33],n[32]]},rh=function(n,t){for(var e=th(t).reverse(),r=0;r<32;r++)n[r+4]=n[r]^Qu(n[r+1]^n[r+2]^n[r+3]^e[r]);return[n[35],n[34],n[33],n[32]]},Rs=function(n){return[n.readInt32BE(0),n.readInt32BE(4),n.readInt32BE(8),n.readInt32BE(12)]},Os=function(n){for(var t=Ct.Buffer.alloc(16),e=0;e<4;e++)t.writeInt32BE(n[e],4*e);return t},Dn={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(n,t,e){var r=e||{},i=r.mode,s=r.iv,o=r.outputEncoding;if(typeof n=="string"?n=Ct.Buffer.from(n,r.inputEncoding||"utf8"):n instanceof ArrayBuffer&&(n=Ct.Buffer.from(n)),!Ct.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');if(!Ts.test(t))throw new TypeError("Invalid value of cipher `key`");if(t=Ct.Buffer.from(t,"hex"),i===2&&!Ts.test(s))throw new TypeError("Invalid value of `iv` option");return function(a,u,c,l){c&&(c=Rs(c)),u=Rs(u);for(var f=[],h=(a=function(S){var I=16-S.length%16,R=Ct.Buffer.alloc(I,I);return Ct.Buffer.concat([S,R],S.length+I)}(a)).length/16,x=0;x<h;x++)if(c){var p=16*x,y=[c[0]^a.readInt32BE(p),c[1]^a.readInt32BE(p+4),c[2]^a.readInt32BE(p+8),c[3]^a.readInt32BE(p+12)],g=eh(y,u);f.push(Os(g)),c=g.slice(0)}else{var E=16*x,A=[a.readInt32BE(E),a.readInt32BE(E+4),a.readInt32BE(E+8),a.readInt32BE(E+12)],b=eh(A,u);f.push(Os(b))}var _=Ct.Buffer.concat(f,a.length);return l?_.toString(l):Si(_)}(n,t,s=i===2?Ct.Buffer.from(s,"hex"):null,o)},decrypt:function(n,t,e){var r=e||{},i=r.mode,s=r.iv,o=r.outputEncoding;if(typeof n=="string"?n=Ct.Buffer.from(n,r.inputEncoding):n instanceof ArrayBuffer&&(n=Ct.Buffer.from(n)),!Ct.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');if(!Ts.test(t))throw new TypeError("Invalid value of cipher `key`");if(t=Ct.Buffer.from(t,"hex"),i===2&&!Ts.test(s))throw new TypeError("Invalid value of `iv` option");return function(a,u,c,l){c&&(c=Rs(c)),u=Rs(u);var f=[],h=a.length/16;if(c)for(var x=h-1;x>=0;x--){var p,y=16*x;p=x>0?[a.readInt32BE(y-16),a.readInt32BE(y-16+4),a.readInt32BE(y-16+8),a.readInt32BE(y-16+12)]:c;var g=[a.readInt32BE(y),a.readInt32BE(y+4),a.readInt32BE(y+8),a.readInt32BE(y+12)],E=rh(g,u);f.unshift(Os([E[0]^p[0],E[1]^p[1],E[2]^p[2],E[3]^p[3]]))}else for(var A=0;A<h;A++){var b=16*A,_=[a.readInt32BE(b),a.readInt32BE(b+4),a.readInt32BE(b+8),a.readInt32BE(b+12)],S=rh(_,u);f.push(Os(S))}var I=Ct.Buffer.concat(f,a.length-f[f.length-1][15]);return l?I.toString(l):Si(I)}(n,t,s=i===2?Ct.Buffer.from(s,"hex"):null,o)}};(function(){if(typeof Object.id=="undefined"){var n=0;Object.id=function(t){return typeof t.__uniqueid=="undefined"&&Object.defineProperty(t,"__uniqueid",{value:++n,enumerable:!1,writable:!1}),t.__uniqueid}}})();function fg(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(e){var r,i,s,o,a,u;for(s=e.length,i=0,r="";i<s;){if(o=e.charCodeAt(i++)&255,i==s){r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4),r+="==";break}if(a=e.charCodeAt(i++),i==s){r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4|(a&240)>>4),r+=n.charAt((a&15)<<2),r+="=";break}u=e.charCodeAt(i++),r+=n.charAt(o>>2),r+=n.charAt((o&3)<<4|(a&240)>>4),r+=n.charAt((a&15)<<2|(u&192)>>6),r+=n.charAt(u&63)}return r},this.decode=function(e){var r,i,s,o,a,u,c;for(u=e.length,a=0,c="";a<u;){do r=t[e.charCodeAt(a++)&255];while(a<u&&r==-1);if(r==-1)break;do i=t[e.charCodeAt(a++)&255];while(a<u&&i==-1);if(i==-1)break;c+=String.fromCharCode(r<<2|(i&48)>>4);do{if(s=e.charCodeAt(a++)&255,s==61)return c;s=t[s]}while(a<u&&s==-1);if(s==-1)break;c+=String.fromCharCode((i&15)<<4|(s&60)>>2);do{if(o=e.charCodeAt(a++)&255,o==61)return c;o=t[o]}while(a<u&&o==-1);if(o==-1)break;c+=String.fromCharCode((s&3)<<6|o)}return c},this.utf16to8=function(e){var r,i,s,o;for(r="",s=e.length,i=0;i<s;i++)o=e.charCodeAt(i),o>=1&&o<=127?r+=e.charAt(i):o>2047?(r+=String.fromCharCode(224|o>>12&15),r+=String.fromCharCode(128|o>>6&63),r+=String.fromCharCode(128|o>>0&63)):(r+=String.fromCharCode(192|o>>6&31),r+=String.fromCharCode(128|o>>0&63));return r},this.utf8to16=function(e){var r,i,s,o,a,u;for(r="",s=e.length,i=0;i<s;)switch(o=e.charCodeAt(i++),o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=e.charAt(i-1);break;case 12:case 13:a=e.charCodeAt(i++),r+=String.fromCharCode((o&31)<<6|a&63);break;case 14:a=e.charCodeAt(i++),u=e.charCodeAt(i++),r+=String.fromCharCode((o&15)<<12|(a&63)<<6|(u&63)<<0);break}return r},this.charToHex=function(e){var r,i,s;for(r="",i=0;i<e.length;)s=e.charCodeAt(i++).toString(16),r+="\\0x"+s,r+=i>0&&i%8==0?`\r
36
+ `:", ";return r}}function dg(){var n=0,t=new Object;this.add=function(e,r){this.containsKey(e)||n++,t[e]=r},this.getValue=function(e){return this.containsKey(e)?t[e]:null},this.remove=function(e){this.containsKey(e)&&delete t[e]&&n--},this.containsKey=function(e){return e in t},this.containsValue=function(e){for(var r in t)if(t[r]==e)return!0;return!1},this.getValues=function(){var e=[];for(var r in t)e.push(t[r]);return e},this.getKeys=function(){var e=[];for(var r in t)e.push(r);return e},this.getSize=function(){return n},this.clear=function(){n=0,t=new Object}}function pg(n){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new dg,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var t=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(t)},this.loadModuleCallBack=function(t){if(!t)throw t.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(t,e,r){var i=Object.id(r).toString();this.callbacks_.add(i,r);var s={MsgId:i,Method:t+"|"+n};e&&(s.Param=JSON.stringify(e));var o=JSON.stringify(s);this.connect&&this.ws.send(o)},this.ready=function(t){this.ready_func_=t},this._callback=function(t){var e=JSON.parse(t.data),r=e.MsgId;if(this.callbacks_.containsKey(r)){var i=this.callbacks_.getValue(r);i(e.Result,e.Response),this.callbacks_.remove(r)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:t,DongleInfoNum:e},r){this.exec("Arm_GetDongleInfo",[parseInt(t),parseInt(e)],r)},this.Arm_Enum=function(t){this.exec("Arm_Enum",null,t)},this.Arm_Open=function({Index:t},e){this.exec("Arm_Open",[parseInt(t)],e)},this.Arm_Close=function({Handle:t},e){this.exec("Arm_Close",[parseInt(t)],e)},this.Arm_VerifyPIN=function({Handle:t,UserPin:e,UserType:r},i){this.exec("Arm_VerifyPIN",[parseInt(t),r,e],i)},this.Arm_ResetState=function({Handle:t},e){this.exec("Arm_ResetState",[parseInt(t)],e)},this.Arm_GenRandom=function({Handle:t,RandomLen:e},r){this.exec("Arm_GenRandom",[parseInt(t),parseInt(e)],r)},this.Arm_LEDControl=function({Handle:t,LedFlag:e},r){this.exec("Arm_LEDControl",[parseInt(t),e],r)},this.Arm_SwitchProtocol=function({Handle:t,ProtocolFlag:e},r){this.exec("Arm_SwitchProtocol",[parseInt(t),e],r)},this.Arm_CreateFile=function({Handle:t,FileID:e,FileType:r,AttrBuffer:i},s){this.exec("Arm_CreateFile",[parseInt(t),r,parseInt(e),i],s)},this.Arm_WriteFile=function({Handle:t,FileID:e,FileType:r,FileOffset:i,DataInput:s},o){this.exec("Arm_WriteFile",[parseInt(t),r,parseInt(e),parseInt(i),s],o)},this.Arm_ReadFile0001=function({Handle:t},e){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0001"),parseInt(0),parseInt("64")],e)},this.Arm_ReadFile0002=function({Handle:t},e){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0002"),parseInt(0),parseInt("130")],e)},this.Arm_ReadFile0003=function({Handle:t},e){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0003"),parseInt(0),parseInt("130")],e)},this.Arm_ReadFile0004=function({Handle:t},e){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0004"),parseInt(0),parseInt("2048")],e)},this.Arm_ReadFile0005=function({Handle:t},e){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0005"),parseInt(0),parseInt("2048")],e)},this.Arm_DownloadExeFile=function({Handle:t,Count:e,ExeFileInfo:r},i){this.exec("Arm_DownloadExeFile",[parseInt(t),parseInt(e),r],i)},this.Arm_RunExeFile=function({Handle:t,FileID:e,InData:r,DataLen:i},s){this.exec("Arm_RunExeFile",[parseInt(t),parseInt(e),r,r.length,parseInt(i)],s)},this.Arm_ReadRunExeFileData=function(t){this.exec("Arm_ReadRunExeFileData",null,t)},this.Arm_DeleteFile=function({Handle:t,FileID:e,FileType:r},i){this.exec("Arm_DeleteFile",[parseInt(t),r,parseInt(e)],i)},this.Arm_WriteData=function({Handle:t,Offset:e,DataInput:r},i){this.exec("Arm_WriteData",[parseInt(t),parseInt(e),r],i)},this.Arm_ReadData=function({Handle:t,Offset:e,ReadLength:r},i){this.exec("Arm_ReadData",[parseInt(t),parseInt(e),r],i)},this.Arm_WriteShareMemory=function({Handle:t,DataInput:e},r){this.exec("Arm_WriteShareMemory",[parseInt(t),e],r)},this.Arm_ReadShareMemory=function({Handle:t},e){this.exec("Arm_ReadShareMemory",[parseInt(t)],e)},this.Arm_GenUniqueKey=function({Handle:t,Seed:e},r){this.exec("Arm_GenUniqueKey",[parseInt(t),e.length,e],r)},this.Arm_ChangePIN=function({Handle:t,NewPIN:e,OldPIN:r,TryCount:i,PinFlag:s},o){this.exec("Arm_ChangePIN",[parseInt(t),s,r,e,parseInt(i)],o)},this.Arm_ResetUserPIN=function({Handle:t,AdminPIN:e},r){this.exec("Arm_ResetUserPIN",[parseInt(t),e],r)},this.Arm_SetUserID=function({Handle:t,UserID:e},r){this.exec("Arm_SetUserID",[parseInt(t),parseInt(e)],r)},this.Arm_GetDeadline=function({Handle:t},e){this.exec("Arm_GetDeadline",[parseInt(t)],e)},this.Arm_SetDeadline=function({Handle:t,SetDeadTime:e},r){this.exec("Arm_SetDeadline",[parseInt(t),parseInt(e)],r)},this.Arm_GetUTCTime=function({Handle:t},e){this.exec("Arm_GetUTCTime",[parseInt(t)],e)},this.Arm_RFS=function({Handle:t},e){this.exec("Arm_RFS",[parseInt(t)],e)},this.Arm_RsaGenPubPriKey=function({Handle:t,RsaFileId:e},r){this.exec("Arm_RsaGenPubPriKey",[parseInt(t),parseInt(e)],r)},this.Arm_EccGenPubPriKey=function({Handle:t,EccFileId:e},r){this.exec("Arm_EccGenPubPriKey",[parseInt(t),parseInt(e)],r)},this.Arm_Sm2GenPubPriKey=function({Handle:t,Sm2FileId:e},r){this.exec("Arm_Sm2GenPubPriKey",[parseInt(t),parseInt(e)],r)},this.Arm_ReadRsaPri=function(t){this.exec("Arm_ReadRsaPri",null,t)},this.Arm_ReadRsaPub=function(t){this.exec("Arm_ReadRsaPub",null,t)},this.Arm_ReadEccPri=function(t){this.exec("Arm_ReadEccPri",null,t)},this.Arm_ReadEccPub=function(t){this.exec("Arm_ReadEccPub",null,t)},this.Arm_ReadSm2Pri=function(t){this.exec("Arm_ReadSm2Pri",null,t)},this.Arm_ReadSm2Pub=function(t){this.exec("Arm_ReadSm2Pub",null,t)},this.Arm_RsaPri=function({Handle:t,RsaPri_Flag:e,RsaPriInData:r,RsaPriFileID:i,RsaPriFileSize:s},o){this.exec("Arm_RsaPri",[parseInt(t),parseInt(i),parseInt(s),e,r],o)},this.Arm_RsaPub=function({Handle:t,RsaPubKey:e,RsaPub_Flag:r,RsaPubInData:i,RsaPubFileSize:s},o){this.exec("Arm_RsaPub",[parseInt(t),parseInt(s),r,e,e.length,i],o)},this.Arm_EccSign=function({Handle:t,HashData:e,EccFileId:r},i){this.exec("Arm_EccSign",[parseInt(t),parseInt(r),e],i)},this.Arm_EccVerify=function({Handle:t,HashData:e,EccPubKey:r,EccSignData:i},s){this.exec("Arm_EccVerify",[parseInt(t),r,r.length,e,i],s)},this.Arm_Sm2Sign=function({Handle:t,HashData:e,Sm2FileId:r},i){this.exec("Arm_Sm2Sign",[parseInt(t),parseInt(r),e],i)},this.Arm_Sm2Verify=function({Handle:t,HashData:e,Sm2PubKey:r,Sm2SignData:i},s){this.exec("Arm_Sm2Verify",[parseInt(t),r,r.length,e,i],s)},this.Arm_TDES=function({Handle:t,Tdes_Flag:e,TdesFileID:r,TdesInData:i},s){this.exec("Arm_TDES",[parseInt(t),parseInt(r),e,i],s)},this.Arm_SM4=function({Handle:t,Sm4_Flag:e,Sm4FileID:r,Sm4InData:i},s){this.exec("Arm_SM4",[parseInt(t),parseInt(r),e,i],s)},this.Arm_HASH=function({Handle:t,Hash_Flag:e,HashInData:r},i){this.exec("Arm_HASH",[parseInt(t),e,r],i)},this.Arm_Seed=function({Handle:t,SeedData:e,SeedLength:r},i){this.exec("Arm_Seed",[parseInt(t),r,e],i)},this.Arm_LimitSeedCount=function({Handle:t,SeedCount:e},r){this.exec("Arm_LimitSeedCount",[parseInt(t),parseInt(e)],r)},this.Arm_GenMotherKey=function({Handle:t,SeedLen:e,SeedForPID:r,SonCount:i,StartUserID:s,AdminTryCount:o,UserPin:a,UserTryCount:u,UpdateRSAPriKey:c},l){this.exec("Arm_GenMotherKey",[parseInt(t),parseInt(e),r,a,parseInt(u),parseInt(o),c,parseInt(s),parseInt(i)],l)},this.Arm_RequestInit=function({Handle:t},e){this.exec("Arm_RequestInit",[parseInt(t)],e)},this.Arm_GetInitDataFromMother=function({Handle:t},e){this.exec("Arm_GetInitDataFromMother",[parseInt(t),Request],e)},this.Arm_InitSon=function({Handle:t,InitData:e},r){this.exec("Arm_InitSon",[parseInt(t),e],r)},this.Arm_SetUpdatePriKey=function({Handle:t,UpdatePriKey:e},r){this.exec("Arm_SetUpdatePriKey",[parseInt(t),e],r)},this.Arm_MakeUpdatePacket=function({Handle:t,HID:e,Func:r,FileID:i,FileType:s,Offset:o,DataLen:a,DataBuffer:u,UpRSAPubKey:c},l){this.exec("Arm_MakeUpdatePacket",[parseInt(t),e,r,s,parseInt(i),parseInt(o),u,c,parseInt(a)],l)},this.Arm_MakeUpdatePacketFromMother=function({Handle:t,HID:e,Func:r,FileID:i,FileType:s,Offset:o,DataLen:a,DataBuffer:u},c){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(t),e,r,s,parseInt(i),parseInt(o),u,parseInt(a)],c)},this.Arm_Update=function({Handle:t,UpdateData:e},r){this.exec("Arm_Update",[parseInt(t),e],r)},this.Arm_Set_DATA_FILE_ATTR=function({Size:t,ReadPriv:e,WritePriv:r},i){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(t),parseInt(e),parseInt(r)],i)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:t,Size:e,Type:r,Priv:i,IsReset:s,IsDecOnRAM:o},a){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[r,parseInt(e),parseInt(t),parseInt(i),parseInt(o),parseInt(s)],a)},this.Arm_Set_KEY_FILE_ATTR=function({Size:t,PrivEnc:e},r){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(t),parseInt(e)],r)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:t,PrivExe:e},r){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(t),parseInt(e)],r)},this.Arm_Set_DATA_LIC=function({ReadPriv:t,WritePriv:e},r){this.exec("Arm_Set_DATA_LIC",[parseInt(t),parseInt(e)],r)},this.Arm_Set_PRIKEY_LIC=function({Count:t,Priv:e,IsReset:r,IsDecOnRAM:i},s){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(t),parseInt(e),parseInt(i),parseInt(r)],s)},this.Arm_Set_KEY_LIC=function({PrivEnc:t},e){this.exec("Arm_Set_KEY_LIC",[parseInt(t)],e)},this.Arm_Set_EXE_LIC=function({PrivExe:t},e){this.exec("Arm_Set_EXE_LIC",[parseInt(t)],e)},this.Arm_Set_EXE_FILE_INFO=function({FileID:t,FileData:e,FileSize:r,InBuffer:i,CallLimit:s},o){this.exec("Arm_Set_EXE_FILE_INFO",[i,parseInt(r),parseInt(t),parseInt(s),e,e.length],o)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:t},e){this.exec("Arm_Clear_EXE_FILE_INFO",[t],e)}}const xg={HID:0},Ps={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},nh={USER:0};class ih{constructor(){xn(this,"Base64",new fg);xn(this,"AtlCtrl",null);xn(this,"ArmCount",0);xn(this,"ArmIndex",0);xn(this,"ArmHandle",0);xn(this,"ArmRandom","");try{this.AtlCtrl=new pg("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(t){console.error(t),this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((t,e)=>{this.AtlCtrl.Arm_Enum((r,i)=>{r?(this.ArmCount=+i,t(i)):e(i)})})}armOpen(t=0){if(this.AtlCtrl)return this.ArmIndex=t,new Promise((e,r)=>{this.AtlCtrl.Arm_Open({Index:t},(i,s)=>{i?(this.ArmHandle=+s,e(s)):(this.ArmHandle=s,r(s))})})}armClose(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_Close({Handle:t},(i,s)=>{i?e(s):r(s)})})}armChangePIN(t,e,r=255,i=nh.USER,s=this.ArmHandle){if(this.AtlCtrl)return new Promise((o,a)=>{this.AtlCtrl.Arm_ChangePIN({Handle:s,NewPIN:t,OldPIN:e,TryCount:r,PinFlag:i},(u,c)=>{u&&c==0?(this.ArmPin=t,o(c)):a(c)})})}armGenRandom(t=16,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_GenRandom({Handle:e,RandomLen:t},(s,o)=>{s?(this.ArmRandom=o,r(o)):i(o)})})}armGetDeadline(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_GetDeadline({Handle:t},(i,s)=>{i?(this.ArmDeadline=s,e(s)):r(s)})})}armGenUniqueKey(t="MTIzNDU2Nzg5MA==",e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:e,Seed:t},(s,o)=>{s?(this.ArmUKey=o,r(o)):i(o)})})}armGetDongleInfo(t=0,e=Ps.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=t,new Promise((r,i)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:t,DongleInfoNum:e},(s,o)=>{if(s){switch(e){case Ps.USER_ID:this.ArmUid=o;break;case Ps.PRODUCT_ID:this.ArmPid=o;break;case Ps.HARDWARE_ID:this.ArmHid=o;break}r(o)}else i(o)})})}armLEDControl(t,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_LEDControl({Handle:e,LedFlag:t},(s,o)=>{s&&o==0?r(o):i(o)})})}armRFS(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_RFS({Handle:t},(i,s)=>{i&&s==0?e(s):r(s)})})}armReadFile(t="0001",e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl[`Arm_ReadFile${t}`]({Handle:e},(s,o)=>{if(s&&o.length>0)try{o=this.Base64.decode(o),r(o)}catch(a){console.error(a),r(o)}else i(o)})})}armResetState(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_ResetState({Handle:t},(i,s)=>{i&&s==0?e(s):r(s)})})}armResetUserPIN(t,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:e,AdminPIN:t},(s,o)=>{s&&o==0?r(o):i(o)})})}armSetUserID(t,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_SetUserID({Handle:e,UserID:t},(s,o)=>{s&&o==0?r(o):i(o)})})}armSetDeadline(t,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_SetDeadline({Handle:e,SetDeadTime:t},(s,o)=>{s&&o==0?r(o):i(o)})})}armSwitchProtocol(t=xg.HID,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:e,ProtocolFlag:t},(s,o)=>{s&&o==0?r(o):i(o)})})}armVerifyPIN(t,e=nh.USER,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,s)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:r,UserPin:t,UserType:e},(o,a)=>{o&&a==0?(this.ArmPin=t,i(a)):s(a)})})}armReadData(t=0,e=128,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,s)=>{this.AtlCtrl.Arm_ReadData({Handle:r,Offset:t,ReadLength:e},(o,a)=>{o?(this.ArmData=a,i(a)):s(a)})})}armWriteData(t,e=0,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,s)=>{this.AtlCtrl.Arm_WriteData({Handle:r,Offset:e,DataInput:t},(o,a)=>{o&&a==0?i(a):s(a)})})}armReadShareMemory(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:t},(i,s)=>{i?(this.ArmData=s,e(s)):r(s)})})}armWriteShareMemory(t,e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:e,DataInput:t},(s,o)=>{s&&o==0?r(o):i(o)})})}}const sh=Symbol(),zs="el",mg="is-",Zr=(n,t,e,r,i)=>{let s=`${n}-${t}`;return e&&(s+=`-${e}`),r&&(s+=`__${r}`),i&&(s+=`--${i}`),s},oh=Symbol("namespaceContextKey"),yg=n=>{const t=n||(T.getCurrentInstance()?T.inject(oh,T.ref(zs)):T.ref(zs));return T.computed(()=>T.unref(t)||zs)},r0=(n,t)=>{const e=yg(t);return{namespace:e,b:(y="")=>Zr(e.value,n,y,"",""),e:y=>y?Zr(e.value,n,"",y,""):"",m:y=>y?Zr(e.value,n,"","",y):"",be:(y,g)=>y&&g?Zr(e.value,n,y,g,""):"",em:(y,g)=>y&&g?Zr(e.value,n,"",y,g):"",bm:(y,g)=>y&&g?Zr(e.value,n,y,"",g):"",bem:(y,g,E)=>y&&g&&E?Zr(e.value,n,y,g,E):"",is:(y,...g)=>{const E=g.length>=1?g[0]:!0;return y&&E?`${mg}${y}`:""},cssVar:y=>{const g={};for(const E in y)y[E]&&(g[`--${e.value}-${E}`]=y[E]);return g},cssVarName:y=>`--${e.value}-${y}`,cssVarBlock:y=>{const g={};for(const E in y)y[E]&&(g[`--${e.value}-${n}-${E}`]=y[E]);return g},cssVarBlockName:y=>`--${e.value}-${n}-${y}`}};/**
37
+ * @vue/shared v3.5.33
38
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
39
+ * @license MIT
40
+ **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const gg=Object.prototype.hasOwnProperty,n0=(n,t)=>gg.call(n,t),vg=Array.isArray,ks=n=>typeof n=="function",Mn=n=>typeof n=="string",ah=n=>n!==null&&typeof n=="object",i0=n=>typeof n=="boolean",Qr=n=>typeof n=="number",wg=n=>typeof Element=="undefined"?!1:n instanceof Element,bg=n=>Mn(n)?!Number.isNaN(Number(n)):!1;var ch;const tn=typeof window!="undefined",Eg=n=>typeof n=="string",Ag=()=>{};tn&&((ch=window==null?void 0:window.navigator)!=null&&ch.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function s0(n){return typeof n=="function"?n():T.unref(n)}function _g(n){return n}function o0(n){return T.getCurrentScope()?(T.onScopeDispose(n),!0):!1}function Sg(n,t=!0){T.getCurrentInstance()?T.onMounted(n):t?n():T.nextTick(n)}function Cg(n,t,e={}){const{immediate:r=!0}=e,i=T.ref(!1);let s=null;function o(){s&&(clearTimeout(s),s=null)}function a(){i.value=!1,o()}function u(...c){o(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,n(...c)},s0(t))}return r&&(i.value=!0,tn&&u()),o0(a),{isPending:T.readonly(i),start:u,stop:a}}function lh(n){var t;const e=s0(n);return(t=e==null?void 0:e.$el)!=null?t:e}const uh=tn?window:void 0;function Bg(...n){let t,e,r,i;if(Eg(n[0])||Array.isArray(n[0])?([e,r,i]=n,t=uh):[t,e,r,i]=n,!t)return Ag;Array.isArray(e)||(e=[e]),Array.isArray(r)||(r=[r]);const s=[],o=()=>{s.forEach(l=>l()),s.length=0},a=(l,f,h,x)=>(l.addEventListener(f,h,x),()=>l.removeEventListener(f,h,x)),u=T.watch(()=>[lh(t),s0(i)],([l,f])=>{o(),l&&s.push(...e.flatMap(h=>r.map(x=>a(l,h,x,f))))},{immediate:!0,flush:"post"}),c=()=>{u(),o()};return o0(c),c}function Fg(n,t=!1){const e=T.ref(),r=()=>e.value=!!n();return r(),Sg(r,t),e}const hh=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},fh="__vueuse_ssr_handlers__";hh[fh]=hh[fh]||{};var dh=Object.getOwnPropertySymbols,Dg=Object.prototype.hasOwnProperty,Mg=Object.prototype.propertyIsEnumerable,Ig=(n,t)=>{var e={};for(var r in n)Dg.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&dh)for(var r of dh(n))t.indexOf(r)<0&&Mg.call(n,r)&&(e[r]=n[r]);return e};function Tg(n,t,e={}){const r=e,{window:i=uh}=r,s=Ig(r,["window"]);let o;const a=Fg(()=>i&&"ResizeObserver"in i),u=()=>{o&&(o.disconnect(),o=void 0)},c=T.watch(()=>lh(n),f=>{u(),a.value&&i&&f&&(o=new ResizeObserver(t),o.observe(f,s))},{immediate:!0,flush:"post"}),l=()=>{u(),c()};return o0(l),{isSupported:a,stop:l}}var ph;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(ph||(ph={}));var Rg=Object.defineProperty,xh=Object.getOwnPropertySymbols,Og=Object.prototype.hasOwnProperty,Pg=Object.prototype.propertyIsEnumerable,mh=(n,t,e)=>t in n?Rg(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,zg=(n,t)=>{for(var e in t||(t={}))Og.call(t,e)&&mh(n,e,t[e]);if(xh)for(var e of xh(t))Pg.call(t,e)&&mh(n,e,t[e]);return n};zg({linear:_g},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});class kg extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Ci(n,t){if(typeof process!="undefined"&&process.env.NODE_ENV!=="production"){const e=Mn(n)?new kg(`[${n}] ${t}`):n;console.warn(e)}}const yh={current:0},gh=T.ref(0),vh=2e3,wh=Symbol("elZIndexContextKey"),bh=Symbol("zIndexContextKey"),Ng=n=>{const t=T.getCurrentInstance()?T.inject(wh,yh):yh,e=n||(T.getCurrentInstance()?T.inject(bh,void 0):void 0),r=T.computed(()=>{const o=T.unref(e);return Qr(o)?o:vh}),i=T.computed(()=>r.value+gh.value),s=()=>(t.current++,gh.value=t.current,i.value);return!tn&&!T.inject(wh)&&Ci("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
41
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,currentZIndex:i,nextZIndex:s}};var Lg={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Ug=n=>(t,e)=>$g(t,e,T.unref(n)),$g=(n,t,e)=>Ht.get(e,n,n).replace(/\{(\w+)\}/g,(r,i)=>{var s;return`${(s=t==null?void 0:t[i])!=null?s:`{${i}}`}`}),Hg=n=>{const t=T.computed(()=>T.unref(n).name),e=T.isRef(n)?n:T.ref(n);return{lang:t,locale:e,t:Ug(n)}},Eh=Symbol("localeContextKey"),qg=n=>{const t=n||T.inject(Eh,T.ref());return Hg(T.computed(()=>t.value||Lg))},Ah="__epPropKey",Fe=n=>n,Wg=n=>ah(n)&&!!n[Ah],_h=(n,t)=>{if(!ah(n)||Wg(n))return n;const{values:e,required:r,default:i,type:s,validator:o}=n,u={type:s,required:!!r,validator:e||o?c=>{let l=!1,f=[];if(e&&(f=Array.from(e),n0(n,"default")&&f.push(i),l||(l=f.includes(c))),o&&(l||(l=o(c))),!l&&f.length>0){const h=[...new Set(f)].map(x=>JSON.stringify(x)).join(", ");T.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return l}:void 0,[Ah]:!0};return n0(n,"default")&&(u.default=i),u},Bi=n=>Ht.fromPairs(Object.entries(n).map(([t,e])=>[t,_h(e,t)])),Vg=_h({type:String,values:["","default","small","large"],required:!1}),jg=Symbol("size"),Gg=Symbol("emptyValuesContextKey"),Xg=Bi({emptyValues:Array,valueOnClear:{type:Fe([String,Number,Boolean,Function]),default:void 0,validator:n=>(n=ks(n)?n():n,vg(n)?n.every(t=>!t):!n)}}),Sh=n=>Object.keys(n),Ns=T.ref();function Ch(n,t=void 0){return T.getCurrentInstance()?T.inject(sh,Ns):Ns}function Yg(n,t){const e=Ch(),r=r0(n,T.computed(()=>{var a;return((a=e.value)==null?void 0:a.namespace)||zs})),i=qg(T.computed(()=>{var a;return(a=e.value)==null?void 0:a.locale})),s=Ng(T.computed(()=>{var a;return((a=e.value)==null?void 0:a.zIndex)||vh})),o=T.computed(()=>{var a;return T.unref(t)||((a=e.value)==null?void 0:a.size)||""});return Bh(T.computed(()=>T.unref(e)||{})),{ns:r,locale:i,zIndex:s,size:o}}const Bh=(n,t,e=!1)=>{var r;const i=!!T.getCurrentInstance(),s=i?Ch():void 0,o=(r=void 0)!=null?r:i?T.provide:void 0;if(!o){Ci("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const a=T.computed(()=>{const u=T.unref(n);return s!=null&&s.value?Kg(s.value,u):u});return o(sh,a),o(Eh,T.computed(()=>a.value.locale)),o(oh,T.computed(()=>a.value.namespace)),o(bh,T.computed(()=>a.value.zIndex)),o(jg,{size:T.computed(()=>a.value.size||"")}),o(Gg,T.computed(()=>({emptyValues:a.value.emptyValues,valueOnClear:a.value.valueOnClear}))),(e||!Ns.value)&&(Ns.value=a.value),a},Kg=(n,t)=>{const e=[...new Set([...Sh(n),...Sh(t)])],r={};for(const i of e)r[i]=t[i]!==void 0?t[i]:n[i];return r};var a0=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e};const Jg="utils/dom/style";function c0(n,t="px"){if(!n&&n!==0)return"";if(Qr(n)||bg(n))return`${n}${t}`;if(Mn(n))return n;Ci(Jg,"binding value must be a string or number")}const Fh=(n,t)=>(n.install=e=>{for(const r of[n,...Object.values({})])e.component(r.name,r)},n),Zg=(n,t)=>(n.install=e=>{n._context=e._context,e.config.globalProperties[t]=n},n),Qg=Bi({size:{type:Fe([Number,String])},color:{type:String}}),t2=T.defineComponent({name:"ElIcon",inheritAttrs:!1}),e2=T.defineComponent(tr(Ut({},t2),{props:Qg,setup(n){const t=n,e=r0("icon"),r=T.computed(()=>{const{size:i,color:s}=t,o=c0(i);return!o&&!s?{}:{fontSize:o,"--color":s}});return(i,s)=>(T.openBlock(),T.createElementBlock("i",T.mergeProps({class:T.unref(e).b(),style:T.unref(r)},i.$attrs),[T.renderSlot(i.$slots,"default")],16))}}));var r2=a0(e2,[["__file","icon.vue"]]);const Dh=Fh(r2);/*! Element Plus Icons Vue v2.3.2 */var n2=T.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(n){return(t,e)=>(T.openBlock(),T.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[T.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),i2=n2,s2=T.defineComponent({name:"Close",__name:"close",setup(n){return(t,e)=>(T.openBlock(),T.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[T.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),o2=s2,a2=T.defineComponent({name:"InfoFilled",__name:"info-filled",setup(n){return(t,e)=>(T.openBlock(),T.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[T.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Mh=a2,c2=T.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(n){return(t,e)=>(T.openBlock(),T.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[T.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),l2=c2,u2=T.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(n){return(t,e)=>(T.openBlock(),T.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[T.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),h2=u2;const f2=Fe([String,Object,Function]),d2={Close:o2},Ih={primary:Mh,success:l2,warning:h2,error:i2,info:Mh},p2=()=>tn&&/android/i.test(window.navigator.userAgent),x2=n=>n,l0={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},m2=n=>{if(n.code&&n.code!=="Unidentified")return n.code;const t=y2(n);if(t){if(Object.values(l0).includes(t))return t;switch(t){case" ":return l0.space;default:return""}}return""},y2=n=>{let t=n.key&&n.key!=="Unidentified"?n.key:"";if(!t&&n.type==="keyup"&&p2()){const e=n.target;t=e.value.charAt(e.selectionStart-1)}return t},g2=Bi({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Fe([String,Object,Array])},offset:{type:Fe(Array),default:[0,0]},badgeClass:{type:String}}),v2=T.defineComponent({name:"ElBadge"}),w2=T.defineComponent(tr(Ut({},v2),{props:g2,setup(n,{expose:t}){const e=n,r=r0("badge"),i=T.computed(()=>e.isDot?"":Qr(e.value)&&Qr(e.max)?e.max<e.value?`${e.max}+`:`${e.value}`:`${e.value}`),s=T.computed(()=>{var o;return[{backgroundColor:e.color,marginRight:c0(-e.offset[0]),marginTop:c0(e.offset[1])},(o=e.badgeStyle)!=null?o:{}]});return t({content:i}),(o,a)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(r).b())},[T.renderSlot(o.$slots,"default"),T.createVNode(T.Transition,{name:`${T.unref(r).namespace.value}-zoom-in-center`,persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("sup",{class:T.normalizeClass([T.unref(r).e("content"),T.unref(r).em("content",o.type),T.unref(r).is("fixed",!!o.$slots.default),T.unref(r).is("dot",o.isDot),T.unref(r).is("hide-zero",!o.showZero&&o.value===0),o.badgeClass]),style:T.normalizeStyle(T.unref(s))},[T.renderSlot(o.$slots,"content",{value:T.unref(i)},()=>[T.createTextVNode(T.toDisplayString(T.unref(i)),1)])],6),[[T.vShow,!o.hidden&&(T.unref(i)||o.isDot||o.$slots.content)]])]),_:3},8,["name"])],2))}}));var b2=a0(w2,[["__file","badge.vue"]]);const E2=Fh(b2),A2=Bi(Ut({a11y:{type:Boolean,default:!0},locale:{type:Fe(Object)},size:Vg,button:{type:Fe(Object)},card:{type:Fe(Object)},dialog:{type:Fe(Object)},link:{type:Fe(Object)},experimentalFeatures:{type:Fe(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Fe(Object)},zIndex:Number,namespace:{type:String,default:"el"}},Xg)),ve={placement:"top"};T.defineComponent({name:"ElConfigProvider",props:A2,setup(n,{slots:t}){const e=Bh(n);return T.watch(()=>n.message,r=>{var i,s;Object.assign(ve,(s=(i=e==null?void 0:e.value)==null?void 0:i.message)!=null?s:{},r!=null?r:{})},{immediate:!0,deep:!0}),()=>T.renderSlot(t,"default",{config:e==null?void 0:e.value})}});const Th=["primary","success","info","warning","error"],Rh=["top","top-left","top-right","bottom","bottom-left","bottom-right"],In="top",we=x2({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:tn?document.body:void 0}),_2=Bi({customClass:{type:String,default:we.customClass},dangerouslyUseHTMLString:{type:Boolean,default:we.dangerouslyUseHTMLString},duration:{type:Number,default:we.duration},icon:{type:f2,default:we.icon},id:{type:String,default:we.id},message:{type:Fe([String,Object,Function]),default:we.message},onClose:{type:Fe(Function),default:we.onClose},showClose:{type:Boolean,default:we.showClose},type:{type:String,values:Th,default:we.type},plain:{type:Boolean,default:we.plain},offset:{type:Number,default:we.offset},placement:{type:String,values:Rh,default:we.placement},zIndex:{type:Number,default:we.zIndex},grouping:{type:Boolean,default:we.grouping},repeatNum:{type:Number,default:we.repeatNum}}),S2={destroy:()=>!0},$e=T.shallowReactive({}),C2=n=>($e[n]||($e[n]=T.shallowReactive([])),$e[n]),B2=(n,t)=>{const e=$e[t]||[],r=e.findIndex(o=>o.id===n),i=e[r];let s;return r>0&&(s=e[r-1]),{current:i,prev:s}},F2=(n,t)=>{const{prev:e}=B2(n,t);return e?e.vm.exposed.bottom.value:0},D2=(n,t,e)=>($e[e]||[]).findIndex(s=>s.id===n)>0?16:t,M2=T.defineComponent({name:"ElMessage"}),I2=T.defineComponent(tr(Ut({},M2),{props:_2,emits:S2,setup(n,{expose:t,emit:e}){const r=n,{Close:i}=d2,s=T.ref(!1),{ns:o,zIndex:a}=Yg("message"),{currentZIndex:u,nextZIndex:c}=a,l=T.ref(),f=T.ref(!1),h=T.ref(0);let x;const p=T.computed(()=>r.type?r.type==="error"?"danger":r.type:"info"),y=T.computed(()=>{const q=r.type;return{[o.bm("icon",q)]:q&&Ih[q]}}),g=T.computed(()=>r.icon||Ih[r.type]||""),E=T.computed(()=>r.placement||In),A=T.computed(()=>F2(r.id,E.value)),b=T.computed(()=>D2(r.id,r.offset,E.value)+A.value),_=T.computed(()=>h.value+b.value),S=T.computed(()=>E.value.includes("left")?o.is("left"):E.value.includes("right")?o.is("right"):o.is("center")),I=T.computed(()=>E.value.startsWith("top")?"top":"bottom"),R=T.computed(()=>({[I.value]:`${b.value}px`,zIndex:u.value}));function z(){r.duration!==0&&({stop:x}=Cg(()=>{O()},r.duration))}function X(){x==null||x()}function O(){f.value=!1,T.nextTick(()=>{var q;s.value||((q=r.onClose)==null||q.call(r),e("destroy"))})}function P(q){m2(q)===l0.esc&&O()}return T.onMounted(()=>{z(),c(),f.value=!0}),T.watch(()=>r.repeatNum,()=>{X(),z()}),Bg(document,"keydown",P),Tg(l,()=>{h.value=l.value.getBoundingClientRect().height}),t({visible:f,bottom:_,close:O}),(q,j)=>(T.openBlock(),T.createBlock(T.Transition,{name:T.unref(o).b("fade"),onBeforeEnter:K=>s.value=!0,onBeforeLeave:q.onClose,onAfterLeave:K=>q.$emit("destroy"),persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{id:q.id,ref_key:"messageRef",ref:l,class:T.normalizeClass([T.unref(o).b(),{[T.unref(o).m(q.type)]:q.type},T.unref(o).is("closable",q.showClose),T.unref(o).is("plain",q.plain),T.unref(o).is("bottom",T.unref(I)==="bottom"),T.unref(S),q.customClass]),style:T.normalizeStyle(T.unref(R)),role:"alert",onMouseenter:X,onMouseleave:z},[q.repeatNum>1?(T.openBlock(),T.createBlock(T.unref(E2),{key:0,value:q.repeatNum,type:T.unref(p),class:T.normalizeClass(T.unref(o).e("badge"))},null,8,["value","type","class"])):T.createCommentVNode("v-if",!0),T.unref(g)?(T.openBlock(),T.createBlock(T.unref(Dh),{key:1,class:T.normalizeClass([T.unref(o).e("icon"),T.unref(y)])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(g))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.renderSlot(q.$slots,"default",{},()=>[q.dangerouslyUseHTMLString?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),T.createElementVNode("p",{class:T.normalizeClass(T.unref(o).e("content")),innerHTML:q.message},null,10,["innerHTML"])],2112)):(T.openBlock(),T.createElementBlock("p",{key:0,class:T.normalizeClass(T.unref(o).e("content"))},T.toDisplayString(q.message),3))]),q.showClose?(T.openBlock(),T.createBlock(T.unref(Dh),{key:2,class:T.normalizeClass(T.unref(o).e("closeBtn")),onClick:T.withModifiers(O,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(i))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],46,["id"]),[[T.vShow,f.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}}));var T2=a0(I2,[["__file","message.vue"]]);let R2=1;const O2=n=>{if(!n.appendTo)n.appendTo=document.body;else if(Mn(n.appendTo)){let e=document.querySelector(n.appendTo);wg(e)||(Ci("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body),n.appendTo=e}},P2=n=>{!n.placement&&Mn(ve.placement)&&ve.placement&&(n.placement=ve.placement),n.placement||(n.placement=In),Rh.includes(n.placement)||(Ci("ElMessage",`Invalid placement: ${n.placement}. Falling back to '${In}'.`),n.placement=In)},Oh=n=>{const t=!n||Mn(n)||T.isVNode(n)||ks(n)?{message:n}:n,e=Ut(Ut({},we),t);return O2(e),P2(e),i0(ve.grouping)&&!e.grouping&&(e.grouping=ve.grouping),Qr(ve.duration)&&e.duration===3e3&&(e.duration=ve.duration),Qr(ve.offset)&&e.offset===16&&(e.offset=ve.offset),i0(ve.showClose)&&!e.showClose&&(e.showClose=ve.showClose),i0(ve.plain)&&!e.plain&&(e.plain=ve.plain),e},z2=n=>{const t=n.props.placement||In,e=$e[t],r=e.indexOf(n);if(r===-1)return;e.splice(r,1);const{handler:i}=n;i.close()},k2=(r,e)=>{var i=r,{appendTo:n}=i,t=gd(i,["appendTo"]);const s=`message_${R2++}`,o=t.onClose,a=document.createElement("div"),u=tr(Ut({},t),{id:s,onClose:()=>{o==null||o(),z2(h)},onDestroy:()=>{T.render(null,a)}}),c=T.createVNode(T2,u,ks(u.message)||T.isVNode(u.message)?{default:ks(u.message)?u.message:()=>u.message}:null);c.appContext=e||en._context,T.render(c,a),n.appendChild(a.firstElementChild);const l=c.component,h={id:s,vnode:c,vm:l,handler:{close:()=>{l.exposed.close()}},props:c.component.props};return h},en=(n={},t)=>{if(!tn)return{close:()=>{}};const e=Oh(n),r=C2(e.placement||In);if(e.grouping&&r.length){const s=r.find(({vnode:o})=>{var a;return((a=o.props)==null?void 0:a.message)===e.message});if(s)return s.props.repeatNum+=1,s.props.type=e.type,s.handler}if(Qr(ve.max)&&r.length>=ve.max)return{close:()=>{}};const i=k2(e,t);return r.push(i),i.handler};Th.forEach(n=>{en[n]=(t={},e)=>{const r=Oh(t);return en(tr(Ut({},r),{type:n}),e)}});function N2(n){for(const t in $e)if(n0($e,t)){const e=[...$e[t]];for(const r of e)(!n||n===r.props.type)&&r.handler.close()}}function L2(n){if(!$e[n])return;[...$e[n]].forEach(e=>e.handler.close())}en.closeAll=N2,en.closeAllByPlacement=L2,en._context=null;const Mr=Zg(en,"$message"),Ph="0123456789abcdeffedcba9876543210",zh="4b0de988570c3a0f";let Tn=window.ENCRYPT&&new ih;function kh(n=16,t="0123456789abcdefghijklmnopqrstuvwxyz"){let e="",r=t.length;for(;n>0;)e+=t[Math.floor(Math.random()*r)],n--;return e}function Nh(){return _t(this,null,function*(){return Tn||(Tn=new ih),new Promise((n,t)=>{Tn.armEnum().then(e=>{n(+e)}).catch(e=>{Mr({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t(e)})})})}Ht.throttle(()=>_t(this,null,function*(){const n=yield Nh(),t={};if(typeof n!="number"||n<=0)Mr({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t.resetToken();else{const e=yield $2();if(!t.token)return;e.length?e.includes(t.ukeyHid)||(Mr({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),t.resetToken()):(Mr({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t.resetToken())}}),5e3,{trailing:!1});function U2(n=0){return _t(this,null,function*(){return Tn?new Promise((t,e)=>{Tn.armGetDongleInfo(n).then(r=>{r?t(r):(Mr({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),e(r))}).catch(r=>{e(r)})}):Mr({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function $2(){return _t(this,null,function*(){if(!Tn)return Mr({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const n=yield Nh();let t=[];for(let e=0;e<n;e++){const r=yield U2(e);t.push(r)}return t})}kh(16),kh(16);const Lh=window.meta.app.inspect?Dn.constants.CBC:Dn.constants.ECB;ug.generateKeyPair();function Uh(n,t,e={}){const r=Hh(zh),i=e.mode||Lh;e=i===Dn.constants.ECB?Ut({mode:i,inputEncoding:"utf8",outputEncoding:"hex"},e):Ut({iv:Ph,mode:i,inputEncoding:"utf8",outputEncoding:"hex"},e);let s="";try{s=Dn.encrypt(n,r,e)}catch(o){console.log("err: ",o)}return s}function $h(n,t,e={}){const r=Hh(zh),i=e.mode||Lh;return e=i===Dn.constants.ECB?Ut({mode:i,inputEncoding:"hex",outputEncoding:"utf8"},e):Ut({iv:Ph,mode:i,inputEncoding:"hex",outputEncoding:"utf8"},e),Dn.decrypt(n,r,e)}function Hh(n){return[...n].map(t=>t.charCodeAt().toString(16)).join("")}const u0={getLocal:n=>{try{let t=window.localStorage.getItem(n);return t=t!==null?$h(t):t,JSON.parse(t)}catch(t){console.error(t)}},setLocal:(n,t)=>{try{let e=JSON.stringify(t);e=e!==null?Uh(e):e,window.localStorage.setItem(n,e)}catch(e){console.error(e)}},eachLocal:n=>{if(!n||cu(n)!=="Function")return console.error("传递参数非函数类型!");for(let t=0,e=window.localStorage.length;t<e;t++){const r=window.localStorage.key(t);n((void 0).getLocal(r),r)}},clearLocal:()=>{window.localStorage.clear()},removeLocal:n=>{window.localStorage.removeItem(n)},getSession:n=>{try{let t=window.sessionStorage.getItem(n);return t=t!==null?$h(t):t,JSON.parse(t)}catch(t){console.error(t)}},setSession:(n,t)=>{try{let e=JSON.stringify(t);e=e!==null?Uh(e):e,window.sessionStorage.setItem(n,e)}catch(e){console.error(e)}},eachSession:n=>{if(!n||cu(n)!=="Function")return console.error("传递参数非函数类型!");for(let t=0,e=window.sessionStorage.length;t<e;t++){const r=window.sessionStorage.key(t);n((void 0).getSession(r),r)}},clearSession:()=>{window.sessionStorage.clear()},removeSession:n=>{window.sessionStorage.removeItem(n)}},H2="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1778134039448'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1155'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20512m-500.62222187%200a500.62222187%20500.62222187%200%201%200%201001.24444374%200%20500.62222187%20500.62222187%200%201%200-1001.24444374%200Z'%20fill='%231afa29'%20p-id='1156'%3e%3c/path%3e%3c/svg%3e",qh="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1778135587292'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1657'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20512m-500.62222187%200a500.62222187%20500.62222187%200%201%200%201001.24444374%200%20500.62222187%20500.62222187%200%201%200-1001.24444374%200Z'%20fill='%23808080'%20p-id='1658'%3e%3c/path%3e%3c/svg%3e",q2="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1778133589331'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='25776'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M377.083%20125.44c74.606-135.314%20195.292-135.314%20269.897%200l346.332%20629.394c74.606%20135.315%209.508%20245.395-145.189%20245.395H175.94c-154.697%200-219.428-109.715-145.188-245.395L377.083%20125.44z'%20fill='%23FF2D16'%20p-id='25777'%3e%3c/path%3e%3cpath%20d='M567.986%20328.046c0-31.086-25.234-55.955-55.954-55.955s-55.954%2025.235-55.954%2055.955v280.137c0%2031.086%2025.234%2055.954%2055.954%2055.954s55.954-25.234%2055.954-55.954V328.046z%20m-111.908%20448h111.908v111.908H456.078z'%20fill='%23FFFFFF'%20p-id='25778'%3e%3c/path%3e%3c/svg%3e";/**
42
+ * @license
43
+ * Copyright 2010-2026 Three.js Authors
44
+ * SPDX-License-Identifier: MIT
45
+ */const Wh="184",h0=0,Vh=1,jh=1,Gh=100,Xh=204,Yh=205,Kh=3,Jh=0,Zh=300,Qh=1e3,Ls=1001,tf=1002,ef=1003,W2=1006,V2=1008,rf=1009,nf=1015,j2=1023,G2=1028,sf=0,of="",He="srgb",af="srgb-linear",cf="linear",f0="srgb",Rn=7680,lf=519,uf=35044,rn=2e3,Us=2001;function X2(n){for(let t=n.length-1;t>=0;--t)if(n[t]>=65535)return!0;return!1}function hf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}const ff={};function df(n){const t=n[0];if(typeof t=="string"&&t.startsWith("TSL:")){const e=n[1];e&&e.isStackTrace?n[0]+=" "+e.getLocation():n[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return n}function be(...n){n=df(n);const t="THREE."+n.shift();{const e=n[0];e&&e.isStackTrace?console.warn(e.getError(t)):console.warn(t,...n)}}function nn(...n){n=df(n);const t="THREE."+n.shift();{const e=n[0];e&&e.isStackTrace?console.error(e.getError(t)):console.error(t,...n)}}function pf(...n){const t=n.join(" ");t in ff||(ff[t]=!0,be(...n))}class Fi{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[t]===void 0&&(r[t]=[]),r[t].indexOf(e)===-1&&r[t].push(e)}hasEventListener(t,e){const r=this._listeners;return r===void 0?!1:r[t]!==void 0&&r[t].indexOf(e)!==-1}removeEventListener(t,e){const r=this._listeners;if(r===void 0)return;const i=r[t];if(i!==void 0){const s=i.indexOf(e);s!==-1&&i.splice(s,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const r=e[t.type];if(r!==void 0){t.target=this;const i=r.slice(0);for(let s=0,o=i.length;s<o;s++)i[s].call(this,t);t.target=null}}}const Ee=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],d0=Math.PI/180,p0=180/Math.PI;function Di(){const n=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(Ee[n&255]+Ee[n>>8&255]+Ee[n>>16&255]+Ee[n>>24&255]+"-"+Ee[t&255]+Ee[t>>8&255]+"-"+Ee[t>>16&15|64]+Ee[t>>24&255]+"-"+Ee[e&63|128]+Ee[e>>8&255]+"-"+Ee[e>>16&255]+Ee[e>>24&255]+Ee[r&255]+Ee[r>>8&255]+Ee[r>>16&255]+Ee[r>>24&255]).toLowerCase()}function It(n,t,e){return Math.max(t,Math.min(e,n))}function Y2(n,t){return(n%t+t)%t}function x0(n,t,e){return(1-e)*n+e*t}function Mi(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function De(n,t){switch(t.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const Z0=class Z0{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,r=this.y,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6],this.y=i[1]*e+i[4]*r+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=It(this.x,t.x,e.x),this.y=It(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=It(this.x,t,e),this.y=It(this.y,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(It(r,t,e))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.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}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(It(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const r=Math.cos(e),i=Math.sin(e),s=this.x-t.x,o=this.y-t.y;return this.x=s*r-o*i+t.x,this.y=s*i+o*r+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};Z0.prototype.isVector2=!0;let oe=Z0;class On{constructor(t=0,e=0,r=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=r,this._w=i}static slerpFlat(t,e,r,i,s,o,a){let u=r[i+0],c=r[i+1],l=r[i+2],f=r[i+3],h=s[o+0],x=s[o+1],p=s[o+2],y=s[o+3];if(f!==y||u!==h||c!==x||l!==p){let g=u*h+c*x+l*p+f*y;g<0&&(h=-h,x=-x,p=-p,y=-y,g=-g);let E=1-a;if(g<.9995){const A=Math.acos(g),b=Math.sin(A);E=Math.sin(E*A)/b,a=Math.sin(a*A)/b,u=u*E+h*a,c=c*E+x*a,l=l*E+p*a,f=f*E+y*a}else{u=u*E+h*a,c=c*E+x*a,l=l*E+p*a,f=f*E+y*a;const A=1/Math.sqrt(u*u+c*c+l*l+f*f);u*=A,c*=A,l*=A,f*=A}}t[e]=u,t[e+1]=c,t[e+2]=l,t[e+3]=f}static multiplyQuaternionsFlat(t,e,r,i,s,o){const a=r[i],u=r[i+1],c=r[i+2],l=r[i+3],f=s[o],h=s[o+1],x=s[o+2],p=s[o+3];return t[e]=a*p+l*f+u*x-c*h,t[e+1]=u*p+l*h+c*f-a*x,t[e+2]=c*p+l*x+a*h-u*f,t[e+3]=l*p-a*f-u*h-c*x,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const r=t._x,i=t._y,s=t._z,o=t._order,a=Math.cos,u=Math.sin,c=a(r/2),l=a(i/2),f=a(s/2),h=u(r/2),x=u(i/2),p=u(s/2);switch(o){case"XYZ":this._x=h*l*f+c*x*p,this._y=c*x*f-h*l*p,this._z=c*l*p+h*x*f,this._w=c*l*f-h*x*p;break;case"YXZ":this._x=h*l*f+c*x*p,this._y=c*x*f-h*l*p,this._z=c*l*p-h*x*f,this._w=c*l*f+h*x*p;break;case"ZXY":this._x=h*l*f-c*x*p,this._y=c*x*f+h*l*p,this._z=c*l*p+h*x*f,this._w=c*l*f-h*x*p;break;case"ZYX":this._x=h*l*f-c*x*p,this._y=c*x*f+h*l*p,this._z=c*l*p-h*x*f,this._w=c*l*f+h*x*p;break;case"YZX":this._x=h*l*f+c*x*p,this._y=c*x*f+h*l*p,this._z=c*l*p-h*x*f,this._w=c*l*f-h*x*p;break;case"XZY":this._x=h*l*f-c*x*p,this._y=c*x*f-h*l*p,this._z=c*l*p+h*x*f,this._w=c*l*f+h*x*p;break;default:be("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const r=e/2,i=Math.sin(r);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,r=e[0],i=e[4],s=e[8],o=e[1],a=e[5],u=e[9],c=e[2],l=e[6],f=e[10],h=r+a+f;if(h>0){const x=.5/Math.sqrt(h+1);this._w=.25/x,this._x=(l-u)*x,this._y=(s-c)*x,this._z=(o-i)*x}else if(r>a&&r>f){const x=2*Math.sqrt(1+r-a-f);this._w=(l-u)/x,this._x=.25*x,this._y=(i+o)/x,this._z=(s+c)/x}else if(a>f){const x=2*Math.sqrt(1+a-r-f);this._w=(s-c)/x,this._x=(i+o)/x,this._y=.25*x,this._z=(u+l)/x}else{const x=2*Math.sqrt(1+f-r-a);this._w=(o-i)/x,this._x=(s+c)/x,this._y=(u+l)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let r=t.dot(e)+1;return r<1e-8?(r=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=r):(this._x=0,this._y=-t.z,this._z=t.y,this._w=r)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=r),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(It(this.dot(t),-1,1)))}rotateTowards(t,e){const r=this.angleTo(t);if(r===0)return this;const i=Math.min(1,e/r);return this.slerp(t,i),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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const r=t._x,i=t._y,s=t._z,o=t._w,a=e._x,u=e._y,c=e._z,l=e._w;return this._x=r*l+o*a+i*c-s*u,this._y=i*l+o*u+s*a-r*c,this._z=s*l+o*c+r*u-i*a,this._w=o*l-r*a-i*u-s*c,this._onChangeCallback(),this}slerp(t,e){let r=t._x,i=t._y,s=t._z,o=t._w,a=this.dot(t);a<0&&(r=-r,i=-i,s=-s,o=-o,a=-a);let u=1-e;if(a<.9995){const c=Math.acos(a),l=Math.sin(c);u=Math.sin(u*c)/l,e=Math.sin(e*c)/l,this._x=this._x*u+r*e,this._y=this._y*u+i*e,this._z=this._z*u+s*e,this._w=this._w*u+o*e,this._onChangeCallback()}else this._x=this._x*u+r*e,this._y=this._y*u+i*e,this._z=this._z*u+s*e,this._w=this._w*u+o*e,this.normalize();return this}slerpQuaternions(t,e,r){return this.copy(t).slerp(e,r)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),r=Math.random(),i=Math.sqrt(1-r),s=Math.sqrt(r);return this.set(i*Math.sin(t),i*Math.cos(t),s*Math.sin(e),s*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}const Q0=class Q0{constructor(t=0,e=0,r=0){this.x=t,this.y=e,this.z=r}set(t,e,r){return r===void 0&&(r=this.z),this.x=t,this.y=e,this.z=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(xf.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(xf.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,r=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[3]*r+s[6]*i,this.y=s[1]*e+s[4]*r+s[7]*i,this.z=s[2]*e+s[5]*r+s[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,r=this.y,i=this.z,s=t.elements,o=1/(s[3]*e+s[7]*r+s[11]*i+s[15]);return this.x=(s[0]*e+s[4]*r+s[8]*i+s[12])*o,this.y=(s[1]*e+s[5]*r+s[9]*i+s[13])*o,this.z=(s[2]*e+s[6]*r+s[10]*i+s[14])*o,this}applyQuaternion(t){const e=this.x,r=this.y,i=this.z,s=t.x,o=t.y,a=t.z,u=t.w,c=2*(o*i-a*r),l=2*(a*e-s*i),f=2*(s*r-o*e);return this.x=e+u*c+o*f-a*l,this.y=r+u*l+a*c-s*f,this.z=i+u*f+s*l-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,r=this.y,i=this.z,s=t.elements;return this.x=s[0]*e+s[4]*r+s[8]*i,this.y=s[1]*e+s[5]*r+s[9]*i,this.z=s[2]*e+s[6]*r+s[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=It(this.x,t.x,e.x),this.y=It(this.y,t.y,e.y),this.z=It(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=It(this.x,t,e),this.y=It(this.y,t,e),this.z=It(this.z,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(It(r,t,e))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const r=t.x,i=t.y,s=t.z,o=e.x,a=e.y,u=e.z;return this.x=i*u-s*a,this.y=s*o-r*u,this.z=r*a-i*o,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const r=t.dot(this)/e;return this.copy(t).multiplyScalar(r)}projectOnPlane(t){return m0.copy(this).projectOnVector(t),this.sub(m0)}reflect(t){return this.sub(m0.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const r=this.dot(t)/e;return Math.acos(It(r,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return e*e+r*r+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,r){const i=Math.sin(e)*t;return this.x=i*Math.sin(r),this.y=Math.cos(e)*t,this.z=i*Math.cos(r),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,r){return this.x=t*Math.sin(e),this.y=r,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,r=Math.sqrt(1-e*e);return this.x=r*Math.cos(t),this.y=e,this.z=r*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};Q0.prototype.isVector3=!0;let it=Q0;const m0=new it,xf=new On,tc=class tc{constructor(t,e,r,i,s,o,a,u,c){this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,r,i,s,o,a,u,c)}set(t,e,r,i,s,o,a,u,c){const l=this.elements;return l[0]=t,l[1]=i,l[2]=a,l[3]=e,l[4]=s,l[5]=u,l[6]=r,l[7]=o,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],this}extractBasis(t,e,r){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,i=e.elements,s=this.elements,o=r[0],a=r[3],u=r[6],c=r[1],l=r[4],f=r[7],h=r[2],x=r[5],p=r[8],y=i[0],g=i[3],E=i[6],A=i[1],b=i[4],_=i[7],S=i[2],I=i[5],R=i[8];return s[0]=o*y+a*A+u*S,s[3]=o*g+a*b+u*I,s[6]=o*E+a*_+u*R,s[1]=c*y+l*A+f*S,s[4]=c*g+l*b+f*I,s[7]=c*E+l*_+f*R,s[2]=h*y+x*A+p*S,s[5]=h*g+x*b+p*I,s[8]=h*E+x*_+p*R,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],c=t[7],l=t[8];return e*o*l-e*a*c-r*s*l+r*a*u+i*s*c-i*o*u}invert(){const t=this.elements,e=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],c=t[7],l=t[8],f=l*o-a*c,h=a*u-l*s,x=c*s-o*u,p=e*f+r*h+i*x;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/p;return t[0]=f*y,t[1]=(i*c-l*r)*y,t[2]=(a*r-i*o)*y,t[3]=h*y,t[4]=(l*e-i*u)*y,t[5]=(i*s-a*e)*y,t[6]=x*y,t[7]=(r*u-c*e)*y,t[8]=(o*e-r*s)*y,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,r,i,s,o,a){const u=Math.cos(s),c=Math.sin(s);return this.set(r*u,r*c,-r*(u*o+c*a)+o+t,-i*c,i*u,-i*(-c*o+u*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(y0.makeScale(t,e)),this}rotate(t){return this.premultiply(y0.makeRotation(-t)),this}translate(t,e){return this.premultiply(y0.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,r,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,r=t.elements;for(let i=0;i<9;i++)if(e[i]!==r[i])return!1;return!0}fromArray(t,e=0){for(let r=0;r<9;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t}clone(){return new this.constructor().fromArray(this.elements)}};tc.prototype.isMatrix3=!0;let qe=tc;const y0=new qe,mf=new qe().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),yf=new qe().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function K2(){const n={enabled:!0,workingColorSpace:af,spaces:{},convert:function(i,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===f0&&(i.r=yr(i.r),i.g=yr(i.g),i.b=yr(i.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[s].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===f0&&(i.r=Pn(i.r),i.g=Pn(i.g),i.b=Pn(i.b))),i},workingToColorSpace:function(i,s){return this.convert(i,this.workingColorSpace,s)},colorSpaceToWorking:function(i,s){return this.convert(i,s,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===of?cf:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,s=this.workingColorSpace){return i.fromArray(this.spaces[s].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,s,o){return i.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,s){return pf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(i,s)},toWorkingColorSpace:function(i,s){return pf("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(i,s)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],r=[.3127,.329];return n.define({[af]:{primaries:t,whitePoint:r,transfer:cf,toXYZ:mf,fromXYZ:yf,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:He},outputColorSpaceConfig:{drawingBufferColorSpace:He}},[He]:{primaries:t,whitePoint:r,transfer:f0,toXYZ:mf,fromXYZ:yf,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:He}}}),n}const We=K2();function yr(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Pn(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let zn;class J2{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement=="undefined")return t.src;let r;if(t instanceof HTMLCanvasElement)r=t;else{zn===void 0&&(zn=hf("canvas")),zn.width=t.width,zn.height=t.height;const i=zn.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),r=zn}return r.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){const e=hf("canvas");e.width=t.width,e.height=t.height;const r=e.getContext("2d");r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height),s=i.data;for(let o=0;o<s.length;o++)s[o]=yr(s[o]/255)*255;return r.putImageData(i,0,0),e}else if(t.data){const e=t.data.slice(0);for(let r=0;r<e.length;r++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[r]=Math.floor(yr(e[r]/255)*255):e[r]=yr(e[r]);return{data:e,width:t.width,height:t.height}}else return be("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Z2=0;class Q2{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=Di(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame!="undefined"&&e instanceof VideoFrame?t.set(e.displayWidth,e.displayHeight,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const r={uuid:this.uuid,url:""},i=this.data;if(i!==null){let s;if(Array.isArray(i)){s=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?s.push(g0(i[o].image)):s.push(g0(i[o]))}else s=g0(i);r.url=s}return e||(t.images[this.uuid]=r),r}}function g0(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?J2.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(be("Texture: Unable to serialize Texture."),{})}let tv=0;const v0=new it;class Ir extends Fi{constructor(t=Ir.DEFAULT_IMAGE,e=Ir.DEFAULT_MAPPING,r=Ls,i=Ls,s=W2,o=V2,a=j2,u=rf,c=Ir.DEFAULT_ANISOTROPY,l=of){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:tv++}),this.uuid=Di(),this.name="",this.source=new Q2(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=u,this.offset=new oe(0,0),this.repeat=new oe(1,1),this.center=new oe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new qe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=l,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(v0).x}get height(){return this.source.getSize(v0).y}get depth(){return this.source.getSize(v0).z}get image(){return this.source.data}set image(t){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.normalized=t.normalized,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const r=t[e];if(r===void 0){be(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const i=this[e];if(i===void 0){be(`Texture.setValues(): property '${e}' does not exist.`);continue}i&&r&&i.isVector2&&r.isVector2||i&&r&&i.isVector3&&r.isVector3||i&&r&&i.isMatrix3&&r.isMatrix3?i.copy(r):this[e]=r}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),e||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Zh)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Qh:t.x=t.x-Math.floor(t.x);break;case Ls:t.x=t.x<0?0:1;break;case tf:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Qh:t.y=t.y-Math.floor(t.y);break;case Ls:t.y=t.y<0?0:1;break;case tf:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}Ir.DEFAULT_IMAGE=null,Ir.DEFAULT_MAPPING=Zh,Ir.DEFAULT_ANISOTROPY=1;const ec=class ec{constructor(t=0,e=0,r=0,i=1){this.x=t,this.y=e,this.z=r,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,r=this.y,i=this.z,s=this.w,o=t.elements;return this.x=o[0]*e+o[4]*r+o[8]*i+o[12]*s,this.y=o[1]*e+o[5]*r+o[9]*i+o[13]*s,this.z=o[2]*e+o[6]*r+o[10]*i+o[14]*s,this.w=o[3]*e+o[7]*r+o[11]*i+o[15]*s,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,r,i,s;const u=t.elements,c=u[0],l=u[4],f=u[8],h=u[1],x=u[5],p=u[9],y=u[2],g=u[6],E=u[10];if(Math.abs(l-h)<.01&&Math.abs(f-y)<.01&&Math.abs(p-g)<.01){if(Math.abs(l+h)<.1&&Math.abs(f+y)<.1&&Math.abs(p+g)<.1&&Math.abs(c+x+E-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const b=(c+1)/2,_=(x+1)/2,S=(E+1)/2,I=(l+h)/4,R=(f+y)/4,z=(p+g)/4;return b>_&&b>S?b<.01?(r=0,i=.707106781,s=.707106781):(r=Math.sqrt(b),i=I/r,s=R/r):_>S?_<.01?(r=.707106781,i=0,s=.707106781):(i=Math.sqrt(_),r=I/i,s=z/i):S<.01?(r=.707106781,i=.707106781,s=0):(s=Math.sqrt(S),r=R/s,i=z/s),this.set(r,i,s,e),this}let A=Math.sqrt((g-p)*(g-p)+(f-y)*(f-y)+(h-l)*(h-l));return Math.abs(A)<.001&&(A=1),this.x=(g-p)/A,this.y=(f-y)/A,this.z=(h-l)/A,this.w=Math.acos((c+x+E-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=It(this.x,t.x,e.x),this.y=It(this.y,t.y,e.y),this.z=It(this.z,t.z,e.z),this.w=It(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=It(this.x,t,e),this.y=It(this.y,t,e),this.z=It(this.z,t,e),this.w=It(this.w,t,e),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(It(r,t,e))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this.z=t.z+(e.z-t.z)*r,this.w=t.w+(e.w-t.w)*r,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};ec.prototype.isVector4=!0;let kn=ec;const fo=class fo{constructor(t,e,r,i,s,o,a,u,c,l,f,h,x,p,y,g){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,r,i,s,o,a,u,c,l,f,h,x,p,y,g)}set(t,e,r,i,s,o,a,u,c,l,f,h,x,p,y,g){const E=this.elements;return E[0]=t,E[4]=e,E[8]=r,E[12]=i,E[1]=s,E[5]=o,E[9]=a,E[13]=u,E[2]=c,E[6]=l,E[10]=f,E[14]=h,E[3]=x,E[7]=p,E[11]=y,E[15]=g,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 fo().fromArray(this.elements)}copy(t){const e=this.elements,r=t.elements;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],this}copyPosition(t){const e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,r){return this.determinant()===0?(t.set(1,0,0),e.set(0,1,0),r.set(0,0,1),this):(t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this)}makeBasis(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this}extractRotation(t){if(t.determinant()===0)return this.identity();const e=this.elements,r=t.elements,i=1/Nn.setFromMatrixColumn(t,0).length(),s=1/Nn.setFromMatrixColumn(t,1).length(),o=1/Nn.setFromMatrixColumn(t,2).length();return e[0]=r[0]*i,e[1]=r[1]*i,e[2]=r[2]*i,e[3]=0,e[4]=r[4]*s,e[5]=r[5]*s,e[6]=r[6]*s,e[7]=0,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,r=t.x,i=t.y,s=t.z,o=Math.cos(r),a=Math.sin(r),u=Math.cos(i),c=Math.sin(i),l=Math.cos(s),f=Math.sin(s);if(t.order==="XYZ"){const h=o*l,x=o*f,p=a*l,y=a*f;e[0]=u*l,e[4]=-u*f,e[8]=c,e[1]=x+p*c,e[5]=h-y*c,e[9]=-a*u,e[2]=y-h*c,e[6]=p+x*c,e[10]=o*u}else if(t.order==="YXZ"){const h=u*l,x=u*f,p=c*l,y=c*f;e[0]=h+y*a,e[4]=p*a-x,e[8]=o*c,e[1]=o*f,e[5]=o*l,e[9]=-a,e[2]=x*a-p,e[6]=y+h*a,e[10]=o*u}else if(t.order==="ZXY"){const h=u*l,x=u*f,p=c*l,y=c*f;e[0]=h-y*a,e[4]=-o*f,e[8]=p+x*a,e[1]=x+p*a,e[5]=o*l,e[9]=y-h*a,e[2]=-o*c,e[6]=a,e[10]=o*u}else if(t.order==="ZYX"){const h=o*l,x=o*f,p=a*l,y=a*f;e[0]=u*l,e[4]=p*c-x,e[8]=h*c+y,e[1]=u*f,e[5]=y*c+h,e[9]=x*c-p,e[2]=-c,e[6]=a*u,e[10]=o*u}else if(t.order==="YZX"){const h=o*u,x=o*c,p=a*u,y=a*c;e[0]=u*l,e[4]=y-h*f,e[8]=p*f+x,e[1]=f,e[5]=o*l,e[9]=-a*l,e[2]=-c*l,e[6]=x*f+p,e[10]=h-y*f}else if(t.order==="XZY"){const h=o*u,x=o*c,p=a*u,y=a*c;e[0]=u*l,e[4]=-f,e[8]=c*l,e[1]=h*f+y,e[5]=o*l,e[9]=x*f-p,e[2]=p*f-x,e[6]=a*l,e[10]=y*f+h}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ev,t,rv)}lookAt(t,e,r){const i=this.elements;return Me.subVectors(t,e),Me.lengthSq()===0&&(Me.z=1),Me.normalize(),Tr.crossVectors(r,Me),Tr.lengthSq()===0&&(Math.abs(r.z)===1?Me.x+=1e-4:Me.z+=1e-4,Me.normalize(),Tr.crossVectors(r,Me)),Tr.normalize(),$s.crossVectors(Me,Tr),i[0]=Tr.x,i[4]=$s.x,i[8]=Me.x,i[1]=Tr.y,i[5]=$s.y,i[9]=Me.y,i[2]=Tr.z,i[6]=$s.z,i[10]=Me.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const r=t.elements,i=e.elements,s=this.elements,o=r[0],a=r[4],u=r[8],c=r[12],l=r[1],f=r[5],h=r[9],x=r[13],p=r[2],y=r[6],g=r[10],E=r[14],A=r[3],b=r[7],_=r[11],S=r[15],I=i[0],R=i[4],z=i[8],X=i[12],O=i[1],P=i[5],q=i[9],j=i[13],K=i[2],V=i[6],J=i[10],ot=i[14],rt=i[3],lt=i[7],at=i[11],U=i[15];return s[0]=o*I+a*O+u*K+c*rt,s[4]=o*R+a*P+u*V+c*lt,s[8]=o*z+a*q+u*J+c*at,s[12]=o*X+a*j+u*ot+c*U,s[1]=l*I+f*O+h*K+x*rt,s[5]=l*R+f*P+h*V+x*lt,s[9]=l*z+f*q+h*J+x*at,s[13]=l*X+f*j+h*ot+x*U,s[2]=p*I+y*O+g*K+E*rt,s[6]=p*R+y*P+g*V+E*lt,s[10]=p*z+y*q+g*J+E*at,s[14]=p*X+y*j+g*ot+E*U,s[3]=A*I+b*O+_*K+S*rt,s[7]=A*R+b*P+_*V+S*lt,s[11]=A*z+b*q+_*J+S*at,s[15]=A*X+b*j+_*ot+S*U,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],r=t[4],i=t[8],s=t[12],o=t[1],a=t[5],u=t[9],c=t[13],l=t[2],f=t[6],h=t[10],x=t[14],p=t[3],y=t[7],g=t[11],E=t[15],A=u*x-c*h,b=a*x-c*f,_=a*h-u*f,S=o*x-c*l,I=o*h-u*l,R=o*f-a*l;return e*(y*A-g*b+E*_)-r*(p*A-g*S+E*I)+i*(p*b-y*S+E*R)-s*(p*_-y*I+g*R)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,r){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=r),this}invert(){const t=this.elements,e=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],c=t[7],l=t[8],f=t[9],h=t[10],x=t[11],p=t[12],y=t[13],g=t[14],E=t[15],A=e*a-r*o,b=e*u-i*o,_=e*c-s*o,S=r*u-i*a,I=r*c-s*a,R=i*c-s*u,z=l*y-f*p,X=l*g-h*p,O=l*E-x*p,P=f*g-h*y,q=f*E-x*y,j=h*E-x*g,K=A*j-b*q+_*P+S*O-I*X+R*z;if(K===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const V=1/K;return t[0]=(a*j-u*q+c*P)*V,t[1]=(i*q-r*j-s*P)*V,t[2]=(y*R-g*I+E*S)*V,t[3]=(h*I-f*R-x*S)*V,t[4]=(u*O-o*j-c*X)*V,t[5]=(e*j-i*O+s*X)*V,t[6]=(g*_-p*R-E*b)*V,t[7]=(l*R-h*_+x*b)*V,t[8]=(o*q-a*O+c*z)*V,t[9]=(r*O-e*q-s*z)*V,t[10]=(p*I-y*_+E*A)*V,t[11]=(f*_-l*I-x*A)*V,t[12]=(a*X-o*P-u*z)*V,t[13]=(e*P-r*X+i*z)*V,t[14]=(y*b-p*S-g*A)*V,t[15]=(l*S-f*b+h*A)*V,this}scale(t){const e=this.elements,r=t.x,i=t.y,s=t.z;return e[0]*=r,e[4]*=i,e[8]*=s,e[1]*=r,e[5]*=i,e[9]*=s,e[2]*=r,e[6]*=i,e[10]*=s,e[3]*=r,e[7]*=i,e[11]*=s,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,r,i))}makeTranslation(t,e,r){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const r=Math.cos(e),i=Math.sin(e),s=1-r,o=t.x,a=t.y,u=t.z,c=s*o,l=s*a;return this.set(c*o+r,c*a-i*u,c*u+i*a,0,c*a+i*u,l*a+r,l*u-i*o,0,c*u-i*a,l*u+i*o,s*u*u+r,0,0,0,0,1),this}makeScale(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this}makeShear(t,e,r,i,s,o){return this.set(1,r,s,0,t,1,o,0,e,i,1,0,0,0,0,1),this}compose(t,e,r){const i=this.elements,s=e._x,o=e._y,a=e._z,u=e._w,c=s+s,l=o+o,f=a+a,h=s*c,x=s*l,p=s*f,y=o*l,g=o*f,E=a*f,A=u*c,b=u*l,_=u*f,S=r.x,I=r.y,R=r.z;return i[0]=(1-(y+E))*S,i[1]=(x+_)*S,i[2]=(p-b)*S,i[3]=0,i[4]=(x-_)*I,i[5]=(1-(h+E))*I,i[6]=(g+A)*I,i[7]=0,i[8]=(p+b)*R,i[9]=(g-A)*R,i[10]=(1-(h+y))*R,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,r){const i=this.elements;t.x=i[12],t.y=i[13],t.z=i[14];const s=this.determinant();if(s===0)return r.set(1,1,1),e.identity(),this;let o=Nn.set(i[0],i[1],i[2]).length();const a=Nn.set(i[4],i[5],i[6]).length(),u=Nn.set(i[8],i[9],i[10]).length();s<0&&(o=-o),Ve.copy(this);const c=1/o,l=1/a,f=1/u;return Ve.elements[0]*=c,Ve.elements[1]*=c,Ve.elements[2]*=c,Ve.elements[4]*=l,Ve.elements[5]*=l,Ve.elements[6]*=l,Ve.elements[8]*=f,Ve.elements[9]*=f,Ve.elements[10]*=f,e.setFromRotationMatrix(Ve),r.x=o,r.y=a,r.z=u,this}makePerspective(t,e,r,i,s,o,a=rn,u=!1){const c=this.elements,l=2*s/(e-t),f=2*s/(r-i),h=(e+t)/(e-t),x=(r+i)/(r-i);let p,y;if(u)p=s/(o-s),y=o*s/(o-s);else if(a===rn)p=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===Us)p=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=l,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=f,c[9]=x,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=y,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(t,e,r,i,s,o,a=rn,u=!1){const c=this.elements,l=2/(e-t),f=2/(r-i),h=-(e+t)/(e-t),x=-(r+i)/(r-i);let p,y;if(u)p=1/(o-s),y=o/(o-s);else if(a===rn)p=-2/(o-s),y=-(o+s)/(o-s);else if(a===Us)p=-1/(o-s),y=-s/(o-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=l,c[4]=0,c[8]=0,c[12]=h,c[1]=0,c[5]=f,c[9]=0,c[13]=x,c[2]=0,c[6]=0,c[10]=p,c[14]=y,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(t){const e=this.elements,r=t.elements;for(let i=0;i<16;i++)if(e[i]!==r[i])return!1;return!0}fromArray(t,e=0){for(let r=0;r<16;r++)this.elements[r]=t[r+e];return this}toArray(t=[],e=0){const r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t}};fo.prototype.isMatrix4=!0;let re=fo;const Nn=new it,Ve=new re,ev=new it(0,0,0),rv=new it(1,1,1),Tr=new it,$s=new it,Me=new it,gf=new re,vf=new On;class gr{constructor(t=0,e=0,r=0,i=gr.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=r,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,r,i=this._order){return this._x=t,this._y=e,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,r=!0){const i=t.elements,s=i[0],o=i[4],a=i[8],u=i[1],c=i[5],l=i[9],f=i[2],h=i[6],x=i[10];switch(e){case"XYZ":this._y=Math.asin(It(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-l,x),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-It(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(a,x),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(It(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,x),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(u,s));break;case"ZYX":this._y=Math.asin(-It(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,x),this._z=Math.atan2(u,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(It(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,x));break;case"XZY":this._z=Math.asin(-It(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-l,x),this._y=0);break;default:be("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,r){return gf.makeRotationFromQuaternion(t),this.setFromRotationMatrix(gf,e,r)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return vf.setFromEuler(this),this.setFromQuaternion(vf,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}gr.DEFAULT_ORDER="XYZ";class nv{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let iv=0;const wf=new it,Ln=new On,vr=new re,Hs=new it,Ii=new it,sv=new it,ov=new On,bf=new it(1,0,0),Ef=new it(0,1,0),Af=new it(0,0,1),_f={type:"added"},av={type:"removed"},Un={type:"childadded",child:null},w0={type:"childremoved",child:null};class ae extends Fi{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:iv++}),this.uuid=Di(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ae.DEFAULT_UP.clone();const t=new it,e=new gr,r=new On,i=new it(1,1,1);function s(){r.setFromEuler(e,!1)}function o(){e.setFromQuaternion(r,void 0,!1)}e._onChange(s),r._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new re},normalMatrix:{value:new qe}}),this.matrix=new re,this.matrixWorld=new re,this.matrixAutoUpdate=ae.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=ae.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new nv,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return Ln.setFromAxisAngle(t,e),this.quaternion.multiply(Ln),this}rotateOnWorldAxis(t,e){return Ln.setFromAxisAngle(t,e),this.quaternion.premultiply(Ln),this}rotateX(t){return this.rotateOnAxis(bf,t)}rotateY(t){return this.rotateOnAxis(Ef,t)}rotateZ(t){return this.rotateOnAxis(Af,t)}translateOnAxis(t,e){return wf.copy(t).applyQuaternion(this.quaternion),this.position.add(wf.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(bf,t)}translateY(t){return this.translateOnAxis(Ef,t)}translateZ(t){return this.translateOnAxis(Af,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(vr.copy(this.matrixWorld).invert())}lookAt(t,e,r){t.isVector3?Hs.copy(t):Hs.set(t,e,r);const i=this.parent;this.updateWorldMatrix(!0,!1),Ii.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?vr.lookAt(Ii,Hs,this.up):vr.lookAt(Hs,Ii,this.up),this.quaternion.setFromRotationMatrix(vr),i&&(vr.extractRotation(i.matrixWorld),Ln.setFromRotationMatrix(vr),this.quaternion.premultiply(Ln.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(nn("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(_f),Un.child=t,this.dispatchEvent(Un),Un.child=null):nn("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(av),w0.child=t,this.dispatchEvent(w0),w0.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),vr.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),vr.multiply(t.parent.matrixWorld)),t.applyMatrix4(vr),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(_f),Un.child=t,this.dispatchEvent(Un),Un.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let r=0,i=this.children.length;r<i;r++){const o=this.children[r].getObjectByProperty(t,e);if(o!==void 0)return o}}getObjectsByProperty(t,e,r=[]){this[t]===e&&r.push(this);const i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].getObjectsByProperty(t,e,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ii,t,sv),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ii,ov,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let r=0,i=e.length;r<i;r++)e[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let r=0,i=e.length;r<i;r++)e[r].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const t=this.pivot;if(t!==null){const e=t.x,r=t.y,i=t.z,s=this.matrix.elements;s[12]+=e-s[0]*e-s[4]*r-s[8]*i,s[13]+=r-s[1]*e-s[5]*r-s[9]*i,s[14]+=i-s[2]*e-s[6]*r-s[10]*i}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let r=0,i=e.length;r<i;r++)e[r].updateMatrixWorld(t)}updateWorldMatrix(t,e){const r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const i=this.children;for(let s=0,o=i.length;s<o;s++)i[s].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",r={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),this.static!==!1&&(i.static=this.static),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.pivot!==null&&(i.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(i.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(i.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(a=>tr(Ut({},a),{boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(a=>Ut({},a)),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(t),i.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function s(a,u){return a[u.uuid]===void 0&&(a[u.uuid]=u.toJSON(t)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(t.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const u=a.shapes;if(Array.isArray(u))for(let c=0,l=u.length;c<l;c++){const f=u[c];s(t.shapes,f)}else s(t.shapes,u)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let u=0,c=this.material.length;u<c;u++)a.push(s(t.materials,this.material[u]));i.material=a}else i.material=s(t.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const u=this.animations[a];i.animations.push(s(t.animations,u))}}if(e){const a=o(t.geometries),u=o(t.materials),c=o(t.textures),l=o(t.images),f=o(t.shapes),h=o(t.skeletons),x=o(t.animations),p=o(t.nodes);a.length>0&&(r.geometries=a),u.length>0&&(r.materials=u),c.length>0&&(r.textures=c),l.length>0&&(r.images=l),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),x.length>0&&(r.animations=x),p.length>0&&(r.nodes=p)}return r.object=i,r;function o(a){const u=[];for(const c in a){const l=a[c];delete l.metadata,u.push(l)}return u}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.pivot=t.pivot!==null?t.pivot.clone():null,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.static=t.static,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let r=0;r<t.children.length;r++){const i=t.children[r];this.add(i.clone())}return this}}ae.DEFAULT_UP=new it(0,1,0),ae.DEFAULT_MATRIX_AUTO_UPDATE=!0,ae.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Sf={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},Rr={h:0,s:0,l:0},qs={h:0,s:0,l:0};function b0(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}class lr{constructor(t,e,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,r)}set(t,e,r){if(e===void 0&&r===void 0){const i=t;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(t,e,r);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=He){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,We.colorSpaceToWorking(this,e),this}setRGB(t,e,r,i=We.workingColorSpace){return this.r=t,this.g=e,this.b=r,We.colorSpaceToWorking(this,i),this}setHSL(t,e,r,i=We.workingColorSpace){if(t=Y2(t,1),e=It(e,0,1),r=It(r,0,1),e===0)this.r=this.g=this.b=r;else{const s=r<=.5?r*(1+e):r+e-r*e,o=2*r-s;this.r=b0(o,s,t+1/3),this.g=b0(o,s,t),this.b=b0(o,s,t-1/3)}return We.colorSpaceToWorking(this,i),this}setStyle(t,e=He){function r(s){s!==void 0&&parseFloat(s)<1&&be("Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let s;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,e);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,e);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,e);break;default:be("Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const s=i[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(o===6)return this.setHex(parseInt(s,16),e);be("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=He){const r=Sf[t.toLowerCase()];return r!==void 0?this.setHex(r,e):be("Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=yr(t.r),this.g=yr(t.g),this.b=yr(t.b),this}copyLinearToSRGB(t){return this.r=Pn(t.r),this.g=Pn(t.g),this.b=Pn(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=He){return We.workingToColorSpace(Ae.copy(this),t),Math.round(It(Ae.r*255,0,255))*65536+Math.round(It(Ae.g*255,0,255))*256+Math.round(It(Ae.b*255,0,255))}getHexString(t=He){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=We.workingColorSpace){We.workingToColorSpace(Ae.copy(this),e);const r=Ae.r,i=Ae.g,s=Ae.b,o=Math.max(r,i,s),a=Math.min(r,i,s);let u,c;const l=(a+o)/2;if(a===o)u=0,c=0;else{const f=o-a;switch(c=l<=.5?f/(o+a):f/(2-o-a),o){case r:u=(i-s)/f+(i<s?6:0);break;case i:u=(s-r)/f+2;break;case s:u=(r-i)/f+4;break}u/=6}return t.h=u,t.s=c,t.l=l,t}getRGB(t,e=We.workingColorSpace){return We.workingToColorSpace(Ae.copy(this),e),t.r=Ae.r,t.g=Ae.g,t.b=Ae.b,t}getStyle(t=He){We.workingToColorSpace(Ae.copy(this),t);const e=Ae.r,r=Ae.g,i=Ae.b;return t!==He?`color(${t} ${e.toFixed(3)} ${r.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(r*255)},${Math.round(i*255)})`}offsetHSL(t,e,r){return this.getHSL(Rr),this.setHSL(Rr.h+t,Rr.s+e,Rr.l+r)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,r){return this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}lerpHSL(t,e){this.getHSL(Rr),t.getHSL(qs);const r=x0(Rr.h,qs.h,e),i=x0(Rr.s,qs.s,e),s=x0(Rr.l,qs.l,e);return this.setHSL(r,i,s),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,r=this.g,i=this.b,s=t.elements;return this.r=s[0]*e+s[3]*r+s[6]*i,this.g=s[1]*e+s[4]*r+s[7]*i,this.b=s[2]*e+s[5]*r+s[8]*i,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ae=new lr;lr.NAMES=Sf;class Cf extends ae{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new gr,this.environmentIntensity=1,this.environmentRotation=new gr,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}const je=new it,wr=new it,E0=new it,br=new it,$n=new it,Hn=new it,Bf=new it,A0=new it,_0=new it,S0=new it,C0=new kn,B0=new kn,F0=new kn;class Ge{constructor(t=new it,e=new it,r=new it){this.a=t,this.b=e,this.c=r}static getNormal(t,e,r,i){i.subVectors(r,e),je.subVectors(t,e),i.cross(je);const s=i.lengthSq();return s>0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(t,e,r,i,s){je.subVectors(i,e),wr.subVectors(r,e),E0.subVectors(t,e);const o=je.dot(je),a=je.dot(wr),u=je.dot(E0),c=wr.dot(wr),l=wr.dot(E0),f=o*c-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,x=(c*u-a*l)*h,p=(o*l-a*u)*h;return s.set(1-x-p,p,x)}static containsPoint(t,e,r,i){return this.getBarycoord(t,e,r,i,br)===null?!1:br.x>=0&&br.y>=0&&br.x+br.y<=1}static getInterpolation(t,e,r,i,s,o,a,u){return this.getBarycoord(t,e,r,i,br)===null?(u.x=0,u.y=0,"z"in u&&(u.z=0),"w"in u&&(u.w=0),null):(u.setScalar(0),u.addScaledVector(s,br.x),u.addScaledVector(o,br.y),u.addScaledVector(a,br.z),u)}static getInterpolatedAttribute(t,e,r,i,s,o){return C0.setScalar(0),B0.setScalar(0),F0.setScalar(0),C0.fromBufferAttribute(t,e),B0.fromBufferAttribute(t,r),F0.fromBufferAttribute(t,i),o.setScalar(0),o.addScaledVector(C0,s.x),o.addScaledVector(B0,s.y),o.addScaledVector(F0,s.z),o}static isFrontFacing(t,e,r,i){return je.subVectors(r,e),wr.subVectors(t,e),je.cross(wr).dot(i)<0}set(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this}setFromPointsAndIndices(t,e,r,i){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,r,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,r),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return je.subVectors(this.c,this.b),wr.subVectors(this.a,this.b),je.cross(wr).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ge.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ge.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,r,i,s){return Ge.getInterpolation(t,this.a,this.b,this.c,e,r,i,s)}containsPoint(t){return Ge.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ge.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const r=this.a,i=this.b,s=this.c;let o,a;$n.subVectors(i,r),Hn.subVectors(s,r),A0.subVectors(t,r);const u=$n.dot(A0),c=Hn.dot(A0);if(u<=0&&c<=0)return e.copy(r);_0.subVectors(t,i);const l=$n.dot(_0),f=Hn.dot(_0);if(l>=0&&f<=l)return e.copy(i);const h=u*f-l*c;if(h<=0&&u>=0&&l<=0)return o=u/(u-l),e.copy(r).addScaledVector($n,o);S0.subVectors(t,s);const x=$n.dot(S0),p=Hn.dot(S0);if(p>=0&&x<=p)return e.copy(s);const y=x*c-u*p;if(y<=0&&c>=0&&p<=0)return a=c/(c-p),e.copy(r).addScaledVector(Hn,a);const g=l*p-x*f;if(g<=0&&f-l>=0&&x-p>=0)return Bf.subVectors(s,i),a=(f-l)/(f-l+(x-p)),e.copy(i).addScaledVector(Bf,a);const E=1/(g+y+h);return o=y*E,a=h*E,e.copy(r).addScaledVector($n,o).addScaledVector(Hn,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}class sn{constructor(t=new it(1/0,1/0,1/0),e=new it(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,r=t.length;e<r;e+=3)this.expandByPoint(Xe.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,r=t.count;e<r;e++)this.expandByPoint(Xe.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,r=t.length;e<r;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const r=Xe.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.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(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const r=t.geometry;if(r!==void 0){const s=r.getAttribute("position");if(e===!0&&s!==void 0&&t.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)t.isMesh===!0?t.getVertexPosition(o,Xe):Xe.fromBufferAttribute(s,o),Xe.applyMatrix4(t.matrixWorld),this.expandByPoint(Xe);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),Ws.copy(t.boundingBox)):(r.boundingBox===null&&r.computeBoundingBox(),Ws.copy(r.boundingBox)),Ws.applyMatrix4(t.matrixWorld),this.union(Ws)}const i=t.children;for(let s=0,o=i.length;s<o;s++)this.expandByObject(i[s],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,Xe),Xe.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=-t.constant&&r>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ti),Vs.subVectors(this.max,Ti),qn.subVectors(t.a,Ti),Wn.subVectors(t.b,Ti),Vn.subVectors(t.c,Ti),Or.subVectors(Wn,qn),Pr.subVectors(Vn,Wn),on.subVectors(qn,Vn);let e=[0,-Or.z,Or.y,0,-Pr.z,Pr.y,0,-on.z,on.y,Or.z,0,-Or.x,Pr.z,0,-Pr.x,on.z,0,-on.x,-Or.y,Or.x,0,-Pr.y,Pr.x,0,-on.y,on.x,0];return!D0(e,qn,Wn,Vn,Vs)||(e=[1,0,0,0,1,0,0,0,1],!D0(e,qn,Wn,Vn,Vs))?!1:(js.crossVectors(Or,Pr),e=[js.x,js.y,js.z],D0(e,qn,Wn,Vn,Vs))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Xe).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(Xe).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Er[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Er[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Er[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Er[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Er[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Er[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Er[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Er[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Er),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const Er=[new it,new it,new it,new it,new it,new it,new it,new it],Xe=new it,Ws=new sn,qn=new it,Wn=new it,Vn=new it,Or=new it,Pr=new it,on=new it,Ti=new it,Vs=new it,js=new it,an=new it;function D0(n,t,e,r,i){for(let s=0,o=n.length-3;s<=o;s+=3){an.fromArray(n,s);const a=i.x*Math.abs(an.x)+i.y*Math.abs(an.y)+i.z*Math.abs(an.z),u=t.dot(an),c=e.dot(an),l=r.dot(an);if(Math.max(-Math.max(u,c,l),Math.min(u,c,l))>a)return!1}return!0}const ne=new it,Gs=new oe;let cv=0;class cn extends Fi{constructor(t,e,r=!1){if(super(),Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:cv++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=r,this.usage=uf,this.updateRanges=[],this.gpuType=nf,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,r){t*=this.itemSize,r*=e.itemSize;for(let i=0,s=this.itemSize;i<s;i++)this.array[t+i]=e.array[r+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,r=this.count;e<r;e++)Gs.fromBufferAttribute(this,e),Gs.applyMatrix3(t),this.setXY(e,Gs.x,Gs.y);else if(this.itemSize===3)for(let e=0,r=this.count;e<r;e++)ne.fromBufferAttribute(this,e),ne.applyMatrix3(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}applyMatrix4(t){for(let e=0,r=this.count;e<r;e++)ne.fromBufferAttribute(this,e),ne.applyMatrix4(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}applyNormalMatrix(t){for(let e=0,r=this.count;e<r;e++)ne.fromBufferAttribute(this,e),ne.applyNormalMatrix(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}transformDirection(t){for(let e=0,r=this.count;e<r;e++)ne.fromBufferAttribute(this,e),ne.transformDirection(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let r=this.array[t*this.itemSize+e];return this.normalized&&(r=Mi(r,this.array)),r}setComponent(t,e,r){return this.normalized&&(r=De(r,this.array)),this.array[t*this.itemSize+e]=r,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Mi(e,this.array)),e}setX(t,e){return this.normalized&&(e=De(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Mi(e,this.array)),e}setY(t,e){return this.normalized&&(e=De(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Mi(e,this.array)),e}setZ(t,e){return this.normalized&&(e=De(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Mi(e,this.array)),e}setW(t,e){return this.normalized&&(e=De(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,r){return t*=this.itemSize,this.normalized&&(e=De(e,this.array),r=De(r,this.array)),this.array[t+0]=e,this.array[t+1]=r,this}setXYZ(t,e,r,i){return t*=this.itemSize,this.normalized&&(e=De(e,this.array),r=De(r,this.array),i=De(i,this.array)),this.array[t+0]=e,this.array[t+1]=r,this.array[t+2]=i,this}setXYZW(t,e,r,i,s){return t*=this.itemSize,this.normalized&&(e=De(e,this.array),r=De(r,this.array),i=De(i,this.array),s=De(s,this.array)),this.array[t+0]=e,this.array[t+1]=r,this.array[t+2]=i,this.array[t+3]=s,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==uf&&(t.usage=this.usage),t}dispose(){this.dispatchEvent({type:"dispose"})}}class lv extends cn{constructor(t,e,r){super(new Uint16Array(t),e,r)}}class uv extends cn{constructor(t,e,r){super(new Uint32Array(t),e,r)}}class Xs extends cn{constructor(t,e,r){super(new Float32Array(t),e,r)}}const hv=new sn,Ri=new it,M0=new it;class Oi{constructor(t=new it,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const r=this.center;e!==void 0?r.copy(e):hv.setFromPoints(t).getCenter(r);let i=0;for(let s=0,o=t.length;s<o;s++)i=Math.max(i,r.distanceToSquared(t[s]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const r=this.center.distanceToSquared(t);return e.copy(t),r>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Ri.subVectors(t,this.center);const e=Ri.lengthSq();if(e>this.radius*this.radius){const r=Math.sqrt(e),i=(r-this.radius)*.5;this.center.addScaledVector(Ri,i/r),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(M0.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Ri.copy(t.center).add(M0)),this.expandByPoint(Ri.copy(t.center).sub(M0))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}let fv=0;const ke=new re,I0=new ae,jn=new it,Ie=new sn,Pi=new sn,pe=new it;class Ys extends Fi{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:fv++}),this.uuid=Di(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,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(t){return Array.isArray(t)?this.index=new(X2(t)?uv:lv)(t,1):this.index=t,this}setIndirect(t,e=0){return this.indirect=t,this.indirectOffset=e,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,r=0){this.groups.push({start:t,count:e,materialIndex:r})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const r=this.attributes.normal;if(r!==void 0){const s=new qe().getNormalMatrix(t);r.applyNormalMatrix(s),r.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return ke.makeRotationFromQuaternion(t),this.applyMatrix4(ke),this}rotateX(t){return ke.makeRotationX(t),this.applyMatrix4(ke),this}rotateY(t){return ke.makeRotationY(t),this.applyMatrix4(ke),this}rotateZ(t){return ke.makeRotationZ(t),this.applyMatrix4(ke),this}translate(t,e,r){return ke.makeTranslation(t,e,r),this.applyMatrix4(ke),this}scale(t,e,r){return ke.makeScale(t,e,r),this.applyMatrix4(ke),this}lookAt(t){return I0.lookAt(t),I0.updateMatrix(),this.applyMatrix4(I0.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(jn).negate(),this.translate(jn.x,jn.y,jn.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const r=[];for(let i=0,s=t.length;i<s;i++){const o=t[i];r.push(o.x,o.y,o.z||0)}this.setAttribute("position",new Xs(r,3))}else{const r=Math.min(t.length,e.count);for(let i=0;i<r;i++){const s=t[i];e.setXYZ(i,s.x,s.y,s.z||0)}t.length>e.count&&be("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new sn);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){nn("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new it(-1/0,-1/0,-1/0),new it(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let r=0,i=e.length;r<i;r++){const s=e[r];Ie.setFromBufferAttribute(s),this.morphTargetsRelative?(pe.addVectors(this.boundingBox.min,Ie.min),this.boundingBox.expandByPoint(pe),pe.addVectors(this.boundingBox.max,Ie.max),this.boundingBox.expandByPoint(pe)):(this.boundingBox.expandByPoint(Ie.min),this.boundingBox.expandByPoint(Ie.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&nn('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 Oi);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){nn("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new it,1/0);return}if(t){const r=this.boundingSphere.center;if(Ie.setFromBufferAttribute(t),e)for(let s=0,o=e.length;s<o;s++){const a=e[s];Pi.setFromBufferAttribute(a),this.morphTargetsRelative?(pe.addVectors(Ie.min,Pi.min),Ie.expandByPoint(pe),pe.addVectors(Ie.max,Pi.max),Ie.expandByPoint(pe)):(Ie.expandByPoint(Pi.min),Ie.expandByPoint(Pi.max))}Ie.getCenter(r);let i=0;for(let s=0,o=t.count;s<o;s++)pe.fromBufferAttribute(t,s),i=Math.max(i,r.distanceToSquared(pe));if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s],u=this.morphTargetsRelative;for(let c=0,l=a.count;c<l;c++)pe.fromBufferAttribute(a,c),u&&(jn.fromBufferAttribute(t,c),pe.add(jn)),i=Math.max(i,r.distanceToSquared(pe))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&nn('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){nn("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const r=e.position,i=e.normal,s=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new cn(new Float32Array(4*r.count),4));const o=this.getAttribute("tangent"),a=[],u=[];for(let z=0;z<r.count;z++)a[z]=new it,u[z]=new it;const c=new it,l=new it,f=new it,h=new oe,x=new oe,p=new oe,y=new it,g=new it;function E(z,X,O){c.fromBufferAttribute(r,z),l.fromBufferAttribute(r,X),f.fromBufferAttribute(r,O),h.fromBufferAttribute(s,z),x.fromBufferAttribute(s,X),p.fromBufferAttribute(s,O),l.sub(c),f.sub(c),x.sub(h),p.sub(h);const P=1/(x.x*p.y-p.x*x.y);isFinite(P)&&(y.copy(l).multiplyScalar(p.y).addScaledVector(f,-x.y).multiplyScalar(P),g.copy(f).multiplyScalar(x.x).addScaledVector(l,-p.x).multiplyScalar(P),a[z].add(y),a[X].add(y),a[O].add(y),u[z].add(g),u[X].add(g),u[O].add(g))}let A=this.groups;A.length===0&&(A=[{start:0,count:t.count}]);for(let z=0,X=A.length;z<X;++z){const O=A[z],P=O.start,q=O.count;for(let j=P,K=P+q;j<K;j+=3)E(t.getX(j+0),t.getX(j+1),t.getX(j+2))}const b=new it,_=new it,S=new it,I=new it;function R(z){S.fromBufferAttribute(i,z),I.copy(S);const X=a[z];b.copy(X),b.sub(S.multiplyScalar(S.dot(X))).normalize(),_.crossVectors(I,X);const P=_.dot(u[z])<0?-1:1;o.setXYZW(z,b.x,b.y,b.z,P)}for(let z=0,X=A.length;z<X;++z){const O=A[z],P=O.start,q=O.count;for(let j=P,K=P+q;j<K;j+=3)R(t.getX(j+0)),R(t.getX(j+1)),R(t.getX(j+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let r=this.getAttribute("normal");if(r===void 0)r=new cn(new Float32Array(e.count*3),3),this.setAttribute("normal",r);else for(let h=0,x=r.count;h<x;h++)r.setXYZ(h,0,0,0);const i=new it,s=new it,o=new it,a=new it,u=new it,c=new it,l=new it,f=new it;if(t)for(let h=0,x=t.count;h<x;h+=3){const p=t.getX(h+0),y=t.getX(h+1),g=t.getX(h+2);i.fromBufferAttribute(e,p),s.fromBufferAttribute(e,y),o.fromBufferAttribute(e,g),l.subVectors(o,s),f.subVectors(i,s),l.cross(f),a.fromBufferAttribute(r,p),u.fromBufferAttribute(r,y),c.fromBufferAttribute(r,g),a.add(l),u.add(l),c.add(l),r.setXYZ(p,a.x,a.y,a.z),r.setXYZ(y,u.x,u.y,u.z),r.setXYZ(g,c.x,c.y,c.z)}else for(let h=0,x=e.count;h<x;h+=3)i.fromBufferAttribute(e,h+0),s.fromBufferAttribute(e,h+1),o.fromBufferAttribute(e,h+2),l.subVectors(o,s),f.subVectors(i,s),l.cross(f),r.setXYZ(h+0,l.x,l.y,l.z),r.setXYZ(h+1,l.x,l.y,l.z),r.setXYZ(h+2,l.x,l.y,l.z);this.normalizeNormals(),r.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,r=t.count;e<r;e++)pe.fromBufferAttribute(t,e),pe.normalize(),t.setXYZ(e,pe.x,pe.y,pe.z)}toNonIndexed(){function t(a,u){const c=a.array,l=a.itemSize,f=a.normalized,h=new c.constructor(u.length*l);let x=0,p=0;for(let y=0,g=u.length;y<g;y++){a.isInterleavedBufferAttribute?x=u[y]*a.data.stride+a.offset:x=u[y]*l;for(let E=0;E<l;E++)h[p++]=c[x++]}return new cn(h,l,f)}if(this.index===null)return be("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new Ys,r=this.index.array,i=this.attributes;for(const a in i){const u=i[a],c=t(u,r);e.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const u=[],c=s[a];for(let l=0,f=c.length;l<f;l++){const h=c[l],x=t(h,r);u.push(x)}e.morphAttributes[a]=u}e.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,u=o.length;a<u;a++){const c=o[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const u=this.parameters;for(const c in u)u[c]!==void 0&&(t[c]=u[c]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const r=this.attributes;for(const u in r){const c=r[u];t.data.attributes[u]=c.toJSON(t.data)}const i={};let s=!1;for(const u in this.morphAttributes){const c=this.morphAttributes[u],l=[];for(let f=0,h=c.length;f<h;f++){const x=c[f];l.push(x.toJSON(t.data))}l.length>0&&(i[u]=l,s=!0)}s&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(t.data.boundingSphere=a.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const r=t.index;r!==null&&this.setIndex(r.clone());const i=t.attributes;for(const c in i){const l=i[c];this.setAttribute(c,l.clone(e))}const s=t.morphAttributes;for(const c in s){const l=[],f=s[c];for(let h=0,x=f.length;h<x;h++)l.push(f[h].clone(e));this.morphAttributes[c]=l}this.morphTargetsRelative=t.morphTargetsRelative;const o=t.groups;for(let c=0,l=o.length;c<l;c++){const f=o[c];this.addGroup(f.start,f.count,f.materialIndex)}const a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());const u=t.boundingSphere;return u!==null&&(this.boundingSphere=u.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}let dv=0;class T0 extends Fi{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:dv++}),this.uuid=Di(),this.name="",this.type="Material",this.blending=jh,this.side=h0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Xh,this.blendDst=Yh,this.blendEquation=Gh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new lr(0,0,0),this.blendAlpha=0,this.depthFunc=Kh,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=lf,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Rn,this.stencilZFail=Rn,this.stencilZPass=Rn,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const r=t[e];if(r===void 0){be(`Material: parameter '${e}' has value of undefined.`);continue}const i=this[e];if(i===void 0){be(`Material: '${e}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[e]=r}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const r={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(r.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(r.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),this.dispersion!==void 0&&(r.dispersion=this.dispersion),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(t).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapRotation!==void 0&&(r.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==jh&&(r.blending=this.blending),this.side!==h0&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==Xh&&(r.blendSrc=this.blendSrc),this.blendDst!==Yh&&(r.blendDst=this.blendDst),this.blendEquation!==Gh&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==Kh&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==lf&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Rn&&(r.stencilFail=this.stencilFail),this.stencilZFail!==Rn&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==Rn&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.allowOverride===!1&&(r.allowOverride=!1),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(s){const o=[];for(const a in s){const u=s[a];delete u.metadata,o.push(u)}return o}if(e){const s=i(t.textures),o=i(t.images);s.length>0&&(r.textures=s),o.length>0&&(r.images=o)}return r}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let r=null;if(e!==null){const i=e.length;r=new Array(i);for(let s=0;s!==i;++s)r[s]=e[s].clone()}return this.clippingPlanes=r,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.allowOverride=t.allowOverride,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}const Ar=new it,R0=new it,Ks=new it,zr=new it,O0=new it,Js=new it,P0=new it;class pv{constructor(t=new it,e=new it(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ar)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const r=e.dot(this.direction);return r<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ar.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ar.copy(this.origin).addScaledVector(this.direction,e),Ar.distanceToSquared(t))}distanceSqToSegment(t,e,r,i){R0.copy(t).add(e).multiplyScalar(.5),Ks.copy(e).sub(t).normalize(),zr.copy(this.origin).sub(R0);const s=t.distanceTo(e)*.5,o=-this.direction.dot(Ks),a=zr.dot(this.direction),u=-zr.dot(Ks),c=zr.lengthSq(),l=Math.abs(1-o*o);let f,h,x,p;if(l>0)if(f=o*u-a,h=o*a-u,p=s*l,f>=0)if(h>=-p)if(h<=p){const y=1/l;f*=y,h*=y,x=f*(f+o*h+2*a)+h*(o*f+h+2*u)+c}else h=s,f=Math.max(0,-(o*h+a)),x=-f*f+h*(h+2*u)+c;else h=-s,f=Math.max(0,-(o*h+a)),x=-f*f+h*(h+2*u)+c;else h<=-p?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-u),s),x=-f*f+h*(h+2*u)+c):h<=p?(f=0,h=Math.min(Math.max(-s,-u),s),x=h*(h+2*u)+c):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-u),s),x=-f*f+h*(h+2*u)+c);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),x=-f*f+h*(h+2*u)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(R0).addScaledVector(Ks,h),x}intersectSphere(t,e){Ar.subVectors(t.center,this.origin);const r=Ar.dot(this.direction),i=Ar.dot(Ar)-r*r,s=t.radius*t.radius;if(i>s)return null;const o=Math.sqrt(s-i),a=r-o,u=r+o;return u<0?null:a<0?this.at(u,e):this.at(a,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null}intersectPlane(t,e){const r=this.distanceToPlane(t);return r===null?null:this.at(r,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let r,i,s,o,a,u;const c=1/this.direction.x,l=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(r=(t.min.x-h.x)*c,i=(t.max.x-h.x)*c):(r=(t.max.x-h.x)*c,i=(t.min.x-h.x)*c),l>=0?(s=(t.min.y-h.y)*l,o=(t.max.y-h.y)*l):(s=(t.max.y-h.y)*l,o=(t.min.y-h.y)*l),r>o||s>i||((s>r||isNaN(r))&&(r=s),(o<i||isNaN(i))&&(i=o),f>=0?(a=(t.min.z-h.z)*f,u=(t.max.z-h.z)*f):(a=(t.max.z-h.z)*f,u=(t.min.z-h.z)*f),r>u||a>i)||((a>r||r!==r)&&(r=a),(u<i||i!==i)&&(i=u),i<0)?null:this.at(r>=0?r:i,e)}intersectsBox(t){return this.intersectBox(t,Ar)!==null}intersectTriangle(t,e,r,i,s){O0.subVectors(e,t),Js.subVectors(r,t),P0.crossVectors(O0,Js);let o=this.direction.dot(P0),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;zr.subVectors(this.origin,t);const u=a*this.direction.dot(Js.crossVectors(zr,Js));if(u<0)return null;const c=a*this.direction.dot(O0.cross(zr));if(c<0||u+c>o)return null;const l=-a*zr.dot(P0);return l<0?null:this.at(l/o,s)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xv extends T0{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new lr(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.envMapRotation=new gr,this.combine=Jh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Ff=new re,ln=new pv,Zs=new Oi,Df=new it,Qs=new it,to=new it,eo=new it,z0=new it,ro=new it,Mf=new it,no=new it;class _r extends ae{constructor(t=new Ys,e=new xv){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,r=Object.keys(e);if(r.length>0){const i=e[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s<o;s++){const a=i[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(t,e){const r=this.geometry,i=r.attributes.position,s=r.morphAttributes.position,o=r.morphTargetsRelative;e.fromBufferAttribute(i,t);const a=this.morphTargetInfluences;if(s&&a){ro.set(0,0,0);for(let u=0,c=s.length;u<c;u++){const l=a[u],f=s[u];l!==0&&(z0.fromBufferAttribute(f,t),o?ro.addScaledVector(z0,l):ro.addScaledVector(z0.sub(e),l))}e.add(ro)}return e}raycast(t,e){const r=this.geometry,i=this.material,s=this.matrixWorld;i!==void 0&&(r.boundingSphere===null&&r.computeBoundingSphere(),Zs.copy(r.boundingSphere),Zs.applyMatrix4(s),ln.copy(t.ray).recast(t.near),!(Zs.containsPoint(ln.origin)===!1&&(ln.intersectSphere(Zs,Df)===null||ln.origin.distanceToSquared(Df)>yd(t.far-t.near,2)))&&(Ff.copy(s).invert(),ln.copy(t.ray).applyMatrix4(Ff),!(r.boundingBox!==null&&ln.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(t,e,ln)))}_computeIntersections(t,e,r){let i;const s=this.geometry,o=this.material,a=s.index,u=s.attributes.position,c=s.attributes.uv,l=s.attributes.uv1,f=s.attributes.normal,h=s.groups,x=s.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,y=h.length;p<y;p++){const g=h[p],E=o[g.materialIndex],A=Math.max(g.start,x.start),b=Math.min(a.count,Math.min(g.start+g.count,x.start+x.count));for(let _=A,S=b;_<S;_+=3){const I=a.getX(_),R=a.getX(_+1),z=a.getX(_+2);i=io(this,E,t,r,c,l,f,I,R,z),i&&(i.faceIndex=Math.floor(_/3),i.face.materialIndex=g.materialIndex,e.push(i))}}else{const p=Math.max(0,x.start),y=Math.min(a.count,x.start+x.count);for(let g=p,E=y;g<E;g+=3){const A=a.getX(g),b=a.getX(g+1),_=a.getX(g+2);i=io(this,o,t,r,c,l,f,A,b,_),i&&(i.faceIndex=Math.floor(g/3),e.push(i))}}else if(u!==void 0)if(Array.isArray(o))for(let p=0,y=h.length;p<y;p++){const g=h[p],E=o[g.materialIndex],A=Math.max(g.start,x.start),b=Math.min(u.count,Math.min(g.start+g.count,x.start+x.count));for(let _=A,S=b;_<S;_+=3){const I=_,R=_+1,z=_+2;i=io(this,E,t,r,c,l,f,I,R,z),i&&(i.faceIndex=Math.floor(_/3),i.face.materialIndex=g.materialIndex,e.push(i))}}else{const p=Math.max(0,x.start),y=Math.min(u.count,x.start+x.count);for(let g=p,E=y;g<E;g+=3){const A=g,b=g+1,_=g+2;i=io(this,o,t,r,c,l,f,A,b,_),i&&(i.faceIndex=Math.floor(g/3),e.push(i))}}}}function mv(n,t,e,r,i,s,o,a){let u;if(t.side===Vh?u=r.intersectTriangle(o,s,i,!0,a):u=r.intersectTriangle(i,s,o,t.side===h0,a),u===null)return null;no.copy(a),no.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(no);return c<e.near||c>e.far?null:{distance:c,point:no.clone(),object:n}}function io(n,t,e,r,i,s,o,a,u,c){n.getVertexPosition(a,Qs),n.getVertexPosition(u,to),n.getVertexPosition(c,eo);const l=mv(n,t,e,r,Qs,to,eo,Mf);if(l){const f=new it;Ge.getBarycoord(Mf,Qs,to,eo,f),i&&(l.uv=Ge.getInterpolatedAttribute(i,a,u,c,f,new oe)),s&&(l.uv1=Ge.getInterpolatedAttribute(s,a,u,c,f,new oe)),o&&(l.normal=Ge.getInterpolatedAttribute(o,a,u,c,f,new it),l.normal.dot(r.direction)>0&&l.normal.multiplyScalar(-1));const h={a,b:u,c,normal:new it,materialIndex:0};Ge.getNormal(Qs,to,eo,h.normal),l.face=h,l.barycoord=f}return l}class yv extends Ir{constructor(t=null,e=1,r=1,i,s,o,a,u,c=ef,l=ef,f,h){super(null,o,a,u,c,l,i,s,f,h),this.isDataTexture=!0,this.image={data:t,width:e,height:r},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class If extends cn{constructor(t,e,r,i=1){super(t,e,r),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Gn=new re,Tf=new re,so=[],Rf=new sn,gv=new re,zi=new _r,ki=new Oi;class vv extends _r{constructor(t,e,r){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new If(new Float32Array(r*16),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=r,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<r;i++)this.setMatrixAt(i,gv)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new sn),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let r=0;r<e;r++)this.getMatrixAt(r,Gn),Rf.copy(t.boundingBox).applyMatrix4(Gn),this.boundingBox.union(Rf)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new Oi),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let r=0;r<e;r++)this.getMatrixAt(r,Gn),ki.copy(t.boundingSphere).applyMatrix4(Gn),this.boundingSphere.union(ki)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.previousInstanceMatrix!==null&&(this.previousInstanceMatrix=t.previousInstanceMatrix.clone()),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){return this.instanceColor===null?e.setRGB(1,1,1):e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){return e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const r=e.morphTargetInfluences,i=this.morphTexture.source.data.data,s=r.length+1,o=t*s+1;for(let a=0;a<r.length;a++)r[a]=i[o+a]}raycast(t,e){const r=this.matrixWorld,i=this.count;if(zi.geometry=this.geometry,zi.material=this.material,zi.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),ki.copy(this.boundingSphere),ki.applyMatrix4(r),t.ray.intersectsSphere(ki)!==!1))for(let s=0;s<i;s++){this.getMatrixAt(s,Gn),Tf.multiplyMatrices(r,Gn),zi.matrixWorld=Tf,zi.raycast(t,so);for(let o=0,a=so.length;o<a;o++){const u=so[o];u.instanceId=s,u.object=this,e.push(u)}so.length=0}}setColorAt(t,e){return this.instanceColor===null&&(this.instanceColor=new If(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3),this}setMatrixAt(t,e){return e.toArray(this.instanceMatrix.array,t*16),this}setMorphAt(t,e){const r=e.morphTargetInfluences,i=r.length+1;this.morphTexture===null&&(this.morphTexture=new yv(new Float32Array(i*this.count),i,this.count,G2,nf));const s=this.morphTexture.source.data.data;let o=0;for(let c=0;c<r.length;c++)o+=r[c];const a=this.geometry.morphTargetsRelative?1:1-o,u=i*t;return s[u]=a,s.set(r,u+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const k0=new it,wv=new it,bv=new qe;class Xn{constructor(t=new it(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,r,i){return this.normal.set(t,e,r),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,r){const i=k0.subVectors(r,e).cross(wv.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e,r=!0){const i=t.delta(k0),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const o=-(t.start.dot(this.normal)+this.constant)/s;return r===!0&&(o<0||o>1)?null:e.copy(t.start).addScaledVector(i,o)}intersectsLine(t){const e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const r=e||bv.getNormalMatrix(t),i=this.coplanarPoint(k0).applyMatrix4(t),s=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(s),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const un=new Oi,Ev=new oe(.5,.5),oo=new it;class Av{constructor(t=new Xn,e=new Xn,r=new Xn,i=new Xn,s=new Xn,o=new Xn){this.planes=[t,e,r,i,s,o]}set(t,e,r,i,s,o){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(r),a[3].copy(i),a[4].copy(s),a[5].copy(o),this}copy(t){const e=this.planes;for(let r=0;r<6;r++)e[r].copy(t.planes[r]);return this}setFromProjectionMatrix(t,e=rn,r=!1){const i=this.planes,s=t.elements,o=s[0],a=s[1],u=s[2],c=s[3],l=s[4],f=s[5],h=s[6],x=s[7],p=s[8],y=s[9],g=s[10],E=s[11],A=s[12],b=s[13],_=s[14],S=s[15];if(i[0].setComponents(c-o,x-l,E-p,S-A).normalize(),i[1].setComponents(c+o,x+l,E+p,S+A).normalize(),i[2].setComponents(c+a,x+f,E+y,S+b).normalize(),i[3].setComponents(c-a,x-f,E-y,S-b).normalize(),r)i[4].setComponents(u,h,g,_).normalize(),i[5].setComponents(c-u,x-h,E-g,S-_).normalize();else if(i[4].setComponents(c-u,x-h,E-g,S-_).normalize(),e===rn)i[5].setComponents(c+u,x+h,E+g,S+_).normalize();else if(e===Us)i[5].setComponents(u,h,g,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),un.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),un.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(un)}intersectsSprite(t){un.center.set(0,0,0);const e=Ev.distanceTo(t.center);return un.radius=.7071067811865476+e,un.applyMatrix4(t.matrixWorld),this.intersectsSphere(un)}intersectsSphere(t){const e=this.planes,r=t.center,i=-t.radius;for(let s=0;s<6;s++)if(e[s].distanceToPoint(r)<i)return!1;return!0}intersectsBox(t){const e=this.planes;for(let r=0;r<6;r++){const i=e[r];if(oo.x=i.normal.x>0?t.max.x:t.min.x,oo.y=i.normal.y>0?t.max.y:t.min.y,oo.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(oo)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class N0 extends Ys{constructor(t=1,e=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const a=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const u=[],c=[],l=[],f=[];let h=0,x=0;p("z","y","x",-1,-1,r,e,t,o,s,0),p("z","y","x",1,-1,r,e,-t,o,s,1),p("x","z","y",1,1,t,r,e,i,o,2),p("x","z","y",1,-1,t,r,-e,i,o,3),p("x","y","z",1,-1,t,e,r,i,s,4),p("x","y","z",-1,-1,t,e,-r,i,s,5),this.setIndex(u),this.setAttribute("position",new Xs(c,3)),this.setAttribute("normal",new Xs(l,3)),this.setAttribute("uv",new Xs(f,2));function p(y,g,E,A,b,_,S,I,R,z,X){const O=_/R,P=S/z,q=_/2,j=S/2,K=I/2,V=R+1,J=z+1;let ot=0,rt=0;const lt=new it;for(let at=0;at<J;at++){const U=at*P-j;for(let G=0;G<V;G++){const tt=G*O-q;lt[y]=tt*A,lt[g]=U*b,lt[E]=K,c.push(lt.x,lt.y,lt.z),lt[y]=0,lt[g]=0,lt[E]=I>0?1:-1,l.push(lt.x,lt.y,lt.z),f.push(G/R),f.push(1-at/z),ot+=1}}for(let at=0;at<z;at++)for(let U=0;U<R;U++){const G=h+U+V*at,tt=h+U+V*(at+1),Q=h+(U+1)+V*(at+1),Et=h+(U+1)+V*at;u.push(G,tt,Et),u.push(tt,Q,Et),rt+=6}a.addGroup(x,rt,X),x+=rt,h+=ot}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new N0(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}class Of extends T0{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new lr(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 lr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sf,this.normalScale=new oe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new gr,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class _v extends T0{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new lr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sf,this.normalScale=new oe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new gr,this.combine=Jh,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Yn extends ae{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new lr(t),this.intensity=e}dispose(){this.dispatchEvent({type:"dispose"})}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,e}}class Sv extends Yn{constructor(t,e,r){super(t,r),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ae.DEFAULT_UP),this.updateMatrix(),this.groundColor=new lr(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}toJSON(t){const e=super.toJSON(t);return e.object.groundColor=this.groundColor.getHex(),e}}const L0=new re,Pf=new it,zf=new it;class U0{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new oe(512,512),this.mapType=rf,this.map=null,this.mapPass=null,this.matrix=new re,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Av,this._frameExtents=new oe(1,1),this._viewportCount=1,this._viewports=[new kn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,r=this.matrix;Pf.setFromMatrixPosition(t.matrixWorld),e.position.copy(Pf),zf.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(zf),e.updateMatrixWorld(),L0.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(L0,e.coordinateSystem,e.reversedDepth),e.coordinateSystem===Us||e.reversedDepth?r.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(L0)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this.biasNode=t.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}const ao=new it,co=new On,ur=new it;class kf extends ae{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new re,this.projectionMatrix=new re,this.projectionMatrixInverse=new re,this.coordinateSystem=rn,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorld.decompose(ao,co,ur),ur.x===1&&ur.y===1&&ur.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(ao,co,ur.set(1,1,1)).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorld.decompose(ao,co,ur),ur.x===1&&ur.y===1&&ur.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(ao,co,ur.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const kr=new it,Nf=new oe,Lf=new oe;class Uf extends kf{constructor(t=50,e=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=p0*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(d0*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return p0*2*Math.atan(Math.tan(d0*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,r){kr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(kr.x,kr.y).multiplyScalar(-t/kr.z),kr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),r.set(kr.x,kr.y).multiplyScalar(-t/kr.z)}getViewSize(t,e){return this.getViewBounds(t,Nf,Lf),e.subVectors(Lf,Nf)}setViewOffset(t,e,r,i,s,o){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(d0*.5*this.fov)/this.zoom,r=2*e,i=this.aspect*r,s=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const u=o.fullWidth,c=o.fullHeight;s+=o.offsetX*i/u,e-=o.offsetY*r/c,i*=o.width/u,r*=o.height/c}const a=this.filmOffset;a!==0&&(s+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,e,e-r,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class Cv extends U0{constructor(){super(new Uf(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,r=p0*2*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,s=t.distance||e.far;(r!==e.fov||i!==e.aspect||s!==e.far)&&(e.fov=r,e.aspect=i,e.far=s,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class Bv extends Yn{constructor(t,e,r=0,i=Math.PI/3,s=0,o=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ae.DEFAULT_UP),this.updateMatrix(),this.target=new ae,this.distance=r,this.angle=i,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new Cv}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.map=t.map,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.angle=this.angle,e.object.decay=this.decay,e.object.penumbra=this.penumbra,e.object.target=this.target.uuid,this.map&&this.map.isTexture&&(e.object.map=this.map.toJSON(t).uuid),e.object.shadow=this.shadow.toJSON(),e}}class Fv extends U0{constructor(){super(new Uf(90,1,.5,500)),this.isPointLightShadow=!0}}class $f extends Yn{constructor(t,e,r=0,i=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new Fv}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.decay=this.decay,e.object.shadow=this.shadow.toJSON(),e}}class Dv extends kf{constructor(t=-1,e=1,r=1,i=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=r,this.bottom=i,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,r,i,s,o){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=t,this.view.fullHeight=e,this.view.offsetX=r,this.view.offsetY=i,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let s=r-t,o=r+t,a=i+e,u=i-e;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=l*this.view.offsetY,u=a-l*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,u,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class Mv extends U0{constructor(){super(new Dv(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Iv extends Yn{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ae.DEFAULT_UP),this.updateMatrix(),this.target=new ae,this.shadow=new Mv}dispose(){super.dispose(),this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.shadow=this.shadow.toJSON(),e.object.target=this.target.uuid,e}}class Tv extends Yn{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Rv extends Yn{constructor(t,e,r=10,i=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=r,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}const rc=class rc{constructor(t,e,r,i){this.elements=[1,0,0,1],t!==void 0&&this.set(t,e,r,i)}identity(){return this.set(1,0,0,1),this}fromArray(t,e=0){for(let r=0;r<4;r++)this.elements[r]=t[r+e];return this}set(t,e,r,i){const s=this.elements;return s[0]=t,s[2]=e,s[1]=r,s[3]=i,this}};rc.prototype.isMatrix2=!0;let Hf=rc;typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Wh}})),typeof window!="undefined"&&(window.__THREE__?be("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Wh);/**
46
+ * @license
47
+ * Copyright 2010-2026 Three.js Authors
48
+ * SPDX-License-Identifier: MIT
49
+ */new qe().set(-1,0,0,0,1,0,0,0,1),new qe().set(-1,0,0,0,1,0,0,0,1);class Ov extends ae{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new oe(.5,.5),this.addEventListener("removed",function(){this.traverse(function(e){e.element&&e.element instanceof e.element.ownerDocument.defaultView.Element&&e.element.parentNode!==null&&e.element.remove()})})}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}new re,new re;const Pv={name:"局放测点",label:"局放测点",create:function(n,t){return _t(this,null,function*(){const{transformControls:e}=t,r=document.createElement("div");r.style.position="relative",r.style.gap="20px";const i=document.createElement("img");i.style.objectFit="fill",i.style.width="1.3vw",i.style.height="1.3vw",i.src=qh,i.style.cursor="pointer",i.style.pointerEvents="auto",i.style.userSelect="none",r.append(i);const s=document.createElement("div");Object.assign(s.style,{position:"absolute",top:"0",left:"1.8vw",display:"none",flexDirection:"column",gap:"10px",padding:"10px",borderRadius:"4px",border:"1px solid rgba(255, 255, 255, 0.2)",backdropFilter:"blur(12px)",background:"#24262933",minWidth:"12vw"}),n.valueEleId||(n.valueEleId=da()),s.innerHTML=`
50
+ <div style="padding-bottom: 10px; font-size: 16px; color: #ffffff; border-bottom: 1px solid rgba(255, 113, 108, 0.5);white-space: nowrap;">${n.name}</div>
51
+ <div style="font-size: 14px; color: #cae4ff;">幅值峰值</div>
52
+ <div style="display: flex; align-items: flex-end; gap: 10px; color: #FF716C;">
53
+ <span id="${n.valueEleId}" style="font-size: 24px;font-weight: 600;">${n.value}</span>
54
+ <span style="font-size: 14px;">dBm</span>
55
+ </div>
56
+ `;const o=new Ov(r);o.dataId=n.id,o.userData.params=n,i.addEventListener("mouseover",()=>{s.style.display="flex"}),i.addEventListener("mouseleave",()=>{s.style.display="none"}),i.addEventListener("click",()=>{pa.emit("three-event",{type:"pd-sensor-click",data:o}),n.preview||setTimeout(()=>{e.attach(o)},100)}),r.append(s);const a=c=>{c===0?i.src=qh:c===1?i.src=H2:c===2&&(i.src=q2)},u=c=>{const l=document.getElementById(n.valueEleId);l&&(l.innerText=c)};return o.changeState=a,o.changeValue=u,setTimeout(()=>{a(n.state),u(n.value)},200),o})},getStorage:function(n){return n.userData.params}};var qf={exports:{}};/*!
57
+ localForage -- Offline Storage, Improved
58
+ Version 1.10.0
59
+ https://localforage.github.io/localForage
60
+ (c) 2013-2017 Mozilla, Apache License 2.0
61
+ */(function(n,t){(function(e){n.exports=e()})(function(){return function e(r,i,s){function o(c,l){if(!i[c]){if(!r[c]){var f=typeof _i=="function"&&_i;if(!l&&f)return f(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var x=i[c]={exports:{}};r[c][0].call(x.exports,function(p){var y=r[c][1][p];return o(y||p)},x,x.exports,e,r,i,s)}return i[c].exports}for(var a=typeof _i=="function"&&_i,u=0;u<s.length;u++)o(s[u]);return o}({1:[function(e,r,i){(function(s){var o=s.MutationObserver||s.WebKitMutationObserver,a;if(o){var u=0,c=new o(p),l=s.document.createTextNode("");c.observe(l,{characterData:!0}),a=function(){l.data=u=++u%2}}else if(!s.setImmediate&&typeof s.MessageChannel!="undefined"){var f=new s.MessageChannel;f.port1.onmessage=p,a=function(){f.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?a=function(){var g=s.document.createElement("script");g.onreadystatechange=function(){p(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},s.document.documentElement.appendChild(g)}:a=function(){setTimeout(p,0)};var h,x=[];function p(){h=!0;for(var g,E,A=x.length;A;){for(E=x,x=[],g=-1;++g<A;)E[g]();A=x.length}h=!1}r.exports=y;function y(g){x.push(g)===1&&!h&&a()}}).call(this,typeof yt!="undefined"?yt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(e,r,i){var s=e(1);function o(){}var a={},u=["REJECTED"],c=["FULFILLED"],l=["PENDING"];r.exports=f;function f(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,S!==o&&y(this,S)}f.prototype.catch=function(S){return this.then(null,S)},f.prototype.then=function(S,I){if(typeof S!="function"&&this.state===c||typeof I!="function"&&this.state===u)return this;var R=new this.constructor(o);if(this.state!==l){var z=this.state===c?S:I;x(R,z,this.outcome)}else this.queue.push(new h(R,S,I));return R};function h(S,I,R){this.promise=S,typeof I=="function"&&(this.onFulfilled=I,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}h.prototype.callFulfilled=function(S){a.resolve(this.promise,S)},h.prototype.otherCallFulfilled=function(S){x(this.promise,this.onFulfilled,S)},h.prototype.callRejected=function(S){a.reject(this.promise,S)},h.prototype.otherCallRejected=function(S){x(this.promise,this.onRejected,S)};function x(S,I,R){s(function(){var z;try{z=I(R)}catch(X){return a.reject(S,X)}z===S?a.reject(S,new TypeError("Cannot resolve promise with itself")):a.resolve(S,z)})}a.resolve=function(S,I){var R=g(p,I);if(R.status==="error")return a.reject(S,R.value);var z=R.value;if(z)y(S,z);else{S.state=c,S.outcome=I;for(var X=-1,O=S.queue.length;++X<O;)S.queue[X].callFulfilled(I)}return S},a.reject=function(S,I){S.state=u,S.outcome=I;for(var R=-1,z=S.queue.length;++R<z;)S.queue[R].callRejected(I);return S};function p(S){var I=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof I=="function")return function(){I.apply(S,arguments)}}function y(S,I){var R=!1;function z(q){R||(R=!0,a.reject(S,q))}function X(q){R||(R=!0,a.resolve(S,q))}function O(){I(X,z)}var P=g(O);P.status==="error"&&z(P.value)}function g(S,I){var R={};try{R.value=S(I),R.status="success"}catch(z){R.status="error",R.value=z}return R}f.resolve=E;function E(S){return S instanceof this?S:a.resolve(new this(o),S)}f.reject=A;function A(S){var I=new this(o);return a.reject(I,S)}f.all=b;function b(S){var I=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=S.length,z=!1;if(!R)return this.resolve([]);for(var X=new Array(R),O=0,P=-1,q=new this(o);++P<R;)j(S[P],P);return q;function j(K,V){I.resolve(K).then(J,function(ot){z||(z=!0,a.reject(q,ot))});function J(ot){X[V]=ot,++O===R&&!z&&(z=!0,a.resolve(q,X))}}}f.race=_;function _(S){var I=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=S.length,z=!1;if(!R)return this.resolve([]);for(var X=-1,O=new this(o);++X<R;)P(S[X]);return O;function P(q){I.resolve(q).then(function(j){z||(z=!0,a.resolve(O,j))},function(j){z||(z=!0,a.reject(O,j))})}}},{1:1}],3:[function(e,r,i){(function(s){typeof s.Promise!="function"&&(s.Promise=e(2))}).call(this,typeof yt!="undefined"?yt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(e,r,i){var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C};function o(C,k){if(!(C instanceof k))throw new TypeError("Cannot call a class as a function")}function a(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(C){return}}var u=a();function c(){try{if(!u||!u.open)return!1;var C=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),k=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!C||k)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(D){return!1}}function l(C,k){C=C||[],k=k||{};try{return new Blob(C,k)}catch($){if($.name!=="TypeError")throw $;for(var D=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,L=new D,W=0;W<C.length;W+=1)L.append(C[W]);return L.getBlob(k.type)}}typeof Promise=="undefined"&&e(3);var f=Promise;function h(C,k){k&&C.then(function(D){k(null,D)},function(D){k(D)})}function x(C,k,D){typeof k=="function"&&C.then(k),typeof D=="function"&&C.catch(D)}function p(C){return typeof C!="string"&&(console.warn(C+" used as a key, but it is not a string."),C=String(C)),C}function y(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",E=void 0,A={},b=Object.prototype.toString,_="readonly",S="readwrite";function I(C){for(var k=C.length,D=new ArrayBuffer(k),L=new Uint8Array(D),W=0;W<k;W++)L[W]=C.charCodeAt(W);return D}function R(C){return new f(function(k){var D=C.transaction(g,S),L=l([""]);D.objectStore(g).put(L,"key"),D.onabort=function(W){W.preventDefault(),W.stopPropagation(),k(!1)},D.oncomplete=function(){var W=navigator.userAgent.match(/Chrome\/(\d+)/),$=navigator.userAgent.match(/Edge\//);k($||!W||parseInt(W[1],10)>=43)}}).catch(function(){return!1})}function z(C){return typeof E=="boolean"?f.resolve(E):R(C).then(function(k){return E=k,E})}function X(C){var k=A[C.name],D={};D.promise=new f(function(L,W){D.resolve=L,D.reject=W}),k.deferredOperations.push(D),k.dbReady?k.dbReady=k.dbReady.then(function(){return D.promise}):k.dbReady=D.promise}function O(C){var k=A[C.name],D=k.deferredOperations.pop();if(D)return D.resolve(),D.promise}function P(C,k){var D=A[C.name],L=D.deferredOperations.pop();if(L)return L.reject(k),L.promise}function q(C,k){return new f(function(D,L){if(A[C.name]=A[C.name]||G(),C.db)if(k)X(C),C.db.close();else return D(C.db);var W=[C.name];k&&W.push(C.version);var $=u.open.apply(u,W);k&&($.onupgradeneeded=function(et){var ct=$.result;try{ct.createObjectStore(C.storeName),et.oldVersion<=1&&ct.createObjectStore(g)}catch(ht){if(ht.name==="ConstraintError")console.warn('The database "'+C.name+'" has been upgraded from version '+et.oldVersion+" to version "+et.newVersion+', but the storage "'+C.storeName+'" already exists.');else throw ht}}),$.onerror=function(et){et.preventDefault(),L($.error)},$.onsuccess=function(){var et=$.result;et.onversionchange=function(ct){ct.target.close()},D(et),O(C)}})}function j(C){return q(C,!1)}function K(C){return q(C,!0)}function V(C,k){if(!C.db)return!0;var D=!C.db.objectStoreNames.contains(C.storeName),L=C.version<C.db.version,W=C.version>C.db.version;if(L&&(C.version!==k&&console.warn('The database "'+C.name+`" can't be downgraded from version `+C.db.version+" to version "+C.version+"."),C.version=C.db.version),W||D){if(D){var $=C.db.version+1;$>C.version&&(C.version=$)}return!0}return!1}function J(C){return new f(function(k,D){var L=new FileReader;L.onerror=D,L.onloadend=function(W){var $=btoa(W.target.result||"");k({__local_forage_encoded_blob:!0,data:$,type:C.type})},L.readAsBinaryString(C)})}function ot(C){var k=I(atob(C.data));return l([k],{type:C.type})}function rt(C){return C&&C.__local_forage_encoded_blob}function lt(C){var k=this,D=k._initReady().then(function(){var L=A[k._dbInfo.name];if(L&&L.dbReady)return L.dbReady});return x(D,C,C),D}function at(C){X(C);for(var k=A[C.name],D=k.forages,L=0;L<D.length;L++){var W=D[L];W._dbInfo.db&&(W._dbInfo.db.close(),W._dbInfo.db=null)}return C.db=null,j(C).then(function($){return C.db=$,V(C)?K(C):$}).then(function($){C.db=k.db=$;for(var et=0;et<D.length;et++)D[et]._dbInfo.db=$}).catch(function($){throw P(C,$),$})}function U(C,k,D,L){L===void 0&&(L=1);try{var W=C.db.transaction(C.storeName,k);D(null,W)}catch($){if(L>0&&(!C.db||$.name==="InvalidStateError"||$.name==="NotFoundError"))return f.resolve().then(function(){if(!C.db||$.name==="NotFoundError"&&!C.db.objectStoreNames.contains(C.storeName)&&C.version<=C.db.version)return C.db&&(C.version=C.db.version+1),K(C)}).then(function(){return at(C).then(function(){U(C,k,D,L-1)})}).catch(D);D($)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function tt(C){var k=this,D={db:null};if(C)for(var L in C)D[L]=C[L];var W=A[D.name];W||(W=G(),A[D.name]=W),W.forages.push(k),k._initReady||(k._initReady=k.ready,k.ready=lt);var $=[];function et(){return f.resolve()}for(var ct=0;ct<W.forages.length;ct++){var ht=W.forages[ct];ht!==k&&$.push(ht._initReady().catch(et))}var ft=W.forages.slice(0);return f.all($).then(function(){return D.db=W.db,j(D)}).then(function(dt){return D.db=dt,V(D,k._defaultConfig.version)?K(D):dt}).then(function(dt){D.db=W.db=dt,k._dbInfo=D;for(var gt=0;gt<ft.length;gt++){var St=ft[gt];St!==k&&(St._dbInfo.db=D.db,St._dbInfo.version=D.version)}})}function Q(C,k){var D=this;C=p(C);var L=new f(function(W,$){D.ready().then(function(){U(D._dbInfo,_,function(et,ct){if(et)return $(et);try{var ht=ct.objectStore(D._dbInfo.storeName),ft=ht.get(C);ft.onsuccess=function(){var dt=ft.result;dt===void 0&&(dt=null),rt(dt)&&(dt=ot(dt)),W(dt)},ft.onerror=function(){$(ft.error)}}catch(dt){$(dt)}})}).catch($)});return h(L,k),L}function Et(C,k){var D=this,L=new f(function(W,$){D.ready().then(function(){U(D._dbInfo,_,function(et,ct){if(et)return $(et);try{var ht=ct.objectStore(D._dbInfo.storeName),ft=ht.openCursor(),dt=1;ft.onsuccess=function(){var gt=ft.result;if(gt){var St=gt.value;rt(St)&&(St=ot(St));var Pt=C(St,gt.key,dt++);Pt!==void 0?W(Pt):gt.continue()}else W()},ft.onerror=function(){$(ft.error)}}catch(gt){$(gt)}})}).catch($)});return h(L,k),L}function Bt(C,k,D){var L=this;C=p(C);var W=new f(function($,et){var ct;L.ready().then(function(){return ct=L._dbInfo,b.call(k)==="[object Blob]"?z(ct.db).then(function(ht){return ht?k:J(k)}):k}).then(function(ht){U(L._dbInfo,S,function(ft,dt){if(ft)return et(ft);try{var gt=dt.objectStore(L._dbInfo.storeName);ht===null&&(ht=void 0);var St=gt.put(ht,C);dt.oncomplete=function(){ht===void 0&&(ht=null),$(ht)},dt.onabort=dt.onerror=function(){var Pt=St.error?St.error:St.transaction.error;et(Pt)}}catch(Pt){et(Pt)}})}).catch(et)});return h(W,D),W}function Lt(C,k){var D=this;C=p(C);var L=new f(function(W,$){D.ready().then(function(){U(D._dbInfo,S,function(et,ct){if(et)return $(et);try{var ht=ct.objectStore(D._dbInfo.storeName),ft=ht.delete(C);ct.oncomplete=function(){W()},ct.onerror=function(){$(ft.error)},ct.onabort=function(){var dt=ft.error?ft.error:ft.transaction.error;$(dt)}}catch(dt){$(dt)}})}).catch($)});return h(L,k),L}function wt(C){var k=this,D=new f(function(L,W){k.ready().then(function(){U(k._dbInfo,S,function($,et){if($)return W($);try{var ct=et.objectStore(k._dbInfo.storeName),ht=ct.clear();et.oncomplete=function(){L()},et.onabort=et.onerror=function(){var ft=ht.error?ht.error:ht.transaction.error;W(ft)}}catch(ft){W(ft)}})}).catch(W)});return h(D,C),D}function Wt(C){var k=this,D=new f(function(L,W){k.ready().then(function(){U(k._dbInfo,_,function($,et){if($)return W($);try{var ct=et.objectStore(k._dbInfo.storeName),ht=ct.count();ht.onsuccess=function(){L(ht.result)},ht.onerror=function(){W(ht.error)}}catch(ft){W(ft)}})}).catch(W)});return h(D,C),D}function __$t__(C,k){var D=this,L=new f(function(W,$){if(C<0){W(null);return}D.ready().then(function(){U(D._dbInfo,_,function(et,ct){if(et)return $(et);try{var ht=ct.objectStore(D._dbInfo.storeName),ft=!1,dt=ht.openKeyCursor();dt.onsuccess=function(){var gt=dt.result;if(!gt){W(null);return}C===0||ft?W(gt.key):(ft=!0,gt.advance(C))},dt.onerror=function(){$(dt.error)}}catch(gt){$(gt)}})}).catch($)});return h(L,k),L}function Jt(C){var k=this,D=new f(function(L,W){k.ready().then(function(){U(k._dbInfo,_,function($,et){if($)return W($);try{var ct=et.objectStore(k._dbInfo.storeName),ht=ct.openKeyCursor(),ft=[];ht.onsuccess=function(){var dt=ht.result;if(!dt){L(ft);return}ft.push(dt.key),dt.continue()},ht.onerror=function(){W(ht.error)}}catch(dt){W(dt)}})}).catch(W)});return h(D,C),D}function Kt(C,k){k=y.apply(this,arguments);var D=this.config();C=typeof C!="function"&&C||{},C.name||(C.name=C.name||D.name,C.storeName=C.storeName||D.storeName);var L=this,W;if(!C.name)W=f.reject("Invalid arguments");else{var $=C.name===D.name&&L._dbInfo.db,et=$?f.resolve(L._dbInfo.db):j(C).then(function(ct){var ht=A[C.name],ft=ht.forages;ht.db=ct;for(var dt=0;dt<ft.length;dt++)ft[dt]._dbInfo.db=ct;return ct});C.storeName?W=et.then(function(ct){if(ct.objectStoreNames.contains(C.storeName)){var ht=ct.version+1;X(C);var ft=A[C.name],dt=ft.forages;ct.close();for(var gt=0;gt<dt.length;gt++){var St=dt[gt];St._dbInfo.db=null,St._dbInfo.version=ht}var Pt=new f(function(kt,Zt){var Vt=u.open(C.name,ht);Vt.onerror=function(v){var w=Vt.result;w.close(),Zt(v)},Vt.onupgradeneeded=function(){var v=Vt.result;v.deleteObjectStore(C.storeName)},Vt.onsuccess=function(){var v=Vt.result;v.close(),kt(v)}});return Pt.then(function(kt){ft.db=kt;for(var Zt=0;Zt<dt.length;Zt++){var Vt=dt[Zt];Vt._dbInfo.db=kt,O(Vt._dbInfo)}}).catch(function(kt){throw(P(C,kt)||f.resolve()).catch(function(){}),kt})}}):W=et.then(function(ct){X(C);var ht=A[C.name],ft=ht.forages;ct.close();for(var dt=0;dt<ft.length;dt++){var gt=ft[dt];gt._dbInfo.db=null}var St=new f(function(Pt,kt){var Zt=u.deleteDatabase(C.name);Zt.onerror=function(){var Vt=Zt.result;Vt&&Vt.close(),kt(Zt.error)},Zt.onblocked=function(){console.warn('dropInstance blocked for database "'+C.name+'" until all open connections are closed')},Zt.onsuccess=function(){var Vt=Zt.result;Vt&&Vt.close(),Pt(Vt)}});return St.then(function(Pt){ht.db=Pt;for(var kt=0;kt<ft.length;kt++){var Zt=ft[kt];O(Zt._dbInfo)}}).catch(function(Pt){throw(P(C,Pt)||f.resolve()).catch(function(){}),Pt})})}return h(W,k),W}var Tt={_driver:"asyncStorage",_initStorage:tt,_support:c(),iterate:Et,getItem:Q,setItem:Bt,removeItem:Lt,clear:wt,length:Wt,key:__$t__,keys:Jt,dropInstance:Kt};function jt(){return typeof openDatabase=="function"}var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M="~~local_forage_type~",d=/^~~local_forage_type~([^~]+)~/,m="__lfsc__:",B=m.length,N="arbf",Z="blob",nt="si08",mt="ui08",vt="uic8",Rt="si16",zt="si32",Ot="ur16",Ke="ui32",hr="fl32",fr="fl64",Je=B+N.length,dr=Object.prototype.toString;function Jn(C){var k=C.length*.75,D=C.length,L,W=0,$,et,ct,ht;C[C.length-1]==="="&&(k--,C[C.length-2]==="="&&k--);var ft=new ArrayBuffer(k),dt=new Uint8Array(ft);for(L=0;L<D;L+=4)$=ce.indexOf(C[L]),et=ce.indexOf(C[L+1]),ct=ce.indexOf(C[L+2]),ht=ce.indexOf(C[L+3]),dt[W++]=$<<2|et>>4,dt[W++]=(et&15)<<4|ct>>2,dt[W++]=(ct&3)<<6|ht&63;return ft}function pr(C){var k=new Uint8Array(C),D="",L;for(L=0;L<k.length;L+=3)D+=ce[k[L]>>2],D+=ce[(k[L]&3)<<4|k[L+1]>>4],D+=ce[(k[L+1]&15)<<2|k[L+2]>>6],D+=ce[k[L+2]&63];return k.length%3===2?D=D.substring(0,D.length-1)+"=":k.length%3===1&&(D=D.substring(0,D.length-2)+"=="),D}function Zn(C,k){var D="";if(C&&(D=dr.call(C)),C&&(D==="[object ArrayBuffer]"||C.buffer&&dr.call(C.buffer)==="[object ArrayBuffer]")){var L,W=m;C instanceof ArrayBuffer?(L=C,W+=N):(L=C.buffer,D==="[object Int8Array]"?W+=nt:D==="[object Uint8Array]"?W+=mt:D==="[object Uint8ClampedArray]"?W+=vt:D==="[object Int16Array]"?W+=Rt:D==="[object Uint16Array]"?W+=Ot:D==="[object Int32Array]"?W+=zt:D==="[object Uint32Array]"?W+=Ke:D==="[object Float32Array]"?W+=hr:D==="[object Float64Array]"?W+=fr:k(new Error("Failed to get type for BinaryArray"))),k(W+pr(L))}else if(D==="[object Blob]"){var $=new FileReader;$.onload=function(){var et=M+C.type+"~"+pr(this.result);k(m+Z+et)},$.readAsArrayBuffer(C)}else try{k(JSON.stringify(C))}catch(et){console.error("Couldn't convert value into a JSON string: ",C),k(null,et)}}function Qn(C){if(C.substring(0,B)!==m)return JSON.parse(C);var k=C.substring(Je),D=C.substring(B,Je),L;if(D===Z&&d.test(k)){var W=k.match(d);L=W[1],k=k.substring(W[0].length)}var $=Jn(k);switch(D){case N:return $;case Z:return l([$],{type:L});case nt:return new Int8Array($);case mt:return new Uint8Array($);case vt:return new Uint8ClampedArray($);case Rt:return new Int16Array($);case Ot:return new Uint16Array($);case zt:return new Int32Array($);case Ke:return new Uint32Array($);case hr:return new Float32Array($);case fr:return new Float64Array($);default:throw new Error("Unkown type: "+D)}}var hn={serialize:Zn,deserialize:Qn,stringToBuffer:Jn,bufferToString:pr};function Ur(C,k,D,L){C.executeSql("CREATE TABLE IF NOT EXISTS "+k.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],D,L)}function Hi(C){var k=this,D={db:null};if(C)for(var L in C)D[L]=typeof C[L]!="string"?C[L].toString():C[L];var W=new f(function($,et){try{D.db=openDatabase(D.name,String(D.version),D.description,D.size)}catch(ct){return et(ct)}D.db.transaction(function(ct){Ur(ct,D,function(){k._dbInfo=D,$()},function(ht,ft){et(ft)})},et)});return D.serializer=hn,W}function Te(C,k,D,L,W,$){C.executeSql(D,L,W,function(et,ct){ct.code===ct.SYNTAX_ERR?et.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[k.storeName],function(ht,ft){ft.rows.length?$(ht,ct):Ur(ht,k,function(){ht.executeSql(D,L,W,$)},$)},$):$(et,ct)},$)}function qi(C,k){var D=this;C=p(C);var L=new f(function(W,$){D.ready().then(function(){var et=D._dbInfo;et.db.transaction(function(ct){Te(ct,et,"SELECT * FROM "+et.storeName+" WHERE key = ? LIMIT 1",[C],function(ht,ft){var dt=ft.rows.length?ft.rows.item(0).value:null;dt&&(dt=et.serializer.deserialize(dt)),W(dt)},function(ht,ft){$(ft)})})}).catch($)});return h(L,k),L}function ti(C,k){var D=this,L=new f(function(W,$){D.ready().then(function(){var et=D._dbInfo;et.db.transaction(function(ct){Te(ct,et,"SELECT * FROM "+et.storeName,[],function(ht,ft){for(var dt=ft.rows,gt=dt.length,St=0;St<gt;St++){var Pt=dt.item(St),kt=Pt.value;if(kt&&(kt=et.serializer.deserialize(kt)),kt=C(kt,Pt.key,St+1),kt!==void 0){W(kt);return}}W()},function(ht,ft){$(ft)})})}).catch($)});return h(L,k),L}function ei(C,k,D,L){var W=this;C=p(C);var $=new f(function(et,ct){W.ready().then(function(){k===void 0&&(k=null);var ht=k,ft=W._dbInfo;ft.serializer.serialize(k,function(dt,gt){gt?ct(gt):ft.db.transaction(function(St){Te(St,ft,"INSERT OR REPLACE INTO "+ft.storeName+" (key, value) VALUES (?, ?)",[C,dt],function(){et(ht)},function(Pt,kt){ct(kt)})},function(St){if(St.code===St.QUOTA_ERR){if(L>0){et(ei.apply(W,[C,ht,D,L-1]));return}ct(St)}})})}).catch(ct)});return h($,D),$}function Wi(C,k,D){return ei.apply(this,[C,k,D,1])}function Vi(C,k){var D=this;C=p(C);var L=new f(function(W,$){D.ready().then(function(){var et=D._dbInfo;et.db.transaction(function(ct){Te(ct,et,"DELETE FROM "+et.storeName+" WHERE key = ?",[C],function(){W()},function(ht,ft){$(ft)})})}).catch($)});return h(L,k),L}function ri(C){var k=this,D=new f(function(L,W){k.ready().then(function(){var $=k._dbInfo;$.db.transaction(function(et){Te(et,$,"DELETE FROM "+$.storeName,[],function(){L()},function(ct,ht){W(ht)})})}).catch(W)});return h(D,C),D}function ji(C){var k=this,D=new f(function(L,W){k.ready().then(function(){var $=k._dbInfo;$.db.transaction(function(et){Te(et,$,"SELECT COUNT(key) as c FROM "+$.storeName,[],function(ct,ht){var ft=ht.rows.item(0).c;L(ft)},function(ct,ht){W(ht)})})}).catch(W)});return h(D,C),D}function Gi(C,k){var D=this,L=new f(function(W,$){D.ready().then(function(){var et=D._dbInfo;et.db.transaction(function(ct){Te(ct,et,"SELECT key FROM "+et.storeName+" WHERE id = ? LIMIT 1",[C+1],function(ht,ft){var dt=ft.rows.length?ft.rows.item(0).key:null;W(dt)},function(ht,ft){$(ft)})})}).catch($)});return h(L,k),L}function ni(C){var k=this,D=new f(function(L,W){k.ready().then(function(){var $=k._dbInfo;$.db.transaction(function(et){Te(et,$,"SELECT key FROM "+$.storeName,[],function(ct,ht){for(var ft=[],dt=0;dt<ht.rows.length;dt++)ft.push(ht.rows.item(dt).key);L(ft)},function(ct,ht){W(ht)})})}).catch(W)});return h(D,C),D}function Xi(C){return new f(function(k,D){C.transaction(function(L){L.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(W,$){for(var et=[],ct=0;ct<$.rows.length;ct++)et.push($.rows.item(ct).name);k({db:C,storeNames:et})},function(W,$){D($)})},function(L){D(L)})})}function ii(C,k){k=y.apply(this,arguments);var D=this.config();C=typeof C!="function"&&C||{},C.name||(C.name=C.name||D.name,C.storeName=C.storeName||D.storeName);var L=this,W;return C.name?W=new f(function($){var et;C.name===D.name?et=L._dbInfo.db:et=openDatabase(C.name,"","",0),C.storeName?$({db:et,storeNames:[C.storeName]}):$(Xi(et))}).then(function($){return new f(function(et,ct){$.db.transaction(function(ht){function ft(Pt){return new f(function(kt,Zt){ht.executeSql("DROP TABLE IF EXISTS "+Pt,[],function(){kt()},function(Vt,v){Zt(v)})})}for(var dt=[],gt=0,St=$.storeNames.length;gt<St;gt++)dt.push(ft($.storeNames[gt]));f.all(dt).then(function(){et()}).catch(function(Pt){ct(Pt)})},function(ht){ct(ht)})})}):W=f.reject("Invalid arguments"),h(W,k),W}var ye={_driver:"webSQLStorage",_initStorage:Hi,_support:jt(),iterate:ti,getItem:qi,setItem:Wi,removeItem:Vi,clear:ri,length:ji,key:Gi,keys:ni,dropInstance:ii};function Ne(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(C){return!1}}function fn(C,k){var D=C.name+"/";return C.storeName!==k.storeName&&(D+=C.storeName+"/"),D}function Yi(){var C="_localforage_support_test";try{return localStorage.setItem(C,!0),localStorage.removeItem(C),!1}catch(k){return!0}}function nc(){return!Yi()||localStorage.length>0}function ic(C){var k=this,D={};if(C)for(var L in C)D[L]=C[L];return D.keyPrefix=fn(C,k._defaultConfig),nc()?(k._dbInfo=D,D.serializer=hn,f.resolve()):f.reject()}function sc(C){var k=this,D=k.ready().then(function(){for(var L=k._dbInfo.keyPrefix,W=localStorage.length-1;W>=0;W--){var $=localStorage.key(W);$.indexOf(L)===0&&localStorage.removeItem($)}});return h(D,C),D}function oc(C,k){var D=this;C=p(C);var L=D.ready().then(function(){var W=D._dbInfo,$=localStorage.getItem(W.keyPrefix+C);return $&&($=W.serializer.deserialize($)),$});return h(L,k),L}function ac(C,k){var D=this,L=D.ready().then(function(){for(var W=D._dbInfo,$=W.keyPrefix,et=$.length,ct=localStorage.length,ht=1,ft=0;ft<ct;ft++){var dt=localStorage.key(ft);if(dt.indexOf($)===0){var gt=localStorage.getItem(dt);if(gt&&(gt=W.serializer.deserialize(gt)),gt=C(gt,dt.substring(et),ht++),gt!==void 0)return gt}}});return h(L,k),L}function cc(C,k){var D=this,L=D.ready().then(function(){var W=D._dbInfo,$;try{$=localStorage.key(C)}catch(et){$=null}return $&&($=$.substring(W.keyPrefix.length)),$});return h(L,k),L}function dn(C){var k=this,D=k.ready().then(function(){for(var L=k._dbInfo,W=localStorage.length,$=[],et=0;et<W;et++){var ct=localStorage.key(et);ct.indexOf(L.keyPrefix)===0&&$.push(ct.substring(L.keyPrefix.length))}return $});return h(D,C),D}function po(C){var k=this,D=k.keys().then(function(L){return L.length});return h(D,C),D}function lc(C,k){var D=this;C=p(C);var L=D.ready().then(function(){var W=D._dbInfo;localStorage.removeItem(W.keyPrefix+C)});return h(L,k),L}function uc(C,k,D){var L=this;C=p(C);var W=L.ready().then(function(){k===void 0&&(k=null);var $=k;return new f(function(et,ct){var ht=L._dbInfo;ht.serializer.serialize(k,function(ft,dt){if(dt)ct(dt);else try{localStorage.setItem(ht.keyPrefix+C,ft),et($)}catch(gt){(gt.name==="QuotaExceededError"||gt.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ct(gt),ct(gt)}})})});return h(W,D),W}function hc(C,k){if(k=y.apply(this,arguments),C=typeof C!="function"&&C||{},!C.name){var D=this.config();C.name=C.name||D.name,C.storeName=C.storeName||D.storeName}var L=this,W;return C.name?W=new f(function($){C.storeName?$(fn(C,L._defaultConfig)):$(C.name+"/")}).then(function($){for(var et=localStorage.length-1;et>=0;et--){var ct=localStorage.key(et);ct.indexOf($)===0&&localStorage.removeItem(ct)}}):W=f.reject("Invalid arguments"),h(W,k),W}var fc={_driver:"localStorageWrapper",_initStorage:ic,_support:Ne(),iterate:ac,getItem:oc,setItem:uc,removeItem:lc,clear:sc,length:po,key:cc,keys:dn,dropInstance:hc},dc=function(k,D){return k===D||typeof k=="number"&&typeof D=="number"&&isNaN(k)&&isNaN(D)},Sr=function(k,D){for(var L=k.length,W=0;W<L;){if(dc(k[W],D))return!0;W++}return!1},xo=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"},pn={},mo={},$r={INDEXEDDB:Tt,WEBSQL:ye,LOCALSTORAGE:fc},pc=[$r.INDEXEDDB._driver,$r.WEBSQL._driver,$r.LOCALSTORAGE._driver],si=["dropInstance"],Ki=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(si),xc={description:"",driver:pc.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function mc(C,k){C[k]=function(){var D=arguments;return C.ready().then(function(){return C[k].apply(C,D)})}}function le(){for(var C=1;C<arguments.length;C++){var k=arguments[C];if(k)for(var D in k)k.hasOwnProperty(D)&&(xo(k[D])?arguments[0][D]=k[D].slice():arguments[0][D]=k[D])}return arguments[0]}var yc=function(){function C(k){o(this,C);for(var D in $r)if($r.hasOwnProperty(D)){var L=$r[D],W=L._driver;this[D]=W,pn[W]||this.defineDriver(L)}this._defaultConfig=le({},xc),this._config=le({},this._defaultConfig,k),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return C.prototype.config=function(D){if((typeof D=="undefined"?"undefined":s(D))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var L in D){if(L==="storeName"&&(D[L]=D[L].replace(/\W/g,"_")),L==="version"&&typeof D[L]!="number")return new Error("Database version must be a number.");this._config[L]=D[L]}return"driver"in D&&D.driver?this.setDriver(this._config.driver):!0}else return typeof D=="string"?this._config[D]:this._config},C.prototype.defineDriver=function(D,L,W){var $=new f(function(et,ct){try{var ht=D._driver,ft=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!D._driver){ct(ft);return}for(var dt=Ki.concat("_initStorage"),gt=0,St=dt.length;gt<St;gt++){var Pt=dt[gt],kt=!Sr(si,Pt);if((kt||D[Pt])&&typeof D[Pt]!="function"){ct(ft);return}}var Zt=function(){for(var w=function(pt){return function(){var xt=new Error("Method "+pt+" is not implemented by the current driver"),qt=f.reject(xt);return h(qt,arguments[arguments.length-1]),qt}},F=0,H=si.length;F<H;F++){var st=si[F];D[st]||(D[st]=w(st))}};Zt();var Vt=function(w){pn[ht]&&console.info("Redefining LocalForage driver: "+ht),pn[ht]=D,mo[ht]=w,et()};"_support"in D?D._support&&typeof D._support=="function"?D._support().then(Vt,ct):Vt(!!D._support):Vt(!0)}catch(v){ct(v)}});return x($,L,W),$},C.prototype.driver=function(){return this._driver||null},C.prototype.getDriver=function(D,L,W){var $=pn[D]?f.resolve(pn[D]):f.reject(new Error("Driver not found."));return x($,L,W),$},C.prototype.getSerializer=function(D){var L=f.resolve(hn);return x(L,D),L},C.prototype.ready=function(D){var L=this,W=L._driverSet.then(function(){return L._ready===null&&(L._ready=L._initDriver()),L._ready});return x(W,D,D),W},C.prototype.setDriver=function(D,L,W){var $=this;xo(D)||(D=[D]);var et=this._getSupportedDrivers(D);function ct(){$._config.driver=$.driver()}function ht(gt){return $._extend(gt),ct(),$._ready=$._initStorage($._config),$._ready}function ft(gt){return function(){var St=0;function Pt(){for(;St<gt.length;){var kt=gt[St];return St++,$._dbInfo=null,$._ready=null,$.getDriver(kt).then(ht).catch(Pt)}ct();var Zt=new Error("No available storage method found.");return $._driverSet=f.reject(Zt),$._driverSet}return Pt()}}var dt=this._driverSet!==null?this._driverSet.catch(function(){return f.resolve()}):f.resolve();return this._driverSet=dt.then(function(){var gt=et[0];return $._dbInfo=null,$._ready=null,$.getDriver(gt).then(function(St){$._driver=St._driver,ct(),$._wrapLibraryMethodsWithReady(),$._initDriver=ft(et)})}).catch(function(){ct();var gt=new Error("No available storage method found.");return $._driverSet=f.reject(gt),$._driverSet}),x(this._driverSet,L,W),this._driverSet},C.prototype.supports=function(D){return!!mo[D]},C.prototype._extend=function(D){le(this,D)},C.prototype._getSupportedDrivers=function(D){for(var L=[],W=0,$=D.length;W<$;W++){var et=D[W];this.supports(et)&&L.push(et)}return L},C.prototype._wrapLibraryMethodsWithReady=function(){for(var D=0,L=Ki.length;D<L;D++)mc(this,Ki[D])},C.prototype.createInstance=function(D){return new C(D)},C}(),gc=new yc;r.exports=gc},{3:3}]},{},[4])(4)})})(qf);var zv=qf.exports;const me=ie(zv);me.config(Ut({driver:[me.INDEXEDDB,me.LOCALSTORAGE],name:"SGP7000",size:4980736,storeName:"keyvaluepairs",version:1,description:"SGP7000"},((pd=window.meta.storage)==null?void 0:pd.config)||{}));function kv(){return{getKey:p=>_t(this,null,function*(){return yield me.key(p)}),getKeys:()=>_t(this,null,function*(){return yield me.keys()}),getItem:p=>_t(this,null,function*(){if(p)return yield me.getItem(p)}),setItem:(p,y)=>_t(this,null,function*(){if(p)return yield me.setItem(p,y)}),removeItem:p=>_t(this,null,function*(){if(p)return yield me.removeItem(p)}),clearItems:()=>_t(this,null,function*(){return yield me.clear()}),iterateItems:(p,y)=>_t(this,null,function*(){if(p)return yield me.iterate(p,y)}),getReady:()=>_t(this,null,function*(){return yield me.ready()}),getLength:()=>_t(this,null,function*(){return yield me.length()}),getDriver:()=>_t(this,null,function*(){return yield me.driver()}),setDriver:p=>_t(this,null,function*(){if(p)return yield me.setDriver(p)}),setConfig:p=>_t(this,null,function*(){if(p)return yield me.config(p)}),dropInstance:p=>_t(this,null,function*(){if(p)return yield me.dropInstance(p)}),createInstance:p=>_t(this,null,function*(){if(p)return yield me.createInstance(p)})}}const Nv="THREED_LOG_BUFFER",Lv="THREED_CURRSCENE",Uv="THREED_ACTIVE_MENU",$v="THREED_PIXEL_RATIO",lo="THREED_MODEL_DBNAME",$0="THREED_MODEL_DBSTORE",Hv="THREED_SCENE_PREVIEW",H0="THREED_MODEL_LOAD_KEY",Ni="THREED_PREVIEW_URL_KEY",qv="THREED_ADDON_EDITOR_JSON",Wv="THREED_SCENE_STORAGE_SUFFIX",q0={step:.1},Vv=80,Wf=30,jv=1e3,Gv=1200,Xv=3e5,Yv="三维测试",Kv="灯光",Jv=1,Zv=["环境光","平行光","点光源","聚光灯","半球光","平面光"],Vf=new Set(["syncStatus","disposeTargets","statusMaterials","syncPanelPlacement"]),Qv=["AxesHelper","GridHelper","Box3Helper","PerspectiveCamera"],jf=new Set(["GridHelper","AxesHelper","CameraHelper","SpotLightHelper","PointLightHelper","TransformControls","HemisphereLightHelper","DirectionalLightHelper","TransformControlsPlane"]),Gf=new Set(["CSS2DObject","CSS3DObject"]),tw=Object.assign({"/src/views/threed/models/pd-sensor.js":Pv}),ew=Object.assign({}),rw={环境光:()=>new Tv(16777215,1),平行光:()=>new Iv(16777215,1),点光源:()=>new $f(16777215,1,0,0),聚光灯:()=>new Bv(16777215,1,0,Math.PI/6,0,0),半球光:()=>new Sv(16777215,0,1),平面光:()=>new Rv(16777215,1,100,100)},nw=[{name:"荧光流动",commonUniforms:!0,vertex:"vUv-material",fragment:`
62
+ vec4 o = gl_FragColor.rgba;
63
+ vec2 u = gl_FragCoord.xy;
64
+ vec2 v = iResolution.xy;
65
+ vec2 uv = .2*(u+u-v)/v.y;
66
+ <UV_PLACEHOLDER>
67
+ u = uv;
68
+ vec4 z = o = vec4(1,2,3,0);
69
+ for (float a = .5, t = iTime, i;
70
+ ++i < 19.;
71
+ o += (1. + cos(z+t))
72
+ / length((1.+i*dot(v,v))
73
+ * sin(1.5*u/(.5-dot(u,u)) - 9.*u.yx + t))
74
+ )
75
+ v = cos(++t - 7.*u*pow(a += .03, i)) - 5.*u,
76
+ u += tanh(40. * dot(u *= mat2(cos(i + .02*t - vec4(0,11,33,0)))
77
+ ,u)
78
+ * cos(1e2*u.yx + t)) / 2e2
79
+ + .2 * a * u
80
+ + cos(4./exp(dot(o,o)/1e2) + t) / 3e2;
81
+
82
+ o = 25.6 / (min(o, 13.) + 164. / o)
83
+ - dot(u, u) / 250.;
84
+ vec3 col = o.rgb;
85
+ `,key:"col",commonFinish:!0,render:"iTime+speed"},{name:"太阳照射",commonUniforms:!0,vertex:"vUv-material",fragment:`
86
+ float cheap_star(vec2 uv, float anim)
87
+ {
88
+ uv = abs(uv);
89
+ vec2 pos = min(uv.xy/uv.yx, anim);
90
+ float p = (2.0 - pos.x - pos.y);
91
+ return (2.0+p*(p*p-1.5)) / (uv.x+uv.y);
92
+ }
93
+ <SPLIT_PLACEHOLDER>
94
+ vec2 uv = ( gl_FragCoord.xy - .5*iResolution.xy ) / iResolution.y;
95
+ <UV_PLACEHOLDER>
96
+ uv *= 2.0 * ( cos(iTime * 2.0) -2.5);
97
+ float anim = sin(iTime * 12.0) * 0.1 + 1.0;
98
+ vec3 col = cheap_star(uv, anim) * vec3(0.35,0.2,0.15);
99
+ `,key:"col",commonFinish:!0,render:"iTime+speed"}];let Li=null,Ye=null;const Xf=n=>(n==null?void 0:n.name)||(n==null?void 0:n.label)||"",Yf=(n={})=>Object.values(n).filter(t=>t&&(t.label||t.name)),iw=Yf(tw),sw=Yf(ew),ow=()=>({THREED_GUI_PARAMS:q0,THREED_LOG_BUFFER:Nv,THREED_CURRSCENE:Lv,THREED_ACTIVE_MENU:Uv,THREED_PIXEL_RATIO:$v,THREED_IMPORT_SIZE:Vv,THREED_LIGHT_TYPES:Zv,THREED_EXPORT_BATCH:Wf,THREED_RELOAD_DELAY:jv,THREED_MODEL_DBNAME:lo,THREED_MODEL_DBSTORE:$0,THREED_SCENE_PREVIEW:Hv,THREED_USER_DATA_KEYS:Vf,THREED_MODEL_LOAD_KEY:H0,THREED_PREVIEW_URL_KEY:Ni,THREED_ADDON_EDITOR_JSON:qv,THREED_EXPORT_NODE_COUNT:Gv,THREED_DEFAULT_SCENE_NAME:Yv,THREED_DEFAULT_ACTIVE_MENU:Kv,THREED_DEFAULT_PIXEL_RATIO:Jv,THREED_EXPORT_VERTEX_COUNT:Xv,THREED_SCENE_EXCLUDE_TYPES:Qv,THREED_EXPORT_EXCLUDE_TYPES:jf,THREED_EXPORT_RUNTIME_TYPES:Gf,THREED_SCENE_STORAGE_SUFFIX:Wv});function aw(){const{createInstance:n,dropInstance:t}=kv(),e="/",r=d=>URL.createObjectURL(d),i=()=>_t(this,null,function*(){return yield a(),{clearRequest:s,getAllRequest:h,getRequest:f,status:!0,message:"数据库打开成功",DATABASE:Ye}}),s=d=>_t(this,null,function*(){if(!d)return{status:!1,message:"删除失败"};yield a(),yield Ye.removeItem(d);const m=l();return m.list=m.list.filter(B=>B.name!==d),{status:!0,message:"删除成功"}}),o=(...m)=>_t(this,[...m],function*(d=lo){Ye=null,Li=null,yield t({name:d,storeName:$0})}),a=()=>_t(this,null,function*(){return Ye||(Li||(Li=n({name:lo,storeName:$0}).then(d=>(Ye=d,d))),yield Li)}),u=d=>{if(!d)return!1;const m=String(d.message||"");return d.name==="DataError"||m.includes("in-line keys")},c=()=>_t(this,null,function*(){Ye=null,Li=null,yield t({name:lo}),yield a()}),l=()=>(window.threeEditorDB||(window.threeEditorDB={db:null,list:[]}),window.threeEditorDB),f=d=>_t(this,null,function*(){if(!d)return{status:!1,message:"获取失败"};yield a();const m=yield Ye.getItem(d);if(m!=null&&m.blob&&!d)return{status:!0,message:"获取成功",url:r(m.blob)};if(!d)return{status:!1,message:"获取失败"};const B=yield fetch(d).then(vt=>vt.blob()),N={blob:B};try{yield Ye.setItem(d,N)}catch(vt){if(!u(vt))throw vt;yield c(),yield Ye.setItem(d,N)}const Z=l(),nt=Ut({url:d},N),mt=Z.list.findIndex(vt=>vt.url===d);return mt>-1?Z.list.splice(mt,1,nt):Z.list.push(nt),{status:!0,message:"文件缓存成功",url:r(B)}}),h=()=>_t(this,null,function*(){const d=l();yield a();const m=[];return yield Ye.iterate((B,N)=>{m.push(tr(Ut({},B||{}),{name:N}))}),d.list=m,{status:!0,message:"获取成功",data:m}}),x=()=>_t(this,null,function*(){const d=yield sr.getApi("/filehandle/scan",{path:au.threeModelPath,extension:"glb,gltf"}),{children:m}=d.res,B=[];if(m!=null&&m.length)for(const N of m)B.push({name:N.name,path:"/"+N.path});return B}),p=()=>window.GUI_PARAMS||q0,y=()=>window.threeEditor||null,g=()=>window.editorJsons||[],E=()=>({width:window.innerWidth||0,height:window.innerHeight||0}),A=()=>iw,b=()=>l(),_=()=>rw||{},S=()=>window[Ni]||"",I=()=>sw,R=()=>window.devicePixelRatio||1,z=()=>window[Ni]||"",X=()=>{const d=A(),m=I();return{modelDesigns:d,componentDesigns:m,modelList:d.map(B=>B.label),componentList:m.map(B=>B.label)}},O=(d,m)=>{var B;return(B=d==null?void 0:d.__DESIGNS__)==null?void 0:B.find(N=>N.label===m)},P=(d=0)=>!Number.isFinite(d)||d<=0?"0 B":d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:d<1024*1024*1024?`${(d/1024/1024).toFixed(1)} MB`:`${(d/1024/1024/1024).toFixed(2)} GB`,q=d=>{const m=window[H0];typeof m=="function"&&m(d)},j=d=>!!d&&Number.isFinite(d.x)&&Number.isFinite(d.y)&&Number.isFinite(d.z),K=d=>{var m,B;return!d||!d.visible||(m=d.userData)!=null&&m.excludeFromExport||d.isTransformControls||d.isHelper||d.isLight||d.isPoints||(B=d.type)!=null&&B.includes("Helper")||jf.has(d.type)||Gf.has(d.type)||d.isCSS2DObject||d.isCSS3DObject?!1:d.isMesh||d.isGroup||d.isObject3D||d.isLine},V=(d,m)=>d&&Number.isFinite(d.x)&&Number.isFinite(d.y)&&Number.isFinite(d.z)?d:m,J=d=>d&&Number.isFinite(d.x)&&Number.isFinite(d.y)&&Number.isFinite(d.z)&&Number.isFinite(d.w)?d:{x:0,y:0,z:0,w:1},ot=d=>{if(!(d!=null&&d.isObject3D))return;const m=V(d.position,{x:0,y:0,z:0});d.position.set(m.x,m.y,m.z);const B=V(d.scale,{x:1,y:1,z:1});d.scale.set(B.x===0?1:B.x,B.y===0?1:B.y,B.z===0?1:B.z);const N=V(d.up,{x:0,y:1,z:0});d.up.set(N.x,N.y,N.z);const Z=J(d.quaternion);d.quaternion.set(Z.x,Z.y,Z.z,Z.w),d.pivot&&!j(d.pivot)&&delete d.pivot,d.updateMatrix(),d.updateMatrixWorld(!1)},rt=(d,m="_blank")=>window.open(d,m),lt=(d,m="")=>window.prompt(d,m),at=()=>window.location.reload(),U=()=>document.documentElement.classList.remove("dark"),G=d=>{if(!Array.isArray(d==null?void 0:d.__DESIGNS__))return X();const m=[...A(),...I()],B=new Set(d.__DESIGNS__.map(N=>Xf(N)));return m.forEach(N=>{const Z=Xf(N);!Z||B.has(Z)||(B.add(Z),d.__DESIGNS__.unshift(N))}),X()},tt=d=>{if(!Array.isArray(d==null?void 0:d.__GLSLLIB__))return;const m=new Set(d.__GLSLLIB__.map(B=>B==null?void 0:B.name));nw.forEach(B=>{m.has(B.name)||(m.add(B.name),d.__GLSLLIB__.push(B))})},Q=(d={})=>{const m={};return Object.entries(d||{}).forEach(([B,N])=>{if(!(Vf.has(B)||typeof N=="function")){if(!N||["string","number","boolean"].includes(typeof N)){m[B]=N;return}if(Array.isArray(N)){try{m[B]=structuredClone(N)}catch(Z){return}return}if(!(N.isObject3D||N.isMaterial||N.isTexture||N.nodeType))try{m[B]=structuredClone(N)}catch(Z){return}}}),m},Et=(d=q0)=>{window.GUI_PARAMS=d},Bt=d=>{window.threeEditor=d},Lt=d=>{window.threeEditorDB=d},wt=d=>{window[H0]=d},Wt=(d="")=>{window[Ni]=d},__$t__=(d="")=>{window[Ni]=d},Jt=d=>{var B;const m=[];return(B=d==null?void 0:d.children)==null||B.forEach(N=>{K(N)&&m.push(N)}),m},Kt=(d=[])=>{const m={rootCount:d.length,nodeCount:0,meshCount:0,vertexCount:0,skippedCount:0};return d.forEach(B=>{B.traverse(N=>{var Z,nt,mt;if(K(N)){m.nodeCount+=1,N.isMesh&&(m.meshCount+=1,m.vertexCount+=((mt=(nt=(Z=N.geometry)==null?void 0:Z.attributes)==null?void 0:nt.position)==null?void 0:mt.count)||0);return}N!==B&&(m.skippedCount+=1)})}),m},Tt=()=>new Promise(d=>requestAnimationFrame(()=>setTimeout(d,0))),jt=()=>new Promise(d=>{if(typeof window.requestIdleCallback=="function"){window.requestIdleCallback(()=>d(),{timeout:80});return}setTimeout(d,0)}),ce=(d,m)=>_t(this,null,function*(){var Z;if(!K(d))return null;const B=d.clone(!1);B.userData=Q(d.userData),j(d.pivot)?B.pivot=new it(d.pivot.x,d.pivot.y,d.pivot.z):"pivot"in B&&delete B.pivot,ot(B);const N=[{source:d,clone:B}];for(;N.length;){const nt=N.shift();for(const mt of nt.source.children){if(!K(mt)){m.skippedCount+=1;continue}const vt=mt.clone(!1);vt.userData=Q(mt.userData),j(mt.pivot)?vt.pivot=new it(mt.pivot.x,mt.pivot.y,mt.pivot.z):"pivot"in vt&&delete vt.pivot,ot(vt),nt.clone.add(vt),N.push({source:mt,clone:vt}),m.processedCount+=1,m.processedCount%Wf===0&&(yield(Z=m.onProgress)==null?void 0:Z.call(m,{processedCount:m.processedCount,totalCount:m.totalCount,skippedCount:m.skippedCount,progress:18+Math.min(m.processedCount/Math.max(m.totalCount,1)*54,54)}),yield Tt())}}return B});return{baseUrl:e,getModels:x,getRequest:f,reloadPage:at,promptInput:lt,waitForIdle:jt,waitForPaint:Tt,clearRequest:s,getGuiParams:p,setGuiParams:Et,getAllRequest:h,getEditorJsons:g,getThreeEditor:y,formatFileSize:P,setThreeEditor:Bt,removeDarkClass:U,openExternalUrl:rt,getThreedModels:A,getViewportSize:E,buildExportScene:(B,...N)=>_t(this,[B,...N],function*(d,m={}){const Z=Jt(d),nt=Kt(Z),mt=new Cf,vt={totalCount:nt.nodeCount,processedCount:0,skippedCount:0,onProgress:m.onProgress};for(const Rt of Z){const zt=yield ce(Rt,vt);zt&&mt.add(zt),yield jt()}return mt.updateMatrixWorld(!0),nt.skippedCount+=vt.skippedCount,{exportScene:mt,exportObjects:Z,stats:nt}}),createModelDbApi:i,getEditorPreviewSceneUrl:z,getThreeEditorDB:b,sanitizeUserData:Q,setThreeEditorDB:Lt,findThreedDesign:O,getThreedLightMap:_,collectExportStats:Kt,getPreviewSceneUrl:S,setEditorPreviewSceneUrl:__$t__,setPreviewSceneUrl:Wt,setModelLoadHander:wt,isExportableObject:K,deleteThreeEditorDB:o,ensureThreeEditorDB:l,getDevicePixelRatio:R,getThreedComponents:I,collectExportObjects:Jt,resetModelDbInstance:c,ensureModelDbInstance:a,getLocalDesignMenuData:X,invokeModelLoadHandler:q,isLegacyInlineKeyError:u,ensureThreedShaderLibrary:tt,ensureThreedDesignRegistry:G}}const{THREED_LOG_BUFFER:W0,THREED_CURRSCENE:uo,THREED_ACTIVE_MENU:V0,THREED_PIXEL_RATIO:j0,THREED_SCENE_PREVIEW:G0,THREED_ADDON_EDITOR_JSON:ho,THREED_DEFAULT_SCENE_NAME:cw,THREED_DEFAULT_ACTIVE_MENU:X0,THREED_DEFAULT_PIXEL_RATIO:Y0,THREED_SCENE_STORAGE_SUFFIX:Kf}=ow(),lw=[W0,uo,V0,j0,G0,ho],Nr=(n,t)=>{const e=u0.getLocal(n);return e==null?t:e},Lr=(n,t)=>{n&&u0.setLocal(n,t)},K0=n=>{n&&u0.removeLocal(n)},uw=(n,t)=>{var r,i;const e=(r=n==null?void 0:n.trim)==null?void 0:r.call(n);return e&&t.some(s=>s.name===e)?e:((i=t[0])==null?void 0:i.name)||cw},J0=(n=[])=>Array.isArray(n)?n.filter(t=>typeof t=="string"&&t):[],Jf=()=>{const n=[],t=Nr(uo,{name:"",path:""}),e=Number.parseFloat(Nr(j0,Y0));return{taskState:{busy:!1,type:"",title:"",message:"",description:"",progress:0},currScene:t,sceneList:n,previewScene:!!Nr(G0,!1),activeMenuTitle:Nr(V0,X0)||X0,pixelRatio:Number.isFinite(e)&&e>0?e:Y0,logarithmicDepthBuffer:Nr(W0,!0)!==!1,addonEditorJson:J0(Nr(ho,[]))}},Zf=Ft.defineStore("threed",{state:()=>Jf(),actions:{getSceneList(){return _t(this,null,function*(){var t;const n=yield sr.getCommonApi("threedfloorplan",{limit:1e4,ordering:"-create_time"});(t=n==null?void 0:n.data)!=null&&t.length?(this.sceneList=n.data,this.currScene.path?this.sceneList.find(r=>r.id===this.currScene.id)||this.setCurrScene({name:"",path:""}):this.setCurrScene(this.sceneList[0])):(this.sceneList=[],this.setCurrScene({name:"",path:""}))})},setSceneName(n){this.sceneName=uw(n,this.sceneList),Lr(uo,this.sceneName)},createScene(n){return _t(this,null,function*(){var o,a;const t=(o=n==null?void 0:n.trim)==null?void 0:o.call(n);if(!t||this.sceneList.some(u=>u.name===t))return!1;const e=au.threeSavePath+"/"+da()+".json",r=da();if(!(yield sr.postCommonApi("query/threedfloorplan/create",{data:[{name:t,path:e,guid:r}]})).success)return!1;if(yield Ey(e,"")){const u=yield sr.postCommonApi("threedfloorplan",{guid:r});(a=u==null?void 0:u.data)!=null&&a.length&&(this.sceneList=[...this.sceneList,u.data[0]])}return!0})},deleteScene(n){return _t(this,null,function*(){var r;if(!n)return;if(!(yield sr.postCommonApi("query/threedfloorplan/delete",{data:[n]})).success)return!1;const e=this.sceneList.findIndex(i=>i.id===n);return e===-1?!1:(this.sceneList.splice(e,1),((r=this.currScene)==null?void 0:r.id)===n&&this.setCurrScene(this.sceneList[0]||{name:"",path:""}),!0)})},setCurrScene(n){return _t(this,null,function*(){this.currScene=n,Lr(uo,this.currScene)})},setPreviewMode(n){this.previewScene=!!n,Lr(G0,this.previewScene)},setActiveMenuTitle(n){this.activeMenuTitle=n||X0,Lr(V0,this.activeMenuTitle)},setPixelRatio(n){const t=Number.parseFloat(n);this.pixelRatio=Number.isFinite(t)&&t>0?t:Y0,Lr(j0,this.pixelRatio)},setLogarithmicDepthBuffer(n){this.logarithmicDepthBuffer=!!n,Lr(W0,this.logarithmicDepthBuffer)},getSceneStorageKey(n){return`${n||this.sceneName}${Kf}`},getSceneStorageParams(n,t=null){return Nr(this.getSceneStorageKey(n),t)},setSceneStorageParams(n,t){n&&Lr(this.getSceneStorageKey(n),t)},removeSceneStorageParams(n){n&&K0(this.getSceneStorageKey(n))},resetTaskState(){return _t(this,null,function*(){yield new Promise(n=>setTimeout(n,120)),this.taskState={busy:!1,type:"",title:"",message:"",description:"",progress:0}})},getAddonEditorJson(){return this.addonEditorJson=J0(Nr(ho,this.addonEditorJson)),this.addonEditorJson},setAddonEditorJson(n){this.addonEditorJson=J0(n),Lr(ho,this.addonEditorJson)},clearThreedStorage(){lw.forEach(t=>K0(t)),Object.keys(window.localStorage).filter(t=>t.endsWith(Kf)).forEach(t=>K0(t));const n=Jf();this.currScene=n.currScene,this.sceneList=n.sceneList,this.previewScene=n.previewScene,this.activeMenuTitle=n.activeMenuTitle,this.pixelRatio=n.pixelRatio,this.logarithmicDepthBuffer=n.logarithmicDepthBuffer,this.addonEditorJson=n.addonEditorJson}}}),Ui=n=>{const{onClose:t,customClass:e}=n;return Mr(tr(Ut({},n),{center:!0,customClass:`sy-message ${e||""}`,onClose:i=>{t&&t(i)}}))};["success","warning","info","error"].forEach(n=>{Ui[n]=t=>Ui(typeof t=="string"?{type:n,message:t}:tr(Ut({},t),{type:n}))});const hw={scene:{backgroundBlurriness:0,backgroundIntensity:1,backgroundUrls:null,environmentEnabled:!1},perspectiveCamera:{fov:50,near:.1,far:1e5,zoom:1,layers:{mask:1},filmOffset:0,filmGauge:35,position:{x:247.72931803058157,y:715.3890430349733,z:789.6794984861216}},webglRenderer:{outputColorSpace:"srgb",toneMapping:0,toneMappingExposure:1,shadowMap:{enabled:!1,type:1},color:0,opacity:0,sortObjects:!0,localClippingEnabled:!1,autoClear:!0,autoClearColor:!0,renderListCompare:[{name:"stats",enabled:!0},{name:"controls",enabled:!0},{name:"scene",enabled:!0},{name:"css3DRender",enabled:!0},{name:"css2DRender",enabled:!0}]},orbitControls:{autoRotate:!1,autoRotateSpeed:2,enableDamping:!0,dampingFactor:.05,minDistance:.01,maxDistance:1e6,maxAzimuthAngle:null,minAzimuthAngle:null,maxPolarAngle:3.141592653589793,minPolarAngle:0,maxTargetRadius:null,minTargetRadius:0,enablePan:!0,panSpeed:1,enableRotate:!0,rotateSpeed:1,enableZoom:!0,zoomSpeed:1,zoomToCursor:!1,target:{x:-38.59603927643809,y:-48.97202695679889,z:-49.19814250541991}},transformControls:{mode:"translate",space:"world",size:1,showX:!0,showY:!0,showZ:!0,translationSnap:null,rotationSnap:null,scaleSnap:null},effectComposer:{renderWay:"effectComposer",fxaaPass:{enabled:!0,order:60,multPixel:1},outlinePass:{enabled:!0,order:40,edgeStrength:3,edgeGlow:0,edgeThickness:1,pulsePeriod:0,usePatternTexture:!1,visibleEdgeColor:16449071,hiddenEdgeColor:16449071,overlayMaterial:{blending:5,blendEquation:100,blendSrc:201,blendDst:205}},outputPass:{enabled:!0,order:50},saoPass:{enabled:!1,order:10,saoBias:.5,saoIntensity:.01,saoScale:100,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},screenMaskPass:{enabled:!1,order:70,intensity:1,maskColor:16777215,R:.2,sr:1.2},ssrPass:{enabled:!1,order:30,maxDistance:.01,distanceAttenuation:!0,opacity:.5,thickness:.018,fresnel:!0,infiniteThick:!1,bouncing:!1},unrealBloomPass:{enabled:!1,order:20,strength:1.5,radius:.4,threshold:.85}},handler:{mode:"transform",openKeyEnable:!0,rightClickMenusEnable:!0,selectChildEnabled:!1,selectChildLevel:1,stats:{showStats:!1,statsMode:0},helpers:{axes:{showAxes:!0,axesLength:1e3},grid:{showGrid:!0,size:1e3,divisions:15,colorCenterLine:4473924,colorGrid:8947848},box3:{useBox3:!0,color:16776960}}},lightCores:[{name:"环境光",type:"AmbientLight",visible:!0,position:{x:0,y:0,z:0},color:16777215,intensity:1,castShadow:!1,layers:{mask:1}}],innerCores:[],modelCores:[],drawCores:[],textCores:[],particleCores:[],geoCores:{},designCores:[],other:{viewAngleList:[],clipping:{size:20,clipList:[]}}};class fw extends Cf{constructor(){super(),this.name="RoomEnvironment",this.position.y=-3.5;const t=new N0;t.deleteAttribute("uv");const e=new Of({side:Vh}),r=new Of,i=new $f(16777215,900,28,2);i.position.set(.418,16.199,.3),this.add(i);const s=new _r(t,e);s.position.set(-.757,13.219,.717),s.scale.set(31.713,28.305,28.591),this.add(s);const o=new vv(t,r,6),a=new ae;a.position.set(-10.906,2.009,1.846),a.rotation.set(0,-.195,0),a.scale.set(2.328,7.905,4.651),a.updateMatrix(),o.setMatrixAt(0,a.matrix),a.position.set(-5.607,-.754,-.758),a.rotation.set(0,.994,0),a.scale.set(1.97,1.534,3.955),a.updateMatrix(),o.setMatrixAt(1,a.matrix),a.position.set(6.167,.857,7.803),a.rotation.set(0,.561,0),a.scale.set(3.927,6.285,3.687),a.updateMatrix(),o.setMatrixAt(2,a.matrix),a.position.set(-2.017,.018,6.124),a.rotation.set(0,.333,0),a.scale.set(2.002,4.566,2.064),a.updateMatrix(),o.setMatrixAt(3,a.matrix),a.position.set(2.291,-.756,-2.621),a.rotation.set(0,-.286,0),a.scale.set(1.546,1.552,1.496),a.updateMatrix(),o.setMatrixAt(4,a.matrix),a.position.set(-2.193,-.369,-5.547),a.rotation.set(0,.516,0),a.scale.set(3.875,3.487,2.986),a.updateMatrix(),o.setMatrixAt(5,a.matrix),this.add(o);const u=new _r(t,Kn(50));u.position.set(-16.116,14.37,8.208),u.scale.set(.1,2.428,2.739),this.add(u);const c=new _r(t,Kn(50));c.position.set(-16.109,18.021,-8.207),c.scale.set(.1,2.425,2.751),this.add(c);const l=new _r(t,Kn(17));l.position.set(14.904,12.198,-1.832),l.scale.set(.15,4.265,6.331),this.add(l);const f=new _r(t,Kn(43));f.position.set(-.462,8.89,14.52),f.scale.set(4.38,5.441,.088),this.add(f);const h=new _r(t,Kn(20));h.position.set(3.235,11.486,-12.541),h.scale.set(2.5,2,.1),this.add(h);const x=new _r(t,Kn(100));x.position.set(0,20,0),x.scale.set(1,.1,1),this.add(x)}dispose(){const t=new Set;this.traverse(e=>{e.isMesh&&(t.add(e.geometry),t.add(e.material))});for(const e of t)e.dispose()}}function Kn(n){return new _v({color:0,emissive:16777215,emissiveIntensity:n})}const Qf=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},dw=Qf(Object.assign({name:"ThreedEditor"},{__name:"editor",props:{data:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1}},emits:["emit-three-editor","graph-event"],setup(n,{expose:t,emit:e}){const r=n,i=Zf(),{currScene:s}=Ft.storeToRefs(i),o=e;Qt.ThreeEditor.dracoPath="/draco/";let a=null,u=null;const c=T.ref(null),{setGuiParams:l,getDevicePixelRatio:f,ensureThreedDesignRegistry:h}=aw();h(Qt.ThreeEditor),l({step:.1});const x=()=>{var b;return(b=a==null?void 0:a.renderSceneResize)==null?void 0:b.call(a)};let p=[];const y=()=>{p.forEach(b=>URL.revokeObjectURL(b)),p=[]},g=()=>_t(this,null,function*(){var _,S;let b=hw;try{if(r.data&&Object.keys(r.data).length)b=r.data;else if((_=s.value)!=null&&_.path){const I=yield sr.getApi((S=s.value)==null?void 0:S.path).catch(()=>({}));console.log("初始化三维场景:",I),I.res&&(b=I.res)}b.designCores.forEach(I=>{I.preview=r.preview}),a?a.resetEditorStorage(b):a=new Qt.ThreeEditor(c.value,{fps:null,pixelRatio:f()*i.pixelRatio,webglRenderParams:{antialias:!0,alpha:!0,logarithmicDepthBuffer:i.logarithmicDepthBuffer},sceneParams:b})}catch(I){a==null||a.resetEditorStorage(b)}finally{r.preview&&a&&setTimeout(()=>{a.handler.mode="none",a.handler.helpers.axes.showAxes=!1,a.handler.helpers.box3.useBox3=!1,a.handler.helpers.grid.showGrid=!1},200),E()}o("emit-three-editor",a),window.addEventListener("resize",x)}),E=()=>{a!=null&&a.renderer&&(u=new Qt.THREE.PMREMGenerator(a.renderer),u.compileEquirectangularShader(),a.scene.environment=u.fromScene(new fw).texture)},A=()=>a;return T.watch(()=>s.value.path,()=>_t(this,null,function*(){g()})),T.watch(()=>r.data,()=>{g()},{deep:!0}),T.onMounted(()=>{r.preview||g()}),T.onUnmounted(()=>{window.removeEventListener("resize",x),y(),a==null||a.destroySceneRender(),i.setCurrScene({name:"",path:""})}),t({getEditorInstance:A}),(b,_)=>(T.openBlock(),T.createElementBlock("div",{ref_key:"editorRef",ref:c,class:"threed-editor",onDragover:_[0]||(_[0]=T.withModifiers(()=>{},["prevent"])),onDrop:_[1]||(_[1]=T.withModifiers(()=>{},["prevent"]))},null,544))}}),[["__scopeId","data-v-65e621f7"]]),pw={class:"threed-preview"},$i=Qf({__name:"preview",props:{data:{type:Object,default:null},url:{type:String,default:""},id:{type:String,default:""},token:{type:String,default:""},socketUrl:{type:String,default:""}},emits:["loaded","graph-event"],setup(n,{expose:t,emit:e}){const r=n,i=e;let s=T.shallowRef({});const o=T.ref(),a=Zf(),u={};let c=null;const l=E=>{var b,_,S;if(!E)return;if((b=E==null?void 0:E.includes)!=null&&b.call(E,"token 必传"))return Ui({message:E,type:"warning"});const A=typeof E=="string"?JSON.parse(E):E;if((A==null?void 0:A.data)==="服务错误"||(S=(_=A==null?void 0:A.data)==null?void 0:_.includes)!=null&&S.call(_,"token is expired"))return Ui({message:A.data,type:"warning"});switch(A.action){case iu.ACPOINT.YCVALUE:case iu.ACPOINT.YXVALUE:console.warn("遥测信息");break}},f=()=>{try{c=new by({socketUrl:r.socketUrl,token:r.token,onMessage:l})}catch(E){console.warn("三维场景消息处理失败",E)}},h=E=>_t(this,null,function*(){var b;const A=yield sr.postCommonApi("queryrealtimepoint",{point_id:E.join(",")});if((b=A==null?void 0:A.data)!=null&&b.length){A.data.forEach(S=>{u[S.guid]=S.value_disp||S.value});const _=g();E.forEach(S=>{const I=_.scene.getObjectByProperty("dataId",S);I&&(I.userData.params.state=u[S],I.userData.params.value=u[S])})}}),x=E=>{console.log("🚀 ~ handleGraphEvent:",E),i("graph-event",E)},p=E=>{var _;console.log("🚀 ~ handleEditorReady:",E),r.socketUrl&&f();const A=E.saveSceneEdit();let b=[];(_=A==null?void 0:A.designCores)==null||_.forEach(S=>{S.designType==="局放测点"&&S.id&&b.push(S.id)}),b!=null&&b.length&&h(b),i("loaded",E)},y=()=>_t(this,null,function*(){if(s.value&&Object.keys(s.value).length)return;const E=vy(),A=r.url||E.url;if(A){const S=yield sr.getApi(A).catch(()=>({}));S.res&&(s.value=S.res);return}if(!(r.id||E.id)){console.warn("三维场景渲染失败,场景id为空!");return}const _=yield sr.getCommonApi("threedfloorplan",{guid:r.id});_.data.length?a.setCurrScene(_.data[0]):console.warn("三维场景渲染失败,场景id为:"+r.id+"不存在!")}),g=()=>o.value?o.value.getEditorInstance():null;return T.watch(()=>r.data,E=>{s.value=E,y()},{deep:!0,immediate:!0}),T.watch(()=>r.id,()=>{y()},{deep:!0,immediate:!0}),T.onMounted(()=>{pa.on("three-event",x)}),T.onUnmounted(()=>{c&&c.destroy(),pa.off("three-event",x)}),t({getEditorInstance:g}),(E,A)=>(T.openBlock(),T.createElementBlock("div",pw,[T.createVNode(dw,{ref_key:"threedEditorRef",ref:o,data:T.unref(s),preview:"",onGraphEvent:x,onEmitThreeEditor:p},null,8,["data"])]))}},[["__scopeId","data-v-a0197fe6"]]);$i.name||($i.name="SyThreedGraph");const xw={install:n=>{n.component($i.name||"SyThreedGraph",$i)}};bt.SyThreedGraph=$i,bt.default=xw,Object.defineProperties(bt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});